@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
|
@@ -18,6 +18,18 @@ const BoardCondition = {
|
|
|
18
18
|
Error: conditions[3],
|
|
19
19
|
Finished: conditions[4],
|
|
20
20
|
};
|
|
21
|
+
const activeRunPhaseShape = {
|
|
22
|
+
[RunStatus.Starting]: true,
|
|
23
|
+
[RunStatus.Started]: true,
|
|
24
|
+
};
|
|
25
|
+
const activeRunPhases = Object.keys(activeRunPhaseShape);
|
|
26
|
+
const ActiveRunPhase = {
|
|
27
|
+
Starting: activeRunPhases[0],
|
|
28
|
+
Started: activeRunPhases[1],
|
|
29
|
+
};
|
|
30
|
+
export function normalizeBoardActiveRunPhase(phase) {
|
|
31
|
+
return phase === RunStatus.Starting ? ActiveRunPhase.Starting : ActiveRunPhase.Started;
|
|
32
|
+
}
|
|
21
33
|
export const boardProjection = {
|
|
22
34
|
name: 'operator-board',
|
|
23
35
|
select: () => ({ key: 'global' }),
|
|
@@ -25,12 +37,12 @@ export const boardProjection = {
|
|
|
25
37
|
project(previous, envelope) {
|
|
26
38
|
const work = selectWorkEvent(envelope);
|
|
27
39
|
if (work !== null)
|
|
28
|
-
return projectWork(previous, work, envelope.occurredAt);
|
|
40
|
+
return projectWork(previous, work, envelope.event.occurredAt);
|
|
29
41
|
const workflow = selectWorkflowOrchestrationEvent(envelope);
|
|
30
42
|
if (workflow !== null)
|
|
31
|
-
return projectWorkflow(previous, workflow, envelope.occurredAt);
|
|
43
|
+
return projectWorkflow(previous, workflow, envelope.event.occurredAt);
|
|
32
44
|
const run = selectRunExecutionEvent(envelope);
|
|
33
|
-
return run === null ? previous : projectRun(previous, run, envelope.occurredAt);
|
|
45
|
+
return run === null ? previous : projectRun(previous, run, envelope.event.occurredAt);
|
|
34
46
|
},
|
|
35
47
|
};
|
|
36
48
|
export function boardConditionCounts(view) {
|
|
@@ -41,11 +53,12 @@ export function boardConditionCounts(view) {
|
|
|
41
53
|
}
|
|
42
54
|
function projectWork(view, event, occurredAt) {
|
|
43
55
|
const id = event.stream.id;
|
|
44
|
-
|
|
56
|
+
const data = event.event;
|
|
57
|
+
if (data.eventType === WorkEventType.ItemCreated) {
|
|
45
58
|
const card = {
|
|
46
59
|
workItemKey: toWorkItemKey(id),
|
|
47
60
|
workItemId: id,
|
|
48
|
-
objective:
|
|
61
|
+
objective: data.payload.objective,
|
|
49
62
|
condition: BoardCondition.Ready,
|
|
50
63
|
dwellSince: occurredAt,
|
|
51
64
|
runCount: 0,
|
|
@@ -63,19 +76,19 @@ function projectWork(view, event, occurredAt) {
|
|
|
63
76
|
const current = view.cards[id];
|
|
64
77
|
if (current === undefined)
|
|
65
78
|
return view;
|
|
66
|
-
if (
|
|
79
|
+
if (data.eventType === WorkEventType.ObjectiveRevised)
|
|
67
80
|
return {
|
|
68
81
|
...view,
|
|
69
|
-
cards: { ...view.cards, [id]: { ...current, objective:
|
|
82
|
+
cards: { ...view.cards, [id]: { ...current, objective: data.payload.objective } },
|
|
70
83
|
};
|
|
71
|
-
if (
|
|
84
|
+
if (data.eventType === WorkEventType.ItemFrozen)
|
|
72
85
|
return { ...view, cards: { ...view.cards, [id]: { ...current, frozen: true } } };
|
|
73
|
-
if (
|
|
86
|
+
if (data.eventType === WorkEventType.ItemUnfrozen) {
|
|
74
87
|
const { frozen: _frozen, ...unfrozen } = current;
|
|
75
88
|
return { ...view, cards: { ...view.cards, [id]: unfrozen } };
|
|
76
89
|
}
|
|
77
|
-
if (
|
|
78
|
-
|
|
90
|
+
if (data.eventType === WorkEventType.ItemClosed ||
|
|
91
|
+
data.eventType === WorkEventType.ItemCancelled) {
|
|
79
92
|
return {
|
|
80
93
|
...view,
|
|
81
94
|
cards: {
|
|
@@ -86,28 +99,31 @@ function projectWork(view, event, occurredAt) {
|
|
|
86
99
|
}
|
|
87
100
|
// Deletion is a purge, not a lifecycle outcome — the card must disappear
|
|
88
101
|
// from the board entirely rather than settle into any condition column.
|
|
89
|
-
if (
|
|
102
|
+
if (data.eventType === WorkEventType.ItemDeleted) {
|
|
90
103
|
const { [id]: _removed, ...cards } = view.cards;
|
|
91
104
|
return { ...view, cards };
|
|
92
105
|
}
|
|
93
106
|
return view;
|
|
94
107
|
}
|
|
95
108
|
function projectWorkflow(view, event, occurredAt) {
|
|
96
|
-
if (event
|
|
109
|
+
if (isWorkflowEventType(event, OrchestrationEventType.InstanceStarted))
|
|
97
110
|
return projectWorkflowStarted(view, event, occurredAt);
|
|
98
111
|
return projectWorkflowUpdate(view, event, occurredAt);
|
|
99
112
|
}
|
|
113
|
+
function isWorkflowEventType(event, eventType) {
|
|
114
|
+
return event.event.eventType === eventType;
|
|
115
|
+
}
|
|
100
116
|
function projectWorkflowStarted(view, event, occurredAt) {
|
|
101
|
-
const workId = event.payload.workItemId;
|
|
117
|
+
const workId = event.event.payload.workItemId;
|
|
102
118
|
const card = view.cards[workId];
|
|
103
119
|
if (card === undefined)
|
|
104
120
|
return view;
|
|
105
121
|
const workflows = { ...view.workflows, [event.stream.id]: workId };
|
|
106
|
-
if ('parentWorkflowInstanceId' in event.payload)
|
|
122
|
+
if ('parentWorkflowInstanceId' in event.event.payload)
|
|
107
123
|
return {
|
|
108
124
|
...view,
|
|
109
125
|
workflows,
|
|
110
|
-
children: { ...view.children, [event.stream.id]: event.payload.entry },
|
|
126
|
+
children: { ...view.children, [event.stream.id]: event.event.payload.entry },
|
|
111
127
|
};
|
|
112
128
|
return {
|
|
113
129
|
...view,
|
|
@@ -115,8 +131,8 @@ function projectWorkflowStarted(view, event, occurredAt) {
|
|
|
115
131
|
...view.cards,
|
|
116
132
|
[workId]: {
|
|
117
133
|
...card,
|
|
118
|
-
workflowName: event.payload.workflowName,
|
|
119
|
-
stage: event.payload.entry,
|
|
134
|
+
workflowName: event.event.payload.workflowName,
|
|
135
|
+
stage: event.event.payload.entry,
|
|
120
136
|
dwellSince: occurredAt,
|
|
121
137
|
condition: BoardCondition.Ready,
|
|
122
138
|
},
|
|
@@ -141,14 +157,14 @@ function projectWorkflowUpdate(view, event, occurredAt) {
|
|
|
141
157
|
// Error from the prior stage's failed run, or whatever it held before the
|
|
142
158
|
// SignalAccepted that unblocked it — until a Run actually starts (Active)
|
|
143
159
|
// or a fresh SignalWaitStarted arrives (Needs Input).
|
|
144
|
-
if (event.eventType === OrchestrationEventType.StageEntered)
|
|
160
|
+
if (event.event.eventType === OrchestrationEventType.StageEntered)
|
|
145
161
|
return {
|
|
146
162
|
...view,
|
|
147
163
|
cards: {
|
|
148
164
|
...view.cards,
|
|
149
165
|
[workId]: {
|
|
150
166
|
...withoutBlockReason(card),
|
|
151
|
-
stage: event.payload.stage,
|
|
167
|
+
stage: event.event.payload.stage,
|
|
152
168
|
dwellSince: occurredAt,
|
|
153
169
|
condition: BoardCondition.Ready,
|
|
154
170
|
},
|
|
@@ -160,27 +176,30 @@ function projectWorkflowUpdate(view, event, occurredAt) {
|
|
|
160
176
|
// the board instead of silently sitting at whatever condition it had
|
|
161
177
|
// before — this is exactly the class of gap that let the card sit in
|
|
162
178
|
// Ready while GitHub's own label already said working.
|
|
163
|
-
const status = orchestrationStatusTransitions[event.eventType];
|
|
179
|
+
const status = orchestrationStatusTransitions[event.event.eventType];
|
|
164
180
|
if (status === undefined)
|
|
165
181
|
return view;
|
|
166
182
|
const withCondition = {
|
|
167
|
-
...(event.eventType === OrchestrationEventType.InstanceBlocked
|
|
183
|
+
...(event.event.eventType === OrchestrationEventType.InstanceBlocked
|
|
168
184
|
? card
|
|
169
185
|
: withoutBlockReason(card)),
|
|
170
186
|
condition: boardConditionForStatus(status, card),
|
|
171
|
-
...(event.eventType === OrchestrationEventType.InstanceBlocked
|
|
172
|
-
? { blockReason: event.payload.reason }
|
|
187
|
+
...(event.event.eventType === OrchestrationEventType.InstanceBlocked
|
|
188
|
+
? { blockReason: event.event.payload.reason }
|
|
173
189
|
: {}),
|
|
174
190
|
};
|
|
175
|
-
if (event.eventType === OrchestrationEventType.SignalWaitStarted)
|
|
191
|
+
if (event.event.eventType === OrchestrationEventType.SignalWaitStarted)
|
|
176
192
|
return {
|
|
177
193
|
...view,
|
|
178
194
|
cards: {
|
|
179
195
|
...view.cards,
|
|
180
|
-
[workId]: {
|
|
196
|
+
[workId]: {
|
|
197
|
+
...withCondition,
|
|
198
|
+
...awaitingApprovalField(event.event.payload.signalKind),
|
|
199
|
+
},
|
|
181
200
|
},
|
|
182
201
|
};
|
|
183
|
-
if (event.eventType === OrchestrationEventType.SignalAccepted)
|
|
202
|
+
if (event.event.eventType === OrchestrationEventType.SignalAccepted)
|
|
184
203
|
return { ...view, cards: { ...view.cards, [workId]: withoutAwaitingApproval(withCondition) } };
|
|
185
204
|
return { ...view, cards: { ...view.cards, [workId]: withCondition } };
|
|
186
205
|
}
|
|
@@ -226,11 +245,12 @@ const runTerminalEventTypes = new Set([
|
|
|
226
245
|
ExecutionEventType.RunAmbiguous,
|
|
227
246
|
]);
|
|
228
247
|
function terminalFinishedAt(event) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
248
|
+
const data = event.event;
|
|
249
|
+
if (data.eventType === ExecutionEventType.RunSucceeded ||
|
|
250
|
+
data.eventType === ExecutionEventType.RunFailed ||
|
|
251
|
+
data.eventType === ExecutionEventType.RunCancelled ||
|
|
252
|
+
data.eventType === ExecutionEventType.RunAmbiguous)
|
|
253
|
+
return data.payload.finishedAt;
|
|
234
254
|
return undefined;
|
|
235
255
|
}
|
|
236
256
|
// RunSucceeded is a transport-level fact only: the agent can still report
|
|
@@ -247,8 +267,9 @@ function needsClarificationOutcome(data) {
|
|
|
247
267
|
return status === 'NEEDS_CLARIFICATION' ? status : undefined;
|
|
248
268
|
}
|
|
249
269
|
function terminalRunFields(event) {
|
|
250
|
-
|
|
251
|
-
|
|
270
|
+
const data = event.event;
|
|
271
|
+
if (data.eventType === ExecutionEventType.RunSucceeded) {
|
|
272
|
+
const kind = data.payload.outcome.kind;
|
|
252
273
|
// A successful outcome means the runner has stopped, but does not decide
|
|
253
274
|
// the workflow's next state. Keep the workflow-owned condition until its
|
|
254
275
|
// next lifecycle event (ActivityRequested, SignalWaitStarted, or
|
|
@@ -257,36 +278,45 @@ function terminalRunFields(event) {
|
|
|
257
278
|
return { lastRunOutcome: kind, condition: BoardCondition.Error };
|
|
258
279
|
if (kind === ActivityOutcomeKind.Blocked)
|
|
259
280
|
return {
|
|
260
|
-
lastRunOutcome: needsClarificationOutcome(
|
|
281
|
+
lastRunOutcome: needsClarificationOutcome(data.payload.outcome.data) ?? kind,
|
|
261
282
|
condition: BoardCondition.NeedsInput,
|
|
262
283
|
};
|
|
263
284
|
return { lastRunOutcome: kind };
|
|
264
285
|
}
|
|
265
|
-
if (
|
|
286
|
+
if (data.eventType === ExecutionEventType.RunFailed)
|
|
266
287
|
return { lastRunOutcome: RunStatus.Failed, condition: BoardCondition.Error };
|
|
267
|
-
if (
|
|
288
|
+
if (data.eventType === ExecutionEventType.RunCancelled)
|
|
268
289
|
return { lastRunOutcome: RunStatus.Cancelled, condition: BoardCondition.Error };
|
|
269
|
-
if (
|
|
290
|
+
if (data.eventType === ExecutionEventType.RunAmbiguous)
|
|
270
291
|
return { lastRunOutcome: RunStatus.Ambiguous, condition: BoardCondition.Error };
|
|
271
292
|
return undefined;
|
|
272
293
|
}
|
|
273
294
|
function projectRun(view, event, _occurredAt) {
|
|
274
|
-
if (event
|
|
295
|
+
if (isRunEventType(event, ExecutionEventType.RunPreparationStarted))
|
|
296
|
+
return projectRunPreparationStarted(view, event);
|
|
297
|
+
if (isRunEventType(event, ExecutionEventType.RunStarted))
|
|
275
298
|
return projectRunStarted(view, event);
|
|
276
299
|
const workId = view.runs[event.stream.id];
|
|
277
300
|
const card = workId === undefined ? undefined : view.cards[workId];
|
|
278
301
|
if (card === undefined || workId === undefined)
|
|
279
302
|
return view;
|
|
280
|
-
if (runTerminalEventTypes.has(event.eventType))
|
|
303
|
+
if (runTerminalEventTypes.has(event.event.eventType))
|
|
281
304
|
return projectRunTerminal(view, event, workId, card);
|
|
282
|
-
if (event.eventType === ExecutionEventType.RunRunnerResultReported)
|
|
283
|
-
return projectRunnerResult(view, workId, card, event.payload.agent?.metadata);
|
|
305
|
+
if (event.event.eventType === ExecutionEventType.RunRunnerResultReported)
|
|
306
|
+
return projectRunnerResult(view, workId, card, event.event.payload.agent?.metadata);
|
|
284
307
|
return view;
|
|
285
308
|
}
|
|
309
|
+
function isRunEventType(event, eventType) {
|
|
310
|
+
return event.event.eventType === eventType;
|
|
311
|
+
}
|
|
312
|
+
function projectRunPreparationStarted(view, event) {
|
|
313
|
+
return projectNewRun(view, event, ActiveRunPhase.Starting);
|
|
314
|
+
}
|
|
286
315
|
function projectRunTerminal(view, event, workId, card) {
|
|
287
316
|
const finishedAt = terminalFinishedAt(event);
|
|
288
317
|
const activeRuns = activeRunsFor(view, card, workId);
|
|
289
318
|
const activeRun = activeRuns[event.stream.id];
|
|
319
|
+
const remainingActiveRuns = withoutActiveRun(activeRuns, event.stream.id);
|
|
290
320
|
const runDurationMs = activeRun === undefined || finishedAt === undefined
|
|
291
321
|
? 0
|
|
292
322
|
: Date.parse(finishedAt) - Date.parse(activeRun.startedAt);
|
|
@@ -301,57 +331,106 @@ function projectRunTerminal(view, event, workId, card) {
|
|
|
301
331
|
...view.cards,
|
|
302
332
|
[workId]: {
|
|
303
333
|
...withoutLegacyActiveRun(card),
|
|
304
|
-
activeRuns:
|
|
334
|
+
activeRuns: remainingActiveRuns,
|
|
305
335
|
...(terminal === undefined ? {} : { lastRunOutcome: terminal.lastRunOutcome }),
|
|
306
|
-
...(
|
|
307
|
-
isChildRun ||
|
|
308
|
-
card.condition === BoardCondition.Finished ||
|
|
309
|
-
terminal.condition === undefined
|
|
336
|
+
...(card.condition === BoardCondition.Finished
|
|
310
337
|
? {}
|
|
311
|
-
:
|
|
338
|
+
: hasPrimaryActiveRun(view, remainingActiveRuns)
|
|
339
|
+
? { condition: BoardCondition.Active }
|
|
340
|
+
: terminal === undefined || isChildRun || terminal.condition === undefined
|
|
341
|
+
? {}
|
|
342
|
+
: { condition: terminal.condition }),
|
|
312
343
|
totalDurationMs: card.totalDurationMs + runDurationMs,
|
|
313
344
|
},
|
|
314
345
|
},
|
|
315
346
|
};
|
|
316
347
|
}
|
|
348
|
+
function hasPrimaryActiveRun(view, activeRuns) {
|
|
349
|
+
return Object.keys(activeRuns).some((runId) => view.childRuns?.[runId] !== true);
|
|
350
|
+
}
|
|
317
351
|
function projectRunStarted(view, event) {
|
|
318
|
-
const workId = view.workflows[event.payload.workflowInstanceId];
|
|
352
|
+
const workId = view.workflows[event.event.payload.workflowInstanceId];
|
|
319
353
|
const card = workId === undefined ? undefined : view.cards[workId];
|
|
320
354
|
if (card === undefined || workId === undefined)
|
|
321
355
|
return view;
|
|
322
356
|
// Same legacy-checkpoint tolerance as the `children` guard in
|
|
323
357
|
// projectWorkflow: a RunStarted event reaches this field independently of
|
|
324
358
|
// that guard, so a checkpoint predating `children` must not crash here either.
|
|
325
|
-
const childAction = view.children?.[event.payload.workflowInstanceId];
|
|
359
|
+
const childAction = view.children?.[event.event.payload.workflowInstanceId];
|
|
326
360
|
const isChildRun = childAction !== undefined;
|
|
327
361
|
const activeRuns = activeRunsFor(view, card, workId);
|
|
362
|
+
const activeRun = activeRuns[event.stream.id];
|
|
363
|
+
if (activeRun !== undefined)
|
|
364
|
+
return {
|
|
365
|
+
...view,
|
|
366
|
+
runs: { ...view.runs, [event.stream.id]: workId },
|
|
367
|
+
...(isChildRun ? { childRuns: { ...view.childRuns, [event.stream.id]: true } } : {}),
|
|
368
|
+
cards: {
|
|
369
|
+
...view.cards,
|
|
370
|
+
[workId]: {
|
|
371
|
+
...withoutLegacyActiveRun(card),
|
|
372
|
+
activeRuns: {
|
|
373
|
+
...activeRuns,
|
|
374
|
+
[event.stream.id]: { ...activeRun, phase: ActiveRunPhase.Started },
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
return projectNewRun(view, event, ActiveRunPhase.Started);
|
|
380
|
+
}
|
|
381
|
+
function projectNewRun(view, event, phase) {
|
|
382
|
+
const target = newRunTarget(view, event);
|
|
383
|
+
if (target === undefined)
|
|
384
|
+
return view;
|
|
385
|
+
const { workId } = target;
|
|
328
386
|
return {
|
|
329
387
|
...view,
|
|
330
388
|
runs: { ...view.runs, [event.stream.id]: workId },
|
|
331
|
-
...(
|
|
389
|
+
...childRunReference(view, event, target.isChildRun),
|
|
332
390
|
cards: {
|
|
333
391
|
...view.cards,
|
|
334
|
-
[workId]:
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
392
|
+
[workId]: newRunCard(view, event, target, phase),
|
|
393
|
+
},
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
function newRunTarget(view, event) {
|
|
397
|
+
const workId = view.workflows[event.event.payload.workflowInstanceId];
|
|
398
|
+
const card = workId === undefined ? undefined : view.cards[workId];
|
|
399
|
+
if (workId === undefined || card === undefined)
|
|
400
|
+
return undefined;
|
|
401
|
+
const childAction = view.children?.[event.event.payload.workflowInstanceId];
|
|
402
|
+
return { workId, card, childAction, isChildRun: childAction !== undefined };
|
|
403
|
+
}
|
|
404
|
+
function childRunReference(view, event, isChildRun) {
|
|
405
|
+
return isChildRun ? { childRuns: { ...view.childRuns, [event.stream.id]: true } } : {};
|
|
406
|
+
}
|
|
407
|
+
function newRunCard(view, event, target, phase) {
|
|
408
|
+
const { card, childAction, isChildRun, workId } = target;
|
|
409
|
+
const activeRuns = activeRunsFor(view, card, workId);
|
|
410
|
+
const alreadyRegistered = view.runs[event.stream.id] !== undefined;
|
|
411
|
+
return {
|
|
412
|
+
...(isChildRun
|
|
413
|
+
? withoutLegacyActiveRun(card)
|
|
414
|
+
: withoutLegacyActiveRun(withoutLastRunOutcome(withoutAwaitingApproval(card)))),
|
|
415
|
+
runCount: alreadyRegistered ? card.runCount : card.runCount + 1,
|
|
416
|
+
...(shouldSetCardActive(card, isChildRun) ? { condition: BoardCondition.Active } : {}),
|
|
417
|
+
lastRunAt: event.event.payload.startedAt,
|
|
418
|
+
activeRuns: {
|
|
419
|
+
...activeRuns,
|
|
420
|
+
[event.stream.id]: newActiveRun(event, childAction, card, phase),
|
|
352
421
|
},
|
|
353
422
|
};
|
|
354
423
|
}
|
|
424
|
+
function newActiveRun(event, childAction, card, phase) {
|
|
425
|
+
return {
|
|
426
|
+
action: childAction ?? event.event.payload.stage ?? card.stage ?? event.event.payload.activity,
|
|
427
|
+
startedAt: event.event.payload.startedAt,
|
|
428
|
+
phase,
|
|
429
|
+
...(event.event.payload.runner?.name === undefined
|
|
430
|
+
? {}
|
|
431
|
+
: { runnerName: event.event.payload.runner.name }),
|
|
432
|
+
};
|
|
433
|
+
}
|
|
355
434
|
function shouldSetCardActive(card, isChildRun) {
|
|
356
435
|
return !isChildRun && card.condition !== BoardCondition.Finished;
|
|
357
436
|
}
|
|
@@ -383,13 +462,19 @@ function withoutAwaitingApproval(card) {
|
|
|
383
462
|
}
|
|
384
463
|
function activeRunsFor(view, card, workId) {
|
|
385
464
|
if (card.activeRuns !== undefined)
|
|
386
|
-
return card.activeRuns
|
|
465
|
+
return Object.fromEntries(Object.entries(card.activeRuns).map(([runId, activeRun]) => [
|
|
466
|
+
runId,
|
|
467
|
+
normalizedActiveRun(activeRun),
|
|
468
|
+
]));
|
|
387
469
|
if (card.activeRun === undefined)
|
|
388
470
|
return {};
|
|
389
471
|
const legacyRunId = Object.entries(view.runs)
|
|
390
472
|
.reverse()
|
|
391
473
|
.find(([, runWorkId]) => runWorkId === workId)?.[0];
|
|
392
|
-
return legacyRunId === undefined ? {} : { [legacyRunId]: card.activeRun };
|
|
474
|
+
return legacyRunId === undefined ? {} : { [legacyRunId]: normalizedActiveRun(card.activeRun) };
|
|
475
|
+
}
|
|
476
|
+
function normalizedActiveRun(activeRun) {
|
|
477
|
+
return { ...activeRun, phase: normalizeBoardActiveRunPhase(activeRun.phase) };
|
|
393
478
|
}
|
|
394
479
|
function withoutActiveRun(activeRuns, runId) {
|
|
395
480
|
const { [runId]: _completed, ...remaining } = activeRuns;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type CheckpointStore, type EventJournal, type ProcessorRunSerialiser, type ProcessorStateStore, type ProjectionStore } from '@atolis-hq/eventing';
|
|
2
|
+
import { createPullRequestService, type ActivityRegistry } from '../activities/index.js';
|
|
3
|
+
import { createControlPlaneService, createRunnerControlService, type ActivationScheduler, type ActivationSchedulerSubscriber, type IntakePipeline, type RunnerPipeline, type ScheduleCheckpointStore } from '../control-plane/index.js';
|
|
4
|
+
import { createConversationService } from '../conversations/index.js';
|
|
5
|
+
import { RecoveryService, TranscriptStore, createExecutionService, type FakeScenarioResolver, type Runner } from '../execution/index.js';
|
|
6
|
+
import type { DeliveryService, DurableFakeDeliveryProvider, ExternalDeliveryAdapter, ProviderCompositionFailure, ProviderInstance } from '../integrations/index.js';
|
|
7
|
+
import { type Clock } from '../kernel/index.js';
|
|
8
|
+
import { createOrchestrationService } from '../orchestration/index.js';
|
|
9
|
+
import { createResourceLookup, createResourceService, type ResourceLinkResolver } from '../resources/index.js';
|
|
10
|
+
import { createWorkService } from '../work/index.js';
|
|
11
|
+
import { type ResolvedWakeModulesConfig } from './config/load-config.js';
|
|
12
|
+
import { EventProcessorRuntime } from './event-processor-runtime.js';
|
|
13
|
+
import { type WakePaths } from './paths.js';
|
|
14
|
+
import type { RuntimeProjectionSubscriptions } from './projection-runtime.js';
|
|
15
|
+
import { type UpdateMaintenanceLease } from './update-maintenance-lease.js';
|
|
16
|
+
export interface CompositionRootOptions {
|
|
17
|
+
readonly config?: ResolvedWakeModulesConfig;
|
|
18
|
+
readonly journal?: EventJournal;
|
|
19
|
+
readonly projections?: ProjectionStore;
|
|
20
|
+
readonly checkpoints?: CheckpointStore;
|
|
21
|
+
readonly processorState?: ProcessorStateStore;
|
|
22
|
+
readonly activities?: ActivityRegistry;
|
|
23
|
+
readonly clock?: Clock;
|
|
24
|
+
readonly transcriptStore?: TranscriptStore;
|
|
25
|
+
/**
|
|
26
|
+
* Optional integration-boundary decorators. They are applied once, before
|
|
27
|
+
* any composed service receives the port, so observability and fault
|
|
28
|
+
* injection can exercise the real production topology without domain hooks.
|
|
29
|
+
*/
|
|
30
|
+
readonly decorateJournal?: (journal: EventJournal) => EventJournal;
|
|
31
|
+
readonly decorateProjections?: (projections: ProjectionStore) => ProjectionStore;
|
|
32
|
+
readonly decorateCheckpoints?: (checkpoints: CheckpointStore) => CheckpointStore;
|
|
33
|
+
readonly subscriptionRunSerialiser?: ProcessorRunSerialiser;
|
|
34
|
+
readonly scheduleCheckpoints?: ScheduleCheckpointStore;
|
|
35
|
+
readonly decorateDeliveryAdapter?: (adapter: ExternalDeliveryAdapter, provider: ProviderInstance) => ExternalDeliveryAdapter;
|
|
36
|
+
readonly decorateRunner?: (runner: Runner, name: string) => Runner;
|
|
37
|
+
/** A real fake-provider adapter for deterministic composed integration evidence. */
|
|
38
|
+
readonly fakeDeliveryProvider?: DurableFakeDeliveryProvider;
|
|
39
|
+
}
|
|
40
|
+
export interface CompositionRoot {
|
|
41
|
+
readonly config: ResolvedWakeModulesConfig;
|
|
42
|
+
readonly fakeScenarios: FakeScenarioResolver;
|
|
43
|
+
readonly paths: WakePaths;
|
|
44
|
+
readonly maintenance: UpdateMaintenanceLease;
|
|
45
|
+
readonly journal: EventJournal;
|
|
46
|
+
readonly projections: ProjectionStore;
|
|
47
|
+
readonly checkpoints: CheckpointStore;
|
|
48
|
+
readonly processorState: ProcessorStateStore;
|
|
49
|
+
readonly activities: ActivityRegistry;
|
|
50
|
+
readonly work: ReturnType<typeof createWorkService>;
|
|
51
|
+
readonly conversations: ReturnType<typeof createConversationService>;
|
|
52
|
+
readonly resources: ReturnType<typeof createResourceService>;
|
|
53
|
+
readonly pullRequests: ReturnType<typeof createPullRequestService>;
|
|
54
|
+
readonly lookup: ReturnType<typeof createResourceLookup>;
|
|
55
|
+
readonly orchestration: ReturnType<typeof createOrchestrationService>;
|
|
56
|
+
readonly execution: ReturnType<typeof createExecutionService>;
|
|
57
|
+
/** Operator-only resolution of a durably escalated ambiguous Run. */
|
|
58
|
+
readonly recovery: RecoveryService;
|
|
59
|
+
readonly transcriptStore?: TranscriptStore;
|
|
60
|
+
readonly runnerControls: ReturnType<typeof createRunnerControlService>;
|
|
61
|
+
readonly controlPlane: ReturnType<typeof createControlPlaneService>;
|
|
62
|
+
/** Shared operator-or-maintenance pause supplier for every resident runtime loop. */
|
|
63
|
+
readonly isPaused: () => Promise<boolean>;
|
|
64
|
+
readonly activationScheduler: ActivationScheduler;
|
|
65
|
+
readonly activationSchedulerSubscriber: ActivationSchedulerSubscriber;
|
|
66
|
+
readonly processorRuntime: EventProcessorRuntime;
|
|
67
|
+
readonly advanceOnce: ActivationScheduler['runOnce'];
|
|
68
|
+
readonly projectionSubscriptions: RuntimeProjectionSubscriptions;
|
|
69
|
+
readonly providers: readonly ProviderInstance[];
|
|
70
|
+
readonly providerFailures: readonly ProviderCompositionFailure[];
|
|
71
|
+
readonly delivery: DeliveryService;
|
|
72
|
+
readonly intakePipeline: IntakePipeline;
|
|
73
|
+
readonly runnerPipeline: RunnerPipeline;
|
|
74
|
+
readonly resolveResourceLink: ResourceLinkResolver;
|
|
75
|
+
}
|
|
76
|
+
export declare function createCompositionRoot(wakeRoot: string, options?: CompositionRootOptions): Promise<CompositionRoot>;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { createPullRequestService } from '../activities/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { DispatchPolicy, createActivationScheduler, createActivationSchedulerSubscriber, createControlPlaneService, createDurableRunnerIneligibility, createRunnerControlService, } from '../control-plane/index.js';
|
|
3
3
|
import { createConversationService } from '../conversations/index.js';
|
|
4
4
|
import { ExecutionCancellationReason, ExternalExecutionState, GitWorkspaceProvider, RecoveryService, TranscriptStore, createExecutionService, createRunnerMemoryProfileDecorator, } from '../execution/index.js';
|
|
5
5
|
import { createGitHubAgentContextReader, gitHubProviderDefinition, resolveGitHubResourceUrl, } from '../integrations/github/index.js';
|
|
6
|
-
import { SystemClock, UlidIdGenerator
|
|
6
|
+
import { SystemClock, UlidIdGenerator } from '../kernel/index.js';
|
|
7
7
|
import { compileWorkflow, createOrchestrationService } from '../orchestration/index.js';
|
|
8
8
|
import { createResourceLookup, createResourceService, resourceId, } from '../resources/index.js';
|
|
9
9
|
import { createWorkService } from '../work/index.js';
|
|
10
|
+
import { createFileActivationSchedulerSerialiser } from './activation-scheduler-serialiser.js';
|
|
10
11
|
import { createBuiltInActivityRegistry } from './activity-registry.js';
|
|
11
12
|
import { loadConfig } from './config/load-config.js';
|
|
13
|
+
import { EventProcessorRuntime } from './event-processor-runtime.js';
|
|
12
14
|
import { loadFakeScenarios } from './fake-scenarios.js';
|
|
13
15
|
import { composeIntegrationRuntime } from './integration-runtime.js';
|
|
14
16
|
import { resolveWakePaths } from './paths.js';
|
|
15
17
|
import { composePersistence } from './persistence-composition.js';
|
|
16
|
-
import { createFileProjectionRunSerialiser, } from './projection-runtime.js';
|
|
17
18
|
import { createRunnerQuotaReporter } from './runner-quota-reporter.js';
|
|
18
19
|
import { createRunnerRegistry } from './runner-registry.js';
|
|
19
20
|
import { FileScheduleCheckpointStore } from './schedule-checkpoint-store.js';
|
|
@@ -33,7 +34,8 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
33
34
|
const maintenance = createUpdateMaintenanceLease(paths.wakeRoot);
|
|
34
35
|
const clock = options.clock ?? new SystemClock();
|
|
35
36
|
const ids = new UlidIdGenerator();
|
|
36
|
-
const { journal, projections, checkpoints } = composePersistence(paths, clock, options);
|
|
37
|
+
const { journal, projections, checkpoints, processorState, subscriptionRunSerialiser } = composePersistence(paths, clock, options);
|
|
38
|
+
const processorRuntime = new EventProcessorRuntime(journal, checkpoints, subscriptionRunSerialiser, clock);
|
|
37
39
|
const work = createWorkService(journal);
|
|
38
40
|
const conversations = createConversationService(journal);
|
|
39
41
|
const lookup = createResourceLookup({ journal, projections });
|
|
@@ -108,7 +110,7 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
108
110
|
ids,
|
|
109
111
|
runners: new Set(Object.values(config.execution.runnerPools).flat()),
|
|
110
112
|
});
|
|
111
|
-
const
|
|
113
|
+
const activationScheduler = createActivationScheduler(orchestration, {
|
|
112
114
|
...execution,
|
|
113
115
|
recoverActive: (owner) => recovery.recoverActive(owner, execution.isLocallyActive),
|
|
114
116
|
}, resources, clock, {
|
|
@@ -116,31 +118,29 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
116
118
|
dispatchPolicy: new DispatchPolicy({ maxDispatches: config.controlPlane.maxDispatches }),
|
|
117
119
|
maxConcurrentRuns: config.controlPlane.maxConcurrentRuns,
|
|
118
120
|
maxDispatches: config.controlPlane.maxDispatches,
|
|
121
|
+
schedulerSerialiser: createFileActivationSchedulerSerialiser(paths.dataRoot),
|
|
119
122
|
isDispatchPaused: isRuntimePaused,
|
|
120
123
|
workspaceRecovery: workspaces,
|
|
121
124
|
work,
|
|
122
125
|
...(transcriptStore === undefined
|
|
123
126
|
? {}
|
|
124
127
|
: createTranscriptRetention(transcriptStore, projections, config, clock)),
|
|
125
|
-
runnerIneligibility:
|
|
126
|
-
const stored = await projections.read(ControlStreamKind.Global, 'global');
|
|
127
|
-
return stored === null
|
|
128
|
-
? new Set()
|
|
129
|
-
: ineligibleRunners(stored.value, clock.now().toISOString());
|
|
130
|
-
},
|
|
128
|
+
runnerIneligibility: createDurableRunnerIneligibility(journal, () => clock.now().toISOString()),
|
|
131
129
|
});
|
|
130
|
+
const advanceOnce = activationScheduler.runOnce.bind(activationScheduler);
|
|
131
|
+
const activationSchedulerSubscriber = createActivationSchedulerSubscriber(activationScheduler);
|
|
132
132
|
const runtime = await composeIntegrationRuntime({
|
|
133
133
|
config,
|
|
134
134
|
journal,
|
|
135
135
|
projections,
|
|
136
136
|
checkpoints,
|
|
137
|
+
processorState,
|
|
137
138
|
resources,
|
|
138
139
|
lookup,
|
|
139
140
|
pullRequests,
|
|
140
141
|
orchestration,
|
|
141
142
|
execution,
|
|
142
143
|
...(transcriptStore === undefined ? {} : { transcriptStore }),
|
|
143
|
-
advanceOnce,
|
|
144
144
|
controlPlane,
|
|
145
145
|
isPaused: isRuntimePaused,
|
|
146
146
|
clock,
|
|
@@ -148,7 +148,8 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
148
148
|
conversations,
|
|
149
149
|
ids,
|
|
150
150
|
wakeRoot,
|
|
151
|
-
|
|
151
|
+
subscriptionRunSerialiser,
|
|
152
|
+
processorRuntime,
|
|
152
153
|
scheduleCheckpoints: options.scheduleCheckpoints ?? new FileScheduleCheckpointStore(paths.dataRoot),
|
|
153
154
|
...(options.decorateDeliveryAdapter === undefined
|
|
154
155
|
? {}
|
|
@@ -158,6 +159,7 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
158
159
|
: { fakeDeliveryProvider: options.fakeDeliveryProvider }),
|
|
159
160
|
providerDefinitions: [gitHubProviderDefinition],
|
|
160
161
|
});
|
|
162
|
+
processorRuntime.register([activationSchedulerSubscriber.processor, ...runtime.processors]);
|
|
161
163
|
return {
|
|
162
164
|
config,
|
|
163
165
|
fakeScenarios,
|
|
@@ -166,10 +168,12 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
166
168
|
journal,
|
|
167
169
|
projections,
|
|
168
170
|
checkpoints,
|
|
171
|
+
processorState,
|
|
169
172
|
activities,
|
|
170
173
|
work,
|
|
171
174
|
conversations,
|
|
172
175
|
resources,
|
|
176
|
+
pullRequests,
|
|
173
177
|
lookup,
|
|
174
178
|
orchestration,
|
|
175
179
|
execution,
|
|
@@ -178,6 +182,9 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
|
|
|
178
182
|
runnerControls,
|
|
179
183
|
controlPlane,
|
|
180
184
|
isPaused: isRuntimePaused,
|
|
185
|
+
activationScheduler,
|
|
186
|
+
activationSchedulerSubscriber,
|
|
187
|
+
processorRuntime,
|
|
181
188
|
advanceOnce,
|
|
182
189
|
resolveResourceLink,
|
|
183
190
|
...runtime,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ResolvedWakeModulesConfig } from './root-schema.js';
|
|
2
|
+
export type { ResolvedWakeModulesConfig } from './root-schema.js';
|
|
3
|
+
export interface TextFileReader {
|
|
4
|
+
readFile(path: string): Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
export declare function loadConfig(wakeRoot: string, fileSystem?: TextFileReader): Promise<ResolvedWakeModulesConfig>;
|