@knpkv/herdr-coordinator 0.2.1 → 0.3.0

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 CHANGED
@@ -2,8 +2,86 @@
2
2
 
3
3
  Persistent chat contracts over the Herdr fleet job protocol.
4
4
 
5
- Ask mode submits an `agent.delegate` consult job. Work mode submits a locally authorized work job and therefore follows the fleet approval policy. Chat turns persist beside their job IDs and history derives current state from the owning host's durable job record. The browser-facing history contains the newest 32 turns in chronological order; older turns remain durable and addressable by job ID.
5
+ Ask mode submits an `agent.delegate` `consult` job, which adapters project to Luna at medium reasoning effort. Direct Fleet callers use the distinct required `transition_summary` mode for Luna at low effort; coordinator chat never infers that intent from prompt text. Work mode submits a locally authorized `work` job projected to Sol at high effort and therefore follows the fleet approval policy. Status and wait remain non-dispatch operations. Chat turns persist beside their job IDs and history derives current state from the owning host's durable job record. The browser-facing history contains the newest 32 turns in chronological order; older turns remain durable and addressable by job ID.
6
6
 
7
- Coordinator output is newline-delimited `herdr.coordinator.child.v1` lifecycle events. Both events carry the exact fleet job ID and request ID. A `started` event with the exact sanitized worker identity must arrive before the matching `completed` event. Root coordinator identities omit `relationship` and are valid only for coordinator-handled consult or chat jobs. Delegated child identities carry their exact `parentAgentId` and `relation`; ordinary work without that relationship is rejected. Missing, malformed, duplicate, reordered, job-mismatched, or request-mismatched events fail with named lifecycle errors. Terminal transcripts are never accepted as chat replies. Chat history exposes the same persisted worker and canonical Connect target after restart.
7
+ Coordinator output is newline-delimited `herdr.coordinator.child.v1` lifecycle events. Both events carry the exact fleet job ID and request ID. A `started` event with the exact sanitized worker identity must arrive before the matching `completed` event. Root coordinator identities omit `relationship` and are valid only for `consult` and `transition_summary` jobs, including coordinator chat only when it uses one of those modes. Review and ordinary `work` identities must be delegated children carrying their exact `parentAgentId` and `relation`. Missing, malformed, duplicate, reordered, job-mismatched, or request-mismatched events fail with named lifecycle errors. Terminal transcripts are never accepted as chat replies. Chat history exposes the same persisted worker and canonical Connect target after restart.
8
8
 
