Skip to content
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo
- 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<TAB>work branch<TAB>target branch` line per writable repository) and repository-scoped commands get `AGENTFLOW_WORK_BRANCH` and `AGENTFLOW_BASE_BRANCH`; the target branch is the one frozen into the run, including a requirement's release branch and a scheduled SOP's integration branch. 交付汇总 no longer pushes or opens a PR itself. Runs without a bound repository still deliver from the task workspace. New installs get the new templates from the seed. Existing installs keep their templates until an operator runs `migrations/033_generic_sop_mr_node.sql` by hand (see docs/deployment.md); it rewrites a template only while its node graph and 交付汇总 position are the shipped original and its 交付汇总 prompt only while unedited. SOPs already adopted into a project are copies and keep their old graph. The product SOP delivers documents only and is unchanged.
- 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<TAB>work branch<TAB>target branch` line per writable repository) and repository-scoped commands get `AGENTFLOW_WORK_BRANCH` and `AGENTFLOW_BASE_BRANCH`; the target branch is the one frozen into the run, including a requirement's release branch and a scheduled SOP's integration branch. 交付汇总 no longer pushes or opens a PR itself. Runs without a bound repository still deliver from the task workspace. New installs get the new templates from the seed; existing installs get them from `migrations/033_generic_sop_mr_node.sql`, which `scripts/install-schema-extensions.sh` replays before `038_generic_sop_host_credentials.sql` on install and `./start.sh pull`. The second migration gives the MR role the current Git credential instructions. The first rewrites a template only while its node graph and 交付汇总 position are the shipped original and its 交付汇总 prompt only while unedited. SOPs already adopted into a project are copies and keep their old graph. The product SOP delivers documents only and is unchanged.
- A conversation reply that is still running keeps running through a slow heartbeat. A poll, the conversation list, a follow-up message or a steer used to record it as interrupted after 45 seconds without a stored heartbeat; the process then cancelled the CLI and the next message failed with 「工作区正在使用或保存,请稍后重试」 for up to 15 minutes. Reads of a turn this process executes no longer reap it, and an unchanged heartbeat on MySQL no longer counts as a lost turn. On MySQL a heartbeat's age is measured on the database clock that stamped it, so skew between an API host and MySQL neither reaps a live turn nor keeps a dead one; whether a lease holder stopped renewing is likewise judged from `run_workspace_checkpoints.lease_renewed_at`, stamped on the database clock, not from another replica's `lease_until`. When a turn whose process died is reaped, the workspace lease it recorded is released if nothing renewed it for 45 seconds, so the next message starts at once; a lease another turn took, one still renewed on another replica, and a background save are kept. `migrations/032_assistant_generation_workspace_lease.sql` adds the three columns by hand; startup AutoMigrate adds them too.

- The platform image bundles DeepSeek Harness `@deepseek-ai/dsh@0.2.2-rc.1` next to Codex and CodeBuddy, so a DeepSeek key works in conversations and SOP roles without an install step. 0.3.8 had no `dsh` and answered a DeepSeek Harness chat with “AI 助手生成失败,请稍后重试”. The image download grows by about 180 MB. An installation without the image installs the same pinned version from the conversation: every dsh release is a prerelease requiring Node 24.9, and npm on Node 22 found no version for the bare package name.
Expand All @@ -47,7 +47,7 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo

Repositories saved earlier with a token in `cloneUrl` keep cloning until they are saved again. Saving one from the studio stores the URL without the token, so first put the Git token in 个人配置, then save the repository. Until then the token also lands in each workspace's `.git/config`, where the agent can read it, so re-save such repositories soon after upgrading.

Startup AutoMigrate creates the tables and columns of migrations `028` to `035`, and the installer and `./start.sh pull` apply `031`. `030` only aligns the stored `shared` flag of `generic-docker` with what the application already reads and is optional. To add the 「发起 MR」 node to the built-in SOPs of an existing installation, run `migrations/033_generic_sop_mr_node.sql` by hand (see `docs/deployment.md`). Rotate any agent CLI key that ran an SOP role before this release.
Startup AutoMigrate creates the tables and columns of migrations `028` to `035`, and the installer and `./start.sh pull` apply `031`, `033`, and `038` in that order. `030` only aligns the stored `shared` flag of `generic-docker` with what the application already reads and is optional. The Compose upgrade adds the 「发起 MR」 node to unmodified built-in delivery SOPs. Manual deployments can apply `033` followed by `038` as described in `docs/deployment.md`. Rotate any agent CLI key that ran an SOP role before this release.

## 0.3.8 — header sign-in hardening and a GHCR mirror option

Expand Down
13 changes: 6 additions & 7 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Configure provider credentials in the platform UI, not the host's global CLI con

