@entelligentsia/forgecli 1.0.25 → 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 +341 -0
- package/README.md +2 -0
- package/dist/CHANGELOG-forge-plugin.md +264 -0
- package/dist/CHANGELOG-pi.md +143 -0
- package/dist/bin/argv.d.ts +2 -2
- package/dist/bin/argv.js +37 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +30 -16
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/init.d.ts +23 -0
- package/dist/bin/init.js +123 -0
- package/dist/bin/init.js.map +1 -0
- 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/bin/uninstall.d.ts +20 -0
- package/dist/bin/uninstall.js +141 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.d.ts +40 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +384 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.d.ts +46 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js +245 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.d.ts +23 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +235 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -0
- 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/dashboard/component.js +10 -7
- package/dist/extensions/forgecli/dashboard/component.js.map +1 -1
- 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-body.d.ts +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js +65 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.d.ts +23 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js +140 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.d.ts +54 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js +349 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +11 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +82 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js +100 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.d.ts +72 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js +204 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +38 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +198 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js +55 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.d.ts +7 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js +293 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +501 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.d.ts +41 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.d.ts +43 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js +85 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.d.ts +8 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.d.ts +28 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js +45 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.d.ts +26 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js +75 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js.map +1 -0
- 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/common/summary-recovery.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/fix-bug.d.ts +9 -93
- package/dist/extensions/forgecli/orchestrators/fix-bug.js +23 -1721
- package/dist/extensions/forgecli/orchestrators/fix-bug.js.map +1 -1
- 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/run-sprint.d.ts +3 -12
- package/dist/extensions/forgecli/orchestrators/run-sprint.js +48 -270
- package/dist/extensions/forgecli/orchestrators/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/run-task.d.ts +10 -214
- package/dist/extensions/forgecli/orchestrators/run-task.js +31 -1481
- package/dist/extensions/forgecli/orchestrators/run-task.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.d.ts +33 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js +135 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.d.ts +18 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js +55 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js +174 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +494 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.d.ts +62 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.d.ts +4 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js +48 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.d.ts +63 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js +185 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.d.ts +34 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js +78 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.d.ts +42 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js +370 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +17 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +48 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js +58 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js +35 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +36 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +187 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -0
- 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/extensions/forgecli/update/forge-update-command.js +10 -7
- package/dist/extensions/forgecli/update/forge-update-command.js.map +1 -1
- package/dist/forge-payload/.base-pack/workflows/collator_agent.md +5 -6
- package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +1 -1
- package/dist/forge-payload/.base-pack/workflows-js/wfl-init.js +449 -0
- 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 +170 -0
- package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/commands/add-pipeline.md +1 -1
- package/dist/forge-payload/commands/add-task.md +3 -3
- package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +2 -2
- package/dist/forge-payload/commands/ask.md +1 -1
- package/dist/forge-payload/commands/check-agent.md +8 -24
- package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +2 -2
- package/dist/forge-payload/commands/config.md +1 -1
- package/dist/forge-payload/commands/enhance.md +31 -5
- package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +2 -2
- package/dist/forge-payload/commands/health.md +1 -1
- package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +2 -2
- package/dist/forge-payload/commands/init.md +186 -67
- package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +2 -2
- package/dist/forge-payload/commands/rebuild.md +3 -3
- package/dist/forge-payload/commands/remove.md +1 -1
- package/dist/forge-payload/commands/repair.md +1 -1
- package/dist/forge-payload/commands/report-bug.md +1 -1
- package/dist/forge-payload/commands/reset.md +117 -0
- package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +2 -2
- package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +2 -2
- package/dist/forge-payload/commands/status.md +1 -1
- package/dist/forge-payload/commands/update.md +3 -3
- package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +2 -2
- package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
- package/dist/forge-payload/hooks/lib/common.cjs +228 -0
- package/dist/forge-payload/hooks/lib/plugin-detection.cjs +106 -0
- package/dist/forge-payload/hooks/lib/update-msg.cjs +23 -0
- package/dist/forge-payload/hooks/lib/update-url.cjs +46 -0
- package/dist/forge-payload/hooks/lib/write-registry.js +53 -0
- package/dist/forge-payload/init/discovery/discover-database.md +32 -0
- package/dist/forge-payload/init/discovery/discover-processes.md +31 -0
- package/dist/forge-payload/init/discovery/discover-routing.md +31 -0
- package/dist/forge-payload/init/discovery/discover-stack.md +33 -0
- package/dist/forge-payload/init/discovery/discover-testing.md +34 -0
- package/dist/forge-payload/init/generation/generate-commands.md +171 -0
- package/dist/forge-payload/init/generation/generate-kb-doc.md +60 -0
- package/dist/forge-payload/init/generation/generate-persona.md +73 -0
- package/dist/forge-payload/init/generation/generate-skill.md +66 -0
- package/dist/forge-payload/init/generation/generate-template.md +60 -0
- package/dist/forge-payload/init/generation/generate-tools.md +133 -0
- package/dist/forge-payload/init/generation/generate-workflows.md +78 -0
- package/dist/forge-payload/init/phases/phase-1-collect.md +10 -2
- package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
- package/dist/forge-payload/init/phases/phase-4-register.md +8 -0
- package/dist/forge-payload/init/workflow-gen-plan.json +17 -0
- package/dist/forge-payload/integrity.json +33 -18
- package/dist/forge-payload/meta/workflows/meta-collate.md +5 -6
- package/dist/forge-payload/meta/workflows/meta-migrate.md +1 -1
- 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 +5 -12
- package/dist/forge-payload/tools/forge-preflight.cjs +268 -0
- package/dist/forge-payload/tools/lib/paths.cjs +12 -11
- package/dist/forge-payload/tools/lib/pricing.cjs +31 -11
- package/dist/forge-payload/tools/query-logger.cjs +34 -0
- 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 +14 -7
- 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/package.json +8 -7
- package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
- package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// orchestrator-entry.ts — shared "common concerns" for orchestrator entry.
|
|
2
|
+
//
|
|
3
|
+
// Three helpers used by all three orchestrator handlers:
|
|
4
|
+
// - gatherModelValidationInputs: the byte-identical persona/pipeline/model
|
|
5
|
+
// catalogue snippet (run-task, fix-bug, run-sprint).
|
|
6
|
+
// - resolveOrchestratorEntry: discover the Forge config, fail-and-clear-status
|
|
7
|
+
// when absent, sweep orphaned transcripts, return resolved tool paths.
|
|
8
|
+
// - runPipelinePreflight: layered-config schema check + full model-config
|
|
9
|
+
// validation (used by run-task and fix-bug; run-sprint keeps its own inline
|
|
10
|
+
// sprint-entry validation per the N-H-D boundary).
|
|
11
|
+
import * as path from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
import { loadLayeredConfig } from "../../config/config-layer.js";
|
|
14
|
+
import { readPersonaDir, readPipelineNames } from "../../lib/catalog-helpers.js";
|
|
15
|
+
import { discoverForgeConfigCached } from "../../lib/forge-config.js";
|
|
16
|
+
import { sweepProjectTranscripts } from "../../transcript-archive.js";
|
|
17
|
+
import { runOrchestratorPreflight } from "../orchestrator-preflight.js";
|
|
18
|
+
/** Gather the model-validation inputs shared by every orchestrator entry: the
|
|
19
|
+
* bundled persona catalogue, the project pipeline names, and the session model
|
|
20
|
+
* registry. The persona dir is resolved relative to this module's dist
|
|
21
|
+
* location (orchestrators/common → four levels up to dist/forge-payload). */
|
|
22
|
+
export function gatherModelValidationInputs(cwd, ctx) {
|
|
23
|
+
const personasDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "..", "..", "forge-payload", ".base-pack", "personas");
|
|
24
|
+
const personaCatalogue = readPersonaDir(personasDir);
|
|
25
|
+
const forgeCfgPath = path.join(cwd, ".forge", "config.json");
|
|
26
|
+
const pipelineCatalogue = readPipelineNames(forgeCfgPath);
|
|
27
|
+
const availableModels = (ctx.modelRegistry?.getAvailable?.() ?? []).map((m) => ({ provider: m.provider, id: m.id }));
|
|
28
|
+
return { personaCatalogue, pipelineCatalogue, availableModels };
|
|
29
|
+
}
|
|
30
|
+
/** Discover the Forge config at cwd. On success, sweep orphaned project
|
|
31
|
+
* transcripts and return the resolved tool paths. On failure, notify and clear
|
|
32
|
+
* the status line, then return null (caller returns immediately). */
|
|
33
|
+
export function resolveOrchestratorEntry(opts) {
|
|
34
|
+
const { cwd, notify } = opts;
|
|
35
|
+
const forgeConfig = discoverForgeConfigCached(cwd);
|
|
36
|
+
if (!forgeConfig) {
|
|
37
|
+
notify.error("no Forge project found at cwd. Run /forge:init first.");
|
|
38
|
+
notify.clearStatus();
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const forgeRoot = forgeConfig.forgeRoot;
|
|
42
|
+
// Best-effort transcript-archive sweep: adopt any project-local runs not yet
|
|
43
|
+
// in the central index (crash recovery + pre-existing history). Runs BEFORE
|
|
44
|
+
// any pipeline creates its own transcript writer, so in-flight runs are
|
|
45
|
+
// never swept half-written.
|
|
46
|
+
sweepProjectTranscripts(cwd);
|
|
47
|
+
return {
|
|
48
|
+
forgeRoot,
|
|
49
|
+
storeCli: path.join(forgeRoot, "tools", "store-cli.cjs"),
|
|
50
|
+
preflightGate: path.join(forgeRoot, "tools", "preflight-gate.cjs"),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** Layered-config schema check followed by full model-config validation.
|
|
54
|
+
* Surfaces schema/validation errors via the notifier (matching the legacy
|
|
55
|
+
* inline strings) and returns the merged routing config on success. */
|
|
56
|
+
export function runPipelinePreflight(opts) {
|
|
57
|
+
const { cwd, ctx, notify } = opts;
|
|
58
|
+
// N-B-E: surface schema errors to caller (Decision 9 — orchestrators
|
|
59
|
+
// fail-fast). See doc/decisions/layered-config-error-policy.md.
|
|
60
|
+
const { merged: modelRoutingConfig, errors: layeredConfigErrors } = loadLayeredConfig(cwd);
|
|
61
|
+
if (layeredConfigErrors.length > 0) {
|
|
62
|
+
for (const e of layeredConfigErrors) {
|
|
63
|
+
notify.error(`forge-cli config schema error: ${e}`);
|
|
64
|
+
}
|
|
65
|
+
return { proceed: false, lastError: `forge-cli config schema errors: ${layeredConfigErrors.join("; ")}` };
|
|
66
|
+
}
|
|
67
|
+
const inputs = gatherModelValidationInputs(cwd, ctx);
|
|
68
|
+
const preflightResult = runOrchestratorPreflight({
|
|
69
|
+
mode: "task",
|
|
70
|
+
ctx,
|
|
71
|
+
notifyPrefix: notify.label,
|
|
72
|
+
personaCatalogue: inputs.personaCatalogue,
|
|
73
|
+
pipelineCatalogue: inputs.pipelineCatalogue,
|
|
74
|
+
modelRoutingConfig,
|
|
75
|
+
availableModels: inputs.availableModels,
|
|
76
|
+
});
|
|
77
|
+
if (!preflightResult.proceed) {
|
|
78
|
+
return {
|
|
79
|
+
proceed: false,
|
|
80
|
+
lastError: preflightResult.result.lastError ?? "model config validation failed",
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return { proceed: true, modelRoutingConfig };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=orchestrator-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-entry.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/orchestrator-entry.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,yDAAyD;AACzD,6EAA6E;AAC7E,yDAAyD;AACzD,iFAAiF;AACjF,2EAA2E;AAC3E,4EAA4E;AAC5E,gFAAgF;AAChF,uDAAuD;AAEvD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BA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C,kBAAkB;QAClB,eAAe,EAAE,MAAM,CAAC,eAAe;KACvC,CAAC,CAAC;IACH,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC9B,OAAO;YACN,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,eAAe,CAAC,MAAM,CAAC,SAAS,IAAI,gCAAgC;SAC/E,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function isNonInteractive(): boolean;
|
|
2
|
+
/** Validate that an ID contains no path-traversal characters. */
|
|
3
|
+
export declare function validateId(id: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Format an ISO timestamp for human display in the user's local timezone.
|
|
6
|
+
* Falls back to the raw ISO string if parsing fails.
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatLocalTime(iso: string): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// orchestrator-misc.ts — generic orchestrator helpers shared across the
|
|
2
|
+
// task / sprint / bug pipelines. Extracted from run-task.ts (no logic changes)
|
|
3
|
+
// so the per-file architectural line cap is satisfied; run-task.ts re-exports
|
|
4
|
+
// these for backwards compatibility (fix-bug.ts and run-sprint.ts import them
|
|
5
|
+
// from run-task today).
|
|
6
|
+
// ── Non-interactive helpers ───────────────────────────────────────────────
|
|
7
|
+
export function isNonInteractive() {
|
|
8
|
+
return process.env.FORGE_YES === "1" || process.env.FORGE_NON_INTERACTIVE === "1";
|
|
9
|
+
}
|
|
10
|
+
/** Validate that an ID contains no path-traversal characters. */
|
|
11
|
+
export function validateId(id) {
|
|
12
|
+
return /^[A-Za-z0-9_-]+$/.test(id) && !id.includes("..");
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Format an ISO timestamp for human display in the user's local timezone.
|
|
16
|
+
* Falls back to the raw ISO string if parsing fails.
|
|
17
|
+
*/
|
|
18
|
+
export function formatLocalTime(iso) {
|
|
19
|
+
const d = new Date(iso);
|
|
20
|
+
if (Number.isNaN(d.getTime()))
|
|
21
|
+
return iso;
|
|
22
|
+
const date = d.toLocaleString(undefined, {
|
|
23
|
+
year: "numeric",
|
|
24
|
+
month: "short",
|
|
25
|
+
day: "2-digit",
|
|
26
|
+
hour: "2-digit",
|
|
27
|
+
minute: "2-digit",
|
|
28
|
+
second: "2-digit",
|
|
29
|
+
hour12: false,
|
|
30
|
+
});
|
|
31
|
+
// Append short timezone abbreviation for unambiguous reading.
|
|
32
|
+
const tz = new Intl.DateTimeFormat(undefined, { timeZoneName: "short" })
|
|
33
|
+
.formatToParts(d)
|
|
34
|
+
.find((p) => p.type === "timeZoneName")?.value ?? "";
|
|
35
|
+
return tz ? `${date} ${tz}` : date;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=orchestrator-misc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-misc.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/orchestrator-misc.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,+EAA+E;AAC/E,8EAA8E;AAC9E,8EAA8E;AAC9E,wBAAwB;AAExB,6EAA6E;AAE7E,MAAM,UAAU,gBAAgB;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,GAAG,CAAC;AACnF,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,UAAU,CAAC,EAAU;IACpC,OAAO,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IAC1C,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,GAAG,CAAC;IAC1C,MAAM,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE;QACxC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;IACH,8DAA8D;IAC9D,MAAM,EAAE,GACP,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;SAC3D,aAAa,CAAC,CAAC,CAAC;SAChB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
type NotifyLevel = Parameters<ExtensionCommandContext["ui"]["notify"]>[1];
|
|
3
|
+
export interface OrchestratorNotifierOptions {
|
|
4
|
+
/** Command label, e.g. "forge:run-task" / "forge:fix-bug" / "forge:run-sprint". */
|
|
5
|
+
label: string;
|
|
6
|
+
/** ctx.ui status key for this command. */
|
|
7
|
+
statusKey: string;
|
|
8
|
+
/** Optional detail-message status key (absent for run-sprint). */
|
|
9
|
+
messageKey?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface OrchestratorNotifier {
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly statusKey: string;
|
|
14
|
+
/** Raw passthrough to the live ctx.ui.notify. */
|
|
15
|
+
notify(message: string, level?: NotifyLevel): void;
|
|
16
|
+
/** `× <label> — <msg>` at error level. */
|
|
17
|
+
error(msg: string): void;
|
|
18
|
+
/** `⚠ <label> — <msg>` at warning level. */
|
|
19
|
+
warn(msg: string): void;
|
|
20
|
+
/** `<label> — <msg>` at info level. */
|
|
21
|
+
info(msg: string): void;
|
|
22
|
+
/** Set the command status line. */
|
|
23
|
+
setStatus(text: string): void;
|
|
24
|
+
/** Clear the status key (and message key, if configured). */
|
|
25
|
+
clearStatus(): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function createOrchestratorNotifier(ctx: ExtensionCommandContext, opts: OrchestratorNotifierOptions): OrchestratorNotifier;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// orchestrator-notify.ts — shared UI-notification facade for the orchestrator
|
|
2
|
+
// pipelines (run-task, fix-bug, run-sprint).
|
|
3
|
+
//
|
|
4
|
+
// Owns the per-command label, the status/message keys, and the two highest-
|
|
5
|
+
// frequency mechanical notification shapes:
|
|
6
|
+
//
|
|
7
|
+
// error(msg) → `× <label> — <msg>` (level "error")
|
|
8
|
+
// warn(msg) → `⚠ <label> — <msg>` (level "warning")
|
|
9
|
+
// info(msg) → `<label> — <msg>` (level "info")
|
|
10
|
+
//
|
|
11
|
+
// The semantic-symbol lines (⊘ cancel, ⟳ loopback, 〇 complete, ✓ phase-done,
|
|
12
|
+
// → phase-start, ▶ dispatch) stay inline at their call sites but are emitted
|
|
13
|
+
// through `notify(...)` so they still hit the transcript recorder.
|
|
14
|
+
//
|
|
15
|
+
// IMPORTANT: every method reads `ctx.ui.notify` LIVE on each call (never a
|
|
16
|
+
// captured/bound reference) so the transcript-recorder swap installed by
|
|
17
|
+
// withOrchestratorTranscript is honored.
|
|
18
|
+
export function createOrchestratorNotifier(ctx, opts) {
|
|
19
|
+
const { label, statusKey, messageKey } = opts;
|
|
20
|
+
return {
|
|
21
|
+
label,
|
|
22
|
+
statusKey,
|
|
23
|
+
notify(message, level) {
|
|
24
|
+
ctx.ui.notify(message, level);
|
|
25
|
+
},
|
|
26
|
+
error(msg) {
|
|
27
|
+
ctx.ui.notify(`× ${label} — ${msg}`, "error");
|
|
28
|
+
},
|
|
29
|
+
warn(msg) {
|
|
30
|
+
ctx.ui.notify(`⚠ ${label} — ${msg}`, "warning");
|
|
31
|
+
},
|
|
32
|
+
info(msg) {
|
|
33
|
+
ctx.ui.notify(`${label} — ${msg}`, "info");
|
|
34
|
+
},
|
|
35
|
+
setStatus(text) {
|
|
36
|
+
ctx.ui.setStatus?.(statusKey, text);
|
|
37
|
+
},
|
|
38
|
+
clearStatus() {
|
|
39
|
+
ctx.ui.setStatus?.(statusKey, undefined);
|
|
40
|
+
if (messageKey)
|
|
41
|
+
ctx.ui.setStatus?.(messageKey, undefined);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=orchestrator-notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-notify.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/orchestrator-notify.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6CAA6C;AAC7C,EAAE;AACF,4EAA4E;AAC5E,4CAA4C;AAC5C,EAAE;AACF,wDAAwD;AACxD,0DAA0D;AAC1D,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,mEAAmE;AACnE,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,yCAAyC;AAgCzC,MAAM,UAAU,0BAA0B,CACzC,GAA4B,EAC5B,IAAiC;IAEjC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC9C,OAAO;QACN,KAAK;QACL,SAAS;QACT,MAAM,CAAC,OAAe,EAAE,KAAmB;YAC1C,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,KAAK,CAAC,GAAW;YAChB,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,MAAM,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;QACD,IAAI,CAAC,GAAW;YACf,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,MAAM,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,GAAW;YACf,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,MAAM,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QACD,SAAS,CAAC,IAAY;YACrB,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,WAAW;YACV,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACzC,IAAI,UAAU;gBAAE,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAC3D,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { OrchestratorResult, OrchestratorStatus } from "../../lib/orchestrator-types.js";
|
|
3
|
+
import { OrchestratorTranscriptWriter } from "../../subagent/orchestrator-transcript.js";
|
|
4
|
+
/** Map a pipeline status to the orchestrator-transcript outcome vocabulary.
|
|
5
|
+
* Shared by run-task and fix-bug (same status union). */
|
|
6
|
+
export declare function transcriptOutcomeFor(status: OrchestratorStatus): "complete" | "halted" | "cancelled" | "error";
|
|
7
|
+
/** Handle passed to the inner pipeline loop — exposes the live transcript
|
|
8
|
+
* writer for structured phase-boundary records. */
|
|
9
|
+
export interface OrchestratorTranscriptSession {
|
|
10
|
+
readonly writer: OrchestratorTranscriptWriter;
|
|
11
|
+
}
|
|
12
|
+
export interface WithOrchestratorTranscriptOpts {
|
|
13
|
+
cwd: string;
|
|
14
|
+
entityKind: "bug" | "task" | "sprint";
|
|
15
|
+
entityId: string;
|
|
16
|
+
ctx: ExtensionCommandContext;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create the orchestrator transcript writer, intercept ctx.ui.notify so every
|
|
20
|
+
* notification is recorded, run `inner(session)`, then close the writer with
|
|
21
|
+
* the result's mapped outcome and surface its path on the result. Restores the
|
|
22
|
+
* original ctx.ui.notify in a finally.
|
|
23
|
+
*/
|
|
24
|
+
export declare function withOrchestratorTranscript<T extends OrchestratorResult & {
|
|
25
|
+
orchestratorTranscriptPath?: string;
|
|
26
|
+
}>(opts: WithOrchestratorTranscriptOpts, inner: (session: OrchestratorTranscriptSession) => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// orchestrator-transcript-session.ts — shared transcript-writing concern for
|
|
2
|
+
// the orchestrator pipelines (run-task, fix-bug).
|
|
3
|
+
//
|
|
4
|
+
// Collapses three byte-identical duplications that previously lived in both
|
|
5
|
+
// run-task.ts and fix-bug.ts:
|
|
6
|
+
// 1. the ctx.ui.notify interception that records every notify line into the
|
|
7
|
+
// orchestrator transcript,
|
|
8
|
+
// 2. the pipeline-wrapper dance (create writer → run inner → close with the
|
|
9
|
+
// mapped outcome → surface the file path), and
|
|
10
|
+
// 3. the status→outcome mapping (transcriptOutcomeFor).
|
|
11
|
+
//
|
|
12
|
+
// Behavior contract preserved exactly:
|
|
13
|
+
// - The writer is created INSIDE this helper, so callers must run their
|
|
14
|
+
// config/preflight early-returns BEFORE calling withOrchestratorTranscript
|
|
15
|
+
// (a failed preflight must not create a transcript file).
|
|
16
|
+
// - On a clean run the inner loop records its own "complete" pipeline-end;
|
|
17
|
+
// OrchestratorTranscriptWriter.record() marks the log closed, so the
|
|
18
|
+
// trailing close() here is an idempotent no-op. On cancel/halt/fail the
|
|
19
|
+
// inner returns without a pipeline-end and this close() is the guarantee
|
|
20
|
+
// that the run is archived with its true outcome.
|
|
21
|
+
// - ctx.ui.notify is restored in a finally, even if inner throws.
|
|
22
|
+
import { getOrchestratorTree } from "../../orchestrator-tree.js";
|
|
23
|
+
import { OrchestratorTranscriptWriter } from "../../subagent/orchestrator-transcript.js";
|
|
24
|
+
/** Map a pipeline status to the orchestrator-transcript outcome vocabulary.
|
|
25
|
+
* Shared by run-task and fix-bug (same status union). */
|
|
26
|
+
export function transcriptOutcomeFor(status) {
|
|
27
|
+
switch (status) {
|
|
28
|
+
case "completed":
|
|
29
|
+
return "complete";
|
|
30
|
+
case "cancelled":
|
|
31
|
+
return "cancelled";
|
|
32
|
+
case "halted":
|
|
33
|
+
case "escalated":
|
|
34
|
+
return "halted";
|
|
35
|
+
case "failed":
|
|
36
|
+
return "error";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create the orchestrator transcript writer, intercept ctx.ui.notify so every
|
|
41
|
+
* notification is recorded, run `inner(session)`, then close the writer with
|
|
42
|
+
* the result's mapped outcome and surface its path on the result. Restores the
|
|
43
|
+
* original ctx.ui.notify in a finally.
|
|
44
|
+
*/
|
|
45
|
+
export async function withOrchestratorTranscript(opts, inner) {
|
|
46
|
+
const { cwd, entityKind, entityId, ctx } = opts;
|
|
47
|
+
const writer = new OrchestratorTranscriptWriter({ cwd, entityKind, entityId });
|
|
48
|
+
const tree = getOrchestratorTree();
|
|
49
|
+
const origNotify = ctx.ui.notify.bind(ctx.ui);
|
|
50
|
+
ctx.ui.notify = ((msg, level) => {
|
|
51
|
+
origNotify(msg, level);
|
|
52
|
+
const text = typeof msg === "string" ? msg : String(msg);
|
|
53
|
+
writer.record({
|
|
54
|
+
kind: "notify",
|
|
55
|
+
ts: new Date().toISOString(),
|
|
56
|
+
level: (level ?? "info"),
|
|
57
|
+
message: text,
|
|
58
|
+
});
|
|
59
|
+
// Mirror the orchestrator's decision log onto its root node so the
|
|
60
|
+
// dashboard surfaces it. Leaf phase nodes carry subagent tool-call
|
|
61
|
+
// activity (via the viewport observer); this root node (entityId) carries
|
|
62
|
+
// the orchestrator's own narrative — gates, verdicts, escalations, halts.
|
|
63
|
+
tree.appendTail(entityId, text, level === "error" || level === "warning" ? { warning: true } : undefined);
|
|
64
|
+
});
|
|
65
|
+
try {
|
|
66
|
+
const result = await inner({ writer });
|
|
67
|
+
writer.close(transcriptOutcomeFor(result.status), result.lastError);
|
|
68
|
+
result.orchestratorTranscriptPath = writer.filePath;
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
ctx.ui.notify = origNotify;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=orchestrator-transcript-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-transcript-session.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,8BAA8B;AAC9B,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAC9E,oDAAoD;AACpD,0DAA0D;AAC1D,EAAE;AACF,uCAAuC;AACvC,0EAA0E;AAC1E,+EAA+E;AAC/E,8DAA8D;AAC9D,6EAA6E;AAC7E,yEAAyE;AACzE,4EAA4E;AAC5E,6EAA6E;AAC7E,sDAAsD;AACtD,oEAAoE;AAKpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF;0DAC0D;AAC1D,MAAM,UAAU,oBAAoB,CAAC,MAA0B;IAC9D,QAAQ,MAAM,EAAE,CAAC;QAChB,KAAK,WAAW;YACf,OAAO,UAAU,CAAC;QACnB,KAAK,WAAW;YACf,OAAO,WAAW,CAAC;QACpB,KAAK,QAAQ,CAAC;QACd,KAAK,WAAW;YACf,OAAO,QA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C;QACJ,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACpE,MAAM,CAAC,0BAA0B,GAAG,MAAM,CAAC,QAAQ,CAAC;QACpD,OAAO,MAAM,CAAC;IACf,CAAC;YAAS,CAAC;QACV,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,UAAU,CAAC;IAC5B,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ResetEntityKind, type ResetPipelineParams, type ResetPipelineResult } from "./reset-pipeline.js";
|
|
2
|
+
export interface RecoveryUi {
|
|
3
|
+
select(title: string, options: string[], opts?: unknown): Promise<string | undefined>;
|
|
4
|
+
notify(message: string, level?: string): void;
|
|
5
|
+
}
|
|
6
|
+
export interface RecoveryMenuParams {
|
|
7
|
+
ui: RecoveryUi;
|
|
8
|
+
kind: ResetEntityKind;
|
|
9
|
+
id: string;
|
|
10
|
+
cwd: string;
|
|
11
|
+
storeCli: string;
|
|
12
|
+
/** Override interactivity detection (tests). */
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
/** Override the reset implementation (tests). */
|
|
15
|
+
reset?: (p: ResetPipelineParams) => ResetPipelineResult;
|
|
16
|
+
}
|
|
17
|
+
/** Ordered phase roles for the entity's pipeline. */
|
|
18
|
+
export declare function phaseRolesFor(kind: ResetEntityKind): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Offer an interactive recovery menu at a halt. Returns the reset result if the
|
|
21
|
+
* operator chose to reset, otherwise undefined (declined / aborted / non-
|
|
22
|
+
* interactive). Never throws.
|
|
23
|
+
*/
|
|
24
|
+
export declare function offerRecoveryMenu(p: RecoveryMenuParams): Promise<ResetPipelineResult | undefined>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// recovery-menu.ts — FEAT-009 (halt-recovery UX): interactive recovery menu
|
|
2
|
+
// offered at a pipeline halt, on top of the deterministic remediation + the
|
|
3
|
+
// `4ge reset` hint. Lets the operator rewind the pipeline with two keystrokes
|
|
4
|
+
// (pick "reset", pick a phase) instead of recalling the command.
|
|
5
|
+
//
|
|
6
|
+
// Best-effort and non-blocking: in non-interactive mode it is a no-op (the
|
|
7
|
+
// printed remediation + 4ge reset hint stand on their own); any error is
|
|
8
|
+
// swallowed so it can never mask the primary halt.
|
|
9
|
+
import { isNonInteractive } from "./orchestrator-misc.js";
|
|
10
|
+
import { resetPipelineState, } from "./reset-pipeline.js";
|
|
11
|
+
import { BUG_PHASES } from "../bug/bug-phases.js";
|
|
12
|
+
import { PHASES } from "../task/task-phases.js";
|
|
13
|
+
const RESET_LABEL = "Reset to a phase and resume later";
|
|
14
|
+
const ABORT_LABEL = "Leave it halted";
|
|
15
|
+
/** Ordered phase roles for the entity's pipeline. */
|
|
16
|
+
export function phaseRolesFor(kind) {
|
|
17
|
+
return (kind === "bug" ? BUG_PHASES : PHASES).map((p) => p.role);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Offer an interactive recovery menu at a halt. Returns the reset result if the
|
|
21
|
+
* operator chose to reset, otherwise undefined (declined / aborted / non-
|
|
22
|
+
* interactive). Never throws.
|
|
23
|
+
*/
|
|
24
|
+
export async function offerRecoveryMenu(p) {
|
|
25
|
+
const interactive = p.interactive ?? !isNonInteractive();
|
|
26
|
+
if (!interactive)
|
|
27
|
+
return undefined;
|
|
28
|
+
try {
|
|
29
|
+
const choice = await p.ui.select(`Halt recovery — ${p.id}`, [RESET_LABEL, ABORT_LABEL]);
|
|
30
|
+
if (choice !== RESET_LABEL)
|
|
31
|
+
return undefined;
|
|
32
|
+
const phase = await p.ui.select(`Reset ${p.id} to which phase?`, phaseRolesFor(p.kind));
|
|
33
|
+
if (!phase)
|
|
34
|
+
return undefined;
|
|
35
|
+
const reset = p.reset ?? resetPipelineState;
|
|
36
|
+
const result = reset({
|
|
37
|
+
kind: p.kind,
|
|
38
|
+
cwd: p.cwd,
|
|
39
|
+
id: p.id,
|
|
40
|
+
toPhase: phase,
|
|
41
|
+
storeCli: p.storeCli,
|
|
42
|
+
});
|
|
43
|
+
if (result.ok) {
|
|
44
|
+
const resumeCmd = p.kind === "bug" ? `/forge:fix-bug ${p.id}` : `/forge:run-task ${p.id}`;
|
|
45
|
+
p.ui.notify(`〇 reset ${p.id} → '${result.role}' (status → ${result.preStatus}). Resume with: ${resumeCmd}`, "info");
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
p.ui.notify(`⚠ reset ${p.id} failed: ${result.detail ?? "unknown"}`, "warning");
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
const e = err;
|
|
54
|
+
p.ui.notify(`⚠ recovery menu unavailable (non-fatal): ${e.message ?? "unknown"}`, "warning");
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=recovery-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-menu.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/recovery-menu.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,mDAAmD;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAIN,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAoBhD,MAAM,WAAW,GAAG,mCAAmC,CAAC;AACxD,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC,qDAAqD;AACrD,MAAM,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AC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAAE,EAAE,CAAC;YAC1F,CAAC,CAAC,EAAE,CAAC,MAAM,CACV,WAAW,CAAC,CAAC,EAAE,OAAO,MAAM,CAAC,IAAI,eAAe,MAAM,CAAC,SAAS,mBAAmB,SAAS,EAAE,EAC9F,MAAM,CACN,CAAC;QACH,CAAC;aAAM,CAAC;YACP,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,YAAY,MAAM,CAAC,MAAM,IAAI,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,GAA2B,CAAC;QACtC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,4CAA4C,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;QAC7F,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type ResetEntityKind = "task" | "bug";
|
|
2
|
+
export interface ResetPlan {
|
|
3
|
+
role: string;
|
|
4
|
+
phaseIndex: number;
|
|
5
|
+
preStatus: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Pure planner: resolve the target phase to its index + pre-status for the given
|
|
9
|
+
* entity kind. Returns an `error` string for an unknown phase (no IO, fully
|
|
10
|
+
* unit-testable).
|
|
11
|
+
*/
|
|
12
|
+
export declare function planReset(kind: ResetEntityKind, toPhase: string): ResetPlan | {
|
|
13
|
+
error: string;
|
|
14
|
+
};
|
|
15
|
+
/** Result of a status-setter call. */
|
|
16
|
+
export interface SetStatusResult {
|
|
17
|
+
ok: boolean;
|
|
18
|
+
/** Status the record held before the transition, if known. */
|
|
19
|
+
from?: string;
|
|
20
|
+
/** Error detail on failure. */
|
|
21
|
+
detail?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ResetPipelineParams {
|
|
24
|
+
/** Which pipeline's state to reset. */
|
|
25
|
+
kind: ResetEntityKind;
|
|
26
|
+
cwd: string;
|
|
27
|
+
/** Task or bug id. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Target phase role (e.g. "implement", "triage"). */
|
|
30
|
+
toPhase: string;
|
|
31
|
+
/** Absolute path to store-cli.cjs. */
|
|
32
|
+
storeCli: string;
|
|
33
|
+
/**
|
|
34
|
+
* Override the status-setter (tests inject a stub). Defaults to a
|
|
35
|
+
* force-transition via store-cli with FORGE_ALLOW_FORCE=1.
|
|
36
|
+
*/
|
|
37
|
+
setStatus?: (status: string) => SetStatusResult;
|
|
38
|
+
}
|
|
39
|
+
export interface ResetPipelineResult {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
role?: string;
|
|
42
|
+
phaseIndex?: number;
|
|
43
|
+
preStatus?: string;
|
|
44
|
+
detail?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Force an entity's status to the target phase's pre-status and rewrite the
|
|
48
|
+
* resume-state cache so the pipeline re-enters at that phase. Returns
|
|
49
|
+
* `{ok:false, detail}` rather than throwing on a planning or status-set failure;
|
|
50
|
+
* the resume-state is written ONLY after the status transition succeeds, so a
|
|
51
|
+
* failed reset never leaves a half-rewound pipeline.
|
|
52
|
+
*/
|
|
53
|
+
export declare function resetPipelineState(p: ResetPipelineParams): ResetPipelineResult;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// reset-pipeline.ts — FEAT-009 (halt-recovery UX): guardrailed pipeline-state
|
|
2
|
+
// reset for the run-task AND fix-bug pipelines.
|
|
3
|
+
//
|
|
4
|
+
// Encapsulates exactly the manual recovery an operator otherwise performs by
|
|
5
|
+
// hand after a halt: force the entity to the status a target phase expects, and
|
|
6
|
+
// rewrite the resume-state cache to re-enter at that phase. Deterministic and
|
|
7
|
+
// store-aware:
|
|
8
|
+
// - the target phase must be a known phase for the entity's pipeline;
|
|
9
|
+
// - the status it sets is the phase's documented pre-status, which lies within
|
|
10
|
+
// that phase's own step-0b allowed-states set, so the phase guard accepts it
|
|
11
|
+
// on resume;
|
|
12
|
+
// - the FSM transition is applied via store-cli with the operator-gated
|
|
13
|
+
// --force escape hatch (FORGE_ALLOW_FORCE=1), because terminal states
|
|
14
|
+
// (blocked / fixed / escalated) are otherwise un-exitable by design.
|
|
15
|
+
//
|
|
16
|
+
// Sprint reset is intentionally NOT handled here: a sprint runs member tasks in
|
|
17
|
+
// dependency waves, so resetting it means rewinding the wave pointer and
|
|
18
|
+
// cascade-resetting member tasks coherently — a cross-entity, referential-
|
|
19
|
+
// integrity-sensitive operation that belongs in the guardrailed /forge:reset
|
|
20
|
+
// (FEAT-009 T03), not this single-entity deterministic helper.
|
|
21
|
+
//
|
|
22
|
+
// IL6 — store-cli is invoked via spawnSync argv array, never shell-string
|
|
23
|
+
// interpolation. The status-setter is injectable so unit tests need not spawn.
|
|
24
|
+
import { spawnSync } from "node:child_process";
|
|
25
|
+
import { BUG_PHASE_PRE_STATUS, bugPhaseIndexByRole } from "../bug/bug-phases.js";
|
|
26
|
+
import { deleteBugState, writeBugState } from "../bug/bug-state.js";
|
|
27
|
+
import { PHASE_PRE_STATUS, phaseIndexByRole } from "../task/task-phases.js";
|
|
28
|
+
import { writeState } from "../task/task-state.js";
|
|
29
|
+
const PROFILES = {
|
|
30
|
+
task: {
|
|
31
|
+
preStatus: PHASE_PRE_STATUS,
|
|
32
|
+
indexOf: phaseIndexByRole,
|
|
33
|
+
storeEntity: "task",
|
|
34
|
+
writeResume(cwd, id, phaseIndex) {
|
|
35
|
+
// Leave `status` unset: with halted:false and no status, the resume
|
|
36
|
+
// prompt labels it "interrupted" and offers to resume from this phase.
|
|
37
|
+
writeState(cwd, {
|
|
38
|
+
taskId: id,
|
|
39
|
+
phaseIndex,
|
|
40
|
+
iterationCounts: {},
|
|
41
|
+
halted: false,
|
|
42
|
+
savedAt: new Date().toISOString(),
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
bug: {
|
|
47
|
+
preStatus: BUG_PHASE_PRE_STATUS,
|
|
48
|
+
indexOf: bugPhaseIndexByRole,
|
|
49
|
+
storeEntity: "bug",
|
|
50
|
+
writeResume(cwd, id, phaseIndex) {
|
|
51
|
+
// Bug state files are session-suffixed (fix-bug-state-<id>-<session>);
|
|
52
|
+
// clear every session's file first so resume globs exactly one fresh
|
|
53
|
+
// state, then write the rewound state.
|
|
54
|
+
deleteBugState(cwd, id);
|
|
55
|
+
writeBugState(cwd, {
|
|
56
|
+
bugId: id,
|
|
57
|
+
phaseIndex,
|
|
58
|
+
iterationCounts: {},
|
|
59
|
+
halted: false,
|
|
60
|
+
savedAt: new Date().toISOString(),
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Pure planner: resolve the target phase to its index + pre-status for the given
|
|
67
|
+
* entity kind. Returns an `error` string for an unknown phase (no IO, fully
|
|
68
|
+
* unit-testable).
|
|
69
|
+
*/
|
|
70
|
+
export function planReset(kind, toPhase) {
|
|
71
|
+
const profile = PROFILES[kind];
|
|
72
|
+
const role = toPhase.trim();
|
|
73
|
+
const phaseIndex = profile.indexOf(role);
|
|
74
|
+
if (phaseIndex < 0) {
|
|
75
|
+
const known = Object.keys(profile.preStatus).join(", ");
|
|
76
|
+
return { error: `Unknown ${kind} phase '${role}'. Known phases: ${known}` };
|
|
77
|
+
}
|
|
78
|
+
const preStatus = profile.preStatus[role];
|
|
79
|
+
if (!preStatus) {
|
|
80
|
+
return { error: `No pre-status mapping for ${kind} phase '${role}'` };
|
|
81
|
+
}
|
|
82
|
+
return { role, phaseIndex, preStatus };
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Force an entity's status to the target phase's pre-status and rewrite the
|
|
86
|
+
* resume-state cache so the pipeline re-enters at that phase. Returns
|
|
87
|
+
* `{ok:false, detail}` rather than throwing on a planning or status-set failure;
|
|
88
|
+
* the resume-state is written ONLY after the status transition succeeds, so a
|
|
89
|
+
* failed reset never leaves a half-rewound pipeline.
|
|
90
|
+
*/
|
|
91
|
+
export function resetPipelineState(p) {
|
|
92
|
+
const plan = planReset(p.kind, p.toPhase);
|
|
93
|
+
if ("error" in plan) {
|
|
94
|
+
return { ok: false, detail: plan.error };
|
|
95
|
+
}
|
|
96
|
+
const profile = PROFILES[p.kind];
|
|
97
|
+
const setStatus = p.setStatus ?? defaultForceSetStatus(p.storeCli, profile.storeEntity, p.id, p.cwd);
|
|
98
|
+
const setResult = setStatus(plan.preStatus);
|
|
99
|
+
if (!setResult.ok) {
|
|
100
|
+
return {
|
|
101
|
+
ok: false,
|
|
102
|
+
role: plan.role,
|
|
103
|
+
phaseIndex: plan.phaseIndex,
|
|
104
|
+
preStatus: plan.preStatus,
|
|
105
|
+
detail: setResult.detail ?? `failed to set status to ${plan.preStatus}`,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
profile.writeResume(p.cwd, p.id, plan.phaseIndex);
|
|
109
|
+
return { ok: true, role: plan.role, phaseIndex: plan.phaseIndex, preStatus: plan.preStatus };
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Default status-setter: force-transition the entity via store-cli. Uses the
|
|
113
|
+
* operator-gated --force escape hatch (FORGE_ALLOW_FORCE=1) so terminal states
|
|
114
|
+
* (blocked / fixed / escalated) can be recovered. Argv array — no shell
|
|
115
|
+
* interpolation.
|
|
116
|
+
*/
|
|
117
|
+
function defaultForceSetStatus(storeCli, storeEntity, id, cwd) {
|
|
118
|
+
return (status) => {
|
|
119
|
+
const r = spawnSync("node", [storeCli, "update-status", storeEntity, id, "status", status, "--force"], {
|
|
120
|
+
cwd,
|
|
121
|
+
encoding: "utf8",
|
|
122
|
+
env: { ...process.env, FORGE_ALLOW_FORCE: "1" },
|
|
123
|
+
});
|
|
124
|
+
if (r.status === 0) {
|
|
125
|
+
return { ok: true };
|
|
126
|
+
}
|
|
127
|
+
const detail = (r.stderr || r.stdout || "").trim() || `store-cli exited ${r.status}`;
|
|
128
|
+
return { ok: false, detail };
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=reset-pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-pipeline.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/common/reset-pipeline.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,gDAAgD;AAChD,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,8EAA8E;AAC9E,eAAe;AACf,wEAAwE;AACxE,iFAAiF;AACjF,iFAAiF;AACjF,iBAAiB;AACjB,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,EAAE;AACF,gFAAgF;AAChF,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,+DAA+D;AAC/D,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAmBnD,MAAM,QAAQ,GAA2C;IACxD,IAAI,EAAE;QACL,SAAS,EAAE,gBAAgB;QAC3B,OAAO,EAAE,gBAAgB;QACzB,WAAW,EAAE,MAAM;QACnB,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,UAAU;YAC9B,oEAAoE;YACpE,uEAAuE;YACvE,UAAU,CAAC,GAAG,EAAE;gBACf,MAAM,EAAE,EAAE;gBACV,UAAU;gBACV,eAAe,EAAE,EAAE;gBACnB,M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AAED;;;;;GAKG;AACH,SAAS,qBAAqB,CAC7B,QAAgB,EAChB,WAA4B,EAC5B,EAAU,EACV,GAAW;IAEX,OAAO,CAAC,MAAc,EAAmB,EAAE;QAC1C,MAAM,CAAC,GAAG,SAAS,CAClB,MAAM,EACN,CAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EACzE;YACC,GAAG;YACH,QAAQ,EAAE,MAAM;YAChB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE;SAC/C,CACD,CAAC;QACF,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,oBAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;QACrF,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC9B,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface SummaryRecoveryResult {
|
|
2
|
+
/** Always true — the recovery was attempted (caller decides when to call). */
|
|
3
|
+
attempted: boolean;
|
|
4
|
+
/** True only when set-summary exited 0 (sidecar present + schema-valid). */
|
|
5
|
+
ok: boolean;
|
|
6
|
+
/** Captured stderr for debug logging. */
|
|
7
|
+
stderr: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RecoverPhaseSummaryParams {
|
|
10
|
+
/** Absolute path to the project's store-cli.cjs. */
|
|
11
|
+
storeCli: string;
|
|
12
|
+
/** Task or bug record id whose summary is being registered. */
|
|
13
|
+
entityId: string;
|
|
14
|
+
/** Canonical `summaries.*` store key (e.g. "plan", "code_review"). */
|
|
15
|
+
summaryKey: string;
|
|
16
|
+
cwd: string;
|
|
17
|
+
/** "set-summary" (task, default) or "set-bug-summary" (bug). */
|
|
18
|
+
summaryVerb?: "set-summary" | "set-bug-summary";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Attempt to register a phase's already-written {PHASE}-SUMMARY.json sidecar
|
|
22
|
+
* into the store via store-cli. Returns ok=true only when the verb exits 0.
|
|
23
|
+
*/
|
|
24
|
+
export declare function recoverPhaseSummary(p: RecoverPhaseSummaryParams): SummaryRecoveryResult;
|