@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,134 +0,0 @@
|
|
|
1
|
-
// forge:collate — native kickoff handler (FORGE-S21-T10).
|
|
2
|
-
//
|
|
3
|
-
// Replaces the auto-generated stub previously installed by
|
|
4
|
-
// registerAllForgeCommands (forge-commands.ts). Kickoff Shim archetype
|
|
5
|
-
// (Pack-04 + Pack-06): single LLM handoff in current context, no fork.
|
|
6
|
-
//
|
|
7
|
-
// The collator_agent.md workflow has no audience restriction (defaults to
|
|
8
|
-
// "any"), so standalone human invocations are allowed — useful for retro
|
|
9
|
-
// runs and manual collation triggers.
|
|
10
|
-
//
|
|
11
|
-
// Iron Laws:
|
|
12
|
-
// IL1 — code only under forge-cli/src/extensions/forgecli/.
|
|
13
|
-
// IL4 — no JSON.stringify-into-subagent dispatch.
|
|
14
|
-
// IL6 — no shell-string interpolation; no spawn calls here.
|
|
15
|
-
// IL7 — every failure path emits ctx.ui.notify and returns; no silent
|
|
16
|
-
// continuation.
|
|
17
|
-
import * as fs from "node:fs";
|
|
18
|
-
import * as path from "node:path";
|
|
19
|
-
import { assertAudience } from "./audience-gate.js";
|
|
20
|
-
import { sendKickoff } from "./kickoff.js";
|
|
21
|
-
// FORGE-S25-T16: extracted to lib modules (H-1, H-2). Re-exported here for
|
|
22
|
-
// backward compatibility with existing test and consumer imports.
|
|
23
|
-
import { extractPersonaNames } from "./lib/frontmatter-parser.js";
|
|
24
|
-
import { loadPersona, PersonaSkillLoaderError } from "./parsers/persona-skill-loader.js";
|
|
25
|
-
import { loadWorkflow, WorkflowLoaderError } from "./parsers/workflow-loader.js";
|
|
26
|
-
export { extractPersonaNames };
|
|
27
|
-
import { checkMaterialization } from "./lib/manifest-checker.js";
|
|
28
|
-
export { checkMaterialization };
|
|
29
|
-
export function parseCollateArgs(rawArgs, cwd) {
|
|
30
|
-
const trimmed = (rawArgs ?? "").trim();
|
|
31
|
-
if (trimmed === "") {
|
|
32
|
-
return { mode: "empty", taskRef: "", sourceLabel: "(no input — collator infers sprint from store/context)" };
|
|
33
|
-
}
|
|
34
|
-
if (trimmed.startsWith("@")) {
|
|
35
|
-
const ref = trimmed.slice(1).trim();
|
|
36
|
-
const filePath = path.isAbsolute(ref) ? ref : path.resolve(cwd, ref);
|
|
37
|
-
const seed = fs.readFileSync(filePath, "utf8");
|
|
38
|
-
return { mode: "file", taskRef: seed, sourceLabel: `(seed from file: ${ref})` };
|
|
39
|
-
}
|
|
40
|
-
return { mode: "text", taskRef: trimmed, sourceLabel: "(seed from inline text)" };
|
|
41
|
-
}
|
|
42
|
-
export function composeKickoff(opts) {
|
|
43
|
-
const { workflowMd, personaIdentity, parsed } = opts;
|
|
44
|
-
const sections = ["# /forge:collate", ""];
|
|
45
|
-
if (personaIdentity.trim().length > 0) {
|
|
46
|
-
sections.push(personaIdentity.trim(), "");
|
|
47
|
-
}
|
|
48
|
-
sections.push("## Dispatch", "", "Run the workflow below. Specifically:", "", "1. Identify the active sprint via `forge_store_query` — do NOT raw-read `.forge/store/`.", "2. Follow the workflow Algorithm verbatim: collate store data into MASTER_INDEX.md, sprint INDEX.md, task INDEX.md files.", "3. Write all collated markdown files using the `write` tool.", "4. Honour Pack-06 Read/Write/Ask/Store discipline: store reads go via `forge_store_query`; in-conversation clarifications use `forge_ask_user`.");
|
|
49
|
-
sections.push("", "---", "", "## Workflow", "", workflowMd.trim(), "", "---");
|
|
50
|
-
if (parsed.mode === "empty") {
|
|
51
|
-
sections.push("", "## Input", "", "(no seed — infer sprint from store context)");
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
sections.push("", `## Input — ${parsed.sourceLabel}`, "", parsed.taskRef.trim());
|
|
55
|
-
}
|
|
56
|
-
return sections.join("\n");
|
|
57
|
-
}
|
|
58
|
-
// Registration -------------------------------------------------------------
|
|
59
|
-
const WORKFLOW_REL_PATH = path.join(".forge", "workflows", "collator_agent.md");
|
|
60
|
-
export function registerCollate(pi, options = {}) {
|
|
61
|
-
pi.registerCommand("forge:collate", {
|
|
62
|
-
description: "Run the collator-agent workflow. " +
|
|
63
|
-
"Usage: /forge:collate [@<file> | <sprint-id> | <free-form text>]. " +
|
|
64
|
-
"Empty args → collator infers the active sprint from store context.",
|
|
65
|
-
async handler(args, ctx) {
|
|
66
|
-
const cwd = options.cwd ?? process.cwd();
|
|
67
|
-
const workflowPath = path.join(cwd, WORKFLOW_REL_PATH);
|
|
68
|
-
let workflowMd;
|
|
69
|
-
let workflowAudience;
|
|
70
|
-
try {
|
|
71
|
-
const loaded = loadWorkflow(workflowPath);
|
|
72
|
-
workflowMd = loaded.rawMarkdown;
|
|
73
|
-
workflowAudience = loaded.audience;
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
if (err instanceof WorkflowLoaderError) {
|
|
77
|
-
if (err.code === "missing_file") {
|
|
78
|
-
ctx.ui.notify(`× forge:collate — workflow not found at ${WORKFLOW_REL_PATH}; run /forge:init or /forge:rebuild first.`, "error");
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
ctx.ui.notify(`× forge:collate — workflow load failed (${err.code}): ${err.message}`, "error");
|
|
82
|
-
}
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const e = err;
|
|
86
|
-
ctx.ui.notify(`× forge:collate — failed to read workflow: ${e.message ?? "unknown"}`, "error");
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
let parsed;
|
|
90
|
-
try {
|
|
91
|
-
parsed = parseCollateArgs(args, cwd);
|
|
92
|
-
}
|
|
93
|
-
catch (err) {
|
|
94
|
-
const e = err;
|
|
95
|
-
ctx.ui.notify(`× forge:collate — failed to read seed: ${e.message ?? "unknown"}`, "error");
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const check = checkMaterialization(workflowPath, workflowMd);
|
|
99
|
-
if (!check.ok) {
|
|
100
|
-
for (const marker of check.missing) {
|
|
101
|
-
ctx.ui.notify(`× workflow regression: ${marker} not found in ${workflowPath}`, "error");
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const personas = extractPersonaNames(workflowMd);
|
|
106
|
-
let personaIdentity = "";
|
|
107
|
-
if (personas.length > 0) {
|
|
108
|
-
try {
|
|
109
|
-
const persona = loadPersona(personas[0], { cwd });
|
|
110
|
-
personaIdentity = persona.identity;
|
|
111
|
-
}
|
|
112
|
-
catch (err) {
|
|
113
|
-
if (err instanceof PersonaSkillLoaderError) {
|
|
114
|
-
ctx.ui.notify(`× forge:collate — persona '${personas[0]}' load failed (${err.code}): ${err.message}`, "error");
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const e = err;
|
|
118
|
-
ctx.ui.notify(`× forge:collate — persona load error: ${e.message ?? "unknown"}`, "error");
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (!assertAudience({ workflowName: "collator_agent", audience: workflowAudience }, ctx)) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const kickoff = composeKickoff({
|
|
126
|
-
workflowMd,
|
|
127
|
-
personaIdentity,
|
|
128
|
-
parsed,
|
|
129
|
-
});
|
|
130
|
-
sendKickoff(pi, kickoff);
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=collate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collate.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/collate.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE;AACF,2DAA2D;AAC3D,uEAAuE;AACvE,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,yEAAyE;AACzE,sCAAsC;AACtC,EAAE;AACF,aAAa;AACb,8DAA8D;AAC9D,oDA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AC,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE,EACtF,OAAO,CACP,CAAC;wBACF,OAAO;oBACR,CAAC;oBACD,MAAM,CAAC,GAAG,GAA2B,CAAC;oBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;oBAC1F,OAAO;gBACR,CAAC;YACF,CAAC;YAED,IAAI,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;gBAC1F,OAAO;YACR,CAAC;YAED,MAAM,OAAO,GAAG,cAAc,CAAC;gBAC9B,UAAU;gBACV,eAAe;gBACf,MAAM;aACN,CAAC,CAAC;YAEH,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import { extractPersonaNames } from "./lib/frontmatter-parser.js";
|
|
3
|
-
export { extractPersonaNames };
|
|
4
|
-
import { checkMaterialization, type MaterializationCheck } from "./lib/manifest-checker.js";
|
|
5
|
-
export { checkMaterialization, type MaterializationCheck };
|
|
6
|
-
export type ArgMode = "empty" | "file" | "text";
|
|
7
|
-
export interface ParsedArgs {
|
|
8
|
-
mode: ArgMode;
|
|
9
|
-
taskRef: string;
|
|
10
|
-
sourceLabel: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function parseCommitArgs(rawArgs: string, cwd: string): ParsedArgs;
|
|
13
|
-
export interface ComposeKickoffOpts {
|
|
14
|
-
workflowMd: string;
|
|
15
|
-
personaIdentity: string;
|
|
16
|
-
parsed: ParsedArgs;
|
|
17
|
-
}
|
|
18
|
-
export declare function composeKickoff(opts: ComposeKickoffOpts): string;
|
|
19
|
-
export interface RegisterCommitOptions {
|
|
20
|
-
cwd?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare function registerCommit(pi: ExtensionAPI, options?: RegisterCommitOptions): void;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
// forge:commit — native kickoff handler (FORGE-S21-T10).
|
|
2
|
-
//
|
|
3
|
-
// Replaces the auto-generated stub previously installed by
|
|
4
|
-
// registerAllForgeCommands (forge-commands.ts). Kickoff Shim archetype
|
|
5
|
-
// (Pack-04 + Pack-06): single LLM handoff in current context, no fork.
|
|
6
|
-
//
|
|
7
|
-
// Note: The materialized workflow (commit_task.md) declares
|
|
8
|
-
// `audience: subagent` — advisory only. Users may invoke this command
|
|
9
|
-
// manually from the CLI; assertAudience never refuses subagent-audience
|
|
10
|
-
// workflows. Orchestrator chains still dispatch via runForgeSubagent
|
|
11
|
-
// directly and do NOT route through this handler.
|
|
12
|
-
//
|
|
13
|
-
// Iron Laws:
|
|
14
|
-
// IL1 — code only under forge-cli/src/extensions/forgecli/.
|
|
15
|
-
// IL4 — no JSON.stringify-into-subagent dispatch.
|
|
16
|
-
// IL6 — no shell-string interpolation; no spawn calls here.
|
|
17
|
-
// IL7 — every failure path emits ctx.ui.notify and returns; no silent
|
|
18
|
-
// continuation.
|
|
19
|
-
import * as fs from "node:fs";
|
|
20
|
-
import * as path from "node:path";
|
|
21
|
-
import { assertAudience } from "./audience-gate.js";
|
|
22
|
-
import { discoverForgeConfig } from "./forge-root.js";
|
|
23
|
-
import { sendKickoff } from "./kickoff.js";
|
|
24
|
-
// FORGE-S25-T16: extracted to lib modules (H-1, H-2). Re-exported here for
|
|
25
|
-
// backward compatibility with existing test and consumer imports.
|
|
26
|
-
import { extractPersonaNames } from "./lib/frontmatter-parser.js";
|
|
27
|
-
import { parseGuardArgs, runPipelineGuard } from "./lib/pipeline-guard.js";
|
|
28
|
-
import { loadPersona, PersonaSkillLoaderError } from "./parsers/persona-skill-loader.js";
|
|
29
|
-
import { loadWorkflow, WorkflowLoaderError } from "./parsers/workflow-loader.js";
|
|
30
|
-
export { extractPersonaNames };
|
|
31
|
-
import { checkMaterialization } from "./lib/manifest-checker.js";
|
|
32
|
-
export { checkMaterialization };
|
|
33
|
-
export function parseCommitArgs(rawArgs, cwd) {
|
|
34
|
-
const trimmed = (rawArgs ?? "").trim();
|
|
35
|
-
if (trimmed === "") {
|
|
36
|
-
return { mode: "empty", taskRef: "", sourceLabel: "(no input — engineer infers task from store/context)" };
|
|
37
|
-
}
|
|
38
|
-
if (trimmed.startsWith("@")) {
|
|
39
|
-
const ref = trimmed.slice(1).trim();
|
|
40
|
-
const filePath = path.isAbsolute(ref) ? ref : path.resolve(cwd, ref);
|
|
41
|
-
const seed = fs.readFileSync(filePath, "utf8");
|
|
42
|
-
return { mode: "file", taskRef: seed, sourceLabel: `(seed from file: ${ref})` };
|
|
43
|
-
}
|
|
44
|
-
return { mode: "text", taskRef: trimmed, sourceLabel: "(seed from inline text)" };
|
|
45
|
-
}
|
|
46
|
-
export function composeKickoff(opts) {
|
|
47
|
-
const { workflowMd, personaIdentity, parsed } = opts;
|
|
48
|
-
const sections = ["# /forge:commit", ""];
|
|
49
|
-
if (personaIdentity.trim().length > 0) {
|
|
50
|
-
sections.push(personaIdentity.trim(), "");
|
|
51
|
-
}
|
|
52
|
-
sections.push("## Dispatch", "", "Run the workflow below. Specifically:", "", "1. Read the task implementation at `engineering/sprints/<SPRINT_ID>/<TASK_ID>/PROGRESS.md` (the source of truth).", "2. Query the store for the task and its sprint/feature context via `forge_store_query` — do NOT raw-read `.forge/store/`.", "3. Follow the workflow Algorithm verbatim: stage changes, write commit message, finalize store status.", "4. Write `COMMIT-SUMMARY.json` to the task directory using the `write` tool.", "5. Update task status by calling the `forge_store` MCP tool: `{command:'update-status', args:['task','<TASK_ID>','status','committed']}`. Never raw-write `.forge/store/`. Do NOT bash-shell `forge store ...`.", "6. Honour Pack-06 Read/Write/Ask/Store discipline: writes go via the `forge_store` MCP tool; in-conversation clarifications use `forge_ask_user`.");
|
|
53
|
-
sections.push("", "---", "", "## Workflow", "", workflowMd.trim(), "", "---");
|
|
54
|
-
if (parsed.mode === "empty") {
|
|
55
|
-
sections.push("", "## Input", "", "(no seed — infer task from sprint context and store)");
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
sections.push("", `## Input — ${parsed.sourceLabel}`, "", parsed.taskRef.trim());
|
|
59
|
-
}
|
|
60
|
-
return sections.join("\n");
|
|
61
|
-
}
|
|
62
|
-
// Registration -------------------------------------------------------------
|
|
63
|
-
const WORKFLOW_REL_PATH = path.join(".forge", "workflows", "commit_task.md");
|
|
64
|
-
export function registerCommit(pi, options = {}) {
|
|
65
|
-
pi.registerCommand("forge:commit", {
|
|
66
|
-
description: "Run the commit-task workflow for a Forge task. " +
|
|
67
|
-
"Usage: /forge:commit [@<file> | <free-form text>]. " +
|
|
68
|
-
"Note: this workflow is subagent-only; standalone invocations are refused. " +
|
|
69
|
-
"Orchestrator chains dispatch directly via runForgeSubagent.",
|
|
70
|
-
async handler(args, ctx) {
|
|
71
|
-
const cwd = options.cwd ?? process.cwd();
|
|
72
|
-
const workflowPath = path.join(cwd, WORKFLOW_REL_PATH);
|
|
73
|
-
// Pipeline step guard (FORGE-S26-T11): check task state before dispatching.
|
|
74
|
-
const guardParsed = parseGuardArgs(args);
|
|
75
|
-
if (!guardParsed.force) {
|
|
76
|
-
const forgeConfig = discoverForgeConfig(cwd);
|
|
77
|
-
if (forgeConfig) {
|
|
78
|
-
const guard = runPipelineGuard("commit", guardParsed.taskIdHint, forgeConfig.forgeRoot, cwd);
|
|
79
|
-
if (guard.blocked) {
|
|
80
|
-
ctx.ui.notify(guard.message, "error");
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const effectiveArgs = guardParsed.cleanArgs;
|
|
86
|
-
let workflowMd;
|
|
87
|
-
let workflowAudience;
|
|
88
|
-
try {
|
|
89
|
-
const loaded = loadWorkflow(workflowPath);
|
|
90
|
-
workflowMd = loaded.rawMarkdown;
|
|
91
|
-
workflowAudience = loaded.audience;
|
|
92
|
-
}
|
|
93
|
-
catch (err) {
|
|
94
|
-
if (err instanceof WorkflowLoaderError) {
|
|
95
|
-
if (err.code === "missing_file") {
|
|
96
|
-
ctx.ui.notify(`× forge:commit — workflow not found at ${WORKFLOW_REL_PATH}; run /forge:init or /forge:rebuild first.`, "error");
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
ctx.ui.notify(`× forge:commit — workflow load failed (${err.code}): ${err.message}`, "error");
|
|
100
|
-
}
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const e = err;
|
|
104
|
-
ctx.ui.notify(`× forge:commit — failed to read workflow: ${e.message ?? "unknown"}`, "error");
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
let parsed;
|
|
108
|
-
try {
|
|
109
|
-
parsed = parseCommitArgs(effectiveArgs, cwd);
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
const e = err;
|
|
113
|
-
ctx.ui.notify(`× forge:commit — failed to read seed: ${e.message ?? "unknown"}`, "error");
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const check = checkMaterialization(workflowPath, workflowMd);
|
|
117
|
-
if (!check.ok) {
|
|
118
|
-
for (const marker of check.missing) {
|
|
119
|
-
ctx.ui.notify(`× workflow regression: ${marker} not found in ${workflowPath}`, "error");
|
|
120
|
-
}
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
const personas = extractPersonaNames(workflowMd);
|
|
124
|
-
let personaIdentity = "";
|
|
125
|
-
if (personas.length > 0) {
|
|
126
|
-
try {
|
|
127
|
-
const persona = loadPersona(personas[0], { cwd });
|
|
128
|
-
personaIdentity = persona.identity;
|
|
129
|
-
}
|
|
130
|
-
catch (err) {
|
|
131
|
-
if (err instanceof PersonaSkillLoaderError) {
|
|
132
|
-
ctx.ui.notify(`× forge:commit — persona '${personas[0]}' load failed (${err.code}): ${err.message}`, "error");
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const e = err;
|
|
136
|
-
ctx.ui.notify(`× forge:commit — persona load error: ${e.message ?? "unknown"}`, "error");
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (!assertAudience({ workflowName: "commit_task", audience: workflowAudience }, ctx)) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const kickoff = composeKickoff({
|
|
144
|
-
workflowMd,
|
|
145
|
-
personaIdentity,
|
|
146
|
-
parsed,
|
|
147
|
-
});
|
|
148
|
-
sendKickoff(pi, kickoff);
|
|
149
|
-
},
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
//# sourceMappingURL=commit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commit.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/commit.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,2DAA2D;AAC3D,uEAAuE;AACvE,uEAAuE;AACvE,EAAE;AACF,4DAA4D;AAC5D,sEAAsE;AACtE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,EAAE;AACF,aAAa;AACb,8DAA8D;AAC9D,oDAAoD;AACpD,8DAA8D;AAC9D,wEAAwE;AACxE,wBAAwB;AAExB,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,2EAA2E;AAC3E,kEAAkE;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,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EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;oBAClD,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;gBACpC,CAAC;gBAAC,OAAO,GAAY,EAAE,CAAC;oBACvB,IAAI,GAAG,YAAY,uBAAuB,EAAE,CAAC;wBAC5C,GAAG,CAAC,EAAE,CAAC,MAAM,CACZ,6BAA6B,QAAQ,CAAC,CAAC,CAAC,kBAAkB,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE,EACrF,OAAO,CACP,CAAC;wBACF,OAAO;oBACR,CAAC;oBACD,MAAM,CAAC,GAAG,GAA2B,CAAC;oBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,wCAAwC,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;oBACzF,OAAO;gBACR,CAAC;YACF,CAAC;YAED,IAAI,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;gBACvF,OAAO;YACR,CAAC;YAED,MAAM,OAAO,GAAG,cAAc,CAAC;gBAC9B,UAAU;gBACV,eAAe;gBACf,MAAM;aACN,CAAC,CAAC;YAEH,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
export interface RegisterConfigCommandOptions {
|
|
3
|
-
/** When null, /forge:config is registered but only the routing-config bits
|
|
4
|
-
* are reachable — plugin-config display is hidden (no .forge to read).
|
|
5
|
-
*/
|
|
6
|
-
forgeRoot: string | null;
|
|
7
|
-
}
|
|
8
|
-
export declare function registerConfigCommand(pi: ExtensionAPI, _opts: RegisterConfigCommandOptions): void;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// Native /forge:config handler — replaces the LLM-backed delegateMarkdownCommand
|
|
2
|
-
// stub that previously lived in forge-commands.ts.
|
|
3
|
-
//
|
|
4
|
-
// Plan 16 Slice 4a + 4b. The handler delegates to runConfigTui which is the
|
|
5
|
-
// same entry point used by the `forge config` bin subcommand — single source
|
|
6
|
-
// of truth for the routing config TUI / show flow. The wrapper supplies a
|
|
7
|
-
// `mountConfigTui` callback that uses ctx.ui.custom() to overlay the TUI.
|
|
8
|
-
import { createConfigTuiComponent } from "./config-tui/component.js";
|
|
9
|
-
import { runConfigTui } from "./config-tui/handler.js";
|
|
10
|
-
import { getInputRouter } from "./input-router.js";
|
|
11
|
-
export function registerConfigCommand(pi, _opts) {
|
|
12
|
-
pi.registerCommand("forge:config", {
|
|
13
|
-
description: "Inspect or change forge-cli routing config (persona-models, pipeline overrides) and view Forge project config",
|
|
14
|
-
async handler(args, ctx) {
|
|
15
|
-
const argv = args.trim().length === 0 ? [] : args.trim().split(/\s+/);
|
|
16
|
-
const mountConfigTui = async (init) => {
|
|
17
|
-
// Mark overlay active so forge-input-router suppresses arrow-activator
|
|
18
|
-
// listeners (thread-switcher's ↓, whats-new's ↓) while the TUI owns
|
|
19
|
-
// input focus.
|
|
20
|
-
const router = getInputRouter();
|
|
21
|
-
router.pushOverlay();
|
|
22
|
-
try {
|
|
23
|
-
const exitCode = await ctx.ui.custom((tui, theme, _kb, done) => {
|
|
24
|
-
// Component drives done() on q or successful confirm-quit.
|
|
25
|
-
// Pi TUI key rule 3: call tui.requestRender() after state changes.
|
|
26
|
-
const component = createConfigTuiComponent({
|
|
27
|
-
...init,
|
|
28
|
-
onExit: (code) => done(code),
|
|
29
|
-
onSaved: (target) => ctx.ui.notify(`forge config: saved → ${target}`, "info"),
|
|
30
|
-
onError: (msg) => ctx.ui.notify(`forge config: ${msg}`, "error"),
|
|
31
|
-
requestRender: () => tui.requestRender(),
|
|
32
|
-
theme,
|
|
33
|
-
});
|
|
34
|
-
return component;
|
|
35
|
-
}, {
|
|
36
|
-
overlay: true,
|
|
37
|
-
overlayOptions: {
|
|
38
|
-
width: "100%",
|
|
39
|
-
anchor: "center",
|
|
40
|
-
margin: 0,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
return exitCode;
|
|
44
|
-
}
|
|
45
|
-
finally {
|
|
46
|
-
router.popOverlay();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
const exitCode = await runConfigTui(argv, process.cwd(), {
|
|
50
|
-
write: () => { },
|
|
51
|
-
writeErr: (s) => ctx.ui.notify(s, "error"),
|
|
52
|
-
ctx: {
|
|
53
|
-
notify: (msg, level) => {
|
|
54
|
-
const lvl = (level === "warning" || level === "error" ? level : "info");
|
|
55
|
-
ctx.ui.notify(msg, lvl);
|
|
56
|
-
},
|
|
57
|
-
mountConfigTui,
|
|
58
|
-
modelRegistry: ctx.modelRegistry,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
if (exitCode !== 0) {
|
|
62
|
-
ctx.ui.notify(`forge:config exited with code ${exitCode}`, "warning");
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=config-command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-command.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/config-command.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,0EAA0E;AAG1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD,MAAM,UAAU,qBAAqB,CAAC,EAAgB,EAAE,KAAmC;IAC1F,EAAE,CAAC,eAAe,CAAC,cAAc,EAAE;QAClC,WAAW,EACV,+GAA+G;QAChH,KAAK,CAAC,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AO,QAAQ,CAAC;gBACjB,CAAC;wBAAS,CAAC;oBACV,MAAM,CAAC,UAAU,EAAE,CAAC;gBACrB,CAAC;YACF,CAAC,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE;gBACxD,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;gBACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC;gBAC1C,GAAG,EAAE;oBACJ,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;wBACtB,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAG5D,CAAC;wBACX,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;oBACzB,CAAC;oBACD,cAAc;oBACd,aAAa,EAAE,GAAG,CAAC,aAAa;iBAChC;aACD,CAAC,CAAC;YAEH,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;gBACpB,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,iCAAiC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;YACvE,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export interface PersonaModel {
|
|
2
|
-
provider: string;
|
|
3
|
-
model: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
}
|
|
6
|
-
export type PersonaModelsMap = Record<string, PersonaModel>;
|
|
7
|
-
export interface PhaseConfig {
|
|
8
|
-
"model-override"?: string | PersonaModel;
|
|
9
|
-
}
|
|
10
|
-
export interface PipelineConfig {
|
|
11
|
-
"persona-models"?: PersonaModelsMap;
|
|
12
|
-
/** Phase overrides keyed by role string. */
|
|
13
|
-
phases?: Record<string, PhaseConfig>;
|
|
14
|
-
}
|
|
15
|
-
export interface SkillCurationConfig {
|
|
16
|
-
/**
|
|
17
|
-
* FORGE-S24 SKILL-CURATION pipeline rollout flag. Default false.
|
|
18
|
-
* When false, the four T08–T11 modules (skill-retriever, skill-usage-tracker,
|
|
19
|
-
* skill-curator-subagent, friction-emit) no-op at entry. Wired into the
|
|
20
|
-
* orchestrator handlers (run-task / fix-bug) so a flag-off run is
|
|
21
|
-
* byte-identical to pre-FORGE-S24 behaviour.
|
|
22
|
-
*/
|
|
23
|
-
enabled?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface ForgeCliFeatureFlags {
|
|
26
|
-
skillCuration?: SkillCurationConfig;
|
|
27
|
-
}
|
|
28
|
-
export interface GlobalConfig {
|
|
29
|
-
"persona-models"?: PersonaModelsMap;
|
|
30
|
-
forgeCli?: ForgeCliFeatureFlags;
|
|
31
|
-
}
|
|
32
|
-
export interface ProjectConfig {
|
|
33
|
-
"persona-models"?: PersonaModelsMap;
|
|
34
|
-
forgeCli?: ForgeCliFeatureFlags;
|
|
35
|
-
pipelines?: Record<string, PipelineConfig>;
|
|
36
|
-
}
|
|
37
|
-
export interface MergedConfig {
|
|
38
|
-
/** Shallow-merged persona-models (project wins on key collision). */
|
|
39
|
-
"persona-models"?: PersonaModelsMap;
|
|
40
|
-
/** Project-only pipelines (L3/L4 config lives here). */
|
|
41
|
-
pipelines?: Record<string, PipelineConfig>;
|
|
42
|
-
/** The raw global config for L1 lookups — null if absent or invalid. */
|
|
43
|
-
_global: GlobalConfig | null;
|
|
44
|
-
/** The raw project config for L2 lookups — null if absent or invalid. */
|
|
45
|
-
_project: ProjectConfig | null;
|
|
46
|
-
}
|
|
47
|
-
export interface LayeredConfig {
|
|
48
|
-
global: GlobalConfig | null;
|
|
49
|
-
project: ProjectConfig | null;
|
|
50
|
-
merged: MergedConfig;
|
|
51
|
-
errors: string[];
|
|
52
|
-
}
|
|
53
|
-
export declare function loadLayeredConfig(cwd: string): LayeredConfig;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import AjvModule from "ajv";
|
|
3
|
-
import schema from "./forge-cli-schema.json" with { type: "json" };
|
|
4
|
-
import { getGlobalConfigPath, getProjectConfigPath } from "./paths/paths.js";
|
|
5
|
-
// Ajv v8 ESM interop: default export is a namespace holder;
|
|
6
|
-
// the actual constructor lives at .Ajv or .default.Ajv.
|
|
7
|
-
const Ajv = AjvModule.default?.Ajv ?? AjvModule.Ajv ?? AjvModule;
|
|
8
|
-
const ajv = new Ajv({ allErrors: true });
|
|
9
|
-
const validate = ajv.compile(schema);
|
|
10
|
-
function validateConfig(raw, label) {
|
|
11
|
-
const ok = validate(raw);
|
|
12
|
-
if (!ok) {
|
|
13
|
-
const messages = validate.errors
|
|
14
|
-
?.map((e) => `${e.instancePath || "/"} ${e.message}`)
|
|
15
|
-
.join("; ") ?? "unknown";
|
|
16
|
-
return { valid: false, error: `forge-cli ${label} config schema error: ${messages}` };
|
|
17
|
-
}
|
|
18
|
-
return { valid: true, data: raw };
|
|
19
|
-
}
|
|
20
|
-
function readJsonFile(filePath) {
|
|
21
|
-
try {
|
|
22
|
-
return JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
|
23
|
-
}
|
|
24
|
-
catch (_err) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export function loadLayeredConfig(cwd) {
|
|
29
|
-
const errors = [];
|
|
30
|
-
const globalPath = getGlobalConfigPath();
|
|
31
|
-
const projectPath = getProjectConfigPath(cwd);
|
|
32
|
-
let globalConfig = null;
|
|
33
|
-
let projectConfig = null;
|
|
34
|
-
const rawGlobal = readJsonFile(globalPath);
|
|
35
|
-
if (rawGlobal !== null) {
|
|
36
|
-
const result = validateConfig(rawGlobal, "global");
|
|
37
|
-
if (result.valid) {
|
|
38
|
-
globalConfig = result.data;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
errors.push(result.error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const rawProject = readJsonFile(projectPath);
|
|
45
|
-
if (rawProject !== null) {
|
|
46
|
-
const result = validateConfig(rawProject, "project");
|
|
47
|
-
if (result.valid) {
|
|
48
|
-
projectConfig = result.data;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
errors.push(result.error);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// Shallow-merge persona-models: global first, project overwrites per key
|
|
55
|
-
const mergedPersonaModels = {
|
|
56
|
-
...(globalConfig?.["persona-models"] ?? {}),
|
|
57
|
-
...(projectConfig?.["persona-models"] ?? {}),
|
|
58
|
-
};
|
|
59
|
-
const merged = {
|
|
60
|
-
_global: globalConfig,
|
|
61
|
-
_project: projectConfig,
|
|
62
|
-
};
|
|
63
|
-
if (Object.keys(mergedPersonaModels).length > 0) {
|
|
64
|
-
merged["persona-models"] = mergedPersonaModels;
|
|
65
|
-
}
|
|
66
|
-
// Pipelines are project-only (global config is project-agnostic)
|
|
67
|
-
if (projectConfig?.pipelines) {
|
|
68
|
-
merged.pipelines = projectConfig.pipelines;
|
|
69
|
-
}
|
|
70
|
-
return { global: globalConfig, project: projectConfig, merged, errors };
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=config-layer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-layer.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/config-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,SAAS,MAAM,KAAK,CAAC;AAC5B,OAAO,MAAM,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,4DAA4D;AAC5D,wDAAwD;AACxD,MAAM,GAAG,GAAI,SAAiB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B,MAAM,CAAC,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC;IAC5C,CAAC;IAGD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PersonaModelsMap, PipelineConfig } from "./config-layer.js";
|
|
2
|
-
export type ConfigLayer = "global" | "project";
|
|
3
|
-
export interface RoutingConfigBuffer {
|
|
4
|
-
"persona-models"?: PersonaModelsMap;
|
|
5
|
-
pipelines?: Record<string, PipelineConfig>;
|
|
6
|
-
}
|
|
7
|
-
export interface WriteOptions {
|
|
8
|
-
layer: ConfigLayer;
|
|
9
|
-
cwd: string;
|
|
10
|
-
buffer: RoutingConfigBuffer;
|
|
11
|
-
}
|
|
12
|
-
export declare function resolveTargetPath(opts: {
|
|
13
|
-
layer: ConfigLayer;
|
|
14
|
-
cwd: string;
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function writeRoutingConfig(opts: WriteOptions): string;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// Atomic, schema-validated writer for forge-cli routing config files.
|
|
2
|
-
//
|
|
3
|
-
// Plan 16, Slice 4a. Writes ONLY to (paths resolved via paths/paths.ts):
|
|
4
|
-
// - global layer (L1) → getGlobalConfigPath() → ~/.pi/forge-cli/config.json
|
|
5
|
-
// - project layer (L2/L3/L4) → getProjectConfigPath(cwd) →
|
|
6
|
-
// <cwd>/.pi/forge-cli/config.json
|
|
7
|
-
//
|
|
8
|
-
// Never writes to .forge/config.json — that's the plugin's pipeline catalogue,
|
|
9
|
-
// read-only from this TUI.
|
|
10
|
-
//
|
|
11
|
-
// Write protocol:
|
|
12
|
-
// 1. Validate buffer against forge-cli-schema.json. Throw on fail.
|
|
13
|
-
// 2. If buffer is empty ({}) and target file exists → unlink. Return target.
|
|
14
|
-
// 3. Otherwise: write to <target>.tmp, fsync, rename atomically to <target>.
|
|
15
|
-
import * as fs from "node:fs";
|
|
16
|
-
import * as path from "node:path";
|
|
17
|
-
import AjvModule from "ajv";
|
|
18
|
-
import schema from "./forge-cli-schema.json" with { type: "json" };
|
|
19
|
-
import { getGlobalConfigPath, getProjectConfigPath } from "./paths/paths.js";
|
|
20
|
-
// Ajv v8 ESM interop: default export is a namespace holder;
|
|
21
|
-
// the actual constructor lives at .Ajv or .default.Ajv.
|
|
22
|
-
const Ajv = AjvModule.default?.Ajv ?? AjvModule.Ajv ?? AjvModule;
|
|
23
|
-
const ajv = new Ajv({ allErrors: true });
|
|
24
|
-
const validate = ajv.compile(schema);
|
|
25
|
-
export function resolveTargetPath(opts) {
|
|
26
|
-
if (opts.layer === "global") {
|
|
27
|
-
return getGlobalConfigPath();
|
|
28
|
-
}
|
|
29
|
-
return getProjectConfigPath(opts.cwd);
|
|
30
|
-
}
|
|
31
|
-
function isEmpty(buffer) {
|
|
32
|
-
const personaCount = Object.keys(buffer["persona-models"] ?? {}).length;
|
|
33
|
-
const pipelineCount = Object.keys(buffer.pipelines ?? {}).length;
|
|
34
|
-
return personaCount === 0 && pipelineCount === 0;
|
|
35
|
-
}
|
|
36
|
-
export function writeRoutingConfig(opts) {
|
|
37
|
-
const target = resolveTargetPath(opts);
|
|
38
|
-
// Empty buffer → delete file if present.
|
|
39
|
-
if (isEmpty(opts.buffer)) {
|
|
40
|
-
if (fs.existsSync(target)) {
|
|
41
|
-
fs.unlinkSync(target);
|
|
42
|
-
}
|
|
43
|
-
return target;
|
|
44
|
-
}
|
|
45
|
-
// Validate FIRST. Any failure short-circuits before touching the filesystem.
|
|
46
|
-
const ok = validate(opts.buffer);
|
|
47
|
-
if (!ok) {
|
|
48
|
-
const messages = validate.errors
|
|
49
|
-
?.map((e) => `${e.instancePath || "/"} ${e.message}`)
|
|
50
|
-
.join("; ") ?? "unknown";
|
|
51
|
-
throw new Error(`forge-cli config schema error: ${messages}`);
|
|
52
|
-
}
|
|
53
|
-
// Ensure parent dir exists.
|
|
54
|
-
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
55
|
-
// Atomic write: temp file + rename. Pretty-print for human-readable diffs.
|
|
56
|
-
const tmpPath = `${target}.tmp`;
|
|
57
|
-
const serialized = `${JSON.stringify(opts.buffer, null, 2)}\n`;
|
|
58
|
-
const fd = fs.openSync(tmpPath, "w");
|
|
59
|
-
try {
|
|
60
|
-
fs.writeSync(fd, serialized);
|
|
61
|
-
fs.fsyncSync(fd);
|
|
62
|
-
}
|
|
63
|
-
finally {
|
|
64
|
-
fs.closeSync(fd);
|
|
65
|
-
}
|
|
66
|
-
fs.renameSync(tmpPath, target);
|
|
67
|
-
return target;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=config-writer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-writer.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/config-writer.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,yEAAyE;AACzE,8EAA8E;AAC9E,6DAA6D;AAC7D,sCAAsC;AACtC,EAAE;AACF,+EAA+E;AAC/E,2BAA2B;AAC3B,EAAE;AACF,kBAAkB;AAClB,qEAAqE;AACrE,+EAA+E;AAC/E,+EAA+E;AAE/E,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,SAAS,MAAM,KAAK,CAAC;AAE5B,OAAO,MAAM,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,4DAA4D;AAC5D,wDAAwD;AACxD,MAAM,GAAG,GAAI,SAAiB,CAAC,OAAO,EAAE,GAAG,IAAK,SAAiB,CAAC,GAAG,IAAI,SAAS,CAAC;AAenF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI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