9
- Browser-safe schemas are exported from `@knpkv/herdr-coordinator/model`.
9
+ Browser-safe schemas, including the orchestration command, receipt, and event
10
+ contracts, are exported from `@knpkv/herdr-coordinator/model` without loading
11
+ the Node runtime.
12
+
13
+ `ChatHistory` exposes only normalized, client-visible `AgentWorkerIdentity` and
14
+ canonical `AgentConnectTarget` values for the matching worker. The durable
15
+ `Orchestrator.request` projection is a server-private escalation record: its
16
+ command payload, actor, executable route, Work handoff, and dispatch lineage
17
+ must stay behind the authorized coordinator boundary. Provider credentials and
18
+ private provider locators are never part of either representation.
19
+
20
+ `Orchestrator` accepts only the typed `fleet.job` command union and returns an
21
+ immediate idempotent receipt. The persisted dispatch identity contains both
22
+ the caller-supplied `idempotency_key` and the command's
23
+ `activity_idempotency_key`; replaying the former requires the complete decoded
24
+ command to match, while reusing the latter under another idempotency key is a
25
+ conflict. Its durable event stream records `accepted`,
26
+ `queued`, `running`, `settled`, `delivery_failed`, and `task_failed`; activity
27
+ idempotency keys are persisted with every event. `events(requestId)` first
28
+ replays persisted history, then follows the SQLite journal in sequence until it
29
+ emits exactly one terminal event. `recover` returns a pull-based
30
+ stream that pages running work in bounded batches, marks it `delivery_failed`,
31
+ and never retries it implicitly.
32
+ `pending` returns the exact typed command records for accepted and queued work
33
+ after restart; callers resume those records explicitly. The
34
+ route-aware `submitRouted` operation durably records the executable Luna/Sol
35
+ route. A Sol submission requires a typed Work handoff and lineage in the same
36
+ SQLite transaction; a linked Sol escalation is accepted only when its parent
37
+ request lookup proves a terminal Luna failure. Every lineage request must also
38
+ appear in the persisted handoff's dispatch IDs. Consumers use
39
+ `submitSolEscalation` with `OrchestratorLinkedSolDispatchReference`; the package
40
+ fixes the Sol model, high reasoning effort, route protocol, and failed-Luna link
41
+ instead of making the adapter rebuild generic route metadata. It accepts only
42
+ `review` and `work` agent-delegate commands; consultation and transition-summary
43
+ commands remain Luna-only. Coordinator-chat authority is invalid on Sol escalation commands. If the accepted
44
+ Work handoff's lane revision becomes stale before Sol acceptance,
45
+ `submitSolEscalation` returns `OrchestratorWorkRevisionConflictError` and commits
46
+ no dispatch, metadata, or accepted event. `request` returns that complete
47
+ validated projection for escalation decisions and revalidates its referenced
48
+ Work decision. The package deliberately uses this SQLite journal/outbox seam,
49
+ not Effect Cluster. It schedules no automatic activity retry: after restart,
50
+ ambiguous running work becomes `delivery_failed` and the caller must reconcile
51
+ any external side effect before resubmission. The package does not claim
52
+ exactly-once external execution. A queued pre-worker executor failure may call
53
+ `failDelivery`; it records the typed terminal `delivery_failed` event without a
54
+ synthetic running transition.
55
+
56
+ Routed Sol work cannot enter `running` through the plain `run` transition.
57
+ The Nix consumer calls the exported typed `workerStarted` operation with the
58
+ dispatch request ID, Work lane, the exact expected revision persisted in the
59
+ accepted handoff, and full
60
+ `AgentWorkerIdentity`. That boundary commits the running event together with
61
+ the Work lane compare-and-set, `agentHierarchy.agent`, canonical Connect
62
+ target, and goal checkpoint in one SQLite transaction. Exact replay survives a
63
+ restart; a changed worker, refreshed accepted revision, or stale lane authority
64
+ is a typed conflict, never a sequential repair.
65
+ Work v1 migration uses the same authority: routed metadata must bind its
66
+ persisted activity key and command to the exact route, discriminator, and
67
+ Work-link form; routed metadata without its dispatch fails closed. A linked Sol route must name an exact
68
+ terminally failed Luna parent with a complete lifecycle. Work preflights partial
69
+ coordinator table sets before coordinator schema creation and before either v1
70
+ or v2 handoff readback; older dispatch tables without the discriminator retain
71
+ their explicit backfill-compatible path.
72
+
73
+ `PullRequestEvidenceProvider.exactHeadGateEvidence` accepts no caller-built
74
+ evidence object. Its source performs one bounded provider observation, samples
75
+ the head before and after that read, and must return the observed head on every
76
+ check, thread, and review record. The provider rejects any source-sensitive item
77
+ bound to another commit. A changed or unexpected observation head returns
78
+ `PullRequestEvidenceStale`; unbound, missing, or duplicated required-check
79
+ evidence returns `PullRequestEvidenceInvalid`. Review history retains distinct
80
+ provider review IDs, including multiple submissions by one reviewer, and rejects
81
+ duplicate IDs.
82
+
83
+ `sqliteLayer` directly supplies `Orchestrator`. It creates a
84
+ 0700 state directory and keeps the database, WAL, and shared-memory files at
85
+ 0600, reapplying those modes after durable writes. The SQLite layer
86
+ currently supports POSIX paths only and fails closed on Windows until it can
87
+ validate private directory ACLs.
package/dist/chat.d.ts CHANGED
@@ -68,16 +68,142 @@ export declare const makeCoordinatorChat: (options: CoordinatorChatOptions) => E
68
68
  readonly kind: "agent.delegate";
69
69
  readonly repository: string;
70
70
  readonly prompt: string;
71
- readonly mode: "consult" | "review" | "work";
71
+ readonly mode: "consult" | "review" | "transition_summary" | "work";
72
72
  readonly channel?: "coordinator_chat";
