@entelligentsia/forgecli 1.0.36 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/dist/CHANGELOG-forge-plugin.md +101 -0
- package/dist/CHANGELOG-pi.md +143 -0
- package/dist/bin/argv.d.ts +1 -1
- package/dist/bin/argv.js +12 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +18 -16
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/reset.d.ts +39 -0
- package/dist/bin/reset.js +101 -0
- package/dist/bin/reset.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +56 -265
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -1
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +52 -32
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -1
- package/dist/extensions/forgecli/commands/reset.d.ts +16 -0
- package/dist/extensions/forgecli/commands/reset.js +83 -0
- package/dist/extensions/forgecli/commands/reset.js.map +1 -0
- package/dist/extensions/forgecli/forge-commands.d.ts +7 -2
- package/dist/extensions/forgecli/forge-commands.js +19 -5
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +4 -4
- package/dist/extensions/forgecli/hooks/forge-permissions.js +20 -6
- package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -1
- package/dist/extensions/forgecli/index.js +6 -3
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/lib/forge-root.d.ts +6 -0
- package/dist/extensions/forgecli/lib/forge-root.js +52 -0
- package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
- package/dist/extensions/forgecli/lib/payload-manifest.d.ts +62 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js +151 -0
- package/dist/extensions/forgecli/lib/payload-manifest.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js +107 -0
- package/dist/extensions/forgecli/orchestrators/advisory-render.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +34 -2
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +2 -2
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js +58 -0
- package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.d.ts +53 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js +131 -0
- package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js +25 -3
- package/dist/extensions/forgecli/orchestrators/halt-advisor.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +3 -3
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +22 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +1 -1
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +37 -2
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -1
- package/dist/extensions/forgecli/store/store-resolver.d.ts +15 -0
- package/dist/extensions/forgecli/store/store-resolver.js +118 -18
- package/dist/extensions/forgecli/store/store-resolver.js.map +1 -1
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/.schemas/migrations.json +85 -0
- package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/commands/check-agent.md +7 -23
- package/dist/forge-payload/commands/enhance.md +31 -5
- package/dist/forge-payload/commands/init.md +161 -97
- package/dist/forge-payload/commands/reset.md +117 -0
- package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
- package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
- package/dist/forge-payload/integrity.json +22 -7
- package/dist/forge-payload/payload-manifest.json +314 -0
- package/dist/forge-payload/schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/schemas/payload-manifest.schema.json +100 -0
- package/dist/forge-payload/schemas/structure-manifest.json +4 -2
- package/dist/forge-payload/tools/reset-plan.cjs +210 -0
- package/dist/forge-payload/tools/store.cjs +4 -1
- package/dist/forge-payload/tools/substitute-placeholders.cjs +10 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +20 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +18 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +10 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1804 -815
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2031 -1384
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +71 -27
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +35 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +12 -4
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +13 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +4 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/README.md +26 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +128 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +16 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +9 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +19 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +10 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +47 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +44 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +47 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +58 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +24 -26
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +72 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +13 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +112 -37
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +7 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +103 -70
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +20 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +97 -30
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts +36 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +202 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +72 -32
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +39 -34
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +20 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js +91 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +101 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +111 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js +54 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/containerization.md +111 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/docs.json +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +67 -13
- package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +9 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/security.md +59 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +36 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/tmux.md +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +10 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +19 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-header.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/doom-overlay/index.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/index.ts +531 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +185 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/handoff.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/interactive-shell.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-qa-tests.ts +152 -81
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/project-trust.ts +64 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/qna.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/questionnaire.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/snake.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/space-invaders.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/summarize.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tic-tac-toe.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/todo.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tools.ts +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -419
- package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -8
- package/node_modules/@earendil-works/pi-tui/README.md +13 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +102 -43
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -77
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +20 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +244 -42
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +46 -15
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@mariozechner/clipboard/package.json +2 -1
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/README.md +3 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +25 -0
- package/package.json +7 -6
- package/dist/extensions/forgecli/add-pipeline.d.ts +0 -19
- package/dist/extensions/forgecli/add-pipeline.js +0 -143
- package/dist/extensions/forgecli/add-pipeline.js.map +0 -1
- package/dist/extensions/forgecli/add-task.d.ts +0 -20
- package/dist/extensions/forgecli/add-task.js +0 -154
- package/dist/extensions/forgecli/add-task.js.map +0 -1
- package/dist/extensions/forgecli/approve.d.ts +0 -22
- package/dist/extensions/forgecli/approve.js +0 -152
- package/dist/extensions/forgecli/approve.js.map +0 -1
- package/dist/extensions/forgecli/banner.d.ts +0 -10
- package/dist/extensions/forgecli/banner.js +0 -36
- package/dist/extensions/forgecli/banner.js.map +0 -1
- package/dist/extensions/forgecli/calibrate.d.ts +0 -64
- package/dist/extensions/forgecli/calibrate.js +0 -481
- package/dist/extensions/forgecli/calibrate.js.map +0 -1
- package/dist/extensions/forgecli/collate.d.ts +0 -22
- package/dist/extensions/forgecli/collate.js +0 -134
- package/dist/extensions/forgecli/collate.js.map +0 -1
- package/dist/extensions/forgecli/commit.d.ts +0 -22
- package/dist/extensions/forgecli/commit.js +0 -152
- package/dist/extensions/forgecli/commit.js.map +0 -1
- package/dist/extensions/forgecli/config-command.d.ts +0 -8
- package/dist/extensions/forgecli/config-command.js +0 -67
- package/dist/extensions/forgecli/config-command.js.map +0 -1
- package/dist/extensions/forgecli/config-layer.d.ts +0 -53
- package/dist/extensions/forgecli/config-layer.js +0 -72
- package/dist/extensions/forgecli/config-layer.js.map +0 -1
- package/dist/extensions/forgecli/config-writer.d.ts +0 -16
- package/dist/extensions/forgecli/config-writer.js +0 -69
- package/dist/extensions/forgecli/config-writer.js.map +0 -1
- package/dist/extensions/forgecli/enhance.d.ts +0 -27
- package/dist/extensions/forgecli/enhance.js +0 -199
- package/dist/extensions/forgecli/enhance.js.map +0 -1
- package/dist/extensions/forgecli/fix-bug.d.ts +0 -85
- package/dist/extensions/forgecli/fix-bug.js +0 -1580
- package/dist/extensions/forgecli/fix-bug.js.map +0 -1
- package/dist/extensions/forgecli/forge-header.d.ts +0 -12
- package/dist/extensions/forgecli/forge-header.js +0 -114
- package/dist/extensions/forgecli/forge-header.js.map +0 -1
- package/dist/extensions/forgecli/forge-init.d.ts +0 -26
- package/dist/extensions/forgecli/forge-init.js +0 -514
- package/dist/extensions/forgecli/forge-init.js.map +0 -1
- package/dist/extensions/forgecli/forge-root.d.ts +0 -10
- package/dist/extensions/forgecli/forge-root.js +0 -62
- package/dist/extensions/forgecli/forge-root.js.map +0 -1
- package/dist/extensions/forgecli/forge-update-command.d.ts +0 -100
- package/dist/extensions/forgecli/forge-update-command.js +0 -435
- package/dist/extensions/forgecli/forge-update-command.js.map +0 -1
- package/dist/extensions/forgecli/friction-emit.d.ts +0 -99
- package/dist/extensions/forgecli/friction-emit.js +0 -245
- package/dist/extensions/forgecli/friction-emit.js.map +0 -1
- package/dist/extensions/forgecli/implement.d.ts +0 -22
- package/dist/extensions/forgecli/implement.js +0 -170
- package/dist/extensions/forgecli/implement.js.map +0 -1
- package/dist/extensions/forgecli/init-context.d.ts +0 -99
- package/dist/extensions/forgecli/init-context.js +0 -178
- package/dist/extensions/forgecli/init-context.js.map +0 -1
- package/dist/extensions/forgecli/init-progress.d.ts +0 -39
- package/dist/extensions/forgecli/init-progress.js +0 -117
- package/dist/extensions/forgecli/init-progress.js.map +0 -1
- package/dist/extensions/forgecli/input-router.d.ts +0 -33
- package/dist/extensions/forgecli/input-router.js +0 -136
- package/dist/extensions/forgecli/input-router.js.map +0 -1
- package/dist/extensions/forgecli/lib/halt-advisor.d.ts +0 -59
- package/dist/extensions/forgecli/lib/halt-advisor.js +0 -113
- package/dist/extensions/forgecli/lib/halt-advisor.js.map +0 -1
- package/dist/extensions/forgecli/lib/orchestrator-preflight.d.ts +0 -46
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js +0 -64
- package/dist/extensions/forgecli/lib/orchestrator-preflight.js.map +0 -1
- package/dist/extensions/forgecli/materialize.d.ts +0 -16
- package/dist/extensions/forgecli/materialize.js +0 -195
- package/dist/extensions/forgecli/materialize.js.map +0 -1
- package/dist/extensions/forgecli/migrate.d.ts +0 -22
- package/dist/extensions/forgecli/migrate.js +0 -260
- package/dist/extensions/forgecli/migrate.js.map +0 -1
- package/dist/extensions/forgecli/migration-engine.d.ts +0 -117
- package/dist/extensions/forgecli/migration-engine.js +0 -563
- package/dist/extensions/forgecli/migration-engine.js.map +0 -1
- package/dist/extensions/forgecli/model-registry.d.ts +0 -61
- package/dist/extensions/forgecli/model-registry.js +0 -127
- package/dist/extensions/forgecli/model-registry.js.map +0 -1
- package/dist/extensions/forgecli/model-resolver.d.ts +0 -32
- package/dist/extensions/forgecli/model-resolver.js +0 -65
- package/dist/extensions/forgecli/model-resolver.js.map +0 -1
- package/dist/extensions/forgecli/model-validator.d.ts +0 -29
- package/dist/extensions/forgecli/model-validator.js +0 -107
- package/dist/extensions/forgecli/model-validator.js.map +0 -1
- package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +0 -26
- package/dist/extensions/forgecli/orchestrator-status-bar.js +0 -213
- package/dist/extensions/forgecli/orchestrator-status-bar.js.map +0 -1
- package/dist/extensions/forgecli/plan.d.ts +0 -22
- package/dist/extensions/forgecli/plan.js +0 -167
- package/dist/extensions/forgecli/plan.js.map +0 -1
- package/dist/extensions/forgecli/quiz-agent.d.ts +0 -17
- package/dist/extensions/forgecli/quiz-agent.js +0 -98
- package/dist/extensions/forgecli/quiz-agent.js.map +0 -1
- package/dist/extensions/forgecli/read-command.d.ts +0 -2
- package/dist/extensions/forgecli/read-command.js +0 -100
- package/dist/extensions/forgecli/read-command.js.map +0 -1
- package/dist/extensions/forgecli/regenerate.d.ts +0 -40
- package/dist/extensions/forgecli/regenerate.js +0 -438
- package/dist/extensions/forgecli/regenerate.js.map +0 -1
- package/dist/extensions/forgecli/remove-command.d.ts +0 -17
- package/dist/extensions/forgecli/remove-command.js +0 -124
- package/dist/extensions/forgecli/remove-command.js.map +0 -1
- package/dist/extensions/forgecli/report-bug.d.ts +0 -25
- package/dist/extensions/forgecli/report-bug.js +0 -159
- package/dist/extensions/forgecli/report-bug.js.map +0 -1
- package/dist/extensions/forgecli/retrospective.d.ts +0 -20
- package/dist/extensions/forgecli/retrospective.js +0 -126
- package/dist/extensions/forgecli/retrospective.js.map +0 -1
- package/dist/extensions/forgecli/review-code.d.ts +0 -35
- package/dist/extensions/forgecli/review-code.js +0 -196
- package/dist/extensions/forgecli/review-code.js.map +0 -1
- package/dist/extensions/forgecli/review-plan.d.ts +0 -35
- package/dist/extensions/forgecli/review-plan.js +0 -200
- package/dist/extensions/forgecli/review-plan.js.map +0 -1
- package/dist/extensions/forgecli/run-sprint.d.ts +0 -27
- package/dist/extensions/forgecli/run-sprint.js +0 -716
- package/dist/extensions/forgecli/run-sprint.js.map +0 -1
- package/dist/extensions/forgecli/run-task.d.ts +0 -204
- package/dist/extensions/forgecli/run-task.js +0 -1403
- package/dist/extensions/forgecli/run-task.js.map +0 -1
- package/dist/extensions/forgecli/skill-curation-flag.d.ts +0 -21
- package/dist/extensions/forgecli/skill-curation-flag.js +0 -71
- package/dist/extensions/forgecli/skill-curation-flag.js.map +0 -1
- package/dist/extensions/forgecli/skill-curator-subagent.d.ts +0 -102
- package/dist/extensions/forgecli/skill-curator-subagent.js +0 -339
- package/dist/extensions/forgecli/skill-curator-subagent.js.map +0 -1
- package/dist/extensions/forgecli/skill-retriever.d.ts +0 -84
- package/dist/extensions/forgecli/skill-retriever.js +0 -246
- package/dist/extensions/forgecli/skill-retriever.js.map +0 -1
- package/dist/extensions/forgecli/skill-usage-tracker.d.ts +0 -91
- package/dist/extensions/forgecli/skill-usage-tracker.js +0 -224
- package/dist/extensions/forgecli/skill-usage-tracker.js.map +0 -1
- package/dist/extensions/forgecli/sprint-intake.d.ts +0 -10
- package/dist/extensions/forgecli/sprint-intake.js +0 -91
- package/dist/extensions/forgecli/sprint-intake.js.map +0 -1
- package/dist/extensions/forgecli/sprint-plan.d.ts +0 -14
- package/dist/extensions/forgecli/sprint-plan.js +0 -122
- package/dist/extensions/forgecli/sprint-plan.js.map +0 -1
- package/dist/extensions/forgecli/status-command.d.ts +0 -19
- package/dist/extensions/forgecli/status-command.js +0 -140
- package/dist/extensions/forgecli/status-command.js.map +0 -1
- package/dist/extensions/forgecli/store-error-remediation.d.ts +0 -65
- package/dist/extensions/forgecli/store-error-remediation.js +0 -307
- package/dist/extensions/forgecli/store-error-remediation.js.map +0 -1
- package/dist/extensions/forgecli/store-query.d.ts +0 -22
- package/dist/extensions/forgecli/store-query.js +0 -107
- package/dist/extensions/forgecli/store-query.js.map +0 -1
- package/dist/extensions/forgecli/store-repair.d.ts +0 -17
- package/dist/extensions/forgecli/store-repair.js +0 -123
- package/dist/extensions/forgecli/store-repair.js.map +0 -1
- package/dist/extensions/forgecli/store-resolver.d.ts +0 -56
- package/dist/extensions/forgecli/store-resolver.js +0 -263
- package/dist/extensions/forgecli/store-resolver.js.map +0 -1
- package/dist/extensions/forgecli/store-validator.d.ts +0 -16
- package/dist/extensions/forgecli/store-validator.js +0 -32
- package/dist/extensions/forgecli/store-validator.js.map +0 -1
- package/dist/extensions/forgecli/test-orchestrate.d.ts +0 -2
- package/dist/extensions/forgecli/test-orchestrate.js +0 -182
- package/dist/extensions/forgecli/test-orchestrate.js.map +0 -1
- package/dist/extensions/forgecli/thread-switcher.d.ts +0 -5
- package/dist/extensions/forgecli/thread-switcher.js +0 -189
- package/dist/extensions/forgecli/thread-switcher.js.map +0 -1
- package/dist/extensions/forgecli/transition-guard.d.ts +0 -20
- package/dist/extensions/forgecli/transition-guard.js +0 -89
- package/dist/extensions/forgecli/transition-guard.js.map +0 -1
- package/dist/extensions/forgecli/update-check.d.ts +0 -37
- package/dist/extensions/forgecli/update-check.js +0 -185
- package/dist/extensions/forgecli/update-check.js.map +0 -1
- package/dist/extensions/forgecli/update-tools.d.ts +0 -23
- package/dist/extensions/forgecli/update-tools.js +0 -135
- package/dist/extensions/forgecli/update-tools.js.map +0 -1
- package/dist/extensions/forgecli/validate.d.ts +0 -22
- package/dist/extensions/forgecli/validate.js +0 -152
- package/dist/extensions/forgecli/validate.js.map +0 -1
- package/dist/extensions/forgecli/viewport-events.d.ts +0 -78
- package/dist/extensions/forgecli/viewport-events.js +0 -243
- package/dist/extensions/forgecli/viewport-events.js.map +0 -1
- package/dist/extensions/forgecli/viewport-renderer.d.ts +0 -83
- package/dist/extensions/forgecli/viewport-renderer.js +0 -233
- package/dist/extensions/forgecli/viewport-renderer.js.map +0 -1
- package/dist/extensions/forgecli/viewport-theme.d.ts +0 -11
- package/dist/extensions/forgecli/viewport-theme.js +0 -128
- package/dist/extensions/forgecli/viewport-theme.js.map +0 -1
- package/dist/extensions/forgecli/whats-new-widget.d.ts +0 -26
- package/dist/extensions/forgecli/whats-new-widget.js +0 -376
- package/dist/extensions/forgecli/whats-new-widget.js.map +0 -1
- package/dist/extensions/forgecli/whats-new.d.ts +0 -120
- package/dist/extensions/forgecli/whats-new.js +0 -470
- package/dist/extensions/forgecli/whats-new.js.map +0 -1
- package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
- package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
- package/dist/forge-payload/.base-pack/commands/init.md +0 -278
- package/dist/forge-payload/init/generation/generate-knowledge-base.md +0 -56
- package/dist/forge-payload/init/generation/generate-personas.md +0 -54
- package/dist/forge-payload/init/generation/generate-skills.md +0 -36
- package/dist/forge-payload/init/generation/generate-templates.md +0 -39
- /package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +0 -0
- /package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +0 -0
|
@@ -1,563 +0,0 @@
|
|
|
1
|
-
// migration-engine.ts — Deterministic migration apply engine (FORGE-S23-T01)
|
|
2
|
-
//
|
|
3
|
-
// Reads migrations.json from the bundled payload, walks version entries between
|
|
4
|
-
// the given bounds using semver comparison [from, to) semantics, applies
|
|
5
|
-
// regeneration actions against the project's .forge/ directory, and maintains
|
|
6
|
-
// an idempotency ledger at .forge/applied-migrations.json.
|
|
7
|
-
//
|
|
8
|
-
// Design: pure engine — no pi runtime context, no UI calls, no event emission.
|
|
9
|
-
// The calling command handler (forge-update-command.ts) is responsible for
|
|
10
|
-
// event emission after this engine returns a MigrationResult.
|
|
11
|
-
//
|
|
12
|
-
// Layer: Layer 1 of the two-layer split (pure engine / command handler).
|
|
13
|
-
import * as fs from "node:fs";
|
|
14
|
-
import { createRequire } from "node:module";
|
|
15
|
-
import * as path from "node:path";
|
|
16
|
-
import { isFile } from "./lib/shared-fs-utils.js";
|
|
17
|
-
// ── semverCompare ─────────────────────────────────────────────────────────────
|
|
18
|
-
/**
|
|
19
|
-
* Compare two version strings using semver integer-component comparison.
|
|
20
|
-
* Returns: negative if a < b, 0 if a === b, positive if a > b.
|
|
21
|
-
*
|
|
22
|
-
* Unlike string comparison, this correctly handles 0.9.x vs 0.10.x boundaries.
|
|
23
|
-
* Strips leading "v" prefix (matches parseTriple() behavior in forge-update-command.ts:118).
|
|
24
|
-
* Falls back to localeCompare for invalid/non-semver inputs.
|
|
25
|
-
*/
|
|
26
|
-
export function semverCompare(a, b) {
|
|
27
|
-
const parse = (v) => {
|
|
28
|
-
const cleaned = v.startsWith("v") ? v.slice(1) : v; // Strip "v" prefix (parity with parseTriple())
|
|
29
|
-
const parts = cleaned.split(".");
|
|
30
|
-
if (parts.length !== 3)
|
|
31
|
-
return null;
|
|
32
|
-
const [major, minor, patch] = parts.map(Number);
|
|
33
|
-
if ([major, minor, patch].some((n) => Number.isNaN(n)))
|
|
34
|
-
return null;
|
|
35
|
-
return [major, minor, patch];
|
|
36
|
-
};
|
|
37
|
-
const pa = parse(a);
|
|
38
|
-
const pb = parse(b);
|
|
39
|
-
if (!pa || !pb)
|
|
40
|
-
return a.localeCompare(b); // Fallback for invalid format
|
|
41
|
-
for (let i = 0; i < 3; i++) {
|
|
42
|
-
if (pa[i] !== pb[i])
|
|
43
|
-
return pa[i] - pb[i];
|
|
44
|
-
}
|
|
45
|
-
return 0;
|
|
46
|
-
}
|
|
47
|
-
// ── filterMigrationEntries ────────────────────────────────────────────────────
|
|
48
|
-
/**
|
|
49
|
-
* Filter migrations.json entries using [fromVersion, toVersion) semantics on keys.
|
|
50
|
-
*
|
|
51
|
-
* - fromVersion entry IS included: it represents the transition AWAY from that version.
|
|
52
|
-
* - toVersion entry is EXCLUDED: it would be a further transition past the target.
|
|
53
|
-
* - Results are sorted ascending by semver (oldest first).
|
|
54
|
-
*
|
|
55
|
-
* No first-run special case — this same filter applies for both first-run
|
|
56
|
-
* (empty ledger) and subsequent runs. The idempotency ledger handles re-run protection.
|
|
57
|
-
*/
|
|
58
|
-
export function filterMigrationEntries(migrations, fromVersion, toVersion) {
|
|
59
|
-
return Object.entries(migrations)
|
|
60
|
-
.filter(([key]) => {
|
|
61
|
-
return semverCompare(key, fromVersion) >= 0 && semverCompare(key, toVersion) < 0;
|
|
62
|
-
})
|
|
63
|
-
.map(([key, entry]) => ({ key, entry }))
|
|
64
|
-
.sort((a, b) => semverCompare(a.key, b.key));
|
|
65
|
-
}
|
|
66
|
-
// ── resolveCategory ────────────────────────────────────────────────────────────
|
|
67
|
-
/**
|
|
68
|
-
* Resolve a migration category string to one or more WriteDescriptors.
|
|
69
|
-
* Pure function — does not write files; appends to the provided writes array.
|
|
70
|
-
*
|
|
71
|
-
* ENOENT trap rule: if source doesn't exist, skip silently (never throw on ENOENT).
|
|
72
|
-
* Non-ENOENT IO errors propagate.
|
|
73
|
-
*
|
|
74
|
-
* Path-traversal defense: all output paths are validated against
|
|
75
|
-
* path.join(projectRoot, '.forge') before being added to writes.
|
|
76
|
-
*/
|
|
77
|
-
export function resolveCategory(category, bundleRoot, projectRoot, writes) {
|
|
78
|
-
const forgeDir = path.join(projectRoot, ".forge");
|
|
79
|
-
const basePack = path.join(bundleRoot, ".base-pack");
|
|
80
|
-
const schemas = path.join(bundleRoot, ".schemas");
|
|
81
|
-
function safeDest(rel) {
|
|
82
|
-
const resolved = path.join(forgeDir, rel);
|
|
83
|
-
const safePrefix = forgeDir + path.sep;
|
|
84
|
-
if (!resolved.startsWith(safePrefix)) {
|
|
85
|
-
throw new Error(`Path traversal attempt: resolved output path '${resolved}' is outside .forge/`);
|
|
86
|
-
}
|
|
87
|
-
return resolved;
|
|
88
|
-
}
|
|
89
|
-
function tryAdd(src, dest) {
|
|
90
|
-
// isFile() returns false on ENOENT and any other stat error — intentional,
|
|
91
|
-
// since the migration engine must not crash on missing optional sources.
|
|
92
|
-
if (isFile(src)) {
|
|
93
|
-
writes.push({ src, dest });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
// ── Schema categories ───────────────────────────────────────────────────
|
|
97
|
-
if (category === "schemas") {
|
|
98
|
-
// Bare schemas — copy all *.schema.json from bundle/.schemas/ recursively,
|
|
99
|
-
// preserving subdirectory structure under the destination .forge/schemas/.
|
|
100
|
-
// (FORGE-S25-T12: enables _defs/ subtree shipping for $ref'd shared schemas.)
|
|
101
|
-
function walk(dir) {
|
|
102
|
-
let entries;
|
|
103
|
-
try {
|
|
104
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
105
|
-
}
|
|
106
|
-
catch (err) {
|
|
107
|
-
if (err.code === "ENOENT")
|
|
108
|
-
return;
|
|
109
|
-
throw err;
|
|
110
|
-
}
|
|
111
|
-
for (const entry of entries) {
|
|
112
|
-
const fullSrc = path.join(dir, entry.name);
|
|
113
|
-
if (entry.isDirectory()) {
|
|
114
|
-
walk(fullSrc);
|
|
115
|
-
}
|
|
116
|
-
else if (entry.isFile() && entry.name.endsWith(".schema.json")) {
|
|
117
|
-
const rel = path.relative(schemas, fullSrc);
|
|
118
|
-
writes.push({
|
|
119
|
-
src: fullSrc,
|
|
120
|
-
dest: safeDest(path.join("schemas", rel)),
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
walk(schemas);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (category.startsWith("schemas:")) {
|
|
129
|
-
const name = category.slice("schemas:".length);
|
|
130
|
-
// Path-traversal defense on the name itself
|
|
131
|
-
if (name.includes("..") || name.includes("/") || name.includes("\\")) {
|
|
132
|
-
// Validate safe destination will catch it — but throw explicitly for clarity
|
|
133
|
-
const dest = path.join(forgeDir, "schemas", `${name}.schema.json`);
|
|
134
|
-
const safePrefix = forgeDir + path.sep;
|
|
135
|
-
if (!dest.startsWith(safePrefix)) {
|
|
136
|
-
throw new Error(`Path traversal attempt: schemas category '${category}'`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
// Special case: structure-manifest (non-.schema.json file)
|
|
140
|
-
if (name === "structure-manifest") {
|
|
141
|
-
// Probe .schema.json first, fall back to .json
|
|
142
|
-
const srcSchema = path.join(schemas, `${name}.schema.json`);
|
|
143
|
-
const srcJson = path.join(schemas, `${name}.json`);
|
|
144
|
-
const dest = safeDest(path.join("schemas", `${name}.json`));
|
|
145
|
-
if (fs.existsSync(srcSchema)) {
|
|
146
|
-
writes.push({ src: srcSchema, dest });
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
tryAdd(srcJson, dest);
|
|
150
|
-
}
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
// Standard schema: <name>.schema.json
|
|
154
|
-
tryAdd(path.join(schemas, `${name}.schema.json`), safeDest(path.join("schemas", `${name}.schema.json`)));
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
// ── hooks:* short-circuit ───────────────────────────────────────────────
|
|
158
|
-
if (category === "hooks" || category.startsWith("hooks:")) {
|
|
159
|
-
// No source directory in bundle; short-circuit before any fs call
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
// ── tools:* short-circuit (excluding tools:lib:*) ──────────────────────
|
|
163
|
-
if (category === "tools" || (category.startsWith("tools:") && !category.startsWith("tools:lib"))) {
|
|
164
|
-
// FORGE-S29-T05: copy all .cjs and .js files from bundle tools/ to .forge/tools/.
|
|
165
|
-
// The tools/ directory is at bundleRoot/tools/ (same level as .schemas/, .base-pack/).
|
|
166
|
-
const toolsSrc = path.join(bundleRoot, "tools");
|
|
167
|
-
let entries;
|
|
168
|
-
try {
|
|
169
|
-
entries = fs.readdirSync(toolsSrc, { withFileTypes: true });
|
|
170
|
-
}
|
|
171
|
-
catch (err) {
|
|
172
|
-
if (err.code === "ENOENT")
|
|
173
|
-
return;
|
|
174
|
-
throw err;
|
|
175
|
-
}
|
|
176
|
-
for (const entry of entries) {
|
|
177
|
-
if (!entry.isFile())
|
|
178
|
-
continue;
|
|
179
|
-
if (!entry.name.endsWith(".cjs") && !entry.name.endsWith(".js"))
|
|
180
|
-
continue;
|
|
181
|
-
writes.push({
|
|
182
|
-
src: path.join(toolsSrc, entry.name),
|
|
183
|
-
dest: safeDest(path.join("tools", entry.name)),
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
// ── tools:lib/<name> and tools:lib:<name> ──────────────────────────────
|
|
189
|
-
if (category.startsWith("tools:lib")) {
|
|
190
|
-
const rest = category.slice("tools:lib".length);
|
|
191
|
-
// Normalize separator: tools:lib/forge-root or tools:lib:validate → name
|
|
192
|
-
const name = rest.startsWith("/") ? rest.slice(1) : rest.startsWith(":") ? rest.slice(1) : rest;
|
|
193
|
-
const libSrc = path.join(bundleRoot, "tools", "lib");
|
|
194
|
-
// FORGE-S29-T05: copy lib files to .forge/tools/lib/ (previously wrote a
|
|
195
|
-
// marker stub to .forge/schemas/; now writes the real file to .forge/tools/lib/).
|
|
196
|
-
// Probe .cjs first, then .js (matching LIB_ALLOWLIST entry patterns).
|
|
197
|
-
// ENOENT on both: graceful skip (no throw).
|
|
198
|
-
const srcCjs = path.join(libSrc, `${name}.cjs`);
|
|
199
|
-
const srcJs = path.join(libSrc, `${name}.js`);
|
|
200
|
-
const resolvedSrc = fs.existsSync(srcCjs) ? srcCjs : fs.existsSync(srcJs) ? srcJs : null;
|
|
201
|
-
if (resolvedSrc) {
|
|
202
|
-
writes.push({
|
|
203
|
-
src: resolvedSrc,
|
|
204
|
-
dest: safeDest(path.join("tools", "lib", `${name}${resolvedSrc.endsWith(".cjs") ? ".cjs" : ".js"}`)),
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
// ENOENT on both: graceful skip
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
// ── fragments:* and events:* (convention aliases) ──────────────────────
|
|
211
|
-
if (category.startsWith("fragments:") || category.startsWith("events:")) {
|
|
212
|
-
const prefix = category.startsWith("fragments:") ? "fragments:" : "events:";
|
|
213
|
-
const name = category.slice(prefix.length);
|
|
214
|
-
tryAdd(path.join(basePack, "workflows", "_fragments", `${name}.md`), safeDest(path.join("workflows", "_fragments", `${name}.md`)));
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
// ── workflows:_fragments (bare-directory token) ─────────────────────────
|
|
218
|
-
if (category === "workflows:_fragments") {
|
|
219
|
-
const fragDir = path.join(basePack, "workflows", "_fragments");
|
|
220
|
-
try {
|
|
221
|
-
const entries = fs.readdirSync(fragDir);
|
|
222
|
-
for (const entry of entries) {
|
|
223
|
-
// Nesting guard: do NOT recurse into a subdirectory named _fragments/
|
|
224
|
-
if (entry === "_fragments")
|
|
225
|
-
continue;
|
|
226
|
-
const fullSrc = path.join(fragDir, entry);
|
|
227
|
-
// isFile() returns false for dirs and any stat error — skip silently.
|
|
228
|
-
if (isFile(fullSrc)) {
|
|
229
|
-
writes.push({
|
|
230
|
-
src: fullSrc,
|
|
231
|
-
dest: safeDest(path.join("workflows", "_fragments", entry)),
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
catch (err) {
|
|
237
|
-
if (err.code !== "ENOENT")
|
|
238
|
-
throw err;
|
|
239
|
-
}
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
// ── workflows:_fragments_<name> (underscore compound) ──────────────────
|
|
243
|
-
if (category.startsWith("workflows:_fragments_")) {
|
|
244
|
-
const name = category.slice("workflows:_fragments_".length);
|
|
245
|
-
tryAdd(path.join(basePack, "workflows", "_fragments", `${name}.md`), safeDest(path.join("workflows", "_fragments", `${name}.md`)));
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
// ── Base-pack categories ────────────────────────────────────────────────
|
|
249
|
-
const VALID_BASE_PACK_TYPES = ["personas", "workflows", "skills", "templates", "commands"];
|
|
250
|
-
const colonIdx = category.indexOf(":");
|
|
251
|
-
const typeStr = colonIdx >= 0 ? category.slice(0, colonIdx) : category;
|
|
252
|
-
const subTarget = colonIdx >= 0 ? category.slice(colonIdx + 1) : null;
|
|
253
|
-
if (!VALID_BASE_PACK_TYPES.includes(typeStr)) {
|
|
254
|
-
// Unknown category — log at debug level and skip
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
const type = typeStr;
|
|
258
|
-
if (subTarget === null) {
|
|
259
|
-
// Bare category — walk the entire subdirectory
|
|
260
|
-
const srcDir = path.join(basePack, type);
|
|
261
|
-
try {
|
|
262
|
-
const files = fs.readdirSync(srcDir).filter((f) => f.endsWith(".md"));
|
|
263
|
-
for (const f of files) {
|
|
264
|
-
const dest = type === "skills"
|
|
265
|
-
? safeDest(path.join(type, f)) // skills files already have -skills.md suffix
|
|
266
|
-
: type === "commands"
|
|
267
|
-
? safeDest(path.join("commands", "forge", f))
|
|
268
|
-
: safeDest(path.join(type, f));
|
|
269
|
-
tryAdd(path.join(srcDir, f), dest);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
catch (err) {
|
|
273
|
-
if (err.code !== "ENOENT")
|
|
274
|
-
throw err;
|
|
275
|
-
}
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
// Special case: workflows:base-pack-store-cli-form — explicit no-op
|
|
279
|
-
if (type === "workflows" && subTarget === "base-pack-store-cli-form") {
|
|
280
|
-
// Sub-target doesn't exist in base-pack; debug-logged no-op
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
// Sub-target category: <type>:<name>
|
|
284
|
-
const filename = type === "skills"
|
|
285
|
-
? `${subTarget}-skills.md` // skills:<name> → <name>-skills.md
|
|
286
|
-
: `${subTarget}.md`;
|
|
287
|
-
const dest = type === "commands" ? safeDest(path.join("commands", "forge", filename)) : safeDest(path.join(type, filename));
|
|
288
|
-
tryAdd(path.join(basePack, type, filename), dest);
|
|
289
|
-
}
|
|
290
|
-
function executeFileOps(fileOps, projectRoot, dryRun) {
|
|
291
|
-
const forgeDir = path.join(projectRoot, ".forge");
|
|
292
|
-
const safePrefix = forgeDir + path.sep;
|
|
293
|
-
const categories = [];
|
|
294
|
-
// C-19: accumulate ENOENT failures for copy/substitute-placeholder ops
|
|
295
|
-
const failed = [];
|
|
296
|
-
for (const op of fileOps) {
|
|
297
|
-
const dest = path.resolve(projectRoot, op.path);
|
|
298
|
-
if (!dest.startsWith(safePrefix) && !dest.startsWith(forgeDir)) {
|
|
299
|
-
throw new Error(`Path traversal attempt in fileOps: '${op.path}'`);
|
|
300
|
-
}
|
|
301
|
-
const categoryLabel = `fileOps:${op.op}`;
|
|
302
|
-
categories.push(categoryLabel);
|
|
303
|
-
if (dryRun)
|
|
304
|
-
continue;
|
|
305
|
-
switch (op.op) {
|
|
306
|
-
case "mkdir":
|
|
307
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
308
|
-
break;
|
|
309
|
-
case "copy":
|
|
310
|
-
if (op.src) {
|
|
311
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
312
|
-
try {
|
|
313
|
-
fs.copyFileSync(op.src, dest);
|
|
314
|
-
}
|
|
315
|
-
catch (err) {
|
|
316
|
-
if (err.code !== "ENOENT")
|
|
317
|
-
throw err;
|
|
318
|
-
// C-19: src absent — record failure so caller can surface it
|
|
319
|
-
failed.push({ category: categoryLabel, reason: `ENOENT: ${op.src}` });
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
break;
|
|
323
|
-
case "delete":
|
|
324
|
-
try {
|
|
325
|
-
fs.rmSync(dest, { force: true });
|
|
326
|
-
}
|
|
327
|
-
catch (err) {
|
|
328
|
-
if (err.code !== "ENOENT")
|
|
329
|
-
throw err;
|
|
330
|
-
}
|
|
331
|
-
break;
|
|
332
|
-
case "substitute-placeholder":
|
|
333
|
-
// Forward-compat: just copy for now (no ctx available in engine)
|
|
334
|
-
if (op.src) {
|
|
335
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
336
|
-
try {
|
|
337
|
-
fs.copyFileSync(op.src, dest);
|
|
338
|
-
}
|
|
339
|
-
catch (err) {
|
|
340
|
-
if (err.code !== "ENOENT")
|
|
341
|
-
throw err;
|
|
342
|
-
// C-19: src absent — record failure so caller can surface it
|
|
343
|
-
failed.push({ category: categoryLabel, reason: `ENOENT: ${op.src}` });
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
break;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
return { categories, failed };
|
|
350
|
-
}
|
|
351
|
-
// ── Ledger helpers ────────────────────────────────────────────────────────────
|
|
352
|
-
function readLedger(projectRoot) {
|
|
353
|
-
const ledgerPath = path.join(projectRoot, ".forge", "applied-migrations.json");
|
|
354
|
-
try {
|
|
355
|
-
const raw = fs.readFileSync(ledgerPath, "utf8");
|
|
356
|
-
return JSON.parse(raw);
|
|
357
|
-
}
|
|
358
|
-
catch {
|
|
359
|
-
return { schemaVersion: 1, appliedVersions: [] };
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
function writeLedger(projectRoot, ledger) {
|
|
363
|
-
const ledgerPath = path.join(projectRoot, ".forge", "applied-migrations.json");
|
|
364
|
-
fs.writeFileSync(ledgerPath, JSON.stringify(ledger, null, 2), "utf8");
|
|
365
|
-
}
|
|
366
|
-
// ── runMigrations ─────────────────────────────────────────────────────────────
|
|
367
|
-
/**
|
|
368
|
-
* Execute all migration entries between [fromVersion, toVersion) from the
|
|
369
|
-
* bundled migrations.json against the project's .forge/ directory.
|
|
370
|
-
*
|
|
371
|
-
* Design constraints:
|
|
372
|
-
* - No UI context (no ctx.ui calls).
|
|
373
|
-
* - No event emission (caller is responsible).
|
|
374
|
-
* - Pure deterministic engine: reads from bundleRoot, writes to projectRoot/.forge/.
|
|
375
|
-
* - Idempotent: already-applied versions (from .forge/applied-migrations.json) are skipped.
|
|
376
|
-
*
|
|
377
|
-
* Forward-compat: entries with non-empty fileOps[] use fileOps; otherwise regenerate.
|
|
378
|
-
* NOTE: 0 of 158 current entries use fileOps — the executor is dead code on day 1.
|
|
379
|
-
* Once a real fileOps entry lands, an integration test against that entry MUST be added.
|
|
380
|
-
*/
|
|
381
|
-
export async function runMigrations(opts) {
|
|
382
|
-
const { bundleRoot, projectRoot, fromVersion, toVersion, dryRun = false } = opts;
|
|
383
|
-
const result = {
|
|
384
|
-
applied: [],
|
|
385
|
-
skippedBreaking: [],
|
|
386
|
-
manualSteps: [],
|
|
387
|
-
dryRun,
|
|
388
|
-
schemasRefreshed: [],
|
|
389
|
-
forgeRootUpdated: false,
|
|
390
|
-
failedCategories: [], // C-19: populated when ops fail with ENOENT
|
|
391
|
-
};
|
|
392
|
-
// Read migrations.json from bundle
|
|
393
|
-
const migrationsPath = path.join(bundleRoot, ".schemas", "migrations.json");
|
|
394
|
-
let migrations;
|
|
395
|
-
try {
|
|
396
|
-
const raw = fs.readFileSync(migrationsPath, "utf8");
|
|
397
|
-
migrations = JSON.parse(raw);
|
|
398
|
-
}
|
|
399
|
-
catch (err) {
|
|
400
|
-
if (err.code === "ENOENT") {
|
|
401
|
-
// migrations.json not in bundle — no migrations to apply
|
|
402
|
-
return result;
|
|
403
|
-
}
|
|
404
|
-
throw err;
|
|
405
|
-
}
|
|
406
|
-
// Filter entries using [from, to) semantics
|
|
407
|
-
const entries = filterMigrationEntries(migrations, fromVersion, toVersion);
|
|
408
|
-
if (entries.length === 0) {
|
|
409
|
-
// No-op: empty range (from == to) or no entries in range
|
|
410
|
-
return result;
|
|
411
|
-
}
|
|
412
|
-
// Read idempotency ledger
|
|
413
|
-
const ledger = readLedger(projectRoot);
|
|
414
|
-
// Build substitution map ONCE using config from .forge/config.json
|
|
415
|
-
let buildSubstitutionMap = null;
|
|
416
|
-
let substituteFile = null;
|
|
417
|
-
try {
|
|
418
|
-
const substPath = path.join(bundleRoot, "tools", "substitute-placeholders.cjs");
|
|
419
|
-
const _require = createRequire(import.meta.url);
|
|
420
|
-
const substModule = _require(substPath);
|
|
421
|
-
buildSubstitutionMap = substModule.buildSubstitutionMap;
|
|
422
|
-
substituteFile = substModule.substituteFile;
|
|
423
|
-
}
|
|
424
|
-
catch {
|
|
425
|
-
// substitute-placeholders not available (testing or minimal bundle)
|
|
426
|
-
// Fall back to identity substitution
|
|
427
|
-
}
|
|
428
|
-
let substitutionMap = null;
|
|
429
|
-
if (buildSubstitutionMap) {
|
|
430
|
-
try {
|
|
431
|
-
const configPath = path.join(projectRoot, ".forge", "config.json");
|
|
432
|
-
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
433
|
-
substitutionMap = buildSubstitutionMap(config);
|
|
434
|
-
}
|
|
435
|
-
catch {
|
|
436
|
-
// Config unreadable — proceed without substitution
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
// Process each entry in ascending semver order
|
|
440
|
-
for (const { key, entry } of entries) {
|
|
441
|
-
// Skip if already applied (idempotency)
|
|
442
|
-
if (ledger.appliedVersions.includes(key)) {
|
|
443
|
-
continue;
|
|
444
|
-
}
|
|
445
|
-
// Skip breaking entries
|
|
446
|
-
if (entry.breaking) {
|
|
447
|
-
result.skippedBreaking.push({
|
|
448
|
-
fromVersion: key,
|
|
449
|
-
toVersion: entry.version,
|
|
450
|
-
reason: `breaking: true — manual intervention required. Notes: ${entry.notes}`,
|
|
451
|
-
});
|
|
452
|
-
continue;
|
|
453
|
-
}
|
|
454
|
-
// Collect manual steps
|
|
455
|
-
if (entry.manual && entry.manual.length > 0) {
|
|
456
|
-
result.manualSteps.push({
|
|
457
|
-
fromVersion: key,
|
|
458
|
-
toVersion: entry.version,
|
|
459
|
-
steps: entry.manual,
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
let appliedCategories = [];
|
|
463
|
-
// fileOps takes priority over regenerate when non-empty
|
|
464
|
-
// NOTE: 0 of 158 current entries use fileOps (dead code on day 1).
|
|
465
|
-
// When a real fileOps entry lands, add an integration test against it.
|
|
466
|
-
if (entry.fileOps && entry.fileOps.length > 0) {
|
|
467
|
-
// C-19: consume FileOpsResult to capture ENOENT failures
|
|
468
|
-
const fileOpsResult = executeFileOps(entry.fileOps, projectRoot, dryRun);
|
|
469
|
-
appliedCategories = fileOpsResult.categories;
|
|
470
|
-
for (const f of fileOpsResult.failed) {
|
|
471
|
-
result.failedCategories.push({ version: key, category: f.category, reason: f.reason });
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
else if (entry.regenerate && entry.regenerate.length > 0) {
|
|
475
|
-
// Resolve categories to write descriptors
|
|
476
|
-
const writes = [];
|
|
477
|
-
for (const category of entry.regenerate) {
|
|
478
|
-
resolveCategory(category, bundleRoot, projectRoot, writes);
|
|
479
|
-
}
|
|
480
|
-
// Execute writes (unless dry-run)
|
|
481
|
-
if (!dryRun) {
|
|
482
|
-
for (const { src, dest } of writes) {
|
|
483
|
-
try {
|
|
484
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
485
|
-
// Apply placeholder substitution for base-pack files
|
|
486
|
-
if (substituteFile &&
|
|
487
|
-
substitutionMap &&
|
|
488
|
-
src.includes(path.join(".base-pack")) &&
|
|
489
|
-
dest.endsWith(".md")) {
|
|
490
|
-
const content = fs.readFileSync(src, "utf8");
|
|
491
|
-
const substituted = substituteFile(content, substitutionMap);
|
|
492
|
-
fs.writeFileSync(dest, substituted, "utf8");
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
fs.copyFileSync(src, dest);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
catch (err) {
|
|
499
|
-
if (err.code !== "ENOENT")
|
|
500
|
-
throw err;
|
|
501
|
-
// C-19: ENOENT on src — skip silently but record the failure so
|
|
502
|
-
// the caller (forge-update-command.ts) can surface a warning.
|
|
503
|
-
result.failedCategories.push({
|
|
504
|
-
version: key,
|
|
505
|
-
category: src,
|
|
506
|
-
reason: `ENOENT: ${src}`,
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
appliedCategories = entry.regenerate;
|
|
512
|
-
}
|
|
513
|
-
result.applied.push({
|
|
514
|
-
fromVersion: key,
|
|
515
|
-
toVersion: entry.version,
|
|
516
|
-
categories: appliedCategories,
|
|
517
|
-
});
|
|
518
|
-
// Update ledger after successful application
|
|
519
|
-
if (!dryRun) {
|
|
520
|
-
ledger.appliedVersions.push(key);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
// Write updated ledger
|
|
524
|
-
if (!dryRun && result.applied.length > 0) {
|
|
525
|
-
writeLedger(projectRoot, ledger);
|
|
526
|
-
}
|
|
527
|
-
// Always-on schema refresh post-pass: copy all *.schema.json to .forge/schemas/
|
|
528
|
-
// Runs regardless of whether any entry had a schemas category.
|
|
529
|
-
// This is an always-overwrite safety net (schemas are not user-edited).
|
|
530
|
-
const schemasDir = path.join(bundleRoot, ".schemas");
|
|
531
|
-
const forgeSchemasDir = path.join(projectRoot, ".forge", "schemas");
|
|
532
|
-
try {
|
|
533
|
-
const schemaFiles = fs.readdirSync(schemasDir).filter((f) => f.endsWith(".schema.json"));
|
|
534
|
-
if (!dryRun) {
|
|
535
|
-
fs.mkdirSync(forgeSchemasDir, { recursive: true });
|
|
536
|
-
for (const f of schemaFiles) {
|
|
537
|
-
try {
|
|
538
|
-
fs.copyFileSync(path.join(schemasDir, f), path.join(forgeSchemasDir, f));
|
|
539
|
-
result.schemasRefreshed.push(f);
|
|
540
|
-
}
|
|
541
|
-
catch (err) {
|
|
542
|
-
if (err.code !== "ENOENT")
|
|
543
|
-
throw err;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
result.schemasRefreshed = schemaFiles;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
catch (err) {
|
|
552
|
-
if (err.code !== "ENOENT")
|
|
553
|
-
throw err;
|
|
554
|
-
}
|
|
555
|
-
return result;
|
|
556
|
-
}
|
|
557
|
-
// ── Test helpers (exported for test access) ───────────────────────────────────
|
|
558
|
-
export const __test__ = {
|
|
559
|
-
semverCompare,
|
|
560
|
-
filterMigrationEntries,
|
|
561
|
-
resolveCategory,
|
|
562
|
-
};
|
|
563
|
-
//# sourceMappingURL=migration-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-engine.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/migration-engine.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,gFAAgF;AAChF,yEAAyE;AACzE,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,2EAA2E;AAC3E,8DAA8D;AAC9D,EAAE;AACF,yEAAyE;AAEzE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,IAAI,M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AAE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;oBACzE,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACjC,CAAC;gBAAC,OAAO,GAAY,EAAE,CAAC;oBACvB,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;wBAAE,MAAM,GAAG,CAAC;gBACjE,CAAC;YACF,CAAC;QACF,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,gBAAgB,GAAG,WAAW,CAAC;QACvC,CAAC;IACF,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACvB,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,GAAG,CAAC;IACjE,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,iFAAiF;AAEjF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB,aAAa;IACb,sBAAsB;IACtB,eAAe;CACf,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { type Static, Type } from "typebox";
|
|
2
|
-
declare const ProviderSchema: Type.TObject<{
|
|
3
|
-
id: Type.TString;
|
|
4
|
-
label: Type.TString;
|
|
5
|
-
enabled: Type.TBoolean;
|
|
6
|
-
deferredTo: Type.TOptional<Type.TString>;
|
|
7
|
-
modelGlobs: Type.TArray<Type.TString>;
|
|
8
|
-
credentialEnvAny: Type.TArray<Type.TString>;
|
|
9
|
-
}>;
|
|
10
|
-
declare const RegistrySchema: Type.TObject<{
|
|
11
|
-
version: Type.TLiteral<1>;
|
|
12
|
-
providers: Type.TArray<Type.TObject<{
|
|
13
|
-
id: Type.TString;
|
|
14
|
-
label: Type.TString;
|
|
15
|
-
enabled: Type.TBoolean;
|
|
16
|
-
deferredTo: Type.TOptional<Type.TString>;
|
|
17
|
-
modelGlobs: Type.TArray<Type.TString>;
|
|
18
|
-
credentialEnvAny: Type.TArray<Type.TString>;
|
|
19
|
-
}>>;
|
|
20
|
-
}>;
|
|
21
|
-
export type CuratedRegistry = Static<typeof RegistrySchema>;
|
|
22
|
-
export type CuratedProvider = Static<typeof ProviderSchema>;
|
|
23
|
-
export interface LoadOptions {
|
|
24
|
-
registryPath?: string;
|
|
25
|
-
env?: NodeJS.ProcessEnv;
|
|
26
|
-
}
|
|
27
|
-
export interface SeedOutcome {
|
|
28
|
-
seeded: boolean;
|
|
29
|
-
path: string;
|
|
30
|
-
}
|
|
31
|
-
export interface SeedOptions {
|
|
32
|
-
projectRoot: string;
|
|
33
|
-
registry: CuratedRegistry;
|
|
34
|
-
now?: () => number;
|
|
35
|
-
}
|
|
36
|
-
declare function resolveRegistryPath(opts: LoadOptions): string;
|
|
37
|
-
export declare function loadRegistry(opts?: LoadOptions): CuratedRegistry;
|
|
38
|
-
declare function seededModelGlobs(registry: CuratedRegistry): string[];
|
|
39
|
-
declare function defaultGlob(registry: CuratedRegistry): string;
|
|
40
|
-
declare function seedFilePath(projectRoot: string): string;
|
|
41
|
-
export declare function seedEnabledModels(opts: SeedOptions): Promise<SeedOutcome>;
|
|
42
|
-
export declare function detectMissingCredentials(registry: CuratedRegistry, env?: NodeJS.ProcessEnv): string | null;
|
|
43
|
-
export declare const __test__: {
|
|
44
|
-
BUNDLED_PATH: string;
|
|
45
|
-
resolveRegistryPath: typeof resolveRegistryPath;
|
|
46
|
-
seedFilePath: typeof seedFilePath;
|
|
47
|
-
seededModelGlobs: typeof seededModelGlobs;
|
|
48
|
-
defaultGlob: typeof defaultGlob;
|
|
49
|
-
RegistrySchema: Type.TObject<{
|
|
50
|
-
version: Type.TLiteral<1>;
|
|
51
|
-
providers: Type.TArray<Type.TObject<{
|
|
52
|
-
id: Type.TString;
|
|
53
|
-
label: Type.TString;
|
|
54
|
-
enabled: Type.TBoolean;
|
|
55
|
-
deferredTo: Type.TOptional<Type.TString>;
|
|
56
|
-
modelGlobs: Type.TArray<Type.TString>;
|
|
57
|
-
credentialEnvAny: Type.TArray<Type.TString>;
|
|
58
|
-
}>>;
|
|
59
|
-
}>;
|
|
60
|
-
};
|
|
61
|
-
export {};
|