## Observability schema

After the base tables have been created, run `bash scripts/install-schema-extensions.sh` for the Compose database. It installs absent `run_telemetry.adapter` and `run_logs.level` columns and their indexes from upstream migration `001_run_obs_generated_columns.sql`, then replays the `INSERT IGNORE` starter catalog. Both steps can be repeated without touching existing rows. The installer runs it before printing the address, and `./start.sh pull` runs it again after recreating containers, so an older data volume upgraded to a newer image picks up the columns the new code reads. Application startup does not run data migrations.
After the base tables have been created, run `bash scripts/install-schema-extensions.sh` for the Compose database. It installs absent `run_telemetry.adapter` and `run_logs.level` columns and their indexes from upstream migration `001_run_obs_generated_columns.sql`, then replays the `INSERT IGNORE` starter catalog and the built-in catalog rewrites from `031_generic_backend_openssh.sql`, `033_generic_sop_mr_node.sql`, and `038_generic_sop_host_credentials.sql` in that order. The rewrites are repeatable and apply only to matching defaults. The installer runs it before printing the address, and `./start.sh pull` runs it again after recreating containers, so an older data volume upgraded to a newer image picks up the columns the new code reads and the built-in SOP graphs the new code ships. Application startup does not run data migrations.

For an external MySQL deployment, review that migration and check column existence before applying its corresponding statements. Stored generated columns can rebuild large existing tables; schedule the operation accordingly.

Expand All @@ -175,7 +175,7 @@ For an external MySQL deployment, review that migration and check column existen

| Kind | Example | What an operator does |
| --- | --- | --- |
| Already applied by the installer and `./start.sh pull` | `001_run_obs_generated_columns.sql`, `migrations/seed/*.sql`, `031_generic_backend_openssh.sql` | Nothing; the script above covers it |
| Already applied by the installer and `./start.sh pull` | `001_run_obs_generated_columns.sql`, `migrations/seed/*.sql`, `031_generic_backend_openssh.sql`, `033_generic_sop_mr_node.sql`, `038_generic_sop_host_credentials.sql` | Nothing; the script above covers it |
| Required upgrade migrations | `009_bot_interactions_utf8mb4.sql`, `036_git_http_credentials.sql` | Follow each migration's timing and prerequisites. [Migrating existing GitHub credentials](#migrating-existing-github-credentials) |
| Optional backfills and rewrites of existing rows | `016_public_optional_repositories.sql`, `021_assistant_session_sources.sql` | Run them if the installation needs the converted rows |

Expand All @@ -189,15 +189,14 @@ docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_PASSWORD" mysql -u loopfor

This repeatable SQL changes only instruction fields that still match the original public seed. It preserves operator edits and project copies. New installations already receive these instructions from the public catalog seed; application startup does not migrate data.

To add the 「发起 MR」 node to the built-in backend, frontend and defect-fix SOPs of an existing installation, apply `033_generic_sop_mr_node.sql` the same way:
On Compose installs, the installer and `./start.sh pull` add the 「发起 MR」 node to the built-in backend, frontend, and defect-fix SOPs. They apply `033_generic_sop_mr_node.sql` to add the step, then `038_generic_sop_host_credentials.sql` to update the original MR role instructions. To apply the SQL manually, run both migrations in the same order.

```bash
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_PASSWORD" mysql -u loopforge loopforge' < migrations/033_generic_sop_mr_node.sql
cat migrations/033_generic_sop_mr_node.sql migrations/038_generic_sop_host_credentials.sql \
| docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_PASSWORD" mysql -u loopforge loopforge'
```

After it, a run of these SOPs commits and pushes its work branch and opens an MR/PR before 交付汇总, so the Git credentials of the run's responsible user need push access. The installer and `./start.sh pull` do not run it. It rewrites a template only while its node graph and 交付汇总 position are the shipped original, and the 交付汇总 prompt only while unedited; it is safe to repeat. Project SOPs adopted from these templates are copies and are not changed.

After migrating personal Git credentials, apply `038_generic_sop_host_credentials.sql` to update the original authentication instruction in the three built-in MR roles. The roles can use a hosting CLI, a configured MCP, or the host's API with a token obtained through `git credential fill`.
Migration 033 checks that the node graph and 交付汇总 position still match the shipped template. It updates the 交付汇总 prompt only when it is unedited. Migration 038 replaces the original Git authentication instruction with guidance to use a hosting CLI, a configured MCP, or `git credential fill` for API access. Both migrations preserve project copies and can be repeated. The Git credentials of the run's responsible user need push access for the new step to complete.

## GitHub credentials

Expand Down
Loading
Loading