diff --git a/.github/repository-metadata.json b/.github/repository-metadata.json
index 7e978339d..cadff548e 100644
--- a/.github/repository-metadata.json
+++ b/.github/repository-metadata.json
@@ -4,7 +4,7 @@
"ai-agents",
"multi-agent",
"agentic-workflow",
- "sop",
+ "loop",
"workflow-automation",
"software-engineering",
"human-on-the-loop",
diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml
index 89d6b1d83..02830e74a 100644
--- a/.github/workflows/platform.yml
+++ b/.github/workflows/platform.yml
@@ -24,7 +24,7 @@ jobs:
run: bash scripts/build-chatbot.sh
- name: Let Chromium use its sandbox as an unprivileged user
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- # Engine and API tests run SOP nodes in the shared test-native sandbox,
+ # Engine and API tests run LOOP nodes in the shared test-native sandbox,
# which is bwrap on Linux.
- name: Install bubblewrap for the native sandbox
run: sudo apt-get update && sudo apt-get install -y bubblewrap
@@ -91,13 +91,13 @@ jobs:
working-directory: e2e
- run: bash ../scripts/install-playwright-deps.sh npx playwright
working-directory: e2e
- # The e2e SOPs and the runner the suite starts use the native e2e sandbox,
+ # The e2e LOOPs and the runner the suite starts use the native e2e sandbox,
# which is bwrap on Linux.
- name: Let bubblewrap create user namespaces
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Install bubblewrap for the native sandbox
run: sudo apt-get update && sudo apt-get install -y bubblewrap
- # The welcome SOP runs in generic-docker. As in a Compose installation, it
+ # The welcome LOOP runs in generic-docker. As in a Compose installation, it
# uses the pinned platform image instead of building one during the tests.
- name: Pull the pinned platform image for the generic-docker sandbox
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8220de930..1239297ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,26 +8,27 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo
- Authorization boundaries for Runners, accounts and MCP servers are stricter. Runner re-registration renews a machine only for its current owner; a platform bootstrap token registers a new machine instead of adopting a user's. Browser setup and self-registration are limited to password installations, and login names listed in `AGENTFLOW_PLATFORM_ADMINS` must be created with the operator account command. Personal MCP writes are bound to the signed-in user. An MCP import is saved as a whole or not at all, so a payload with a forbidden entry or a repeated ID now fails, and a platform administrator can no longer import other users' personal MCPs. Cloning a role copies MCP servers only from projects the caller can write; market MCPs are installed from the catalog instead.
- **Upgrade action for personal execution machines.** Existing project conversations bound to a personal machine require a project grant before the next message can run. The machine owner can grant access in **Settings → Execution machines → Shared projects**, then resume the conversation on the same machine. [Upgrade instructions](docs/deployment.md#upgrading-existing-project-conversations)
-- **Breaking:** the `local` sandbox type is removed and native sandboxes only carry environment variables. A native sandbox runs on whichever machine executes the work (a user's execution machine, a cloud runner or the platform host) with that machine's own toolchains; environment install scripts, `$PREFIX` and install PATH entries are gone, and settings such as `JAVA_HOME` go into the sandbox's environment variables. SOPs and conversation workspaces can use Docker or native sandboxes; the default sandbox is `generic-docker`, and `AGENTFLOW_LOCAL_SANDBOX` is removed. A local row that was not migrated reads as native; a run frozen with a local sandbox asks to be started again with a native one.
-- Native SOP checkouts use a private repository cache on each execution machine. The platform or Runner refreshes the bare repository with the checkout's Git credentials and copies Git objects into the worktree. This reuses the network fetch and leaves each worktree and checkpoint independent. Docker sandboxes keep direct clones. Conversation workspaces start empty and the agent clones using the current speaker's credentials. Runner 0.12.0 supports cached SOP checkouts.
-- SOPs dispatched from project conversations can reuse the conversation's Git checkouts, including repositories nested inside another checkout, and keep local commits and edits. Upgrade the platform and its execution machines together. Reusing a conversation checkout on an execution machine requires Runner 0.12.3 or later.
+- Reusable delivery workflows now appear as **LOOPs** in the product, agent guidance and documentation. Existing API routes, workflow IDs and stored execution types stay compatible. The installer and `./start.sh pull` update the built-in template names and demo project copy.
+- **Breaking:** the `local` sandbox type is removed and native sandboxes only carry environment variables. A native sandbox runs on whichever machine executes the work (a user's execution machine, a cloud runner or the platform host) with that machine's own toolchains; environment install scripts, `$PREFIX` and install PATH entries are gone, and settings such as `JAVA_HOME` go into the sandbox's environment variables. LOOPs and conversation workspaces can use Docker or native sandboxes; the default sandbox is `generic-docker`, and `AGENTFLOW_LOCAL_SANDBOX` is removed. A local row that was not migrated reads as native; a run frozen with a local sandbox asks to be started again with a native one.
+- Native LOOP checkouts use a private repository cache on each execution machine. The platform or Runner refreshes the bare repository with the checkout's Git credentials and copies Git objects into the worktree. This reuses the network fetch and leaves each worktree and checkpoint independent. Docker sandboxes keep direct clones. Conversation workspaces start empty and the agent clones using the current speaker's credentials. Runner 0.12.0 supports cached LOOP checkouts.
+- LOOPs dispatched from project conversations can reuse the conversation's Git checkouts, including repositories nested inside another checkout, and keep local commits and edits. Upgrade the platform and its execution machines together. Reusing a conversation checkout on an execution machine requires Runner 0.12.3 or later.
- Users can choose a preferred sandbox kind in 设置 → AI 助手 → 对话工作区. The preference (`workspaceDriver` in `/api/assistant/preferences`) prioritizes that kind among compatible environments. A task can require another toolchain, and a fixed conversation environment takes precedence. The workbench groups sandboxes by kind, and the header displays the current workspace's sandbox type icon and ID beside the execution machine. Startup AutoMigrate and migration 041 both add the preference column.
-- **Breaking:** a docker sandbox now carries its own Dockerfile, and the 环境资产 page becomes 「沙箱管理」 without type tabs: the sandbox editor holds the Dockerfile and its build-context files for docker, and only environment variables for native. Dockerfiles and install scripts are no longer separate assets. `/api/dockerfiles`, `/api/environments`, the `dockerfiles_*` / `environments_*` assistant and MCP tools and the `dockerfiles` / `environments` bootstrap fields are removed; `PUT /api/sandboxes` takes `dockerfile {content, files}` in place of `dockerfileId`, and rejects `driver: local`. For an existing Compose database, `./start.sh pull` backs up the database and applies `migrations/041_native_sandbox_inline_assets.sql` with the platform stopped when the target image supports inline Dockerfiles and legacy asset tables still exist. For a manual Compose upgrade, use `./start.sh migrate-sandboxes`. Apply the SQL directly for external MySQL. It copies each referenced Dockerfile into its sandbox, turns one that no sandbox used into a sandbox of its own, turns local sandboxes into native ones, copies ordinary variables from referenced environments, drops install scripts and `PATH` from native sandbox variables, and moves SOPs that used the old default to `generic-docker`, and drops the `dockerfiles` and `environments` tables. Docker images are reused.
+- **Breaking:** a docker sandbox now carries its own Dockerfile, and the 环境资产 page becomes 「沙箱管理」 without type tabs: the sandbox editor holds the Dockerfile and its build-context files for docker, and only environment variables for native. Dockerfiles and install scripts are no longer separate assets. `/api/dockerfiles`, `/api/environments`, the `dockerfiles_*` / `environments_*` assistant and MCP tools and the `dockerfiles` / `environments` bootstrap fields are removed; `PUT /api/sandboxes` takes `dockerfile {content, files}` in place of `dockerfileId`, and rejects `driver: local`. For an existing Compose database, `./start.sh pull` backs up the database and applies `migrations/041_native_sandbox_inline_assets.sql` with the platform stopped when the target image supports inline Dockerfiles and legacy asset tables still exist. For a manual Compose upgrade, use `./start.sh migrate-sandboxes`. Apply the SQL directly for external MySQL. It copies each referenced Dockerfile into its sandbox, turns one that no sandbox used into a sandbox of its own, turns local sandboxes into native ones, copies ordinary variables from referenced environments, drops install scripts and `PATH` from native sandbox variables, and moves LOOPs that used the old default to `generic-docker`, and drops the `dockerfiles` and `environments` tables. Docker images are reused.
### enterprise IM channels (Feishu and DingTalk chats, proactive notifications, data retention)
-- Runs started from a Feishu or DingTalk chat (confirm and start, dispatch, or save-and-start after a chat clarification) report back to that conversation without any SOP notification binding: a failed or waiting node arrives as an action card, the end of the run as a short message. Group runs report to the group, where any bound project member can use the card buttons as themselves; the card then names who acted and locks. Feishu sends group messages by `chat_id`, DingTalk through the robot group message API and `IM_GROUP` cards. The starting conversation is stored with the run when it is created; a later run of the same requirement started on the platform is not sent to the chat.
+- Runs started from a Feishu or DingTalk chat (confirm and start, dispatch, or save-and-start after a chat clarification) report back to that conversation without any LOOP notification binding: a failed or waiting node arrives as an action card, the end of the run as a short message. Group runs report to the group, where any bound project member can use the card buttons as themselves; the card then names who acted and locks. Feishu sends group messages by `chat_id`, DingTalk through the robot group message API and `IM_GROUP` cards. The starting conversation is stored with the run when it is created; a later run of the same requirement started on the platform is not sent to the chat.
- A node that needs supplementary information (a `human` decision with `actionRequired`) sends its question to the chat the run was started from. Answering in that chat (“回答:…”, or a reply to the question in Feishu and WeCom) retries the same node of the same run with the answer as human context, like “补充信息,重跑当前节点” on the platform. On Feishu the question card has an answer input and a “提交答案” button instead of approve and retry; WeCom template cards have no text input, so WeCom gets the question as a text message to quote. IM and the platform act on the same waiting node: an answered question, an ended node or a cancelled run refuses further answers, and answers run as the sender’s bound account with the project permission checked. WeCom quotes identify the original node attempt by the question message's delivery reference. Older or incomplete quotes without a usable reference prompt the user to select a question by number. In Feishu groups a reply to the question needs no @ when the application has the “read all group messages” permission. See `docs/im-channels.md` section 8.8.
-- WeCom Bots with chat enabled match Feishu: write confirmations come with a card (a multiple-choice card with repository, SOP and operation drop-downs for a new requirement, otherwise buttons), runs started from a WeCom chat report back to it over the long connection, and requirements can be clarified in WeCom chats with button cards.
+- WeCom Bots with chat enabled match Feishu: write confirmations come with a card (a multiple-choice card with repository, LOOP and operation drop-downs for a new requirement, otherwise buttons), runs started from a WeCom chat report back to it over the long connection, and requirements can be clarified in WeCom chats with button cards.
- Requirements can be clarified in Feishu and DingTalk chats: “澄清 LOOP-7” runs the platform clarification in the background and posts each round's numbered questions into the conversation. In groups any bound member may answer; numbered answers and quotes of the question card count, other messages are judged by a small model, and when it is unsure the speaker is asked to confirm. The next round starts when all questions are answered, on request, or three minutes after the last answer. A conclusion is written into the requirement (and back to TAPD or 工蜂) only when the responsible person, the starter or a project maintainer saves it, once; a read-only Bot refuses to save. New tables `bot_chat_origins` and `bot_clarify_sessions` and the columns `notification_deliveries.origin` and `bot_interactions.reply_to` are added by the startup DDL. See `docs/im-channels.md` sections 8.6 and 8.7.
- Feishu and DingTalk notifications of waiting or failed nodes are action cards when the Bot has chat enabled: approve, retry, rework or pass directly in the chat, with the same checks as WeCom cards; the result comes back as a private message. Feishu needs the `card.action.trigger` callback on the long connection; DingTalk needs an interactive card template ID in the Bot settings (empty keeps text notifications).
- Feishu and DingTalk Bots answer in group chats when @-mentioned (Feishu needs the “read @-bot messages in groups” permission); other group messages are ignored. Each group has its own shared context and every message runs as the sender's bound account.
-- Feishu write confirmations are a card with “确认执行 / 确认并启动 SOP / 取消” buttons instead of a bare link; only the requester can use them and the result arrives as a private message. The Bot form labels the model field “回答模型” and keeps “默认” selectable.
-- Requirements created from chat show the repository and the SOP they will be bound to (the project defaults unless named in the chat); the Feishu confirmation card and the confirmation page let the user choose another repository and SOP of the project and start it right after creation.
+- Feishu write confirmations are a card with “确认执行 / 确认并启动 LOOP / 取消” buttons instead of a bare link; only the requester can use them and the result arrives as a private message. The Bot form labels the model field “回答模型” and keeps “默认” selectable.
+- Requirements created from chat show the repository and the LOOP they will be bound to (the project defaults unless named in the chat); the Feishu confirmation card and the confirmation page let the user choose another repository and LOOP of the project and start it right after creation.
- **Chat Bot data now has a retention period.** An hourly cleanup removes the text of finished conversation turns, notification deliveries and web-confirmation drafts, and the native CLI logs of Bot turns, 90 days after they finished, and deletes the finished records after 180 days. This also applies to existing WeCom conversation and notification records on the first start after upgrading. Records still waiting for someone (in progress, ready to send, delivery unknown) are kept. Set `AGENTFLOW_BOT_BODY_RETENTION_DAYS` and `AGENTFLOW_BOT_RECORD_RETENTION_DAYS` (0 keeps forever) before enabling the Bot workers if you need longer. Records whose text was removed show “正文已按保留期清理” and cannot be sent again. See `docs/im-channels.md` sections 9 and 10.
-- Feishu and DingTalk Bots send SOP notifications (completed, failed, waiting) as private messages to one member who bound an account in a private chat with the Bot; notification-only configurations (chat disabled) work too. Saving the recipient first sends a trial message and only a confirmed delivery is accepted; unbinding clears it. Feishu unknown outcomes are retried with the same uuid for 55 minutes, DingTalk ones stop at 送达待核对, where managers can confirm receipt or send again. Switching the recipient with queued notifications asks whether to move or cancel them. See `docs/im-channels.md` section 8.
+- Feishu and DingTalk Bots send LOOP notifications (completed, failed, waiting) as private messages to one member who bound an account in a private chat with the Bot; notification-only configurations (chat disabled) work too. Saving the recipient first sends a trial message and only a confirmed delivery is accepted; unbinding clears it. Feishu unknown outcomes are retried with the same uuid for 55 minutes, DingTalk ones stop at 送达待核对, where managers can confirm receipt or send again. Switching the recipient with queued notifications asks whether to move or cancel them. See `docs/im-channels.md` section 8.
- A DingTalk reply whose session webhook expired can be sent to the original sender as a proactive private message from the record page, after that member passed a trial send.
-- WeCom Bots gain the 网页确认 write mode: writes come back as a summary and a confirmation link, the bound user confirms on the platform page, and a draft runs at most once. Feishu and DingTalk Bots can use the same mode (they cannot write automatically), so requirements can be created and SOPs dispatched or started from a private chat after a confirmation on the platform page.
+- WeCom Bots gain the 网页确认 write mode: writes come back as a summary and a confirmation link, the bound user confirms on the platform page, and a draft runs at most once. Feishu and DingTalk Bots can use the same mode (they cannot write automatically), so requirements can be created and LOOPs dispatched or started from a private chat after a confirmation on the platform page.
- DingTalk enterprise internal applications can be added as Bots over Stream mode: private text chats, account binding and read-only queries, replies through each message's session webhook. The administrator enters the enterprise CorpId; the first matching message confirms it automatically, another enterprise stops processing as a conflict. The Stream connection is implemented by the platform (only data types of `open-dingtalk/dingtalk-stream-sdk-go` v0.9.1 are used) because the SDK's client can crash the process after a heartbeat timeout. Session webhooks are stored encrypted and cleared when used or expired; replies whose webhook expired stay on the record page as 会话回复授权已过期. See `docs/im-channels.md` section 4A.
- Feishu self-built applications can be added as Bots: private text chats, account binding and read-only project queries over the official long connection (`larksuite/oapi-sdk-go` v3.13.0). The first message from a new application records its enterprise; a Bot manager confirms it before any request is processed, and messages from other enterprises are dropped. See `docs/im-channels.md`.
@@ -35,7 +36,7 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo
- **WeCom fallback send changed.** A reply whose stream fails is sent again as a proactive message only when the stream provably did not go out (stream unavailable, request never written, or rejected by WeCom). A stream that may have been delivered but had no receipt is no longer sent twice: the record shows 送达待核对, and a manager chooses 确认已收到 or 再次发送 (a new delivery that may duplicate) on the record page.
- **Disabling a Bot keeps generated replies.** Queued and running turns are cancelled, replies already generated wait and are sent after the Bot is enabled again, and a send in progress becomes 送达待核对. Deleting a Bot cancels unsent work, moves in-flight sends to 待核对, and revokes the Bot's chat bindings.
- Bot secrets are encrypted with AES-256-GCM using `AGENTFLOW_CREDENTIAL_KEYS`. Compose installations get a generated key in `.env` (added to existing `.env` files on the next `./start.sh`), and `compose.yaml` now passes `AGENTFLOW_CREDENTIAL_KEYS`, `AGENTFLOW_PUBLIC_URL` and `AGENTFLOW_BOT_WORKERS_ENABLED` to the platform container. Back up `.env` together with the database. Existing plaintext secrets stay readable; `agentflow -credential-action status|reencrypt` reports and migrates them. Without a key, saving a new secret returns `credential_key_missing`.
-- **Bot chats accept a plain natural-language answer.** Before, a Bot turn could only end through `submit_assistant_reply`, which refuses replies without drafts, so plain query answers ran the model three times and failed with 助手未提交回复. Now plain text from a successful run is the reply; protocol JSON, progress-only text, empty output and failed runs still go through the terminal retry. Writes still need drafts or the tool gateway. Applies to WeCom and Feishu Bots, not to the web assistant or SOP nodes.
+- **Bot chats accept a plain natural-language answer.** Before, a Bot turn could only end through `submit_assistant_reply`, which refuses replies without drafts, so plain query answers ran the model three times and failed with 助手未提交回复. Now plain text from a successful run is the reply; protocol JSON, progress-only text, empty output and failed runs still go through the terminal retry. Writes still need drafts or the tool gateway. Applies to WeCom and Feishu Bots, not to the web assistant or LOOP nodes.
- Receiving leases, send windows and retries are judged on the database clock with an epoch per owner, so a replica that lost its lease can no longer overwrite a reply or send it twice. Notification deliveries gain the state `send_unknown`.
- Upgrading needs a maintenance window: stop every old replica, start the new version once with `AGENTFLOW_BOT_WORKERS_ENABLED=false`, run `migrations/036_enterprise_im_channels.sql` and `migrations/037_bot_binding_ownership.sql`, run `-credential-action reencrypt`, then restart with workers enabled. Bots not backfilled by 036 do not receive messages.
@@ -48,16 +49,16 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo
For a direct upgrade from `v0.4.0`, follow the [GitHub credential migration instructions](docs/deployment.md#migrating-existing-github-credentials) before starting the new version.
-## 0.4.1 — Git and MCP credentials, SOP orchestration and conversation workspaces
+## 0.4.1 — Git and MCP credentials, LOOP orchestration and conversation workspaces
-- Configure HTTPS Git credentials per host, authorize the IP addresses of self-hosted HTTPS Git servers, and distribute trusted SSH host keys to execution machines. MCP servers, market items and SOP nodes can use configured credentials.
+- Configure HTTPS Git credentials per host, authorize the IP addresses of self-hosted HTTPS Git servers, and distribute trusted SSH host keys to execution machines. MCP servers, market items and LOOP nodes can use configured credentials.
- Use personal conversation workspaces, refresh the repository context on demand and restore a conversation's model and send preferences. Replies report the CLI and version that ran them. Conversation workspaces can recover after their Docker instance stops.
- Runners support Antigravity login and managed updates for six agent CLIs. Installations can use other supported providers for platform model features that previously required CodeBuddy.
-- AI scheduled tasks can reference project assets and wait for a triggered SOP to finish. Execution history records token usage and the dashboard shows totals.
-- The SOP designer's AI orchestrator runs as its own conversation surface (`surface: "sop-designer"` on `POST /api/assistant/chat` and `/api/assistant/generations`) instead of a workbench chat with a long prompt built in the browser. The server now writes the designer system prompt, the project's roles (all of them, no longer the first 40), the canvas snapshot and the SOPs the user named into each turn as data, so the transcript keeps only what the user typed. A designer turn always runs in confirm mode with read-only platform tools only: no workspace, browser or external MCP, and the model can submit nothing but one `workflows_save` draft. Its conversation is private to the author, no longer appears in the workbench history (where it used to show up with the generated prompt as its title) and cannot be continued there; `GET /api/assistant/sessions?surface=sop-designer&workflowId=…` lists it. A second message in the same orchestrator conversation no longer fails with 「共享会话已更新,请重新打开后发送」, which happened because the canvas resent a simplified history of a project-shared session. `workflows_save` drafts from any conversation now warn about duplicate node ids, edges to missing nodes, self loops and cycles before they are saved, and the 「构建静态站点」 node no longer warns that role `af-preview-builder` does not exist.
-- The orchestrator panel embeds the chatbot (`/chatbot/?surface=sop-designer`) instead of its own hand-written chat. Replies render Markdown with the execution trace, a running turn can be stopped, the turn runs as a background generation, so closing the panel or reloading the page no longer loses it, and reopening a SOP shows its earlier conversation. The CLI and model choice keeps its own memory as before. Each reply's draft shows its warnings and can be put on the canvas again. The canvas and the chat talk only through `agentflow-sop-designer-*` window messages; the canvas still animates nodes and wires as the draft streams in.
-- Editing a SOP in the orchestrator no longer rewrites the whole graph. On a canvas with steps the model submits `operations` (`add_node`, `update_node`, `remove_node`, `add_edge`, `remove_edge`, `update_workflow`) and the server applies them to the canvas it received, so steps, prompts, scripts, layout and the 「构建静态站点」 node the user did not mention stay exactly as they were. An operation that does not fit the canvas (an unknown node, a duplicate edge, removing a node another step rejects to) goes back to the model with the reason instead of reaching the canvas. The canvas no longer guesses intent from the wording: it no longer matches 「重新…」 or 「去掉预览」 phrases or SOP names in the message; the server lists the project's SOPs and the model reads the one the user means. A draft with a different SOP id replaces the canvas only after the user confirms.
-- The orchestrator offers the model only roles a SOP save accepts: roles of this project and roles another project shares. A built-in role that belongs to no project used to be offered, and the draft then failed on save with 「角色 … 不属于当前项目且尚未共享」. `workflows_save` drafts from any conversation now warn about such a role before saving. A script longer than 400 characters reaches the model as a marker that says it is omitted, not as an empty string; the model used to report the script as empty and offer to write one, and a marker copied back into a draft is replaced by the canvas's script.
+- AI scheduled tasks can reference project assets and wait for a triggered LOOP to finish. Execution history records token usage and the dashboard shows totals.
+- The LOOP designer's AI orchestrator runs as its own conversation surface (`surface: "sop-designer"` on `POST /api/assistant/chat` and `/api/assistant/generations`) instead of a workbench chat with a long prompt built in the browser. The server now writes the designer system prompt, the project's roles (all of them, no longer the first 40), the canvas snapshot and the LOOPs the user named into each turn as data, so the transcript keeps only what the user typed. A designer turn always runs in confirm mode with read-only platform tools only: no workspace, browser or external MCP, and the model can submit nothing but one `workflows_save` draft. Its conversation is private to the author, no longer appears in the workbench history (where it used to show up with the generated prompt as its title) and cannot be continued there; `GET /api/assistant/sessions?surface=sop-designer&workflowId=…` lists it. A second message in the same orchestrator conversation no longer fails with 「共享会话已更新,请重新打开后发送」, which happened because the canvas resent a simplified history of a project-shared session. `workflows_save` drafts from any conversation now warn about duplicate node ids, edges to missing nodes, self loops and cycles before they are saved, and the 「构建静态站点」 node no longer warns that role `af-preview-builder` does not exist.
+- The orchestrator panel embeds the chatbot (`/chatbot/?surface=sop-designer`) instead of its own hand-written chat. Replies render Markdown with the execution trace, a running turn can be stopped, the turn runs as a background generation, so closing the panel or reloading the page no longer loses it, and reopening a LOOP shows its earlier conversation. The CLI and model choice keeps its own memory as before. Each reply's draft shows its warnings and can be put on the canvas again. The canvas and the chat talk only through `agentflow-sop-designer-*` window messages; the canvas still animates nodes and wires as the draft streams in.
+- Editing a LOOP in the orchestrator no longer rewrites the whole graph. On a canvas with steps the model submits `operations` (`add_node`, `update_node`, `remove_node`, `add_edge`, `remove_edge`, `update_workflow`) and the server applies them to the canvas it received, so steps, prompts, scripts, layout and the 「构建静态站点」 node the user did not mention stay exactly as they were. An operation that does not fit the canvas (an unknown node, a duplicate edge, removing a node another step rejects to) goes back to the model with the reason instead of reaching the canvas. The canvas no longer guesses intent from the wording: it no longer matches 「重新…」 or 「去掉预览」 phrases or LOOP names in the message; the server lists the project's LOOPs and the model reads the one the user means. A draft with a different LOOP id replaces the canvas only after the user confirms.
+- The orchestrator offers the model only roles a LOOP save accepts: roles of this project and roles another project shares. A built-in role that belongs to no project used to be offered, and the draft then failed on save with 「角色 … 不属于当前项目且尚未共享」. `workflows_save` drafts from any conversation now warn about such a role before saving. A script longer than 400 characters reaches the model as a marker that says it is omitted, not as an empty string; the model used to report the script as empty and offer to write one, and a marker copied back into a draft is replaced by the canvas's script.
- The side browser no longer stays on a blurry frame after a scroll or drag on a page that stops changing. Scrolling switches the screencast to half-size frames and it restarts at full size once input settles, but Chromium does not always re-send a page that is not repainting; the panel now captures the page when no frame arrives within 300 ms.
- The floating page-feedback button is gone. The page-feedback API goes with it. Existing `page_feedbacks` and `page_feedback_images` tables are left in place and are no longer created for new databases.
- On macOS `/bin/bash` 3.2, a missing local image or a failed automatic mirror pull no longer aborts `./start.sh` before the official image pull.
@@ -65,13 +66,13 @@ For a direct upgrade from `v0.4.0`, follow the [GitHub credential migration inst
**Upgrading from v0.4.0.** Stop the old API and workers and keep MySQL running. Manually apply [`036_git_http_credentials.sql`](migrations/036_git_http_credentials.sql) from this release before starting the upgraded platform or running `./start.sh pull`. Verify private repository access after the upgrade. After the rollback window, follow the [credential migration guide](docs/deployment.md#migrating-existing-github-credentials) to apply `037_retire_plain_git_token.sql`.
-The Compose installer and `./start.sh pull` replay `033_generic_sop_mr_node.sql` and then `038_generic_sop_host_credentials.sql` for unmodified built-in delivery SOPs. See [Updating existing public SOPs](docs/deployment.md#updating-existing-public-sops) for manual deployments. Installations that need historical scheduling totals can backfill retained executions with the optional `039_schedule_execution_legacy_stats.sql` after meeting the prerequisites in its header.
+The Compose installer and `./start.sh pull` replay `033_generic_sop_mr_node.sql` and then `038_generic_sop_host_credentials.sql` for unmodified built-in delivery LOOPs. See [Updating existing public LOOPs](docs/deployment.md#updating-existing-public-loops) for manual deployments. Installations that need historical scheduling totals can backfill retained executions with the optional `039_schedule_execution_legacy_stats.sql` after meeting the prerequisites in its header.
-## 0.4.0 — scheduled task history, an MR node in delivery SOPs and agent CLIs in conversation workspaces
+## 0.4.0 — scheduled task history, an MR node in delivery LOOPs and agent CLIs in conversation workspaces
- Scheduled tasks keep an execution history with a session mode, keep conversations per job and gain row actions (#958). AI jobs run with the key of the user who saved them and fall back to the shared key (#966).
- Requirements can be created directly and clarified in a chat (#965). Settled execution history can be force-deleted (#210).
-- Conversation workspaces open by sandbox with agent-owned Git (#947), run native agent CLIs on bound execution machines (#494), can be bound to project SOP workspaces through `workspaceRunId` (#974), and install a missing CLI from the failure message (#183).
+- Conversation workspaces open by sandbox with agent-owned Git (#947), run native agent CLIs on bound execution machines (#494), can be bound to project LOOP workspaces through `workspaceRunId` (#974), and install a missing CLI from the failure message (#183).
- Run workspaces can be edited while agents run (#211), and a reclaimed workspace can be restored from the run details (#968).
- Git repositories can use SSH with a personal key per host (#207).
- The assistant asks for approval before external MCP writes (#973), surfaces specific CLI failures and exports turn diagnostics (#468). The chat remembers the chosen model and approval mode.
@@ -80,29 +81,29 @@ The Compose installer and `./start.sh pull` replay `033_generic_sop_mr_node.sql`
- Messages queued in a conversation are kept when switching to another conversation and back (#1004).
- 「创建并去对话澄清」 sends again. The first message of the new conversation @-mentions the requirement, and the turn links that issue to the conversation while starting; the start then compared the conversation it read before linking and refused its own link with 「关联需求已更新,请重新发送」 every time. The same happened to any later message that @-mentioned an issue in a conversation without a linked issue. A turn now accepts the issue it linked itself; a conversation rebound to another issue while the turn starts is still refused.
- A conversation's 子 Agent shows the model it ran on: its row in the artifacts list reads 「已完成 · 模型 …」, the header of an opened subagent names the model next to its status, and each dispatch in 会话过程 notes 「模型 · …」 under the task it was given. The model is the one the subagent reports running on: its first line in the CLI stream is saved as an `agentModel` activity event under the dispatch, so an alias such as `lite` shows the model it resolved to. Until it reports, and for replies saved before this change, the panel falls back to the model the Agent call named (the `model` argument), else the model of the reply that dispatched it, which the subagent inherits; a dispatch still running uses the model the running reply was sent with. Activity events of an Agent call carry the new `model` field only when the call named one.
-- The built-in backend, frontend and defect-fix SOPs gain a 「发起 MR」 node between 人工验收 and 交付汇总 (#717). It commits the work branch, pushes it and opens an MR/PR against the run's target branch, then records the link, branches and commit SHA in `mr-body.md`. Its command gate checks every writable repository of the run: one with commits beyond the target branch fails while it has uncommitted changes, while its checkout is off the run's work branch, or until `git ls-remote origin` shows that work branch at HEAD. A repository the run left unchanged is skipped. A second gate of the new mode `mr` has the engine look the MR up on the host with the same lookup delivery tracking uses (GitHub and Gongfeng): every writable repository whose work branch on origin carries commits beyond the target branch needs an MR from that work branch into that target branch that carries the pushed tip: an open one whose head is the tip (or whose host reports no head), or a merged one whose head is the tip. An agent that reports pass without opening an MR, opens it against the wrong branch, or leaves only an earlier merged MR on a reused work branch does not reach 交付汇总. The lookup runs as the run: on GitHub with the Git token the run pushed with (its responsible user's), falling back to the Owner of the run's own project; on Gongfeng through the run project's MCP as the responsible user. A repository bound to several projects is no longer checked as whichever project bound it first, and a failed lookup names the identity it used. A host the platform cannot query (an SSH repository, a failed lookup) goes straight to a person. `mr` gates take no commands, and the role editor keeps them when a role is saved. The gates retry once with their feedback and then wait for a person, so a run no longer succeeds with every source change left in a workspace that is reclaimed right after success. Run-scoped commands now get `AGENTFLOW_WORK_BRANCHES` (one `dir
Two ways to work ·
Quick start ·
- SOPs ·
+ LOOPs ·
Features ·
Local (Legacy) ·
FAQ ·
@@ -34,36 +34,36 @@ https://github.com/user-attachments/assets/8af401d9-1aae-427c-b4bc-455c12d17beb
80-second product tour (1080p, with sound).
The chat home. Type a request, The chat home. Type a request,
- The SOP designer with the built-in bug-fix SOP. Each step picks a role; failed checks can send the work back to an earlier step. The LOOP designer with a project copy of the built-in bug-fix LOOP. Each step picks a role; failed checks can send the work back to an earlier step.
- Built-in SOPs are read-only blueprints; copy one into your project to run and edit it. Built-in LOOPs are read-only blueprints; copy one into your project to run and edit it.
两种工作方式 ·
快速开始 ·
- SOP ·
+ LOOP ·
功能 ·
本地版(旧版) ·
FAQ ·
@@ -34,36 +34,36 @@ https://github.com/user-attachments/assets/10b8ae2e-d7e7-4b78-8876-c45818d4a08f
80 秒产品演示(1080p,有声)。
对话首页:描述需求,用 对话首页:描述需求,用
- 流程设计器中的内置缺陷修复 SOP。每个步骤选择一个角色;检查失败时可以打回到前面的步骤。 流程设计器中的内置缺陷修复 LOOP。每个步骤选择一个角色;检查失败时可以打回到前面的步骤。
- 内置 SOP 是平台维护的只读蓝图,复制到本项目后即可运行和修改。 内置 LOOP 是平台维护的只读蓝图,复制到本项目后即可运行和修改。
+
+
@ a role, skill, requirement, SOP or repository, and pick the executor, model and permission mode per conversation.@ a role, skill, requirement, LOOP or repository, and pick the executor, model and permission mode per conversation.More setup details: executors, GitHub, sandboxes, access model
-- **Executors.** Choose a CLI and model for chat, requirement clarification, Bot replies, notification reports, run evaluation, or static preview. Each SOP role can select its own CLI, and built-in templates still default to CodeBuddy. Scheduled prompts use the CLI selected on the schedule. The platform can run without a CodeBuddy installation or key once its workflows use other CLIs. [Deployment and upgrade](docs/deployment.md#choosing-an-executor)
+- **Executors.** Choose a CLI and model for chat, requirement clarification, Bot replies, notification reports, run evaluation, or static preview. Each LOOP role can select its own CLI, and built-in templates still default to CodeBuddy. Scheduled prompts use the CLI selected on the schedule. The platform can run without a CodeBuddy installation or key once its workflows use other CLIs. [Deployment and upgrade](docs/deployment.md#choosing-an-executor)
| Executor | Credentials | Installation |
| --- | --- | --- |
- | **CodeBuddy** | Personal key, or a shared key an administrator configures for chat and SOP runs | Bundled by default, optional on source builds |
+ | **CodeBuddy** | Personal key, or a shared key an administrator configures for chat and LOOP runs | Bundled by default, optional on source builds |
| **Codex** | Personal key; a connected execution machine can use its local login | In the Docker image |
| **Claude Code** | Personal key; a connected execution machine can use its local login | Installed from npm on first use, then cached |
| **OpenCode · Kimi Code · Pi** | Personal key only | Installed from npm on first use, then cached |
| **DeepSeek Harness** | Personal key only | In the Docker image |
- | **Cursor CLI** | Personal key only | Provider installer on first chat use; not installed into SOP sandboxes |
- | **Antigravity** | Personal key, or the connected execution machine owner's existing account login | Install the official CLI on the execution machine and in Docker images used for SOP runs |
+ | **Cursor CLI** | Personal key only | Provider installer on first chat use; not installed into LOOP sandboxes |
+ | **Antigravity** | Personal key, or the connected execution machine owner's existing account login | Install the official CLI on the execution machine and in Docker images used for LOOP runs |
| **ZCode** | Personal key only | Not bundled; install it on the service or execution machine PATH |
- The seven agent CLIs after Claude Code keep their model and MCP configuration in a private home directory per run. Antigravity can reuse the execution machine owner's account login in conversation workspaces and native or Docker SOP sandboxes. Its official CLI refreshes the credential copy, and the Runner saves the refreshed login back to its original local store. Gemini API keys use separate API billing. The other agent CLIs use the responsible user's own key and Base URL from personal settings, including on a connected execution machine. First-use installs need npm or provider access; [native deployments](docs/deployment.md#workers-and-runners) need the CLI for the executor you choose.
+ The seven agent CLIs after Claude Code keep their model and MCP configuration in a private home directory per run. Antigravity can reuse the execution machine owner's account login in conversation workspaces and native or Docker LOOP sandboxes. Its official CLI refreshes the credential copy, and the Runner saves the refreshed login back to its original local store. Gemini API keys use separate API billing. The other agent CLIs use the responsible user's own key and Base URL from personal settings, including on a connected execution machine. First-use installs need npm or provider access; [native deployments](docs/deployment.md#workers-and-runners) need the CLI for the executor you choose.
- **WeCom notifications.** The image built from this Dockerfile includes `wecom-cli`; published images gain it with the next release. Native installations need to install it separately; see [Deployment](docs/deployment.md#native-development).
-- **GitHub is optional.** All built-in generic SOPs run without a repository: product SOPs deliver documents, and new frontend/backend projects deliver source files in the task workspace. Bug fixes still need source code and reproduction details. Connect a repository when you work on existing code or want PRs.
-- **Delivering to a repository.** Choose **Connect GitHub** in personal settings, approve the device code on GitHub and pick your repository (the LoopForge OAuth App is built in; no PAT required, manual PAT entry still works). Set executor credentials (or bind a local execution machine), then either run a project SOP or ask Main Bot to change the code and submit a PR/MR.
-- **Sandboxes.** In the default Compose installation, SOP runs and conversation workspaces both use Docker sandbox containers started through the host Docker socket. Default sandboxes reuse the installed runtime image, so nothing extra is built after installation; custom Dockerfiles still build their own images. Docker socket access grants control of the host daemon, so this setup is for trusted teams, not untrusted multi-tenant isolation. See [deployment boundaries](docs/deployment.md#accounts). Re-running the installer keeps your data.
+- **GitHub is optional.** All built-in generic LOOPs run without a repository: product LOOPs deliver documents, and new frontend/backend projects deliver source files in the task workspace. Bug fixes still need source code and reproduction details. Connect a repository when you work on existing code or want PRs.
+- **Delivering to a repository.** Choose **Connect GitHub** in personal settings, approve the device code on GitHub and pick your repository (the LoopForge OAuth App is built in; no PAT required, manual PAT entry still works). Set executor credentials (or bind a local execution machine), then either run a project LOOP or ask Main Bot to change the code and submit a PR/MR.
+- **Sandboxes.** In the default Compose installation, LOOP runs and conversation workspaces both use Docker sandbox containers started through the host Docker socket. Default sandboxes reuse the installed runtime image, so nothing extra is built after installation; custom Dockerfiles still build their own images. Docker socket access grants control of the host daemon, so this setup is for trusted teams, not untrusted multi-tenant isolation. See [deployment boundaries](docs/deployment.md#accounts). Re-running the installer keeps your data.
- **Accounts and access.** New installations listen on all interfaces (existing bind settings are kept) and are designed for a trusted team: signed-in users can read project data across the instance, and teammates can sign up from the login page (`AGENTFLOW_ALLOW_SIGNUP=false` in `.env` turns that off). Read the [account and access model](docs/deployment.md#accounts) before exposing it beyond your team.
- **Remote access, HTTPS, separate workers.** See [Deployment](docs/deployment.md).
- **Hacking on LoopForge itself?** `bash scripts/dev.sh` runs it natively (Go 1.26.11+).
+
+
@@ -176,46 +178,46 @@ Each node declares its artifacts and dependencies, and the engine starts each st
| Area | What you get |
| --- | --- |
-| **Chat workbench** | Main Bot with per-conversation executor, model and permission mode. `@` references for roles, skills, requirements, SOPs and repositories. Messages queue while a reply runs; *Steer* interrupts and sends now. Generated files open in a side panel with preview, source and download. |
-| **Conversation workspaces** | On-demand Docker sandboxes with the project's repositories checked out, project roles as native subagents, and direct control of a running SOP workspace: pause, resume or take over. |
-| **SOP designer** | Visual canvas with Agent, Script, Human gate, Sub-SOP and Preview nodes, rework-on-failure edges, validation, version history and publishing. Built-in backend, frontend, bug-fix and product SOPs. |
-| **Roles** | Reusable definitions: prompt, executor, model, rules, Skills, MCP tools, artifacts and gates, shared across SOP nodes and chat subagents. |
-| **Requirement → delivery** | Requirements tracked end to end, whether shipped by an SOP or straight from chat, with PR/MR status tracking, merge detection and direct-branch merges. |
+| **Chat workbench** | Main Bot with per-conversation executor, model and permission mode. `@` references for roles, skills, requirements, LOOPs and repositories. Messages queue while a reply runs; *Steer* interrupts and sends now. Generated files open in a side panel with preview, source and download. |
+| **Conversation workspaces** | On-demand Docker sandboxes with the project's repositories checked out, project roles as native subagents, and direct control of a running LOOP workspace: pause, resume or take over. |
+| **LOOP designer** | Visual canvas with Agent, Script, Human gate, Sub-LOOP and Preview nodes, rework-on-failure edges, validation, version history and publishing. Built-in backend, frontend, bug-fix and product LOOPs. |
+| **Roles** | Reusable definitions: prompt, executor, model, rules, Skills, MCP tools, artifacts and gates, shared across LOOP nodes and chat subagents. |
+| **Requirement → delivery** | Requirements tracked end to end, whether shipped by a LOOP or straight from chat, with PR/MR status tracking, merge detection and direct-branch merges. |
| **Runs & approvals** | Live node status, tool traces, worker logs, per-node artifact snapshots and workspace previews. A single **Needs review** inbox for every gate waiting on you. |
-| **AI scheduled tasks** | Recurring agent tasks with full workspace, SOP and MCP access; a shared market of versioned, parameterized task templates; automatic SOP dispatch for new requirements. |
-| **Insights & cost** | Engineering metrics, business-domain reports with static HTML/SVG export, and token/cost accounting for SOPs and conversations at public list prices. |
+| **AI scheduled tasks** | Recurring agent tasks with full workspace, LOOP and MCP access; a shared market of versioned, parameterized task templates; automatic LOOP dispatch for new requirements. |
+| **Insights & cost** | Engineering metrics, business-domain reports with static HTML/SVG export, and token/cost accounting for LOOPs and conversations at public list prices. |
| **Execution environments** | Platform workers, Docker sandboxes, or a connected local execution machine using your own tools and repositories. |
| **Team-ready** | Password accounts, projects and members, light/dark/system themes, an OpenAPI-described HTTP and MCP API. Management pages are in English and Chinese; the chat workbench is Chinese for now. |
+
+
+
@ 引用角色、技能、需求、SOP 或仓库;每个会话可单独选择执行器、模型和确认模式。@ 引用角色、技能、需求、LOOP 或仓库;每个会话可单独选择执行器、模型和确认模式。更多配置说明:执行器、GitHub、沙箱、访问模型
-- **执行器。** 首页对话、需求澄清、Bot 回复、通知汇报、运行评测和静态预览均可选择 CLI 与模型。每个 SOP 角色可以独立选择 CLI,内置模板仍默认使用 CodeBuddy。定时提示词使用任务所选的 CLI。将使用中的流程配置为其他 CLI 后,平台可在未安装 CodeBuddy、未配置其 Key 的环境中运行。[部署与升级说明](docs/deployment.md#choosing-an-executor)
+- **执行器。** 首页对话、需求澄清、Bot 回复、通知汇报、运行评测和静态预览均可选择 CLI 与模型。每个 LOOP 角色可以独立选择 CLI,内置模板仍默认使用 CodeBuddy。定时提示词使用任务所选的 CLI。将使用中的流程配置为其他 CLI 后,平台可在未安装 CodeBuddy、未配置其 Key 的环境中运行。[部署与升级说明](docs/deployment.md#choosing-an-executor)
| 执行器 | 凭据 | 安装方式 |
| --- | --- | --- |
- | **CodeBuddy** | 个人 Key,或管理员配置的平台共享 Key(覆盖对话和 SOP 运行) | 默认内置,源码构建时可省略 |
+ | **CodeBuddy** | 个人 Key,或管理员配置的平台共享 Key(覆盖对话和 LOOP 运行) | 默认内置,源码构建时可省略 |
| **Codex** | 个人 Key;已连接的执行机器可使用本机登录 | Docker 镜像内置 |
| **Claude Code** | 个人 Key;已连接的执行机器可使用本机登录 | 首次使用时从 npm 安装并缓存 |
| **OpenCode · Kimi Code · Pi** | 仅个人 Key | 首次使用时从 npm 安装并缓存 |
| **DeepSeek Harness** | 仅个人 Key | Docker 镜像内置 |
- | **Cursor CLI · Antigravity** | 仅个人 Key | 首次在对话中使用时通过厂商安装脚本安装;不会装进 SOP 沙箱 |
+ | **Cursor CLI · Antigravity** | 仅个人 Key | 首次在对话中使用时通过厂商安装脚本安装;不会装进 LOOP 沙箱 |
| **ZCode** | 仅个人 Key | 未内置,需安装到服务或执行机器的 PATH 中 |
Claude Code 之后的 7 种 Agent CLI 每次运行都在私有 HOME 目录里生成模型和 MCP 配置,因此始终使用需求责任人在个人设置中填写的 Key 和 Base URL,即使在已连接的执行机器上也一样。团队推广时,每位成员需要各自配置凭据。首次安装需要能访问 npm 或对应厂商;[原生部署](docs/deployment.md#workers-and-runners)需安装所选执行器的 CLI。
- **企业微信通知。** 从本 Dockerfile 构建的平台镜像内置 `wecom-cli`,发布镜像将在下个版本包含它;原生部署需要另行安装,详见[部署指南](docs/deployment.md#native-development)。
-- **GitHub 可选。** 所有内置通用 SOP 都可以不绑定仓库运行:产品方案交付文档,前后端新项目在任务工作区交付源码;缺陷修复仍需提供待修代码和复现材料。需要修改已有代码或提交 PR 时再绑定仓库。
-- **交付到仓库。** 在个人设置中点击「连接 GitHub」,用设备码授权后选择自己的仓库(已内置 LoopForge 授权应用,无需申请 PAT,仍可手动填写 PAT),再配置执行器凭据(或绑定本机执行机器),之后既可以运行一条项目 SOP,也可以直接让 Main Bot 修改代码并提交 PR/MR。
-- **沙箱。** 默认 Compose 安装中,SOP 运行和对话工作区都使用 Docker 沙箱容器,由平台通过宿主机 Docker socket 启动;默认沙箱复用已安装的运行镜像,安装后无需再构建;自定义 Dockerfile 仍单独构建。Docker socket 赋予平台控制宿主机 Docker 的权限,因此只适用于可信团队,不构成不可信多租户隔离边界;详见[部署边界](docs/deployment.md#accounts)。重复执行安装脚本会保留已有数据。
+- **GitHub 可选。** 所有内置通用 LOOP 都可以不绑定仓库运行:产品方案交付文档,前后端新项目在任务工作区交付源码;缺陷修复仍需提供待修代码和复现材料。需要修改已有代码或提交 PR 时再绑定仓库。
+- **交付到仓库。** 在个人设置中点击「连接 GitHub」,用设备码授权后选择自己的仓库(已内置 LoopForge 授权应用,无需申请 PAT,仍可手动填写 PAT),再配置执行器凭据(或绑定本机执行机器),之后既可以运行一条项目 LOOP,也可以直接让 Main Bot 修改代码并提交 PR/MR。
+- **沙箱。** 默认 Compose 安装中,LOOP 运行和对话工作区都使用 Docker 沙箱容器,由平台通过宿主机 Docker socket 启动;默认沙箱复用已安装的运行镜像,安装后无需再构建;自定义 Dockerfile 仍单独构建。Docker socket 赋予平台控制宿主机 Docker 的权限,因此只适用于可信团队,不构成不可信多租户隔离边界;详见[部署边界](docs/deployment.md#accounts)。重复执行安装脚本会保留已有数据。
- **账号与访问。** 新安装默认监听所有网卡(已有安装保留原配置),面向可信团队:已登录用户可以读取实例内各项目的数据,团队成员可在登录页自助注册(在 `.env` 中设置 `AGENTFLOW_ALLOW_SIGNUP=false` 可关闭)。对团队以外开放前,请先阅读[账号与访问边界](docs/deployment.md#accounts)。
- **远程访问、HTTPS、独立 Worker。** 见[部署指南](docs/deployment.md)。
- **参与 LoopForge 本身的开发?** 用 `bash scripts/dev.sh` 原生运行(需要 Go 1.26.11+)。
+
+
@@ -175,46 +177,46 @@ GitLab、Gitea、Gogs 等托管可[配置 Git SSH](docs/deployment.md#git-reposi
| 方向 | 能力 |
| --- | --- |
-| **对话工作台** | Main Bot 支持按会话选择执行器、模型和确认模式;`@` 引用角色、技能、需求、SOP 和仓库;回复进行中发送的消息进入排队托盘,「引导」可打断当前回复立即发送;生成的文件在侧边产物抽屉中预览、看源码和下载。 |
-| **对话工作区** | 按需创建带项目仓库的 Docker 沙箱,把项目角色作为原生子 Agent 调用,并能直接控制正在运行的 SOP 工作区:暂停、恢复或接管。 |
-| **流程设计器** | 在画布上编排 Agent、脚本、人工关口、子 SOP 和预览构建节点;支持失败打回、配置检查、版本历史与发布。内置后端、前端、缺陷修复和产品方案 SOP。 |
-| **角色** | 可复用的角色定义:提示词、执行器、模型、规则、Skills、MCP 工具、产物与门禁,SOP 节点和对话子 Agent 共用。 |
-| **需求到交付** | 无论通过 SOP 还是直接在对话中交付,需求都全程跟踪;支持 PR/MR 状态跟踪、合入检测和共享分支直推。 |
+| **对话工作台** | Main Bot 支持按会话选择执行器、模型和确认模式;`@` 引用角色、技能、需求、LOOP 和仓库;回复进行中发送的消息进入排队托盘,「引导」可打断当前回复立即发送;生成的文件在侧边产物抽屉中预览、看源码和下载。 |
+| **对话工作区** | 按需创建带项目仓库的 Docker 沙箱,把项目角色作为原生子 Agent 调用,并能直接控制正在运行的 LOOP 工作区:暂停、恢复或接管。 |
+| **流程设计器** | 在画布上编排 Agent、脚本、人工关口、子 LOOP 和预览构建节点;支持失败打回、配置检查、版本历史与发布。内置后端、前端、缺陷修复和产品方案 LOOP。 |
+| **角色** | 可复用的角色定义:提示词、执行器、模型、规则、Skills、MCP 工具、产物与门禁,LOOP 节点和对话子 Agent 共用。 |
+| **需求到交付** | 无论通过 LOOP 还是直接在对话中交付,需求都全程跟踪;支持 PR/MR 状态跟踪、合入检测和共享分支直推。 |
| **运行与审批** | 实时节点状态、工具轨迹、Worker 日志、节点产物快照和工作区预览;所有等你处理的关口集中在 **待我确认**。 |
-| **AI 定时任务** | 周期性 Agent 任务,具备完整的工作区、SOP 与 MCP 权限;共享任务市场提供带版本和参数的任务模板;新需求可自动派发 SOP。 |
-| **统计与成本** | 研发效能指标、业务领域报表(可导出静态 HTML/SVG),以及按公开标准价核算的 SOP 与对话 Token 成本。 |
+| **AI 定时任务** | 周期性 Agent 任务,具备完整的工作区、LOOP 与 MCP 权限;共享任务市场提供带版本和参数的任务模板;新需求可自动派发 LOOP。 |
+| **统计与成本** | 研发效能指标、业务领域报表(可导出静态 HTML/SVG),以及按公开标准价核算的 LOOP 与对话 Token 成本。 |
| **执行环境** | 平台 Worker、Docker 沙箱,或连接一台使用你自己工具和仓库的本地执行机器。 |
| **团队协作** | 密码账号、项目与成员、浅色 / 深色 / 跟随系统主题,以及有 OpenAPI 描述的 HTTP 与 MCP API。管理页面支持中英文,对话工作台目前为中文界面。 |
+
{data.description}
@@ -170,7 +170,7 @@ function OperationPreview({ artifact, runs }) {- {run.workflowSnapshot?.name || "SOP 运行"} + {run.workflowSnapshot?.name || "LOOP 运行"} {node ? ` · ${node.name || node.id}` : ""}
) : null} @@ -247,7 +247,7 @@ export default function ArtifactPanel({ } }); // The browser shows a desktop-width page, so it widens the pane like an - // opened SOP node and restores the width afterwards. + // opened LOOP node and restores the width afterwards. const layout = useArtifactPanelLayout( root, onClose, @@ -320,7 +320,7 @@ export default function ArtifactPanel({ matchesArtifact(artifact, "文件"), ); const visibleDefinitions = definitions.filter((artifact) => - matchesArtifact(artifact, "SOP 与角色"), + matchesArtifact(artifact, "LOOP 与角色"), ); const visibleOperations = operations.filter((artifact) => matchesArtifact(artifact, "待确认操作"), @@ -337,7 +337,7 @@ export default function ArtifactPanel({ item.id, item.name, ]), - "SOP 运行", + "LOOP 运行", ), ); const visibleSubagents = subagents.filter((agent) => @@ -389,7 +389,7 @@ export default function ArtifactPanel({ {artifact.name} {target - ? `${artifact.kind === "sop" ? "SOP" : "角色"} · ${artifact.asset?.status === "published" ? "已发布" : "已保存"}` + ? `${artifact.kind === "sop" ? "LOOP" : "角色"} · ${artifact.asset?.status === "published" ? "已发布" : "已保存"}` : artifact.source} {artifact.size ? ` · ${artifact.size < 1024 ? `${artifact.size} B` : `${Math.ceil(artifact.size / 1024)} KB`}` @@ -701,13 +701,13 @@ export default function ArtifactPanel({ ) : null} {visibleDefinitions.length ? (提供最低限度的鉴权与仓库,直接使用默认角色和 SOP。
+提供最低限度的鉴权与仓库,直接使用默认角色和 LOOP。
已关联默认角色与「 - {completedSummary?.workflow?.name || "通用后端交付 SOP"} + {completedSummary?.workflow?.name || "通用后端交付 LOOP"} 」,现在可以直接在工作台对话或派发需求。
@@ -1530,7 +1530,7 @@ export default function QuickAccessWizard({ {completedSummary?.workflow?.name || - "通用后端交付 SOP"} + "通用后端交付 LOOP"} 已绑定 @@ -1616,9 +1616,9 @@ export default function QuickAccessWizard({{run.id}
+ {run.workflowSnapshot?.name || "LOOP 运行"} · {run.id}
到点以与主页 AI 对话相同的完全权限执行提示词,可按需读写平台、启动 - SOP、操作工作区及浏览器。 + LOOP、操作工作区及浏览器。
); diff --git a/chatbot/src/runs.js b/chatbot/src/runs.js index 39c5493c3..e38608a57 100644 --- a/chatbot/src/runs.js +++ b/chatbot/src/runs.js @@ -49,7 +49,7 @@ export function runProblems(run) { nodeId: id, nodeName: def.name || id, kind: waiting ? "waiting_approval" : "failed", - // approval: a gate set in the SOP; agent: the agent asked a person. + // approval: a gate set in the LOOP; agent: the agent asked a person. ...(waiting ? { gate: def.type === "approval" ? "approval" : "agent" } : {}), @@ -83,7 +83,7 @@ export function approvalWaitReason(run, nodeId) { upstream = index > 0 ? [name(nodes[index - 1].id)] : []; downstream = index + 1 < nodes.length ? [name(nodes[index + 1].id)] : []; } - const sop = (wf.name || "").trim() ? `SOP「${wf.name.trim()}」` : "该 SOP"; + const sop = (wf.name || "").trim() ? `LOOP「${wf.name.trim()}」` : "该 LOOP"; let text = `${sop}在这一步设置了人工门禁`; text += upstream.length ? `:${upstream.join("、")}已完成,需要有权限的成员检查结果后确认` @@ -130,8 +130,8 @@ export function conversationRunIDs(session) { } // A retired 自由协作 run or a chat workspace is where the assistant edits -// files, not a SOP: it has no nodes and never finishes, so the panel's -// 「SOP 运行」 list showed it as "等待审批 · 0/0 节点" — even for a conversation +// files, not a LOOP: it has no nodes and never finishes, so the panel's +// 「LOOP 运行」 list showed it as "等待审批 · 0/0 节点" — even for a conversation // that is itself such a run. None of them are listed. export function isConversationWorkspaceRun(run) { return Boolean( diff --git a/chatbot/src/session-history.js b/chatbot/src/session-history.js index 113a2b642..14d713ddf 100644 --- a/chatbot/src/session-history.js +++ b/chatbot/src/session-history.js @@ -4,13 +4,13 @@ export function sessionProjectName(projectId, projects) { : "个人对话"; } -// What a history search matches: the names shown for the row, the SOP a run +// What a history search matches: the names shown for the row, the LOOP a run // conversation belongs to and its project. export function sessionSearchText(session, projectName) { return `${session.title || ""} ${session.displayTitle || ""} ${session.sopName || ""} ${projectName}`.toLocaleLowerCase(); } -// An untouched SOP run conversation: the platform created it with the run and +// An untouched LOOP run conversation: the platform created it with the run and // nobody has written to it since. export function emptyRunConversation(session) { return Boolean( diff --git a/chatbot/src/session-status.js b/chatbot/src/session-status.js index 651e44945..c712b5caf 100644 --- a/chatbot/src/session-status.js +++ b/chatbot/src/session-status.js @@ -37,8 +37,8 @@ export function sidebarReplyStatus(status, unread = false) { } // Run sessions only earn a chip while something needs the reader: a running -// SOP, a run waiting for a person, or a failure. Finished runs stay quiet; the -// title already says which SOP they belong to. +// LOOP, a run waiting for a person, or a failure. Finished runs stay quiet; the +// title already says which LOOP they belong to. const runStates = { running: { state: "running", label: "运行中" }, waiting: { state: "waiting", label: "待处理" }, @@ -53,7 +53,7 @@ export function runSessionState(session) { } // The hover text of a history row. A run conversation's title says what the -// run does, so its SOP and run state are named here instead of in the row. +// run does, so its LOOP and run state are named here instead of in the row. export function sessionTooltip(session, { projectName = "", replyLabel = "" } = {}) { const run = Boolean(session?.shared && session?.runId); const title = session?.displayTitle || session?.title || "新对话"; diff --git a/chatbot/src/sop-designer.css b/chatbot/src/sop-designer.css index 7dd836622..1f25573fb 100644 --- a/chatbot/src/sop-designer.css +++ b/chatbot/src/sop-designer.css @@ -1,4 +1,4 @@ -/* SOP designer surface: the AI orchestrator inside the SOP canvas side panel. +/* LOOP designer surface: the AI orchestrator inside the LOOP canvas side panel. Messages, activity, pickers and the composer reuse the workbench styles; this file only lays them out for the narrow panel. */ .sop-designer { diff --git a/chatbot/src/sop-designer.js b/chatbot/src/sop-designer.js index ba3b14f96..53e9f8311 100644 --- a/chatbot/src/sop-designer.js +++ b/chatbot/src/sop-designer.js @@ -1,4 +1,4 @@ -// SOP designer surface of the chatbot. The SOP canvas (web/orchestrate.js) +// LOOP designer surface of the chatbot. The LOOP canvas (web/orchestrate.js) // embeds /chatbot/?surface=sop-designer in its side panel. The canvas owns the // graph and its build animation; this surface owns the conversation and talks // to the canvas only through the window messages below. @@ -49,7 +49,7 @@ export function designerParams(search) { export const isDesignerSurface = (search) => designerParams(search).surface === SURFACE; -// The newest conversation of this SOP continues; the list is sorted by the +// The newest conversation of this LOOP continues; the list is sorted by the // server, newest first, but sort again so a cached list cannot reorder it. export function latestSession(rows, projectId, workflowId) { return (rows || []) @@ -57,7 +57,7 @@ export function latestSession(rows, projectId, workflowId) { .sort((a, b) => Date.parse(b.updatedAt || 0) - Date.parse(a.updatedAt || 0))[0] || null; } -// The SOP or role draft, with its body as an object. +// The LOOP or role draft, with its body as an object. export function replyDraft(message) { const reply = parseReply(message || { content: "" }); const draft = (reply.drafts || []).find((item) => ["workflows_save", "agents_save"].includes(item?.tool) && item.body); @@ -78,7 +78,7 @@ export function draftSummary(draft) { if (draft.tool === "agents_save") return "角色草稿 · " + draft.body.name; const nodes = Array.isArray(draft?.body?.nodes) ? draft.body.nodes.length : 0; const edges = Array.isArray(draft?.body?.edges) ? draft.body.edges.length : 0; - return `${draft?.body?.name || "SOP 草稿"} · ${nodes} 个节点 · ${edges} 条连线`; + return `${draft?.body?.name || "LOOP 草稿"} · ${nodes} 个节点 · ${edges} 条连线`; } export function requestId() { diff --git a/chatbot/src/styles.css b/chatbot/src/styles.css index 1591a1420..99d4cb56b 100644 --- a/chatbot/src/styles.css +++ b/chatbot/src/styles.css @@ -3004,7 +3004,7 @@ a.project-entry { border-radius: 3px; } -/* Conversation files open on demand; only a linked SOP occupies the right rail. */ +/* Conversation files open on demand; only a linked LOOP occupies the right rail. */ .artifact-panel-header { height: 51px; min-height: 51px; @@ -3771,7 +3771,7 @@ a.draft-title { .project-picker { max-width: 100%; } -/* The project decides where requirements, repositories and SOPs live, so the +/* The project decides where requirements, repositories and LOOPs live, so the picker reads as a choice rather than a breadcrumb. */ .project-picker span { min-width: 0; diff --git a/chatbot/src/useChat.js b/chatbot/src/useChat.js index b28d2c113..0066084b0 100644 --- a/chatbot/src/useChat.js +++ b/chatbot/src/useChat.js @@ -1436,7 +1436,7 @@ export function useChat() { if (error.draftChanged && currentId.current === id) setSession(stored); throw error; } - // The session header lets a confirmed SOP continue in this + // The session header lets a confirmed LOOP continue in this // conversation's workspace. const result = await api("/mcp", { method: "POST", diff --git a/chatbot/tests/activity.test.mjs b/chatbot/tests/activity.test.mjs index eab4a4cc9..55e48bf55 100644 --- a/chatbot/tests/activity.test.mjs +++ b/chatbot/tests/activity.test.mjs @@ -57,7 +57,7 @@ test("activity summaries replace internal tool names with readable subjects whil detail: "mcp__agentflow_session__agentflow__workflows_list", }; assert.equal(activityFace(tool).kind, "workflow"); - assert.match(activityFace(tool).done, /SOP/); + assert.match(activityFace(tool).done, /LOOP/); assert.equal(activityTarget(tool), ""); const schema = { kind: "tool", @@ -244,9 +244,9 @@ test("paragraphs stay between the tool calls that separate them", () => { }); test("thinking rows show a one-line headline like Codex", () => { - assert.equal(thoughtLine("**Inspecting SOP**\n细节", true), "Inspecting SOP"); - assert.equal(thoughtLine("先读取 SOP 列表\n再确认节点", false), "先读取 SOP 列表"); - assert.equal(thoughtLine("先读取 SOP 列表\n再确认节点", true), "再确认节点"); + assert.equal(thoughtLine("**Inspecting LOOP**\n细节", true), "Inspecting LOOP"); + assert.equal(thoughtLine("先读取 LOOP 列表\n再确认节点", false), "先读取 LOOP 列表"); + assert.equal(thoughtLine("先读取 LOOP 列表\n再确认节点", true), "再确认节点"); assert.equal( activityTarget({ kind: "thinking", text: "用户只是问候。\n直接回复。", finishedAt: "x" }), "用户只是问候。", @@ -254,7 +254,7 @@ test("thinking rows show a one-line headline like Codex", () => { assert.equal(activityTarget({ kind: "thinking", text: "" }), ""); }); -test("SOP node events fold into one Codex-style trace per turn", async () => { +test("LOOP node events fold into one Codex-style trace per turn", async () => { const { nodeConversationItems, groupNodeActivity } = await import( "../src/node-conversation.js" ); diff --git a/chatbot/tests/app-render.test.jsx b/chatbot/tests/app-render.test.jsx index 1ec7f1012..653ffae60 100644 --- a/chatbot/tests/app-render.test.jsx +++ b/chatbot/tests/app-render.test.jsx @@ -697,8 +697,8 @@ describe("App", () => { expect(screen.getByLabelText("选择项目")).toHaveClass("is-unset"); await user.click(screen.getByText("接入测试环境")); expect(screen.getByRole("textbox").value).toMatch(/^带我一步步接入测试环境/); - await user.click(screen.getByText("选用 SOP 与角色")); - expect(screen.getByRole("textbox").value).toMatch(/产品、前端、后端交付 SOP/); + await user.click(screen.getByText("选用 LOOP 与角色")); + expect(screen.getByRole("textbox").value).toMatch(/产品、前端、后端交付 LOOP/); }); test("questions and replies show when they were sent, and the header switches project", async () => { @@ -857,7 +857,7 @@ describe("App", () => { role: "assistant", content: JSON.stringify({ message: "生成了产物", - drafts: [{ tool: "workflows_save", body: { name: "交付 SOP", projectId: "p1" } }], + drafts: [{ tool: "workflows_save", body: { name: "交付 LOOP", projectId: "p1" } }], }), attachments: [{ id: "img1", name: "result.png", mimeType: "image/png" }], createdAt: new Date().toISOString(), diff --git a/chatbot/tests/chat-data.test.mjs b/chatbot/tests/chat-data.test.mjs index c47b090e7..dd3c50298 100644 --- a/chatbot/tests/chat-data.test.mjs +++ b/chatbot/tests/chat-data.test.mjs @@ -25,7 +25,7 @@ test("real image attachment appears as an authenticated artifact independently o assert(!visibleText(message).includes("/private")); assert(!visibleText(message).includes("![hero])")); }); -test("image, chart, code and SOP drafts share one artifact list and remain stable after reload", () => { +test("image, chart, code and LOOP drafts share one artifact list and remain stable after reload", () => { const session = { id: "chat-2", messages: [ @@ -33,7 +33,7 @@ test("image, chart, code and SOP drafts share one artifact list and remain stabl role: "assistant", content: JSON.stringify({ message: "```mermaid\ngraph LR\nA-->B\n```\n```svg\n\n```", - drafts: [{ tool: "workflows_save", body: { name: "评审 SOP" } }], + drafts: [{ tool: "workflows_save", body: { name: "评审 LOOP" } }], }), }, ], diff --git a/chatbot/tests/components.test.jsx b/chatbot/tests/components.test.jsx index 5eaa5fd46..05f685e9c 100644 --- a/chatbot/tests/components.test.jsx +++ b/chatbot/tests/components.test.jsx @@ -404,10 +404,10 @@ describe("content and panels", () => { ); expect(await screen.findByText("流程一")).toBeInTheDocument(); await user.type(screen.getByPlaceholderText("新流程或这次要做的事"), "新任务"); - await user.click(screen.getByText("派发 SOP")); + await user.click(screen.getByText("派发 LOOP")); await waitFor(() => expect(writeMock).toHaveBeenCalled()); await user.type(screen.getByPlaceholderText("新流程或这次要做的事"), "复制流程"); - await user.click(screen.getByText("创建 SOP")); + await user.click(screen.getByText("创建 LOOP")); const runRow = await screen.findByRole("button", { name: /交付流程/ }); await user.click(runRow); expect(await screen.findByText("完成任务")).toBeInTheDocument(); @@ -449,10 +449,10 @@ describe("content and panels", () => { /> , ); - expect(screen.getByLabelText("SOP 运行过程")).toBeInTheDocument(); + expect(screen.getByLabelText("LOOP 运行过程")).toBeInTheDocument(); }); - test("renders file artifacts and validates SOP actions without a project", async () => { + test("renders file artifacts and validates LOOP actions without a project", async () => { const user = userEvent.setup(); const select = vi.fn(); const artifactChat = { @@ -495,7 +495,7 @@ describe("content and panels", () => { />, ); await user.type(screen.getByPlaceholderText("新流程或这次要做的事"), "任务"); - await user.click(screen.getByText("派发 SOP")); + await user.click(screen.getByText("派发 LOOP")); expect(screen.getByRole("alert")).toHaveTextContent("请先点右上角的项目名称选择或绑定项目"); }); @@ -617,7 +617,7 @@ describe("content and panels", () => { expect(screen.getByText("导入前请检查")).toBeInTheDocument(); }); - test("an SOP proposal is declined or muted from its card", async () => { + test("a LOOP proposal is declined or muted from its card", async () => { const user = userEvent.setup(); const decide = vi.fn(async () => ({})); const artifact = (draft) => ({ @@ -629,7 +629,7 @@ describe("content and panels", () => { draft: { tool: "issues_save", body: { projectId: "p1", title: "积分排行榜", kind: "requirement", workflowId: "delivery" }, - proposal: { reason: "后续可以走 SOP 完整交付", timing: "end" }, + proposal: { reason: "后续可以走 LOOP 完整交付", timing: "end" }, ...draft, }, }); @@ -637,7 +637,7 @@ describe("content and panels", () => { const { rerender } = render(