@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,46 @@
|
|
|
1
|
+
export interface MergeResult {
|
|
2
|
+
outcome: "created" | "merged" | "already-present" | "error";
|
|
3
|
+
warning?: string;
|
|
4
|
+
}
|
|
5
|
+
interface HookEntry {
|
|
6
|
+
type: "command";
|
|
7
|
+
command: string;
|
|
8
|
+
timeout: number;
|
|
9
|
+
}
|
|
10
|
+
interface SessionStartGroup {
|
|
11
|
+
hooks: HookEntry[];
|
|
12
|
+
}
|
|
13
|
+
interface MatcherGroup {
|
|
14
|
+
matcher: string;
|
|
15
|
+
hooks: HookEntry[];
|
|
16
|
+
}
|
|
17
|
+
export interface ForgeSettingsHooks {
|
|
18
|
+
SessionStart: SessionStartGroup[];
|
|
19
|
+
PreToolUse: MatcherGroup[];
|
|
20
|
+
PostToolUse: MatcherGroup[];
|
|
21
|
+
PermissionRequest: MatcherGroup[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the canonical Forge hooks block for project .claude/settings.json.
|
|
25
|
+
*
|
|
26
|
+
* All commands point at $CLAUDE_PROJECT_DIR/.forge/tools/hooks/<name>.cjs
|
|
27
|
+
* (CLAUDE_PROJECT_DIR is a Claude Code runtime env var; not resolved at build time).
|
|
28
|
+
*
|
|
29
|
+
* Hook list mirrors forge/forge/hooks/hooks.json, with commands re-targeted
|
|
30
|
+
* from ${CLAUDE_PLUGIN_ROOT}/hooks/ to $CLAUDE_PROJECT_DIR/.forge/tools/hooks/.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildForgeHooksBlock(): ForgeSettingsHooks;
|
|
33
|
+
/**
|
|
34
|
+
* Merge Forge hooks into the project .claude/settings.json with merge-not-clobber semantics.
|
|
35
|
+
*
|
|
36
|
+
* Rules:
|
|
37
|
+
* 1. File absent → create with { "hooks": <forgeHooksBlock> }.
|
|
38
|
+
* 2. File present, valid JSON, no hooks key → add hooks key, preserve all other keys.
|
|
39
|
+
* 3. File present, valid JSON, hooks key with all Forge entries already present → "already-present" (no-op).
|
|
40
|
+
* 4. File present, valid JSON, hooks key with unrelated or missing Forge entries →
|
|
41
|
+
* merge Forge entries, preserve all existing non-Forge entries.
|
|
42
|
+
* 5. File present, malformed JSON → "error", file never overwritten.
|
|
43
|
+
* 6. Write failure → "error" with descriptive warning.
|
|
44
|
+
*/
|
|
45
|
+
export declare function mergeForgeHooks(settingsPath: string): MergeResult;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
// claude-bootstrap/settings-merge.ts — Forge hooks merge into .claude/settings.json (FORGE-S31-T03)
|
|
2
|
+
//
|
|
3
|
+
// Provides merge-not-clobber semantics for writing Forge's hook configuration into
|
|
4
|
+
// a project's .claude/settings.json. Existing keys (including hooks from other tools)
|
|
5
|
+
// are preserved byte-identical. Forge entries are only added where missing.
|
|
6
|
+
//
|
|
7
|
+
// Key contracts:
|
|
8
|
+
// - Never overwrites a file that does not parse as JSON
|
|
9
|
+
// - Running twice is idempotent: second run detects existing Forge entries and returns "already-present"
|
|
10
|
+
// - Pure fs operations: no shell-outs, no LLM, no network
|
|
11
|
+
import * as fs from "node:fs";
|
|
12
|
+
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
13
|
+
/** Sentinel string used to identify Forge hook commands for dedup detection. */
|
|
14
|
+
const FORGE_HOOK_SENTINEL = ".forge/tools/hooks/";
|
|
15
|
+
// ── buildForgeHooksBlock ──────────────────────────────────────────────────────
|
|
16
|
+
/**
|
|
17
|
+
* Returns the canonical Forge hooks block for project .claude/settings.json.
|
|
18
|
+
*
|
|
19
|
+
* All commands point at $CLAUDE_PROJECT_DIR/.forge/tools/hooks/<name>.cjs
|
|
20
|
+
* (CLAUDE_PROJECT_DIR is a Claude Code runtime env var; not resolved at build time).
|
|
21
|
+
*
|
|
22
|
+
* Hook list mirrors forge/forge/hooks/hooks.json, with commands re-targeted
|
|
23
|
+
* from ${CLAUDE_PLUGIN_ROOT}/hooks/ to $CLAUDE_PROJECT_DIR/.forge/tools/hooks/.
|
|
24
|
+
*/
|
|
25
|
+
export function buildForgeHooksBlock() {
|
|
26
|
+
return {
|
|
27
|
+
SessionStart: [
|
|
28
|
+
{
|
|
29
|
+
hooks: [
|
|
30
|
+
{
|
|
31
|
+
type: "command",
|
|
32
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/check-update.cjs"',
|
|
33
|
+
timeout: 10000,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "command",
|
|
37
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/preflight-session.cjs"',
|
|
38
|
+
timeout: 10000,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
PreToolUse: [
|
|
44
|
+
{
|
|
45
|
+
matcher: "Write|Edit|MultiEdit",
|
|
46
|
+
hooks: [
|
|
47
|
+
{
|
|
48
|
+
type: "command",
|
|
49
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/validate-write.cjs"',
|
|
50
|
+
timeout: 5000,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
PostToolUse: [
|
|
56
|
+
{
|
|
57
|
+
matcher: "Bash",
|
|
58
|
+
hooks: [
|
|
59
|
+
{
|
|
60
|
+
type: "command",
|
|
61
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/triage-error.cjs"',
|
|
62
|
+
timeout: 5000,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
// query-logger is a tool, not a hook script — the plugin's hooks.json
|
|
66
|
+
// points it at tools/query-logger.cjs, vendored to .forge/tools/ by Step 3.
|
|
67
|
+
type: "command",
|
|
68
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/query-logger.cjs"',
|
|
69
|
+
timeout: 3000,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "command",
|
|
73
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/post-init.cjs"',
|
|
74
|
+
timeout: 10000,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "command",
|
|
78
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/post-sprint.cjs"',
|
|
79
|
+
timeout: 10000,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
PermissionRequest: [
|
|
85
|
+
{
|
|
86
|
+
matcher: "Bash|Write|Edit|MultiEdit|WebFetch",
|
|
87
|
+
hooks: [
|
|
88
|
+
{
|
|
89
|
+
type: "command",
|
|
90
|
+
command: 'node "$CLAUDE_PROJECT_DIR/.forge/tools/hooks/forge-permissions.cjs"',
|
|
91
|
+
timeout: 3000,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// ── Private helpers ───────────────────────────────────────────────────────────
|
|
99
|
+
/**
|
|
100
|
+
* Checks whether a hooks block already contains Forge entries by looking for
|
|
101
|
+
* the Forge hook sentinel string in any hook command.
|
|
102
|
+
*/
|
|
103
|
+
function hasForgeEntries(hooks) {
|
|
104
|
+
for (const eventGroups of Object.values(hooks)) {
|
|
105
|
+
if (!Array.isArray(eventGroups))
|
|
106
|
+
continue;
|
|
107
|
+
for (const group of eventGroups) {
|
|
108
|
+
const g = group;
|
|
109
|
+
if (!Array.isArray(g.hooks))
|
|
110
|
+
continue;
|
|
111
|
+
for (const hook of g.hooks) {
|
|
112
|
+
if (typeof hook.command === "string" && hook.command.includes(FORGE_HOOK_SENTINEL)) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Merge Forge hooks into an existing hooks object.
|
|
122
|
+
* For each event type, Forge entries are appended only where no Forge entry already exists
|
|
123
|
+
* (detected by FORGE_HOOK_SENTINEL in command string).
|
|
124
|
+
*/
|
|
125
|
+
function mergeHooksIntoExisting(existing, forgeBlock) {
|
|
126
|
+
const merged = { ...existing };
|
|
127
|
+
const eventTypes = ["SessionStart", "PreToolUse", "PostToolUse", "PermissionRequest"];
|
|
128
|
+
for (const eventType of eventTypes) {
|
|
129
|
+
const forgeGroups = forgeBlock[eventType];
|
|
130
|
+
if (!forgeGroups || !Array.isArray(forgeGroups))
|
|
131
|
+
continue;
|
|
132
|
+
const existingGroups = Array.isArray(merged[eventType]) ? [...merged[eventType]] : [];
|
|
133
|
+
// Check if any existing group already has Forge entries for this event type
|
|
134
|
+
const alreadyHasForge = existingGroups.some((group) => {
|
|
135
|
+
const g = group;
|
|
136
|
+
return (Array.isArray(g.hooks) &&
|
|
137
|
+
g.hooks.some((h) => typeof h.command === "string" && h.command.includes(FORGE_HOOK_SENTINEL)));
|
|
138
|
+
});
|
|
139
|
+
if (!alreadyHasForge) {
|
|
140
|
+
// Append Forge groups for this event type
|
|
141
|
+
existingGroups.push(...forgeGroups);
|
|
142
|
+
}
|
|
143
|
+
merged[eventType] = existingGroups;
|
|
144
|
+
}
|
|
145
|
+
return merged;
|
|
146
|
+
}
|
|
147
|
+
// ── mergeForgeHooks ───────────────────────────────────────────────────────────
|
|
148
|
+
/**
|
|
149
|
+
* Merge Forge hooks into the project .claude/settings.json with merge-not-clobber semantics.
|
|
150
|
+
*
|
|
151
|
+
* Rules:
|
|
152
|
+
* 1. File absent → create with { "hooks": <forgeHooksBlock> }.
|
|
153
|
+
* 2. File present, valid JSON, no hooks key → add hooks key, preserve all other keys.
|
|
154
|
+
* 3. File present, valid JSON, hooks key with all Forge entries already present → "already-present" (no-op).
|
|
155
|
+
* 4. File present, valid JSON, hooks key with unrelated or missing Forge entries →
|
|
156
|
+
* merge Forge entries, preserve all existing non-Forge entries.
|
|
157
|
+
* 5. File present, malformed JSON → "error", file never overwritten.
|
|
158
|
+
* 6. Write failure → "error" with descriptive warning.
|
|
159
|
+
*/
|
|
160
|
+
export function mergeForgeHooks(settingsPath) {
|
|
161
|
+
const forgeBlock = buildForgeHooksBlock();
|
|
162
|
+
// ── Branch 1: File absent ─────────────────────────────────────────────────
|
|
163
|
+
if (!fs.existsSync(settingsPath)) {
|
|
164
|
+
try {
|
|
165
|
+
const content = JSON.stringify({ hooks: forgeBlock }, null, 2) + "\n";
|
|
166
|
+
fs.writeFileSync(settingsPath, content, "utf8");
|
|
167
|
+
return { outcome: "created" };
|
|
168
|
+
}
|
|
169
|
+
catch (err) {
|
|
170
|
+
const e = err;
|
|
171
|
+
return {
|
|
172
|
+
outcome: "error",
|
|
173
|
+
warning: `Could not write ${settingsPath}: ${e.message ?? String(err)}`,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// ── File present: read and parse ──────────────────────────────────────────
|
|
178
|
+
let rawContent;
|
|
179
|
+
try {
|
|
180
|
+
rawContent = fs.readFileSync(settingsPath, "utf8");
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
const e = err;
|
|
184
|
+
return {
|
|
185
|
+
outcome: "error",
|
|
186
|
+
warning: `Could not read ${settingsPath}: ${e.message ?? String(err)}`,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
// ── Branch 2 / 7: Empty or malformed JSON ────────────────────────────────
|
|
190
|
+
if (rawContent.trim() === "") {
|
|
191
|
+
return {
|
|
192
|
+
outcome: "error",
|
|
193
|
+
warning: `${settingsPath} is empty — cannot parse as JSON. Fix or delete the file and re-run.`,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
let parsed;
|
|
197
|
+
try {
|
|
198
|
+
parsed = JSON.parse(rawContent);
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
const e = err;
|
|
202
|
+
return {
|
|
203
|
+
outcome: "error",
|
|
204
|
+
warning: `${settingsPath} contains malformed JSON — will not overwrite. Parse error: ${e.message ?? String(err)}`,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
// ── Branch 3: Empty object {} (no hooks key) ──────────────────────────────
|
|
208
|
+
// ── Branch 4: Has other keys but no hooks key ─────────────────────────────
|
|
209
|
+
if (!("hooks" in parsed)) {
|
|
210
|
+
try {
|
|
211
|
+
const updated = { ...parsed, hooks: forgeBlock };
|
|
212
|
+
const content = JSON.stringify(updated, null, 2) + "\n";
|
|
213
|
+
fs.writeFileSync(settingsPath, content, "utf8");
|
|
214
|
+
return { outcome: "merged" };
|
|
215
|
+
}
|
|
216
|
+
catch (err) {
|
|
217
|
+
const e = err;
|
|
218
|
+
return {
|
|
219
|
+
outcome: "error",
|
|
220
|
+
warning: `Could not write ${settingsPath}: ${e.message ?? String(err)}`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// ── Branch 6: Already has Forge entries ───────────────────────────────────
|
|
225
|
+
const existingHooks = parsed.hooks;
|
|
226
|
+
if (hasForgeEntries(existingHooks)) {
|
|
227
|
+
return { outcome: "already-present" };
|
|
228
|
+
}
|
|
229
|
+
// ── Branch 5: Has hooks key with unrelated entries — merge Forge in ───────
|
|
230
|
+
try {
|
|
231
|
+
const mergedHooks = mergeHooksIntoExisting(existingHooks, forgeBlock);
|
|
232
|
+
const updated = { ...parsed, hooks: mergedHooks };
|
|
233
|
+
const content = JSON.stringify(updated, null, 2) + "\n";
|
|
234
|
+
fs.writeFileSync(settingsPath, content, "utf8");
|
|
235
|
+
return { outcome: "merged" };
|
|
236
|
+
}
|
|
237
|
+
catch (err) {
|
|
238
|
+
const e = err;
|
|
239
|
+
return {
|
|
240
|
+
outcome: "error",
|
|
241
|
+
warning: `Could not write ${settingsPath}: ${e.message ?? String(err)}`,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=settings-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-merge.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/claude-bootstrap/settings-merge.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,EAAE;AACF,mFAAmF;AACnF,sFAAsF;AACtF,4EAA4E;AAC5E,EAAE;AACF,iBAAiB;AACjB,0DAA0D;AAC1D,2GAA2G;AAC3G,4DAA4D;AAE5D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAiC9B,iFAAiF;AAEjF,gFAAgF;AAChF,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,iFAAiF;AAEjF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB;IACnC,OAAO;QACN,YAAY,EAAE;YACb;gBACC,KAAK,EAAE;oBACN;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,gEAAgE;wBACzE,OAAO,EAAE,KAAK;qBACd;oBACD;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,qEAAqE;wBAC9E,OAAO,EAAE,KAAK;qBACd;iBACD;aACD;SACD;QACD,UAAU,EAAE;YACX;gBACC,OAAO,EAAE,sBAAsB;gBAC/B,KAAK,EAAE;oBACN;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,kEAAkE;wBAC3E,OAAO,EAAE,IAAI;qBACb;iBACD;aACD;SACD;QACD,WAAW,EAAE;YACZ;gBACC,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE;oBACN;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,gEAAgE;wBACzE,OAAO,EAAE,IAAI;qBACb;oBACD;wBACC,sEAAsE;wBACtE,4EAA4E;wBAC5E,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,0DAA0D;wBACnE,OAAO,EAAE,IAAI;qBACb;oBACD;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,6DAA6D;wBACtE,OAAO,EAAE,KAAK;qBACd;oBACD;wBACC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,+DAA+D;wBACx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C;QACvB,MAAM,CAAC,GAAG,GAA2B,CAAC;QACtC,OAAO;YACN,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,mBAAmB,YAAY,KAAK,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;SACvE,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface UninstallOptions {
|
|
2
|
+
/** Target project root (absolute path). */
|
|
3
|
+
dir: string;
|
|
4
|
+
/** Absolute path to the dist/forge-payload/ directory (to re-derive vendored names). */
|
|
5
|
+
payloadRoot: string;
|
|
6
|
+
/**
|
|
7
|
+
* When true, ALSO remove user data: .forge/config.json and .forge/store/**,
|
|
8
|
+
* then the now-empty .forge/ itself. The KB folder is never auto-removed.
|
|
9
|
+
*/
|
|
10
|
+
purge: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface UninstallResult {
|
|
13
|
+
ok: boolean;
|
|
14
|
+
/** True if a .forge/.bootstrap-manifest.json was found (a forge-bootstrapped project). */
|
|
15
|
+
bootstrapped: boolean;
|
|
16
|
+
/** Paths removed this run (files and dirs). */
|
|
17
|
+
removed: string[];
|
|
18
|
+
/** User-data paths deliberately preserved (only meaningful when purge=false). */
|
|
19
|
+
kept: string[];
|
|
20
|
+
/** Non-fatal issues encountered. */
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function uninstallClaudeProject(opts: UninstallOptions): UninstallResult;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// claude-bootstrap/uninstall.ts — deterministic reverse of bootstrapClaudeProject.
|
|
2
|
+
//
|
|
3
|
+
// `4ge uninstall claude [dir]` removes what `4ge init claude` scaffolded:
|
|
4
|
+
// the vendored Forge scaffold (tools, hooks, schemas, commands, forge-root
|
|
5
|
+
// content, agents/skills, workflow drivers, bootstrap manifest), un-merges the
|
|
6
|
+
// Forge hooks from .claude/settings.json, and un-appends the Forge block from
|
|
7
|
+
// .gitignore. Pure fs; zero LLM tokens, zero network.
|
|
8
|
+
//
|
|
9
|
+
// Safety contract:
|
|
10
|
+
// - PRESERVES user data by default: .forge/config.json, .forge/store/** (the
|
|
11
|
+
// SDLC store — sprints/tasks/bugs/events), and the KB folder are NEVER
|
|
12
|
+
// touched unless `purge` is set.
|
|
13
|
+
// - REFUSES to act when no .forge/.bootstrap-manifest.json is present — that
|
|
14
|
+
// manifest is the proof a project was forge-bootstrapped. Without it we will
|
|
15
|
+
// not delete anything (avoids nuking a hand-built .claude/ or .forge/).
|
|
16
|
+
// - settings.json and .gitignore are EDITED (un-merge / un-append), never
|
|
17
|
+
// blindly deleted — they may carry non-Forge content.
|
|
18
|
+
// - Idempotent: a second run finds nothing to remove and reports cleanly.
|
|
19
|
+
import * as fs from "node:fs";
|
|
20
|
+
import * as path from "node:path";
|
|
21
|
+
import { applySelect, groupByOwner, loadManifest } from "../lib/payload-manifest.js";
|
|
22
|
+
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
23
|
+
/** Sentinel identifying Forge hook commands in settings.json (mirrors settings-merge). */
|
|
24
|
+
const FORGE_HOOK_SENTINEL = ".forge/tools/";
|
|
25
|
+
/** Exact block appended to .gitignore by bootstrap (mirrors bootstrap.ts). */
|
|
26
|
+
const GITIGNORE_APPEND_BLOCK = "\n# Forge — transient agent event logs (one file per phase, do not commit)\n.forge/store/events/\n";
|
|
27
|
+
// ── Private helpers ───────────────────────────────────────────────────────────
|
|
28
|
+
/** Remove a file or directory if it exists; record the path. Never throws. */
|
|
29
|
+
function rmIfExists(target, removed, warnings) {
|
|
30
|
+
if (!fs.existsSync(target))
|
|
31
|
+
return;
|
|
32
|
+
try {
|
|
33
|
+
fs.rmSync(target, { recursive: true, force: true });
|
|
34
|
+
removed.push(target);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
const e = err;
|
|
38
|
+
warnings.push(`could not remove ${target}: ${e.message ?? String(err)}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Remove a directory only if it exists and is empty. Records if removed. */
|
|
42
|
+
function rmDirIfEmpty(dirPath, removed) {
|
|
43
|
+
if (!fs.existsSync(dirPath))
|
|
44
|
+
return;
|
|
45
|
+
try {
|
|
46
|
+
if (fs.readdirSync(dirPath).length === 0) {
|
|
47
|
+
fs.rmdirSync(dirPath);
|
|
48
|
+
removed.push(dirPath);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// non-fatal — leave it
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Un-merge Forge hooks from .claude/settings.json.
|
|
57
|
+
* Removes hook entries whose command targets `.forge/tools/…`, drops groups and
|
|
58
|
+
* event-type keys that become empty, and deletes the file only if it is left
|
|
59
|
+
* with no keys at all (i.e. Forge created it). Never touches malformed JSON.
|
|
60
|
+
*/
|
|
61
|
+
function removeForgeHooks(settingsPath, removed, warnings) {
|
|
62
|
+
if (!fs.existsSync(settingsPath))
|
|
63
|
+
return;
|
|
64
|
+
let parsed;
|
|
65
|
+
try {
|
|
66
|
+
parsed = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
const e = err;
|
|
70
|
+
warnings.push(`settings.json not valid JSON — left untouched: ${e.message ?? String(err)}`);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const hooks = parsed.hooks;
|
|
74
|
+
if (!hooks || typeof hooks !== "object")
|
|
75
|
+
return;
|
|
76
|
+
let changed = false;
|
|
77
|
+
for (const [eventType, groupsRaw] of Object.entries(hooks)) {
|
|
78
|
+
if (!Array.isArray(groupsRaw))
|
|
79
|
+
continue;
|
|
80
|
+
const keptGroups = [];
|
|
81
|
+
for (const group of groupsRaw) {
|
|
82
|
+
const g = group;
|
|
83
|
+
if (Array.isArray(g.hooks)) {
|
|
84
|
+
const keptHooks = g.hooks.filter((h) => !(typeof h.command === "string" && h.command.includes(FORGE_HOOK_SENTINEL)));
|
|
85
|
+
if (keptHooks.length !== g.hooks.length)
|
|
86
|
+
changed = true;
|
|
87
|
+
if (keptHooks.length === 0)
|
|
88
|
+
continue; // drop emptied group
|
|
89
|
+
keptGroups.push({ ...g, hooks: keptHooks });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
keptGroups.push(group);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (keptGroups.length === 0) {
|
|
96
|
+
delete hooks[eventType];
|
|
97
|
+
changed = true;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
hooks[eventType] = keptGroups;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!changed)
|
|
104
|
+
return;
|
|
105
|
+
// Drop an emptied hooks key, then delete the file if nothing else remains.
|
|
106
|
+
if (Object.keys(hooks).length === 0)
|
|
107
|
+
delete parsed.hooks;
|
|
108
|
+
if (Object.keys(parsed).length === 0) {
|
|
109
|
+
rmIfExists(settingsPath, removed, warnings);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
fs.writeFileSync(settingsPath, JSON.stringify(parsed, null, 2) + "\n", "utf8");
|
|
114
|
+
removed.push(`${settingsPath} (Forge hooks un-merged)`);
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
const e = err;
|
|
118
|
+
warnings.push(`could not rewrite ${settingsPath}: ${e.message ?? String(err)}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** Remove the exact Forge block appended to .gitignore by bootstrap. */
|
|
122
|
+
function removeGitignoreBlock(gitignorePath, removed, warnings) {
|
|
123
|
+
if (!fs.existsSync(gitignorePath))
|
|
124
|
+
return;
|
|
125
|
+
let content;
|
|
126
|
+
try {
|
|
127
|
+
content = fs.readFileSync(gitignorePath, "utf8");
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (!content.includes(GITIGNORE_APPEND_BLOCK))
|
|
133
|
+
return;
|
|
134
|
+
try {
|
|
135
|
+
fs.writeFileSync(gitignorePath, content.replace(GITIGNORE_APPEND_BLOCK, ""), "utf8");
|
|
136
|
+
removed.push(`${gitignorePath} (Forge block un-appended)`);
|
|
137
|
+
}
|
|
138
|
+
catch (err) {
|
|
139
|
+
const e = err;
|
|
140
|
+
warnings.push(`could not rewrite ${gitignorePath}: ${e.message ?? String(err)}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// ── Main export ───────────────────────────────────────────────────────────────
|
|
144
|
+
export function uninstallClaudeProject(opts) {
|
|
145
|
+
const { dir, payloadRoot, purge } = opts;
|
|
146
|
+
const removed = [];
|
|
147
|
+
const kept = [];
|
|
148
|
+
const warnings = [];
|
|
149
|
+
// ── Step 0: Require the bootstrap manifest (proof of a forge bootstrap) ───
|
|
150
|
+
const manifestPath = path.join(dir, ".forge", ".bootstrap-manifest.json");
|
|
151
|
+
if (!fs.existsSync(manifestPath)) {
|
|
152
|
+
warnings.push(`Not a forge-bootstrapped project: ${path.join(".forge", ".bootstrap-manifest.json")} not found in ${dir}. ` +
|
|
153
|
+
"Refusing to remove anything (run `4ge init claude` first, or remove files by hand).");
|
|
154
|
+
return { ok: false, bootstrapped: false, removed, kept, warnings };
|
|
155
|
+
}
|
|
156
|
+
const forgeDir = path.join(dir, ".forge");
|
|
157
|
+
const claudeDir = path.join(dir, ".claude");
|
|
158
|
+
// ── Steps 1–4: Manifest-owner-grouped removal (single source of truth) ─────
|
|
159
|
+
// What bootstrap vendored is declared in payload-manifest.json; uninstall
|
|
160
|
+
// removes exactly those install destinations, grouped by entry.owner
|
|
161
|
+
// (FORGE-S32-T03). Curated Claude asset subtrees (agents/skills, owner
|
|
162
|
+
// `claude-assets`) are removed by payload-declared NAME so user-authored
|
|
163
|
+
// siblings survive; the forge-exclusive scaffold / command / workflow
|
|
164
|
+
// destinations are removed wholesale. bundleOnly entries (transitions,
|
|
165
|
+
// migrations.json, integrity.json) were never installed and are absent from
|
|
166
|
+
// groupByOwner(). Config + store live under .forge/ but are NOT install
|
|
167
|
+
// destinations, so they are untouched here (Step 6 preserves them).
|
|
168
|
+
try {
|
|
169
|
+
const manifest = loadManifest(payloadRoot);
|
|
170
|
+
const ownerGroups = groupByOwner(manifest);
|
|
171
|
+
const removedDests = new Set();
|
|
172
|
+
const parentDirs = new Set();
|
|
173
|
+
for (const [owner, entries] of ownerGroups) {
|
|
174
|
+
if (owner === "claude-assets") {
|
|
175
|
+
// Bounded removal: only payload-declared names within the shared dir.
|
|
176
|
+
for (const entry of entries) {
|
|
177
|
+
const assetDir = path.join(dir, entry.install);
|
|
178
|
+
if (!fs.existsSync(assetDir))
|
|
179
|
+
continue;
|
|
180
|
+
const bundleDir = path.join(payloadRoot, entry.bundle);
|
|
181
|
+
const names = new Set(applySelect(bundleDir, entry.select).map((rel) => rel.split(path.sep)[0]));
|
|
182
|
+
for (const name of names) {
|
|
183
|
+
rmIfExists(path.join(assetDir, name), removed, warnings);
|
|
184
|
+
}
|
|
185
|
+
rmDirIfEmpty(assetDir, removed);
|
|
186
|
+
}
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
// Forge-exclusive destinations — remove wholesale (dedup nested installs).
|
|
190
|
+
for (const entry of entries) {
|
|
191
|
+
const installDir = path.join(dir, entry.install);
|
|
192
|
+
if (!removedDests.has(installDir)) {
|
|
193
|
+
removedDests.add(installDir);
|
|
194
|
+
rmIfExists(installDir, removed, warnings);
|
|
195
|
+
}
|
|
196
|
+
parentDirs.add(path.dirname(installDir));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// Tidy now-empty shared parents (e.g. .claude/commands/ after removing forge/).
|
|
200
|
+
for (const p of parentDirs) {
|
|
201
|
+
rmDirIfEmpty(p, removed);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
const e = err;
|
|
206
|
+
warnings.push(`manifest-driven removal non-fatal: ${e.message ?? String(err)}`);
|
|
207
|
+
}
|
|
208
|
+
// ── Scaffold-only paths (not payload entries) + the bootstrap manifest ─────
|
|
209
|
+
rmIfExists(path.join(forgeDir, "cache"), removed, warnings);
|
|
210
|
+
rmIfExists(manifestPath, removed, warnings);
|
|
211
|
+
// ── Step 5: Un-merge settings hooks + un-append .gitignore (edit, not delete)
|
|
212
|
+
removeForgeHooks(path.join(claudeDir, "settings.json"), removed, warnings);
|
|
213
|
+
removeGitignoreBlock(path.join(dir, ".gitignore"), removed, warnings);
|
|
214
|
+
// ── Step 6: User data — preserve by default, remove only on --purge ───────
|
|
215
|
+
const configPath = path.join(forgeDir, "config.json");
|
|
216
|
+
const storePath = path.join(forgeDir, "store");
|
|
217
|
+
if (purge) {
|
|
218
|
+
rmIfExists(storePath, removed, warnings);
|
|
219
|
+
rmIfExists(configPath, removed, warnings);
|
|
220
|
+
// The KB folder (paths.engineering) is intentionally NOT auto-removed even
|
|
221
|
+
// under --purge: it is the user's generated documentation, not scaffold.
|
|
222
|
+
warnings.push("--purge removed .forge/store and .forge/config.json. The KB folder was left intact (remove it by hand if intended).");
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
if (fs.existsSync(configPath))
|
|
226
|
+
kept.push(configPath);
|
|
227
|
+
if (fs.existsSync(storePath))
|
|
228
|
+
kept.push(storePath);
|
|
229
|
+
}
|
|
230
|
+
// ── Step 7: Tidy empty parents ────────────────────────────────────────────
|
|
231
|
+
rmDirIfEmpty(forgeDir, removed);
|
|
232
|
+
rmDirIfEmpty(claudeDir, removed);
|
|
233
|
+
return { ok: true, bootstrapped: true, removed, kept, warnings };
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/claude-bootstrap/uninstall.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,EAAE;AACF,0EAA0E;AAC1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AAC,UAAU,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAED,6EAA6E;IAC7E,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAEjC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
export interface ComposeResetKickoffOpts {
|
|
3
|
+
/** Body of commands/reset.md (frontmatter included; the LLM reads steps from it). */
|
|
4
|
+
commandMd: string;
|
|
5
|
+
/** Resolved Forge plugin root, so the LLM uses the right tool paths without
|
|
6
|
+
* relying on the `!`-backtick command substitution the plugin route uses. */
|
|
7
|
+
forgeRoot: string;
|
|
8
|
+
/** Free-text reset request from the user (substituted for $ARGUMENTS). */
|
|
9
|
+
request: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function composeResetKickoff(opts: ComposeResetKickoffOpts): string;
|
|
12
|
+
export interface RegisterResetOptions {
|
|
13
|
+
forgeRoot: string | null;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function registerReset(pi: ExtensionAPI, options: RegisterResetOptions): void;
|