@methodts/runtime 0.1.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/dist/__fixtures__/executor-fixtures.d.ts +10 -0
- package/dist/__fixtures__/executor-fixtures.d.ts.map +1 -0
- package/dist/__fixtures__/executor-fixtures.js +36 -0
- package/dist/__fixtures__/executor-fixtures.js.map +1 -0
- package/dist/architecture.test.d.ts +2 -0
- package/dist/architecture.test.d.ts.map +1 -0
- package/dist/architecture.test.js +143 -0
- package/dist/architecture.test.js.map +1 -0
- package/dist/config/cost-governor-config.d.ts +40 -0
- package/dist/config/cost-governor-config.d.ts.map +1 -0
- package/dist/config/cost-governor-config.js +48 -0
- package/dist/config/cost-governor-config.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/sessions-config.d.ts +29 -0
- package/dist/config/sessions-config.d.ts.map +1 -0
- package/dist/config/sessions-config.js +37 -0
- package/dist/config/sessions-config.js.map +1 -0
- package/dist/config/strategies-config.d.ts +38 -0
- package/dist/config/strategies-config.d.ts.map +1 -0
- package/dist/config/strategies-config.js +41 -0
- package/dist/config/strategies-config.js.map +1 -0
- package/dist/cost-governor/backpressure-queue.d.ts +20 -0
- package/dist/cost-governor/backpressure-queue.d.ts.map +1 -0
- package/dist/cost-governor/backpressure-queue.js +78 -0
- package/dist/cost-governor/backpressure-queue.js.map +1 -0
- package/dist/cost-governor/backpressure-queue.test.d.ts +2 -0
- package/dist/cost-governor/backpressure-queue.test.d.ts.map +1 -0
- package/dist/cost-governor/backpressure-queue.test.js +48 -0
- package/dist/cost-governor/backpressure-queue.test.js.map +1 -0
- package/dist/cost-governor/cost-events.d.ts +65 -0
- package/dist/cost-governor/cost-events.d.ts.map +1 -0
- package/dist/cost-governor/cost-events.js +48 -0
- package/dist/cost-governor/cost-events.js.map +1 -0
- package/dist/cost-governor/cost-governor-app-id.test.d.ts +19 -0
- package/dist/cost-governor/cost-governor-app-id.test.d.ts.map +1 -0
- package/dist/cost-governor/cost-governor-app-id.test.js +201 -0
- package/dist/cost-governor/cost-governor-app-id.test.js.map +1 -0
- package/dist/cost-governor/cost-oracle-impl.d.ts +19 -0
- package/dist/cost-governor/cost-oracle-impl.d.ts.map +1 -0
- package/dist/cost-governor/cost-oracle-impl.js +52 -0
- package/dist/cost-governor/cost-oracle-impl.js.map +1 -0
- package/dist/cost-governor/estimator.d.ts +22 -0
- package/dist/cost-governor/estimator.d.ts.map +1 -0
- package/dist/cost-governor/estimator.js +119 -0
- package/dist/cost-governor/estimator.js.map +1 -0
- package/dist/cost-governor/estimator.test.d.ts +2 -0
- package/dist/cost-governor/estimator.test.d.ts.map +1 -0
- package/dist/cost-governor/estimator.test.js +141 -0
- package/dist/cost-governor/estimator.test.js.map +1 -0
- package/dist/cost-governor/index.d.ts +75 -0
- package/dist/cost-governor/index.d.ts.map +1 -0
- package/dist/cost-governor/index.js +120 -0
- package/dist/cost-governor/index.js.map +1 -0
- package/dist/cost-governor/observations-store.d.ts +49 -0
- package/dist/cost-governor/observations-store.d.ts.map +1 -0
- package/dist/cost-governor/observations-store.js +179 -0
- package/dist/cost-governor/observations-store.js.map +1 -0
- package/dist/cost-governor/observations-store.test.d.ts +2 -0
- package/dist/cost-governor/observations-store.test.d.ts.map +1 -0
- package/dist/cost-governor/observations-store.test.js +191 -0
- package/dist/cost-governor/observations-store.test.js.map +1 -0
- package/dist/cost-governor/percentile.d.ts +17 -0
- package/dist/cost-governor/percentile.d.ts.map +1 -0
- package/dist/cost-governor/percentile.js +33 -0
- package/dist/cost-governor/percentile.js.map +1 -0
- package/dist/cost-governor/percentile.test.d.ts +2 -0
- package/dist/cost-governor/percentile.test.d.ts.map +1 -0
- package/dist/cost-governor/percentile.test.js +46 -0
- package/dist/cost-governor/percentile.test.js.map +1 -0
- package/dist/cost-governor/rate-governor-impl.d.ts +73 -0
- package/dist/cost-governor/rate-governor-impl.d.ts.map +1 -0
- package/dist/cost-governor/rate-governor-impl.js +148 -0
- package/dist/cost-governor/rate-governor-impl.js.map +1 -0
- package/dist/cost-governor/signature-builder.d.ts +22 -0
- package/dist/cost-governor/signature-builder.d.ts.map +1 -0
- package/dist/cost-governor/signature-builder.js +43 -0
- package/dist/cost-governor/signature-builder.js.map +1 -0
- package/dist/cost-governor/signature-builder.test.d.ts +2 -0
- package/dist/cost-governor/signature-builder.test.d.ts.map +1 -0
- package/dist/cost-governor/signature-builder.test.js +58 -0
- package/dist/cost-governor/signature-builder.test.js.map +1 -0
- package/dist/cost-governor/token-bucket.d.ts +57 -0
- package/dist/cost-governor/token-bucket.d.ts.map +1 -0
- package/dist/cost-governor/token-bucket.js +109 -0
- package/dist/cost-governor/token-bucket.js.map +1 -0
- package/dist/cost-governor/token-bucket.test.d.ts +2 -0
- package/dist/cost-governor/token-bucket.test.d.ts.map +1 -0
- package/dist/cost-governor/token-bucket.test.js +67 -0
- package/dist/cost-governor/token-bucket.test.js.map +1 -0
- package/dist/dlq/cortex-dlq-observer.d.ts +22 -0
- package/dist/dlq/cortex-dlq-observer.d.ts.map +1 -0
- package/dist/dlq/cortex-dlq-observer.js +29 -0
- package/dist/dlq/cortex-dlq-observer.js.map +1 -0
- package/dist/dlq/dlq-observer.test.d.ts +8 -0
- package/dist/dlq/dlq-observer.test.d.ts.map +1 -0
- package/dist/dlq/dlq-observer.test.js +103 -0
- package/dist/dlq/dlq-observer.test.js.map +1 -0
- package/dist/dlq/index.d.ts +6 -0
- package/dist/dlq/index.d.ts.map +1 -0
- package/dist/dlq/index.js +6 -0
- package/dist/dlq/index.js.map +1 -0
- package/dist/event-bus/adapters.d.ts +50 -0
- package/dist/event-bus/adapters.d.ts.map +1 -0
- package/dist/event-bus/adapters.js +51 -0
- package/dist/event-bus/adapters.js.map +1 -0
- package/dist/event-bus/adapters.test.d.ts +5 -0
- package/dist/event-bus/adapters.test.d.ts.map +1 -0
- package/dist/event-bus/adapters.test.js +73 -0
- package/dist/event-bus/adapters.test.js.map +1 -0
- package/dist/event-bus/agent-event-adapter.d.ts +22 -0
- package/dist/event-bus/agent-event-adapter.d.ts.map +1 -0
- package/dist/event-bus/agent-event-adapter.js +49 -0
- package/dist/event-bus/agent-event-adapter.js.map +1 -0
- package/dist/event-bus/agent-event-adapter.test.d.ts +5 -0
- package/dist/event-bus/agent-event-adapter.test.d.ts.map +1 -0
- package/dist/event-bus/agent-event-adapter.test.js +170 -0
- package/dist/event-bus/agent-event-adapter.test.js.map +1 -0
- package/dist/event-bus/channel-sink.d.ts +71 -0
- package/dist/event-bus/channel-sink.d.ts.map +1 -0
- package/dist/event-bus/channel-sink.js +159 -0
- package/dist/event-bus/channel-sink.js.map +1 -0
- package/dist/event-bus/channel-sink.test.d.ts +5 -0
- package/dist/event-bus/channel-sink.test.d.ts.map +1 -0
- package/dist/event-bus/channel-sink.test.js +234 -0
- package/dist/event-bus/channel-sink.test.js.map +1 -0
- package/dist/event-bus/event-types.snapshot.test.d.ts +27 -0
- package/dist/event-bus/event-types.snapshot.test.d.ts.map +1 -0
- package/dist/event-bus/event-types.snapshot.test.js +165 -0
- package/dist/event-bus/event-types.snapshot.test.js.map +1 -0
- package/dist/event-bus/genesis-sink.d.ts +55 -0
- package/dist/event-bus/genesis-sink.d.ts.map +1 -0
- package/dist/event-bus/genesis-sink.js +141 -0
- package/dist/event-bus/genesis-sink.js.map +1 -0
- package/dist/event-bus/genesis-sink.test.d.ts +5 -0
- package/dist/event-bus/genesis-sink.test.d.ts.map +1 -0
- package/dist/event-bus/genesis-sink.test.js +160 -0
- package/dist/event-bus/genesis-sink.test.js.map +1 -0
- package/dist/event-bus/in-memory-event-bus.d.ts +60 -0
- package/dist/event-bus/in-memory-event-bus.d.ts.map +1 -0
- package/dist/event-bus/in-memory-event-bus.js +274 -0
- package/dist/event-bus/in-memory-event-bus.js.map +1 -0
- package/dist/event-bus/in-memory-event-bus.test.d.ts +5 -0
- package/dist/event-bus/in-memory-event-bus.test.d.ts.map +1 -0
- package/dist/event-bus/in-memory-event-bus.test.js +457 -0
- package/dist/event-bus/in-memory-event-bus.test.js.map +1 -0
- package/dist/event-bus/index.d.ts +22 -0
- package/dist/event-bus/index.d.ts.map +1 -0
- package/dist/event-bus/index.js +17 -0
- package/dist/event-bus/index.js.map +1 -0
- package/dist/event-bus/persistence-sink.d.ts +74 -0
- package/dist/event-bus/persistence-sink.d.ts.map +1 -0
- package/dist/event-bus/persistence-sink.js +193 -0
- package/dist/event-bus/persistence-sink.js.map +1 -0
- package/dist/event-bus/persistence-sink.test.d.ts +6 -0
- package/dist/event-bus/persistence-sink.test.d.ts.map +1 -0
- package/dist/event-bus/persistence-sink.test.js +319 -0
- package/dist/event-bus/persistence-sink.test.js.map +1 -0
- package/dist/event-bus/session-checkpoint-sink.d.ts +91 -0
- package/dist/event-bus/session-checkpoint-sink.d.ts.map +1 -0
- package/dist/event-bus/session-checkpoint-sink.js +107 -0
- package/dist/event-bus/session-checkpoint-sink.js.map +1 -0
- package/dist/event-bus/session-checkpoint-sink.test.d.ts +5 -0
- package/dist/event-bus/session-checkpoint-sink.test.d.ts.map +1 -0
- package/dist/event-bus/session-checkpoint-sink.test.js +215 -0
- package/dist/event-bus/session-checkpoint-sink.test.js.map +1 -0
- package/dist/event-bus/webhook-connector.d.ts +59 -0
- package/dist/event-bus/webhook-connector.d.ts.map +1 -0
- package/dist/event-bus/webhook-connector.js +191 -0
- package/dist/event-bus/webhook-connector.js.map +1 -0
- package/dist/event-bus/webhook-connector.test.d.ts +5 -0
- package/dist/event-bus/webhook-connector.test.d.ts.map +1 -0
- package/dist/event-bus/webhook-connector.test.js +214 -0
- package/dist/event-bus/webhook-connector.test.js.map +1 -0
- package/dist/executors/cortex-job-backed-executor.d.ts +137 -0
- package/dist/executors/cortex-job-backed-executor.d.ts.map +1 -0
- package/dist/executors/cortex-job-backed-executor.js +441 -0
- package/dist/executors/cortex-job-backed-executor.js.map +1 -0
- package/dist/executors/cortex-job-backed-executor.test.d.ts +13 -0
- package/dist/executors/cortex-job-backed-executor.test.d.ts.map +1 -0
- package/dist/executors/cortex-job-backed-executor.test.js +303 -0
- package/dist/executors/cortex-job-backed-executor.test.js.map +1 -0
- package/dist/executors/index.d.ts +9 -0
- package/dist/executors/index.d.ts.map +1 -0
- package/dist/executors/index.js +9 -0
- package/dist/executors/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/ports/checkpoint-sink.d.ts +69 -0
- package/dist/ports/checkpoint-sink.d.ts.map +1 -0
- package/dist/ports/checkpoint-sink.js +16 -0
- package/dist/ports/checkpoint-sink.js.map +1 -0
- package/dist/ports/checkpoint.d.ts +68 -0
- package/dist/ports/checkpoint.d.ts.map +1 -0
- package/dist/ports/checkpoint.js +14 -0
- package/dist/ports/checkpoint.js.map +1 -0
- package/dist/ports/continuation-envelope-cross-app.test.d.ts +10 -0
- package/dist/ports/continuation-envelope-cross-app.test.d.ts.map +1 -0
- package/dist/ports/continuation-envelope-cross-app.test.js +95 -0
- package/dist/ports/continuation-envelope-cross-app.test.js.map +1 -0
- package/dist/ports/continuation-envelope.d.ts +199 -0
- package/dist/ports/continuation-envelope.d.ts.map +1 -0
- package/dist/ports/continuation-envelope.js +69 -0
- package/dist/ports/continuation-envelope.js.map +1 -0
- package/dist/ports/conversation.d.ts +64 -0
- package/dist/ports/conversation.d.ts.map +1 -0
- package/dist/ports/conversation.js +19 -0
- package/dist/ports/conversation.js.map +1 -0
- package/dist/ports/cost-oracle.d.ts +26 -0
- package/dist/ports/cost-oracle.d.ts.map +1 -0
- package/dist/ports/cost-oracle.js +9 -0
- package/dist/ports/cost-oracle.js.map +1 -0
- package/dist/ports/cross-app-invoker.d.ts +198 -0
- package/dist/ports/cross-app-invoker.d.ts.map +1 -0
- package/dist/ports/cross-app-invoker.js +157 -0
- package/dist/ports/cross-app-invoker.js.map +1 -0
- package/dist/ports/dlq-observer.d.ts +40 -0
- package/dist/ports/dlq-observer.d.ts.map +1 -0
- package/dist/ports/dlq-observer.js +20 -0
- package/dist/ports/dlq-observer.js.map +1 -0
- package/dist/ports/event-bus.d.ts +169 -0
- package/dist/ports/event-bus.d.ts.map +1 -0
- package/dist/ports/event-bus.js +20 -0
- package/dist/ports/event-bus.js.map +1 -0
- package/dist/ports/event-reader.d.ts +21 -0
- package/dist/ports/event-reader.d.ts.map +1 -0
- package/dist/ports/event-reader.js +12 -0
- package/dist/ports/event-reader.js.map +1 -0
- package/dist/ports/event-rotator.d.ts +39 -0
- package/dist/ports/event-rotator.d.ts.map +1 -0
- package/dist/ports/event-rotator.js +15 -0
- package/dist/ports/event-rotator.js.map +1 -0
- package/dist/ports/file-system.d.ts +48 -0
- package/dist/ports/file-system.d.ts.map +1 -0
- package/dist/ports/file-system.js +10 -0
- package/dist/ports/file-system.js.map +1 -0
- package/dist/ports/historical-observations.d.ts +39 -0
- package/dist/ports/historical-observations.d.ts.map +1 -0
- package/dist/ports/historical-observations.js +12 -0
- package/dist/ports/historical-observations.js.map +1 -0
- package/dist/ports/in-memory-source.d.ts +46 -0
- package/dist/ports/in-memory-source.d.ts.map +1 -0
- package/dist/ports/in-memory-source.js +69 -0
- package/dist/ports/in-memory-source.js.map +1 -0
- package/dist/ports/index.d.ts +32 -0
- package/dist/ports/index.d.ts.map +1 -0
- package/dist/ports/index.js +10 -0
- package/dist/ports/index.js.map +1 -0
- package/dist/ports/job-backed-executor.d.ts +139 -0
- package/dist/ports/job-backed-executor.d.ts.map +1 -0
- package/dist/ports/job-backed-executor.js +56 -0
- package/dist/ports/job-backed-executor.js.map +1 -0
- package/dist/ports/methodology-source.d.ts +95 -0
- package/dist/ports/methodology-source.d.ts.map +1 -0
- package/dist/ports/methodology-source.js +26 -0
- package/dist/ports/methodology-source.js.map +1 -0
- package/dist/ports/native-session-discovery.d.ts +20 -0
- package/dist/ports/native-session-discovery.d.ts.map +1 -0
- package/dist/ports/native-session-discovery.js +13 -0
- package/dist/ports/native-session-discovery.js.map +1 -0
- package/dist/ports/projection-store.d.ts +48 -0
- package/dist/ports/projection-store.d.ts.map +1 -0
- package/dist/ports/projection-store.js +17 -0
- package/dist/ports/projection-store.js.map +1 -0
- package/dist/ports/projection.d.ts +29 -0
- package/dist/ports/projection.d.ts.map +1 -0
- package/dist/ports/projection.js +13 -0
- package/dist/ports/projection.js.map +1 -0
- package/dist/ports/rate-governor.d.ts +17 -0
- package/dist/ports/rate-governor.d.ts.map +1 -0
- package/dist/ports/rate-governor.js +11 -0
- package/dist/ports/rate-governor.js.map +1 -0
- package/dist/ports/schedule-client.d.ts +29 -0
- package/dist/ports/schedule-client.d.ts.map +1 -0
- package/dist/ports/schedule-client.js +2 -0
- package/dist/ports/schedule-client.js.map +1 -0
- package/dist/ports/session-pool.d.ts +162 -0
- package/dist/ports/session-pool.d.ts.map +1 -0
- package/dist/ports/session-pool.js +21 -0
- package/dist/ports/session-pool.js.map +1 -0
- package/dist/ports/session-store-errors.d.ts +22 -0
- package/dist/ports/session-store-errors.d.ts.map +1 -0
- package/dist/ports/session-store-errors.js +29 -0
- package/dist/ports/session-store-errors.js.map +1 -0
- package/dist/ports/session-store-types.d.ts +132 -0
- package/dist/ports/session-store-types.d.ts.map +1 -0
- package/dist/ports/session-store-types.js +14 -0
- package/dist/ports/session-store-types.js.map +1 -0
- package/dist/ports/session-store.d.ts +69 -0
- package/dist/ports/session-store.d.ts.map +1 -0
- package/dist/ports/session-store.js +23 -0
- package/dist/ports/session-store.js.map +1 -0
- package/dist/ports/yaml-loader.d.ts +15 -0
- package/dist/ports/yaml-loader.d.ts.map +1 -0
- package/dist/ports/yaml-loader.js +13 -0
- package/dist/ports/yaml-loader.js.map +1 -0
- package/dist/scheduling/index.d.ts +6 -0
- package/dist/scheduling/index.d.ts.map +1 -0
- package/dist/scheduling/index.js +6 -0
- package/dist/scheduling/index.js.map +1 -0
- package/dist/scheduling/scheduled-pact.d.ts +97 -0
- package/dist/scheduling/scheduled-pact.d.ts.map +1 -0
- package/dist/scheduling/scheduled-pact.js +89 -0
- package/dist/scheduling/scheduled-pact.js.map +1 -0
- package/dist/sessions/__tests__/cognitive-modules.test.d.ts +10 -0
- package/dist/sessions/__tests__/cognitive-modules.test.d.ts.map +1 -0
- package/dist/sessions/__tests__/cognitive-modules.test.js +535 -0
- package/dist/sessions/__tests__/cognitive-modules.test.js.map +1 -0
- package/dist/sessions/__tests__/cognitive-provider.test.d.ts +13 -0
- package/dist/sessions/__tests__/cognitive-provider.test.d.ts.map +1 -0
- package/dist/sessions/__tests__/cognitive-provider.test.js +331 -0
- package/dist/sessions/__tests__/cognitive-provider.test.js.map +1 -0
- package/dist/sessions/__tests__/cognitive-sink.test.d.ts +19 -0
- package/dist/sessions/__tests__/cognitive-sink.test.d.ts.map +1 -0
- package/dist/sessions/__tests__/cognitive-sink.test.js +334 -0
- package/dist/sessions/__tests__/cognitive-sink.test.js.map +1 -0
- package/dist/sessions/__tests__/runtime-tools.test.d.ts +2 -0
- package/dist/sessions/__tests__/runtime-tools.test.d.ts.map +1 -0
- package/dist/sessions/__tests__/runtime-tools.test.js +83 -0
- package/dist/sessions/__tests__/runtime-tools.test.js.map +1 -0
- package/dist/sessions/auto-retro.d.ts +29 -0
- package/dist/sessions/auto-retro.d.ts.map +1 -0
- package/dist/sessions/auto-retro.js +181 -0
- package/dist/sessions/auto-retro.js.map +1 -0
- package/dist/sessions/auto-retro.test.d.ts +2 -0
- package/dist/sessions/auto-retro.test.d.ts.map +1 -0
- package/dist/sessions/auto-retro.test.js +361 -0
- package/dist/sessions/auto-retro.test.js.map +1 -0
- package/dist/sessions/channels.d.ts +55 -0
- package/dist/sessions/channels.d.ts.map +1 -0
- package/dist/sessions/channels.js +118 -0
- package/dist/sessions/channels.js.map +1 -0
- package/dist/sessions/channels.test.d.ts +2 -0
- package/dist/sessions/channels.test.d.ts.map +1 -0
- package/dist/sessions/channels.test.js +285 -0
- package/dist/sessions/channels.test.js.map +1 -0
- package/dist/sessions/cognitive-modules.d.ts +100 -0
- package/dist/sessions/cognitive-modules.d.ts.map +1 -0
- package/dist/sessions/cognitive-modules.js +458 -0
- package/dist/sessions/cognitive-modules.js.map +1 -0
- package/dist/sessions/cognitive-provider.d.ts +42 -0
- package/dist/sessions/cognitive-provider.d.ts.map +1 -0
- package/dist/sessions/cognitive-provider.js +208 -0
- package/dist/sessions/cognitive-provider.js.map +1 -0
- package/dist/sessions/cognitive-sink.d.ts +73 -0
- package/dist/sessions/cognitive-sink.d.ts.map +1 -0
- package/dist/sessions/cognitive-sink.js +154 -0
- package/dist/sessions/cognitive-sink.js.map +1 -0
- package/dist/sessions/diagnostics.d.ts +70 -0
- package/dist/sessions/diagnostics.d.ts.map +1 -0
- package/dist/sessions/diagnostics.js +129 -0
- package/dist/sessions/diagnostics.js.map +1 -0
- package/dist/sessions/diagnostics.test.d.ts +2 -0
- package/dist/sessions/diagnostics.test.d.ts.map +1 -0
- package/dist/sessions/diagnostics.test.js +135 -0
- package/dist/sessions/diagnostics.test.js.map +1 -0
- package/dist/sessions/index.d.ts +32 -0
- package/dist/sessions/index.d.ts.map +1 -0
- package/dist/sessions/index.js +33 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/sessions/pool.d.ts +218 -0
- package/dist/sessions/pool.d.ts.map +1 -0
- package/dist/sessions/pool.js +991 -0
- package/dist/sessions/pool.js.map +1 -0
- package/dist/sessions/pool.test.d.ts +2 -0
- package/dist/sessions/pool.test.d.ts.map +1 -0
- package/dist/sessions/pool.test.js +633 -0
- package/dist/sessions/pool.test.js.map +1 -0
- package/dist/sessions/print-session.d.ts +142 -0
- package/dist/sessions/print-session.d.ts.map +1 -0
- package/dist/sessions/print-session.js +325 -0
- package/dist/sessions/print-session.js.map +1 -0
- package/dist/sessions/print-session.test.d.ts +2 -0
- package/dist/sessions/print-session.test.d.ts.map +1 -0
- package/dist/sessions/print-session.test.js +418 -0
- package/dist/sessions/print-session.test.js.map +1 -0
- package/dist/sessions/runtime-tools.d.ts +22 -0
- package/dist/sessions/runtime-tools.d.ts.map +1 -0
- package/dist/sessions/runtime-tools.js +162 -0
- package/dist/sessions/runtime-tools.js.map +1 -0
- package/dist/sessions/scope-hook.d.ts +77 -0
- package/dist/sessions/scope-hook.d.ts.map +1 -0
- package/dist/sessions/scope-hook.js +323 -0
- package/dist/sessions/scope-hook.js.map +1 -0
- package/dist/sessions/scope-hook.test.d.ts +2 -0
- package/dist/sessions/scope-hook.test.d.ts.map +1 -0
- package/dist/sessions/scope-hook.test.js +249 -0
- package/dist/sessions/scope-hook.test.js.map +1 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.d.ts +16 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.d.ts.map +1 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.js +191 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.js.map +1 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.test.d.ts +5 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.test.d.ts.map +1 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.test.js +137 -0
- package/dist/sessions/session-store/checkpoint-sink-impl.test.js.map +1 -0
- package/dist/sessions/session-store/conformance.d.ts +59 -0
- package/dist/sessions/session-store/conformance.d.ts.map +1 -0
- package/dist/sessions/session-store/conformance.js +172 -0
- package/dist/sessions/session-store/conformance.js.map +1 -0
- package/dist/sessions/session-store/conformance.test.d.ts +7 -0
- package/dist/sessions/session-store/conformance.test.d.ts.map +1 -0
- package/dist/sessions/session-store/conformance.test.js +22 -0
- package/dist/sessions/session-store/conformance.test.js.map +1 -0
- package/dist/sessions/session-store/in-memory-session-store.d.ts +23 -0
- package/dist/sessions/session-store/in-memory-session-store.d.ts.map +1 -0
- package/dist/sessions/session-store/in-memory-session-store.js +197 -0
- package/dist/sessions/session-store/in-memory-session-store.js.map +1 -0
- package/dist/sessions/session-store/in-memory-session-store.test.d.ts +6 -0
- package/dist/sessions/session-store/in-memory-session-store.test.d.ts.map +1 -0
- package/dist/sessions/session-store/in-memory-session-store.test.js +183 -0
- package/dist/sessions/session-store/in-memory-session-store.test.js.map +1 -0
- package/dist/sessions/session-store/index.d.ts +20 -0
- package/dist/sessions/session-store/index.d.ts.map +1 -0
- package/dist/sessions/session-store/index.js +15 -0
- package/dist/sessions/session-store/index.js.map +1 -0
- package/dist/sessions/session-store/resume.d.ts +88 -0
- package/dist/sessions/session-store/resume.d.ts.map +1 -0
- package/dist/sessions/session-store/resume.js +96 -0
- package/dist/sessions/session-store/resume.js.map +1 -0
- package/dist/sessions/session-store/resume.test.d.ts +5 -0
- package/dist/sessions/session-store/resume.test.d.ts.map +1 -0
- package/dist/sessions/session-store/resume.test.js +119 -0
- package/dist/sessions/session-store/resume.test.js.map +1 -0
- package/dist/sessions/spawn-queue.d.ts +28 -0
- package/dist/sessions/spawn-queue.d.ts.map +1 -0
- package/dist/sessions/spawn-queue.js +63 -0
- package/dist/sessions/spawn-queue.js.map +1 -0
- package/dist/sessions/spawn-queue.test.d.ts +2 -0
- package/dist/sessions/spawn-queue.test.d.ts.map +1 -0
- package/dist/sessions/spawn-queue.test.js +65 -0
- package/dist/sessions/spawn-queue.test.js.map +1 -0
- package/dist/sessions/types.d.ts +16 -0
- package/dist/sessions/types.d.ts.map +1 -0
- package/dist/sessions/types.js +11 -0
- package/dist/sessions/types.js.map +1 -0
- package/dist/sessions/worktree-stale.test.d.ts +2 -0
- package/dist/sessions/worktree-stale.test.d.ts.map +1 -0
- package/dist/sessions/worktree-stale.test.js +468 -0
- package/dist/sessions/worktree-stale.test.js.map +1 -0
- package/dist/strategy/artifact-store.d.ts +12 -0
- package/dist/strategy/artifact-store.d.ts.map +1 -0
- package/dist/strategy/artifact-store.js +12 -0
- package/dist/strategy/artifact-store.js.map +1 -0
- package/dist/strategy/artifact-store.test.d.ts +2 -0
- package/dist/strategy/artifact-store.test.d.ts.map +1 -0
- package/dist/strategy/artifact-store.test.js +170 -0
- package/dist/strategy/artifact-store.test.js.map +1 -0
- package/dist/strategy/context-load-executor.d.ts +23 -0
- package/dist/strategy/context-load-executor.d.ts.map +1 -0
- package/dist/strategy/context-load-executor.js +87 -0
- package/dist/strategy/context-load-executor.js.map +1 -0
- package/dist/strategy/context-load-executor.test.d.ts +16 -0
- package/dist/strategy/context-load-executor.test.d.ts.map +1 -0
- package/dist/strategy/context-load-executor.test.js +158 -0
- package/dist/strategy/context-load-executor.test.js.map +1 -0
- package/dist/strategy/cortex-cross-app-invoker.stub.d.ts +65 -0
- package/dist/strategy/cortex-cross-app-invoker.stub.d.ts.map +1 -0
- package/dist/strategy/cortex-cross-app-invoker.stub.js +68 -0
- package/dist/strategy/cortex-cross-app-invoker.stub.js.map +1 -0
- package/dist/strategy/cross-app-node-executor.d.ts +54 -0
- package/dist/strategy/cross-app-node-executor.d.ts.map +1 -0
- package/dist/strategy/cross-app-node-executor.js +98 -0
- package/dist/strategy/cross-app-node-executor.js.map +1 -0
- package/dist/strategy/cross-app-node-executor.test.d.ts +13 -0
- package/dist/strategy/cross-app-node-executor.test.d.ts.map +1 -0
- package/dist/strategy/cross-app-node-executor.test.js +160 -0
- package/dist/strategy/cross-app-node-executor.test.js.map +1 -0
- package/dist/strategy/gates.d.ts +13 -0
- package/dist/strategy/gates.d.ts.map +1 -0
- package/dist/strategy/gates.js +13 -0
- package/dist/strategy/gates.js.map +1 -0
- package/dist/strategy/gates.test.d.ts +2 -0
- package/dist/strategy/gates.test.d.ts.map +1 -0
- package/dist/strategy/gates.test.js +299 -0
- package/dist/strategy/gates.test.js.map +1 -0
- package/dist/strategy/human-approval-resolver.d.ts +23 -0
- package/dist/strategy/human-approval-resolver.d.ts.map +1 -0
- package/dist/strategy/human-approval-resolver.js +94 -0
- package/dist/strategy/human-approval-resolver.js.map +1 -0
- package/dist/strategy/human-approval-resolver.test.d.ts +16 -0
- package/dist/strategy/human-approval-resolver.test.d.ts.map +1 -0
- package/dist/strategy/human-approval-resolver.test.js +200 -0
- package/dist/strategy/human-approval-resolver.test.js.map +1 -0
- package/dist/strategy/in-process-cross-app-invoker.d.ts +105 -0
- package/dist/strategy/in-process-cross-app-invoker.d.ts.map +1 -0
- package/dist/strategy/in-process-cross-app-invoker.js +206 -0
- package/dist/strategy/in-process-cross-app-invoker.js.map +1 -0
- package/dist/strategy/in-process-cross-app-invoker.test.d.ts +15 -0
- package/dist/strategy/in-process-cross-app-invoker.test.d.ts.map +1 -0
- package/dist/strategy/in-process-cross-app-invoker.test.js +190 -0
- package/dist/strategy/in-process-cross-app-invoker.test.js.map +1 -0
- package/dist/strategy/index.d.ts +29 -0
- package/dist/strategy/index.d.ts.map +1 -0
- package/dist/strategy/index.js +29 -0
- package/dist/strategy/index.js.map +1 -0
- package/dist/strategy/pacta-strategy.d.ts +97 -0
- package/dist/strategy/pacta-strategy.d.ts.map +1 -0
- package/dist/strategy/pacta-strategy.js +117 -0
- package/dist/strategy/pacta-strategy.js.map +1 -0
- package/dist/strategy/pacta-strategy.test.d.ts +2 -0
- package/dist/strategy/pacta-strategy.test.d.ts.map +1 -0
- package/dist/strategy/pacta-strategy.test.js +234 -0
- package/dist/strategy/pacta-strategy.test.js.map +1 -0
- package/dist/strategy/retro-generator.d.ts +18 -0
- package/dist/strategy/retro-generator.d.ts.map +1 -0
- package/dist/strategy/retro-generator.js +22 -0
- package/dist/strategy/retro-generator.js.map +1 -0
- package/dist/strategy/retro-writer.d.ts +25 -0
- package/dist/strategy/retro-writer.d.ts.map +1 -0
- package/dist/strategy/retro-writer.js +65 -0
- package/dist/strategy/retro-writer.js.map +1 -0
- package/dist/strategy/strategy-executor.d.ts +39 -0
- package/dist/strategy/strategy-executor.d.ts.map +1 -0
- package/dist/strategy/strategy-executor.js +253 -0
- package/dist/strategy/strategy-executor.js.map +1 -0
- package/dist/strategy/strategy-executor.test.d.ts +8 -0
- package/dist/strategy/strategy-executor.test.d.ts.map +1 -0
- package/dist/strategy/strategy-executor.test.js +1301 -0
- package/dist/strategy/strategy-executor.test.js.map +1 -0
- package/dist/strategy/strategy-parser.d.ts +30 -0
- package/dist/strategy/strategy-parser.d.ts.map +1 -0
- package/dist/strategy/strategy-parser.js +30 -0
- package/dist/strategy/strategy-parser.js.map +1 -0
- package/dist/strategy/sub-strategy-source.d.ts +27 -0
- package/dist/strategy/sub-strategy-source.d.ts.map +1 -0
- package/dist/strategy/sub-strategy-source.js +77 -0
- package/dist/strategy/sub-strategy-source.js.map +1 -0
- package/dist/strategy/types.d.ts +12 -0
- package/dist/strategy/types.d.ts.map +1 -0
- package/dist/strategy/types.js +9 -0
- package/dist/strategy/types.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-tools.js","sourceRoot":"","sources":["../../src/sessions/runtime-tools.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGnE,MAAM,SAAS,GAAqB;IAClC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kNAAkN,EAAE;IACjP,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mEAAmE,EAAE;IACnG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sGAAsG,EAAE;IACrI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,gEAAgE,EAAE;IAC/F,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8EAA8E,EAAE;IAC7G,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,qDAAqD,EAAE;CACrF,CAAC;AAEF,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,gBAAgB,GAAG,IAA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CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wBACxH,CAAC;wBACD,qEAAqE;wBACrE,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;4BACzB,OAAO,EAAE,MAAM,EAAE,wEAAwE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wBAC7G,CAAC;wBACD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE;4BAC3B,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;yBACjD,CAAC,CAAC;wBACH,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBACtC,CAAC;oBACD;wBACE,OAAO,EAAE,MAAM,EAAE,iBAAiB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gBAC9D,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7D,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YACvD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scope enforcement configuration for a session.
|
|
3
|
+
*/
|
|
4
|
+
export interface ScopeConstraint {
|
|
5
|
+
/** Glob patterns of files the agent is allowed to modify. */
|
|
6
|
+
allowed_paths: string[];
|
|
7
|
+
/**
|
|
8
|
+
* Enforcement mode:
|
|
9
|
+
* - 'enforce': pre-commit hook rejects out-of-scope commits (default)
|
|
10
|
+
* - 'warn': PTY watcher emits events but commits are not blocked
|
|
11
|
+
*/
|
|
12
|
+
mode: 'enforce' | 'warn';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generate the bash pre-commit hook script content.
|
|
16
|
+
*
|
|
17
|
+
* Uses bash pattern matching to check staged files against allowed patterns.
|
|
18
|
+
* The hook is designed to work with Git for Windows bash and standard Unix bash.
|
|
19
|
+
*
|
|
20
|
+
* @param sessionId - Session identifier for traceability in hook comments
|
|
21
|
+
* @param allowedPaths - Array of glob patterns the agent may modify
|
|
22
|
+
* @returns The complete bash hook script as a string
|
|
23
|
+
*/
|
|
24
|
+
export declare function generateHookScript(sessionId: string, allowedPaths: string[]): string;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the correct hooks directory for a git worktree.
|
|
27
|
+
*
|
|
28
|
+
* For linked worktrees, the hooks path may differ from the main repository.
|
|
29
|
+
* Uses `git rev-parse --git-path hooks` to resolve correctly across git versions.
|
|
30
|
+
*
|
|
31
|
+
* @param worktreePath - The root path of the worktree
|
|
32
|
+
* @returns Absolute path to the hooks directory
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveHooksDir(worktreePath: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Install a scope-enforcing pre-commit hook in a worktree.
|
|
37
|
+
*
|
|
38
|
+
* Creates the hooks directory if it doesn't exist, writes the hook script,
|
|
39
|
+
* and sets executable permissions. Only operates on worktree-isolated sessions.
|
|
40
|
+
*
|
|
41
|
+
* @param worktreePath - Path to the worktree root
|
|
42
|
+
* @param sessionId - Session identifier for hook traceability
|
|
43
|
+
* @param allowedPaths - Glob patterns of files the agent may modify
|
|
44
|
+
* @returns Object indicating success and the hook file path
|
|
45
|
+
*/
|
|
46
|
+
export declare function installScopeHook(worktreePath: string, sessionId: string, allowedPaths: string[]): {
|
|
47
|
+
installed: boolean;
|
|
48
|
+
hookPath: string | null;
|
|
49
|
+
error?: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Check if a file path matches any of the allowed patterns.
|
|
53
|
+
*
|
|
54
|
+
* This is the TypeScript equivalent of the bash pattern matching in the hook.
|
|
55
|
+
* Used by the PTY watcher for real-time scope violation detection (Phase 2).
|
|
56
|
+
*
|
|
57
|
+
* @param filePath - The file path to check (relative to repo root)
|
|
58
|
+
* @param allowedPaths - Array of glob patterns
|
|
59
|
+
* @returns true if the file matches at least one allowed pattern
|
|
60
|
+
*/
|
|
61
|
+
export declare function isPathAllowed(filePath: string, allowedPaths: string[]): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Match a file path against a single glob pattern.
|
|
64
|
+
*
|
|
65
|
+
* Supports:
|
|
66
|
+
* - `**` matches any number of path segments (including zero)
|
|
67
|
+
* - `*` matches any characters within a single path segment (no /)
|
|
68
|
+
* - `?` matches any single character (not /)
|
|
69
|
+
* - Literal characters match themselves
|
|
70
|
+
* - Patterns without `/` match at any depth (like gitignore)
|
|
71
|
+
*
|
|
72
|
+
* @param filePath - Normalized file path (forward slashes)
|
|
73
|
+
* @param pattern - Glob pattern to match against
|
|
74
|
+
* @returns true if the path matches the pattern
|
|
75
|
+
*/
|
|
76
|
+
export declare function matchGlobPattern(filePath: string, pattern: string): boolean;
|
|
77
|
+
//# sourceMappingURL=scope-hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-hook.d.ts","sourceRoot":"","sources":["../../src/sessions/scope-hook.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAqGpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAiB5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EAAE,GACrB;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAkDjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAY/E;AAeD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAS3E"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// ── PRD 014: Pre-Commit Hook Generator ─────────────────────────
|
|
3
|
+
// Generates a bash pre-commit hook that enforces allowed_paths
|
|
4
|
+
// scope constraints in git worktrees. The hook is self-contained
|
|
5
|
+
// with zero runtime dependencies.
|
|
6
|
+
import { writeFileSync, mkdirSync, chmodSync, existsSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
9
|
+
/**
|
|
10
|
+
* Generate the bash pre-commit hook script content.
|
|
11
|
+
*
|
|
12
|
+
* Uses bash pattern matching to check staged files against allowed patterns.
|
|
13
|
+
* The hook is designed to work with Git for Windows bash and standard Unix bash.
|
|
14
|
+
*
|
|
15
|
+
* @param sessionId - Session identifier for traceability in hook comments
|
|
16
|
+
* @param allowedPaths - Array of glob patterns the agent may modify
|
|
17
|
+
* @returns The complete bash hook script as a string
|
|
18
|
+
*/
|
|
19
|
+
export function generateHookScript(sessionId, allowedPaths) {
|
|
20
|
+
if (allowedPaths.length === 0) {
|
|
21
|
+
// No constraint — hook is a no-op
|
|
22
|
+
return '#!/usr/bin/env bash\n# PRD 014: No scope constraints — all paths allowed\nexit 0\n';
|
|
23
|
+
}
|
|
24
|
+
// Convert glob patterns to bash-compatible patterns.
|
|
25
|
+
// gitignore-style '**' maps to bash extglob '**' (with shopt -s globstar).
|
|
26
|
+
// For pattern matching via [[ $file == $pattern ]], bash handles * and ** natively.
|
|
27
|
+
const escapedPatterns = allowedPaths.map(p => {
|
|
28
|
+
// Escape single quotes in patterns for safe bash embedding
|
|
29
|
+
return p.replace(/'/g, "'\\''");
|
|
30
|
+
});
|
|
31
|
+
const patternsArray = escapedPatterns.map(p => `'${p}'`).join(' ');
|
|
32
|
+
const patternsComment = allowedPaths.map(p => `# ${p}`).join('\n');
|
|
33
|
+
return `#!/usr/bin/env bash
|
|
34
|
+
# Auto-generated by pv-method bridge (PRD 014)
|
|
35
|
+
# Scope enforcement for session: ${sessionId}
|
|
36
|
+
# Allowed paths:
|
|
37
|
+
${patternsComment}
|
|
38
|
+
|
|
39
|
+
ALLOWED_PATTERNS=(${patternsArray})
|
|
40
|
+
|
|
41
|
+
# Convert a glob pattern to a bash regex where:
|
|
42
|
+
# ** matches any characters (including /)
|
|
43
|
+
# * matches any characters except /
|
|
44
|
+
# ? matches any single character except /
|
|
45
|
+
# . is escaped to literal dot
|
|
46
|
+
glob_to_regex() {
|
|
47
|
+
local pattern="$1"
|
|
48
|
+
local regex=""
|
|
49
|
+
local i=0
|
|
50
|
+
local len=\${#pattern}
|
|
51
|
+
while [ $i -lt $len ]; do
|
|
52
|
+
local char="\${pattern:$i:1}"
|
|
53
|
+
local next="\${pattern:$((i+1)):1}"
|
|
54
|
+
if [ "$char" = "*" ] && [ "$next" = "*" ]; then
|
|
55
|
+
local after="\${pattern:$((i+2)):1}"
|
|
56
|
+
if [ "$after" = "/" ]; then
|
|
57
|
+
regex+="(.+/)?"; i=$((i+3))
|
|
58
|
+
else
|
|
59
|
+
regex+=".*"; i=$((i+2))
|
|
60
|
+
fi
|
|
61
|
+
elif [ "$char" = "*" ]; then
|
|
62
|
+
regex+="[^/]*"; i=$((i+1))
|
|
63
|
+
elif [ "$char" = "?" ]; then
|
|
64
|
+
regex+="[^/]"; i=$((i+1))
|
|
65
|
+
elif [ "$char" = "." ]; then
|
|
66
|
+
regex+="[.]"; i=$((i+1))
|
|
67
|
+
else
|
|
68
|
+
regex+="$char"; i=$((i+1))
|
|
69
|
+
fi
|
|
70
|
+
done
|
|
71
|
+
echo "$regex"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Get staged files
|
|
75
|
+
STAGED=$(git diff --cached --name-only)
|
|
76
|
+
|
|
77
|
+
if [ -z "$STAGED" ]; then
|
|
78
|
+
exit 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
VIOLATIONS=()
|
|
82
|
+
|
|
83
|
+
while IFS= read -r file; do
|
|
84
|
+
[ -z "$file" ] && continue
|
|
85
|
+
# Strip trailing CR (Windows CRLF)
|
|
86
|
+
file="\${file%$'\\r'}"
|
|
87
|
+
allowed=false
|
|
88
|
+
for pattern in "\${ALLOWED_PATTERNS[@]}"; do
|
|
89
|
+
# If pattern has no /, allow matching at any depth (gitignore semantics)
|
|
90
|
+
if [[ "$pattern" != */* ]]; then
|
|
91
|
+
pattern="**/$pattern"
|
|
92
|
+
fi
|
|
93
|
+
regex=$(glob_to_regex "$pattern")
|
|
94
|
+
if [[ "$file" =~ ^$regex$ ]]; then
|
|
95
|
+
allowed=true
|
|
96
|
+
break
|
|
97
|
+
fi
|
|
98
|
+
done
|
|
99
|
+
if [ "$allowed" = false ]; then
|
|
100
|
+
VIOLATIONS+=("$file")
|
|
101
|
+
fi
|
|
102
|
+
done <<< "$STAGED"
|
|
103
|
+
|
|
104
|
+
if [ \${#VIOLATIONS[@]} -gt 0 ]; then
|
|
105
|
+
echo ""
|
|
106
|
+
echo "SCOPE VIOLATION: The following files are not in allowed_paths for this session:"
|
|
107
|
+
printf ' %s\\n' "\${VIOLATIONS[@]}"
|
|
108
|
+
echo "Allowed patterns: \${ALLOWED_PATTERNS[*]}"
|
|
109
|
+
echo ""
|
|
110
|
+
echo "Remove the file(s) from staging (git reset HEAD '<file>') or request scope extension."
|
|
111
|
+
echo "Session: ${sessionId}"
|
|
112
|
+
exit 1
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
exit 0
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the correct hooks directory for a git worktree.
|
|
120
|
+
*
|
|
121
|
+
* For linked worktrees, the hooks path may differ from the main repository.
|
|
122
|
+
* Uses `git rev-parse --git-path hooks` to resolve correctly across git versions.
|
|
123
|
+
*
|
|
124
|
+
* @param worktreePath - The root path of the worktree
|
|
125
|
+
* @returns Absolute path to the hooks directory
|
|
126
|
+
*/
|
|
127
|
+
export function resolveHooksDir(worktreePath) {
|
|
128
|
+
try {
|
|
129
|
+
const hooksPath = execSync('git rev-parse --git-path hooks', {
|
|
130
|
+
cwd: worktreePath,
|
|
131
|
+
encoding: 'utf-8',
|
|
132
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
133
|
+
}).trim();
|
|
134
|
+
// git rev-parse may return a relative path — resolve it
|
|
135
|
+
if (hooksPath.startsWith('/') || /^[A-Z]:/i.test(hooksPath)) {
|
|
136
|
+
return hooksPath;
|
|
137
|
+
}
|
|
138
|
+
return join(worktreePath, hooksPath);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// Fallback: standard .git/hooks location
|
|
142
|
+
return join(worktreePath, '.git', 'hooks');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Install a scope-enforcing pre-commit hook in a worktree.
|
|
147
|
+
*
|
|
148
|
+
* Creates the hooks directory if it doesn't exist, writes the hook script,
|
|
149
|
+
* and sets executable permissions. Only operates on worktree-isolated sessions.
|
|
150
|
+
*
|
|
151
|
+
* @param worktreePath - Path to the worktree root
|
|
152
|
+
* @param sessionId - Session identifier for hook traceability
|
|
153
|
+
* @param allowedPaths - Glob patterns of files the agent may modify
|
|
154
|
+
* @returns Object indicating success and the hook file path
|
|
155
|
+
*/
|
|
156
|
+
export function installScopeHook(worktreePath, sessionId, allowedPaths) {
|
|
157
|
+
if (allowedPaths.length === 0) {
|
|
158
|
+
return { installed: false, hookPath: null };
|
|
159
|
+
}
|
|
160
|
+
try {
|
|
161
|
+
const hooksDir = resolveHooksDir(worktreePath);
|
|
162
|
+
const hookPath = join(hooksDir, 'pre-commit');
|
|
163
|
+
// Ensure hooks directory exists
|
|
164
|
+
mkdirSync(hooksDir, { recursive: true });
|
|
165
|
+
// Check for existing pre-commit hook (F-D-3: don't silently overwrite)
|
|
166
|
+
if (existsSync(hookPath)) {
|
|
167
|
+
const existing = readFileSync(hookPath, 'utf-8');
|
|
168
|
+
if (!existing.includes('PRD 014')) {
|
|
169
|
+
// Chain: prepend scope check, then call existing hook
|
|
170
|
+
const script = generateHookScript(sessionId, allowedPaths);
|
|
171
|
+
const chained = script.replace(/^exit 0\n$/m, '# Chain: run original pre-commit hook\nexec "$(dirname "$0")/pre-commit.original" "$@" 2>/dev/null\nexit 0\n');
|
|
172
|
+
writeFileSync(hookPath + '.original', existing, { encoding: 'utf-8' });
|
|
173
|
+
try {
|
|
174
|
+
chmodSync(hookPath + '.original', 0o755);
|
|
175
|
+
}
|
|
176
|
+
catch { /* Windows */ }
|
|
177
|
+
writeFileSync(hookPath, chained, { encoding: 'utf-8' });
|
|
178
|
+
try {
|
|
179
|
+
chmodSync(hookPath, 0o755);
|
|
180
|
+
}
|
|
181
|
+
catch { /* Windows */ }
|
|
182
|
+
return { installed: true, hookPath };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// Generate and write the hook script
|
|
186
|
+
const script = generateHookScript(sessionId, allowedPaths);
|
|
187
|
+
writeFileSync(hookPath, script, { encoding: 'utf-8' });
|
|
188
|
+
// Make executable (Unix). On Windows, git uses bash to run hooks,
|
|
189
|
+
// so the shebang line is sufficient, but we set permissions anyway.
|
|
190
|
+
try {
|
|
191
|
+
chmodSync(hookPath, 0o755);
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
// chmod may fail on Windows — non-fatal, hooks still work via bash
|
|
195
|
+
}
|
|
196
|
+
return { installed: true, hookPath };
|
|
197
|
+
}
|
|
198
|
+
catch (e) {
|
|
199
|
+
return {
|
|
200
|
+
installed: false,
|
|
201
|
+
hookPath: null,
|
|
202
|
+
error: `Failed to install scope hook: ${e.message}`,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Check if a file path matches any of the allowed patterns.
|
|
208
|
+
*
|
|
209
|
+
* This is the TypeScript equivalent of the bash pattern matching in the hook.
|
|
210
|
+
* Used by the PTY watcher for real-time scope violation detection (Phase 2).
|
|
211
|
+
*
|
|
212
|
+
* @param filePath - The file path to check (relative to repo root)
|
|
213
|
+
* @param allowedPaths - Array of glob patterns
|
|
214
|
+
* @returns true if the file matches at least one allowed pattern
|
|
215
|
+
*/
|
|
216
|
+
export function isPathAllowed(filePath, allowedPaths) {
|
|
217
|
+
if (allowedPaths.length === 0)
|
|
218
|
+
return true; // No constraint
|
|
219
|
+
// Normalize path separators and resolve traversal
|
|
220
|
+
const normalized = normalizePath(filePath);
|
|
221
|
+
for (const pattern of allowedPaths) {
|
|
222
|
+
if (matchGlobPattern(normalized, pattern.replace(/\\/g, '/'))) {
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Normalize a file path: forward slashes, resolve '..' and '.' segments.
|
|
230
|
+
*/
|
|
231
|
+
function normalizePath(filePath) {
|
|
232
|
+
const parts = filePath.replace(/\\/g, '/').split('/');
|
|
233
|
+
const resolved = [];
|
|
234
|
+
for (const seg of parts) {
|
|
235
|
+
if (seg === '..')
|
|
236
|
+
resolved.pop();
|
|
237
|
+
else if (seg !== '.' && seg !== '')
|
|
238
|
+
resolved.push(seg);
|
|
239
|
+
}
|
|
240
|
+
return resolved.join('/');
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Match a file path against a single glob pattern.
|
|
244
|
+
*
|
|
245
|
+
* Supports:
|
|
246
|
+
* - `**` matches any number of path segments (including zero)
|
|
247
|
+
* - `*` matches any characters within a single path segment (no /)
|
|
248
|
+
* - `?` matches any single character (not /)
|
|
249
|
+
* - Literal characters match themselves
|
|
250
|
+
* - Patterns without `/` match at any depth (like gitignore)
|
|
251
|
+
*
|
|
252
|
+
* @param filePath - Normalized file path (forward slashes)
|
|
253
|
+
* @param pattern - Glob pattern to match against
|
|
254
|
+
* @returns true if the path matches the pattern
|
|
255
|
+
*/
|
|
256
|
+
export function matchGlobPattern(filePath, pattern) {
|
|
257
|
+
// If the pattern contains no directory separator, it can match at any depth
|
|
258
|
+
// (gitignore semantics: `*.ts` matches `src/foo.ts`, not just `foo.ts`)
|
|
259
|
+
const effectivePattern = pattern.includes('/') ? pattern : `**/${pattern}`;
|
|
260
|
+
// Convert glob pattern to regex
|
|
261
|
+
const regexStr = globToRegex(effectivePattern);
|
|
262
|
+
const regex = new RegExp(`^${regexStr}$`);
|
|
263
|
+
return regex.test(filePath);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Convert a glob pattern to a regex string.
|
|
267
|
+
* Internal helper for matchGlobPattern.
|
|
268
|
+
*/
|
|
269
|
+
function globToRegex(pattern) {
|
|
270
|
+
let result = '';
|
|
271
|
+
let i = 0;
|
|
272
|
+
while (i < pattern.length) {
|
|
273
|
+
const char = pattern[i];
|
|
274
|
+
if (char === '*') {
|
|
275
|
+
if (pattern[i + 1] === '*') {
|
|
276
|
+
// ** — match any path segments
|
|
277
|
+
if (pattern[i + 2] === '/') {
|
|
278
|
+
// **/ — match zero or more directories
|
|
279
|
+
result += '(?:.+/)?';
|
|
280
|
+
i += 3;
|
|
281
|
+
}
|
|
282
|
+
else if (i + 2 >= pattern.length) {
|
|
283
|
+
// ** at end — match everything
|
|
284
|
+
result += '.*';
|
|
285
|
+
i += 2;
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
// ** followed by something else
|
|
289
|
+
result += '.*';
|
|
290
|
+
i += 2;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
// * — match within a single path segment (no /)
|
|
295
|
+
result += '[^/]*';
|
|
296
|
+
i += 1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
else if (char === '?') {
|
|
300
|
+
result += '[^/]';
|
|
301
|
+
i += 1;
|
|
302
|
+
}
|
|
303
|
+
else if (char === '.') {
|
|
304
|
+
result += '\\.';
|
|
305
|
+
i += 1;
|
|
306
|
+
}
|
|
307
|
+
else if (char === '\\') {
|
|
308
|
+
result += '\\\\';
|
|
309
|
+
i += 1;
|
|
310
|
+
}
|
|
311
|
+
else if (char === '(' || char === ')' || char === '+' || char === '^' || char === '$' || char === '|' || char === '{' || char === '}' || char === '[' || char === ']') {
|
|
312
|
+
// Escape regex special chars
|
|
313
|
+
result += '\\' + char;
|
|
314
|
+
i += 1;
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
result += char;
|
|
318
|
+
i += 1;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return result;
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=scope-hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-hook.js","sourceRoot":"","sources":["../../src/sessions/scope-hook.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,kEAAkE;AAClE,+DAA+D;AAC/D,iEAAiE;AACjE,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM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