@moretea-labs/forge 1.5.0-rc.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 +120 -0
- package/CHANGELOG.md +36 -0
- package/CLAUDE.md +120 -0
- package/CODE_OF_CONDUCT.md +23 -0
- package/CONTRIBUTING.md +77 -0
- package/LICENSE +22 -0
- package/NOTICE +9 -0
- package/README.en.md +5 -0
- package/README.es.md +12 -0
- package/README.fr.md +12 -0
- package/README.ja.md +12 -0
- package/README.md +132 -0
- package/README.zh-CN.md +84 -0
- package/SECURITY.md +50 -0
- package/SKILL.md +431 -0
- package/SUPPORT.md +31 -0
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/agents/openai.yaml +4 -0
- package/assets/AGENTS.md +68 -0
- package/assets/CLAUDE.md +68 -0
- package/assets/branding/README.md +10 -0
- package/assets/branding/forge-controller-flow.mmd +8 -0
- package/assets/hooks/AGENTS.md +75 -0
- package/assets/hooks/CLAUDE.md +75 -0
- package/assets/hooks/anti-simplification.sh +12 -0
- package/assets/hooks/changelog-guard.sh +80 -0
- package/assets/hooks/codex.hooks.template.json +60 -0
- package/assets/hooks/first-principles-guard.sh +72 -0
- package/assets/hooks/hook-input.sh +618 -0
- package/assets/hooks/lib/session-state.sh +106 -0
- package/assets/hooks/lib/workflow-state.sh +1730 -0
- package/assets/hooks/post-bash.sh +215 -0
- package/assets/hooks/post-edit-guard.sh +256 -0
- package/assets/hooks/post-tool-observer.sh +99 -0
- package/assets/hooks/pre-edit-guard.sh +240 -0
- package/assets/hooks/prompt-guard.sh +1077 -0
- package/assets/hooks/run-hook.sh +67 -0
- package/assets/hooks/security-sentinel.sh +115 -0
- package/assets/hooks/session-start-context.sh +593 -0
- package/assets/hooks/settings.template.json +60 -0
- package/assets/hooks/stop-orchestrator.sh +171 -0
- package/assets/hooks/subagent-return-channel-guard.sh +107 -0
- package/assets/hooks/worktree-guard.sh +39 -0
- package/assets/initializer-question-pack.v1.json +132 -0
- package/assets/initializer-question-pack.v1.schema.json +46 -0
- package/assets/initializer-question-pack.v2.json +174 -0
- package/assets/initializer-question-pack.v3.json +206 -0
- package/assets/initializer-question-pack.v3.schema.json +92 -0
- package/assets/initializer-question-pack.v4.json +557 -0
- package/assets/initializer-question-pack.v4.schema.json +169 -0
- package/assets/partials/01-header.partial.md +10 -0
- package/assets/partials/02-iron-rules.partial.md +30 -0
- package/assets/partials/03-philosophy.partial.md +32 -0
- package/assets/partials/04-project-structure.partial.md +56 -0
- package/assets/partials/05-workflow.partial.md +79 -0
- package/assets/partials/06-cloudflare.partial.md +20 -0
- package/assets/partials/07-footer.partial.md +38 -0
- package/assets/partials/08-orchestration.partial.md +49 -0
- package/assets/partials/09-compact-instructions.partial.md +11 -0
- package/assets/partials/_assembly-order.md +40 -0
- package/assets/partials-agents/01-header.partial.md +8 -0
- package/assets/partials-agents/02-operating-mode.partial.md +44 -0
- package/assets/partials-agents/03-orchestration.partial.md +45 -0
- package/assets/partials-agents/04-task-protocol.partial.md +69 -0
- package/assets/partials-agents/05-coding-constraints.partial.md +20 -0
- package/assets/partials-agents/06-quality-safety.partial.md +23 -0
- package/assets/partials-agents/07-cloudflare.partial.md +9 -0
- package/assets/partials-agents/08-deep-docs.partial.md +32 -0
- package/assets/plan-map.json +301 -0
- package/assets/plugin-registry.v1.json +8 -0
- package/assets/project-structures/ai-native-collaborative-editor.txt +25 -0
- package/assets/project-structures/ai-native-product-copilot.txt +21 -0
- package/assets/project-structures/ai-native-runtime-console.txt +25 -0
- package/assets/project-structures/ai-native-sidecar-kernel.txt +19 -0
- package/assets/project-structures/astro-ssr.txt +25 -0
- package/assets/project-structures/expo-nativewind.txt +52 -0
- package/assets/project-structures/monorepo.txt +63 -0
- package/assets/project-structures/remix.txt +50 -0
- package/assets/project-structures/tanstack-start-workers.txt +51 -0
- package/assets/project-structures/vite-tanstack.txt +58 -0
- package/assets/reference-configs/AGENTS.md +13 -0
- package/assets/reference-configs/CLAUDE.md +13 -0
- package/assets/reference-configs/agentic-development-flow.md +94 -0
- package/assets/reference-configs/ai-workflows.md +14 -0
- package/assets/reference-configs/changelog-versioning.md +13 -0
- package/assets/reference-configs/coding-standards.md +14 -0
- package/assets/reference-configs/development-protocol.md +21 -0
- package/assets/reference-configs/document-generation.md +38 -0
- package/assets/reference-configs/evaluator-rubric.md +19 -0
- package/assets/reference-configs/external-tooling.md +374 -0
- package/assets/reference-configs/git-strategy.md +14 -0
- package/assets/reference-configs/global-working-rules.md +64 -0
- package/assets/reference-configs/handoff-protocol.md +38 -0
- package/assets/reference-configs/harness-overview.md +124 -0
- package/assets/reference-configs/heartbeat-triage.md +57 -0
- package/assets/reference-configs/hook-operations.md +96 -0
- package/assets/reference-configs/release-deploy.md +40 -0
- package/assets/reference-configs/spa-day-protocol.md +14 -0
- package/assets/reference-configs/sprint-contracts.md +89 -0
- package/assets/reference-configs/workflow-orchestration.md +14 -0
- package/assets/skill-hooks.json +41 -0
- package/assets/skill-version.json +189 -0
- package/assets/skills/claude-review/SKILL.md +231 -0
- package/assets/skills/codex-review/SKILL.md +103 -0
- package/assets/templates/AGENTS.md +13 -0
- package/assets/templates/CLAUDE.md +13 -0
- package/assets/templates/architecture.template.md +80 -0
- package/assets/templates/brief.template.md +38 -0
- package/assets/templates/contract.template.md +104 -0
- package/assets/templates/decisions.template.md +85 -0
- package/assets/templates/factor-factory/factor-backtest-report.template.md +36 -0
- package/assets/templates/factor-factory/factor-hypothesis.template.md +30 -0
- package/assets/templates/factor-factory/factor-registry.template.json +5 -0
- package/assets/templates/gitignore.template +53 -0
- package/assets/templates/guides/metro-esm-gotchas.template.md +46 -0
- package/assets/templates/helpers/architecture-event.ts +822 -0
- package/assets/templates/helpers/architecture-queue.sh +647 -0
- package/assets/templates/helpers/archive-architecture-request.sh +244 -0
- package/assets/templates/helpers/archive-workflow.sh +295 -0
- package/assets/templates/helpers/capability-config.ts +394 -0
- package/assets/templates/helpers/capability-resolver.ts +505 -0
- package/assets/templates/helpers/capture-plan.sh +335 -0
- package/assets/templates/helpers/check-agent-tooling.sh +1533 -0
- package/assets/templates/helpers/check-architecture-sync.sh +287 -0
- package/assets/templates/helpers/check-brain-manifest.sh +255 -0
- package/assets/templates/helpers/check-context-files.sh +49 -0
- package/assets/templates/helpers/check-deploy-sql-order.sh +117 -0
- package/assets/templates/helpers/check-skill-version.ts +193 -0
- package/assets/templates/helpers/check-task-sync.sh +65 -0
- package/assets/templates/helpers/check-task-workflow.sh +1002 -0
- package/assets/templates/helpers/codex-handoff-resume.sh +269 -0
- package/assets/templates/helpers/context-contract-sync.sh +516 -0
- package/assets/templates/helpers/contract-run.ts +465 -0
- package/assets/templates/helpers/contract-worktree.sh +725 -0
- package/assets/templates/helpers/ensure-task-workflow.sh +1218 -0
- package/assets/templates/helpers/harness-trace-grade.sh +150 -0
- package/assets/templates/helpers/heartbeat-triage.sh +361 -0
- package/assets/templates/helpers/inspect-project-state.ts +280 -0
- package/assets/templates/helpers/maintenance-triage.sh +167 -0
- package/assets/templates/helpers/migrate-project-template.sh +54 -0
- package/assets/templates/helpers/migrate-workflow-docs.ts +413 -0
- package/assets/templates/helpers/new-plan.sh +183 -0
- package/assets/templates/helpers/new-spec.sh +50 -0
- package/assets/templates/helpers/new-sprint.sh +49 -0
- package/assets/templates/helpers/plan-to-todo.sh +799 -0
- package/assets/templates/helpers/prepare-codex-handoff.sh +203 -0
- package/assets/templates/helpers/prepare-handoff.sh +81 -0
- package/assets/templates/helpers/refresh-current-status.sh +469 -0
- package/assets/templates/helpers/select-agent-context-blocks.sh +66 -0
- package/assets/templates/helpers/ship-worktrees.sh +561 -0
- package/assets/templates/helpers/sprint-backlog.sh +837 -0
- package/assets/templates/helpers/summarize-failures.sh +125 -0
- package/assets/templates/helpers/switch-plan.sh +153 -0
- package/assets/templates/helpers/sync-brain-docs.sh +381 -0
- package/assets/templates/helpers/verify-contract.sh +705 -0
- package/assets/templates/helpers/verify-sprint.sh +680 -0
- package/assets/templates/helpers/workflow-contract.ts +202 -0
- package/assets/templates/helpers/workstream-sync.sh +263 -0
- package/assets/templates/implementation-notes.template.md +37 -0
- package/assets/templates/packages.template.md +45 -0
- package/assets/templates/plan.template.md +77 -0
- package/assets/templates/prd.template.md +165 -0
- package/assets/templates/research.template.md +25 -0
- package/assets/templates/review.template.md +78 -0
- package/assets/templates/spec.template.md +31 -0
- package/assets/templates/sprint.template.md +69 -0
- package/assets/templates/tech-stack.template.md +57 -0
- package/assets/versions.json +77 -0
- package/assets/workflow-contract.v1.json +671 -0
- package/bin/forge-desktop-helper.mjs +204 -0
- package/bin/forge-hook.mjs +32 -0
- package/bin/forge-runtime-service.mjs +34 -0
- package/bin/forge-runtime.mjs +30 -0
- package/bin/forge.mjs +32 -0
- package/docs/CHANGELOG.md +978 -0
- package/docs/README.md +72 -0
- package/docs/README.zh-CN.md +58 -0
- package/docs/architecture/chatgpt-handoff-facade.md +393 -0
- package/docs/architecture/current/README.md +158 -0
- package/docs/architecture/current/approved-target-architecture.zh-CN.md +1501 -0
- package/docs/architecture/current/architecture-invariants.md +331 -0
- package/docs/architecture/current/automation-and-schedule-engine.md +453 -0
- package/docs/architecture/current/codegraph-context-provider.md +226 -0
- package/docs/architecture/current/control-plane-authority-inventory.md +82 -0
- package/docs/architecture/current/controller-repository-decoupling.md +148 -0
- package/docs/architecture/current/dispatch-and-agent-strategy.md +354 -0
- package/docs/architecture/current/entity-model.md +619 -0
- package/docs/architecture/current/external-plugin-governance.md +396 -0
- package/docs/architecture/current/failure-recovery.md +471 -0
- package/docs/architecture/current/governance.md +213 -0
- package/docs/architecture/current/human-interaction-plane.md +87 -0
- package/docs/architecture/current/implementation-status.md +128 -0
- package/docs/architecture/current/job-and-run-lifecycle.md +413 -0
- package/docs/architecture/current/local-workspace-target-grants.md +70 -0
- package/docs/architecture/current/migration-roadmap.md +105 -0
- package/docs/architecture/current/multi-repository-execution.md +371 -0
- package/docs/architecture/current/operations-runbook.md +45 -0
- package/docs/architecture/current/peer-supercontroller-runtime.md +32 -0
- package/docs/architecture/current/personal-assistant-plugin-baseline.md +207 -0
- package/docs/architecture/current/repository-access-modes.md +102 -0
- package/docs/architecture/current/route-policy.md +15 -0
- package/docs/architecture/current/route-session-concurrency.md +85 -0
- package/docs/architecture/current/runtime-architecture-simplification.md +214 -0
- package/docs/architecture/current/runtime-directory-map.md +49 -0
- package/docs/architecture/current/runtime-health-and-resource-lifecycle.md +85 -0
- package/docs/architecture/current/scheduler-and-resource-claims.md +432 -0
- package/docs/architecture/current/session-aware-execution-and-authorization.md +77 -0
- package/docs/architecture/current/system-overview.md +144 -0
- package/docs/architecture/current/target-requirements-traceability.md +202 -0
- package/docs/architecture/current/thin-harness-governance-policy.md +32 -0
- package/docs/architecture/current/thin-harness-v1.md +313 -0
- package/docs/architecture/current/verification-and-release-gates.md +391 -0
- package/docs/architecture/decisions/20260801-controller-home-sqlite-state.md +100 -0
- package/docs/architecture/decisions/20260803-canonical-skill-surface.md +40 -0
- package/docs/architecture/decisions/20260803-release-identity-binding-and-exit-policy.md +53 -0
- package/docs/architecture/diagrams/.gitkeep +1 -0
- package/docs/architecture/diagrams/agentic-dev-plugin-architecture.html +186 -0
- package/docs/architecture/domains/.gitkeep +0 -0
- package/docs/architecture/domains/public-surface.md +30 -0
- package/docs/architecture/domains/runtime-harness.md +33 -0
- package/docs/architecture/domains/verification.md +33 -0
- package/docs/architecture/domains/workflow-engine.md +30 -0
- package/docs/architecture/global-hook-runtime.md +162 -0
- package/docs/architecture/history.md +38 -0
- package/docs/architecture/index.md +114 -0
- package/docs/architecture/ios-semantic-automation-provider-v2.md +166 -0
- package/docs/architecture/modules/.gitkeep +0 -0
- package/docs/architecture/modules/controller-runtime/transport-lifecycle.md +24 -0
- package/docs/architecture/requests/.gitkeep +1 -0
- package/docs/architecture/requests/archive/2026/20260528-154740-ai-hooks-ai-hooks-hook-input-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-154816-assets-hooks-assets-hooks-hook-input-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-161851-ai-harness-workflow-contract-json-ai-harness-workflow-contract-json.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-161853-scripts-check-task-workflow-sh-scripts-check-task-workflow-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-161911-assets-workflow-contract-v1-json-assets-workflow-contract-v1-json.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222416-ai-hooks-ai-hooks-hook-input-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222444-ai-hooks-ai-hooks-pre-edit-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222457-ai-hooks-ai-hooks-pre-edit-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222648-ai-hooks-ai-hooks-pre-edit-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222705-ai-hooks-ai-hooks-worktree-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222726-ai-hooks-ai-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-222727-ai-hooks-ai-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-224736-ai-hooks-ai-hooks-hook-input-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233259-ai-hooks-ai-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233335-assets-hooks-assets-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233456-ai-hooks-ai-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233457-assets-hooks-assets-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233637-ai-hooks-ai-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260528-233638-assets-hooks-assets-hooks-prompt-guard-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260529-000322-root-package-json.md +59 -0
- package/docs/architecture/requests/archive/2026/20260529-004238-ai-hooks-ai-hooks-lib-workflow-state-sh.md +59 -0
- package/docs/architecture/requests/archive/2026/20260529-020654-ai-harness-policy-json-ai-harness-policy-json.md +63 -0
- package/docs/architecture/requests/archive/2026/20260529-094236-ai-hooks-ai-hooks-prompt-guard-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260529-094323-assets-hooks-assets-hooks-prompt-guard-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260529-094331-ai-hooks-ai-hooks-prompt-guard-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260529-094339-assets-hooks-assets-hooks-prompt-guard-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260529-094430-assets-hooks-assets-hooks-session-start-context-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260529-094446-ai-hooks-ai-hooks-session-start-context-sh.md +60 -0
- package/docs/architecture/requests/archive/2026/20260613-002040-runtime-harness-hook-adapters.md +68 -0
- package/docs/architecture/requests/archive/2026/root.md +68 -0
- package/docs/architecture/requests/archive/2026/runtime-harness-hook-adapters.md +76 -0
- package/docs/architecture/requests/archive/2026/verification-evals-checks.md +68 -0
- package/docs/architecture/requests/archive/2026/workflow-engine-contract-assets.md +69 -0
- package/docs/architecture/reviews/2026-07-11-access-surface-review.md +99 -0
- package/docs/architecture/snapshots/.gitkeep +1 -0
- package/docs/forge-autonomous-goal-loop.md +7 -0
- package/docs/forge-chatgpt-browser-engine.md +11 -0
- package/docs/forge-chatgpt-mcp-setup.md +239 -0
- package/docs/forge-chatgpt-supervised-automation.md +11 -0
- package/docs/forge-github-issue-launcher.md +7 -0
- package/docs/forge-plugin-management.md +95 -0
- package/docs/forge-provider-configuration.md +7 -0
- package/docs/forge-runtime-self-healing-loop.md +7 -0
- package/docs/images/forge-banner-cn.svg +1 -0
- package/docs/images/forge-banner.svg +1 -0
- package/docs/images/forge-controller-flow.svg +1 -0
- package/docs/images/image.png +0 -0
- package/docs/images/repo-harness-gptpro-cn.png +0 -0
- package/docs/images/repo-harness-gptpro.png +0 -0
- package/docs/images/repo-harness-hook-carrot.png +0 -0
- package/docs/operations/chatgpt-personal-assistant-runtime.md +83 -0
- package/docs/operations/checkout-route-integrity.md +22 -0
- package/docs/operations/controller-browser-plugin.md +299 -0
- package/docs/operations/controller-desktop-plugin.md +112 -0
- package/docs/operations/controller-performance-and-502.md +126 -0
- package/docs/operations/controller-reliability-runbook.md +134 -0
- package/docs/operations/environment-hardening.md +50 -0
- package/docs/operations/features.md +45 -0
- package/docs/operations/features.zh-CN.md +45 -0
- package/docs/operations/github-repository.md +60 -0
- package/docs/operations/gmail-assistant-routines.md +186 -0
- package/docs/operations/homebrew.md +26 -0
- package/docs/operations/local-system-assistant.md +46 -0
- package/docs/operations/local-system-assistant.zh-CN.md +46 -0
- package/docs/operations/mcp-tool-exposure.md +58 -0
- package/docs/operations/mobile-intents-shortcuts.md +117 -0
- package/docs/operations/open-source-release-hygiene.md +31 -0
- package/docs/operations/personal-assistant-operator-guide.md +61 -0
- package/docs/operations/platform-support.md +62 -0
- package/docs/operations/platform-support.zh-CN.md +61 -0
- package/docs/operations/provider-configuration.md +31 -0
- package/docs/operations/releasing.md +86 -0
- package/docs/operations/releasing.zh-CN.md +86 -0
- package/docs/operations/route-session-concurrency-baseline.json +893 -0
- package/docs/operations/route-session-concurrency-baseline.md +94 -0
- package/docs/operations/runtime-performance-diagnostics.md +14 -0
- package/docs/operations/sqlite-control-plane-recovery.md +65 -0
- package/docs/operations/standalone-disaster-recovery.md +136 -0
- package/docs/operations/troubleshooting.md +72 -0
- package/docs/operations/troubleshooting.zh-CN.md +70 -0
- package/docs/public-usage-guide.md +33 -0
- package/docs/public-usage-guide.zh-CN.md +33 -0
- package/docs/tutorials/01-install-and-start.md +93 -0
- package/docs/tutorials/01-install-and-start.zh-CN.md +93 -0
- package/docs/tutorials/02-connect-chatgpt.md +82 -0
- package/docs/tutorials/02-connect-chatgpt.zh-CN.md +80 -0
- package/docs/tutorials/03-first-repository-task.md +57 -0
- package/docs/tutorials/03-first-repository-task.zh-CN.md +57 -0
- package/docs/tutorials/README.md +13 -0
- package/docs/tutorials/README.zh-CN.md +13 -0
- package/docs/wiki/Architecture.md +85 -0
- package/docs/wiki/Core-Concepts.md +27 -0
- package/docs/wiki/Home.md +36 -0
- package/docs/wiki/Implementation.md +172 -0
- package/docs/wiki/Installation.md +50 -0
- package/docs/wiki/Integrations.md +29 -0
- package/docs/wiki/Operations.md +26 -0
- package/docs/wiki/Quick-Start.md +46 -0
- package/docs/wiki/Releases-and-Upgrades.md +34 -0
- package/docs/wiki/Runtime-Architecture.md +50 -0
- package/docs/wiki/Security-Model.md +31 -0
- package/docs/wiki/Troubleshooting.md +38 -0
- package/docs/wiki/Work-Lifecycle.md +31 -0
- package/docs/wiki/_Sidebar.md +21 -0
- package/install.ps1 +48 -0
- package/install.sh +66 -0
- package/package.json +156 -0
- package/scripts/activate-source-baseline.ts +335 -0
- package/scripts/architecture-event.ts +822 -0
- package/scripts/architecture-queue.sh +647 -0
- package/scripts/archive-architecture-request.sh +244 -0
- package/scripts/archive-workflow.sh +295 -0
- package/scripts/assemble-template.ts +1172 -0
- package/scripts/benchmark-controller-hotpath.ts +212 -0
- package/scripts/benchmark-controller-round2.ts +139 -0
- package/scripts/benchmark-ios-agent-device.ts +514 -0
- package/scripts/benchmark-route-session-concurrency.ts +714 -0
- package/scripts/benchmark-thin-harness-gateway-ab.ts +632 -0
- package/scripts/benchmark-thin-harness-mcp-e2e.ts +479 -0
- package/scripts/benchmark-thin-harness.ts +251 -0
- package/scripts/bootstrap-runtime-maintenance-recovery.sh +183 -0
- package/scripts/canary-global-hook.sh +263 -0
- package/scripts/capability-config.ts +394 -0
- package/scripts/capability-resolver.ts +505 -0
- package/scripts/capture-plan.sh +335 -0
- package/scripts/check-agent-tooling.sh +1549 -0
- package/scripts/check-architecture-sync.sh +373 -0
- package/scripts/check-brain-manifest.sh +255 -0
- package/scripts/check-ci.sh +16 -0
- package/scripts/check-context-files.sh +49 -0
- package/scripts/check-deploy-sql-order.sh +117 -0
- package/scripts/check-mcp-compatibility.ts +93 -0
- package/scripts/check-npm-release.sh +32 -0
- package/scripts/check-open-source-tracked-surface.sh +146 -0
- package/scripts/check-package-identity.mjs +117 -0
- package/scripts/check-platform-support.mjs +79 -0
- package/scripts/check-public-docs.sh +105 -0
- package/scripts/check-public-release-surface.sh +19 -0
- package/scripts/check-release-published.sh +57 -0
- package/scripts/check-release-readiness.sh +43 -0
- package/scripts/check-release-version.mjs +74 -0
- package/scripts/check-runtime-architecture.mjs +593 -0
- package/scripts/check-runtime-env.mjs +89 -0
- package/scripts/check-skill-version.ts +193 -0
- package/scripts/check-tarball-install-smoke.sh +66 -0
- package/scripts/check-task-sync.sh +65 -0
- package/scripts/check-task-workflow.sh +1002 -0
- package/scripts/check-third-party-notices.mjs +36 -0
- package/scripts/codex-handoff-resume.sh +269 -0
- package/scripts/complete-control-plane-cutover.ts +126 -0
- package/scripts/context-contract-sync.sh +516 -0
- package/scripts/contract-run.ts +465 -0
- package/scripts/contract-worktree.sh +725 -0
- package/scripts/controller-ngrok-rotation.sh +678 -0
- package/scripts/create-project-dirs.sh +282 -0
- package/scripts/ensure-codegraph.sh +16 -0
- package/scripts/ensure-task-workflow.sh +1218 -0
- package/scripts/export-requirement-portfolio.ts +28 -0
- package/scripts/factor-lab-check.sh +73 -0
- package/scripts/factor-lab-new.sh +96 -0
- package/scripts/factor-lab-promote.sh +86 -0
- package/scripts/factor-lab-reject.sh +68 -0
- package/scripts/harness-trace-grade.sh +150 -0
- package/scripts/heartbeat-triage.sh +361 -0
- package/scripts/hook-dispatch-diet-report.ts +234 -0
- package/scripts/hook-shim.sh +93 -0
- package/scripts/init-project.sh +505 -0
- package/scripts/initializer-question-pack.ts +200 -0
- package/scripts/inspect-project-state.ts +280 -0
- package/scripts/install-desktop-operator-registration.ts +45 -0
- package/scripts/install-standalone-recovery.ts +74 -0
- package/scripts/lib/AGENTS.md +13 -0
- package/scripts/lib/CLAUDE.md +13 -0
- package/scripts/lib/controller-home-env.sh +69 -0
- package/scripts/lib/project-init-lib.sh +2759 -0
- package/scripts/load-standalone-recovery.sh +17 -0
- package/scripts/loop-engine-cutover-gate.ts +324 -0
- package/scripts/maintenance-triage.sh +167 -0
- package/scripts/migrate-project-template.sh +1189 -0
- package/scripts/migrate-requirement-portfolio.ts +86 -0
- package/scripts/migrate-workflow-docs.ts +413 -0
- package/scripts/new-plan.sh +183 -0
- package/scripts/new-spec.sh +50 -0
- package/scripts/new-sprint.sh +49 -0
- package/scripts/open-source-audit-allowlist.txt +46 -0
- package/scripts/package-source-archive.sh +147 -0
- package/scripts/plan-to-todo.sh +799 -0
- package/scripts/prepare-codex-handoff.sh +203 -0
- package/scripts/prepare-handoff.sh +81 -0
- package/scripts/public-release-files.txt +39 -0
- package/scripts/public-release.ts +174 -0
- package/scripts/publish-release-tarball.sh +27 -0
- package/scripts/refresh-current-status.sh +469 -0
- package/scripts/refresh-ios-physical-runtime.ts +196 -0
- package/scripts/repair-executable-modes.ts +8 -0
- package/scripts/rollout-all-registered-repos.sh +7 -0
- package/scripts/route-nl-vs-ts-eval.ts +679 -0
- package/scripts/run-bun-test-file.ts +182 -0
- package/scripts/run-governed-gate.ts +140 -0
- package/scripts/run-mobile-monitor-bridge.ts +71 -0
- package/scripts/run-skill-evals.ts +1022 -0
- package/scripts/run-skill-hook.ts +244 -0
- package/scripts/run-supervised-command.ts +24 -0
- package/scripts/run-tests-portable.sh +20 -0
- package/scripts/select-agent-context-blocks.sh +66 -0
- package/scripts/setup-plugins.sh +43 -0
- package/scripts/ship-worktrees.sh +561 -0
- package/scripts/smoke-browser-cdp-bridge.ts +93 -0
- package/scripts/smoke-chatgpt-supervised-automation.ts +208 -0
- package/scripts/smoke-ios-physical-device.ts +114 -0
- package/scripts/smoke-mcp-http-runtime.ts +216 -0
- package/scripts/smoke-mcp-tool-surface.ts +117 -0
- package/scripts/smoke-runtime-recovery.ts +220 -0
- package/scripts/smoke-schedule-engine.ts +283 -0
- package/scripts/sprint-backlog.sh +837 -0
- package/scripts/stage-runtime-release.ts +38 -0
- package/scripts/summarize-failures.sh +125 -0
- package/scripts/switch-plan.sh +153 -0
- package/scripts/sync-brain-docs.sh +381 -0
- package/scripts/sync-codex-installed-copies.sh +183 -0
- package/scripts/test-governance.ts +75 -0
- package/scripts/verify-contract.sh +705 -0
- package/scripts/verify-forge-runtime.sh +31 -0
- package/scripts/verify-sprint.sh +680 -0
- package/scripts/windows-paths.d.mts +7 -0
- package/scripts/windows-paths.mjs +28 -0
- package/scripts/workflow-contract.ts +206 -0
- package/scripts/workstream-sync.sh +263 -0
- package/src/cli/agent-jobs/executable-resolver.ts +289 -0
- package/src/cli/agent-jobs/executor-health.ts +252 -0
- package/src/cli/agent-jobs/integration.ts +963 -0
- package/src/cli/agent-jobs/job-manager.ts +2030 -0
- package/src/cli/agent-jobs/types.ts +219 -0
- package/src/cli/agent-jobs/worker-lifecycle.ts +288 -0
- package/src/cli/chatgpt-browser/bind-server.ts +504 -0
- package/src/cli/chatgpt-browser/binding.ts +140 -0
- package/src/cli/chatgpt-browser/bridge-extension.ts +221 -0
- package/src/cli/chatgpt-browser/bridge-provider.ts +268 -0
- package/src/cli/chatgpt-browser/engine.ts +569 -0
- package/src/cli/chatgpt-browser/file-policy.ts +158 -0
- package/src/cli/chatgpt-browser/native-provider.ts +553 -0
- package/src/cli/chatgpt-browser/oracle-provider.ts +437 -0
- package/src/cli/chatgpt-browser/prompt-assembler.ts +29 -0
- package/src/cli/chatgpt-browser/session-store.ts +301 -0
- package/src/cli/chatgpt-browser/types.ts +172 -0
- package/src/cli/commands/adopt-plan.ts +186 -0
- package/src/cli/commands/brain-root.ts +132 -0
- package/src/cli/commands/brain.ts +609 -0
- package/src/cli/commands/capability-context.ts +613 -0
- package/src/cli/commands/chatgpt.ts +424 -0
- package/src/cli/commands/controller.ts +680 -0
- package/src/cli/commands/docs.ts +103 -0
- package/src/cli/commands/doctor.ts +476 -0
- package/src/cli/commands/global-runtime.ts +323 -0
- package/src/cli/commands/hook.ts +34 -0
- package/src/cli/commands/init-hook.ts +870 -0
- package/src/cli/commands/init.ts +829 -0
- package/src/cli/commands/install.ts +86 -0
- package/src/cli/commands/mcp.ts +315 -0
- package/src/cli/commands/migrate.ts +154 -0
- package/src/cli/commands/plugin.ts +74 -0
- package/src/cli/commands/prompt-guard-decision.ts +238 -0
- package/src/cli/commands/recovery.ts +667 -0
- package/src/cli/commands/repository.ts +224 -0
- package/src/cli/commands/run.ts +23 -0
- package/src/cli/commands/runtime.ts +191 -0
- package/src/cli/commands/security.ts +440 -0
- package/src/cli/commands/status.ts +137 -0
- package/src/cli/commands/tools.ts +167 -0
- package/src/cli/controller/check-runner.ts +1022 -0
- package/src/cli/controller/codex-continuation.ts +153 -0
- package/src/cli/controller/completion-backlog.ts +380 -0
- package/src/cli/controller/completion-orchestrator.ts +1807 -0
- package/src/cli/controller/completion-target.ts +96 -0
- package/src/cli/controller/composite-operations.ts +196 -0
- package/src/cli/controller/composite-result.ts +130 -0
- package/src/cli/controller/context-pack.ts +652 -0
- package/src/cli/controller/execution-completion.ts +175 -0
- package/src/cli/controller/execution-policy.ts +392 -0
- package/src/cli/controller/governance.ts +594 -0
- package/src/cli/controller/issue-store.ts +1421 -0
- package/src/cli/controller/launch-agents.ts +410 -0
- package/src/cli/controller/legacy-issue-cutover.ts +415 -0
- package/src/cli/controller/lifecycle-authority.ts +16 -0
- package/src/cli/controller/migrated-issue-decision.ts +237 -0
- package/src/cli/controller/operational-plan.ts +226 -0
- package/src/cli/controller/postcondition.ts +134 -0
- package/src/cli/controller/progress.ts +656 -0
- package/src/cli/controller/project-state.ts +147 -0
- package/src/cli/controller/requirement-portfolio-export.ts +146 -0
- package/src/cli/controller/requirement-portfolio-migration.ts +613 -0
- package/src/cli/controller/run-evidence.ts +43 -0
- package/src/cli/controller/runtime-config.ts +92 -0
- package/src/cli/controller/stuck-state-migration.ts +396 -0
- package/src/cli/controller/task-ledger.ts +632 -0
- package/src/cli/controller/task-status-resolver.ts +403 -0
- package/src/cli/controller/types.ts +273 -0
- package/src/cli/controller/work-mode.ts +186 -0
- package/src/cli/controller/worklog.ts +201 -0
- package/src/cli/diagnostic-entry.ts +39 -0
- package/src/cli/editing/edit-session.ts +1606 -0
- package/src/cli/editing/executable-modes.ts +70 -0
- package/src/cli/github/github.ts +274 -0
- package/src/cli/github/plugin.ts +345 -0
- package/src/cli/github/session.ts +104 -0
- package/src/cli/hook/prompt-guard-decision.ts +238 -0
- package/src/cli/hook/prompt-intents.ts +534 -0
- package/src/cli/hook/route-registry.ts +107 -0
- package/src/cli/hook/runtime.ts +303 -0
- package/src/cli/hook/state-snapshot.ts +388 -0
- package/src/cli/hook-entry.ts +51 -0
- package/src/cli/index.ts +574 -0
- package/src/cli/installer/managed-entries.ts +78 -0
- package/src/cli/installer/shared.ts +65 -0
- package/src/cli/installer/targets/claude.ts +136 -0
- package/src/cli/installer/targets/codex.ts +174 -0
- package/src/cli/installer/targets/registry.ts +28 -0
- package/src/cli/installer/types.ts +72 -0
- package/src/cli/local-bridge/connector-freshness.ts +529 -0
- package/src/cli/local-bridge/console-view-models.ts +324 -0
- package/src/cli/local-bridge/dashboard.ts +1312 -0
- package/src/cli/local-bridge/facade-api.ts +1877 -0
- package/src/cli/local-bridge/job-store.ts +1451 -0
- package/src/cli/local-bridge/mobile-intents.ts +344 -0
- package/src/cli/local-bridge/mobile-monitor.ts +209 -0
- package/src/cli/local-bridge/server.ts +3183 -0
- package/src/cli/local-bridge/types.ts +176 -0
- package/src/cli/mcp/access-mode.ts +132 -0
- package/src/cli/mcp/access-tools.ts +387 -0
- package/src/cli/mcp/audit.ts +32 -0
- package/src/cli/mcp/auth.ts +402 -0
- package/src/cli/mcp/instructions.ts +33 -0
- package/src/cli/mcp/legacy-context.ts +16 -0
- package/src/cli/mcp/legacy-tool-service.ts +5516 -0
- package/src/cli/mcp/multi-repository.ts +423 -0
- package/src/cli/mcp/oauth.ts +226 -0
- package/src/cli/mcp/paths.ts +134 -0
- package/src/cli/mcp/policy.ts +230 -0
- package/src/cli/mcp/proxy-env.ts +62 -0
- package/src/cli/mcp/readiness-projection.ts +24 -0
- package/src/cli/mcp/redaction.ts +21 -0
- package/src/cli/mcp/repo.ts +24 -0
- package/src/cli/mcp/repository-tools.ts +1295 -0
- package/src/cli/mcp/server.ts +341 -0
- package/src/cli/mcp/setup.ts +793 -0
- package/src/cli/mcp/tool-capability-cache.ts +87 -0
- package/src/cli/mcp/tools.ts +9 -0
- package/src/cli/mcp/toolset-names.ts +70 -0
- package/src/cli/mcp/toolset-selection.ts +41 -0
- package/src/cli/mcp/toolset.ts +300 -0
- package/src/cli/mcp/transports/AGENTS.md +39 -0
- package/src/cli/mcp/transports/CLAUDE.md +39 -0
- package/src/cli/mcp/transports/http.ts +1234 -0
- package/src/cli/mcp/transports/session-registry.ts +428 -0
- package/src/cli/mcp/transports/stdio.ts +8 -0
- package/src/cli/mcp/types.ts +41 -0
- package/src/cli/mcp/umbrella-tools.ts +117 -0
- package/src/cli/repo-adoption/reclaim-runtime.ts +681 -0
- package/src/cli/repositories/branch-name-policy.ts +57 -0
- package/src/cli/repositories/command-classifier.ts +600 -0
- package/src/cli/repositories/command-executor.ts +1066 -0
- package/src/cli/repositories/command-normalization.ts +53 -0
- package/src/cli/repositories/command-scope.ts +264 -0
- package/src/cli/repositories/controller-home.ts +88 -0
- package/src/cli/repositories/entity-migration.ts +199 -0
- package/src/cli/repositories/ephemeral-workspace.ts +62 -0
- package/src/cli/repositories/git-command-executor.ts +301 -0
- package/src/cli/repositories/goal-registry.ts +239 -0
- package/src/cli/repositories/identity.ts +64 -0
- package/src/cli/repositories/local-project-onboarding.ts +539 -0
- package/src/cli/repositories/locks.ts +262 -0
- package/src/cli/repositories/registry.ts +1057 -0
- package/src/cli/repositories/runtime-storage.ts +411 -0
- package/src/cli/repositories/safe-patch.ts +421 -0
- package/src/cli/repositories/selected-path-actions.ts +341 -0
- package/src/cli/repositories/structured-git.ts +257 -0
- package/src/cli/repositories/types.ts +155 -0
- package/src/cli/repositories/umbrella.ts +134 -0
- package/src/cli/repositories/workbench.ts +140 -0
- package/src/cli/repositories/worktree-storage.ts +137 -0
- package/src/cli/repository/inspector.ts +637 -0
- package/src/cli/repository/session-cache.ts +453 -0
- package/src/cli/runtime/helper-runner.ts +172 -0
- package/src/cli/runtime-invocation.ts +318 -0
- package/src/cli/tools/codegraph.ts +676 -0
- package/src/cli/v81-entry.ts +29 -0
- package/src/core/adoption/gitignore-plan.ts +127 -0
- package/src/core/adoption/helper-wrapper-plan.ts +159 -0
- package/src/core/adoption/manifest-templates.ts +60 -0
- package/src/core/adoption/modes.ts +7 -0
- package/src/core/adoption/operations.ts +126 -0
- package/src/core/adoption/plan.ts +149 -0
- package/src/core/adoption/render.ts +70 -0
- package/src/core/adoption/rollback.ts +62 -0
- package/src/core/adoption/summary.ts +43 -0
- package/src/core/adoption/workflow-contract-asset.ts +14 -0
- package/src/core/adoption/workflow-contract-plan.ts +31 -0
- package/src/effects/fs-transaction.ts +540 -0
- package/src/effects/git-executable.ts +59 -0
- package/src/effects/managed-block.ts +86 -0
- package/src/effects/path-safety.ts +47 -0
- package/src/effects/process-runner.ts +192 -0
- package/src/runtime/assistant/action-proposals.ts +279 -0
- package/src/runtime/assistant/intent.ts +395 -0
- package/src/runtime/assistant/model-provider.ts +460 -0
- package/src/runtime/assistant/openapi.ts +223 -0
- package/src/runtime/assistant/policy.ts +89 -0
- package/src/runtime/assistant/readiness.ts +258 -0
- package/src/runtime/assistant/routine-runtime.ts +477 -0
- package/src/runtime/assistant/schedule-binding.ts +171 -0
- package/src/runtime/assistant/standing-grants.ts +375 -0
- package/src/runtime/assistant/store.ts +243 -0
- package/src/runtime/assistant/types.ts +135 -0
- package/src/runtime/context/codegraph-read-provider.ts +347 -0
- package/src/runtime/context/codegraph-sidecar.cjs +207 -0
- package/src/runtime/control-plane/dispatch-priority.ts +67 -0
- package/src/runtime/control-plane/execution/direct-edit-work-completion.ts +151 -0
- package/src/runtime/control-plane/execution/execution-identity.ts +456 -0
- package/src/runtime/control-plane/execution/session-store.ts +175 -0
- package/src/runtime/control-plane/execution/validation.ts +117 -0
- package/src/runtime/control-plane/execution/verification-evidence.ts +191 -0
- package/src/runtime/control-plane/execution/work-handle-store.ts +225 -0
- package/src/runtime/control-plane/execution/work-prepare-request-store.ts +159 -0
- package/src/runtime/control-plane/execution/work-task-receipt.ts +445 -0
- package/src/runtime/control-plane/execution/work-terminal-cleanup.ts +821 -0
- package/src/runtime/control-plane/facade/capability-registry.ts +279 -0
- package/src/runtime/control-plane/facade/check-normalization.ts +233 -0
- package/src/runtime/control-plane/facade/codex-delegation.ts +196 -0
- package/src/runtime/control-plane/facade/controller-session-store.ts +199 -0
- package/src/runtime/control-plane/facade/facade-result.ts +41 -0
- package/src/runtime/control-plane/facade/goal-workloop-access.ts +177 -0
- package/src/runtime/control-plane/facade/goal-workloop.ts +1216 -0
- package/src/runtime/control-plane/facade/handoff-inbox-store.ts +221 -0
- package/src/runtime/control-plane/facade/index.ts +16 -0
- package/src/runtime/control-plane/facade/operation-digest.ts +528 -0
- package/src/runtime/control-plane/facade/plan-contract-store.ts +403 -0
- package/src/runtime/control-plane/facade/policy-gate.ts +149 -0
- package/src/runtime/control-plane/facade/requirement-board.ts +280 -0
- package/src/runtime/control-plane/facade/self-healing-loop.ts +555 -0
- package/src/runtime/control-plane/facade/suggested-actions.ts +108 -0
- package/src/runtime/control-plane/facade/types.ts +729 -0
- package/src/runtime/control-plane/facade/work-admission-policy.ts +93 -0
- package/src/runtime/control-plane/facade/work-continuation.ts +104 -0
- package/src/runtime/control-plane/facade/work-contract-store.ts +1118 -0
- package/src/runtime/control-plane/facade/work-task-projection.ts +66 -0
- package/src/runtime/control-plane/global-scheduler/reconciliation.ts +365 -0
- package/src/runtime/control-plane/global-scheduler/scheduler.ts +920 -0
- package/src/runtime/control-plane/global-scheduler/wake-signal.ts +89 -0
- package/src/runtime/control-plane/goal-loop/config-facade.ts +700 -0
- package/src/runtime/control-plane/goal-loop/config-store.ts +570 -0
- package/src/runtime/control-plane/goal-loop/config-types.ts +213 -0
- package/src/runtime/control-plane/goal-loop/executor-router.ts +109 -0
- package/src/runtime/control-plane/goal-loop/failure-taxonomy.ts +149 -0
- package/src/runtime/control-plane/goal-loop/goal-contract-store.ts +304 -0
- package/src/runtime/control-plane/goal-loop/goal-loop-engine.ts +1001 -0
- package/src/runtime/control-plane/goal-loop/handoff-packet.ts +160 -0
- package/src/runtime/control-plane/goal-loop/index.ts +13 -0
- package/src/runtime/control-plane/goal-loop/local-tools.ts +290 -0
- package/src/runtime/control-plane/goal-loop/policy-gates.ts +203 -0
- package/src/runtime/control-plane/goal-loop/provider-dispatch.ts +93 -0
- package/src/runtime/control-plane/goal-loop/provider-registry.ts +545 -0
- package/src/runtime/control-plane/goal-loop/types.ts +378 -0
- package/src/runtime/control-plane/governance/access-policy.ts +147 -0
- package/src/runtime/control-plane/governance/authorization.ts +195 -0
- package/src/runtime/control-plane/governance/external-effects.ts +43 -0
- package/src/runtime/control-plane/launcher/thin-launcher.ts +97 -0
- package/src/runtime/control-plane/persistence/metadata-payload-policy.ts +53 -0
- package/src/runtime/control-plane/persistence/requirement-store.ts +241 -0
- package/src/runtime/control-plane/persistence/sqlite-store.ts +539 -0
- package/src/runtime/control-plane/release-retention.ts +447 -0
- package/src/runtime/control-plane/repo-actor/actor.ts +181 -0
- package/src/runtime/control-plane/repo-actor/registry.ts +20 -0
- package/src/runtime/control-plane/routing/index.ts +1 -0
- package/src/runtime/control-plane/routing/route-policy.ts +379 -0
- package/src/runtime/control-plane/runtime-cleanup.ts +727 -0
- package/src/runtime/control-plane/runtime-generation.ts +509 -0
- package/src/runtime/control-plane/runtime-pid-ownership.ts +11 -0
- package/src/runtime/control-plane/runtime-status-client.ts +90 -0
- package/src/runtime/control-plane/startup-recovery.ts +198 -0
- package/src/runtime/diagnostics/connectivity-observability.ts +475 -0
- package/src/runtime/diagnostics/mcp-timing.ts +64 -0
- package/src/runtime/diagnostics/performance.ts +379 -0
- package/src/runtime/diagnostics/process-facade.ts +350 -0
- package/src/runtime/diagnostics/read-only-tool.ts +226 -0
- package/src/runtime/evidence/artifact-store.ts +154 -0
- package/src/runtime/evidence/event-ledger.ts +80 -0
- package/src/runtime/evidence/evidence-store.ts +68 -0
- package/src/runtime/evidence/process-check-receipt.ts +43 -0
- package/src/runtime/evidence/result-store.ts +209 -0
- package/src/runtime/evidence/sensitive-output.ts +353 -0
- package/src/runtime/execution/jobs/child-reference.ts +124 -0
- package/src/runtime/execution/jobs/legacy-adapter.ts +22 -0
- package/src/runtime/execution/jobs/receipt-recovery.ts +119 -0
- package/src/runtime/execution/jobs/receipt-store.ts +243 -0
- package/src/runtime/execution/jobs/store.ts +737 -0
- package/src/runtime/execution/jobs/timeouts.ts +109 -0
- package/src/runtime/execution/jobs/types.ts +230 -0
- package/src/runtime/execution/jobs/wait.ts +45 -0
- package/src/runtime/execution/process-runtime/canary.ts +26 -0
- package/src/runtime/execution/process-runtime/check-facade.ts +272 -0
- package/src/runtime/execution/process-runtime/check-receipt.ts +185 -0
- package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +60 -0
- package/src/runtime/execution/process-runtime/command-facade.ts +321 -0
- package/src/runtime/execution/process-runtime/gc.ts +171 -0
- package/src/runtime/execution/process-runtime/index.ts +9 -0
- package/src/runtime/execution/process-runtime/interactive-admission.ts +23 -0
- package/src/runtime/execution/process-runtime/process-runner-entry.ts +466 -0
- package/src/runtime/execution/process-runtime/resource-claims.ts +440 -0
- package/src/runtime/execution/process-runtime/runtime.ts +1816 -0
- package/src/runtime/execution/process-runtime/store.ts +687 -0
- package/src/runtime/execution/process-runtime/types.ts +352 -0
- package/src/runtime/execution/thin-harness/async-process.ts +181 -0
- package/src/runtime/execution/thin-harness/batch-executor.ts +671 -0
- package/src/runtime/execution/thin-harness/execution-router.ts +700 -0
- package/src/runtime/execution/thin-harness/fast-executor.ts +1263 -0
- package/src/runtime/execution/thin-harness/fast-receipt.ts +235 -0
- package/src/runtime/execution/thin-harness/fingerprint-worker.ts +191 -0
- package/src/runtime/execution/thin-harness/index.ts +13 -0
- package/src/runtime/execution/thin-harness/latency-trace.ts +107 -0
- package/src/runtime/execution/thin-harness/lightweight-lanes.ts +745 -0
- package/src/runtime/execution/thin-harness/mutation-gate.ts +578 -0
- package/src/runtime/execution/thin-harness/proposal-store.ts +409 -0
- package/src/runtime/execution/thin-harness/request-ledger.ts +595 -0
- package/src/runtime/execution/thin-harness/search-worker.ts +114 -0
- package/src/runtime/execution/thin-harness/types.ts +313 -0
- package/src/runtime/execution/thin-harness/workspace-savepoint.ts +333 -0
- package/src/runtime/execution/workers/executor.ts +687 -0
- package/src/runtime/execution/workers/ownership.ts +94 -0
- package/src/runtime/execution/workers/worker-entry.ts +277 -0
- package/src/runtime/gateway/mcp/execution-tools.ts +2009 -0
- package/src/runtime/gateway/mcp/persisted-check-process.ts +255 -0
- package/src/runtime/gateway/mcp/process-tools.ts +230 -0
- package/src/runtime/gateway/mcp/resource-policy.ts +195 -0
- package/src/runtime/gateway/mcp/router.ts +1088 -0
- package/src/runtime/gateway/mcp/runtime-tools.ts +5994 -0
- package/src/runtime/gateway/mcp/work-validation-reconciler.ts +219 -0
- package/src/runtime/health/evaluator.ts +474 -0
- package/src/runtime/health/index.ts +2 -0
- package/src/runtime/health/operational-view.ts +198 -0
- package/src/runtime/maintenance/cleanup.ts +419 -0
- package/src/runtime/model-clients/deepseek-adapter.ts +312 -0
- package/src/runtime/model-clients/index.ts +2 -0
- package/src/runtime/model-clients/types.ts +101 -0
- package/src/runtime/observability/gateway-contention-metrics.ts +129 -0
- package/src/runtime/observability/route-session-benchmark.ts +110 -0
- package/src/runtime/personal-assistant/gmail-triage-manager.ts +231 -0
- package/src/runtime/personal-assistant/reporting-runtime.ts +344 -0
- package/src/runtime/personal-assistant/triage-runtime.ts +748 -0
- package/src/runtime/plugins/app-store-connect-adapter.ts +868 -0
- package/src/runtime/plugins/browser-adapter.ts +2812 -0
- package/src/runtime/plugins/browser-automation-service.ts +46 -0
- package/src/runtime/plugins/browser-handoff-host.ts +304 -0
- package/src/runtime/plugins/browser-handoff.ts +371 -0
- package/src/runtime/plugins/browser-macos-bridge.ts +865 -0
- package/src/runtime/plugins/browser-node-bridge-host.ts +64 -0
- package/src/runtime/plugins/browser-node-bridge.ts +249 -0
- package/src/runtime/plugins/desktop-adapter.ts +374 -0
- package/src/runtime/plugins/desktop-operator-registration.ts +418 -0
- package/src/runtime/plugins/errors.ts +39 -0
- package/src/runtime/plugins/execution-origin.ts +26 -0
- package/src/runtime/plugins/external-adapter.ts +322 -0
- package/src/runtime/plugins/external-registration.ts +308 -0
- package/src/runtime/plugins/external-unix-socket-probe.cjs +79 -0
- package/src/runtime/plugins/external-unix-socket.ts +238 -0
- package/src/runtime/plugins/first-party-registry.ts +37 -0
- package/src/runtime/plugins/github-adapter.ts +266 -0
- package/src/runtime/plugins/gmail-adapter.ts +729 -0
- package/src/runtime/plugins/google-calendar-adapter.ts +468 -0
- package/src/runtime/plugins/google-shared.ts +578 -0
- package/src/runtime/plugins/google-tasks-adapter.ts +535 -0
- package/src/runtime/plugins/interaction-session.ts +252 -0
- package/src/runtime/plugins/ios/agent-device-capabilities.ts +258 -0
- package/src/runtime/plugins/ios/agent-device-failures.ts +95 -0
- package/src/runtime/plugins/ios/agent-device-provider.ts +63 -0
- package/src/runtime/plugins/ios/agent-device-typed-provider.ts +268 -0
- package/src/runtime/plugins/ios/app-adapters.ts +122 -0
- package/src/runtime/plugins/ios-adapter.ts +509 -0
- package/src/runtime/plugins/ios-agent-device.ts +2311 -0
- package/src/runtime/plugins/ios-physical-device.ts +955 -0
- package/src/runtime/plugins/local-system-adapter.ts +1016 -0
- package/src/runtime/plugins/macos-capability-broker.ts +73 -0
- package/src/runtime/plugins/managed-process-adapter.ts +366 -0
- package/src/runtime/plugins/resend-adapter.ts +506 -0
- package/src/runtime/plugins/store.ts +1025 -0
- package/src/runtime/plugins/types.ts +138 -0
- package/src/runtime/projections/controller-context.ts +596 -0
- package/src/runtime/projections/git-status-sampler.ts +84 -0
- package/src/runtime/projections/invalidation.ts +250 -0
- package/src/runtime/projections/materialized-view.ts +694 -0
- package/src/runtime/recovery/actions.ts +158 -0
- package/src/runtime/recovery/audit.ts +38 -0
- package/src/runtime/recovery/classifier.ts +163 -0
- package/src/runtime/recovery/index.ts +9 -0
- package/src/runtime/recovery/local-jobs-repair.ts +393 -0
- package/src/runtime/recovery/maintenance-executor.ts +822 -0
- package/src/runtime/recovery/patch-handoff.ts +50 -0
- package/src/runtime/recovery/probe.ts +308 -0
- package/src/runtime/recovery/store.ts +35 -0
- package/src/runtime/recovery/types.ts +175 -0
- package/src/runtime/release/identity.ts +101 -0
- package/src/runtime/release/release-gate.ts +137 -0
- package/src/runtime/resources/claims/conflicts.ts +205 -0
- package/src/runtime/resources/index.ts +1 -0
- package/src/runtime/resources/leases/store.ts +539 -0
- package/src/runtime/resources/leases/types.ts +50 -0
- package/src/runtime/resources/ownership.ts +72 -0
- package/src/runtime/root/controller-services.ts +42 -0
- package/src/runtime/root/entry.ts +70 -0
- package/src/runtime/root/gateway-adapter.ts +46 -0
- package/src/runtime/root/local-bridge.ts +72 -0
- package/src/runtime/root/mcp-transport.ts +198 -0
- package/src/runtime/root/ownership.ts +94 -0
- package/src/runtime/root/readiness.ts +69 -0
- package/src/runtime/root/release-manifest.ts +147 -0
- package/src/runtime/root/release-materialize.ts +509 -0
- package/src/runtime/root/release-store.ts +236 -0
- package/src/runtime/root/runtime.ts +318 -0
- package/src/runtime/root/scheduler.ts +58 -0
- package/src/runtime/root/service-runner-entry.ts +20 -0
- package/src/runtime/root/service-runner.ts +69 -0
- package/src/runtime/root/service.ts +291 -0
- package/src/runtime/root/status.ts +127 -0
- package/src/runtime/root/types.ts +112 -0
- package/src/runtime/root/write-fence.ts +309 -0
- package/src/runtime/safe-tooling/browser-safe.ts +133 -0
- package/src/runtime/safe-tooling/external-filesystem.ts +304 -0
- package/src/runtime/safe-tooling/google-credential-store.ts +95 -0
- package/src/runtime/safe-tooling/google-oauth-broker.ts +286 -0
- package/src/runtime/safe-tooling/index.ts +11 -0
- package/src/runtime/safe-tooling/ios-development.ts +1039 -0
- package/src/runtime/safe-tooling/job-summary.ts +361 -0
- package/src/runtime/safe-tooling/plugin-summary.ts +53 -0
- package/src/runtime/safe-tooling/resend-oauth.ts +387 -0
- package/src/runtime/safe-tooling/review-artifacts.ts +133 -0
- package/src/runtime/safe-tooling/types.ts +103 -0
- package/src/runtime/safe-tooling/workspace-auth.ts +116 -0
- package/src/runtime/shared/bounded-child-supervisor.ts +235 -0
- package/src/runtime/shared/idempotent-retry.ts +128 -0
- package/src/runtime/shared/json-files.ts +43 -0
- package/src/runtime/shared/local-bridge-surface.ts +231 -0
- package/src/runtime/shared/managed-env.ts +154 -0
- package/src/runtime/shared/node-ts-loader.mjs +50 -0
- package/src/runtime/shared/process-environment.ts +97 -0
- package/src/runtime/shared/process-identity.ts +72 -0
- package/src/runtime/shared/process-tree.ts +227 -0
- package/src/runtime/shared/response-budget.ts +246 -0
- package/src/runtime/standalone-recovery/core.ts +2275 -0
- package/src/runtime/standalone-recovery/entry.ts +686 -0
- package/src/runtime/standalone-recovery/http-transport.ts +317 -0
- package/src/runtime/standalone-recovery/installer.ts +747 -0
- package/src/runtime/standalone-recovery/release.ts +241 -0
- package/src/runtime/watchdog/workflow-watchdog.ts +118 -0
- package/src/runtime/workflow/campaigns/cleanup.ts +263 -0
- package/src/runtime/workflow/campaigns/engine.ts +112 -0
- package/src/runtime/workflow/campaigns/normalize.ts +100 -0
- package/src/runtime/workflow/campaigns/review.ts +315 -0
- package/src/runtime/workflow/campaigns/store.ts +526 -0
- package/src/runtime/workflow/campaigns/supervisor.ts +112 -0
- package/src/runtime/workflow/campaigns/types.ts +290 -0
- package/src/runtime/workflow/campaigns/workspace-agent.ts +155 -0
- package/src/runtime/workflow/campaigns/workspace.ts +200 -0
- package/src/runtime/workflow/findings/store.ts +165 -0
- package/src/runtime/workflow/findings/types.ts +36 -0
- package/src/runtime/workflow/portfolio/engine.ts +20 -0
- package/src/runtime/workflow/portfolio/store.ts +185 -0
- package/src/runtime/workflow/portfolio/types.ts +29 -0
- package/src/runtime/workflow/schedules/engine.ts +620 -0
- package/src/runtime/workflow/schedules/settlement.ts +144 -0
- package/src/runtime/workflow/schedules/store.ts +417 -0
- package/src/runtime/workflow/schedules/types.ts +124 -0
- package/src/runtime/workspace-targets/index.ts +24 -0
- package/src/runtime/workspace-targets/target-grant.ts +721 -0
- package/src/testing/test-governance.ts +626 -0
- package/src/version.ts +21 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Controller reliability and automation runbook
|
|
2
|
+
|
|
3
|
+
Use this runbook when forge processes are running but tasks do not move, the UI reports readiness that does not match actual execution, or one repository affects another repository's controller resources.
|
|
4
|
+
|
|
5
|
+
## Interpret readiness in layers
|
|
6
|
+
|
|
7
|
+
Do not treat a single `ready` value as proof that autonomous delivery is active.
|
|
8
|
+
|
|
9
|
+
| Layer | What it proves | Typical evidence |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Runtime readiness | The complete Canonical Runtime passed release coherence, SQLite, in-process Scheduler, and authenticated MCP end-to-end checks. | `controller_ready.ready` plus diagnostic reason codes |
|
|
12
|
+
| Execution readiness | A suitable executor is authenticated, enabled, and able to start bounded work. | executor preflight and recent run classification |
|
|
13
|
+
| Delivery readiness | The task can be integrated, verified, accepted, and committed without unresolved repository conflicts. | clean selected paths, checks, integration evidence |
|
|
14
|
+
| Automation readiness | At least one enabled **live** schedule or live goal can create execution work. | schedule policy, occurrence status, budget and cooldown |
|
|
15
|
+
|
|
16
|
+
A shadow schedule is observation-only. It may emit `would_execute` or `shadowed`, but it does not queue or start an Execution Job. A configured provider is also not proof that work is currently running.
|
|
17
|
+
|
|
18
|
+
## First response sequence
|
|
19
|
+
|
|
20
|
+
1. Read `controller_ready` and note reason codes, source coherence, queue depth, running workers, active leases, current attention, and plugin summary.
|
|
21
|
+
2. Run `capability_recovery_probe` (and `capability_recovery_plan` when needed) to classify the blocker without mutating state.
|
|
22
|
+
3. If runtime metadata or projection state is degraded, inspect `runtime_maintenance_status` before requesting any external lifecycle action.
|
|
23
|
+
4. Apply `runtime_maintenance_apply` only for a reviewed bounded metadata candidate. It may reconcile local jobs or rebuild projections; it must not perform Runtime lifecycle changes or source-code repair.
|
|
24
|
+
5. Re-run `controller_ready` and `rh_status`, then retry the original operation with the same intent. If source coherence is blocked, follow the external lifecycle handoff for the existing single `forge-runtime`; do not attempt an in-process restart, component restart, second Runtime, or rollout.
|
|
25
|
+
|
|
26
|
+
## Schedule diagnosis
|
|
27
|
+
|
|
28
|
+
Use `list_schedules` with occurrences enabled and classify each enabled schedule:
|
|
29
|
+
|
|
30
|
+
- **shadow**: `policy.shadowMode` is true; no execution should be expected.
|
|
31
|
+
- **live but idle**: live schedule exists, but no occurrence is `created`, `queued`, or `running`.
|
|
32
|
+
- **live and active**: a live schedule has an occurrence in one of those active states.
|
|
33
|
+
- **blocked by policy**: occurrence is suppressed by cooldown, failure threshold, daily budget, dependency, or stop condition.
|
|
34
|
+
|
|
35
|
+
Do not turn every schedule live. Health snapshots and cleanup previews should normally remain shadow/read-only. Enable live execution only for a bounded action with explicit budget, cooldown, failure limit, and stop conditions.
|
|
36
|
+
|
|
37
|
+
## Failed-run classification
|
|
38
|
+
|
|
39
|
+
Classify the last failure before retrying:
|
|
40
|
+
|
|
41
|
+
- `auth_required`: authenticate the named executor or plugin; do not retry in a loop.
|
|
42
|
+
- `usage_limit` or provider capacity: select an allowed fallback or wait for the provider boundary to clear.
|
|
43
|
+
- interactive stdin / startup timeout: fail fast and relaunch with a non-interactive invocation.
|
|
44
|
+
- canonical Runtime process disappeared: reconcile the run as `unknown`, then inspect Runtime ownership and standalone Recovery evidence before retrying.
|
|
45
|
+
- patch precondition failed: refresh file fingerprints and reapply only selected paths. Never overwrite unrelated dirty work.
|
|
46
|
+
- check failure: separate failures introduced by the current diff from known baseline failures and retain both evidence sets.
|
|
47
|
+
|
|
48
|
+
A stale health label must not override live run evidence. A run that is producing heartbeats, edits, and test output is active even if an old executor snapshot still says `auth_required`; fix the stale status projection rather than discarding the run.
|
|
49
|
+
|
|
50
|
+
## Multi-repository resource isolation
|
|
51
|
+
|
|
52
|
+
High CPU must be attributed to a repository before action. Record the process command, repository root, PID, CPU, and owner controller. A busy MCP process from another repository is a peer-repository incident, not proof that the current repository is unhealthy.
|
|
53
|
+
|
|
54
|
+
Recommended policy:
|
|
55
|
+
|
|
56
|
+
- one controller-home repository namespace per registered repository;
|
|
57
|
+
- repository-scoped leases, schedules, local jobs, and cleanup candidates;
|
|
58
|
+
- per-repository CPU/memory diagnostics and watchdog thresholds;
|
|
59
|
+
- no cross-repository process termination from a repository-scoped repair action;
|
|
60
|
+
- explicit operator authorization before terminating a peer repository process.
|
|
61
|
+
|
|
62
|
+
## Whole-Runtime restart and reconnect contract
|
|
63
|
+
|
|
64
|
+
`CanonicalForgeRuntime` is the only core lifecycle owner. Repository tools, MCP handlers, Workers, Local Bridge, diagnostics, and tunnels cannot start, stop, restart, adopt, roll out, or roll back a core component. The repository no longer contains Supervisor, KeepAlive, restart-coordinator, or component lifecycle shell entrypoints.
|
|
65
|
+
|
|
66
|
+
A release change is performed only as an explicitly authorized whole-Runtime operation:
|
|
67
|
+
|
|
68
|
+
1. validate one immutable release manifest, configuration, database compatibility range, and Worker protocol;
|
|
69
|
+
2. quiesce admission and stop the complete Runtime;
|
|
70
|
+
3. atomically select the candidate as the one active whole release;
|
|
71
|
+
4. let the single Forge Runtime service start `forge-runtime` from that complete release;
|
|
72
|
+
5. require binary whole-Runtime readiness;
|
|
73
|
+
6. on failure, stop the service, restore the previous release and its bound local SQLite backup, then start and verify the complete previous Runtime.
|
|
74
|
+
|
|
75
|
+
There is no blue-green pair, fixed alternate port, slot adoption, mixed-generation traffic, or component rollback. Release safety comes from pre-activation canaries, immutable artifacts, one atomic active/previous authority, whole-Runtime readiness, and previous-release recovery.
|
|
76
|
+
|
|
77
|
+
A whole-Runtime restart closes in-flight MCP sockets. Continuity comes from durable request, Work, Job, and evidence identifiers, not from a traffic router or component adoption. Retry the same idempotent request after the endpoint is healthy and continue reading the existing durable state. Recreate or rescan the ChatGPT Connector only after an authentication/schema change or an explicit connector-staleness result.
|
|
78
|
+
|
|
79
|
+
The standalone Recovery watchdog uses the same service and release contracts. It first attempts a bounded whole-Runtime service restart. After the configured attempts are exhausted, it permits automatic previous-release recovery only with sustained independent failure evidence and an attested previous release. One Recovery lock prevents concurrent restart or rollback storms.
|
|
80
|
+
|
|
81
|
+
After a restart or automatic recovery, confirm:
|
|
82
|
+
|
|
83
|
+
1. `controller_ready.ready` is true and all diagnostic evidence belongs to the same Runtime instance and release.
|
|
84
|
+
2. `controller_capabilities` reports the expected tool fingerprint.
|
|
85
|
+
3. The public `/health` and OAuth protected-resource endpoint return valid responses.
|
|
86
|
+
4. Previously accepted Work/Job identifiers remain readable and no mutation was blindly replayed.
|
|
87
|
+
5. No old Worker can renew Leases or commit results under the new Runtime/release fence.
|
|
88
|
+
|
|
89
|
+
## Cleanup
|
|
90
|
+
|
|
91
|
+
Run cleanup as preview-first work:
|
|
92
|
+
|
|
93
|
+
1. Inspect `runtime_cleanup` or the cleanup preview from performance diagnostics.
|
|
94
|
+
2. Select only forge-owned, repo-scoped candidates.
|
|
95
|
+
3. Exclude active worktrees, active local jobs, pending approvals, and processes whose ownership is uncertain.
|
|
96
|
+
4. Apply `runtime_cleanup_apply` with an age threshold and bounded candidate count.
|
|
97
|
+
5. Confirm that the repository projection and active work remain intact.
|
|
98
|
+
|
|
99
|
+
Temporary directories should have a TTL, but age alone is not sufficient: current leases and worktree registration remain authoritative.
|
|
100
|
+
|
|
101
|
+
## Plugin degraded states
|
|
102
|
+
|
|
103
|
+
Distinguish lifecycle from action readiness:
|
|
104
|
+
|
|
105
|
+
- `enabled + ready`: configured actions can run, subject to confirmation policy.
|
|
106
|
+
- `enabled + degraded`: plugin is selected but missing auth, permission, or provider availability.
|
|
107
|
+
- `disabled`: not part of the current capability set.
|
|
108
|
+
- `ready but not applicable`: tooling exists, but the repository has no matching project or artifact.
|
|
109
|
+
|
|
110
|
+
For Google Workspace plugins, resolve the specific credential source and required scope. Do not report the whole controller as delivery-ready when a task requires a degraded plugin.
|
|
111
|
+
|
|
112
|
+
## Board governance
|
|
113
|
+
|
|
114
|
+
A healthy runtime can still have an unhealthy delivery board. Regularly:
|
|
115
|
+
|
|
116
|
+
- select one current focus when focus is required;
|
|
117
|
+
- review completed tasks and accept verified work;
|
|
118
|
+
- retry or explicitly unblock failed attempts;
|
|
119
|
+
- archive terminal issues after evidence is retained;
|
|
120
|
+
- keep generated runtime metadata out of long-lived source diffs;
|
|
121
|
+
- clean merged worktrees and delete merged branches.
|
|
122
|
+
|
|
123
|
+
Do not create more automation work while review, acceptance, and failed-run queues are growing unchecked.
|
|
124
|
+
|
|
125
|
+
## Exit criteria
|
|
126
|
+
|
|
127
|
+
Reliability work is complete only when:
|
|
128
|
+
|
|
129
|
+
- runtime and projection report a coherent state;
|
|
130
|
+
- automation reporting distinguishes shadow, live-idle, and live-active states;
|
|
131
|
+
- targeted checks pass or remaining baseline failures are explicitly documented;
|
|
132
|
+
- selected-path changes are committed without absorbing unrelated work;
|
|
133
|
+
- the feature branch is merged and its worktree is removed;
|
|
134
|
+
- no destructive cleanup or peer-repository process action occurred without authorization.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Environment and DX hardening
|
|
2
|
+
|
|
3
|
+
forge supports two local development profiles:
|
|
4
|
+
|
|
5
|
+
1. **Full Bun profile** — required for the exhaustive `bun:test` suite and Bun-native scripts.
|
|
6
|
+
2. **Portable Node profile** — supports install, CLI launch, typecheck, runtime smoke checks, and Node smoke tests when Bun is not available.
|
|
7
|
+
|
|
8
|
+
## Commands
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm run check:env
|
|
12
|
+
npm run check:type -- --pretty false
|
|
13
|
+
npm test
|
|
14
|
+
npm run check:ci:portable
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`npm test` now uses `scripts/run-tests-portable.sh`. When Bun is installed it runs the full Bun test suite. When Bun is missing it runs `tests/node/*.test.mjs` and prints a clear warning that exhaustive tests still require Bun.
|
|
18
|
+
|
|
19
|
+
## Full CI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
bash scripts/check-ci.sh
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Full CI still requires Bun because the repository test suite imports `bun:test` in many files. To run a Node-only gate instead:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
FORGE_ALLOW_NODE_ONLY=1 bash scripts/check-ci.sh
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Installation runtime selection
|
|
32
|
+
|
|
33
|
+
`install.sh` supports:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
FORGE_INSTALL_RUNTIME=auto ./install.sh
|
|
37
|
+
FORGE_INSTALL_RUNTIME=node ./install.sh
|
|
38
|
+
FORGE_INSTALL_RUNTIME=bun ./install.sh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`auto` uses Bun when available and falls back to Node.js 20+ with npm when Bun is missing.
|
|
42
|
+
|
|
43
|
+
## Dev container
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
docker build -f Dockerfile.dev -t forge-dev .
|
|
47
|
+
docker run --rm -it -v "$PWD:/workspace" forge-dev bash
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The dev container includes Node, npm, Bun, bash, git, and OpenSSH client so CI and local smoke commands behave consistently across machines.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Features and Setup Levels
|
|
2
|
+
|
|
3
|
+
Forge is useful without coding agents or external plugins. Start with the core workflow, then add integrations only when a task requires them.
|
|
4
|
+
|
|
5
|
+
## Core features
|
|
6
|
+
|
|
7
|
+
These features are part of the default local setup:
|
|
8
|
+
|
|
9
|
+
- repository registration with stable `repoId` and `checkoutId` identities;
|
|
10
|
+
- bounded repository inspection and context collection;
|
|
11
|
+
- five preferred ChatGPT facade tools: `rh_status`, `rh_access`, `rh_inbox`, `rh_context`, and `rh_work`, plus a stable repair-capable default MCP schema;
|
|
12
|
+
- Direct Edit sessions with path limits, SHA preconditions, revisions, savepoints, diffs, checks, and rollback;
|
|
13
|
+
- durable Issue → Task → Run state and resumable evidence;
|
|
14
|
+
- named verification checks instead of arbitrary remote shell access;
|
|
15
|
+
- local Controller UI and append-only activity/evidence records;
|
|
16
|
+
- runtime storage isolation under Controller Home;
|
|
17
|
+
- multi-repository routing and explicit target selection;
|
|
18
|
+
- release gates, tracked-file hygiene, and public export checks.
|
|
19
|
+
|
|
20
|
+
## Optional features
|
|
21
|
+
|
|
22
|
+
| Integration | What it adds | Requirement |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Codex / Claude | Delegated implementation for work too large for Direct Edit | Install and authenticate the corresponding CLI; explicitly enable the dev runner. |
|
|
25
|
+
| GitHub | Issue/Project synchronization, PR workflows, cloud-agent sessions | Authenticated `gh` and repository permission. |
|
|
26
|
+
| Tailscale / Cloudflare | Stable HTTPS endpoint for ChatGPT MCP | Tunnel client and appropriate account/domain configuration. |
|
|
27
|
+
| Browser | Playwright navigation, screenshots, and bounded browser evidence | Browser binaries and allowed domains. |
|
|
28
|
+
| CodeGraph | Additional code relationships and impact navigation | CodeGraph CLI; native Windows automatic setup is not yet enabled. |
|
|
29
|
+
| Google Workspace | Gmail and Calendar assistant actions | Explicit OAuth setup and plugin permission. |
|
|
30
|
+
| Schedules and findings | Supervised recurring checks and candidate findings | Canonical Forge Runtime running; live actions remain policy-gated. |
|
|
31
|
+
|
|
32
|
+
## Tool exposure
|
|
33
|
+
|
|
34
|
+
The default `core` / `advanced` toolset exposes one bounded ChatGPT-facing schema of 20 tools: the five `rh_*` workflow facades (with code retrieval routed through `rh_context.search`), repository selection, `repository_command_execute`, exact source read, `repository_safe_patch_apply`, `run_check`, one typed `plugin_action_execute` dispatcher with plugin schemas routed through `rh_context`, managed process lifecycle, result retrieval, and approval resolution. Git / issue-task / campaign / edit-session / other plugin / browser / iOS / maintenance atomics remain registered as internal handlers and are reachable through the `full` compatibility profile, which exposes every historical definition. The MCP transport does not dynamically load domain schemas; hiding from the default surface is a static exposure decision, never a handler deletion.
|
|
35
|
+
|
|
36
|
+
## Execution choices
|
|
37
|
+
|
|
38
|
+
- Use Direct Edit for small or well-bounded changes.
|
|
39
|
+
- Use durable Tasks when work must survive sessions, has dependencies, or needs formal review evidence.
|
|
40
|
+
- Delegate to an Agent only when investigation or implementation breadth justifies it.
|
|
41
|
+
- Use named checks to verify results before acceptance.
|
|
42
|
+
|
|
43
|
+
## Authorization boundaries
|
|
44
|
+
|
|
45
|
+
Reading and local bounded checks can be automatic. Repository mutations, destructive cleanup, external side effects, remote Git operations, GitHub changes, email actions, and publication remain explicitly policy-gated. Connecting ChatGPT does not grant unrestricted shell or filesystem access.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 功能与配置层级
|
|
2
|
+
|
|
3
|
+
Forge 不依赖编码 Agent 或外部插件也能使用。先完成核心工作流,再按实际任务启用集成能力。
|
|
4
|
+
|
|
5
|
+
## 核心功能
|
|
6
|
+
|
|
7
|
+
默认本地配置包含:
|
|
8
|
+
|
|
9
|
+
- 用稳定 `repoId`、`checkoutId` 注册和选择仓库;
|
|
10
|
+
- 有边界的仓库读取与上下文聚合;
|
|
11
|
+
- 五个首选 ChatGPT facade:`rh_status`、`rh_access`、`rh_inbox`、`rh_context`、`rh_work`,以及固定、可修复的默认 MCP 工具面;
|
|
12
|
+
- Direct Edit:路径限制、SHA 前置条件、多 revision、savepoint、diff、检查和回滚;
|
|
13
|
+
- 可恢复的 Issue → Task → Run 状态与执行证据;
|
|
14
|
+
- 命名检查,而不是向远端开放任意 shell;
|
|
15
|
+
- 本地 Controller UI 和追加式活动/证据记录;
|
|
16
|
+
- Controller Home 运行态隔离;
|
|
17
|
+
- 多仓库显式路由;
|
|
18
|
+
- 发布门禁、tracked-file 卫生检查和公共导出。
|
|
19
|
+
|
|
20
|
+
## 可选能力
|
|
21
|
+
|
|
22
|
+
| 集成 | 增加的能力 | 需要的环境 |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Codex / Claude | 处理超出 Direct Edit 范围的复杂实现 | 安装并登录对应 CLI,显式开启 dev runner。 |
|
|
25
|
+
| GitHub | Issue/Project 同步、PR、云端 Agent | 已认证的 `gh` 和仓库权限。 |
|
|
26
|
+
| Tailscale / Cloudflare | 为 ChatGPT MCP 提供稳定 HTTPS 地址 | 隧道客户端及对应账号/域名。 |
|
|
27
|
+
| Browser | Playwright 浏览、截图和证据 | 浏览器 binary 与允许访问的域名。 |
|
|
28
|
+
| CodeGraph | 代码关系和影响范围导航 | CodeGraph CLI;Windows 原生暂不自动配置。 |
|
|
29
|
+
| Google Workspace | Gmail、Calendar 助手能力 | 显式 OAuth 与插件权限。 |
|
|
30
|
+
| Schedule / Finding | 受监督的周期检查和候选发现 | Canonical Forge Runtime 持续运行,真实动作仍受策略控制。 |
|
|
31
|
+
|
|
32
|
+
## 工具暴露
|
|
33
|
+
|
|
34
|
+
默认 `advanced` 暴露固定、可修复且不超过 128 个工具的 schema;`core` 是同一 schema 的兼容别名。`full` 会暴露全部历史定义,只用于旧集成或深度兼容诊断。五个工作流 facade 位于强类型原子工具和内部 handler 之上,capability 元数据按领域对现有能力分组。当前 MCP transport 尚不支持会话内动态加载领域 schema,因此分组不会删除或隐藏这些强类型工具。
|
|
35
|
+
|
|
36
|
+
## 如何选择执行方式
|
|
37
|
+
|
|
38
|
+
- 小而明确的修改优先 Direct Edit。
|
|
39
|
+
- 需要跨会话、存在依赖或需要正式证据时使用持久 Task。
|
|
40
|
+
- 只有调查或实现范围确实较大时才委派 Agent。
|
|
41
|
+
- 接受结果前运行命名检查并审查 diff。
|
|
42
|
+
|
|
43
|
+
## 授权边界
|
|
44
|
+
|
|
45
|
+
读取和本地有界检查可以自动执行;仓库写入、破坏性清理、外部副作用、远程 Git、GitHub 变更、邮件动作和发布仍需策略授权。连接 ChatGPT 不代表获得任意 shell 或任意文件系统权限。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# GitHub Repository Maintenance Baseline
|
|
2
|
+
|
|
3
|
+
This document records the intended public GitHub configuration for Forge. The repository should remain useful from the README alone, while detailed behavior stays versioned under `docs/`.
|
|
4
|
+
|
|
5
|
+
## Repository metadata
|
|
6
|
+
|
|
7
|
+
- **Description:** `Local-first action assistant for durable, reviewable software work.`
|
|
8
|
+
- **Homepage:** `https://github.com/moretea-labs/forge/wiki`
|
|
9
|
+
- **Topics:** `ai-agents`, `ai-assistant`, `chatgpt`, `mcp`, `local-first`, `developer-tools`, `automation`, `agentic-workflow`, `typescript`
|
|
10
|
+
- **Features:** Issues, Discussions, Wiki, security policy, and Private Vulnerability Reporting enabled.
|
|
11
|
+
- **License:** MIT, with `NOTICE` and third-party notices preserved.
|
|
12
|
+
|
|
13
|
+
The README should keep a clear product statement, release/CI/license badges, npm-first Quick Start, architecture entry point, official-provider table, safety boundary, and direct links to docs/support/contributing.
|
|
14
|
+
|
|
15
|
+
## Main branch protection
|
|
16
|
+
|
|
17
|
+
`main` keeps linear history, blocks force-pushes and deletion, and requires the always-running `Main gate` check to pass. The Windows smoke workflow remains path-scoped: it runs when Windows/portable-runtime surfaces change and is additional evidence rather than a globally required check that would stay absent on documentation-only changes.
|
|
18
|
+
|
|
19
|
+
Forge also uses maintainer automation that can legitimately integrate reviewed local work directly. Do not add a blanket mandatory human-review rule that disables that workflow without first migrating the automation to pull requests. External contributors should use pull requests; maintainer direct integration remains subject to required checks and release gates.
|
|
20
|
+
|
|
21
|
+
## Release protection
|
|
22
|
+
|
|
23
|
+
- Protect `v*` release tags from accidental mutation/deletion where the repository ruleset supports it.
|
|
24
|
+
- Use the GitHub `npm-publish` environment for npm publication.
|
|
25
|
+
- Use npm Trusted Publishing/OIDC from `.github/workflows/release.yml`; do not store a long-lived npm token when OIDC is available.
|
|
26
|
+
- Package version, exact Git tag, npm dist-tag, and GitHub Release must agree.
|
|
27
|
+
- Release candidates publish to npm `next`; stable releases publish to `latest`.
|
|
28
|
+
- A release is not complete until npm registry state and the GitHub Release are both verified after the tag workflow finishes.
|
|
29
|
+
|
|
30
|
+
## Community surface
|
|
31
|
+
|
|
32
|
+
Keep these files current:
|
|
33
|
+
|
|
34
|
+
- `CONTRIBUTING.md`
|
|
35
|
+
- `SECURITY.md`
|
|
36
|
+
- `SUPPORT.md`
|
|
37
|
+
- `CODE_OF_CONDUCT.md`
|
|
38
|
+
- issue forms and pull-request template
|
|
39
|
+
- `.github/release.yml` release-note categories
|
|
40
|
+
|
|
41
|
+
Use Issues for reproducible defects and scoped feature requests. Use Discussions for open-ended usage questions. Security vulnerabilities belong in Private Vulnerability Reporting, never in a public issue.
|
|
42
|
+
|
|
43
|
+
## Documentation ownership
|
|
44
|
+
|
|
45
|
+
The GitHub Wiki is a presentation target. Versioned source lives under `docs/wiki/`. Deeper engineering detail remains under `docs/architecture/current/` and `docs/operations/`.
|
|
46
|
+
|
|
47
|
+
Public documentation must distinguish current facts from historical evidence. Avoid hard-coding “next release” versions in operational runbooks; derive versions from `package.json` so routine releases do not leave stale docs behind.
|
|
48
|
+
|
|
49
|
+
## Maintenance cadence
|
|
50
|
+
|
|
51
|
+
For every release candidate:
|
|
52
|
+
|
|
53
|
+
1. review the README and installation claims;
|
|
54
|
+
2. run public-doc, open-source, package, and release-surface gates;
|
|
55
|
+
3. check repository metadata, topics, security reporting, Issues/Discussions, and release notes;
|
|
56
|
+
4. verify official provider pins and fresh-install behavior when the catalog changed;
|
|
57
|
+
5. push the exact release revision and wait for required checks;
|
|
58
|
+
6. publish the exact version tag;
|
|
59
|
+
7. verify GitHub Release and npm dist-tags independently;
|
|
60
|
+
8. keep the release notes concise, user-facing, and linked to upgrade/support documentation.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Durable Gmail Assistant Routines
|
|
2
|
+
|
|
3
|
+
Gmail Assistant Routines use the existing Repository Schedule Engine and durable Execution Jobs. They do not introduce a second cron service.
|
|
4
|
+
|
|
5
|
+
## Execution flow
|
|
6
|
+
|
|
7
|
+
1. Creating a confirmed Assistant Routine persists the Routine and creates one Repository Schedule.
|
|
8
|
+
2. The Schedule stores an IANA timezone, a five-field local cron expression, and a bounded catch-up window.
|
|
9
|
+
3. A due occurrence creates one `assistant_routine_execute` Runtime Job with an exclusive Routine resource claim.
|
|
10
|
+
4. The Runtime Job reads Gmail incrementally, hydrates bounded message bodies, advances the per-Routine cursor, analyzes the bounded message set, creates structured action proposals, and writes a final Assistant Inbox report.
|
|
11
|
+
5. Proposals either remain pending for explicit approval or match a previously authorized Standing Grant.
|
|
12
|
+
6. Every approved or Standing-Grant action runs as a separate durable plugin Job. Schedule execution never becomes remote-write authorization.
|
|
13
|
+
7. Sending mail and moving mail to Trash retain their existing strong-confirmation requirements and are never Standing-Grant eligible.
|
|
14
|
+
|
|
15
|
+
## Google OAuth setup
|
|
16
|
+
|
|
17
|
+
Create a Google OAuth client with this loopback redirect URI:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
http://127.0.0.1:8766/oauth/google/callback
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Expose the client configuration only through the managed secret environment:
|
|
24
|
+
|
|
25
|
+
- `FORGE_GOOGLE_CLIENT_ID`
|
|
26
|
+
- `FORGE_GOOGLE_CLIENT_SECRET`
|
|
27
|
+
|
|
28
|
+
The `FORGE_GOOGLE_WORKSPACE_CLIENT_ID` and `FORGE_GOOGLE_WORKSPACE_CLIENT_SECRET` aliases are also supported.
|
|
29
|
+
|
|
30
|
+
Call `workspace_auth_login_prepare` for `gmail` or `google-workspace`, then open the returned authorization URL. The request uses OAuth Authorization Code flow with PKCE, a random one-time state, a ten-minute expiry, and a loopback-only callback. Redirect URIs outside `127.0.0.1` or `localhost`, unexpected callback paths, and scopes outside the Gmail/Calendar/Tasks allowlist are rejected.
|
|
31
|
+
|
|
32
|
+
The callback exchanges the authorization code and stores only the refresh token in macOS Keychain. Access and refresh tokens are never returned through MCP, written to repository files, or written to normal Controller runtime state. The transient PKCE verifier is stored under Controller Home with restrictive permissions and is redacted after the callback is consumed.
|
|
33
|
+
|
|
34
|
+
The current secure persistence backend is macOS Keychain. Non-macOS hosts must provide a supported credential-store adapter or use managed environment credentials.
|
|
35
|
+
|
|
36
|
+
## Credential refresh and readiness
|
|
37
|
+
|
|
38
|
+
A configured access token is not considered provider-verified until a real Google API request succeeds. Before that first successful probe, health reports `live_token_unverified`.
|
|
39
|
+
|
|
40
|
+
After OAuth setup, Controller restarts can reload the refresh token from Keychain. When no valid cached access token exists, or Gmail returns HTTP 401/403, the provider performs one refresh-token exchange and at most one request retry. A failed refresh is classified as `PLUGIN_AUTH_FAILED`; the Routine Run becomes `auth_required` and Assistant Inbox requests reauthorization.
|
|
41
|
+
|
|
42
|
+
Managed environment credentials remain compatible:
|
|
43
|
+
|
|
44
|
+
- `FORGE_GMAIL_ACCESS_TOKEN`
|
|
45
|
+
- `FORGE_GMAIL_REFRESH_TOKEN`
|
|
46
|
+
- `FORGE_GMAIL_CLIENT_ID`
|
|
47
|
+
- `FORGE_GMAIL_CLIENT_SECRET`
|
|
48
|
+
- `FORGE_GOOGLE_WORKSPACE_ACCESS_TOKEN`
|
|
49
|
+
- `FORGE_GOOGLE_WORKSPACE_REFRESH_TOKEN`
|
|
50
|
+
- `FORGE_GOOGLE_WORKSPACE_CLIENT_ID`
|
|
51
|
+
- `FORGE_GOOGLE_WORKSPACE_CLIENT_SECRET`
|
|
52
|
+
|
|
53
|
+
## Scheduling semantics
|
|
54
|
+
|
|
55
|
+
Routine schedule text is normalized when the Routine is created. The first implementation recognizes daily and weekday expressions with an optional `HH:mm` or Chinese `点/时` form. Examples:
|
|
56
|
+
|
|
57
|
+
- `每天 09:00`
|
|
58
|
+
- `每周一 08:30`
|
|
59
|
+
- `Monday 07:00`
|
|
60
|
+
|
|
61
|
+
The normalized Schedule preserves the IANA timezone, so daylight-saving transitions remain aligned to local wall-clock time. Missed runs catch up at most once inside the configured window because the occurrence key is derived from the local scheduled minute rather than the actual wake-up minute.
|
|
62
|
+
|
|
63
|
+
## Gmail History cursor
|
|
64
|
+
|
|
65
|
+
Each Routine stores an independent cursor under `.forge/assistant/gmail-cursors.json`:
|
|
66
|
+
|
|
67
|
+
- last successful collection time
|
|
68
|
+
- bounded processed-message ID set
|
|
69
|
+
- Gmail `historyId`
|
|
70
|
+
- a bounded History or query continuation token while a backlog is still being drained
|
|
71
|
+
|
|
72
|
+
After the initial query, Gmail History is the primary incremental source. An expired History ID falls back to a five-minute-overlap Gmail query. Collection reads at most five pages, 100 IDs, and 50 full messages per run. If the page or hydration limit is reached, the history cursor does not advance; a continuation token or the original window is retained so the next run drains the remaining messages without loss.
|
|
73
|
+
|
|
74
|
+
## Optional model analysis
|
|
75
|
+
|
|
76
|
+
The model layer is optional. When it is disabled, unavailable, times out, or returns malformed output, the Routine completes with the deterministic rules engine rather than failing.
|
|
77
|
+
|
|
78
|
+
Configure an OpenAI-compatible endpoint with:
|
|
79
|
+
|
|
80
|
+
- `FORGE_ASSISTANT_MODEL_PROVIDER=openai-compatible`
|
|
81
|
+
- `FORGE_ASSISTANT_MODEL_ENDPOINT`
|
|
82
|
+
- `FORGE_ASSISTANT_MODEL`
|
|
83
|
+
- `FORGE_ASSISTANT_MODEL_API_KEY`
|
|
84
|
+
|
|
85
|
+
For the exact official hosts, provider-specific keys are also supported:
|
|
86
|
+
|
|
87
|
+
- `api.openai.com` may use `OPENAI_API_KEY`
|
|
88
|
+
- `api.deepseek.com` may use `FORGE_DEEPSEEK_API_KEY` or `DEEPSEEK_API_KEY`
|
|
89
|
+
|
|
90
|
+
A custom endpoint never receives `OPENAI_API_KEY` or a DeepSeek key. It must use the dedicated `FORGE_ASSISTANT_MODEL_API_KEY`. Endpoints must use HTTPS, except loopback HTTP used for a local model.
|
|
91
|
+
|
|
92
|
+
Optional budgets:
|
|
93
|
+
|
|
94
|
+
- `FORGE_ASSISTANT_MODEL_TIMEOUT_MS`
|
|
95
|
+
- `FORGE_ASSISTANT_MODEL_MAX_MESSAGES`
|
|
96
|
+
- `FORGE_ASSISTANT_MODEL_MAX_INPUT_CHARS`
|
|
97
|
+
- `FORGE_ASSISTANT_MODEL_MAX_OUTPUT_TOKENS`
|
|
98
|
+
|
|
99
|
+
The provider requests strict structured JSON, validates the result locally, and maps only these proposal types:
|
|
100
|
+
|
|
101
|
+
- Gmail draft creation
|
|
102
|
+
- Google Task creation
|
|
103
|
+
- Gmail archive
|
|
104
|
+
- Gmail mark read or unread
|
|
105
|
+
|
|
106
|
+
Email contents are untrusted input. Instructions in an email, quoted thread, signature, link, or attachment description cannot expand the action allowlist or request tools, credentials, files, commands, or additional permissions. Security, authentication, billing, incident, production, quota, and repository-permission messages are protected from model-generated archive actions.
|
|
107
|
+
|
|
108
|
+
The deterministic fallback also uses Gmail's `CATEGORY_PROMOTIONS` label as a high-confidence archive signal (`0.98`) for non-protected messages. Marketing/newsletter keyword matches remain a lower-confidence fallback (`0.7`). The protected-message veto wins over both signals, so a security, authentication, billing, production, incident, quota, or permission-related message is never proposed for automatic archive merely because Gmail classified it as Promotions.
|
|
109
|
+
|
|
110
|
+
Use `assistant_model_readiness` or `GET /api/assistant/model` to inspect the redacted configuration and budgets. Model credentials and raw secrets are never returned.
|
|
111
|
+
|
|
112
|
+
## Action proposals and approval
|
|
113
|
+
|
|
114
|
+
Routine analysis persists structured proposals under `.forge/assistant/action-proposals.json`. Each proposal records:
|
|
115
|
+
|
|
116
|
+
- Routine and Run identity
|
|
117
|
+
- target plugin/action and bounded arguments
|
|
118
|
+
- supporting Gmail message IDs
|
|
119
|
+
- sender/subject context and protected-message status
|
|
120
|
+
- reason, confidence, risk, expiry, and execution status
|
|
121
|
+
- the separate Execution Job created after approval
|
|
122
|
+
|
|
123
|
+
Use `assistant_action_proposals` to list or inspect proposals. Use `assistant_action_proposal_resolve` with `decision=approve` or `decision=reject`. MCP approval requires `confirm_authorization=true`; strong-confirmation actions also require the action's exact confirmation text. Local Controller exposes equivalent authenticated proposal endpoints.
|
|
124
|
+
|
|
125
|
+
Approval is idempotent. Repeating approval returns the same Execution Job rather than creating another remote write. Proposal audit records preserve whether approval came from MCP, Local UI, or a Standing Grant.
|
|
126
|
+
|
|
127
|
+
## Standing Grants
|
|
128
|
+
|
|
129
|
+
A Standing Grant is an explicit, expiring pre-authorization for one hardcoded low-risk action. It is not a general plugin permission.
|
|
130
|
+
|
|
131
|
+
Eligible actions are limited to:
|
|
132
|
+
|
|
133
|
+
- `gmail.create_draft`
|
|
134
|
+
- `gmail.archive_message`
|
|
135
|
+
- `gmail.mark_message_read`
|
|
136
|
+
- `gmail.mark_message_unread`
|
|
137
|
+
- `google_tasks.create_task`
|
|
138
|
+
|
|
139
|
+
A grant must include at least one constraint:
|
|
140
|
+
|
|
141
|
+
- Routine ID allowlist
|
|
142
|
+
- sender/domain allowlist
|
|
143
|
+
- required subject fragment
|
|
144
|
+
|
|
145
|
+
It also declares minimum proposal confidence, maximum executions per Routine Run, and expiry. Automatic draft grants additionally require a sender allowlist. Security-protected messages cannot be auto-archived.
|
|
146
|
+
|
|
147
|
+
Create a grant through `assistant_standing_grant_create` or `POST /api/assistant/standing-grants` with explicit authorization. List it through `assistant_standing_grants`; revoke it through `assistant_standing_grant_revoke` or the Local Controller revoke endpoint.
|
|
148
|
+
|
|
149
|
+
Example: automatically archive at most one high-confidence newsletter from a trusted sender per run:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"plugin_id": "gmail",
|
|
154
|
+
"action_id": "archive_message",
|
|
155
|
+
"sender_allowlist": ["news@example.com"],
|
|
156
|
+
"subject_contains": ["newsletter"],
|
|
157
|
+
"min_confidence": 0.9,
|
|
158
|
+
"max_per_run": 1,
|
|
159
|
+
"expires_in_days": 30,
|
|
160
|
+
"confirm_authorization": true
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Standing-Grant executions use a dedicated `standing-grant` origin and a defense-in-depth plugin allowlist. Modifying the stored grant cannot enable send, Trash, permanent deletion, calendar cancellation/rescheduling, or task deletion. Multiple matching grants cannot submit the same proposal twice, and retries preserve each grant's per-run budget.
|
|
165
|
+
|
|
166
|
+
## Safety boundary
|
|
167
|
+
|
|
168
|
+
Scheduled Routines may:
|
|
169
|
+
|
|
170
|
+
- list and read Gmail messages
|
|
171
|
+
- classify and summarize collected mail
|
|
172
|
+
- create bounded draft, task, archive, and read/unread proposals
|
|
173
|
+
- execute an eligible proposal only when a matching active Standing Grant already exists
|
|
174
|
+
- write Assistant Inbox reports
|
|
175
|
+
|
|
176
|
+
Scheduled Routines may not:
|
|
177
|
+
|
|
178
|
+
- send mail
|
|
179
|
+
- move mail to Trash
|
|
180
|
+
- permanently delete mail
|
|
181
|
+
- cancel or reschedule meetings
|
|
182
|
+
- delete tasks
|
|
183
|
+
- execute instructions embedded in mail
|
|
184
|
+
- open arbitrary attachments or links
|
|
185
|
+
|
|
186
|
+
A proposal is evidence for a later authorized action, not implicit authorization. A Standing Grant authorizes only its exact action and constraints. The Schedule origin never becomes authorization for a remote write.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Homebrew distribution plan
|
|
2
|
+
|
|
3
|
+
Homebrew is planned as a convenience layer after the first stable release. It is not a separate implementation or version line.
|
|
4
|
+
|
|
5
|
+
## Gate before creating a tap
|
|
6
|
+
|
|
7
|
+
Do not publish a formula until all of the following are true:
|
|
8
|
+
|
|
9
|
+
- `@moretea-labs/forge@1.4.0` exists on npm;
|
|
10
|
+
- Git tag and GitHub Release `v1.4.0` exist and point to the tested commit;
|
|
11
|
+
- the npm tarball has an immutable checksum;
|
|
12
|
+
- macOS installation and `forge --version` / `forge doctor` tests pass;
|
|
13
|
+
- upgrade and uninstall behavior is documented.
|
|
14
|
+
|
|
15
|
+
## Recommended first channel
|
|
16
|
+
|
|
17
|
+
Create a third-party tap such as `moretea-labs/homebrew-tap`, then install with:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
brew tap moretea-labs/tap
|
|
21
|
+
brew install forge
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The formula should depend on a supported Node version and install the scoped npm tarball with Homebrew's npm helper arguments. It must include a test that runs the installed CLI. Formula updates must be generated from the stable package version and verified SHA-256, never from a moving branch or `latest` URL.
|
|
25
|
+
|
|
26
|
+
Submitting to Homebrew/core should be considered only after the project has a sustained stable release history and meets Homebrew's acceptance expectations.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Local System Assistant
|
|
2
|
+
|
|
3
|
+
`local_system` is a controller-scoped plugin for occasional Mac diagnostics, opening applications, and bounded file operations. It does not require a registered Git repository and never creates a synthetic Repository Registry entry.
|
|
4
|
+
|
|
5
|
+
## Supported actions
|
|
6
|
+
|
|
7
|
+
- Read bounded CPU, process, memory, and memory-pressure snapshots.
|
|
8
|
+
- Inspect one process by PID.
|
|
9
|
+
- Open a macOS application by name or bundle ID.
|
|
10
|
+
- Reveal an authorized file in Finder or open it with the default application.
|
|
11
|
+
- List directories, read text, create directories, copy, move, and rename files below authorized roots.
|
|
12
|
+
|
|
13
|
+
## Safety boundaries
|
|
14
|
+
|
|
15
|
+
- No arbitrary shell, `sudo`, file deletion, or Accessibility-based clicking.
|
|
16
|
+
- A directory must first be authorized with `authorize_target` and an expiring `target_key`; grants are capped at 24 hours.
|
|
17
|
+
- File paths are relative to the authorized root.
|
|
18
|
+
- Lexical traversal and symlink escape are both rejected.
|
|
19
|
+
- Copy, move, and rename never overwrite existing destinations.
|
|
20
|
+
- Diagnostics, directory listings, and text reads need no confirmation. Target authorization, opening applications, and file writes use normal authorization.
|
|
21
|
+
|
|
22
|
+
## Using it from ChatGPT
|
|
23
|
+
|
|
24
|
+
No `repo_id` is required:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
List the local_system plugin capabilities.
|
|
28
|
+
Show current CPU and memory pressure.
|
|
29
|
+
Open Xcode.
|
|
30
|
+
Authorize ~/Documents/Reports as reports for 60 minutes.
|
|
31
|
+
Read summary.txt from reports.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
ChatGPT uses the existing `list_plugins`, `get_plugin`, and `plugin_action_execute` tools. No new MCP tool or reconnect is required.
|
|
35
|
+
|
|
36
|
+
Plugin state, jobs, target grants, and evidence live under `controllerHome/system/`, outside the Repository Registry.
|
|
37
|
+
|
|
38
|
+
## iOS automation notes
|
|
39
|
+
|
|
40
|
+
The iOS smoke review now waits for Simulator readiness, uses build-specific DerivedData, selects the application product deterministically, waits after launch, and records simulator ownership. Supported cleanup policies are:
|
|
41
|
+
|
|
42
|
+
- `keep`
|
|
43
|
+
- `shutdown_on_success`
|
|
44
|
+
- `shutdown_always`
|
|
45
|
+
|
|
46
|
+
Only a simulator started by the current work is eligible for automatic shutdown. Screenshots and logs produce readable Artifact references.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 本机系统助手
|
|
2
|
+
|
|
3
|
+
`local_system` 是 Controller 级插件,用于偶尔处理本机诊断、打开应用和受控文件操作。它不要求注册 Git 仓库,也不会创建假的仓库记录。
|
|
4
|
+
|
|
5
|
+
## 可以做什么
|
|
6
|
+
|
|
7
|
+
- 查看有边界的 CPU、进程、内存与内存压力快照。
|
|
8
|
+
- 查看指定 PID 的进程信息。
|
|
9
|
+
- 按应用名称或 Bundle ID 打开 macOS 应用。
|
|
10
|
+
- 在 Finder 中显示已授权文件,或用默认应用打开文件。
|
|
11
|
+
- 在已授权目录中列目录、读取文本、新建目录、复制、移动和重命名文件。
|
|
12
|
+
|
|
13
|
+
## 安全边界
|
|
14
|
+
|
|
15
|
+
- 没有任意 shell、`sudo`、删除文件或辅助功能点击能力。
|
|
16
|
+
- 目录必须先通过 `authorize_target` 授权,并使用有期限的 `target_key`;最长有效期 24 小时。
|
|
17
|
+
- 所有文件路径必须是目标目录下的相对路径。
|
|
18
|
+
- 系统同时检查路径穿越和符号链接逃逸。
|
|
19
|
+
- 复制、移动和重命名默认拒绝覆盖已有文件。
|
|
20
|
+
- 诊断、列目录和读取文本不需要确认;授权目录、打开应用和文件写操作需要正常授权。
|
|
21
|
+
|
|
22
|
+
## 在 ChatGPT 中使用
|
|
23
|
+
|
|
24
|
+
无需传入 `repo_id`:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
列出 local_system 插件能力。
|
|
28
|
+
查看当前 CPU 和内存压力。
|
|
29
|
+
打开 Xcode。
|
|
30
|
+
授权 ~/Documents/Reports 为 reports,使用 60 分钟。
|
|
31
|
+
读取 reports 下的 summary.txt。
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
ChatGPT 会通过现有 `list_plugins`、`get_plugin` 和 `plugin_action_execute` 工具调用插件,因此不需要重新连接或增加新的 MCP 工具。
|
|
35
|
+
|
|
36
|
+
插件状态、任务、授权目标和证据存放在 `controllerHome/system/`,不会写入 Repository Registry。
|
|
37
|
+
|
|
38
|
+
## iOS 自动化说明
|
|
39
|
+
|
|
40
|
+
iOS smoke review 现在会等待 Simulator 完全启动,使用每次构建独立的 DerivedData,确定性选择 App 产物,在启动后等待页面稳定,并记录模拟器是否由本次任务启动。可以使用:
|
|
41
|
+
|
|
42
|
+
- `cleanup_policy=keep`
|
|
43
|
+
- `cleanup_policy=shutdown_on_success`
|
|
44
|
+
- `cleanup_policy=shutdown_always`
|
|
45
|
+
|
|
46
|
+
系统只会自动关闭由当前任务启动的模拟器,不会关闭原本已经运行的设备。截图和日志会生成可读取的 Artifact 引用。
|