73
73
  } | {
74
74
  readonly kind: "agent.message";
75
75
  readonly session: string;
76
76
  readonly message: string;
77
+ } | {
78
+ readonly kind: "work.reconcile";
79
+ readonly repository: string;
80
+ readonly pullRequest: number;
81
+ readonly goalId: string;
82
+ readonly laneId: string;
83
+ readonly operationId: string;
84
+ readonly expectedRevision: number;
85
+ readonly expectedHead: string;
86
+ readonly newHead: string;
87
+ readonly expectedOwner: {
88
+ readonly id: string;
89
+ readonly name: string;
90
+ };
91
+ readonly expectedGoalEventId: string;
92
+ readonly bindingDispatchRequestId: string;
93
+ readonly sessionId: string;
94
+ readonly expectedWork: string;
95
+ readonly worker: {
96
+ readonly host: string;
97
+ readonly agentId: string;
98
+ readonly name: string;
99
+ readonly paneId: string;
100
+ readonly relationship?: {
101
+ readonly parentAgentId: string;
102
+ readonly relation: "delegated" | "pair" | "review";
103
+ };
104
+ };
105
+ readonly worktree: string;
106
+ readonly branch: string;
107
+ } | {
108
+ readonly kind: "work.admit";
109
+ readonly repository: string;
110
+ readonly pullRequest: number;
111
+ readonly reviewUrl: string;
112
+ readonly goalId: string;
113
+ readonly laneId: string;
114
+ readonly operationId: string;
115
+ readonly expectedAbsenceToken: string;
116
+ readonly head: string;
117
+ readonly baseHead: string;
118
+ readonly owner: {
119
+ readonly id: string;
120
+ readonly name: string;
121
+ };
122
+ readonly sessionId: string;
123
+ readonly expectedWork: string;
124
+ readonly worker: {
125
+ readonly host: string;
126
+ readonly agentId: string;
127
+ readonly name: string;
128
+ readonly paneId: string;
129
+ readonly relationship?: {
130
+ readonly parentAgentId: string;
131
+ readonly relation: "delegated" | "pair" | "review";
132
+ };
133
+ };
134
+ readonly worktree: string;
135
+ readonly branch: string;
136
+ readonly title: string;
137
+ readonly summary: string;
138
+ readonly detail: string;
139
+ } | {
140
+ readonly kind: "work.recover";
141
+ readonly repository: string;
142
+ readonly pullRequest: number;
143
+ readonly reviewUrl: string;
144
+ readonly goalId: string;
145
+ readonly laneId: string;
146
+ readonly operationId: string;
147
+ readonly expectedGoalEventId: string;
148
+ readonly expectedGoalUpdatedAt: number;
149
+ readonly expectedHistoryToken: string;
150
+ readonly head: string;
151
+ readonly baseHead: string;
152
+ readonly owner: {
153
+ readonly id: string;
154
+ readonly name: string;
155
+ };
156
+ readonly sessionId: string;
157
+ readonly expectedWork: string;
158
+ readonly worker: {
159
+ readonly host: string;
160
+ readonly agentId: string;
161
+ readonly name: string;
162
+ readonly paneId: string;
163
+ readonly relationship?: {
164
+ readonly parentAgentId: string;
165
+ readonly relation: "delegated" | "pair" | "review";
166
+ };
167
+ };
168
+ readonly worktree: string;
169
+ readonly branch: string;
170
+ } | {
171
+ readonly kind: "work.reassign";
172
+ readonly goalId: string;
173
+ readonly from: {
174
+ readonly id: string;
175
+ readonly name: string;
176
+ };
177
+ readonly to: {
178
+ readonly id: string;
179
+ readonly name: string;
180
+ };
181
+ readonly toAgent: {
182
+ readonly _tag: "clear";
183
+ } | {
184
+ readonly _tag: "keep";
185
+ } | {
186
+ readonly _tag: "set";
187
+ readonly agent: {
188
+ readonly host: string;
189
+ readonly agentId: string;
190
+ readonly name: string;
191
+ readonly paneId: string;
192
+ readonly relationship?: {
193
+ readonly parentAgentId: string;
194
+ readonly relation: "delegated" | "pair" | "review";
195
+ };
196
+ };
197
+ };
198
+ readonly reason: string;
199
+ readonly expectedGoalEventId: string;
200
+ readonly expectedGoalUpdatedAt: number;
77
201
  } | {
78
202
  readonly kind: "browser.mcp.recover";
79
203
  };
80
204
  readonly result: string | null;
205
+ readonly acceptedReceipt?: string | null;
206
+ readonly durableOperation?: true;
81
207
  readonly error: string | null;
82
208
  readonly worker?: {
83
209
  readonly host: string;
@@ -95,7 +221,7 @@ export declare const makeCoordinatorChat: (options: CoordinatorChatOptions) => E
95
221
  readonly url: string;
96
222
  };
97
223
  readonly workerTerminalObservedAt?: number | null;
