@moretea-labs/forge 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -2
- package/CHANGELOG.md +20 -0
- package/README.en.md +24 -3
- package/README.md +10 -6
- package/README.zh-CN.md +5 -3
- package/THIRD_PARTY_NOTICES.md +1 -2
- package/adapters/chatgpt/browser-delivery-runtime.ts +5 -3
- package/adapters/chatgpt/provider-delivery.ts +1 -1
- package/adapters/chatgpt/work-conversation-binding-store.ts +20 -1
- package/adapters/computer/chatgpt-extension-target.ts +295 -50
- package/adapters/computer/chrome-extension/background.js +227 -71
- package/adapters/computer/chrome-extension/content.js +181 -157
- package/adapters/computer/chrome-extension/manifest.json +3 -1
- package/adapters/computer/desktop-operator-provider.ts +18 -6
- package/adapters/computer/interaction-target-authority.ts +39 -9
- package/adapters/mcp/access-mode.ts +18 -39
- package/adapters/mcp/auth.ts +2 -6
- package/adapters/mcp/instructions.ts +2 -2
- package/adapters/mcp/multi-repository.ts +7 -28
- package/adapters/mcp/runtime-gateway/context-adapter.ts +79 -40
- package/adapters/mcp/runtime-gateway/context-pack-sidecar.ts +7 -15
- package/adapters/mcp/runtime-gateway/execution-tools.ts +7 -13
- package/adapters/mcp/runtime-gateway/plugin-adapter.ts +16 -3
- package/adapters/mcp/runtime-gateway/process-tools.ts +3 -21
- package/adapters/mcp/runtime-gateway/router.ts +3 -5
- package/adapters/mcp/runtime-gateway/routing-policy.ts +17 -10
- package/adapters/mcp/runtime-gateway/runtime-observation-adapter.ts +1 -1
- package/adapters/mcp/runtime-gateway/runtime-tool-definitions.ts +14 -9
- package/adapters/mcp/runtime-gateway/runtime-tools.ts +1 -5
- package/adapters/mcp/runtime-gateway/scheduler-adapter.ts +36 -1
- package/adapters/mcp/runtime-gateway/status-inbox-adapter.ts +58 -4
- package/adapters/mcp/runtime-gateway/typescript-navigation-sidecar.ts +7 -3
- package/adapters/mcp/runtime-gateway/work-adapter.ts +16 -16
- package/adapters/mcp/runtime-gateway/work-input-wire-migration.ts +0 -17
- package/adapters/mcp/runtime-gateway/work-semantic-operations.ts +69 -12
- package/adapters/mcp/runtime-gateway/workflow-supervisor-adapter.ts +26 -2
- package/adapters/mcp/server.ts +24 -3
- package/adapters/mcp/setup.ts +4 -10
- package/adapters/mcp/tool-mapping/access-tools.ts +0 -6
- package/adapters/mcp/tool-mapping/legacy-tool-service.ts +672 -2935
- package/adapters/mcp/tool-mapping/post-finalize-work-attribution.ts +1 -1
- package/adapters/mcp/tool-mapping/repository-tools.ts +52 -86
- package/adapters/mcp/toolset-names.ts +11 -42
- package/adapters/mcp/toolset.ts +16 -90
- package/{src/cli → adapters}/mcp/transports/AGENTS.md +5 -5
- package/{src/cli → adapters}/mcp/transports/CLAUDE.md +5 -5
- package/adapters/mcp/transports/http-observation.ts +18 -6
- package/adapters/mcp/transports/http-post-lifecycle.ts +19 -0
- package/adapters/mcp/transports/http.ts +54 -14
- package/adapters/mcp/types.ts +0 -6
- package/assets/hooks/lib/session-state.sh +0 -38
- package/assets/hooks/post-bash.sh +1 -1
- package/assets/hooks/post-tool-observer.sh +0 -5
- package/assets/hooks/prompt-guard.sh +0 -55
- package/assets/partials/04-project-structure.partial.md +1 -1
- package/assets/partials/07-footer.partial.md +1 -1
- package/assets/partials-agents/02-operating-mode.partial.md +1 -1
- package/assets/partials-agents/08-deep-docs.partial.md +1 -1
- package/assets/reference-configs/agentic-development-flow.md +1 -1
- package/assets/reference-configs/external-tooling.md +0 -76
- package/assets/reference-configs/release-deploy.md +1 -1
- package/assets/templates/helpers/architecture-queue.sh +1 -1
- package/assets/templates/helpers/check-agent-tooling.sh +1 -327
- package/assets/templates/helpers/check-task-workflow.sh +1 -1
- package/assets/templates/helpers/ensure-task-workflow.sh +0 -14
- package/assets/templates/helpers/migrate-project-template.sh +2 -2
- package/assets/workflow-contract.v1.json +0 -2
- package/docs/README.md +5 -2
- package/docs/architecture/CURRENT.md +114 -30
- package/docs/architecture/decisions/20260904-ios-device-migration-baseline.md +42 -0
- package/docs/architecture/decisions/20260918-stable-candidate-release-lifecycle.md +15 -2
- package/docs/architecture/decisions/20260924-thin-semantic-working-context.md +4 -2
- package/docs/architecture/decisions/20261001-supervisor-turn-authority.md +109 -4
- package/docs/architecture/decisions/20261009-exact-code-context-discovery.md +19 -0
- package/docs/architecture/decisions/20261009-generated-xcode-cache-retention.md +37 -0
- package/docs/architecture/decisions/20261011-autonomous-continuation-convergence.md +597 -0
- package/docs/architecture/decisions/20261017-edit-session-finalization-reconciliation.md +17 -0
- package/docs/architecture/decisions/20261019-retire-host-skills.md +16 -0
- package/docs/architecture/diagrams/agentic-dev-plugin-architecture.html +1 -1
- package/docs/architecture/domains/public-surface.md +3 -5
- package/docs/architecture/domains/verification.md +5 -5
- package/docs/architecture/modules/controller-runtime/transport-lifecycle.md +2 -2
- package/docs/architecture/requests/2026-09-04-computer-plugin-workflow-taxonomy.md +4 -4
- package/docs/architecture/reviews/20261015-code-search-runtime-acceptance.md +75 -0
- package/docs/forge-plugin-management.md +14 -2
- package/docs/operations/controller-browser-plugin.md +23 -0
- package/docs/operations/features.md +6 -7
- package/docs/operations/features.zh-CN.md +1 -1
- package/docs/operations/github-repository.md +4 -4
- package/docs/operations/github-semantic-release-projection.md +20 -0
- package/docs/operations/homebrew.md +2 -2
- package/docs/operations/mcp-tool-exposure.md +13 -54
- package/docs/operations/runtime-performance-diagnostics.md +8 -0
- package/docs/operations/standalone-disaster-recovery.md +1 -1
- package/docs/tutorials/01-install-and-start.zh-CN.md +1 -1
- package/docs/tutorials/03-first-repository-task.md +2 -0
- package/docs/wiki/Computer-and-Plugins.md +78 -0
- package/docs/wiki/Computer-and-Plugins.zh-CN.md +88 -0
- package/docs/wiki/Home.md +16 -2
- package/docs/wiki/Implementation.md +24 -12
- package/docs/wiki/Installation.md +28 -32
- package/docs/wiki/Integrations.md +4 -0
- package/docs/wiki/Quick-Start.md +35 -22
- package/docs/wiki/Releases-and-Upgrades.md +15 -25
- package/docs/wiki/_Sidebar.md +5 -1
- package/package.json +1 -12
- package/packages/kernel/controller/infrastructure/controller-session-store.ts +63 -38
- package/packages/kernel/identity/infrastructure/activity-projection-store.ts +10 -0
- package/packages/kernel/scheduler/application/eligibility.ts +4 -1
- package/packages/kernel/scheduler/infrastructure/schedule-store.ts +13 -10
- package/packages/kernel/work/application/work-service.ts +1 -0
- package/packages/kernel/work/domain/repository-completion-receipt.ts +1 -1
- package/packages/kernel/work/domain/state-machine.ts +9 -2
- package/packages/kernel/work/infrastructure/work-contract-store.ts +28 -1
- package/packages/plugin-runtime/browser/provider-registry.ts +12 -36
- package/packages/plugin-runtime/computer/conversation-target.ts +17 -7
- package/scripts/assemble-template.ts +11 -72
- package/scripts/check-mcp-compatibility.ts +55 -74
- package/scripts/check-package-identity.mjs +0 -5
- package/scripts/check-runtime-architecture.mjs +305 -28
- package/scripts/init-project.sh +0 -46
- package/scripts/install-ios-hid-toolchain.sh +60 -0
- package/scripts/install-standalone-recovery.ts +1 -1
- package/scripts/lib/project-init-lib.sh +3 -3
- package/scripts/migrate-windows-wsl-controller-home.ts +2 -0
- package/scripts/open-source-audit-allowlist.txt +0 -1
- package/scripts/run-governed-gate.ts +2 -0
- package/scripts/smoke-ios-physical-device.ts +38 -10
- package/scripts/smoke-mcp-http-runtime.ts +7 -8
- package/scripts/smoke-mcp-tool-surface.ts +27 -41
- package/scripts/smoke-workflow-supervisor-chrome-adapter.ts +6 -3
- package/scripts/sync-generated-authority.mjs +0 -1
- package/src/cli/agent-jobs/executor-health.ts +1 -1
- package/src/cli/agent-jobs/integration.ts +2 -2
- package/src/cli/chatgpt-browser/file-policy.ts +2 -2
- package/src/cli/commands/doctor.ts +1 -143
- package/src/cli/commands/global-runtime.ts +3 -196
- package/src/cli/commands/init-hook.ts +6 -23
- package/src/cli/commands/init.ts +3 -252
- package/src/cli/commands/mcp.ts +0 -5
- package/src/cli/commands/prompt-guard-decision.ts +0 -2
- package/src/cli/commands/recovery.ts +2 -14
- package/src/cli/commands/repository.ts +17 -1
- package/src/cli/commands/setup-execution.ts +41 -0
- package/src/cli/controller/completion-orchestrator.ts +1 -1
- package/src/cli/controller/composite-operations.ts +1 -1
- package/src/cli/controller/context/instruction-context.ts +1 -1
- package/src/cli/controller/context/known-paths.ts +2 -2
- package/src/cli/controller/context/query-planning.ts +11 -4
- package/src/cli/controller/context/rule-resolution.ts +2 -2
- package/src/cli/controller/context/source-materializer.ts +2 -2
- package/src/cli/controller/context/structural-provider.ts +84 -0
- package/src/cli/controller/context/structural.ts +6 -6
- package/src/cli/controller/context/types.ts +8 -9
- package/src/cli/controller/context-pack.ts +97 -76
- package/src/cli/controller/operational-plan.ts +1 -1
- package/src/cli/controller/systemd-user.ts +4 -10
- package/src/cli/editing/edit-session.ts +17 -5
- package/src/cli/github/github.ts +4 -4
- package/src/cli/github/semantic-projection.ts +174 -0
- package/src/cli/hook/prompt-intents.ts +0 -9
- package/src/cli/index.ts +1 -43
- package/src/cli/local-bridge/connector-freshness.ts +1 -12
- package/src/cli/local-bridge/console-automations.ts +1 -1
- package/src/cli/local-bridge/console-view-models.ts +1 -1
- package/src/cli/local-bridge/facade-api.ts +0 -2
- package/src/cli/repositories/command-classifier.ts +0 -9
- package/src/cli/repositories/command-scope.ts +2 -2
- package/src/cli/repositories/locks.ts +20 -0
- package/src/cli/repositories/registry.ts +2 -1
- package/src/cli/repositories/safe-patch.ts +2 -12
- package/src/cli/repositories/structured-git.ts +39 -3
- package/src/cli/repository/inspector.ts +185 -343
- package/src/effects/process-runner.ts +17 -1
- package/src/runtime/context/generic-lsp-provider.ts +1 -1
- package/src/runtime/context/semantic-navigation-contract.ts +7 -0
- package/src/runtime/context/semantic-navigation.ts +1 -1
- package/src/runtime/control-plane/cleanup-artifact-retention.ts +4 -4
- package/src/runtime/control-plane/execution/work-delivery-service.ts +150 -31
- package/src/runtime/control-plane/execution/work-handle-authority.ts +12 -4
- package/src/runtime/control-plane/execution/work-handle-store.ts +53 -1
- package/src/runtime/control-plane/execution/work-operation-service.ts +20 -10
- package/src/runtime/control-plane/execution/work-preparation-service.ts +108 -4
- package/src/runtime/control-plane/execution/work-process-evidence.ts +2 -2
- package/src/runtime/control-plane/execution/work-terminal-cleanup.ts +28 -13
- package/src/runtime/control-plane/execution/work-validation-reconciler.ts +5 -1
- package/src/runtime/control-plane/execution/work-verification-snapshot.ts +1 -1
- package/src/runtime/control-plane/facade/capability-registry.ts +2 -0
- package/src/runtime/control-plane/facade/work-continuation.ts +1 -1
- package/src/runtime/control-plane/generated-cache-retention.ts +114 -63
- package/src/runtime/control-plane/global-scheduler/maintenance.ts +20 -8
- package/src/runtime/control-plane/global-scheduler/reconciliation.ts +1 -11
- package/src/runtime/control-plane/governance/external-effects.ts +1 -1
- package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +1 -0
- package/src/runtime/control-plane/runtime-cleanup.ts +12 -93
- package/src/runtime/evidence/sensitive-output.ts +22 -2
- package/src/runtime/execution/jobs/child-reference.ts +11 -0
- package/src/runtime/execution/jobs/receipt-recovery.ts +1 -11
- package/src/runtime/execution/process-runtime/command-facade.ts +3 -3
- package/src/runtime/execution/process-runtime/runtime.ts +20 -16
- package/src/runtime/execution/thin-harness/execution-router.ts +16 -16
- package/src/runtime/execution/thin-harness/fast-executor.ts +2 -2
- package/src/runtime/execution/thin-harness/search-worker.ts +2 -2
- package/src/runtime/execution/workers/executor.ts +1 -2
- package/src/runtime/maintenance/cleanup.ts +41 -5
- package/src/runtime/plugins/action-application.ts +12 -1
- package/src/runtime/plugins/app-store-connect-adapter.ts +252 -4
- package/src/runtime/plugins/browser-adapter.ts +381 -313
- package/src/runtime/plugins/browser-macos-bridge.ts +114 -112
- package/src/runtime/plugins/browser-manifest-surface.ts +2 -1
- package/src/runtime/plugins/browser-registration.ts +2 -0
- package/src/runtime/plugins/browser-runtime.ts +26 -35
- package/src/runtime/plugins/computer-chatgpt-browser-adapter-installer.ts +11 -2
- package/src/runtime/plugins/computer-registration.ts +76 -9
- package/src/runtime/plugins/github-adapter.ts +30 -3
- package/src/runtime/plugins/gmail-adapter.ts +166 -1
- package/src/runtime/plugins/google-shared.ts +10 -5
- package/src/runtime/plugins/ios/remote-xpc-hid.ts +70 -30
- package/src/runtime/plugins/ios-adapter.ts +45 -40
- package/src/runtime/plugins/ios-agent-device.ts +54 -4
- package/src/runtime/plugins/ios-device-ownership.ts +103 -0
- package/src/runtime/plugins/ios-physical-device.ts +497 -79
- package/src/runtime/plugins/local-system-adapter.ts +1 -99
- package/src/runtime/plugins/store.ts +80 -7
- package/src/runtime/plugins/types.ts +4 -0
- package/src/runtime/projections/git-status-sampler.ts +2 -19
- package/src/runtime/recovery/actions.ts +1 -1
- package/src/runtime/recovery/lifecycle-inventory.ts +1 -11
- package/src/runtime/recovery/probe.ts +2 -2
- package/src/runtime/release/release-coordinator.ts +20 -4
- package/src/runtime/root/controller-progression-composition.ts +67 -5
- package/src/runtime/root/package-connector-service.ts +123 -11
- package/src/runtime/root/package-runtime-release.ts +6 -18
- package/src/runtime/root/package-runtime-service.ts +7 -13
- package/src/runtime/root/release-execution-canary.ts +18 -5
- package/src/runtime/root/release-manifest.ts +0 -34
- package/src/runtime/root/release-materialize.ts +0 -78
- package/src/runtime/root/runtime.ts +1 -2
- package/src/runtime/root/scheduled-controller-composition.ts +2 -1
- package/src/runtime/root/service.ts +90 -11
- package/src/runtime/root/types.ts +0 -6
- package/src/runtime/root/workflow-supervisor-composition.ts +207 -19
- package/src/runtime/root/workflow-supervisor-runtime.ts +365 -10
- package/src/runtime/safe-tooling/google-credential-store.ts +1 -11
- package/src/runtime/safe-tooling/ios-development.ts +22 -8
- package/src/runtime/safe-tooling/job-summary.ts +1 -1
- package/src/runtime/safe-tooling/workspace-auth.ts +4 -1
- package/src/runtime/shared/atomic-text-file.ts +21 -0
- package/src/runtime/shared/json-files.ts +8 -3
- package/src/runtime/standalone-recovery/core.ts +189 -174
- package/src/runtime/standalone-recovery/entry.ts +62 -30
- package/src/runtime/standalone-recovery/operation-lock.ts +11 -1
- package/src/runtime/workflow/schedules/chatgpt-automation-migration.ts +1 -0
- package/src/runtime/workflow/schedules/engine.ts +36 -14
- package/src/runtime/workflow/schedules/pending-activation.ts +11 -4
- package/src/runtime/workflow/schedules/work-continuation.ts +51 -6
- package/supervisor/client.ts +31 -14
- package/supervisor/control-plane.ts +210 -115
- package/supervisor/forge-validators.ts +88 -21
- package/supervisor/native-browser-adapter.ts +393 -28
- package/supervisor/native-messaging/host.ts +21 -2
- package/supervisor/protocol.ts +74 -26
- package/supervisor/server.ts +16 -8
- package/supervisor/store.ts +476 -57
- package/supervisor/types.ts +19 -13
- package/SKILL.md +0 -427
- package/adapters/computer/chatgpt-target-router.ts +0 -103
- package/adapters/mcp/runtime-gateway/automation-receipt-adapter.ts +0 -87
- package/adapters/mcp/runtime-gateway/work-validation-reconciler.ts +0 -1
- package/adapters/mcp/toolset-selection.ts +0 -41
- package/agents/openai.yaml +0 -4
- package/assets/skill-hooks.json +0 -41
- package/assets/skill-version.json +0 -189
- package/assets/skills/claude-review/SKILL.md +0 -231
- package/assets/skills/codex-review/SKILL.md +0 -103
- package/assets/templates/helpers/check-skill-version.ts +0 -193
- package/scripts/check-skill-version.ts +0 -5
- package/scripts/ensure-codegraph.sh +0 -16
- package/scripts/run-skill-hook.ts +0 -244
- package/scripts/sync-codex-installed-copies.sh +0 -182
- package/src/cli/commands/tools.ts +0 -167
- package/src/cli/mcp/access-mode.ts +0 -2
- package/src/cli/mcp/access-tools.ts +0 -2
- package/src/cli/mcp/audit.ts +0 -2
- package/src/cli/mcp/auth.ts +0 -2
- package/src/cli/mcp/instructions.ts +0 -2
- package/src/cli/mcp/legacy-context.ts +0 -2
- package/src/cli/mcp/legacy-tool-service.ts +0 -2
- package/src/cli/mcp/multi-repository.ts +0 -2
- package/src/cli/mcp/oauth.ts +0 -2
- package/src/cli/mcp/openai-secure-tunnel.ts +0 -2
- package/src/cli/mcp/paths.ts +0 -2
- package/src/cli/mcp/policy.ts +0 -2
- package/src/cli/mcp/post-finalize-work-attribution.ts +0 -2
- package/src/cli/mcp/proxy-env.ts +0 -2
- package/src/cli/mcp/readiness-projection.ts +0 -2
- package/src/cli/mcp/redaction.ts +0 -2
- package/src/cli/mcp/repo.ts +0 -2
- package/src/cli/mcp/repository-tools.ts +0 -2
- package/src/cli/mcp/server.ts +0 -2
- package/src/cli/mcp/setup.ts +0 -2
- package/src/cli/mcp/tool-capability-cache.ts +0 -2
- package/src/cli/mcp/tool-contract.ts +0 -2
- package/src/cli/mcp/tools.ts +0 -2
- package/src/cli/mcp/toolset-names.ts +0 -2
- package/src/cli/mcp/toolset-selection.ts +0 -2
- package/src/cli/mcp/toolset.ts +0 -2
- package/src/cli/mcp/transports/http.ts +0 -2
- package/src/cli/mcp/transports/session-registry.ts +0 -2
- package/src/cli/mcp/transports/stdio.ts +0 -2
- package/src/cli/mcp/types.ts +0 -2
- package/src/cli/mcp/umbrella-tools.ts +0 -2
- package/src/cli/tools/codegraph.ts +0 -695
- package/src/core/adoption/helper-wrapper-plan.ts +0 -159
- package/src/runtime/context/codegraph-cache-boundary.ts +0 -255
- package/src/runtime/context/codegraph-read-provider.ts +0 -611
- package/src/runtime/context/codegraph-sidecar.cjs +0 -248
- package/src/runtime/control-plane/codegraph-cache-retention.ts +0 -164
- package/src/runtime/gateway/mcp/execution-tools.ts +0 -2
- package/src/runtime/gateway/mcp/legacy-ios-tool-adapter.ts +0 -2
- package/src/runtime/gateway/mcp/persisted-check-process.ts +0 -2
- package/src/runtime/gateway/mcp/process-tools.ts +0 -2
- package/src/runtime/gateway/mcp/router.ts +0 -2
- package/src/runtime/gateway/mcp/runtime-tool-definitions.ts +0 -2
- package/src/runtime/gateway/mcp/runtime-tools.ts +0 -2
- package/src/runtime/gateway/mcp/work-validation-reconciler.ts +0 -2
- package/src/runtime/plugins/browser-provider-registry.ts +0 -2
- package/src/runtime/plugins/computer-chatgpt-macos-target.ts +0 -891
package/AGENTS.md
CHANGED
|
@@ -6,6 +6,8 @@ This repository self-hosts the Forge contract. Retired project-skill and project
|
|
|
6
6
|
|
|
7
7
|
Treat ChatGPT as the controller and Forge as its repository execution layer. ChatGPT chooses how to inspect, plan, edit, verify, or delegate. Forge provides deterministic repository tools and does not impose an Agent-first workflow.
|
|
8
8
|
|
|
9
|
+
- **User-directed verification priority (2026-10-12):** Do not add new automated test cases or test files during normal Forge implementation unless the user explicitly changes this instruction. Prefer direct verification of the real requested workflow and inspect its actual effect/tool receipts; do not substitute expanded mock suites, repeated full test runs, or source-only green checks for a delivered product. Preserve existing unrelated tests, and never weaken exact-target/unknown-send protections to make live acceptance appear successful.
|
|
10
|
+
|
|
9
11
|
- Scheduling, explicit workspace placement choice, integration timing, baseline activation, delivery, and acceptance are model decisions made from the user's current objective and live repository evidence. Forge supplies callable execution primitives and fixed mechanical compatibility mappings only; it must not infer, gate, override, or auto-advance semantic workflow decisions from a Work transition, executor completion, risk classification, policy, or heuristic. Repository rules guide the model; they are not a Forge workflow state machine.
|
|
10
12
|
|
|
11
13
|
- Direct Edit is the default for understood work. One session may accept many patch batches, keep revision history, create savepoints, run checks, roll back selected revisions, and finalize one aggregate localized diff.
|
|
@@ -27,8 +29,9 @@ Treat ChatGPT as the controller and Forge as its repository execution layer. Cha
|
|
|
27
29
|
### Dirty checkout and cross-Work integration policy
|
|
28
30
|
|
|
29
31
|
- A Work may freely keep uncommitted changes in its selected checkout while it is implementing, reviewing, or repairing its own candidate. A dirty checkout is normal development state and is not itself a Forge error, lifecycle state, or reason to switch topology.
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
+
- **User-directed conflict-based integration rule (2026-10-15):** A receiving checkout's staged, unstaged, or untracked changes are **not by themselves a merge gate** and do not require the receiving Work to commit first. Inspect exact source and target revisions, merge base, candidate changes, receiving dirty paths and contents, and Git's actual merge result. When the reviewed changes can be integrated without overwriting existing work or changing its index state, proceed through an authorized safe Git path. A coarse `WORK_DELIVERY_TARGET_DIRTY` tool rejection is not evidence of an actual Git merge conflict.
|
|
33
|
+
- If source and receiving changes overlap or Git reports a real conflict, inspect both implementations and resolve the specific semantic difference. Preserve concurrent-writer ownership and mutation leases; those are separate from merely having uncommitted changes. Never repeat a branch whose equivalent changes are already integrated under other commit IDs.
|
|
34
|
+
- Do not auto-stash, auto-reset, auto-clean, silently commit, or discard receiving changes merely to complete integration. Verify that original uncommitted bytes, staged/unstaged distinctions, and untracked files are preserved after a merge. If a primitive cannot preserve them safely, identify the mechanical limitation and choose another authorized, non-destructive integration path.
|
|
32
35
|
- When committed histories conflict, resolve semantically from the merge base, both sides' commits/diffs, and the current Requirement/Plan/Work objective. Preserve the current architecture and replay the other Work's intent onto it when implementation shape has changed; never use `ours`/`theirs`, timestamp, or commit order as a general semantic authority.
|
|
33
36
|
- These are Controller/model workflow rules, not new Forge Kernel policy. Do not add merge lifecycle states, automatic integration policy, or repository guards merely to encode this procedure; Forge should expose the Git/worktree/diff/commit primitives and report real Git or concurrent-writer conflicts mechanically.
|
|
34
37
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ All notable public Forge changes are recorded here. Release entries are tied to
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 1.8.2 - 2026-10-19
|
|
8
|
+
- Retire Forge-owned host Skill distribution and independent Skill version authority, retaining CLI/MCP and project templates.
|
|
9
|
+
|
|
10
|
+
### Reliable autonomous delivery
|
|
11
|
+
|
|
12
|
+
- Restore exact ChatGPT conversation targeting and recover lost Chrome tab/provider bindings without replaying an uncertain external send.
|
|
13
|
+
- Harden Supervisor effect-ledger ownership, no-click dispatch proofs, bootstrap reconciliation, stale composer recovery, and Chrome Native Messaging heartbeat handling.
|
|
14
|
+
- Stop Work-owned auto-progression after semantic completion while retaining exact request identity and terminal receipts.
|
|
15
|
+
|
|
16
|
+
### Plugins and scheduled workflows
|
|
17
|
+
|
|
18
|
+
- Persist Browser plugin v1/v2 configuration migrations into the single Controller Home v3 authority, with atomic write and legacy retirement.
|
|
19
|
+
- Tighten scheduled Gmail digests, fixed-mailbox authorization, unknown notification receipts, and daily wake identity.
|
|
20
|
+
|
|
21
|
+
### Runtime and packaging
|
|
22
|
+
|
|
23
|
+
- Make Process Runner release canaries authoritative before promoting immutable package/Runtime releases; reject broken runner artifacts and invalid execution modes.
|
|
24
|
+
- Strengthen Recovery release ownership, package validation, whole-Runtime rollback boundaries, and source/runtime identity.
|
|
25
|
+
|
|
26
|
+
|
|
7
27
|
## 1.8.1 - 2026-09-19
|
|
8
28
|
|
|
9
29
|
### Automatic workflows and V2
|
package/README.en.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
# Forge
|
|
1
|
+
# Forge — local-first ChatGPT MCP action runtime
|
|
2
2
|
|
|
3
|
-
Forge
|
|
3
|
+
Forge connects ChatGPT (or another selected external MCP controller) to permission-scoped operations on your computer, code repositories, browser, and connected services. **ChatGPT decides; Forge executes, persists, and verifies.** Forge is not an internal AI coding model and does not require a separate OpenAI API key when using ChatGPT as the controller.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install and connect
|
|
6
|
+
|
|
7
|
+
Requires Node.js 20.10+ and npm (or Bun).
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @moretea-labs/forge@latest
|
|
11
|
+
forge --version
|
|
12
|
+
forge setup
|
|
13
|
+
forge setup configure --controller chatgpt --tunnel auto
|
|
14
|
+
forge setup next
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Supported hosts: macOS and modern Linux; use WSL2 for the recommended Windows path. Native Windows is a preview with a limited portable Runtime scope. Git is needed only for repository development features.
|
|
18
|
+
|
|
19
|
+
## Learn more
|
|
20
|
+
|
|
21
|
+
- See [README.md](README.md) for the maintained English product overview, capability descriptions, and security model.
|
|
22
|
+
- [Installation and setup](docs/tutorials/01-install-and-start.md)
|
|
23
|
+
- [Connect ChatGPT over MCP](docs/tutorials/02-connect-chatgpt.md)
|
|
24
|
+
- [Features and providers](docs/operations/features.md)
|
|
25
|
+
- [Docs](docs/README.md) · [GitHub Wiki](https://github.com/moretea-labs/forge/wiki)
|
|
26
|
+
- [Latest stable release (v1.8.1)](https://github.com/moretea-labs/forge/releases/tag/v1.8.1) · [npm package](https://www.npmjs.com/package/@moretea-labs/forge)
|
package/README.md
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center"><img src="docs/images/forge-banner.svg" alt="Forge — ChatGPT decides, Forge acts" width="1280"></p>
|
|
4
4
|
<p align="center"><strong>Give ChatGPT real, controlled hands on your computer, code, browser, and services.</strong></p>
|
|
5
|
-
<p align="center"><a href="#english">English</a> · <a href="#zh-cn">简体中文</a> · <a href="docs/README.md">Docs</a> · <a href="docs/operations/features.md">Features</a> · <a href="docs/forge-plugin-management.md">Plugins</a> · <a href="https://github.com/moretea-labs/forge/releases">Releases</a></p>
|
|
5
|
+
<p align="center"><a href="#english">English</a> · <a href="#zh-cn">简体中文</a> · <a href="https://moretea-labs.github.io/forge/">Documentation Site</a> · <a href="docs/README.md">Docs</a> · <a href="docs/operations/features.md">Features</a> · <a href="docs/forge-plugin-management.md">Plugins</a> · <a href="https://github.com/moretea-labs/forge/releases">Releases</a></p>
|
|
6
6
|
<p align="center"><img alt="CI" src="https://github.com/moretea-labs/forge/actions/workflows/ci.yml/badge.svg"> <img alt="Release" src="https://img.shields.io/github/v/release/moretea-labs/forge?include_prereleases&sort=semver"> <img alt="npm latest" src="https://img.shields.io/npm/v/%40moretea-labs%2Fforge?tag=latest&label=npm%20latest"> <img alt="License" src="https://img.shields.io/github/license/moretea-labs/forge"></p>
|
|
7
7
|
|
|
8
|
+
**Forge is a local-first ChatGPT MCP action runtime** for permission-scoped computer use, software engineering, browser automation, and connected services. It is not an autonomous coding model or a hosted AI API.
|
|
9
|
+
|
|
8
10
|
**Forge has no internal AI brain.** One external controller owns semantic decisions; Forge provides the controlled execution, state, permissions, and recovery layer. ChatGPT is the recommended controller, but you can choose Codex, Claude, or another MCP client instead, and you may configure several controller entries while keeping one primary controller at a time.
|
|
9
11
|
|
|
10
12
|
With ChatGPT as the controller, Forge does **not** require a separate OpenAI API key or a second per-token model budget. Your existing ChatGPT plan/session limits still apply. Codex and Claude are not Forge dependencies unless you explicitly choose or configure them.
|
|
@@ -52,20 +54,22 @@ For a reviewed source checkout: `git clone https://github.com/moretea-labs/forge
|
|
|
52
54
|
|
|
53
55
|
## Built in, and extensible
|
|
54
56
|
|
|
55
|
-
Forge ships typed local/browser/desktop/iOS/GitHub/Gmail/Calendar/Tasks/App Store Connect/Resend capabilities. On macOS, manage the native **Computer** capability with `forge computer setup|status|doctor|update|uninstall`; Forge Desktop Operator remains the independently released native provider behind that product surface. The generic provider catalog also includes **Forge Design** and **Personal Knowledge Assistant** and remains available through `forge plugin catalog` / `forge plugin install <id>`. See [Features](docs/operations/features.md) and [Plugin Management](docs/forge-plugin-management.md).
|
|
57
|
+
Forge ships typed local/browser/desktop/iOS/GitHub/Gmail/Calendar/Tasks/App Store Connect/Resend capabilities. On macOS, manage the native **Computer** capability with `forge computer setup|status|doctor|update|uninstall`; Forge Desktop Operator remains the independently released native provider behind that product surface. The generic provider catalog also includes **Forge Design** and **Personal Knowledge Assistant** and remains available through `forge plugin catalog` / `forge plugin install <id>`. Run `forge computer doctor` to verify readiness; updating the Forge CLI does **not** automatically update pinned native providers. See [Computer and Plugins](docs/wiki/Computer-and-Plugins.md), [Features](docs/operations/features.md), and [Plugin Management](docs/forge-plugin-management.md).
|
|
56
58
|
|
|
57
59
|
## Controlled by design
|
|
58
60
|
|
|
59
61
|
Local read/write grants are explicit and expiring; remote or destructive effects are distinguished from ordinary local work; high-impact actions require stronger confirmation. Full Access reduces repetitive prompts for normal work without removing the hard boundaries around secrets, destructive actions, and outside-workspace access. See [Security](SECURITY.md) and the [Security Model](docs/wiki/Security-Model.md).
|
|
60
62
|
|
|
61
|
-
**Docs:** [Wiki](docs/wiki/Home.md) · [Support](SUPPORT.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md). Current stable release: `
|
|
63
|
+
**Docs:** [GitHub Wiki](https://github.com/moretea-labs/forge/wiki) · [Wiki source](docs/wiki/Home.md) · [Support](SUPPORT.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md). Current stable release: [`v1.8.2`](https://github.com/moretea-labs/forge/releases/tag/v1.8.2); stable installs use npm `latest`.
|
|
62
64
|
|
|
63
65
|
---
|
|
64
66
|
<a id="zh-cn"></a>
|
|
65
67
|
|
|
66
68
|
<p align="center"><img src="docs/images/forge-banner-cn.svg" alt="Forge——ChatGPT 决策,Forge 执行" width="1280"></p>
|
|
67
69
|
<p align="center"><strong>让 ChatGPT 真正、安全地操作你的电脑、代码、浏览器和外部服务。</strong></p>
|
|
68
|
-
<p align="center"><a href="#english">English</a> · <a href="#zh-cn">简体中文</a> · <a href="docs/README.zh-CN.md">中文文档</a> · <a href="docs/operations/features.zh-CN.md">功能</a> · <a href="docs/forge-plugin-management.md">插件</a></p>
|
|
70
|
+
<p align="center"><a href="#english">English</a> · <a href="#zh-cn">简体中文</a> · <a href="https://moretea-labs.github.io/forge/Computer-and-Plugins.zh-CN.html">中文 Computer 教程</a> · <a href="docs/README.zh-CN.md">中文文档</a> · <a href="docs/operations/features.zh-CN.md">功能</a> · <a href="docs/forge-plugin-management.md">插件</a></p>
|
|
71
|
+
|
|
72
|
+
**Forge 是一个本地优先的 ChatGPT MCP 执行运行时**,将 AI 对话连接到有权限边界的电脑操作、代码开发、浏览器自动化和外部服务,而不是额外的在线 AI 模型。
|
|
69
73
|
|
|
70
74
|
**Forge 自己没有 AI 大脑。** 语义判断始终由一个外部主控负责,Forge 负责受控执行、持久状态、权限和恢复。推荐 ChatGPT,也可以明确选择 Codex、Claude 或其他 MCP 客户端;可以预配置多个入口,但同一时刻只有一个主控负责决策。
|
|
71
75
|
|
|
@@ -105,8 +109,8 @@ forge setup next # 按每次显示的 Next 动作继续
|
|
|
105
109
|
|
|
106
110
|
继续阅读[安装与启动](docs/tutorials/01-install-and-start.zh-CN.md)和[连接 ChatGPT](docs/tutorials/02-connect-chatgpt.zh-CN.md)。仓库不是首次 setup 的前置条件,需要开发能力时再运行 `forge adopt --repo /path/to/your-project`。已安装用户升级:`npm install -g @moretea-labs/forge@latest`,确认 `forge --version` 后运行 `forge setup next` 让新版 setup 自动补齐 Runtime/connector 配置。源码安装:`git clone https://github.com/moretea-labs/forge.git && cd forge && bun install --frozen-lockfile && npm install -g . --omit=optional --no-audit --no-fund`。
|
|
107
111
|
|
|
108
|
-
Forge 内置本机、Browser、Desktop、iOS、GitHub、Gmail、Calendar、Tasks、App Store Connect、Resend 等类型化能力。macOS 原生 **Computer** 能力统一通过 `forge computer setup|status|doctor|update|uninstall` 管理;Forge Desktop Operator 仍作为其独立发布的原生 Provider 保持稳定身份。通用 Provider 目录还包含 **Forge Design / Personal Knowledge Assistant**,继续使用 `forge plugin catalog` / `forge plugin install <id>`
|
|
112
|
+
Forge 内置本机、Browser、Desktop、iOS、GitHub、Gmail、Calendar、Tasks、App Store Connect、Resend 等类型化能力。macOS 原生 **Computer** 能力统一通过 `forge computer setup|status|doctor|update|uninstall` 管理;Forge Desktop Operator 仍作为其独立发布的原生 Provider 保持稳定身份。通用 Provider 目录还包含 **Forge Design / Personal Knowledge Assistant**,继续使用 `forge plugin catalog` / `forge plugin install <id>` 管理。升级 Forge CLI 不会自动升级独立 Provider;Computer 用户须运行 `forge computer update`,并用 `forge computer doctor` 检查状态。详见 [Computer 与插件安装指南](docs/wiki/Computer-and-Plugins.md)、[功能清单](docs/operations/features.zh-CN.md)与[插件管理](docs/forge-plugin-management.md)。
|
|
109
113
|
|
|
110
114
|
安全上,普通本地修改、远程影响、破坏性操作、密钥和工作区外访问是不同边界;Full Access 不会取消高风险确认。详见[安全说明](SECURITY.md)和[安全模型](docs/wiki/Security-Model.md)。
|
|
111
115
|
|
|
112
|
-
**文档:** [Wiki](docs/wiki/Home.md) · [支持](SUPPORT.md) · [贡献](CONTRIBUTING.md) · [更新日志](CHANGELOG.md)。当前稳定版为 `
|
|
116
|
+
**文档:** [GitHub Wiki](https://github.com/moretea-labs/forge/wiki) · [Wiki source](docs/wiki/Home.md) · [支持](SUPPORT.md) · [贡献](CONTRIBUTING.md) · [更新日志](CHANGELOG.md)。当前稳定版为 [`v1.8.2`](https://github.com/moretea-labs/forge/releases/tag/v1.8.2),稳定安装使用 npm `latest`。
|
package/README.zh-CN.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
<p align="center"><a href="https://github.com/moretea-labs/forge#english">English</a> · <a href="https://github.com/moretea-labs/forge#zh-cn">仓库首页中文</a> · <a href="docs/README.zh-CN.md">中文文档</a> · <a href="docs/operations/features.zh-CN.md">功能清单</a> · <a href="https://github.com/moretea-labs/forge/releases">版本发布</a></p>
|
|
6
6
|
<p align="center"><img alt="CI" src="https://github.com/moretea-labs/forge/actions/workflows/ci.yml/badge.svg"> <img alt="Release" src="https://img.shields.io/github/v/release/moretea-labs/forge?include_prereleases&sort=semver"> <img alt="npm latest" src="https://img.shields.io/npm/v/%40moretea-labs%2Fforge?tag=latest&label=npm%20latest"> <img alt="License" src="https://img.shields.io/github/license/moretea-labs/forge"></p>
|
|
7
7
|
|
|
8
|
+
**Forge 是本地优先的 ChatGPT MCP 执行工具**:通过权限受控的 Runtime,让 ChatGPT 操作电脑、Git 仓库、浏览器和已授权服务;也支持选择其他外部主控。
|
|
9
|
+
|
|
8
10
|
**Forge 自己没有 AI 大脑。** 每次语义决策都由一个外部主控负责,Forge 负责执行、持久状态、权限和恢复。默认推荐 ChatGPT,也可以明确选择 Codex、Claude 或其他 MCP 客户端;可以配置多个控制入口,但同一时刻只有一个主控拥有语义控制权。
|
|
9
11
|
|
|
10
12
|
选择 ChatGPT 时**不要求单独配置 OpenAI API Key,也不需要额外准备一套按 token 计费的模型预算**;仍受你的 ChatGPT 套餐和会话限制。没有选择 Codex/Claude,就不会把它们当成安装或就绪依赖。
|
|
@@ -68,7 +70,7 @@ npm install -g . --omit=optional --no-audit --no-fund
|
|
|
68
70
|
|
|
69
71
|
## 插件与能力
|
|
70
72
|
|
|
71
|
-
Forge 内置本机、Browser、Desktop、iOS、GitHub、Gmail、Calendar、Tasks、App Store Connect、Resend 等类型化插件;公开 Provider 目录还提供 **Forge Desktop Operator**、**Forge Design**、**Personal Knowledge Assistant**。运行 `forge plugin catalog`
|
|
73
|
+
Forge 内置本机、Browser、Desktop、iOS、GitHub、Gmail、Calendar、Tasks、App Store Connect、Resend 等类型化插件;公开 Provider 目录还提供 **Forge Desktop Operator**、**Forge Design**、**Personal Knowledge Assistant**。运行 `forge plugin catalog` 查看当前固定版本目录,CLI 升级不会自动更新这些 Provider。macOS Computer 使用 `forge computer update` 和 `forge computer doctor` 更新并检查,其他 Provider 需按官方 pin 重新安装。详见 [Computer 与插件安装指南](docs/wiki/Computer-and-Plugins.md)、[插件管理](docs/forge-plugin-management.md)和[功能清单](docs/operations/features.zh-CN.md)。
|
|
72
74
|
|
|
73
75
|
## 安全不是宣传词
|
|
74
76
|
|
|
@@ -76,6 +78,6 @@ Forge 把读取、普通本地写入、远程操作、破坏性操作、工作
|
|
|
76
78
|
|
|
77
79
|
## 文档与项目
|
|
78
80
|
|
|
79
|
-
[中文文档中心](docs/README.zh-CN.md) · [Wiki](docs/wiki/Home.md) · [SUPPORT.md](SUPPORT.md) · [CONTRIBUTING.md](CONTRIBUTING.md) · [CHANGELOG.md](CHANGELOG.md)
|
|
81
|
+
[Computer 中文教程](https://moretea-labs.github.io/forge/Computer-and-Plugins.zh-CN.html) · [中文文档中心](docs/README.zh-CN.md) · [GitHub Wiki](https://github.com/moretea-labs/forge/wiki) · [Wiki 源码](docs/wiki/Home.md) · [SUPPORT.md](SUPPORT.md) · [CONTRIBUTING.md](CONTRIBUTING.md) · [CHANGELOG.md](CHANGELOG.md)
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
当前稳定版本为 [`v1.8.1`](https://github.com/moretea-labs/forge/releases/tag/v1.8.1),稳定安装使用 npm `latest`。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
This inventory covers the direct runtime and development dependencies declared by `@moretea-labs/forge@1.8.
|
|
3
|
+
This inventory covers the direct runtime and development dependencies declared by `@moretea-labs/forge@1.8.2`.
|
|
4
4
|
|
|
5
5
|
License values come from `package-lock.json` where available. For lock entries without a license field, the declared license was verified from package metadata during release preparation. This file is informational and does not replace the license text distributed by each dependency.
|
|
6
6
|
|
|
@@ -16,7 +16,6 @@ License values come from `package-lock.json` where available. For lock entries w
|
|
|
16
16
|
| `react` | `19.2.8` | runtime | `MIT` | package metadata |
|
|
17
17
|
| `react-dom` | `19.2.8` | runtime | `MIT` | package metadata |
|
|
18
18
|
| `agent-device` | `0.20.2` | optional runtime (iOS/Android device automation provider) | `MIT` | package-lock.json |
|
|
19
|
-
| `@colbymchenry/codegraph` | `1.0.1` | development | `MIT` | package-lock.json |
|
|
20
19
|
| `@types/bun` | `1.3.14` | development | `MIT` | package-lock.json |
|
|
21
20
|
| `@types/cors` | `2.8.19` | development | `MIT` | package-lock.json |
|
|
22
21
|
| `@types/express` | `5.0.6` | development | `MIT` | package-lock.json |
|
|
@@ -273,9 +273,11 @@ export function chatgptForgePluginMentionBound(
|
|
|
273
273
|
prompt: string,
|
|
274
274
|
): boolean {
|
|
275
275
|
if (!composerHtml || !composerText) return false;
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
// Name and path must belong to ONE real app chip, never to different
|
|
277
|
+
// elements in the same composer HTML. A plain @forge is not an invocation.
|
|
278
|
+
const chips = [...composerHtml.matchAll(/<[^>]*\b(?:plugin|app)-mention-name="[^"]+"[^>]*>/g)].map((match) => match[0]);
|
|
279
|
+
if (chips.length !== 1 || !chips[0]!.includes(`app-mention-name="${CHATGPT_FORGE_PLUGIN_SLUG}"`)
|
|
280
|
+
|| !chips[0]!.includes(`app-mention-path="${CHATGPT_FORGE_PLUGIN_PATH}"`)) return false;
|
|
279
281
|
const normalized = normalizeChatgptOutboundText(composerText);
|
|
280
282
|
const payload = normalizeChatgptOutboundText(prompt);
|
|
281
283
|
return normalized === `${payload} ${CHATGPT_FORGE_PLUGIN_LABEL}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'crypto';
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_CHATGPT_AUTOMATION_MODEL = 'gpt-5.6';
|
|
4
|
-
export const DEFAULT_CHATGPT_AUTOMATION_REASONING = 'high';
|
|
4
|
+
export const DEFAULT_CHATGPT_AUTOMATION_REASONING: ChatgptAutomationReasoning = 'high';
|
|
5
5
|
export const DEFAULT_CHATGPT_AUTOMATION_TAB_POLICY = 'auto';
|
|
6
6
|
export const CHATGPT_AUTOMATION_SUBMISSION_OUTCOME_UNKNOWN = 'CHATGPT_AUTOMATION_SUBMISSION_OUTCOME_UNKNOWN';
|
|
7
7
|
export const CHATGPT_AUTOMATION_MESSAGE_DELIVERY_TIMED_OUT = 'CHATGPT_AUTOMATION_MESSAGE_DELIVERY_TIMED_OUT';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FORGE_INSTANCE_SCOPE_KEY } from '../../src/cli/repositories/controller-home';
|
|
2
2
|
import { withControllerLock } from '../../src/cli/repositories/locks';
|
|
3
|
-
import { readControlPlaneRecord, writeControlPlaneRecord } from '../../src/runtime/control-plane/persistence/sqlite-store';
|
|
3
|
+
import { listControlPlaneRecords, readControlPlaneRecord, writeControlPlaneRecord } from '../../src/runtime/control-plane/persistence/sqlite-store';
|
|
4
4
|
import { parseCanonicalChatgptConversationIdentity } from '../../packages/plugin-runtime/computer';
|
|
5
5
|
|
|
6
6
|
const NAMESPACE = 'chatgpt_work_conversation_binding';
|
|
@@ -110,6 +110,25 @@ export function getChatgptWorkConversationBinding(
|
|
|
110
110
|
return value ? canonicalizeBinding(options, value) : undefined;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Read-only inverse of the existing canonical Work conversation binding.
|
|
115
|
+
* Never infer an owner from objective prose or a partial/ambiguous inventory.
|
|
116
|
+
*/
|
|
117
|
+
export function listChatgptWorkBindingsForConversation(
|
|
118
|
+
options: ChatgptWorkBindingStoreOptions,
|
|
119
|
+
conversationId: string,
|
|
120
|
+
): ChatgptWorkConversationBinding[] {
|
|
121
|
+
const repoId = options.repoId?.trim();
|
|
122
|
+
if (!repoId || !conversationId.trim()) return [];
|
|
123
|
+
const limit = 5000;
|
|
124
|
+
const records = listControlPlaneRecords<ChatgptWorkConversationBinding>(options.controllerHome, {
|
|
125
|
+
namespace: NAMESPACE, scope: FORGE_INSTANCE_SCOPE_KEY, limit,
|
|
126
|
+
});
|
|
127
|
+
if (records.length >= limit) return []; // Incomplete inventory cannot establish a unique active Work.
|
|
128
|
+
return records.filter(({ value }) => value.repoId === repoId && value.conversationId === conversationId)
|
|
129
|
+
.map(({ value }) => canonicalizeBinding(options, value));
|
|
130
|
+
}
|
|
131
|
+
|
|
113
132
|
function writeBinding(
|
|
114
133
|
options: ChatgptWorkBindingStoreOptions,
|
|
115
134
|
binding: ChatgptWorkConversationBinding,
|