@atolis-hq/wake 0.4.2 → 0.4.7
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/README.md +9 -0
- package/dist/src/activities/agent/agent-activity-definition.d.ts +9 -0
- package/dist/src/activities/agent/agent-activity.d.ts +51 -0
- package/dist/src/activities/agent/agent-result.d.ts +43 -0
- package/dist/src/activities/contracts/activity.d.ts +184 -0
- package/dist/src/activities/contracts/config.d.ts +3 -0
- package/dist/src/activities/contracts/decision-claim-schema.d.ts +35 -0
- package/dist/src/activities/contracts/decision-claim-schema.js +42 -0
- package/dist/src/activities/contracts/event-factory.d.ts +6 -0
- package/dist/src/activities/contracts/event-factory.js +40 -0
- package/dist/src/activities/contracts/event-integrity.d.ts +61 -0
- package/dist/src/activities/contracts/event-integrity.js +50 -0
- package/dist/src/activities/contracts/event-schema.d.ts +2803 -0
- package/dist/src/activities/contracts/event-schema.js +67 -121
- package/dist/src/activities/contracts/events.d.ts +153 -0
- package/dist/src/activities/contracts/events.js +4 -4
- package/dist/src/activities/contracts/identifiers.d.ts +5 -0
- package/dist/src/activities/contracts/registry.d.ts +19 -0
- package/dist/src/activities/contracts/streams.d.ts +13 -0
- package/dist/src/activities/contracts/vocabulary.d.ts +69 -0
- package/dist/src/activities/index.d.ts +23 -0
- package/dist/src/activities/index.js +1 -0
- package/dist/src/activities/issue/complete.d.ts +26 -0
- package/dist/src/activities/issue/complete.js +5 -5
- package/dist/src/activities/pr/activity-support.d.ts +38 -0
- package/dist/src/activities/pr/activity-support.js +1 -1
- package/dist/src/activities/pr/application.d.ts +17 -0
- package/dist/src/activities/pr/application.js +6 -6
- package/dist/src/activities/pr/approve.d.ts +7 -0
- package/dist/src/activities/pr/approve.js +8 -3
- package/dist/src/activities/pr/capability.d.ts +2 -0
- package/dist/src/activities/pr/contracts.d.ts +133 -0
- package/dist/src/activities/pr/decision-claim.d.ts +26 -0
- package/dist/src/activities/pr/decision-claim.js +50 -30
- package/dist/src/activities/pr/event-data.d.ts +21 -0
- package/dist/src/activities/pr/event-data.js +101 -0
- package/dist/src/activities/pr/intent.d.ts +12 -0
- package/dist/src/activities/pr/intent.js +5 -5
- package/dist/src/activities/pr/merge-authority-gate.d.ts +13 -0
- package/dist/src/activities/pr/merge-authority-gate.js +1 -1
- package/dist/src/activities/pr/merge.d.ts +7 -0
- package/dist/src/activities/pr/merge.js +8 -3
- package/dist/src/activities/pr/policy.d.ts +13 -0
- package/dist/src/activities/pr/projection.d.ts +5 -0
- package/dist/src/activities/pr/projection.js +18 -17
- package/dist/src/activities/pr/vocabulary.d.ts +34 -0
- package/dist/src/activities/review/authorization.d.ts +9 -0
- package/dist/src/activities/review/contracts.d.ts +46 -0
- package/dist/src/activities/review/signals.d.ts +2 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.d.ts +3 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.js +8 -0
- package/dist/src/bootstrap/activity-registry.d.ts +4 -0
- package/dist/src/bootstrap/analytics-projection.d.ts +12 -0
- package/dist/src/bootstrap/analytics-projection.js +3 -3
- package/dist/src/bootstrap/board-projection.d.ts +56 -0
- package/dist/src/bootstrap/board-projection.js +156 -71
- package/dist/src/bootstrap/composition-root.d.ts +76 -0
- package/dist/src/bootstrap/composition-root.js +20 -13
- package/dist/src/bootstrap/config/load-config.d.ts +6 -0
- package/dist/src/bootstrap/config/root-schema.d.ts +443 -0
- package/dist/src/bootstrap/event-processor-runtime.d.ts +22 -0
- package/dist/src/bootstrap/event-processor-runtime.js +88 -0
- package/dist/src/bootstrap/external-ref.d.ts +3 -0
- package/dist/src/bootstrap/fake-provider-files.d.ts +3 -0
- package/dist/src/bootstrap/fake-scenarios.d.ts +3 -0
- package/dist/src/bootstrap/index.d.ts +27 -0
- package/dist/src/bootstrap/index.js +2 -28
- package/dist/src/bootstrap/initialise.d.ts +4 -0
- package/dist/src/bootstrap/initialise.js +8 -16
- package/dist/src/bootstrap/integration-runtime.d.ts +48 -0
- package/dist/src/bootstrap/integration-runtime.js +36 -54
- package/dist/src/bootstrap/paths.d.ts +12 -0
- package/dist/src/bootstrap/persistence-composition.d.ts +21 -0
- package/dist/src/bootstrap/persistence-composition.js +12 -4
- package/dist/src/bootstrap/projection-runtime.d.ts +16 -0
- package/dist/src/bootstrap/projection-runtime.js +50 -23
- package/dist/src/bootstrap/resource-transition-evidence.d.ts +11 -0
- package/dist/src/bootstrap/runner-quota-reporter.d.ts +6 -0
- package/dist/src/bootstrap/runner-quota-reporter.js +16 -11
- package/dist/src/bootstrap/runner-registry.d.ts +3 -0
- package/dist/src/bootstrap/runner-tick-adapter.d.ts +16 -0
- package/dist/src/bootstrap/runner-tick-adapter.js +57 -0
- package/dist/src/bootstrap/schedule-checkpoint-store.d.ts +9 -0
- package/dist/src/bootstrap/self-update-application.d.ts +54 -0
- package/dist/src/bootstrap/self-update-failure-log.d.ts +17 -0
- package/dist/src/bootstrap/source-update-port.d.ts +8 -0
- package/dist/src/bootstrap/status-publish-activity.d.ts +7 -0
- package/dist/src/bootstrap/status-publish-activity.js +4 -5
- package/dist/src/bootstrap/surface-api-applications.d.ts +18 -0
- package/dist/src/bootstrap/surface-api-applications.js +104 -57
- package/dist/src/bootstrap/surface-api-execution-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-execution-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-metadata.d.ts +4 -0
- package/dist/src/bootstrap/surface-api-metadata.js +1 -1
- package/dist/src/bootstrap/surface-api-projection-pages.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-run-context.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-transcripts.d.ts +10 -0
- package/dist/src/bootstrap/surface-api-work-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-work-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-workflow-diagrams.d.ts +11 -0
- package/dist/src/bootstrap/surface-api-workflow-diagrams.js +2 -2
- package/dist/src/bootstrap/surface-applications.d.ts +10 -0
- package/dist/src/bootstrap/surface-cli-applications.d.ts +33 -0
- package/dist/src/bootstrap/surface-cli-applications.js +151 -65
- package/dist/src/bootstrap/transcript-retention.d.ts +11 -0
- package/dist/src/bootstrap/update-ledger.d.ts +9 -0
- package/dist/src/bootstrap/update-maintenance-lease.d.ts +24 -0
- package/dist/src/bootstrap/update-maintenance-lease.js +1 -1
- package/dist/src/bootstrap/version.d.ts +13 -0
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/control-plane/application/activation-scheduler-ports.d.ts +71 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.d.ts +42 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.js +111 -0
- package/dist/src/control-plane/application/activation-scheduler.d.ts +8 -0
- package/dist/src/control-plane/application/activation-scheduler.js +165 -0
- package/dist/src/control-plane/application/advance-once-dispatch.d.ts +46 -0
- package/dist/src/control-plane/application/advance-once-dispatch.js +6 -7
- package/dist/src/control-plane/application/advance-once.d.ts +5 -0
- package/dist/src/control-plane/application/advance-once.js +4 -158
- package/dist/src/control-plane/application/control-plane-projection.d.ts +21 -0
- package/dist/src/control-plane/application/control-plane-projection.js +27 -5
- package/dist/src/control-plane/application/control-plane-service.d.ts +12 -0
- package/dist/src/control-plane/application/control-plane-service.js +28 -9
- package/dist/src/control-plane/application/execution-reconciliation.d.ts +21 -0
- package/dist/src/control-plane/application/intake-pipeline.d.ts +18 -0
- package/dist/src/control-plane/application/intake-pipeline.js +8 -18
- package/dist/src/control-plane/application/runner-control-service.d.ts +12 -0
- package/dist/src/control-plane/application/runner-control-service.js +35 -13
- package/dist/src/control-plane/application/runner-pipeline.d.ts +24 -0
- package/dist/src/control-plane/application/runner-pipeline.js +23 -41
- package/dist/src/control-plane/application/schedule-service.d.ts +31 -0
- package/dist/src/control-plane/application/schedule-service.js +1 -1
- package/dist/src/control-plane/application/work-cancellation-policy.d.ts +20 -0
- package/dist/src/control-plane/application/work-cancellation-policy.js +1 -1
- package/dist/src/control-plane/contracts/commands.d.ts +20 -0
- package/dist/src/control-plane/contracts/config.d.ts +30 -0
- package/dist/src/control-plane/contracts/config.js +7 -1
- package/dist/src/control-plane/contracts/event-factory.d.ts +6 -0
- package/dist/src/control-plane/contracts/event-factory.js +14 -0
- package/dist/src/control-plane/contracts/events.d.ts +36 -0
- package/dist/src/control-plane/contracts/events.js +42 -47
- package/dist/src/control-plane/contracts/streams.d.ts +6 -0
- package/dist/src/control-plane/contracts/views.d.ts +28 -0
- package/dist/src/control-plane/domain/dispatch-policy.d.ts +18 -0
- package/dist/src/control-plane/domain/quota-policy.d.ts +21 -0
- package/dist/src/control-plane/domain/runner-quota.d.ts +2 -0
- package/dist/src/control-plane/domain/schedule-policy.d.ts +8 -0
- package/dist/src/control-plane/index.d.ts +24 -0
- package/dist/src/control-plane/index.js +3 -0
- package/dist/src/control-plane/infrastructure/intake-host.d.ts +19 -0
- package/dist/src/control-plane/infrastructure/intake-host.js +2 -3
- package/dist/src/control-plane/infrastructure/resident-host.d.ts +16 -0
- package/dist/src/control-plane/infrastructure/resident-host.js +3 -1
- package/dist/src/control-plane/infrastructure/tick-host.d.ts +6 -0
- package/dist/src/control-plane/infrastructure/tick-host.js +2 -2
- package/dist/src/conversations/application/conversation-projection.d.ts +3 -0
- package/dist/src/conversations/application/conversation-repository.d.ts +13 -0
- package/dist/src/conversations/application/conversation-repository.js +1 -1
- package/dist/src/conversations/application/conversation-service.d.ts +16 -0
- package/dist/src/conversations/application/conversation-service.js +32 -27
- package/dist/src/conversations/contracts/commands.d.ts +33 -0
- package/dist/src/conversations/contracts/event-factory.d.ts +6 -0
- package/dist/src/conversations/contracts/event-factory.js +18 -0
- package/dist/src/conversations/contracts/events.d.ts +42 -0
- package/dist/src/conversations/contracts/events.js +37 -24
- package/dist/src/conversations/contracts/identifiers.d.ts +5 -0
- package/dist/src/conversations/contracts/streams.d.ts +7 -0
- package/dist/src/conversations/contracts/views.d.ts +49 -0
- package/dist/src/conversations/contracts/vocabulary.d.ts +5 -0
- package/dist/src/conversations/domain/conversation.d.ts +4 -0
- package/dist/src/conversations/domain/conversation.js +8 -7
- package/dist/src/conversations/index.d.ts +9 -0
- package/dist/src/conversations/index.js +1 -0
- package/dist/src/execution/application/activation-claim.d.ts +23 -0
- package/dist/src/execution/application/activation-claim.js +8 -9
- package/dist/src/execution/application/active-run-cancellation.d.ts +4 -0
- package/dist/src/execution/application/active-run-cancellation.js +2 -2
- package/dist/src/execution/application/execution-activity.d.ts +61 -0
- package/dist/src/execution/application/execution-activity.js +4 -1
- package/dist/src/execution/application/execution-projection.d.ts +11 -0
- package/dist/src/execution/application/execution-projection.js +8 -4
- package/dist/src/execution/application/execution-service.d.ts +33 -0
- package/dist/src/execution/application/execution-service.js +288 -59
- package/dist/src/execution/application/execution-validation.d.ts +8 -0
- package/dist/src/execution/application/execution-validation.js +3 -2
- package/dist/src/execution/application/recovery-service.d.ts +52 -0
- package/dist/src/execution/application/recovery-service.js +32 -17
- package/dist/src/execution/application/run-lifecycle.d.ts +75 -0
- package/dist/src/execution/application/run-lifecycle.js +130 -62
- package/dist/src/execution/application/run-liveness-service.d.ts +14 -0
- package/dist/src/execution/application/run-liveness-service.js +68 -30
- package/dist/src/execution/application/run-repository.d.ts +18 -0
- package/dist/src/execution/application/run-repository.js +2 -2
- package/dist/src/execution/contracts/commands.d.ts +30 -0
- package/dist/src/execution/contracts/config.d.ts +94 -0
- package/dist/src/execution/contracts/control-plane.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.js +20 -31
- package/dist/src/execution/contracts/events.d.ts +198 -0
- package/dist/src/execution/contracts/events.js +152 -129
- package/dist/src/execution/contracts/identifiers.d.ts +3 -0
- package/dist/src/execution/contracts/liveness.d.ts +17 -0
- package/dist/src/execution/contracts/results.d.ts +23 -0
- package/dist/src/execution/contracts/runner.d.ts +78 -0
- package/dist/src/execution/contracts/streams.d.ts +12 -0
- package/dist/src/execution/contracts/views.d.ts +42 -0
- package/dist/src/execution/contracts/vocabulary.d.ts +50 -0
- package/dist/src/execution/contracts/vocabulary.js +4 -0
- package/dist/src/execution/contracts/workspace.d.ts +48 -0
- package/dist/src/execution/domain/run-result.d.ts +2 -0
- package/dist/src/execution/domain/run.d.ts +3 -0
- package/dist/src/execution/domain/run.js +72 -22
- package/dist/src/execution/index.d.ts +34 -0
- package/dist/src/execution/infrastructure/agent-runner-adapter.d.ts +2 -0
- package/dist/src/execution/infrastructure/codex-stop-hook.d.ts +13 -0
- package/dist/src/execution/infrastructure/process-execution.d.ts +23 -0
- package/dist/src/execution/infrastructure/prompt-templates.d.ts +15 -0
- package/dist/src/execution/infrastructure/runner-memory-profile.d.ts +11 -0
- package/dist/src/execution/infrastructure/runners/claude.d.ts +34 -0
- package/dist/src/execution/infrastructure/runners/codex.d.ts +13 -0
- package/dist/src/execution/infrastructure/runners/command.d.ts +3 -0
- package/dist/src/execution/infrastructure/runners/cursor.d.ts +12 -0
- package/dist/src/execution/infrastructure/runners/fake-scenarios.d.ts +35 -0
- package/dist/src/execution/infrastructure/runners/fake.d.ts +8 -0
- package/dist/src/execution/infrastructure/runners/registry.d.ts +14 -0
- package/dist/src/execution/infrastructure/transcript-store.d.ts +48 -0
- package/dist/src/execution/infrastructure/transcripts.d.ts +1 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.d.ts +36 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.js +2 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.d.ts +29 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.js +21 -11
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.d.ts +3 -0
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.js +4 -2
- package/dist/src/integrations/application/adapter-health-tracker.d.ts +17 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.d.ts +25 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.js +36 -20
- package/dist/src/integrations/application/artifact-registration-reactor.d.ts +32 -0
- package/dist/src/integrations/application/artifact-registration-reactor.js +43 -35
- package/dist/src/integrations/application/poll-service.d.ts +13 -0
- package/dist/src/integrations/application/poll-service.js +2 -2
- package/dist/src/integrations/application/terminal-agent-run-report.d.ts +33 -0
- package/dist/src/integrations/application/work-admission.d.ts +30 -0
- package/dist/src/integrations/application/work-conclusion.d.ts +13 -0
- package/dist/src/integrations/contracts/artifact-event-factory.d.ts +6 -0
- package/dist/src/integrations/contracts/artifact-event-factory.js +8 -0
- package/dist/src/integrations/contracts/artifact-events.d.ts +31 -0
- package/dist/src/integrations/contracts/artifact-events.js +24 -24
- package/dist/src/integrations/contracts/artifact-vocabulary.d.ts +11 -0
- package/dist/src/integrations/contracts/config.d.ts +13 -0
- package/dist/src/integrations/contracts/identifiers.d.ts +3 -0
- package/dist/src/integrations/contracts/intake-rules.d.ts +15 -0
- package/dist/src/integrations/contracts/intake.d.ts +15 -0
- package/dist/src/integrations/contracts/outcome-vocabulary.d.ts +6 -0
- package/dist/src/integrations/contracts/provider.d.ts +105 -0
- package/dist/src/integrations/contracts/reply-routing.d.ts +31 -0
- package/dist/src/integrations/contracts/streams.d.ts +12 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.d.ts +24 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.js +151 -73
- package/dist/src/integrations/delivery/application/delivery-projector.d.ts +5 -0
- package/dist/src/integrations/delivery/application/delivery-projector.js +52 -52
- package/dist/src/integrations/delivery/application/delivery-service.d.ts +40 -0
- package/dist/src/integrations/delivery/application/delivery-service.js +15 -16
- package/dist/src/integrations/delivery/contracts/commands.d.ts +7 -0
- package/dist/src/integrations/delivery/contracts/config.d.ts +25 -0
- package/dist/src/integrations/delivery/contracts/event-factory.d.ts +11 -0
- package/dist/src/integrations/delivery/contracts/event-factory.js +20 -9
- package/dist/src/integrations/delivery/contracts/events.d.ts +46 -0
- package/dist/src/integrations/delivery/contracts/events.js +33 -18
- package/dist/src/integrations/delivery/contracts/intents.d.ts +54 -0
- package/dist/src/integrations/delivery/contracts/intents.js +21 -14
- package/dist/src/integrations/delivery/contracts/views.d.ts +47 -0
- package/dist/src/integrations/delivery/contracts/vocabulary.d.ts +25 -0
- package/dist/src/integrations/fake/durable-delivery-provider.d.ts +29 -0
- package/dist/src/integrations/fake/external-sink.d.ts +5 -0
- package/dist/src/integrations/fake/external-source.d.ts +30 -0
- package/dist/src/integrations/fake/external-source.js +1 -3
- package/dist/src/integrations/fake/inbound-translator.d.ts +16 -0
- package/dist/src/integrations/fake/inbound-translator.js +22 -10
- package/dist/src/integrations/fake/provider.d.ts +38 -0
- package/dist/src/integrations/fake/provider.js +3 -1
- package/dist/src/integrations/github/application/agent-context-reader.d.ts +6 -0
- package/dist/src/integrations/github/application/agent-context-reader.js +10 -7
- package/dist/src/integrations/github/application/agent-run-comment.d.ts +22 -0
- package/dist/src/integrations/github/application/comment-history-reader.d.ts +25 -0
- package/dist/src/integrations/github/application/comment-history-reader.js +36 -32
- package/dist/src/integrations/github/application/delivery-marker.d.ts +2 -0
- package/dist/src/integrations/github/application/inbound-comment-syntax.d.ts +8 -0
- package/dist/src/integrations/github/application/inbound-context.d.ts +3 -0
- package/dist/src/integrations/github/application/inbound-context.js +4 -4
- package/dist/src/integrations/github/application/inbound-review-signals.d.ts +21 -0
- package/dist/src/integrations/github/application/inbound-review-signals.js +30 -25
- package/dist/src/integrations/github/application/inbound-translator.d.ts +103 -0
- package/dist/src/integrations/github/application/inbound-translator.js +149 -160
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.d.ts +10 -0
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.js +4 -4
- package/dist/src/integrations/github/application/intake-policy.d.ts +7 -0
- package/dist/src/integrations/github/application/operator-retry-command.d.ts +1 -0
- package/dist/src/integrations/github/application/outbound-translator.d.ts +19 -0
- package/dist/src/integrations/github/application/poll-service.d.ts +11 -0
- package/dist/src/integrations/github/application/poll-service.js +11 -2
- package/dist/src/integrations/github/application/pull-request-translation.d.ts +5 -0
- package/dist/src/integrations/github/application/reply-target-selector.d.ts +8 -0
- package/dist/src/integrations/github/application/resource-links.d.ts +2 -0
- package/dist/src/integrations/github/application/review-command-translator.d.ts +14 -0
- package/dist/src/integrations/github/application/wake-labels.d.ts +29 -0
- package/dist/src/integrations/github/contracts/check-evidence.d.ts +1 -0
- package/dist/src/integrations/github/contracts/config.d.ts +81 -0
- package/dist/src/integrations/github/contracts/event-factory.d.ts +6 -0
- package/dist/src/integrations/github/contracts/event-factory.js +26 -0
- package/dist/src/integrations/github/contracts/events.d.ts +135 -0
- package/dist/src/integrations/github/contracts/events.js +118 -132
- package/dist/src/integrations/github/contracts/external-key.d.ts +8 -0
- package/dist/src/integrations/github/contracts/issue-query.d.ts +5 -0
- package/dist/src/integrations/github/contracts/payloads.d.ts +74 -0
- package/dist/src/integrations/github/contracts/vocabulary.d.ts +64 -0
- package/dist/src/integrations/github/index.d.ts +34 -0
- package/dist/src/integrations/github/index.js +1 -0
- package/dist/src/integrations/github/infrastructure/adapter-health-registry.d.ts +11 -0
- package/dist/src/integrations/github/infrastructure/bounded-fetch.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/client-reads.d.ts +255 -0
- package/dist/src/integrations/github/infrastructure/client.d.ts +263 -0
- package/dist/src/integrations/github/infrastructure/comment-source.d.ts +7 -0
- package/dist/src/integrations/github/infrastructure/content-fingerprint.d.ts +2 -0
- package/dist/src/integrations/github/infrastructure/delivery.d.ts +6 -0
- package/dist/src/integrations/github/infrastructure/etag-cache.d.ts +29 -0
- package/dist/src/integrations/github/infrastructure/gh-auth.d.ts +4 -0
- package/dist/src/integrations/github/infrastructure/issue-source.d.ts +20 -0
- package/dist/src/integrations/github/infrastructure/issue-source.js +10 -6
- package/dist/src/integrations/github/infrastructure/poll-watermark.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/pr-source.d.ts +16 -0
- package/dist/src/integrations/github/infrastructure/pr-source.js +6 -4
- package/dist/src/integrations/github/infrastructure/request-coordinator.d.ts +13 -0
- package/dist/src/integrations/github/infrastructure/review-source.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/review-source.js +29 -25
- package/dist/src/integrations/github/infrastructure/source-contracts.d.ts +22 -0
- package/dist/src/integrations/github/infrastructure/source.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/source.js +3 -5
- package/dist/src/integrations/github/provider.d.ts +3 -0
- package/dist/src/integrations/github/provider.js +14 -12
- package/dist/src/integrations/index.d.ts +32 -0
- package/dist/src/integrations/index.js +1 -0
- package/dist/src/kernel/contracts/clock.d.ts +3 -0
- package/dist/src/kernel/contracts/id-generator.d.ts +3 -0
- package/dist/src/kernel/contracts/identifiers.d.ts +7 -0
- package/dist/src/kernel/contracts/identifiers.js +1 -8
- package/dist/src/kernel/contracts/relations.d.ts +14 -0
- package/dist/src/kernel/contracts/schema.d.ts +3 -0
- package/dist/src/kernel/contracts/vocabulary.d.ts +7 -0
- package/dist/src/kernel/domain/match-mode.d.ts +2 -0
- package/dist/src/kernel/domain/relation.d.ts +9 -0
- package/dist/src/kernel/index.d.ts +10 -0
- package/dist/src/kernel/index.js +0 -11
- package/dist/src/kernel/infrastructure/system-clock.d.ts +4 -0
- package/dist/src/kernel/infrastructure/ulid-id-generator.d.ts +4 -0
- package/dist/src/main.d.ts +14 -0
- package/dist/src/node_modules/@atolis-hq/eventing/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing/README.md +41 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts +13 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts.map +1 -0
- package/dist/src/{kernel/domain → node_modules/@atolis-hq/eventing/dist/contracts}/event-envelope.js +4 -4
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts.map +1 -0
- package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/event-schema.js +21 -5
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts +46 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.js +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.js +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.js +26 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.js +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts.map +1 -0
- package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-projection-store.js +2 -1
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts.map +1 -0
- package/dist/src/{kernel/infrastructure/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.js} +5 -2
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.js +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts +22 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.js +24 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts +39 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.js +168 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.js +66 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts +2 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.js +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts +14 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts +49 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/package.json +42 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/README.md +40 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts +23 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.js +54 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.js +50 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.js +99 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts +51 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-event-journal.js +185 -103
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-lock.js +10 -1
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts +12 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.js +127 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.js +219 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.js +27 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.js +28 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.js +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/package.json +38 -0
- package/dist/src/orchestration/application/accept-activity-outcome.d.ts +18 -0
- package/dist/src/orchestration/application/accept-signal.d.ts +14 -0
- package/dist/src/orchestration/application/advance-workflow.d.ts +50 -0
- package/dist/src/orchestration/application/advance-workflow.js +7 -12
- package/dist/src/orchestration/application/coordination-claims.d.ts +17 -0
- package/dist/src/orchestration/application/coordination-claims.js +17 -20
- package/dist/src/orchestration/application/durable-append.d.ts +17 -0
- package/dist/src/orchestration/application/durable-append.js +1 -1
- package/dist/src/orchestration/application/group-budget-recorder.d.ts +9 -0
- package/dist/src/orchestration/application/group-budget-recorder.js +9 -6
- package/dist/src/orchestration/application/orchestration-projection.d.ts +6 -0
- package/dist/src/orchestration/application/orchestration-projection.js +6 -7
- package/dist/src/orchestration/application/orchestration-repository.d.ts +23 -0
- package/dist/src/orchestration/application/orchestration-repository.js +2 -2
- package/dist/src/orchestration/application/orchestration-service.d.ts +93 -0
- package/dist/src/orchestration/application/orchestration-service.js +10 -1
- package/dist/src/orchestration/application/pull-request-transition-evidence.d.ts +3 -0
- package/dist/src/orchestration/application/pull-request-transition-evidence.js +10 -10
- package/dist/src/orchestration/application/reactor-command-context.d.ts +5 -0
- package/dist/src/orchestration/application/reactor-command-context.js +9 -0
- package/dist/src/orchestration/application/request-child.d.ts +29 -0
- package/dist/src/orchestration/application/request-child.js +26 -10
- package/dist/src/orchestration/application/resource-transition-evidence.d.ts +18 -0
- package/dist/src/orchestration/application/resource-transition-matching.d.ts +19 -0
- package/dist/src/orchestration/application/resource-transition-matching.js +9 -3
- package/dist/src/orchestration/application/resource-transition-reactor.d.ts +16 -0
- package/dist/src/orchestration/application/resource-transition-reactor.js +21 -42
- package/dist/src/orchestration/application/signal-reactor.d.ts +11 -0
- package/dist/src/orchestration/application/start-workflow.d.ts +18 -0
- package/dist/src/orchestration/application/start-workflow.js +3 -4
- package/dist/src/orchestration/application/trigger-workflow-instance.d.ts +12 -0
- package/dist/src/orchestration/application/trigger-workflow-instance.js +1 -1
- package/dist/src/orchestration/application/watch-child-transitions.d.ts +2 -0
- package/dist/src/orchestration/application/watch-matching.d.ts +13 -0
- package/dist/src/orchestration/application/watch-matching.js +3 -3
- package/dist/src/orchestration/application/watch-reactor.d.ts +42 -0
- package/dist/src/orchestration/application/watch-reactor.js +36 -35
- package/dist/src/orchestration/application/workflow-definition-registry.d.ts +32 -0
- package/dist/src/orchestration/application/workflow-definition-registry.js +13 -11
- package/dist/src/orchestration/contracts/activity-outcome.d.ts +15 -0
- package/dist/src/orchestration/contracts/commands.d.ts +30 -0
- package/dist/src/orchestration/contracts/config.d.ts +356 -0
- package/dist/src/orchestration/contracts/event-decoder.d.ts +262 -0
- package/dist/src/orchestration/contracts/event-decoder.js +88 -64
- package/dist/src/orchestration/contracts/event-factory.d.ts +6 -0
- package/dist/src/orchestration/contracts/event-factory.js +64 -0
- package/dist/src/orchestration/contracts/events.d.ts +233 -0
- package/dist/src/orchestration/contracts/identifiers.d.ts +15 -0
- package/dist/src/orchestration/contracts/streams.d.ts +28 -0
- package/dist/src/orchestration/contracts/views.d.ts +68 -0
- package/dist/src/orchestration/contracts/vocabulary.d.ts +34 -0
- package/dist/src/orchestration/domain/activation-policy.d.ts +60 -0
- package/dist/src/orchestration/domain/activation-policy.js +34 -19
- package/dist/src/orchestration/domain/approval-defaults.d.ts +8 -0
- package/dist/src/orchestration/domain/child-policy.d.ts +20 -0
- package/dist/src/orchestration/domain/compiler.d.ts +3 -0
- package/dist/src/orchestration/domain/coordination-events.d.ts +18 -0
- package/dist/src/orchestration/domain/coordination-events.js +25 -11
- package/dist/src/orchestration/domain/decision-events.d.ts +33 -0
- package/dist/src/orchestration/domain/decision-events.js +26 -15
- package/dist/src/orchestration/domain/interpreter.d.ts +14 -0
- package/dist/src/orchestration/domain/interpreter.js +4 -1
- package/dist/src/orchestration/domain/operator-retry-policy.d.ts +14 -0
- package/dist/src/orchestration/domain/operator-retry-policy.js +29 -11
- package/dist/src/orchestration/domain/resource-transition-compiler.d.ts +8 -0
- package/dist/src/orchestration/domain/retry-policy.d.ts +7 -0
- package/dist/src/orchestration/domain/retry-policy.js +7 -4
- package/dist/src/orchestration/domain/runner-quota-retry-policy.d.ts +10 -0
- package/dist/src/orchestration/domain/runner-quota-retry-policy.js +21 -15
- package/dist/src/orchestration/domain/signal-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/signal-policy.js +18 -7
- package/dist/src/orchestration/domain/supplemental-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/supplemental-policy.js +29 -14
- package/dist/src/orchestration/domain/transition.d.ts +16 -0
- package/dist/src/orchestration/domain/transition.js +46 -28
- package/dist/src/orchestration/domain/workflow-graph.d.ts +4 -0
- package/dist/src/orchestration/domain/workflow-instance-events.d.ts +44 -0
- package/dist/src/orchestration/domain/workflow-instance.d.ts +7 -0
- package/dist/src/orchestration/domain/workflow-instance.js +29 -9
- package/dist/src/orchestration/domain/workflow-selector.d.ts +15 -0
- package/dist/src/orchestration/index.d.ts +27 -0
- package/dist/src/orchestration/index.js +1 -0
- package/dist/src/resources/application/lookup-projections.d.ts +6 -0
- package/dist/src/resources/application/lookup-projections.js +15 -15
- package/dist/src/resources/application/resource-correlation-retry.d.ts +16 -0
- package/dist/src/resources/application/resource-correlation-retry.js +39 -44
- package/dist/src/resources/application/resource-event-support.d.ts +12 -0
- package/dist/src/resources/application/resource-event-support.js +17 -0
- package/dist/src/resources/application/resource-lookup.d.ts +17 -0
- package/dist/src/resources/application/resource-lookup.js +9 -9
- package/dist/src/resources/application/resource-projections.d.ts +4 -0
- package/dist/src/resources/application/resource-projections.js +32 -24
- package/dist/src/resources/application/resource-repository.d.ts +16 -0
- package/dist/src/resources/application/resource-repository.js +3 -3
- package/dist/src/resources/application/resource-service.d.ts +34 -0
- package/dist/src/resources/application/resource-service.js +73 -52
- package/dist/src/resources/contracts/commands.d.ts +23 -0
- package/dist/src/resources/contracts/config.d.ts +3 -0
- package/dist/src/resources/contracts/event-factory.d.ts +6 -0
- package/dist/src/resources/contracts/event-factory.js +32 -0
- package/dist/src/resources/contracts/events.d.ts +79 -0
- package/dist/src/resources/contracts/events.js +94 -102
- package/dist/src/resources/contracts/identifiers.d.ts +7 -0
- package/dist/src/resources/contracts/streams.d.ts +8 -0
- package/dist/src/resources/contracts/views.d.ts +35 -0
- package/dist/src/resources/contracts/vocabulary.d.ts +50 -0
- package/dist/src/resources/domain/correlation.d.ts +6 -0
- package/dist/src/resources/domain/resource.d.ts +8 -0
- package/dist/src/resources/domain/resource.js +24 -21
- package/dist/src/resources/index.d.ts +15 -0
- package/dist/src/resources/index.js +1 -0
- package/dist/src/surfaces/api/contracts/activities.d.ts +1 -0
- package/dist/src/surfaces/api/contracts/board.d.ts +46 -0
- package/dist/src/surfaces/api/contracts/board.js +1 -1
- package/dist/src/surfaces/api/contracts/common.d.ts +43 -0
- package/dist/src/surfaces/api/contracts/control-plane.d.ts +37 -0
- package/dist/src/surfaces/api/contracts/events.d.ts +13 -0
- package/dist/src/surfaces/api/contracts/execution.d.ts +67 -0
- package/dist/src/surfaces/api/contracts/index.d.ts +14 -0
- package/dist/src/surfaces/api/contracts/observability.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/orchestration.d.ts +16 -0
- package/dist/src/surfaces/api/contracts/resources.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/status.d.ts +4 -0
- package/dist/src/surfaces/api/contracts/system.d.ts +32 -0
- package/dist/src/surfaces/api/contracts/transport-values.d.ts +50 -0
- package/dist/src/surfaces/api/contracts/transport-values.js +6 -0
- package/dist/src/surfaces/api/contracts/work.d.ts +74 -0
- package/dist/src/surfaces/api/contracts/workflow-diagram.d.ts +64 -0
- package/dist/src/surfaces/api/http-server.d.ts +33 -0
- package/dist/src/surfaces/api/http-server.js +2 -2
- package/dist/src/surfaces/api/presenters/activities.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/board.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/events.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/execution.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/execution.js +5 -2
- package/dist/src/surfaces/api/presenters/observability.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/orchestration.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/resources.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/status.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/system.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/work.d.ts +4 -0
- package/dist/src/surfaces/api/problem-details.d.ts +2 -0
- package/dist/src/surfaces/api/router.d.ts +8 -0
- package/dist/src/surfaces/api/routes/activities.d.ts +1 -0
- package/dist/src/surfaces/api/routes/applications.d.ts +88 -0
- package/dist/src/surfaces/api/routes/commands.d.ts +3 -0
- package/dist/src/surfaces/api/routes/commands.js +1 -3
- package/dist/src/surfaces/api/routes/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/routes/control-plane.js +0 -1
- package/dist/src/surfaces/api/routes/events.d.ts +1 -0
- package/dist/src/surfaces/api/routes/execution.d.ts +1 -0
- package/dist/src/surfaces/api/routes/index.d.ts +4 -0
- package/dist/src/surfaces/api/routes/observability.d.ts +1 -0
- package/dist/src/surfaces/api/routes/orchestration.d.ts +1 -0
- package/dist/src/surfaces/api/routes/pagination.d.ts +5 -0
- package/dist/src/surfaces/api/routes/read.d.ts +3 -0
- package/dist/src/surfaces/api/routes/resources.d.ts +1 -0
- package/dist/src/surfaces/api/routes/responses.d.ts +15 -0
- package/dist/src/surfaces/api/routes/system.d.ts +1 -0
- package/dist/src/surfaces/api/routes/work.d.ts +1 -0
- package/dist/src/surfaces/auth/credentials.d.ts +22 -0
- package/dist/src/surfaces/auth/credentials.js +8 -12
- package/dist/src/surfaces/auth/vocabulary.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/api.d.ts +4 -0
- package/dist/src/surfaces/cli/commands/audit.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/audit.js +11 -2
- package/dist/src/surfaces/cli/commands/correlate.d.ts +7 -0
- package/dist/src/surfaces/cli/commands/doctor.d.ts +24 -0
- package/dist/src/surfaces/cli/commands/init.d.ts +2 -0
- package/dist/src/surfaces/cli/commands/sandbox-entrypoint.d.ts +43 -0
- package/dist/src/surfaces/cli/commands/sandbox-setup.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/sandbox.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/self-update.d.ts +15 -0
- package/dist/src/surfaces/cli/commands/smoke.d.ts +14 -0
- package/dist/src/surfaces/cli/commands/start.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/stop.d.ts +11 -0
- package/dist/src/surfaces/cli/commands/tick.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/ui.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/validate-state.d.ts +13 -0
- package/dist/src/surfaces/cli/infrastructure/docker-cli.d.ts +66 -0
- package/dist/src/surfaces/cli/infrastructure/docker-invocation.d.ts +14 -0
- package/dist/src/surfaces/cli/infrastructure/process-log.d.ts +35 -0
- package/dist/src/surfaces/cli/infrastructure/resident-start.d.ts +10 -0
- package/dist/src/surfaces/cli/main.d.ts +115 -0
- package/dist/src/surfaces/cli/usage.d.ts +1 -0
- package/dist/src/surfaces/contracts/config.d.ts +51 -0
- package/dist/src/surfaces/index.d.ts +49 -0
- package/dist/src/surfaces/web-assets/assets/index-D9xGa5tD.css +1 -0
- package/dist/src/surfaces/web-assets/assets/index-qai1Ymhv.js +1179 -0
- package/dist/src/surfaces/web-assets/index.html +2 -2
- package/dist/src/surfaces/web-host/asset-source.d.ts +9 -0
- package/dist/src/surfaces/web-host/packaged-assets.d.ts +8 -0
- package/dist/src/work/application/work-projection.d.ts +3 -0
- package/dist/src/work/application/work-projection.js +4 -4
- package/dist/src/work/application/work-repository.d.ts +15 -0
- package/dist/src/work/application/work-repository.js +2 -2
- package/dist/src/work/application/work-service.d.ts +18 -0
- package/dist/src/work/application/work-service.js +70 -31
- package/dist/src/work/contracts/commands.d.ts +15 -0
- package/dist/src/work/contracts/config.d.ts +3 -0
- package/dist/src/work/contracts/event-factory.d.ts +6 -0
- package/dist/src/work/contracts/event-factory.js +26 -0
- package/dist/src/work/contracts/events.d.ts +46 -0
- package/dist/src/work/contracts/events.js +54 -60
- package/dist/src/work/contracts/identifiers.d.ts +3 -0
- package/dist/src/work/contracts/streams.d.ts +8 -0
- package/dist/src/work/contracts/views.d.ts +18 -0
- package/dist/src/work/contracts/vocabulary.d.ts +7 -0
- package/dist/src/work/domain/work-item.d.ts +3 -0
- package/dist/src/work/domain/work-item.js +10 -7
- package/dist/src/work/index.d.ts +12 -0
- package/dist/src/work/index.js +1 -0
- package/docker/Dockerfile +9 -7
- package/docker/Dockerfile.packaged +4 -6
- package/package.json +24 -24
- package/dist/src/activities/pr/event-drafts.js +0 -66
- package/dist/src/kernel/contracts/events.js +0 -11
- package/dist/src/kernel/infrastructure/cached-journal-view.js +0 -27
- package/dist/src/persistence/application/projection-runner.js +0 -128
- package/dist/src/persistence/filesystem/file-checkpoint-store.js +0 -50
- package/dist/src/persistence/filesystem/file-projection-store.js +0 -137
- package/dist/src/persistence/index.js +0 -8
- package/dist/src/persistence/memory/in-memory-event-journal.js +0 -99
- package/dist/src/surfaces/web-assets/assets/index-B0ofn_L5.css +0 -1
- package/dist/src/surfaces/web-assets/assets/index-DFBhpSSX.js +0 -1179
- /package/dist/src/control-plane/application/{advance-once-ports.js → activation-scheduler-ports.js} +0 -0
- /package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/commands.js +0 -0
- /package/dist/src/{kernel/contracts/checkpoint-store.js → node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.js} +0 -0
- /package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-checkpoint-store.js +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/projections}/projection-store.js +0 -0
- /package/dist/src/{kernel/contracts/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/runtime/clock.js} +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/store}/event-journal.js +0 -0
|
@@ -1,40 +1,61 @@
|
|
|
1
|
-
import { EventActorKind } from '
|
|
1
|
+
import { EventActorKind } from '@atolis-hq/eventing';
|
|
2
2
|
import { ExecutionEventType } from '../contracts/events.js';
|
|
3
|
-
import { ExecutionFailureCode, RunStatus } from '../contracts/vocabulary.js';
|
|
3
|
+
import { ExecutionFailureCode, isActiveRunStatus, RunStatus } from '../contracts/vocabulary.js';
|
|
4
4
|
export function foldRun(events) {
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
5
|
+
const creation = events[0];
|
|
6
|
+
if (creation === undefined)
|
|
7
7
|
return null;
|
|
8
|
+
const creationEvent = creation.event;
|
|
9
|
+
if (creationEvent.eventType !== ExecutionEventType.RunPreparationStarted &&
|
|
10
|
+
creationEvent.eventType !== ExecutionEventType.RunStarted)
|
|
11
|
+
throw invalidRunStream(creation.stream.id, 'first event must create the run');
|
|
12
|
+
for (const event of events.slice(1))
|
|
13
|
+
if (event.event.eventType === ExecutionEventType.RunPreparationStarted)
|
|
14
|
+
throw invalidRunStream(creation.stream.id, 'RunPreparationStarted must be the first event');
|
|
15
|
+
const startedFromPreparation = creationEvent.eventType === ExecutionEventType.RunPreparationStarted;
|
|
8
16
|
const state = {
|
|
9
|
-
runId:
|
|
10
|
-
activationId:
|
|
11
|
-
activity:
|
|
12
|
-
...(
|
|
13
|
-
workflowInstanceId:
|
|
14
|
-
orchestrationGroupId:
|
|
15
|
-
attempt:
|
|
16
|
-
status: RunStatus.Started,
|
|
17
|
+
runId: creation.stream.id,
|
|
18
|
+
activationId: creationEvent.payload.activationId,
|
|
19
|
+
activity: creationEvent.payload.activity,
|
|
20
|
+
...(creationEvent.payload.stage === undefined ? {} : { stage: creationEvent.payload.stage }),
|
|
21
|
+
workflowInstanceId: creationEvent.payload.workflowInstanceId,
|
|
22
|
+
orchestrationGroupId: creationEvent.payload.orchestrationGroupId,
|
|
23
|
+
attempt: creationEvent.payload.attempt,
|
|
24
|
+
status: startedFromPreparation ? RunStatus.Starting : RunStatus.Started,
|
|
17
25
|
ambiguityAttempts: 0,
|
|
18
26
|
escalated: false,
|
|
19
|
-
startedAt:
|
|
20
|
-
...(
|
|
21
|
-
...(
|
|
27
|
+
startedAt: creationEvent.payload.startedAt,
|
|
28
|
+
...(startedFromPreparation ? {} : { executionStartedAt: creationEvent.payload.startedAt }),
|
|
29
|
+
...(creationEvent.payload.runner === undefined ? {} : { runner: creationEvent.payload.runner }),
|
|
30
|
+
...creationWorkspace(creationEvent),
|
|
22
31
|
};
|
|
23
|
-
for (const event of events)
|
|
24
|
-
applyRunEvent(state, event);
|
|
32
|
+
for (const event of events.slice(1))
|
|
33
|
+
applyRunEvent(state, event.event);
|
|
25
34
|
return state;
|
|
26
35
|
}
|
|
36
|
+
function creationWorkspace(event) {
|
|
37
|
+
if (event.eventType !== ExecutionEventType.RunStarted || event.payload.workspace === undefined)
|
|
38
|
+
return {};
|
|
39
|
+
return { workspace: event.payload.workspace };
|
|
40
|
+
}
|
|
27
41
|
function applyRunEvent(state, event) {
|
|
28
|
-
if (state.status
|
|
29
|
-
if (state
|
|
30
|
-
event.actor.kind === EventActorKind.Operator &&
|
|
31
|
-
(event.eventType === ExecutionEventType.RunSucceeded ||
|
|
32
|
-
event.eventType === ExecutionEventType.RunFailed))
|
|
42
|
+
if (!isActiveRunStatus(state.status)) {
|
|
43
|
+
if (isOperatorAmbiguousTerminalEvent(state, event))
|
|
33
44
|
return applyTerminalEvent(state, event);
|
|
34
45
|
return;
|
|
35
46
|
}
|
|
36
47
|
switch (event.eventType) {
|
|
48
|
+
case ExecutionEventType.RunPreparationStarted:
|
|
49
|
+
throw invalidRunStream(state.runId, 'RunPreparationStarted must be the first event');
|
|
37
50
|
case ExecutionEventType.RunStarted:
|
|
51
|
+
if (state.status !== RunStatus.Starting)
|
|
52
|
+
throw invalidRunStream(state.runId, 'RunStarted is only valid while starting');
|
|
53
|
+
validateRunStart(state, event);
|
|
54
|
+
Object.assign(state, {
|
|
55
|
+
status: RunStatus.Started,
|
|
56
|
+
executionStartedAt: event.payload.startedAt,
|
|
57
|
+
...(event.payload.workspace === undefined ? {} : { workspace: event.payload.workspace }),
|
|
58
|
+
});
|
|
38
59
|
return;
|
|
39
60
|
case ExecutionEventType.RunSucceeded:
|
|
40
61
|
case ExecutionEventType.RunFailed:
|
|
@@ -44,6 +65,32 @@ function applyRunEvent(state, event) {
|
|
|
44
65
|
return applyLivenessEvent(state, event);
|
|
45
66
|
}
|
|
46
67
|
}
|
|
68
|
+
function isOperatorAmbiguousTerminalEvent(state, event) {
|
|
69
|
+
return (state.status === RunStatus.Ambiguous &&
|
|
70
|
+
event.actor.kind === EventActorKind.Operator &&
|
|
71
|
+
(event.eventType === ExecutionEventType.RunSucceeded ||
|
|
72
|
+
event.eventType === ExecutionEventType.RunFailed));
|
|
73
|
+
}
|
|
74
|
+
function validateRunStart(state, event) {
|
|
75
|
+
validateRunStartField(state.runId, state.activationId, event.payload.activationId, 'activationId');
|
|
76
|
+
validateRunStartField(state.runId, state.activity, event.payload.activity, 'activity');
|
|
77
|
+
validateRunStartField(state.runId, state.stage, event.payload.stage, runStartField.Stage);
|
|
78
|
+
validateRunStartField(state.runId, state.workflowInstanceId, event.payload.workflowInstanceId, 'workflowInstanceId');
|
|
79
|
+
validateRunStartField(state.runId, state.orchestrationGroupId, event.payload.orchestrationGroupId, 'orchestrationGroupId');
|
|
80
|
+
validateRunStartField(state.runId, state.attempt, event.payload.attempt, 'attempt');
|
|
81
|
+
if (!sameRunner(state.runner, event.payload.runner))
|
|
82
|
+
throw invalidRunStream(state.runId, 'RunStarted contradicts RunPreparationStarted runner');
|
|
83
|
+
}
|
|
84
|
+
const runStartFieldShape = { stage: true };
|
|
85
|
+
const runStartField = { Stage: Object.keys(runStartFieldShape)[0] };
|
|
86
|
+
function validateRunStartField(runId, actual, expected, field) {
|
|
87
|
+
if (actual !== expected)
|
|
88
|
+
throw invalidRunStream(runId, `RunStarted contradicts RunPreparationStarted ${field}`);
|
|
89
|
+
}
|
|
90
|
+
function sameRunner(left, right) {
|
|
91
|
+
return runnerFields.every((field) => left?.[field] === right?.[field]);
|
|
92
|
+
}
|
|
93
|
+
const runnerFields = ['name', 'model', 'effort', 'pool', 'cli'];
|
|
47
94
|
function applyTerminalEvent(state, event) {
|
|
48
95
|
if (event.eventType === ExecutionEventType.RunSucceeded) {
|
|
49
96
|
Object.assign(state, {
|
|
@@ -140,3 +187,6 @@ function recoveredState(result, finishedAt, outcome) {
|
|
|
140
187
|
function assertNever(value) {
|
|
141
188
|
throw new Error(`Unhandled Execution event: ${JSON.stringify(value)}`);
|
|
142
189
|
}
|
|
190
|
+
function invalidRunStream(runId, message) {
|
|
191
|
+
return new Error(`Invalid Run stream ${runId}: ${message}`);
|
|
192
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from './application/execution-projection.js';
|
|
2
|
+
export * from './application/execution-service.js';
|
|
3
|
+
export * from './application/activation-claim.js';
|
|
4
|
+
export * from './application/recovery-service.js';
|
|
5
|
+
export * from './application/run-repository.js';
|
|
6
|
+
export * from './contracts/commands.js';
|
|
7
|
+
export * from './contracts/config.js';
|
|
8
|
+
export * from './contracts/control-plane.js';
|
|
9
|
+
export * from './contracts/event-factory.js';
|
|
10
|
+
export * from './contracts/events.js';
|
|
11
|
+
export * from './contracts/identifiers.js';
|
|
12
|
+
export * from './contracts/liveness.js';
|
|
13
|
+
export * from './contracts/runner.js';
|
|
14
|
+
export * from './contracts/results.js';
|
|
15
|
+
export * from './contracts/streams.js';
|
|
16
|
+
export * from './contracts/views.js';
|
|
17
|
+
export * from './contracts/vocabulary.js';
|
|
18
|
+
export * from './contracts/workspace.js';
|
|
19
|
+
export * from './domain/run-result.js';
|
|
20
|
+
export * from './domain/run.js';
|
|
21
|
+
export * from './infrastructure/prompt-templates.js';
|
|
22
|
+
export * from './infrastructure/runners/claude.js';
|
|
23
|
+
export * from './infrastructure/runners/codex.js';
|
|
24
|
+
export * from './infrastructure/codex-stop-hook.js';
|
|
25
|
+
export * from './infrastructure/runners/command.js';
|
|
26
|
+
export * from './infrastructure/runners/cursor.js';
|
|
27
|
+
export * from './infrastructure/runners/fake.js';
|
|
28
|
+
export * from './infrastructure/runners/fake-scenarios.js';
|
|
29
|
+
export * from './infrastructure/runners/registry.js';
|
|
30
|
+
export * from './infrastructure/runner-memory-profile.js';
|
|
31
|
+
export * from './infrastructure/transcripts.js';
|
|
32
|
+
export * from './infrastructure/transcript-store.js';
|
|
33
|
+
export * from './infrastructure/workspace/fake-workspace.js';
|
|
34
|
+
export * from './infrastructure/workspace/git-workspace.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const waitBackgroundStatus = "WAIT_BACKGROUND";
|
|
2
|
+
export interface CodexStopHookDecision {
|
|
3
|
+
readonly decision?: 'block';
|
|
4
|
+
readonly reason?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* WAIT_BACKGROUND is a Codex-only, intermediate final response. It is not a
|
|
8
|
+
* Wake outcome: the hook rejects it and gives Codex another turn to obtain a
|
|
9
|
+
* terminal result before it reports DONE, BLOCKED, NEEDS_CLARIFICATION, or
|
|
10
|
+
* FAILED.
|
|
11
|
+
*/
|
|
12
|
+
export declare function inspectCodexTranscript(transcript: string): CodexStopHookDecision;
|
|
13
|
+
export declare function runCodexStopHook(input: unknown): Promise<CodexStopHookDecision>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ProcessTimeouts {
|
|
2
|
+
readonly idleMs?: number;
|
|
3
|
+
readonly hardMs?: number;
|
|
4
|
+
readonly cancellationGraceMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ProcessExecutionOptions extends ProcessTimeouts {
|
|
7
|
+
readonly onTimeout?: (kind: 'idle' | 'hard') => void | Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface ProcessExecutionResult {
|
|
10
|
+
readonly stdout: string;
|
|
11
|
+
readonly stderr: string;
|
|
12
|
+
/** Raw stdout and stderr chunks in the order they were received. */
|
|
13
|
+
readonly combinedOutput: Buffer;
|
|
14
|
+
readonly exitCode: number | undefined;
|
|
15
|
+
readonly timedOut: boolean;
|
|
16
|
+
readonly timeoutKind?: 'idle' | 'hard';
|
|
17
|
+
readonly failureKind?: 'output-limit';
|
|
18
|
+
readonly failureMessage?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function runProcess(command: string, args: readonly string[], cwd: string | undefined, signal: AbortSignal, options?: ProcessExecutionOptions, shell?: boolean): {
|
|
21
|
+
readonly result: Promise<ProcessExecutionResult>;
|
|
22
|
+
cancel(): Promise<void>;
|
|
23
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const frontmatterSchema: z.ZodObject<{
|
|
3
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
6
|
+
extraArgs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export interface PromptTemplate {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly body: string;
|
|
11
|
+
readonly frontmatter: z.infer<typeof frontmatterSchema>;
|
|
12
|
+
}
|
|
13
|
+
export declare function renderPromptTemplate(template: PromptTemplate, context: Readonly<Record<string, unknown>>): string;
|
|
14
|
+
export declare function loadPromptTemplate(wakeRoot: string, name: string): Promise<PromptTemplate>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Runner } from '../contracts/runner.js';
|
|
2
|
+
export interface RunnerMemoryProfileOptions {
|
|
3
|
+
readonly write: (line: string) => void;
|
|
4
|
+
readonly now: () => string;
|
|
5
|
+
readonly memoryUsage: () => NodeJS.MemoryUsage;
|
|
6
|
+
}
|
|
7
|
+
export interface RuntimeMemoryProfile {
|
|
8
|
+
sample(phase: string): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createRuntimeMemoryProfile(options: RunnerMemoryProfileOptions): RuntimeMemoryProfile;
|
|
11
|
+
export declare function createRunnerMemoryProfileDecorator(options: RunnerMemoryProfileOptions): (runner: Runner, name: string) => Runner;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AgentRunnerResult, Runner, RunnerRequest } from '../../contracts/runner.js';
|
|
2
|
+
import { type ProcessTimeouts } from '../process-execution.js';
|
|
3
|
+
export declare function createClaudeRunner(options?: CliRunnerOptions): Runner;
|
|
4
|
+
export declare function parseClaudeOutput(stdout: string, _request?: RunnerRequest): Partial<AgentRunnerResult>;
|
|
5
|
+
export declare function classifyClaudeFailure(input: {
|
|
6
|
+
readonly stdout: string;
|
|
7
|
+
readonly stderr: string;
|
|
8
|
+
}): {
|
|
9
|
+
readonly kind: string;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
export declare function claudeCommandArgs(request: RunnerRequest, passthroughArgs?: readonly string[], defaults?: RunnerDefaults): string[];
|
|
13
|
+
export declare function cliRunner(name: string, command: string, args: (request: RunnerRequest) => string[], options?: {
|
|
14
|
+
readonly runnerTimeouts?: ProcessTimeouts;
|
|
15
|
+
readonly defaultModel?: string;
|
|
16
|
+
readonly supportsSessionResume?: boolean;
|
|
17
|
+
readonly parseSuccessfulOutput?: (stdout: string, request: RunnerRequest) => Partial<AgentRunnerResult>;
|
|
18
|
+
readonly classifyFailure?: (input: {
|
|
19
|
+
readonly stdout: string;
|
|
20
|
+
readonly stderr: string;
|
|
21
|
+
}) => {
|
|
22
|
+
readonly kind: string;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
} | undefined;
|
|
25
|
+
}): Runner;
|
|
26
|
+
export interface RunnerDefaults {
|
|
27
|
+
readonly model?: string;
|
|
28
|
+
readonly effort?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CliRunnerOptions extends RunnerDefaults {
|
|
31
|
+
readonly command?: string;
|
|
32
|
+
readonly runnerTimeouts?: ProcessTimeouts;
|
|
33
|
+
readonly args?: readonly string[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentRunnerResult, Runner, RunnerRequest } from '../../contracts/runner.js';
|
|
2
|
+
import { type CliRunnerOptions, type RunnerDefaults } from './claude.js';
|
|
3
|
+
export declare function classifyCodexFailure(input: {
|
|
4
|
+
readonly stdout: string;
|
|
5
|
+
readonly stderr: string;
|
|
6
|
+
}): {
|
|
7
|
+
readonly kind: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export type CodexRunnerOptions = CliRunnerOptions;
|
|
11
|
+
export declare function createCodexRunner(options?: CodexRunnerOptions): Runner;
|
|
12
|
+
export declare function codexCommandArgs(request: RunnerRequest, passthroughArgs?: readonly string[], defaults?: RunnerDefaults): string[];
|
|
13
|
+
export declare function parseCodexOutput(stdout: string, request?: RunnerRequest): Partial<AgentRunnerResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentRunnerResult, Runner, RunnerRequest } from '../../contracts/runner.js';
|
|
2
|
+
import { type CliRunnerOptions, type RunnerDefaults } from './claude.js';
|
|
3
|
+
export declare function classifyCursorFailure(input: {
|
|
4
|
+
readonly stdout: string;
|
|
5
|
+
readonly stderr: string;
|
|
6
|
+
}): {
|
|
7
|
+
readonly kind: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export declare function createCursorRunner(options?: CliRunnerOptions): Runner;
|
|
11
|
+
export declare function cursorCommandArgs(request: RunnerRequest, passthroughArgs?: readonly string[], defaults?: RunnerDefaults): string[];
|
|
12
|
+
export declare function parseCursorOutput(stdout: string): Partial<AgentRunnerResult>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RetrySafety } from '../../../activities/index.js';
|
|
3
|
+
declare const outcomeSchema: z.ZodEnum<{
|
|
4
|
+
DONE: "DONE";
|
|
5
|
+
REJECTED: "REJECTED";
|
|
6
|
+
BLOCKED: "BLOCKED";
|
|
7
|
+
NEEDS_CLARIFICATION: "NEEDS_CLARIFICATION";
|
|
8
|
+
FAILED: "FAILED";
|
|
9
|
+
}>;
|
|
10
|
+
export interface FakeScenarioMatch {
|
|
11
|
+
readonly runner: string;
|
|
12
|
+
readonly workflow?: string;
|
|
13
|
+
readonly action: string;
|
|
14
|
+
readonly occurrence: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ResolvedFakeScenario {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly delayMs: number;
|
|
19
|
+
readonly outcome: z.output<typeof outcomeSchema>;
|
|
20
|
+
readonly retrySafety?: typeof RetrySafety.SafeToRetry;
|
|
21
|
+
readonly displayBody?: string;
|
|
22
|
+
readonly reportedArtifacts?: readonly {
|
|
23
|
+
readonly kind: string;
|
|
24
|
+
readonly externalKey: {
|
|
25
|
+
readonly adapter: string;
|
|
26
|
+
readonly key: string;
|
|
27
|
+
};
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
export interface FakeScenarioResolver {
|
|
31
|
+
resolve(input: FakeScenarioMatch): ResolvedFakeScenario | undefined;
|
|
32
|
+
}
|
|
33
|
+
export declare const emptyFakeScenarios: FakeScenarioResolver;
|
|
34
|
+
export declare function parseFakeScenarios(value: unknown): FakeScenarioResolver;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Runner, RunnerExecution, RunnerRequest } from '../../contracts/runner.js';
|
|
2
|
+
import { type FakeScenarioResolver } from './fake-scenarios.js';
|
|
3
|
+
export declare class FakeExecutionRunner implements Runner {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
private readonly scenarios;
|
|
6
|
+
constructor(name?: string, scenarios?: FakeScenarioResolver);
|
|
7
|
+
start(request: RunnerRequest, signal: AbortSignal): Promise<RunnerExecution>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Runner } from '../../contracts/runner.js';
|
|
2
|
+
export declare class NoEligibleRunnerError extends Error {
|
|
3
|
+
readonly runnerPool: string;
|
|
4
|
+
constructor(runnerPool: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class RunnerRegistry {
|
|
7
|
+
private readonly runnerPools;
|
|
8
|
+
private readonly runners;
|
|
9
|
+
constructor(runnerPools: Readonly<Record<string, readonly string[]>>, runners: Readonly<Record<string, Runner>>);
|
|
10
|
+
resolve(runnerPool: string, ineligible?: ReadonlySet<string>): {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly runner: Runner;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type TranscriptGroupKind as TranscriptGroupKindValue } from '../contracts/vocabulary.js';
|
|
2
|
+
export interface TranscriptCapture {
|
|
3
|
+
readonly workItemId: string;
|
|
4
|
+
readonly runId: string;
|
|
5
|
+
readonly cli: string;
|
|
6
|
+
readonly timestamp: string;
|
|
7
|
+
readonly text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TranscriptResponseCapture extends TranscriptCapture {
|
|
10
|
+
readonly sessionId?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export type TranscriptPromptFinalisation = Omit<TranscriptCapture, 'text'>;
|
|
13
|
+
export interface TranscriptGroup {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly kind: TranscriptGroupKindValue;
|
|
16
|
+
readonly cli?: string;
|
|
17
|
+
readonly latestAt: string;
|
|
18
|
+
readonly runIds: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
export interface TranscriptMessage {
|
|
21
|
+
readonly timestamp: string;
|
|
22
|
+
readonly runId: string;
|
|
23
|
+
readonly kind: 'prompt' | 'response';
|
|
24
|
+
readonly text: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TranscriptStoreFileSystem {
|
|
27
|
+
remove(path: string, options: {
|
|
28
|
+
readonly recursive: true;
|
|
29
|
+
readonly force: true;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare class TranscriptStore {
|
|
33
|
+
private readonly transcriptsRoot;
|
|
34
|
+
private readonly fileSystem;
|
|
35
|
+
constructor(transcriptsRoot: string, fileSystem?: TranscriptStoreFileSystem);
|
|
36
|
+
capturePrompt(capture: TranscriptCapture): Promise<void>;
|
|
37
|
+
captureResponse(capture: TranscriptResponseCapture): Promise<void>;
|
|
38
|
+
finalisePrompt(capture: TranscriptPromptFinalisation): Promise<void>;
|
|
39
|
+
listGroups(workItemId: string): Promise<readonly TranscriptGroup[]>;
|
|
40
|
+
readGroup(workItemId: string, groupId: string): Promise<readonly TranscriptMessage[]>;
|
|
41
|
+
groupForRun(workItemId: string, runId: string): Promise<string | undefined>;
|
|
42
|
+
markWorkItemCleaned(workItemId: string, retentionMs: number, cleanedAt: string): Promise<void>;
|
|
43
|
+
sweepExpired(retentionMs: number, now: string, onError?: (workItemId: string, error: unknown) => void): Promise<readonly string[]>;
|
|
44
|
+
private workItemDirectory;
|
|
45
|
+
private groupDirectory;
|
|
46
|
+
private stagingDirectory;
|
|
47
|
+
private moveStagedPrompt;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function writeTranscript(directory: string, runId: string, kind: 'prompt' | 'response', text: string): Promise<string>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { WorkspaceProvider, WorkspaceRequest } from '../../contracts/workspace.js';
|
|
2
|
+
export type FakeWorkspacePrepareOutcome = {
|
|
3
|
+
readonly kind: 'success';
|
|
4
|
+
} | {
|
|
5
|
+
readonly kind: 'exit';
|
|
6
|
+
readonly exitCode: number;
|
|
7
|
+
readonly stdout?: string;
|
|
8
|
+
readonly stderr?: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'timed-out';
|
|
11
|
+
readonly stdout?: string;
|
|
12
|
+
readonly stderr?: string;
|
|
13
|
+
};
|
|
14
|
+
export interface FakeWorkspacePrepareHook {
|
|
15
|
+
readonly command: string;
|
|
16
|
+
readonly timeoutMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class FakeWorkspaceProvider implements WorkspaceProvider {
|
|
19
|
+
private readonly path;
|
|
20
|
+
private readonly branch;
|
|
21
|
+
private readonly prepareHook?;
|
|
22
|
+
private readonly prepareOutcome;
|
|
23
|
+
readonly requests: WorkspaceRequest[];
|
|
24
|
+
readonly prepareInvocations: {
|
|
25
|
+
readonly command: string;
|
|
26
|
+
readonly cwd: string;
|
|
27
|
+
}[];
|
|
28
|
+
constructor(path?: string, branch?: string | undefined, prepareHook?: FakeWorkspacePrepareHook | undefined, prepareOutcome?: FakeWorkspacePrepareOutcome);
|
|
29
|
+
acquire(request: WorkspaceRequest): Promise<{
|
|
30
|
+
mode: "read-only" | "branch";
|
|
31
|
+
release: () => Promise<void>;
|
|
32
|
+
branch?: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
path: string;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -12,6 +12,7 @@ export class FakeWorkspaceProvider {
|
|
|
12
12
|
this.prepareOutcome = prepareOutcome;
|
|
13
13
|
}
|
|
14
14
|
async acquire(request) {
|
|
15
|
+
request.signal.throwIfAborted();
|
|
15
16
|
this.requests.push(request);
|
|
16
17
|
if (this.prepareHook !== undefined) {
|
|
17
18
|
this.prepareInvocations.push({ command: this.prepareHook.command, cwd: this.path });
|
|
@@ -20,6 +21,7 @@ export class FakeWorkspaceProvider {
|
|
|
20
21
|
if (this.prepareOutcome.kind === 'exit' && this.prepareOutcome.exitCode !== 0)
|
|
21
22
|
throw new Error(`Fake workspace prepare hook (${this.prepareHook.command}) exited with code ${this.prepareOutcome.exitCode}`);
|
|
22
23
|
}
|
|
24
|
+
request.signal.throwIfAborted();
|
|
23
25
|
return {
|
|
24
26
|
workspaceId: `workspace-${this.requests.length}`,
|
|
25
27
|
path: this.path,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { WorkItemId } from '../../../work/index.js';
|
|
2
|
+
import type { RunView } from '../../contracts/views.js';
|
|
3
|
+
import type { WorkspaceProvider, WorkspaceRecovery, WorkspaceRecoveryOptions, WorkspaceRecoveryResult, WorkspaceRequest } from '../../contracts/workspace.js';
|
|
4
|
+
import { type WorkspacePrepareHook } from './prepare-workspace.js';
|
|
5
|
+
export interface RepositoryCloneResolver {
|
|
6
|
+
cloneLocator(resourceId: string, signal: AbortSignal): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export type GitRunner = (arguments_: readonly string[], signal: AbortSignal) => Promise<void>;
|
|
9
|
+
export interface WorkspaceRecoveryFileSystem {
|
|
10
|
+
remove(path: string): Promise<void>;
|
|
11
|
+
canonicalize(path: string): Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare class GitWorkspaceProvider implements WorkspaceProvider, WorkspaceRecovery {
|
|
14
|
+
private readonly root;
|
|
15
|
+
private readonly resolver;
|
|
16
|
+
private readonly git;
|
|
17
|
+
private readonly prepareHook?;
|
|
18
|
+
private readonly markerRoot;
|
|
19
|
+
private readonly recoveryFileSystem;
|
|
20
|
+
constructor(root: string, resolver: RepositoryCloneResolver, git?: GitRunner, recoveryFileSystem?: WorkspaceRecoveryFileSystem, prepareHook?: WorkspacePrepareHook);
|
|
21
|
+
acquire(request: WorkspaceRequest): Promise<{
|
|
22
|
+
release: () => Promise<void>;
|
|
23
|
+
branch?: WorkItemId;
|
|
24
|
+
workspaceId: string;
|
|
25
|
+
path: string;
|
|
26
|
+
mode: "read-only" | "branch";
|
|
27
|
+
}>;
|
|
28
|
+
recover(runs: readonly RunView[], options?: WorkspaceRecoveryOptions): Promise<WorkspaceRecoveryResult>;
|
|
29
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
1
2
|
import { execFile } from 'node:child_process';
|
|
2
3
|
import { access, mkdir, readdir, readFile, realpath, rm, writeFile } from 'node:fs/promises';
|
|
3
4
|
import { basename, dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
4
5
|
import { promisify } from 'node:util';
|
|
5
|
-
import { RunStatus, WorkspaceMode } from '../../contracts/vocabulary.js';
|
|
6
|
+
import { isActiveRunStatus, RunStatus, WorkspaceMode } from '../../contracts/vocabulary.js';
|
|
6
7
|
import { prepareWorkspace } from './prepare-workspace.js';
|
|
7
8
|
const exec = promisify(execFile);
|
|
8
9
|
export class GitWorkspaceProvider {
|
|
@@ -12,8 +13,8 @@ export class GitWorkspaceProvider {
|
|
|
12
13
|
prepareHook;
|
|
13
14
|
markerRoot;
|
|
14
15
|
recoveryFileSystem;
|
|
15
|
-
constructor(root, resolver, git = async (arguments_) => {
|
|
16
|
-
await exec('git', arguments_);
|
|
16
|
+
constructor(root, resolver, git = async (arguments_, signal) => {
|
|
17
|
+
await exec('git', arguments_, { signal });
|
|
17
18
|
}, recoveryFileSystem = {
|
|
18
19
|
remove: async (path) => rm(path, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 }),
|
|
19
20
|
canonicalize: realpath,
|
|
@@ -26,11 +27,15 @@ export class GitWorkspaceProvider {
|
|
|
26
27
|
this.recoveryFileSystem = recoveryFileSystem;
|
|
27
28
|
}
|
|
28
29
|
async acquire(request) {
|
|
29
|
-
const
|
|
30
|
+
const { signal } = request;
|
|
31
|
+
signal.throwIfAborted();
|
|
32
|
+
const locator = await this.resolver.cloneLocator(request.repositoryResource.resourceId, signal);
|
|
33
|
+
signal.throwIfAborted();
|
|
30
34
|
const name = `${request.workItemId}-${request.mode}-${slug(locator)}`;
|
|
31
35
|
const path = resolve(this.root, name);
|
|
32
36
|
const markerPath = join(this.markerRoot, `${name}.json`);
|
|
33
37
|
await mkdir(dirname(markerPath), { recursive: true });
|
|
38
|
+
signal.throwIfAborted();
|
|
34
39
|
await writeFile(markerPath, JSON.stringify({
|
|
35
40
|
runId: request.runId,
|
|
36
41
|
workItemId: request.workItemId,
|
|
@@ -38,17 +43,19 @@ export class GitWorkspaceProvider {
|
|
|
38
43
|
mode: request.mode,
|
|
39
44
|
workspaceId: name,
|
|
40
45
|
path,
|
|
41
|
-
}), 'utf8');
|
|
42
|
-
const existingWorkspace = await exists(join(path, '.git'));
|
|
46
|
+
}), { encoding: 'utf8', signal });
|
|
47
|
+
const existingWorkspace = await exists(join(path, '.git'), signal);
|
|
43
48
|
if (!existingWorkspace) {
|
|
44
49
|
await mkdir(dirname(path), { recursive: true });
|
|
45
|
-
|
|
50
|
+
signal.throwIfAborted();
|
|
51
|
+
await this.git(['clone', locator, path], signal);
|
|
46
52
|
}
|
|
47
53
|
const branch = request.mode === WorkspaceMode.Branch ? request.workItemId : undefined;
|
|
48
54
|
if (branch !== undefined)
|
|
49
|
-
await this.git(['-C', path, 'switch', ...(existingWorkspace ? [] : ['--create']), branch]);
|
|
55
|
+
await this.git(['-C', path, 'switch', ...(existingWorkspace ? [] : ['--create']), branch], signal);
|
|
50
56
|
if (this.prepareHook !== undefined)
|
|
51
|
-
await prepareWorkspace(path, this.prepareHook);
|
|
57
|
+
await prepareWorkspace(path, this.prepareHook, signal);
|
|
58
|
+
signal.throwIfAborted();
|
|
52
59
|
return {
|
|
53
60
|
workspaceId: name,
|
|
54
61
|
path,
|
|
@@ -125,7 +132,7 @@ async function reclaimOwnedMarker(input, markerPath, marker) {
|
|
|
125
132
|
if (marker === null ||
|
|
126
133
|
!(await isOwnedWorkspace(input.scope, markerPath, marker, input.fileSystem)))
|
|
127
134
|
return emptyRecovery();
|
|
128
|
-
if (input.runs.some((run) => (run.status
|
|
135
|
+
if (input.runs.some((run) => (isActiveRunStatus(run.status) || run.status === RunStatus.Ambiguous) &&
|
|
129
136
|
(run.runId === marker.runId || run.workspace?.path === marker.path)))
|
|
130
137
|
return emptyRecovery();
|
|
131
138
|
if ((await input.options.retainWorkItem?.(marker.workItemId)) === true)
|
|
@@ -229,12 +236,15 @@ async function canonicalPath(path) {
|
|
|
229
236
|
function isNotFound(error) {
|
|
230
237
|
return typeof error === 'object' && error !== null && 'code' in error && error.code === 'ENOENT';
|
|
231
238
|
}
|
|
232
|
-
async function exists(path) {
|
|
239
|
+
async function exists(path, signal) {
|
|
240
|
+
signal.throwIfAborted();
|
|
233
241
|
try {
|
|
234
242
|
await access(path);
|
|
243
|
+
signal.throwIfAborted();
|
|
235
244
|
return true;
|
|
236
245
|
}
|
|
237
246
|
catch {
|
|
247
|
+
signal.throwIfAborted();
|
|
238
248
|
return false;
|
|
239
249
|
}
|
|
240
250
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ExecutionConfig } from '../../contracts/config.js';
|
|
2
|
+
export type WorkspacePrepareHook = NonNullable<ExecutionConfig['workspaceHooks']>['prepare'];
|
|
3
|
+
export declare function prepareWorkspace(path: string, hook: NonNullable<WorkspacePrepareHook>, signal: AbortSignal): Promise<void>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { runProcess } from '../process-execution.js';
|
|
2
2
|
const prepareOutputTailBytes = 4096;
|
|
3
|
-
export async function prepareWorkspace(path, hook) {
|
|
4
|
-
|
|
3
|
+
export async function prepareWorkspace(path, hook, signal) {
|
|
4
|
+
signal.throwIfAborted();
|
|
5
|
+
const process = runProcess(hook.command, [], path, signal, { hardMs: hook.timeoutMs }, true);
|
|
5
6
|
const result = await process.result;
|
|
7
|
+
signal.throwIfAborted();
|
|
6
8
|
if (result.exitCode === 0 && !result.timedOut && result.failureKind === undefined)
|
|
7
9
|
return;
|
|
8
10
|
throw new Error(prepareFailureMessage(hook.command, result));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AdapterHealth {
|
|
2
|
+
readonly status: 'ok' | 'degraded';
|
|
3
|
+
readonly detail?: string;
|
|
4
|
+
readonly successCount: number;
|
|
5
|
+
readonly failureCount: number;
|
|
6
|
+
}
|
|
7
|
+
export interface AdapterHealthTracker {
|
|
8
|
+
recordSuccess(): void;
|
|
9
|
+
recordFailure(error: unknown): void;
|
|
10
|
+
snapshot(): AdapterHealth;
|
|
11
|
+
}
|
|
12
|
+
interface AdapterHealthTrackerOptions {
|
|
13
|
+
readonly now?: () => number;
|
|
14
|
+
readonly degradeAfterConsecutiveFailures?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function createAdapterHealthTracker(options?: AdapterHealthTrackerOptions): AdapterHealthTracker;
|
|
17
|
+
export {};
|