@entelligentsia/forgecli 0.7.10 → 0.9.0
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 +127 -0
- package/dist/CHANGELOG-forge-plugin.md +70 -0
- package/dist/CHANGELOG-pi.md +63 -0
- package/dist/bin/argv.d.ts +2 -2
- package/dist/bin/argv.js +27 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/config.d.ts +69 -0
- package/dist/bin/config.js +315 -0
- package/dist/bin/config.js.map +1 -0
- package/dist/bin/doctor.d.ts +1 -0
- package/dist/bin/doctor.js +12 -0
- package/dist/bin/doctor.js.map +1 -1
- package/dist/bin/env-defaults.d.ts +1 -0
- package/dist/bin/env-defaults.js +13 -0
- package/dist/bin/env-defaults.js.map +1 -0
- package/dist/bin/forge.js +16 -0
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/update-cli.d.ts +9 -0
- package/dist/bin/update-cli.js +120 -0
- package/dist/bin/update-cli.js.map +1 -0
- package/dist/extensions/forgecli/config-command.d.ts +8 -0
- package/dist/extensions/forgecli/config-command.js +66 -0
- package/dist/extensions/forgecli/config-command.js.map +1 -0
- package/dist/extensions/forgecli/config-layer.d.ts +38 -0
- package/dist/extensions/forgecli/config-layer.js +68 -0
- package/dist/extensions/forgecli/config-layer.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/component.d.ts +35 -0
- package/dist/extensions/forgecli/config-tui/component.js +236 -0
- package/dist/extensions/forgecli/config-tui/component.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/handler.d.ts +40 -0
- package/dist/extensions/forgecli/config-tui/handler.js +240 -0
- package/dist/extensions/forgecli/config-tui/handler.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/index.d.ts +5 -0
- package/dist/extensions/forgecli/config-tui/index.js +5 -0
- package/dist/extensions/forgecli/config-tui/index.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/keys.d.ts +26 -0
- package/dist/extensions/forgecli/config-tui/keys.js +33 -0
- package/dist/extensions/forgecli/config-tui/keys.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/plugin-config-reader.d.ts +23 -0
- package/dist/extensions/forgecli/config-tui/plugin-config-reader.js +58 -0
- package/dist/extensions/forgecli/config-tui/plugin-config-reader.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/advanced-menu.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/advanced-menu.js +83 -0
- package/dist/extensions/forgecli/config-tui/screens/advanced-menu.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/confirm-quit.d.ts +11 -0
- package/dist/extensions/forgecli/config-tui/screens/confirm-quit.js +54 -0
- package/dist/extensions/forgecli/config-tui/screens/confirm-quit.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/override-editor.d.ts +11 -0
- package/dist/extensions/forgecli/config-tui/screens/override-editor.js +233 -0
- package/dist/extensions/forgecli/config-tui/screens/override-editor.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list-phases.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list-phases.js +91 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list-phases.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list.js +71 -0
- package/dist/extensions/forgecli/config-tui/screens/overrides-list.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-editor.d.ts +10 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-editor.js +182 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-editor.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-picker.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-picker.js +76 -0
- package/dist/extensions/forgecli/config-tui/screens/persona-picker.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/personas-list.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/personas-list.js +98 -0
- package/dist/extensions/forgecli/config-tui/screens/personas-list.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/shared.d.ts +29 -0
- package/dist/extensions/forgecli/config-tui/screens/shared.js +100 -0
- package/dist/extensions/forgecli/config-tui/screens/shared.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/show-resolved.d.ts +23 -0
- package/dist/extensions/forgecli/config-tui/screens/show-resolved.js +128 -0
- package/dist/extensions/forgecli/config-tui/screens/show-resolved.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-menu.d.ts +7 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-menu.js +135 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-menu.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-picker.d.ts +9 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-picker.js +122 -0
- package/dist/extensions/forgecli/config-tui/screens/tier-picker.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens/types.d.ts +24 -0
- package/dist/extensions/forgecli/config-tui/screens/types.js +5 -0
- package/dist/extensions/forgecli/config-tui/screens/types.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/screens.d.ts +24 -0
- package/dist/extensions/forgecli/config-tui/screens.js +78 -0
- package/dist/extensions/forgecli/config-tui/screens.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/buffer.d.ts +11 -0
- package/dist/extensions/forgecli/config-tui/state/buffer.js +91 -0
- package/dist/extensions/forgecli/config-tui/state/buffer.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/constants.d.ts +4 -0
- package/dist/extensions/forgecli/config-tui/state/constants.js +14 -0
- package/dist/extensions/forgecli/config-tui/state/constants.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/index.d.ts +6 -0
- package/dist/extensions/forgecli/config-tui/state/index.js +9 -0
- package/dist/extensions/forgecli/config-tui/state/index.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/init.d.ts +2 -0
- package/dist/extensions/forgecli/config-tui/state/init.js +30 -0
- package/dist/extensions/forgecli/config-tui/state/init.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/model.d.ts +192 -0
- package/dist/extensions/forgecli/config-tui/state/model.js +4 -0
- package/dist/extensions/forgecli/config-tui/state/model.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/reducer.d.ts +2 -0
- package/dist/extensions/forgecli/config-tui/state/reducer.js +212 -0
- package/dist/extensions/forgecli/config-tui/state/reducer.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state/selectors.d.ts +91 -0
- package/dist/extensions/forgecli/config-tui/state/selectors.js +231 -0
- package/dist/extensions/forgecli/config-tui/state/selectors.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/state.d.ts +6 -0
- package/dist/extensions/forgecli/config-tui/state.js +11 -0
- package/dist/extensions/forgecli/config-tui/state.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/theme.d.ts +37 -0
- package/dist/extensions/forgecli/config-tui/theme.js +88 -0
- package/dist/extensions/forgecli/config-tui/theme.js.map +1 -0
- package/dist/extensions/forgecli/config-tui/tier-meta.d.ts +28 -0
- package/dist/extensions/forgecli/config-tui/tier-meta.js +69 -0
- package/dist/extensions/forgecli/config-tui/tier-meta.js.map +1 -0
- package/dist/extensions/forgecli/config-writer.d.ts +16 -0
- package/dist/extensions/forgecli/config-writer.js +63 -0
- package/dist/extensions/forgecli/config-writer.js.map +1 -0
- package/dist/extensions/forgecli/fix-bug.js +85 -1
- package/dist/extensions/forgecli/fix-bug.js.map +1 -1
- package/dist/extensions/forgecli/forge-cli-schema.json +54 -0
- package/dist/extensions/forgecli/forge-commands.js +3 -8
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +13 -0
- package/dist/extensions/forgecli/forge-subagent.js +19 -0
- package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
- package/dist/extensions/forgecli/index.js +19 -3
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/input-router.d.ts +33 -0
- package/dist/extensions/forgecli/input-router.js +133 -0
- package/dist/extensions/forgecli/input-router.js.map +1 -0
- package/dist/extensions/forgecli/model-resolver.d.ts +32 -0
- package/dist/extensions/forgecli/model-resolver.js +65 -0
- package/dist/extensions/forgecli/model-resolver.js.map +1 -0
- package/dist/extensions/forgecli/model-validator.d.ts +29 -0
- package/dist/extensions/forgecli/model-validator.js +107 -0
- package/dist/extensions/forgecli/model-validator.js.map +1 -0
- package/dist/extensions/forgecli/run-sprint.js +59 -0
- package/dist/extensions/forgecli/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/run-task.js +93 -1
- package/dist/extensions/forgecli/run-task.js.map +1 -1
- package/dist/extensions/forgecli/thread-switcher.js +5 -2
- package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
- package/dist/extensions/forgecli/update-check.js +1 -1
- package/dist/extensions/forgecli/update-check.js.map +1 -1
- package/dist/extensions/forgecli/whats-new-widget.d.ts +5 -5
- package/dist/extensions/forgecli/whats-new-widget.js +16 -13
- package/dist/extensions/forgecli/whats-new-widget.js.map +1 -1
- package/dist/extensions/forgecli/whats-new.js +6 -5
- package/dist/extensions/forgecli/whats-new.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +27 -98
- 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 +62 -132
- 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 +25 -15
- 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.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +1 -0
- 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 +17 -1
- 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-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +8 -2
- 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.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +17 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/README.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js +6 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js.map +1 -1
- 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 +12 -3
- 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.d.ts +1 -0
- 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 +30 -15
- 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/compaction/compaction.d.ts +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +23 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +4 -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 +58 -38
- 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/slash-commands.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +0 -1
- 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/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.d.ts +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -1
- 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 +6 -2
- 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/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +3 -4
- 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.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +2 -2
- 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/child-process.d.ts +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +60 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -3
- 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/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/fetch/index.d.ts +7 -7
- package/node_modules/@protobufjs/fetch/index.js +4 -7
- package/node_modules/@protobufjs/fetch/package.json +7 -5
- package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
- package/node_modules/@protobufjs/fetch/tests/index.js +150 -8
- package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/inquire/index.d.ts +1 -0
- package/node_modules/@protobufjs/inquire/index.js +1 -0
- package/node_modules/@protobufjs/inquire/package.json +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +187 -153
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +14 -5
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +207 -173
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +6 -3
- package/node_modules/protobufjs/src/util/fs.js +11 -0
- package/node_modules/protobufjs/src/util/minimal.js +10 -2
- package/node_modules/protobufjs/src/util.js +1 -1
- package/node_modules/undici/README.md +14 -5
- package/node_modules/undici/docs/docs/api/Client.md +4 -2
- package/node_modules/undici/docs/docs/api/Dispatcher.md +62 -27
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +7 -5
- package/node_modules/undici/docs/docs/api/H2CClient.md +1 -1
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +14 -9
- package/node_modules/undici/docs/docs/api/RetryAgent.md +0 -1
- package/node_modules/undici/docs/docs/api/RetryHandler.md +12 -14
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +23 -0
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +231 -0
- package/node_modules/undici/index.js +4 -2
- package/node_modules/undici/lib/api/api-connect.js +13 -11
- package/node_modules/undici/lib/api/api-pipeline.js +26 -13
- package/node_modules/undici/lib/api/api-request.js +45 -21
- package/node_modules/undici/lib/api/api-stream.js +81 -20
- package/node_modules/undici/lib/api/api-upgrade.js +21 -11
- package/node_modules/undici/lib/api/readable.js +3 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +6 -4
- package/node_modules/undici/lib/core/connect.js +17 -1
- package/node_modules/undici/lib/core/constants.js +1 -24
- package/node_modules/undici/lib/core/errors.js +2 -2
- package/node_modules/undici/lib/core/request.js +115 -18
- package/node_modules/undici/lib/core/socks5-client.js +24 -9
- package/node_modules/undici/lib/core/socks5-utils.js +32 -23
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/core/util.js +70 -43
- package/node_modules/undici/lib/dispatcher/agent.js +47 -33
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +21 -26
- package/node_modules/undici/lib/dispatcher/client-h1.js +98 -39
- package/node_modules/undici/lib/dispatcher/client-h2.js +603 -272
- package/node_modules/undici/lib/dispatcher/client.js +12 -5
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +24 -5
- package/node_modules/undici/lib/dispatcher/dispatcher.js +0 -4
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +107 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +5 -5
- package/node_modules/undici/lib/dispatcher/pool-base.js +28 -10
- package/node_modules/undici/lib/dispatcher/pool.js +31 -6
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +38 -13
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +31 -9
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +95 -80
- package/node_modules/undici/lib/global.js +13 -1
- package/node_modules/undici/lib/handler/cache-handler.js +16 -8
- package/node_modules/undici/lib/handler/decorator-handler.js +1 -2
- package/node_modules/undici/lib/handler/redirect-handler.js +5 -51
- package/node_modules/undici/lib/handler/retry-handler.js +15 -2
- package/node_modules/undici/lib/interceptor/cache.js +30 -17
- package/node_modules/undici/lib/interceptor/decompress.js +28 -2
- package/node_modules/undici/lib/interceptor/dns.js +1 -1
- package/node_modules/undici/lib/interceptor/redirect.js +3 -3
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -1
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -1
- package/node_modules/undici/lib/mock/mock-agent.js +8 -8
- package/node_modules/undici/lib/mock/mock-call-history.js +15 -15
- package/node_modules/undici/lib/mock/mock-utils.js +37 -22
- package/node_modules/undici/lib/mock/snapshot-agent.js +16 -6
- package/node_modules/undici/lib/mock/snapshot-recorder.js +38 -3
- package/node_modules/undici/lib/util/cache.js +8 -7
- package/node_modules/undici/lib/util/runtime-features.js +3 -34
- package/node_modules/undici/lib/web/cache/cache.js +6 -8
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/fetch/body.js +3 -9
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +17 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +21 -2
- package/node_modules/undici/lib/web/fetch/index.js +214 -221
- package/node_modules/undici/lib/web/webidl/index.js +7 -9
- package/node_modules/undici/lib/web/websocket/frame.js +1 -7
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
- package/node_modules/undici/lib/web/websocket/receiver.js +62 -22
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +11 -17
- package/node_modules/undici/lib/web/websocket/websocket.js +6 -1
- package/node_modules/undici/package.json +9 -9
- package/node_modules/undici/types/agent.d.ts +0 -2
- package/node_modules/undici/types/client.d.ts +25 -19
- package/node_modules/undici/types/dispatcher.d.ts +7 -27
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici/types/formdata.d.ts +0 -6
- package/node_modules/undici/types/h2c-client.d.ts +6 -6
- package/node_modules/undici/types/header.d.ts +5 -0
- package/node_modules/undici/types/index.d.ts +3 -1
- package/node_modules/undici/types/interceptors.d.ts +1 -1
- package/node_modules/undici/types/pool.d.ts +0 -2
- package/node_modules/undici/types/proxy-agent.d.ts +2 -2
- package/node_modules/undici/types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici/types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici/types/webidl.d.ts +0 -1
- package/package.json +16 -9
- package/dist/extensions/forgecli/review-command.d.ts +0 -2
- package/dist/extensions/forgecli/review-command.js +0 -184
- package/dist/extensions/forgecli/review-command.js.map +0 -1
- package/dist/forge-payload/.tools/banners.cjs +0 -435
- package/dist/forge-payload/.tools/build-context-pack.cjs +0 -290
- package/dist/forge-payload/.tools/build-init-context.cjs +0 -322
- package/dist/forge-payload/.tools/build-overlay.cjs +0 -326
- package/dist/forge-payload/.tools/build-persona-pack.cjs +0 -226
- package/dist/forge-payload/.tools/collate.cjs +0 -1041
- package/dist/forge-payload/.tools/generation-manifest.cjs +0 -311
- package/dist/forge-payload/.tools/lib/forge-root.cjs +0 -59
- package/dist/forge-payload/.tools/lib/paths.cjs +0 -29
- package/dist/forge-payload/.tools/lib/pricing.cjs +0 -165
- package/dist/forge-payload/.tools/lib/project-root.cjs +0 -32
- package/dist/forge-payload/.tools/lib/result.js +0 -40
- package/dist/forge-payload/.tools/lib/store-facade.cjs +0 -162
- package/dist/forge-payload/.tools/lib/store-nlp.cjs +0 -250
- package/dist/forge-payload/.tools/lib/store-query-exec.cjs +0 -272
- package/dist/forge-payload/.tools/lib/validate.js +0 -141
- package/dist/forge-payload/.tools/manage-config.cjs +0 -340
- package/dist/forge-payload/.tools/manage-versions.cjs +0 -365
- package/dist/forge-payload/.tools/package.json +0 -3
- package/dist/forge-payload/.tools/parse-gates.cjs +0 -151
- package/dist/forge-payload/.tools/parse-verdict.cjs +0 -67
- package/dist/forge-payload/.tools/preflight-gate.cjs +0 -350
- package/dist/forge-payload/.tools/prompts/sprint-plan-prompt.md +0 -70
- package/dist/forge-payload/.tools/schemas/task-list.schema.json +0 -53
- package/dist/forge-payload/.tools/seed-store.cjs +0 -237
- package/dist/forge-payload/.tools/store-cli.cjs +0 -1226
- package/dist/forge-payload/.tools/store-query.cjs +0 -319
- package/dist/forge-payload/.tools/store.cjs +0 -315
- package/dist/forge-payload/.tools/substitute-placeholders.cjs +0 -625
- package/dist/forge-payload/.tools/validate-store.cjs +0 -593
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +0 -92
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +0 -31
- package/node_modules/undici/lib/handler/unwrap-handler.js +0 -100
- package/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/util/promise.js +0 -28
- package/skills/refresh-kb-links/SKILL.md +0 -217
- package/skills/store-custodian/SKILL.md +0 -163
- package/skills/store-query-grammar/SKILL.md +0 -145
- package/skills/store-query-nlp/SKILL.md +0 -110
package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.4.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.4.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"node_modules/@anthropic-ai/sandbox-runtime": {
|
|
15
|
-
"version": "0.0.26",
|
|
16
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.26.tgz",
|
|
17
|
-
"integrity": "sha512-DYV5LSsVMnzq0lbfaYMSpxZPUMAx4+hy343dRss+pVCLIfF62qOhxpYfZ5TmOk1GTDQm5f9wPprMNSStmnsV4w==",
|
|
18
|
-
"license": "Apache-2.0",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@pondwader/socks5-server": "^1.0.10",
|
|
21
|
-
"@types/lodash-es": "^4.17.12",
|
|
22
|
-
"commander": "^12.1.0",
|
|
23
|
-
"lodash-es": "^4.17.21",
|
|
24
|
-
"shell-quote": "^1.8.3",
|
|
25
|
-
"zod": "^3.24.1"
|
|
26
|
-
},
|
|
27
|
-
"bin": {
|
|
28
|
-
"srt": "dist/cli.js"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=18.0.0"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"node_modules/@pondwader/socks5-server": {
|
|
35
|
-
"version": "1.0.10",
|
|
36
|
-
"resolved": "https://registry.npmjs.org/@pondwader/socks5-server/-/socks5-server-1.0.10.tgz",
|
|
37
|
-
"integrity": "sha512-bQY06wzzR8D2+vVCUoBsr5QS2U6UgPUQRmErNwtsuI6vLcyRKkafjkr3KxbtGFf9aBBIV2mcvlsKD1UYaIV+sg==",
|
|
38
|
-
"license": "MIT"
|
|
39
|
-
},
|
|
40
|
-
"node_modules/@types/lodash": {
|
|
41
|
-
"version": "4.17.23",
|
|
42
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz",
|
|
43
|
-
"integrity": "sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==",
|
|
44
|
-
"license": "MIT"
|
|
45
|
-
},
|
|
46
|
-
"node_modules/@types/lodash-es": {
|
|
47
|
-
"version": "4.17.12",
|
|
48
|
-
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
|
49
|
-
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@types/lodash": "*"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"node_modules/commander": {
|
|
56
|
-
"version": "12.1.0",
|
|
57
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
|
|
58
|
-
"integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
|
|
59
|
-
"license": "MIT",
|
|
60
|
-
"engines": {
|
|
61
|
-
"node": ">=18"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"node_modules/lodash-es": {
|
|
65
|
-
"version": "4.18.1",
|
|
66
|
-
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
|
|
67
|
-
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
|
|
68
|
-
"license": "MIT"
|
|
69
|
-
},
|
|
70
|
-
"node_modules/shell-quote": {
|
|
71
|
-
"version": "1.8.3",
|
|
72
|
-
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
|
|
73
|
-
"integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
|
|
74
|
-
"license": "MIT",
|
|
75
|
-
"engines": {
|
|
76
|
-
"node": ">= 0.4"
|
|
77
|
-
},
|
|
78
|
-
"funding": {
|
|
79
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"node_modules/zod": {
|
|
83
|
-
"version": "3.25.76",
|
|
84
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
|
85
|
-
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
|
86
|
-
"license": "MIT",
|
|
87
|
-
"funding": {
|
|
88
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.74.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.74.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"ms": "^2.1.3"
|
|
12
|
-
},
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@types/ms": "^2.1.0"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"node_modules/@types/ms": {
|
|
18
|
-
"version": "2.1.0",
|
|
19
|
-
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
|
20
|
-
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
|
21
|
-
"dev": true,
|
|
22
|
-
"license": "MIT"
|
|
23
|
-
},
|
|
24
|
-
"node_modules/ms": {
|
|
25
|
-
"version": "2.1.3",
|
|
26
|
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
27
|
-
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
|
28
|
-
"license": "MIT"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { parseHeaders } = require('../core/util')
|
|
4
|
-
const { InvalidArgumentError } = require('../core/errors')
|
|
5
|
-
|
|
6
|
-
const kResume = Symbol('resume')
|
|
7
|
-
|
|
8
|
-
class UnwrapController {
|
|
9
|
-
#paused = false
|
|
10
|
-
#reason = null
|
|
11
|
-
#aborted = false
|
|
12
|
-
#abort
|
|
13
|
-
|
|
14
|
-
[kResume] = null
|
|
15
|
-
|
|
16
|
-
constructor (abort) {
|
|
17
|
-
this.#abort = abort
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
pause () {
|
|
21
|
-
this.#paused = true
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
resume () {
|
|
25
|
-
if (this.#paused) {
|
|
26
|
-
this.#paused = false
|
|
27
|
-
this[kResume]?.()
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
abort (reason) {
|
|
32
|
-
if (!this.#aborted) {
|
|
33
|
-
this.#aborted = true
|
|
34
|
-
this.#reason = reason
|
|
35
|
-
this.#abort(reason)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
get aborted () {
|
|
40
|
-
return this.#aborted
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get reason () {
|
|
44
|
-
return this.#reason
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get paused () {
|
|
48
|
-
return this.#paused
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
module.exports = class UnwrapHandler {
|
|
53
|
-
#handler
|
|
54
|
-
#controller
|
|
55
|
-
|
|
56
|
-
constructor (handler) {
|
|
57
|
-
this.#handler = handler
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
static unwrap (handler) {
|
|
61
|
-
// TODO (fix): More checks...
|
|
62
|
-
return !handler.onRequestStart ? handler : new UnwrapHandler(handler)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
onConnect (abort, context) {
|
|
66
|
-
this.#controller = new UnwrapController(abort)
|
|
67
|
-
this.#handler.onRequestStart?.(this.#controller, context)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
onResponseStarted () {
|
|
71
|
-
return this.#handler.onResponseStarted?.()
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
onUpgrade (statusCode, rawHeaders, socket) {
|
|
75
|
-
this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
79
|
-
this.#controller[kResume] = resume
|
|
80
|
-
this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)
|
|
81
|
-
return !this.#controller.paused
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
onData (data) {
|
|
85
|
-
this.#handler.onResponseData?.(this.#controller, data)
|
|
86
|
-
return !this.#controller.paused
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
onComplete (rawTrailers) {
|
|
90
|
-
this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
onError (err) {
|
|
94
|
-
if (!this.#handler.onResponseError) {
|
|
95
|
-
throw new InvalidArgumentError('invalid onError method')
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
this.#handler.onResponseError?.(this.#controller, err)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { InvalidArgumentError } = require('../core/errors')
|
|
4
|
-
|
|
5
|
-
module.exports = class WrapHandler {
|
|
6
|
-
#handler
|
|
7
|
-
|
|
8
|
-
constructor (handler) {
|
|
9
|
-
this.#handler = handler
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static wrap (handler) {
|
|
13
|
-
// TODO (fix): More checks...
|
|
14
|
-
return handler.onRequestStart ? handler : new WrapHandler(handler)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Unwrap Interface
|
|
18
|
-
|
|
19
|
-
onConnect (abort, context) {
|
|
20
|
-
return this.#handler.onConnect?.(abort, context)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
onResponseStarted () {
|
|
24
|
-
return this.#handler.onResponseStarted?.()
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
28
|
-
return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
onUpgrade (statusCode, rawHeaders, socket) {
|
|
32
|
-
return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
onData (data) {
|
|
36
|
-
return this.#handler.onData?.(data)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onComplete (trailers) {
|
|
40
|
-
return this.#handler.onComplete?.(trailers)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
onError (err) {
|
|
44
|
-
if (!this.#handler.onError) {
|
|
45
|
-
throw err
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return this.#handler.onError?.(err)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Wrap Interface
|
|
52
|
-
|
|
53
|
-
onRequestStart (controller, context) {
|
|
54
|
-
this.#handler.onConnect?.((reason) => controller.abort(reason), context)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
onRequestUpgrade (controller, statusCode, headers, socket) {
|
|
58
|
-
const rawHeaders = []
|
|
59
|
-
for (const [key, val] of Object.entries(headers)) {
|
|
60
|
-
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
onResponseStart (controller, statusCode, headers, statusMessage) {
|
|
67
|
-
const rawHeaders = []
|
|
68
|
-
for (const [key, val] of Object.entries(headers)) {
|
|
69
|
-
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {
|
|
73
|
-
controller.pause()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
onResponseData (controller, data) {
|
|
78
|
-
if (this.#handler.onData?.(data) === false) {
|
|
79
|
-
controller.pause()
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onResponseEnd (controller, trailers) {
|
|
84
|
-
const rawTrailers = []
|
|
85
|
-
for (const [key, val] of Object.entries(trailers)) {
|
|
86
|
-
rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this.#handler.onComplete?.(rawTrailers)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
onResponseError (controller, err) {
|
|
93
|
-
if (!this.#handler.onError) {
|
|
94
|
-
throw new InvalidArgumentError('invalid onError method')
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
this.#handler.onError?.(err)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function toRawHeaderValue (value) {
|
|
102
|
-
return Array.isArray(value)
|
|
103
|
-
? value.map((item) => Buffer.from(item, 'latin1'))
|
|
104
|
-
: Buffer.from(value, 'latin1')
|
|
105
|
-
}
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @template {*} T
|
|
5
|
-
* @typedef {Object} DeferredPromise
|
|
6
|
-
* @property {Promise<T>} promise
|
|
7
|
-
* @property {(value?: T) => void} resolve
|
|
8
|
-
* @property {(reason?: any) => void} reject
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @template {*} T
|
|
13
|
-
* @returns {DeferredPromise<T>} An object containing a promise and its resolve/reject methods.
|
|
14
|
-
*/
|
|
15
|
-
function createDeferredPromise () {
|
|
16
|
-
let res
|
|
17
|
-
let rej
|
|
18
|
-
const promise = new Promise((resolve, reject) => {
|
|
19
|
-
res = resolve
|
|
20
|
-
rej = reject
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
return { promise, resolve: res, reject: rej }
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
createDeferredPromise
|
|
28
|
-
}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refresh-kb-links
|
|
3
|
-
description: Refresh Forge KB and workflow links in agent instruction files (CLAUDE.md, AGENTS.md, etc.)
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# forge:refresh-kb-links
|
|
7
|
-
|
|
8
|
-
Scan every coding-agent instruction file in the project and ensure each has
|
|
9
|
-
up-to-date links to the Forge knowledge base and generated workflow entry points.
|
|
10
|
-
This skill is invoked by `/forge:refresh-kb-links` or conversationally via `/forge:ask`.
|
|
11
|
-
|
|
12
|
-
## Setup
|
|
13
|
-
|
|
14
|
-
Read the Forge config to determine the KB root path:
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
KB_PATH: !`node -e "try{console.log(require('./.forge/config.json').paths.engineering)}catch{console.log('engineering')}"`
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Known Agent Instruction Files
|
|
21
|
-
|
|
22
|
-
Detect which of these files exist in the project root:
|
|
23
|
-
|
|
24
|
-
| File | Coding tool |
|
|
25
|
-
|------|------------|
|
|
26
|
-
| `CLAUDE.md` | Claude Code |
|
|
27
|
-
| `AGENTS.md` | OpenAI Codex / generic |
|
|
28
|
-
| `AGENT.md` | generic |
|
|
29
|
-
| `.github/copilot-instructions.md` | GitHub Copilot |
|
|
30
|
-
| `.cursorrules` | Cursor (legacy) |
|
|
31
|
-
| `.cursor/rules/*.mdc` | Cursor (current) |
|
|
32
|
-
| `GEMINI.md` | Google Gemini |
|
|
33
|
-
|
|
34
|
-
For each file found, check whether it already contains managed Forge sections.
|
|
35
|
-
|
|
36
|
-
## Managed Section Markers
|
|
37
|
-
|
|
38
|
-
Each file may have two independent managed sections:
|
|
39
|
-
|
|
40
|
-
### KB links section
|
|
41
|
-
|
|
42
|
-
Open marker (prefix match — tolerates minor text variations):
|
|
43
|
-
```
|
|
44
|
-
<!-- forge-kb-links
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Close marker (exact):
|
|
48
|
-
```
|
|
49
|
-
<!-- /forge-kb-links -->
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Workflow links section
|
|
53
|
-
|
|
54
|
-
Open marker (prefix match):
|
|
55
|
-
```
|
|
56
|
-
<!-- forge-workflow-links
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Close marker (exact):
|
|
60
|
-
```
|
|
61
|
-
<!-- /forge-workflow-links -->
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Content Rules
|
|
65
|
-
|
|
66
|
-
### KB section content
|
|
67
|
-
|
|
68
|
-
Only include rows for files that actually exist on disk:
|
|
69
|
-
|
|
70
|
-
- `{KB_PATH}/MASTER_INDEX.md` → "All sprints, tasks, bugs, and features"
|
|
71
|
-
- `{KB_PATH}/architecture/INDEX.md` → "Stack, processes, database, routing, deployment"
|
|
72
|
-
- `{KB_PATH}/business-domain/INDEX.md` → "Entity model and domain concepts"
|
|
73
|
-
|
|
74
|
-
```markdown
|
|
75
|
-
<!-- forge-kb-links: managed by Forge — do not edit manually -->
|
|
76
|
-
## Forge Knowledge Base
|
|
77
|
-
|
|
78
|
-
| Index | Contents |
|
|
79
|
-
|-------|----------|
|
|
80
|
-
| [MASTER_INDEX]({KB_PATH}/MASTER_INDEX.md) | All sprints, tasks, bugs, and features |
|
|
81
|
-
| [Architecture]({KB_PATH}/architecture/INDEX.md) | Stack, processes, database, routing, deployment |
|
|
82
|
-
| [Business Domain]({KB_PATH}/business-domain/INDEX.md) | Entity model and domain concepts |
|
|
83
|
-
|
|
84
|
-
Personas live in `.forge/personas/`.
|
|
85
|
-
<!-- /forge-kb-links -->
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Workflow section content
|
|
89
|
-
|
|
90
|
-
Only include rows for workflow files that actually exist on disk. Check each:
|
|
91
|
-
|
|
92
|
-
- `.forge/workflows/plan_task.md` → "Research codebase → implementation plan"
|
|
93
|
-
- `.forge/workflows/implement_plan.md` → "Execute approved plan → code changes"
|
|
94
|
-
- `.forge/workflows/fix_bug.md` → "Triage → fix → verify"
|
|
95
|
-
- `.forge/workflows/orchestrate_task.md` → "Full task pipeline (plan → implement → review → commit)"
|
|
96
|
-
- `.forge/workflows/run_sprint.md` → "Full sprint orchestration"
|
|
97
|
-
- `.forge/workflows/architect_sprint_plan.md` → "Sprint planning and task decomposition"
|
|
98
|
-
- `.forge/workflows/architect_sprint_intake.md` → "Sprint intake and requirements elicitation"
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
<!-- forge-workflow-links: managed by Forge — do not edit manually -->
|
|
102
|
-
## Forge Workflows
|
|
103
|
-
|
|
104
|
-
| Workflow | Purpose |
|
|
105
|
-
|----------|---------|
|
|
106
|
-
| [Plan](.forge/workflows/plan_task.md) | Research codebase → implementation plan |
|
|
107
|
-
| [Implement](.forge/workflows/implement_plan.md) | Execute approved plan → code changes |
|
|
108
|
-
| [Fix bug](.forge/workflows/fix_bug.md) | Triage → fix → verify |
|
|
109
|
-
| [Run task](.forge/workflows/orchestrate_task.md) | Full task pipeline (plan → implement → review → commit) |
|
|
110
|
-
| [Run sprint](.forge/workflows/run_sprint.md) | Full sprint orchestration |
|
|
111
|
-
<!-- /forge-workflow-links -->
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
(Only include rows where the referenced `.forge/workflows/` file exists on disk.)
|
|
115
|
-
|
|
116
|
-
## KB Integrity Check
|
|
117
|
-
|
|
118
|
-
Before scanning agent instruction files, verify that the knowledge graph itself is complete.
|
|
119
|
-
The collate tool generates INDEX.md files at every node of the graph; if they are missing,
|
|
120
|
-
links in MASTER_INDEX.md are broken and agents navigate to dead ends.
|
|
121
|
-
|
|
122
|
-
Check the following, using `KB_PATH` as the root:
|
|
123
|
-
|
|
124
|
-
1. **Sprint INDEX files** — for every directory under `{KB_PATH}/sprints/`, check that
|
|
125
|
-
`{KB_PATH}/sprints/{sprint-dir}/INDEX.md` exists.
|
|
126
|
-
|
|
127
|
-
2. **Task INDEX files** — for every subdirectory under `{KB_PATH}/sprints/{sprint-dir}/`
|
|
128
|
-
that looks like a task folder (contains at least one `.md` file), check that its
|
|
129
|
-
`INDEX.md` exists.
|
|
130
|
-
|
|
131
|
-
3. **Bug INDEX files** — for every directory under `{KB_PATH}/bugs/`, check that
|
|
132
|
-
`{KB_PATH}/bugs/{bug-dir}/INDEX.md` exists.
|
|
133
|
-
|
|
134
|
-
If any INDEX files are missing, prepend this warning to the output (before the agent-file
|
|
135
|
-
approval prompt):
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
⚠️ KB knowledge graph has broken links — INDEX.md files are missing:
|
|
139
|
-
|
|
140
|
-
△ {KB_PATH}/sprints/PROJ-S01/INDEX.md — missing
|
|
141
|
-
△ {KB_PATH}/sprints/PROJ-S01/PROJ-S01-T01/INDEX.md — missing
|
|
142
|
-
△ {KB_PATH}/bugs/PROJ-B01-some-bug/INDEX.md — missing
|
|
143
|
-
|
|
144
|
-
Run collate to regenerate them:
|
|
145
|
-
node "$FORGE_ROOT/tools/collate.cjs"
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
If all INDEX files are present (or there are no sprint/task/bug folders yet), skip this
|
|
149
|
-
block entirely. Do not warn when the KB is intact.
|
|
150
|
-
|
|
151
|
-
## Staleness Check
|
|
152
|
-
|
|
153
|
-
For each detected agent instruction file, check both sections:
|
|
154
|
-
|
|
155
|
-
1. If the section marker is absent → section is **missing**
|
|
156
|
-
2. If the section markers are present → extract the current content between them.
|
|
157
|
-
Compare current content vs. the content you would write (with current KB_PATH
|
|
158
|
-
and only existing files). If they differ → section is **stale**. If identical → **current**.
|
|
159
|
-
|
|
160
|
-
## Approval Prompt
|
|
161
|
-
|
|
162
|
-
After scanning all files, present a single consolidated approval prompt:
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
🏮 forge:refresh-kb-links — KB & Workflow Visibility
|
|
166
|
-
|
|
167
|
-
Forge has generated a knowledge base and SDLC workflows for this project. Without links
|
|
168
|
-
to these in your agent instruction files, every new conversation starts blind — no KB
|
|
169
|
-
context, no workflow playbook.
|
|
170
|
-
|
|
171
|
-
Found agent instruction files:
|
|
172
|
-
〇 CLAUDE.md — no Forge KB links, no workflow links
|
|
173
|
-
〇 AGENTS.md — no Forge KB links, no workflow links
|
|
174
|
-
|
|
175
|
-
Add ## Forge Knowledge Base and ## Forge Workflows sections to each? [Y/n]
|
|
176
|
-
(or choose individually: [c])
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Adapt the status lines to reflect the actual state:
|
|
180
|
-
- `〇 {filename} — no Forge KB links, no workflow links` (both missing)
|
|
181
|
-
- `〇 {filename} — KB links stale` (KB section present but stale)
|
|
182
|
-
- `〇 {filename} — workflow links stale` (workflow section present but stale)
|
|
183
|
-
- `〇 {filename} — KB links stale, workflow links stale` (both stale)
|
|
184
|
-
- `〇 {filename} — links current, no changes needed` (both present and current — skip)
|
|
185
|
-
|
|
186
|
-
**If all detected files already have current links:** output:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
🏮 forge:refresh-kb-links — all KB and workflow links are current. No changes needed.
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
And return without prompting.
|
|
193
|
-
|
|
194
|
-
## Writing Sections
|
|
195
|
-
|
|
196
|
-
On approval ([Y] or per-file confirm):
|
|
197
|
-
|
|
198
|
-
- **Missing section:** append the section to the end of the file.
|
|
199
|
-
- **Stale section:** replace content between the open and close markers with fresh content.
|
|
200
|
-
Preserve everything outside the markers exactly.
|
|
201
|
-
|
|
202
|
-
Write the `{KB_PATH}` substitution with the actual resolved path value (not the literal
|
|
203
|
-
string `{KB_PATH}`). The resulting markdown should have real paths like `engineering/MASTER_INDEX.md`
|
|
204
|
-
or `ai-docs/MASTER_INDEX.md`.
|
|
205
|
-
|
|
206
|
-
## Idempotency
|
|
207
|
-
|
|
208
|
-
On a second run where all links are already current, output the "all links current" message
|
|
209
|
-
and return immediately. Do not re-write unchanged sections.
|
|
210
|
-
|
|
211
|
-
## Rename Instructions
|
|
212
|
-
|
|
213
|
-
If the user later renames the KB folder:
|
|
214
|
-
|
|
215
|
-
1. Rename the folder on disk.
|
|
216
|
-
2. Run: `node "$FORGE_ROOT/tools/manage-config.cjs" set paths.engineering <new-name>`
|
|
217
|
-
3. Re-run `forge:refresh-kb-links` to refresh the links in all agent instruction files.
|