@moretea-labs/forge 1.6.0 → 1.7.1
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 +4 -0
- package/CHANGELOG.md +39 -0
- package/CLAUDE.md +4 -0
- package/README.md +2 -2
- package/README.zh-CN.md +1 -1
- package/SKILL.md +2 -2
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/agents/openai.yaml +1 -1
- package/assets/hooks/hook-input.sh +11 -8
- package/assets/hooks/lib/session-state.sh +10 -7
- package/assets/hooks/lib/workflow-state.sh +13 -177
- package/assets/hooks/post-tool-observer.sh +8 -2
- package/assets/hooks/prompt-guard.sh +5 -81
- package/assets/hooks/session-start-context.sh +56 -1
- package/assets/partials/05-workflow.partial.md +1 -1
- package/assets/partials-agents/02-operating-mode.partial.md +2 -0
- package/assets/partials-agents/03-orchestration.partial.md +1 -1
- package/assets/plugin-registry.v1.json +3 -3
- package/assets/reference-configs/document-generation.md +1 -1
- package/assets/reference-configs/harness-overview.md +1 -1
- package/assets/reference-configs/sprint-contracts.md +3 -3
- package/assets/skill-version.json +2 -2
- package/assets/templates/contract.template.md +2 -7
- package/assets/templates/helpers/capture-plan.sh +2 -2
- package/assets/templates/helpers/check-architecture-sync.sh +17 -0
- package/assets/templates/helpers/check-task-workflow.sh +4 -4
- package/assets/templates/helpers/contract-worktree.sh +1 -21
- package/assets/templates/helpers/ensure-task-workflow.sh +11 -36
- package/assets/templates/helpers/inspect-project-state.ts +8 -6
- package/assets/templates/helpers/migrate-project-template.sh +22 -45
- package/assets/templates/helpers/migrate-workflow-docs.ts +9 -7
- package/assets/templates/helpers/new-plan.sh +1 -1
- package/assets/templates/helpers/plan-to-todo.sh +12 -37
- package/assets/templates/helpers/ship-worktrees.sh +2 -29
- package/assets/templates/helpers/verify-contract.sh +1 -111
- package/assets/templates/helpers/verify-sprint.sh +3 -180
- package/assets/templates/helpers/workflow-contract.ts +5 -1
- package/assets/templates/plan.template.md +1 -1
- package/assets/templates/review.template.md +9 -34
- package/assets/workflow-contract.v1.json +10 -19
- package/docs/README.md +10 -10
- package/docs/architecture/CURRENT.md +178 -0
- package/docs/architecture/EVOLUTION.md +42 -0
- package/docs/architecture/current/README.md +4 -156
- package/docs/architecture/decisions/20260803-release-identity-binding-and-exit-policy.md +2 -2
- package/docs/architecture/decisions/20260823-immediate-controller-relay.md +53 -0
- package/docs/architecture/decisions/20260826-browser-runtime-v2.md +73 -0
- package/docs/architecture/history/README.md +7 -0
- package/docs/architecture/{chatgpt-handoff-facade.md → history/chatgpt-handoff-facade.md} +4 -0
- package/docs/architecture/{global-hook-runtime.md → history/global-hook-runtime.md} +7 -3
- package/docs/architecture/{ios-semantic-automation-provider-v2.md → history/ios-semantic-automation-provider-v2.md} +6 -2
- package/docs/architecture/history.md +3 -34
- package/docs/architecture/index.md +15 -98
- package/docs/architecture/modules/controller-runtime/transport-lifecycle.md +1 -1
- package/docs/architecture/reviews/2026-08-22-semantic-harness-convergence-acceptance.md +39 -0
- package/docs/architecture/versions/1.6.md +38 -0
- package/docs/architecture/versions/1.7.md +41 -0
- package/docs/forge-chatgpt-browser-engine.md +2 -2
- package/docs/forge-chatgpt-mcp-setup.md +4 -28
- package/docs/forge-chatgpt-supervised-automation.md +3 -3
- package/docs/forge-github-issue-launcher.md +1 -1
- package/docs/forge-plugin-management.md +1 -1
- package/docs/forge-runtime-self-healing-loop.md +1 -1
- package/docs/operations/controller-browser-plugin.md +26 -6
- package/docs/operations/controller-performance-and-502.md +143 -0
- package/docs/operations/controller-reliability-runbook.md +1 -1
- package/docs/operations/features.md +2 -2
- package/docs/operations/github-repository.md +1 -1
- package/docs/operations/homebrew.md +2 -2
- package/docs/operations/mcp-tool-exposure.md +5 -3
- package/docs/wiki/Architecture.md +6 -6
- package/docs/wiki/Implementation.md +2 -2
- package/docs/wiki/Integrations.md +2 -2
- package/docs/wiki/Work-Lifecycle.md +1 -1
- package/package.json +33 -11
- package/scripts/activate-source-baseline.ts +17 -13
- package/scripts/architecture-event.ts +2 -820
- package/scripts/architecture-queue.sh +2 -645
- package/scripts/archive-architecture-request.sh +2 -242
- package/scripts/archive-workflow.sh +1 -291
- package/scripts/benchmark-background-check-overlap.ts +228 -0
- package/scripts/benchmark-mcp-host.sh +117 -0
- package/scripts/benchmark-mcp-transport.ts +170 -0
- package/scripts/benchmark-quality-harness.ts +146 -0
- package/scripts/benchmark-route-session-concurrency.ts +207 -6
- package/scripts/benchmark-thin-harness-mcp-e2e.ts +7 -1
- package/scripts/benchmark-typescript-navigation.ts +186 -0
- package/scripts/benchmark-work-efficiency.ts +334 -0
- package/scripts/capability-config.ts +2 -392
- package/scripts/capability-resolver.ts +2 -503
- package/scripts/capture-plan.sh +1 -332
- package/scripts/check-agent-tooling.sh +2 -1558
- package/scripts/check-architecture-sync.sh +2 -371
- package/scripts/check-brain-manifest.sh +2 -253
- package/scripts/check-context-files.sh +2 -47
- package/scripts/check-deploy-sql-order.sh +2 -115
- package/scripts/check-mcp-compatibility.ts +14 -0
- package/scripts/check-runtime-architecture.mjs +349 -79
- package/scripts/check-skill-version.ts +3 -191
- package/scripts/check-source-duplication.mjs +61 -0
- package/scripts/check-stable-baseline.ts +92 -0
- package/scripts/check-task-sync.sh +2 -63
- package/scripts/check-task-workflow.sh +2 -1000
- package/scripts/codex-handoff-resume.sh +2 -267
- package/scripts/context-contract-sync.sh +2 -514
- package/scripts/contract-run.ts +2 -463
- package/scripts/contract-worktree.sh +1 -722
- package/scripts/ensure-task-workflow.sh +1 -1225
- package/scripts/host-temporary-cloud-mcp-e2e.sh +265 -0
- package/scripts/inspect-project-state.ts +4 -279
- package/scripts/install-standalone-recovery.ts +24 -0
- package/scripts/lib/project-init-lib.sh +22 -46
- package/scripts/lib/run-forge-helper.sh +19 -0
- package/scripts/lib/run-forge-helper.ts +26 -0
- package/scripts/migrate-project-template.sh +1 -1189
- package/scripts/migrate-workflow-docs.ts +4 -412
- package/scripts/new-plan.sh +1 -180
- package/scripts/new-spec.sh +1 -47
- package/scripts/new-sprint.sh +1 -46
- package/scripts/plan-to-todo.sh +1 -796
- package/scripts/prepare-codex-handoff.sh +2 -201
- package/scripts/prepare-handoff.sh +1 -78
- package/scripts/refresh-current-status.sh +2 -467
- package/scripts/run-governed-gate.ts +5 -1
- package/scripts/select-agent-context-blocks.sh +2 -64
- package/scripts/ship-worktrees.sh +1 -558
- package/scripts/smoke-ios-physical-device.ts +4 -2
- package/scripts/smoke-runtime-recovery.ts +1 -35
- package/scripts/smoke-schedule-engine.ts +1 -20
- package/scripts/sprint-backlog.sh +1 -834
- package/scripts/stage-runtime-release.ts +2 -1
- package/scripts/summarize-failures.sh +2 -123
- package/scripts/switch-plan.sh +1 -150
- package/scripts/sync-brain-docs.sh +2 -379
- package/scripts/sync-generated-authority.mjs +175 -0
- package/scripts/verify-contract.sh +2 -703
- package/scripts/verify-forge-runtime.sh +0 -1
- package/scripts/verify-sprint.sh +1 -677
- package/scripts/workflow-contract.ts +4 -205
- package/scripts/workstream-sync.sh +2 -261
- package/src/cli/agent-jobs/executor-health.ts +1 -1
- package/src/cli/commands/init-hook.ts +3 -3
- package/src/cli/commands/mcp.ts +9 -5
- package/src/cli/commands/plugin.ts +12 -3
- package/src/cli/commands/recovery.ts +25 -3
- package/src/cli/commands/runtime.ts +55 -3
- package/src/cli/commands/security.ts +12 -1
- package/src/cli/commands/setup-profile.ts +31 -21
- package/src/cli/controller/check-runner.ts +113 -5
- package/src/cli/controller/composite-result.ts +1 -1
- package/src/cli/controller/context/focus.ts +51 -0
- package/src/cli/controller/context/instruction-context.ts +114 -0
- package/src/cli/controller/context/known-paths.ts +76 -0
- package/src/cli/controller/context/query-planning.ts +110 -0
- package/src/cli/controller/context/rule-resolution.ts +532 -0
- package/src/cli/controller/context/source-materializer.ts +278 -0
- package/src/cli/controller/context/structural.ts +16 -0
- package/src/cli/controller/context/types.ts +286 -0
- package/src/cli/controller/context-pack.ts +828 -487
- package/src/cli/controller/launch-agents.ts +77 -2
- package/src/cli/controller/operational-plan.ts +2 -2
- package/src/cli/controller/work-mode.ts +6 -4
- package/src/cli/editing/edit-session.ts +60 -7
- package/src/cli/github/contracts.ts +16 -0
- package/src/cli/github/github.ts +135 -16
- package/src/cli/github/session.ts +2 -1
- package/src/cli/installer/managed-entries.ts +15 -1
- package/src/cli/local-bridge/console-automations.ts +54 -78
- package/src/cli/local-bridge/console-view-models.ts +1 -35
- package/src/cli/local-bridge/facade-api.ts +37 -264
- package/src/cli/local-bridge/frontend/src/App.tsx +3 -3
- package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +23 -13
- package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +37 -4
- package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +6 -4
- package/src/cli/local-bridge/frontend/src/lib/api.ts +1 -6
- package/src/cli/local-bridge/frontend/src/lib/routes.ts +1 -1
- package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +2 -2
- package/src/cli/local-bridge/frontend/src/styles.css +1 -1
- package/src/cli/local-bridge/frontend/src/types.ts +5 -8
- package/src/cli/local-bridge/job-store.ts +1 -490
- package/src/cli/local-bridge/server.ts +2 -515
- package/src/cli/local-bridge/ui-dist/app.css +1 -1
- package/src/cli/local-bridge/ui-dist/app.js +3703 -3757
- package/src/cli/mcp/auth.ts +5 -5
- package/src/cli/mcp/instructions.ts +3 -2
- package/src/cli/mcp/legacy-tool-service.ts +10 -222
- package/src/cli/mcp/multi-repository.ts +16 -5
- package/src/cli/mcp/oauth.ts +175 -26
- package/src/cli/mcp/post-finalize-work-attribution.ts +150 -0
- package/src/cli/mcp/repository-tools.ts +282 -146
- package/src/cli/mcp/server.ts +586 -116
- package/src/cli/mcp/tool-capability-cache.ts +1 -1
- package/src/cli/mcp/tool-contract.ts +14 -0
- package/src/cli/mcp/toolset-selection.ts +1 -1
- package/src/cli/mcp/toolset.ts +44 -7
- package/src/cli/mcp/transports/http.ts +124 -14
- package/src/cli/mcp/transports/session-registry.ts +43 -5
- package/src/cli/mcp/types.ts +3 -3
- package/src/cli/repositories/command-classifier.ts +103 -21
- package/src/cli/repositories/command-executor.ts +78 -526
- package/src/cli/repositories/command-process.ts +108 -0
- package/src/cli/repositories/command-scope.ts +99 -41
- package/src/cli/repositories/controller-home.ts +7 -8
- package/src/cli/repositories/git-command-executor.ts +2 -0
- package/src/cli/repositories/locks.ts +53 -16
- package/src/cli/repositories/repository-snapshot.ts +124 -0
- package/src/cli/repositories/selected-path-actions.ts +17 -9
- package/src/cli/repositories/structured-git.ts +118 -6
- package/src/cli/repository/inspector.ts +563 -65
- package/src/cli/repository/session-cache.ts +58 -17
- package/src/cli/v81-entry.ts +1 -4
- package/src/effects/fs-transaction.ts +85 -17
- package/src/runtime/context/codegraph-read-provider.ts +233 -2
- package/src/runtime/context/codegraph-sidecar.cjs +74 -40
- package/src/runtime/context/generic-lsp-provider.ts +355 -0
- package/src/runtime/context/lsp-client.ts +283 -0
- package/src/runtime/context/semantic-navigation-contract.ts +61 -0
- package/src/runtime/context/semantic-navigation.ts +223 -0
- package/src/runtime/context/swift-navigation.ts +565 -0
- package/src/runtime/context/typescript-navigation.ts +226 -0
- package/src/runtime/control-plane/dispatch-priority.ts +28 -0
- package/src/runtime/control-plane/execution/direct-edit-work-completion.ts +48 -16
- package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +86 -24
- package/src/runtime/control-plane/execution/repository-work-attribution.ts +106 -0
- package/src/runtime/control-plane/execution/retained-work-resume.ts +203 -0
- package/src/runtime/control-plane/execution/session-store.ts +18 -0
- package/src/runtime/control-plane/execution/verification-evidence.ts +58 -3
- package/src/runtime/control-plane/execution/work-completion-authority.ts +58 -0
- package/src/runtime/control-plane/execution/work-evidence-policy.ts +200 -0
- package/src/runtime/control-plane/execution/work-execution-support.ts +386 -0
- package/src/runtime/control-plane/execution/work-finalization-service.ts +1913 -0
- package/src/runtime/control-plane/execution/work-handle-authority.ts +96 -0
- package/src/runtime/control-plane/execution/work-handle-store.ts +27 -2
- package/src/runtime/control-plane/execution/work-lifecycle-audit.ts +258 -0
- package/src/runtime/control-plane/execution/work-operation-service.ts +468 -0
- package/src/runtime/control-plane/execution/work-path-scope.ts +37 -0
- package/src/runtime/control-plane/execution/work-preparation-service.ts +479 -0
- package/src/runtime/control-plane/execution/work-process-evidence.ts +129 -0
- package/src/runtime/control-plane/execution/work-remote-delivery.ts +215 -0
- package/src/runtime/control-plane/execution/work-task-receipt.ts +22 -18
- package/src/runtime/control-plane/execution/work-terminal-cleanup.ts +156 -11
- package/src/runtime/control-plane/execution/work-validation-reconciler.ts +22 -14
- package/src/runtime/control-plane/execution/work-verification-context.ts +56 -0
- package/src/runtime/control-plane/execution/work-verification-service.ts +388 -0
- package/src/runtime/control-plane/execution/work-verification-snapshot.ts +90 -9
- package/src/runtime/control-plane/facade/capability-registry.ts +129 -25
- package/src/runtime/control-plane/facade/controller-round-relay.ts +1118 -0
- package/src/runtime/control-plane/facade/controller-session-store.ts +302 -12
- package/src/runtime/control-plane/facade/goal-workloop-access.ts +17 -1
- package/src/runtime/control-plane/facade/goal-workloop.ts +928 -190
- package/src/runtime/control-plane/facade/index.ts +3 -0
- package/src/runtime/control-plane/facade/plan-contract-store.ts +275 -42
- package/src/runtime/control-plane/facade/repository-work-admission.ts +147 -0
- package/src/runtime/control-plane/facade/requirement-authority.ts +83 -0
- package/src/runtime/control-plane/facade/semantic-admission.ts +205 -0
- package/src/runtime/control-plane/facade/suggested-actions.ts +5 -1
- package/src/runtime/control-plane/facade/types.ts +90 -10
- package/src/runtime/control-plane/facade/work-contract-store.ts +157 -261
- package/src/runtime/control-plane/facade/work-state-machine.ts +250 -0
- package/src/runtime/control-plane/generated-cache-retention.ts +271 -0
- package/src/runtime/control-plane/global-scheduler/config.ts +44 -0
- package/src/runtime/control-plane/global-scheduler/dispatch-capacity.ts +80 -0
- package/src/runtime/control-plane/global-scheduler/durable-admission.ts +46 -0
- package/src/runtime/control-plane/global-scheduler/maintenance.ts +152 -0
- package/src/runtime/control-plane/global-scheduler/projection-refresh.ts +84 -0
- package/src/runtime/control-plane/global-scheduler/reconciliation.ts +3 -3
- package/src/runtime/control-plane/global-scheduler/scheduler.ts +278 -543
- package/src/runtime/control-plane/global-scheduler/source-scan.ts +59 -0
- package/src/runtime/control-plane/global-scheduler/state.ts +88 -0
- package/src/runtime/control-plane/global-scheduler/worker-attachment.ts +57 -0
- package/src/runtime/control-plane/global-scheduler/worker-exit-decision.ts +38 -0
- package/src/runtime/control-plane/global-scheduler/worker-exit-reconciler.ts +175 -0
- package/src/runtime/control-plane/global-scheduler/worker-launch.ts +111 -0
- package/src/runtime/control-plane/global-scheduler/worker-lifecycle-store.ts +64 -0
- package/src/runtime/control-plane/global-scheduler/worker-lifecycle.ts +150 -0
- package/src/runtime/control-plane/global-scheduler/worker-process.ts +119 -0
- package/src/runtime/control-plane/global-scheduler/worker-stderr.ts +60 -0
- package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +63 -0
- package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +365 -117
- package/src/runtime/control-plane/launcher/launch-reservation-store.ts +89 -0
- package/src/runtime/control-plane/launcher/thin-launcher.ts +244 -11
- package/src/runtime/control-plane/persistence/controller-home-migration.ts +487 -0
- package/src/runtime/control-plane/persistence/requirement-store.ts +0 -12
- package/src/runtime/control-plane/persistence/sqlite-store.ts +33 -2
- package/src/runtime/control-plane/release-retention.ts +62 -2
- package/src/runtime/control-plane/repo-actor/registry.ts +4 -2
- package/src/runtime/control-plane/routing/route-policy.ts +24 -21
- package/src/runtime/control-plane/routing/workspace-admission.ts +70 -0
- package/src/runtime/control-plane/runtime-status-client.ts +0 -2
- package/src/runtime/diagnostics/mcp-timing.ts +13 -0
- package/src/runtime/diagnostics/mcp-transport-benchmark.ts +129 -0
- package/src/runtime/diagnostics/performance.ts +24 -1
- package/src/runtime/evidence/event-ledger.ts +1 -1
- package/src/runtime/evidence/process-check-execution.ts +18 -0
- package/src/runtime/execution/jobs/child-reference.ts +6 -2
- package/src/runtime/execution/jobs/store.ts +58 -4
- package/src/runtime/execution/jobs/types.ts +1 -1
- package/src/runtime/execution/managed-workspace.ts +203 -1
- package/src/runtime/execution/process-runtime/check-facade.ts +51 -4
- package/src/runtime/execution/process-runtime/check-result.ts +88 -0
- package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +7 -1
- package/src/runtime/execution/process-runtime/check-scheduling.ts +114 -0
- package/src/runtime/execution/process-runtime/command-facade.ts +367 -40
- package/src/runtime/execution/process-runtime/gc.ts +38 -6
- package/src/runtime/execution/process-runtime/lightweight-managed.ts +1201 -0
- package/src/runtime/execution/process-runtime/persisted-check.ts +51 -5
- package/src/runtime/execution/process-runtime/resource-claims.ts +10 -6
- package/src/runtime/execution/process-runtime/runtime.ts +53 -3
- package/src/runtime/execution/process-runtime/store.ts +1 -0
- package/src/runtime/execution/process-runtime/types.ts +4 -12
- package/src/runtime/execution/thin-harness/async-process.ts +12 -2
- package/src/runtime/execution/thin-harness/search-worker.ts +54 -5
- package/src/runtime/execution/work-activity.ts +21 -0
- package/src/runtime/execution/workers/executor.ts +18 -61
- package/src/runtime/gateway/mcp/execution-tools.ts +35 -1852
- package/src/runtime/gateway/mcp/legacy-ios-tool-adapter.ts +61 -0
- package/src/runtime/gateway/mcp/process-tools.ts +83 -37
- package/src/runtime/gateway/mcp/router.ts +186 -84
- package/src/runtime/gateway/mcp/runtime-tool-definitions.ts +565 -0
- package/src/runtime/gateway/mcp/runtime-tools.ts +2378 -1947
- package/src/runtime/plugins/app-store-connect-adapter.ts +216 -47
- package/src/runtime/plugins/browser-adapter.ts +2662 -829
- package/src/runtime/plugins/browser-automation-service.ts +10 -0
- package/src/runtime/plugins/browser-handoff-host.ts +2 -25
- package/src/runtime/plugins/browser-handoff.ts +110 -5
- package/src/runtime/plugins/browser-macos-bridge.ts +701 -63
- package/src/runtime/plugins/browser-manifest-surface.ts +603 -0
- package/src/runtime/plugins/browser-native-session-service.ts +222 -0
- package/src/runtime/plugins/browser-node-bridge.ts +6 -34
- package/src/runtime/plugins/browser-provider-registry.ts +109 -0
- package/src/runtime/plugins/browser-runtime-contract.ts +154 -0
- package/src/runtime/plugins/browser-runtime.ts +193 -0
- package/src/runtime/plugins/browser-session-authority.ts +332 -0
- package/src/runtime/plugins/browser-session-store.ts +121 -0
- package/src/runtime/plugins/browser-session-types.ts +98 -0
- package/src/runtime/plugins/capability-authorization-grants.ts +354 -0
- package/src/runtime/plugins/desktop-operator-registration.ts +10 -4
- package/src/runtime/plugins/external-adapter.ts +358 -3
- package/src/runtime/plugins/external-unix-socket.ts +7 -1
- package/src/runtime/plugins/first-party-registry.ts +2 -0
- package/src/runtime/plugins/github-adapter.ts +125 -0
- package/src/runtime/plugins/ios/agent-device-provider.ts +1 -1
- package/src/runtime/plugins/ios/agent-device-typed-provider.ts +52 -9
- package/src/runtime/plugins/ios/remote-xpc-hid.ts +1171 -0
- package/src/runtime/plugins/ios-adapter.ts +106 -16
- package/src/runtime/plugins/ios-agent-device.ts +234 -64
- package/src/runtime/plugins/ios-physical-device.ts +1143 -392
- package/src/runtime/plugins/lightweight-action.ts +153 -0
- package/src/runtime/plugins/local-system-adapter.ts +123 -6
- package/src/runtime/plugins/macos-capability-broker.ts +47 -9
- package/src/runtime/plugins/plugin-action-sidecar.ts +59 -0
- package/src/runtime/plugins/plugin-management-adapter.ts +49 -8
- package/src/runtime/plugins/resend-adapter.ts +1 -1
- package/src/runtime/plugins/store.ts +330 -33
- package/src/runtime/plugins/types.ts +38 -3
- package/src/runtime/plugins/xiaohongshu-publish.ts +515 -0
- package/src/runtime/projections/git-status-sampler.ts +16 -16
- package/src/runtime/projections/materialized-view.ts +28 -10
- package/src/runtime/recovery/maintenance-executor.ts +426 -25
- package/src/runtime/root/mcp-transport.ts +180 -10
- package/src/runtime/root/package-connector-service.ts +230 -10
- package/src/runtime/root/package-runtime-release.ts +143 -17
- package/src/runtime/root/package-runtime-service.ts +461 -22
- package/src/runtime/root/release-manifest.ts +144 -18
- package/src/runtime/root/release-materialize.ts +125 -32
- package/src/runtime/root/release-store.ts +48 -11
- package/src/runtime/root/runtime.ts +23 -5
- package/src/runtime/root/service.ts +100 -29
- package/src/runtime/root/types.ts +12 -0
- package/src/runtime/safe-tooling/ios-development.ts +321 -63
- package/src/runtime/shared/trusted-executable.ts +62 -0
- package/src/runtime/shared/trusted-node-executable.ts +48 -0
- package/src/runtime/standalone-recovery/core.ts +1079 -240
- package/src/runtime/standalone-recovery/entry.ts +100 -24
- package/src/runtime/standalone-recovery/installer.ts +20 -4
- package/src/runtime/standalone-recovery/service-labels.ts +2 -0
- package/src/runtime/standalone-recovery/watchdog-heartbeat.ts +160 -0
- package/src/runtime/workflow/schedules/browser-probe.ts +81 -3
- package/src/runtime/workflow/schedules/engine.ts +364 -202
- package/src/runtime/workflow/schedules/github-issue-watch.ts +158 -0
- package/src/runtime/workflow/schedules/settlement.ts +64 -17
- package/src/runtime/workflow/schedules/store.ts +209 -19
- package/src/runtime/workflow/schedules/types.ts +2 -4
- package/src/runtime/workflow/schedules/work-continuation.ts +26 -13
- package/src/testing/test-governance.ts +8 -40
- package/assets/reference-configs/heartbeat-triage.md +0 -57
- package/assets/templates/helpers/harness-trace-grade.sh +0 -150
- package/assets/templates/helpers/heartbeat-triage.sh +0 -361
- package/assets/templates/helpers/maintenance-triage.sh +0 -167
- package/docs/architecture/current/approved-target-architecture.zh-CN.md +0 -1501
- package/docs/architecture/current/architecture-invariants.md +0 -331
- package/docs/architecture/current/automation-and-schedule-engine.md +0 -459
- package/docs/architecture/current/codegraph-context-provider.md +0 -238
- package/docs/architecture/current/control-plane-authority-inventory.md +0 -94
- package/docs/architecture/current/controller-repository-decoupling.md +0 -148
- package/docs/architecture/current/dispatch-and-agent-strategy.md +0 -373
- package/docs/architecture/current/entity-model.md +0 -612
- package/docs/architecture/current/external-plugin-governance.md +0 -396
- package/docs/architecture/current/failure-recovery.md +0 -447
- package/docs/architecture/current/governance.md +0 -213
- package/docs/architecture/current/human-interaction-plane.md +0 -87
- package/docs/architecture/current/implementation-status.md +0 -128
- package/docs/architecture/current/job-and-run-lifecycle.md +0 -413
- package/docs/architecture/current/legacy-governance.md +0 -58
- package/docs/architecture/current/local-workspace-target-grants.md +0 -70
- package/docs/architecture/current/migration-roadmap.md +0 -105
- package/docs/architecture/current/multi-repository-execution.md +0 -371
- package/docs/architecture/current/operations-runbook.md +0 -45
- package/docs/architecture/current/peer-supercontroller-runtime.md +0 -32
- package/docs/architecture/current/personal-assistant-plugin-baseline.md +0 -206
- package/docs/architecture/current/repository-access-modes.md +0 -102
- package/docs/architecture/current/route-policy.md +0 -15
- package/docs/architecture/current/route-session-concurrency.md +0 -85
- package/docs/architecture/current/runtime-architecture-simplification.md +0 -214
- package/docs/architecture/current/runtime-directory-map.md +0 -49
- package/docs/architecture/current/runtime-health-and-resource-lifecycle.md +0 -85
- package/docs/architecture/current/scheduler-and-resource-claims.md +0 -422
- package/docs/architecture/current/session-aware-execution-and-authorization.md +0 -77
- package/docs/architecture/current/system-overview.md +0 -169
- package/docs/architecture/current/target-requirements-traceability.md +0 -202
- package/docs/architecture/current/thin-harness-governance-policy.md +0 -32
- package/docs/architecture/current/thin-harness-v1.md +0 -321
- package/docs/architecture/current/verification-and-release-gates.md +0 -391
- package/docs/forge-autonomous-goal-loop.md +0 -9
- package/docs/forge-provider-configuration.md +0 -7
- package/docs/operations/chatgpt-personal-assistant-runtime.md +0 -93
- package/docs/operations/gmail-assistant-routines.md +0 -186
- package/docs/operations/personal-assistant-operator-guide.md +0 -61
- package/docs/operations/provider-configuration.md +0 -31
- package/scripts/harness-trace-grade.sh +0 -150
- package/scripts/heartbeat-triage.sh +0 -361
- package/scripts/maintenance-triage.sh +0 -167
- package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +0 -2
- package/src/cli/repositories/goal-registry.ts +0 -239
- package/src/runtime/assistant/action-proposals.ts +0 -279
- package/src/runtime/assistant/intent.ts +0 -395
- package/src/runtime/assistant/model-provider.ts +0 -460
- package/src/runtime/assistant/openapi.ts +0 -223
- package/src/runtime/assistant/policy.ts +0 -89
- package/src/runtime/assistant/readiness.ts +0 -258
- package/src/runtime/assistant/routine-runtime.ts +0 -477
- package/src/runtime/assistant/schedule-binding.ts +0 -171
- package/src/runtime/assistant/standing-grants.ts +0 -375
- package/src/runtime/assistant/store.ts +0 -243
- package/src/runtime/assistant/types.ts +0 -135
- package/src/runtime/control-plane/goal-loop/config-facade.ts +0 -700
- package/src/runtime/control-plane/goal-loop/config-store.ts +0 -570
- package/src/runtime/control-plane/goal-loop/config-types.ts +0 -213
- package/src/runtime/control-plane/goal-loop/executor-router.ts +0 -109
- package/src/runtime/control-plane/goal-loop/failure-taxonomy.ts +0 -149
- package/src/runtime/control-plane/goal-loop/goal-contract-store.ts +0 -304
- package/src/runtime/control-plane/goal-loop/goal-loop-engine.ts +0 -1001
- package/src/runtime/control-plane/goal-loop/handoff-packet.ts +0 -160
- package/src/runtime/control-plane/goal-loop/index.ts +0 -13
- package/src/runtime/control-plane/goal-loop/local-tools.ts +0 -290
- package/src/runtime/control-plane/goal-loop/policy-gates.ts +0 -203
- package/src/runtime/control-plane/goal-loop/provider-dispatch.ts +0 -93
- package/src/runtime/control-plane/goal-loop/provider-registry.ts +0 -545
- package/src/runtime/control-plane/goal-loop/types.ts +0 -378
- package/src/runtime/control-plane/startup-recovery.ts +0 -198
- package/src/runtime/gateway/mcp/resource-policy.ts +0 -186
- package/src/runtime/personal-assistant/gmail-triage-manager.ts +0 -231
- package/src/runtime/personal-assistant/reporting-runtime.ts +0 -344
- package/src/runtime/personal-assistant/triage-runtime.ts +0 -748
- package/src/runtime/workflow/findings/store.ts +0 -204
- package/src/runtime/workflow/findings/types.ts +0 -58
- package/src/runtime/workflow/portfolio/engine.ts +0 -20
- package/src/runtime/workflow/portfolio/store.ts +0 -185
- package/src/runtime/workflow/portfolio/types.ts +0 -29
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Architecture History Archive
|
|
2
|
+
|
|
3
|
+
Status: **Historical Evidence — Not Runtime Authority**
|
|
4
|
+
|
|
5
|
+
The current Forge architecture contract is [`../CURRENT.md`](../CURRENT.md). Files in this directory preserve superseded design rationale or timestamped operational evidence and may intentionally contain old product names, machine-specific paths, historical phase/status labels, or assumptions that no longer hold.
|
|
6
|
+
|
|
7
|
+
Do not update an archived page to make it look current. Fold any still-valid invariant into `CURRENT.md`, keep accepted rationale in an ADR when appropriate, and leave execution state in durable Plan/Work/evidence records.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# ChatGPT Handoff Inbox and MCP Facade Architecture
|
|
2
2
|
|
|
3
|
+
Status: **Historical Design Rationale — Not Runtime Authority**
|
|
4
|
+
|
|
5
|
+
Archived after the implemented Controller facade, Handoff Inbox, capability-registry, and policy-boundary invariants were folded into [`../CURRENT.md`](../CURRENT.md). The staged implementation sequence below records the original design path; it is not a list of unfinished current work.
|
|
6
|
+
|
|
3
7
|
## Purpose
|
|
4
8
|
|
|
5
9
|
This design keeps ChatGPT as the strong interactive controller while making Forge a safer, smaller, and more useful repository control plane.
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# Global Hook Runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Status: **Historical Evidence — Not Runtime Authority**
|
|
4
|
+
|
|
5
|
+
Archived after the still-current host-hook ownership invariants were folded into [`../CURRENT.md`](../CURRENT.md). The snapshot below preserves 2026-05-28 operational evidence only; its phase labels, personal-machine paths, host-version observations, and unfinished manual probes are not current Forge requirements.
|
|
6
|
+
|
|
7
|
+
> **Historical snapshot status**: Phase 0 — Operational Smoke (data filled 2026-05-28; manual-only items still pending)
|
|
4
8
|
> **Plan**: `plans/plan-20260528-1436-hook-global-runtime.md`
|
|
5
9
|
> **Contract**: `tasks/contracts/hook-global-runtime.contract.md`
|
|
6
10
|
> **Notes**: `tasks/notes/hook-global-runtime.notes.md`
|
|
7
11
|
> **Canary**: `scripts/canary-global-hook.sh`
|
|
8
12
|
> **Generated**: 2026-05-28, operator: ancienttwo (canary log 711 lines, time window 15:23–17:04 +08:00; includes post-Codex-restart trust observations at 17:03)
|
|
9
|
-
> **Repo set used for canary**: `/Users
|
|
13
|
+
> **Repo set used for canary**: `/Users/<user>/Projects/forge` (opt-in, this repo), `/Users/<user>/Astrozi` (opt-in). **Gap**: no non-opt-in repo yet — pending manual run to confirm dual-fire vs single-fire branching.
|
|
10
14
|
|
|
11
15
|
## Purpose
|
|
12
16
|
|
|
@@ -87,7 +91,7 @@ Partially observed from canary install; manual UX-only items remain.
|
|
|
87
91
|
**Confirmed (data-driven):**
|
|
88
92
|
|
|
89
93
|
- ✅ `[hooks.state]` key format: `<absolute-path>:<event-snake-case>:<i>:<j>` where `i` indexes the per-event hooks array and `j` indexes the nested `hooks[].hooks[]` array. Same format applies to user-level and project-level paths (compare `~/.codex/hooks.json:...` entries to existing project-level entries in the same `config.toml`).
|
|
90
|
-
- ✅ User-level hash registration works: **16 entries** under `[hooks.state."/Users
|
|
94
|
+
- ✅ User-level hash registration works: **16 entries** under `[hooks.state."/Users/<user>/.codex/hooks.json:..."]` after canary install + Codex restart + user trust acceptance (was 11 pre-canary, +5 for new canary entries).
|
|
91
95
|
- ✅ Once trust is registered, fires happen silently (522+ codex fires without UX interruption in the canary window; post-restart fires at 17:03:44 Astrozi also silent).
|
|
92
96
|
- ✅ **Per-new-entry trust prompt**: Codex restart after canary install showed 5 distinct trust prompts (one per new `(command, key)` combination); the 11 preexisting shim hashes silently passed without re-prompt. User reported manual acceptance: "已重启授权 5 个新 HOOK" (2026-05-28T17:03).
|
|
93
97
|
- ✅ **Hash sensitivity to (command, key) tuple confirmed**: appending new entries to existing event arrays produced new `i` indices (`pre_tool_use:1:0`, `post_tool_use:4:0`, `session_start:1:0`, `user_prompt_submit:1:0`, `stop:1:0`), each triggering its own prompt. Implication: any change to either the command string or the array position will re-trust-prompt.
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# iOS Semantic Automation Provider v2
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
3
|
+
Status: **Historical Design Evidence — Not Runtime Authority**
|
|
4
|
+
|
|
5
|
+
Archived after the still-current physical-device ownership, capability-negotiation, failure-disposition, and evidence invariants were folded into [`../CURRENT.md`](../CURRENT.md) from current source. The original implementation-stage terminology and legacy product identity below are retained only as historical rationale.
|
|
6
|
+
|
|
7
|
+
Historical snapshot status: implementation in progress
|
|
8
|
+
Historical issue: `ISS-20260720-66E25D` / `T5`
|
|
5
9
|
|
|
6
10
|
## Why this redesign exists
|
|
7
11
|
|
|
@@ -1,38 +1,7 @@
|
|
|
1
|
-
# Architecture
|
|
1
|
+
# Architecture History
|
|
2
2
|
|
|
3
3
|
> **Historical Design — Not Runtime Authority**
|
|
4
|
-
>
|
|
5
|
-
> Current architecture: [`docs/architecture/current/README.md`](current/README.md).
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
The maintained architecture evolution log is [`EVOLUTION.md`](EVOLUTION.md), and the current contract is [`CURRENT.md`](CURRENT.md).
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
V5 separated durable Issue and Task intent from individual Run attempts. It introduced explicit run failure semantics, evidence-gated progress, direct local execution, governance diagnostics, and terminal Issue archiving. The lasting rule is that a failed attempt must not silently cancel the underlying task and that completion must be supported by durable evidence.
|
|
12
|
-
|
|
13
|
-
## V6 — Direct change first
|
|
14
|
-
|
|
15
|
-
V6 made bounded Direct Edit the default for known, low-to-medium-risk changes. It added stale-write guards, explicit allowed paths, atomic patch operations, persisted diffs, targeted checks, rollback, and finalization. The lasting rule is that a small change should not require an agent worktree when a transactional edit can prove exactly what changed.
|
|
16
|
-
|
|
17
|
-
## V7 — Execution first and task-local policy
|
|
18
|
-
|
|
19
|
-
V7 classified execution by task scope and risk, selected workspace or worktree isolation deliberately, and tightened task-local verification and lifecycle handling. The lasting rule is that execution mode is chosen from current task evidence rather than from a global one-size-fits-all workflow.
|
|
20
|
-
|
|
21
|
-
## V8 — ChatGPT facade and visual controller
|
|
22
|
-
|
|
23
|
-
V8 established the compact ChatGPT-facing facade, Direct Edit as the common path, optional agent execution, recovery projections, and a visual Local Controller. Later revisions moved heavy reads off the Gateway hot path, bounded default responses, and retained atomic typed tools behind the facade.
|
|
24
|
-
|
|
25
|
-
## Legacy ChatGPT Controller and Local Bridge
|
|
26
|
-
|
|
27
|
-
The earlier Controller and Local Bridge documents described recovery projections, compact MCP capabilities, Local Job tickets, visual review, diagnostics, and optional Codex or Claude sessions. Their current contracts now live in executable code, `docs/architecture/current/`, and `docs/operations/`; these older documents are no longer separate product surfaces.
|
|
28
|
-
|
|
29
|
-
## Verification records
|
|
30
|
-
|
|
31
|
-
V5, V6, and V8 verification files were snapshots of checks performed against specific historical revisions and environments. They are not current release evidence. Current verification is produced by repository checks, durable Evidence records, and exact-revision test output.
|
|
32
|
-
|
|
33
|
-
## Preservation policy
|
|
34
|
-
|
|
35
|
-
- Current architecture belongs only in `docs/architecture/current/`.
|
|
36
|
-
- Important superseded decisions are summarized here instead of keeping many competing design documents.
|
|
37
|
-
- Detailed removed documents remain available in Git history.
|
|
38
|
-
- Historical text never overrides executable behavior, persisted schemas, accepted ADRs, or the current architecture set.
|
|
7
|
+
Older V4–V8, Supervisor, Local Bridge, Issue/Task/Job, recovery, routing and migration documents remain available through Git history. They are intentionally not maintained as parallel architecture surfaces.
|
|
@@ -1,100 +1,20 @@
|
|
|
1
1
|
# Architecture Index
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Architecture request index and compatibility entry point. **Runtime Authority:** [`CURRENT.md`](CURRENT.md).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The canonical documentation model is intentionally small:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- [`CURRENT.md`](CURRENT.md) — sole maintained current architecture authority.
|
|
8
|
+
- [`../ROADMAP.md`](../ROADMAP.md) — current and next architecture/product priorities.
|
|
9
|
+
- [`EVOLUTION.md`](EVOLUTION.md) — append-only historical architecture change log.
|
|
10
|
+
- [`versions/`](versions/) — per-version architecture snapshots.
|
|
11
|
+
- [`history/`](history/) and [`history.md`](history.md) — archived historical evidence, never runtime authority.
|
|
12
|
+
- [`../../CHANGELOG.md`](../../CHANGELOG.md) — release history.
|
|
13
|
+
- `decisions/` — accepted ADR rationale; accepted invariants are folded into `CURRENT.md` when they become ordinary current architecture.
|
|
14
|
+
- `requests/` — pending architecture drift/change requests only.
|
|
15
|
+
- `researches/`, plans and Work records — evidence, not architecture authority.
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [Current architecture map and reading order](current/README.md)
|
|
12
|
-
- [Architecture governance contract](current/governance.md)
|
|
13
|
-
|
|
14
|
-
When current implementation, the consolidated architecture history, a research note, and a document under `current/` disagree, the following precedence applies:
|
|
15
|
-
|
|
16
|
-
1. executable code and persisted schemas describe **Current Implementation** facts;
|
|
17
|
-
2. `docs/architecture/current/` defines the approved **Target Architecture** and mandatory **Migration Rules**;
|
|
18
|
-
3. accepted ADRs may amend the target architecture until their conclusions are merged into `current/`;
|
|
19
|
-
4. the consolidated history, snapshots, plans, research reports, and diagrams are historical or exploratory evidence only.
|
|
20
|
-
|
|
21
|
-
A target rule is not evidence that the implementation already satisfies it. Every current architecture document must distinguish:
|
|
22
|
-
|
|
23
|
-
- **Current Implementation** — behavior verified in code, tests, or persisted schemas;
|
|
24
|
-
- **Target Architecture** — the approved end state that future work must converge toward;
|
|
25
|
-
- **Migration Rule** — constraints that apply while moving from the current implementation to the target.
|
|
26
|
-
|
|
27
|
-
## Current Controller Runtime Scope
|
|
28
|
-
|
|
29
|
-
Forge is a repository engineering control plane. It includes:
|
|
30
|
-
|
|
31
|
-
- MCP and local UI entry points;
|
|
32
|
-
- a multi-repository registry and per-repository runtime storage;
|
|
33
|
-
- Issue, Task, Job, Run, Direct Edit, Verification, and evidence lifecycles;
|
|
34
|
-
- optional Codex, Claude, and GitHub Copilot execution;
|
|
35
|
-
- workspace and worktree isolation, integration, checks, recovery, and governance;
|
|
36
|
-
- future schedule-driven bounded occurrences and cross-repository orchestration.
|
|
37
|
-
|
|
38
|
-
It is not the product runtime of the repositories it manages. It must not replace repository-owned build, test, deployment, or release systems as the final authority.
|
|
39
|
-
|
|
40
|
-
## Architecture Document Classes
|
|
41
|
-
|
|
42
|
-
| Class | Location | Authority |
|
|
43
|
-
| --- | --- | --- |
|
|
44
|
-
| Current architecture | `docs/architecture/current/` | Runtime Authority |
|
|
45
|
-
| Architecture decisions | `docs/architecture/decisions/` | Binding until merged or superseded |
|
|
46
|
-
| Pending drift requests | `docs/architecture/requests/` | Proposed change only |
|
|
47
|
-
| Architecture snapshots | `docs/architecture/snapshots/` | Historical evidence |
|
|
48
|
-
| Consolidated architecture history | `docs/architecture/history.md` | Historical Design / Not Runtime Authority |
|
|
49
|
-
| Research reports | `docs/researches/` | Hypothesis and supporting evidence |
|
|
50
|
-
| Plans and task records | `plans/`, `tasks/` | Execution intent and progress, not architecture authority |
|
|
51
|
-
| Diagrams | `docs/architecture/diagrams/` | Explanatory projection; semantic Markdown source wins |
|
|
52
|
-
|
|
53
|
-
## Current Architecture Set
|
|
54
|
-
|
|
55
|
-
The maintained current architecture set contains:
|
|
56
|
-
|
|
57
|
-
- `README.md` — map, status labels, and reading order;
|
|
58
|
-
- `governance.md` — authority, ownership, ADR, and drift rules;
|
|
59
|
-
- `system-overview.md` — system boundary and process topology;
|
|
60
|
-
- `personal-assistant-plugin-baseline.md` — concrete assistant/plugin/provider boundary, threat model, capability matrix, and migration baseline;
|
|
61
|
-
- `architecture-invariants.md` — rules implementations must not violate;
|
|
62
|
-
- `entity-model.md` — Issue, Task, Job, Run, Edit Session, Verification, Schedule, Occurrence, Claim, and Lease semantics;
|
|
63
|
-
- `job-and-run-lifecycle.md` — durable execution and retry state machines;
|
|
64
|
-
- `dispatch-and-agent-strategy.md` — Direct Edit, Quick Agent, durable Task, and role selection;
|
|
65
|
-
- `scheduler-and-resource-claims.md` — repository actors, resource claims, leases, and conflict behavior;
|
|
66
|
-
- `multi-repository-execution.md` — quotas, fairness, failure isolation, and portfolio workflows;
|
|
67
|
-
- `automation-and-schedule-engine.md` — bounded occurrences, budgets, backoff, deduplication, and stop conditions;
|
|
68
|
-
- `failure-recovery.md` — process boundaries, orphan handling, reconciliation, and fencing;
|
|
69
|
-
- `verification-and-release-gates.md` — exact-revision evidence, integration gates, release freeze, and human authorization;
|
|
70
|
-
- `implementation-status.md` — verified implementation coverage and explicit migration gaps;
|
|
71
|
-
- `migration-roadmap.md` — evidence-driven implementation convergence order;
|
|
72
|
-
- `runtime-architecture-simplification.md` — single-owner services, canonical authority/config, immutable activation, Recovery boundary, invariants, and deletion map;
|
|
73
|
-
- ADR [`decisions/20260803-release-identity-binding-and-exit-policy.md`](decisions/20260803-release-identity-binding-and-exit-policy.md) — captured release identity binding for managed children and Supervisor vs launchd failure domains.
|
|
74
|
-
|
|
75
|
-
A missing or proposed rule must be recorded in an accepted architecture request or ADR and must not be inferred from historical material.
|
|
76
|
-
|
|
77
|
-
## Architecture Change Flow
|
|
78
|
-
|
|
79
|
-
1. Identify whether the proposed change alters a boundary, entity semantic, lifecycle, resource rule, safety invariant, or public execution contract.
|
|
80
|
-
2. Record the change as an architecture request or ADR before implementation when the answer is yes.
|
|
81
|
-
3. Update the affected `current/` documents in the same change or explicitly record the temporary drift and its owner.
|
|
82
|
-
4. Update tests and architecture checks that enforce the changed rule.
|
|
83
|
-
5. Consolidate useful superseded decisions in `history.md`, then remove duplicate detailed documents from the current tree while preserving them in Git history.
|
|
84
|
-
6. Close the request only after the current architecture and executable behavior no longer contradict each other, or the difference is explicitly labeled as a migration gap.
|
|
85
|
-
|
|
86
|
-
See [Architecture governance contract](current/governance.md) for the full rule.
|
|
87
|
-
|
|
88
|
-
## Existing Domain Documentation
|
|
89
|
-
|
|
90
|
-
The following domain pages describe the earlier repo-local workflow-harness architecture. They remain useful implementation history but are not the current Controller Runtime authority:
|
|
91
|
-
|
|
92
|
-
- [Public Surface](domains/public-surface.md)
|
|
93
|
-
- [Workflow Engine](domains/workflow-engine.md)
|
|
94
|
-
- [Runtime Harness](domains/runtime-harness.md)
|
|
95
|
-
- [Verification](domains/verification.md)
|
|
96
|
-
- [Transactional Adoption Planner](transactional-adoption-planner.md)
|
|
97
|
-
- [Global Hook Runtime](global-hook-runtime.md)
|
|
17
|
+
Executable code and persisted schemas are authoritative for implementation facts. `CURRENT.md` defines the architecture contract; a version snapshot or historical note never overrides it.
|
|
98
18
|
|
|
99
19
|
## Pending Architecture Requests
|
|
100
20
|
|
|
@@ -104,11 +24,8 @@ The following domain pages describe the earlier repo-local workflow-harness arch
|
|
|
104
24
|
|
|
105
25
|
## Accepted Architecture Decisions
|
|
106
26
|
|
|
107
|
-
|
|
108
|
-
- [MCP Session Lifecycle and Stable Ingress Isolation](decisions/20260718-mcp-session-lifecycle-and-ingress-isolation.md) — one global transport-capacity authority, bounded stream leases, capacity-aware `/ready`, and a supervised ingress child process.
|
|
27
|
+
Existing accepted ADRs remain under [`decisions/`](decisions/). Once a decision becomes ordinary current architecture, its durable rule should be folded into `CURRENT.md`; the ADR remains historical rationale.
|
|
109
28
|
|
|
110
|
-
##
|
|
29
|
+
## Change discipline
|
|
111
30
|
|
|
112
|
-
-
|
|
113
|
-
- Add link validation and exact-revision release-manifest checks to the final release gate.
|
|
114
|
-
- Keep diagrams as projections of the Markdown semantic source; a diagram must not introduce architecture rules absent from `current/`.
|
|
31
|
+
Do not create another current-architecture page for each refactor. Architecture-root Markdown is limited to `CURRENT.md`, `EVOLUTION.md`, `history.md`, and this index; historical pages belong under `history/`. Update `CURRENT.md` only when the architecture contract changes, update `ROADMAP.md` when priorities change, append `EVOLUTION.md` for material architecture transitions, and create/update a version snapshot only at a release/version boundary. Implementation phases, pending manual work, operator-local paths, and other execution status belong in durable Work/Plan evidence rather than maintained current architecture.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MCP HTTP Transport Lifecycle
|
|
2
2
|
|
|
3
3
|
> Capability: `mcp-http-transport-lifecycle`
|
|
4
|
-
> Runtime Authority: `docs/architecture
|
|
4
|
+
> Runtime Authority: `docs/architecture/../../CURRENT.md` and `docs/architecture/../../CURRENT.md`
|
|
5
5
|
|
|
6
6
|
## Responsibility
|
|
7
7
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Semantic harness convergence acceptance — 2026-08-22
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This is the S4 exact-main acceptance record for `PLAN-FORGE-SEMANTIC-HARNESS-CONVERGENCE-20260821-V3R2`. The evaluation snapshot is `f69ad7d1282a8de2335ffe12adb2e54f01fd1b10`, the S3-integrated main revision.
|
|
6
|
+
|
|
7
|
+
## Explicit evaluation ground truth
|
|
8
|
+
|
|
9
|
+
The isolated evaluation catalog now has dedicated scenarios for:
|
|
10
|
+
|
|
11
|
+
- semantic context plus root-to-nearest `AGENTS.md` / `CLAUDE.md` instruction recognition;
|
|
12
|
+
- Scale coordination through approved Plan steps and independent bounded Work;
|
|
13
|
+
- Direct/Lightweight execution with zero durable lifecycle side effects on the fast path.
|
|
14
|
+
|
|
15
|
+
Each scenario freezes intended behavior, affected domains, invariants, regression risks, an immutable Git snapshot, and an executable focused validator. These scenarios do not create a second runtime or semantic authority.
|
|
16
|
+
|
|
17
|
+
## Performance acceptance
|
|
18
|
+
|
|
19
|
+
The Plan references the controller-recorded `03121020` baseline. That identifier is not stored as a repository artifact, so this repository record does not invent missing historical sample values. The durable comparison point available from the Plan is the historical 4–5 second public-gateway spike that motivated S3. Current exact-main measurements are materially below that failure mode:
|
|
20
|
+
|
|
21
|
+
| Path | Current evidence | Acceptance |
|
|
22
|
+
| --- | ---: | --- |
|
|
23
|
+
| MCP file-read facade | p50 0.8 ms, p95 15.4 ms | no multi-second gateway tax |
|
|
24
|
+
| MCP bounded readonly commands | p50 24.9–28.5 ms, p95 27.2–36.7 ms | no multi-second gateway tax |
|
|
25
|
+
| MCP async Process handle admission | p50 13.9 ms, p95 14.4 ms | bounded and zero legacy Job/Worker side effects |
|
|
26
|
+
| Context steady cold | p50 11.96 ms, p95 12.14 ms | stable after startup |
|
|
27
|
+
| Context hot | p50 0.85 ms, p95 0.93 ms | session cache reuse proven |
|
|
28
|
+
| Context startup cold | 221.79 ms | isolated startup cost, not steady-state |
|
|
29
|
+
| Lightweight pre-spawn harness | p95 15 ms | zero durable Process writes and zero Lease operations |
|
|
30
|
+
|
|
31
|
+
The gateway benchmark separately attributes classification and routing at approximately 0 ms; observed command time is in the concrete operation. The historical 4–5 second spike was not reproduced.
|
|
32
|
+
|
|
33
|
+
### Concurrent semantic admission tail
|
|
34
|
+
|
|
35
|
+
The 32-controller admission stress test remains semantically correct: one shared Requirement resolves to one authority, while 32 independent Requirements resolve to 32 authorities. Holder CPU p95 remains bounded (about 4 ms shared and 9 ms independent in the latest exact-main-aligned run), while wall-clock holder p95 can rise under simultaneous 32-process host scheduling. That divergence is attributed to OS scheduling/preemption rather than additional canonical persistence CPU. The correctness race discovered during S3 (`LOCK_OWNERSHIP_MISMATCH`) was repaired by identity-checked stale-lock reaping, with regression coverage. The benchmark deliberately keeps the wall-clock 10 ms assertion visible rather than hiding host-scheduling variance.
|
|
36
|
+
|
|
37
|
+
## Architecture outcome
|
|
38
|
+
|
|
39
|
+
The final contract remains: ChatGPT owns semantic judgement; Forge owns deterministic repository/runtime mechanisms; Plan/Work are the semantic lifecycle authorities; Scale coordinates existing authorities; Direct/Lightweight paths avoid unnecessary durable machinery; `rh_context` returns bounded source and applicable guidance evidence without turning guidance into scope authority.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Forge 1.6 Architecture Snapshot
|
|
2
|
+
|
|
3
|
+
Status: **Version Snapshot — Not Runtime Authority**
|
|
4
|
+
|
|
5
|
+
This is the release-family architecture record for Forge 1.6. The live architecture contract is [`../CURRENT.md`](../CURRENT.md).
|
|
6
|
+
|
|
7
|
+
## Architecture shape
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
ChatGPT / semantic controller
|
|
11
|
+
-> stable 19-tool MCP facade
|
|
12
|
+
-> Context Engine / repository primitives / plugin dispatcher
|
|
13
|
+
-> Ephemeral or Lightweight local execution
|
|
14
|
+
-> optional Work + Durable Process for continuity
|
|
15
|
+
-> immutable Canonical Runtime release + standalone recovery
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Key contracts
|
|
19
|
+
|
|
20
|
+
- Default MCP surface: 19 stable tools; `core` and `advanced` are the same bounded default surface.
|
|
21
|
+
- Explicit `full` profile preserves historical compatibility definitions but is not used to construct the default schema.
|
|
22
|
+
- `rh_context` supports progressive raw-source retrieval with exact-known-path reservation, symbol materialization, session caching, CodeGraph hints and changed-file overlays.
|
|
23
|
+
- Ordinary local command execution is Direct/Lightweight by default after command/effect policy admission.
|
|
24
|
+
- Work is selected for continuity, scheduling, external effects, independent deliverables, recoverability or multi-controller coordination—not predicted file/line complexity.
|
|
25
|
+
- Runtime availability/release recovery is separated from ordinary command recovery semantics.
|
|
26
|
+
- Git/worktree, Edit Session, validation evidence, optional Work and optional durable Process each own one concern; compatibility projections are not current mutable authorities.
|
|
27
|
+
- Canonical Runtime activates one immutable whole release and retains the previous release for rollback.
|
|
28
|
+
|
|
29
|
+
## 1.6 simplification work
|
|
30
|
+
|
|
31
|
+
The 1.6 line introduced the quality-first executable-harness direction, removed unreachable Local Bridge execution code, detached the stable Controller schema from legacy full-profile definitions, and added an internal TypeScript Language Service navigation prototype for compiler-backed references/definitions/implementations without a new dependency or durable index.
|
|
32
|
+
|
|
33
|
+
## Known compatibility boundaries
|
|
34
|
+
|
|
35
|
+
- `toolset=full` remains available for legacy consumers.
|
|
36
|
+
- Some legacy Issue/Task/Job and Runtime modules remain for persisted-state or compatibility reads.
|
|
37
|
+
- Several large modules still need responsibility-based decomposition.
|
|
38
|
+
- TypeScript navigation remains internal until broader repository/project-config behavior is proven.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Forge 1.7 Architecture Snapshot
|
|
2
|
+
|
|
3
|
+
This is the release-family architecture record for Forge 1.7. The live architecture contract is [`../CURRENT.md`](../CURRENT.md); this file is historical release evidence and must not become parallel runtime authority.
|
|
4
|
+
|
|
5
|
+
## Controller and execution model
|
|
6
|
+
|
|
7
|
+
- ChatGPT remains the sole semantic controller. Forge supplies deterministic repository, Work/Plan, Process, Schedule, provider, evidence, recovery, and release mechanisms.
|
|
8
|
+
- Direct/Ephemeral execution remains the default for bounded understood work. Durable Work/Plan state is reserved for continuity, isolation, scheduling, recovery, independent delivery, external effects, or real dependency decomposition.
|
|
9
|
+
- Work, Plan, Schedule, Handoff, Runtime, and Git are the existing durable authorities; Forge 1.7 does not add a second semantic scheduler, agent database, or completion engine.
|
|
10
|
+
|
|
11
|
+
## Persistent Autonomous Continuation
|
|
12
|
+
|
|
13
|
+
- Schedule wake resolves an existing durable Work and reuses its bound ChatGPT conversation; a new Controller round reconstructs authority from Forge state rather than chat memory.
|
|
14
|
+
- Round disposition is explicit (`wait`, `continue_immediately`, `wait_for_user`, or `goal_complete`). Forge-owned ChatGPT tabs settle only after the round disposition/release boundary; immediate continuation is fenced against duplicate prompt/Work creation.
|
|
15
|
+
- Local/remote effect Work is distinct from repository-change Work, so runtime/schedule effects can be durably verified and finalized without manufacturing a Git diff.
|
|
16
|
+
- Retryable readiness failures use bounded backoff while user-action/security boundaries stay fail-closed. Stable release acceptance requires real timer-origin continuation evidence, not schedule configuration alone.
|
|
17
|
+
|
|
18
|
+
## Browser Runtime V3
|
|
19
|
+
|
|
20
|
+
- Controller Home BrowserSession is the sole durable browser-session authority. Stable provider/resource target identity is distinct from mutable URL/title.
|
|
21
|
+
- Common native/DOM operations are background-safe when capability permits; user-owned tabs are preserved. Physical foreground input is an explicit last-resort provider and still requires independent postcondition verification.
|
|
22
|
+
- Native replacement waits for the exact replacement tab to settle to HTTP(S), rejects transitional `about:*` state as success, preserves strict concrete-resource URL validation, and authorizes cross-origin navigation against the destination origin.
|
|
23
|
+
- Transport, Apple Events, Accessibility, Desktop Operator, or CGEvent success alone is not factual completion; postconditions remain authoritative, and unknown non-idempotent outcomes are never blindly replayed.
|
|
24
|
+
|
|
25
|
+
## Typed capabilities and global provider profiles
|
|
26
|
+
|
|
27
|
+
- The ChatGPT facade remains stable while typed domain capability discovery can rank relevant plugin actions from natural intent. Discovery is read-only; `plugin_action_execute` remains the plugin execution authority.
|
|
28
|
+
- Controller-global plugin profiles provide reusable provider configuration with repository overlays/restrictions. App Store Connect configuration carries credential references rather than private-key contents.
|
|
29
|
+
- iOS build automation supports simulator and explicit physical-device destinations plus opt-in provisioning updates using file-backed App Store Connect authentication references, with redacted evidence.
|
|
30
|
+
|
|
31
|
+
## Runtime, recovery, and release boundary
|
|
32
|
+
|
|
33
|
+
- Canonical Runtime is activated as one immutable compatible release. Independent Recovery owns restart/rollback and verifies Runtime, Gateway, MCP, Scheduler, and release identity after activation.
|
|
34
|
+
- Source and Runtime coherence remain explicit; advancing source does not silently mutate a pinned Runtime. Release/rollback scope is the complete compatible Runtime rather than individual components.
|
|
35
|
+
- Finalization, target advancement, verification receipts, process/session identity, and lifecycle cleanup remain fenced so unrelated branch/source changes are not attributed to the wrong Work.
|
|
36
|
+
|
|
37
|
+
## 1.7 release acceptance
|
|
38
|
+
|
|
39
|
+
- `package:check:main` and `package:check:release` must pass on the exact candidate.
|
|
40
|
+
- Persistent Autonomous Continuation must be demonstrated with real timer-origin Work/conversation reuse and a stabilization-only Continuous Evolution Supervisor soak before stable publication.
|
|
41
|
+
- The immutable `v1.7.0` Git tag, npm `latest` package, published tarball evidence, and active Canonical Runtime must resolve to the accepted release candidate.
|
|
@@ -5,7 +5,7 @@ Forge exposes browser automation through the bundled `browser` capability, the s
|
|
|
5
5
|
Authoritative references:
|
|
6
6
|
|
|
7
7
|
- [Browser plugin operations](operations/controller-browser-plugin.md)
|
|
8
|
-
- [Human Interaction Plane](architecture/
|
|
9
|
-
- [Plugin baseline](architecture/
|
|
8
|
+
- [Human Interaction Plane](architecture/CURRENT.md)
|
|
9
|
+
- [Plugin baseline](architecture/CURRENT.md)
|
|
10
10
|
|
|
11
11
|
The browser engine is not a second controller, Runtime, plugin marketplace, or lifecycle owner.
|
|
@@ -27,40 +27,16 @@ The Package Runtime does not require a Forge Git checkout, Bun compilation, Code
|
|
|
27
27
|
|
|
28
28
|
## Local boundaries
|
|
29
29
|
|
|
30
|
-
Forge
|
|
30
|
+
Forge MCP remains loopback-only, normally at:
|
|
31
31
|
|
|
32
32
|
```text
|
|
33
|
-
|
|
34
|
-
Canonical Runtime: http://127.0.0.1:8765/mcp
|
|
33
|
+
http://127.0.0.1:8765/mcp
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
The
|
|
38
|
-
|
|
39
|
-
Fresh user-level setup keeps the repository-centric Utility Console disabled until a repository/workbench target is configured. When enabled later it uses a separate loopback port (normally 8766). Never expose it to the internet.
|
|
36
|
+
The local Utility Console uses a separate loopback port (normally 8766). Never expose the Utility Console to the internet.
|
|
40
37
|
|
|
41
38
|
Service-level MCP configuration lives below `Controller Home/mcp/`. OAuth credentials and bearer fallback tokens are local secrets and must not be pasted into chat or committed. Repository-specific `.forge/mcp.policy.json` can narrow access when a repository is later adopted.
|
|
42
39
|
|
|
43
|
-
## App identity vs. transport
|
|
44
|
-
|
|
45
|
-
The ChatGPT App/connector is the application identity and owns the visible Forge tool schema. **Secure MCP Tunnel is the transport.** Switching an existing Forge App from a public HTTPS/Cloudflare route to Tunnel changes how commands reach Forge; it does not create a second Forge tool schema.
|
|
46
|
-
|
|
47
|
-
Default path:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
ChatGPT App -> OpenAI Secure MCP Tunnel -> tunnel-client
|
|
51
|
-
-> Forge loopback OAuth Gateway -> Canonical Runtime
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
A fresh chat is useful for isolated A/B testing, but Forge does not require a new conversation merely because transport changed when the same App is already connected and its tool schema is unchanged. If published tool definitions change, use ChatGPT's current app refresh/re-publish workflow.
|
|
55
|
-
|
|
56
|
-
Upgrade existing Forge installs with:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm install -g @moretea-labs/forge@latest
|
|
60
|
-
forge --version
|
|
61
|
-
forge setup next
|
|
62
|
-
```
|
|
63
|
-
|
|
64
40
|
## Remote controller connection
|
|
65
41
|
|
|
66
42
|
The setup profile owns the connection choice. Supported paths are:
|
|
@@ -71,7 +47,7 @@ The setup profile owns the connection choice. Supported paths are:
|
|
|
71
47
|
4. **Existing HTTPS** — user-managed reverse proxy/tunnel ending in `/mcp`.
|
|
72
48
|
5. **None** — local setup only; remote connectivity can be configured later.
|
|
73
49
|
|
|
74
|
-
For OpenAI Secure MCP Tunnel, setup uses the official
|
|
50
|
+
For OpenAI Secure MCP Tunnel, setup uses the official supervised runtime surface and considers it ready only when `tunnel-client runtimes status forge --json` reports the runtime running, healthy, and ready.
|
|
75
51
|
|
|
76
52
|
For public HTTPS paths, the configured connector URL is:
|
|
77
53
|
|
|
@@ -4,8 +4,8 @@ Forge models recurring or delegated work as bounded Schedules, Occurrences, Work
|
|
|
4
4
|
|
|
5
5
|
Authoritative references:
|
|
6
6
|
|
|
7
|
-
- [Automation and Schedule Engine](architecture/
|
|
8
|
-
- [Dispatch and Agent Strategy](architecture/
|
|
9
|
-
- [Failure Recovery](architecture/
|
|
7
|
+
- [Automation and Schedule Engine](architecture/CURRENT.md)
|
|
8
|
+
- [Dispatch and Agent Strategy](architecture/CURRENT.md)
|
|
9
|
+
- [Failure Recovery](architecture/CURRENT.md)
|
|
10
10
|
|
|
11
11
|
Automation does not gain permission to publish, deploy, merge, send, or perform destructive effects without the required authorization.
|
|
@@ -4,4 +4,4 @@ GitHub is an optional first-party Forge provider for repository collaboration an
|
|
|
4
4
|
|
|
5
5
|
Remote writes require explicit authorization and idempotent provider evidence. Configure the provider through the Forge CLI or plugin action surface and verify repository mapping before mutation.
|
|
6
6
|
|
|
7
|
-
See [Integrations](wiki/Integrations.md), [Plugin baseline](architecture/
|
|
7
|
+
See [Integrations](wiki/Integrations.md), [Plugin baseline](architecture/CURRENT.md), and [Verification and Release Gates](architecture/CURRENT.md).
|
|
@@ -10,7 +10,7 @@ forge plugin catalog
|
|
|
10
10
|
|
|
11
11
|
| Plugin ID | Product | Pinned release | Platforms |
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
|
-
| `desktop_operator` | [Forge Desktop Operator](https://github.com/moretea-labs/forge-desktop-operator) | `v0.2.
|
|
13
|
+
| `desktop_operator` | [Forge Desktop Operator](https://github.com/moretea-labs/forge-desktop-operator) | `v0.2.3` | macOS |
|
|
14
14
|
| `design` | [Forge Design](https://github.com/moretea-labs/forge-design) | `v0.3.0` | macOS, Linux, Windows |
|
|
15
15
|
| `personal_knowledge` | [Personal Knowledge Assistant](https://github.com/moretea-labs/personal-knowledge-assistant) | `v0.2.1` | macOS, Linux, Windows |
|
|
16
16
|
|
|
@@ -4,4 +4,4 @@ The canonical Forge Runtime reconciles durable Work, Process, Lease, projection,
|
|
|
4
4
|
|
|
5
5
|
The OS service manager automatically starts and restarts the single `forge-runtime` process. Standalone Recovery remains independently installable for diagnostics, service repair, tunnel repair, and offline whole-Runtime rollback when the primary Runtime cannot start.
|
|
6
6
|
|
|
7
|
-
See [Failure Recovery](architecture/
|
|
7
|
+
See [Failure Recovery](architecture/CURRENT.md), [Reliability runbook](operations/controller-reliability-runbook.md), and [Standalone disaster recovery](operations/standalone-disaster-recovery.md).
|
|
@@ -34,8 +34,8 @@ Interactions that can mutate remote state still require `confirm_authorization=t
|
|
|
34
34
|
|
|
35
35
|
The browser mode is explicit:
|
|
36
36
|
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
37
|
+
- `attach_preferred` is the default. It uses a strict order: configured loopback CDP endpoints; then an already-running, scriptable macOS Google Chrome or Vivaldi instance; then `cdpAttachFallback`. The default fallback is `managed_persistent`, so Forge only launches its own Playwright browser after attach paths are unavailable. CDP inventory reuses a previously owned matching tab. Apple Events prefers the frontmost supported browser, otherwise Chrome before Vivaldi; it can reuse a unique existing tab at the requested URL, otherwise creates a plugin-owned background tab while preserving the user's active tab, and reattaches directly to the saved window/tab identity on later actions.
|
|
38
|
+
- `managed_persistent` is the explicit managed-browser mode: each action uses a visible persistent Playwright context, restores the target URL, performs one bounded operation, persists session metadata, then closes the context.
|
|
39
39
|
- `isolated` launches a visible persistent context with a per-session repo-local profile under `.forge/browser/profiles/isolated/<session_id>`. It does not share the default plugin profile or a configured custom profile.
|
|
40
40
|
|
|
41
41
|
Session metadata is reusable across actions via `session_id`. Any action that returns a generated `sessionId` persists that session before returning, so the identifier is immediately valid for follow-up actions. Transient navigation failures can retry with `retries` (1–3).
|
|
@@ -43,13 +43,30 @@ Session metadata is reusable across actions via `session_id`. Any action that re
|
|
|
43
43
|
### Reliability and safety notes
|
|
44
44
|
|
|
45
45
|
- Domain allowlist is checked before navigation and after interactive URL changes.
|
|
46
|
-
- Selector failures include repair hints (`repairHint`) when possible. Selector snapshots prefer unique `data-*`, role/ARIA, name, and non-generated id anchors; structural `nth-of-type` paths are only a last resort and are derived from the actual DOM sibling position rather than result order.
|
|
46
|
+
- Selector failures include repair hints (`repairHint`) when possible. Selector snapshots prefer unique `data-*`, role/ARIA, name, and non-generated id anchors; structural `nth-of-type` paths are only a last resort and are derived from the actual DOM sibling position rather than result order. Open Shadow DOM can be traversed explicitly with bounded `host >>> descendant` selectors; closed shadow roots remain inaccessible.
|
|
47
|
+
- Reusing a saved macOS native session is fail-closed: if the stable plugin-owned tab identity disappears, Forge returns `PLUGIN_BROWSER_SESSION_STATE_LOST` instead of silently creating a replacement tab that could discard unsaved form/editor state.
|
|
47
48
|
- Console errors and failed requests are captured for Playwright/CDP cycles. Apple Events attachment reports empty console/network diagnostics because those streams are not exposed by the browser scripting dictionary.
|
|
48
49
|
- Artifacts stay under `.forge/browser/**` (not arbitrary local paths).
|
|
49
50
|
- CDP attach is bounded to configured loopback endpoints only; the plugin does not scan arbitrary ports or remote hosts. Native discovery checks only the configured Chrome/Vivaldi candidates and does not launch them.
|
|
50
51
|
- CDP browsers are disconnected after the action; Apple Events keeps plugin-owned session tabs open until `close_session`/`close_page` while preserving user-owned tabs; managed contexts are closed after the action. Standard native DOM reads/interactions do not foreground the owned tab and return DOM evidence instead of attempting a screenshot.
|
|
51
52
|
- Health `userFacingStatus` reports `ready`, `session active`, or setup states.
|
|
52
53
|
|
|
54
|
+
## Browser Runtime V3 contract
|
|
55
|
+
|
|
56
|
+
Browser Runtime V3 is the current Browser authority. The V2 ADR in [`../architecture/decisions/20260826-browser-runtime-v2.md`](../architecture/decisions/20260826-browser-runtime-v2.md) remains historical rationale; it is not a second runtime contract. Public Browser action IDs remain stable.
|
|
57
|
+
|
|
58
|
+
- controller-home BrowserSession state is the only durable browser-session authority;
|
|
59
|
+
- exact provider/resource identity is stable while URL/title are mutable observations and are refreshed after persisted reads;
|
|
60
|
+
- provider routing is capability-based instead of fallback-by-exception;
|
|
61
|
+
- a warm provider handle is reusable across bounded actions and full rediscovery is exceptional;
|
|
62
|
+
- cold native rebind uses the saved exact `windowId` + `tabId`; losing optional global tab inventory does not authorize guessing a user tab;
|
|
63
|
+
- mutations compile to provider-local `observe -> act -> verify` transactions;
|
|
64
|
+
- raw Apple Events / AX / socket / CGEvent success is not accepted as mutation success without postcondition evidence;
|
|
65
|
+
- typed browser-internal capabilities are preferred for bookmarks/tabs/downloads instead of driving `chrome://` UI;
|
|
66
|
+
- foreground physical input is explicit and separate. Browser `trusted_input` does not silently foreground a tab or reuse Desktop coordinates; use an explicitly authorized Desktop Operator foreground/physical action when that is the intended capability.
|
|
67
|
+
|
|
68
|
+
The warm-path performance targets remain p95 <= 350 ms for reads, <= 600 ms for DOM interaction plus verification, and <= 700 ms for typed browser-internal-resource operations. Explicit physical-input fallback targets p95 <= 1500 ms and is foreground-capable only when requested. Current-source live evidence is emitted by `tests/live/browser-runtime-v3.e2e.ts`; Work/Plan evidence owns measured p50/p95 values rather than this maintained runbook.
|
|
69
|
+
|
|
53
70
|
## Configuration
|
|
54
71
|
|
|
55
72
|
The source of truth is `.forge/plugins/browser.json`.
|
|
@@ -170,13 +187,16 @@ Apple Events attachment treats silence as the default execution contract:
|
|
|
170
187
|
- native tab ownership is the stable window/tab reference itself. CDP keeps its separate owner-token mechanism;
|
|
171
188
|
- only explicitly foreground-dependent operations such as screenshot capture or human handoff may require visible foreground presentation. They fail closed rather than activating implicitly.
|
|
172
189
|
|
|
173
|
-
The
|
|
174
|
-
Run it explicitly on a macOS workstation with a running Chrome instance:
|
|
190
|
+
The legacy macOS acceptance test remains available through `bun run test:browser-live`. Browser Runtime V3 adds `tests/live/browser-runtime-v3.e2e.ts`, which uses loopback fixtures and exact owned refs to cover Chrome/Vivaldi lifecycle, competing-foreground preservation, same-origin URL drift plus cold rebind, failed replacement postconditions, Chrome internal-resource adoption, cleanup, and per-operation p50/p95 reporting. Run the V3 gate explicitly on a macOS workstation with the target browsers already running:
|
|
175
191
|
|
|
176
192
|
```bash
|
|
177
|
-
bun
|
|
193
|
+
bun tests/live/browser-runtime-v3.e2e.ts
|
|
178
194
|
```
|
|
179
195
|
|
|
196
|
+
Set `FORGE_BROWSER_V3_REQUIRE_COMPETING_FOREGROUND=1` when a non-browser application is already frontmost to make foreground preservation a hard precondition. Set `FORGE_BROWSER_V3_REQUIRE_DOM_ALL=1` only when JavaScript-from-Apple-Events permission is expected for every requested native browser. Without that strict flag, a browser whose lifecycle is available but DOM automation is blocked is reported as `external_permission_required` with `PLUGIN_BROWSER_JAVASCRIPT_PERMISSION_REQUIRED`; the harness still verifies exact-ref cleanup and active-user-tab preservation for that product.
|
|
197
|
+
|
|
198
|
+
The stable Desktop Operator broker may omit global `list_tabs` or Browser `trusted_input`. Forge treats inventory absence as a loss of reuse optimization, not as permission to inspect or adopt unknown user tabs: new sessions create a Forge-owned tab, saved sessions validate exact refs, and close/reconcile operate on exact refs. Missing native trusted input remains a typed Browser capability limitation; explicit Desktop Operator foreground/physical interaction is a separate, visually verified path.
|
|
199
|
+
|
|
180
200
|
## Tab Resume And Diagnostics
|
|
181
201
|
|
|
182
202
|
When attaching through CDP, the plugin inventories existing tabs by index, URL, and title. Selection is deterministic:
|