@atolis-hq/wake 0.4.1 → 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 +10 -8
- 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-comment-syntax.js +2 -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 +53 -23
- 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/contracts/vocabulary.js +3 -1
- 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/comment-source.js +2 -1
- 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 +15 -14
- 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 +13 -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 +27 -15
- package/dist/src/orchestration/domain/interpreter.d.ts +14 -0
- package/dist/src/orchestration/domain/interpreter.js +5 -2
- package/dist/src/orchestration/domain/operator-retry-policy.d.ts +14 -0
- package/dist/src/orchestration/domain/operator-retry-policy.js +36 -10
- 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-events.js +1 -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
|
@@ -34,10 +34,6 @@ execution:
|
|
|
34
34
|
deep: [fake]
|
|
35
35
|
defaultRunnerPool: standard
|
|
36
36
|
|
|
37
|
-
# Tick dispatch cap and resident-loop idle backoff; the built-in defaults
|
|
38
|
-
# are fine for a first run.
|
|
39
|
-
controlPlane: {}
|
|
40
|
-
|
|
41
37
|
orchestration:
|
|
42
38
|
workflowSelectors:
|
|
43
39
|
- match: { tags: [approval] }
|
|
@@ -402,12 +398,10 @@ ENV WAKE_MAIN_JS=/app/dist/src/main.js
|
|
|
402
398
|
# when WAKE_START_ENABLED's supervised \`wake start\` child keeps crashing —
|
|
403
399
|
# e.g. on first boot, before sandbox auth has been configured.
|
|
404
400
|
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
407
|
-
#
|
|
408
|
-
|
|
409
|
-
# before wake start ever runs.
|
|
410
|
-
ENTRYPOINT ["sh", "-c", "set -eu; mkdir -p /wake/.wake; chown -R wake:wake /wake/.wake || true; if [ -n \\"$WAKE_HOME_INIT_DIRS\\" ]; then printf '%s\\n' \\"$WAKE_HOME_INIT_DIRS\\" | while IFS= read -r directory; do case \\"$directory\\" in \\"$WAKE_HOME_INIT_ROOT\\"/*) mkdir -p \\"$directory\\"; chown wake:wake \\"$directory\\" ;; *) exit 1 ;; esac; done; fi; exec su wake -s /bin/sh -c 'HOME=/home/wake exec node \\"$WAKE_MAIN_JS\\" sandbox-entrypoint --wake-root /wake'"]
|
|
401
|
+
# Startup ownership repair is best effort because bind-mounted paths or host
|
|
402
|
+
# permissions may prevent chown. The bounded direct-child pass avoids traversing
|
|
403
|
+
# accumulated runtime data.
|
|
404
|
+
ENTRYPOINT ["sh", "-c", "set -eu; mkdir -p /wake/.wake; chown wake:wake /wake/.wake || true; find /wake/.wake -mindepth 1 -maxdepth 1 -type d -exec chown wake:wake {} + || true; if [ -n \\"$WAKE_HOME_INIT_DIRS\\" ]; then printf '%s\\n' \\"$WAKE_HOME_INIT_DIRS\\" | while IFS= read -r directory; do case \\"$directory\\" in \\"$WAKE_HOME_INIT_ROOT\\"/*) mkdir -p \\"$directory\\"; chown wake:wake \\"$directory\\" ;; *) exit 1 ;; esac; done; fi; exec su wake -s /bin/sh -c 'HOME=/home/wake exec node \\"$WAKE_MAIN_JS\\" sandbox-entrypoint --wake-root /wake'"]
|
|
411
405
|
`;
|
|
412
406
|
const packagedDockerfile = `# syntax=docker/dockerfile:1
|
|
413
407
|
FROM node:24-bookworm-slim
|
|
@@ -471,12 +465,10 @@ EXPOSE 4317
|
|
|
471
465
|
# \`wake\` binary that \`npm install -g\` puts on PATH, rather than a hardcoded
|
|
472
466
|
# npm global lib path that varies by npm/OS setup.
|
|
473
467
|
#
|
|
474
|
-
#
|
|
475
|
-
#
|
|
476
|
-
#
|
|
477
|
-
|
|
478
|
-
# before wake start ever runs.
|
|
479
|
-
ENTRYPOINT ["sh", "-c", "set -eu; mkdir -p /wake/.wake; chown -R wake:wake /wake/.wake || true; if [ -n \\"$WAKE_HOME_INIT_DIRS\\" ]; then printf '%s\\n' \\"$WAKE_HOME_INIT_DIRS\\" | while IFS= read -r directory; do case \\"$directory\\" in \\"$WAKE_HOME_INIT_ROOT\\"/*) mkdir -p \\"$directory\\"; chown wake:wake \\"$directory\\" ;; *) exit 1 ;; esac; done; fi; exec su wake -s /bin/sh -c 'HOME=/home/wake exec wake sandbox-entrypoint'"]
|
|
468
|
+
# Startup ownership repair is best effort because bind-mounted paths or host
|
|
469
|
+
# permissions may prevent chown. The bounded direct-child pass avoids traversing
|
|
470
|
+
# accumulated runtime data.
|
|
471
|
+
ENTRYPOINT ["sh", "-c", "set -eu; mkdir -p /wake/.wake; chown wake:wake /wake/.wake || true; find /wake/.wake -mindepth 1 -maxdepth 1 -type d -exec chown wake:wake {} + || true; if [ -n \\"$WAKE_HOME_INIT_DIRS\\" ]; then printf '%s\\n' \\"$WAKE_HOME_INIT_DIRS\\" | while IFS= read -r directory; do case \\"$directory\\" in \\"$WAKE_HOME_INIT_ROOT\\"/*) mkdir -p \\"$directory\\"; chown wake:wake \\"$directory\\" ;; *) exit 1 ;; esac; done; fi; exec su wake -s /bin/sh -c 'HOME=/home/wake exec wake sandbox-entrypoint'"]
|
|
480
472
|
`;
|
|
481
473
|
/** Creates an immediately-valid, human-readable target Wake root. */
|
|
482
474
|
export async function initialiseWakeRoot(wakeRoot) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type CheckpointStore, type EventJournal, type EventProcessor, type ProcessorRunSerialiser, type ProcessorStateStore, type ProjectionStore } from '@atolis-hq/eventing';
|
|
2
|
+
import type { createPullRequestService } from '../activities/index.js';
|
|
3
|
+
import { type IntakePipeline, type RunnerPipeline, type ScheduleCheckpointStore, type createControlPlaneService } from '../control-plane/index.js';
|
|
4
|
+
import type { createConversationService } from '../conversations/index.js';
|
|
5
|
+
import { type createExecutionService } from '../execution/index.js';
|
|
6
|
+
import { DeliveryService, type DurableFakeDeliveryProvider, type ExternalDeliveryAdapter, type ProviderCompositionFailure, type ProviderDefinition, type ProviderInstance } from '../integrations/index.js';
|
|
7
|
+
import { type Clock, type UlidIdGenerator } from '../kernel/index.js';
|
|
8
|
+
import { type createOrchestrationService } from '../orchestration/index.js';
|
|
9
|
+
import { type createResourceLookup, type createResourceService } from '../resources/index.js';
|
|
10
|
+
import type { createWorkService } from '../work/index.js';
|
|
11
|
+
import type { ResolvedWakeModulesConfig } from './config/load-config.js';
|
|
12
|
+
import type { EventProcessorRuntime } from './event-processor-runtime.js';
|
|
13
|
+
import { type RuntimeProjectionSubscriptions } from './projection-runtime.js';
|
|
14
|
+
export interface IntegrationRuntime {
|
|
15
|
+
readonly projectionSubscriptions: RuntimeProjectionSubscriptions;
|
|
16
|
+
readonly processors: readonly EventProcessor[];
|
|
17
|
+
readonly providers: readonly ProviderInstance[];
|
|
18
|
+
readonly providerFailures: readonly ProviderCompositionFailure[];
|
|
19
|
+
readonly delivery: DeliveryService;
|
|
20
|
+
readonly intakePipeline: IntakePipeline;
|
|
21
|
+
readonly runnerPipeline: RunnerPipeline;
|
|
22
|
+
}
|
|
23
|
+
export interface IntegrationRuntimeInput {
|
|
24
|
+
readonly config: ResolvedWakeModulesConfig;
|
|
25
|
+
readonly journal: EventJournal;
|
|
26
|
+
readonly projections: ProjectionStore;
|
|
27
|
+
readonly checkpoints: CheckpointStore;
|
|
28
|
+
readonly processorState: ProcessorStateStore;
|
|
29
|
+
readonly resources: ReturnType<typeof createResourceService>;
|
|
30
|
+
readonly lookup: ReturnType<typeof createResourceLookup>;
|
|
31
|
+
readonly pullRequests: ReturnType<typeof createPullRequestService>;
|
|
32
|
+
readonly work: ReturnType<typeof createWorkService>;
|
|
33
|
+
readonly conversations: ReturnType<typeof createConversationService>;
|
|
34
|
+
readonly orchestration: ReturnType<typeof createOrchestrationService>;
|
|
35
|
+
readonly execution: ReturnType<typeof createExecutionService>;
|
|
36
|
+
readonly controlPlane: ReturnType<typeof createControlPlaneService>;
|
|
37
|
+
readonly isPaused: () => Promise<boolean>;
|
|
38
|
+
readonly clock: Clock;
|
|
39
|
+
readonly ids: UlidIdGenerator;
|
|
40
|
+
readonly wakeRoot: string;
|
|
41
|
+
readonly subscriptionRunSerialiser: ProcessorRunSerialiser;
|
|
42
|
+
readonly processorRuntime: EventProcessorRuntime;
|
|
43
|
+
readonly scheduleCheckpoints: ScheduleCheckpointStore;
|
|
44
|
+
readonly decorateDeliveryAdapter?: (adapter: ExternalDeliveryAdapter, provider: ProviderInstance) => ExternalDeliveryAdapter;
|
|
45
|
+
readonly fakeDeliveryProvider?: DurableFakeDeliveryProvider;
|
|
46
|
+
readonly providerDefinitions: readonly ProviderDefinition[];
|
|
47
|
+
}
|
|
48
|
+
export declare function composeIntegrationRuntime(input: IntegrationRuntimeInput): Promise<IntegrationRuntime>;
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
+
import { EventActorKind, } from '@atolis-hq/eventing';
|
|
2
|
+
import { withFileLock } from '@atolis-hq/eventing-filesystem';
|
|
1
3
|
import { join } from 'node:path';
|
|
2
4
|
import { ControlStreamKind, ScheduleService, createIntakePipeline, createRunnerPipeline, createWorkCancellationPolicy, } from '../control-plane/index.js';
|
|
3
5
|
import { RunRepository, createRuntimeMemoryProfile, } from '../execution/index.js';
|
|
4
|
-
import { AgentRunPublicationReactor, ArtifactRegistrationReactor, DeliveryOutcomeReactor, DeliveryService, IntegrationStreamKind, PollService, ProviderRegistry, fakeProviderDefinition, } from '../integrations/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import { compileWorkflowSelectors, createPullRequestTransitionEvidence, createResourceTransitionReactor, createWatchReactor, selectWorkflow, workflowName, } from '../orchestration/index.js';
|
|
7
|
-
import { withFileLock } from '../persistence/index.js';
|
|
6
|
+
import { AgentRunPublicationReactor, ArtifactRegistrationReactor, DeliveryOutcomeReactor, DeliveryService, IntegrationStreamKind, PollService, ProviderRegistry, deliveryProjectionDefinitions, fakeProviderDefinition, } from '../integrations/index.js';
|
|
7
|
+
import { compileWorkflowSelectors, createPullRequestTransitionEvidence, createResourceTransitionReactor, createWatchReactor, createWatchReconciler, selectWorkflow, workflowName, } from '../orchestration/index.js';
|
|
8
8
|
import { BuiltInResourceCapability, resourceId, } from '../resources/index.js';
|
|
9
9
|
import { hydrateFakeProviderEvidence } from './fake-provider-files.js';
|
|
10
|
-
import {
|
|
10
|
+
import { createRuntimeProjectionSubscriptions, } from './projection-runtime.js';
|
|
11
11
|
import { createCapabilityResourceTransitionEvidence } from './resource-transition-evidence.js';
|
|
12
|
-
function serializeRunRegisteredOnce(runner) {
|
|
13
|
-
let queue = Promise.resolve();
|
|
14
|
-
const runRegisteredOnce = runner.runRegisteredOnce.bind(runner);
|
|
15
|
-
runner.runRegisteredOnce = (limit) => {
|
|
16
|
-
const result = queue.then(() => runRegisteredOnce(limit));
|
|
17
|
-
queue = result.catch(() => { });
|
|
18
|
-
return result;
|
|
19
|
-
};
|
|
20
|
-
return runner;
|
|
21
|
-
}
|
|
22
12
|
export async function composeIntegrationRuntime(input) {
|
|
23
13
|
const memoryProfile = process.env.WAKE_MEMORY_PROFILE === 'runner'
|
|
24
14
|
? createRuntimeMemoryProfile({
|
|
@@ -58,14 +48,7 @@ export async function composeIntegrationRuntime(input) {
|
|
|
58
48
|
delivery: input.decorateDeliveryAdapter(provider.delivery, provider),
|
|
59
49
|
}))
|
|
60
50
|
: composedProviders;
|
|
61
|
-
|
|
62
|
-
// file-checkpoint-store.ts), so two concurrent runRegisteredOnce calls that
|
|
63
|
-
// interleave can race a slower caller's stale checkpoint save against a
|
|
64
|
-
// faster one that already advanced past it. Every caller (the tick
|
|
65
|
-
// pipeline's own catchUpProjections, the API's manual tick, and the
|
|
66
|
-
// resident's standalone projection pump) shares this one instance, so
|
|
67
|
-
// serializing it here in-process covers all of them without a file lock.
|
|
68
|
-
const projectionRunner = serializeRunRegisteredOnce(createRuntimeProjectionRunner(input.journal, input.projections, input.checkpoints, input.projectionRunSerialiser));
|
|
51
|
+
const projectionSubscriptions = createRuntimeProjectionSubscriptions(input.journal, input.projections, input.checkpoints, input.processorRuntime, input.subscriptionRunSerialiser);
|
|
69
52
|
const delivery = new DeliveryService({
|
|
70
53
|
journal: input.journal,
|
|
71
54
|
intents: async () => (await input.projections.list(IntegrationStreamKind.Delivery)).map(({ value }) => value),
|
|
@@ -90,7 +73,6 @@ export async function composeIntegrationRuntime(input) {
|
|
|
90
73
|
});
|
|
91
74
|
const artifacts = new ArtifactRegistrationReactor({
|
|
92
75
|
journal: input.journal,
|
|
93
|
-
checkpoints: input.checkpoints,
|
|
94
76
|
resources: input.resources,
|
|
95
77
|
ids: input.ids,
|
|
96
78
|
providers,
|
|
@@ -100,14 +82,14 @@ export async function composeIntegrationRuntime(input) {
|
|
|
100
82
|
const replies = providers.find((provider) => provider.replyPublication !== undefined)?.replyPublication;
|
|
101
83
|
const agentRunPublications = new AgentRunPublicationReactor({
|
|
102
84
|
journal: input.journal,
|
|
103
|
-
checkpoints: input.checkpoints,
|
|
104
85
|
runs,
|
|
105
86
|
resources: input.resources,
|
|
106
87
|
orchestration: input.orchestration,
|
|
107
88
|
conversations: input.conversations,
|
|
108
89
|
...(replies === undefined ? {} : { replies }),
|
|
109
90
|
});
|
|
110
|
-
const watch = createWatchReactor(input.orchestration,
|
|
91
|
+
const watch = createWatchReactor(input.orchestration, () => input.orchestration.watchEventTypes(), runs);
|
|
92
|
+
const watchReconciler = createWatchReconciler(input.orchestration, input.journal, input.checkpoints, runs);
|
|
111
93
|
const resourceTransitionEvidence = createCapabilityResourceTransitionEvidence({
|
|
112
94
|
resources: input.resources,
|
|
113
95
|
policies: [
|
|
@@ -121,20 +103,19 @@ export async function composeIntegrationRuntime(input) {
|
|
|
121
103
|
},
|
|
122
104
|
],
|
|
123
105
|
});
|
|
124
|
-
const resourceTransitions = createResourceTransitionReactor(input.orchestration, resourceTransitionEvidence
|
|
106
|
+
const resourceTransitions = createResourceTransitionReactor(input.orchestration, resourceTransitionEvidence);
|
|
125
107
|
input.orchestration.setAcceptSignalOperationCoordinator(async (operation) => {
|
|
126
|
-
await
|
|
108
|
+
await input.processorRuntime.catchUpThrough('resource-transition signal', await input.journal.latestGlobalPosition(), [resourceTransitions.processor]);
|
|
127
109
|
return operation();
|
|
128
110
|
});
|
|
129
|
-
const outcomes = new DeliveryOutcomeReactor(input.journal, input.
|
|
130
|
-
const catchUpProjections = async () => {
|
|
131
|
-
await projectionRunner.runRegisteredOnce();
|
|
132
|
-
};
|
|
111
|
+
const outcomes = new DeliveryOutcomeReactor(input.journal, input.orchestration, input.projections, input.processorState, input.conversations, input.subscriptionRunSerialiser);
|
|
133
112
|
// Only poll hits a rate-limited external API, so only this half of the
|
|
134
113
|
// Tick needs a backing-off host; see bootstrap/surface-cli-applications.ts.
|
|
114
|
+
// Inbound translation reads durable provider facts through its own services,
|
|
115
|
+
// so it has no projection freshness dependency that could hold shutdown or
|
|
116
|
+
// unrelated resident work behind a blocked projection consumer.
|
|
135
117
|
const intakePipeline = createIntakePipeline({
|
|
136
118
|
isPaused: input.isPaused,
|
|
137
|
-
catchUpProjections: () => observeMemory(memoryProfile, 'intake.projections', catchUpProjections),
|
|
138
119
|
poll: async (signal) => {
|
|
139
120
|
return observeMemory(memoryProfile, 'intake.poll', async () => {
|
|
140
121
|
let appended = 0;
|
|
@@ -143,18 +124,9 @@ export async function composeIntegrationRuntime(input) {
|
|
|
143
124
|
return appended;
|
|
144
125
|
});
|
|
145
126
|
},
|
|
146
|
-
translateInbound: async () => {
|
|
147
|
-
return observeMemory(memoryProfile, 'intake.translate', async () => {
|
|
148
|
-
let translated = 0;
|
|
149
|
-
for (const provider of providers)
|
|
150
|
-
translated += await provider.inbound.runOnce();
|
|
151
|
-
return translated;
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
127
|
});
|
|
155
128
|
const runnerPipeline = createRunnerPipeline({
|
|
156
129
|
isPaused: input.isPaused,
|
|
157
|
-
catchUpProjections: () => observeMemory(memoryProfile, 'runner.projections', catchUpProjections),
|
|
158
130
|
runSchedules: () => observeMemory(memoryProfile, 'runner.schedules', async () => {
|
|
159
131
|
for (const schedule of input.config.controlPlane.schedules)
|
|
160
132
|
await schedules.run(schedule, {
|
|
@@ -164,25 +136,35 @@ export async function composeIntegrationRuntime(input) {
|
|
|
164
136
|
actor: { kind: EventActorKind.System, id: ControlStreamKind.Global },
|
|
165
137
|
});
|
|
166
138
|
}),
|
|
167
|
-
|
|
168
|
-
await
|
|
169
|
-
await
|
|
170
|
-
await
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
for (const provider of providers)
|
|
139
|
+
maintain: () => observeMemory(memoryProfile, 'runner.maintenance', async () => {
|
|
140
|
+
await watchReconciler.reconcileOnce();
|
|
141
|
+
await artifacts.reconcileOnce();
|
|
142
|
+
await outcomes.reconcileOnce();
|
|
143
|
+
for (const provider of providers) {
|
|
144
|
+
await provider.reconciler?.reconcileOnce();
|
|
174
145
|
await provider.maintenance?.runOnce();
|
|
175
|
-
|
|
176
|
-
advance: (options) => observeMemory(memoryProfile, 'runner.advance', () => input.advanceOnce(options)),
|
|
177
|
-
publishAgentRuns: () => observeMemory(memoryProfile, 'runner.publish-agent-runs', async () => {
|
|
178
|
-
await agentRunPublications.runOnce();
|
|
146
|
+
}
|
|
179
147
|
}),
|
|
180
148
|
deliver: (signal) => observeMemory(memoryProfile, 'runner.deliver', async () => {
|
|
149
|
+
// Delivery reads its outbox from a projection. Projection writes do
|
|
150
|
+
// not append journal facts, so catch up this one dependency directly
|
|
151
|
+
// instead of waiting for unrelated resident projection consumers.
|
|
152
|
+
for (const definition of deliveryProjectionDefinitions)
|
|
153
|
+
await projectionSubscriptions.catchUp(definition, signal);
|
|
181
154
|
await delivery.deliverNext(signal);
|
|
182
155
|
}),
|
|
183
156
|
});
|
|
184
157
|
return {
|
|
185
|
-
|
|
158
|
+
projectionSubscriptions,
|
|
159
|
+
processors: [
|
|
160
|
+
...projectionSubscriptions.processors,
|
|
161
|
+
watch.processor,
|
|
162
|
+
resourceTransitions.processor,
|
|
163
|
+
artifacts.processor,
|
|
164
|
+
outcomes.processor,
|
|
165
|
+
agentRunPublications.processor,
|
|
166
|
+
...providers.map((provider) => provider.inbound.processor),
|
|
167
|
+
],
|
|
186
168
|
providers,
|
|
187
169
|
providerFailures,
|
|
188
170
|
delivery,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface WakePaths {
|
|
2
|
+
readonly wakeRoot: string;
|
|
3
|
+
readonly dataRoot: string;
|
|
4
|
+
readonly eventsRoot: string;
|
|
5
|
+
readonly projectionsRoot: string;
|
|
6
|
+
readonly checkpointsRoot: string;
|
|
7
|
+
readonly locksRoot: string;
|
|
8
|
+
readonly transcriptsRoot: string;
|
|
9
|
+
readonly containerHomeRoot: string;
|
|
10
|
+
readonly workspacesRoot: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveWakePaths(wakeRoot: string): WakePaths;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CheckpointStore, EventJournal, ProcessorRunSerialiser, ProcessorStateStore, ProjectionStore } from '@atolis-hq/eventing';
|
|
2
|
+
import type { Clock } from '../kernel/index.js';
|
|
3
|
+
import type { WakePaths } from './paths.js';
|
|
4
|
+
export interface PersistenceCompositionOptions {
|
|
5
|
+
readonly journal?: EventJournal;
|
|
6
|
+
readonly projections?: ProjectionStore;
|
|
7
|
+
readonly checkpoints?: CheckpointStore;
|
|
8
|
+
readonly processorState?: ProcessorStateStore;
|
|
9
|
+
readonly decorateJournal?: (journal: EventJournal) => EventJournal;
|
|
10
|
+
readonly decorateProjections?: (projections: ProjectionStore) => ProjectionStore;
|
|
11
|
+
readonly decorateCheckpoints?: (checkpoints: CheckpointStore) => CheckpointStore;
|
|
12
|
+
readonly subscriptionRunSerialiser?: ProcessorRunSerialiser;
|
|
13
|
+
}
|
|
14
|
+
export interface PersistenceComposition {
|
|
15
|
+
readonly journal: EventJournal;
|
|
16
|
+
readonly projections: ProjectionStore;
|
|
17
|
+
readonly checkpoints: CheckpointStore;
|
|
18
|
+
readonly processorState: ProcessorStateStore;
|
|
19
|
+
readonly subscriptionRunSerialiser: ProcessorRunSerialiser;
|
|
20
|
+
}
|
|
21
|
+
export declare function composePersistence(paths: WakePaths, clock: Clock, options: PersistenceCompositionOptions): PersistenceComposition;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { FileCheckpointStore, FileEventJournal, FileProjectionStore, } from '
|
|
1
|
+
import { FileCheckpointStore, FileEventJournal, FileProcessorStateStore, FileProjectionStore, createFileProcessorRunSerialiser, } from '@atolis-hq/eventing-filesystem';
|
|
2
|
+
import { DeliveryOutcomeProcessorConsumer } from '../integrations/index.js';
|
|
2
3
|
function identity(value) {
|
|
3
4
|
return value;
|
|
4
5
|
}
|
|
5
6
|
function serializeJournalAppends(journal) {
|
|
6
7
|
let appendTail = Promise.resolve();
|
|
7
8
|
return {
|
|
8
|
-
|
|
9
|
-
const appended = appendTail.then(() => journal.
|
|
9
|
+
appendToStream(stream, expectedSequence, events) {
|
|
10
|
+
const appended = appendTail.then(() => journal.appendToStream(stream, expectedSequence, events));
|
|
10
11
|
appendTail = appended.then(() => undefined, () => undefined);
|
|
11
12
|
return appended;
|
|
12
13
|
},
|
|
13
14
|
readStream: (stream) => journal.readStream(stream),
|
|
14
15
|
readAll: (afterGlobalPosition, limit) => journal.readAll(afterGlobalPosition, limit),
|
|
15
16
|
latestGlobalPosition: () => journal.latestGlobalPosition(),
|
|
17
|
+
waitForEventsAfter: (afterGlobalPosition, signal, fallbackMs) => journal.waitForEventsAfter(afterGlobalPosition, signal, fallbackMs),
|
|
16
18
|
changeSignal: journal.changeSignal,
|
|
17
19
|
...(journal.readLatest === undefined
|
|
18
20
|
? {}
|
|
@@ -22,9 +24,15 @@ function serializeJournalAppends(journal) {
|
|
|
22
24
|
};
|
|
23
25
|
}
|
|
24
26
|
export function composePersistence(paths, clock, options) {
|
|
27
|
+
const subscriptionRunSerialiser = options.subscriptionRunSerialiser ?? createFileProcessorRunSerialiser(paths.dataRoot);
|
|
25
28
|
return {
|
|
26
29
|
journal: serializeJournalAppends((options.decorateJournal ?? identity)(options.journal ?? new FileEventJournal(paths.dataRoot, clock))),
|
|
27
|
-
projections: (options.decorateProjections ?? identity)(options.projections ??
|
|
30
|
+
projections: (options.decorateProjections ?? identity)(options.projections ??
|
|
31
|
+
new FileProjectionStore(paths.dataRoot, {
|
|
32
|
+
protectedProcessorStateConsumers: [DeliveryOutcomeProcessorConsumer],
|
|
33
|
+
})),
|
|
28
34
|
checkpoints: (options.decorateCheckpoints ?? identity)(options.checkpoints ?? new FileCheckpointStore(paths.dataRoot)),
|
|
35
|
+
processorState: options.processorState ?? new FileProcessorStateStore(paths.dataRoot),
|
|
36
|
+
subscriptionRunSerialiser,
|
|
29
37
|
};
|
|
30
38
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CheckpointStore, EventJournal, ProjectionDefinition, ProjectionStore } from '@atolis-hq/eventing';
|
|
2
|
+
import { type EventProcessor, type EventProcessorHealth, type EventProcessorHostRun, type ProcessorRunSerialiser } from '@atolis-hq/eventing';
|
|
3
|
+
import { type DeliveryIntentView } from '../integrations/index.js';
|
|
4
|
+
import type { EventProcessorRuntime } from './event-processor-runtime.js';
|
|
5
|
+
export declare const runtimeProjectionDefinitions: ProjectionDefinition<unknown>[];
|
|
6
|
+
export interface RuntimeProjectionSubscriptions {
|
|
7
|
+
/** Named Eventing processor definitions, one for every runtime projection. */
|
|
8
|
+
readonly processors: readonly EventProcessor[];
|
|
9
|
+
start(signal: AbortSignal): EventProcessorHostRun;
|
|
10
|
+
catchUpOnce(signal?: AbortSignal): Promise<number>;
|
|
11
|
+
catchUp(definition: ProjectionDefinition, signal?: AbortSignal): Promise<number>;
|
|
12
|
+
rebuild(definition: ProjectionDefinition, signal?: AbortSignal): Promise<number>;
|
|
13
|
+
health(): Promise<readonly EventProcessorHealth[]>;
|
|
14
|
+
}
|
|
15
|
+
export declare function createRuntimeProjectionSubscriptions(journal: EventJournal, projections: ProjectionStore, checkpoints: CheckpointStore, runtime: EventProcessorRuntime, serialiseRun?: ProcessorRunSerialiser, definitions?: readonly ProjectionDefinition[]): RuntimeProjectionSubscriptions;
|
|
16
|
+
export type { DeliveryIntentView };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProjectionRebuilder, createProjectionProcessor, } from '@atolis-hq/eventing';
|
|
2
|
+
import { createInMemoryProcessorRunSerialiser } from '@atolis-hq/eventing/memory';
|
|
2
3
|
import { activityProjectionDefinitions } from '../activities/index.js';
|
|
3
4
|
import { controlPlaneProjectionDefinitions } from '../control-plane/index.js';
|
|
4
5
|
import { conversationProjection } from '../conversations/index.js';
|
|
5
6
|
import { executionProjection, runsByWorkflowInstanceProjection } from '../execution/index.js';
|
|
6
7
|
import { deliveryProjectionDefinitions } from '../integrations/index.js';
|
|
7
8
|
import { orchestrationProjection, workflowDefinitionsProjection, workflowsByWorkItemProjection, } from '../orchestration/index.js';
|
|
8
|
-
import { acquireFileLock, ProjectionRunner, } from '../persistence/index.js';
|
|
9
9
|
import { resourceCorrelationProjection, resourceProjection, resourcesByExternalKeyProjection, workCorrelationsProjection, } from '../resources/index.js';
|
|
10
10
|
import { workProjection } from '../work/index.js';
|
|
11
11
|
import { analyticsProjection } from './analytics-projection.js';
|
|
@@ -28,26 +28,53 @@ export const runtimeProjectionDefinitions = [
|
|
|
28
28
|
boardProjection,
|
|
29
29
|
analyticsProjection,
|
|
30
30
|
];
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
class RuntimeProjectionSubscriptionRuntime {
|
|
32
|
+
journal;
|
|
33
|
+
runtime;
|
|
34
|
+
processors;
|
|
35
|
+
processorsByDefinition = new Map();
|
|
36
|
+
definitionsByName = new Map();
|
|
37
|
+
rebuilder;
|
|
38
|
+
constructor(journal, projections, checkpoints, serialiseRun, runtime, definitions) {
|
|
39
|
+
this.journal = journal;
|
|
40
|
+
this.runtime = runtime;
|
|
41
|
+
this.processors = definitions.map((definition) => {
|
|
42
|
+
const processor = createProjectionProcessor(definition, projections);
|
|
43
|
+
if (this.processorsByDefinition.has(definition.name))
|
|
44
|
+
throw new Error(`Runtime projection definition is already registered: ${definition.name}`);
|
|
45
|
+
this.processorsByDefinition.set(definition.name, processor);
|
|
46
|
+
this.definitionsByName.set(definition.name, definition);
|
|
47
|
+
return processor;
|
|
48
|
+
});
|
|
49
|
+
this.rebuilder = new ProjectionRebuilder(journal, projections, checkpoints, serialiseRun);
|
|
50
|
+
}
|
|
51
|
+
start(signal) {
|
|
52
|
+
return this.runtime.start(signal);
|
|
53
|
+
}
|
|
54
|
+
async catchUpOnce(signal) {
|
|
55
|
+
return this.runtime.catchUp('projection catch-up', this.processors, signal);
|
|
56
|
+
}
|
|
57
|
+
async catchUp(definition, signal) {
|
|
58
|
+
const processor = this.processorsByDefinition.get(definition.name);
|
|
59
|
+
if (processor === undefined)
|
|
60
|
+
throw new Error(`Runtime projection definition is not registered: ${definition.name}`);
|
|
61
|
+
return this.runtime.catchUp(`projection:${definition.name}`, [processor], signal);
|
|
62
|
+
}
|
|
63
|
+
rebuild(definition, signal) {
|
|
64
|
+
return this.rebuilder.rebuild(this.registeredDefinition(definition), signal);
|
|
65
|
+
}
|
|
66
|
+
async health() {
|
|
67
|
+
const health = await this.runtime.health();
|
|
68
|
+
const consumers = new Set(this.processors.map((processor) => processor.consumer));
|
|
69
|
+
return health.filter(({ consumer }) => consumers.has(consumer));
|
|
70
|
+
}
|
|
71
|
+
registeredDefinition(definition) {
|
|
72
|
+
const registered = this.definitionsByName.get(definition.name);
|
|
73
|
+
if (registered === undefined)
|
|
74
|
+
throw new Error(`Runtime projection definition is not registered: ${definition.name}`);
|
|
75
|
+
return registered;
|
|
76
|
+
}
|
|
33
77
|
}
|
|
34
|
-
export function
|
|
35
|
-
|
|
36
|
-
return async (operation) => {
|
|
37
|
-
while (true) {
|
|
38
|
-
const lock = await acquireFileLock(path, {
|
|
39
|
-
staleAfterMs: 60_000,
|
|
40
|
-
staleRequiresDeadProcess: true,
|
|
41
|
-
});
|
|
42
|
-
if (lock.acquired) {
|
|
43
|
-
try {
|
|
44
|
-
return await operation();
|
|
45
|
-
}
|
|
46
|
-
finally {
|
|
47
|
-
await lock.release();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
51
|
-
}
|
|
52
|
-
};
|
|
78
|
+
export function createRuntimeProjectionSubscriptions(journal, projections, checkpoints, runtime, serialiseRun = createInMemoryProcessorRunSerialiser(), definitions = runtimeProjectionDefinitions) {
|
|
79
|
+
return new RuntimeProjectionSubscriptionRuntime(journal, projections, checkpoints, serialiseRun, runtime, definitions);
|
|
53
80
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ResourceTransitionEvidence } from '../orchestration/index.js';
|
|
2
|
+
import type { ResourceService } from '../resources/index.js';
|
|
3
|
+
import { type ResourceCapability } from '../resources/index.js';
|
|
4
|
+
export interface ResourceTransitionEvidencePolicyRegistration {
|
|
5
|
+
readonly capabilities: readonly ResourceCapability[];
|
|
6
|
+
readonly policy: ResourceTransitionEvidence;
|
|
7
|
+
}
|
|
8
|
+
export declare function createCapabilityResourceTransitionEvidence(input: {
|
|
9
|
+
readonly resources: ResourceService;
|
|
10
|
+
readonly policies: readonly ResourceTransitionEvidencePolicyRegistration[];
|
|
11
|
+
}): ResourceTransitionEvidence;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type EventJournal } from '@atolis-hq/eventing';
|
|
2
|
+
import { type Clock, type IdGenerator } from '../kernel/index.js';
|
|
3
|
+
export declare function createRunnerQuotaReporter(journal: EventJournal, clock: Clock, ids: IdGenerator): ({ runnerName, message, }: {
|
|
4
|
+
readonly runnerName: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}) => Promise<void>;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { EventActorKind, EventSourceKind, correlationId, } from '@atolis-hq/eventing';
|
|
2
|
+
import { ControlEventType, ControlStreamKind, controlPlaneStream, createControlPlaneEventData, resolveRunnerQuotaResumeAt, } from '../control-plane/index.js';
|
|
3
3
|
export function createRunnerQuotaReporter(journal, clock, ids) {
|
|
4
4
|
return async ({ runnerName, message, }) => {
|
|
5
5
|
const stream = controlPlaneStream();
|
|
6
6
|
const occurredAt = clock.now().toISOString();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
resumeAt: resolveRunnerQuotaResumeAt(message, occurredAt),
|
|
13
|
-
}, {
|
|
14
|
-
commandId: ids.next('command'),
|
|
15
|
-
correlationId: correlationId(`runner-quota:${runnerName}`),
|
|
7
|
+
const commandId = ids.next('command');
|
|
8
|
+
await journal.appendToStream(stream, (await journal.readStream(stream)).length, [
|
|
9
|
+
createControlPlaneEventData({
|
|
10
|
+
eventId: `${commandId}:${ControlEventType.RunnerPaused}`,
|
|
11
|
+
eventType: ControlEventType.RunnerPaused,
|
|
16
12
|
occurredAt,
|
|
13
|
+
correlationId: correlationId(`runner-quota:${runnerName}`),
|
|
14
|
+
causationId: commandId,
|
|
17
15
|
actor: { kind: EventActorKind.System, id: ControlStreamKind.Global },
|
|
16
|
+
source: { kind: EventSourceKind.Internal, id: ControlStreamKind.Global },
|
|
17
|
+
payload: {
|
|
18
|
+
runnerName,
|
|
19
|
+
cause: 'quota',
|
|
20
|
+
reason: message,
|
|
21
|
+
resumeAt: resolveRunnerQuotaResumeAt(message, occurredAt),
|
|
22
|
+
},
|
|
18
23
|
}),
|
|
19
24
|
]);
|
|
20
25
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RunnerRegistry, type FakeScenarioResolver, type Runner } from '../execution/index.js';
|
|
2
|
+
import type { ResolvedWakeModulesConfig } from './config/load-config.js';
|
|
3
|
+
export declare function createRunnerRegistry(config: ResolvedWakeModulesConfig['execution'], scenarios?: FakeScenarioResolver, decorateRunner?: (runner: Runner, name: string) => Runner): RunnerRegistry;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type EventProcessor } from '@atolis-hq/eventing';
|
|
2
|
+
import type { ActivationSchedulerSubscriber, AdvanceOnce, RunnerPipeline } from '../control-plane/index.js';
|
|
3
|
+
export interface RunnerTickRuntime {
|
|
4
|
+
readonly runnerPipeline: RunnerPipeline;
|
|
5
|
+
readonly activationSchedulerSubscriber: Pick<ActivationSchedulerSubscriber, 'lastResult' | 'poke' | 'processor'>;
|
|
6
|
+
readonly processorRuntime: {
|
|
7
|
+
readonly processors: readonly EventProcessor[];
|
|
8
|
+
catchUp(name: string, processors?: readonly EventProcessor[], signal?: AbortSignal): Promise<number>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type OneShotRunnerTickRuntime = RunnerTickRuntime;
|
|
12
|
+
export declare function withFinalProjectionCatchUp<T>(operation: () => Promise<T>, catchUp: () => Promise<unknown>): Promise<T>;
|
|
13
|
+
/** One-shot ticks produce schedule/reactor facts before reconciling subscriber-owned activation work. */
|
|
14
|
+
export declare function createOneShotRunnerAdvance(root: OneShotRunnerTickRuntime): AdvanceOnce;
|
|
15
|
+
/** Resident scheduling is owned by the durable subscriber, never its tick loop. */
|
|
16
|
+
export declare function createResidentRunnerAdvance(root: RunnerTickRuntime): AdvanceOnce;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EventProcessorCategory } from '@atolis-hq/eventing';
|
|
2
|
+
export async function withFinalProjectionCatchUp(operation, catchUp) {
|
|
3
|
+
let result;
|
|
4
|
+
let operationFailed = false;
|
|
5
|
+
let primaryFailure;
|
|
6
|
+
try {
|
|
7
|
+
result = await operation();
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
operationFailed = true;
|
|
11
|
+
primaryFailure = error;
|
|
12
|
+
}
|
|
13
|
+
let catchUpFailed = false;
|
|
14
|
+
let catchUpFailure;
|
|
15
|
+
try {
|
|
16
|
+
await catchUp();
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
catchUpFailed = true;
|
|
20
|
+
catchUpFailure = error;
|
|
21
|
+
}
|
|
22
|
+
if (operationFailed && catchUpFailed)
|
|
23
|
+
throw new AggregateError([primaryFailure, catchUpFailure], 'Operation and final projection catch-up failed');
|
|
24
|
+
if (operationFailed)
|
|
25
|
+
throw primaryFailure;
|
|
26
|
+
if (catchUpFailed)
|
|
27
|
+
throw catchUpFailure;
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
/** One-shot ticks produce schedule/reactor facts before reconciling subscriber-owned activation work. */
|
|
31
|
+
export function createOneShotRunnerAdvance(root) {
|
|
32
|
+
const factProcessors = root.processorRuntime.processors.filter(({ category }) => category !== EventProcessorCategory.Coordinator);
|
|
33
|
+
const catchUpFacts = () => root.processorRuntime.catchUp('fact catch-up', factProcessors);
|
|
34
|
+
return (options) => withFinalProjectionCatchUp(async () => {
|
|
35
|
+
let scheduled;
|
|
36
|
+
await catchUpFacts();
|
|
37
|
+
const pipeline = await root.runnerPipeline.run(options, undefined, async () => {
|
|
38
|
+
await catchUpFacts();
|
|
39
|
+
const scheduledFacts = await root.processorRuntime.catchUp('activation scheduling', [
|
|
40
|
+
root.activationSchedulerSubscriber.processor,
|
|
41
|
+
]);
|
|
42
|
+
scheduled =
|
|
43
|
+
scheduledFacts > 0
|
|
44
|
+
? root.activationSchedulerSubscriber.lastResult()
|
|
45
|
+
: await root.activationSchedulerSubscriber.poke(options);
|
|
46
|
+
});
|
|
47
|
+
if (pipeline.kind === 'paused')
|
|
48
|
+
return pipeline;
|
|
49
|
+
if (scheduled === undefined)
|
|
50
|
+
throw new Error('Subscriber scheduler did not run before delivery');
|
|
51
|
+
return scheduled;
|
|
52
|
+
}, catchUpFacts);
|
|
53
|
+
}
|
|
54
|
+
/** Resident scheduling is owned by the durable subscriber, never its tick loop. */
|
|
55
|
+
export function createResidentRunnerAdvance(root) {
|
|
56
|
+
return (options, signal) => root.runnerPipeline.run(options, signal);
|
|
57
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScheduleCheckpointStore } from '../control-plane/index.js';
|
|
2
|
+
/** Durable timestamp cursor for ScheduleService; journal checkpoints only store numeric offsets. */
|
|
3
|
+
export declare class FileScheduleCheckpointStore implements ScheduleCheckpointStore {
|
|
4
|
+
private readonly dataRoot;
|
|
5
|
+
constructor(dataRoot: string);
|
|
6
|
+
load(scheduleId: string): Promise<string | null>;
|
|
7
|
+
save(scheduleId: string, slot: string): Promise<void>;
|
|
8
|
+
private path;
|
|
9
|
+
}
|