@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
package/README.md
CHANGED
|
@@ -96,6 +96,11 @@ For more detail, see [docs/vision.md](docs/vision.md) and
|
|
|
96
96
|
- **Event-sourced and restart-safe.** The durable record is an append-only event
|
|
97
97
|
log; projections can be rebuilt, and the loop can crash and resume without
|
|
98
98
|
losing its place.
|
|
99
|
+
- **Reusable eventing packages.** `@atolis-hq/eventing` supplies
|
|
100
|
+
persistence-neutral event contracts and runtime services; the separate
|
|
101
|
+
`@atolis-hq/eventing-filesystem` package supplies Node filesystem adapters.
|
|
102
|
+
Wake's Bootstrap composition selects those adapters, so domain modules never
|
|
103
|
+
depend on the filesystem package.
|
|
99
104
|
- **Canonical work discussion.** GitHub comments and Wake agent reports are
|
|
100
105
|
recorded in one immutable conversation per work item, preserving origin and
|
|
101
106
|
context independently of the surface where they appeared.
|
|
@@ -181,6 +186,10 @@ any time for the full command list, or see
|
|
|
181
186
|
- [docs/cli.md](docs/cli.md) - full CLI command reference.
|
|
182
187
|
- [docs/vision.md](docs/vision.md) - the rationale and long-term direction for Wake.
|
|
183
188
|
- [docs/architecture.md](docs/architecture.md) - module boundaries and the event-sourced core.
|
|
189
|
+
- [packages/eventing/README.md](packages/eventing/README.md) - public Eventing contracts,
|
|
190
|
+
runtime, and in-memory test adapters.
|
|
191
|
+
- [packages/eventing-filesystem/README.md](packages/eventing-filesystem/README.md) - public
|
|
192
|
+
Node filesystem adapters for Eventing ports.
|
|
184
193
|
- [docs/workflows.md](docs/workflows.md) - how stages, prompts, and runner routes are configured.
|
|
185
194
|
- [docs/prompts.md](docs/prompts.md) - how prompt templates map to workflow stages.
|
|
186
195
|
- [docs/configuration.md](docs/configuration.md) - `config.yaml`/`config.workflows.yaml` options and the operator correlation escape hatch.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ActivityDefinition } from '../contracts/activity.js';
|
|
2
|
+
import { BuiltInActivityName } from '../contracts/vocabulary.js';
|
|
3
|
+
import { type AgentActivityOutcome } from './agent-result.js';
|
|
4
|
+
export declare const agentActivityDefinition: ActivityDefinition<typeof BuiltInActivityName.Agent, {
|
|
5
|
+
prompt?: string | undefined;
|
|
6
|
+
template?: string | undefined;
|
|
7
|
+
model?: string | undefined;
|
|
8
|
+
allowedTools?: readonly string[] | undefined;
|
|
9
|
+
}, AgentActivityOutcome>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ActivityHandler } from '../contracts/activity.js';
|
|
2
|
+
import { type AgentActivityOutcome } from './agent-result.js';
|
|
3
|
+
export interface AgentContextReader {
|
|
4
|
+
forWorkItem(workItemId: string, options?: {
|
|
5
|
+
readonly observedSince?: string;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly body: string;
|
|
9
|
+
readonly comments: readonly AgentContextComment[];
|
|
10
|
+
readonly omittedComments?: number;
|
|
11
|
+
readonly pullRequest?: AgentContextPullRequest;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export interface AgentContextPullRequest {
|
|
15
|
+
readonly checks: string;
|
|
16
|
+
readonly checkRuns: readonly Readonly<Record<string, unknown>>[];
|
|
17
|
+
readonly statuses: readonly Readonly<Record<string, unknown>>[];
|
|
18
|
+
}
|
|
19
|
+
export interface AgentContextComment {
|
|
20
|
+
readonly author: string;
|
|
21
|
+
readonly occurredAt: string;
|
|
22
|
+
readonly body: string;
|
|
23
|
+
readonly location?: {
|
|
24
|
+
readonly path: string;
|
|
25
|
+
readonly line: number;
|
|
26
|
+
readonly side: 'LEFT' | 'RIGHT';
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface AgentTemplateRenderer {
|
|
30
|
+
render(name: string, context: AgentTemplateContext): Promise<{
|
|
31
|
+
readonly prompt: string;
|
|
32
|
+
readonly model?: string | null | undefined;
|
|
33
|
+
readonly allowedTools?: readonly string[] | null | undefined;
|
|
34
|
+
readonly maxTurns?: number | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export declare function createAgentActivity(templates?: AgentTemplateRenderer, contextReader?: AgentContextReader): ActivityHandler<{
|
|
38
|
+
prompt?: string;
|
|
39
|
+
template?: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
allowedTools?: readonly string[];
|
|
42
|
+
}, AgentActivityOutcome>;
|
|
43
|
+
interface AgentTemplateContext extends Readonly<Record<string, unknown>> {
|
|
44
|
+
readonly workItemId: string;
|
|
45
|
+
readonly isStart: boolean;
|
|
46
|
+
readonly isResume: boolean;
|
|
47
|
+
readonly issueTitle: string;
|
|
48
|
+
readonly issueBody: string;
|
|
49
|
+
readonly comments: readonly AgentContextComment[];
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const reportedArtifactSchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodString;
|
|
4
|
+
externalKey: z.ZodObject<{
|
|
5
|
+
adapter: z.ZodString;
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const agentActivityOutcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"done">;
|
|
11
|
+
data: z.ZodObject<{
|
|
12
|
+
status: z.ZodLiteral<"DONE">;
|
|
13
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"rejected">;
|
|
16
|
+
data: z.ZodObject<{
|
|
17
|
+
status: z.ZodLiteral<"REJECTED">;
|
|
18
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"blocked">;
|
|
21
|
+
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
22
|
+
status: z.ZodLiteral<"BLOCKED">;
|
|
23
|
+
}, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
|
|
24
|
+
status: z.ZodLiteral<"NEEDS_CLARIFICATION">;
|
|
25
|
+
}, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
|
|
26
|
+
reason: z.ZodLiteral<"ambiguous-runner-result">;
|
|
27
|
+
}, z.core.$strict>]>;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"failed">;
|
|
30
|
+
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
31
|
+
status: z.ZodLiteral<"FAILED">;
|
|
32
|
+
}, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
|
|
33
|
+
reason: z.ZodEnum<{
|
|
34
|
+
"invalid-agent-result": "invalid-agent-result";
|
|
35
|
+
"runner-failed": "runner-failed";
|
|
36
|
+
"runner-quota-exceeded": "runner-quota-exceeded";
|
|
37
|
+
}>;
|
|
38
|
+
message: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>]>;
|
|
40
|
+
}, z.core.$strict>]>;
|
|
41
|
+
export type AgentActivityOutcome = z.output<typeof agentActivityOutcomeSchema>;
|
|
42
|
+
export declare const agentActivityOutcomeKinds: readonly ["done", "rejected", "blocked", "failed"];
|
|
43
|
+
export declare function translateAgentResult(value: unknown): AgentActivityOutcome;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { Brand } from '../../kernel/index.js';
|
|
3
|
+
import type { ResourceCapability, ResourceView } from '../../resources/index.js';
|
|
4
|
+
import type { WorkItemId } from '../../work/index.js';
|
|
5
|
+
import type { ActivationId, ActivityName } from './identifiers.js';
|
|
6
|
+
import type { ActivityExecutionKind, ActivityOutcomeKind, ActivityResourceCardinality, ActivityResourceRole, ActivityRunnerTransportStatus, ActivityWorkspaceMode, ExternalExecutionKind } from './vocabulary.js';
|
|
7
|
+
export interface ResourceRequirement {
|
|
8
|
+
readonly capability: ResourceCapability;
|
|
9
|
+
readonly cardinality: ActivityResourceCardinality;
|
|
10
|
+
readonly role?: ActivityResourceRole;
|
|
11
|
+
}
|
|
12
|
+
export type ActivityWorkflowInstanceId = Brand<string, 'WorkflowInstanceId'>;
|
|
13
|
+
export type ActivityOrchestrationGroupId = Brand<string, 'OrchestrationGroupId'>;
|
|
14
|
+
export declare const activityWorkflowInstanceId: (value: string) => ActivityWorkflowInstanceId;
|
|
15
|
+
export declare const activityOrchestrationGroupId: (value: string) => ActivityOrchestrationGroupId;
|
|
16
|
+
export interface ActivityInvocation<Input = unknown> {
|
|
17
|
+
readonly activationId: ActivationId;
|
|
18
|
+
readonly activity: ActivityName;
|
|
19
|
+
readonly workItemId: WorkItemId;
|
|
20
|
+
readonly workflowInstanceId: ActivityWorkflowInstanceId;
|
|
21
|
+
readonly orchestrationGroupId: ActivityOrchestrationGroupId;
|
|
22
|
+
readonly causationId: string;
|
|
23
|
+
readonly input: Input;
|
|
24
|
+
readonly resources: readonly ResourceView[];
|
|
25
|
+
}
|
|
26
|
+
export interface ActivityOutcome<Kind extends string = string, Data = unknown> {
|
|
27
|
+
readonly kind: Kind;
|
|
28
|
+
readonly data?: Data;
|
|
29
|
+
}
|
|
30
|
+
export interface WaitingActivityOutcome extends ActivityOutcome<typeof ActivityOutcomeKind.Waiting, {
|
|
31
|
+
readonly intentEventId: string;
|
|
32
|
+
readonly signalKind: string;
|
|
33
|
+
}> {
|
|
34
|
+
readonly data: {
|
|
35
|
+
readonly intentEventId: string;
|
|
36
|
+
readonly signalKind: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface AgentRunnerPort {
|
|
40
|
+
start(request: {
|
|
41
|
+
readonly runId: string;
|
|
42
|
+
readonly prompt: string;
|
|
43
|
+
readonly model?: string;
|
|
44
|
+
readonly effort?: string;
|
|
45
|
+
readonly allowedTools: readonly string[];
|
|
46
|
+
readonly maxTurns?: number;
|
|
47
|
+
/** Reports a runner deadline before the runner process is cancelled. */
|
|
48
|
+
readonly onTimeout?: (kind: 'idle' | 'hard') => Promise<void>;
|
|
49
|
+
/** Opaque prior adapter session selected by Execution for this activation. */
|
|
50
|
+
readonly resumeSessionId?: string;
|
|
51
|
+
readonly usageBaseline?: {
|
|
52
|
+
readonly input: number;
|
|
53
|
+
readonly output: number;
|
|
54
|
+
readonly cacheRead?: number;
|
|
55
|
+
readonly cacheWrite?: number;
|
|
56
|
+
};
|
|
57
|
+
readonly context?: {
|
|
58
|
+
readonly runnerName: string;
|
|
59
|
+
readonly action: string;
|
|
60
|
+
readonly activationOrdinal: number;
|
|
61
|
+
};
|
|
62
|
+
}, signal: AbortSignal): Promise<{
|
|
63
|
+
readonly identity?: {
|
|
64
|
+
readonly kind: ExternalExecutionKind;
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly startedAt: string;
|
|
67
|
+
};
|
|
68
|
+
readonly result: Promise<{
|
|
69
|
+
readonly transport: ActivityRunnerTransportStatus;
|
|
70
|
+
readonly output: string;
|
|
71
|
+
readonly runner?: string | undefined;
|
|
72
|
+
readonly sessionId?: string | undefined;
|
|
73
|
+
readonly tokenUsage?: {
|
|
74
|
+
readonly input: number;
|
|
75
|
+
readonly output: number;
|
|
76
|
+
readonly cacheRead?: number | undefined;
|
|
77
|
+
readonly cacheWrite?: number | undefined;
|
|
78
|
+
readonly costUsd?: number | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
readonly failure?: {
|
|
81
|
+
readonly kind: string;
|
|
82
|
+
readonly message: string;
|
|
83
|
+
} | undefined;
|
|
84
|
+
/** Present when the runner's native telemetry cannot verify completion. */
|
|
85
|
+
readonly unverifiedCompletionReason?: string | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
89
|
+
export interface ActivityExecutionContext {
|
|
90
|
+
readonly signal: AbortSignal;
|
|
91
|
+
readonly occurredAt: string;
|
|
92
|
+
/** Durable Execution Run identity when the activity is invoked by Execution. */
|
|
93
|
+
readonly runId?: string;
|
|
94
|
+
/** Opaque prior adapter session selected by Execution for this activation. */
|
|
95
|
+
readonly resumeSessionId?: string;
|
|
96
|
+
/** Start time of the prior session turn, used to select resume-context deltas. */
|
|
97
|
+
readonly resumeStartedAt?: string;
|
|
98
|
+
readonly usageBaseline?: {
|
|
99
|
+
readonly input: number;
|
|
100
|
+
readonly output: number;
|
|
101
|
+
readonly cacheRead?: number;
|
|
102
|
+
readonly cacheWrite?: number;
|
|
103
|
+
};
|
|
104
|
+
/** Isolated workspace leased by Execution for this invocation, when requested. */
|
|
105
|
+
readonly workspace?: {
|
|
106
|
+
readonly path: string;
|
|
107
|
+
readonly mode: ActivityWorkspaceMode;
|
|
108
|
+
};
|
|
109
|
+
readonly runner?: AgentRunnerPort;
|
|
110
|
+
readonly runnerContext?: {
|
|
111
|
+
readonly runnerName: string;
|
|
112
|
+
/** CLI identity configured for the resolved runner. */
|
|
113
|
+
readonly runnerCli?: string;
|
|
114
|
+
readonly activationOrdinal: number;
|
|
115
|
+
readonly model?: string;
|
|
116
|
+
readonly effort?: string;
|
|
117
|
+
};
|
|
118
|
+
/** Optional operational capture of the exact agent conversation. */
|
|
119
|
+
readonly transcriptRecorder?: {
|
|
120
|
+
capturePrompt(capture: {
|
|
121
|
+
readonly workItemId: string;
|
|
122
|
+
readonly runId: string;
|
|
123
|
+
readonly cli: string;
|
|
124
|
+
readonly timestamp: string;
|
|
125
|
+
readonly text: string;
|
|
126
|
+
}): Promise<void>;
|
|
127
|
+
captureResponse(capture: {
|
|
128
|
+
readonly workItemId: string;
|
|
129
|
+
readonly runId: string;
|
|
130
|
+
readonly cli: string;
|
|
131
|
+
readonly sessionId?: string | undefined;
|
|
132
|
+
readonly timestamp: string;
|
|
133
|
+
readonly text: string;
|
|
134
|
+
}): Promise<void>;
|
|
135
|
+
finalisePrompt?(capture: {
|
|
136
|
+
readonly workItemId: string;
|
|
137
|
+
readonly runId: string;
|
|
138
|
+
readonly cli: string;
|
|
139
|
+
readonly timestamp: string;
|
|
140
|
+
}): Promise<void>;
|
|
141
|
+
};
|
|
142
|
+
/** Best-effort operational diagnostics that must not affect activity execution. */
|
|
143
|
+
readonly logOperationalError?: (error: unknown) => void;
|
|
144
|
+
/** Signals that an agent runner invocation has begun. */
|
|
145
|
+
readonly reportRunnerStarted?: () => void;
|
|
146
|
+
/** Reports a runner deadline before the runner process is cancelled. */
|
|
147
|
+
readonly reportRunnerTimeout?: (kind: 'idle' | 'hard') => Promise<void>;
|
|
148
|
+
reportExternalExecution(reference: {
|
|
149
|
+
readonly kind: ExternalExecutionKind;
|
|
150
|
+
readonly id: string;
|
|
151
|
+
readonly startedAt: string;
|
|
152
|
+
}): Promise<void>;
|
|
153
|
+
reportRunnerResult?(result: {
|
|
154
|
+
readonly transport: ActivityRunnerTransportStatus;
|
|
155
|
+
readonly output: string;
|
|
156
|
+
readonly runner: string;
|
|
157
|
+
readonly model?: string | undefined;
|
|
158
|
+
readonly sessionId?: string | undefined;
|
|
159
|
+
readonly tokenUsage?: {
|
|
160
|
+
readonly input: number;
|
|
161
|
+
readonly output: number;
|
|
162
|
+
readonly cacheRead?: number | undefined;
|
|
163
|
+
readonly cacheWrite?: number | undefined;
|
|
164
|
+
readonly costUsd?: number | undefined;
|
|
165
|
+
} | undefined;
|
|
166
|
+
readonly failure?: {
|
|
167
|
+
readonly kind: string;
|
|
168
|
+
readonly message: string;
|
|
169
|
+
} | undefined;
|
|
170
|
+
readonly unverifiedCompletionReason?: string | undefined;
|
|
171
|
+
}): Promise<void>;
|
|
172
|
+
}
|
|
173
|
+
export interface ActivityHandler<Input, Outcome extends ActivityOutcome> {
|
|
174
|
+
execute(invocation: ActivityInvocation<Input>, context: ActivityExecutionContext): Promise<Outcome>;
|
|
175
|
+
}
|
|
176
|
+
export interface ActivityDefinition<Name extends ActivityName = ActivityName, Input = unknown, Outcome extends ActivityOutcome = ActivityOutcome> {
|
|
177
|
+
readonly name: Name;
|
|
178
|
+
readonly inputSchema: z.ZodType<Input>;
|
|
179
|
+
readonly outcomeSchema: z.ZodType<Outcome>;
|
|
180
|
+
readonly outcomeKinds: readonly Outcome['kind'][];
|
|
181
|
+
readonly resources: readonly ResourceRequirement[];
|
|
182
|
+
readonly executionKind: ActivityExecutionKind;
|
|
183
|
+
readonly handler: ActivityHandler<Input, Outcome>;
|
|
184
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type EventData } from '@atolis-hq/eventing';
|
|
3
|
+
import { type EntityRef } from '../../kernel/index.js';
|
|
4
|
+
import type { MergeMethod } from '../pr/vocabulary.js';
|
|
5
|
+
export declare function newClaimPayload<Action extends 'approve' | typeof MergeMethod.Merge, Kind extends 'requested' | 'denied', Outcome extends z.ZodType, FactShape extends z.ZodRawShape, Stream extends z.ZodType>(action: Action, decisionKind: Kind, outcome: Outcome, fact: z.ZodObject<FactShape>, factStream: Stream): z.ZodObject<{
|
|
6
|
+
action: z.ZodLiteral<Action>;
|
|
7
|
+
activationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").ActivationId, string>>;
|
|
8
|
+
decisionKind: z.ZodLiteral<Kind>;
|
|
9
|
+
outcome: Outcome;
|
|
10
|
+
fact: z.ZodObject<FactShape, z.core.$strip>;
|
|
11
|
+
factStream: Stream;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare function legacyClaimPayload<Action extends 'approve' | typeof MergeMethod.Merge, Kind extends 'requested' | 'denied', Outcome extends z.ZodType, Fact extends z.ZodType>(action: Action, decisionKind: Kind, outcome: Outcome, fact: Fact): z.ZodObject<{
|
|
14
|
+
action: z.ZodLiteral<Action>;
|
|
15
|
+
activationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").ActivationId, string>>;
|
|
16
|
+
decisionKind: z.ZodLiteral<Kind>;
|
|
17
|
+
outcome: Outcome;
|
|
18
|
+
fact: Fact;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare function normalizeLegacyFact<Type extends string, Payload, Stream extends EntityRef>(legacy: EventData<Type, Payload> & {
|
|
21
|
+
readonly stream: Stream;
|
|
22
|
+
}): {
|
|
23
|
+
fact: {
|
|
24
|
+
eventId: import("@atolis-hq/eventing").EventId;
|
|
25
|
+
eventType: Type;
|
|
26
|
+
schemaVersion: 1;
|
|
27
|
+
occurredAt: string;
|
|
28
|
+
correlationId: import("@atolis-hq/eventing").CorrelationId;
|
|
29
|
+
causationId: import("@atolis-hq/eventing").CausationId;
|
|
30
|
+
actor: import("@atolis-hq/eventing").EventActor;
|
|
31
|
+
source: import("@atolis-hq/eventing").EventSource;
|
|
32
|
+
payload: Payload;
|
|
33
|
+
};
|
|
34
|
+
factStream: Stream;
|
|
35
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { brandedStringSchema } from '../../kernel/index.js';
|
|
3
|
+
import { activationId } from './identifiers.js';
|
|
4
|
+
export function newClaimPayload(action, decisionKind, outcome, fact, factStream) {
|
|
5
|
+
return z
|
|
6
|
+
.object({
|
|
7
|
+
action: z.literal(action),
|
|
8
|
+
activationId: brandedStringSchema(activationId),
|
|
9
|
+
decisionKind: z.literal(decisionKind),
|
|
10
|
+
outcome,
|
|
11
|
+
fact,
|
|
12
|
+
factStream,
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
}
|
|
16
|
+
export function legacyClaimPayload(action, decisionKind, outcome, fact) {
|
|
17
|
+
return z
|
|
18
|
+
.object({
|
|
19
|
+
action: z.literal(action),
|
|
20
|
+
activationId: brandedStringSchema(activationId),
|
|
21
|
+
decisionKind: z.literal(decisionKind),
|
|
22
|
+
outcome,
|
|
23
|
+
fact,
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
}
|
|
27
|
+
export function normalizeLegacyFact(legacy) {
|
|
28
|
+
return {
|
|
29
|
+
fact: {
|
|
30
|
+
eventId: legacy.eventId,
|
|
31
|
+
eventType: legacy.eventType,
|
|
32
|
+
schemaVersion: legacy.schemaVersion,
|
|
33
|
+
occurredAt: legacy.occurredAt,
|
|
34
|
+
correlationId: legacy.correlationId,
|
|
35
|
+
causationId: legacy.causationId,
|
|
36
|
+
actor: legacy.actor,
|
|
37
|
+
source: legacy.source,
|
|
38
|
+
payload: legacy.payload,
|
|
39
|
+
},
|
|
40
|
+
factStream: legacy.stream,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type EventDataInput } from '@atolis-hq/eventing';
|
|
2
|
+
import { type ActivityEventData, type ActivityEventPayloads } from './events.js';
|
|
3
|
+
export type ActivityEventDataInput = {
|
|
4
|
+
[Type in keyof ActivityEventPayloads]: EventDataInput<Type, ActivityEventPayloads[Type]>;
|
|
5
|
+
}[keyof ActivityEventPayloads];
|
|
6
|
+
export declare function createActivityEventData(input: ActivityEventDataInput): ActivityEventData;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createEventData } from '@atolis-hq/eventing';
|
|
2
|
+
import { ActivityEventType } from './events.js';
|
|
3
|
+
// Exhaustive dispatch preserves the closed event-to-payload mapping.
|
|
4
|
+
// eslint-disable-next-line complexity
|
|
5
|
+
export function createActivityEventData(input) {
|
|
6
|
+
switch (input.eventType) {
|
|
7
|
+
case ActivityEventType.IssueCompleteRequested:
|
|
8
|
+
return createEventData(input);
|
|
9
|
+
case ActivityEventType.PrDiscovered:
|
|
10
|
+
return createEventData(input);
|
|
11
|
+
case ActivityEventType.PrRevisionChanged:
|
|
12
|
+
return createEventData(input);
|
|
13
|
+
case ActivityEventType.PrStateChanged:
|
|
14
|
+
return createEventData(input);
|
|
15
|
+
case ActivityEventType.PrChecksChanged:
|
|
16
|
+
return createEventData(input);
|
|
17
|
+
case ActivityEventType.PrReviewAccepted:
|
|
18
|
+
return createEventData(input);
|
|
19
|
+
case ActivityEventType.ReviewAcceptanceSignalRecorded:
|
|
20
|
+
return createEventData(input);
|
|
21
|
+
case ActivityEventType.PrReviewChangesRequested:
|
|
22
|
+
return createEventData(input);
|
|
23
|
+
case ActivityEventType.PrReviewRejected:
|
|
24
|
+
return createEventData(input);
|
|
25
|
+
case ActivityEventType.PrMergeDenied:
|
|
26
|
+
return createEventData(input);
|
|
27
|
+
case ActivityEventType.PrApproveDenied:
|
|
28
|
+
return createEventData(input);
|
|
29
|
+
case ActivityEventType.PrMergeAuthorized:
|
|
30
|
+
return createEventData(input);
|
|
31
|
+
case ActivityEventType.PrApproveRequested:
|
|
32
|
+
return createEventData(input);
|
|
33
|
+
case ActivityEventType.PrMergeRequested:
|
|
34
|
+
return createEventData(input);
|
|
35
|
+
case ActivityEventType.PrApproveDecisionClaimed:
|
|
36
|
+
return createEventData(input);
|
|
37
|
+
case ActivityEventType.PrMergeDecisionClaimed:
|
|
38
|
+
return createEventData(input);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { MergeMethod } from '../pr/vocabulary.js';
|
|
3
|
+
export declare function resourcePayloadIdentity(fact: {
|
|
4
|
+
readonly stream: {
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
readonly id: string;
|
|
7
|
+
};
|
|
8
|
+
readonly payload: unknown;
|
|
9
|
+
}, context: z.RefinementCtx, path?: readonly PropertyKey[]): void;
|
|
10
|
+
export declare function decisionClaimIdentity(envelope: {
|
|
11
|
+
readonly stream: {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
};
|
|
14
|
+
readonly event: {
|
|
15
|
+
readonly payload: DecisionClaimPayload;
|
|
16
|
+
};
|
|
17
|
+
}, context: z.RefinementCtx): void;
|
|
18
|
+
type DecisionClaimPayload = {
|
|
19
|
+
readonly action: 'approve' | typeof MergeMethod.Merge;
|
|
20
|
+
readonly activationId: string;
|
|
21
|
+
readonly decisionKind: 'requested';
|
|
22
|
+
readonly outcome: {
|
|
23
|
+
readonly data: {
|
|
24
|
+
readonly intentEventId: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
readonly fact: {
|
|
28
|
+
readonly eventId: string;
|
|
29
|
+
readonly payload: {
|
|
30
|
+
readonly activationId: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly factStream: {
|
|
34
|
+
readonly kind: string;
|
|
35
|
+
readonly id: string;
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
readonly action: 'approve' | typeof MergeMethod.Merge;
|
|
39
|
+
readonly activationId: string;
|
|
40
|
+
readonly decisionKind: 'denied';
|
|
41
|
+
readonly outcome: {
|
|
42
|
+
readonly data: {
|
|
43
|
+
readonly reason: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly fact: {
|
|
47
|
+
readonly eventId: string;
|
|
48
|
+
readonly payload: {
|
|
49
|
+
readonly activationId: string;
|
|
50
|
+
readonly reason: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly factStream: {
|
|
54
|
+
readonly kind: string;
|
|
55
|
+
readonly id: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare function decisionClaimDataIdentity(event: {
|
|
59
|
+
readonly payload: DecisionClaimPayload;
|
|
60
|
+
}, context: z.RefinementCtx, path?: readonly PropertyKey[]): void;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ResourceStreamKind } from '../../resources/index.js';
|
|
2
|
+
import { activationId } from './identifiers.js';
|
|
3
|
+
import { activityDecisionStream } from './streams.js';
|
|
4
|
+
export function resourcePayloadIdentity(fact, context, path = []) {
|
|
5
|
+
if (fact.stream.kind !== ResourceStreamKind.Resource ||
|
|
6
|
+
typeof fact.payload !== 'object' ||
|
|
7
|
+
fact.payload === null ||
|
|
8
|
+
!('resourceId' in fact.payload) ||
|
|
9
|
+
typeof fact.payload.resourceId !== 'string')
|
|
10
|
+
return;
|
|
11
|
+
if (fact.payload.resourceId !== fact.stream.id)
|
|
12
|
+
context.addIssue({
|
|
13
|
+
code: 'custom',
|
|
14
|
+
path: [...path, 'payload', 'resourceId'],
|
|
15
|
+
message: 'Activity resource payload id must identify its stream',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export function decisionClaimIdentity(envelope, context) {
|
|
19
|
+
if (envelope.stream.id !==
|
|
20
|
+
activityDecisionStream(activationId(envelope.event.payload.activationId), envelope.event.payload.action).id)
|
|
21
|
+
context.addIssue({
|
|
22
|
+
code: 'custom',
|
|
23
|
+
path: ['event', 'payload', 'activationId'],
|
|
24
|
+
message: 'Activity decision activation and action must identify its stream',
|
|
25
|
+
});
|
|
26
|
+
decisionClaimDataIdentity(envelope.event, context, ['event']);
|
|
27
|
+
}
|
|
28
|
+
export function decisionClaimDataIdentity(event, context, path = []) {
|
|
29
|
+
if (event.payload.fact.payload.activationId !== event.payload.activationId)
|
|
30
|
+
context.addIssue({
|
|
31
|
+
code: 'custom',
|
|
32
|
+
path: [...path, 'payload', 'fact', 'payload', 'activationId'],
|
|
33
|
+
message: 'Activity decision fact activation must match its claim',
|
|
34
|
+
});
|
|
35
|
+
if (event.payload.decisionKind === 'requested' &&
|
|
36
|
+
event.payload.outcome.data.intentEventId !== event.payload.fact.eventId)
|
|
37
|
+
context.addIssue({
|
|
38
|
+
code: 'custom',
|
|
39
|
+
path: [...path, 'payload', 'outcome', 'data', 'intentEventId'],
|
|
40
|
+
message: 'Requested decision intent event id must match its fact',
|
|
41
|
+
});
|
|
42
|
+
if (event.payload.decisionKind === 'denied' &&
|
|
43
|
+
event.payload.outcome.data.reason !== event.payload.fact.payload.reason)
|
|
44
|
+
context.addIssue({
|
|
45
|
+
code: 'custom',
|
|
46
|
+
path: [...path, 'payload', 'outcome', 'data', 'reason'],
|
|
47
|
+
message: 'Denied decision reason must match its fact',
|
|
48
|
+
});
|
|
49
|
+
resourcePayloadIdentity({ stream: event.payload.factStream, payload: event.payload.fact.payload }, context, [...path, 'payload', 'fact']);
|
|
50
|
+
}
|