@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,6 +1,7 @@
|
|
|
1
|
+
import { eventDataSchema, eventEnvelopeSchema, } from '@atolis-hq/eventing';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { activationId, activityName, activityOrchestrationGroupId, activityWorkflowInstanceId, ExternalExecutionKind, } from '../../activities/index.js';
|
|
3
|
-
import { brandedStringSchema,
|
|
4
|
+
import { brandedStringSchema, offsetIsoTimestampSchema } from '../../kernel/index.js';
|
|
4
5
|
import { runId } from './identifiers.js';
|
|
5
6
|
import { ExecutionStreamKind } from './streams.js';
|
|
6
7
|
import { ExecutionCancellationReason, ExecutionFailureCode, RunStatus, WorkspaceMode, } from './vocabulary.js';
|
|
@@ -33,6 +34,27 @@ export const runStartedPayloadSchema = z
|
|
|
33
34
|
.optional(),
|
|
34
35
|
})
|
|
35
36
|
.strict();
|
|
37
|
+
export const runPreparationStartedPayloadSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
activationId: brandedStringSchema(activationId),
|
|
40
|
+
activity: brandedStringSchema(activityName),
|
|
41
|
+
stage: z.string().min(1).optional(),
|
|
42
|
+
workflowInstanceId: brandedStringSchema(activityWorkflowInstanceId),
|
|
43
|
+
orchestrationGroupId: brandedStringSchema(activityOrchestrationGroupId),
|
|
44
|
+
attempt: z.number().int().positive(),
|
|
45
|
+
startedAt: offsetIsoTimestampSchema,
|
|
46
|
+
runner: z
|
|
47
|
+
.object({
|
|
48
|
+
name: z.string().min(1),
|
|
49
|
+
model: z.string().min(1).optional(),
|
|
50
|
+
effort: z.string().min(1).optional(),
|
|
51
|
+
pool: z.string().min(1).optional(),
|
|
52
|
+
cli: z.string().min(1).optional(),
|
|
53
|
+
})
|
|
54
|
+
.strict()
|
|
55
|
+
.optional(),
|
|
56
|
+
})
|
|
57
|
+
.strict();
|
|
36
58
|
export const leasePayloadSchema = z
|
|
37
59
|
.object({
|
|
38
60
|
owner: z.string().min(1),
|
|
@@ -72,6 +94,7 @@ export const runnerResultPayloadSchema = z
|
|
|
72
94
|
})
|
|
73
95
|
.strict();
|
|
74
96
|
export const ExecutionEventType = {
|
|
97
|
+
RunPreparationStarted: 'execution.run-preparation-started',
|
|
75
98
|
RunStarted: 'execution.run-started',
|
|
76
99
|
RunSucceeded: 'execution.run-succeeded',
|
|
77
100
|
RunFailed: 'execution.run-failed',
|
|
@@ -102,135 +125,133 @@ const activationStreamSchema = z
|
|
|
102
125
|
id: brandedStringSchema(activationId),
|
|
103
126
|
})
|
|
104
127
|
.strict();
|
|
105
|
-
const runEventSchema =
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
payload: z
|
|
140
|
-
.object({
|
|
141
|
-
failure: z
|
|
128
|
+
const runEventSchema = eventEnvelopeSchema.extend({
|
|
129
|
+
event: z.discriminatedUnion('eventType', [
|
|
130
|
+
eventDataSchema.extend({
|
|
131
|
+
eventType: z.literal(ExecutionEventType.RunPreparationStarted),
|
|
132
|
+
payload: runPreparationStartedPayloadSchema,
|
|
133
|
+
}),
|
|
134
|
+
eventDataSchema.extend({
|
|
135
|
+
eventType: z.literal(ExecutionEventType.RunStarted),
|
|
136
|
+
payload: runStartedPayloadSchema,
|
|
137
|
+
}),
|
|
138
|
+
eventDataSchema.extend({
|
|
139
|
+
eventType: z.literal(ExecutionEventType.RunRunnerResultReported),
|
|
140
|
+
payload: runnerResultPayloadSchema,
|
|
141
|
+
}),
|
|
142
|
+
eventDataSchema.extend({
|
|
143
|
+
eventType: z.literal(ExecutionEventType.RunWorkspaceCleanupFailed),
|
|
144
|
+
payload: z.object({ message: z.string().min(1) }).strict(),
|
|
145
|
+
}),
|
|
146
|
+
eventDataSchema.extend({
|
|
147
|
+
eventType: z.literal(ExecutionEventType.RunCancelled),
|
|
148
|
+
payload: z.object({ finishedAt: offsetIsoTimestampSchema }).strict(),
|
|
149
|
+
}),
|
|
150
|
+
eventDataSchema.extend({
|
|
151
|
+
eventType: z.literal(ExecutionEventType.RunSucceeded),
|
|
152
|
+
payload: z
|
|
153
|
+
.object({
|
|
154
|
+
outcome: z.object({ kind: z.string().min(1), data: z.unknown().optional() }).strict(),
|
|
155
|
+
finishedAt: offsetIsoTimestampSchema,
|
|
156
|
+
})
|
|
157
|
+
.strict(),
|
|
158
|
+
}),
|
|
159
|
+
eventDataSchema.extend({
|
|
160
|
+
eventType: z.literal(ExecutionEventType.RunFailed),
|
|
161
|
+
payload: z
|
|
142
162
|
.object({
|
|
143
|
-
|
|
144
|
-
message: z.string(),
|
|
145
|
-
details: z
|
|
163
|
+
failure: z
|
|
146
164
|
.object({
|
|
147
|
-
|
|
148
|
-
|
|
165
|
+
kind: z.enum([ExecutionFailureCode.Unexpected]),
|
|
166
|
+
message: z.string(),
|
|
167
|
+
details: z
|
|
168
|
+
.object({
|
|
169
|
+
sourceKind: z.string().min(1),
|
|
170
|
+
sourceDetails: z.unknown().optional(),
|
|
171
|
+
})
|
|
172
|
+
.strict()
|
|
173
|
+
.optional(),
|
|
149
174
|
})
|
|
150
|
-
.strict()
|
|
151
|
-
|
|
175
|
+
.strict(),
|
|
176
|
+
finishedAt: offsetIsoTimestampSchema,
|
|
152
177
|
})
|
|
153
178
|
.strict(),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
stream: activationStreamSchema,
|
|
231
|
-
payload: z.object({ runId: brandedStringSchema(runId) }).strict(),
|
|
232
|
-
}),
|
|
233
|
-
]);
|
|
179
|
+
}),
|
|
180
|
+
eventDataSchema.extend({
|
|
181
|
+
eventType: z.literal(ExecutionEventType.RunLeaseClaimed),
|
|
182
|
+
payload: leasePayloadSchema,
|
|
183
|
+
}),
|
|
184
|
+
eventDataSchema.extend({
|
|
185
|
+
eventType: z.literal(ExecutionEventType.RunLeaseRenewed),
|
|
186
|
+
payload: leasePayloadSchema,
|
|
187
|
+
}),
|
|
188
|
+
eventDataSchema.extend({
|
|
189
|
+
eventType: z.literal(ExecutionEventType.RunExternalExecutionReported),
|
|
190
|
+
payload: z
|
|
191
|
+
.object({
|
|
192
|
+
kind: z.enum([ExternalExecutionKind.Process, ExternalExecutionKind.RemoteSession]),
|
|
193
|
+
id: z.string().min(1),
|
|
194
|
+
startedAt: offsetIsoTimestampSchema,
|
|
195
|
+
})
|
|
196
|
+
.strict(),
|
|
197
|
+
}),
|
|
198
|
+
eventDataSchema.extend({
|
|
199
|
+
eventType: z.literal(ExecutionEventType.RunCancellationRequested),
|
|
200
|
+
payload: z
|
|
201
|
+
.object({
|
|
202
|
+
requestedAt: offsetIsoTimestampSchema,
|
|
203
|
+
reason: z.enum(Object.values(ExecutionCancellationReason)),
|
|
204
|
+
})
|
|
205
|
+
.strict(),
|
|
206
|
+
}),
|
|
207
|
+
eventDataSchema.extend({
|
|
208
|
+
eventType: z.literal(ExecutionEventType.RunCancellationConfirmed),
|
|
209
|
+
payload: z.object({ confirmedAt: offsetIsoTimestampSchema }).strict(),
|
|
210
|
+
}),
|
|
211
|
+
eventDataSchema.extend({
|
|
212
|
+
eventType: z.literal(ExecutionEventType.RunRecovered),
|
|
213
|
+
payload: z
|
|
214
|
+
.object({
|
|
215
|
+
result: runnerResultPayloadSchema,
|
|
216
|
+
outcome: z.object({ kind: z.string().min(1), data: z.unknown().optional() }).strict(),
|
|
217
|
+
finishedAt: offsetIsoTimestampSchema,
|
|
218
|
+
})
|
|
219
|
+
.strict(),
|
|
220
|
+
}),
|
|
221
|
+
eventDataSchema.extend({
|
|
222
|
+
eventType: z.literal(ExecutionEventType.RunAmbiguityObserved),
|
|
223
|
+
payload: z
|
|
224
|
+
.object({ reason: z.string().min(1), attempt: z.number().int().positive() })
|
|
225
|
+
.strict(),
|
|
226
|
+
}),
|
|
227
|
+
eventDataSchema.extend({
|
|
228
|
+
eventType: z.literal(ExecutionEventType.RunAmbiguous),
|
|
229
|
+
payload: z
|
|
230
|
+
.object({ reason: z.string().min(1), finishedAt: offsetIsoTimestampSchema })
|
|
231
|
+
.strict(),
|
|
232
|
+
}),
|
|
233
|
+
]),
|
|
234
|
+
stream: runStreamSchema,
|
|
235
|
+
});
|
|
236
|
+
const activationEventSchema = eventEnvelopeSchema.extend({
|
|
237
|
+
event: z.discriminatedUnion('eventType', [
|
|
238
|
+
eventDataSchema.extend({
|
|
239
|
+
eventType: z.literal(ExecutionEventType.ActivationClaimed),
|
|
240
|
+
payload: z
|
|
241
|
+
.object({
|
|
242
|
+
runId: brandedStringSchema(runId),
|
|
243
|
+
owner: z.string().min(1),
|
|
244
|
+
expiresAt: offsetIsoTimestampSchema,
|
|
245
|
+
})
|
|
246
|
+
.strict(),
|
|
247
|
+
}),
|
|
248
|
+
eventDataSchema.extend({
|
|
249
|
+
eventType: z.literal(ExecutionEventType.ActivationReleased),
|
|
250
|
+
payload: z.object({ runId: brandedStringSchema(runId) }).strict(),
|
|
251
|
+
}),
|
|
252
|
+
]),
|
|
253
|
+
stream: activationStreamSchema,
|
|
254
|
+
});
|
|
234
255
|
const eventSchema = z.union([runEventSchema, activationEventSchema]);
|
|
235
256
|
export function decodeExecutionEvent(event) {
|
|
236
257
|
const result = eventSchema.safeParse(event);
|
|
@@ -251,10 +272,12 @@ export function decodeActivationExecutionEvent(event) {
|
|
|
251
272
|
return result.data;
|
|
252
273
|
}
|
|
253
274
|
export function selectExecutionEvent(event) {
|
|
254
|
-
return event.eventType.startsWith(ExecutionEventNamespace)
|
|
275
|
+
return event.event.eventType.startsWith(ExecutionEventNamespace)
|
|
276
|
+
? decodeExecutionEvent(event)
|
|
277
|
+
: null;
|
|
255
278
|
}
|
|
256
279
|
export function selectRunExecutionEvent(event) {
|
|
257
|
-
if (!event.eventType.startsWith(ExecutionEventNamespace))
|
|
280
|
+
if (!event.event.eventType.startsWith(ExecutionEventNamespace))
|
|
258
281
|
return null;
|
|
259
282
|
if (event.stream.kind === ExecutionStreamKind.Run)
|
|
260
283
|
return decodeRunExecutionEvent(event);
|
|
@@ -262,7 +285,7 @@ export function selectRunExecutionEvent(event) {
|
|
|
262
285
|
return null;
|
|
263
286
|
}
|
|
264
287
|
export function selectActivationExecutionEvent(event) {
|
|
265
|
-
if (!event.eventType.startsWith(ExecutionEventNamespace))
|
|
288
|
+
if (!event.event.eventType.startsWith(ExecutionEventNamespace))
|
|
266
289
|
return null;
|
|
267
290
|
if (event.stream.kind === ExecutionStreamKind.Activation)
|
|
268
291
|
return decodeActivationExecutionEvent(event);
|
|
@@ -270,5 +293,5 @@ export function selectActivationExecutionEvent(event) {
|
|
|
270
293
|
return null;
|
|
271
294
|
}
|
|
272
295
|
function invalidExecutionEvent(event, cause) {
|
|
273
|
-
return new Error(`Invalid Execution event ${event.eventId} at global position ${event.globalPosition} (${event.eventType}): ${cause.message}`, { cause });
|
|
296
|
+
return new Error(`Invalid Execution event ${event.event.eventId} at global position ${event.globalPosition} (${event.event.eventType}): ${cause.message}`, { cause });
|
|
274
297
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ExternalExecutionKind } from '../../activities/index.js';
|
|
2
|
+
import type { ExecutionCancellationReason } from './vocabulary.js';
|
|
3
|
+
export interface Lease {
|
|
4
|
+
readonly owner: string;
|
|
5
|
+
readonly acquiredAt: string;
|
|
6
|
+
readonly expiresAt: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ExternalExecutionReference {
|
|
9
|
+
readonly kind: typeof ExternalExecutionKind.Process | typeof ExternalExecutionKind.RemoteSession;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly startedAt: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Cancellation {
|
|
14
|
+
readonly requestedAt: string;
|
|
15
|
+
readonly reason: ExecutionCancellationReason;
|
|
16
|
+
readonly confirmedAt?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ActivityOutcome } from '../../activities/index.js';
|
|
2
|
+
import type { AgentRunResponse } from './runner.js';
|
|
3
|
+
import type { ExecutionFailureCode, RunStatus } from './vocabulary.js';
|
|
4
|
+
export interface ExecutionFailure {
|
|
5
|
+
readonly kind: ExecutionFailureCode;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
readonly details?: {
|
|
8
|
+
readonly sourceKind: string;
|
|
9
|
+
readonly sourceDetails?: unknown;
|
|
10
|
+
} | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface RecordedRunnerResult {
|
|
13
|
+
readonly transport: typeof RunStatus.Succeeded | typeof RunStatus.Failed | typeof RunStatus.Cancelled | typeof RunStatus.Ambiguous;
|
|
14
|
+
/** Legacy decode-only compatibility. New execution facts never set these fields. */
|
|
15
|
+
readonly output?: string | undefined;
|
|
16
|
+
readonly runner?: string | undefined;
|
|
17
|
+
readonly agent?: AgentRunResponse | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface RecoveredRunResult {
|
|
20
|
+
readonly result: RecordedRunnerResult;
|
|
21
|
+
readonly outcome: ActivityOutcome;
|
|
22
|
+
readonly finishedAt: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ExternalExecutionKind } from '../../activities/index.js';
|
|
2
|
+
import type { FinishedRunStatus, WorkspaceMode } from './vocabulary.js';
|
|
3
|
+
export declare const ProviderQuotaExceededFailureKind = "provider-quota-exceeded";
|
|
4
|
+
export interface RunnerRequest {
|
|
5
|
+
readonly runId: string;
|
|
6
|
+
readonly prompt: string;
|
|
7
|
+
readonly context?: {
|
|
8
|
+
readonly runnerName: string;
|
|
9
|
+
readonly action: string;
|
|
10
|
+
readonly activationOrdinal: number;
|
|
11
|
+
};
|
|
12
|
+
readonly model?: string;
|
|
13
|
+
readonly effort?: string;
|
|
14
|
+
readonly workspacePath?: string;
|
|
15
|
+
readonly workspaceMode?: Exclude<WorkspaceMode, typeof WorkspaceMode.None>;
|
|
16
|
+
readonly allowedTools: readonly string[];
|
|
17
|
+
readonly maxTurns?: number;
|
|
18
|
+
readonly onTimeout?: (kind: 'idle' | 'hard') => Promise<void>;
|
|
19
|
+
readonly resumeSessionId?: string;
|
|
20
|
+
readonly usageBaseline?: {
|
|
21
|
+
readonly input: number;
|
|
22
|
+
readonly output: number;
|
|
23
|
+
readonly cacheRead?: number;
|
|
24
|
+
readonly cacheWrite?: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type AgentRunOutcome = 'DONE' | 'REJECTED' | 'BLOCKED' | 'FAILED' | 'NEEDS_CLARIFICATION';
|
|
28
|
+
export interface AgentRunResponse {
|
|
29
|
+
readonly outcome: AgentRunOutcome;
|
|
30
|
+
readonly displayBody: string;
|
|
31
|
+
readonly artifacts?: readonly {
|
|
32
|
+
readonly kind: string;
|
|
33
|
+
readonly externalKey: {
|
|
34
|
+
readonly adapter: string;
|
|
35
|
+
readonly key: string;
|
|
36
|
+
};
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
readonly metadata: Readonly<Record<string, string | number | boolean | null>>;
|
|
39
|
+
}
|
|
40
|
+
export interface AgentTokenUsage {
|
|
41
|
+
readonly tokens: number;
|
|
42
|
+
readonly costUsd: number;
|
|
43
|
+
}
|
|
44
|
+
export declare function agentTokenUsage(metadata: AgentRunResponse['metadata'] | undefined): AgentTokenUsage;
|
|
45
|
+
export interface AgentRunnerResult {
|
|
46
|
+
readonly transport: FinishedRunStatus;
|
|
47
|
+
readonly output: string;
|
|
48
|
+
readonly runner: string;
|
|
49
|
+
readonly model?: string | undefined;
|
|
50
|
+
readonly sessionId?: string | undefined;
|
|
51
|
+
readonly tokenUsage?: {
|
|
52
|
+
readonly input: number;
|
|
53
|
+
readonly output: number;
|
|
54
|
+
readonly cacheRead?: number | undefined;
|
|
55
|
+
readonly cacheWrite?: number | undefined;
|
|
56
|
+
readonly costUsd?: number | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
readonly failure?: {
|
|
59
|
+
readonly kind: string;
|
|
60
|
+
readonly message: string;
|
|
61
|
+
} | undefined;
|
|
62
|
+
/** Present only when Codex's own telemetry cannot verify a claimed completion. */
|
|
63
|
+
readonly unverifiedCompletionReason?: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
export interface RunnerExecution {
|
|
66
|
+
readonly identity?: {
|
|
67
|
+
readonly kind: ExternalExecutionKind;
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly startedAt: string;
|
|
70
|
+
};
|
|
71
|
+
readonly result: Promise<AgentRunnerResult>;
|
|
72
|
+
cancel(reason: string): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
export interface Runner {
|
|
75
|
+
/** Whether this adapter can continue an earlier session with its opaque session ID. */
|
|
76
|
+
readonly supportsSessionResume?: boolean;
|
|
77
|
+
start(request: RunnerRequest, signal: AbortSignal): Promise<RunnerExecution>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ActivationId } from '../../activities/index.js';
|
|
2
|
+
import type { EntityRef } from '../../kernel/index.js';
|
|
3
|
+
import type { RunId } from './identifiers.js';
|
|
4
|
+
export declare const ExecutionStreamKind: {
|
|
5
|
+
readonly Run: "run";
|
|
6
|
+
readonly Activation: "execution-activation";
|
|
7
|
+
};
|
|
8
|
+
export type RunStreamRef = EntityRef<typeof ExecutionStreamKind.Run, RunId>;
|
|
9
|
+
export declare const runStream: (id: RunId) => RunStreamRef;
|
|
10
|
+
export declare const isRunStream: (stream: EntityRef) => stream is RunStreamRef;
|
|
11
|
+
export type ActivationStreamRef = EntityRef<typeof ExecutionStreamKind.Activation, ActivationId>;
|
|
12
|
+
export declare const activationStream: (id: ActivationId) => ActivationStreamRef;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ActivationId, ActivityName, ActivityOrchestrationGroupId, ActivityOutcome, ActivityWorkflowInstanceId } from '../../activities/index.js';
|
|
2
|
+
import type { RunId } from './identifiers.js';
|
|
3
|
+
import type { Cancellation, ExternalExecutionReference, Lease } from './liveness.js';
|
|
4
|
+
import type { ExecutionFailure } from './results.js';
|
|
5
|
+
import type { AgentRunResponse } from './runner.js';
|
|
6
|
+
import type { WorkspaceMode } from './vocabulary.js';
|
|
7
|
+
import { type RunStatus } from './vocabulary.js';
|
|
8
|
+
export type RunTransportStatus = RunStatus;
|
|
9
|
+
export interface RunView {
|
|
10
|
+
readonly runId: RunId;
|
|
11
|
+
readonly activationId: ActivationId;
|
|
12
|
+
readonly activity: ActivityName;
|
|
13
|
+
readonly stage?: string | undefined;
|
|
14
|
+
readonly workflowInstanceId: ActivityWorkflowInstanceId;
|
|
15
|
+
readonly orchestrationGroupId: ActivityOrchestrationGroupId;
|
|
16
|
+
readonly attempt: number;
|
|
17
|
+
readonly status: RunTransportStatus;
|
|
18
|
+
/** Unknown-state inspection count; only terminal ambiguity is escalated. */
|
|
19
|
+
readonly ambiguityAttempts: number;
|
|
20
|
+
readonly escalated: boolean;
|
|
21
|
+
readonly startedAt: string;
|
|
22
|
+
readonly executionStartedAt?: string | undefined;
|
|
23
|
+
readonly runner?: {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly model?: string | undefined;
|
|
26
|
+
readonly effort?: string | undefined;
|
|
27
|
+
readonly pool?: string | undefined;
|
|
28
|
+
readonly cli?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly finishedAt?: string;
|
|
31
|
+
readonly outcome?: ActivityOutcome;
|
|
32
|
+
readonly failure?: ExecutionFailure;
|
|
33
|
+
readonly workspace?: {
|
|
34
|
+
readonly mode: typeof WorkspaceMode.ReadOnly | typeof WorkspaceMode.Branch;
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly branch?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
readonly lease?: Lease;
|
|
39
|
+
readonly externalExecution?: ExternalExecutionReference;
|
|
40
|
+
readonly agent?: AgentRunResponse | undefined;
|
|
41
|
+
readonly cancellation?: Cancellation;
|
|
42
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ValueOf } from '../../kernel/index.js';
|
|
2
|
+
export declare const RunStatus: {
|
|
3
|
+
readonly Starting: "starting";
|
|
4
|
+
readonly Started: "started";
|
|
5
|
+
readonly Succeeded: "succeeded";
|
|
6
|
+
readonly Failed: "failed";
|
|
7
|
+
readonly Cancelled: "cancelled";
|
|
8
|
+
readonly Ambiguous: "ambiguous";
|
|
9
|
+
};
|
|
10
|
+
export type RunStatus = ValueOf<typeof RunStatus>;
|
|
11
|
+
export type FinishedRunStatus = Exclude<RunStatus, typeof RunStatus.Starting | typeof RunStatus.Started>;
|
|
12
|
+
export declare function isActiveRunStatus(status: RunStatus): status is typeof RunStatus.Starting | typeof RunStatus.Started;
|
|
13
|
+
export declare const ExecutionFailureCode: {
|
|
14
|
+
readonly Unexpected: "unexpected-execution-failure";
|
|
15
|
+
};
|
|
16
|
+
export type ExecutionFailureCode = ValueOf<typeof ExecutionFailureCode>;
|
|
17
|
+
export declare const ExecutionCancellationReason: {
|
|
18
|
+
readonly Operator: "operator";
|
|
19
|
+
readonly WorkCancelled: "work-cancelled";
|
|
20
|
+
readonly WorkClosed: "work-closed";
|
|
21
|
+
readonly WorkflowSuperseded: "workflow-superseded";
|
|
22
|
+
readonly IdleTimeout: "idle-timeout";
|
|
23
|
+
readonly Timeout: "timeout";
|
|
24
|
+
readonly Shutdown: "shutdown";
|
|
25
|
+
readonly Maintenance: "maintenance";
|
|
26
|
+
};
|
|
27
|
+
export type ExecutionCancellationReason = ValueOf<typeof ExecutionCancellationReason>;
|
|
28
|
+
export declare const ExternalExecutionState: {
|
|
29
|
+
readonly Running: "running";
|
|
30
|
+
readonly Completed: "completed";
|
|
31
|
+
readonly Absent: "absent";
|
|
32
|
+
readonly Unknown: "unknown";
|
|
33
|
+
};
|
|
34
|
+
export type ExternalExecutionState = ValueOf<typeof ExternalExecutionState>;
|
|
35
|
+
export declare const WorkspaceMode: {
|
|
36
|
+
readonly None: "none";
|
|
37
|
+
readonly ReadOnly: "read-only";
|
|
38
|
+
readonly Branch: "branch";
|
|
39
|
+
};
|
|
40
|
+
export type WorkspaceMode = ValueOf<typeof WorkspaceMode>;
|
|
41
|
+
export declare const TranscriptChannel: {
|
|
42
|
+
readonly Input: string;
|
|
43
|
+
readonly Agent: string;
|
|
44
|
+
};
|
|
45
|
+
export type TranscriptChannel = ValueOf<typeof TranscriptChannel>;
|
|
46
|
+
export declare const TranscriptGroupKind: {
|
|
47
|
+
readonly Session: string;
|
|
48
|
+
readonly Run: string;
|
|
49
|
+
};
|
|
50
|
+
export type TranscriptGroupKind = ValueOf<typeof TranscriptGroupKind>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { defineClosedVocabulary } from '../../kernel/index.js';
|
|
2
2
|
export const RunStatus = defineClosedVocabulary({
|
|
3
|
+
Starting: 'starting',
|
|
3
4
|
Started: 'started',
|
|
4
5
|
Succeeded: 'succeeded',
|
|
5
6
|
Failed: 'failed',
|
|
6
7
|
Cancelled: 'cancelled',
|
|
7
8
|
Ambiguous: 'ambiguous',
|
|
8
9
|
});
|
|
10
|
+
export function isActiveRunStatus(status) {
|
|
11
|
+
return status === RunStatus.Starting || status === RunStatus.Started;
|
|
12
|
+
}
|
|
9
13
|
export const ExecutionFailureCode = defineClosedVocabulary({
|
|
10
14
|
Unexpected: 'unexpected-execution-failure',
|
|
11
15
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ResourceView } from '../../resources/index.js';
|
|
2
|
+
import type { WorkItemId } from '../../work/index.js';
|
|
3
|
+
import type { RunId } from './identifiers.js';
|
|
4
|
+
import type { RunView } from './views.js';
|
|
5
|
+
import type { WorkspaceMode } from './vocabulary.js';
|
|
6
|
+
export interface WorkspaceRequest {
|
|
7
|
+
readonly runId: RunId;
|
|
8
|
+
readonly signal: AbortSignal;
|
|
9
|
+
readonly mode: typeof WorkspaceMode.ReadOnly | typeof WorkspaceMode.Branch;
|
|
10
|
+
readonly workItemId: WorkItemId;
|
|
11
|
+
readonly repositoryResource: ResourceView;
|
|
12
|
+
}
|
|
13
|
+
export interface WorkspaceLease {
|
|
14
|
+
readonly workspaceId: string;
|
|
15
|
+
readonly path: string;
|
|
16
|
+
/** Branch actually checked out for this lease, when the provider can attest it. */
|
|
17
|
+
readonly branch?: string | undefined;
|
|
18
|
+
readonly mode: WorkspaceRequest['mode'];
|
|
19
|
+
/** Ends this Run's use of the workspace; branch-workspace disposal is WorkItem-scoped recovery. */
|
|
20
|
+
release(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export interface WorkspaceProvider {
|
|
23
|
+
acquire(request: WorkspaceRequest): Promise<WorkspaceLease>;
|
|
24
|
+
}
|
|
25
|
+
/** Optional capability for reclaiming workspaces whose journal owner is safe to remove. */
|
|
26
|
+
export interface WorkspaceRecovery {
|
|
27
|
+
recover(runs: readonly RunView[], options?: WorkspaceRecoveryOptions): Promise<WorkspaceRecoveryResult>;
|
|
28
|
+
}
|
|
29
|
+
/** Existing control-plane pause state, sampled between independent reclaims. */
|
|
30
|
+
export interface WorkspaceRecoveryOptions {
|
|
31
|
+
isPaused?(): Promise<boolean>;
|
|
32
|
+
/** Whether this WorkItem still owns its workspace after its active Runs finish. */
|
|
33
|
+
retainWorkItem?(workItemId: WorkItemId): Promise<boolean>;
|
|
34
|
+
/** Called after an owned workspace is removed; false preserves its marker for retry. */
|
|
35
|
+
onWorkspaceReclaimed?(workItemId: WorkItemId): Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkspaceRecoveryResult {
|
|
38
|
+
readonly reclaimed: number;
|
|
39
|
+
/** WorkItems whose owned workspace was successfully reclaimed in this pass. */
|
|
40
|
+
readonly reclaimedWorkItemIds?: readonly WorkItemId[];
|
|
41
|
+
readonly failures: readonly WorkspaceRecoveryFailure[];
|
|
42
|
+
}
|
|
43
|
+
/** A recoverable cleanup failure retained for the next startup pass. */
|
|
44
|
+
export interface WorkspaceRecoveryFailure {
|
|
45
|
+
readonly markerPath: string;
|
|
46
|
+
readonly path: string;
|
|
47
|
+
readonly message: string;
|
|
48
|
+
}
|