@cotal-ai/connector-core 0.68.0 → 0.70.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.
Files changed (42) hide show
  1. package/dist/agent.d.ts +10 -2
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +21 -27
  4. package/dist/agent.js.map +1 -1
  5. package/dist/agui-emitter.d.ts +318 -0
  6. package/dist/agui-emitter.d.ts.map +1 -0
  7. package/dist/agui-emitter.js +706 -0
  8. package/dist/agui-emitter.js.map +1 -0
  9. package/dist/agui-holder.d.ts +59 -28
  10. package/dist/agui-holder.d.ts.map +1 -1
  11. package/dist/agui-holder.js +29 -36
  12. package/dist/agui-holder.js.map +1 -1
  13. package/dist/agui.d.ts +19 -318
  14. package/dist/agui.d.ts.map +1 -1
  15. package/dist/agui.js +15 -707
  16. package/dist/agui.js.map +1 -1
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +10 -7
  19. package/dist/config.js.map +1 -1
  20. package/dist/docs-bundle.generated.d.ts +1 -1
  21. package/dist/docs-bundle.generated.js +27 -27
  22. package/dist/docs-bundle.generated.js.map +1 -1
  23. package/dist/event-wal.d.ts +38 -44
  24. package/dist/event-wal.d.ts.map +1 -1
  25. package/dist/event-wal.js +105 -124
  26. package/dist/event-wal.js.map +1 -1
  27. package/dist/framing.d.ts +1 -18
  28. package/dist/framing.d.ts.map +1 -1
  29. package/dist/framing.js +20 -3
  30. package/dist/framing.js.map +1 -1
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/orientation.d.ts +2 -2
  36. package/dist/orientation.d.ts.map +1 -1
  37. package/dist/orientation.js +17 -4
  38. package/dist/orientation.js.map +1 -1
  39. package/dist/tool-specs.d.ts.map +1 -1
  40. package/dist/tool-specs.js +9 -29
  41. package/dist/tool-specs.js.map +1 -1
  42. package/package.json +2 -2
