@blxzer/pactile 0.5.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 +602 -0
- package/LICENSE +235 -0
- package/README.md +115 -0
- package/README.zh-CN.md +115 -0
- package/bin/compat-warning.js +11 -0
- package/bin/cstl.js +6 -0
- package/bin/pactile.js +3 -0
- package/bin/smart-search.js +38 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +362 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/capability-smoke.d.ts +24 -0
- package/dist/commands/capability-smoke.d.ts.map +1 -0
- package/dist/commands/capability-smoke.js +83 -0
- package/dist/commands/capability-smoke.js.map +1 -0
- package/dist/commands/channel/adapters/claude.d.ts +29 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
- package/dist/commands/channel/adapters/claude.js +203 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -0
- package/dist/commands/channel/adapters/codex.d.ts +85 -0
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
- package/dist/commands/channel/adapters/codex.js +505 -0
- package/dist/commands/channel/adapters/codex.js.map +1 -0
- package/dist/commands/channel/adapters/index.d.ts +84 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -0
- package/dist/commands/channel/adapters/index.js +115 -0
- package/dist/commands/channel/adapters/index.js.map +1 -0
- package/dist/commands/channel/adapters/types.d.ts +33 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -0
- package/dist/commands/channel/adapters/types.js +2 -0
- package/dist/commands/channel/adapters/types.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +32 -0
- package/dist/commands/channel/agent-loader.d.ts.map +1 -0
- package/dist/commands/channel/agent-loader.js +154 -0
- package/dist/commands/channel/agent-loader.js.map +1 -0
- package/dist/commands/channel/context-loader.d.ts +26 -0
- package/dist/commands/channel/context-loader.d.ts.map +1 -0
- package/dist/commands/channel/context-loader.js +290 -0
- package/dist/commands/channel/context-loader.js.map +1 -0
- package/dist/commands/channel/context.d.ts +16 -0
- package/dist/commands/channel/context.d.ts.map +1 -0
- package/dist/commands/channel/context.js +83 -0
- package/dist/commands/channel/context.js.map +1 -0
- package/dist/commands/channel/create.d.ts +27 -0
- package/dist/commands/channel/create.d.ts.map +1 -0
- package/dist/commands/channel/create.js +39 -0
- package/dist/commands/channel/create.js.map +1 -0
- package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
- package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
- package/dist/commands/channel/dev-parse-trace.js +70 -0
- package/dist/commands/channel/dev-parse-trace.js.map +1 -0
- package/dist/commands/channel/guard.d.ts +150 -0
- package/dist/commands/channel/guard.d.ts.map +1 -0
- package/dist/commands/channel/guard.js +475 -0
- package/dist/commands/channel/guard.js.map +1 -0
- package/dist/commands/channel/index.d.ts +3 -0
- package/dist/commands/channel/index.d.ts.map +1 -0
- package/dist/commands/channel/index.js +531 -0
- package/dist/commands/channel/index.js.map +1 -0
- package/dist/commands/channel/interrupt.d.ts +10 -0
- package/dist/commands/channel/interrupt.d.ts.map +1 -0
- package/dist/commands/channel/interrupt.js +22 -0
- package/dist/commands/channel/interrupt.js.map +1 -0
- package/dist/commands/channel/kill.d.ts +7 -0
- package/dist/commands/channel/kill.d.ts.map +1 -0
- package/dist/commands/channel/kill.js +121 -0
- package/dist/commands/channel/kill.js.map +1 -0
- package/dist/commands/channel/list.d.ts +17 -0
- package/dist/commands/channel/list.d.ts.map +1 -0
- package/dist/commands/channel/list.js +233 -0
- package/dist/commands/channel/list.js.map +1 -0
- package/dist/commands/channel/messages.d.ts +15 -0
- package/dist/commands/channel/messages.d.ts.map +1 -0
- package/dist/commands/channel/messages.js +245 -0
- package/dist/commands/channel/messages.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +27 -0
- package/dist/commands/channel/rm.d.ts.map +1 -0
- package/dist/commands/channel/rm.js +216 -0
- package/dist/commands/channel/rm.js.map +1 -0
- package/dist/commands/channel/run.d.ts +30 -0
- package/dist/commands/channel/run.d.ts.map +1 -0
- package/dist/commands/channel/run.js +130 -0
- package/dist/commands/channel/run.js.map +1 -0
- package/dist/commands/channel/send.d.ts +11 -0
- package/dist/commands/channel/send.d.ts.map +1 -0
- package/dist/commands/channel/send.js +24 -0
- package/dist/commands/channel/send.js.map +1 -0
- package/dist/commands/channel/spawn.d.ts +40 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -0
- package/dist/commands/channel/spawn.js +242 -0
- package/dist/commands/channel/spawn.js.map +1 -0
- package/dist/commands/channel/store/events.d.ts +39 -0
- package/dist/commands/channel/store/events.d.ts.map +1 -0
- package/dist/commands/channel/store/events.js +87 -0
- package/dist/commands/channel/store/events.js.map +1 -0
- package/dist/commands/channel/store/filter.d.ts +3 -0
- package/dist/commands/channel/store/filter.d.ts.map +1 -0
- package/dist/commands/channel/store/filter.js +2 -0
- package/dist/commands/channel/store/filter.js.map +1 -0
- package/dist/commands/channel/store/lock.d.ts +23 -0
- package/dist/commands/channel/store/lock.d.ts.map +1 -0
- package/dist/commands/channel/store/lock.js +99 -0
- package/dist/commands/channel/store/lock.js.map +1 -0
- package/dist/commands/channel/store/paths.d.ts +63 -0
- package/dist/commands/channel/store/paths.d.ts.map +1 -0
- package/dist/commands/channel/store/paths.js +247 -0
- package/dist/commands/channel/store/paths.js.map +1 -0
- package/dist/commands/channel/store/schema.d.ts +27 -0
- package/dist/commands/channel/store/schema.d.ts.map +1 -0
- package/dist/commands/channel/store/schema.js +34 -0
- package/dist/commands/channel/store/schema.js.map +1 -0
- package/dist/commands/channel/store/thread-state.d.ts +5 -0
- package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
- package/dist/commands/channel/store/thread-state.js +16 -0
- package/dist/commands/channel/store/thread-state.js.map +1 -0
- package/dist/commands/channel/store/watch.d.ts +19 -0
- package/dist/commands/channel/store/watch.d.ts.map +1 -0
- package/dist/commands/channel/store/watch.js +146 -0
- package/dist/commands/channel/store/watch.js.map +1 -0
- package/dist/commands/channel/supervisor/idle.d.ts +46 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/idle.js +72 -0
- package/dist/commands/channel/supervisor/idle.js.map +1 -0
- package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/inbox.js +160 -0
- package/dist/commands/channel/supervisor/inbox.js.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.js +146 -0
- package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
- package/dist/commands/channel/supervisor/stdout.d.ts +51 -0
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/stdout.js +121 -0
- package/dist/commands/channel/supervisor/stdout.js.map +1 -0
- package/dist/commands/channel/supervisor/turns.d.ts +31 -0
- package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/turns.js +45 -0
- package/dist/commands/channel/supervisor/turns.js.map +1 -0
- package/dist/commands/channel/supervisor/warning.d.ts +48 -0
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/warning.js +77 -0
- package/dist/commands/channel/supervisor/warning.js.map +1 -0
- package/dist/commands/channel/supervisor.d.ts +59 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -0
- package/dist/commands/channel/supervisor.js +345 -0
- package/dist/commands/channel/supervisor.js.map +1 -0
- package/dist/commands/channel/text-body.d.ts +13 -0
- package/dist/commands/channel/text-body.d.ts.map +1 -0
- package/dist/commands/channel/text-body.js +47 -0
- package/dist/commands/channel/text-body.js.map +1 -0
- package/dist/commands/channel/threads.d.ts +39 -0
- package/dist/commands/channel/threads.d.ts.map +1 -0
- package/dist/commands/channel/threads.js +106 -0
- package/dist/commands/channel/threads.js.map +1 -0
- package/dist/commands/channel/title.d.ts +12 -0
- package/dist/commands/channel/title.d.ts.map +1 -0
- package/dist/commands/channel/title.js +24 -0
- package/dist/commands/channel/title.js.map +1 -0
- package/dist/commands/channel/wait.d.ts +17 -0
- package/dist/commands/channel/wait.d.ts.map +1 -0
- package/dist/commands/channel/wait.js +75 -0
- package/dist/commands/channel/wait.js.map +1 -0
- package/dist/commands/detach.d.ts +7 -0
- package/dist/commands/detach.d.ts.map +1 -0
- package/dist/commands/detach.js +31 -0
- package/dist/commands/detach.js.map +1 -0
- package/dist/commands/init.d.ts +51 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1660 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/migrate.d.ts +10 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +38 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/purge.d.ts +9 -0
- package/dist/commands/purge.d.ts.map +1 -0
- package/dist/commands/purge.js +29 -0
- package/dist/commands/purge.js.map +1 -0
- package/dist/commands/rollback.d.ts +7 -0
- package/dist/commands/rollback.d.ts.map +1 -0
- package/dist/commands/rollback.js +27 -0
- package/dist/commands/rollback.js.map +1 -0
- package/dist/commands/rollout.d.ts +34 -0
- package/dist/commands/rollout.d.ts.map +1 -0
- package/dist/commands/rollout.js +102 -0
- package/dist/commands/rollout.js.map +1 -0
- package/dist/commands/uninstall.d.ts +23 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +68 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +139 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +2459 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/upgrade.d.ts +28 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +84 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/validate-rules.d.ts +6 -0
- package/dist/commands/validate-rules.d.ts.map +1 -0
- package/dist/commands/validate-rules.js +33 -0
- package/dist/commands/validate-rules.js.map +1 -0
- package/dist/commands/workflow.d.ts +35 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +220 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/configurators/cursor.d.ts +21 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +51 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/index.d.ts +68 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +170 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/shared.d.ts +200 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +602 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/workflow.d.ts +45 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +256 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +93 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +106 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +62 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +187 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.0.json +9 -0
- package/dist/migrations/manifests/0.1.1.json +9 -0
- package/dist/migrations/manifests/0.1.2.json +9 -0
- package/dist/migrations/manifests/0.1.3.json +9 -0
- package/dist/migrations/manifests/0.1.4.json +9 -0
- package/dist/migrations/manifests/0.2.1.json +9 -0
- package/dist/migrations/manifests/0.2.10.json +374 -0
- package/dist/migrations/manifests/0.2.2.json +9 -0
- package/dist/migrations/manifests/0.2.3.json +9 -0
- package/dist/migrations/manifests/0.2.4.json +9 -0
- package/dist/migrations/manifests/0.2.5.json +9 -0
- package/dist/migrations/manifests/0.2.6.json +9 -0
- package/dist/migrations/manifests/0.2.7.json +9 -0
- package/dist/migrations/manifests/0.2.8.json +9 -0
- package/dist/migrations/manifests/0.2.9.json +9 -0
- package/dist/migrations/manifests/0.3.0.json +89 -0
- package/dist/migrations/manifests/0.3.1.json +32 -0
- package/dist/migrations/manifests/0.3.2.json +16 -0
- package/dist/migrations/manifests/0.3.3.json +9 -0
- package/dist/migrations/manifests/0.3.4.json +9 -0
- package/dist/migrations/manifests/0.3.5.json +9 -0
- package/dist/migrations/manifests/0.3.6.json +9 -0
- package/dist/migrations/manifests/0.4.0.json +9 -0
- package/dist/migrations/manifests/0.4.1.json +9 -0
- package/dist/migrations/manifests/0.4.2.json +9 -0
- package/dist/migrations/manifests/0.4.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.0.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.5.json +9 -0
- package/dist/pactile/adapters/codex/index.d.ts +75 -0
- package/dist/pactile/adapters/codex/index.d.ts.map +1 -0
- package/dist/pactile/adapters/codex/index.js +269 -0
- package/dist/pactile/adapters/codex/index.js.map +1 -0
- package/dist/pactile/adapters/cursor/index.d.ts +60 -0
- package/dist/pactile/adapters/cursor/index.d.ts.map +1 -0
- package/dist/pactile/adapters/cursor/index.js +186 -0
- package/dist/pactile/adapters/cursor/index.js.map +1 -0
- package/dist/pactile/adapters/index.d.ts +4 -0
- package/dist/pactile/adapters/index.d.ts.map +1 -0
- package/dist/pactile/adapters/index.js +4 -0
- package/dist/pactile/adapters/index.js.map +1 -0
- package/dist/pactile/adoption/bindings.d.ts +20 -0
- package/dist/pactile/adoption/bindings.d.ts.map +1 -0
- package/dist/pactile/adoption/bindings.js +99 -0
- package/dist/pactile/adoption/bindings.js.map +1 -0
- package/dist/pactile/adoption/discovery.d.ts +8 -0
- package/dist/pactile/adoption/discovery.d.ts.map +1 -0
- package/dist/pactile/adoption/discovery.js +159 -0
- package/dist/pactile/adoption/discovery.js.map +1 -0
- package/dist/pactile/adoption/inventory.d.ts +28 -0
- package/dist/pactile/adoption/inventory.d.ts.map +1 -0
- package/dist/pactile/adoption/inventory.js +261 -0
- package/dist/pactile/adoption/inventory.js.map +1 -0
- package/dist/pactile/adoption/safety.d.ts +19 -0
- package/dist/pactile/adoption/safety.d.ts.map +1 -0
- package/dist/pactile/adoption/safety.js +88 -0
- package/dist/pactile/adoption/safety.js.map +1 -0
- package/dist/pactile/adoption/workflow.d.ts +31 -0
- package/dist/pactile/adoption/workflow.d.ts.map +1 -0
- package/dist/pactile/adoption/workflow.js +259 -0
- package/dist/pactile/adoption/workflow.js.map +1 -0
- package/dist/pactile/compat/cli-options.d.ts +9 -0
- package/dist/pactile/compat/cli-options.d.ts.map +1 -0
- package/dist/pactile/compat/cli-options.js +9 -0
- package/dist/pactile/compat/cli-options.js.map +1 -0
- package/dist/pactile/compat/init-context.d.ts +16 -0
- package/dist/pactile/compat/init-context.d.ts.map +1 -0
- package/dist/pactile/compat/init-context.js +87 -0
- package/dist/pactile/compat/init-context.js.map +1 -0
- package/dist/pactile/compat/legacy-migrations.d.ts +8 -0
- package/dist/pactile/compat/legacy-migrations.d.ts.map +1 -0
- package/dist/pactile/compat/legacy-migrations.js +17 -0
- package/dist/pactile/compat/legacy-migrations.js.map +1 -0
- package/dist/pactile/compat/retired-alternate-client.d.ts +42 -0
- package/dist/pactile/compat/retired-alternate-client.d.ts.map +1 -0
- package/dist/pactile/compat/retired-alternate-client.js +153 -0
- package/dist/pactile/compat/retired-alternate-client.js.map +1 -0
- package/dist/pactile/compat/update-residue.d.ts +4 -0
- package/dist/pactile/compat/update-residue.d.ts.map +1 -0
- package/dist/pactile/compat/update-residue.js +55 -0
- package/dist/pactile/compat/update-residue.js.map +1 -0
- package/dist/pactile/exit/index.d.ts +3 -0
- package/dist/pactile/exit/index.d.ts.map +1 -0
- package/dist/pactile/exit/index.js +3 -0
- package/dist/pactile/exit/index.js.map +1 -0
- package/dist/pactile/exit/receipt.d.ts +23 -0
- package/dist/pactile/exit/receipt.d.ts.map +1 -0
- package/dist/pactile/exit/receipt.js +64 -0
- package/dist/pactile/exit/receipt.js.map +1 -0
- package/dist/pactile/exit/service.d.ts +107 -0
- package/dist/pactile/exit/service.d.ts.map +1 -0
- package/dist/pactile/exit/service.js +774 -0
- package/dist/pactile/exit/service.js.map +1 -0
- package/dist/pactile/index.d.ts +26 -0
- package/dist/pactile/index.d.ts.map +1 -0
- package/dist/pactile/index.js +22 -0
- package/dist/pactile/index.js.map +1 -0
- package/dist/pactile/lifecycle/command-runner.d.ts +26 -0
- package/dist/pactile/lifecycle/command-runner.d.ts.map +1 -0
- package/dist/pactile/lifecycle/command-runner.js +129 -0
- package/dist/pactile/lifecycle/command-runner.js.map +1 -0
- package/dist/pactile/lifecycle/default-adapters.d.ts +5 -0
- package/dist/pactile/lifecycle/default-adapters.d.ts.map +1 -0
- package/dist/pactile/lifecycle/default-adapters.js +136 -0
- package/dist/pactile/lifecycle/default-adapters.js.map +1 -0
- package/dist/pactile/lifecycle/index.d.ts +6 -0
- package/dist/pactile/lifecycle/index.d.ts.map +1 -0
- package/dist/pactile/lifecycle/index.js +6 -0
- package/dist/pactile/lifecycle/index.js.map +1 -0
- package/dist/pactile/lifecycle/legacy-import.d.ts +16 -0
- package/dist/pactile/lifecycle/legacy-import.d.ts.map +1 -0
- package/dist/pactile/lifecycle/legacy-import.js +228 -0
- package/dist/pactile/lifecycle/legacy-import.js.map +1 -0
- package/dist/pactile/lifecycle/orchestrator.d.ts +109 -0
- package/dist/pactile/lifecycle/orchestrator.d.ts.map +1 -0
- package/dist/pactile/lifecycle/orchestrator.js +1030 -0
- package/dist/pactile/lifecycle/orchestrator.js.map +1 -0
- package/dist/pactile/lifecycle/project-files.d.ts +28 -0
- package/dist/pactile/lifecycle/project-files.d.ts.map +1 -0
- package/dist/pactile/lifecycle/project-files.js +297 -0
- package/dist/pactile/lifecycle/project-files.js.map +1 -0
- package/dist/pactile/middleware/index.d.ts +3 -0
- package/dist/pactile/middleware/index.d.ts.map +1 -0
- package/dist/pactile/middleware/index.js +2 -0
- package/dist/pactile/middleware/index.js.map +1 -0
- package/dist/pactile/middleware/manifest-loader.d.ts +22 -0
- package/dist/pactile/middleware/manifest-loader.d.ts.map +1 -0
- package/dist/pactile/middleware/manifest-loader.js +228 -0
- package/dist/pactile/middleware/manifest-loader.js.map +1 -0
- package/dist/pactile/migration/index.d.ts +2 -0
- package/dist/pactile/migration/index.d.ts.map +1 -0
- package/dist/pactile/migration/index.js +2 -0
- package/dist/pactile/migration/index.js.map +1 -0
- package/dist/pactile/migration/transaction.d.ts +54 -0
- package/dist/pactile/migration/transaction.d.ts.map +1 -0
- package/dist/pactile/migration/transaction.js +445 -0
- package/dist/pactile/migration/transaction.js.map +1 -0
- package/dist/pactile/projection/managed-block.d.ts +32 -0
- package/dist/pactile/projection/managed-block.d.ts.map +1 -0
- package/dist/pactile/projection/managed-block.js +78 -0
- package/dist/pactile/projection/managed-block.js.map +1 -0
- package/dist/pactile/projection/planner.d.ts +65 -0
- package/dist/pactile/projection/planner.d.ts.map +1 -0
- package/dist/pactile/projection/planner.js +349 -0
- package/dist/pactile/projection/planner.js.map +1 -0
- package/dist/pactile/projection/shared/index.d.ts +38 -0
- package/dist/pactile/projection/shared/index.d.ts.map +1 -0
- package/dist/pactile/projection/shared/index.js +186 -0
- package/dist/pactile/projection/shared/index.js.map +1 -0
- package/dist/pactile/projection/store.d.ts +72 -0
- package/dist/pactile/projection/store.d.ts.map +1 -0
- package/dist/pactile/projection/store.js +669 -0
- package/dist/pactile/projection/store.js.map +1 -0
- package/dist/pactile/projection/structured-merge.d.ts +11 -0
- package/dist/pactile/projection/structured-merge.d.ts.map +1 -0
- package/dist/pactile/projection/structured-merge.js +347 -0
- package/dist/pactile/projection/structured-merge.js.map +1 -0
- package/dist/pactile/providers/index.d.ts +3 -0
- package/dist/pactile/providers/index.d.ts.map +1 -0
- package/dist/pactile/providers/index.js +3 -0
- package/dist/pactile/providers/index.js.map +1 -0
- package/dist/pactile/providers/probes.d.ts +55 -0
- package/dist/pactile/providers/probes.d.ts.map +1 -0
- package/dist/pactile/providers/probes.js +164 -0
- package/dist/pactile/providers/probes.js.map +1 -0
- package/dist/pactile/registry.d.ts +64 -0
- package/dist/pactile/registry.d.ts.map +1 -0
- package/dist/pactile/registry.js +196 -0
- package/dist/pactile/registry.js.map +1 -0
- package/dist/pactile/retrieval/boundary.d.ts +18 -0
- package/dist/pactile/retrieval/boundary.d.ts.map +1 -0
- package/dist/pactile/retrieval/boundary.js +113 -0
- package/dist/pactile/retrieval/boundary.js.map +1 -0
- package/dist/pactile/retrieval/evidence.d.ts +9 -0
- package/dist/pactile/retrieval/evidence.d.ts.map +1 -0
- package/dist/pactile/retrieval/evidence.js +327 -0
- package/dist/pactile/retrieval/evidence.js.map +1 -0
- package/dist/pactile/retrieval/index.d.ts +4 -0
- package/dist/pactile/retrieval/index.d.ts.map +1 -0
- package/dist/pactile/retrieval/index.js +4 -0
- package/dist/pactile/retrieval/index.js.map +1 -0
- package/dist/pactile/retrieval/planner.d.ts +23 -0
- package/dist/pactile/retrieval/planner.d.ts.map +1 -0
- package/dist/pactile/retrieval/planner.js +702 -0
- package/dist/pactile/retrieval/planner.js.map +1 -0
- package/dist/pactile/retrieval/types.d.ts +108 -0
- package/dist/pactile/retrieval/types.d.ts.map +1 -0
- package/dist/pactile/retrieval/types.js +36 -0
- package/dist/pactile/retrieval/types.js.map +1 -0
- package/dist/pactile/runtime/case-fold.d.ts +2 -0
- package/dist/pactile/runtime/case-fold.d.ts.map +1 -0
- package/dist/pactile/runtime/case-fold.js +31 -0
- package/dist/pactile/runtime/case-fold.js.map +1 -0
- package/dist/pactile/runtime/index.d.ts +8 -0
- package/dist/pactile/runtime/index.d.ts.map +1 -0
- package/dist/pactile/runtime/index.js +5 -0
- package/dist/pactile/runtime/index.js.map +1 -0
- package/dist/pactile/runtime/json-api.d.ts +15 -0
- package/dist/pactile/runtime/json-api.d.ts.map +1 -0
- package/dist/pactile/runtime/json-api.js +68 -0
- package/dist/pactile/runtime/json-api.js.map +1 -0
- package/dist/pactile/runtime/paths.d.ts +59 -0
- package/dist/pactile/runtime/paths.d.ts.map +1 -0
- package/dist/pactile/runtime/paths.js +201 -0
- package/dist/pactile/runtime/paths.js.map +1 -0
- package/dist/pactile/runtime/stores.d.ts +54 -0
- package/dist/pactile/runtime/stores.d.ts.map +1 -0
- package/dist/pactile/runtime/stores.js +375 -0
- package/dist/pactile/runtime/stores.js.map +1 -0
- package/dist/pactile/runtime/unicode-nfc-data.d.ts +12 -0
- package/dist/pactile/runtime/unicode-nfc-data.d.ts.map +1 -0
- package/dist/pactile/runtime/unicode-nfc-data.js +8 -0
- package/dist/pactile/runtime/unicode-nfc-data.js.map +1 -0
- package/dist/pactile/runtime/unicode-nfc.d.ts +3 -0
- package/dist/pactile/runtime/unicode-nfc.d.ts.map +1 -0
- package/dist/pactile/runtime/unicode-nfc.js +77 -0
- package/dist/pactile/runtime/unicode-nfc.js.map +1 -0
- package/dist/pactile/tiles/catalog.d.ts +35 -0
- package/dist/pactile/tiles/catalog.d.ts.map +1 -0
- package/dist/pactile/tiles/catalog.js +235 -0
- package/dist/pactile/tiles/catalog.js.map +1 -0
- package/dist/pactile/tiles/compiler.d.ts +54 -0
- package/dist/pactile/tiles/compiler.d.ts.map +1 -0
- package/dist/pactile/tiles/compiler.js +270 -0
- package/dist/pactile/tiles/compiler.js.map +1 -0
- package/dist/pactile/tiles/content/baseline/index.d.ts +5 -0
- package/dist/pactile/tiles/content/baseline/index.d.ts.map +1 -0
- package/dist/pactile/tiles/content/baseline/index.js +115 -0
- package/dist/pactile/tiles/content/baseline/index.js.map +1 -0
- package/dist/pactile/tiles/content/index.d.ts +4 -0
- package/dist/pactile/tiles/content/index.d.ts.map +1 -0
- package/dist/pactile/tiles/content/index.js +4 -0
- package/dist/pactile/tiles/content/index.js.map +1 -0
- package/dist/pactile/tiles/content/ondemand/index.d.ts +5 -0
- package/dist/pactile/tiles/content/ondemand/index.d.ts.map +1 -0
- package/dist/pactile/tiles/content/ondemand/index.js +184 -0
- package/dist/pactile/tiles/content/ondemand/index.js.map +1 -0
- package/dist/pactile/tiles/content/source.d.ts +29 -0
- package/dist/pactile/tiles/content/source.d.ts.map +1 -0
- package/dist/pactile/tiles/content/source.js +86 -0
- package/dist/pactile/tiles/content/source.js.map +1 -0
- package/dist/pactile/tiles/loader.d.ts +31 -0
- package/dist/pactile/tiles/loader.d.ts.map +1 -0
- package/dist/pactile/tiles/loader.js +139 -0
- package/dist/pactile/tiles/loader.js.map +1 -0
- package/dist/pactile/tiles/safe-yaml.d.ts +11 -0
- package/dist/pactile/tiles/safe-yaml.d.ts.map +1 -0
- package/dist/pactile/tiles/safe-yaml.js +212 -0
- package/dist/pactile/tiles/safe-yaml.js.map +1 -0
- package/dist/templates/common/bundled-skills/pactile-check/SKILL.md +161 -0
- package/dist/templates/common/bundled-skills/pactile-check/references/fowler-12-smells.md +28 -0
- package/dist/templates/common/bundled-skills/pactile-handoff/SKILL.md +117 -0
- package/dist/templates/common/bundled-skills/pactile-meta/SKILL.md +75 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/add-project-local-conventions.md +83 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-agents.md +47 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-context-loading.md +84 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-hooks.md +57 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-skills-or-commands.md +77 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-spec-structure.md +83 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-task-lifecycle.md +88 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-workflow.md +65 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/overview.md +55 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/context-injection.md +68 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/generated-files.md +83 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/overview.md +51 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/spec-system.md +102 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/task-system.md +133 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workflow.md +75 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workspace-memory.md +71 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/agents.md +69 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/hooks-and-settings.md +59 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/overview.md +45 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/platform-map.md +45 -0
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/skills-and-commands.md +108 -0
- package/dist/templates/common/bundled-skills/pactile-micro-grill/SKILL.md +68 -0
- package/dist/templates/common/bundled-skills/pactile-skill-creator/SKILL.md +47 -0
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/authoring-rules.md +171 -0
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/general-authoring.md +189 -0
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/pactile-skill-locations.md +52 -0
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/review-checklist.md +52 -0
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/SKILL.md +41 -0
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/mcp-setup.md +90 -0
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/repository-analysis.md +59 -0
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-task-planning.md +61 -0
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-writing.md +70 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +393 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/batch-search.md +98 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/evidence-gathering.md +89 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/references/cli-contract.md +323 -0
- package/dist/templates/common/commands/continue.md +62 -0
- package/dist/templates/common/commands/finish-work.md +82 -0
- package/dist/templates/common/commands/start.md +66 -0
- package/dist/templates/common/index.d.ts +68 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +123 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +179 -0
- package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +149 -0
- package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +904 -0
- package/dist/templates/common/skills/before-dev.md +35 -0
- package/dist/templates/common/skills/brainstorm.md +204 -0
- package/dist/templates/common/skills/break-loop.md +125 -0
- package/dist/templates/common/skills/update-spec.md +364 -0
- package/dist/templates/cursor/agents/pactile-check.md +58 -0
- package/dist/templates/cursor/agents/pactile-implement.md +56 -0
- package/dist/templates/cursor/agents/pactile-research.md +51 -0
- package/dist/templates/cursor/commands/handoff.md +101 -0
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +14 -0
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -0
- package/dist/templates/cursor/fixtures/expected-rules.js +20 -0
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -0
- package/dist/templates/cursor/hooks.json +52 -0
- package/dist/templates/cursor/index.d.ts +19 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +19 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/cursor/rules/pactile-bootstrap.mdc +18 -0
- package/dist/templates/cursor/worktrees.json +11 -0
- package/dist/templates/extract.d.ts +38 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +120 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/markdown/agents.md +14 -0
- package/dist/templates/markdown/framework/artifact-locale-guide.md.txt +93 -0
- package/dist/templates/markdown/framework/cursor-context-injection-guide.md.txt +85 -0
- package/dist/templates/markdown/framework/cursor-native-modes-guide.md.txt +239 -0
- package/dist/templates/markdown/framework/cursor-semantic-compliance.md.txt +41 -0
- package/dist/templates/markdown/framework/cursor-subagent-policy.md.txt +90 -0
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +28 -0
- package/dist/templates/markdown/framework/execution-strategy.md.txt +45 -0
- package/dist/templates/markdown/framework/index.md.txt +31 -0
- package/dist/templates/markdown/framework/injection-budget-guide.md.txt +111 -0
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +45 -0
- package/dist/templates/markdown/framework/middleware-protocol.md.txt +238 -0
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +116 -0
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +105 -0
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
- package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +199 -0
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
- package/dist/templates/markdown/framework/verification-strength-guide.md.txt +185 -0
- package/dist/templates/markdown/gitignore.txt +15 -0
- package/dist/templates/markdown/index.d.ts +59 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +144 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +25 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +174 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +162 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -0
- package/dist/templates/markdown/spec/guides/debug-loop-guide.md.txt +227 -0
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +76 -0
- package/dist/templates/markdown/spec/guides/e2e-walkthrough-guide.md.txt +93 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +131 -0
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +139 -0
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +179 -0
- package/dist/templates/markdown/workspace-index.md +125 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/pactile/CONTEXT.md +113 -0
- package/dist/templates/pactile/config/execution-strategy-rules.json +31 -0
- package/dist/templates/pactile/config.yaml +130 -0
- package/dist/templates/pactile/docs/adr/README.md +21 -0
- package/dist/templates/pactile/gitignore.txt +35 -0
- package/dist/templates/pactile/index.d.ts +134 -0
- package/dist/templates/pactile/index.d.ts.map +1 -0
- package/dist/templates/pactile/index.js +316 -0
- package/dist/templates/pactile/index.js.map +1 -0
- package/dist/templates/pactile/modules/approval-personal/contract.md +43 -0
- package/dist/templates/pactile/modules/candidate-pool/contract.md +37 -0
- package/dist/templates/pactile/modules/catalog.d.ts +32 -0
- package/dist/templates/pactile/modules/catalog.d.ts.map +1 -0
- package/dist/templates/pactile/modules/catalog.js +46 -0
- package/dist/templates/pactile/modules/catalog.js.map +1 -0
- package/dist/templates/pactile/modules/close-basic/contract.md +38 -0
- package/dist/templates/pactile/modules/context-progressive/contract.md +44 -0
- package/dist/templates/pactile/modules/debug-recovery/contract.md +44 -0
- package/dist/templates/pactile/modules/define-basic/contract.md +39 -0
- package/dist/templates/pactile/modules/define-extended/contract.md +45 -0
- package/dist/templates/pactile/modules/execute-agent/contract.md +38 -0
- package/dist/templates/pactile/modules/independent-check/contract.md +35 -0
- package/dist/templates/pactile/modules/index.json +133 -0
- package/dist/templates/pactile/modules/intake-basic/contract.md +34 -0
- package/dist/templates/pactile/modules/observability-local/contract.md +31 -0
- package/dist/templates/pactile/modules/parent-child/contract.md +45 -0
- package/dist/templates/pactile/modules/personal-memory/contract.md +56 -0
- package/dist/templates/pactile/modules/retention-storage/contract.md +43 -0
- package/dist/templates/pactile/modules/retrieval-extended/contract.md +77 -0
- package/dist/templates/pactile/modules/session-transfer/contract.md +41 -0
- package/dist/templates/pactile/modules/spec-learning/contract.md +50 -0
- package/dist/templates/pactile/modules/vcs-integration/contract.md +46 -0
- package/dist/templates/pactile/modules/verify-basic/contract.md +38 -0
- package/dist/templates/pactile/modules/worker-orchestration/contract.md +47 -0
- package/dist/templates/pactile/pool/README.md +149 -0
- package/dist/templates/pactile/pool/items/.gitkeep +0 -0
- package/dist/templates/pactile/pool/plan.md +50 -0
- package/dist/templates/pactile/scripts/__init__.py +5 -0
- package/dist/templates/pactile/scripts/add_session.py +547 -0
- package/dist/templates/pactile/scripts/build_context_pack.py +17 -0
- package/dist/templates/pactile/scripts/build_retrieval_pack.py +376 -0
- package/dist/templates/pactile/scripts/codegraph_session_smoke.py +76 -0
- package/dist/templates/pactile/scripts/common/__init__.py +103 -0
- package/dist/templates/pactile/scripts/common/active_task.py +576 -0
- package/dist/templates/pactile/scripts/common/adapter_middleware.py +1373 -0
- package/dist/templates/pactile/scripts/common/artifact_locale.py +303 -0
- package/dist/templates/pactile/scripts/common/artifact_search.py +587 -0
- package/dist/templates/pactile/scripts/common/cli_adapter.py +135 -0
- package/dist/templates/pactile/scripts/common/cli_environment.py +155 -0
- package/dist/templates/pactile/scripts/common/codebase_retrieval_router.py +1339 -0
- package/dist/templates/pactile/scripts/common/config.py +497 -0
- package/dist/templates/pactile/scripts/common/context_pack.py +371 -0
- package/dist/templates/pactile/scripts/common/cursor_retrieval_env.py +31 -0
- package/dist/templates/pactile/scripts/common/developer.py +190 -0
- package/dist/templates/pactile/scripts/common/execution_strategy.py +268 -0
- package/dist/templates/pactile/scripts/common/full_quality.py +237 -0
- package/dist/templates/pactile/scripts/common/git.py +37 -0
- package/dist/templates/pactile/scripts/common/git_context.py +198 -0
- package/dist/templates/pactile/scripts/common/injection_budget.py +317 -0
- package/dist/templates/pactile/scripts/common/io.py +37 -0
- package/dist/templates/pactile/scripts/common/kernel_command.py +369 -0
- package/dist/templates/pactile/scripts/common/lite_context.py +280 -0
- package/dist/templates/pactile/scripts/common/log.py +45 -0
- package/dist/templates/pactile/scripts/common/ondemand_topology.py +419 -0
- package/dist/templates/pactile/scripts/common/packages_context.py +239 -0
- package/dist/templates/pactile/scripts/common/pactile_config.py +131 -0
- package/dist/templates/pactile/scripts/common/parallel_declaration.py +369 -0
- package/dist/templates/pactile/scripts/common/parent_orchestration.py +1198 -0
- package/dist/templates/pactile/scripts/common/paths.py +756 -0
- package/dist/templates/pactile/scripts/common/pool_refs.py +119 -0
- package/dist/templates/pactile/scripts/common/pool_slice.py +269 -0
- package/dist/templates/pactile/scripts/common/pool_store.py +766 -0
- package/dist/templates/pactile/scripts/common/project_file_stats.py +91 -0
- package/dist/templates/pactile/scripts/common/retrieval_adapter_metadata.py +943 -0
- package/dist/templates/pactile/scripts/common/retrieval_agent_instructions.py +123 -0
- package/dist/templates/pactile/scripts/common/retrieval_evidence.py +915 -0
- package/dist/templates/pactile/scripts/common/retrieval_pack.py +422 -0
- package/dist/templates/pactile/scripts/common/retrieval_pack_context.py +122 -0
- package/dist/templates/pactile/scripts/common/retrieval_plan_gate.py +61 -0
- package/dist/templates/pactile/scripts/common/retrieval_result_ranking.py +104 -0
- package/dist/templates/pactile/scripts/common/retrieval_tool_classification.py +166 -0
- package/dist/templates/pactile/scripts/common/safe_commit.py +285 -0
- package/dist/templates/pactile/scripts/common/semantic_plan_gate.py +53 -0
- package/dist/templates/pactile/scripts/common/session_context.py +1213 -0
- package/dist/templates/pactile/scripts/common/session_memory.py +386 -0
- package/dist/templates/pactile/scripts/common/session_pack.py +886 -0
- package/dist/templates/pactile/scripts/common/smart_search_evidence.py +514 -0
- package/dist/templates/pactile/scripts/common/smart_search_resolve.py +150 -0
- package/dist/templates/pactile/scripts/common/subagent_dispatch.py +592 -0
- package/dist/templates/pactile/scripts/common/task_context.py +241 -0
- package/dist/templates/pactile/scripts/common/task_dashboard.py +286 -0
- package/dist/templates/pactile/scripts/common/task_dependencies.py +648 -0
- package/dist/templates/pactile/scripts/common/task_gates.py +2478 -0
- package/dist/templates/pactile/scripts/common/task_map.py +703 -0
- package/dist/templates/pactile/scripts/common/task_queue.py +188 -0
- package/dist/templates/pactile/scripts/common/task_store.py +2252 -0
- package/dist/templates/pactile/scripts/common/task_utils.py +274 -0
- package/dist/templates/pactile/scripts/common/tasks.py +231 -0
- package/dist/templates/pactile/scripts/common/test_adapter_middleware.py +199 -0
- package/dist/templates/pactile/scripts/common/test_depends_mode_block.py +509 -0
- package/dist/templates/pactile/scripts/common/test_full_quality.py +197 -0
- package/dist/templates/pactile/scripts/common/test_kernel_command.py +336 -0
- package/dist/templates/pactile/scripts/common/test_lite_path.py +190 -0
- package/dist/templates/pactile/scripts/common/test_observable_defaults.py +141 -0
- package/dist/templates/pactile/scripts/common/test_ondemand_topology.py +237 -0
- package/dist/templates/pactile/scripts/common/test_parallel_declaration.py +264 -0
- package/dist/templates/pactile/scripts/common/test_pool_slice.py +198 -0
- package/dist/templates/pactile/scripts/common/test_pool_store.py +452 -0
- package/dist/templates/pactile/scripts/common/test_retrieval_arbitration.py +331 -0
- package/dist/templates/pactile/scripts/common/test_task_dashboard.py +155 -0
- package/dist/templates/pactile/scripts/common/test_task_dependencies.py +329 -0
- package/dist/templates/pactile/scripts/common/test_task_store_kernel_patch.py +163 -0
- package/dist/templates/pactile/scripts/common/types.py +110 -0
- package/dist/templates/pactile/scripts/common/workflow_phase.py +194 -0
- package/dist/templates/pactile/scripts/compile_session_pack.py +15 -0
- package/dist/templates/pactile/scripts/cursor_retrieval_probe.py +64 -0
- package/dist/templates/pactile/scripts/cursor_retrieval_probe_prompt.md +33 -0
- package/dist/templates/pactile/scripts/generate_dispatch_prompt.py +182 -0
- package/dist/templates/pactile/scripts/get_context.py +19 -0
- package/dist/templates/pactile/scripts/get_developer.py +26 -0
- package/dist/templates/pactile/scripts/hooks/linear_sync.py +243 -0
- package/dist/templates/pactile/scripts/init_developer.py +51 -0
- package/dist/templates/pactile/scripts/injection_budget_probe.py +69 -0
- package/dist/templates/pactile/scripts/pool.py +237 -0
- package/dist/templates/pactile/scripts/rank_retrieval_candidates.py +98 -0
- package/dist/templates/pactile/scripts/retrieval_probe_matrix_template.json +43 -0
- package/dist/templates/pactile/scripts/route_codebase_retrieval.py +72 -0
- package/dist/templates/pactile/scripts/run_smart_search.py +12 -0
- package/dist/templates/pactile/scripts/score_evidence.py +131 -0
- package/dist/templates/pactile/scripts/search_artifacts.py +13 -0
- package/dist/templates/pactile/scripts/search_memory.py +12 -0
- package/dist/templates/pactile/scripts/spec_health_outcomes.py +160 -0
- package/dist/templates/pactile/scripts/task.py +1118 -0
- package/dist/templates/pactile/scripts/verify_evidence_probe.py +138 -0
- package/dist/templates/pactile/tasks/.gitkeep +0 -0
- package/dist/templates/pactile/tasks/locale/en/default-prd.md +27 -0
- package/dist/templates/pactile/tasks/locale/zh/default-prd.md +27 -0
- package/dist/templates/pactile/tasks/templates/release-execution/design.md +61 -0
- package/dist/templates/pactile/tasks/templates/release-execution/handoff-template.md +29 -0
- package/dist/templates/pactile/tasks/templates/release-execution/implement.md +29 -0
- package/dist/templates/pactile/tasks/templates/release-execution/prd.md +31 -0
- package/dist/templates/pactile/tasks/templates/release-readiness/design.md +50 -0
- package/dist/templates/pactile/tasks/templates/release-readiness/handoff-template.md +39 -0
- package/dist/templates/pactile/tasks/templates/release-readiness/implement.md +29 -0
- package/dist/templates/pactile/tasks/templates/release-readiness/prd.md +31 -0
- package/dist/templates/pactile/workflow.md +64 -0
- package/dist/templates/shared-hooks/event-bridge.py +121 -0
- package/dist/templates/shared-hooks/index.d.ts +50 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +96 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +217 -0
- package/dist/templates/shared-hooks/inject-shell-session-context.py +183 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +267 -0
- package/dist/templates/shared-hooks/inject-workflow-state.py +106 -0
- package/dist/templates/shared-hooks/rename-session-for-task.py +231 -0
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +345 -0
- package/dist/templates/shared-hooks/session-start.py +355 -0
- package/dist/templates/shared-hooks/spec-write-audit.py +173 -0
- package/dist/templates/template-utils.d.ts +28 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +83 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/types/ai-tools.d.ts +102 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +60 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +125 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/agents-md.d.ts +27 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +70 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.d.ts +31 -0
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +88 -0
- package/dist/utils/codebase-retrieval-router.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +86 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/cursor-retrieval-env.d.ts +17 -0
- package/dist/utils/cursor-retrieval-env.d.ts.map +1 -0
- package/dist/utils/cursor-retrieval-env.js +19 -0
- package/dist/utils/cursor-retrieval-env.js.map +1 -0
- package/dist/utils/cwd-guard.d.ts +38 -0
- package/dist/utils/cwd-guard.d.ts.map +1 -0
- package/dist/utils/cwd-guard.js +63 -0
- package/dist/utils/cwd-guard.js.map +1 -0
- package/dist/utils/file-writer.d.ts +36 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +203 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts +59 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -0
- package/dist/utils/manifest-prune.js +176 -0
- package/dist/utils/manifest-prune.js.map +1 -0
- package/dist/utils/mirror-check.d.ts +22 -0
- package/dist/utils/mirror-check.d.ts.map +1 -0
- package/dist/utils/mirror-check.js +90 -0
- package/dist/utils/mirror-check.js.map +1 -0
- package/dist/utils/normalize-text.d.ts +7 -0
- package/dist/utils/normalize-text.d.ts.map +1 -0
- package/dist/utils/normalize-text.js +16 -0
- package/dist/utils/normalize-text.js.map +1 -0
- package/dist/utils/p36-upgrade.d.ts +62 -0
- package/dist/utils/p36-upgrade.d.ts.map +1 -0
- package/dist/utils/p36-upgrade.js +165 -0
- package/dist/utils/p36-upgrade.js.map +1 -0
- package/dist/utils/posix.d.ts +13 -0
- package/dist/utils/posix.d.ts.map +1 -0
- package/dist/utils/posix.js +15 -0
- package/dist/utils/posix.js.map +1 -0
- package/dist/utils/post-update-smoke.d.ts +7 -0
- package/dist/utils/post-update-smoke.d.ts.map +1 -0
- package/dist/utils/post-update-smoke.js +40 -0
- package/dist/utils/post-update-smoke.js.map +1 -0
- package/dist/utils/project-capabilities.d.ts +82 -0
- package/dist/utils/project-capabilities.d.ts.map +1 -0
- package/dist/utils/project-capabilities.js +691 -0
- package/dist/utils/project-capabilities.js.map +1 -0
- package/dist/utils/project-detector.d.ts +46 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +666 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/proxy.d.ts +25 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/dist/utils/proxy.js +60 -0
- package/dist/utils/proxy.js.map +1 -0
- package/dist/utils/readiness.d.ts +40 -0
- package/dist/utils/readiness.d.ts.map +1 -0
- package/dist/utils/readiness.js +491 -0
- package/dist/utils/readiness.js.map +1 -0
- package/dist/utils/retrieval-agent-instructions.d.ts +10 -0
- package/dist/utils/retrieval-agent-instructions.d.ts.map +1 -0
- package/dist/utils/retrieval-agent-instructions.js +97 -0
- package/dist/utils/retrieval-agent-instructions.js.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts +53 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.js +116 -0
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -0
- package/dist/utils/retrieval-result-ranking.d.ts +34 -0
- package/dist/utils/retrieval-result-ranking.d.ts.map +1 -0
- package/dist/utils/retrieval-result-ranking.js +71 -0
- package/dist/utils/retrieval-result-ranking.js.map +1 -0
- package/dist/utils/retrieval-tool-classification.d.ts +18 -0
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -0
- package/dist/utils/retrieval-tool-classification.js +118 -0
- package/dist/utils/retrieval-tool-classification.js.map +1 -0
- package/dist/utils/semantic-plan-gate.d.ts +8 -0
- package/dist/utils/semantic-plan-gate.d.ts.map +1 -0
- package/dist/utils/semantic-plan-gate.js +24 -0
- package/dist/utils/semantic-plan-gate.js.map +1 -0
- package/dist/utils/task-json.d.ts +13 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +12 -0
- package/dist/utils/task-json.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +150 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +907 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +123 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +375 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +30 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -0
- package/dist/utils/uninstall-scrubbers.js +196 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -0
- package/dist/utils/update-rollout-report.d.ts +171 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -0
- package/dist/utils/update-rollout-report.js +126 -0
- package/dist/utils/update-rollout-report.js.map +1 -0
- package/dist/utils/validate-rules.d.ts +21 -0
- package/dist/utils/validate-rules.d.ts.map +1 -0
- package/dist/utils/validate-rules.js +88 -0
- package/dist/utils/validate-rules.js.map +1 -0
- package/dist/utils/workflow-dir.d.ts +15 -0
- package/dist/utils/workflow-dir.d.ts.map +1 -0
- package/dist/utils/workflow-dir.js +33 -0
- package/dist/utils/workflow-dir.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +86 -0
- package/dist/utils/workflow-resolver.d.ts.map +1 -0
- package/dist/utils/workflow-resolver.js +265 -0
- package/dist/utils/workflow-resolver.js.map +1 -0
- package/package.json +117 -0
- package/scripts/postinstall.js +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../../src/pactile/projection/planner.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,gBAAgB,GAAI,OAAO,UAAU,GAAG,MAAM,KAAG,MACA,CAAC;AAC/D,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AACrD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;CAClD;AACD,8GAA8G;AAC9G,MAAM,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,iBAAiB,CAAC;AACxE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACnC;AACD,MAAM,WAAW,kBAAkB;IACjC,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CAAC;IACzC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC3D;AAeD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG;IACxD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB,CAaA;AAED,uFAAuF;AACvF,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,oBAAoB,EAAE,EACtC,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAC3C,SAAS,oBAAoB,EAAE,CAyCjC;AAiCD,yFAAyF;AACzF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,gBAAgB,GACtB,uBAAuB,CAwSzB"}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { fingerprintPactileContractV1, parseOwnershipLedgerV1, parseProjectionPlanV1, } from "@blxzer/pactile-core";
|
|
3
|
+
import { mergeManagedBlock } from "./managed-block.js";
|
|
4
|
+
import { mergeJsonPointers, mergeTomlKeys, } from "./structured-merge.js";
|
|
5
|
+
export const fingerprintBytes = (bytes) => `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
|
|
6
|
+
/** Shared accepted artifact/output and persisted-file limit; includes stage recovery. */
|
|
7
|
+
export const MAX_PROJECTION_BYTES = 16 * 1024 * 1024;
|
|
8
|
+
const absent = {
|
|
9
|
+
state: "absent",
|
|
10
|
+
fingerprint: null,
|
|
11
|
+
contentRef: null,
|
|
12
|
+
};
|
|
13
|
+
const snapshot = (bytes, contentRef = null) => bytes === null
|
|
14
|
+
? absent
|
|
15
|
+
: { state: "present", fingerprint: fingerprintBytes(bytes), contentRef };
|
|
16
|
+
const lexical = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
17
|
+
export function canonicalOwnershipLedger(input) {
|
|
18
|
+
const parsed = parseOwnershipLedgerV1(input);
|
|
19
|
+
if (!parsed.success)
|
|
20
|
+
throw new Error("invalid-ownership-ledger");
|
|
21
|
+
const ledger = {
|
|
22
|
+
...parsed.data,
|
|
23
|
+
entries: [...parsed.data.entries]
|
|
24
|
+
.sort((a, b) => lexical(a.resourceId, b.resourceId))
|
|
25
|
+
.map((entry) => ({
|
|
26
|
+
...entry,
|
|
27
|
+
claimants: [...entry.claimants].sort((a, b) => lexical(a.id, b.id)),
|
|
28
|
+
})),
|
|
29
|
+
};
|
|
30
|
+
return { ledger, fingerprint: fingerprintPactileContractV1(ledger) };
|
|
31
|
+
}
|
|
32
|
+
/** Pure external-ref reducer. It cannot receive an asset path or filesystem writer. */
|
|
33
|
+
export function reduceExternalBindingClaims(input, operations) {
|
|
34
|
+
const claims = new Map();
|
|
35
|
+
for (const item of input) {
|
|
36
|
+
if (!item.resourceId ||
|
|
37
|
+
!item.externalAssetId ||
|
|
38
|
+
claims.has(item.resourceId) ||
|
|
39
|
+
new Set(item.claimants).size !== item.claimants.length ||
|
|
40
|
+
item.claimants.some((id) => !id))
|
|
41
|
+
throw new Error("invalid-binding-claims");
|
|
42
|
+
claims.set(item.resourceId, {
|
|
43
|
+
...item,
|
|
44
|
+
claimants: [...item.claimants].sort(lexical),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
for (const op of operations) {
|
|
48
|
+
if (!["bind", "detach"].includes(op.action) ||
|
|
49
|
+
op.control !== "borrowed" ||
|
|
50
|
+
op.format !== "external-ref" ||
|
|
51
|
+
op.targetPath !== null ||
|
|
52
|
+
!op.externalAssetId)
|
|
53
|
+
throw new Error("invalid-binding-operation");
|
|
54
|
+
const previous = claims.get(op.resourceId);
|
|
55
|
+
if (previous && previous.externalAssetId !== op.externalAssetId)
|
|
56
|
+
throw new Error("external-binding-conflict");
|
|
57
|
+
const ids = new Set(previous?.claimants ?? []);
|
|
58
|
+
if (op.action === "bind")
|
|
59
|
+
ids.add(op.claimantId);
|
|
60
|
+
else
|
|
61
|
+
ids.delete(op.claimantId);
|
|
62
|
+
// Empty entries retain asset identity for deterministic reclaim; they never authorize deletion.
|
|
63
|
+
claims.set(op.resourceId, {
|
|
64
|
+
resourceId: op.resourceId,
|
|
65
|
+
externalAssetId: op.externalAssetId,
|
|
66
|
+
claimants: [...ids].sort(lexical),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return [...claims.values()].sort((a, b) => lexical(a.resourceId, b.resourceId));
|
|
70
|
+
}
|
|
71
|
+
function utf8(bytes) {
|
|
72
|
+
const buffer = Buffer.from(bytes), text = buffer.toString("utf8");
|
|
73
|
+
if (!Buffer.from(text).equals(buffer))
|
|
74
|
+
throw new Error("invalid-utf8");
|
|
75
|
+
return text;
|
|
76
|
+
}
|
|
77
|
+
function onlyGeneratedBytes(entry, resolve) {
|
|
78
|
+
if (!entry.generated.contentRef)
|
|
79
|
+
return null;
|
|
80
|
+
const content = resolve(entry.generated.contentRef), desired = utf8(content.bytes);
|
|
81
|
+
if (entry.format === "text" ||
|
|
82
|
+
(entry.format === "json" && !content.ownedJsonPointers?.length) ||
|
|
83
|
+
(entry.format === "toml" && !content.ownedTomlKeys?.length))
|
|
84
|
+
return fingerprintBytes(content.bytes);
|
|
85
|
+
const result = entry.format === "json"
|
|
86
|
+
? mergeJsonPointers("{}", null, desired, content.ownedJsonPointers ?? [])
|
|
87
|
+
: entry.format === "toml"
|
|
88
|
+
? mergeTomlKeys("", null, desired, content.ownedTomlKeys ?? [])
|
|
89
|
+
: entry.format === "managed-block"
|
|
90
|
+
? mergeManagedBlock("", null, desired)
|
|
91
|
+
: null;
|
|
92
|
+
return result?.status === "merged" ? fingerprintBytes(result.text) : null;
|
|
93
|
+
}
|
|
94
|
+
/** Read-only planning. A single ambiguous operation rejects the complete transaction. */
|
|
95
|
+
export function planProjection(input) {
|
|
96
|
+
try {
|
|
97
|
+
const resolveContent = (ref) => {
|
|
98
|
+
const content = input.resolveContent(ref);
|
|
99
|
+
if (content.bytes.byteLength > MAX_PROJECTION_BYTES)
|
|
100
|
+
throw new Error("projection-file-too-large");
|
|
101
|
+
return content;
|
|
102
|
+
};
|
|
103
|
+
const parsed = parseProjectionPlanV1(input.plan);
|
|
104
|
+
if (!parsed.success)
|
|
105
|
+
return { status: "review", reason: "invalid-projection-plan" };
|
|
106
|
+
const plan = parsed.data;
|
|
107
|
+
if (plan.canonicalFingerprint !== input.canonicalFingerprint)
|
|
108
|
+
return { status: "conflict", reason: "canonical-cas-mismatch" };
|
|
109
|
+
const previous = input.ledger === null ? null : canonicalOwnershipLedger(input.ledger);
|
|
110
|
+
if (plan.expectedLedgerFingerprint !== (previous?.fingerprint ?? null))
|
|
111
|
+
return { status: "conflict", reason: "ledger-cas-mismatch" };
|
|
112
|
+
const entries = new Map((previous?.ledger.entries ?? []).map((entry) => [
|
|
113
|
+
entry.resourceId,
|
|
114
|
+
entry,
|
|
115
|
+
]));
|
|
116
|
+
const mutations = [], decisions = [], observations = [];
|
|
117
|
+
const externalOps = plan.operations.filter((op) => op.format === "external-ref");
|
|
118
|
+
const externalClaims = reduceExternalBindingClaims(input.externalClaims ?? [], externalOps);
|
|
119
|
+
for (const op of plan.operations) {
|
|
120
|
+
if (op.format === "external-ref") {
|
|
121
|
+
decisions.push({
|
|
122
|
+
operationId: op.id,
|
|
123
|
+
resourceId: op.resourceId,
|
|
124
|
+
disposition: "preserve-borrowed",
|
|
125
|
+
});
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (op.format === "directory")
|
|
129
|
+
return {
|
|
130
|
+
status: "review",
|
|
131
|
+
reason: "directory-requires-explicit-child-plan",
|
|
132
|
+
};
|
|
133
|
+
const targetPath = op.targetPath;
|
|
134
|
+
if (!targetPath)
|
|
135
|
+
return { status: "review", reason: "missing-target-path" };
|
|
136
|
+
const currentBytes = input.observe(targetPath), current = snapshot(currentBytes);
|
|
137
|
+
observations.push({ targetPath, fingerprint: current.fingerprint });
|
|
138
|
+
if (op.expectedCurrentFingerprint !== current.fingerprint)
|
|
139
|
+
return { status: "conflict", reason: "target-cas-mismatch" };
|
|
140
|
+
const existing = entries.get(op.resourceId);
|
|
141
|
+
if (existing &&
|
|
142
|
+
(existing.targetPath !== targetPath || existing.format !== op.format))
|
|
143
|
+
return { status: "review", reason: "resource-identity-conflict" };
|
|
144
|
+
if ([...entries.values()].some((entry) => entry.resourceId !== op.resourceId &&
|
|
145
|
+
entry.targetPath.normalize("NFC").toLowerCase() ===
|
|
146
|
+
targetPath.normalize("NFC").toLowerCase()))
|
|
147
|
+
return { status: "review", reason: "physical-target-conflict" };
|
|
148
|
+
const claimant = {
|
|
149
|
+
id: op.claimantId,
|
|
150
|
+
kind: "adapter",
|
|
151
|
+
adapterId: plan.adapterId,
|
|
152
|
+
};
|
|
153
|
+
const former = existing?.claimants.find((item) => item.id === claimant.id);
|
|
154
|
+
if (former &&
|
|
155
|
+
(former.kind !== claimant.kind ||
|
|
156
|
+
former.adapterId !== claimant.adapterId))
|
|
157
|
+
return { status: "review", reason: "claimant-identity-conflict" };
|
|
158
|
+
const claimants = new Map((existing?.claimants ?? []).map((item) => [item.id, item]));
|
|
159
|
+
if (op.action === "remove")
|
|
160
|
+
claimants.delete(claimant.id);
|
|
161
|
+
else
|
|
162
|
+
claimants.set(claimant.id, claimant);
|
|
163
|
+
let entry = existing
|
|
164
|
+
? {
|
|
165
|
+
...existing,
|
|
166
|
+
current,
|
|
167
|
+
claimants: [...claimants.values()],
|
|
168
|
+
conflict: "none",
|
|
169
|
+
disposition: "no-op",
|
|
170
|
+
}
|
|
171
|
+
: {
|
|
172
|
+
resourceId: op.resourceId,
|
|
173
|
+
targetPath,
|
|
174
|
+
format: op.format,
|
|
175
|
+
origin: currentBytes === null ? "created" : "adopted",
|
|
176
|
+
control: "pactile-owned",
|
|
177
|
+
// Ownership belongs to the Pactile projection layer; Adapter
|
|
178
|
+
// participation is represented separately by claimants. Keeping
|
|
179
|
+
// this identity stable makes Cursor/Codex install order semantic.
|
|
180
|
+
owner: { kind: "pactile", id: "pactile" },
|
|
181
|
+
claimants: [...claimants.values()],
|
|
182
|
+
preimage: current,
|
|
183
|
+
generated: absent,
|
|
184
|
+
current,
|
|
185
|
+
conflict: "none",
|
|
186
|
+
disposition: "no-op",
|
|
187
|
+
};
|
|
188
|
+
if (op.action === "remove") {
|
|
189
|
+
if (!existing)
|
|
190
|
+
return { status: "review", reason: "unrecorded-removal" };
|
|
191
|
+
if (entry.control === "borrowed")
|
|
192
|
+
entry = { ...entry, disposition: "preserve-borrowed" };
|
|
193
|
+
else if (entry.control === "unknown")
|
|
194
|
+
entry = {
|
|
195
|
+
...entry,
|
|
196
|
+
conflict: "ownership-unknown",
|
|
197
|
+
disposition: "manual-review",
|
|
198
|
+
};
|
|
199
|
+
else if (current.state === "present" &&
|
|
200
|
+
entry.generated.state === "present" &&
|
|
201
|
+
current.fingerprint !== entry.generated.fingerprint)
|
|
202
|
+
entry = {
|
|
203
|
+
...entry,
|
|
204
|
+
conflict: "modified",
|
|
205
|
+
disposition: "preserve-modified",
|
|
206
|
+
};
|
|
207
|
+
else if (!claimants.size &&
|
|
208
|
+
entry.origin === "created" &&
|
|
209
|
+
current.state === "present" &&
|
|
210
|
+
current.fingerprint === entry.generated.fingerprint &&
|
|
211
|
+
onlyGeneratedBytes(entry, resolveContent) ===
|
|
212
|
+
entry.generated.fingerprint) {
|
|
213
|
+
mutations.push({
|
|
214
|
+
targetPath,
|
|
215
|
+
before: current.fingerprint,
|
|
216
|
+
bytes: null,
|
|
217
|
+
});
|
|
218
|
+
// Persist the post-apply state, not a destructive intent masquerading as current reality.
|
|
219
|
+
entry = { ...entry, current: absent, generated: absent };
|
|
220
|
+
decisions.push({
|
|
221
|
+
operationId: op.id,
|
|
222
|
+
resourceId: op.resourceId,
|
|
223
|
+
disposition: "remove-generated",
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
if (entry.control !== "pactile-owned" || op.control !== "pactile-owned")
|
|
229
|
+
return { status: "review", reason: "ownership-not-established" };
|
|
230
|
+
if (!op.contentRef)
|
|
231
|
+
return { status: "review", reason: "missing-content-reference" };
|
|
232
|
+
// The existing generated fingerprint is durable evidence of absorbed
|
|
233
|
+
// foreign bytes. Never replace that evidence with a later pure result:
|
|
234
|
+
// without a v1 provenance field, further writes require explicit review.
|
|
235
|
+
if (existing?.origin === "created" &&
|
|
236
|
+
existing.generated.state === "present" &&
|
|
237
|
+
existing.generated.contentRef &&
|
|
238
|
+
onlyGeneratedBytes(existing, resolveContent) !==
|
|
239
|
+
existing.generated.fingerprint)
|
|
240
|
+
return {
|
|
241
|
+
status: "review",
|
|
242
|
+
reason: "foreign-provenance-requires-review",
|
|
243
|
+
};
|
|
244
|
+
const content = resolveContent(op.contentRef);
|
|
245
|
+
if (fingerprintBytes(content.bytes) !== op.desiredFingerprint)
|
|
246
|
+
return { status: "conflict", reason: "content-fingerprint-mismatch" };
|
|
247
|
+
const priorContent = existing?.generated.contentRef
|
|
248
|
+
? resolveContent(existing.generated.contentRef)
|
|
249
|
+
: null;
|
|
250
|
+
if (priorContent &&
|
|
251
|
+
(JSON.stringify(priorContent.ownedJsonPointers ?? []) !==
|
|
252
|
+
JSON.stringify(content.ownedJsonPointers ?? []) ||
|
|
253
|
+
JSON.stringify(priorContent.ownedTomlKeys ?? []) !==
|
|
254
|
+
JSON.stringify(content.ownedTomlKeys ?? [])))
|
|
255
|
+
return { status: "review", reason: "owned-scope-change" };
|
|
256
|
+
if (existing?.generated.state === "present" &&
|
|
257
|
+
!priorContent &&
|
|
258
|
+
op.action === "merge")
|
|
259
|
+
return { status: "review", reason: "missing-owned-baseline" };
|
|
260
|
+
if ([...claimants.keys()].some((id) => id !== claimant.id) &&
|
|
261
|
+
existing?.generated.state === "present" &&
|
|
262
|
+
(priorContent
|
|
263
|
+
? fingerprintBytes(priorContent.bytes)
|
|
264
|
+
: existing.generated.fingerprint) !== op.desiredFingerprint)
|
|
265
|
+
return { status: "review", reason: "claimant-content-conflict" };
|
|
266
|
+
let nextBytes;
|
|
267
|
+
if (op.action === "merge") {
|
|
268
|
+
const now = currentBytes === null
|
|
269
|
+
? op.format === "json"
|
|
270
|
+
? "{}"
|
|
271
|
+
: ""
|
|
272
|
+
: utf8(currentBytes), old = priorContent ? utf8(priorContent.bytes) : null, next = utf8(content.bytes);
|
|
273
|
+
const merged = op.format === "json"
|
|
274
|
+
? mergeJsonPointers(now, old, next, content.ownedJsonPointers ?? [])
|
|
275
|
+
: op.format === "toml"
|
|
276
|
+
? mergeTomlKeys(now, old, next, content.ownedTomlKeys ?? [])
|
|
277
|
+
: mergeManagedBlock(now, old, next);
|
|
278
|
+
if (merged.status !== "merged")
|
|
279
|
+
return merged;
|
|
280
|
+
nextBytes = Buffer.from(merged.text);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
if (currentBytes !== null &&
|
|
284
|
+
current.fingerprint !== op.desiredFingerprint &&
|
|
285
|
+
(entry.origin !== "created" ||
|
|
286
|
+
current.fingerprint !== entry.generated.fingerprint ||
|
|
287
|
+
onlyGeneratedBytes(entry, resolveContent) !== current.fingerprint))
|
|
288
|
+
return { status: "review", reason: "whole-file-not-owned" };
|
|
289
|
+
nextBytes = Buffer.from(content.bytes);
|
|
290
|
+
}
|
|
291
|
+
if (nextBytes.byteLength > MAX_PROJECTION_BYTES)
|
|
292
|
+
return { status: "review", reason: "projection-file-too-large" };
|
|
293
|
+
const generated = snapshot(nextBytes, op.contentRef);
|
|
294
|
+
if (current.fingerprint !== generated.fingerprint)
|
|
295
|
+
mutations.push({
|
|
296
|
+
targetPath,
|
|
297
|
+
before: current.fingerprint,
|
|
298
|
+
bytes: nextBytes,
|
|
299
|
+
});
|
|
300
|
+
entry = {
|
|
301
|
+
...entry,
|
|
302
|
+
generated,
|
|
303
|
+
current: generated,
|
|
304
|
+
disposition: "no-op",
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
entries.set(entry.resourceId, entry);
|
|
308
|
+
if (!decisions.some((item) => item.operationId === op.id))
|
|
309
|
+
decisions.push({
|
|
310
|
+
operationId: op.id,
|
|
311
|
+
resourceId: op.resourceId,
|
|
312
|
+
disposition: mutations.some((item) => item.targetPath === targetPath)
|
|
313
|
+
? "write-generated"
|
|
314
|
+
: entry.disposition,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
let ledger = canonicalOwnershipLedger({
|
|
318
|
+
schemaVersion: 1,
|
|
319
|
+
generationId: plan.generationId,
|
|
320
|
+
updatedAt: input.updatedAt,
|
|
321
|
+
entries: [...entries.values()],
|
|
322
|
+
}).ledger;
|
|
323
|
+
// Repeating a no-op does not churn timestamps or the CAS fingerprint.
|
|
324
|
+
if (previous?.fingerprint ===
|
|
325
|
+
fingerprintPactileContractV1({
|
|
326
|
+
...ledger,
|
|
327
|
+
updatedAt: previous?.ledger.updatedAt ?? input.updatedAt,
|
|
328
|
+
}))
|
|
329
|
+
ledger = previous.ledger;
|
|
330
|
+
return {
|
|
331
|
+
status: "ready",
|
|
332
|
+
adapterId: plan.adapterId,
|
|
333
|
+
planFingerprint: parsed.fingerprint,
|
|
334
|
+
expectedLedgerFingerprint: previous?.fingerprint ?? null,
|
|
335
|
+
ledger,
|
|
336
|
+
mutations,
|
|
337
|
+
observations,
|
|
338
|
+
decisions,
|
|
339
|
+
externalClaims,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
catch {
|
|
343
|
+
return {
|
|
344
|
+
status: "review",
|
|
345
|
+
reason: "unsafe-or-unavailable-projection-input",
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
//# sourceMappingURL=planner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/pactile/projection/planner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,GAMtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBA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AE,OAAO;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe,EAAE,MAAM,CAAC,WAAW;YACnC,yBAAyB,EAAE,QAAQ,EAAE,WAAW,IAAI,IAAI;YACxD,MAAM;YACN,SAAS;YACT,YAAY;YACZ,SAAS;YACT,cAAc;SACf,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,wCAAwC;SACjD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ExternalBindingClaim, type ProjectionInputs } from "../planner.js";
|
|
2
|
+
export interface SharedProjectionClaim {
|
|
3
|
+
readonly tile: unknown;
|
|
4
|
+
readonly binding: unknown;
|
|
5
|
+
/** Required only for Pactile-owned Skill assets. Borrowed bodies are rejected. */
|
|
6
|
+
readonly skillBody?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface SharedProjectionSurface {
|
|
9
|
+
readonly targetPath: string;
|
|
10
|
+
readonly content: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface SharedProjectionRequest {
|
|
13
|
+
readonly adapterId: string;
|
|
14
|
+
readonly claimantId: string;
|
|
15
|
+
readonly generationId: string;
|
|
16
|
+
readonly canonicalFingerprint: string;
|
|
17
|
+
readonly updatedAt: string;
|
|
18
|
+
readonly action: "attach" | "detach";
|
|
19
|
+
readonly ledger: unknown | null;
|
|
20
|
+
readonly claims: readonly SharedProjectionClaim[];
|
|
21
|
+
readonly surfaces: readonly SharedProjectionSurface[];
|
|
22
|
+
readonly externalClaims?: readonly ExternalBindingClaim[];
|
|
23
|
+
}
|
|
24
|
+
export type SharedProjectionDiagnosticCode = "invalid-input" | "invalid-claim" | "duplicate-resource" | "owned-skill-body-required" | "borrowed-skill-body-forbidden" | "unsupported-binding";
|
|
25
|
+
export type SharedProjectionBuildResult = {
|
|
26
|
+
readonly status: "ready";
|
|
27
|
+
readonly inputs: ProjectionInputs;
|
|
28
|
+
} | {
|
|
29
|
+
readonly status: "review";
|
|
30
|
+
readonly diagnostics: readonly SharedProjectionDiagnosticCode[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Compile shared Skills and the single PACTILE AGENTS block into M1 planning
|
|
34
|
+
* inputs. This function observes only the caller's explicit surface snapshot;
|
|
35
|
+
* ProjectionStore remains the sole writer.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildSharedProjectionPlan(request: SharedProjectionRequest): SharedProjectionBuildResult;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pactile/projection/shared/index.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC3D;AAED,MAAM,MAAM,8BAA8B,GACtC,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,2BAA2B,GAC3B,+BAA+B,GAC/B,qBAAqB,CAAC;AAE1B,MAAM,MAAM,2BAA2B,GACnC;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,GAC/D;IACE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,SAAS,8BAA8B,EAAE,CAAC;CACjE,CAAC;AA4CN;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,uBAAuB,GAC/B,2BAA2B,CA0K7B"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { parseCapabilityBindingV1, parseTileManifestV1, } from "@blxzer/pactile-core";
|
|
2
|
+
import { buildPactileAgentsBlock } from "../../../configurators/shared.js";
|
|
3
|
+
import { canonicalOwnershipLedger, fingerprintBytes, } from "../planner.js";
|
|
4
|
+
const text = new TextEncoder();
|
|
5
|
+
const logicalId = /^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$/;
|
|
6
|
+
const timestamp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
|
|
7
|
+
const fingerprint = /^sha256:[0-9a-f]{64}$/;
|
|
8
|
+
const order = (left, right) => left < right ? -1 : left > right ? 1 : 0;
|
|
9
|
+
function validateClaim(value, action) {
|
|
10
|
+
const tile = parseTileManifestV1(value.tile);
|
|
11
|
+
const binding = parseCapabilityBindingV1(value.binding);
|
|
12
|
+
if (!tile.success || !binding.success || binding.data.asset.kind !== "skill")
|
|
13
|
+
return null;
|
|
14
|
+
if (binding.data.control === "borrowed") {
|
|
15
|
+
if (value.skillBody !== undefined)
|
|
16
|
+
return null;
|
|
17
|
+
return { tile: tile.data, binding: binding.data, skillBody: null };
|
|
18
|
+
}
|
|
19
|
+
// Detach only releases the claimant. It does not need to receive or retain
|
|
20
|
+
// the private Skill body used for the original attach.
|
|
21
|
+
if (action === "detach") {
|
|
22
|
+
if (value.skillBody !== undefined)
|
|
23
|
+
return null;
|
|
24
|
+
return { tile: tile.data, binding: binding.data, skillBody: null };
|
|
25
|
+
}
|
|
26
|
+
if (typeof value.skillBody !== "string" || !value.skillBody.trim())
|
|
27
|
+
return null;
|
|
28
|
+
return { tile: tile.data, binding: binding.data, skillBody: value.skillBody };
|
|
29
|
+
}
|
|
30
|
+
function review(code) {
|
|
31
|
+
return { status: "review", diagnostics: [code] };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Compile shared Skills and the single PACTILE AGENTS block into M1 planning
|
|
35
|
+
* inputs. This function observes only the caller's explicit surface snapshot;
|
|
36
|
+
* ProjectionStore remains the sole writer.
|
|
37
|
+
*/
|
|
38
|
+
export function buildSharedProjectionPlan(request) {
|
|
39
|
+
try {
|
|
40
|
+
if (!logicalId.test(request.adapterId) ||
|
|
41
|
+
!logicalId.test(request.claimantId) ||
|
|
42
|
+
!logicalId.test(request.generationId) ||
|
|
43
|
+
!fingerprint.test(request.canonicalFingerprint) ||
|
|
44
|
+
!timestamp.test(request.updatedAt) ||
|
|
45
|
+
!["attach", "detach"].includes(request.action))
|
|
46
|
+
return review("invalid-input");
|
|
47
|
+
const claims = [];
|
|
48
|
+
for (const value of request.claims) {
|
|
49
|
+
const claim = validateClaim(value, request.action);
|
|
50
|
+
if (!claim) {
|
|
51
|
+
if (value.skillBody !== undefined) {
|
|
52
|
+
const binding = parseCapabilityBindingV1(value.binding);
|
|
53
|
+
if (binding.success && binding.data.control === "borrowed")
|
|
54
|
+
return review("borrowed-skill-body-forbidden");
|
|
55
|
+
}
|
|
56
|
+
const binding = parseCapabilityBindingV1(value.binding);
|
|
57
|
+
if (binding.success &&
|
|
58
|
+
binding.data.control === "pactile-owned" &&
|
|
59
|
+
(typeof value.skillBody !== "string" || !value.skillBody.trim()))
|
|
60
|
+
return review("owned-skill-body-required");
|
|
61
|
+
return review("invalid-claim");
|
|
62
|
+
}
|
|
63
|
+
claims.push(claim);
|
|
64
|
+
}
|
|
65
|
+
claims.sort((left, right) => order(left.binding.asset.id, right.binding.asset.id));
|
|
66
|
+
if (new Set(claims.map(({ binding }) => binding.asset.id)).size !== claims.length)
|
|
67
|
+
return review("duplicate-resource");
|
|
68
|
+
const surfaceMap = new Map();
|
|
69
|
+
for (const surface of request.surfaces) {
|
|
70
|
+
if (typeof surface.targetPath !== "string" ||
|
|
71
|
+
surfaceMap.has(surface.targetPath) ||
|
|
72
|
+
(surface.content !== null && typeof surface.content !== "string"))
|
|
73
|
+
return review("invalid-input");
|
|
74
|
+
surfaceMap.set(surface.targetPath, surface.content === null ? null : text.encode(surface.content));
|
|
75
|
+
}
|
|
76
|
+
const content = new Map();
|
|
77
|
+
const operations = [];
|
|
78
|
+
const agentsBytes = text.encode(buildPactileAgentsBlock(claims.map(({ tile }) => ({
|
|
79
|
+
id: tile.identity.id,
|
|
80
|
+
summary: tile.summary,
|
|
81
|
+
}))));
|
|
82
|
+
const agentsRef = `shared.agents.${fingerprintBytes(agentsBytes).slice(7)}`;
|
|
83
|
+
content.set(agentsRef, { bytes: agentsBytes });
|
|
84
|
+
const agentsCurrent = surfaceMap.get("AGENTS.md") ?? null;
|
|
85
|
+
operations.push({
|
|
86
|
+
id: `shared.agents.${request.action}`,
|
|
87
|
+
resourceId: "shared.agents",
|
|
88
|
+
claimantId: request.claimantId,
|
|
89
|
+
action: request.action === "attach" ? "merge" : "remove",
|
|
90
|
+
control: "pactile-owned",
|
|
91
|
+
targetPath: "AGENTS.md",
|
|
92
|
+
format: "managed-block",
|
|
93
|
+
contentRef: request.action === "attach" ? agentsRef : null,
|
|
94
|
+
desiredFingerprint: request.action === "attach" ? fingerprintBytes(agentsBytes) : null,
|
|
95
|
+
expectedCurrentFingerprint: request.action === "attach"
|
|
96
|
+
? agentsCurrent === null
|
|
97
|
+
? null
|
|
98
|
+
: fingerprintBytes(agentsCurrent)
|
|
99
|
+
: agentsCurrent === null
|
|
100
|
+
? null
|
|
101
|
+
: fingerprintBytes(agentsCurrent),
|
|
102
|
+
externalAssetId: null,
|
|
103
|
+
});
|
|
104
|
+
for (const { binding, skillBody } of claims) {
|
|
105
|
+
const resourceId = `shared.skill.${binding.asset.id}`;
|
|
106
|
+
if (binding.control === "borrowed") {
|
|
107
|
+
operations.push({
|
|
108
|
+
id: `${resourceId}.${request.action === "attach" ? "bind" : "detach"}`,
|
|
109
|
+
resourceId,
|
|
110
|
+
claimantId: request.claimantId,
|
|
111
|
+
action: request.action === "attach" ? "bind" : "detach",
|
|
112
|
+
control: "borrowed",
|
|
113
|
+
targetPath: null,
|
|
114
|
+
format: "external-ref",
|
|
115
|
+
contentRef: null,
|
|
116
|
+
desiredFingerprint: null,
|
|
117
|
+
expectedCurrentFingerprint: null,
|
|
118
|
+
externalAssetId: binding.asset.id,
|
|
119
|
+
});
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (binding.deleteBoundary !== "remove-when-unclaimed")
|
|
123
|
+
return review("unsupported-binding");
|
|
124
|
+
const targetPath = `.agents/skills/${binding.asset.id}/SKILL.md`;
|
|
125
|
+
const current = surfaceMap.get(targetPath) ?? null;
|
|
126
|
+
const body = skillBody === null ? null : text.encode(skillBody);
|
|
127
|
+
const contentRef = body === null ? null : `${resourceId}.${fingerprintBytes(body).slice(7)}`;
|
|
128
|
+
if (body !== null && contentRef !== null)
|
|
129
|
+
content.set(contentRef, { bytes: body });
|
|
130
|
+
operations.push({
|
|
131
|
+
id: `${resourceId}.${request.action === "attach" ? "ensure" : "remove"}`,
|
|
132
|
+
resourceId,
|
|
133
|
+
claimantId: request.claimantId,
|
|
134
|
+
action: request.action === "attach" ? "ensure" : "remove",
|
|
135
|
+
control: "pactile-owned",
|
|
136
|
+
targetPath,
|
|
137
|
+
format: "text",
|
|
138
|
+
contentRef: request.action === "attach" ? contentRef : null,
|
|
139
|
+
desiredFingerprint: request.action === "attach" && body !== null
|
|
140
|
+
? fingerprintBytes(body)
|
|
141
|
+
: null,
|
|
142
|
+
expectedCurrentFingerprint: request.action === "attach"
|
|
143
|
+
? current === null
|
|
144
|
+
? null
|
|
145
|
+
: fingerprintBytes(current)
|
|
146
|
+
: current === null
|
|
147
|
+
? null
|
|
148
|
+
: fingerprintBytes(current),
|
|
149
|
+
externalAssetId: null,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
const expectedLedgerFingerprint = request.ledger === null
|
|
153
|
+
? null
|
|
154
|
+
: canonicalOwnershipLedger(request.ledger).fingerprint;
|
|
155
|
+
const plan = {
|
|
156
|
+
schemaVersion: 1,
|
|
157
|
+
id: `shared.${request.generationId}.${request.action}`,
|
|
158
|
+
adapterId: request.adapterId,
|
|
159
|
+
generationId: request.generationId,
|
|
160
|
+
canonicalFingerprint: request.canonicalFingerprint,
|
|
161
|
+
expectedLedgerFingerprint,
|
|
162
|
+
operations,
|
|
163
|
+
};
|
|
164
|
+
return {
|
|
165
|
+
status: "ready",
|
|
166
|
+
inputs: {
|
|
167
|
+
plan,
|
|
168
|
+
ledger: request.ledger,
|
|
169
|
+
canonicalFingerprint: request.canonicalFingerprint,
|
|
170
|
+
updatedAt: request.updatedAt,
|
|
171
|
+
observe: (targetPath) => surfaceMap.get(targetPath) ?? null,
|
|
172
|
+
resolveContent: (contentRef) => {
|
|
173
|
+
const resolved = content.get(contentRef);
|
|
174
|
+
if (!resolved)
|
|
175
|
+
throw new Error("unknown-shared-content");
|
|
176
|
+
return resolved;
|
|
177
|
+
},
|
|
178
|
+
externalClaims: request.externalClaims,
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
return review("invalid-input");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pactile/projection/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GAKpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,gBAAgB,GAIjB,MAAM,eAAe,CAAC;AAgDvB,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;AAC/B,MAAM,SAAS,GAAG,sCAAsC,CAAC;AACzD,MAAM,SAAS,GAAG,oDAAoD,CAAC;AACvE,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAC5C,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CACpD,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C,SAAS,aAAa,CACpB,KAA4B,EAC5B,MAAyC;IAEzC,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO;QAC1E,OAAO,IAAI,CAAC;IACd,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QACxC,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;YAA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