98
- }, ChatHistoryError | import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
224
+ }, ChatHistoryError | import("@knpkv/herdr-fleet").FleetApprovalError | import("@knpkv/herdr-fleet").FleetJobNotFoundError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetTransitionConflictError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
99
225
  submit: (request: ChatRequest, actor: string) => Effect.Effect<{
100
226
  entry: {
101
227
  createdAt: number;
@@ -131,7 +257,7 @@ export declare const makeCoordinatorChat: (options: CoordinatorChatOptions) => E
131
257
  };
132
258
  jobId: string;
133
259
  queued: boolean;
134
- }, ChatHistoryError | import("@knpkv/herdr-fleet").FleetJobConflictError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
260
+ }, ChatHistoryError | import("@knpkv/herdr-fleet").FleetJobConflictError | import("@knpkv/herdr-fleet").FleetOperationError | import("@knpkv/herdr-fleet").FleetOperationUnavailableError | import("@knpkv/herdr-fleet").FleetStoreError | import("@knpkv/herdr-fleet").FleetValidationError, never>;
135
261
  }, never, Crypto.Crypto>;
136
262
  export type CoordinatorChat = Effect.Success<ReturnType<typeof makeCoordinatorChat>>;
137
263
  //# sourceMappingURL=chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAS,MAAM,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAoC,KAAK,WAAW,EAAyC,MAAM,YAAY,CAAA;AACtH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CACjC;AAyDD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0F9B,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAS,MAAM,EAAE,MAAM,EAAkB,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAoC,KAAK,WAAW,EAAyC,MAAM,YAAY,CAAA;AACtH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CACjC;AAyDD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0F9B,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -2,5 +2,10 @@ export * from "./chat.js";
2
2
  export * from "./errors.js";
3
3
  export * from "./lifecycle.js";
4
4
  export * from "./model.js";
5
+ export * from "./orchestrator-errors.js";
6
+ export * from "./orchestrator-model.js";
7
+ export * from "./orchestrator.js";
8
+ export * from "./pull-request-evidence-model.js";
9
+ export * from "./pull-request-evidence.js";
5
10
  export * from "./store.js";
6
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -2,5 +2,10 @@ export * from "./chat.js";
2
2
  export * from "./errors.js";
3
3
  export * from "./lifecycle.js";
4
4
  export * from "./model.js";
5
+ export * from "./orchestrator-errors.js";
6
+ export * from "./orchestrator-model.js";
7
+ export * from "./orchestrator.js";
8
+ export * from "./pull-request-evidence-model.js";
9
+ export * from "./pull-request-evidence.js";
5
10
  export * from "./store.js";
6
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA"}
package/dist/model.d.ts CHANGED
@@ -123,4 +123,6 @@ export declare const CoordinatorLifecycleEvent: Schema.Union<readonly [Schema.St
123
123
  readonly type: Schema.Literal<"completed">;
124
124
  }>]>;
125
125
  export type CoordinatorLifecycleEvent = typeof CoordinatorLifecycleEvent.Type;
126
+ export * from "./orchestrator-model.js";
127
+ export * from "./pull-request-evidence-model.js";
126
128
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAU/B,eAAO,MAAM,QAAQ,2CAAmC,CAAA;AACxD,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,eAAO,MAAM,WAAW,gBAIvB,CAAA;AAED,eAAO,MAAM,WAAW;;;EAA0D,CAAA;AAClF,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC;CAAG;AAE9E,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAA;AACF,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC;CAAG;AAEpF,eAAO,MAAM,SAAS,wFAAgF,CAAA;AACtG,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,eAAO,MAAM,gBAAgB,eAI5B,CAAA;AAED,eAAO,MAAM,qBAAqB,KAAK,CAAA;AAEvC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;EAoBrB,CAAA;AACD,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,C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qB,KAAK,CAAA;AAEvC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;EAoBrB,CAAA;AACD,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG;AAE1E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;EAEtB,CAAA;AACF,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC;CAAG;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAMtC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAA;AAEjF,eAAO,MAAM,6BAA6B;;;;;;EAMxC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAC,IAAI,CAAA;AAErF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;IAGpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC,IAAI,CAAA;AAE7E,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA"}
package/dist/model.js CHANGED
@@ -52,4 +52,6 @@ export const CoordinatorLifecycleEvent = Schema.Union([
52
52
  CoordinatorLifecycleStarted,
53
53
  CoordinatorLifecycleCompleted
54
54
  ]);
