@atolis-hq/wake 0.4.2 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/src/activities/agent/agent-activity-definition.d.ts +9 -0
- package/dist/src/activities/agent/agent-activity.d.ts +51 -0
- package/dist/src/activities/agent/agent-result.d.ts +43 -0
- package/dist/src/activities/contracts/activity.d.ts +184 -0
- package/dist/src/activities/contracts/config.d.ts +3 -0
- package/dist/src/activities/contracts/decision-claim-schema.d.ts +35 -0
- package/dist/src/activities/contracts/decision-claim-schema.js +42 -0
- package/dist/src/activities/contracts/event-factory.d.ts +6 -0
- package/dist/src/activities/contracts/event-factory.js +40 -0
- package/dist/src/activities/contracts/event-integrity.d.ts +61 -0
- package/dist/src/activities/contracts/event-integrity.js +50 -0
- package/dist/src/activities/contracts/event-schema.d.ts +2803 -0
- package/dist/src/activities/contracts/event-schema.js +67 -121
- package/dist/src/activities/contracts/events.d.ts +153 -0
- package/dist/src/activities/contracts/events.js +4 -4
- package/dist/src/activities/contracts/identifiers.d.ts +5 -0
- package/dist/src/activities/contracts/registry.d.ts +19 -0
- package/dist/src/activities/contracts/streams.d.ts +13 -0
- package/dist/src/activities/contracts/vocabulary.d.ts +69 -0
- package/dist/src/activities/index.d.ts +23 -0
- package/dist/src/activities/index.js +1 -0
- package/dist/src/activities/issue/complete.d.ts +26 -0
- package/dist/src/activities/issue/complete.js +5 -5
- package/dist/src/activities/pr/activity-support.d.ts +38 -0
- package/dist/src/activities/pr/activity-support.js +1 -1
- package/dist/src/activities/pr/application.d.ts +17 -0
- package/dist/src/activities/pr/application.js +6 -6
- package/dist/src/activities/pr/approve.d.ts +7 -0
- package/dist/src/activities/pr/approve.js +8 -3
- package/dist/src/activities/pr/capability.d.ts +2 -0
- package/dist/src/activities/pr/contracts.d.ts +133 -0
- package/dist/src/activities/pr/decision-claim.d.ts +26 -0
- package/dist/src/activities/pr/decision-claim.js +50 -30
- package/dist/src/activities/pr/event-data.d.ts +21 -0
- package/dist/src/activities/pr/event-data.js +101 -0
- package/dist/src/activities/pr/intent.d.ts +12 -0
- package/dist/src/activities/pr/intent.js +5 -5
- package/dist/src/activities/pr/merge-authority-gate.d.ts +13 -0
- package/dist/src/activities/pr/merge-authority-gate.js +1 -1
- package/dist/src/activities/pr/merge.d.ts +7 -0
- package/dist/src/activities/pr/merge.js +8 -3
- package/dist/src/activities/pr/policy.d.ts +13 -0
- package/dist/src/activities/pr/projection.d.ts +5 -0
- package/dist/src/activities/pr/projection.js +18 -17
- package/dist/src/activities/pr/vocabulary.d.ts +34 -0
- package/dist/src/activities/review/authorization.d.ts +9 -0
- package/dist/src/activities/review/contracts.d.ts +46 -0
- package/dist/src/activities/review/signals.d.ts +2 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.d.ts +3 -0
- package/dist/src/bootstrap/activation-scheduler-serialiser.js +8 -0
- package/dist/src/bootstrap/activity-registry.d.ts +4 -0
- package/dist/src/bootstrap/analytics-projection.d.ts +12 -0
- package/dist/src/bootstrap/analytics-projection.js +3 -3
- package/dist/src/bootstrap/board-projection.d.ts +56 -0
- package/dist/src/bootstrap/board-projection.js +156 -71
- package/dist/src/bootstrap/composition-root.d.ts +76 -0
- package/dist/src/bootstrap/composition-root.js +20 -13
- package/dist/src/bootstrap/config/load-config.d.ts +6 -0
- package/dist/src/bootstrap/config/root-schema.d.ts +443 -0
- package/dist/src/bootstrap/event-processor-runtime.d.ts +22 -0
- package/dist/src/bootstrap/event-processor-runtime.js +88 -0
- package/dist/src/bootstrap/external-ref.d.ts +3 -0
- package/dist/src/bootstrap/fake-provider-files.d.ts +3 -0
- package/dist/src/bootstrap/fake-scenarios.d.ts +3 -0
- package/dist/src/bootstrap/index.d.ts +27 -0
- package/dist/src/bootstrap/index.js +2 -28
- package/dist/src/bootstrap/initialise.d.ts +4 -0
- package/dist/src/bootstrap/initialise.js +8 -16
- package/dist/src/bootstrap/integration-runtime.d.ts +48 -0
- package/dist/src/bootstrap/integration-runtime.js +36 -54
- package/dist/src/bootstrap/paths.d.ts +12 -0
- package/dist/src/bootstrap/persistence-composition.d.ts +21 -0
- package/dist/src/bootstrap/persistence-composition.js +12 -4
- package/dist/src/bootstrap/projection-runtime.d.ts +16 -0
- package/dist/src/bootstrap/projection-runtime.js +50 -23
- package/dist/src/bootstrap/resource-transition-evidence.d.ts +11 -0
- package/dist/src/bootstrap/runner-quota-reporter.d.ts +6 -0
- package/dist/src/bootstrap/runner-quota-reporter.js +16 -11
- package/dist/src/bootstrap/runner-registry.d.ts +3 -0
- package/dist/src/bootstrap/runner-tick-adapter.d.ts +16 -0
- package/dist/src/bootstrap/runner-tick-adapter.js +57 -0
- package/dist/src/bootstrap/schedule-checkpoint-store.d.ts +9 -0
- package/dist/src/bootstrap/self-update-application.d.ts +54 -0
- package/dist/src/bootstrap/self-update-failure-log.d.ts +17 -0
- package/dist/src/bootstrap/source-update-port.d.ts +8 -0
- package/dist/src/bootstrap/status-publish-activity.d.ts +7 -0
- package/dist/src/bootstrap/status-publish-activity.js +4 -5
- package/dist/src/bootstrap/surface-api-applications.d.ts +18 -0
- package/dist/src/bootstrap/surface-api-applications.js +104 -57
- package/dist/src/bootstrap/surface-api-execution-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-execution-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-metadata.d.ts +4 -0
- package/dist/src/bootstrap/surface-api-metadata.js +1 -1
- package/dist/src/bootstrap/surface-api-projection-pages.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-run-context.d.ts +12 -0
- package/dist/src/bootstrap/surface-api-transcripts.d.ts +10 -0
- package/dist/src/bootstrap/surface-api-work-applications.d.ts +3 -0
- package/dist/src/bootstrap/surface-api-work-applications.js +3 -3
- package/dist/src/bootstrap/surface-api-workflow-diagrams.d.ts +11 -0
- package/dist/src/bootstrap/surface-api-workflow-diagrams.js +2 -2
- package/dist/src/bootstrap/surface-applications.d.ts +10 -0
- package/dist/src/bootstrap/surface-cli-applications.d.ts +33 -0
- package/dist/src/bootstrap/surface-cli-applications.js +151 -65
- package/dist/src/bootstrap/transcript-retention.d.ts +11 -0
- package/dist/src/bootstrap/update-ledger.d.ts +9 -0
- package/dist/src/bootstrap/update-maintenance-lease.d.ts +24 -0
- package/dist/src/bootstrap/update-maintenance-lease.js +1 -1
- package/dist/src/bootstrap/version.d.ts +13 -0
- package/dist/src/bootstrap/version.js +1 -1
- package/dist/src/control-plane/application/activation-scheduler-ports.d.ts +71 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.d.ts +42 -0
- package/dist/src/control-plane/application/activation-scheduler-subscriber.js +111 -0
- package/dist/src/control-plane/application/activation-scheduler.d.ts +8 -0
- package/dist/src/control-plane/application/activation-scheduler.js +165 -0
- package/dist/src/control-plane/application/advance-once-dispatch.d.ts +46 -0
- package/dist/src/control-plane/application/advance-once-dispatch.js +6 -7
- package/dist/src/control-plane/application/advance-once.d.ts +5 -0
- package/dist/src/control-plane/application/advance-once.js +4 -158
- package/dist/src/control-plane/application/control-plane-projection.d.ts +21 -0
- package/dist/src/control-plane/application/control-plane-projection.js +27 -5
- package/dist/src/control-plane/application/control-plane-service.d.ts +12 -0
- package/dist/src/control-plane/application/control-plane-service.js +28 -9
- package/dist/src/control-plane/application/execution-reconciliation.d.ts +21 -0
- package/dist/src/control-plane/application/intake-pipeline.d.ts +18 -0
- package/dist/src/control-plane/application/intake-pipeline.js +8 -18
- package/dist/src/control-plane/application/runner-control-service.d.ts +12 -0
- package/dist/src/control-plane/application/runner-control-service.js +35 -13
- package/dist/src/control-plane/application/runner-pipeline.d.ts +24 -0
- package/dist/src/control-plane/application/runner-pipeline.js +23 -41
- package/dist/src/control-plane/application/schedule-service.d.ts +31 -0
- package/dist/src/control-plane/application/schedule-service.js +1 -1
- package/dist/src/control-plane/application/work-cancellation-policy.d.ts +20 -0
- package/dist/src/control-plane/application/work-cancellation-policy.js +1 -1
- package/dist/src/control-plane/contracts/commands.d.ts +20 -0
- package/dist/src/control-plane/contracts/config.d.ts +30 -0
- package/dist/src/control-plane/contracts/config.js +7 -1
- package/dist/src/control-plane/contracts/event-factory.d.ts +6 -0
- package/dist/src/control-plane/contracts/event-factory.js +14 -0
- package/dist/src/control-plane/contracts/events.d.ts +36 -0
- package/dist/src/control-plane/contracts/events.js +42 -47
- package/dist/src/control-plane/contracts/streams.d.ts +6 -0
- package/dist/src/control-plane/contracts/views.d.ts +28 -0
- package/dist/src/control-plane/domain/dispatch-policy.d.ts +18 -0
- package/dist/src/control-plane/domain/quota-policy.d.ts +21 -0
- package/dist/src/control-plane/domain/runner-quota.d.ts +2 -0
- package/dist/src/control-plane/domain/schedule-policy.d.ts +8 -0
- package/dist/src/control-plane/index.d.ts +24 -0
- package/dist/src/control-plane/index.js +3 -0
- package/dist/src/control-plane/infrastructure/intake-host.d.ts +19 -0
- package/dist/src/control-plane/infrastructure/intake-host.js +2 -3
- package/dist/src/control-plane/infrastructure/resident-host.d.ts +16 -0
- package/dist/src/control-plane/infrastructure/resident-host.js +3 -1
- package/dist/src/control-plane/infrastructure/tick-host.d.ts +6 -0
- package/dist/src/control-plane/infrastructure/tick-host.js +2 -2
- package/dist/src/conversations/application/conversation-projection.d.ts +3 -0
- package/dist/src/conversations/application/conversation-repository.d.ts +13 -0
- package/dist/src/conversations/application/conversation-repository.js +1 -1
- package/dist/src/conversations/application/conversation-service.d.ts +16 -0
- package/dist/src/conversations/application/conversation-service.js +32 -27
- package/dist/src/conversations/contracts/commands.d.ts +33 -0
- package/dist/src/conversations/contracts/event-factory.d.ts +6 -0
- package/dist/src/conversations/contracts/event-factory.js +18 -0
- package/dist/src/conversations/contracts/events.d.ts +42 -0
- package/dist/src/conversations/contracts/events.js +37 -24
- package/dist/src/conversations/contracts/identifiers.d.ts +5 -0
- package/dist/src/conversations/contracts/streams.d.ts +7 -0
- package/dist/src/conversations/contracts/views.d.ts +49 -0
- package/dist/src/conversations/contracts/vocabulary.d.ts +5 -0
- package/dist/src/conversations/domain/conversation.d.ts +4 -0
- package/dist/src/conversations/domain/conversation.js +8 -7
- package/dist/src/conversations/index.d.ts +9 -0
- package/dist/src/conversations/index.js +1 -0
- package/dist/src/execution/application/activation-claim.d.ts +23 -0
- package/dist/src/execution/application/activation-claim.js +8 -9
- package/dist/src/execution/application/active-run-cancellation.d.ts +4 -0
- package/dist/src/execution/application/active-run-cancellation.js +2 -2
- package/dist/src/execution/application/execution-activity.d.ts +61 -0
- package/dist/src/execution/application/execution-activity.js +4 -1
- package/dist/src/execution/application/execution-projection.d.ts +11 -0
- package/dist/src/execution/application/execution-projection.js +8 -4
- package/dist/src/execution/application/execution-service.d.ts +33 -0
- package/dist/src/execution/application/execution-service.js +288 -59
- package/dist/src/execution/application/execution-validation.d.ts +8 -0
- package/dist/src/execution/application/execution-validation.js +3 -2
- package/dist/src/execution/application/recovery-service.d.ts +52 -0
- package/dist/src/execution/application/recovery-service.js +32 -17
- package/dist/src/execution/application/run-lifecycle.d.ts +75 -0
- package/dist/src/execution/application/run-lifecycle.js +130 -62
- package/dist/src/execution/application/run-liveness-service.d.ts +14 -0
- package/dist/src/execution/application/run-liveness-service.js +68 -30
- package/dist/src/execution/application/run-repository.d.ts +18 -0
- package/dist/src/execution/application/run-repository.js +2 -2
- package/dist/src/execution/contracts/commands.d.ts +30 -0
- package/dist/src/execution/contracts/config.d.ts +94 -0
- package/dist/src/execution/contracts/control-plane.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.d.ts +10 -0
- package/dist/src/execution/contracts/event-factory.js +20 -31
- package/dist/src/execution/contracts/events.d.ts +198 -0
- package/dist/src/execution/contracts/events.js +152 -129
- package/dist/src/execution/contracts/identifiers.d.ts +3 -0
- package/dist/src/execution/contracts/liveness.d.ts +17 -0
- package/dist/src/execution/contracts/results.d.ts +23 -0
- package/dist/src/execution/contracts/runner.d.ts +78 -0
- package/dist/src/execution/contracts/streams.d.ts +12 -0
- package/dist/src/execution/contracts/views.d.ts +42 -0
- package/dist/src/execution/contracts/vocabulary.d.ts +50 -0
- package/dist/src/execution/contracts/vocabulary.js +4 -0
- package/dist/src/execution/contracts/workspace.d.ts +48 -0
- package/dist/src/execution/domain/run-result.d.ts +2 -0
- package/dist/src/execution/domain/run.d.ts +3 -0
- package/dist/src/execution/domain/run.js +72 -22
- package/dist/src/execution/index.d.ts +34 -0
- package/dist/src/execution/infrastructure/agent-runner-adapter.d.ts +2 -0
- package/dist/src/execution/infrastructure/codex-stop-hook.d.ts +13 -0
- package/dist/src/execution/infrastructure/process-execution.d.ts +23 -0
- package/dist/src/execution/infrastructure/prompt-templates.d.ts +15 -0
- package/dist/src/execution/infrastructure/runner-memory-profile.d.ts +11 -0
- package/dist/src/execution/infrastructure/runners/claude.d.ts +34 -0
- package/dist/src/execution/infrastructure/runners/codex.d.ts +13 -0
- package/dist/src/execution/infrastructure/runners/command.d.ts +3 -0
- package/dist/src/execution/infrastructure/runners/cursor.d.ts +12 -0
- package/dist/src/execution/infrastructure/runners/fake-scenarios.d.ts +35 -0
- package/dist/src/execution/infrastructure/runners/fake.d.ts +8 -0
- package/dist/src/execution/infrastructure/runners/registry.d.ts +14 -0
- package/dist/src/execution/infrastructure/transcript-store.d.ts +48 -0
- package/dist/src/execution/infrastructure/transcripts.d.ts +1 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.d.ts +36 -0
- package/dist/src/execution/infrastructure/workspace/fake-workspace.js +2 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.d.ts +29 -0
- package/dist/src/execution/infrastructure/workspace/git-workspace.js +21 -11
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.d.ts +3 -0
- package/dist/src/execution/infrastructure/workspace/prepare-workspace.js +4 -2
- package/dist/src/integrations/application/adapter-health-tracker.d.ts +17 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.d.ts +25 -0
- package/dist/src/integrations/application/agent-run-publication-reactor.js +36 -20
- package/dist/src/integrations/application/artifact-registration-reactor.d.ts +32 -0
- package/dist/src/integrations/application/artifact-registration-reactor.js +43 -35
- package/dist/src/integrations/application/poll-service.d.ts +13 -0
- package/dist/src/integrations/application/poll-service.js +2 -2
- package/dist/src/integrations/application/terminal-agent-run-report.d.ts +33 -0
- package/dist/src/integrations/application/work-admission.d.ts +30 -0
- package/dist/src/integrations/application/work-conclusion.d.ts +13 -0
- package/dist/src/integrations/contracts/artifact-event-factory.d.ts +6 -0
- package/dist/src/integrations/contracts/artifact-event-factory.js +8 -0
- package/dist/src/integrations/contracts/artifact-events.d.ts +31 -0
- package/dist/src/integrations/contracts/artifact-events.js +24 -24
- package/dist/src/integrations/contracts/artifact-vocabulary.d.ts +11 -0
- package/dist/src/integrations/contracts/config.d.ts +13 -0
- package/dist/src/integrations/contracts/identifiers.d.ts +3 -0
- package/dist/src/integrations/contracts/intake-rules.d.ts +15 -0
- package/dist/src/integrations/contracts/intake.d.ts +15 -0
- package/dist/src/integrations/contracts/outcome-vocabulary.d.ts +6 -0
- package/dist/src/integrations/contracts/provider.d.ts +105 -0
- package/dist/src/integrations/contracts/reply-routing.d.ts +31 -0
- package/dist/src/integrations/contracts/streams.d.ts +12 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.d.ts +24 -0
- package/dist/src/integrations/delivery/application/delivery-outcome-reactor.js +151 -73
- package/dist/src/integrations/delivery/application/delivery-projector.d.ts +5 -0
- package/dist/src/integrations/delivery/application/delivery-projector.js +52 -52
- package/dist/src/integrations/delivery/application/delivery-service.d.ts +40 -0
- package/dist/src/integrations/delivery/application/delivery-service.js +15 -16
- package/dist/src/integrations/delivery/contracts/commands.d.ts +7 -0
- package/dist/src/integrations/delivery/contracts/config.d.ts +25 -0
- package/dist/src/integrations/delivery/contracts/event-factory.d.ts +11 -0
- package/dist/src/integrations/delivery/contracts/event-factory.js +20 -9
- package/dist/src/integrations/delivery/contracts/events.d.ts +46 -0
- package/dist/src/integrations/delivery/contracts/events.js +33 -18
- package/dist/src/integrations/delivery/contracts/intents.d.ts +54 -0
- package/dist/src/integrations/delivery/contracts/intents.js +21 -14
- package/dist/src/integrations/delivery/contracts/views.d.ts +47 -0
- package/dist/src/integrations/delivery/contracts/vocabulary.d.ts +25 -0
- package/dist/src/integrations/fake/durable-delivery-provider.d.ts +29 -0
- package/dist/src/integrations/fake/external-sink.d.ts +5 -0
- package/dist/src/integrations/fake/external-source.d.ts +30 -0
- package/dist/src/integrations/fake/external-source.js +1 -3
- package/dist/src/integrations/fake/inbound-translator.d.ts +16 -0
- package/dist/src/integrations/fake/inbound-translator.js +22 -10
- package/dist/src/integrations/fake/provider.d.ts +38 -0
- package/dist/src/integrations/fake/provider.js +3 -1
- package/dist/src/integrations/github/application/agent-context-reader.d.ts +6 -0
- package/dist/src/integrations/github/application/agent-context-reader.js +10 -7
- package/dist/src/integrations/github/application/agent-run-comment.d.ts +22 -0
- package/dist/src/integrations/github/application/comment-history-reader.d.ts +25 -0
- package/dist/src/integrations/github/application/comment-history-reader.js +36 -32
- package/dist/src/integrations/github/application/delivery-marker.d.ts +2 -0
- package/dist/src/integrations/github/application/inbound-comment-syntax.d.ts +8 -0
- package/dist/src/integrations/github/application/inbound-context.d.ts +3 -0
- package/dist/src/integrations/github/application/inbound-context.js +4 -4
- package/dist/src/integrations/github/application/inbound-review-signals.d.ts +21 -0
- package/dist/src/integrations/github/application/inbound-review-signals.js +30 -25
- package/dist/src/integrations/github/application/inbound-translator.d.ts +103 -0
- package/dist/src/integrations/github/application/inbound-translator.js +149 -160
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.d.ts +10 -0
- package/dist/src/integrations/github/application/inbound-watch-gate-signals.js +4 -4
- package/dist/src/integrations/github/application/intake-policy.d.ts +7 -0
- package/dist/src/integrations/github/application/operator-retry-command.d.ts +1 -0
- package/dist/src/integrations/github/application/outbound-translator.d.ts +19 -0
- package/dist/src/integrations/github/application/poll-service.d.ts +11 -0
- package/dist/src/integrations/github/application/poll-service.js +11 -2
- package/dist/src/integrations/github/application/pull-request-translation.d.ts +5 -0
- package/dist/src/integrations/github/application/reply-target-selector.d.ts +8 -0
- package/dist/src/integrations/github/application/resource-links.d.ts +2 -0
- package/dist/src/integrations/github/application/review-command-translator.d.ts +14 -0
- package/dist/src/integrations/github/application/wake-labels.d.ts +29 -0
- package/dist/src/integrations/github/contracts/check-evidence.d.ts +1 -0
- package/dist/src/integrations/github/contracts/config.d.ts +81 -0
- package/dist/src/integrations/github/contracts/event-factory.d.ts +6 -0
- package/dist/src/integrations/github/contracts/event-factory.js +26 -0
- package/dist/src/integrations/github/contracts/events.d.ts +135 -0
- package/dist/src/integrations/github/contracts/events.js +118 -132
- package/dist/src/integrations/github/contracts/external-key.d.ts +8 -0
- package/dist/src/integrations/github/contracts/issue-query.d.ts +5 -0
- package/dist/src/integrations/github/contracts/payloads.d.ts +74 -0
- package/dist/src/integrations/github/contracts/vocabulary.d.ts +64 -0
- package/dist/src/integrations/github/index.d.ts +34 -0
- package/dist/src/integrations/github/index.js +1 -0
- package/dist/src/integrations/github/infrastructure/adapter-health-registry.d.ts +11 -0
- package/dist/src/integrations/github/infrastructure/bounded-fetch.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/client-reads.d.ts +255 -0
- package/dist/src/integrations/github/infrastructure/client.d.ts +263 -0
- package/dist/src/integrations/github/infrastructure/comment-source.d.ts +7 -0
- package/dist/src/integrations/github/infrastructure/content-fingerprint.d.ts +2 -0
- package/dist/src/integrations/github/infrastructure/delivery.d.ts +6 -0
- package/dist/src/integrations/github/infrastructure/etag-cache.d.ts +29 -0
- package/dist/src/integrations/github/infrastructure/gh-auth.d.ts +4 -0
- package/dist/src/integrations/github/infrastructure/issue-source.d.ts +20 -0
- package/dist/src/integrations/github/infrastructure/issue-source.js +10 -6
- package/dist/src/integrations/github/infrastructure/poll-watermark.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/pr-source.d.ts +16 -0
- package/dist/src/integrations/github/infrastructure/pr-source.js +6 -4
- package/dist/src/integrations/github/infrastructure/request-coordinator.d.ts +13 -0
- package/dist/src/integrations/github/infrastructure/review-source.d.ts +10 -0
- package/dist/src/integrations/github/infrastructure/review-source.js +29 -25
- package/dist/src/integrations/github/infrastructure/source-contracts.d.ts +22 -0
- package/dist/src/integrations/github/infrastructure/source.d.ts +12 -0
- package/dist/src/integrations/github/infrastructure/source.js +3 -5
- package/dist/src/integrations/github/provider.d.ts +3 -0
- package/dist/src/integrations/github/provider.js +14 -12
- package/dist/src/integrations/index.d.ts +32 -0
- package/dist/src/integrations/index.js +1 -0
- package/dist/src/kernel/contracts/clock.d.ts +3 -0
- package/dist/src/kernel/contracts/id-generator.d.ts +3 -0
- package/dist/src/kernel/contracts/identifiers.d.ts +7 -0
- package/dist/src/kernel/contracts/identifiers.js +1 -8
- package/dist/src/kernel/contracts/relations.d.ts +14 -0
- package/dist/src/kernel/contracts/schema.d.ts +3 -0
- package/dist/src/kernel/contracts/vocabulary.d.ts +7 -0
- package/dist/src/kernel/domain/match-mode.d.ts +2 -0
- package/dist/src/kernel/domain/relation.d.ts +9 -0
- package/dist/src/kernel/index.d.ts +10 -0
- package/dist/src/kernel/index.js +0 -11
- package/dist/src/kernel/infrastructure/system-clock.d.ts +4 -0
- package/dist/src/kernel/infrastructure/ulid-id-generator.d.ts +4 -0
- package/dist/src/main.d.ts +14 -0
- package/dist/src/node_modules/@atolis-hq/eventing/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing/README.md +41 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/commands.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts +13 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-envelope.d.ts.map +1 -0
- package/dist/src/{kernel/domain → node_modules/@atolis-hq/eventing/dist/contracts}/event-envelope.js +4 -4
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/event-schema.d.ts.map +1 -0
- package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/event-schema.js +21 -5
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts +46 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/events.js +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/identifiers.js +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts +11 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/index.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-event-journal.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-run-serialiser.js +26 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-processor-state-store.js +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-memory-projection-store.d.ts.map +1 -0
- package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-projection-store.js +2 -1
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.d.ts.map +1 -0
- package/dist/src/{kernel/infrastructure/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/memory/in-process-journal-change-signal.js} +5 -2
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/memory.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts +20 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-processor.js +83 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts +22 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/projections/projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/cached-journal-view.js +24 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/clock.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts +39 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/event-processor-host.js +168 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-health.js +66 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts +2 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-run-serialiser.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/runtime/processor-validation.js +43 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/checkpoint-store.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts +14 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/store/event-journal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts +49 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/event-processor.js +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/dist/subscriptions/journal-change-signal.js +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing/package.json +42 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/LICENSE +201 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/README.md +40 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts +23 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/atomic-write.js +54 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts +4 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/event-record-codec.js +50 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts +17 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-checkpoint-store.js +99 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts +51 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-event-journal.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-event-journal.js +185 -103
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-lock.d.ts.map +1 -0
- package/dist/src/{persistence/filesystem → node_modules/@atolis-hq/eventing-filesystem/dist}/file-lock.js +10 -1
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts +9 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-run-serialiser.js +82 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts +12 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-processor-state-store.js +127 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts +19 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/file-projection-store.js +219 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts +7 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/index.js +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts +10 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-paths.js +27 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts +8 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/processor-state-record.js +28 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts +6 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.d.ts.map +1 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/dist/storage-name.js +34 -0
- package/dist/src/node_modules/@atolis-hq/eventing-filesystem/package.json +38 -0
- package/dist/src/orchestration/application/accept-activity-outcome.d.ts +18 -0
- package/dist/src/orchestration/application/accept-signal.d.ts +14 -0
- package/dist/src/orchestration/application/advance-workflow.d.ts +50 -0
- package/dist/src/orchestration/application/advance-workflow.js +7 -12
- package/dist/src/orchestration/application/coordination-claims.d.ts +17 -0
- package/dist/src/orchestration/application/coordination-claims.js +17 -20
- package/dist/src/orchestration/application/durable-append.d.ts +17 -0
- package/dist/src/orchestration/application/durable-append.js +1 -1
- package/dist/src/orchestration/application/group-budget-recorder.d.ts +9 -0
- package/dist/src/orchestration/application/group-budget-recorder.js +9 -6
- package/dist/src/orchestration/application/orchestration-projection.d.ts +6 -0
- package/dist/src/orchestration/application/orchestration-projection.js +6 -7
- package/dist/src/orchestration/application/orchestration-repository.d.ts +23 -0
- package/dist/src/orchestration/application/orchestration-repository.js +2 -2
- package/dist/src/orchestration/application/orchestration-service.d.ts +93 -0
- package/dist/src/orchestration/application/orchestration-service.js +10 -1
- package/dist/src/orchestration/application/pull-request-transition-evidence.d.ts +3 -0
- package/dist/src/orchestration/application/pull-request-transition-evidence.js +10 -10
- package/dist/src/orchestration/application/reactor-command-context.d.ts +5 -0
- package/dist/src/orchestration/application/reactor-command-context.js +9 -0
- package/dist/src/orchestration/application/request-child.d.ts +29 -0
- package/dist/src/orchestration/application/request-child.js +26 -10
- package/dist/src/orchestration/application/resource-transition-evidence.d.ts +18 -0
- package/dist/src/orchestration/application/resource-transition-matching.d.ts +19 -0
- package/dist/src/orchestration/application/resource-transition-matching.js +9 -3
- package/dist/src/orchestration/application/resource-transition-reactor.d.ts +16 -0
- package/dist/src/orchestration/application/resource-transition-reactor.js +21 -42
- package/dist/src/orchestration/application/signal-reactor.d.ts +11 -0
- package/dist/src/orchestration/application/start-workflow.d.ts +18 -0
- package/dist/src/orchestration/application/start-workflow.js +3 -4
- package/dist/src/orchestration/application/trigger-workflow-instance.d.ts +12 -0
- package/dist/src/orchestration/application/trigger-workflow-instance.js +1 -1
- package/dist/src/orchestration/application/watch-child-transitions.d.ts +2 -0
- package/dist/src/orchestration/application/watch-matching.d.ts +13 -0
- package/dist/src/orchestration/application/watch-matching.js +3 -3
- package/dist/src/orchestration/application/watch-reactor.d.ts +42 -0
- package/dist/src/orchestration/application/watch-reactor.js +36 -35
- package/dist/src/orchestration/application/workflow-definition-registry.d.ts +32 -0
- package/dist/src/orchestration/application/workflow-definition-registry.js +13 -11
- package/dist/src/orchestration/contracts/activity-outcome.d.ts +15 -0
- package/dist/src/orchestration/contracts/commands.d.ts +30 -0
- package/dist/src/orchestration/contracts/config.d.ts +356 -0
- package/dist/src/orchestration/contracts/event-decoder.d.ts +262 -0
- package/dist/src/orchestration/contracts/event-decoder.js +88 -64
- package/dist/src/orchestration/contracts/event-factory.d.ts +6 -0
- package/dist/src/orchestration/contracts/event-factory.js +64 -0
- package/dist/src/orchestration/contracts/events.d.ts +233 -0
- package/dist/src/orchestration/contracts/identifiers.d.ts +15 -0
- package/dist/src/orchestration/contracts/streams.d.ts +28 -0
- package/dist/src/orchestration/contracts/views.d.ts +68 -0
- package/dist/src/orchestration/contracts/vocabulary.d.ts +34 -0
- package/dist/src/orchestration/domain/activation-policy.d.ts +60 -0
- package/dist/src/orchestration/domain/activation-policy.js +34 -19
- package/dist/src/orchestration/domain/approval-defaults.d.ts +8 -0
- package/dist/src/orchestration/domain/child-policy.d.ts +20 -0
- package/dist/src/orchestration/domain/compiler.d.ts +3 -0
- package/dist/src/orchestration/domain/coordination-events.d.ts +18 -0
- package/dist/src/orchestration/domain/coordination-events.js +25 -11
- package/dist/src/orchestration/domain/decision-events.d.ts +33 -0
- package/dist/src/orchestration/domain/decision-events.js +26 -15
- package/dist/src/orchestration/domain/interpreter.d.ts +14 -0
- package/dist/src/orchestration/domain/interpreter.js +4 -1
- package/dist/src/orchestration/domain/operator-retry-policy.d.ts +14 -0
- package/dist/src/orchestration/domain/operator-retry-policy.js +29 -11
- package/dist/src/orchestration/domain/resource-transition-compiler.d.ts +8 -0
- package/dist/src/orchestration/domain/retry-policy.d.ts +7 -0
- package/dist/src/orchestration/domain/retry-policy.js +7 -4
- package/dist/src/orchestration/domain/runner-quota-retry-policy.d.ts +10 -0
- package/dist/src/orchestration/domain/runner-quota-retry-policy.js +21 -15
- package/dist/src/orchestration/domain/signal-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/signal-policy.js +18 -7
- package/dist/src/orchestration/domain/supplemental-policy.d.ts +11 -0
- package/dist/src/orchestration/domain/supplemental-policy.js +29 -14
- package/dist/src/orchestration/domain/transition.d.ts +16 -0
- package/dist/src/orchestration/domain/transition.js +46 -28
- package/dist/src/orchestration/domain/workflow-graph.d.ts +4 -0
- package/dist/src/orchestration/domain/workflow-instance-events.d.ts +44 -0
- package/dist/src/orchestration/domain/workflow-instance.d.ts +7 -0
- package/dist/src/orchestration/domain/workflow-instance.js +29 -9
- package/dist/src/orchestration/domain/workflow-selector.d.ts +15 -0
- package/dist/src/orchestration/index.d.ts +27 -0
- package/dist/src/orchestration/index.js +1 -0
- package/dist/src/resources/application/lookup-projections.d.ts +6 -0
- package/dist/src/resources/application/lookup-projections.js +15 -15
- package/dist/src/resources/application/resource-correlation-retry.d.ts +16 -0
- package/dist/src/resources/application/resource-correlation-retry.js +39 -44
- package/dist/src/resources/application/resource-event-support.d.ts +12 -0
- package/dist/src/resources/application/resource-event-support.js +17 -0
- package/dist/src/resources/application/resource-lookup.d.ts +17 -0
- package/dist/src/resources/application/resource-lookup.js +9 -9
- package/dist/src/resources/application/resource-projections.d.ts +4 -0
- package/dist/src/resources/application/resource-projections.js +32 -24
- package/dist/src/resources/application/resource-repository.d.ts +16 -0
- package/dist/src/resources/application/resource-repository.js +3 -3
- package/dist/src/resources/application/resource-service.d.ts +34 -0
- package/dist/src/resources/application/resource-service.js +73 -52
- package/dist/src/resources/contracts/commands.d.ts +23 -0
- package/dist/src/resources/contracts/config.d.ts +3 -0
- package/dist/src/resources/contracts/event-factory.d.ts +6 -0
- package/dist/src/resources/contracts/event-factory.js +32 -0
- package/dist/src/resources/contracts/events.d.ts +79 -0
- package/dist/src/resources/contracts/events.js +94 -102
- package/dist/src/resources/contracts/identifiers.d.ts +7 -0
- package/dist/src/resources/contracts/streams.d.ts +8 -0
- package/dist/src/resources/contracts/views.d.ts +35 -0
- package/dist/src/resources/contracts/vocabulary.d.ts +50 -0
- package/dist/src/resources/domain/correlation.d.ts +6 -0
- package/dist/src/resources/domain/resource.d.ts +8 -0
- package/dist/src/resources/domain/resource.js +24 -21
- package/dist/src/resources/index.d.ts +15 -0
- package/dist/src/resources/index.js +1 -0
- package/dist/src/surfaces/api/contracts/activities.d.ts +1 -0
- package/dist/src/surfaces/api/contracts/board.d.ts +46 -0
- package/dist/src/surfaces/api/contracts/board.js +1 -1
- package/dist/src/surfaces/api/contracts/common.d.ts +43 -0
- package/dist/src/surfaces/api/contracts/control-plane.d.ts +37 -0
- package/dist/src/surfaces/api/contracts/events.d.ts +13 -0
- package/dist/src/surfaces/api/contracts/execution.d.ts +67 -0
- package/dist/src/surfaces/api/contracts/index.d.ts +14 -0
- package/dist/src/surfaces/api/contracts/observability.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/orchestration.d.ts +16 -0
- package/dist/src/surfaces/api/contracts/resources.d.ts +10 -0
- package/dist/src/surfaces/api/contracts/status.d.ts +4 -0
- package/dist/src/surfaces/api/contracts/system.d.ts +32 -0
- package/dist/src/surfaces/api/contracts/transport-values.d.ts +50 -0
- package/dist/src/surfaces/api/contracts/transport-values.js +6 -0
- package/dist/src/surfaces/api/contracts/work.d.ts +74 -0
- package/dist/src/surfaces/api/contracts/workflow-diagram.d.ts +64 -0
- package/dist/src/surfaces/api/http-server.d.ts +33 -0
- package/dist/src/surfaces/api/http-server.js +2 -2
- package/dist/src/surfaces/api/presenters/activities.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/board.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/events.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/execution.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/execution.js +5 -2
- package/dist/src/surfaces/api/presenters/observability.d.ts +1 -0
- package/dist/src/surfaces/api/presenters/orchestration.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/resources.d.ts +3 -0
- package/dist/src/surfaces/api/presenters/status.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/system.d.ts +2 -0
- package/dist/src/surfaces/api/presenters/work.d.ts +4 -0
- package/dist/src/surfaces/api/problem-details.d.ts +2 -0
- package/dist/src/surfaces/api/router.d.ts +8 -0
- package/dist/src/surfaces/api/routes/activities.d.ts +1 -0
- package/dist/src/surfaces/api/routes/applications.d.ts +88 -0
- package/dist/src/surfaces/api/routes/commands.d.ts +3 -0
- package/dist/src/surfaces/api/routes/commands.js +1 -3
- package/dist/src/surfaces/api/routes/control-plane.d.ts +1 -0
- package/dist/src/surfaces/api/routes/control-plane.js +0 -1
- package/dist/src/surfaces/api/routes/events.d.ts +1 -0
- package/dist/src/surfaces/api/routes/execution.d.ts +1 -0
- package/dist/src/surfaces/api/routes/index.d.ts +4 -0
- package/dist/src/surfaces/api/routes/observability.d.ts +1 -0
- package/dist/src/surfaces/api/routes/orchestration.d.ts +1 -0
- package/dist/src/surfaces/api/routes/pagination.d.ts +5 -0
- package/dist/src/surfaces/api/routes/read.d.ts +3 -0
- package/dist/src/surfaces/api/routes/resources.d.ts +1 -0
- package/dist/src/surfaces/api/routes/responses.d.ts +15 -0
- package/dist/src/surfaces/api/routes/system.d.ts +1 -0
- package/dist/src/surfaces/api/routes/work.d.ts +1 -0
- package/dist/src/surfaces/auth/credentials.d.ts +22 -0
- package/dist/src/surfaces/auth/credentials.js +8 -12
- package/dist/src/surfaces/auth/vocabulary.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/api.d.ts +4 -0
- package/dist/src/surfaces/cli/commands/audit.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/audit.js +11 -2
- package/dist/src/surfaces/cli/commands/correlate.d.ts +7 -0
- package/dist/src/surfaces/cli/commands/doctor.d.ts +24 -0
- package/dist/src/surfaces/cli/commands/init.d.ts +2 -0
- package/dist/src/surfaces/cli/commands/sandbox-entrypoint.d.ts +43 -0
- package/dist/src/surfaces/cli/commands/sandbox-setup.d.ts +9 -0
- package/dist/src/surfaces/cli/commands/sandbox.d.ts +16 -0
- package/dist/src/surfaces/cli/commands/self-update.d.ts +15 -0
- package/dist/src/surfaces/cli/commands/smoke.d.ts +14 -0
- package/dist/src/surfaces/cli/commands/start.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/stop.d.ts +11 -0
- package/dist/src/surfaces/cli/commands/tick.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/ui.d.ts +5 -0
- package/dist/src/surfaces/cli/commands/validate-state.d.ts +13 -0
- package/dist/src/surfaces/cli/infrastructure/docker-cli.d.ts +66 -0
- package/dist/src/surfaces/cli/infrastructure/docker-invocation.d.ts +14 -0
- package/dist/src/surfaces/cli/infrastructure/process-log.d.ts +35 -0
- package/dist/src/surfaces/cli/infrastructure/resident-start.d.ts +10 -0
- package/dist/src/surfaces/cli/main.d.ts +115 -0
- package/dist/src/surfaces/cli/usage.d.ts +1 -0
- package/dist/src/surfaces/contracts/config.d.ts +51 -0
- package/dist/src/surfaces/index.d.ts +49 -0
- package/dist/src/surfaces/web-assets/assets/index-D9xGa5tD.css +1 -0
- package/dist/src/surfaces/web-assets/assets/index-qai1Ymhv.js +1179 -0
- package/dist/src/surfaces/web-assets/index.html +2 -2
- package/dist/src/surfaces/web-host/asset-source.d.ts +9 -0
- package/dist/src/surfaces/web-host/packaged-assets.d.ts +8 -0
- package/dist/src/work/application/work-projection.d.ts +3 -0
- package/dist/src/work/application/work-projection.js +4 -4
- package/dist/src/work/application/work-repository.d.ts +15 -0
- package/dist/src/work/application/work-repository.js +2 -2
- package/dist/src/work/application/work-service.d.ts +18 -0
- package/dist/src/work/application/work-service.js +70 -31
- package/dist/src/work/contracts/commands.d.ts +15 -0
- package/dist/src/work/contracts/config.d.ts +3 -0
- package/dist/src/work/contracts/event-factory.d.ts +6 -0
- package/dist/src/work/contracts/event-factory.js +26 -0
- package/dist/src/work/contracts/events.d.ts +46 -0
- package/dist/src/work/contracts/events.js +54 -60
- package/dist/src/work/contracts/identifiers.d.ts +3 -0
- package/dist/src/work/contracts/streams.d.ts +8 -0
- package/dist/src/work/contracts/views.d.ts +18 -0
- package/dist/src/work/contracts/vocabulary.d.ts +7 -0
- package/dist/src/work/domain/work-item.d.ts +3 -0
- package/dist/src/work/domain/work-item.js +10 -7
- package/dist/src/work/index.d.ts +12 -0
- package/dist/src/work/index.js +1 -0
- package/docker/Dockerfile +9 -7
- package/docker/Dockerfile.packaged +4 -6
- package/package.json +24 -24
- package/dist/src/activities/pr/event-drafts.js +0 -66
- package/dist/src/kernel/contracts/events.js +0 -11
- package/dist/src/kernel/infrastructure/cached-journal-view.js +0 -27
- package/dist/src/persistence/application/projection-runner.js +0 -128
- package/dist/src/persistence/filesystem/file-checkpoint-store.js +0 -50
- package/dist/src/persistence/filesystem/file-projection-store.js +0 -137
- package/dist/src/persistence/index.js +0 -8
- package/dist/src/persistence/memory/in-memory-event-journal.js +0 -99
- package/dist/src/surfaces/web-assets/assets/index-B0ofn_L5.css +0 -1
- package/dist/src/surfaces/web-assets/assets/index-DFBhpSSX.js +0 -1179
- /package/dist/src/control-plane/application/{advance-once-ports.js → activation-scheduler-ports.js} +0 -0
- /package/dist/src/{kernel → node_modules/@atolis-hq/eventing/dist}/contracts/commands.js +0 -0
- /package/dist/src/{kernel/contracts/checkpoint-store.js → node_modules/@atolis-hq/eventing/dist/contracts/processor-state-store.js} +0 -0
- /package/dist/src/{persistence → node_modules/@atolis-hq/eventing/dist}/memory/in-memory-checkpoint-store.js +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/projections}/projection-store.js +0 -0
- /package/dist/src/{kernel/contracts/journal-change-signal.js → node_modules/@atolis-hq/eventing/dist/runtime/clock.js} +0 -0
- /package/dist/src/{kernel/contracts → node_modules/@atolis-hq/eventing/dist/store}/event-journal.js +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './application/advance-once.js';
|
|
2
|
+
export * from './application/activation-scheduler.js';
|
|
3
|
+
export * from './application/activation-scheduler-subscriber.js';
|
|
4
|
+
export type * from './application/activation-scheduler-ports.js';
|
|
5
|
+
export * from './application/control-plane-projection.js';
|
|
6
|
+
export * from './application/control-plane-service.js';
|
|
7
|
+
export * from './application/runner-control-service.js';
|
|
8
|
+
export * from './application/schedule-service.js';
|
|
9
|
+
export * from './application/intake-pipeline.js';
|
|
10
|
+
export * from './application/runner-pipeline.js';
|
|
11
|
+
export * from './application/work-cancellation-policy.js';
|
|
12
|
+
export * from './contracts/commands.js';
|
|
13
|
+
export * from './contracts/config.js';
|
|
14
|
+
export * from './contracts/events.js';
|
|
15
|
+
export * from './contracts/event-factory.js';
|
|
16
|
+
export * from './contracts/streams.js';
|
|
17
|
+
export * from './contracts/views.js';
|
|
18
|
+
export * from './domain/dispatch-policy.js';
|
|
19
|
+
export * from './domain/quota-policy.js';
|
|
20
|
+
export * from './domain/runner-quota.js';
|
|
21
|
+
export * from './domain/schedule-policy.js';
|
|
22
|
+
export * from './infrastructure/intake-host.js';
|
|
23
|
+
export * from './infrastructure/resident-host.js';
|
|
24
|
+
export * from './infrastructure/tick-host.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './application/advance-once.js';
|
|
2
|
+
export * from './application/activation-scheduler.js';
|
|
3
|
+
export * from './application/activation-scheduler-subscriber.js';
|
|
2
4
|
export * from './application/control-plane-projection.js';
|
|
3
5
|
export * from './application/control-plane-service.js';
|
|
4
6
|
export * from './application/runner-control-service.js';
|
|
@@ -9,6 +11,7 @@ export * from './application/work-cancellation-policy.js';
|
|
|
9
11
|
export * from './contracts/commands.js';
|
|
10
12
|
export * from './contracts/config.js';
|
|
11
13
|
export * from './contracts/events.js';
|
|
14
|
+
export * from './contracts/event-factory.js';
|
|
12
15
|
export * from './contracts/streams.js';
|
|
13
16
|
export * from './contracts/views.js';
|
|
14
17
|
export * from './domain/dispatch-policy.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type HostBudget, type HostResult } from '../contracts/commands.js';
|
|
2
|
+
export interface IntakeCycle {
|
|
3
|
+
(signal: AbortSignal): Promise<{
|
|
4
|
+
readonly processed: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Bounded host for IntakePipeline. Unlike TickHost, one cycle is always
|
|
9
|
+
* exactly one poll-and-translate pass — there's no Advancement to loop
|
|
10
|
+
* within a budget, and AdvanceResult's `progressed` variant requires a
|
|
11
|
+
* dispatched batch that intake has no honest value for. ResidentHost
|
|
12
|
+
* only needs `advances > 0` to decide whether its next sleep resets to the
|
|
13
|
+
* fast end of backoff, which `processed` maps onto directly.
|
|
14
|
+
*/
|
|
15
|
+
export declare class IntakeHost {
|
|
16
|
+
private readonly cycle;
|
|
17
|
+
constructor(cycle: IntakeCycle);
|
|
18
|
+
run(_budget: HostBudget, signal?: AbortSignal): Promise<HostResult>;
|
|
19
|
+
}
|
|
@@ -12,9 +12,8 @@ export class IntakeHost {
|
|
|
12
12
|
constructor(cycle) {
|
|
13
13
|
this.cycle = cycle;
|
|
14
14
|
}
|
|
15
|
-
async run(_budget) {
|
|
16
|
-
const
|
|
17
|
-
const { processed } = await this.cycle(controller.signal);
|
|
15
|
+
async run(_budget, signal = new AbortController().signal) {
|
|
16
|
+
const { processed } = await this.cycle(signal);
|
|
18
17
|
return {
|
|
19
18
|
advances: processed ? 1 : 0,
|
|
20
19
|
runs: 0,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type HostBudget, type HostResult } from '../contracts/commands.js';
|
|
2
|
+
interface BoundedHost {
|
|
3
|
+
run(budget: HostBudget, signal?: AbortSignal): Promise<HostResult>;
|
|
4
|
+
}
|
|
5
|
+
export interface ResidentCadence {
|
|
6
|
+
readonly consecutiveIdleTicks: number;
|
|
7
|
+
readonly consecutiveErrorTicks: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class ResidentHost {
|
|
10
|
+
private readonly tick;
|
|
11
|
+
private readonly sleep;
|
|
12
|
+
private readonly reportError;
|
|
13
|
+
constructor(tick: BoundedHost, sleep?: (signal: AbortSignal, cadence: ResidentCadence) => Promise<void>, reportError?: (error: unknown) => Promise<void>);
|
|
14
|
+
run(signal: AbortSignal, budget: HostBudget): Promise<HostResult>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -22,7 +22,7 @@ export class ResidentHost {
|
|
|
22
22
|
let madeProgress = false;
|
|
23
23
|
let errored = false;
|
|
24
24
|
try {
|
|
25
|
-
const result = await this.tick.run(budget);
|
|
25
|
+
const result = await this.tick.run(budget, signal);
|
|
26
26
|
madeProgress = result.advances > 0;
|
|
27
27
|
total = {
|
|
28
28
|
advances: total.advances + result.advances,
|
|
@@ -31,6 +31,8 @@ export class ResidentHost {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
+
if (signal.aborted)
|
|
35
|
+
break;
|
|
34
36
|
errored = true;
|
|
35
37
|
await this.reportError(error);
|
|
36
38
|
}
|
|
@@ -5,14 +5,14 @@ export class TickHost {
|
|
|
5
5
|
constructor(advance) {
|
|
6
6
|
this.advance = advance;
|
|
7
7
|
}
|
|
8
|
-
async run(budget) {
|
|
8
|
+
async run(budget, signal) {
|
|
9
9
|
const started = Date.now();
|
|
10
10
|
let advances = 0;
|
|
11
11
|
let runs = 0;
|
|
12
12
|
while (advances < budget.maxAdvances && runs < budget.maxRuns) {
|
|
13
13
|
if (Date.now() - started >= budget.maxDurationMs)
|
|
14
14
|
return { advances, runs, stoppedBecause: HostStopReason.Budget };
|
|
15
|
-
const result = await this.advance({ maxProgress: 1 });
|
|
15
|
+
const result = await this.advance({ maxProgress: 1 }, signal);
|
|
16
16
|
if (result.kind === 'progressed') {
|
|
17
17
|
advances += 1;
|
|
18
18
|
runs += result.dispatched.length;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventJournal } from '@atolis-hq/eventing';
|
|
2
|
+
import { type ConversationEvent, type ConversationEventData } from '../contracts/events.js';
|
|
3
|
+
import type { ConversationId } from '../contracts/identifiers.js';
|
|
4
|
+
import type { ConversationView } from '../contracts/views.js';
|
|
5
|
+
export declare class ConversationRepository {
|
|
6
|
+
private readonly journal;
|
|
7
|
+
constructor(journal: EventJournal);
|
|
8
|
+
load(id: ConversationId): Promise<{
|
|
9
|
+
readonly sequence: number;
|
|
10
|
+
readonly view: ConversationView | null;
|
|
11
|
+
}>;
|
|
12
|
+
append(id: ConversationId, expected: number, drafts: readonly ConversationEventData[]): Promise<ConversationEvent[]>;
|
|
13
|
+
}
|
|
@@ -16,6 +16,6 @@ export class ConversationRepository {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
async append(id, expected, drafts) {
|
|
19
|
-
return (await this.journal.
|
|
19
|
+
return (await this.journal.appendToStream(conversationStream(id), expected, drafts)).map(decodeConversationEvent);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CommandContext, type EventJournal } from '@atolis-hq/eventing';
|
|
2
|
+
import type { AssociateConversationResource, CreateConversation, RecordConversationEntry, RecordConversationEntryRepresentation, ReviseConversationEntry, TombstoneConversationEntry } from '../contracts/commands.js';
|
|
3
|
+
import { type ConversationId } from '../contracts/identifiers.js';
|
|
4
|
+
import type { ConversationView } from '../contracts/views.js';
|
|
5
|
+
export interface ConversationService {
|
|
6
|
+
create(command: CreateConversation, context: CommandContext): Promise<ConversationView>;
|
|
7
|
+
createForWorkItem(workItemId: CreateConversation['workItemId'], context: CommandContext): Promise<ConversationView>;
|
|
8
|
+
record(command: RecordConversationEntry, context: CommandContext): Promise<ConversationView>;
|
|
9
|
+
associateResource(command: AssociateConversationResource, context: CommandContext): Promise<ConversationView>;
|
|
10
|
+
revise(command: ReviseConversationEntry, context: CommandContext): Promise<ConversationView>;
|
|
11
|
+
tombstone(command: TombstoneConversationEntry, context: CommandContext): Promise<ConversationView>;
|
|
12
|
+
recordRepresentation(command: RecordConversationEntryRepresentation, context: CommandContext): Promise<ConversationView>;
|
|
13
|
+
get(id: ConversationId): Promise<ConversationView | null>;
|
|
14
|
+
forWorkItem(workItemId: CreateConversation['workItemId']): Promise<ConversationView | null>;
|
|
15
|
+
}
|
|
16
|
+
export declare function createConversationService(journal: EventJournal): ConversationService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { EventSourceKind } from '@atolis-hq/eventing';
|
|
2
|
+
import { createConversationEventData } from '../contracts/event-factory.js';
|
|
3
|
+
import { ConversationEventType } from '../contracts/events.js';
|
|
3
4
|
import { conversationIdForWorkItem } from '../contracts/identifiers.js';
|
|
4
|
-
import { conversationStream } from '../contracts/streams.js';
|
|
5
5
|
import { applyConversationEvent } from '../domain/conversation.js';
|
|
6
6
|
import { ConversationRepository } from './conversation-repository.js';
|
|
7
7
|
// The public service surface deliberately keeps all command handlers adjacent.
|
|
@@ -19,10 +19,9 @@ export function createConversationService(journal) {
|
|
|
19
19
|
throw new Error(`Conversation ${command.conversationId} does not exist`);
|
|
20
20
|
if (existing.view.entries.some((entry) => entry.entryId === command.entryId))
|
|
21
21
|
return existing.view;
|
|
22
|
-
return change(command.conversationId, context,
|
|
23
|
-
|
|
24
|
-
body: command.body,
|
|
25
|
-
origin: command.origin,
|
|
22
|
+
return change(command.conversationId, context, {
|
|
23
|
+
eventType: ConversationEventType.EntryRecorded,
|
|
24
|
+
payload: { entryId: command.entryId, body: command.body, origin: command.origin },
|
|
26
25
|
});
|
|
27
26
|
},
|
|
28
27
|
async associateResource(command, context) {
|
|
@@ -31,9 +30,12 @@ export function createConversationService(journal) {
|
|
|
31
30
|
throw new Error(`Conversation ${command.conversationId} does not exist`);
|
|
32
31
|
if (existing.view.resources.some((resource) => resource.resourceId === command.resourceId && resource.threadId === command.threadId))
|
|
33
32
|
return existing.view;
|
|
34
|
-
return change(command.conversationId, context,
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
return change(command.conversationId, context, {
|
|
34
|
+
eventType: ConversationEventType.ResourceAssociated,
|
|
35
|
+
payload: {
|
|
36
|
+
resourceId: command.resourceId,
|
|
37
|
+
...(command.threadId === undefined ? {} : { threadId: command.threadId }),
|
|
38
|
+
},
|
|
37
39
|
});
|
|
38
40
|
},
|
|
39
41
|
async revise(command, context) {
|
|
@@ -41,9 +43,9 @@ export function createConversationService(journal) {
|
|
|
41
43
|
if (existing.view === null ||
|
|
42
44
|
!existing.view.entries.some((entry) => entry.entryId === command.entryId))
|
|
43
45
|
throw new Error(`Conversation entry ${command.entryId} does not exist`);
|
|
44
|
-
return change(command.conversationId, context,
|
|
45
|
-
|
|
46
|
-
body: command.body,
|
|
46
|
+
return change(command.conversationId, context, {
|
|
47
|
+
eventType: ConversationEventType.EntryRevised,
|
|
48
|
+
payload: { entryId: command.entryId, body: command.body },
|
|
47
49
|
});
|
|
48
50
|
},
|
|
49
51
|
async tombstone(command, context) {
|
|
@@ -51,8 +53,9 @@ export function createConversationService(journal) {
|
|
|
51
53
|
if (existing.view === null ||
|
|
52
54
|
!existing.view.entries.some((entry) => entry.entryId === command.entryId))
|
|
53
55
|
throw new Error(`Conversation entry ${command.entryId} does not exist`);
|
|
54
|
-
return change(command.conversationId, context,
|
|
55
|
-
|
|
56
|
+
return change(command.conversationId, context, {
|
|
57
|
+
eventType: ConversationEventType.EntryTombstoned,
|
|
58
|
+
payload: { entryId: command.entryId },
|
|
56
59
|
});
|
|
57
60
|
},
|
|
58
61
|
async recordRepresentation(command, context) {
|
|
@@ -63,10 +66,13 @@ export function createConversationService(journal) {
|
|
|
63
66
|
if (entry.representations.some((representation) => representation.resourceId === command.resourceId &&
|
|
64
67
|
representation.externalId === command.externalId))
|
|
65
68
|
return existing.view;
|
|
66
|
-
return change(command.conversationId, context,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
return change(command.conversationId, context, {
|
|
70
|
+
eventType: ConversationEventType.EntryRepresentationRecorded,
|
|
71
|
+
payload: {
|
|
72
|
+
entryId: command.entryId,
|
|
73
|
+
resourceId: command.resourceId,
|
|
74
|
+
externalId: command.externalId,
|
|
75
|
+
},
|
|
70
76
|
});
|
|
71
77
|
},
|
|
72
78
|
get: async (id) => (await repository.load(id)).view,
|
|
@@ -74,18 +80,16 @@ export function createConversationService(journal) {
|
|
|
74
80
|
};
|
|
75
81
|
}
|
|
76
82
|
function changeConversation(repository) {
|
|
77
|
-
return async (id, context,
|
|
83
|
+
return async (id, context, input) => {
|
|
78
84
|
const loaded = await repository.load(id);
|
|
79
|
-
const draft =
|
|
80
|
-
eventId: `${context.commandId}:${eventType}`,
|
|
81
|
-
eventType,
|
|
85
|
+
const draft = createConversationEventData({
|
|
86
|
+
eventId: `${context.commandId}:${input.eventType}`,
|
|
82
87
|
occurredAt: context.occurredAt,
|
|
83
88
|
correlationId: context.correlationId,
|
|
84
89
|
causationId: context.commandId,
|
|
85
90
|
actor: context.actor,
|
|
86
91
|
source: { kind: EventSourceKind.Internal, id: 'conversation-service' },
|
|
87
|
-
|
|
88
|
-
payload,
|
|
92
|
+
...input,
|
|
89
93
|
});
|
|
90
94
|
const [recorded] = await repository.append(id, loaded.sequence, [draft]);
|
|
91
95
|
const next = recorded === undefined ? null : applyConversationEvent(loaded.view, recorded);
|
|
@@ -98,8 +102,9 @@ function createConversation(repository, change) {
|
|
|
98
102
|
return async (command, context) => {
|
|
99
103
|
const existing = await repository.load(command.conversationId);
|
|
100
104
|
return (existing.view ??
|
|
101
|
-
change(command.conversationId, context,
|
|
102
|
-
|
|
105
|
+
change(command.conversationId, context, {
|
|
106
|
+
eventType: ConversationEventType.Created,
|
|
107
|
+
payload: { workItemId: command.workItemId },
|
|
103
108
|
}));
|
|
104
109
|
};
|
|
105
110
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WorkItemId } from '../../work/index.js';
|
|
2
|
+
import type { ConversationId } from './identifiers.js';
|
|
3
|
+
import type { ConversationEntryOrigin } from './views.js';
|
|
4
|
+
export interface CreateConversation {
|
|
5
|
+
readonly conversationId: ConversationId;
|
|
6
|
+
readonly workItemId: WorkItemId;
|
|
7
|
+
}
|
|
8
|
+
export interface RecordConversationEntry {
|
|
9
|
+
readonly conversationId: ConversationId;
|
|
10
|
+
readonly entryId: string;
|
|
11
|
+
readonly body: string;
|
|
12
|
+
readonly origin: ConversationEntryOrigin;
|
|
13
|
+
}
|
|
14
|
+
export interface AssociateConversationResource {
|
|
15
|
+
readonly conversationId: ConversationId;
|
|
16
|
+
readonly resourceId: string;
|
|
17
|
+
readonly threadId?: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface ReviseConversationEntry {
|
|
20
|
+
readonly conversationId: ConversationId;
|
|
21
|
+
readonly entryId: string;
|
|
22
|
+
readonly body: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TombstoneConversationEntry {
|
|
25
|
+
readonly conversationId: ConversationId;
|
|
26
|
+
readonly entryId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RecordConversationEntryRepresentation {
|
|
29
|
+
readonly conversationId: ConversationId;
|
|
30
|
+
readonly entryId: string;
|
|
31
|
+
readonly resourceId: string;
|
|
32
|
+
readonly externalId: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type EventDataInput } from '@atolis-hq/eventing';
|
|
2
|
+
import { type ConversationEventData, type ConversationEventPayloads } from './events.js';
|
|
3
|
+
export type ConversationEventDataInput = {
|
|
4
|
+
[Type in keyof ConversationEventPayloads]: EventDataInput<Type, ConversationEventPayloads[Type]>;
|
|
5
|
+
}[keyof ConversationEventPayloads];
|
|
6
|
+
export declare function createConversationEventData(input: ConversationEventDataInput): ConversationEventData;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createEventData } from '@atolis-hq/eventing';
|
|
2
|
+
import { ConversationEventType, } from './events.js';
|
|
3
|
+
export function createConversationEventData(input) {
|
|
4
|
+
switch (input.eventType) {
|
|
5
|
+
case ConversationEventType.Created:
|
|
6
|
+
return createEventData(input);
|
|
7
|
+
case ConversationEventType.ResourceAssociated:
|
|
8
|
+
return createEventData(input);
|
|
9
|
+
case ConversationEventType.EntryRecorded:
|
|
10
|
+
return createEventData(input);
|
|
11
|
+
case ConversationEventType.EntryRevised:
|
|
12
|
+
return createEventData(input);
|
|
13
|
+
case ConversationEventType.EntryTombstoned:
|
|
14
|
+
return createEventData(input);
|
|
15
|
+
case ConversationEventType.EntryRepresentationRecorded:
|
|
16
|
+
return createEventData(input);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type EventDataUnion, type EventEnvelope, type EventUnion } from '@atolis-hq/eventing';
|
|
2
|
+
import { type WorkItemId } from '../../work/index.js';
|
|
3
|
+
import { type ConversationStreamRef } from './streams.js';
|
|
4
|
+
import type { ConversationEntryOrigin } from './views.js';
|
|
5
|
+
export declare const ConversationEventType: {
|
|
6
|
+
readonly Created: "conversation.created";
|
|
7
|
+
readonly ResourceAssociated: "conversation.resource-associated";
|
|
8
|
+
readonly EntryRecorded: "conversation.entry-recorded";
|
|
9
|
+
readonly EntryRevised: "conversation.entry-revised";
|
|
10
|
+
readonly EntryTombstoned: "conversation.entry-tombstoned";
|
|
11
|
+
readonly EntryRepresentationRecorded: "conversation.entry-representation-recorded";
|
|
12
|
+
};
|
|
13
|
+
export interface ConversationEventPayloads {
|
|
14
|
+
readonly [ConversationEventType.Created]: {
|
|
15
|
+
readonly workItemId: WorkItemId;
|
|
16
|
+
};
|
|
17
|
+
readonly [ConversationEventType.ResourceAssociated]: {
|
|
18
|
+
readonly resourceId: string;
|
|
19
|
+
readonly threadId?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
readonly [ConversationEventType.EntryRecorded]: {
|
|
22
|
+
readonly entryId: string;
|
|
23
|
+
readonly body: string;
|
|
24
|
+
readonly origin: ConversationEntryOrigin;
|
|
25
|
+
};
|
|
26
|
+
readonly [ConversationEventType.EntryRevised]: {
|
|
27
|
+
readonly entryId: string;
|
|
28
|
+
readonly body: string;
|
|
29
|
+
};
|
|
30
|
+
readonly [ConversationEventType.EntryTombstoned]: {
|
|
31
|
+
readonly entryId: string;
|
|
32
|
+
};
|
|
33
|
+
readonly [ConversationEventType.EntryRepresentationRecorded]: {
|
|
34
|
+
readonly entryId: string;
|
|
35
|
+
readonly resourceId: string;
|
|
36
|
+
readonly externalId: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export type ConversationEvent = EventUnion<ConversationEventPayloads, ConversationStreamRef>;
|
|
40
|
+
export type ConversationEventData = EventDataUnion<ConversationEventPayloads>;
|
|
41
|
+
export declare function decodeConversationEvent(event: EventEnvelope): ConversationEvent;
|
|
42
|
+
export declare function selectConversationEvent(event: EventEnvelope): ConversationEvent | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { eventDataSchema, eventEnvelopeSchema, } from '@atolis-hq/eventing';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { brandedStringSchema
|
|
3
|
+
import { brandedStringSchema } from '../../kernel/index.js';
|
|
3
4
|
import { workItemId } from '../../work/index.js';
|
|
4
5
|
import { conversationId } from './identifiers.js';
|
|
5
6
|
import { ConversationStreamKind } from './streams.js';
|
|
@@ -49,52 +50,64 @@ const origin = z.discriminatedUnion('kind', [
|
|
|
49
50
|
})
|
|
50
51
|
.strict(),
|
|
51
52
|
]);
|
|
52
|
-
const schema = z.
|
|
53
|
+
const schema = z.union([
|
|
53
54
|
eventEnvelopeSchema.extend({
|
|
54
|
-
|
|
55
|
+
event: eventDataSchema.extend({
|
|
56
|
+
eventType: z.literal(ConversationEventType.Created),
|
|
57
|
+
payload: z.object({ workItemId: brandedStringSchema(workItemId) }).strict(),
|
|
58
|
+
}),
|
|
55
59
|
stream,
|
|
56
|
-
payload: z.object({ workItemId: brandedStringSchema(workItemId) }).strict(),
|
|
57
60
|
}),
|
|
58
61
|
eventEnvelopeSchema.extend({
|
|
59
|
-
|
|
62
|
+
event: eventDataSchema.extend({
|
|
63
|
+
eventType: z.literal(ConversationEventType.EntryRepresentationRecorded),
|
|
64
|
+
payload: z
|
|
65
|
+
.object({
|
|
66
|
+
entryId: z.string().min(1),
|
|
67
|
+
resourceId: z.string().min(1),
|
|
68
|
+
externalId: z.string().min(1),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
}),
|
|
60
72
|
stream,
|
|
61
|
-
payload: z
|
|
62
|
-
.object({
|
|
63
|
-
entryId: z.string().min(1),
|
|
64
|
-
resourceId: z.string().min(1),
|
|
65
|
-
externalId: z.string().min(1),
|
|
66
|
-
})
|
|
67
|
-
.strict(),
|
|
68
73
|
}),
|
|
69
74
|
eventEnvelopeSchema.extend({
|
|
70
|
-
|
|
75
|
+
event: eventDataSchema.extend({
|
|
76
|
+
eventType: z.literal(ConversationEventType.ResourceAssociated),
|
|
77
|
+
payload: z
|
|
78
|
+
.object({ resourceId: z.string().min(1), threadId: z.string().min(1).optional() })
|
|
79
|
+
.strict(),
|
|
80
|
+
}),
|
|
71
81
|
stream,
|
|
72
|
-
payload: z
|
|
73
|
-
.object({ resourceId: z.string().min(1), threadId: z.string().min(1).optional() })
|
|
74
|
-
.strict(),
|
|
75
82
|
}),
|
|
76
83
|
eventEnvelopeSchema.extend({
|
|
77
|
-
|
|
84
|
+
event: eventDataSchema.extend({
|
|
85
|
+
eventType: z.literal(ConversationEventType.EntryRecorded),
|
|
86
|
+
payload: z.object({ entryId: z.string().min(1), body: z.string(), origin }).strict(),
|
|
87
|
+
}),
|
|
78
88
|
stream,
|
|
79
|
-
payload: z.object({ entryId: z.string().min(1), body: z.string(), origin }).strict(),
|
|
80
89
|
}),
|
|
81
90
|
eventEnvelopeSchema.extend({
|
|
82
|
-
|
|
91
|
+
event: eventDataSchema.extend({
|
|
92
|
+
eventType: z.literal(ConversationEventType.EntryRevised),
|
|
93
|
+
payload: z.object({ entryId: z.string().min(1), body: z.string() }).strict(),
|
|
94
|
+
}),
|
|
83
95
|
stream,
|
|
84
|
-
payload: z.object({ entryId: z.string().min(1), body: z.string() }).strict(),
|
|
85
96
|
}),
|
|
86
97
|
eventEnvelopeSchema.extend({
|
|
87
|
-
|
|
98
|
+
event: eventDataSchema.extend({
|
|
99
|
+
eventType: z.literal(ConversationEventType.EntryTombstoned),
|
|
100
|
+
payload: z.object({ entryId: z.string().min(1) }).strict(),
|
|
101
|
+
}),
|
|
88
102
|
stream,
|
|
89
|
-
payload: z.object({ entryId: z.string().min(1) }).strict(),
|
|
90
103
|
}),
|
|
91
104
|
]);
|
|
92
105
|
export function decodeConversationEvent(event) {
|
|
93
106
|
const result = schema.safeParse(event);
|
|
94
107
|
if (!result.success)
|
|
95
|
-
throw new Error(`Invalid Conversation event ${event.eventId}: ${result.error.message}`);
|
|
108
|
+
throw new Error(`Invalid Conversation event ${event.event.eventId}: ${result.error.message}`);
|
|
96
109
|
return result.data;
|
|
97
110
|
}
|
|
98
111
|
export function selectConversationEvent(event) {
|
|
99
|
-
return event.eventType.startsWith('conversation.') ? decodeConversationEvent(event) : null;
|
|
112
|
+
return event.event.eventType.startsWith('conversation.') ? decodeConversationEvent(event) : null;
|
|
100
113
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Brand } from '../../kernel/index.js';
|
|
2
|
+
import type { WorkItemId } from '../../work/index.js';
|
|
3
|
+
export type ConversationId = Brand<string, 'ConversationId'>;
|
|
4
|
+
export declare function conversationId(value: string): ConversationId;
|
|
5
|
+
export declare function conversationIdForWorkItem(workItemId: WorkItemId): ConversationId;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EntityRef } from '../../kernel/index.js';
|
|
2
|
+
import type { ConversationId } from './identifiers.js';
|
|
3
|
+
export declare const ConversationStreamKind: {
|
|
4
|
+
readonly Conversation: "conversation";
|
|
5
|
+
};
|
|
6
|
+
export type ConversationStreamRef = EntityRef<typeof ConversationStreamKind.Conversation, ConversationId>;
|
|
7
|
+
export declare const conversationStream: (id: ConversationId) => ConversationStreamRef;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { WorkItemId } from '../../work/index.js';
|
|
2
|
+
import type { ConversationId } from './identifiers.js';
|
|
3
|
+
import type { ConversationOriginKind } from './vocabulary.js';
|
|
4
|
+
export type ConversationEntryOrigin = {
|
|
5
|
+
readonly kind: typeof ConversationOriginKind.ControlPlane;
|
|
6
|
+
readonly actorId: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: typeof ConversationOriginKind.Agent;
|
|
9
|
+
readonly actorId: string;
|
|
10
|
+
readonly runId: string;
|
|
11
|
+
readonly stage?: string | undefined;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: typeof ConversationOriginKind.External;
|
|
14
|
+
readonly adapter: string;
|
|
15
|
+
readonly actorId: string;
|
|
16
|
+
readonly resourceId: string;
|
|
17
|
+
readonly threadId: string;
|
|
18
|
+
readonly messageId: string;
|
|
19
|
+
readonly location?: {
|
|
20
|
+
readonly path: string;
|
|
21
|
+
readonly line: number;
|
|
22
|
+
readonly side: 'LEFT' | 'RIGHT';
|
|
23
|
+
} | undefined;
|
|
24
|
+
};
|
|
25
|
+
export interface ConversationEntryView {
|
|
26
|
+
readonly entryId: string;
|
|
27
|
+
readonly body: string;
|
|
28
|
+
readonly occurredAt: string;
|
|
29
|
+
readonly origin: ConversationEntryOrigin;
|
|
30
|
+
readonly deleted: boolean;
|
|
31
|
+
readonly revisions: readonly {
|
|
32
|
+
readonly body: string;
|
|
33
|
+
readonly occurredAt: string;
|
|
34
|
+
}[];
|
|
35
|
+
readonly representations: readonly {
|
|
36
|
+
readonly resourceId: string;
|
|
37
|
+
readonly externalId: string;
|
|
38
|
+
}[];
|
|
39
|
+
}
|
|
40
|
+
export interface ConversationResourceView {
|
|
41
|
+
readonly resourceId: string;
|
|
42
|
+
readonly threadId?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface ConversationView {
|
|
45
|
+
readonly conversationId: ConversationId;
|
|
46
|
+
readonly workItemId: WorkItemId;
|
|
47
|
+
readonly entries: readonly ConversationEntryView[];
|
|
48
|
+
readonly resources: readonly ConversationResourceView[];
|
|
49
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConversationEvent } from '../contracts/events.js';
|
|
2
|
+
import type { ConversationView } from '../contracts/views.js';
|
|
3
|
+
export declare function foldConversation(events: readonly ConversationEvent[]): ConversationView | null;
|
|
4
|
+
export declare function applyConversationEvent(view: ConversationView | null, event: ConversationEvent): ConversationView | null;
|
|
@@ -6,24 +6,25 @@ export function foldConversation(events) {
|
|
|
6
6
|
return view;
|
|
7
7
|
}
|
|
8
8
|
export function applyConversationEvent(view, event) {
|
|
9
|
-
|
|
9
|
+
const data = event.event;
|
|
10
|
+
switch (data.eventType) {
|
|
10
11
|
case ConversationEventType.Created:
|
|
11
12
|
return {
|
|
12
13
|
conversationId: event.stream.id,
|
|
13
|
-
workItemId:
|
|
14
|
+
workItemId: data.payload.workItemId,
|
|
14
15
|
entries: [],
|
|
15
16
|
resources: [],
|
|
16
17
|
};
|
|
17
18
|
case ConversationEventType.EntryRecorded:
|
|
18
|
-
return appendEntry(view,
|
|
19
|
+
return appendEntry(view, data);
|
|
19
20
|
case ConversationEventType.ResourceAssociated:
|
|
20
|
-
return appendResource(view,
|
|
21
|
+
return appendResource(view, data);
|
|
21
22
|
case ConversationEventType.EntryRevised:
|
|
22
|
-
return reviseEntry(view,
|
|
23
|
+
return reviseEntry(view, data);
|
|
23
24
|
case ConversationEventType.EntryTombstoned:
|
|
24
|
-
return tombstoneEntry(view,
|
|
25
|
+
return tombstoneEntry(view, data);
|
|
25
26
|
case ConversationEventType.EntryRepresentationRecorded:
|
|
26
|
-
return recordRepresentation(view,
|
|
27
|
+
return recordRepresentation(view, data);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
function appendEntry(view, event) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './application/conversation-projection.js';
|
|
2
|
+
export * from './application/conversation-service.js';
|
|
3
|
+
export * from './contracts/commands.js';
|
|
4
|
+
export * from './contracts/events.js';
|
|
5
|
+
export * from './contracts/event-factory.js';
|
|
6
|
+
export * from './contracts/identifiers.js';
|
|
7
|
+
export * from './contracts/streams.js';
|
|
8
|
+
export * from './contracts/views.js';
|
|
9
|
+
export * from './contracts/vocabulary.js';
|
|
@@ -2,6 +2,7 @@ export * from './application/conversation-projection.js';
|
|
|
2
2
|
export * from './application/conversation-service.js';
|
|
3
3
|
export * from './contracts/commands.js';
|
|
4
4
|
export * from './contracts/events.js';
|
|
5
|
+
export * from './contracts/event-factory.js';
|
|
5
6
|
export * from './contracts/identifiers.js';
|
|
6
7
|
export * from './contracts/streams.js';
|
|
7
8
|
export * from './contracts/views.js';
|