@@ -0,0 +1,318 @@
1
+ /**
2
+ * The AG-UI event emitter, the one part of the event plane that TALKS: it reads a durable source
3
+ * forward from the WAL's cursor, maps records to events, packs them into frames that provably fit,
4
+ * and appends them to the principal's event channel under an optimistic-concurrency expectation
5
+ * with a frozen dedup id. The vocabulary it speaks is `agui.ts`, which does no I/O and does not
6
+ * import this module.
7
+ *
8
+ * The emitter owns no policy about WHAT an event means. That belongs to the per-connector mapping,
9
+ * and it arrives here as an injected function. What it owns is the property none of the pieces hold
10
+ * alone: that a frame is either on the wire and folded into the frontier, or not on the wire and
11
+ * not folded, and that no third state is ever reported as success.
12
+ */
13
+ import { type Part } from "@cotal-ai/core";
14
+ import { AguiVocabularyError, type AguiEvent, type AguiFrame, type CotalMeta } from "./agui.js";
15
+ import type { DurableSource } from "./durable-source.js";
16
+ import type { EventWal } from "./event-wal.js";
17
+ import type { SubjectFrontier } from "./subject-frontier.js";
18
+ /**
19
+ * The endpoint surface the emitter needs, declared STRUCTURALLY rather than as `CotalEndpoint`.
20
+ *
21
+ * Not for testability as an end in itself — for a specific one. A cell that needs a live broker to
22
+ * exercise the duplicate-ack halt cannot be written at all before a broker exists, and a cell that
23
+ * re-implements `encodedSize` is measuring a copy. This interface is the exact set of methods the
24
+ * emitter calls, so a cell substitutes an instrument and the production path substitutes the real
25
+ * endpoint, and neither one is a re-implementation of the other.
26
+ */
27
+ export interface EmitterEndpoint {
28
+ readonly principal: {
29
+ owner: string;
30
+ actor: string;
31
+ };
32
+ readonly actorIsEphemeral: boolean;
33
+ /** The broker's live `max_payload`. Throws when not connected — never guesses a default. */
34
+ readonly maxPayload: number;
35
+ /** The single-replica preflight. The emitter calls this at startup, before anything can publish. */
36
+ assertExpectationSemantics(): Promise<void>;
37
+ encodedSize(o: {
38
+ channel: string;
39
+ parts: Part[];
40
+ id: string;
41
+ expectedLastSubjectSeq: number;
42
+ }): number;
43
+ multicastExpecting(o: {
44
+ channel: string;
45
+ parts: Part[];
46
+ id: string;
47
+ expectedLastSubjectSeq: number;
48
+ }): Promise<{
49
+ ack: {
50
+ seq: number;
51
+ duplicate: boolean;
52
+ };
53
+ }>;
54
+ }
55
+ /**
56
+ * One source record's worth of events, with the cursor that resumes AFTER that record.
57
+ *
58
+ * One durable emit unit is one frame: the emitter splits only at source-observation boundaries that
59
+ * are independently reconstructable from the durable source. A frame therefore ends where a record
60
+ * ends, and carries that record's cursor, so folding it means exactly "every record here is
61
+ * consumed".
62
+ */
63
+ export interface EmitUnit {
64
+ /** The run these events belong to. A frame's envelope names ONE run, so units are never
65
+ * mixed across runs in one frame. */
66
+ runId: string;
67
+ events: AguiEvent[];
68
+ cursor: string;
69
+ }
70
+ /** What the mapper returns for one source record: its run and its events, or `null` for a record
71
+ * this plane deliberately drops, and it drops many. `null` is NOT an error: a deliberate drop and
72
+ * a failed map are kept apart, because conflating them turns a parser bug into skipped history. */
73
+ export type RecordMapper<T> = (record: T) => {
74
+ runId: string;
75
+ events: AguiEvent[];
76
+ } | null;
77
+ /**
78
+ * A bracket violation that is OURS, not the writer's: the machine that tracks open runs and messages
79
+ * was lost across a process restart.
80
+ *
81
+ * **This exists because two halts that both say "unbalanced" prove nothing about which produced
82
+ * one.** The WAL persists `epoch`, `frontier` and the pending frame, and NOT the set of open
83
+ * runs and messages, so a process that dies mid-run restarts with an empty {@link AguiBrackets},
84
+ * resumes from `sourceCursor` at events whose `RUN_STARTED` was already published, and refuses the
85
+ * first of them. Without this class the operator sees "nothing may be emitted outside an open run"
86
+ * and files a bug against a writer that did nothing wrong.
87
+ *
88
+ * It is deliberately a SUBCLASS: every existing catch of {@link AguiVocabularyError} still catches
89
+ * it, and only code that wants to tell the two apart has to know it exists.
90
+ */
91
+ export declare class AguiBracketStateLost extends AguiVocabularyError {
92
+ readonly cause: Error;
93
+ constructor(message: string, cause: Error);
94
+ }
95
+ /**
96
+ * The emitter has stopped and will not publish again without operator action.
97
+ *
98
+ * Halting is a SUCCESS of this design, not a failure of it: every halt below is a case where the
99
+ * alternative is to report success for a message that was not stored, or to fold an ack for a body
100
+ * we did not write. A halt is loud, bounded and recoverable by a human; the alternative is silent
101
+ * and permanent.
102
+ */
103
+ export declare class AguiEmitterHalted extends Error {
104
+ readonly reason: "duplicate-ack" | "cas-loss" | "egress-policy" | "egress-unreadable" | "egress-extra-property" | "egress-run-error";
105
+ constructor(reason: "duplicate-ack" | "cas-loss" | "egress-policy" | "egress-unreadable" | "egress-extra-property" | "egress-run-error", message: string);
106
+ }
107
+ /**
108
+ * Pack units into frames, splitting ONLY at unit boundaries and never inside one.
109
+ *
110
+ * Deliberately NOT `splitFrames`, and the difference is the durable plane's one-unit-one-frame
111
+ * rule. `splitFrames` splits at EVENT boundaries, which is the right answer for a frame considered
112
+ * on its own, but a frame that ends mid-record has no cursor it can honestly store: the only value
113
+ * available says the whole record was consumed, and folding that after a crash skips the rest of the
114
+ * record's events with no `seq` gap for a consumer to notice.
115
+ *
116
+ * **So the event-boundary split and the one-unit-one-frame rule are in tension, and this resolves it
117
+ * in the direction the durable plane requires: a single unit that does not fit FAILS LOUD rather
118
+ * than being truncated at a frame boundary.** That leaves `splitFrames`'s truncation path with no
119
+ * caller on the durable plane, which is reported as a design conflict rather than decided here.
120
+ *
121
+ * @throws {AguiVocabularyError} when one unit cannot fit in a frame alone.
122
+ */
123
+ export declare function packUnits(opts: {
124
+ threadId: string;
125
+ epoch: string;
126
+ firstSeq: number;
127
+ units: readonly EmitUnit[];
128
+ measure: (frame: AguiFrame) => number;
129
+ limit: number;
130
+ }): {
131
+ frame: AguiFrame;
132
+ cursor: string;
133
+ }[];
134
+ /**
135
+ * The event emitter: one per principal, one thread at a time.
136
+ *
137
+ * **BRACKET STATE SURVIVES A RESTART, AND THIS PARAGRAPH USED TO SAY THE OPPOSITE.** It described a
138
+ * declared gap — an emitter coming back with an empty machine, resuming at events whose
139
+ * `RUN_STARTED` had already been published, and refusing the first of them — long after the WAL
140
+ * started persisting the machine. The words were true when they were written and stayed on the page
141
+ * through the change that falsified them, which is the failure mode a class header is worst at
142
+ * showing: it is the first thing a cutover author reads about recovery, and it was telling them to
143
+ * expect a halt the code no longer produces.
144
+ *
145
+ * What actually happens: {@link AguiBrackets} is a property of the WRITER'S STREAM across frames, so
146
+ * the WAL freezes the machine's state WITH each pending frame and promotes it on fold. A restart
147
+ * therefore reopens knowing exactly which run, messages and tool calls were open at the last FOLDED
148
+ * position, and {@link AguiBrackets.restore} continues from there rather than from empty.
149
+ *
150
+ * **The lost-state path still exists, and it is now the narrow case it should always have been:** a
151
+ * document that CANNOT SAY what was open. That is a WAL migrated from v1, which recorded no bracket
152
+ * state at all, and it loads as `null` rather than as an empty machine precisely so the difference
153
+ * stays visible. Only there does the emitter start empty, resume into an already-open run, and
154
+ * refuse the first event with {@link AguiBracketStateLost} — a halt rather than a loss, which is the
155
+ * safe direction, and diagnosed by name rather than surfacing as an anonymous protocol violation.
156
+ */
157
+ export declare class AguiEmitter<T> {
158
+ private readonly ep;
159
+ private readonly wal;
160
+ private readonly source;
161
+ private readonly map;
162
+ /** Derived from the endpoint's OWN principal, never from a config name or the launch env. */
163
+ readonly channel: string;
164
+ readonly threadId: string;
165
+ /**
166
+ * The bracket machine AT THE FOLDED POSITION — deliberately not "wherever validation got to".
167
+ *
168
+ * It advances one frame at a time, immediately before that frame's `beginSend`, so the state
169
+ * frozen with a pending frame is the state that belongs to it. A machine advanced by the whole
170
+ * batch up front would freeze a state describing events that had not been sent.
171
+ */
172
+ private brackets;
173
+ private halted;
174
+ /** True once THIS process has fed an event through the bracket machine. It is the half of the
175
+ * restart diagnosis that keeps a genuine mid-stream violation from being blamed on a restart. */
176
+ private fedAnyEvent;
177
+ private constructor();
178
+ /**
179
+ * Start an emitter: resolve the channel, run the single-replica preflight, and settle any pending
180
+ * frame.
181
+ *
182
+ * **THIS IS THAT PREFLIGHT'S PRODUCTION CALL SITE, AND UNTIL THIS FUNCTION EXISTED THERE WAS
183
+ * NONE.** `CotalEndpoint.assertExpectationSemantics()` had zero production callers: it was a
184
+ * check that shipped, was covered by its own suite, and never ran outside one. That is why it is
185
+ * called HERE, before recovery and therefore before any publish — a serialized append on an
186
+ * unverified stream is the exact case it exists to prevent, and doing it after recovery would
187
+ * leave the one publish that matters most, the re-publish of a frozen frame, outside the guard.
188
+ */
189
+ static start<T>(opts: {
190
+ endpoint: EmitterEndpoint;
191
+ /** Already open, so the caller owns `space`, the WAL path, and the `subjectMayExist` judgement
192
+ * — none of which the emitter can make honestly on the caller's behalf. */
193
+ wal: EventWal;
194
+ /**
195
+ * The PRINCIPAL-scoped subject frontier. **Required, and not optional with a zero default.**
196
+ *
197
+ * The subject is shared by every thread of one principal, so the expectation a publish carries
198
+ * is a fact about the principal and not about the thread. An optional parameter here would let
199
+ * a new connector omit it and reintroduce, silently, the defect where an agent's second session
200
+ * expects an empty subject its own first session filled. There is one thing to pass and there
201
+ * is no legal way to not pass it.
202
+ */
203
+ subjectFrontier: SubjectFrontier;
204
+ source: DurableSource<T>;
205
+ map: RecordMapper<T>;
206
+ }): Promise<AguiEmitter<T>>;
207
+ /** True once the emitter has stopped for good. */
208
+ get stopped(): boolean;
209
+ /** The run {@link closeRun} would close now, or `undefined` at a stopping point. */
210
+ get openRunId(): string | undefined;
211
+ /**
212
+ * Boot recovery, branching on the WAL's tag.
213
+ *
214
+ * `acked` NEVER republishes: the frame landed and we know it, so the only remaining work is to
215
+ * fold. `sent_unacked` is the genuinely uncertain case and republishes with the SAME frozen `id`
216
+ * and `E` — never the current tip, because re-deriving either is what turns an uncertain publish
217
+ * into a second, different message.
218
+ */
219
+ private recover;
220
+ /**
221
+ * Read forward, map, pack, and publish. Returns what it did, so a caller can distinguish "nothing
222
+ * to do" from "did work" without inspecting the WAL.
223
+ */
224
+ pump(): Promise<{
225
+ frames: number;
226
+ events: number;
227
+ }>;
228
+ /**
229
+ * Close the run this stream currently has open, at a boundary the RECORD STREAM CANNOT SEE.
230
+ *
231
+ * **This exists because the two halves of the mapping were specified against different inputs.**
232
+ * The plan sources `RUN_FINISHED` from a harness lifecycle hook, and the durable plane reads a
233
+ * FILE: a hook fires in another process and writes no record, so a hook-sourced terminal has no
234
+ * vehicle into a record-sourced stream. Deriving the terminal from records instead is possible but
235
+ * lies about time in two ways that matter to a live view: the finish lands only when the NEXT turn
236
+ * starts, so a finished agent renders as still running, and the last run of a session never closes
237
+ * at all, because there is no later record to close it on. This is that vehicle.
238
+ *
239
+ * It is a FRAME LIKE ANY OTHER: same epoch, same `seq` line, same write-ahead discipline, same
240
+ * halt rules. The single thing that differs is the cursor, which is republished UNCHANGED, because
241
+ * this frame consumes no source record. A frame that advanced the cursor here would mark records
242
+ * consumed that were never mapped.
243
+ *
244
+ * Idempotent by construction rather than by a flag: the bracket machine is the only state it
245
+ * reads, so once the run is closed there is nothing open to close and it answers `null`. That also
246
+ * makes it safe on a stream whose run was opened by a PREVIOUS process, since the machine is
247
+ * restored from the WAL.
248
+ *
249
+ * **AN `error` CLOSES THE SAME RUN WITH `RUN_ERROR` INSTEAD, and it is one method rather than two
250
+ * ON PURPOSE.** `RUN_ERROR` closes a run on its own, so a run that emitted one must never also
251
+ * emit a `RUN_FINISHED`. With a second method that invariant would be a rule someone has to
252
+ * remember; with one method and one branch it is a property of the shape: exactly one terminal is
253
+ * built, and the bracket machine has closed the run by the time anything could ask for another, so
254
+ * a following close answers `null` like any other close on a settled stream. Which harness signals
255
+ * mean a turn FAILED is a connector's decision and is stated at each connector's own mapping site;
256
+ * this file only carries the answer to the wire.
257
+ *
258
+ * **`error.message` AND `error.code` NEVER REACH THE WIRE.** Both are upstream values, so the close
259
+ * publishes {@link RUN_ERROR_EGRESS_MESSAGE} with no code, the same shape the write path's
260
+ * `egressRunError` in `agui.ts` produces (#1431). The frame bound still runs after that, so a close
261
+ * whose envelope cannot fit fails loud rather than leaving the run without a terminal.
262
+ *
263
+ * @returns the run that was closed, or `null` when the stream was already at a stopping point.
264
+ */
265
+ closeRun(o: {
266
+ timestamp: number;
267
+ cotal?: CotalMeta;
268
+ /** Close with `RUN_ERROR` carrying these instead of `RUN_FINISHED`. */
269
+ error?: {
270
+ message: string;
271
+ code?: string;
272
+ };
273
+ }): Promise<string | null>;
274
+ /** Measure a candidate frame EXACTLY as the wire will, at an upper bound over id and expectation. */
275
+ private measure;
276
+ /** Transition 1 then the first network attempt. */
277
+ private publish;
278
+ /**
279
+ * One publish attempt — first or retry — with the FROZEN id and the FROZEN `E`. Never the tip.
280
+ *
281
+ * The three outcomes are not symmetric and the asymmetry is the design:
282
+ * - `!duplicate` → transition 2 then 3. Success becomes durable before the frontier moves.
283
+ * - `duplicate` → HALT. On a first attempt it means a body WE DID NOT WRITE holds our id, and
284
+ * folding its `ackSeq` would advance the frontier and the source cursor past events that were
285
+ * never published. On a retry it cannot happen on a single-replica stream at all, because such a
286
+ * stream evaluates the expectation before the dedup cache, so observing it proves the stream is
287
+ * not single-replica. Both are
288
+ * fail-loud, and neither is a case where guessing is better than stopping.
289
+ * - CAS loss → HALT. Someone else moved the tip on a subject only this principal may write, or
290
+ * the subject was purged. Uncertainty plus a moved tip is exactly what must not be guessed at.
291
+ *
292
+ * A NETWORK error is deliberately none of these: it leaves `pending` as `sent_unacked`, which is
293
+ * the state that means "we do not know", and the next boot retries the same frozen frame.
294
+ */
295
+ private attempt;
296
+ /**
297
+ * Decide whether a bracket refusal is the WRITER's fault or OURS, and say which.
298
+ *
299
+ * Ours iff ALL THREE hold, and each is load-bearing:
300
+ * - this process has fed NO event through the machine yet, so the machine cannot have been put
301
+ * into a bad state by anything we did in this run; and
302
+ * - the frontier is non-virgin, so frames — and therefore possibly an open `RUN_STARTED` — were
303
+ * published by a PREVIOUS process; and
304
+ * - the WAL cannot say what was open. Since v2 the machine is PERSISTED, so an ordinary restart
305
+ * restores it and never reaches here at all; `null` means the document was migrated from v1 and
306
+ * genuinely never recorded the state. Without this condition the diagnosis would survive as a
307
+ * permanent excuse for a case the migration fixed.
308
+ *
309
+ * Drop the first condition and a genuine mid-stream violation by the writer gets blamed on a
310
+ * restart that happened an hour ago. Drop the second and a violation on a virgin thread, where
311
+ * nothing was ever published and nothing could have been lost, gets blamed on a restart that never
312
+ * happened. Each condition alone produces a confident, wrong diagnosis — which is worse than the
313
+ * undiagnosed error it replaced, because a named cause stops the search.
314
+ */
315
+ private diagnoseBracket;
316
+ private halt;
317
+ }
318
+ //# sourceMappingURL=agui-emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agui-emitter.d.ts","sourceRoot":"","sources":["../src/agui-emitter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAA4C,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAEL,mBAAmB,EASnB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,4FAA4F;IAC5F,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oGAAoG;IACpG,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,WAAW,CAAC,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,IAAI,EAAE,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,sBAAsB,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;IACvG,kBAAkB,CAAC,CAAC,EAAE;QACpB,OAAO,EAAE,MAAM,CAAC;QACh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