@entelligentsia/forgecli 1.0.36 → 1.0.40
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/CHANGELOG.md +83 -0
- package/dist/CHANGELOG-forge-plugin.md +101 -0
- package/dist/CHANGELOG-pi.md +143 -0
- package/dist/bin/argv.d.ts +1 -1
- package/dist/bin/argv.js +12 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +18 -16
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/reset.d.ts +39 -0
- package/dist/bin/reset.js +101 -0
- package/dist/bin/reset.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +56 -265
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -1
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +52 -32
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -1
- package/dist/extensions/forgecli/commands/reset.d.ts +16 -0
- package/dist/extensions/forgecli/commands/reset.js +83 -0
- package/dist/extensions/forgecli/commands/reset.js.map +1 -0
- package/dist/extensions/forgecli/forge-commands.d.ts +7 -2
- package/dist/extensions/forgecli/forge-commands.js +19 -5
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +4 -4
- package/dist/extensions/forgecli/hooks/forge-permissions.js +20 -6
- package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -1
- package/dist/extensions/forgecli/index.js +6 -3
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/lib/forge-root.d.ts +6 -0
- package/dist/extensions/forgecli/lib/forge-root.js +52 -0
- package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
- package/dist/extensions/forgecli/lib/payload-manifest.d.ts +62 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js +151 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js +107 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +34 -2
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +2 -2
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js +58 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.d.ts +53 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js +131 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js +25 -3
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +3 -3
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +37 -2
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/store/store-resolver.d.ts +15 -0
- package/dist/extensions/forgecli/store/store-resolver.js +118 -18
- package/dist/extensions/forgecli/store/store-resolver.js.map +1 -1
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/.schemas/migrations.json +85 -0
- package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/commands/check-agent.md +7 -23
- package/dist/forge-payload/commands/enhance.md +31 -5
- package/dist/forge-payload/commands/init.md +161 -97
- package/dist/forge-payload/commands/reset.md +117 -0
- package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
- package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
- package/dist/forge-payload/integrity.json +22 -7
- package/dist/forge-payload/payload-manifest.json +314 -0
- package/dist/forge-payload/schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/schemas/structure-manifest.json +4 -2
- package/dist/forge-payload/tools/reset-plan.cjs +210 -0
- package/dist/forge-payload/tools/store.cjs +4 -1
- package/dist/forge-payload/tools/substitute-placeholders.cjs +10 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +20 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +18 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +10 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1804 -815
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2031 -1384
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +71 -27
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +35 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +13 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/README.md +26 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +128 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +16 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +9 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +19 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +10 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +47 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +44 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +47 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +58 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +24 -26
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +72 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +13 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +112 -37
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +7 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +103 -70
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +20 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +97 -30
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts +36 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +202 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +72 -32
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +39 -34
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +20 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js +91 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +101 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +111 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js +54 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/containerization.md +111 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/docs.json +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +67 -13
- package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +9 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/security.md +59 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +36 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/tmux.md +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +10 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +19 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-header.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/doom-overlay/index.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/index.ts +531 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +185 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/handoff.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/interactive-shell.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-qa-tests.ts +152 -81
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/project-trust.ts +64 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/qna.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/questionnaire.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/snake.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/space-invaders.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/summarize.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tic-tac-toe.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/todo.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tools.ts +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -419
- package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -8
- package/node_modules/@earendil-works/pi-tui/README.md +13 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +102 -43
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -77
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +20 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +244 -42
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +46 -15
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@mariozechner/clipboard/package.json +2 -1
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/README.md +3 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +25 -0
- package/package.json +7 -6
- package/dist/extensions/forgecli/add-pipeline.d.ts +0 -19
- package/dist/extensions/forgecli/add-pipeline.js +0 -143
- package/dist/extensions/forgecli/add-pipeline.js.map +0 -1
- package/dist/extensions/forgecli/add-task.d.ts +0 -20
- package/dist/extensions/forgecli/add-task.js +0 -154
- package/dist/extensions/forgecli/add-task.js.map +0 -1
- package/dist/extensions/forgecli/approve.d.ts +0 -22
- package/dist/extensions/forgecli/approve.js +0 -152
- package/dist/extensions/forgecli/approve.js.map +0 -1
- package/dist/extensions/forgecli/banner.d.ts +0 -10
- package/dist/extensions/forgecli/banner.js +0 -36
- package/dist/extensions/forgecli/banner.js.map +0 -1
- package/dist/extensions/forgecli/calibrate.d.ts +0 -64
- package/dist/extensions/forgecli/calibrate.js +0 -481
- package/dist/extensions/forgecli/calibrate.js.map +0 -1
- package/dist/extensions/forgecli/collate.d.ts +0 -22
- package/dist/extensions/forgecli/collate.js +0 -134
- package/dist/extensions/forgecli/collate.js.map +0 -1
- package/dist/extensions/forgecli/commit.d.ts +0 -22
- package/dist/extensions/forgecli/commit.js +0 -152
- package/dist/extensions/forgecli/commit.js.map +0 -1
- package/dist/extensions/forgecli/config-command.d.ts +0 -8
- package/dist/extensions/forgecli/config-command.js +0 -67
- package/dist/extensions/forgecli/config-command.js.map +0 -1
- package/dist/extensions/forgecli/config-layer.d.ts +0 -53
- package/dist/extensions/forgecli/config-layer.js +0 -72
- package/dist/extensions/forgecli/config-layer.js.map +0 -1
- package/dist/extensions/forgecli/config-writer.d.ts +0 -16
- package/dist/extensions/forgecli/config-writer.js +0 -69
- package/dist/extensions/forgecli/config-writer.js.map +0 -1
- package/dist/extensions/forgecli/enhance.d.ts +0 -27
- package/dist/extensions/forgecli/enhance.js +0 -199
- package/dist/extensions/forgecli/enhance.js.map +0 -1
- package/dist/extensions/forgecli/fix-bug.d.ts +0 -85
- package/dist/extensions/forgecli/fix-bug.js +0 -1580
- package/dist/extensions/forgecli/fix-bug.js.map +0 -1
- package/dist/extensions/forgecli/forge-header.d.ts +0 -12
- package/dist/extensions/forgecli/forge-header.js +0 -114
- package/dist/extensions/forgecli/forge-header.js.map +0 -1
- package/dist/extensions/forgecli/forge-init.d.ts +0 -26
- package/dist/extensions/forgecli/forge-init.js +0 -514
- package/dist/extensions/forgecli/forge-init.js.map +0 -1
- package/dist/extensions/forgecli/forge-root.d.ts +0 -10
- package/dist/extensions/forgecli/forge-root.js +0 -62
- package/dist/extensions/forgecli/forge-root.js.map +0 -1
- package/dist/extensions/forgecli/forge-update-command.d.ts +0 -100
- package/dist/extensions/forgecli/forge-update-command.js +0 -435
- package/dist/extensions/forgecli/forge-update-command.js.map +0 -1
- package/dist/extensions/forgecli/friction-emit.d.ts +0 -99
- package/dist/extensions/forgecli/friction-emit.js +0 -245
- package/dist/extensions/forgecli/friction-emit.js.map +0 -1
- package/dist/extensions/forgecli/implement.d.ts +0 -22
- package/dist/extensions/forgecli/implement.js +0 -170
- package/dist/extensions/forgecli/implement.js.map +0 -1
- package/dist/extensions/forgecli/init-context.d.ts +0 -99
- package/dist/extensions/forgecli/init-context.js +0 -178
- package/dist/extensions/forgecli/init-context.js.map +0 -1
- package/dist/extensions/forgecli/init-progress.d.ts +0 -39
- package/dist/extensions/forgecli/init-progress.js +0 -117
- package/dist/extensions/forgecli/init-progress.js.map +0 -1
- package/dist/extensions/forgecli/input-router.d.ts +0 -33
- package/dist/extensions/forgecli/input-router.js +0 -136
- package/dist/extensions/forgecli/input-router.js.map +0 -1
- package/dist/extensions/forgecli/lib/halt-advisor.d.ts +0 -59
- package/dist/extensions/forgecli/lib/halt-advisor.js +0 -113
- package/dist/extensions/forgecli/lib/halt-advisor.js.map +0 -1
- package/dist/extensions/forgecli/lib/orchestrator-preflight.d.ts +0 -46
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js +0 -64
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js.map +0 -1
- package/dist/extensions/forgecli/materialize.d.ts +0 -16
- package/dist/extensions/forgecli/materialize.js +0 -195
- package/dist/extensions/forgecli/materialize.js.map +0 -1
- package/dist/extensions/forgecli/migrate.d.ts +0 -22
- package/dist/extensions/forgecli/migrate.js +0 -260
- package/dist/extensions/forgecli/migrate.js.map +0 -1
- package/dist/extensions/forgecli/migration-engine.d.ts +0 -117
- package/dist/extensions/forgecli/migration-engine.js +0 -563
- package/dist/extensions/forgecli/migration-engine.js.map +0 -1
- package/dist/extensions/forgecli/model-registry.d.ts +0 -61
- package/dist/extensions/forgecli/model-registry.js +0 -127
- package/dist/extensions/forgecli/model-registry.js.map +0 -1
- package/dist/extensions/forgecli/model-resolver.d.ts +0 -32
- package/dist/extensions/forgecli/model-resolver.js +0 -65
- package/dist/extensions/forgecli/model-resolver.js.map +0 -1
- package/dist/extensions/forgecli/model-validator.d.ts +0 -29
- package/dist/extensions/forgecli/model-validator.js +0 -107
- package/dist/extensions/forgecli/model-validator.js.map +0 -1
- package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +0 -26
- package/dist/extensions/forgecli/orchestrator-status-bar.js +0 -213
- package/dist/extensions/forgecli/orchestrator-status-bar.js.map +0 -1
- package/dist/extensions/forgecli/plan.d.ts +0 -22
- package/dist/extensions/forgecli/plan.js +0 -167
- package/dist/extensions/forgecli/plan.js.map +0 -1
- package/dist/extensions/forgecli/quiz-agent.d.ts +0 -17
- package/dist/extensions/forgecli/quiz-agent.js +0 -98
- package/dist/extensions/forgecli/quiz-agent.js.map +0 -1
- package/dist/extensions/forgecli/read-command.d.ts +0 -2
- package/dist/extensions/forgecli/read-command.js +0 -100
- package/dist/extensions/forgecli/read-command.js.map +0 -1
- package/dist/extensions/forgecli/regenerate.d.ts +0 -40
- package/dist/extensions/forgecli/regenerate.js +0 -438
- package/dist/extensions/forgecli/regenerate.js.map +0 -1
- package/dist/extensions/forgecli/remove-command.d.ts +0 -17
- package/dist/extensions/forgecli/remove-command.js +0 -124
- package/dist/extensions/forgecli/remove-command.js.map +0 -1
- package/dist/extensions/forgecli/report-bug.d.ts +0 -25
- package/dist/extensions/forgecli/report-bug.js +0 -159
- package/dist/extensions/forgecli/report-bug.js.map +0 -1
- package/dist/extensions/forgecli/retrospective.d.ts +0 -20
- package/dist/extensions/forgecli/retrospective.js +0 -126
- package/dist/extensions/forgecli/retrospective.js.map +0 -1
- package/dist/extensions/forgecli/review-code.d.ts +0 -35
- package/dist/extensions/forgecli/review-code.js +0 -196
- package/dist/extensions/forgecli/review-code.js.map +0 -1
- package/dist/extensions/forgecli/review-plan.d.ts +0 -35
- package/dist/extensions/forgecli/review-plan.js +0 -200
- package/dist/extensions/forgecli/review-plan.js.map +0 -1
- package/dist/extensions/forgecli/run-sprint.d.ts +0 -27
- package/dist/extensions/forgecli/run-sprint.js +0 -716
- package/dist/extensions/forgecli/run-sprint.js.map +0 -1
- package/dist/extensions/forgecli/run-task.d.ts +0 -204
- package/dist/extensions/forgecli/run-task.js +0 -1403
- package/dist/extensions/forgecli/run-task.js.map +0 -1
- package/dist/extensions/forgecli/skill-curation-flag.d.ts +0 -21
- package/dist/extensions/forgecli/skill-curation-flag.js +0 -71
- package/dist/extensions/forgecli/skill-curation-flag.js.map +0 -1
- package/dist/extensions/forgecli/skill-curator-subagent.d.ts +0 -102
- package/dist/extensions/forgecli/skill-curator-subagent.js +0 -339
- package/dist/extensions/forgecli/skill-curator-subagent.js.map +0 -1
- package/dist/extensions/forgecli/skill-retriever.d.ts +0 -84
- package/dist/extensions/forgecli/skill-retriever.js +0 -246
- package/dist/extensions/forgecli/skill-retriever.js.map +0 -1
- package/dist/extensions/forgecli/skill-usage-tracker.d.ts +0 -91
- package/dist/extensions/forgecli/skill-usage-tracker.js +0 -224
- package/dist/extensions/forgecli/skill-usage-tracker.js.map +0 -1
- package/dist/extensions/forgecli/sprint-intake.d.ts +0 -10
- package/dist/extensions/forgecli/sprint-intake.js +0 -91
- package/dist/extensions/forgecli/sprint-intake.js.map +0 -1
- package/dist/extensions/forgecli/sprint-plan.d.ts +0 -14
- package/dist/extensions/forgecli/sprint-plan.js +0 -122
- package/dist/extensions/forgecli/sprint-plan.js.map +0 -1
- package/dist/extensions/forgecli/status-command.d.ts +0 -19
- package/dist/extensions/forgecli/status-command.js +0 -140
- package/dist/extensions/forgecli/status-command.js.map +0 -1
- package/dist/extensions/forgecli/store-error-remediation.d.ts +0 -65
- package/dist/extensions/forgecli/store-error-remediation.js +0 -307
- package/dist/extensions/forgecli/store-error-remediation.js.map +0 -1
- package/dist/extensions/forgecli/store-query.d.ts +0 -22
- package/dist/extensions/forgecli/store-query.js +0 -107
- package/dist/extensions/forgecli/store-query.js.map +0 -1
- package/dist/extensions/forgecli/store-repair.d.ts +0 -17
- package/dist/extensions/forgecli/store-repair.js +0 -123
- package/dist/extensions/forgecli/store-repair.js.map +0 -1
- package/dist/extensions/forgecli/store-resolver.d.ts +0 -56
- package/dist/extensions/forgecli/store-resolver.js +0 -263
- package/dist/extensions/forgecli/store-resolver.js.map +0 -1
- package/dist/extensions/forgecli/store-validator.d.ts +0 -16
- package/dist/extensions/forgecli/store-validator.js +0 -32
- package/dist/extensions/forgecli/store-validator.js.map +0 -1
- package/dist/extensions/forgecli/test-orchestrate.d.ts +0 -2
- package/dist/extensions/forgecli/test-orchestrate.js +0 -182
- package/dist/extensions/forgecli/test-orchestrate.js.map +0 -1
- package/dist/extensions/forgecli/thread-switcher.d.ts +0 -5
- package/dist/extensions/forgecli/thread-switcher.js +0 -189
- package/dist/extensions/forgecli/thread-switcher.js.map +0 -1
- package/dist/extensions/forgecli/transition-guard.d.ts +0 -20
- package/dist/extensions/forgecli/transition-guard.js +0 -89
- package/dist/extensions/forgecli/transition-guard.js.map +0 -1
- package/dist/extensions/forgecli/update-check.d.ts +0 -37
- package/dist/extensions/forgecli/update-check.js +0 -185
- package/dist/extensions/forgecli/update-check.js.map +0 -1
- package/dist/extensions/forgecli/update-tools.d.ts +0 -23
- package/dist/extensions/forgecli/update-tools.js +0 -135
- package/dist/extensions/forgecli/update-tools.js.map +0 -1
- package/dist/extensions/forgecli/validate.d.ts +0 -22
- package/dist/extensions/forgecli/validate.js +0 -152
- package/dist/extensions/forgecli/validate.js.map +0 -1
- package/dist/extensions/forgecli/viewport-events.d.ts +0 -78
- package/dist/extensions/forgecli/viewport-events.js +0 -243
- package/dist/extensions/forgecli/viewport-events.js.map +0 -1
- package/dist/extensions/forgecli/viewport-renderer.d.ts +0 -83
- package/dist/extensions/forgecli/viewport-renderer.js +0 -233
- package/dist/extensions/forgecli/viewport-renderer.js.map +0 -1
- package/dist/extensions/forgecli/viewport-theme.d.ts +0 -11
- package/dist/extensions/forgecli/viewport-theme.js +0 -128
- package/dist/extensions/forgecli/viewport-theme.js.map +0 -1
- package/dist/extensions/forgecli/whats-new-widget.d.ts +0 -26
- package/dist/extensions/forgecli/whats-new-widget.js +0 -376
- package/dist/extensions/forgecli/whats-new-widget.js.map +0 -1
- package/dist/extensions/forgecli/whats-new.d.ts +0 -120
- package/dist/extensions/forgecli/whats-new.js +0 -470
- package/dist/extensions/forgecli/whats-new.js.map +0 -1
- package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
- package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
- package/dist/forge-payload/.base-pack/commands/init.md +0 -278
- package/dist/forge-payload/init/generation/generate-knowledge-base.md +0 -56
- package/dist/forge-payload/init/generation/generate-personas.md +0 -54
- package/dist/forge-payload/init/generation/generate-skills.md +0 -36
- package/dist/forge-payload/init/generation/generate-templates.md +0 -39
- /package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +0 -0
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// init-context.ts — project-name discovery, project-context.json construction,
|
|
2
|
-
// and calibration baseline computation for /forge:init.
|
|
3
|
-
//
|
|
4
|
-
// Per INIT_PARITY_SPEC.md §9 and PLAN.md Phase C.
|
|
5
|
-
// Iron Law 6: no shell-string interpolation.
|
|
6
|
-
import * as crypto from "node:crypto";
|
|
7
|
-
import * as fs from "node:fs";
|
|
8
|
-
import * as path from "node:path";
|
|
9
|
-
// ── Project name discovery ─────────────────────────────────────────────────
|
|
10
|
-
/**
|
|
11
|
-
* Discover project name from package.json:name, falling back to cwd basename.
|
|
12
|
-
*
|
|
13
|
-
* Tries to read <cwd>/package.json and parse the `name` field. If the file is
|
|
14
|
-
* absent, malformed, or missing the name field, returns `path.basename(cwd)`.
|
|
15
|
-
*/
|
|
16
|
-
export function discoverProjectName(cwd) {
|
|
17
|
-
const pkgPath = path.join(cwd, "package.json");
|
|
18
|
-
try {
|
|
19
|
-
const raw = fs.readFileSync(pkgPath, "utf8");
|
|
20
|
-
const pkg = JSON.parse(raw);
|
|
21
|
-
if (pkg &&
|
|
22
|
-
typeof pkg === "object" &&
|
|
23
|
-
"name" in pkg &&
|
|
24
|
-
typeof pkg.name === "string") {
|
|
25
|
-
const name = pkg.name;
|
|
26
|
-
if (name.trim())
|
|
27
|
-
return name.trim();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
// ENOENT or JSON parse error — fall through to basename
|
|
32
|
-
}
|
|
33
|
-
return path.basename(cwd);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Build a ProjectContext from discovery results and forge config.
|
|
37
|
-
*
|
|
38
|
-
* Merges discoveryResults with config data. Config project.name/prefix take
|
|
39
|
-
* precedence over discovery if both are present (config was set interactively).
|
|
40
|
-
*/
|
|
41
|
-
export function buildProjectContext(discoveryResults, config) {
|
|
42
|
-
const name = config.project?.name ?? discoveryResults.projectName ?? "";
|
|
43
|
-
const prefix = config.project?.prefix ?? discoveryResults.prefix ?? "";
|
|
44
|
-
const ctx = {
|
|
45
|
-
project: {
|
|
46
|
-
name,
|
|
47
|
-
prefix,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
if (discoveryResults.description) {
|
|
51
|
-
ctx.project.description = discoveryResults.description;
|
|
52
|
-
}
|
|
53
|
-
if (discoveryResults.stack && discoveryResults.stack.length > 0) {
|
|
54
|
-
ctx.project.stack = discoveryResults.stack;
|
|
55
|
-
}
|
|
56
|
-
const testCmd = discoveryResults.testCommand ?? "";
|
|
57
|
-
const buildCmd = discoveryResults.buildCommand ?? "";
|
|
58
|
-
const lintCmd = discoveryResults.lintCommand ?? "";
|
|
59
|
-
if (testCmd || buildCmd) {
|
|
60
|
-
ctx.project.commands = {
|
|
61
|
-
...(testCmd ? { test: testCmd } : {}),
|
|
62
|
-
...(buildCmd ? { build: buildCmd } : {}),
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const hasArch = discoveryResults.backendFramework ??
|
|
66
|
-
discoveryResults.frontendFramework ??
|
|
67
|
-
discoveryResults.database ??
|
|
68
|
-
discoveryResults.deployment ??
|
|
69
|
-
discoveryResults.dataAccess;
|
|
70
|
-
if (hasArch) {
|
|
71
|
-
ctx.architecture = {};
|
|
72
|
-
const frameworks = {};
|
|
73
|
-
if (discoveryResults.backendFramework)
|
|
74
|
-
frameworks.backend = discoveryResults.backendFramework;
|
|
75
|
-
if (discoveryResults.frontendFramework)
|
|
76
|
-
frameworks.frontend = discoveryResults.frontendFramework;
|
|
77
|
-
if (discoveryResults.database)
|
|
78
|
-
frameworks.database = discoveryResults.database;
|
|
79
|
-
if (Object.keys(frameworks).length > 0)
|
|
80
|
-
ctx.architecture.frameworks = frameworks;
|
|
81
|
-
if (discoveryResults.dataAccess)
|
|
82
|
-
ctx.architecture.dataAccess = discoveryResults.dataAccess;
|
|
83
|
-
if (discoveryResults.deployment)
|
|
84
|
-
ctx.architecture.deployment = discoveryResults.deployment;
|
|
85
|
-
}
|
|
86
|
-
const hasWorkflow = testCmd || lintCmd || buildCmd;
|
|
87
|
-
if (hasWorkflow) {
|
|
88
|
-
ctx.workflow = {
|
|
89
|
-
...(testCmd ? { testCommand: testCmd } : {}),
|
|
90
|
-
...(lintCmd ? { lintCommand: lintCmd } : {}),
|
|
91
|
-
...(buildCmd ? { buildCommand: buildCmd } : {}),
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
const kbPath = discoveryResults.kbPath ?? config.paths?.engineering ?? "engineering";
|
|
95
|
-
ctx.knowledgeBase = {
|
|
96
|
-
path: kbPath,
|
|
97
|
-
indexFile: `${kbPath}/MASTER_INDEX.md`,
|
|
98
|
-
};
|
|
99
|
-
return ctx;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Validate a ProjectContext object structurally. Throws with a descriptive
|
|
103
|
-
* error if required fields are missing.
|
|
104
|
-
*/
|
|
105
|
-
export function validateProjectContext(ctx) {
|
|
106
|
-
if (!ctx || typeof ctx !== "object") {
|
|
107
|
-
throw new Error("project-context validation failed: not an object");
|
|
108
|
-
}
|
|
109
|
-
const record = ctx;
|
|
110
|
-
if (!record.project || typeof record.project !== "object") {
|
|
111
|
-
throw new Error("project-context validation failed: missing required field 'project'");
|
|
112
|
-
}
|
|
113
|
-
const project = record.project;
|
|
114
|
-
if (typeof project.name !== "string" || !project.name.trim()) {
|
|
115
|
-
throw new Error("project-context validation failed: project.name is missing or empty");
|
|
116
|
-
}
|
|
117
|
-
if (typeof project.prefix !== "string" || !project.prefix.trim()) {
|
|
118
|
-
throw new Error("project-context validation failed: project.prefix is missing or empty");
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Write project-context.json to <cwd>/.forge/project-context.json
|
|
123
|
-
*/
|
|
124
|
-
export function writeProjectContext(cwd, ctx) {
|
|
125
|
-
const filePath = path.join(cwd, ".forge", "project-context.json");
|
|
126
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
127
|
-
fs.writeFileSync(filePath, JSON.stringify(ctx, null, 2) + "\n", "utf8");
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Compute a calibration baseline snapshot for /forge:init Phase 2.
|
|
131
|
-
*
|
|
132
|
-
* @param cwd - project working directory
|
|
133
|
-
* @param kbPath - relative path to the knowledge base directory (e.g. "engineering")
|
|
134
|
-
* @param bundledPluginVersion - version string from package.json forge.bundledVersion
|
|
135
|
-
*/
|
|
136
|
-
export function computeCalibrationBaseline(cwd, kbPath, bundledPluginVersion) {
|
|
137
|
-
const baseline = {
|
|
138
|
-
lastCalibrated: new Date().toISOString(),
|
|
139
|
-
version: bundledPluginVersion,
|
|
140
|
-
masterIndexHash: null,
|
|
141
|
-
sprintsCovered: [],
|
|
142
|
-
};
|
|
143
|
-
// Compute SHA-256 of MASTER_INDEX.md if it exists
|
|
144
|
-
const masterIndexPath = path.join(cwd, kbPath, "MASTER_INDEX.md");
|
|
145
|
-
try {
|
|
146
|
-
const content = fs.readFileSync(masterIndexPath, "utf8");
|
|
147
|
-
baseline.masterIndexHash = crypto.createHash("sha256").update(content, "utf8").digest("hex");
|
|
148
|
-
}
|
|
149
|
-
catch {
|
|
150
|
-
// File not yet present — leave as null (init just started Phase 2)
|
|
151
|
-
}
|
|
152
|
-
// Collect completed sprint IDs from .forge/store/sprints/
|
|
153
|
-
// Matches the algorithm used by /forge:calibrate Step 2 auto-init branch.
|
|
154
|
-
const storeSprintsDir = path.join(cwd, ".forge", "store", "sprints");
|
|
155
|
-
try {
|
|
156
|
-
const files = fs.readdirSync(storeSprintsDir).filter((f) => f.endsWith(".json"));
|
|
157
|
-
const completedIds = [];
|
|
158
|
-
for (const f of files) {
|
|
159
|
-
try {
|
|
160
|
-
const raw = fs.readFileSync(path.join(storeSprintsDir, f), "utf8");
|
|
161
|
-
const sprint = JSON.parse(raw);
|
|
162
|
-
if (typeof sprint.sprintId === "string" &&
|
|
163
|
-
(sprint.status === "done" || sprint.status === "retrospective-done")) {
|
|
164
|
-
completedIds.push(sprint.sprintId);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
// Skip malformed sprint file
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
baseline.sprintsCovered = completedIds.sort();
|
|
172
|
-
}
|
|
173
|
-
catch {
|
|
174
|
-
// Store sprints dir not yet created — leave as []
|
|
175
|
-
}
|
|
176
|
-
return baseline;
|
|
177
|
-
}
|
|
178
|
-
//# sourceMappingURL=init-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-context.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/init-context.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wDAAwD;AACxD,EAAE;AACF,kDAAkD;AAClD,6CAA6C;AAE7C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC/C,IAAI,CAAC;QACJ,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;QACvC,IACC,GAAG;YACH,OAAO,GAAG,KAAK,QAAQ;YACvB,MAAM,IAAI,GAAG;YACb,OAAQ,GAA+B,CAAC,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0E;IAC1E,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACrE,IAAI,CAAC;QACJ,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACjF,MAAM,YAAY,GAAa,EAAE,CAAC;QAClC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC;gBACJ,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;gBACnE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA2C,CAAC;gBACzE,IACC,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ;oBACnC,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,oBAAoB,CAAC,EACnE,CAAC;oBACF,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACpC,CAAC;YACF,CAAC;YAAC,MAAM,CAAC;gBACR,6BAA6B;YAC9B,CAAC;QACF,CAAC;QACD,QAAQ,CAAC,cAAc,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACR,kDAAkD;IACnD,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** Canonical progress record written to .forge/init-progress.json */
|
|
2
|
-
export interface InitProgress {
|
|
3
|
-
lastPhase: 1 | 2 | 3 | 4;
|
|
4
|
-
timestamp: string;
|
|
5
|
-
}
|
|
6
|
-
export type ReadProgressResult = {
|
|
7
|
-
kind: "none";
|
|
8
|
-
} | {
|
|
9
|
-
kind: "stale";
|
|
10
|
-
reason: string;
|
|
11
|
-
} | {
|
|
12
|
-
kind: "malformed";
|
|
13
|
-
} | {
|
|
14
|
-
kind: "valid";
|
|
15
|
-
progress: InitProgress;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Read the init-progress checkpoint file.
|
|
19
|
-
*
|
|
20
|
-
* Returns:
|
|
21
|
-
* - `{ kind: "none" }` — file does not exist
|
|
22
|
-
* - `{ kind: "malformed" }` — file exists but JSON parse failed
|
|
23
|
-
* - `{ kind: "stale", reason }` — file is a legacy 12-phase checkpoint
|
|
24
|
-
* - `{ kind: "valid", progress }` — clean 4-phase checkpoint
|
|
25
|
-
*/
|
|
26
|
-
export declare function readInitProgress(cwd: string): ReadProgressResult;
|
|
27
|
-
/**
|
|
28
|
-
* Write a progress checkpoint. Called at the end of each completed phase.
|
|
29
|
-
*
|
|
30
|
-
* @param cwd - project working directory
|
|
31
|
-
* @param lastPhase - completed phase number (1, 2, or 3; 4 is written then deleted)
|
|
32
|
-
* @param timestamp - ISO 8601 timestamp; defaults to now
|
|
33
|
-
*/
|
|
34
|
-
export declare function writeInitProgress(cwd: string, lastPhase: 1 | 2 | 3 | 4, timestamp?: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Delete the init-progress checkpoint. Called at the end of Phase 4
|
|
37
|
-
* to signal successful completion.
|
|
38
|
-
*/
|
|
39
|
-
export declare function deleteInitProgress(cwd: string): void;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// init-progress.ts — read/write/delete .forge/init-progress.json
|
|
2
|
-
//
|
|
3
|
-
// Tracks the last completed phase of /forge:init so the command can resume
|
|
4
|
-
// after an interrupted run. Implements stale-checkpoint detection to handle
|
|
5
|
-
// legacy 12-phase checkpoint files from old forge plugin versions.
|
|
6
|
-
//
|
|
7
|
-
// Per INIT_PARITY_SPEC.md §4 and PLAN.md Phase B.
|
|
8
|
-
import * as fs from "node:fs";
|
|
9
|
-
import * as path from "node:path";
|
|
10
|
-
const PROGRESS_FILENAME = ".forge/init-progress.json";
|
|
11
|
-
function progressPath(cwd) {
|
|
12
|
-
return path.join(cwd, PROGRESS_FILENAME);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Read the init-progress checkpoint file.
|
|
16
|
-
*
|
|
17
|
-
* Returns:
|
|
18
|
-
* - `{ kind: "none" }` — file does not exist
|
|
19
|
-
* - `{ kind: "malformed" }` — file exists but JSON parse failed
|
|
20
|
-
* - `{ kind: "stale", reason }` — file is a legacy 12-phase checkpoint
|
|
21
|
-
* - `{ kind: "valid", progress }` — clean 4-phase checkpoint
|
|
22
|
-
*/
|
|
23
|
-
export function readInitProgress(cwd) {
|
|
24
|
-
const filePath = progressPath(cwd);
|
|
25
|
-
let raw;
|
|
26
|
-
try {
|
|
27
|
-
raw = fs.readFileSync(filePath, "utf8");
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
const e = err;
|
|
31
|
-
if (e.code === "ENOENT")
|
|
32
|
-
return { kind: "none" };
|
|
33
|
-
// Unreadable — treat as missing
|
|
34
|
-
return { kind: "none" };
|
|
35
|
-
}
|
|
36
|
-
let obj;
|
|
37
|
-
try {
|
|
38
|
-
obj = JSON.parse(raw);
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return { kind: "malformed" };
|
|
42
|
-
}
|
|
43
|
-
if (!obj || typeof obj !== "object") {
|
|
44
|
-
return { kind: "malformed" };
|
|
45
|
-
}
|
|
46
|
-
const record = obj;
|
|
47
|
-
// Stale detection per spec §4:
|
|
48
|
-
// - lastPhase > 4 → old 12-phase run
|
|
49
|
-
// - contains "mode" key → old format
|
|
50
|
-
// - contains "phase-7-substep-map" key → old format
|
|
51
|
-
// - missing "timestamp" → corrupt / incomplete write
|
|
52
|
-
if ("mode" in record) {
|
|
53
|
-
return { kind: "stale", reason: 'contains "mode" field (legacy 12-phase format)' };
|
|
54
|
-
}
|
|
55
|
-
if ("phase-7-substep-map" in record) {
|
|
56
|
-
return { kind: "stale", reason: 'contains "phase-7-substep-map" field (legacy 12-phase format)' };
|
|
57
|
-
}
|
|
58
|
-
if (!("timestamp" in record)) {
|
|
59
|
-
return { kind: "stale", reason: 'missing "timestamp" field' };
|
|
60
|
-
}
|
|
61
|
-
const lastPhase = record.lastPhase;
|
|
62
|
-
if (typeof lastPhase !== "number" || !Number.isInteger(lastPhase)) {
|
|
63
|
-
return { kind: "malformed" };
|
|
64
|
-
}
|
|
65
|
-
if (lastPhase > 4) {
|
|
66
|
-
return { kind: "stale", reason: `lastPhase=${lastPhase} > 4 (legacy 12-phase run)` };
|
|
67
|
-
}
|
|
68
|
-
if (lastPhase < 1) {
|
|
69
|
-
return { kind: "malformed" };
|
|
70
|
-
}
|
|
71
|
-
const timestamp = record.timestamp;
|
|
72
|
-
if (typeof timestamp !== "string") {
|
|
73
|
-
return { kind: "malformed" };
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
kind: "valid",
|
|
77
|
-
progress: {
|
|
78
|
-
lastPhase: lastPhase,
|
|
79
|
-
timestamp,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Write a progress checkpoint. Called at the end of each completed phase.
|
|
85
|
-
*
|
|
86
|
-
* @param cwd - project working directory
|
|
87
|
-
* @param lastPhase - completed phase number (1, 2, or 3; 4 is written then deleted)
|
|
88
|
-
* @param timestamp - ISO 8601 timestamp; defaults to now
|
|
89
|
-
*/
|
|
90
|
-
export function writeInitProgress(cwd, lastPhase, timestamp) {
|
|
91
|
-
const record = {
|
|
92
|
-
lastPhase,
|
|
93
|
-
timestamp: timestamp ?? new Date().toISOString(),
|
|
94
|
-
};
|
|
95
|
-
const filePath = progressPath(cwd);
|
|
96
|
-
// Ensure .forge/ dir exists before writing
|
|
97
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
98
|
-
fs.writeFileSync(filePath, JSON.stringify(record, null, 2) + "\n", "utf8");
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Delete the init-progress checkpoint. Called at the end of Phase 4
|
|
102
|
-
* to signal successful completion.
|
|
103
|
-
*/
|
|
104
|
-
export function deleteInitProgress(cwd) {
|
|
105
|
-
const filePath = progressPath(cwd);
|
|
106
|
-
try {
|
|
107
|
-
fs.unlinkSync(filePath);
|
|
108
|
-
}
|
|
109
|
-
catch (err) {
|
|
110
|
-
const e = err;
|
|
111
|
-
// ENOENT is fine — file may not exist if phase was aborted before first write
|
|
112
|
-
if (e.code !== "ENOENT") {
|
|
113
|
-
throw err;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=init-progress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-progress.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/init-progress.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,mEAAmE;AACnE,EAAE;AACF,kDAAkD;AAElD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAclC,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AAEtD,SAAS,YAAY,CAAC,GAAW;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC3C,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAEnC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACJ,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,GAAwB,CAAC;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AAE,CAAC;QACvB,MAAM,CAAC,GAAG,GAAwB,CAAC;QACnC,8EAA8E;QAC9E,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACzB,MAAM,GAAG,CAAC;QACX,CAAC;IACF,CAAC;AACF,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export type RouterResult = {
|
|
2
|
-
consume?: boolean;
|
|
3
|
-
data?: string;
|
|
4
|
-
} | undefined;
|
|
5
|
-
export type RouterListener = (data: string) => RouterResult;
|
|
6
|
-
export interface RegisterOptions {
|
|
7
|
-
/** Stable name for debugging and unsubscription tracking. */
|
|
8
|
-
name: string;
|
|
9
|
-
/** When true, this listener is bypassed while any overlay is active.
|
|
10
|
-
* Use for keys that "activate" a widget (e.g. ↓ to open a strip) — the
|
|
11
|
-
* overlay needs the same key for navigation. Default: false. */
|
|
12
|
-
skipWhenOverlayActive?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare class ForgeInputRouter {
|
|
15
|
-
private listeners;
|
|
16
|
-
private overlayDepth;
|
|
17
|
-
register(listener: RouterListener, opts: RegisterOptions): () => void;
|
|
18
|
-
pushOverlay(): void;
|
|
19
|
-
popOverlay(): void;
|
|
20
|
-
isOverlayActive(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Mirrors pi's listener-chain semantics (tui.ts:544-560):
|
|
23
|
-
* - Each listener may return { consume: true } to stop dispatch.
|
|
24
|
-
* - Each listener may return { data: rewritten } to alter the value the
|
|
25
|
-
* next listener (and ultimately the focused overlay) sees.
|
|
26
|
-
* - Listeners flagged skipWhenOverlayActive=true are silently bypassed
|
|
27
|
-
* whenever overlayDepth > 0.
|
|
28
|
-
*/
|
|
29
|
-
dispatch(data: string): RouterResult;
|
|
30
|
-
}
|
|
31
|
-
export declare function getInputRouter(): ForgeInputRouter;
|
|
32
|
-
/** Test helper — replace the singleton with a fresh router. */
|
|
33
|
-
export declare function __resetInputRouterForTesting(): void;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
// Centralised onTerminalInput dispatch for forge-cli.
|
|
2
|
-
//
|
|
3
|
-
// Plan 16 Slice 4c. Pi-mono's `ctx.ui.onTerminalInput` lets any extension hook
|
|
4
|
-
// raw stdin, with the first consumer winning. Pi runs listeners BEFORE
|
|
5
|
-
// routing to the focused overlay (pi-mono/packages/tui/src/tui.ts:544-560).
|
|
6
|
-
// That made forge-cli's two existing arrow-activator listeners
|
|
7
|
-
// (thread-switcher, whats-new-widget) silently eat ↑/↓ when the config TUI was
|
|
8
|
-
// mounted as an overlay.
|
|
9
|
-
//
|
|
10
|
-
// This router gives forge-cli a single pi listener whose dispatch is
|
|
11
|
-
// overlay-aware: listeners flagged `skipWhenOverlayActive: true` are bypassed
|
|
12
|
-
// whenever an overlay has been registered via `pushOverlay()`. Other listeners
|
|
13
|
-
// (critical hotkeys, theme switchers, etc.) still run.
|
|
14
|
-
//
|
|
15
|
-
// Wiring:
|
|
16
|
-
// 1. index.ts session_start: `ctx.ui.onTerminalInput((d) => router.dispatch(d))`.
|
|
17
|
-
// 2. Each consumer: `router.register(listener, { name, skipWhenOverlayActive })`.
|
|
18
|
-
// 3. Each overlay mounter: `router.pushOverlay()` before ctx.ui.custom,
|
|
19
|
-
// `popOverlay()` in a finally.
|
|
20
|
-
//
|
|
21
|
-
// Debug logging (when FORGE_DEBUG_INPUT=1):
|
|
22
|
-
// Each dispatch + push/pop is logged with timestamp + listener name +
|
|
23
|
-
// overlay depth + raw byte sequence (hex-escaped). Default target:
|
|
24
|
-
// /tmp/forge-input-router.log. Override with FORGE_DEBUG_INPUT_LOG=<path>.
|
|
25
|
-
// Logging goes through fs.appendFileSync — synchronous so events are
|
|
26
|
-
// captured even when the process crashes mid-render.
|
|
27
|
-
import * as fs from "node:fs";
|
|
28
|
-
function debugEnabled() {
|
|
29
|
-
return process.env.FORGE_DEBUG_INPUT === "1";
|
|
30
|
-
}
|
|
31
|
-
function debugLogPath() {
|
|
32
|
-
return process.env.FORGE_DEBUG_INPUT_LOG ?? "/tmp/forge-input-router.log";
|
|
33
|
-
}
|
|
34
|
-
function hexEscape(s) {
|
|
35
|
-
// Render printable ASCII as-is, escape everything else as \xNN. Helps spot
|
|
36
|
-
// arrow sequences (\x1b[A etc.) and Kitty-protocol variants at a glance.
|
|
37
|
-
return [...s]
|
|
38
|
-
.map((c) => {
|
|
39
|
-
const cp = c.codePointAt(0);
|
|
40
|
-
if (cp >= 0x20 && cp <= 0x7e)
|
|
41
|
-
return c;
|
|
42
|
-
return `\\x${cp.toString(16).padStart(2, "0")}`;
|
|
43
|
-
})
|
|
44
|
-
.join("");
|
|
45
|
-
}
|
|
46
|
-
function logEvent(line) {
|
|
47
|
-
if (!debugEnabled())
|
|
48
|
-
return;
|
|
49
|
-
try {
|
|
50
|
-
const ts = new Date().toISOString();
|
|
51
|
-
fs.appendFileSync(debugLogPath(), `${ts} ${line}\n`);
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
// Logging must never crash the host; failure to write is silently ignored.
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export class ForgeInputRouter {
|
|
58
|
-
listeners = [];
|
|
59
|
-
overlayDepth = 0;
|
|
60
|
-
register(listener, opts) {
|
|
61
|
-
const entry = { fn: listener, opts };
|
|
62
|
-
this.listeners.push(entry);
|
|
63
|
-
logEvent(`register name=${opts.name} skipWhenOverlayActive=${!!opts.skipWhenOverlayActive} total=${this.listeners.length}`);
|
|
64
|
-
return () => {
|
|
65
|
-
const i = this.listeners.indexOf(entry);
|
|
66
|
-
if (i >= 0) {
|
|
67
|
-
this.listeners.splice(i, 1);
|
|
68
|
-
logEvent(`unregister name=${opts.name} remaining=${this.listeners.length}`);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
pushOverlay() {
|
|
73
|
-
this.overlayDepth++;
|
|
74
|
-
logEvent(`pushOverlay depth=${this.overlayDepth}`);
|
|
75
|
-
}
|
|
76
|
-
popOverlay() {
|
|
77
|
-
if (this.overlayDepth > 0)
|
|
78
|
-
this.overlayDepth--;
|
|
79
|
-
logEvent(`popOverlay depth=${this.overlayDepth}`);
|
|
80
|
-
}
|
|
81
|
-
isOverlayActive() {
|
|
82
|
-
return this.overlayDepth > 0;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Mirrors pi's listener-chain semantics (tui.ts:544-560):
|
|
86
|
-
* - Each listener may return { consume: true } to stop dispatch.
|
|
87
|
-
* - Each listener may return { data: rewritten } to alter the value the
|
|
88
|
-
* next listener (and ultimately the focused overlay) sees.
|
|
89
|
-
* - Listeners flagged skipWhenOverlayActive=true are silently bypassed
|
|
90
|
-
* whenever overlayDepth > 0.
|
|
91
|
-
*/
|
|
92
|
-
dispatch(data) {
|
|
93
|
-
if (debugEnabled()) {
|
|
94
|
-
logEvent(`dispatch IN data="${hexEscape(data)}" overlayDepth=${this.overlayDepth} listeners=${this.listeners.length}`);
|
|
95
|
-
}
|
|
96
|
-
let current = data;
|
|
97
|
-
for (const entry of this.listeners) {
|
|
98
|
-
if (this.overlayDepth > 0 && entry.opts.skipWhenOverlayActive) {
|
|
99
|
-
logEvent(` skip name=${entry.opts.name} (overlay active)`);
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
const result = entry.fn(current);
|
|
103
|
-
if (debugEnabled()) {
|
|
104
|
-
const r = result === undefined
|
|
105
|
-
? "passthrough"
|
|
106
|
-
: `${result.consume ? "consume" : ""}${result.data !== undefined ? ` data="${hexEscape(result.data)}"` : ""}`.trim() ||
|
|
107
|
-
"noop";
|
|
108
|
-
logEvent(` call name=${entry.opts.name} → ${r}`);
|
|
109
|
-
}
|
|
110
|
-
if (result?.consume) {
|
|
111
|
-
logEvent(`dispatch OUT consumed-by=${entry.opts.name}`);
|
|
112
|
-
return { consume: true };
|
|
113
|
-
}
|
|
114
|
-
if (result?.data !== undefined)
|
|
115
|
-
current = result.data;
|
|
116
|
-
}
|
|
117
|
-
if (current !== data) {
|
|
118
|
-
logEvent(`dispatch OUT rewritten data="${hexEscape(current)}"`);
|
|
119
|
-
return { data: current };
|
|
120
|
-
}
|
|
121
|
-
logEvent(`dispatch OUT passthrough (focused overlay should receive)`);
|
|
122
|
-
return undefined;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// ── Module-level singleton ───────────────────────────────────────────────────
|
|
126
|
-
let singleton = null;
|
|
127
|
-
export function getInputRouter() {
|
|
128
|
-
if (!singleton)
|
|
129
|
-
singleton = new ForgeInputRouter();
|
|
130
|
-
return singleton;
|
|
131
|
-
}
|
|
132
|
-
/** Test helper — replace the singleton with a fresh router. */
|
|
133
|
-
export function __resetInputRouterForTesting() {
|
|
134
|
-
singleton = null;
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=input-router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-router.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/input-router.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,+EAA+E;AAC/E,uEAAuE;AACvE,4EAA4E;AAC5E,+DAA+D;AAC/D,+EAA+E;AAC/E,yBAAyB;AACzB,EAAE;AACF,qEAAqE;AACrE,8EAA8E;AAC9E,+EAA+E;AAC/E,uDAAuD;AACvD,EAAE;AACF,UAAU;AACV,oFAAoF;AACpF,oFAAoF;AACpF,0EAA0E;AAC1E,oCAAoC;AACpC,EAAE;AACF,4CAA4C;AAC5C,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,uEAAuE;AACvE,uDAAuD;AAEvD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAmB9B,SAAS,YAAY;IACpB,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,GAAG,CAAC;AAC9C,CAAC;AAED,SAAS,YAAY;IACpB,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,6BAA6B,CAAC;AAC3E,CAAC;AAED,SAAS,SAAS,CAAC,CAA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C"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { MergedConfig, PersonaModel } from "../config-layer.js";
|
|
2
|
-
export interface UiLike {
|
|
3
|
-
notify(message: string, level?: string): void;
|
|
4
|
-
}
|
|
5
|
-
export interface CtxLike {
|
|
6
|
-
ui: UiLike;
|
|
7
|
-
}
|
|
8
|
-
export interface GateFailure {
|
|
9
|
-
phase: string;
|
|
10
|
-
reasonCode: string;
|
|
11
|
-
detail: string;
|
|
12
|
-
remediation: string;
|
|
13
|
-
}
|
|
14
|
-
export interface RunHaltAdvisorOptions {
|
|
15
|
-
/** Structured failure parsed from preflight-gate.cjs stdout. */
|
|
16
|
-
gateFailure: GateFailure;
|
|
17
|
-
/** Resolved advisor model (from resolveAdvisorModel). If undefined, advisor is skipped. */
|
|
18
|
-
advisorModel: PersonaModel | undefined;
|
|
19
|
-
/** Task or bug id for context. */
|
|
20
|
-
taskId: string;
|
|
21
|
-
/** Working directory. */
|
|
22
|
-
cwd: string;
|
|
23
|
-
/** Extension command context (ui + modelRegistry). */
|
|
24
|
-
ctx: CtxLike;
|
|
25
|
-
/** Optional forge root path — forwarded to runForgeSubagent. */
|
|
26
|
-
forgeRoot?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Resolve the advisor model for halt-recovery.
|
|
30
|
-
*
|
|
31
|
-
* Priority:
|
|
32
|
-
* 1. Explicit `advisorModel` config slot from forge-cli layered config.
|
|
33
|
-
* Contract (rev. 2026-06-04): the advisor model is the HEAVY model the runtime
|
|
34
|
-
* resolves point-in-time. There is NO dedicated advisorModel config entry —
|
|
35
|
-
* "heavy" is the approve/architect slot resolved through the existing routing
|
|
36
|
-
* cascade (L4 phase override → L3/L2 project → L1 user/global → default),
|
|
37
|
-
* exactly as the approve phase itself would resolve. When the cascade bottoms
|
|
38
|
-
* out at inherit, the session's current model (pi default) is used. In the
|
|
39
|
-
* Claude Code plugin route the equivalent is the opus-class session model.
|
|
40
|
-
*
|
|
41
|
-
* Returns undefined (advisor skipped, non-fatal) only when nothing is routed
|
|
42
|
-
* AND no current model is available.
|
|
43
|
-
*
|
|
44
|
-
* (History: the original FORGE-S26-T18 implementation used a dedicated
|
|
45
|
-
* advisorModel config slot with a blind registry fallback that produced
|
|
46
|
-
* "anthropic/undefined" on the CART-S03-T01 halt — both retired.)
|
|
47
|
-
*/
|
|
48
|
-
export declare function resolveAdvisorModel(merged: MergedConfig, currentModel?: {
|
|
49
|
-
provider?: string;
|
|
50
|
-
model?: string;
|
|
51
|
-
id?: string;
|
|
52
|
-
}, pipelineName?: string): PersonaModel | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Spawn a read-only advisor subagent to explain the gate failure and guide recovery.
|
|
55
|
-
*
|
|
56
|
-
* Best-effort: errors are notified via ctx.ui but do NOT propagate. The
|
|
57
|
-
* primary halt status is the caller's responsibility to surface separately.
|
|
58
|
-
*/
|
|
59
|
-
export declare function runHaltAdvisor(opts: RunHaltAdvisorOptions): Promise<void>;
|