@jadelclemens/pi-forge 0.0.0-stage → 0.6.1
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 +486 -0
- package/LICENSE +21 -0
- package/PUBLIC_API.md +5 -0
- package/README.md +204 -2
- package/README.zh-CN.md +128 -0
- package/SUBAGENT_ADAPTER_CONTRACT.md +7 -0
- package/dist/active-state.d.ts +148 -0
- package/dist/active-state.d.ts.map +1 -0
- package/dist/active-state.js +374 -0
- package/dist/active-state.js.map +1 -0
- package/dist/agent-profile.d.ts +51 -0
- package/dist/agent-profile.d.ts.map +1 -0
- package/dist/agent-profile.js +197 -0
- package/dist/agent-profile.js.map +1 -0
- package/dist/capabilities.d.ts +39 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +160 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/capability-anchors.d.ts +45 -0
- package/dist/capability-anchors.d.ts.map +1 -0
- package/dist/capability-anchors.js +263 -0
- package/dist/capability-anchors.js.map +1 -0
- package/dist/capability-command.d.ts +4 -0
- package/dist/capability-command.d.ts.map +1 -0
- package/dist/capability-command.js +164 -0
- package/dist/capability-command.js.map +1 -0
- package/dist/capability-events.d.ts +79 -0
- package/dist/capability-events.d.ts.map +1 -0
- package/dist/capability-events.js +478 -0
- package/dist/capability-events.js.map +1 -0
- package/dist/capability-projection.d.ts +22 -0
- package/dist/capability-projection.d.ts.map +1 -0
- package/dist/capability-projection.js +273 -0
- package/dist/capability-projection.js.map +1 -0
- package/dist/capability-protocol.d.ts +21 -0
- package/dist/capability-protocol.d.ts.map +1 -0
- package/dist/capability-protocol.js +15 -0
- package/dist/capability-protocol.js.map +1 -0
- package/dist/capability-state.d.ts +74 -0
- package/dist/capability-state.d.ts.map +1 -0
- package/dist/capability-state.js +43 -0
- package/dist/capability-state.js.map +1 -0
- package/dist/capability-tool.d.ts +11 -0
- package/dist/capability-tool.d.ts.map +1 -0
- package/dist/capability-tool.js +25 -0
- package/dist/capability-tool.js.map +1 -0
- package/dist/capability-web-host.d.ts +11 -0
- package/dist/capability-web-host.d.ts.map +1 -0
- package/dist/capability-web-host.js +105 -0
- package/dist/capability-web-host.js.map +1 -0
- package/dist/catalog.d.ts +27 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +59 -0
- package/dist/catalog.js.map +1 -0
- package/dist/codecs/agent-profile.d.ts +53 -0
- package/dist/codecs/agent-profile.d.ts.map +1 -0
- package/dist/codecs/agent-profile.js +176 -0
- package/dist/codecs/agent-profile.js.map +1 -0
- package/dist/codecs/capability.d.ts +71 -0
- package/dist/codecs/capability.d.ts.map +1 -0
- package/dist/codecs/capability.js +363 -0
- package/dist/codecs/capability.js.map +1 -0
- package/dist/codecs/index.d.ts +5 -0
- package/dist/codecs/index.d.ts.map +1 -0
- package/dist/codecs/index.js +3 -0
- package/dist/codecs/index.js.map +1 -0
- package/dist/codecs/prompt-stack.d.ts +18 -0
- package/dist/codecs/prompt-stack.d.ts.map +1 -0
- package/dist/codecs/prompt-stack.js +623 -0
- package/dist/codecs/prompt-stack.js.map +1 -0
- package/dist/command-contribution/index.d.ts +21 -0
- package/dist/command-contribution/index.d.ts.map +1 -0
- package/dist/command-contribution/index.js +14 -0
- package/dist/command-contribution/index.js.map +1 -0
- package/dist/compile-cycle.d.ts +26 -0
- package/dist/compile-cycle.d.ts.map +1 -0
- package/dist/compile-cycle.js +16 -0
- package/dist/compile-cycle.js.map +1 -0
- package/dist/compiler.d.ts +22 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +737 -0
- package/dist/compiler.js.map +1 -0
- package/dist/context-diff-history.d.ts +69 -0
- package/dist/context-diff-history.d.ts.map +1 -0
- package/dist/context-diff-history.js +107 -0
- package/dist/context-diff-history.js.map +1 -0
- package/dist/context-diff-snapshot.d.ts +19 -0
- package/dist/context-diff-snapshot.d.ts.map +1 -0
- package/dist/context-diff-snapshot.js +146 -0
- package/dist/context-diff-snapshot.js.map +1 -0
- package/dist/context-diff.d.ts +70 -0
- package/dist/context-diff.d.ts.map +1 -0
- package/dist/context-diff.js +259 -0
- package/dist/context-diff.js.map +1 -0
- package/dist/extension-registry.d.ts +25 -0
- package/dist/extension-registry.d.ts.map +1 -0
- package/dist/extension-registry.js +9 -0
- package/dist/extension-registry.js.map +1 -0
- package/dist/forge-command.d.ts +10 -0
- package/dist/forge-command.d.ts.map +1 -0
- package/dist/forge-command.js +106 -0
- package/dist/forge-command.js.map +1 -0
- package/dist/forge-config.d.ts +9 -0
- package/dist/forge-config.d.ts.map +1 -0
- package/dist/forge-config.js +15 -0
- package/dist/forge-config.js.map +1 -0
- package/dist/forge-extensions.d.ts +28 -0
- package/dist/forge-extensions.d.ts.map +1 -0
- package/dist/forge-extensions.js +198 -0
- package/dist/forge-extensions.js.map +1 -0
- package/dist/forge-v1/analyzer.d.ts +3 -0
- package/dist/forge-v1/analyzer.d.ts.map +1 -0
- package/dist/forge-v1/analyzer.js +50 -0
- package/dist/forge-v1/analyzer.js.map +1 -0
- package/dist/forge-v1/index.d.ts +6 -0
- package/dist/forge-v1/index.d.ts.map +1 -0
- package/dist/forge-v1/index.js +13 -0
- package/dist/forge-v1/index.js.map +1 -0
- package/dist/forge-v1/parser.d.ts +3 -0
- package/dist/forge-v1/parser.d.ts.map +1 -0
- package/dist/forge-v1/parser.js +186 -0
- package/dist/forge-v1/parser.js.map +1 -0
- package/dist/forge-v1/renderer.d.ts +9 -0
- package/dist/forge-v1/renderer.d.ts.map +1 -0
- package/dist/forge-v1/renderer.js +181 -0
- package/dist/forge-v1/renderer.js.map +1 -0
- package/dist/forge-v1/types.d.ts +87 -0
- package/dist/forge-v1/types.d.ts.map +1 -0
- package/dist/forge-v1/types.js +4 -0
- package/dist/forge-v1/types.js.map +1 -0
- package/dist/host-compatibility.d.ts +13 -0
- package/dist/host-compatibility.d.ts.map +1 -0
- package/dist/host-compatibility.js +41 -0
- package/dist/host-compatibility.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +183 -0
- package/dist/index.js.map +1 -0
- package/dist/json-fingerprint.d.ts +11 -0
- package/dist/json-fingerprint.d.ts.map +1 -0
- package/dist/json-fingerprint.js +66 -0
- package/dist/json-fingerprint.js.map +1 -0
- package/dist/lifecycle.d.ts +46 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +330 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/loader.d.ts +21 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +58 -0
- package/dist/loader.js.map +1 -0
- package/dist/macro-engine.d.ts +18 -0
- package/dist/macro-engine.d.ts.map +1 -0
- package/dist/macro-engine.js +29 -0
- package/dist/macro-engine.js.map +1 -0
- package/dist/payload-capture.d.ts +31 -0
- package/dist/payload-capture.d.ts.map +1 -0
- package/dist/payload-capture.js +253 -0
- package/dist/payload-capture.js.map +1 -0
- package/dist/payload-command.d.ts +12 -0
- package/dist/payload-command.d.ts.map +1 -0
- package/dist/payload-command.js +197 -0
- package/dist/payload-command.js.map +1 -0
- package/dist/payload-state.d.ts +20 -0
- package/dist/payload-state.d.ts.map +1 -0
- package/dist/payload-state.js +20 -0
- package/dist/payload-state.js.map +1 -0
- package/dist/policy.d.ts +7 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +41 -0
- package/dist/policy.js.map +1 -0
- package/dist/preset-command.d.ts +19 -0
- package/dist/preset-command.d.ts.map +1 -0
- package/dist/preset-command.js +261 -0
- package/dist/preset-command.js.map +1 -0
- package/dist/preview-inspection.d.ts +68 -0
- package/dist/preview-inspection.d.ts.map +1 -0
- package/dist/preview-inspection.js +293 -0
- package/dist/preview-inspection.js.map +1 -0
- package/dist/preview-text.d.ts +5 -0
- package/dist/preview-text.d.ts.map +1 -0
- package/dist/preview-text.js +27 -0
- package/dist/preview-text.js.map +1 -0
- package/dist/preview.d.ts +32 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +272 -0
- package/dist/preview.js.map +1 -0
- package/dist/profile-command.d.ts +17 -0
- package/dist/profile-command.d.ts.map +1 -0
- package/dist/profile-command.js +385 -0
- package/dist/profile-command.js.map +1 -0
- package/dist/profile-service.d.ts +107 -0
- package/dist/profile-service.d.ts.map +1 -0
- package/dist/profile-service.js +248 -0
- package/dist/profile-service.js.map +1 -0
- package/dist/prompt-analysis.d.ts +24 -0
- package/dist/prompt-analysis.d.ts.map +1 -0
- package/dist/prompt-analysis.js +84 -0
- package/dist/prompt-analysis.js.map +1 -0
- package/dist/prompt-cache-warning.d.ts +23 -0
- package/dist/prompt-cache-warning.d.ts.map +1 -0
- package/dist/prompt-cache-warning.js +74 -0
- package/dist/prompt-cache-warning.js.map +1 -0
- package/dist/prompt-runtime.d.ts +19 -0
- package/dist/prompt-runtime.d.ts.map +1 -0
- package/dist/prompt-runtime.js +34 -0
- package/dist/prompt-runtime.js.map +1 -0
- package/dist/regex.d.ts +19 -0
- package/dist/regex.d.ts.map +1 -0
- package/dist/regex.js +507 -0
- package/dist/regex.js.map +1 -0
- package/dist/render-helpers.d.ts +38 -0
- package/dist/render-helpers.d.ts.map +1 -0
- package/dist/render-helpers.js +85 -0
- package/dist/render-helpers.js.map +1 -0
- package/dist/repositories/agent-profile.d.ts +36 -0
- package/dist/repositories/agent-profile.d.ts.map +1 -0
- package/dist/repositories/agent-profile.js +153 -0
- package/dist/repositories/agent-profile.js.map +1 -0
- package/dist/repositories/capability.d.ts +53 -0
- package/dist/repositories/capability.d.ts.map +1 -0
- package/dist/repositories/capability.js +294 -0
- package/dist/repositories/capability.js.map +1 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +3 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/prompt-stack.d.ts +57 -0
- package/dist/repositories/prompt-stack.d.ts.map +1 -0
- package/dist/repositories/prompt-stack.js +175 -0
- package/dist/repositories/prompt-stack.js.map +1 -0
- package/dist/resource-identity.d.ts +33 -0
- package/dist/resource-identity.d.ts.map +1 -0
- package/dist/resource-identity.js +56 -0
- package/dist/resource-identity.js.map +1 -0
- package/dist/runtime/capability-runtime.d.ts +95 -0
- package/dist/runtime/capability-runtime.d.ts.map +1 -0
- package/dist/runtime/capability-runtime.js +991 -0
- package/dist/runtime/capability-runtime.js.map +1 -0
- package/dist/runtime/profile-runtime.d.ts +14 -0
- package/dist/runtime/profile-runtime.d.ts.map +1 -0
- package/dist/runtime/profile-runtime.js +56 -0
- package/dist/runtime/profile-runtime.js.map +1 -0
- package/dist/runtime/prompt-stack-runtime.d.ts +27 -0
- package/dist/runtime/prompt-stack-runtime.d.ts.map +1 -0
- package/dist/runtime/prompt-stack-runtime.js +149 -0
- package/dist/runtime/prompt-stack-runtime.js.map +1 -0
- package/dist/runtime/tool-policy-runtime.d.ts +25 -0
- package/dist/runtime/tool-policy-runtime.d.ts.map +1 -0
- package/dist/runtime/tool-policy-runtime.js +386 -0
- package/dist/runtime/tool-policy-runtime.js.map +1 -0
- package/dist/runtime/web-editor-runtime.d.ts +11 -0
- package/dist/runtime/web-editor-runtime.d.ts.map +1 -0
- package/dist/runtime/web-editor-runtime.js +141 -0
- package/dist/runtime/web-editor-runtime.js.map +1 -0
- package/dist/session-adapter.d.ts +30 -0
- package/dist/session-adapter.d.ts.map +1 -0
- package/dist/session-adapter.js +167 -0
- package/dist/session-adapter.js.map +1 -0
- package/dist/session-state.d.ts +23 -0
- package/dist/session-state.d.ts.map +1 -0
- package/dist/session-state.js +44 -0
- package/dist/session-state.js.map +1 -0
- package/dist/session-usage.d.ts +65 -0
- package/dist/session-usage.d.ts.map +1 -0
- package/dist/session-usage.js +134 -0
- package/dist/session-usage.js.map +1 -0
- package/dist/slot-renderers.d.ts +38 -0
- package/dist/slot-renderers.d.ts.map +1 -0
- package/dist/slot-renderers.js +285 -0
- package/dist/slot-renderers.js.map +1 -0
- package/dist/stack-migration.d.ts +35 -0
- package/dist/stack-migration.d.ts.map +1 -0
- package/dist/stack-migration.js +123 -0
- package/dist/stack-migration.js.map +1 -0
- package/dist/status-text.d.ts +6 -0
- package/dist/status-text.d.ts.map +1 -0
- package/dist/status-text.js +11 -0
- package/dist/status-text.js.map +1 -0
- package/dist/storage.d.ts +24 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +94 -0
- package/dist/storage.js.map +1 -0
- package/dist/subagent/fingerprints.d.ts +12 -0
- package/dist/subagent/fingerprints.d.ts.map +1 -0
- package/dist/subagent/fingerprints.js +17 -0
- package/dist/subagent/fingerprints.js.map +1 -0
- package/dist/subagent/host-port.d.ts +296 -0
- package/dist/subagent/host-port.d.ts.map +1 -0
- package/dist/subagent/host-port.js +560 -0
- package/dist/subagent/host-port.js.map +1 -0
- package/dist/subagent/index.d.ts +16 -0
- package/dist/subagent/index.d.ts.map +1 -0
- package/dist/subagent/index.js +15 -0
- package/dist/subagent/index.js.map +1 -0
- package/dist/subagent-host.d.ts +125 -0
- package/dist/subagent-host.d.ts.map +1 -0
- package/dist/subagent-host.js +327 -0
- package/dist/subagent-host.js.map +1 -0
- package/dist/template-render.d.ts +18 -0
- package/dist/template-render.d.ts.map +1 -0
- package/dist/template-render.js +232 -0
- package/dist/template-render.js.map +1 -0
- package/dist/types.d.ts +213 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui-contribution/contrib-port.d.ts +170 -0
- package/dist/ui-contribution/contrib-port.d.ts.map +1 -0
- package/dist/ui-contribution/contrib-port.js +640 -0
- package/dist/ui-contribution/contrib-port.js.map +1 -0
- package/dist/ui-contribution/index.d.ts +3 -0
- package/dist/ui-contribution/index.d.ts.map +1 -0
- package/dist/ui-contribution/index.js +2 -0
- package/dist/ui-contribution/index.js.map +1 -0
- package/dist/web-editor/client-script.d.ts +2 -0
- package/dist/web-editor/client-script.d.ts.map +1 -0
- package/dist/web-editor/client-script.generated.d.ts +2 -0
- package/dist/web-editor/client-script.generated.d.ts.map +1 -0
- package/dist/web-editor/client-script.generated.js +3 -0
- package/dist/web-editor/client-script.generated.js.map +1 -0
- package/dist/web-editor/client-script.js +2 -0
- package/dist/web-editor/client-script.js.map +1 -0
- package/dist/web-editor/client-styles.d.ts +2 -0
- package/dist/web-editor/client-styles.d.ts.map +1 -0
- package/dist/web-editor/client-styles.generated.d.ts +2 -0
- package/dist/web-editor/client-styles.generated.d.ts.map +1 -0
- package/dist/web-editor/client-styles.generated.js +3 -0
- package/dist/web-editor/client-styles.generated.js.map +1 -0
- package/dist/web-editor/client-styles.js +2 -0
- package/dist/web-editor/client-styles.js.map +1 -0
- package/dist/web-editor/contrib-service.d.ts +41 -0
- package/dist/web-editor/contrib-service.d.ts.map +1 -0
- package/dist/web-editor/contrib-service.js +174 -0
- package/dist/web-editor/contrib-service.js.map +1 -0
- package/dist/web-editor/index.d.ts +3 -0
- package/dist/web-editor/index.d.ts.map +1 -0
- package/dist/web-editor/index.js +2 -0
- package/dist/web-editor/index.js.map +1 -0
- package/dist/web-editor/line-diff.d.ts +28 -0
- package/dist/web-editor/line-diff.d.ts.map +1 -0
- package/dist/web-editor/line-diff.js +216 -0
- package/dist/web-editor/line-diff.js.map +1 -0
- package/dist/web-editor/page.d.ts +4 -0
- package/dist/web-editor/page.d.ts.map +1 -0
- package/dist/web-editor/page.js +26 -0
- package/dist/web-editor/page.js.map +1 -0
- package/dist/web-editor/schema-form.d.ts +63 -0
- package/dist/web-editor/schema-form.d.ts.map +1 -0
- package/dist/web-editor/schema-form.js +213 -0
- package/dist/web-editor/schema-form.js.map +1 -0
- package/dist/web-editor/server.d.ts +4 -0
- package/dist/web-editor/server.d.ts.map +1 -0
- package/dist/web-editor/server.js +637 -0
- package/dist/web-editor/server.js.map +1 -0
- package/dist/web-editor/styles.d.ts +2 -0
- package/dist/web-editor/styles.d.ts.map +1 -0
- package/dist/web-editor/styles.js +1744 -0
- package/dist/web-editor/styles.js.map +1 -0
- package/dist/web-editor/types.d.ts +304 -0
- package/dist/web-editor/types.d.ts.map +1 -0
- package/dist/web-editor/types.js +2 -0
- package/dist/web-editor/types.js.map +1 -0
- package/dist/web-host.d.ts +56 -0
- package/dist/web-host.d.ts.map +1 -0
- package/dist/web-host.js +750 -0
- package/dist/web-host.js.map +1 -0
- package/dist/workspace.d.ts +85 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +409 -0
- package/dist/workspace.js.map +1 -0
- package/docs/README.md +49 -0
- package/docs/concepts/agent-profiles.md +62 -0
- package/docs/concepts/prompt-stacks.md +99 -0
- package/docs/design/0.5.1-plan.md +237 -0
- package/docs/design/README.md +37 -0
- package/docs/design/architecture-0.5.md +254 -0
- package/docs/design/archive/0.5-full-proposal/0.5-consumer-audit.md +62 -0
- package/docs/design/archive/0.5-full-proposal/0.5-inventory.md +208 -0
- package/docs/design/archive/0.5-full-proposal/0.5-phase0-decision-drafts.md +237 -0
- package/docs/design/archive/0.5-full-proposal/README.md +12 -0
- package/docs/design/archive/0.5-full-proposal/architecture-0.5.md +423 -0
- package/docs/design/archive/0.5-full-proposal/host-discovery-spike.md +103 -0
- package/docs/design/archive/0.5-full-proposal/template-language-spike.md +156 -0
- package/docs/design/archive/2026-09-12-system-update-design.md +229 -0
- package/docs/design/context-diff-plan.md +78 -0
- package/docs/design/decision-template.md +33 -0
- package/docs/design/pi-forge-system-update-design-notes.md +157 -0
- package/docs/design/roadmap-0.4-archive.md +216 -0
- package/docs/design/subagents/design-review.md +220 -0
- package/docs/design/subagents/interface-design.md +274 -0
- package/docs/design/subagents/sdk-spike-findings.md +117 -0
- package/docs/development/architecture-rules.md +148 -0
- package/docs/development/complexity-review.md +86 -0
- package/docs/development/release.md +59 -0
- package/docs/development/roadmap.md +117 -0
- package/docs/development/scoped-global-profiles-stacks.md +325 -0
- package/docs/development/setup.md +99 -0
- package/docs/getting-started.md +96 -0
- package/docs/guides/custom-macros-and-slots.md +69 -0
- package/docs/guides/debugging.md +39 -0
- package/docs/guides/delegation.md +105 -0
- package/docs/guides/migrating-to-0.5.md +136 -0
- package/docs/guides/pi-1-compatibility.md +160 -0
- package/docs/guides/use-cases.md +67 -0
- package/docs/guides/web-editor.md +161 -0
- package/docs/reference/active-state.md +77 -0
- package/docs/reference/capabilities.md +288 -0
- package/docs/reference/commands.md +89 -0
- package/docs/reference/configuration.md +70 -0
- package/docs/reference/features.md +305 -0
- package/docs/reference/macros-and-slots.md +103 -0
- package/docs/reference/provider-support.md +67 -0
- package/docs/reference/public-api.md +133 -0
- package/docs/reference/session-cache.md +112 -0
- package/docs/reference/stack-schema.md +243 -0
- package/docs/reference/subagent-host-port.md +57 -0
- package/docs/reference/ui-contribution-port.md +51 -0
- package/docs/zh-CN/README.md +41 -0
- package/docs/zh-CN/concepts/agent-profiles.md +48 -0
- package/docs/zh-CN/concepts/prompt-stacks.md +48 -0
- package/docs/zh-CN/getting-started.md +82 -0
- package/docs/zh-CN/guides/delegation.md +76 -0
- package/docs/zh-CN/guides/migrating-to-0.5.md +121 -0
- package/docs/zh-CN/guides/pi-1-compatibility.md +158 -0
- package/docs/zh-CN/guides/web-editor.md +134 -0
- package/docs/zh-CN/reference/capabilities.md +288 -0
- package/docs/zh-CN/reference/commands.md +89 -0
- package/docs/zh-CN/reference/provider-support.md +67 -0
- package/docs/zh-CN/reference/session-cache.md +112 -0
- package/examples/capabilities/review.json +12 -0
- package/examples/capabilities/write-tools.json +15 -0
- package/examples/custom-system-status-extension/index.ts +144 -0
- package/examples/custom-system-status-extension/prompt-stack.json +40 -0
- package/examples/default-prompt-stack.json +125 -0
- package/examples/fake-assistant-direct-output-prompt-stack.json +48 -0
- package/examples/hack-prompt-stack.json +118 -0
- package/examples/minimal-prompt-stack.json +40 -0
- package/examples/read-first-worker-prompt-stack.json +49 -0
- package/examples/validation-issues-prompt-stack.json +38 -0
- package/package.json +114 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Release process
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md)
|
|
4
|
+
|
|
5
|
+
## Independent packages
|
|
6
|
+
|
|
7
|
+
The main `@jadelclemens/pi-forge` package has **no** dependency on `@zihanw/pi-forge-subagents` or `@zihanw/pi-subagent-runtime`. It can release independently; unfinished optional features do not block ordinary Forge use or a main-package release.
|
|
8
|
+
|
|
9
|
+
The optional package is tested against the released Forge host before its own publication. Any required runtime version must be published and smoke-tested before publishing the optional package that depends on it. Backend, continuation, background-task, and nested-usage producer acceptance belong to that companion release, not to the main package.
|
|
10
|
+
|
|
11
|
+
## Before main-package release
|
|
12
|
+
|
|
13
|
+
1. Confirm the intended version in the manifest, lockfile, changelog, and current user documentation. Preserve historical release records and document breaking configuration/session boundaries.
|
|
14
|
+
2. Install dependencies from the lockfile with `npm ci`, build, and run the complete `npm run verify` chain: Node tests, browser tests, types, generated client, docs, distribution, package contents, and packed installation.
|
|
15
|
+
3. Require the Ubuntu, macOS, Windows, and configured Pi compatibility GitHub Actions jobs to pass for the **exact release commit**, not an earlier source revision.
|
|
16
|
+
4. Test a packed main-package installation against both the documented minimum (0.87.0) and current tested Pi versions (1.6.0) using `PI_TEST_VERSION` / `TYPEBOX_TEST_VERSION`; exercise ordinary Preset/Profile/Capability behavior independently of optional delegation.
|
|
17
|
+
5. Inspect `npm pack --dry-run` for package size and unexpected or missing files. Publish the verified artifact, not an unreviewed working tree.
|
|
18
|
+
|
|
19
|
+
The macOS and Windows jobs run the platform-sensitive checks (unit tests, typecheck, `check:dist`, `check:packed`); the real-browser editor suite runs on Linux. Compatibility-version (older supported releases) and scheduled latest-Pi probes remain Linux-only; they test dependency drift rather than operating-system behavior. Exact-release CI is a mandatory pre-release gate; this documentation does not record cross-platform release CI results.
|
|
20
|
+
|
|
21
|
+
## Dependency policy
|
|
22
|
+
|
|
23
|
+
The four Pi SDK packages remain host-provided optional peers, never private runtime dependencies. Published Forge 0.5.7 required Pi `>=0.87.0 <0.88.0`. Forge 0.5.13 expands supported peers to the union:
|
|
24
|
+
```
|
|
25
|
+
>=0.87.0 <0.88.0 || 0.99.0 || 0.99.1 || 0.99.2 || >=1.0.0 <1.7.0
|
|
26
|
+
```
|
|
27
|
+
Development fixtures are pinned to `1.6.0` with `typebox@1.3.27`. Minimum supported Pi `0.87.0` remains unchanged; The 1.x range covers 1.0–1.6; Pi 0.86, other 0.x versions and Pi 1.7 or later are not implicitly supported. Exact tested versions belong in development dependencies and the lockfile, not exact host-version requirements. See the [Pi 1.0 compatibility guide](../guides/pi-1-compatibility.md).
|
|
28
|
+
|
|
29
|
+
To run packed installation smoke tests against the minimum or current version:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Test packed install against pinned minimum (0.87.0):
|
|
33
|
+
PI_TEST_VERSION=0.87.0 TYPEBOX_TEST_VERSION=1.3.7 npm run check:packed
|
|
34
|
+
|
|
35
|
+
# Test packed install against current Pi 1.6.0:
|
|
36
|
+
PI_TEST_VERSION=1.6.0 TYPEBOX_TEST_VERSION=1.3.27 npm run check:packed
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Published `@zihanw/pi-forge-subagents` 0.5.3 does not understand `tools.initial`. Its published dependency metadata does not include this source compatibility patch. A companion release can combine its pending features with Pi 1.0 adaptation, independently after the runtime floor is updated and the bubblewrap (`bwrap`) `/tmp` mount shadowing issue is resolved. This is an independent companion release, not a requirement to publish the packages simultaneously. See the [host-port compatibility note](../reference/subagent-host-port.md#tool-selection-compatibility).
|
|
40
|
+
|
|
41
|
+
## Package contents
|
|
42
|
+
|
|
43
|
+
The tarball must include compiled JavaScript, type declarations and source maps from `dist/`, JSON and TypeScript examples, the English and Chinese landing pages, changelog, license, and Markdown documentation. README images and demonstration media are repository-only: keep them in GitHub, use commit-pinned raw GitHub URLs in both READMEs, and do not package `assets/` or image/audio/video files anywhere in the tarball. Installed README text works offline; remote media requires network access. Positive `files` patterns exclude non-code/non-text additions by default. It must not include physical `src/` files. The root, `/subagent`, `/ui-contribution`, and `/command-contribution` entries must resolve to compiled output.
|
|
44
|
+
|
|
45
|
+
`prepack` runs the build and `check:package`; the latter uses `npm pack --dry-run --ignore-scripts` to inspect the actual inventory without recursive lifecycle calls. Media/asset entries and compressed tarballs above **2 MiB** fail the check. Keep the real-pack injection regression enabled. Any future essential runtime asset or budget change needs an explicit packaging review; do not simply widen the whitelist or remove the checks. These are normal build/release gates, not protection against deliberately bypassing lifecycle scripts.
|
|
46
|
+
|
|
47
|
+
The root `PUBLIC_API.md` and `SUBAGENT_ADAPTER_CONTRACT.md` files are compatibility pointers; authoritative content lives under `docs/reference/`.
|
|
48
|
+
|
|
49
|
+
## Publish and verify
|
|
50
|
+
|
|
51
|
+
With release authorization, publish the intended version using the intended tag (`latest` for a stable main-package release). Verify registry version, tag, and tarball integrity, then install the published package through Pi in a clean project and smoke-test the main commands and resource workflow without model inference.
|
|
52
|
+
|
|
53
|
+
Do not silently move unrelated legacy or prerelease tags. Publishing is not a host upgrade: restart or reload a user's existing host only with that user's authorization, and start a new session when the release's migration notes require it. Keep release evidence separate from static documentation; a version bump or changelog entry alone is not proof of successful publication.
|
|
54
|
+
|
|
55
|
+
### Coherent fixtures versus fresh consumers
|
|
56
|
+
|
|
57
|
+
Compatibility CI pins the four SDKs and, for 1.x, codemode/MCP/telemetry/chord to the same exact version and asserts resolved versions. These are explicit coherent fixtures, not ordinary fresh consumer resolution. By default the packed check keeps normal npm resolution and verifies the installed four-SDK family; the ordinary 1.6.0 jobs (all three platforms) are the unconstrained normal-consumer gate. Compatibility lanes set `PI_TEST_COHERENT_UPSTREAM=1`, which also pins codemode/MCP/telemetry/chord to the host version inside the packed consumers and is printed in the log. This is required because fresh unconstrained installs of Pi 1.0.1–1.1.x now resolve their caret ranges to newer, incompatible upstream releases (observed 2026-10-20: Pi 1.1.0 + pi-codemode 1.3.0 fails with a missing `MCP_TYPESCRIPT_PREAMBLE` export) independently of Forge. Fixture success on those lanes says Forge works on that host family; it does not claim that a fresh unconstrained install of that old Pi works.
|
|
58
|
+
|
|
59
|
+
Pi 1.3 pins its internal Pi dependencies exactly; normal 1.3 consumers resolve the four SDKs plus codemode/MCP/telemetry to 1.3.0 without a fixture overlay. Real-SDK regressions cover default/modifier transcript tool restoration, resumed Preset initial/allow/deny policy, Capability additions, and disabling a Preset back to the policy owner's saved startup baseline (with distinguishable external changes reconciled). Those 0.5.9 restoration changes did not change execution authorization or enable every default-active extension tool on resume. Forge 0.5.10 separately adds [effective-set execution authorization](../reference/capabilities.md#execution-authorization-forge-0510).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md)
|
|
4
|
+
|
|
5
|
+
This file contains forward-looking product work only. Completed capability belongs in the [feature inventory](../reference/features.md), release history in the root [changelog](../../CHANGELOG.md), and completed investigation in the [design archive](../design/README.md).
|
|
6
|
+
|
|
7
|
+
## 0.5.9: Pi 1.1–1.3 compatibility and unsupported-host handling (release prepared)
|
|
8
|
+
|
|
9
|
+
Forge 0.5.9 extends host peers to Pi 1.0–1.3 (`>=1.0.0 <1.4.0`, development pin 1.3.0), resolves Pi 1.2 custom-start `lastUserMessage` from frozen current-branch user history, keeps Forge status formatting presentation-only when the Theme is unavailable (#3), and handles hosts lacking required prompt inputs without an unhandled failure (#2). oh-my-pi remains unsupported. Tool-policy, Capability, model-API and usage semantics are unchanged. See [compatibility and migration](../guides/pi-1-compatibility.md).
|
|
10
|
+
|
|
11
|
+
The release commit is prepared locally. Pushing, exact-commit remote CI (a [release gate](release.md); not yet recorded for this commit), npm publication, registry/clean-consumer verification and any issue replies are separate steps. Optional/runtime features and any future exposure-policy redesign remain independent. Publishing does not authorize an installed-host upgrade or reload.
|
|
12
|
+
|
|
13
|
+
## 0.5.8 Pi host compatibility (completed)
|
|
14
|
+
|
|
15
|
+
0.5.8 aligned host peers, development pins, packed consumers and CI with Pi 1.0.x (tested 1.0.0–1.0.2) while preserving the Pi 0.87.x baseline and explicit 0.99.0–0.99.2 support. See the [changelog](../../CHANGELOG.md).
|
|
16
|
+
|
|
17
|
+
## 0.5.7 Preview and scrolling (completed)
|
|
18
|
+
|
|
19
|
+
0.5.7 delivered readable role-colored context, collapsible Tools groups, original-order / safe call-paired result views, historical tool JSON disclosure, search/reading-state retention and scroll reachability. See the [changelog](../../CHANGELOG.md) for the published UI release.
|
|
20
|
+
|
|
21
|
+
## 0.5.6 regression and UI closeout (completed)
|
|
22
|
+
|
|
23
|
+
0.5.6 delivered leading-System preservation, Preset/Profile edit protection, Capability conflict preflight, auto-profile diagnostics, whole-row disabled styling and browser-local pane resizing. See the [changelog](../../CHANGELOG.md) for the published patch history.
|
|
24
|
+
|
|
25
|
+
## 0.5.5 capability baseline (completed)
|
|
26
|
+
|
|
27
|
+
Implementation is authorized under the [accepted capability design](../design/pi-forge-system-update-design-notes.md) and [lean-plan amendment](../design/architecture-0.5.md#accepted-055-amendment-session-capabilities). Pi 0.86 is released; the old upstream-blocked thin-sections proposal is superseded.
|
|
28
|
+
|
|
29
|
+
One active lane at a time:
|
|
30
|
+
|
|
31
|
+
1. **Foundation (verified):** strict capability/override codec, scoped binding resolution, immutable snapshots, and branch event reducer.
|
|
32
|
+
2. **Human CLI core & metadata anchor projection (implemented):** Pi 0.87 dependency upgrade, request-base replacement, `context_with_system` full pipeline, `buildSessionProjection` canonical alignment, native/user projection, semantic events and plain `custom` cursor-only metadata anchors, durable tool baselines, repositories/ForgeWorkspace discovery, and `/capability` add/list/bindings/enable/enable-bound/disable/status/reset. See [current reference](../reference/capabilities.md).
|
|
33
|
+
3. **Session observability & activity panel (implemented):** derived multi-capability state, actual selected tools, delivery status (`none`, `pending`, `prepared`), presentation indicators, and guarded human disable/reset; real SDK summarizer-input characterization.
|
|
34
|
+
4. **Preset authorization & restricted Agent control (implemented):** live Preset binding schema (`capabilities`), opt-in `modelCallable: true`, and model-callable `forge_capability` tool with fixed list/status/enable/disable schema; per-call trust, binding identity, authorization, and tool policy checks; strict user-vs-agent ownership.
|
|
35
|
+
5. **Capabilities library CRUD, Preset binding editor, and guarded human Web activation picker (delivered in functional source):** dedicated **Capabilities** surface for project/global capability CRUD with `sourceRevision` stale-save guards; dedicated peer Capability bindings editor with finite overrides and live source-effective preview; guarded human Web activation picker (`GET /api/capability-state/available`, `POST /api/capability-state/enable`) with pre-activation preview and session guard plus content fingerprint validation. Parent safeguards enforce raw source/revision coherence, external new bindings stale-save detection, and lifecycle/re-entry fences (`disposed`, `lifecycleRevision`, `sameContext`).
|
|
36
|
+
6. **Main-package 0.5.5 release closeout:** The accepted UI and local full verification closed out on 2026-09-24 (`89c6ba2`); bilingual README B and reviewed continuous media are adopted. UI scope is frozen except for regressions/release blockers. The main package 0.5.5 was published; subsequent patches retain the exact-commit CI and packed-install gates in the [release process](release.md). No paid provider matrix is implied. The optional package and runtime have independent unfinished release work and are not a main-package gate. At that closeout the dev SDK was 0.87.0 with peer `>=0.87.0 <0.88.0`; the 0.5.8 host policy is documented in [Pi 1.0 compatibility](../guides/pi-1-compatibility.md).
|
|
37
|
+
|
|
38
|
+
Existing README and optional Pet active-state changes are preserved. No host upgrade, reload or publication follows implicitly from local feature development. Foundation tests are not proof of live 0.5.5 behavior.
|
|
39
|
+
|
|
40
|
+
## 0.5.0 breaking cleanup (lean history)
|
|
41
|
+
|
|
42
|
+
0.5.0 is a deliberately breaking cleanup release plus the minimum foundation for 0.5.x. Net-new feature work is frozen.
|
|
43
|
+
|
|
44
|
+
The authoritative scope, accepted decisions, implementation lanes, and release gates are in the [lean 0.5 architecture plan](../design/architecture-0.5.md). The original six-phase architecture target remains the long-term goal and is archived in the [full proposal](../design/archive/0.5-full-proposal/README.md).
|
|
45
|
+
|
|
46
|
+
Current stabilization includes the accepted 0.5.1 generic-settings amendment and the accepted 0.5.2 message-merge, localization, regex-frequency, and finalize-role amendment recorded in that plan.
|
|
47
|
+
|
|
48
|
+
Implementation order:
|
|
49
|
+
|
|
50
|
+
0. Documentation convergence: archive the full proposal and make the lean plan active.
|
|
51
|
+
1a. Removals only: remove SillyTavern, mutable variable state/macros/slot, variable session entries, and regex `display`/`both`.
|
|
52
|
+
1b. Compiler, schema v2, and extension contract: implement `forge-v1`, frozen `PromptEnvironment`, immutable `parameters`, and the redesigned trusted extension port; retain `finalize` under lifecycle-adapter ownership.
|
|
53
|
+
1c. Migration and documentation: v1-to-v2 utility, example migration, and English/Chinese breaking notes.
|
|
54
|
+
1d. Compiler/extension conformance: pure slot contract symmetry, slot dependency resolution, shared dependency analysis/compilation context, lazy extension evaluation, nested conditionals, parser fixes, and focused conformance tests.
|
|
55
|
+
2a. Minimal repositories and codecs: make repositories/codecs the only stack/profile read/write path; defer fingerprint and atomic writes.
|
|
56
|
+
2b. ForgeWorkspace and host port v1: minimal snapshot owner plus `/subagent` discovery, profile listing/snapshot, and prepare with mandatory lifecycle semantics.
|
|
57
|
+
3. Subagent extraction: move subagent code into `pi-forge-subagents`; remove the main-package hard dependency and delegation UI; optional package owns dedicated `subagents.json` files.
|
|
58
|
+
3.5. Host-neutrality hardening: host-neutral prompt compiler, `ForgeWorkspace` as the single resource-state owner, optional-package docs/config alignment, and portable packed smoke.
|
|
59
|
+
4. Public surface and release: (4a) Forge-native host contract — main drops the runtime dependency and the synthetic preparation model, and the 0.4 execution contract moves to the optional package; (4b) public-surface cut — root default, root named extension API, and `/subagent` only, `src/*` aliases removed, package checks flipped to the allowlist; (4c) optional-package packed smoke over a loopback transport; (4d) migration notes and English/Chinese docs; (4e) packed-install verification and the 0.5.0 release.
|
|
60
|
+
|
|
61
|
+
Only one lane is active at a time. Sandbox, staged writes, new prompt features, richer imports, and the remaining full-plan architecture work remain deferred until after this sequence.
|
|
62
|
+
|
|
63
|
+
## 0.5.x continuation
|
|
64
|
+
|
|
65
|
+
After 0.5.0, continue toward the archived full target in small increments:
|
|
66
|
+
|
|
67
|
+
- expected-fingerprint writes, codec fingerprinting, and atomic persistence;
|
|
68
|
+
- full `PromptStackService` / `AgentProfileService` / `ForgeWorkspace` ownership;
|
|
69
|
+
- physical `pi-forge-core` boundaries and dependency-direction checking;
|
|
70
|
+
- complete host RPC catalogue, progress events, and optional subagent UI;
|
|
71
|
+
- public-surface classification and rolling Pi compatibility matrix.
|
|
72
|
+
|
|
73
|
+
## 0.4 baseline
|
|
74
|
+
|
|
75
|
+
The profile UI, foreground-delegation dogfooding, dependency compatibility work, and documentation reorganization are complete and merged to `main`. Runtime beta.2 is published, and the packed 0.4.0 extension passes the full verification surface against the documented Pi versions.
|
|
76
|
+
|
|
77
|
+
The 0.4.1 release adds scoped global profiles and prompt stacks with project-over-global shadowing, exact `project:<id>`/`global:<id>` selectors, scoped delegation authorization, untrusted-project global browsing, web-editor global create/fork/import, and zh-CN documentation. The accepted resolution model is archived in [scoped global profiles and prompt stacks](scoped-global-profiles-stacks.md).
|
|
78
|
+
|
|
79
|
+
Stable 0.4 does not imply that the subagent adapter or runtime has become stable. Prompt stacks and ordinary profile use remain independent of delegation.
|
|
80
|
+
|
|
81
|
+
## Deferred candidates
|
|
82
|
+
|
|
83
|
+
### Naming convergence (preset/stack)
|
|
84
|
+
|
|
85
|
+
Target model: **stack** names the composition section (ordered blocks/slots), **preset** names the file that bundles composition with tool/skill/regex policy, **profile** remains the model/thinking/preset bundle. The `/preset` command family already matches the target.
|
|
86
|
+
|
|
87
|
+
0.5.3 starts with the non-breaking user-visible layer: the web editor calls the complete resource a **Preset**, calls its ordered Block/Slot composition the **Stack**, and labels the old whole-resource Stack tab **Advanced**. User-facing diagnostics follow the same terminology. Compatibility identifiers remain unchanged in this phase: `/api/stacks`, TypeScript `PromptStack` names, `.pi/forge/prompt-stacks/`, JSON type `pi-forge.prompt-stack`, profile field `promptStack`, and the subagent wire contract.
|
|
88
|
+
|
|
89
|
+
The remaining storage/schema convergence must be bundled with breaking cleanup, never shipped as an implicit patch migration:
|
|
90
|
+
|
|
91
|
+
- Migrate `.pi/forge/prompt-stacks/` to `.pi/forge/presets/` byte-preserving, reusing the legacy stack-migration path; read-compat for the `"pi-forge.prompt-stack"` type, write `"pi-forge.preset"`.
|
|
92
|
+
- Profile field `promptStack` becomes `preset` with read-compat for the old field.
|
|
93
|
+
- Do **not** change the `/subagent` wire contract: keep `promptStackId` / `ForgeWirePromptStack` names as aliases; no port version bump, no coordinated pi-forge-subagents release, fingerprints unchanged.
|
|
94
|
+
- Do **not** split composition and policy into separate files (referential-integrity and activation-matrix complexity); fork covers "same layout, different policy".
|
|
95
|
+
- User-visible layer first: storage dirs, JSON type, web-editor labels, EN/zh-CN docs. Internal type names converge gradually via aliases.
|
|
96
|
+
|
|
97
|
+
### Sandbox and staged writes
|
|
98
|
+
|
|
99
|
+
Evaluate an optional backend that can honestly enforce roots, process behavior, symlink containment, and requested network policy. Keep shared-user as an explicit compatibility boundary. Design writes as a separately approved staged patch/change set; do not add write/edit/shell tools directly to the shared-user child.
|
|
100
|
+
|
|
101
|
+
### History and prompt diagnostics
|
|
102
|
+
|
|
103
|
+
Candidate history controls need concrete use cases and dangling tool-pair tests. Provider-payload rewriting and display-only streaming regex remain deferred until a stable, previewable lifecycle hook exists. SillyTavern fidelity is no longer a core roadmap goal; 0.5 removes it.
|
|
104
|
+
|
|
105
|
+
## Product guardrails
|
|
106
|
+
|
|
107
|
+
- Prompt-stack JSON stays declarative; executable customization stays in trusted extensions/packages.
|
|
108
|
+
- Prompt rendering moves toward immutable inputs and explicit outputs; do not add mutable variable behavior during 0.5.
|
|
109
|
+
- Profiles remain one-shot presets, not continuous runtime owners.
|
|
110
|
+
- Tool and skill policy stays in prompt stacks, not profiles.
|
|
111
|
+
- Skill filtering is model-visible prompt filtering, not an invocation or security boundary.
|
|
112
|
+
- Delegation remains opt-in, foreground, clean-context, and fail-closed on missing capabilities, and lives in the optional package.
|
|
113
|
+
- Do not report shared-user read-only policy as an OS sandbox.
|
|
114
|
+
- New editor workflows remain frozen except the explicitly accepted capability surfaces above; migration and new workflows retain real-browser coverage.
|
|
115
|
+
- Run the full verification and package checks before release.
|
|
116
|
+
|
|
117
|
+
The detailed completed 0.4 plan is retained in the [historical roadmap](../design/roadmap-0.4-archive.md).
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# Scoped global profiles and prompt stacks
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md) · [Roadmap](roadmap.md)
|
|
4
|
+
|
|
5
|
+
Status: accepted design; implementation complete for 0.4.1 (identity, catalogs, scoped stacks/profiles, persistence, auto-activation, delegation, zh-CN docs, and web-editor global create/fork/import with explicit scope). Historical record: the delegation-policy references to `.pi/forge/config.json` `subagents.*` below are superseded in 0.5 — delegation configuration moved to the optional package's dedicated `subagents.json` files (see the [0.5 migration guide](../guides/migrating-to-0.5.md)).
|
|
6
|
+
|
|
7
|
+
## Confirmed design decisions
|
|
8
|
+
|
|
9
|
+
Recorded before implementation started; these resolve the options left open by the analysis above.
|
|
10
|
+
|
|
11
|
+
- **D1** Unified resource ID grammar: `/^[A-Za-z0-9][A-Za-z0-9._-]*$/` for both profiles and stacks. `:` is reserved for scope qualification and rejected in JSON IDs (with a diagnostic, not a load failure).
|
|
12
|
+
- **D2** When capturing/saving a profile, `promptStack` is serialized relative to the target profile scope: same scope writes a bare ID, a different scope writes a qualified selector (`global:<id>`), and a global profile is never allowed to reference a project stack (the save is rejected).
|
|
13
|
+
- **D3** Global profiles/stacks are loaded and can be browsed/previewed in untrusted projects, but applying a profile or stack still requires project trust.
|
|
14
|
+
- **D4** Subagent delegation remains entirely disabled in untrusted projects, including for global profiles.
|
|
15
|
+
- **D5** `default.json` has no special auto-activation role anymore. Only `autoActivate: true` participates in standalone stack activation. A `default.json` without an explicit `autoActivate` field receives a one-time migration warning; `autoActivate: false` remains an explicit opt-out. Multiple `autoActivate: true` stacks in the same scope fail closed.
|
|
16
|
+
- **D6** Legacy provenance records without a scope field are interpreted as project-scoped.
|
|
17
|
+
- **D7** `forge_subagent` accepts a bare `profileId` through effective lookup (project first) and `global:<id>` for exact global access; tool descriptions and `forge_subagent_profiles` explain the canonical selectors.
|
|
18
|
+
- **D8** New session entries and provenance persist the string selector form (`project:<id>` / `global:<id>`); `none` stays a scope-independent bare opt-out.
|
|
19
|
+
- **D9** Runtime state keeps flat `Loaded*[]` arrays whose entries carry `scope`/`key`; a shared catalog module owns `all`/`effective`/exact resolution.
|
|
20
|
+
- **D10** Web editor API routes encode scope as a single path segment (`scope:id`, e.g. `/api/stacks/global:reviewer`).
|
|
21
|
+
- **D11** A new `PI_FORGE_GLOBAL_DIR` environment override replaces the real `~/.pi/forge` for tests and embedders; loaders accept an explicit global Forge directory, and `globalForgeDir()` is only the default.
|
|
22
|
+
- **D12** Slice 5 is split into 5a (forge-config data model, scoped authorization, and unit tests) and 5b (discovery, tool descriptions, approval display, commands, docs, and browser verification).
|
|
23
|
+
- **D13** The web editor may edit/delete global resources when the route uses an explicit scope; unqualified routes remain project-only.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
This note defines the resource identity, lookup, activation, persistence, and delegation model for adding user-global agent profiles and prompt stacks without weakening project shadowing or authorization boundaries.
|
|
27
|
+
|
|
28
|
+
## Goals
|
|
29
|
+
|
|
30
|
+
- Reuse profiles and prompt stacks across projects.
|
|
31
|
+
- Keep common commands concise through project-over-global shadowing.
|
|
32
|
+
- Preserve an explicit way to address either scope when IDs collide.
|
|
33
|
+
- Make stored profile dependencies deterministic rather than dependent on later shadowing.
|
|
34
|
+
- Keep global and project delegation authorization separate.
|
|
35
|
+
- Preserve existing project-only files and unqualified commands where no collision exists.
|
|
36
|
+
|
|
37
|
+
## Non-goals
|
|
38
|
+
|
|
39
|
+
- Do not add inheritance or merging between two profile or stack definitions.
|
|
40
|
+
- Do not make profiles continuously own runtime state.
|
|
41
|
+
- Do not move tool or skill policy from prompt stacks into profiles.
|
|
42
|
+
- Do not let a global profile depend on project-controlled prompt content.
|
|
43
|
+
- Do not add writable subagents, compaction settings, or a concurrency cap as part of this feature.
|
|
44
|
+
|
|
45
|
+
## Storage and identity
|
|
46
|
+
|
|
47
|
+
Global resources use the existing user-owned Forge root:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
~/.pi/forge/prompt-stacks/*.json
|
|
51
|
+
~/.pi/forge/agent-profiles/*.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Project resources keep their current locations:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
<project>/.pi/forge/prompt-stacks/*.json
|
|
58
|
+
<project>/.pi/forge/agent-profiles/*.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The JSON `id` remains an unqualified value such as `reviewer`. Scope comes from the storage location and must not be duplicated as an editable field in the file.
|
|
62
|
+
|
|
63
|
+
Every loaded resource must carry a first-class scoped identity:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
type ResourceScope = "global" | "project";
|
|
67
|
+
|
|
68
|
+
interface ResourceKey {
|
|
69
|
+
scope: ResourceScope;
|
|
70
|
+
id: string;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Do not repeatedly infer scope from `filePath`. Loaded profiles and stacks should expose their scope/key directly, and runtime state should compare keys rather than bare IDs.
|
|
75
|
+
|
|
76
|
+
Duplicate IDs are errors only within one scope. A project and global resource with the same ID form a valid shadow pair.
|
|
77
|
+
|
|
78
|
+
## Selector syntax
|
|
79
|
+
|
|
80
|
+
Commands, completion candidates, profile stack references, persisted diagnostics, and delegation discovery use one selector grammar:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
reviewer
|
|
84
|
+
project:reviewer
|
|
85
|
+
global:reviewer
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Existing resource IDs cannot contain `:`, so qualification is unambiguous. Reject unknown scope prefixes, empty IDs, and malformed selectors with a specific diagnostic.
|
|
89
|
+
|
|
90
|
+
The canonical formatter should return:
|
|
91
|
+
|
|
92
|
+
- `reviewer` only when presenting the effective unqualified resource;
|
|
93
|
+
- `project:reviewer` or `global:reviewer` when exact identity matters;
|
|
94
|
+
- qualified selectors for both resources when a collision must be shown.
|
|
95
|
+
|
|
96
|
+
Internally, parse selectors into `{ scope?: ResourceScope; id: string }` and resolve them to a required `ResourceKey` before mutation, application, persistence, or delegation.
|
|
97
|
+
|
|
98
|
+
## Two lookup modes
|
|
99
|
+
|
|
100
|
+
Unqualified interactive selection and unqualified profile dependencies deliberately use different lookup rules.
|
|
101
|
+
|
|
102
|
+
### Effective lookup
|
|
103
|
+
|
|
104
|
+
Commands such as `/preset use` and `/profile use` use effective lookup:
|
|
105
|
+
|
|
106
|
+
1. A qualified selector resolves only the named scope.
|
|
107
|
+
2. An unqualified selector resolves the project resource when present.
|
|
108
|
+
3. Otherwise it resolves the global resource.
|
|
109
|
+
4. A project definition shadows the same-ID global definition even when the project definition is invalid. The invalid shadow fails closed; it must not silently fall back to the global resource.
|
|
110
|
+
|
|
111
|
+
Examples:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
/profile use reviewer # project first, otherwise global
|
|
115
|
+
/profile use global:reviewer # exact global profile
|
|
116
|
+
/preset use project:reviewer # exact project stack
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Both colliding resources remain inspectable and explicitly selectable. Shadowing is an ergonomic default, not deletion of the global definition.
|
|
120
|
+
|
|
121
|
+
### Profile dependency lookup
|
|
122
|
+
|
|
123
|
+
A profile's `promptStack` is a stored dependency and must remain stable when unrelated files are later added. Its unqualified reference therefore resolves relative to the profile's own scope rather than through effective lookup.
|
|
124
|
+
|
|
125
|
+
| Profile scope | `"reviewer"` | `"project:reviewer"` | `"global:reviewer"` |
|
|
126
|
+
|---|---|---|---|
|
|
127
|
+
| Project | project stack | project stack | global stack |
|
|
128
|
+
| Global | global stack | rejected | global stack |
|
|
129
|
+
|
|
130
|
+
Consequences:
|
|
131
|
+
|
|
132
|
+
- A project profile may use either a project stack or an explicitly qualified global stack.
|
|
133
|
+
- A project profile with `"promptStack": "reviewer"` does not fall back to a global stack when the project stack is missing. The diagnostic should suggest `global:reviewer` when that global stack exists.
|
|
134
|
+
- A global profile may use only global stacks. `project:*` is rejected even if the project is trusted.
|
|
135
|
+
- Adding a project stack later cannot silently change the dependency of a project profile that explicitly uses `global:reviewer`.
|
|
136
|
+
- A project cannot replace the prompt or tool policy of a user-authorized global profile.
|
|
137
|
+
|
|
138
|
+
The string form remains sufficient for profile schema v1 because qualification expands the accepted reference syntax without adding a new field or object shape. Existing project profiles keep resolving their unqualified stack IDs to project stacks.
|
|
139
|
+
|
|
140
|
+
## Loading and catalogs
|
|
141
|
+
|
|
142
|
+
Global definitions are user-owned and may load independently of project trust. Project definitions load only when the project is trusted.
|
|
143
|
+
|
|
144
|
+
Pure loaders and tests must not accidentally read the developer's real home directory. Prefer an explicit catalog/repository input for the global Forge directory over relying on a process-wide environment variable. Existing project-only public loader functions may remain as compatibility wrappers while the extension runtime adopts scoped catalog loaders.
|
|
145
|
+
|
|
146
|
+
Maintain both views:
|
|
147
|
+
|
|
148
|
+
- `all`: every loaded scoped definition, including shadowed resources;
|
|
149
|
+
- `effective`: one resource per unqualified ID after project-over-global shadowing.
|
|
150
|
+
|
|
151
|
+
Centralize resolution helpers instead of continuing to use bare `array.find(candidate.id === id)` calls. Application, preview, mutation, auto-activation, subagent preparation, and the editor must resolve through the same catalog semantics.
|
|
152
|
+
|
|
153
|
+
## Selection and persistence
|
|
154
|
+
|
|
155
|
+
New session entries must persist the exact scoped key, not just the bare ID. This prevents a restored global selection from changing to a newly created project shadow after reload or tree navigation.
|
|
156
|
+
|
|
157
|
+
For compatibility:
|
|
158
|
+
|
|
159
|
+
- Read legacy branch entries containing only `activeStackId` using effective lookup.
|
|
160
|
+
- Write new entries with a scoped active-stack reference.
|
|
161
|
+
- Preserve the explicit `none`/`disable` selection as a scope-independent opt-out.
|
|
162
|
+
- Profile provenance should add the profile scope/key while continuing to accept older provenance that has only `profileId` and `sourcePath`.
|
|
163
|
+
- Drift snapshots should store the resolved scoped stack reference so status can distinguish definition changes from a scope change.
|
|
164
|
+
|
|
165
|
+
Profile application remains transactional and one-shot. Later manual model/thinking changes remain respected; the selected stack continues enforcing its existing policy exactly as it does now.
|
|
166
|
+
|
|
167
|
+
## Auto-activation
|
|
168
|
+
|
|
169
|
+
Restored branch state and explicit opt-out continue to take precedence over all fresh-session defaults.
|
|
170
|
+
|
|
171
|
+
For agent profiles:
|
|
172
|
+
|
|
173
|
+
1. Inspect project `autoActivate: true` candidates first.
|
|
174
|
+
2. If any project candidate exists, do not fall back to a global candidate.
|
|
175
|
+
3. Exactly one usable project candidate applies; an invalid or ambiguous project selection fails closed.
|
|
176
|
+
4. If no project candidate exists, apply the same rules to global candidates.
|
|
177
|
+
5. A project and global auto-activation candidate are not a conflict because project scope has explicit precedence.
|
|
178
|
+
|
|
179
|
+
For standalone prompt-stack activation, apply the same scope precedence after profile auto-activation has declined to select a profile:
|
|
180
|
+
|
|
181
|
+
1. Only stacks with `autoActivate: true` participate; `default.json` has no filename-based activation role (D5).
|
|
182
|
+
2. Resolve project candidates before global candidates.
|
|
183
|
+
3. A same-ID project stack shadows the global stack, including an invalid shadow or `autoActivate: false` opt-out.
|
|
184
|
+
4. Exactly one usable candidate applies; multiple `autoActivate: true` stacks in the same scope fail closed.
|
|
185
|
+
5. Do not silently activate the global same-ID stack through an invalid or opted-out project shadow.
|
|
186
|
+
6. Preserve the existing rule that agent-profile auto-activation takes precedence over standalone stack activation, including profiles whose `promptStack` is `null`.
|
|
187
|
+
|
|
188
|
+
## Commands and editor behavior
|
|
189
|
+
|
|
190
|
+
Unqualified commands use effective lookup. Qualified commands address exact scope.
|
|
191
|
+
|
|
192
|
+
Recommended command behavior:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
/preset use reviewer
|
|
196
|
+
/preset use global:reviewer
|
|
197
|
+
/profile use project:reviewer
|
|
198
|
+
/profile preview global:reviewer
|
|
199
|
+
/profile save reviewer # project by default
|
|
200
|
+
/profile save global:reviewer # explicit global mutation
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Mutations must resolve the target scope before computing a path. Existing overwrite, changed-file, containment, and symbolic-link protections apply independently to each storage root. Global mutation must always be explicit; an unqualified save/fork/import continues to target project storage.
|
|
204
|
+
|
|
205
|
+
The web editor should:
|
|
206
|
+
|
|
207
|
+
- show global/project badges on profiles and stacks;
|
|
208
|
+
- show `shadows global:<id>` and `shadowed by project:<id>` states;
|
|
209
|
+
- retain both resources in navigation when IDs collide;
|
|
210
|
+
- require explicit scope for create, fork, import, save-as, and delete targets;
|
|
211
|
+
- prevent editing a shadowed global resource through an unqualified project route;
|
|
212
|
+
- keep the current token, trust, idle-state, overwrite, and browser-test protections for mutations.
|
|
213
|
+
|
|
214
|
+
Completions may prefer concise unqualified effective selectors, but must also offer qualified selectors when a collision exists or when the user has begun typing a scope prefix.
|
|
215
|
+
|
|
216
|
+
## Delegation boundary
|
|
217
|
+
|
|
218
|
+
Delegation authorization follows the profile's scope, not the effective unqualified ID:
|
|
219
|
+
|
|
220
|
+
- `~/.pi/forge/config.json` `subagents.profiles.<id>` authorizes only `global:<id>`.
|
|
221
|
+
- `<project>/.pi/forge/config.json` `subagents.profiles.<id>` authorizes only `project:<id>`.
|
|
222
|
+
- Same-ID global and project profiles never inherit enablement, backend, or timeout policy from one another.
|
|
223
|
+
- General backend, timeout, and summary defaults retain their current global-then-project layering.
|
|
224
|
+
- Deleting a profile clears delegation policy only from the matching scope's config.
|
|
225
|
+
- A global profile remains bound to global prompt content even when a project profile or stack shadows the same ID.
|
|
226
|
+
|
|
227
|
+
`forge_subagent_profiles` should return canonical callable selectors. When both scopes expose the same ID, the project profile may use the concise effective selector and the global profile must remain callable as `global:<id>`. The `forge_subagent` parameter, `/forge-agent` commands, embedded description summary, preparation lookup, approval display, fingerprints, and reports must retain exact scope.
|
|
228
|
+
|
|
229
|
+
Global profiles are user-owned, but ordinary delegation safety does not change: profiles remain disabled unless authorized in the matching config, unattended invocation remains a separate trusted-project decision, and read-only still does not imply an OS sandbox.
|
|
230
|
+
|
|
231
|
+
## Compatibility and migration
|
|
232
|
+
|
|
233
|
+
- No files move automatically.
|
|
234
|
+
- Existing `.pi/forge` and legacy `.pi/prompt-stacks` resources remain project-scoped.
|
|
235
|
+
- Existing project profile `promptStack` strings remain project-relative.
|
|
236
|
+
- Existing unqualified commands behave the same when no global collision exists.
|
|
237
|
+
- Legacy bare-ID session entries restore through effective lookup; all new entries record scope.
|
|
238
|
+
- Same-ID cross-scope definitions are valid and must not receive duplicate-ID errors.
|
|
239
|
+
- Duplicate IDs within one scope keep the current fail-closed diagnostics.
|
|
240
|
+
- Global `subagents.profiles` entries, which currently warn and are ignored, become scoped authorization for global profiles only. Document this behavior change prominently.
|
|
241
|
+
- Public loaded-resource types may add scope/key metadata without removing existing fields; compatibility helpers should continue accepting legacy bare IDs where persisted data requires them.
|
|
242
|
+
|
|
243
|
+
## Implementation slices
|
|
244
|
+
|
|
245
|
+
Each slice should land with focused tests and leave the full verification surface green.
|
|
246
|
+
|
|
247
|
+
### Slice 1: scoped identity and storage
|
|
248
|
+
|
|
249
|
+
- Add `ResourceScope`, `ResourceKey`, selector parsing/formatting, and exact/effective resolution primitives.
|
|
250
|
+
- Add global profile/stack directory and safe mutation-path helpers.
|
|
251
|
+
- Add scope/key metadata to loaded resources.
|
|
252
|
+
- Keep JSON IDs unqualified and validate selector syntax separately from ID syntax.
|
|
253
|
+
- Add table-driven parser, formatter, storage-containment, and same-ID-key tests.
|
|
254
|
+
|
|
255
|
+
Exit criterion: scoped resources can be represented and addressed without changing runtime loading behavior.
|
|
256
|
+
|
|
257
|
+
### Slice 2: scoped stack catalog and persistence
|
|
258
|
+
|
|
259
|
+
- Load global stacks plus trusted project/legacy stacks into `all` and `effective` views.
|
|
260
|
+
- Implement project shadowing, exact qualified selection, and invalid-shadow fail-closed behavior.
|
|
261
|
+
- Replace bare-ID runtime lookups with catalog resolution.
|
|
262
|
+
- Persist scoped active-stack references and restore legacy bare-ID entries.
|
|
263
|
+
- Apply scoped standalone stack auto-activation and explicit opt-out rules.
|
|
264
|
+
|
|
265
|
+
Exit criterion: `/preset` runtime behavior, branch restoration, tool policy, preview, and stack diagnostics operate correctly across both scopes before profiles are migrated.
|
|
266
|
+
|
|
267
|
+
### Slice 3: scoped profiles and dependency resolution
|
|
268
|
+
|
|
269
|
+
- Load global and trusted-project profiles with duplicate and auto-activation diagnostics scoped correctly.
|
|
270
|
+
- Implement the profile-to-stack resolution matrix.
|
|
271
|
+
- Extend preview, application, rollback, provenance, drift, save, delete, and reload with exact scoped keys.
|
|
272
|
+
- Preserve profile auto-activation precedence over standalone stacks.
|
|
273
|
+
- Extend host/subagent profile snapshots and fingerprints with resolved scope where required without changing legacy provenance fingerprint interpretation.
|
|
274
|
+
|
|
275
|
+
Exit criterion: global and project profiles apply deterministically, including explicit project-to-global stack reuse and rejection of global-to-project references.
|
|
276
|
+
|
|
277
|
+
### Slice 4: commands and web editor
|
|
278
|
+
|
|
279
|
+
- Add qualified parsing and completions to `/preset`, `/profile`, and editor APIs.
|
|
280
|
+
- Make unqualified mutations project-scoped and global mutations explicit.
|
|
281
|
+
- Show scope, collisions, shadow relationships, exact dependencies, and scoped drift in human surfaces.
|
|
282
|
+
- Add real-browser coverage for browsing, applying, editing, forking, deleting, collision handling, and failed scoped preflight.
|
|
283
|
+
|
|
284
|
+
Exit criterion: users can understand and manage both scopes without an unqualified action mutating a global resource.
|
|
285
|
+
|
|
286
|
+
### Slice 5: scoped delegation, documentation, and release verification
|
|
287
|
+
|
|
288
|
+
- Accept global profile authorization from global config and project profile authorization from project config.
|
|
289
|
+
- Update discovery, embedded summaries, callable selectors, `/forge-agent`, preparation, approval, reports, and policy cleanup.
|
|
290
|
+
- Test same-ID profiles with independent enablement/backend/timeout settings and no authority inheritance.
|
|
291
|
+
- Update English and Chinese concepts, guides, commands, configuration, schema/reference, feature inventory, changelog, and roadmap.
|
|
292
|
+
- Regenerate tracked browser assets and `dist`, then run `npm run verify` and a packed-install smoke test.
|
|
293
|
+
|
|
294
|
+
Exit criterion: scoped ordinary use and scoped delegation are documented, fail closed, package-clean, and verified end to end.
|
|
295
|
+
|
|
296
|
+
## Required scenario coverage
|
|
297
|
+
|
|
298
|
+
At minimum, automated tests should cover:
|
|
299
|
+
|
|
300
|
+
- Global-only, project-only, and same-ID collision lookup.
|
|
301
|
+
- Exact global access while shadowed.
|
|
302
|
+
- Invalid project shadow without global fallback.
|
|
303
|
+
- Global profile to global stack.
|
|
304
|
+
- Project profile to unqualified project stack.
|
|
305
|
+
- Project profile to explicitly qualified global stack.
|
|
306
|
+
- Missing project stack with a same-ID global suggestion but no fallback.
|
|
307
|
+
- Rejected global profile to project stack.
|
|
308
|
+
- Project auto-activation precedence, global fallback, ambiguity, invalid candidate, restored branch, and explicit opt-out.
|
|
309
|
+
- `default.json` no longer auto-activates by filename; missing `autoActivate` yields a migration warning (D5).
|
|
310
|
+
- Scoped session restoration after a new shadow appears.
|
|
311
|
+
- Scoped provenance and drift after source edits or scope changes.
|
|
312
|
+
- Independent global/project delegation authorization for the same ID.
|
|
313
|
+
- Deletion clearing only matching-scope delegation policy.
|
|
314
|
+
- Untrusted projects loading global resources but not project resources.
|
|
315
|
+
- Web-editor collision navigation and explicit-scope mutation safeguards.
|
|
316
|
+
|
|
317
|
+
## Architectural guardrails
|
|
318
|
+
|
|
319
|
+
- Keep resolution in shared catalog/services; do not duplicate shadow rules across commands, the editor, and subagent code.
|
|
320
|
+
- Never use project-over-global effective lookup for a stored global profile dependency.
|
|
321
|
+
- Never infer delegation authority from a bare ID after profile resolution.
|
|
322
|
+
- Never persist a new active selection or provenance record without exact scope.
|
|
323
|
+
- Never silently fall back across scopes after an explicit selector or an invalid shadow.
|
|
324
|
+
- Keep profile application transactional and tool/skill policy owned by the resolved prompt stack.
|
|
325
|
+
- Require the complete unit, browser, type, generated-output, documentation, and package verification surface for the final slice.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Development setup
|
|
2
|
+
|
|
3
|
+
[Documentation](../README.md)
|
|
4
|
+
|
|
5
|
+
## Build from source
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://git.jadelclemens.xyz/pi-plugins/pi-forge.git
|
|
9
|
+
cd pi-forge
|
|
10
|
+
npm install
|
|
11
|
+
npm run build
|
|
12
|
+
pi
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Trust the project in Pi and use `/reload` when needed.
|
|
16
|
+
|
|
17
|
+
Before making structural changes, read the [architecture and development rules](architecture-rules.md) and the active [0.5 architecture plan](../design/architecture-0.5.md). Boundary, schema, persistence, public API, and product changes require an accepted architecture decision before implementation.
|
|
18
|
+
|
|
19
|
+
The npm package loads compiled `dist/index.js` and intentionally omits physical `src/` files. Clone or fork the repository to inspect or modify source; do not edit generated files in `node_modules`.
|
|
20
|
+
|
|
21
|
+
## Load the extension
|
|
22
|
+
|
|
23
|
+
For release-like local testing, register the cloned package directory in Pi settings:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"packages": ["../pi-forge"]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For live source development, remove that package entry and load the TypeScript extension directly:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"extensions": ["../pi-forge/src/index.ts"]
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
You can also run `pi -e ../pi-forge/src/index.ts` for a one-off smoke test. Never load both package and source entries simultaneously; pi-forge would initialize twice.
|
|
40
|
+
|
|
41
|
+
Browser-client source changes require `npm run build:client` because the editor serves a generated embedded bundle.
|
|
42
|
+
|
|
43
|
+
## Verification
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm test # core Node test suite
|
|
47
|
+
npm run test:browser # real-browser editor characterization
|
|
48
|
+
npm run typecheck # TypeScript and Vue
|
|
49
|
+
npm run build # client bundle and dist output
|
|
50
|
+
npm run verify # all tests plus generated/package consistency
|
|
51
|
+
npm pack --dry-run # inspect the publishable tarball
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Set `CHROME_PATH` when Chrome/Chromium is outside a standard location. CI runs the full verification. When source changes generated output, commit matching generated client and `dist` files.
|
|
55
|
+
|
|
56
|
+
## Pi compatibility
|
|
57
|
+
|
|
58
|
+
Pi-forge treats Pi-owned SDK packages (`pi-agent-core`, `pi-ai`, `pi-coding-agent`, `pi-tui`, and `typebox`) as host-provided optional peers, not private runtime dependencies. Published Forge 0.5.7 declared peer range `>=0.87.0 <0.88.0`. Forge 0.5.13 expands supported peers to the union:
|
|
59
|
+
```
|
|
60
|
+
>=0.87.0 <0.88.0 || 0.99.0 || 0.99.1 || 0.99.2 || >=1.0.0 <1.7.0
|
|
61
|
+
```
|
|
62
|
+
The repository dev SDK fixtures are updated to `1.6.0` with `typebox@1.3.27`. The minimum supported version remains `0.87.0`; there is no claim of dual 0.86 runtime support. The running host supplies one coherent SDK instance, avoiding duplicate packages and exact-version locks while expressing the actual API requirement. See the [Pi 1.0 compatibility guide](../guides/pi-1-compatibility.md).
|
|
63
|
+
|
|
64
|
+
The repository keeps exact SDK versions as development/test fixtures for reproducibility. Exact fixtures do not constrain which Pi version may load the published extension.
|
|
65
|
+
|
|
66
|
+
Release validation and smoke testing verify:
|
|
67
|
+
|
|
68
|
+
- the documented minimum supported Pi version (`0.87.0`);
|
|
69
|
+
- the current Pi version at release time (`1.6.0`), with earlier releases (`1.0.0`, `1.0.1`, `1.0.2`, `1.0.4`, `1.1.0`, `1.2.0`, `1.3.0`, `1.4.0`, `1.5.0`) as compatibility lanes;
|
|
70
|
+
- an automated or scheduled probe of npm `latest`.
|
|
71
|
+
|
|
72
|
+
Run packed installation tests against specific target versions using environment variables:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Verify packed install against pinned minimum (0.87.0):
|
|
76
|
+
PI_TEST_VERSION=0.87.0 TYPEBOX_TEST_VERSION=1.3.7 npm run check:packed
|
|
77
|
+
|
|
78
|
+
# Verify packed install against current Pi 1.6.0:
|
|
79
|
+
PI_TEST_VERSION=1.6.0 TYPEBOX_TEST_VERSION=1.3.27 npm run check:packed
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Ordinary Linux/macOS/Windows CI uses Pi 1.6.0. Linux runs the full `npm run verify`; macOS and Windows run the platform-sensitive part (unit tests, typecheck, `check:dist`, `check:packed`). Older supported versions are explicit Linux compatibility lanes running the host-sensitive checks (unit tests, typecheck, `check:packed`): pushes and pull requests cover representative hosts (minimum 0.87.0, 0.99.2, 1.0.4, 1.2.0, 1.5.0), while the weekly schedule and manual `workflow_dispatch` runs cover every listed historical fixture (0.87.0/0.87.1, 0.99.0–0.99.2, 1.0.0/1.0.1/1.0.2/1.0.4, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0) with the full suite. Passing CI on the exact release commit is a release gate (its result is not recorded in this document); a release that changes the supported host range also needs a passing manual full run on that commit.
|
|
83
|
+
|
|
84
|
+
Document the tested range separately from peer constraints. Pi-coupled experimental subagent capabilities must preflight against the actual host and fail closed with a precise compatibility diagnostic when required APIs are unavailable; ordinary stacks and profiles should remain usable.
|
|
85
|
+
|
|
86
|
+
## Package boundaries
|
|
87
|
+
|
|
88
|
+
- `@jadelclemens/pi-forge` is the Pi extension (default export) and the stable macro/slot registration surface; no other root exports or `src/*` aliases exist.
|
|
89
|
+
- `@jadelclemens/pi-forge/subagent` is the experimental versioned host-port entry point (wire DTOs, validators, transport, client/host lifecycle, canonical fingerprints).
|
|
90
|
+
- `@zihanw/pi-forge-subagents` is the optional package owning subagent execution, configuration, and the 0.4 execution contract.
|
|
91
|
+
- `@zihanw/pi-subagent-runtime` owns execution lifecycle and fresh-process backends (a dependency of the optional package, not of the main package).
|
|
92
|
+
|
|
93
|
+
See the [public API policy](../reference/public-api.md).
|
|
94
|
+
|
|
95
|
+
### Coherent fixtures versus fresh consumers
|
|
96
|
+
|
|
97
|
+
Compatibility CI pins the four SDKs and, for 1.x, codemode/MCP/telemetry/chord to the same exact version and asserts resolved versions. These are explicit coherent fixtures, not ordinary fresh consumer resolution. By default the packed check keeps normal npm resolution and verifies the installed four-SDK family; the ordinary 1.6.0 jobs (all three platforms) are the unconstrained normal-consumer gate. Compatibility lanes set `PI_TEST_COHERENT_UPSTREAM=1`, which also pins codemode/MCP/telemetry/chord to the host version inside the packed consumers and is printed in the log. This is required because fresh unconstrained installs of Pi 1.0.1–1.1.x now resolve their caret ranges to newer, incompatible upstream releases (observed 2026-10-20: Pi 1.1.0 + pi-codemode 1.3.0 fails with a missing `MCP_TYPESCRIPT_PREAMBLE` export) independently of Forge. Fixture success on those lanes says Forge works on that host family; it does not claim that a fresh unconstrained install of that old Pi works.
|
|
98
|
+
|
|
99
|
+
Pi 1.3 pins its internal Pi dependencies exactly; normal 1.3 consumers resolve the four SDKs plus codemode/MCP/telemetry to 1.3.0 without a fixture overlay. Real-SDK regressions cover default/modifier transcript tool restoration, resumed Preset initial/allow/deny policy, Capability additions, and disabling a Preset back to the policy owner's saved startup baseline (with distinguishable external changes reconciled). Those 0.5.9 restoration changes did not change execution authorization or enable every default-active extension tool on resume. Forge 0.5.10 separately adds [effective-set execution authorization](../reference/capabilities.md#execution-authorization-forge-0510).
|