@atolis-hq/wake 0.4.2 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/src/activities/agent/agent-activity-definition.d.ts +9 -0
- package/dist/src/activities/agent/agent-activity.d.ts +51 -0
- package/dist/src/activities/agent/agent-result.d.ts +43 -0
- package/dist/src/activities/contracts/activity.d.ts +184 -0
- package/dist/src/activities/contracts/config.d.ts +3 -0
- package/dist/src/activities/contracts/decision-claim-schema.d.ts +35 -0
- package/dist/src/activities/contracts/decision-claim-schema.js +42 -0
- package/dist/src/activities/contracts/event-factory.d.ts +6 -0
- package/dist/src/activities/contracts/event-factory.js +40 -0
- package/dist/src/activities/contracts/event-integrity.d.ts +61 -0
- package/dist/src/activities/contracts/event-integrity.js +50 -0
- package/dist/src/activities/contracts/event-schema.d.ts +2803 -0
- package/dist/src/activities/contracts/event-schema.js +67 -121
- package/dist/src/activities/contracts/events.d.ts +153 -0
- package/dist/src/activities/contracts/events.js +4 -4
- package/dist/src/activities/contracts/identifiers.d.ts +5 -0
- package/dist/src/activities/contracts/registry.d.ts +19 -0
- package/dist/src/activities/contracts/streams.d.ts +13 -0
- package/dist/src/activities/contracts/vocabulary.d.ts +69 -0
- package/dist/src/activities/index.d.ts +23 -0
- package/dist/src/activities/index.js +1 -0
- package/dist/src/activities/issue/complete.d.ts +26 -0
- package/dist/src/activities/issue/complete.js +5 -5
- package/dist/src/activities/pr/activity-support.d.ts +38 -0
- package/dist/src/activities/pr/activity-support.js +1 -1
- package/dist/src/activities/pr/application.d.ts +17 -0
- package/dist/src/activities/pr/application.js +6 -6
- package/dist/src/activities/pr/approve.d.ts +7 -0
- package/dist/src/activities/pr/approve.js +8 -3
- package/dist/src/activities/pr/capability.d.ts +2 -0
- package/dist/src/activities/pr/contracts.d.ts +133 -0
- package/dist/src/activities/pr/decision-claim.d.ts +26 -0
- package/dist/src/activities/pr/decision-claim.js +50 -30
- package/dist/src/activities/pr/event-data.d.ts +21 -0
- package/dist/src/activities/pr/event-data.js +101 -0
- package/dist/src/activities/pr/intent.d.ts +12 -0
- package/dist/src/activities/pr/intent.js +5 -5
- package/dist/src/activities/pr/merge-authority-gate.d.ts +13 -0
- package/dist/src/activities/pr/merge-authority-gate.js +1 -1
- package/dist/src/activities/pr/merge.d.ts +7 -0
- package/dist/src/activities/pr/merge.js +8 -3
- package/dist/src/activities/pr/policy.d.ts +13 -0
- package/dist/src/activities/pr/projection.d.ts +5 -0
- package/dist/src/activities/pr/projection.js +18 -17
- package/dist/src/activities/pr/vocabulary.d.ts +34 -0
- package/dist/src/activities/review/authorization.d.ts +9 -0
- package/dist/src/activities/review/contracts.d.ts +46 -0
- package/dist/src/activities/review/signals.d.ts +2 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.d.ts +3 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.js +8 -0
- package/dist/src/bootstrap/activity-registry.d.ts +4 -0
- package/dist/src/bootstrap/analytics-projection.d.ts +12 -0
- package/dist/src/bootstrap/analytics-projection.js +3 -3
- package/dist/src/bootstrap/board-projection.d.ts +56 -0
- package/dist/src/bootstrap/board-projection.js +156 -71
- package/dist/src/bootstrap/composition-root.d.ts +76 -0
- package/dist/src/bootstrap/composition-root.js +20 -13
- package/dist/src/bootstrap/config/load-config.d.ts +6 -0
- package/dist/src/bootstrap/config/root-schema.d.ts +443 -0
- package/dist/src/bootstrap/event-processor-runtime.d.ts +22 -0
- package/dist/src/bootstrap/event-processor-runtime.js +88 -0
- package/dist/src/bootstrap/external-ref.d.ts +3 -0
- package/dist/src/bootstrap/fake-provider-files.d.ts +3 -0
- package/dist/src/bootstrap/fake-scenarios.d.ts +3 -0
- package/dist/src/bootstrap/index.d.ts +27 -0
- package/dist/src/bootstrap/index.js +2 -28
- package/dist/src/bootstrap/initialise.d.ts +4 -0
- package/dist/src/bootstrap/initialise.js +8 -16
- package/dist/src/bootstrap/integration-runtime.d.ts +48 -0
- package/dist/src/bootstrap/integration-runtime.js +36 -54
- package/dist/src/bootstrap/paths.d.ts +12 -0
- package/dist/src/bootstrap/persistence-composition.d.ts +21 -0
- package/dist/src/bootstrap/persistence-composition.js +12 -4
- package/dist/src/bootstrap/projection-runtime.d.ts +16 -0
- package/dist/src/bootstrap/projection-runtime.js +50 -23
- package/dist/src/bootstrap/resource-transition-evidence.d.ts +11 -0
- package/dist/src/bootstrap/runner-quota-reporter.d.ts +6 -0
- package/dist/src/bootstrap/runner-quota-reporter.js +16 -11
- package/dist/src/bootstrap/runner-registry.d.ts +3 -0
- package/dist/src/bootstrap/runner-tick-adapter.d.ts +16 -0
- package/dist/src/bootstrap/runner-tick-adapter.js +57 -0
- package/dist/src/bootstrap/schedule-checkpoint-store.d.ts +9 -0
- package/dist/src/bootstrap/self-update-application.d.ts +54 -0
- package/dist/src/bootstrap/self-update-failure-log.d.ts +17 -0
- package/dist/src/bootstrap/source-update-port.d.ts +8 -0
- package/dist/src/bootstrap/status-publish-activity.d.ts +7 -0
- package/dist/src/bootstrap/status-publish-activity.js +4 -5
- package/dist/src/bootstrap/surface-api-applications.d.ts +18 -0
- package/dist/src/bootstrap/surface-api-applications.js +104 -57
- package/dist/src/bootstrap/surface-api-execution-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-execution-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-metadata.d.ts +4 -0
- package/dist/src/bootstrap/surface-api-metadata.js +1 -1
- package/dist/src/bootstrap/surface-api-projection-pages.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-run-context.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-transcripts.d.ts +10 -0
- package/dist/src/bootstrap/surface-api-work-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-work-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-workflow-diagrams.d.ts +11 -0
- package/dist/src/bootstrap/surface-api-workflow-diagrams.js +2 -2
- package/dist/src/bootstrap/surface-applications.d.ts +10 -0
- package/dist/src/bootstrap/surface-cli-applications.d.ts +33 -0
- package/dist/src/bootstrap/surface-cli-applications.js +151 -65
- package/dist/src/bootstrap/transcript-retention.d.ts +11 -0
- package/dist/src/bootstrap/update-ledger.d.ts +9 -0
- package/dist/src/bootstrap/update-maintenance-lease.d.ts +24 -0
- package/dist/src/bootstrap/update-maintenance-lease.js +1 -1
- package/dist/src/bootstrap/version.d.ts +13 -0
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/control-plane/application/activation-scheduler-ports.d.ts +71 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.d.ts +42 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.js +111 -0
- package/dist/src/control-plane/application/activation-scheduler.d.ts +8 -0
- package/dist/src/control-plane/application/activation-scheduler.js +165 -0
- package/dist/src/control-plane/application/advance-once-dispatch.d.ts +46 -0
- package/dist/src/control-plane/application/advance-once-dispatch.js +6 -7
- package/dist/src/control-plane/application/advance-once.d.ts +5 -0
- package/dist/src/control-plane/application/advance-once.js +4 -158
- package/dist/src/control-plane/application/control-plane-projection.d.ts +21 -0
- package/dist/src/control-plane/application/control-plane-projection.js +27 -5
- package/dist/src/control-plane/application/control-plane-service.d.ts +12 -0
- package/dist/src/control-plane/application/control-plane-service.js +28 -9
- package/dist/src/control-plane/application/execution-reconciliation.d.ts +21 -0
- package/dist/src/control-plane/application/intake-pipeline.d.ts +18 -0
- package/dist/src/control-plane/application/intake-pipeline.js +8 -18
- package/dist/src/control-plane/application/runner-control-service.d.ts +12 -0
- package/dist/src/control-plane/application/runner-control-service.js +35 -13
- package/dist/src/control-plane/application/runner-pipeline.d.ts +24 -0
- package/dist/src/control-plane/application/runner-pipeline.js +23 -41
- package/dist/src/control-plane/application/schedule-service.d.ts +31 -0
- package/dist/src/control-plane/application/schedule-service.js +1 -1
- package/dist/src/control-plane/application/work-cancellation-policy.d.ts +20 -0
- package/dist/src/control-plane/application/work-cancellation-policy.js +1 -1
- package/dist/src/control-plane/contracts/commands.d.ts +20 -0
- package/dist/src/control-plane/contracts/config.d.ts +30 -0
- package/dist/src/control-plane/contracts/config.js +7 -1
- package/dist/src/control-plane/contracts/event-factory.d.ts +6 -0
- package/dist/src/control-plane/contracts/event-factory.js +14 -0
- package/dist/src/control-plane/contracts/events.d.ts +36 -0
- package/dist/src/control-plane/contracts/events.js +42 -47
- package/dist/src/control-plane/contracts/streams.d.ts +6 -0
- package/dist/src/control-plane/contracts/views.d.ts +28 -0
- package/dist/src/control-plane/domain/dispatch-policy.d.ts +18 -0
- package/dist/src/control-plane/domain/quota-policy.d.ts +21 -0
- package/dist/src/control-plane/domain/runner-quota.d.ts +2 -0
- package/dist/src/control-plane/domain/schedule-policy.d.ts +8 -0
- package/dist/src/control-plane/index.d.ts +24 -0
- package/dist/src/control-plane/index.js +3 -0
- package/dist/src/control-plane/infrastructure/intake-host.d.ts +19 -0
- package/dist/src/control-plane/infrastructure/intake-host.js +2 -3
- package/dist/src/control-plane/infrastructure/resident-host.d.ts +16 -0
- package/dist/src/control-plane/infrastructure/resident-host.js +3 -1
- package/dist/src/control-plane/infrastructure/tick-host.d.ts +6 -0
- package/dist/src/control-plane/infrastructure/tick-host.js +2 -2
- package/dist/src/conversations/application/conversation-projection.d.ts +3 -0
- package/dist/src/conversations/application/conversation-repository.d.ts +13 -0
- package/dist/src/conversations/application/conversation-repository.js +1 -1
- package/dist/src/conversations/application/conversation-service.d.ts +16 -0
- package/dist/src/conversations/application/conversation-service.js +32 -27
- package/dist/src/conversations/contracts/commands.d.ts +33 -0
- package/dist/src/conversations/contracts/event-factory.d.ts +6 -0
- package/dist/src/conversations/contracts/event-factory.js +18 -0
- package/dist/src/conversations/contracts/events.d.ts +42 -0
- package/dist/src/conversations/contracts/events.js +37 -24
- package/dist/src/conversations/contracts/identifiers.d.ts +5 -0
- package/dist/src/conversations/contracts/streams.d.ts +7 -0
- package/dist/src/conversations/contracts/views.d.ts +49 -0
- package/dist/src/conversations/contracts/vocabulary.d.ts +5 -0
- package/dist/src/conversations/domain/conversation.d.ts +4 -0
- package/dist/src/conversations/domain/conversation.js +8 -7
- package/dist/src/conversations/index.d.ts +9 -0
- package/dist/src/conversations/index.js +1 -0
- package/dist/src/execution/application/activation-claim.d.ts +23 -0
- package/dist/src/execution/application/activation-claim.js +8 -9
- package/dist/src/execution/application/active-run-cancellation.d.ts +4 -0
- package/dist/src/execution/application/active-run-cancellation.js +2 -2
- package/dist/src/execution/application/execution-activity.d.ts +61 -0
- package/dist/src/execution/application/execution-activity.js +4 -1
- package/dist/src/execution/application/execution-projection.d.ts +11 -0
- package/dist/src/execution/application/execution-projection.js +8 -4
- package/dist/src/execution/application/execution-service.d.ts +33 -0
- package/dist/src/execution/application/execution-service.js +288 -59
- package/dist/src/execution/application/execution-validation.d.ts +8 -0
- package/dist/src/execution/application/execution-validation.js +3 -2
- package/dist/src/execution/application/recovery-service.d.ts +52 -0
- package/dist/src/execution/application/recovery-service.js +32 -17
- package/dist/src/execution/application/run-lifecycle.d.ts +75 -0
- package/dist/src/execution/application/run-lifecycle.js +130 -62
- package/dist/src/execution/application/run-liveness-service.d.ts +14 -0
- package/dist/src/execution/application/run-liveness-service.js +68 -30
- package/dist/src/execution/application/run-repository.d.ts +18 -0
- package/dist/src/execution/application/run-repository.js +2 -2
- package/dist/src/execution/contracts/commands.d.ts +30 -0
- package/dist/src/execution/contracts/config.d.ts +94 -0
- package/dist/src/execution/contracts/control-plane.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.js +20 -31
- package/dist/src/execution/contracts/events.d.ts +198 -0
- package/dist/src/execution/contracts/events.js +152 -129
- package/dist/src/execution/contracts/identifiers.d.ts +3 -0
- package/dist/src/execution/contracts/liveness.d.ts +17 -0
- package/dist/src/execution/contracts/results.d.ts +23 -0
- package/dist/src/execution/contracts/runner.d.ts +78 -0
- package/dist/src/execution/contracts/streams.d.ts +12 -0
- package/dist/src/execution/contracts/views.d.ts +42 -0
- package/dist/src/execution/contracts/vocabulary.d.ts +50 -0
- package/dist/src/execution/contracts/vocabulary.js +4 -0
- package/dist/src/execution/contracts/workspace.d.ts +48 -0
- package/dist/src/execution/domain/run-result.d.ts +2 -0
- package/dist/src/execution/domain/run.d.ts +3 -0
- package/dist/src/execution/domain/run.js +72 -22
- package/dist/src/execution/index.d.ts +34 -0
- package/dist/src/execution/infrastructure/agent-runner-adapter.d.ts +2 -0
- package/dist/src/execution/infrastructure/codex-stop-hook.d.ts +13 -0
- package/dist/src/execution/infrastructure/process-execution.d.ts +23 -0
- package/dist/src/execution/infrastructure/prompt-templates.d.ts +15 -0
- package/dist/src/execution/infrastructure/runner-memory-profile.d.ts +11 -0
- package/dist/src/execution/infrastructure/runners/claude.d.ts +34 -0
- package/dist/src/execution/infrastructure/runners/codex.d.ts +13 -0
- package/dist/src/execution/infrastructure/runners/command.d.ts +3 -0
- package/dist/src/execution/infrastructure/runners/cursor.d.ts +12 -0
- package/dist/src/execution/infrastructure/runners/fake-scenarios.d.ts +35 -0
- package/dist/src/execution/infrastructure/runners/fake.d.ts +8 -0
- package/dist/src/execution/infrastructure/runners/registry.d.ts +14 -0
- package/dist/src/execution/infrastructure/transcript-store.d.ts +48 -0
- package/dist/src/execution/infrastructure/transcripts.d.ts +1 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.d.ts +36 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.js +2 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.d.ts +29 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.js +21 -11
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.d.ts +3 -0
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.js +4 -2
- package/dist/src/integrations/application/adapter-health-tracker.d.ts +17 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.d.ts +25 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.js +36 -20
- package/dist/src/integrations/application/artifact-registration-reactor.d.ts +32 -0
- package/dist/src/integrations/application/artifact-registration-reactor.js +43 -35
- package/dist/src/integrations/application/poll-service.d.ts +13 -0
- package/dist/src/integrations/application/poll-service.js +2 -2
- package/dist/src/integrations/application/terminal-agent-run-report.d.ts +33 -0
- package/dist/src/integrations/application/work-admission.d.ts +30 -0
- package/dist/src/integrations/application/work-conclusion.d.ts +13 -0
- package/dist/src/integrations/contracts/artifact-event-factory.d.ts +6 -0
- package/dist/src/integrations/contracts/artifact-event-factory.js +8 -0
- package/dist/src/integrations/contracts/artifact-events.d.ts +31 -0
- package/dist/src/integrations/contracts/artifact-events.js +24 -24
- package/dist/src/integrations/contracts/artifact-vocabulary.d.ts +11 -0
- package/dist/src/integrations/contracts/config.d.ts +13 -0
- package/dist/src/integrations/contracts/identifiers.d.ts +3 -0
- package/dist/src/integrations/contracts/intake-rules.d.ts +15 -0
- package/dist/src/integrations/contracts/intake.d.ts +15 -0
- package/dist/src/integrations/contracts/outcome-vocabulary.d.ts +6 -0
- package/dist/src/integrations/contracts/provider.d.ts +105 -0
- package/dist/src/integrations/contracts/reply-routing.d.ts +31 -0
- package/dist/src/integrations/contracts/streams.d.ts +12 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.d.ts +24 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.js +151 -73
- package/dist/src/integrations/delivery/application/delivery-projector.d.ts +5 -0
- package/dist/src/integrations/delivery/application/delivery-projector.js +52 -52
- package/dist/src/integrations/delivery/application/delivery-service.d.ts +40 -0
- package/dist/src/integrations/delivery/application/delivery-service.js +15 -16
- package/dist/src/integrations/delivery/contracts/commands.d.ts +7 -0
- package/dist/src/integrations/delivery/contracts/config.d.ts +25 -0
- package/dist/src/integrations/delivery/contracts/event-factory.d.ts +11 -0
- package/dist/src/integrations/delivery/contracts/event-factory.js +20 -9
- package/dist/src/integrations/delivery/contracts/events.d.ts +46 -0
- package/dist/src/integrations/delivery/contracts/events.js +33 -18
- package/dist/src/integrations/delivery/contracts/intents.d.ts +54 -0
- package/dist/src/integrations/delivery/contracts/intents.js +21 -14
- package/dist/src/integrations/delivery/contracts/views.d.ts +47 -0
- package/dist/src/integrations/delivery/contracts/vocabulary.d.ts +25 -0
- package/dist/src/integrations/fake/durable-delivery-provider.d.ts +29 -0
- package/dist/src/integrations/fake/external-sink.d.ts +5 -0
- package/dist/src/integrations/fake/external-source.d.ts +30 -0
- package/dist/src/integrations/fake/external-source.js +1 -3
- package/dist/src/integrations/fake/inbound-translator.d.ts +16 -0
- package/dist/src/integrations/fake/inbound-translator.js +22 -10
- package/dist/src/integrations/fake/provider.d.ts +38 -0
- package/dist/src/integrations/fake/provider.js +3 -1
- package/dist/src/integrations/github/application/agent-context-reader.d.ts +6 -0
- package/dist/src/integrations/github/application/agent-context-reader.js +10 -7
- package/dist/src/integrations/github/application/agent-run-comment.d.ts +22 -0
- package/dist/src/integrations/github/application/comment-history-reader.d.ts +25 -0
- package/dist/src/integrations/github/application/comment-history-reader.js +36 -32
- package/dist/src/integrations/github/application/delivery-marker.d.ts +2 -0
- package/dist/src/integrations/github/application/inbound-comment-syntax.d.ts +8 -0
- package/dist/src/integrations/github/application/inbound-context.d.ts +3 -0
- package/dist/src/integrations/github/application/inbound-context.js +4 -4
- package/dist/src/integrations/github/application/inbound-review-signals.d.ts +21 -0
- package/dist/src/integrations/github/application/inbound-review-signals.js +30 -25
- package/dist/src/integrations/github/application/inbound-translator.d.ts +103 -0
- package/dist/src/integrations/github/application/inbound-translator.js +149 -160
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.d.ts +10 -0
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.js +4 -4
- package/dist/src/integrations/github/application/intake-policy.d.ts +7 -0
- package/dist/src/integrations/github/application/operator-retry-command.d.ts +1 -0
- package/dist/src/integrations/github/application/outbound-translator.d.ts +19 -0
- package/dist/src/integrations/github/application/poll-service.d.ts +11 -0
- package/dist/src/integrations/github/application/poll-service.js +11 -2
- package/dist/src/integrations/github/application/pull-request-translation.d.ts +5 -0
- package/dist/src/integrations/github/application/reply-target-selector.d.ts +8 -0
- package/dist/src/integrations/github/application/resource-links.d.ts +2 -0
- package/dist/src/integrations/github/application/review-command-translator.d.ts +14 -0
- package/dist/src/integrations/github/application/wake-labels.d.ts +29 -0
- package/dist/src/integrations/github/contracts/check-evidence.d.ts +1 -0
- package/dist/src/integrations/github/contracts/config.d.ts +81 -0
- package/dist/src/integrations/github/contracts/event-factory.d.ts +6 -0
- package/dist/src/integrations/github/contracts/event-factory.js +26 -0
- package/dist/src/integrations/github/contracts/events.d.ts +135 -0
- package/dist/src/integrations/github/contracts/events.js +118 -132
- package/dist/src/integrations/github/contracts/external-key.d.ts +8 -0
- package/dist/src/integrations/github/contracts/issue-query.d.ts +5 -0
- package/dist/src/integrations/github/contracts/payloads.d.ts +74 -0
- package/dist/src/integrations/github/contracts/vocabulary.d.ts +64 -0
- package/dist/src/integrations/github/index.d.ts +34 -0
- package/dist/src/integrations/github/index.js +1 -0
- package/dist/src/integrations/github/infrastructure/adapter-health-registry.d.ts +11 -0
- package/dist/src/integrations/github/infrastructure/bounded-fetch.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/client-reads.d.ts +255 -0
- package/dist/src/integrations/github/infrastructure/client.d.ts +263 -0
- package/dist/src/integrations/github/infrastructure/comment-source.d.ts +7 -0
- package/dist/src/integrations/github/infrastructure/content-fingerprint.d.ts +2 -0
- package/dist/src/integrations/github/infrastructure/delivery.d.ts +6 -0
- package/dist/src/integrations/github/infrastructure/etag-cache.d.ts +29 -0
- package/dist/src/integrations/github/infrastructure/gh-auth.d.ts +4 -0
- package/dist/src/integrations/github/infrastructure/issue-source.d.ts +20 -0
- package/dist/src/integrations/github/infrastructure/issue-source.js +10 -6
- package/dist/src/integrations/github/infrastructure/poll-watermark.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/pr-source.d.ts +16 -0
- package/dist/src/integrations/github/infrastructure/pr-source.js +6 -4
- package/dist/src/integrations/github/infrastructure/request-coordinator.d.ts +13 -0
- package/dist/src/integrations/github/infrastructure/review-source.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/review-source.js +29 -25
- package/dist/src/integrations/github/infrastructure/source-contracts.d.ts +22 -0
- package/dist/src/integrations/github/infrastructure/source.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/source.js +3 -5
- package/dist/src/integrations/github/provider.d.ts +3 -0
- package/dist/src/integrations/github/provider.js +14 -12
- package/dist/src/integrations/index.d.ts +32 -0
- package/dist/src/integrations/index.js +1 -0
- package/dist/src/kernel/contracts/clock.d.ts +3 -0
- package/dist/src/kernel/contracts/id-generator.d.ts +3 -0
- package/dist/src/kernel/contracts/identifiers.d.ts +7 -0
- package/dist/src/kernel/contracts/identifiers.js +1 -8
- package/dist/src/kernel/contracts/relations.d.ts +14 -0
- package/dist/src/kernel/contracts/schema.d.ts +3 -0
- package/dist/src/kernel/contracts/vocabulary.d.ts +7 -0
- package/dist/src/kernel/domain/match-mode.d.ts +2 -0
- package/dist/src/kernel/domain/relation.d.ts +9 -0
- package/dist/src/kernel/index.d.ts +10 -0
- package/dist/src/kernel/index.js +0 -11
- package/dist/src/kernel/infrastructure/system-clock.d.ts +4 -0
- package/dist/src/kernel/infrastructure/ulid-id-generator.d.ts +4 -0
- package/dist/src/main.d.ts +15 -0
- package/dist/src/main.js +8 -2
- package/dist/src/node_modules/@atolis-hq/eventing/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing/README.md +41 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts +13 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts.map +1 -0
- package/dist/src/{kernel/domain → node_modules/@atolis-hq/eventing/dist/contracts}/event-envelope.js +4 -4
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts.map +1 -0
- package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/event-schema.js +21 -5
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts +46 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.js +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.js +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.js +26 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.js +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts.map +1 -0
- package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-projection-store.js +2 -1
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts.map +1 -0
- package/dist/src/{kernel/infrastructure/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.js} +5 -2
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.js +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts +22 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.js +24 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts +39 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.js +168 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.js +66 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts +2 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.js +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts +14 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts +49 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/package.json +42 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/README.md +40 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts +23 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.js +54 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.js +50 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.js +99 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts +51 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-event-journal.js +185 -103
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-lock.js +10 -1
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts +12 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.js +127 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.js +219 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.js +27 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.js +28 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.js +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/package.json +38 -0
- package/dist/src/orchestration/application/accept-activity-outcome.d.ts +18 -0
- package/dist/src/orchestration/application/accept-signal.d.ts +14 -0
- package/dist/src/orchestration/application/advance-workflow.d.ts +50 -0
- package/dist/src/orchestration/application/advance-workflow.js +7 -12
- package/dist/src/orchestration/application/coordination-claims.d.ts +17 -0
- package/dist/src/orchestration/application/coordination-claims.js +17 -20
- package/dist/src/orchestration/application/durable-append.d.ts +17 -0
- package/dist/src/orchestration/application/durable-append.js +1 -1
- package/dist/src/orchestration/application/group-budget-recorder.d.ts +9 -0
- package/dist/src/orchestration/application/group-budget-recorder.js +9 -6
- package/dist/src/orchestration/application/orchestration-projection.d.ts +6 -0
- package/dist/src/orchestration/application/orchestration-projection.js +6 -7
- package/dist/src/orchestration/application/orchestration-repository.d.ts +23 -0
- package/dist/src/orchestration/application/orchestration-repository.js +2 -2
- package/dist/src/orchestration/application/orchestration-service.d.ts +93 -0
- package/dist/src/orchestration/application/orchestration-service.js +10 -1
- package/dist/src/orchestration/application/pull-request-transition-evidence.d.ts +3 -0
- package/dist/src/orchestration/application/pull-request-transition-evidence.js +10 -10
- package/dist/src/orchestration/application/reactor-command-context.d.ts +5 -0
- package/dist/src/orchestration/application/reactor-command-context.js +9 -0
- package/dist/src/orchestration/application/request-child.d.ts +29 -0
- package/dist/src/orchestration/application/request-child.js +26 -10
- package/dist/src/orchestration/application/resource-transition-evidence.d.ts +18 -0
- package/dist/src/orchestration/application/resource-transition-matching.d.ts +19 -0
- package/dist/src/orchestration/application/resource-transition-matching.js +9 -3
- package/dist/src/orchestration/application/resource-transition-reactor.d.ts +16 -0
- package/dist/src/orchestration/application/resource-transition-reactor.js +21 -42
- package/dist/src/orchestration/application/signal-reactor.d.ts +11 -0
- package/dist/src/orchestration/application/start-workflow.d.ts +18 -0
- package/dist/src/orchestration/application/start-workflow.js +3 -4
- package/dist/src/orchestration/application/trigger-workflow-instance.d.ts +12 -0
- package/dist/src/orchestration/application/trigger-workflow-instance.js +1 -1
- package/dist/src/orchestration/application/watch-child-transitions.d.ts +2 -0
- package/dist/src/orchestration/application/watch-matching.d.ts +13 -0
- package/dist/src/orchestration/application/watch-matching.js +3 -3
- package/dist/src/orchestration/application/watch-reactor.d.ts +42 -0
- package/dist/src/orchestration/application/watch-reactor.js +36 -35
- package/dist/src/orchestration/application/workflow-definition-registry.d.ts +32 -0
- package/dist/src/orchestration/application/workflow-definition-registry.js +13 -11
- package/dist/src/orchestration/contracts/activity-outcome.d.ts +15 -0
- package/dist/src/orchestration/contracts/commands.d.ts +30 -0
- package/dist/src/orchestration/contracts/config.d.ts +356 -0
- package/dist/src/orchestration/contracts/event-decoder.d.ts +262 -0
- package/dist/src/orchestration/contracts/event-decoder.js +88 -64
- package/dist/src/orchestration/contracts/event-factory.d.ts +6 -0
- package/dist/src/orchestration/contracts/event-factory.js +64 -0
- package/dist/src/orchestration/contracts/events.d.ts +233 -0
- package/dist/src/orchestration/contracts/identifiers.d.ts +15 -0
- package/dist/src/orchestration/contracts/streams.d.ts +28 -0
- package/dist/src/orchestration/contracts/views.d.ts +68 -0
- package/dist/src/orchestration/contracts/vocabulary.d.ts +34 -0
- package/dist/src/orchestration/domain/activation-policy.d.ts +60 -0
- package/dist/src/orchestration/domain/activation-policy.js +34 -19
- package/dist/src/orchestration/domain/approval-defaults.d.ts +8 -0
- package/dist/src/orchestration/domain/child-policy.d.ts +20 -0
- package/dist/src/orchestration/domain/compiler.d.ts +3 -0
- package/dist/src/orchestration/domain/coordination-events.d.ts +18 -0
- package/dist/src/orchestration/domain/coordination-events.js +25 -11
- package/dist/src/orchestration/domain/decision-events.d.ts +33 -0
- package/dist/src/orchestration/domain/decision-events.js +26 -15
- package/dist/src/orchestration/domain/interpreter.d.ts +14 -0
- package/dist/src/orchestration/domain/interpreter.js +4 -1
- package/dist/src/orchestration/domain/operator-retry-policy.d.ts +14 -0
- package/dist/src/orchestration/domain/operator-retry-policy.js +29 -11
- package/dist/src/orchestration/domain/resource-transition-compiler.d.ts +8 -0
- package/dist/src/orchestration/domain/retry-policy.d.ts +7 -0
- package/dist/src/orchestration/domain/retry-policy.js +7 -4
- package/dist/src/orchestration/domain/runner-quota-retry-policy.d.ts +10 -0
- package/dist/src/orchestration/domain/runner-quota-retry-policy.js +21 -15
- package/dist/src/orchestration/domain/signal-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/signal-policy.js +18 -7
- package/dist/src/orchestration/domain/supplemental-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/supplemental-policy.js +29 -14
- package/dist/src/orchestration/domain/transition.d.ts +16 -0
- package/dist/src/orchestration/domain/transition.js +46 -28
- package/dist/src/orchestration/domain/workflow-graph.d.ts +4 -0
- package/dist/src/orchestration/domain/workflow-instance-events.d.ts +44 -0
- package/dist/src/orchestration/domain/workflow-instance.d.ts +7 -0
- package/dist/src/orchestration/domain/workflow-instance.js +29 -9
- package/dist/src/orchestration/domain/workflow-selector.d.ts +15 -0
- package/dist/src/orchestration/index.d.ts +27 -0
- package/dist/src/orchestration/index.js +1 -0
- package/dist/src/resources/application/lookup-projections.d.ts +6 -0
- package/dist/src/resources/application/lookup-projections.js +15 -15
- package/dist/src/resources/application/resource-correlation-retry.d.ts +16 -0
- package/dist/src/resources/application/resource-correlation-retry.js +39 -44
- package/dist/src/resources/application/resource-event-support.d.ts +12 -0
- package/dist/src/resources/application/resource-event-support.js +17 -0
- package/dist/src/resources/application/resource-lookup.d.ts +17 -0
- package/dist/src/resources/application/resource-lookup.js +9 -9
- package/dist/src/resources/application/resource-projections.d.ts +4 -0
- package/dist/src/resources/application/resource-projections.js +32 -24
- package/dist/src/resources/application/resource-repository.d.ts +16 -0
- package/dist/src/resources/application/resource-repository.js +3 -3
- package/dist/src/resources/application/resource-service.d.ts +34 -0
- package/dist/src/resources/application/resource-service.js +73 -52
- package/dist/src/resources/contracts/commands.d.ts +23 -0
- package/dist/src/resources/contracts/config.d.ts +3 -0
- package/dist/src/resources/contracts/event-factory.d.ts +6 -0
- package/dist/src/resources/contracts/event-factory.js +32 -0
- package/dist/src/resources/contracts/events.d.ts +79 -0
- package/dist/src/resources/contracts/events.js +94 -102
- package/dist/src/resources/contracts/identifiers.d.ts +7 -0
- package/dist/src/resources/contracts/streams.d.ts +8 -0
- package/dist/src/resources/contracts/views.d.ts +35 -0
- package/dist/src/resources/contracts/vocabulary.d.ts +50 -0
- package/dist/src/resources/domain/correlation.d.ts +6 -0
- package/dist/src/resources/domain/resource.d.ts +8 -0
- package/dist/src/resources/domain/resource.js +24 -21
- package/dist/src/resources/index.d.ts +15 -0
- package/dist/src/resources/index.js +1 -0
- package/dist/src/surfaces/api/contracts/activities.d.ts +1 -0
- package/dist/src/surfaces/api/contracts/board.d.ts +46 -0
- package/dist/src/surfaces/api/contracts/board.js +1 -1
- package/dist/src/surfaces/api/contracts/common.d.ts +43 -0
- package/dist/src/surfaces/api/contracts/control-plane.d.ts +37 -0
- package/dist/src/surfaces/api/contracts/events.d.ts +13 -0
- package/dist/src/surfaces/api/contracts/execution.d.ts +67 -0
- package/dist/src/surfaces/api/contracts/index.d.ts +14 -0
- package/dist/src/surfaces/api/contracts/observability.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/orchestration.d.ts +16 -0
- package/dist/src/surfaces/api/contracts/resources.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/status.d.ts +4 -0
- package/dist/src/surfaces/api/contracts/system.d.ts +32 -0
- package/dist/src/surfaces/api/contracts/transport-values.d.ts +50 -0
- package/dist/src/surfaces/api/contracts/transport-values.js +6 -0
- package/dist/src/surfaces/api/contracts/work.d.ts +74 -0
- package/dist/src/surfaces/api/contracts/workflow-diagram.d.ts +64 -0
- package/dist/src/surfaces/api/http-server.d.ts +33 -0
- package/dist/src/surfaces/api/http-server.js +2 -2
- package/dist/src/surfaces/api/presenters/activities.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/board.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/events.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/execution.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/execution.js +5 -2
- package/dist/src/surfaces/api/presenters/observability.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/orchestration.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/resources.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/status.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/system.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/work.d.ts +4 -0
- package/dist/src/surfaces/api/problem-details.d.ts +2 -0
- package/dist/src/surfaces/api/router.d.ts +8 -0
- package/dist/src/surfaces/api/routes/activities.d.ts +1 -0
- package/dist/src/surfaces/api/routes/applications.d.ts +88 -0
- package/dist/src/surfaces/api/routes/commands.d.ts +3 -0
- package/dist/src/surfaces/api/routes/commands.js +1 -3
- package/dist/src/surfaces/api/routes/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/routes/control-plane.js +0 -1
- package/dist/src/surfaces/api/routes/events.d.ts +1 -0
- package/dist/src/surfaces/api/routes/execution.d.ts +1 -0
- package/dist/src/surfaces/api/routes/index.d.ts +4 -0
- package/dist/src/surfaces/api/routes/observability.d.ts +1 -0
- package/dist/src/surfaces/api/routes/orchestration.d.ts +1 -0
- package/dist/src/surfaces/api/routes/pagination.d.ts +5 -0
- package/dist/src/surfaces/api/routes/read.d.ts +3 -0
- package/dist/src/surfaces/api/routes/resources.d.ts +1 -0
- package/dist/src/surfaces/api/routes/responses.d.ts +15 -0
- package/dist/src/surfaces/api/routes/system.d.ts +1 -0
- package/dist/src/surfaces/api/routes/work.d.ts +1 -0
- package/dist/src/surfaces/auth/credentials.d.ts +22 -0
- package/dist/src/surfaces/auth/credentials.js +8 -12
- package/dist/src/surfaces/auth/vocabulary.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/api.d.ts +4 -0
- package/dist/src/surfaces/cli/commands/audit.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/audit.js +11 -2
- package/dist/src/surfaces/cli/commands/correlate.d.ts +7 -0
- package/dist/src/surfaces/cli/commands/doctor.d.ts +24 -0
- package/dist/src/surfaces/cli/commands/init.d.ts +2 -0
- package/dist/src/surfaces/cli/commands/sandbox-entrypoint.d.ts +43 -0
- package/dist/src/surfaces/cli/commands/sandbox-setup.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/sandbox.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/self-update.d.ts +15 -0
- package/dist/src/surfaces/cli/commands/smoke.d.ts +14 -0
- package/dist/src/surfaces/cli/commands/start.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/stop.d.ts +11 -0
- package/dist/src/surfaces/cli/commands/tick.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/ui.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/validate-state.d.ts +13 -0
- package/dist/src/surfaces/cli/infrastructure/docker-cli.d.ts +66 -0
- package/dist/src/surfaces/cli/infrastructure/docker-invocation.d.ts +14 -0
- package/dist/src/surfaces/cli/infrastructure/process-log.d.ts +35 -0
- package/dist/src/surfaces/cli/infrastructure/resident-start.d.ts +10 -0
- package/dist/src/surfaces/cli/main.d.ts +115 -0
- package/dist/src/surfaces/cli/usage.d.ts +1 -0
- package/dist/src/surfaces/contracts/config.d.ts +51 -0
- package/dist/src/surfaces/index.d.ts +49 -0
- package/dist/src/surfaces/web-assets/assets/index-D9xGa5tD.css +1 -0
- package/dist/src/surfaces/web-assets/assets/index-qai1Ymhv.js +1179 -0
- package/dist/src/surfaces/web-assets/index.html +2 -2
- package/dist/src/surfaces/web-host/asset-source.d.ts +9 -0
- package/dist/src/surfaces/web-host/packaged-assets.d.ts +8 -0
- package/dist/src/work/application/work-projection.d.ts +3 -0
- package/dist/src/work/application/work-projection.js +4 -4
- package/dist/src/work/application/work-repository.d.ts +15 -0
- package/dist/src/work/application/work-repository.js +2 -2
- package/dist/src/work/application/work-service.d.ts +18 -0
- package/dist/src/work/application/work-service.js +70 -31
- package/dist/src/work/contracts/commands.d.ts +15 -0
- package/dist/src/work/contracts/config.d.ts +3 -0
- package/dist/src/work/contracts/event-factory.d.ts +6 -0
- package/dist/src/work/contracts/event-factory.js +26 -0
- package/dist/src/work/contracts/events.d.ts +46 -0
- package/dist/src/work/contracts/events.js +54 -60
- package/dist/src/work/contracts/identifiers.d.ts +3 -0
- package/dist/src/work/contracts/streams.d.ts +8 -0
- package/dist/src/work/contracts/views.d.ts +18 -0
- package/dist/src/work/contracts/vocabulary.d.ts +7 -0
- package/dist/src/work/domain/work-item.d.ts +3 -0
- package/dist/src/work/domain/work-item.js +10 -7
- package/dist/src/work/index.d.ts +12 -0
- package/dist/src/work/index.js +1 -0
- package/docker/Dockerfile +9 -7
- package/docker/Dockerfile.packaged +4 -6
- package/package.json +24 -24
- package/dist/src/activities/pr/event-drafts.js +0 -66
- package/dist/src/kernel/contracts/events.js +0 -11
- package/dist/src/kernel/infrastructure/cached-journal-view.js +0 -27
- package/dist/src/persistence/application/projection-runner.js +0 -128
- package/dist/src/persistence/filesystem/file-checkpoint-store.js +0 -50
- package/dist/src/persistence/filesystem/file-projection-store.js +0 -137
- package/dist/src/persistence/index.js +0 -8
- package/dist/src/persistence/memory/in-memory-event-journal.js +0 -99
- package/dist/src/surfaces/web-assets/assets/index-B0ofn_L5.css +0 -1
- package/dist/src/surfaces/web-assets/assets/index-DFBhpSSX.js +0 -1179
- /package/dist/src/control-plane/application/{advance-once-ports.js → activation-scheduler-ports.js} +0 -0
- /package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/commands.js +0 -0
- /package/dist/src/{kernel/contracts/checkpoint-store.js → node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.js} +0 -0
- /package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-checkpoint-store.js +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/projections}/projection-store.js +0 -0
- /package/dist/src/{kernel/contracts/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/runtime/clock.js} +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/store}/event-journal.js +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { UpdateLedger } from './update-ledger.js';
|
|
2
|
+
import { UpdateMaintenancePhase, type UpdateMaintenanceState } from './update-maintenance-lease.js';
|
|
3
|
+
export interface SourceUpdatePort {
|
|
4
|
+
isClean(): Promise<boolean>;
|
|
5
|
+
latestTag(): Promise<string>;
|
|
6
|
+
candidateTags(): Promise<readonly string[]>;
|
|
7
|
+
checkout(tag: string): Promise<void>;
|
|
8
|
+
healthy(): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Optional Docker rollout alongside the source checkout — build+swap the
|
|
12
|
+
* sandbox container onto the new tag, roll it back on a failed deploy, and
|
|
13
|
+
* best-effort record the failure for the operator health screen. Absent for
|
|
14
|
+
* non-sandbox self-updates.
|
|
15
|
+
*/
|
|
16
|
+
export interface SelfUpdateRolloutPort {
|
|
17
|
+
deploy(tag: string): Promise<void>;
|
|
18
|
+
rollback(tag: string): Promise<void>;
|
|
19
|
+
recordFailure(tag: string, error: unknown): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Coordinates the update's maintenance window with the running Control Plane.
|
|
23
|
+
* `acquire` must durably block dispatch before the first active-run read, and
|
|
24
|
+
* activeRuns must include every active or ambiguous Run. Cancellation must
|
|
25
|
+
* durably record every supplied Run's maintenance request.
|
|
26
|
+
*/
|
|
27
|
+
export interface SelfUpdateQuiescePort {
|
|
28
|
+
acquire(tag: string, retryFailed?: boolean): Promise<UpdateMaintenanceState>;
|
|
29
|
+
exclusive?<Value>(tag: string, retryFailed: boolean, operation: (state: UpdateMaintenanceState) => Promise<Value>): Promise<Value>;
|
|
30
|
+
activeRuns(): Promise<readonly {
|
|
31
|
+
readonly runId: string;
|
|
32
|
+
readonly maintenanceCancellable: boolean;
|
|
33
|
+
}[]>;
|
|
34
|
+
requestMaintenanceCancellation(runIds: readonly string[]): Promise<void>;
|
|
35
|
+
sleep(milliseconds: number): Promise<void>;
|
|
36
|
+
now(): number;
|
|
37
|
+
fail(error: unknown, attemptId?: string): Promise<void>;
|
|
38
|
+
transition(phase: Exclude<UpdateMaintenancePhase, typeof UpdateMaintenancePhase.Failed>, attemptId?: string): Promise<void>;
|
|
39
|
+
clear(attemptId?: string): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
export declare function createSelfUpdateApplication(input: {
|
|
42
|
+
readonly ledger: UpdateLedger;
|
|
43
|
+
readonly source: SourceUpdatePort;
|
|
44
|
+
readonly rollout?: SelfUpdateRolloutPort;
|
|
45
|
+
readonly quiesce?: SelfUpdateQuiescePort;
|
|
46
|
+
readonly drainTimeoutMs?: number;
|
|
47
|
+
readonly cancellationTimeoutMs?: number;
|
|
48
|
+
}): {
|
|
49
|
+
update(tag: string, force?: boolean): Promise<boolean>;
|
|
50
|
+
updateLatest(force?: boolean): Promise<{
|
|
51
|
+
readonly tag: string;
|
|
52
|
+
readonly updated: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SelfUpdateFailure {
|
|
2
|
+
readonly tag: string;
|
|
3
|
+
readonly message: string;
|
|
4
|
+
readonly occurredAt: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelfUpdateFailureLog {
|
|
7
|
+
record(tag: string, error: unknown): Promise<void>;
|
|
8
|
+
clear(): Promise<void>;
|
|
9
|
+
read(): Promise<SelfUpdateFailure | null>;
|
|
10
|
+
}
|
|
11
|
+
export declare function describeSelfUpdateFailure(failure: SelfUpdateFailure): string;
|
|
12
|
+
/**
|
|
13
|
+
* Persists the most recent self-update rollback so it can surface on the
|
|
14
|
+
* operator health screen instead of relying on a third-party notification —
|
|
15
|
+
* cleared the moment a later deploy succeeds.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSelfUpdateFailureLog(wakeRoot: string, now?: () => string): SelfUpdateFailureLog;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SourceUpdatePort } from './self-update-application.js';
|
|
2
|
+
export interface SourceUpdateProcess {
|
|
3
|
+
execute(command: string, args: readonly string[], cwd: string): Promise<string>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createSourceUpdatePort(input: {
|
|
6
|
+
readonly repoRoot: string;
|
|
7
|
+
readonly execute?: SourceUpdateProcess['execute'];
|
|
8
|
+
}): SourceUpdatePort;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type EventJournal } from '@atolis-hq/eventing';
|
|
2
|
+
import { activityName, ActivityOutcomeKind, type ActivityDefinition } from '../activities/index.js';
|
|
3
|
+
export declare function createStatusPublishActivity(journal: EventJournal): ActivityDefinition<ReturnType<typeof activityName>, {
|
|
4
|
+
body: string;
|
|
5
|
+
}, {
|
|
6
|
+
kind: typeof ActivityOutcomeKind.Done;
|
|
7
|
+
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { EventActorKind, EventSourceKind } from '@atolis-hq/eventing';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { ActivityExecutionKind, activityName, ActivityOutcomeKind, } from '../activities/index.js';
|
|
3
|
-
import { DeliveryIntentEventType } from '../integrations/index.js';
|
|
4
|
-
import { createEventDraft, EventActorKind, EventSourceKind, } from '../kernel/index.js';
|
|
4
|
+
import { createDeliveryIntentEventData, DeliveryIntentEventType } from '../integrations/index.js';
|
|
5
5
|
import { resourceStream } from '../resources/index.js';
|
|
6
6
|
export function createStatusPublishActivity(journal) {
|
|
7
7
|
return {
|
|
@@ -17,8 +17,8 @@ export function createStatusPublishActivity(journal) {
|
|
|
17
17
|
if (resource === undefined)
|
|
18
18
|
throw new Error('status.publish requires an intake resource');
|
|
19
19
|
const sequence = (await journal.readStream(resourceStream(resource.resourceId))).length;
|
|
20
|
-
await journal.
|
|
21
|
-
|
|
20
|
+
await journal.appendToStream(resourceStream(resource.resourceId), sequence, [
|
|
21
|
+
createDeliveryIntentEventData({
|
|
22
22
|
eventId: `${invocation.activationId}:status.publish`,
|
|
23
23
|
eventType: DeliveryIntentEventType.StatusPublishRequested,
|
|
24
24
|
occurredAt: new Date().toISOString(),
|
|
@@ -26,7 +26,6 @@ export function createStatusPublishActivity(journal) {
|
|
|
26
26
|
causationId: invocation.causationId,
|
|
27
27
|
actor: { kind: EventActorKind.System, id: 'status.publish' },
|
|
28
28
|
source: { kind: EventSourceKind.Internal, id: 'status.publish' },
|
|
29
|
-
stream: resourceStream(resource.resourceId),
|
|
30
29
|
payload: {
|
|
31
30
|
workflowInstanceId: invocation.workflowInstanceId,
|
|
32
31
|
activationId: invocation.activationId,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ApiApplications } from '../surfaces/index.js';
|
|
2
|
+
import type { CompositionRoot } from './composition-root.js';
|
|
3
|
+
export declare function createSurfaceApiApplications(root: CompositionRoot, now: () => string): ApiApplications;
|
|
4
|
+
export declare function readControlPlaneStatus(root: CompositionRoot, now: () => string): Promise<{
|
|
5
|
+
data: {
|
|
6
|
+
maintenanceLease?: {
|
|
7
|
+
failure?: string;
|
|
8
|
+
phase: import("./update-maintenance-lease.js").UpdateMaintenancePhase;
|
|
9
|
+
startedAt: string;
|
|
10
|
+
};
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
reason?: string;
|
|
13
|
+
pausedUntil?: string;
|
|
14
|
+
paused: boolean;
|
|
15
|
+
};
|
|
16
|
+
meta: import("../surfaces/index.js").ResponseMeta;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function elapsedSince(timestamp: string, nowMs: number): number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ControlStreamKind } from '../control-plane/index.js';
|
|
1
|
+
import { ActivationSchedulerSubscriptionStatus, ControlStreamKind, } from '../control-plane/index.js';
|
|
2
2
|
import { ApiCommandStatus, fromWorkItemKey, presentBoardCard, presentResource, presentStatus, presentWorkflowInstance, redactConfiguration, } from '../surfaces/index.js';
|
|
3
3
|
import { analyticsProjection } from './analytics-projection.js';
|
|
4
|
-
import { boardConditionCounts, boardProjection, } from './board-projection.js';
|
|
4
|
+
import { boardConditionCounts, boardProjection, normalizeBoardActiveRunPhase, } from './board-projection.js';
|
|
5
5
|
import { primaryExternalRef } from './external-ref.js';
|
|
6
6
|
import { createSelfUpdateFailureLog, describeSelfUpdateFailure, } from './self-update-failure-log.js';
|
|
7
7
|
import { createExecutionApplications } from './surface-api-execution-applications.js';
|
|
@@ -64,13 +64,23 @@ function createBoardApplications(root, now) {
|
|
|
64
64
|
}
|
|
65
65
|
function activeBoardRuns(board, card) {
|
|
66
66
|
if (card.activeRuns !== undefined)
|
|
67
|
-
return card.activeRuns
|
|
67
|
+
return Object.fromEntries(Object.entries(card.activeRuns).map(([runId, activeRun]) => [
|
|
68
|
+
runId,
|
|
69
|
+
{ ...activeRun, phase: normalizeBoardActiveRunPhase(activeRun.phase) },
|
|
70
|
+
]));
|
|
68
71
|
if (card.activeRun === undefined)
|
|
69
72
|
return {};
|
|
70
73
|
const legacyRunId = Object.entries(board.runs)
|
|
71
74
|
.reverse()
|
|
72
75
|
.find(([, workItemId]) => workItemId === card.workItemId)?.[0];
|
|
73
|
-
return legacyRunId === undefined
|
|
76
|
+
return legacyRunId === undefined
|
|
77
|
+
? {}
|
|
78
|
+
: {
|
|
79
|
+
[legacyRunId]: {
|
|
80
|
+
...card.activeRun,
|
|
81
|
+
phase: normalizeBoardActiveRunPhase(card.activeRun.phase),
|
|
82
|
+
},
|
|
83
|
+
};
|
|
74
84
|
}
|
|
75
85
|
function createStatusApplications(root, now) {
|
|
76
86
|
return {
|
|
@@ -98,7 +108,7 @@ function createResourceApplications(root, now) {
|
|
|
98
108
|
function createOrchestrationApplications(root, now) {
|
|
99
109
|
return {
|
|
100
110
|
async list(query) {
|
|
101
|
-
const stored = (await root.projections.list('orchestration')).flatMap((entry) => entry.value
|
|
111
|
+
const stored = (await root.projections.list('orchestration')).flatMap((entry) => (entry.value === null ? [] : [{ ...entry, value: entry.value }]));
|
|
102
112
|
const filtered = stored.filter((entry) => query.state === undefined || entry.value.status === query.state);
|
|
103
113
|
return projectionPage(root.journal, filtered, query, presentWorkflowInstance, {
|
|
104
114
|
emptyAsOf: now(),
|
|
@@ -123,10 +133,10 @@ function createEventApplications(root, now) {
|
|
|
123
133
|
})();
|
|
124
134
|
const events = await recentEvents(root.journal, query.cursor?.position, query.limit + 1, (event) => workItemId === undefined ||
|
|
125
135
|
event.stream.id === workItemId ||
|
|
126
|
-
(typeof event.payload === 'object' &&
|
|
127
|
-
event.payload !== null &&
|
|
128
|
-
'workItemId' in event.payload &&
|
|
129
|
-
event.payload.workItemId === workItemId));
|
|
136
|
+
(typeof event.event.payload === 'object' &&
|
|
137
|
+
event.event.payload !== null &&
|
|
138
|
+
'workItemId' in event.event.payload &&
|
|
139
|
+
event.event.payload.workItemId === workItemId));
|
|
130
140
|
const visible = events.slice(0, query.limit);
|
|
131
141
|
const newest = visible[0];
|
|
132
142
|
const oldest = visible.at(-1);
|
|
@@ -193,6 +203,8 @@ function createSystemApplications(root, now) {
|
|
|
193
203
|
async health() {
|
|
194
204
|
const checkedAt = now();
|
|
195
205
|
const selfUpdateFailure = await createSelfUpdateFailureLog(root.paths.wakeRoot).read();
|
|
206
|
+
const processorHealth = new Map((await root.processorRuntime.health()).map((snapshot) => [snapshot.consumer, snapshot]));
|
|
207
|
+
const schedulerOverlay = root.activationSchedulerSubscriber.health();
|
|
196
208
|
const checks = [
|
|
197
209
|
{ name: 'journal', status: 'ok' },
|
|
198
210
|
{ name: 'projections', status: 'ok' },
|
|
@@ -204,6 +216,16 @@ function createSystemApplications(root, now) {
|
|
|
204
216
|
status: 'degraded',
|
|
205
217
|
detail: describeSelfUpdateFailure(selfUpdateFailure),
|
|
206
218
|
},
|
|
219
|
+
...root.processorRuntime.processors.map(({ consumer }) => {
|
|
220
|
+
const snapshot = processorHealth.get(consumer);
|
|
221
|
+
return subscriptionHealthCheck(consumer === 'subscriber:control-plane.activation-scheduler'
|
|
222
|
+
? 'activation-scheduler'
|
|
223
|
+
: consumer, consumer === 'subscriber:control-plane.activation-scheduler' &&
|
|
224
|
+
schedulerOverlay !== undefined &&
|
|
225
|
+
snapshot !== undefined
|
|
226
|
+
? { ...snapshot, ...schedulerOverlay, checkpoint: snapshot.checkpoint }
|
|
227
|
+
: snapshot);
|
|
228
|
+
}),
|
|
207
229
|
];
|
|
208
230
|
const adapters = root.providers.flatMap((instance) => (instance.health?.() ?? []).map((check) => ({
|
|
209
231
|
adapter: instance.adapter,
|
|
@@ -256,10 +278,74 @@ function commandAccepted(command, acceptedAt) {
|
|
|
256
278
|
status: ApiCommandStatus.Accepted,
|
|
257
279
|
};
|
|
258
280
|
}
|
|
281
|
+
function subscriptionHealthCheck(name, snapshot) {
|
|
282
|
+
const status = snapshot?.status ?? ActivationSchedulerSubscriptionStatus.Starting;
|
|
283
|
+
const checkpoint = snapshot?.checkpoint ?? 0;
|
|
284
|
+
const consecutiveFailures = snapshot?.consecutiveFailures ?? 0;
|
|
285
|
+
return {
|
|
286
|
+
name,
|
|
287
|
+
status: status === ActivationSchedulerSubscriptionStatus.Healthy
|
|
288
|
+
? 'ok'
|
|
289
|
+
: 'degraded',
|
|
290
|
+
detail: `${status} at checkpoint ${checkpoint} after ${consecutiveFailures} failures${describeHealthError(snapshot?.lastError)}`,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
const maximumHealthErrorNameLength = 120;
|
|
294
|
+
const maximumHealthErrorMessageLength = 500;
|
|
295
|
+
const assignedCredential = /((?:access_token|authorization|token|secret|password|key|signature|sig|x-amz-signature|x-amz-credential|x-goog-signature)=)[^\s&]+/gi;
|
|
296
|
+
const authorizationCredential = /\b(?:bearer|basic|token)\s+\S+/gi;
|
|
297
|
+
const providerCredential = /\b(?:gh[pousr]_[A-Za-z0-9_]+|github_pat_[A-Za-z0-9_]+)\b/g;
|
|
298
|
+
function describeHealthError(error) {
|
|
299
|
+
if (error === undefined)
|
|
300
|
+
return '';
|
|
301
|
+
let name = 'Error';
|
|
302
|
+
let message;
|
|
303
|
+
try {
|
|
304
|
+
if (error instanceof Error) {
|
|
305
|
+
name = typeof error.name === 'string' ? error.name : String(error.name);
|
|
306
|
+
message = error.message;
|
|
307
|
+
}
|
|
308
|
+
else if (typeof error === 'string') {
|
|
309
|
+
message = error;
|
|
310
|
+
}
|
|
311
|
+
else if (typeof error === 'object' && error !== null) {
|
|
312
|
+
const candidate = error;
|
|
313
|
+
if (typeof candidate.name === 'string')
|
|
314
|
+
name = candidate.name;
|
|
315
|
+
if (typeof candidate.message === 'string')
|
|
316
|
+
message = candidate.message;
|
|
317
|
+
else
|
|
318
|
+
message = String(error);
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
message = String(error);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
message = 'Unknown failure';
|
|
326
|
+
}
|
|
327
|
+
return `; last error ${sanitizeHealthErrorText(name, maximumHealthErrorNameLength)}: ${sanitizeHealthErrorText(toHealthErrorText(message), maximumHealthErrorMessageLength)}`;
|
|
328
|
+
}
|
|
329
|
+
function sanitizeHealthErrorText(value, maximumLength) {
|
|
330
|
+
const sanitized = value
|
|
331
|
+
.replace(assignedCredential, '$1[REDACTED]')
|
|
332
|
+
.replace(authorizationCredential, '[REDACTED]')
|
|
333
|
+
.replace(providerCredential, '[REDACTED]')
|
|
334
|
+
.replaceAll('\n', ' ')
|
|
335
|
+
.replaceAll('\r', ' ')
|
|
336
|
+
.replaceAll('\t', ' ')
|
|
337
|
+
.trim();
|
|
338
|
+
return sanitized.slice(0, maximumLength) || 'Unknown failure';
|
|
339
|
+
}
|
|
340
|
+
function toHealthErrorText(value) {
|
|
341
|
+
try {
|
|
342
|
+
return typeof value === 'string' ? value : String(value);
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
return 'Unknown failure';
|
|
346
|
+
}
|
|
347
|
+
}
|
|
259
348
|
function createControlPlaneApplications(root, now) {
|
|
260
|
-
const activeTicks = new Map();
|
|
261
|
-
const recentTicks = new Map();
|
|
262
|
-
let commandSequence = 0;
|
|
263
349
|
return {
|
|
264
350
|
status: () => readControlPlaneStatus(root, now),
|
|
265
351
|
async pause(command) {
|
|
@@ -270,45 +356,6 @@ function createControlPlaneApplications(root, now) {
|
|
|
270
356
|
await root.controlPlane.resume(command.idempotencyKey);
|
|
271
357
|
return commandAccepted(command, now());
|
|
272
358
|
},
|
|
273
|
-
tick(command) {
|
|
274
|
-
const completed = recentTicks.get(command.idempotencyKey);
|
|
275
|
-
if (completed !== undefined)
|
|
276
|
-
return Promise.resolve(completed);
|
|
277
|
-
const active = activeTicks.get(command.idempotencyKey);
|
|
278
|
-
if (active !== undefined)
|
|
279
|
-
return active;
|
|
280
|
-
const pending = performTick(root, now, command, ++commandSequence).then((result) => {
|
|
281
|
-
activeTicks.delete(command.idempotencyKey);
|
|
282
|
-
rememberRecentTick(recentTicks, command.idempotencyKey, result);
|
|
283
|
-
return result;
|
|
284
|
-
}, (error) => {
|
|
285
|
-
activeTicks.delete(command.idempotencyKey);
|
|
286
|
-
throw error;
|
|
287
|
-
});
|
|
288
|
-
activeTicks.set(command.idempotencyKey, pending);
|
|
289
|
-
return pending;
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
const recentAdvanceLimit = 100;
|
|
294
|
-
function rememberRecentTick(commands, key, result) {
|
|
295
|
-
commands.set(key, result);
|
|
296
|
-
while (commands.size > recentAdvanceLimit) {
|
|
297
|
-
const oldest = commands.keys().next().value;
|
|
298
|
-
if (oldest === undefined)
|
|
299
|
-
return;
|
|
300
|
-
commands.delete(oldest);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
async function performTick(root, now, command, sequence) {
|
|
304
|
-
const acceptedAt = now();
|
|
305
|
-
await root.runnerPipeline.run({ maxProgress: 1 });
|
|
306
|
-
return {
|
|
307
|
-
commandId: `tick:${acceptedAt}:${sequence}`,
|
|
308
|
-
idempotencyKey: command.idempotencyKey,
|
|
309
|
-
acceptedAt,
|
|
310
|
-
status: ApiCommandStatus.Completed,
|
|
311
|
-
result: await readControlPlaneStatus(root, now),
|
|
312
359
|
};
|
|
313
360
|
}
|
|
314
361
|
export async function readControlPlaneStatus(root, now) {
|
|
@@ -342,14 +389,14 @@ export function elapsedSince(timestamp, nowMs) {
|
|
|
342
389
|
}
|
|
343
390
|
function presentEvents(events) {
|
|
344
391
|
return events.map((event) => ({
|
|
345
|
-
id: event.eventId,
|
|
346
|
-
type: event.eventType,
|
|
347
|
-
occurredAt: event.occurredAt,
|
|
392
|
+
id: event.event.eventId,
|
|
393
|
+
type: event.event.eventType,
|
|
394
|
+
occurredAt: event.event.occurredAt,
|
|
348
395
|
position: event.globalPosition,
|
|
349
396
|
stream: event.stream,
|
|
350
|
-
causationId: event.causationId,
|
|
351
|
-
correlationId: event.correlationId,
|
|
352
|
-
payload: event.payload,
|
|
397
|
+
causationId: event.event.causationId,
|
|
398
|
+
correlationId: event.event.correlationId,
|
|
399
|
+
payload: event.event.payload,
|
|
353
400
|
}));
|
|
354
401
|
}
|
|
355
402
|
function analyticsWindow(analytics, collectedAt, days) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { correlationId, EventActorKind } from '@atolis-hq/eventing';
|
|
1
2
|
import { ControlStreamKind, ineligibleRunners, } from '../control-plane/index.js';
|
|
2
3
|
import { ExecutionFailureCode, RunStatus } from '../execution/index.js';
|
|
3
|
-
import { correlationId, EventActorKind } from '../kernel/index.js';
|
|
4
4
|
import { ApiCommandStatus, presentRun } from '../surfaces/index.js';
|
|
5
5
|
import { projectionMeta, sampledMeta } from './surface-api-metadata.js';
|
|
6
6
|
import { projectionPage } from './surface-api-projection-pages.js';
|
|
@@ -61,7 +61,7 @@ export function createExecutionApplications(root, now) {
|
|
|
61
61
|
if (run === null || run === undefined)
|
|
62
62
|
return undefined;
|
|
63
63
|
const workflow = await root.projections.read('orchestration', run.workflowInstanceId);
|
|
64
|
-
const workItemId = workflow?.value
|
|
64
|
+
const workItemId = workflow?.value?.workItemId;
|
|
65
65
|
if (workItemId === undefined)
|
|
66
66
|
return { data: { runId, available: false, entries: [] }, meta: sampledMeta(now()) };
|
|
67
67
|
const groupId = await root.transcriptStore?.groupForRun(workItemId, runId);
|
|
@@ -72,7 +72,7 @@ export function createExecutionApplications(root, now) {
|
|
|
72
72
|
const workflows = await Promise.all(workflowIds.map(async (workflowInstanceId) => root.projections.read('orchestration', workflowInstanceId)));
|
|
73
73
|
const workItemIdsByWorkflow = new Map(workflowIds.map((workflowInstanceId, index) => [
|
|
74
74
|
workflowInstanceId,
|
|
75
|
-
workflows[index]?.value
|
|
75
|
+
workflows[index]?.value?.workItemId,
|
|
76
76
|
]));
|
|
77
77
|
const groupRuns = runs.filter((candidate) => workItemIdsByWorkflow.get(candidate.workflowInstanceId) === workItemId);
|
|
78
78
|
const group = await readWorkTranscript(root.transcriptStore, workItemId, groupId, groupRuns);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EventJournal, StoredProjection } from '@atolis-hq/eventing';
|
|
2
|
+
import type { ResponseMeta } from '../surfaces/index.js';
|
|
3
|
+
export declare function sampledMeta(asOf: string): ResponseMeta;
|
|
4
|
+
export declare function projectionMeta(journal: EventJournal, projections: readonly Pick<StoredProjection, 'lastGlobalPosition'>[], emptyAsOf: string): Promise<ResponseMeta>;
|
|
@@ -8,5 +8,5 @@ export async function projectionMeta(journal, projections, emptyAsOf) {
|
|
|
8
8
|
const event = (await journal.readAll(position - 1, 1))[0];
|
|
9
9
|
if (event === undefined || event.globalPosition !== position)
|
|
10
10
|
throw new Error(`Journal fact unavailable for projection position ${position}`);
|
|
11
|
-
return { asOf: event.occurredAt, position };
|
|
11
|
+
return { asOf: event.event.occurredAt, position };
|
|
12
12
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EventJournal, StoredProjection } from '@atolis-hq/eventing';
|
|
2
|
+
import type { ApiCollectionPage, CollectionQuery } from '../surfaces/index.js';
|
|
3
|
+
interface PositionedValue<Value> {
|
|
4
|
+
readonly lastGlobalPosition: number;
|
|
5
|
+
readonly value: Value;
|
|
6
|
+
}
|
|
7
|
+
interface ProjectionPageOptions {
|
|
8
|
+
readonly emptyAsOf: string;
|
|
9
|
+
readonly provenance?: readonly Pick<StoredProjection, 'lastGlobalPosition'>[];
|
|
10
|
+
}
|
|
11
|
+
export declare function projectionPage<Value, Dto>(journal: EventJournal, values: readonly PositionedValue<Value>[], query: CollectionQuery, present: (value: Value) => Dto, options: ProjectionPageOptions): Promise<ApiCollectionPage<Dto>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RunResponse } from '../surfaces/index.js';
|
|
2
|
+
import type { CompositionRoot } from './composition-root.js';
|
|
3
|
+
export declare function withWorkflowContext(root: CompositionRoot, run: RunResponse): Promise<RunResponse>;
|
|
4
|
+
/**
|
|
5
|
+
* A run whose own outcome was `waiting` on a delivery is frozen at that
|
|
6
|
+
* sentinel forever (the run itself never re-fires once terminal). Join it
|
|
7
|
+
* against the delivery intent it named to surface how that delivery has
|
|
8
|
+
* since resolved, without rewriting the run's own history.
|
|
9
|
+
*/
|
|
10
|
+
export declare function withDeliveryResolution(root: CompositionRoot, run: RunResponse): Promise<RunResponse>;
|
|
11
|
+
/** Full read-time enrichment applied to every presented run. */
|
|
12
|
+
export declare function enrichRun(root: CompositionRoot, run: RunResponse): Promise<RunResponse>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RunView, type TranscriptStore } from '../execution/index.js';
|
|
2
|
+
import type { TranscriptEntryResponse, TranscriptGroupResponse, WorkItemTranscriptResponse } from '../surfaces/index.js';
|
|
3
|
+
export declare function transcriptGroups(store: TranscriptStore | undefined, workItemId: string, runs: readonly RunView[]): Promise<readonly TranscriptGroupResponse[]>;
|
|
4
|
+
export declare function readWorkTranscript(store: TranscriptStore | undefined, workItemId: string, groupId: string, runs: readonly RunView[]): Promise<WorkItemTranscriptResponse>;
|
|
5
|
+
export declare function presentEntry(message: {
|
|
6
|
+
readonly timestamp: string;
|
|
7
|
+
readonly runId: string;
|
|
8
|
+
readonly kind: 'prompt' | 'response';
|
|
9
|
+
readonly text: string;
|
|
10
|
+
}, groupId: string, run: RunView | undefined): TranscriptEntryResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { correlationId, EventActorKind } from '@atolis-hq/eventing';
|
|
1
2
|
import { pullRequestProjection } from '../activities/index.js';
|
|
2
3
|
import { conversationIdForWorkItem, ConversationOriginKind, } from '../conversations/index.js';
|
|
3
4
|
import { executionProjection, runsByWorkflowInstanceProjection, } from '../execution/index.js';
|
|
4
|
-
import { correlationId, EventActorKind } from '../kernel/index.js';
|
|
5
5
|
import { ApprovalAuthorityKind, GroupBudgetExtensionIneligibleError, isGroupBudgetExtensionEligible, OperatorRetryIneligibleError, orchestrationProjection, selectOperatorRetryTarget, workflowsByWorkItemProjection, } from '../orchestration/index.js';
|
|
6
6
|
import { workCorrelationsProjection, } from '../resources/index.js';
|
|
7
7
|
import { ApiCommandStatus, fromWorkItemKey, presentResource, presentRun, presentWorkflowInstance, presentWorkItem, } from '../surfaces/index.js';
|
|
@@ -163,7 +163,7 @@ async function workDetail(root, key, now) {
|
|
|
163
163
|
const resources = (await Promise.all(correlations.map((item) => root.resources.get(item.resourceId)))).filter((value) => value !== null);
|
|
164
164
|
const workflowIds = (await root.projections.read(workflowsByWorkItemProjection.name, id))
|
|
165
165
|
?.value ?? workflowsByWorkItemProjection.initial(id);
|
|
166
|
-
const workflows = (await Promise.all(workflowIds.map((workflowInstanceId) => root.projections.read(orchestrationProjection.name, workflowInstanceId)))).flatMap((entry) => (entry === null || entry.value
|
|
166
|
+
const workflows = (await Promise.all(workflowIds.map((workflowInstanceId) => root.projections.read(orchestrationProjection.name, workflowInstanceId)))).flatMap((entry) => (entry === null || entry.value === null ? [] : [entry.value]));
|
|
167
167
|
const runs = await runsForWorkItem(root, id, workflows);
|
|
168
168
|
const pullRequest = (await Promise.all(resources.map((resource) => root.projections.read(pullRequestProjection.name, resource.resourceId)))).find((entry) => entry !== null && entry.value !== null);
|
|
169
169
|
const primary = workflows.find((value) => value.parentWorkflowInstanceId === undefined) ?? null;
|
|
@@ -244,7 +244,7 @@ async function runsForWorkItem(root, id, workflows) {
|
|
|
244
244
|
async function workflowsForWorkItem(root, id) {
|
|
245
245
|
const workflowIds = (await root.projections.read(workflowsByWorkItemProjection.name, id))
|
|
246
246
|
?.value ?? workflowsByWorkItemProjection.initial(id);
|
|
247
|
-
return (await Promise.all(workflowIds.map((workflowInstanceId) => root.projections.read(orchestrationProjection.name, workflowInstanceId)))).flatMap((entry) => (entry === null || entry.value
|
|
247
|
+
return (await Promise.all(workflowIds.map((workflowInstanceId) => root.projections.read(orchestrationProjection.name, workflowInstanceId)))).flatMap((entry) => (entry === null || entry.value === null ? [] : [entry.value]));
|
|
248
248
|
}
|
|
249
249
|
function decodeWorkItemId(key) {
|
|
250
250
|
try {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RunView } from '../execution/index.js';
|
|
2
|
+
import { type CompiledWorkflow, type WorkflowInstanceView } from '../orchestration/index.js';
|
|
3
|
+
import { type ApiApplications, type WorkflowDiagramResponse } from '../surfaces/index.js';
|
|
4
|
+
import type { CompositionRoot } from './composition-root.js';
|
|
5
|
+
export declare function createWorkflowDiagramApplications(root: CompositionRoot, now: () => string): NonNullable<ApiApplications['workflowDiagrams']>;
|
|
6
|
+
export declare function presentWorkflowDiagram(definition: CompiledWorkflow, overlay?: WorkflowDiagramOverlay): WorkflowDiagramResponse;
|
|
7
|
+
export interface WorkflowDiagramOverlay {
|
|
8
|
+
readonly primary: WorkflowInstanceView;
|
|
9
|
+
readonly children: readonly WorkflowInstanceView[];
|
|
10
|
+
readonly runs: readonly RunView[];
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActivityOutcomeKind } from '../activities/index.js';
|
|
2
|
-
import { agentTokenUsage, RunStatus } from '../execution/index.js';
|
|
2
|
+
import { agentTokenUsage, isActiveRunStatus, RunStatus } from '../execution/index.js';
|
|
3
3
|
import { TransitionTargetKind, WorkflowStatus, } from '../orchestration/index.js';
|
|
4
4
|
import { fromWorkItemKey, WorkflowDiagramChildKind, WorkflowDiagramStatus, } from '../surfaces/index.js';
|
|
5
5
|
import { projectionMeta } from './surface-api-metadata.js';
|
|
@@ -139,7 +139,7 @@ function runSummary(runs) {
|
|
|
139
139
|
return {};
|
|
140
140
|
const ordered = [...runs].sort((left, right) => right.startedAt.localeCompare(left.startedAt));
|
|
141
141
|
const activeRuns = ordered
|
|
142
|
-
.filter((run) => run.status
|
|
142
|
+
.filter((run) => isActiveRunStatus(run.status))
|
|
143
143
|
.map((run) => ({
|
|
144
144
|
runId: run.runId,
|
|
145
145
|
activity: run.activity,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ApiApplications, WakeCliApplications } from '../surfaces/index.js';
|
|
2
|
+
import type { CompositionRoot } from './composition-root.js';
|
|
3
|
+
export interface SurfaceApplicationOptions {
|
|
4
|
+
readonly now?: () => string;
|
|
5
|
+
}
|
|
6
|
+
export interface SurfaceApplications {
|
|
7
|
+
readonly api: ApiApplications;
|
|
8
|
+
readonly cli: WakeCliApplications;
|
|
9
|
+
}
|
|
10
|
+
export declare function createSurfaceApplications(root: CompositionRoot, options?: SurfaceApplicationOptions): SurfaceApplications;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type HostBudget, type HostResult } from '../control-plane/index.js';
|
|
2
|
+
import { type ApiApplications, type WakeCliApplications } from '../surfaces/index.js';
|
|
3
|
+
import type { CompositionRoot } from './composition-root.js';
|
|
4
|
+
import { type SelfUpdateQuiescePort } from './self-update-application.js';
|
|
5
|
+
export declare function createSurfaceCliApplications(root: CompositionRoot, api: ApiApplications, now: () => string): WakeCliApplications;
|
|
6
|
+
export declare function createRunnerIdleWait(root: Pick<CompositionRoot, 'journal'>, resident: {
|
|
7
|
+
readonly pollBackoffMs: number;
|
|
8
|
+
readonly maxPollBackoffMs?: number;
|
|
9
|
+
} | undefined): (signal: AbortSignal, { consecutiveIdleTicks: _consecutiveIdleTicks, consecutiveErrorTicks, }: {
|
|
10
|
+
readonly consecutiveIdleTicks: number;
|
|
11
|
+
readonly consecutiveErrorTicks: number;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
export interface ResidentLifecycleHost {
|
|
14
|
+
run(signal: AbortSignal, budget: HostBudget): Promise<HostResult>;
|
|
15
|
+
}
|
|
16
|
+
export interface ResidentLifecycleInput {
|
|
17
|
+
readonly signal: AbortSignal;
|
|
18
|
+
readonly budget: HostBudget;
|
|
19
|
+
readonly processorRuntime: Pick<CompositionRoot['processorRuntime'], 'start'>;
|
|
20
|
+
readonly activationSchedulerSubscriber: Pick<CompositionRoot['activationSchedulerSubscriber'], 'start'>;
|
|
21
|
+
readonly intakeResident: ResidentLifecycleHost;
|
|
22
|
+
readonly runnerResident: ResidentLifecycleHost;
|
|
23
|
+
readonly close: () => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
/** Starts one processor registry before its resident consumers. */
|
|
26
|
+
export declare function runResidentLifecycle(input: ResidentLifecycleInput): Promise<HostResult>;
|
|
27
|
+
interface ExecutionShutdown {
|
|
28
|
+
shutdown(): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export declare function closeResidentRuntime(execution: ExecutionShutdown, closeResources: () => Promise<void>): Promise<void>;
|
|
31
|
+
/** The production maintenance boundary shared by the CLI update application. */
|
|
32
|
+
export declare function createSelfUpdateQuiescePort(root: CompositionRoot): SelfUpdateQuiescePort;
|
|
33
|
+
export {};
|