@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type EventJournal, type EventProcessor } from '@atolis-hq/eventing';
|
|
2
|
+
import { type ConversationService } from '../../conversations/index.js';
|
|
3
|
+
import { type RunRepository } from '../../execution/index.js';
|
|
4
|
+
import { selectWorkflowOrchestrationEvent, type OrchestrationService } from '../../orchestration/index.js';
|
|
5
|
+
import type { ResourceService } from '../../resources/index.js';
|
|
6
|
+
import { type ReplyPublicationConfig } from '../contracts/reply-routing.js';
|
|
7
|
+
/** Projects terminal agent runs into one durable outbound intent per configured resource. */
|
|
8
|
+
export declare class AgentRunPublicationReactor {
|
|
9
|
+
private readonly dependencies;
|
|
10
|
+
readonly processor: EventProcessor;
|
|
11
|
+
constructor(dependencies: {
|
|
12
|
+
readonly journal: EventJournal;
|
|
13
|
+
readonly runs: RunRepository;
|
|
14
|
+
readonly resources: Pick<ResourceService, 'correlationsForWork' | 'get'>;
|
|
15
|
+
readonly orchestration: Pick<OrchestrationService, 'listAll'>;
|
|
16
|
+
readonly conversations?: Pick<ConversationService, 'createForWorkItem' | 'record'>;
|
|
17
|
+
readonly replies?: ReplyPublicationConfig | undefined;
|
|
18
|
+
});
|
|
19
|
+
react(outcome: NonNullable<ReturnType<typeof selectWorkflowOrchestrationEvent>>): Promise<void>;
|
|
20
|
+
private publishAcceptedOutcome;
|
|
21
|
+
private publish;
|
|
22
|
+
private recordConversationEntry;
|
|
23
|
+
private resourceForTarget;
|
|
24
|
+
private stageForActivation;
|
|
25
|
+
}
|
|
@@ -1,30 +1,44 @@
|
|
|
1
|
+
import { defineEventProcessor, EventActorKind, EventProcessorCategory, EventProcessorReplayPolicy, EventSourceKind, } from '@atolis-hq/eventing';
|
|
1
2
|
import { BuiltInActivityName } from '../../activities/index.js';
|
|
2
3
|
import { conversationIdForWorkItem, ConversationOriginKind, } from '../../conversations/index.js';
|
|
3
4
|
import { RunStatus } from '../../execution/index.js';
|
|
4
|
-
import {
|
|
5
|
-
import { ApprovalAuthorityKind, isApprovalAwaitingSignalKind, OrchestrationEventType, OrchestrationStreamKind, WatchGateVerdictSignal, } from '../../orchestration/index.js';
|
|
5
|
+
import { ApprovalAuthorityKind, isApprovalAwaitingSignalKind, OrchestrationEventType, OrchestrationStreamKind, selectWorkflowOrchestrationEvent, WatchGateVerdictSignal, } from '../../orchestration/index.js';
|
|
6
6
|
import { BuiltInResourceKind, ResourceCorrelationRole, resourceStream, } from '../../resources/index.js';
|
|
7
7
|
import { ReplyTarget } from '../contracts/reply-routing.js';
|
|
8
|
+
import { createDeliveryIntentEventData } from '../delivery/contracts/event-factory.js';
|
|
8
9
|
import { DeliveryIntentEventType } from '../delivery/contracts/intents.js';
|
|
9
10
|
import { defaultReplyPublication, selectReplyTarget, } from '../github/application/reply-target-selector.js';
|
|
10
11
|
import { projectTerminalAgentRunReport } from './terminal-agent-run-report.js';
|
|
11
12
|
/** Projects terminal agent runs into one durable outbound intent per configured resource. */
|
|
12
13
|
export class AgentRunPublicationReactor {
|
|
13
14
|
dependencies;
|
|
15
|
+
processor;
|
|
14
16
|
constructor(dependencies) {
|
|
15
17
|
this.dependencies = dependencies;
|
|
18
|
+
this.processor = defineEventProcessor({
|
|
19
|
+
consumer: 'reactor:agent-run-publication',
|
|
20
|
+
name: 'agent-run-publication',
|
|
21
|
+
owner: 'integrations',
|
|
22
|
+
category: EventProcessorCategory.Reactor,
|
|
23
|
+
replayPolicy: EventProcessorReplayPolicy.Idempotent,
|
|
24
|
+
select(event) {
|
|
25
|
+
const outcome = selectWorkflowOrchestrationEvent(event);
|
|
26
|
+
return outcome?.event.eventType === OrchestrationEventType.ActivityOutcomeAccepted ||
|
|
27
|
+
outcome?.event.eventType === OrchestrationEventType.ActivityExecutionFailed
|
|
28
|
+
? outcome
|
|
29
|
+
: null;
|
|
30
|
+
},
|
|
31
|
+
handle: async (outcome) => this.react(outcome),
|
|
32
|
+
});
|
|
16
33
|
}
|
|
17
|
-
async
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (event.eventType === OrchestrationEventType.ActivityOutcomeAccepted)
|
|
22
|
-
await this.publishAcceptedOutcome(event.stream.id, event.payload.activationId, event.recordedAt, event.eventId, event.correlationId);
|
|
23
|
-
if (event.eventType === OrchestrationEventType.ActivityExecutionFailed)
|
|
24
|
-
await this.publish(event.payload.runId, event.recordedAt, event.eventId, event.correlationId);
|
|
25
|
-
await this.dependencies.checkpoints.save(consumer, event.globalPosition);
|
|
34
|
+
async react(outcome) {
|
|
35
|
+
if (outcome.event.eventType === OrchestrationEventType.ActivityOutcomeAccepted) {
|
|
36
|
+
await this.publishAcceptedOutcome(outcome.stream.id, outcome.event.payload.activationId, outcome.recordedAt, outcome.event.eventId, outcome.event.correlationId);
|
|
37
|
+
return;
|
|
26
38
|
}
|
|
27
|
-
|
|
39
|
+
if (outcome.event.eventType !== OrchestrationEventType.ActivityExecutionFailed)
|
|
40
|
+
return;
|
|
41
|
+
await this.publish(outcome.event.payload.runId, outcome.recordedAt, outcome.event.eventId, outcome.event.correlationId);
|
|
28
42
|
}
|
|
29
43
|
async publishAcceptedOutcome(workflowInstanceId, activationId, occurredAt, causationId, correlationId) {
|
|
30
44
|
const run = (await this.dependencies.runs.list(activationId)).find((candidate) => candidate.workflowInstanceId === workflowInstanceId &&
|
|
@@ -57,8 +71,8 @@ export class AgentRunPublicationReactor {
|
|
|
57
71
|
const stream = resourceStream(resource.resourceId);
|
|
58
72
|
const sequence = (await this.dependencies.journal.readStream(stream)).length;
|
|
59
73
|
try {
|
|
60
|
-
await this.dependencies.journal.
|
|
61
|
-
|
|
74
|
+
await this.dependencies.journal.appendToStream(stream, sequence, [
|
|
75
|
+
createDeliveryIntentEventData({
|
|
62
76
|
eventId: `agent-run:${run.runId}`,
|
|
63
77
|
eventType: DeliveryIntentEventType.AgentRunPublishRequested,
|
|
64
78
|
occurredAt,
|
|
@@ -66,7 +80,6 @@ export class AgentRunPublicationReactor {
|
|
|
66
80
|
causationId: causationId,
|
|
67
81
|
actor: { kind: EventActorKind.Integration, id: 'agent-run-publication' },
|
|
68
82
|
source: { kind: EventSourceKind.Internal, id: 'agent-run-publication' },
|
|
69
|
-
stream,
|
|
70
83
|
payload: {
|
|
71
84
|
workflowInstanceId: run.workflowInstanceId,
|
|
72
85
|
activationId: run.activationId,
|
|
@@ -127,12 +140,15 @@ export class AgentRunPublicationReactor {
|
|
|
127
140
|
kind: OrchestrationStreamKind.WorkflowInstance,
|
|
128
141
|
id: workflowInstanceId,
|
|
129
142
|
});
|
|
130
|
-
const
|
|
131
|
-
|
|
143
|
+
const orchestrationEvents = events
|
|
144
|
+
.map(selectWorkflowOrchestrationEvent)
|
|
145
|
+
.filter((event) => event !== null);
|
|
146
|
+
const request = orchestrationEvents.findIndex((event) => event.event.eventType === OrchestrationEventType.ActivityRequested &&
|
|
147
|
+
event.event.payload.activationId === activationId);
|
|
132
148
|
for (let index = request - 1; index >= 0; index -= 1) {
|
|
133
|
-
const event =
|
|
134
|
-
if (event?.eventType === OrchestrationEventType.StageEntered)
|
|
135
|
-
return event.payload.stage;
|
|
149
|
+
const event = orchestrationEvents[index];
|
|
150
|
+
if (event?.event.eventType === OrchestrationEventType.StageEntered)
|
|
151
|
+
return event.event.payload.stage;
|
|
136
152
|
}
|
|
137
153
|
return undefined;
|
|
138
154
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type EventJournal, type EventProcessor } from '@atolis-hq/eventing';
|
|
2
|
+
import { type IdGenerator } from '../../kernel/index.js';
|
|
3
|
+
import { type ResourceService } from '../../resources/index.js';
|
|
4
|
+
import type { ProviderInstance } from '../contracts/provider.js';
|
|
5
|
+
interface ArtifactRegistrationDependencies {
|
|
6
|
+
readonly journal: EventJournal;
|
|
7
|
+
readonly resources: ResourceService;
|
|
8
|
+
readonly ids: IdGenerator;
|
|
9
|
+
readonly providers: readonly ProviderInstance[];
|
|
10
|
+
readonly maxAmbiguityReconciliationAttempts?: number;
|
|
11
|
+
readonly runs: {
|
|
12
|
+
list(activationId?: string): Promise<readonly {
|
|
13
|
+
readonly workspace?: {
|
|
14
|
+
readonly branch?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
}[]>;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare class ArtifactRegistrationReactor {
|
|
20
|
+
private readonly dependencies;
|
|
21
|
+
private readonly latestUnresolved;
|
|
22
|
+
readonly processor: EventProcessor;
|
|
23
|
+
constructor(dependencies: ArtifactRegistrationDependencies);
|
|
24
|
+
private register;
|
|
25
|
+
reconcileOnce(): Promise<void>;
|
|
26
|
+
private verifyAndRegister;
|
|
27
|
+
private registerVerified;
|
|
28
|
+
private recordUnresolved;
|
|
29
|
+
private branchFor;
|
|
30
|
+
private workItemFor;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -1,34 +1,40 @@
|
|
|
1
|
+
import { cachedJournalView, defineEventProcessor, EventActorKind, EventProcessorCategory, EventProcessorReplayPolicy, EventSourceKind, } from '@atolis-hq/eventing';
|
|
1
2
|
import { reportedArtifactSchema } from '../../activities/index.js';
|
|
2
|
-
import { cachedJournalView, createEventDraft, EventActorKind, EventSourceKind, } from '../../kernel/index.js';
|
|
3
3
|
import { OrchestrationEventType, selectWorkflowOrchestrationEvent, workflowInstanceStream, } from '../../orchestration/index.js';
|
|
4
4
|
import { ResourceCorrelationProvenance, ResourceCorrelationRole, resourceId, resourceKind, ResourceStreamKind, } from '../../resources/index.js';
|
|
5
|
+
import { createArtifactEventData } from '../contracts/artifact-event-factory.js';
|
|
5
6
|
import { ArtifactEventType, decodeArtifactEvent, } from '../contracts/artifact-events.js';
|
|
6
7
|
import { ArtifactVerificationResult, ArtifactVerificationStatus, } from '../contracts/artifact-vocabulary.js';
|
|
7
8
|
import { integrationStream } from '../contracts/streams.js';
|
|
8
9
|
export class ArtifactRegistrationReactor {
|
|
9
10
|
dependencies;
|
|
10
11
|
latestUnresolved;
|
|
12
|
+
processor;
|
|
11
13
|
constructor(dependencies) {
|
|
12
14
|
this.dependencies = dependencies;
|
|
13
15
|
this.latestUnresolved = cachedJournalView(dependencies.journal, deriveLatestUnresolved);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
this.processor = defineEventProcessor({
|
|
17
|
+
consumer: 'reactor:artifact-registration',
|
|
18
|
+
name: 'artifact-registration',
|
|
19
|
+
owner: 'integrations',
|
|
20
|
+
category: EventProcessorCategory.Reactor,
|
|
21
|
+
replayPolicy: EventProcessorReplayPolicy.Idempotent,
|
|
22
|
+
select(event) {
|
|
23
|
+
const outcome = selectWorkflowOrchestrationEvent(event);
|
|
24
|
+
return outcome?.event.eventType === OrchestrationEventType.ActivityOutcomeAccepted
|
|
25
|
+
? outcome
|
|
26
|
+
: null;
|
|
27
|
+
},
|
|
28
|
+
handle: async (outcome) => this.register(outcome),
|
|
29
|
+
});
|
|
26
30
|
}
|
|
27
31
|
async register(outcome) {
|
|
28
|
-
|
|
32
|
+
if (outcome.event.eventType !== OrchestrationEventType.ActivityOutcomeAccepted)
|
|
33
|
+
return;
|
|
34
|
+
const artifacts = reportedArtifacts(outcome.event.payload.outcome.data);
|
|
29
35
|
if (artifacts.length === 0)
|
|
30
36
|
return;
|
|
31
|
-
const branch = await this.branchFor(outcome.payload.activationId);
|
|
37
|
+
const branch = await this.branchFor(outcome.event.payload.activationId);
|
|
32
38
|
if (branch === undefined)
|
|
33
39
|
return;
|
|
34
40
|
const workItemId = await this.workItemFor(outcome.stream.id);
|
|
@@ -37,30 +43,31 @@ export class ArtifactRegistrationReactor {
|
|
|
37
43
|
for (const artifact of artifacts)
|
|
38
44
|
await this.verifyAndRegister({
|
|
39
45
|
workflowInstanceId: outcome.stream.id,
|
|
40
|
-
activationId: outcome.payload.activationId,
|
|
46
|
+
activationId: outcome.event.payload.activationId,
|
|
41
47
|
artifact,
|
|
42
|
-
correlationId: outcome.correlationId,
|
|
43
|
-
causationId: outcome.eventId,
|
|
48
|
+
correlationId: outcome.event.correlationId,
|
|
49
|
+
causationId: outcome.event.eventId,
|
|
44
50
|
occurredAt: outcome.recordedAt,
|
|
45
51
|
}, branch, workItemId, 1);
|
|
46
52
|
}
|
|
47
|
-
async
|
|
53
|
+
async reconcileOnce() {
|
|
48
54
|
const latest = await this.latestUnresolved.get();
|
|
49
55
|
for (const event of latest.values()) {
|
|
50
|
-
if (event.payload.status !== ArtifactVerificationStatus.Ambiguous ||
|
|
56
|
+
if (event.event.payload.status !== ArtifactVerificationStatus.Ambiguous ||
|
|
57
|
+
event.event.payload.escalated)
|
|
51
58
|
continue;
|
|
52
|
-
const branch = await this.branchFor(event.payload.activationId);
|
|
53
|
-
const workItemId = await this.workItemFor(event.payload.workflowInstanceId);
|
|
59
|
+
const branch = await this.branchFor(event.event.payload.activationId);
|
|
60
|
+
const workItemId = await this.workItemFor(event.event.payload.workflowInstanceId);
|
|
54
61
|
if (branch === undefined || workItemId === null)
|
|
55
62
|
continue;
|
|
56
63
|
await this.verifyAndRegister({
|
|
57
|
-
workflowInstanceId: event.payload.workflowInstanceId,
|
|
58
|
-
activationId: event.payload.activationId,
|
|
59
|
-
artifact: event.payload.artifact,
|
|
60
|
-
correlationId: event.correlationId,
|
|
61
|
-
causationId: event.causationId,
|
|
64
|
+
workflowInstanceId: event.event.payload.workflowInstanceId,
|
|
65
|
+
activationId: event.event.payload.activationId,
|
|
66
|
+
artifact: event.event.payload.artifact,
|
|
67
|
+
correlationId: event.event.correlationId,
|
|
68
|
+
causationId: event.event.causationId,
|
|
62
69
|
occurredAt: event.recordedAt,
|
|
63
|
-
}, branch, workItemId, event.payload.attempt + 1);
|
|
70
|
+
}, branch, workItemId, event.event.payload.attempt + 1);
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
73
|
async verifyAndRegister(record, branch, workItemId, attempt) {
|
|
@@ -98,8 +105,8 @@ export class ArtifactRegistrationReactor {
|
|
|
98
105
|
const sequence = (await this.dependencies.journal.readStream(stream)).length;
|
|
99
106
|
const ambiguous = result === ArtifactVerificationResult.Ambiguous;
|
|
100
107
|
const escalated = ambiguous && attempt >= (this.dependencies.maxAmbiguityReconciliationAttempts ?? 3);
|
|
101
|
-
await this.dependencies.journal.
|
|
102
|
-
|
|
108
|
+
await this.dependencies.journal.appendToStream(stream, sequence, [
|
|
109
|
+
createArtifactEventData({
|
|
103
110
|
eventId: `${record.causationId}:artifact:${record.artifact.externalKey.key}:unresolved:${attempt}`,
|
|
104
111
|
eventType: ArtifactEventType.VerificationUnresolved,
|
|
105
112
|
occurredAt: record.occurredAt,
|
|
@@ -107,7 +114,6 @@ export class ArtifactRegistrationReactor {
|
|
|
107
114
|
causationId: record.causationId,
|
|
108
115
|
actor: { kind: EventActorKind.Integration, id: 'artifact-registration' },
|
|
109
116
|
source: { kind: EventSourceKind.Internal, id: 'artifact-registration' },
|
|
110
|
-
stream,
|
|
111
117
|
payload: {
|
|
112
118
|
workflowInstanceId: record.workflowInstanceId,
|
|
113
119
|
activationId: record.activationId,
|
|
@@ -128,17 +134,19 @@ export class ArtifactRegistrationReactor {
|
|
|
128
134
|
const events = await this.dependencies.journal.readStream(workflowInstanceStream(workflow));
|
|
129
135
|
const started = events
|
|
130
136
|
.map(selectWorkflowOrchestrationEvent)
|
|
131
|
-
.find((event) => event?.eventType === OrchestrationEventType.InstanceStarted);
|
|
132
|
-
return started?.
|
|
137
|
+
.find((event) => event?.event.eventType === OrchestrationEventType.InstanceStarted);
|
|
138
|
+
return started?.event.eventType === OrchestrationEventType.InstanceStarted
|
|
139
|
+
? started.event.payload.workItemId
|
|
140
|
+
: null;
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
143
|
function deriveLatestUnresolved(events) {
|
|
136
144
|
const latest = new Map();
|
|
137
145
|
for (const event of events) {
|
|
138
|
-
if (event.eventType !== ArtifactEventType.VerificationUnresolved)
|
|
146
|
+
if (event.event.eventType !== ArtifactEventType.VerificationUnresolved)
|
|
139
147
|
continue;
|
|
140
148
|
const decoded = decodeArtifactEvent(event);
|
|
141
|
-
const key = `${decoded.causationId}:${decoded.payload.artifact.externalKey.adapter}:${decoded.payload.artifact.externalKey.key}`;
|
|
149
|
+
const key = `${decoded.event.causationId}:${decoded.event.payload.artifact.externalKey.adapter}:${decoded.event.payload.artifact.externalKey.key}`;
|
|
142
150
|
latest.set(key, decoded);
|
|
143
151
|
}
|
|
144
152
|
return latest;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventJournal } from '@atolis-hq/eventing';
|
|
2
|
+
import type { ProviderInstance } from '../contracts/provider.js';
|
|
3
|
+
export interface PollResult {
|
|
4
|
+
readonly appended: number;
|
|
5
|
+
readonly failed: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class PollService {
|
|
8
|
+
private readonly journal;
|
|
9
|
+
private readonly instance;
|
|
10
|
+
constructor(journal: EventJournal, instance: ProviderInstance);
|
|
11
|
+
/** Persists every independently durable draft and reports partial progress. */
|
|
12
|
+
pollOnce(signal: AbortSignal): Promise<PollResult>;
|
|
13
|
+
}
|
|
@@ -18,9 +18,9 @@ export class PollService {
|
|
|
18
18
|
throw new Error(`Provider ${adapter} emitted an unknown event type`);
|
|
19
19
|
const stream = integrationStream(adapter);
|
|
20
20
|
const existing = await this.journal.readStream(stream);
|
|
21
|
-
if (existing.some((event) => event.eventId === draft.eventId))
|
|
21
|
+
if (existing.some((event) => event.event.eventId === draft.eventId))
|
|
22
22
|
continue;
|
|
23
|
-
await this.journal.
|
|
23
|
+
await this.journal.appendToStream(stream, existing.length, [draft]);
|
|
24
24
|
appended += 1;
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AgentRunPublicationReport } from '../delivery/contracts/intents.js';
|
|
2
|
+
export interface TerminalRunAgentResult {
|
|
3
|
+
readonly outcome: 'DONE' | 'REJECTED' | 'BLOCKED' | 'FAILED' | 'NEEDS_CLARIFICATION';
|
|
4
|
+
readonly displayBody: string;
|
|
5
|
+
readonly metadata: Readonly<Record<string, string | number | boolean | null>>;
|
|
6
|
+
}
|
|
7
|
+
export interface TerminalRunFailure {
|
|
8
|
+
readonly message: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TerminalRun {
|
|
11
|
+
readonly runId: string;
|
|
12
|
+
readonly startedAt: string;
|
|
13
|
+
readonly finishedAt?: string;
|
|
14
|
+
readonly runner?: {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly model?: string | undefined;
|
|
17
|
+
readonly pool?: string | undefined;
|
|
18
|
+
readonly cli?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
readonly workspace?: {
|
|
21
|
+
readonly path: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly agent?: TerminalRunAgentResult | undefined;
|
|
24
|
+
readonly failure?: TerminalRunFailure | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare function projectTerminalAgentRunReport(input: {
|
|
27
|
+
readonly run: TerminalRun;
|
|
28
|
+
readonly stage?: string;
|
|
29
|
+
readonly awaitingApproval?: boolean;
|
|
30
|
+
readonly watchGateVerdict?: {
|
|
31
|
+
readonly runId: string;
|
|
32
|
+
};
|
|
33
|
+
}): AgentRunPublicationReport | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandContext } from '@atolis-hq/eventing';
|
|
2
|
+
import type { ConversationService } from '../../conversations/index.js';
|
|
3
|
+
import { type OrchestrationService } from '../../orchestration/index.js';
|
|
4
|
+
import { type ResourceCapability, type ResourceId, type ResourceKind, type ResourceService } from '../../resources/index.js';
|
|
5
|
+
import type { WorkItemId, WorkService } from '../../work/index.js';
|
|
6
|
+
import type { AdapterId } from '../contracts/identifiers.js';
|
|
7
|
+
import type { WorkflowRouter } from '../contracts/provider.js';
|
|
8
|
+
export interface WorkAdmissionServices {
|
|
9
|
+
readonly work: WorkService;
|
|
10
|
+
readonly conversations?: ConversationService;
|
|
11
|
+
readonly resources: ResourceService;
|
|
12
|
+
readonly orchestration: OrchestrationService;
|
|
13
|
+
readonly routing: WorkflowRouter;
|
|
14
|
+
}
|
|
15
|
+
export interface AdmitObservedWork {
|
|
16
|
+
readonly adapter: AdapterId;
|
|
17
|
+
readonly resourceId: ResourceId;
|
|
18
|
+
readonly workItemId: WorkItemId;
|
|
19
|
+
readonly kind: ResourceKind;
|
|
20
|
+
readonly externalKey: {
|
|
21
|
+
readonly adapter: AdapterId;
|
|
22
|
+
readonly key: string;
|
|
23
|
+
};
|
|
24
|
+
readonly capabilities: readonly ResourceCapability[];
|
|
25
|
+
readonly objective: string;
|
|
26
|
+
readonly tags: readonly string[];
|
|
27
|
+
readonly revision?: string | undefined;
|
|
28
|
+
readonly title?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export declare function admitObservedWork(services: WorkAdmissionServices, input: AdmitObservedWork, context: CommandContext, beforeStart?: () => Promise<void>): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type WorkItemId, type WorkService } from '../../work/index.js';
|
|
2
|
+
import { ExternalWorkOutcome } from '../contracts/outcome-vocabulary.js';
|
|
3
|
+
import type { WorkConclusion } from '../contracts/provider.js';
|
|
4
|
+
export interface WorkConclusionServices {
|
|
5
|
+
readonly work: WorkService;
|
|
6
|
+
readonly conclusion: WorkConclusion;
|
|
7
|
+
}
|
|
8
|
+
export interface ConcludeObservedWork {
|
|
9
|
+
readonly workItemId: WorkItemId;
|
|
10
|
+
readonly outcome: ExternalWorkOutcome;
|
|
11
|
+
readonly reason: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function concludeObservedWork(services: WorkConclusionServices, input: ConcludeObservedWork): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type EventDataInput } from '@atolis-hq/eventing';
|
|
2
|
+
import { type ArtifactEventData, type ArtifactEventPayloads } from './artifact-events.js';
|
|
3
|
+
export type ArtifactEventDataInput = {
|
|
4
|
+
[Type in keyof ArtifactEventPayloads]: EventDataInput<Type, ArtifactEventPayloads[Type]>;
|
|
5
|
+
}[keyof ArtifactEventPayloads];
|
|
6
|
+
export declare function createArtifactEventData(input: ArtifactEventDataInput): ArtifactEventData;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createEventData } from '@atolis-hq/eventing';
|
|
2
|
+
import { ArtifactEventType, } from './artifact-events.js';
|
|
3
|
+
export function createArtifactEventData(input) {
|
|
4
|
+
switch (input.eventType) {
|
|
5
|
+
case ArtifactEventType.VerificationUnresolved:
|
|
6
|
+
return createEventData(input);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type EventDataUnion, type EventEnvelope, type EventUnion } from '@atolis-hq/eventing';
|
|
2
|
+
import { activationId } from '../../activities/index.js';
|
|
3
|
+
import { workflowInstanceId } from '../../orchestration/index.js';
|
|
4
|
+
import { type ResourceKind } from '../../resources/index.js';
|
|
5
|
+
import { type ArtifactVerificationStatus as VerificationStatus } from './artifact-vocabulary.js';
|
|
6
|
+
import { type AdapterId } from './identifiers.js';
|
|
7
|
+
import { type IntegrationStreamRef } from './streams.js';
|
|
8
|
+
export declare const ArtifactEventType: {
|
|
9
|
+
readonly VerificationUnresolved: "integration.artifact-verification-unresolved";
|
|
10
|
+
};
|
|
11
|
+
export interface ArtifactVerificationUnresolvedPayload {
|
|
12
|
+
readonly workflowInstanceId: ReturnType<typeof workflowInstanceId>;
|
|
13
|
+
readonly activationId: ReturnType<typeof activationId>;
|
|
14
|
+
readonly artifact: {
|
|
15
|
+
readonly kind: ResourceKind;
|
|
16
|
+
readonly externalKey: {
|
|
17
|
+
readonly adapter: AdapterId;
|
|
18
|
+
readonly key: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly status: VerificationStatus;
|
|
22
|
+
readonly attempt: number;
|
|
23
|
+
readonly escalated: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ArtifactEventPayloads {
|
|
26
|
+
readonly [ArtifactEventType.VerificationUnresolved]: ArtifactVerificationUnresolvedPayload;
|
|
27
|
+
}
|
|
28
|
+
export type ArtifactEvent = EventUnion<ArtifactEventPayloads, IntegrationStreamRef>;
|
|
29
|
+
export type ArtifactEventData = EventDataUnion<ArtifactEventPayloads>;
|
|
30
|
+
export declare function decodeArtifactEvent(event: EventEnvelope): ArtifactEvent;
|
|
31
|
+
export declare function artifactIntegrationStream(adapter: AdapterId): IntegrationStreamRef;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { eventDataSchema, eventEnvelopeSchema, } from '@atolis-hq/eventing';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { activationId } from '../../activities/index.js';
|
|
3
|
-
import { brandedStringSchema
|
|
4
|
+
import { brandedStringSchema } from '../../kernel/index.js';
|
|
4
5
|
import { workflowInstanceId } from '../../orchestration/index.js';
|
|
5
6
|
import { resourceKind } from '../../resources/index.js';
|
|
6
7
|
import { ArtifactVerificationStatus, } from './artifact-vocabulary.js';
|
|
@@ -11,33 +12,35 @@ export const ArtifactEventType = {
|
|
|
11
12
|
};
|
|
12
13
|
const schema = eventEnvelopeSchema
|
|
13
14
|
.extend({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
kind: z.literal(IntegrationStreamKind.Integration),
|
|
18
|
-
id: brandedStringSchema(adapterId),
|
|
19
|
-
})
|
|
20
|
-
.strict(),
|
|
21
|
-
payload: z
|
|
22
|
-
.object({
|
|
23
|
-
workflowInstanceId: brandedStringSchema(workflowInstanceId),
|
|
24
|
-
activationId: brandedStringSchema(activationId),
|
|
25
|
-
artifact: z
|
|
15
|
+
event: eventDataSchema.extend({
|
|
16
|
+
eventType: z.literal(ArtifactEventType.VerificationUnresolved),
|
|
17
|
+
payload: z
|
|
26
18
|
.object({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
workflowInstanceId: brandedStringSchema(workflowInstanceId),
|
|
20
|
+
activationId: brandedStringSchema(activationId),
|
|
21
|
+
artifact: z
|
|
22
|
+
.object({
|
|
23
|
+
kind: brandedStringSchema(resourceKind),
|
|
24
|
+
externalKey: z
|
|
25
|
+
.object({ adapter: brandedStringSchema(adapterId), key: z.string().min(1) })
|
|
26
|
+
.strict(),
|
|
27
|
+
})
|
|
30
28
|
.strict(),
|
|
29
|
+
status: z.enum([ArtifactVerificationStatus.Failed, ArtifactVerificationStatus.Ambiguous]),
|
|
30
|
+
attempt: z.number().int().positive(),
|
|
31
|
+
escalated: z.boolean(),
|
|
31
32
|
})
|
|
32
33
|
.strict(),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
}),
|
|
35
|
+
stream: z
|
|
36
|
+
.object({
|
|
37
|
+
kind: z.literal(IntegrationStreamKind.Integration),
|
|
38
|
+
id: brandedStringSchema(adapterId),
|
|
36
39
|
})
|
|
37
40
|
.strict(),
|
|
38
41
|
})
|
|
39
42
|
.superRefine((event, context) => {
|
|
40
|
-
if (event.stream.id !== event.payload.artifact.externalKey.adapter)
|
|
43
|
+
if (event.stream.id !== event.event.payload.artifact.externalKey.adapter)
|
|
41
44
|
context.addIssue({
|
|
42
45
|
code: 'custom',
|
|
43
46
|
path: [],
|
|
@@ -47,14 +50,11 @@ const schema = eventEnvelopeSchema
|
|
|
47
50
|
export function decodeArtifactEvent(event) {
|
|
48
51
|
const result = schema.safeParse(event);
|
|
49
52
|
if (!result.success)
|
|
50
|
-
throw new Error(`Invalid artifact event ${event.eventId}: ${result.error.message}`, {
|
|
53
|
+
throw new Error(`Invalid artifact event ${event.event.eventId}: ${result.error.message}`, {
|
|
51
54
|
cause: result.error,
|
|
52
55
|
});
|
|
53
56
|
return result.data;
|
|
54
57
|
}
|
|
55
|
-
export function artifactVerificationUnresolvedDraft(input) {
|
|
56
|
-
return { ...input, schemaVersion: 1 };
|
|
57
|
-
}
|
|
58
58
|
export function artifactIntegrationStream(adapter) {
|
|
59
59
|
return integrationStream(adapter);
|
|
60
60
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ValueOf } from '../../kernel/index.js';
|
|
2
|
+
export declare const ArtifactVerificationResult: {
|
|
3
|
+
readonly NotFound: "not-found";
|
|
4
|
+
readonly Ambiguous: "ambiguous";
|
|
5
|
+
};
|
|
6
|
+
export type ArtifactVerificationResult = ValueOf<typeof ArtifactVerificationResult>;
|
|
7
|
+
export declare const ArtifactVerificationStatus: {
|
|
8
|
+
readonly Failed: "failed";
|
|
9
|
+
readonly Ambiguous: "ambiguous";
|
|
10
|
+
};
|
|
11
|
+
export type ArtifactVerificationStatus = ValueOf<typeof ArtifactVerificationStatus>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const integrationsConfigSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodObject<{
|
|
3
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
4
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
}, z.core.$loose>, z.ZodTransform<{
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
provider?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
provider?: string | undefined;
|
|
12
|
+
}>>>>;
|
|
13
|
+
export type IntegrationsConfig = z.infer<typeof integrationsConfigSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type MatchMode } from '../../kernel/index.js';
|
|
2
|
+
export type IntakeFacts = Readonly<Record<string, readonly string[]>>;
|
|
3
|
+
export interface IntakeRule {
|
|
4
|
+
readonly where: IntakeFacts;
|
|
5
|
+
/** Values which explicitly suppress this rule's observation. */
|
|
6
|
+
readonly ignoredValues?: IntakeFacts | undefined;
|
|
7
|
+
readonly matchMode: MatchMode;
|
|
8
|
+
readonly tags: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export interface IntakeDecision {
|
|
11
|
+
readonly admitted: boolean;
|
|
12
|
+
readonly tags: readonly string[];
|
|
13
|
+
readonly ignored?: true | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function evaluateIntakeRules(rules: readonly IntakeRule[], facts: IntakeFacts): IntakeDecision;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EventData, EventProcessor } from '@atolis-hq/eventing';
|
|
2
|
+
export type ProviderEventData = EventData<string, unknown>;
|
|
3
|
+
export interface ExternalEventSource {
|
|
4
|
+
poll(signal: AbortSignal): Promise<readonly ProviderEventData[]>;
|
|
5
|
+
/** Commits provider cursor state after every draft from the poll is durable. */
|
|
6
|
+
markPollPersisted?(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface InboundTranslation {
|
|
9
|
+
/** Stable adapter-specific definition hosted by the shared Eventing runtime. */
|
|
10
|
+
readonly processor: EventProcessor;
|
|
11
|
+
}
|
|
12
|
+
export interface ProviderReconciler {
|
|
13
|
+
/** Provider recovery stays in the maintenance lane, outside incremental event handling. */
|
|
14
|
+
reconcileOnce(): Promise<void>;
|
|
15
|
+
}
|