@blxzer/pactile 0.5.0 → 0.6.0-beta.2
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 +612 -563
- package/LICENSE +235 -235
- package/README.md +108 -105
- package/README.zh-CN.md +105 -105
- package/bin/compat-warning.js +11 -11
- package/bin/cstl.js +6 -6
- package/bin/pactile.js +3 -3
- package/bin/smart-search.js +38 -38
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +79 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/codex.d.ts +3 -0
- package/dist/commands/codex.d.ts.map +1 -0
- package/dist/commands/codex.js +54 -0
- package/dist/commands/codex.js.map +1 -0
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +272 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/init.d.ts +0 -20
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +285 -456
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.js +1 -1
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/parallel.d.ts +2 -0
- package/dist/commands/parallel.d.ts.map +1 -0
- package/dist/commands/parallel.js +26 -0
- package/dist/commands/parallel.js.map +1 -0
- package/dist/commands/pi.d.ts +3 -0
- package/dist/commands/pi.d.ts.map +1 -0
- package/dist/commands/pi.js +94 -0
- package/dist/commands/pi.js.map +1 -0
- package/dist/commands/session.d.ts +2 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +169 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/task.d.ts +3 -0
- package/dist/commands/task.d.ts.map +1 -0
- package/dist/commands/task.js +1026 -0
- package/dist/commands/task.js.map +1 -0
- package/dist/commands/update.d.ts +3 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +130 -47
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +1 -2
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/index.d.ts +5 -51
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +9 -140
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +7 -66
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +17 -262
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +5 -6
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +11 -39
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +1 -5
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +1 -5
- package/dist/constants/paths.js.map +1 -1
- package/dist/core/compat/environment.d.ts +43 -0
- package/dist/core/compat/environment.d.ts.map +1 -0
- package/dist/core/compat/environment.js +91 -0
- package/dist/core/compat/environment.js.map +1 -0
- package/dist/core/compat/index.d.ts +2 -0
- package/dist/core/compat/index.d.ts.map +1 -0
- package/dist/core/compat/index.js +2 -0
- package/dist/core/compat/index.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +6 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/pactile/capability.d.ts +65 -0
- package/dist/core/pactile/capability.d.ts.map +1 -0
- package/dist/core/pactile/capability.js +199 -0
- package/dist/core/pactile/capability.js.map +1 -0
- package/dist/core/pactile/index.d.ts +15 -0
- package/dist/core/pactile/index.d.ts.map +1 -0
- package/dist/core/pactile/index.js +13 -0
- package/dist/core/pactile/index.js.map +1 -0
- package/dist/core/pactile/lifecycle.d.ts +106 -0
- package/dist/core/pactile/lifecycle.d.ts.map +1 -0
- package/dist/core/pactile/lifecycle.js +607 -0
- package/dist/core/pactile/lifecycle.js.map +1 -0
- package/dist/core/pactile/middleware/index.d.ts +3 -0
- package/dist/core/pactile/middleware/index.d.ts.map +1 -0
- package/dist/core/pactile/middleware/index.js +2 -0
- package/dist/core/pactile/middleware/index.js.map +1 -0
- package/dist/core/pactile/middleware/redaction.d.ts +4 -0
- package/dist/core/pactile/middleware/redaction.d.ts.map +1 -0
- package/dist/core/pactile/middleware/redaction.js +34 -0
- package/dist/core/pactile/middleware/redaction.js.map +1 -0
- package/dist/core/pactile/middleware/resolver.d.ts +62 -0
- package/dist/core/pactile/middleware/resolver.d.ts.map +1 -0
- package/dist/core/pactile/middleware/resolver.js +803 -0
- package/dist/core/pactile/middleware/resolver.js.map +1 -0
- package/dist/core/pactile/projection.d.ts +81 -0
- package/dist/core/pactile/projection.d.ts.map +1 -0
- package/dist/core/pactile/projection.js +399 -0
- package/dist/core/pactile/projection.js.map +1 -0
- package/dist/core/pactile/provider.d.ts +81 -0
- package/dist/core/pactile/provider.d.ts.map +1 -0
- package/dist/core/pactile/provider.js +313 -0
- package/dist/core/pactile/provider.js.map +1 -0
- package/dist/core/pactile/runtime.d.ts +56 -0
- package/dist/core/pactile/runtime.d.ts.map +1 -0
- package/dist/core/pactile/runtime.js +176 -0
- package/dist/core/pactile/runtime.js.map +1 -0
- package/dist/core/pactile/tile-compiler-types.d.ts +32 -0
- package/dist/core/pactile/tile-compiler-types.d.ts.map +1 -0
- package/dist/core/pactile/tile-compiler-types.js +2 -0
- package/dist/core/pactile/tile-compiler-types.js.map +1 -0
- package/dist/core/pactile/tile.d.ts +71 -0
- package/dist/core/pactile/tile.d.ts.map +1 -0
- package/dist/core/pactile/tile.js +228 -0
- package/dist/core/pactile/tile.js.map +1 -0
- package/dist/core/pactile/trace-runtime/index.d.ts +38 -0
- package/dist/core/pactile/trace-runtime/index.d.ts.map +1 -0
- package/dist/core/pactile/trace-runtime/index.js +292 -0
- package/dist/core/pactile/trace-runtime/index.js.map +1 -0
- package/dist/core/pactile/trace.d.ts +42 -0
- package/dist/core/pactile/trace.d.ts.map +1 -0
- package/dist/core/pactile/trace.js +221 -0
- package/dist/core/pactile/trace.js.map +1 -0
- package/dist/core/pactile/validation.d.ts +91 -0
- package/dist/core/pactile/validation.d.ts.map +1 -0
- package/dist/core/pactile/validation.js +301 -0
- package/dist/core/pactile/validation.js.map +1 -0
- package/dist/core/task/adapter-middleware.d.ts +122 -0
- package/dist/core/task/adapter-middleware.d.ts.map +1 -0
- package/dist/core/task/adapter-middleware.js +476 -0
- package/dist/core/task/adapter-middleware.js.map +1 -0
- package/dist/core/task/compat.d.ts +7 -0
- package/dist/core/task/compat.d.ts.map +1 -0
- package/dist/core/task/compat.js +2 -0
- package/dist/core/task/compat.js.map +1 -0
- package/dist/core/task/contract-migrate.d.ts +29 -0
- package/dist/core/task/contract-migrate.d.ts.map +1 -0
- package/dist/core/task/contract-migrate.js +207 -0
- package/dist/core/task/contract-migrate.js.map +1 -0
- package/dist/core/task/full-quality.d.ts +89 -0
- package/dist/core/task/full-quality.d.ts.map +1 -0
- package/dist/core/task/full-quality.js +379 -0
- package/dist/core/task/full-quality.js.map +1 -0
- package/dist/core/task/index.d.ts +32 -0
- package/dist/core/task/index.d.ts.map +1 -0
- package/dist/core/task/index.js +20 -0
- package/dist/core/task/index.js.map +1 -0
- package/dist/core/task/kernel-cli.d.ts +51 -0
- package/dist/core/task/kernel-cli.d.ts.map +1 -0
- package/dist/core/task/kernel-cli.js +301 -0
- package/dist/core/task/kernel-cli.js.map +1 -0
- package/dist/core/task/kernel-contract.d.ts +164 -0
- package/dist/core/task/kernel-contract.d.ts.map +1 -0
- package/dist/core/task/kernel-contract.js +475 -0
- package/dist/core/task/kernel-contract.js.map +1 -0
- package/dist/core/task/kernel-store.d.ts +130 -0
- package/dist/core/task/kernel-store.d.ts.map +1 -0
- package/dist/core/task/kernel-store.js +905 -0
- package/dist/core/task/kernel-store.js.map +1 -0
- package/dist/core/task/kernel-surface.d.ts +70 -0
- package/dist/core/task/kernel-surface.d.ts.map +1 -0
- package/dist/core/task/kernel-surface.js +121 -0
- package/dist/core/task/kernel-surface.js.map +1 -0
- package/dist/core/task/lite-context-pack.d.ts +71 -0
- package/dist/core/task/lite-context-pack.d.ts.map +1 -0
- package/dist/core/task/lite-context-pack.js +175 -0
- package/dist/core/task/lite-context-pack.js.map +1 -0
- package/dist/core/task/ondemand-topology.d.ts +108 -0
- package/dist/core/task/ondemand-topology.d.ts.map +1 -0
- package/dist/core/task/ondemand-topology.js +456 -0
- package/dist/core/task/ondemand-topology.js.map +1 -0
- package/dist/core/task/p36-artifact-migrate.d.ts +58 -0
- package/dist/core/task/p36-artifact-migrate.d.ts.map +1 -0
- package/dist/core/task/p36-artifact-migrate.js +293 -0
- package/dist/core/task/p36-artifact-migrate.js.map +1 -0
- package/dist/core/task/p36-wave-c.d.ts +39 -0
- package/dist/core/task/p36-wave-c.d.ts.map +1 -0
- package/dist/core/task/p36-wave-c.js +100 -0
- package/dist/core/task/p36-wave-c.js.map +1 -0
- package/dist/core/task/paths.d.ts +37 -0
- package/dist/core/task/paths.d.ts.map +1 -0
- package/dist/core/task/paths.js +49 -0
- package/dist/core/task/paths.js.map +1 -0
- package/dist/core/task/phase.d.ts +27 -0
- package/dist/core/task/phase.d.ts.map +1 -0
- package/dist/core/task/phase.js +24 -0
- package/dist/core/task/phase.js.map +1 -0
- package/dist/core/task/records.d.ts +48 -0
- package/dist/core/task/records.d.ts.map +1 -0
- package/dist/core/task/records.js +100 -0
- package/dist/core/task/records.js.map +1 -0
- package/dist/core/task/schema.d.ts +77 -0
- package/dist/core/task/schema.d.ts.map +1 -0
- package/dist/core/task/schema.js +220 -0
- package/dist/core/task/schema.js.map +1 -0
- package/dist/core/testing/index.d.ts +2 -0
- package/dist/core/testing/index.d.ts.map +1 -0
- package/dist/core/testing/index.js +4 -0
- package/dist/core/testing/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.0.json +9 -9
- package/dist/migrations/manifests/0.1.1.json +9 -9
- package/dist/migrations/manifests/0.1.2.json +9 -9
- package/dist/migrations/manifests/0.1.3.json +9 -9
- package/dist/migrations/manifests/0.1.4.json +9 -9
- package/dist/migrations/manifests/0.2.1.json +9 -9
- package/dist/migrations/manifests/0.2.10.json +374 -374
- package/dist/migrations/manifests/0.2.2.json +8 -8
- package/dist/migrations/manifests/0.2.3.json +9 -9
- package/dist/migrations/manifests/0.2.4.json +8 -8
- package/dist/migrations/manifests/0.2.5.json +8 -8
- package/dist/migrations/manifests/0.2.6.json +8 -8
- package/dist/migrations/manifests/0.2.7.json +8 -8
- package/dist/migrations/manifests/0.2.8.json +9 -9
- package/dist/migrations/manifests/0.2.9.json +9 -9
- package/dist/migrations/manifests/0.3.0.json +89 -89
- package/dist/migrations/manifests/0.3.1.json +32 -32
- package/dist/migrations/manifests/0.3.2.json +16 -16
- package/dist/migrations/manifests/0.3.3.json +9 -9
- package/dist/migrations/manifests/0.3.4.json +9 -9
- package/dist/migrations/manifests/0.3.5.json +9 -9
- package/dist/migrations/manifests/0.3.6.json +9 -9
- package/dist/migrations/manifests/0.4.0.json +9 -9
- package/dist/migrations/manifests/0.4.1.json +9 -9
- package/dist/migrations/manifests/0.4.2.json +9 -9
- package/dist/migrations/manifests/0.4.3.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.0.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.1.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.2.json +8 -8
- package/dist/migrations/manifests/0.5.0-beta.3.json +8 -8
- package/dist/migrations/manifests/0.5.0-beta.4.json +9 -9
- package/dist/migrations/manifests/0.5.0-beta.5.json +9 -9
- package/dist/migrations/manifests/0.5.0.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.1.json +35 -0
- package/dist/migrations/manifests/0.6.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.6.0.json +9 -0
- package/dist/pactile/adapters/codex/index.js +1 -1
- package/dist/pactile/adapters/codex/index.js.map +1 -1
- package/dist/pactile/adapters/index.d.ts +0 -1
- package/dist/pactile/adapters/index.d.ts.map +1 -1
- package/dist/pactile/adapters/index.js +0 -1
- package/dist/pactile/adapters/index.js.map +1 -1
- package/dist/pactile/adoption/bindings.d.ts +1 -1
- package/dist/pactile/adoption/bindings.d.ts.map +1 -1
- package/dist/pactile/adoption/bindings.js +1 -1
- package/dist/pactile/adoption/bindings.js.map +1 -1
- package/dist/pactile/adoption/inventory.d.ts +1 -1
- package/dist/pactile/adoption/inventory.d.ts.map +1 -1
- package/dist/pactile/adoption/inventory.js +1 -1
- package/dist/pactile/adoption/inventory.js.map +1 -1
- package/dist/pactile/adoption/safety.js +1 -1
- package/dist/pactile/adoption/safety.js.map +1 -1
- package/dist/pactile/adoption/workflow.d.ts +1 -1
- package/dist/pactile/adoption/workflow.d.ts.map +1 -1
- package/dist/pactile/adoption/workflow.js +1 -1
- package/dist/pactile/adoption/workflow.js.map +1 -1
- package/dist/pactile/codex/bridge.d.ts +71 -0
- package/dist/pactile/codex/bridge.d.ts.map +1 -0
- package/dist/pactile/codex/bridge.js +271 -0
- package/dist/pactile/codex/bridge.js.map +1 -0
- package/dist/pactile/compat/init-context.js +1 -1
- package/dist/pactile/compat/init-context.js.map +1 -1
- package/dist/pactile/compat/node-entry-migration.d.ts +3 -0
- package/dist/pactile/compat/node-entry-migration.d.ts.map +1 -0
- package/dist/pactile/compat/node-entry-migration.js +25 -0
- package/dist/pactile/compat/node-entry-migration.js.map +1 -0
- package/dist/pactile/exit/receipt.js +1 -1
- package/dist/pactile/exit/receipt.js.map +1 -1
- package/dist/pactile/exit/service.d.ts +1 -1
- package/dist/pactile/exit/service.d.ts.map +1 -1
- package/dist/pactile/exit/service.js +1 -3
- package/dist/pactile/exit/service.js.map +1 -1
- package/dist/pactile/lifecycle/command-runner.d.ts +1 -1
- package/dist/pactile/lifecycle/command-runner.d.ts.map +1 -1
- package/dist/pactile/lifecycle/command-runner.js +1 -3
- package/dist/pactile/lifecycle/command-runner.js.map +1 -1
- package/dist/pactile/lifecycle/default-adapters.d.ts.map +1 -1
- package/dist/pactile/lifecycle/default-adapters.js +8 -32
- package/dist/pactile/lifecycle/default-adapters.js.map +1 -1
- package/dist/pactile/lifecycle/orchestrator.d.ts +1 -1
- package/dist/pactile/lifecycle/orchestrator.d.ts.map +1 -1
- package/dist/pactile/lifecycle/orchestrator.js +1 -1
- package/dist/pactile/lifecycle/orchestrator.js.map +1 -1
- package/dist/pactile/lifecycle/project-files.d.ts.map +1 -1
- package/dist/pactile/lifecycle/project-files.js +4 -1
- package/dist/pactile/lifecycle/project-files.js.map +1 -1
- package/dist/pactile/middleware/manifest-loader.d.ts +1 -1
- package/dist/pactile/middleware/manifest-loader.d.ts.map +1 -1
- package/dist/pactile/middleware/manifest-loader.js +1 -1
- package/dist/pactile/middleware/manifest-loader.js.map +1 -1
- package/dist/pactile/migration/transaction.d.ts +1 -1
- package/dist/pactile/migration/transaction.d.ts.map +1 -1
- package/dist/pactile/migration/transaction.js +1 -1
- package/dist/pactile/migration/transaction.js.map +1 -1
- package/dist/pactile/parallel/batch.d.ts +41 -0
- package/dist/pactile/parallel/batch.d.ts.map +1 -0
- package/dist/pactile/parallel/batch.js +190 -0
- package/dist/pactile/parallel/batch.js.map +1 -0
- package/dist/pactile/parallel/policy.d.ts +18 -0
- package/dist/pactile/parallel/policy.d.ts.map +1 -0
- package/dist/pactile/parallel/policy.js +174 -0
- package/dist/pactile/parallel/policy.js.map +1 -0
- package/dist/pactile/pi/bridge.d.ts +51 -0
- package/dist/pactile/pi/bridge.d.ts.map +1 -0
- package/dist/pactile/pi/bridge.js +353 -0
- package/dist/pactile/pi/bridge.js.map +1 -0
- package/dist/pactile/pi/rpc.d.ts +41 -0
- package/dist/pactile/pi/rpc.d.ts.map +1 -0
- package/dist/pactile/pi/rpc.js +219 -0
- package/dist/pactile/pi/rpc.js.map +1 -0
- package/dist/pactile/projection/planner.d.ts +1 -1
- package/dist/pactile/projection/planner.d.ts.map +1 -1
- package/dist/pactile/projection/planner.js +1 -1
- package/dist/pactile/projection/planner.js.map +1 -1
- package/dist/pactile/projection/shared/index.js +1 -1
- package/dist/pactile/projection/shared/index.js.map +1 -1
- package/dist/pactile/projection/store.js +1 -1
- package/dist/pactile/projection/store.js.map +1 -1
- package/dist/pactile/providers/probes.d.ts +2 -2
- package/dist/pactile/providers/probes.d.ts.map +1 -1
- package/dist/pactile/providers/probes.js +0 -6
- package/dist/pactile/providers/probes.js.map +1 -1
- package/dist/pactile/registry.d.ts +1 -8
- package/dist/pactile/registry.d.ts.map +1 -1
- package/dist/pactile/registry.js +8 -25
- package/dist/pactile/registry.js.map +1 -1
- package/dist/pactile/retrieval/envelope.d.ts +19 -0
- package/dist/pactile/retrieval/envelope.d.ts.map +1 -0
- package/dist/pactile/retrieval/envelope.js +115 -0
- package/dist/pactile/retrieval/envelope.js.map +1 -0
- package/dist/pactile/retrieval/evidence.js +1 -1
- package/dist/pactile/retrieval/evidence.js.map +1 -1
- package/dist/pactile/retrieval/pack.d.ts +9 -0
- package/dist/pactile/retrieval/pack.d.ts.map +1 -0
- package/dist/pactile/retrieval/pack.js +300 -0
- package/dist/pactile/retrieval/pack.js.map +1 -0
- package/dist/pactile/retrieval/planner.d.ts +1 -1
- package/dist/pactile/retrieval/planner.d.ts.map +1 -1
- package/dist/pactile/retrieval/planner.js +1 -1
- package/dist/pactile/retrieval/planner.js.map +1 -1
- package/dist/pactile/retrieval/types.d.ts +1 -1
- package/dist/pactile/retrieval/types.d.ts.map +1 -1
- package/dist/pactile/runtime/json-api.d.ts +1 -1
- package/dist/pactile/runtime/json-api.js +1 -1
- package/dist/pactile/runtime/paths.js +1 -1
- package/dist/pactile/runtime/paths.js.map +1 -1
- package/dist/pactile/runtime/stores.d.ts +1 -1
- package/dist/pactile/runtime/stores.d.ts.map +1 -1
- package/dist/pactile/runtime/stores.js +1 -1
- package/dist/pactile/runtime/stores.js.map +1 -1
- package/dist/pactile/runtime/unicode-nfc-data.d.ts +1 -1
- package/dist/pactile/runtime/unicode-nfc-data.js +1 -1
- package/dist/pactile/task/config.d.ts +9 -0
- package/dist/pactile/task/config.d.ts.map +1 -0
- package/dist/pactile/task/config.js +103 -0
- package/dist/pactile/task/config.js.map +1 -0
- package/dist/pactile/task/context.d.ts +19 -0
- package/dist/pactile/task/context.d.ts.map +1 -0
- package/dist/pactile/task/context.js +117 -0
- package/dist/pactile/task/context.js.map +1 -0
- package/dist/pactile/task/guards.d.ts +21 -0
- package/dist/pactile/task/guards.d.ts.map +1 -0
- package/dist/pactile/task/guards.js +232 -0
- package/dist/pactile/task/guards.js.map +1 -0
- package/dist/pactile/task/scaffold.d.ts +6 -0
- package/dist/pactile/task/scaffold.d.ts.map +1 -0
- package/dist/pactile/task/scaffold.js +57 -0
- package/dist/pactile/task/scaffold.js.map +1 -0
- package/dist/pactile/task/session-memory.d.ts +2 -0
- package/dist/pactile/task/session-memory.d.ts.map +1 -0
- package/dist/pactile/task/session-memory.js +123 -0
- package/dist/pactile/task/session-memory.js.map +1 -0
- package/dist/pactile/task/session-pack.d.ts +3 -0
- package/dist/pactile/task/session-pack.d.ts.map +1 -0
- package/dist/pactile/task/session-pack.js +139 -0
- package/dist/pactile/task/session-pack.js.map +1 -0
- package/dist/pactile/task/session.d.ts +13 -0
- package/dist/pactile/task/session.d.ts.map +1 -0
- package/dist/pactile/task/session.js +105 -0
- package/dist/pactile/task/session.js.map +1 -0
- package/dist/pactile/task/strategy.d.ts +24 -0
- package/dist/pactile/task/strategy.d.ts.map +1 -0
- package/dist/pactile/task/strategy.js +136 -0
- package/dist/pactile/task/strategy.js.map +1 -0
- package/dist/pactile/task/task-map.d.ts +35 -0
- package/dist/pactile/task/task-map.d.ts.map +1 -0
- package/dist/pactile/task/task-map.js +217 -0
- package/dist/pactile/task/task-map.js.map +1 -0
- package/dist/pactile/task/workflow-phase.d.ts +3 -0
- package/dist/pactile/task/workflow-phase.d.ts.map +1 -0
- package/dist/pactile/task/workflow-phase.js +56 -0
- package/dist/pactile/task/workflow-phase.js.map +1 -0
- package/dist/pactile/tiles/catalog.d.ts +1 -1
- package/dist/pactile/tiles/catalog.d.ts.map +1 -1
- package/dist/pactile/tiles/catalog.js +1 -1
- package/dist/pactile/tiles/catalog.js.map +1 -1
- package/dist/pactile/tiles/compiler.d.ts +1 -1
- package/dist/pactile/tiles/compiler.d.ts.map +1 -1
- package/dist/pactile/tiles/compiler.js +1 -1
- package/dist/pactile/tiles/compiler.js.map +1 -1
- package/dist/pactile/tiles/content/ondemand/index.d.ts +2 -2
- package/dist/pactile/tiles/content/ondemand/index.d.ts.map +1 -1
- package/dist/pactile/tiles/content/ondemand/index.js +2 -16
- package/dist/pactile/tiles/content/ondemand/index.js.map +1 -1
- package/dist/pactile/tiles/loader.d.ts +1 -1
- package/dist/pactile/tiles/loader.d.ts.map +1 -1
- package/dist/pactile/tiles/loader.js +1 -1
- package/dist/pactile/tiles/loader.js.map +1 -1
- package/dist/templates/common/bundled-skills/pactile-check/SKILL.md +161 -161
- package/dist/templates/common/bundled-skills/pactile-check/references/fowler-12-smells.md +28 -28
- package/dist/templates/common/bundled-skills/pactile-handoff/SKILL.md +117 -117
- package/dist/templates/common/bundled-skills/pactile-meta/SKILL.md +75 -75
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/add-project-local-conventions.md +83 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-agents.md +5 -47
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-context-loading.md +79 -84
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-hooks.md +5 -57
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-skills-or-commands.md +7 -77
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-spec-structure.md +83 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-task-lifecycle.md +82 -88
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/change-workflow.md +65 -65
- package/dist/templates/common/bundled-skills/pactile-meta/references/customize-local/overview.md +12 -55
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/context-injection.md +68 -68
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/generated-files.md +7 -83
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/overview.md +7 -51
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/spec-system.md +102 -102
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/task-system.md +138 -133
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workflow.md +75 -75
- package/dist/templates/common/bundled-skills/pactile-meta/references/local-architecture/workspace-memory.md +71 -71
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/agents.md +7 -69
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/hooks-and-settings.md +7 -59
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/overview.md +5 -45
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/platform-map.md +9 -45
- package/dist/templates/common/bundled-skills/pactile-meta/references/platform-files/skills-and-commands.md +7 -108
- package/dist/templates/common/bundled-skills/pactile-micro-grill/SKILL.md +68 -68
- package/dist/templates/common/bundled-skills/pactile-skill-creator/SKILL.md +47 -47
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/authoring-rules.md +170 -170
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/general-authoring.md +189 -189
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/pactile-skill-locations.md +11 -52
- package/dist/templates/common/bundled-skills/pactile-skill-creator/references/review-checklist.md +52 -52
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/SKILL.md +41 -41
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/mcp-setup.md +18 -90
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/repository-analysis.md +41 -59
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-task-planning.md +61 -61
- package/dist/templates/common/bundled-skills/pactile-spec-bootstrap/references/spec-writing.md +70 -70
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +393 -393
- package/dist/templates/common/bundled-skills/smart-search-cli/agents/openai.yaml +3 -3
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/batch-search.md +98 -98
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/evidence-gathering.md +89 -89
- package/dist/templates/common/bundled-skills/smart-search-cli/references/cli-contract.md +323 -323
- package/dist/templates/common/commands/continue.md +60 -62
- package/dist/templates/common/commands/finish-work.md +84 -82
- package/dist/templates/common/commands/start.md +66 -66
- package/dist/templates/common/index.d.ts +0 -20
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/index.js +0 -16
- package/dist/templates/common/index.js.map +1 -1
- package/dist/templates/common/skills/before-dev.md +35 -35
- package/dist/templates/common/skills/brainstorm.md +204 -204
- package/dist/templates/common/skills/break-loop.md +125 -125
- package/dist/templates/common/skills/update-spec.md +363 -363
- package/dist/templates/extract.d.ts +1 -8
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +0 -31
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/agents.md +14 -14
- package/dist/templates/markdown/framework/artifact-locale-guide.md.txt +93 -93
- package/dist/templates/markdown/framework/codex-worker-dispatch.md.txt +9 -0
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +7 -28
- package/dist/templates/markdown/framework/execution-strategy.md.txt +14 -45
- package/dist/templates/markdown/framework/index.md.txt +20 -31
- package/dist/templates/markdown/framework/injection-budget-guide.md.txt +7 -111
- package/dist/templates/markdown/framework/middleware-protocol.md.txt +139 -238
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +116 -116
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +105 -105
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -30
- package/dist/templates/markdown/framework/retrieval-daily-guide.md.txt +9 -199
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -15
- package/dist/templates/markdown/framework/verification-strength-guide.md.txt +185 -185
- package/dist/templates/markdown/gitignore.txt +15 -15
- package/dist/templates/markdown/index.d.ts +1 -5
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +3 -23
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -54
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -38
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -59
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -54
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -39
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -51
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -51
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +174 -174
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +162 -162
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +17 -634
- package/dist/templates/markdown/spec/guides/debug-loop-guide.md.txt +227 -227
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +75 -75
- package/dist/templates/markdown/spec/guides/e2e-walkthrough-guide.md.txt +88 -93
- package/dist/templates/markdown/spec/guides/index.md.txt +131 -131
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +137 -139
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +179 -179
- package/dist/templates/markdown/workspace-index.md +122 -125
- package/dist/templates/markdown/worktree.yaml.txt +58 -58
- package/dist/templates/pactile/CONTEXT.md +101 -113
- package/dist/templates/pactile/config/execution-strategy-rules.json +30 -31
- package/dist/templates/pactile/config.yaml +111 -130
- package/dist/templates/pactile/docs/adr/README.md +21 -21
- package/dist/templates/pactile/gitignore.txt +35 -35
- package/dist/templates/pactile/index.d.ts +3 -127
- package/dist/templates/pactile/index.d.ts.map +1 -1
- package/dist/templates/pactile/index.js +13 -298
- package/dist/templates/pactile/index.js.map +1 -1
- package/dist/templates/pactile/modules/approval-personal/contract.md +43 -43
- package/dist/templates/pactile/modules/close-basic/contract.md +37 -37
- package/dist/templates/pactile/modules/context-progressive/contract.md +44 -44
- package/dist/templates/pactile/modules/debug-recovery/contract.md +44 -44
- package/dist/templates/pactile/modules/define-basic/contract.md +39 -39
- package/dist/templates/pactile/modules/define-extended/contract.md +45 -45
- package/dist/templates/pactile/modules/execute-agent/contract.md +38 -38
- package/dist/templates/pactile/modules/independent-check/contract.md +35 -35
- package/dist/templates/pactile/modules/index.json +127 -133
- package/dist/templates/pactile/modules/intake-basic/contract.md +34 -34
- package/dist/templates/pactile/modules/observability-local/contract.md +31 -31
- package/dist/templates/pactile/modules/parent-child/contract.md +45 -45
- package/dist/templates/pactile/modules/personal-memory/contract.md +55 -55
- package/dist/templates/pactile/modules/retention-storage/contract.md +43 -43
- package/dist/templates/pactile/modules/retrieval-extended/contract.md +78 -77
- package/dist/templates/pactile/modules/session-transfer/contract.md +41 -41
- package/dist/templates/pactile/modules/spec-learning/contract.md +50 -50
- package/dist/templates/pactile/modules/vcs-integration/contract.md +46 -46
- package/dist/templates/pactile/modules/verify-basic/contract.md +38 -38
- package/dist/templates/pactile/modules/worker-orchestration/contract.md +47 -47
- package/dist/templates/pactile/scripts/retrieval_probe_matrix_template.json +43 -43
- package/dist/templates/pactile/tasks/locale/en/default-prd.md +27 -27
- package/dist/templates/pactile/tasks/locale/zh/default-prd.md +27 -27
- package/dist/templates/pactile/tasks/templates/release-execution/design.md +60 -60
- package/dist/templates/pactile/tasks/templates/release-execution/handoff-template.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-execution/implement.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-execution/prd.md +30 -30
- package/dist/templates/pactile/tasks/templates/release-readiness/design.md +49 -49
- package/dist/templates/pactile/tasks/templates/release-readiness/handoff-template.md +38 -38
- package/dist/templates/pactile/tasks/templates/release-readiness/implement.md +28 -28
- package/dist/templates/pactile/tasks/templates/release-readiness/prd.md +30 -30
- package/dist/templates/pactile/workflow.md +65 -64
- package/dist/types/ai-tools.d.ts +12 -13
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +15 -14
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts +1 -1
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -1
- package/dist/utils/cwd-guard.js +1 -1
- package/dist/utils/cwd-guard.js.map +1 -1
- package/dist/utils/developer.d.ts +5 -0
- package/dist/utils/developer.d.ts.map +1 -0
- package/dist/utils/developer.js +38 -0
- package/dist/utils/developer.js.map +1 -0
- package/dist/utils/git-root.d.ts +3 -0
- package/dist/utils/git-root.d.ts.map +1 -0
- package/dist/utils/git-root.js +24 -0
- package/dist/utils/git-root.js.map +1 -0
- package/dist/utils/local-date.d.ts +3 -0
- package/dist/utils/local-date.d.ts.map +1 -0
- package/dist/utils/local-date.js +8 -0
- package/dist/utils/local-date.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts +5 -4
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +11 -21
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/p36-upgrade.d.ts +1 -1
- package/dist/utils/p36-upgrade.d.ts.map +1 -1
- package/dist/utils/p36-upgrade.js +1 -1
- package/dist/utils/p36-upgrade.js.map +1 -1
- package/dist/utils/post-update-smoke.d.ts +1 -4
- package/dist/utils/post-update-smoke.d.ts.map +1 -1
- package/dist/utils/post-update-smoke.js +13 -25
- package/dist/utils/post-update-smoke.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts +2 -17
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +14 -119
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/readiness.d.ts +14 -0
- package/dist/utils/readiness.d.ts.map +1 -1
- package/dist/utils/readiness.js +61 -30
- package/dist/utils/readiness.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.d.ts +1 -1
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
- package/dist/utils/retrieval-result-ranking.d.ts +1 -1
- package/dist/utils/retrieval-result-ranking.d.ts.map +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -1
- package/dist/utils/task-json.d.ts +3 -3
- package/dist/utils/task-json.d.ts.map +1 -1
- package/dist/utils/task-json.js +3 -3
- package/dist/utils/task-json.js.map +1 -1
- package/dist/utils/template-hash.d.ts +4 -0
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +1 -1
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/update-rollout-report.d.ts +9 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -1
- package/dist/utils/update-rollout-report.js +14 -1
- package/dist/utils/update-rollout-report.js.map +1 -1
- package/package.json +22 -11
- package/scripts/postinstall.js +6 -6
- package/dist/commands/channel/adapters/claude.d.ts +0 -29
- package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
- package/dist/commands/channel/adapters/claude.js +0 -203
- package/dist/commands/channel/adapters/claude.js.map +0 -1
- package/dist/commands/channel/adapters/codex.d.ts +0 -85
- package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
- package/dist/commands/channel/adapters/codex.js +0 -505
- package/dist/commands/channel/adapters/codex.js.map +0 -1
- package/dist/commands/channel/adapters/index.d.ts +0 -84
- package/dist/commands/channel/adapters/index.d.ts.map +0 -1
- package/dist/commands/channel/adapters/index.js +0 -115
- package/dist/commands/channel/adapters/index.js.map +0 -1
- package/dist/commands/channel/adapters/types.d.ts +0 -33
- package/dist/commands/channel/adapters/types.d.ts.map +0 -1
- package/dist/commands/channel/adapters/types.js +0 -2
- package/dist/commands/channel/adapters/types.js.map +0 -1
- package/dist/commands/channel/agent-loader.d.ts +0 -32
- package/dist/commands/channel/agent-loader.d.ts.map +0 -1
- package/dist/commands/channel/agent-loader.js +0 -154
- package/dist/commands/channel/agent-loader.js.map +0 -1
- package/dist/commands/channel/context-loader.d.ts +0 -26
- package/dist/commands/channel/context-loader.d.ts.map +0 -1
- package/dist/commands/channel/context-loader.js +0 -290
- package/dist/commands/channel/context-loader.js.map +0 -1
- package/dist/commands/channel/context.d.ts +0 -16
- package/dist/commands/channel/context.d.ts.map +0 -1
- package/dist/commands/channel/context.js +0 -83
- package/dist/commands/channel/context.js.map +0 -1
- package/dist/commands/channel/create.d.ts +0 -27
- package/dist/commands/channel/create.d.ts.map +0 -1
- package/dist/commands/channel/create.js +0 -39
- package/dist/commands/channel/create.js.map +0 -1
- package/dist/commands/channel/dev-parse-trace.d.ts +0 -14
- package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
- package/dist/commands/channel/dev-parse-trace.js +0 -70
- package/dist/commands/channel/dev-parse-trace.js.map +0 -1
- package/dist/commands/channel/guard.d.ts +0 -150
- package/dist/commands/channel/guard.d.ts.map +0 -1
- package/dist/commands/channel/guard.js +0 -475
- package/dist/commands/channel/guard.js.map +0 -1
- package/dist/commands/channel/index.d.ts +0 -3
- package/dist/commands/channel/index.d.ts.map +0 -1
- package/dist/commands/channel/index.js +0 -531
- package/dist/commands/channel/index.js.map +0 -1
- package/dist/commands/channel/interrupt.d.ts +0 -10
- package/dist/commands/channel/interrupt.d.ts.map +0 -1
- package/dist/commands/channel/interrupt.js +0 -22
- package/dist/commands/channel/interrupt.js.map +0 -1
- package/dist/commands/channel/kill.d.ts +0 -7
- package/dist/commands/channel/kill.d.ts.map +0 -1
- package/dist/commands/channel/kill.js +0 -121
- package/dist/commands/channel/kill.js.map +0 -1
- package/dist/commands/channel/list.d.ts +0 -17
- package/dist/commands/channel/list.d.ts.map +0 -1
- package/dist/commands/channel/list.js +0 -233
- package/dist/commands/channel/list.js.map +0 -1
- package/dist/commands/channel/messages.d.ts +0 -15
- package/dist/commands/channel/messages.d.ts.map +0 -1
- package/dist/commands/channel/messages.js +0 -245
- package/dist/commands/channel/messages.js.map +0 -1
- package/dist/commands/channel/rm.d.ts +0 -27
- package/dist/commands/channel/rm.d.ts.map +0 -1
- package/dist/commands/channel/rm.js +0 -216
- package/dist/commands/channel/rm.js.map +0 -1
- package/dist/commands/channel/run.d.ts +0 -30
- package/dist/commands/channel/run.d.ts.map +0 -1
- package/dist/commands/channel/run.js +0 -130
- package/dist/commands/channel/run.js.map +0 -1
- package/dist/commands/channel/send.d.ts +0 -11
- package/dist/commands/channel/send.d.ts.map +0 -1
- package/dist/commands/channel/send.js +0 -24
- package/dist/commands/channel/send.js.map +0 -1
- package/dist/commands/channel/spawn.d.ts +0 -40
- package/dist/commands/channel/spawn.d.ts.map +0 -1
- package/dist/commands/channel/spawn.js +0 -242
- package/dist/commands/channel/spawn.js.map +0 -1
- package/dist/commands/channel/store/events.d.ts +0 -39
- package/dist/commands/channel/store/events.d.ts.map +0 -1
- package/dist/commands/channel/store/events.js +0 -87
- package/dist/commands/channel/store/events.js.map +0 -1
- package/dist/commands/channel/store/filter.d.ts +0 -3
- package/dist/commands/channel/store/filter.d.ts.map +0 -1
- package/dist/commands/channel/store/filter.js +0 -2
- package/dist/commands/channel/store/filter.js.map +0 -1
- package/dist/commands/channel/store/lock.d.ts +0 -23
- package/dist/commands/channel/store/lock.d.ts.map +0 -1
- package/dist/commands/channel/store/lock.js +0 -99
- package/dist/commands/channel/store/lock.js.map +0 -1
- package/dist/commands/channel/store/paths.d.ts +0 -63
- package/dist/commands/channel/store/paths.d.ts.map +0 -1
- package/dist/commands/channel/store/paths.js +0 -247
- package/dist/commands/channel/store/paths.js.map +0 -1
- package/dist/commands/channel/store/schema.d.ts +0 -27
- package/dist/commands/channel/store/schema.d.ts.map +0 -1
- package/dist/commands/channel/store/schema.js +0 -34
- package/dist/commands/channel/store/schema.js.map +0 -1
- package/dist/commands/channel/store/thread-state.d.ts +0 -5
- package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
- package/dist/commands/channel/store/thread-state.js +0 -16
- package/dist/commands/channel/store/thread-state.js.map +0 -1
- package/dist/commands/channel/store/watch.d.ts +0 -19
- package/dist/commands/channel/store/watch.d.ts.map +0 -1
- package/dist/commands/channel/store/watch.js +0 -146
- package/dist/commands/channel/store/watch.js.map +0 -1
- package/dist/commands/channel/supervisor/idle.d.ts +0 -46
- package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/idle.js +0 -72
- package/dist/commands/channel/supervisor/idle.js.map +0 -1
- package/dist/commands/channel/supervisor/inbox.d.ts +0 -30
- package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/inbox.js +0 -160
- package/dist/commands/channel/supervisor/inbox.js.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.d.ts +0 -68
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/shutdown.js +0 -146
- package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
- package/dist/commands/channel/supervisor/stdout.d.ts +0 -51
- package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/stdout.js +0 -121
- package/dist/commands/channel/supervisor/stdout.js.map +0 -1
- package/dist/commands/channel/supervisor/turns.d.ts +0 -31
- package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/turns.js +0 -45
- package/dist/commands/channel/supervisor/turns.js.map +0 -1
- package/dist/commands/channel/supervisor/warning.d.ts +0 -48
- package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
- package/dist/commands/channel/supervisor/warning.js +0 -77
- package/dist/commands/channel/supervisor/warning.js.map +0 -1
- package/dist/commands/channel/supervisor.d.ts +0 -59
- package/dist/commands/channel/supervisor.d.ts.map +0 -1
- package/dist/commands/channel/supervisor.js +0 -345
- package/dist/commands/channel/supervisor.js.map +0 -1
- package/dist/commands/channel/text-body.d.ts +0 -13
- package/dist/commands/channel/text-body.d.ts.map +0 -1
- package/dist/commands/channel/text-body.js +0 -47
- package/dist/commands/channel/text-body.js.map +0 -1
- package/dist/commands/channel/threads.d.ts +0 -39
- package/dist/commands/channel/threads.d.ts.map +0 -1
- package/dist/commands/channel/threads.js +0 -106
- package/dist/commands/channel/threads.js.map +0 -1
- package/dist/commands/channel/title.d.ts +0 -12
- package/dist/commands/channel/title.d.ts.map +0 -1
- package/dist/commands/channel/title.js +0 -24
- package/dist/commands/channel/title.js.map +0 -1
- package/dist/commands/channel/wait.d.ts +0 -17
- package/dist/commands/channel/wait.d.ts.map +0 -1
- package/dist/commands/channel/wait.js +0 -75
- package/dist/commands/channel/wait.js.map +0 -1
- package/dist/commands/validate-rules.d.ts +0 -6
- package/dist/commands/validate-rules.d.ts.map +0 -1
- package/dist/commands/validate-rules.js +0 -33
- package/dist/commands/validate-rules.js.map +0 -1
- package/dist/configurators/cursor.d.ts +0 -21
- package/dist/configurators/cursor.d.ts.map +0 -1
- package/dist/configurators/cursor.js +0 -51
- package/dist/configurators/cursor.js.map +0 -1
- package/dist/pactile/adapters/cursor/index.d.ts +0 -60
- package/dist/pactile/adapters/cursor/index.d.ts.map +0 -1
- package/dist/pactile/adapters/cursor/index.js +0 -186
- package/dist/pactile/adapters/cursor/index.js.map +0 -1
- package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +0 -179
- package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +0 -149
- package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +0 -904
- package/dist/templates/cursor/agents/pactile-check.md +0 -58
- package/dist/templates/cursor/agents/pactile-implement.md +0 -56
- package/dist/templates/cursor/agents/pactile-research.md +0 -51
- package/dist/templates/cursor/commands/handoff.md +0 -101
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +0 -14
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +0 -1
- package/dist/templates/cursor/fixtures/expected-rules.js +0 -20
- package/dist/templates/cursor/fixtures/expected-rules.js.map +0 -1
- package/dist/templates/cursor/hooks.json +0 -52
- package/dist/templates/cursor/index.d.ts +0 -19
- package/dist/templates/cursor/index.d.ts.map +0 -1
- package/dist/templates/cursor/index.js +0 -19
- package/dist/templates/cursor/index.js.map +0 -1
- package/dist/templates/cursor/rules/pactile-bootstrap.mdc +0 -18
- package/dist/templates/cursor/worktrees.json +0 -11
- package/dist/templates/markdown/framework/cursor-context-injection-guide.md.txt +0 -85
- package/dist/templates/markdown/framework/cursor-native-modes-guide.md.txt +0 -239
- package/dist/templates/markdown/framework/cursor-semantic-compliance.md.txt +0 -41
- package/dist/templates/markdown/framework/cursor-subagent-policy.md.txt +0 -90
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +0 -45
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +0 -25
- package/dist/templates/pactile/modules/candidate-pool/contract.md +0 -37
- package/dist/templates/pactile/pool/README.md +0 -149
- package/dist/templates/pactile/pool/items/.gitkeep +0 -0
- package/dist/templates/pactile/pool/plan.md +0 -50
- package/dist/templates/pactile/scripts/__init__.py +0 -5
- package/dist/templates/pactile/scripts/add_session.py +0 -547
- package/dist/templates/pactile/scripts/build_context_pack.py +0 -17
- package/dist/templates/pactile/scripts/build_retrieval_pack.py +0 -376
- package/dist/templates/pactile/scripts/codegraph_session_smoke.py +0 -76
- package/dist/templates/pactile/scripts/common/__init__.py +0 -103
- package/dist/templates/pactile/scripts/common/active_task.py +0 -576
- package/dist/templates/pactile/scripts/common/adapter_middleware.py +0 -1373
- package/dist/templates/pactile/scripts/common/artifact_locale.py +0 -303
- package/dist/templates/pactile/scripts/common/artifact_search.py +0 -587
- package/dist/templates/pactile/scripts/common/cli_adapter.py +0 -135
- package/dist/templates/pactile/scripts/common/cli_environment.py +0 -155
- package/dist/templates/pactile/scripts/common/codebase_retrieval_router.py +0 -1339
- package/dist/templates/pactile/scripts/common/config.py +0 -497
- package/dist/templates/pactile/scripts/common/context_pack.py +0 -371
- package/dist/templates/pactile/scripts/common/cursor_retrieval_env.py +0 -31
- package/dist/templates/pactile/scripts/common/developer.py +0 -190
- package/dist/templates/pactile/scripts/common/execution_strategy.py +0 -268
- package/dist/templates/pactile/scripts/common/full_quality.py +0 -237
- package/dist/templates/pactile/scripts/common/git.py +0 -37
- package/dist/templates/pactile/scripts/common/git_context.py +0 -198
- package/dist/templates/pactile/scripts/common/injection_budget.py +0 -317
- package/dist/templates/pactile/scripts/common/io.py +0 -37
- package/dist/templates/pactile/scripts/common/kernel_command.py +0 -369
- package/dist/templates/pactile/scripts/common/lite_context.py +0 -280
- package/dist/templates/pactile/scripts/common/log.py +0 -45
- package/dist/templates/pactile/scripts/common/ondemand_topology.py +0 -419
- package/dist/templates/pactile/scripts/common/packages_context.py +0 -239
- package/dist/templates/pactile/scripts/common/pactile_config.py +0 -131
- package/dist/templates/pactile/scripts/common/parallel_declaration.py +0 -369
- package/dist/templates/pactile/scripts/common/parent_orchestration.py +0 -1198
- package/dist/templates/pactile/scripts/common/paths.py +0 -756
- package/dist/templates/pactile/scripts/common/pool_refs.py +0 -119
- package/dist/templates/pactile/scripts/common/pool_slice.py +0 -269
- package/dist/templates/pactile/scripts/common/pool_store.py +0 -766
- package/dist/templates/pactile/scripts/common/project_file_stats.py +0 -91
- package/dist/templates/pactile/scripts/common/retrieval_adapter_metadata.py +0 -943
- package/dist/templates/pactile/scripts/common/retrieval_agent_instructions.py +0 -123
- package/dist/templates/pactile/scripts/common/retrieval_evidence.py +0 -915
- package/dist/templates/pactile/scripts/common/retrieval_pack.py +0 -422
- package/dist/templates/pactile/scripts/common/retrieval_pack_context.py +0 -122
- package/dist/templates/pactile/scripts/common/retrieval_plan_gate.py +0 -61
- package/dist/templates/pactile/scripts/common/retrieval_result_ranking.py +0 -104
- package/dist/templates/pactile/scripts/common/retrieval_tool_classification.py +0 -166
- package/dist/templates/pactile/scripts/common/safe_commit.py +0 -285
- package/dist/templates/pactile/scripts/common/semantic_plan_gate.py +0 -53
- package/dist/templates/pactile/scripts/common/session_context.py +0 -1213
- package/dist/templates/pactile/scripts/common/session_memory.py +0 -386
- package/dist/templates/pactile/scripts/common/session_pack.py +0 -886
- package/dist/templates/pactile/scripts/common/smart_search_evidence.py +0 -514
- package/dist/templates/pactile/scripts/common/smart_search_resolve.py +0 -150
- package/dist/templates/pactile/scripts/common/subagent_dispatch.py +0 -592
- package/dist/templates/pactile/scripts/common/task_context.py +0 -241
- package/dist/templates/pactile/scripts/common/task_dashboard.py +0 -286
- package/dist/templates/pactile/scripts/common/task_dependencies.py +0 -648
- package/dist/templates/pactile/scripts/common/task_gates.py +0 -2478
- package/dist/templates/pactile/scripts/common/task_map.py +0 -703
- package/dist/templates/pactile/scripts/common/task_queue.py +0 -188
- package/dist/templates/pactile/scripts/common/task_store.py +0 -2252
- package/dist/templates/pactile/scripts/common/task_utils.py +0 -274
- package/dist/templates/pactile/scripts/common/tasks.py +0 -231
- package/dist/templates/pactile/scripts/common/test_adapter_middleware.py +0 -199
- package/dist/templates/pactile/scripts/common/test_depends_mode_block.py +0 -509
- package/dist/templates/pactile/scripts/common/test_full_quality.py +0 -197
- package/dist/templates/pactile/scripts/common/test_kernel_command.py +0 -336
- package/dist/templates/pactile/scripts/common/test_lite_path.py +0 -190
- package/dist/templates/pactile/scripts/common/test_observable_defaults.py +0 -141
- package/dist/templates/pactile/scripts/common/test_ondemand_topology.py +0 -237
- package/dist/templates/pactile/scripts/common/test_parallel_declaration.py +0 -264
- package/dist/templates/pactile/scripts/common/test_pool_slice.py +0 -198
- package/dist/templates/pactile/scripts/common/test_pool_store.py +0 -452
- package/dist/templates/pactile/scripts/common/test_retrieval_arbitration.py +0 -331
- package/dist/templates/pactile/scripts/common/test_task_dashboard.py +0 -155
- package/dist/templates/pactile/scripts/common/test_task_dependencies.py +0 -329
- package/dist/templates/pactile/scripts/common/test_task_store_kernel_patch.py +0 -163
- package/dist/templates/pactile/scripts/common/types.py +0 -110
- package/dist/templates/pactile/scripts/common/workflow_phase.py +0 -194
- package/dist/templates/pactile/scripts/compile_session_pack.py +0 -15
- package/dist/templates/pactile/scripts/cursor_retrieval_probe.py +0 -64
- package/dist/templates/pactile/scripts/cursor_retrieval_probe_prompt.md +0 -33
- package/dist/templates/pactile/scripts/generate_dispatch_prompt.py +0 -182
- package/dist/templates/pactile/scripts/get_context.py +0 -19
- package/dist/templates/pactile/scripts/get_developer.py +0 -26
- package/dist/templates/pactile/scripts/hooks/linear_sync.py +0 -243
- package/dist/templates/pactile/scripts/init_developer.py +0 -51
- package/dist/templates/pactile/scripts/injection_budget_probe.py +0 -69
- package/dist/templates/pactile/scripts/pool.py +0 -237
- package/dist/templates/pactile/scripts/rank_retrieval_candidates.py +0 -98
- package/dist/templates/pactile/scripts/route_codebase_retrieval.py +0 -72
- package/dist/templates/pactile/scripts/run_smart_search.py +0 -12
- package/dist/templates/pactile/scripts/score_evidence.py +0 -131
- package/dist/templates/pactile/scripts/search_artifacts.py +0 -13
- package/dist/templates/pactile/scripts/search_memory.py +0 -12
- package/dist/templates/pactile/scripts/spec_health_outcomes.py +0 -160
- package/dist/templates/pactile/scripts/task.py +0 -1118
- package/dist/templates/pactile/scripts/verify_evidence_probe.py +0 -138
- package/dist/templates/shared-hooks/event-bridge.py +0 -121
- package/dist/templates/shared-hooks/index.d.ts +0 -50
- package/dist/templates/shared-hooks/index.d.ts.map +0 -1
- package/dist/templates/shared-hooks/index.js +0 -96
- package/dist/templates/shared-hooks/index.js.map +0 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +0 -217
- package/dist/templates/shared-hooks/inject-shell-session-context.py +0 -183
- package/dist/templates/shared-hooks/inject-subagent-context.py +0 -267
- package/dist/templates/shared-hooks/inject-workflow-state.py +0 -106
- package/dist/templates/shared-hooks/rename-session-for-task.py +0 -231
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +0 -345
- package/dist/templates/shared-hooks/session-start.py +0 -355
- package/dist/templates/shared-hooks/spec-write-audit.py +0 -173
- package/dist/utils/mirror-check.d.ts +0 -22
- package/dist/utils/mirror-check.d.ts.map +0 -1
- package/dist/utils/mirror-check.js +0 -90
- package/dist/utils/mirror-check.js.map +0 -1
- package/dist/utils/validate-rules.d.ts +0 -21
- package/dist/utils/validate-rules.d.ts.map +0 -1
- package/dist/utils/validate-rules.js +0 -88
- package/dist/utils/validate-rules.js.map +0 -1
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Channel worker OOM guard policy.
|
|
3
|
-
*
|
|
4
|
-
* Resolves idle-cleanup TTL and live-worker budget from CLI flag /
|
|
5
|
-
* environment / project config / built-in defaults (in that precedence
|
|
6
|
-
* order), then scans the live worker registry inside a project bucket
|
|
7
|
-
* to enforce both constraints at spawn time.
|
|
8
|
-
*
|
|
9
|
-
* Boundary: this module lives in the CLI runtime layer. Core owns
|
|
10
|
-
* worker activity / `idleSince` projection; the supervisor owns process
|
|
11
|
-
* launch + signals. The guard only consumes that durable state and
|
|
12
|
-
* sends OS signals through pid files.
|
|
13
|
-
*/
|
|
14
|
-
import { type WorkerState } from "@blxzer/pactile-core/channel";
|
|
15
|
-
/** Built-in default idle-cleanup TTL for spawned workers (5 minutes). */
|
|
16
|
-
export declare const DEFAULT_IDLE_TTL_MS: number;
|
|
17
|
-
/** Built-in default live-worker budget per project/scope. */
|
|
18
|
-
export declare const DEFAULT_MAX_LIVE_WORKERS = 6;
|
|
19
|
-
/** Env var override for the idle-cleanup TTL. */
|
|
20
|
-
export declare const ENV_IDLE_TIMEOUT: "PACTILE_CHANNEL_WORKER_IDLE_TIMEOUT";
|
|
21
|
-
/** Env var override for the live-worker budget. */
|
|
22
|
-
export declare const ENV_MAX_LIVE_WORKERS: "PACTILE_CHANNEL_MAX_LIVE_WORKERS";
|
|
23
|
-
export interface WorkerGuardConfig {
|
|
24
|
-
/** Idle-cleanup TTL in ms. `0` disables idle cleanup for new spawns. */
|
|
25
|
-
idleTimeoutMs: number;
|
|
26
|
-
/** Live-worker budget. `0` disables the spawn-time budget check. */
|
|
27
|
-
maxLiveWorkers: number;
|
|
28
|
-
}
|
|
29
|
-
export interface ResolveGuardOptions {
|
|
30
|
-
/** CLI `--idle-timeout` value (already millisecond-parsed). */
|
|
31
|
-
flagIdleTimeoutMs?: number;
|
|
32
|
-
/** CLI `--max-live-workers` value. */
|
|
33
|
-
flagMaxLiveWorkers?: number;
|
|
34
|
-
/** Override cwd for config lookup (default `process.cwd()`). */
|
|
35
|
-
cwd?: string;
|
|
36
|
-
/** Override env source (default `process.env`). */
|
|
37
|
-
env?: NodeJS.ProcessEnv;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Resolve the effective guard policy. Precedence:
|
|
41
|
-
* 1. CLI flag (`flag*Ms` / `flagMaxLiveWorkers`)
|
|
42
|
-
* 2. environment variable
|
|
43
|
-
* 3. `.pactile/config.yaml` `channel.worker_guard`
|
|
44
|
-
* 4. built-in default constant
|
|
45
|
-
*/
|
|
46
|
-
export declare function resolveWorkerGuardConfig(opts?: ResolveGuardOptions): WorkerGuardConfig;
|
|
47
|
-
interface ProjectGuardConfig {
|
|
48
|
-
idleTimeoutMs?: number;
|
|
49
|
-
maxLiveWorkers?: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Parse the `channel.worker_guard` section out of `.pactile/config.yaml`.
|
|
53
|
-
* Mirrors the lightweight line-scanner used elsewhere in update.ts so we
|
|
54
|
-
* don't pull in a YAML dependency just for this two-field section.
|
|
55
|
-
*/
|
|
56
|
-
export declare function loadWorkerGuardConfig(cwd: string): ProjectGuardConfig | undefined;
|
|
57
|
-
/** Exposed for unit tests. */
|
|
58
|
-
export declare function parseWorkerGuardSection(content: string): ProjectGuardConfig | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* Live worker observed inside the spawn-time guard scan.
|
|
61
|
-
*/
|
|
62
|
-
export interface LiveWorker {
|
|
63
|
-
channel: string;
|
|
64
|
-
workerId: string;
|
|
65
|
-
state: WorkerState;
|
|
66
|
-
/** Supervisor pid that owns this worker, when readable + alive. */
|
|
67
|
-
supervisorPid?: number;
|
|
68
|
-
/** True when the OS command line still looks like this worker's supervisor. */
|
|
69
|
-
supervisorVerified?: boolean;
|
|
70
|
-
/** Worker child pid, when readable. */
|
|
71
|
-
workerPid?: number;
|
|
72
|
-
}
|
|
73
|
-
export interface ScanLiveWorkersOptions {
|
|
74
|
-
/** Project bucket key (default current). */
|
|
75
|
-
projectKey?: string;
|
|
76
|
-
/** Override channel root scan (default uses real channelRoot()). */
|
|
77
|
-
root?: string;
|
|
78
|
-
/** Override supervisor process verification (used by tests). */
|
|
79
|
-
isSupervisorProcess?: (pid: number, channel: string, worker: string) => boolean;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Enumerate live (non-terminal + supervisor-pid alive) workers across
|
|
83
|
-
* every channel in the given project bucket.
|
|
84
|
-
*/
|
|
85
|
-
export declare function scanLiveWorkers(opts?: ScanLiveWorkersOptions): LiveWorker[];
|
|
86
|
-
export declare function isSupervisorProcess(pid: number, channel: string, worker: string): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Pure predicate: is this live worker eligible for idle-cleanup right
|
|
89
|
-
* now? Mid-turn workers and workers without `idleSince` (e.g. they
|
|
90
|
-
* never spawned cleanly) are never killed by the guard.
|
|
91
|
-
*/
|
|
92
|
-
export declare function isIdleCleanupEligible(live: LiveWorker, idleTimeoutMs: number, now: number): boolean;
|
|
93
|
-
export interface CleanupResult {
|
|
94
|
-
killed: LiveWorker[];
|
|
95
|
-
failed: {
|
|
96
|
-
worker: LiveWorker;
|
|
97
|
-
error: string;
|
|
98
|
-
}[];
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Kill workers whose idle TTL has expired. Writes a one-shot shutdown
|
|
102
|
-
* reason sidecar before signalling the supervisor so the supervisor's
|
|
103
|
-
* existing shutdown funnel emits the single terminal `killed` event.
|
|
104
|
-
*
|
|
105
|
-
* Returns the workers that were signalled. Failures are collected — a
|
|
106
|
-
* dead pid or read race is not fatal; the next scan re-evaluates.
|
|
107
|
-
*/
|
|
108
|
-
export declare function cleanupExpiredIdleWorkers(candidates: LiveWorker[], idleTimeoutMs: number, opts?: {
|
|
109
|
-
project?: string;
|
|
110
|
-
now?: number;
|
|
111
|
-
}): Promise<CleanupResult>;
|
|
112
|
-
export interface EnforceBudgetInput {
|
|
113
|
-
/** Project bucket key (default current). */
|
|
114
|
-
projectKey?: string;
|
|
115
|
-
/** Override channel root scan path (used by tests). */
|
|
116
|
-
root?: string;
|
|
117
|
-
/** Effective guard policy. */
|
|
118
|
-
policy: WorkerGuardConfig;
|
|
119
|
-
/** Override `now` for deterministic tests. */
|
|
120
|
-
now?: number;
|
|
121
|
-
/** Override supervisor process verification (used by tests). */
|
|
122
|
-
isSupervisorProcess?: ScanLiveWorkersOptions["isSupervisorProcess"];
|
|
123
|
-
}
|
|
124
|
-
export interface EnforceBudgetResult {
|
|
125
|
-
/** Workers killed by expired-idle cleanup during this enforcement. */
|
|
126
|
-
cleaned: LiveWorker[];
|
|
127
|
-
/** Live workers remaining after cleanup. */
|
|
128
|
-
remaining: LiveWorker[];
|
|
129
|
-
/** True when a new spawn is allowed; false when budget is exceeded. */
|
|
130
|
-
allowed: boolean;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Run the spawn-time guard for a project bucket. Cleans expired idle
|
|
134
|
-
* workers, re-scans, then decides whether the live worker budget has
|
|
135
|
-
* room for one more spawn.
|
|
136
|
-
*/
|
|
137
|
-
export declare function enforceSpawnBudget(input: EnforceBudgetInput): Promise<EnforceBudgetResult>;
|
|
138
|
-
/** Build a multi-line, actionable overflow error string. */
|
|
139
|
-
export declare function formatBudgetOverflowError(args: {
|
|
140
|
-
projectKey: string;
|
|
141
|
-
live: LiveWorker[];
|
|
142
|
-
limit: number;
|
|
143
|
-
}): string;
|
|
144
|
-
/**
|
|
145
|
-
* Convenience helper: ensure `channelRoot()` is initialised before scan
|
|
146
|
-
* (otherwise the project dir may not yet exist on first spawn).
|
|
147
|
-
*/
|
|
148
|
-
export declare function ensureRootExists(): void;
|
|
149
|
-
export {};
|
|
150
|
-
//# sourceMappingURL=guard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/commands/channel/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAgBtC,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,QAAgB,CAAC;AAEjD,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,uCAAoD,CAAC;AAElF,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,oCAAiD,CAAC;AAEnF,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,GAAE,mBAAwB,GAC7B,iBAAiB,CAyBnB;AAsDD,UAAU,kBAAkB;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,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,UAAU,EAAE,UAAU,EAAE,EACxB,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,OAAO,CAAC,aAAa,CAAC,CA0CxB;AAED,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,4CAA4C;IAC5C,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,uEAAuE;IACvE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAmC9B;AAED,4DAA4D;AAC5D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAsBT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Channel worker OOM guard policy.
|
|
3
|
-
*
|
|
4
|
-
* Resolves idle-cleanup TTL and live-worker budget from CLI flag /
|
|
5
|
-
* environment / project config / built-in defaults (in that precedence
|
|
6
|
-
* order), then scans the live worker registry inside a project bucket
|
|
7
|
-
* to enforce both constraints at spawn time.
|
|
8
|
-
*
|
|
9
|
-
* Boundary: this module lives in the CLI runtime layer. Core owns
|
|
10
|
-
* worker activity / `idleSince` projection; the supervisor owns process
|
|
11
|
-
* launch + signals. The guard only consumes that durable state and
|
|
12
|
-
* sends OS signals through pid files.
|
|
13
|
-
*/
|
|
14
|
-
import { execFileSync } from "node:child_process";
|
|
15
|
-
import fs from "node:fs";
|
|
16
|
-
import path from "node:path";
|
|
17
|
-
import { isTerminalLifecycle, reduceWorkerRegistry, } from "@blxzer/pactile-core/channel";
|
|
18
|
-
import { PACTILE_ENVIRONMENT_KEYS, readPactileEnvironment, } from "@blxzer/pactile-core";
|
|
19
|
-
import { DIR_NAMES } from "../../constants/paths.js";
|
|
20
|
-
import { channelRoot, currentProjectKey, projectDir, workerFile, } from "./store/paths.js";
|
|
21
|
-
import { parseDuration } from "./wait.js";
|
|
22
|
-
/** Built-in default idle-cleanup TTL for spawned workers (5 minutes). */
|
|
23
|
-
export const DEFAULT_IDLE_TTL_MS = 5 * 60 * 1000;
|
|
24
|
-
/** Built-in default live-worker budget per project/scope. */
|
|
25
|
-
export const DEFAULT_MAX_LIVE_WORKERS = 6;
|
|
26
|
-
/** Env var override for the idle-cleanup TTL. */
|
|
27
|
-
export const ENV_IDLE_TIMEOUT = PACTILE_ENVIRONMENT_KEYS.channelWorkerIdleTimeout;
|
|
28
|
-
/** Env var override for the live-worker budget. */
|
|
29
|
-
export const ENV_MAX_LIVE_WORKERS = PACTILE_ENVIRONMENT_KEYS.channelMaxLiveWorkers;
|
|
30
|
-
/**
|
|
31
|
-
* Resolve the effective guard policy. Precedence:
|
|
32
|
-
* 1. CLI flag (`flag*Ms` / `flagMaxLiveWorkers`)
|
|
33
|
-
* 2. environment variable
|
|
34
|
-
* 3. `.pactile/config.yaml` `channel.worker_guard`
|
|
35
|
-
* 4. built-in default constant
|
|
36
|
-
*/
|
|
37
|
-
export function resolveWorkerGuardConfig(opts = {}) {
|
|
38
|
-
const cwd = opts.cwd ?? process.cwd();
|
|
39
|
-
const env = opts.env ?? process.env;
|
|
40
|
-
const fromConfig = loadWorkerGuardConfig(cwd);
|
|
41
|
-
const idleTimeoutMs = pickNonNegativeMs(opts.flagIdleTimeoutMs, parseEnvDuration(readPactileEnvironment(ENV_IDLE_TIMEOUT, { env }), ENV_IDLE_TIMEOUT), fromConfig?.idleTimeoutMs, DEFAULT_IDLE_TTL_MS);
|
|
42
|
-
const maxLiveWorkers = pickNonNegativeInt(opts.flagMaxLiveWorkers, parseEnvInt(readPactileEnvironment(ENV_MAX_LIVE_WORKERS, { env }), ENV_MAX_LIVE_WORKERS), fromConfig?.maxLiveWorkers, DEFAULT_MAX_LIVE_WORKERS);
|
|
43
|
-
return { idleTimeoutMs, maxLiveWorkers };
|
|
44
|
-
}
|
|
45
|
-
function pickNonNegativeMs(...candidates) {
|
|
46
|
-
for (const c of candidates) {
|
|
47
|
-
if (c === undefined)
|
|
48
|
-
continue;
|
|
49
|
-
if (!Number.isFinite(c) || c < 0) {
|
|
50
|
-
throw new Error(`Idle timeout must be a non-negative duration (got ${c})`);
|
|
51
|
-
}
|
|
52
|
-
return c;
|
|
53
|
-
}
|
|
54
|
-
return DEFAULT_IDLE_TTL_MS;
|
|
55
|
-
}
|
|
56
|
-
function pickNonNegativeInt(...candidates) {
|
|
57
|
-
for (const c of candidates) {
|
|
58
|
-
if (c === undefined)
|
|
59
|
-
continue;
|
|
60
|
-
if (!Number.isInteger(c) || c < 0) {
|
|
61
|
-
throw new Error(`Max live workers must be a non-negative integer (got ${c})`);
|
|
62
|
-
}
|
|
63
|
-
return c;
|
|
64
|
-
}
|
|
65
|
-
return DEFAULT_MAX_LIVE_WORKERS;
|
|
66
|
-
}
|
|
67
|
-
function parseEnvDuration(raw, envName) {
|
|
68
|
-
if (raw === undefined || raw === "")
|
|
69
|
-
return undefined;
|
|
70
|
-
try {
|
|
71
|
-
return parseDuration(raw);
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
throw new Error(`${envName}: ${err instanceof Error ? err.message : String(err)}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function parseEnvInt(raw, envName) {
|
|
78
|
-
if (raw === undefined || raw === "")
|
|
79
|
-
return undefined;
|
|
80
|
-
const n = Number(raw);
|
|
81
|
-
if (!Number.isInteger(n) || n < 0) {
|
|
82
|
-
throw new Error(`${envName} must be a non-negative integer (got '${raw}')`);
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Parse the `channel.worker_guard` section out of `.pactile/config.yaml`.
|
|
88
|
-
* Mirrors the lightweight line-scanner used elsewhere in update.ts so we
|
|
89
|
-
* don't pull in a YAML dependency just for this two-field section.
|
|
90
|
-
*/
|
|
91
|
-
export function loadWorkerGuardConfig(cwd) {
|
|
92
|
-
const configPath = path.join(cwd, DIR_NAMES.WORKFLOW, "config.yaml");
|
|
93
|
-
if (!fs.existsSync(configPath))
|
|
94
|
-
return undefined;
|
|
95
|
-
let content;
|
|
96
|
-
try {
|
|
97
|
-
content = fs.readFileSync(configPath, "utf-8");
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
return undefined;
|
|
101
|
-
}
|
|
102
|
-
return parseWorkerGuardSection(content);
|
|
103
|
-
}
|
|
104
|
-
/** Exposed for unit tests. */
|
|
105
|
-
export function parseWorkerGuardSection(content) {
|
|
106
|
-
const lines = content.split("\n");
|
|
107
|
-
let inChannel = false;
|
|
108
|
-
let inGuard = false;
|
|
109
|
-
const found = {};
|
|
110
|
-
let any = false;
|
|
111
|
-
for (const raw of lines) {
|
|
112
|
-
const line = raw.replace(/\r$/, "");
|
|
113
|
-
const trimmed = line.trimEnd();
|
|
114
|
-
if (trimmed === "" || trimmed.trimStart().startsWith("#"))
|
|
115
|
-
continue;
|
|
116
|
-
if (/^channel:\s*$/.test(trimmed)) {
|
|
117
|
-
inChannel = true;
|
|
118
|
-
inGuard = false;
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (inChannel && /^ {2}worker_guard:\s*$/.test(trimmed)) {
|
|
122
|
-
inGuard = true;
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
if (inGuard) {
|
|
126
|
-
const idle = trimmed.match(/^ {4}idle_timeout:\s*(.+)$/);
|
|
127
|
-
if (idle) {
|
|
128
|
-
const val = stripValue(idle[1]);
|
|
129
|
-
found.idleTimeoutMs = parseGuardDuration(val, "idle_timeout");
|
|
130
|
-
any = true;
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
const max = trimmed.match(/^ {4}max_live_workers:\s*(.+)$/);
|
|
134
|
-
if (max) {
|
|
135
|
-
const val = stripValue(max[1]);
|
|
136
|
-
const n = Number(val);
|
|
137
|
-
if (!Number.isInteger(n) || n < 0) {
|
|
138
|
-
throw new Error(`channel.worker_guard.max_live_workers must be a non-negative integer (got '${val}')`);
|
|
139
|
-
}
|
|
140
|
-
found.maxLiveWorkers = n;
|
|
141
|
-
any = true;
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
// Anything else at the same indent (or shallower) ends the section.
|
|
145
|
-
if (!/^ {4}\S/.test(line)) {
|
|
146
|
-
inGuard = false;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (inChannel && !/^ {2}\S/.test(line) && /^\S/.test(line)) {
|
|
150
|
-
inChannel = false;
|
|
151
|
-
inGuard = false;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return any ? found : undefined;
|
|
155
|
-
}
|
|
156
|
-
function stripValue(s) {
|
|
157
|
-
return s
|
|
158
|
-
.trim()
|
|
159
|
-
.replace(/\s*#.*$/, "")
|
|
160
|
-
.trim()
|
|
161
|
-
.replace(/^['"]|['"]$/g, "");
|
|
162
|
-
}
|
|
163
|
-
function parseGuardDuration(raw, key) {
|
|
164
|
-
// Allow bare integer = milliseconds (so `0` disables cleanly).
|
|
165
|
-
const asInt = Number(raw);
|
|
166
|
-
if (Number.isFinite(asInt) && /^\d+$/.test(raw)) {
|
|
167
|
-
if (asInt < 0) {
|
|
168
|
-
throw new Error(`channel.worker_guard.${key} must be non-negative (got '${raw}')`);
|
|
169
|
-
}
|
|
170
|
-
// Bare integer 0 = disabled; >0 with no unit = milliseconds.
|
|
171
|
-
return asInt;
|
|
172
|
-
}
|
|
173
|
-
try {
|
|
174
|
-
return parseDuration(raw) ?? 0;
|
|
175
|
-
}
|
|
176
|
-
catch (err) {
|
|
177
|
-
throw new Error(`channel.worker_guard.${key}: ${err instanceof Error ? err.message : String(err)}`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Enumerate live (non-terminal + supervisor-pid alive) workers across
|
|
182
|
-
* every channel in the given project bucket.
|
|
183
|
-
*/
|
|
184
|
-
export function scanLiveWorkers(opts = {}) {
|
|
185
|
-
const project = opts.projectKey ?? currentProjectKey();
|
|
186
|
-
const bucket = opts.root
|
|
187
|
-
? path.join(opts.root, project)
|
|
188
|
-
: projectDir(project);
|
|
189
|
-
if (!fs.existsSync(bucket))
|
|
190
|
-
return [];
|
|
191
|
-
let entries;
|
|
192
|
-
try {
|
|
193
|
-
entries = fs.readdirSync(bucket);
|
|
194
|
-
}
|
|
195
|
-
catch {
|
|
196
|
-
return [];
|
|
197
|
-
}
|
|
198
|
-
const out = [];
|
|
199
|
-
for (const entry of entries) {
|
|
200
|
-
if (entry.startsWith("."))
|
|
201
|
-
continue;
|
|
202
|
-
const dir = path.join(bucket, entry);
|
|
203
|
-
try {
|
|
204
|
-
if (!fs.statSync(dir).isDirectory())
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
catch {
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
const events = path.join(dir, "events.jsonl");
|
|
211
|
-
if (!fs.existsSync(events))
|
|
212
|
-
continue;
|
|
213
|
-
let workers;
|
|
214
|
-
try {
|
|
215
|
-
const all = readFileEventsSync(events);
|
|
216
|
-
workers = reduceWorkerRegistry(all).workers;
|
|
217
|
-
}
|
|
218
|
-
catch {
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
for (const state of workers) {
|
|
222
|
-
if (state.terminal || isTerminalLifecycle(state.lifecycle))
|
|
223
|
-
continue;
|
|
224
|
-
const supervisorPid = readPid(workerFile(entry, state.workerId, "pid", project));
|
|
225
|
-
if (supervisorPid === undefined || !pidAlive(supervisorPid)) {
|
|
226
|
-
// Supervisor pid file missing or dead → not a live OS process,
|
|
227
|
-
// even if durable state still shows running. Reconciler / future
|
|
228
|
-
// CLI cleanup will catch up; the guard ignores it.
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
const supervisorVerified = opts.isSupervisorProcess
|
|
232
|
-
? opts.isSupervisorProcess(supervisorPid, entry, state.workerId)
|
|
233
|
-
: isSupervisorProcess(supervisorPid, entry, state.workerId);
|
|
234
|
-
const workerPid = readPid(workerFile(entry, state.workerId, "worker-pid", project));
|
|
235
|
-
out.push({
|
|
236
|
-
channel: entry,
|
|
237
|
-
workerId: state.workerId,
|
|
238
|
-
state,
|
|
239
|
-
supervisorPid,
|
|
240
|
-
supervisorVerified,
|
|
241
|
-
...(workerPid !== undefined ? { workerPid } : {}),
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
for (const state of readReservationWorkers(entry, project)) {
|
|
245
|
-
if (out.some((w) => w.channel === entry && w.workerId === state.workerId)) {
|
|
246
|
-
continue;
|
|
247
|
-
}
|
|
248
|
-
const supervisorPid = readPid(workerFile(entry, state.workerId, "pid", project));
|
|
249
|
-
if (supervisorPid === undefined || !pidAlive(supervisorPid))
|
|
250
|
-
continue;
|
|
251
|
-
const supervisorVerified = opts.isSupervisorProcess
|
|
252
|
-
? opts.isSupervisorProcess(supervisorPid, entry, state.workerId)
|
|
253
|
-
: isSupervisorProcess(supervisorPid, entry, state.workerId);
|
|
254
|
-
out.push({
|
|
255
|
-
channel: entry,
|
|
256
|
-
workerId: state.workerId,
|
|
257
|
-
state,
|
|
258
|
-
supervisorPid,
|
|
259
|
-
supervisorVerified,
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return out;
|
|
264
|
-
}
|
|
265
|
-
function readReservationWorkers(channel, project) {
|
|
266
|
-
const dir = path.join(projectDir(project), channel);
|
|
267
|
-
let files;
|
|
268
|
-
try {
|
|
269
|
-
files = fs.readdirSync(dir);
|
|
270
|
-
}
|
|
271
|
-
catch {
|
|
272
|
-
return [];
|
|
273
|
-
}
|
|
274
|
-
const workers = [];
|
|
275
|
-
for (const file of files) {
|
|
276
|
-
if (!file.endsWith(".reservation"))
|
|
277
|
-
continue;
|
|
278
|
-
const worker = file.slice(0, -".reservation".length);
|
|
279
|
-
workers.push({
|
|
280
|
-
workerId: worker,
|
|
281
|
-
lifecycle: "starting",
|
|
282
|
-
terminal: false,
|
|
283
|
-
activity: "idle",
|
|
284
|
-
pendingMessageCount: 0,
|
|
285
|
-
inboxPolicy: "explicitOnly",
|
|
286
|
-
updatedAt: new Date(0).toISOString(),
|
|
287
|
-
lastSeq: 0,
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
return workers;
|
|
291
|
-
}
|
|
292
|
-
function readFileEventsSync(file) {
|
|
293
|
-
const text = fs.readFileSync(file, "utf-8");
|
|
294
|
-
const events = [];
|
|
295
|
-
for (const line of text.split("\n")) {
|
|
296
|
-
if (!line.trim())
|
|
297
|
-
continue;
|
|
298
|
-
try {
|
|
299
|
-
events.push(JSON.parse(line));
|
|
300
|
-
}
|
|
301
|
-
catch {
|
|
302
|
-
continue;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return events;
|
|
306
|
-
}
|
|
307
|
-
function readPid(p) {
|
|
308
|
-
try {
|
|
309
|
-
const n = Number(fs.readFileSync(p, "utf-8").trim());
|
|
310
|
-
return Number.isFinite(n) && n > 0 ? n : undefined;
|
|
311
|
-
}
|
|
312
|
-
catch {
|
|
313
|
-
return undefined;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
function pidAlive(pid) {
|
|
317
|
-
try {
|
|
318
|
-
process.kill(pid, 0);
|
|
319
|
-
return true;
|
|
320
|
-
}
|
|
321
|
-
catch {
|
|
322
|
-
return false;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
export function isSupervisorProcess(pid, channel, worker) {
|
|
326
|
-
if (process.platform === "win32")
|
|
327
|
-
return false;
|
|
328
|
-
try {
|
|
329
|
-
const command = execFileSync("ps", ["-p", String(pid), "-o", "command="], {
|
|
330
|
-
encoding: "utf-8",
|
|
331
|
-
timeout: 1000,
|
|
332
|
-
stdio: ["ignore", "pipe", "ignore"],
|
|
333
|
-
}).trim();
|
|
334
|
-
const pattern = new RegExp([
|
|
335
|
-
"(?:^|\\s)channel\\s+__supervisor\\s+",
|
|
336
|
-
escapeRegExp(channel),
|
|
337
|
-
"\\s+",
|
|
338
|
-
escapeRegExp(worker),
|
|
339
|
-
"(?:\\s|$)",
|
|
340
|
-
].join(""));
|
|
341
|
-
return pattern.test(command);
|
|
342
|
-
}
|
|
343
|
-
catch {
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function escapeRegExp(s) {
|
|
348
|
-
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Pure predicate: is this live worker eligible for idle-cleanup right
|
|
352
|
-
* now? Mid-turn workers and workers without `idleSince` (e.g. they
|
|
353
|
-
* never spawned cleanly) are never killed by the guard.
|
|
354
|
-
*/
|
|
355
|
-
export function isIdleCleanupEligible(live, idleTimeoutMs, now) {
|
|
356
|
-
if (idleTimeoutMs <= 0)
|
|
357
|
-
return false;
|
|
358
|
-
const { state } = live;
|
|
359
|
-
if (state.activity !== "idle")
|
|
360
|
-
return false;
|
|
361
|
-
if (!state.idleSince)
|
|
362
|
-
return false;
|
|
363
|
-
if (state.terminal)
|
|
364
|
-
return false;
|
|
365
|
-
const idleSinceMs = Date.parse(state.idleSince);
|
|
366
|
-
if (!Number.isFinite(idleSinceMs))
|
|
367
|
-
return false;
|
|
368
|
-
return now - idleSinceMs >= idleTimeoutMs;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Kill workers whose idle TTL has expired. Writes a one-shot shutdown
|
|
372
|
-
* reason sidecar before signalling the supervisor so the supervisor's
|
|
373
|
-
* existing shutdown funnel emits the single terminal `killed` event.
|
|
374
|
-
*
|
|
375
|
-
* Returns the workers that were signalled. Failures are collected — a
|
|
376
|
-
* dead pid or read race is not fatal; the next scan re-evaluates.
|
|
377
|
-
*/
|
|
378
|
-
export async function cleanupExpiredIdleWorkers(candidates, idleTimeoutMs, opts = {}) {
|
|
379
|
-
const result = { killed: [], failed: [] };
|
|
380
|
-
if (idleTimeoutMs <= 0)
|
|
381
|
-
return result;
|
|
382
|
-
const now = opts.now ?? Date.now();
|
|
383
|
-
for (const live of candidates) {
|
|
384
|
-
if (!isIdleCleanupEligible(live, idleTimeoutMs, now))
|
|
385
|
-
continue;
|
|
386
|
-
try {
|
|
387
|
-
const project = opts.project ?? currentProjectKey();
|
|
388
|
-
if (live.supervisorPid === undefined ||
|
|
389
|
-
live.supervisorVerified !== true ||
|
|
390
|
-
!pidAlive(live.supervisorPid)) {
|
|
391
|
-
continue;
|
|
392
|
-
}
|
|
393
|
-
const reasonFile = workerFile(live.channel, live.workerId, "shutdown-reason", project);
|
|
394
|
-
fs.writeFileSync(reasonFile, "idle-timeout\n", "utf-8");
|
|
395
|
-
try {
|
|
396
|
-
process.kill(live.supervisorPid, "SIGTERM");
|
|
397
|
-
}
|
|
398
|
-
catch (err) {
|
|
399
|
-
try {
|
|
400
|
-
fs.unlinkSync(reasonFile);
|
|
401
|
-
}
|
|
402
|
-
catch {
|
|
403
|
-
// already gone
|
|
404
|
-
}
|
|
405
|
-
throw err;
|
|
406
|
-
}
|
|
407
|
-
result.killed.push(live);
|
|
408
|
-
}
|
|
409
|
-
catch (err) {
|
|
410
|
-
result.failed.push({
|
|
411
|
-
worker: live,
|
|
412
|
-
error: err instanceof Error ? err.message : String(err),
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
return result;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Run the spawn-time guard for a project bucket. Cleans expired idle
|
|
420
|
-
* workers, re-scans, then decides whether the live worker budget has
|
|
421
|
-
* room for one more spawn.
|
|
422
|
-
*/
|
|
423
|
-
export async function enforceSpawnBudget(input) {
|
|
424
|
-
const project = input.projectKey ?? currentProjectKey();
|
|
425
|
-
const scanOpts = {
|
|
426
|
-
projectKey: project,
|
|
427
|
-
...(input.root !== undefined ? { root: input.root } : {}),
|
|
428
|
-
...(input.isSupervisorProcess !== undefined
|
|
429
|
-
? { isSupervisorProcess: input.isSupervisorProcess }
|
|
430
|
-
: {}),
|
|
431
|
-
};
|
|
432
|
-
const initial = scanLiveWorkers(scanOpts);
|
|
433
|
-
const cleanup = await cleanupExpiredIdleWorkers(initial, input.policy.idleTimeoutMs, { project, ...(input.now !== undefined ? { now: input.now } : {}) });
|
|
434
|
-
// Re-probe after cleanup so we don't double-count workers that have
|
|
435
|
-
// been signalled but haven't actually torn down their pid files yet.
|
|
436
|
-
// Wait briefly for the SIGTERM to translate into pid-file removal; if
|
|
437
|
-
// a worker is taking its grace period, just exclude killed workers
|
|
438
|
-
// from the count.
|
|
439
|
-
const killedIds = new Set(cleanup.killed.map((w) => `${w.channel}::${w.workerId}`));
|
|
440
|
-
const remaining = scanLiveWorkers(scanOpts).filter((w) => !killedIds.has(`${w.channel}::${w.workerId}`));
|
|
441
|
-
const allowed = input.policy.maxLiveWorkers <= 0 ||
|
|
442
|
-
remaining.length < input.policy.maxLiveWorkers;
|
|
443
|
-
return { cleaned: cleanup.killed, remaining, allowed };
|
|
444
|
-
}
|
|
445
|
-
/** Build a multi-line, actionable overflow error string. */
|
|
446
|
-
export function formatBudgetOverflowError(args) {
|
|
447
|
-
const { projectKey, live, limit } = args;
|
|
448
|
-
const header = `Live worker budget exhausted for project '${projectKey}': ${live.length}/${limit} live worker(s).`;
|
|
449
|
-
const rows = live
|
|
450
|
-
.map((w) => {
|
|
451
|
-
const provider = w.state.provider ?? "?";
|
|
452
|
-
const lifecycle = w.state.lifecycle;
|
|
453
|
-
const activity = w.state.activity;
|
|
454
|
-
const pid = w.supervisorPid ?? "?";
|
|
455
|
-
const verified = w.supervisorVerified === false ? " supervisor=unverified" : "";
|
|
456
|
-
return ` • channel='${w.channel}' worker='${w.workerId}' provider=${provider} lifecycle=${lifecycle} activity=${activity} pid=${pid}${verified}`;
|
|
457
|
-
})
|
|
458
|
-
.join("\n");
|
|
459
|
-
const hint = [
|
|
460
|
-
"Free a slot before spawning, e.g.:",
|
|
461
|
-
` pactile channel kill <channel> --as <worker>`,
|
|
462
|
-
"Or override per spawn:",
|
|
463
|
-
` pactile channel spawn ... --max-live-workers ${live.length + 1}`,
|
|
464
|
-
"Or raise the default in .pactile/config.yaml under channel.worker_guard.max_live_workers.",
|
|
465
|
-
].join("\n");
|
|
466
|
-
return [header, rows, hint].join("\n");
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* Convenience helper: ensure `channelRoot()` is initialised before scan
|
|
470
|
-
* (otherwise the project dir may not yet exist on first spawn).
|
|
471
|
-
*/
|
|
472
|
-
export function ensureRootExists() {
|
|
473
|
-
fs.mkdirSync(channelRoot(), { recursive: true });
|
|
474
|
-
}
|
|
475
|
-
//# sourceMappingURL=guard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../../../src/commands/channel/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,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