55
+ export * from "./orchestrator-model.js";
56
+ export * from "./pull-request-evidence-model.js";
55
57
  //# sourceMappingURL=model.js.map
package/dist/model.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CA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AI,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;CAClC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,KAAK,CAAC;IACpD,2BAA2B;IAC3B,6BAA6B;CAC9B,CAAC,CAAA;AAGF,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { Schema } from "effect";
2
+ declare const OrchestratorValidationError_base: Schema.Class<OrchestratorValidationError, Schema.TaggedStruct<"OrchestratorValidationError", {
3
+ readonly detail: Schema.String;
4
+ }>, import("effect/Cause").YieldableError>;
5
+ export declare class OrchestratorValidationError extends OrchestratorValidationError_base {
6
+ }
7
+ declare const OrchestratorStorageError_base: Schema.Class<OrchestratorStorageError, Schema.TaggedStruct<"OrchestratorStorageError", {
8
+ readonly operation: Schema.String;
9
+ readonly cause: Schema.Defect;
10
+ }>, import("effect/Cause").YieldableError>;
11
+ export declare class OrchestratorStorageError extends OrchestratorStorageError_base {
12
+ }
13
+ declare const OrchestratorConflictError_base: Schema.Class<OrchestratorConflictError, Schema.TaggedStruct<"OrchestratorConflictError", {
14
+ readonly idempotencyKey: Schema.String;
15
+ readonly detail: Schema.String;
16
+ }>, import("effect/Cause").YieldableError>;
17
+ export declare class OrchestratorConflictError extends OrchestratorConflictError_base {
18
+ }
19
+ declare const OrchestratorNotFoundError_base: Schema.Class<OrchestratorNotFoundError, Schema.TaggedStruct<"OrchestratorNotFoundError", {
20
+ readonly dispatchRequestId: Schema.String;
21
+ }>, import("effect/Cause").YieldableError>;
22
+ export declare class OrchestratorNotFoundError extends OrchestratorNotFoundError_base {
23
+ }
24
+ declare const OrchestratorTransitionError_base: Schema.Class<OrchestratorTransitionError, Schema.TaggedStruct<"OrchestratorTransitionError", {
25
+ readonly dispatchRequestId: Schema.String;
26
+ readonly from: Schema.String;
27
+ readonly to: Schema.String;
28
+ }>, import("effect/Cause").YieldableError>;
29
+ export declare class OrchestratorTransitionError extends OrchestratorTransitionError_base {
30
+ }
31
+ declare const OrchestratorWorkerBindingConflictError_base: Schema.Class<OrchestratorWorkerBindingConflictError, Schema.TaggedStruct<"OrchestratorWorkerBindingConflictError", {
32
+ readonly dispatchRequestId: Schema.String;
33
+ }>, import("effect/Cause").YieldableError>;
34
+ export declare class OrchestratorWorkerBindingConflictError extends OrchestratorWorkerBindingConflictError_base {
35
+ }
36
+ declare const OrchestratorWorkRevisionConflictError_base: Schema.Class<OrchestratorWorkRevisionConflictError, Schema.TaggedStruct<"OrchestratorWorkRevisionConflictError", {
37
+ readonly laneId: Schema.String;
38
+ readonly expectedRevision: Schema.Number;
39
+ readonly actualRevision: Schema.Number;
40
+ }>, import("effect/Cause").YieldableError>;
41
+ /** The accepted Work handoff no longer owns the lane revision needed for dispatch. */
42
+ export declare class OrchestratorWorkRevisionConflictError extends OrchestratorWorkRevisionConflictError_base {
43
+ }
44
+ declare const OrchestratorWorkerStartAuthorityError_base: Schema.Class<OrchestratorWorkerStartAuthorityError, Schema.TaggedStruct<"OrchestratorWorkerStartAuthorityError", {
45
+ readonly laneId: Schema.String;
46
+ readonly expectedRevision: Schema.Number;
47
+ readonly actualRevision: Schema.Number;
48
+ readonly reason: Schema.Literals<readonly ["accepted_revision_mismatch", "missing_lane", "stale_revision", "shipped_lane", "missing_goal", "terminal_goal"]>;
49
+ }>, import("effect/Cause").YieldableError>;
50
+ export declare class OrchestratorWorkerStartAuthorityError extends OrchestratorWorkerStartAuthorityError_base {
51
+ }
52
+ export type OrchestratorError = OrchestratorValidationError | OrchestratorStorageError | OrchestratorConflictError | OrchestratorNotFoundError | OrchestratorTransitionError | OrchestratorWorkRevisionConflictError | OrchestratorWorkerBindingConflictError | OrchestratorWorkerStartAuthorityError;
53
+ export {};
54
+ //# sourceMappingURL=orchestrator-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-errors.d.ts","sourceRoot":"","sources":["../src/orchestrator-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;AAQ/B,qBAAa,2BAA4B,SAAQ,gCAGhD;CAAG;;;;;AAEJ,qBAAa,wBAAyB,SAAQ,6BAG7C;CAAG;;;;;AAEJ,qBAAa,yBAA0B,SAAQ,8BAG9C;CAAG;;;;AAEJ,qBAAa,yBAA0B,SAAQ,8BAG9C;CAAG;;;;;;AAEJ,qBAAa,2BAA4B,SAAQ,gCAGhD;CAAG;;;;AAEJ,qBAAa,sCACX,SAAQ,2CAGP;CACD;;;;;;AAEF,sFAAsF;AACtF,qBAAa,qCAAsC,SAAQ,0CAO1D;CAAG;;;;;;;AAEJ,qBAAa,qCAAsC,SAAQ,0CAe1D;CAAG;AAEJ,MAAM,MAAM,iBAAiB,GACzB,2BAA2B,GAC3B,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,2BAA2B,GAC3B,qCAAqC,GACrC,sCAAsC,GACtC,qCAAqC,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { Schema } from "effect";
2
+ const Identifier = Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(256), Schema.isPattern(/^(?:[^\uD800-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])*$/));
3
+ export class OrchestratorValidationError extends Schema.TaggedError()("OrchestratorValidationError", { detail: Schema.String }) {
4
+ }
5
+ export class OrchestratorStorageError extends Schema.TaggedError()("OrchestratorStorageError", { operation: Schema.String, cause: Schema.Defect() }) {
6
+ }
7
+ export class OrchestratorConflictError extends Schema.TaggedError()("OrchestratorConflictError", { idempotencyKey: Identifier, detail: Schema.String }) {
8
+ }
9
+ export class OrchestratorNotFoundError extends Schema.TaggedError()("OrchestratorNotFoundError", { dispatchRequestId: Identifier }) {
10
+ }
11
+ export class OrchestratorTransitionError extends Schema.TaggedError()("OrchestratorTransitionError", { dispatchRequestId: Identifier, from: Schema.String, to: Schema.String }) {
12
+ }
13
+ export class OrchestratorWorkerBindingConflictError extends Schema.TaggedError()("OrchestratorWorkerBindingConflictError", { dispatchRequestId: Identifier }) {
14
+ }
15
+ /** The accepted Work handoff no longer owns the lane revision needed for dispatch. */
16
+ export class OrchestratorWorkRevisionConflictError extends Schema.TaggedError()("OrchestratorWorkRevisionConflictError", {
17
+ laneId: Identifier,
18
+ expectedRevision: Schema.Number,
19
+ actualRevision: Schema.Number
20
+ }) {
21
+ }
22
+ export class OrchestratorWorkerStartAuthorityError extends Schema.TaggedError()("OrchestratorWorkerStartAuthorityError", {
23
+ laneId: Identifier,
24
+ expectedRevision: Schema.Number,
25
+ actualRevision: Schema.Number,
26
+ reason: Schema.Literals([
27
+ "accepted_revision_mismatch",
28
+ "missing_lane",
29
+ "stale_revision",
30
+ "shipped_lane",
31
+ "missing_goal",
32
+ "terminal_goal"
33
+ ])
34
+ }) {
35
+ }
36
+ //# sourceMappingURL=orchestrator-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-errors.js","sourceRoot":"","sources":["../src/orchestrator-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CACpC,MAAM,CAAC,UAAU,EAAE,EACnB,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EACvB,MAAM,CAAC,SAAS,CAAC,wDAAwD,CAAC,CAC3E,CAAA;AAED,MAAM,OAAO,2BAA4B,SAAQ,MAAM,CAAC,WAAW,EAA+B,CAChG,6BAA6B,EAC7B,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAC1B;CAAG;AAEJ,MAAM,OAAO,wBAAyB,SAAQ,MAAM,CAAC,WAAW,EAA4B,CAC1F,0BAA0B,EAC1B,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CACrD;CAAG;AAEJ,MAAM,OAAO,yBAA0B,SAAQ,MAA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