@botiverse/oar 0.0.11 → 0.1.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 (159) hide show
  1. package/README.md +2 -2
  2. package/dist/contracts/model-catalog.d.ts +1 -1
  3. package/dist/contracts/model-catalog.js +1 -1
  4. package/dist/contracts/provider-auth.d.ts +2 -2
  5. package/dist/contracts/provider-auth.js +2 -2
  6. package/dist/contracts/records.d.ts +205 -0
  7. package/dist/contracts/records.d.ts.map +1 -0
  8. package/dist/contracts/records.js +8 -0
  9. package/dist/contracts/records.js.map +1 -0
  10. package/dist/contracts/session.d.ts +83 -144
  11. package/dist/contracts/session.d.ts.map +1 -1
  12. package/dist/index.d.ts +6 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +3 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/observe/agent-status.d.ts +32 -18
  17. package/dist/observe/agent-status.d.ts.map +1 -1
  18. package/dist/observe/agent-status.js +66 -14
  19. package/dist/observe/agent-status.js.map +1 -1
  20. package/dist/observe/aggregate-events.d.ts +7 -6
  21. package/dist/observe/aggregate-events.d.ts.map +1 -1
  22. package/dist/observe/aggregate-events.js +38 -28
  23. package/dist/observe/aggregate-events.js.map +1 -1
  24. package/dist/observe/index.d.ts +4 -1
  25. package/dist/observe/index.d.ts.map +1 -1
  26. package/dist/observe/index.js +3 -1
  27. package/dist/observe/index.js.map +1 -1
  28. package/dist/observe/observe-agent.d.ts +4 -4
  29. package/dist/observe/observe-agent.d.ts.map +1 -1
  30. package/dist/observe/observe-agent.js +3 -3
  31. package/dist/observe/observe-agent.js.map +1 -1
  32. package/dist/observe/stall-observer.d.ts +7 -6
  33. package/dist/observe/stall-observer.d.ts.map +1 -1
  34. package/dist/observe/stall-observer.js +6 -5
  35. package/dist/observe/stall-observer.js.map +1 -1
  36. package/dist/observe/tool-activity.d.ts +2 -2
  37. package/dist/observe/tool-activity.d.ts.map +1 -1
  38. package/dist/observe/tool-activity.js +1 -1
  39. package/dist/observe/tool-activity.js.map +1 -1
  40. package/dist/observe/turns.d.ts +37 -0
  41. package/dist/observe/turns.d.ts.map +1 -0
  42. package/dist/observe/turns.js +70 -0
  43. package/dist/observe/turns.js.map +1 -0
  44. package/dist/observe/usage.d.ts +15 -0
  45. package/dist/observe/usage.d.ts.map +1 -0
  46. package/dist/observe/usage.js +79 -0
  47. package/dist/observe/usage.js.map +1 -0
  48. package/dist/runtimes/claude/account-usage.js +1 -1
  49. package/dist/runtimes/claude/context-usage.d.ts +1 -1
  50. package/dist/runtimes/claude/context-usage.js +1 -1
  51. package/dist/runtimes/claude/projection.d.ts +40 -27
  52. package/dist/runtimes/claude/projection.d.ts.map +1 -1
  53. package/dist/runtimes/claude/projection.js +107 -21
  54. package/dist/runtimes/claude/projection.js.map +1 -1
  55. package/dist/runtimes/claude/session.d.ts.map +1 -1
  56. package/dist/runtimes/claude/session.js +119 -87
  57. package/dist/runtimes/claude/session.js.map +1 -1
  58. package/dist/runtimes/codex/app-server-client.d.ts +38 -3
  59. package/dist/runtimes/codex/app-server-client.d.ts.map +1 -1
  60. package/dist/runtimes/codex/app-server-client.js +62 -15
  61. package/dist/runtimes/codex/app-server-client.js.map +1 -1
  62. package/dist/runtimes/codex/projection.d.ts +12 -12
  63. package/dist/runtimes/codex/projection.d.ts.map +1 -1
  64. package/dist/runtimes/codex/projection.js +101 -38
  65. package/dist/runtimes/codex/projection.js.map +1 -1
  66. package/dist/runtimes/codex/rpc-control.d.ts +31 -0
  67. package/dist/runtimes/codex/rpc-control.d.ts.map +1 -0
  68. package/dist/runtimes/codex/rpc-control.js +51 -0
  69. package/dist/runtimes/codex/rpc-control.js.map +1 -0
  70. package/dist/runtimes/codex/session.d.ts.map +1 -1
  71. package/dist/runtimes/codex/session.js +199 -149
  72. package/dist/runtimes/codex/session.js.map +1 -1
  73. package/dist/runtimes/grok/session.d.ts +37 -1
  74. package/dist/runtimes/grok/session.d.ts.map +1 -1
  75. package/dist/runtimes/grok/session.js +74 -0
  76. package/dist/runtimes/grok/session.js.map +1 -1
  77. package/dist/runtimes/kimi/session.d.ts.map +1 -1
  78. package/dist/runtimes/kimi/session.js +5 -0
  79. package/dist/runtimes/kimi/session.js.map +1 -1
  80. package/dist/runtimes/pi/auth.d.ts.map +1 -1
  81. package/dist/runtimes/pi/auth.js +6 -1
  82. package/dist/runtimes/pi/auth.js.map +1 -1
  83. package/dist/runtimes/pi/catalog.d.ts.map +1 -1
  84. package/dist/runtimes/pi/catalog.js +6 -1
  85. package/dist/runtimes/pi/catalog.js.map +1 -1
  86. package/dist/runtimes/pi/http.d.ts +34 -0
  87. package/dist/runtimes/pi/http.d.ts.map +1 -0
  88. package/dist/runtimes/pi/http.js +95 -0
  89. package/dist/runtimes/pi/http.js.map +1 -0
  90. package/dist/runtimes/pi/list-models.d.ts.map +1 -1
  91. package/dist/runtimes/pi/list-models.js +10 -3
  92. package/dist/runtimes/pi/list-models.js.map +1 -1
  93. package/dist/runtimes/pi/open.d.ts +32 -0
  94. package/dist/runtimes/pi/open.d.ts.map +1 -0
  95. package/dist/runtimes/pi/open.js +106 -0
  96. package/dist/runtimes/pi/open.js.map +1 -0
  97. package/dist/runtimes/pi/projection.d.ts +27 -25
  98. package/dist/runtimes/pi/projection.d.ts.map +1 -1
  99. package/dist/runtimes/pi/projection.js +85 -50
  100. package/dist/runtimes/pi/projection.js.map +1 -1
  101. package/dist/runtimes/pi/session.d.ts +1 -22
  102. package/dist/runtimes/pi/session.d.ts.map +1 -1
  103. package/dist/runtimes/pi/session.js +178 -184
  104. package/dist/runtimes/pi/session.js.map +1 -1
  105. package/dist/shared/acp/client-app.d.ts +23 -0
  106. package/dist/shared/acp/client-app.d.ts.map +1 -0
  107. package/dist/shared/acp/client-app.js +55 -0
  108. package/dist/shared/acp/client-app.js.map +1 -0
  109. package/dist/shared/acp/model.d.ts +3 -17
  110. package/dist/shared/acp/model.d.ts.map +1 -1
  111. package/dist/shared/acp/model.js +3 -14
  112. package/dist/shared/acp/model.js.map +1 -1
  113. package/dist/shared/acp/profile.d.ts +32 -7
  114. package/dist/shared/acp/profile.d.ts.map +1 -1
  115. package/dist/shared/acp/profile.js +17 -8
  116. package/dist/shared/acp/profile.js.map +1 -1
  117. package/dist/shared/acp/projection.d.ts +16 -8
  118. package/dist/shared/acp/projection.d.ts.map +1 -1
  119. package/dist/shared/acp/projection.js +51 -32
  120. package/dist/shared/acp/projection.js.map +1 -1
  121. package/dist/shared/acp/records.d.ts +46 -0
  122. package/dist/shared/acp/records.d.ts.map +1 -0
  123. package/dist/shared/acp/records.js +125 -0
  124. package/dist/shared/acp/records.js.map +1 -0
  125. package/dist/shared/acp/session.d.ts.map +1 -1
  126. package/dist/shared/acp/session.js +98 -224
  127. package/dist/shared/acp/session.js.map +1 -1
  128. package/dist/shared/acp/terminal.d.ts +1 -3
  129. package/dist/shared/acp/terminal.d.ts.map +1 -1
  130. package/dist/shared/acp/terminal.js +1 -21
  131. package/dist/shared/acp/terminal.js.map +1 -1
  132. package/dist/shared/acp/turns.d.ts +45 -0
  133. package/dist/shared/acp/turns.d.ts.map +1 -0
  134. package/dist/shared/acp/turns.js +160 -0
  135. package/dist/shared/acp/turns.js.map +1 -0
  136. package/dist/shared/acp/usage-wait.d.ts +6 -6
  137. package/dist/shared/acp/usage-wait.d.ts.map +1 -1
  138. package/dist/shared/acp/usage-wait.js +2 -2
  139. package/dist/shared/acp/usage-wait.js.map +1 -1
  140. package/dist/shared/failure-class.d.ts +1 -1
  141. package/dist/shared/failure-class.js +2 -2
  142. package/dist/shared/failure-class.js.map +1 -1
  143. package/dist/shared/seal-session.d.ts +5 -3
  144. package/dist/shared/seal-session.d.ts.map +1 -1
  145. package/dist/shared/seal-session.js +24 -16
  146. package/dist/shared/seal-session.js.map +1 -1
  147. package/dist/shared/session-kernel.d.ts +68 -18
  148. package/dist/shared/session-kernel.d.ts.map +1 -1
  149. package/dist/shared/session-kernel.js +82 -42
  150. package/dist/shared/session-kernel.js.map +1 -1
  151. package/dist/voyage.d.ts +4 -7
  152. package/dist/voyage.d.ts.map +1 -1
  153. package/dist/voyage.js +14 -19
  154. package/dist/voyage.js.map +1 -1
  155. package/package.json +4 -3
  156. package/dist/runtimes/codex/context-usage.d.ts +0 -10
  157. package/dist/runtimes/codex/context-usage.d.ts.map +0 -1
  158. package/dist/runtimes/codex/context-usage.js +0 -16
  159. package/dist/runtimes/codex/context-usage.js.map +0 -1
package/README.md CHANGED
@@ -23,8 +23,8 @@ if (installation?.kind === "available") {
23
23
 
24
24
  The package has exactly two public entry points:
25
25
 
26
- - `@botiverse/oar` — the full surface: runtime registry, adapters, and everything below. Node-only (adapters import `node:child_process` and runtime SDKs).
27
- - `@botiverse/oar/observe` — browser-safe subset: the pure derivation utilities over `SessionEvent`s (`observeAgent`, `reduceStatus`, `aggregateDeltas`, `observeStalls`, `classifyTool`, …) with zero Node and zero adapter imports. A browser or Electron-renderer bundle can import this subpath directly without dragging Node-only modules in. The root export re-exports the same utilities for Node consumers.
26
+ - `@botiverse/oar`: the full surface (runtime registry, adapters, and everything below). Node-only (adapters import `node:child_process` and runtime SDKs).
27
+ - `@botiverse/oar/observe`: browser-safe subset, the pure derivation utilities over `SessionEvent`s (`observeAgent`, `reduceStatus`, `aggregateDeltas`, `observeStalls`, `classifyTool`, …) with zero Node and zero adapter imports. A browser or Electron-renderer bundle can import this subpath directly without dragging Node-only modules in. The root export re-exports the same utilities for Node consumers.
28
28
 
29
29
  Any other deep import (`@botiverse/oar/dist/...`, source paths) is internal and may break without notice.
30
30
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provider-independent model catalog facade — the other half of the provider
2
+ * Provider-independent model catalog facade: the other half of the provider
3
3
  * plane (see {@link ./provider-auth.js}). It lists providers and their models
4
4
  * with capabilities and refreshes the remote catalog, but is credential-blind:
5
5
  * it reads auth status only to report which providers are usable, never logs
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Provider-independent model catalog facade — the other half of the provider
2
+ * Provider-independent model catalog facade: the other half of the provider
3
3
  * plane (see {@link ./provider-auth.js}). It lists providers and their models
4
4
  * with capabilities and refreshes the remote catalog, but is credential-blind:
5
5
  * it reads auth status only to report which providers are usable, never logs
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Provider-independent authentication facade. Unlike a {@link Runtime} facet,
3
- * this describes the *provider* plane — the accounts and credentials a runtime
4
- * consumes (Anthropic, xAI, Moonshot, …) — which is orthogonal to which harness
3
+ * this describes the *provider* plane: the accounts and credentials a runtime
4
+ * consumes (Anthropic, xAI, Moonshot, …), which is orthogonal to which harness
5
5
  * runs them. Implementations wrap a credential/model backend (the built-in one
6
6
  * wraps Pi's `ModelRuntime`) without leaking its types.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Provider-independent authentication facade. Unlike a {@link Runtime} facet,
3
- * this describes the *provider* plane — the accounts and credentials a runtime
4
- * consumes (Anthropic, xAI, Moonshot, …) — which is orthogonal to which harness
3
+ * this describes the *provider* plane: the accounts and credentials a runtime
4
+ * consumes (Anthropic, xAI, Moonshot, …), which is orthogonal to which harness
5
5
  * runs them. Implementations wrap a credential/model backend (the built-in one
6
6
  * wraps Pi's `ModelRuntime`) without leaking its types.
7
7
  */
@@ -0,0 +1,205 @@
1
+ /**
2
+ * The record stream: envelope, the three record kinds, event bodies and
3
+ * views, request/response bodies, and the session graph + cursor types.
4
+ * Semantics live in docs/spec; the session control surface that produces
5
+ * these records is in ./session.ts.
6
+ */
7
+ /**
8
+ * Self-certifying envelope on every record (docs/spec/attribution.md).
9
+ * Identity and ordering rest on `seq` alone; `receivedAt` is best-effort
10
+ * observation time outside any determinism guarantee.
11
+ */
12
+ export interface RecordEnvelope {
13
+ /** Runtime-native session the record belongs to. A derived child session (grok child session, codex child thread) carries ITS OWN id here; the session graph says where it came from, and the Session folds (model/usage/contextUsage, awaitTurnEnd) scope to the root session. */
14
+ readonly sessionId: string;
15
+ /** Sub-agent lineage inside the session; `[]` is the root agent. Identity of a tool call or span is the composite `(agentPath, id)`; a bare callId is never a global key. */
16
+ readonly agentPath: readonly string[];
17
+ /** Runtime-native turn/span id when the runtime has one (codex turnId). oar never generates it; absent means the runtime reported none. */
18
+ readonly spanId?: string;
19
+ /** Monotonic per stream; the cursor anchor and the total order for trace alignment. */
20
+ readonly seq: number;
21
+ /** Unix epoch milliseconds stamped at adapter ingress: same clock as Date.now(), so fold×clock consumers (stallOf) compose directly. */
22
+ readonly receivedAt: number;
23
+ }
24
+ export type RecordKind = "event" | "request" | "response";
25
+ /** The runtime's own words. oar never synthesizes an event and never drops one: whatever the runtime said enters the stream, even after a span ended. */
26
+ export interface EventRecord extends RecordEnvelope {
27
+ readonly kind: "event";
28
+ readonly body: EventBody;
29
+ }
30
+ export type RequestDirection = "toRuntime" | "toApp";
31
+ /** An action record that expects an outcome. `toRuntime`: prompt / steer / queue / abort / dispose, issued through this Session. `toApp`: the runtime asking the application something (approval, question, external tool), body verbatim. */
32
+ export interface RequestRecord extends RecordEnvelope {
33
+ readonly kind: "request";
34
+ readonly id: string;
35
+ readonly direction: RequestDirection;
36
+ readonly body: RequestBody;
37
+ }
38
+ /** Always points at a request; the reverse is not guaranteed. A request without a response is an honest record: the action was initiated and its outcome was not observed. Backfilling a guessed response is forbidden. */
39
+ export interface ResponseRecord extends RecordEnvelope {
40
+ readonly kind: "response";
41
+ readonly requestId: string;
42
+ readonly body: ResponseBody;
43
+ }
44
+ export type SessionRecord = EventRecord | RequestRecord | ResponseRecord;
45
+ /**
46
+ * An event body carries the runtime's frame verbatim plus oar's typed reading
47
+ * of it. `native` is the source of truth; `views` is a projection for
48
+ * consumers that want the cross-runtime vocabulary without parsing five wire
49
+ * formats. One frame is one record: a claude assistant message with a
50
+ * thinking block, a text block and a tool_use block is ONE event with three
51
+ * views, in the frame's own order. A frame oar does not interpret still
52
+ * enters the stream, with `type` and `native` and no views.
53
+ */
54
+ export interface EventBody {
55
+ /** Runtime-native discriminator: claude `type[/subtype]`, codex notification method, pi event type, ACP `sessionUpdate`. */
56
+ readonly type: string;
57
+ /** The frame as the runtime sent it (JSON-safe). Never trimmed, never re-shaped. */
58
+ readonly native: unknown;
59
+ /** oar's readings of the frame, in frame order; empty when oar has none. */
60
+ readonly views: readonly EventView[];
61
+ }
62
+ export type ReasoningContent = {
63
+ readonly kind: "text";
64
+ readonly text: string;
65
+ } | {
66
+ readonly kind: "redacted";
67
+ } | {
68
+ readonly kind: "empty";
69
+ };
70
+ /** Token totals; always cumulative for the agent the record is attributed to. */
71
+ export interface TokenTotals {
72
+ readonly input: number;
73
+ readonly output: number;
74
+ }
75
+ /**
76
+ * What a usage-bearing frame says. `context` is current context fullness as
77
+ * the runtime reports it; `tokens` is the runtime's running total for this
78
+ * record's `agentPath`, already resolved by the adapter (which runtime view is
79
+ * authoritative and how overlapping views deduplicate never crosses this
80
+ * surface; see docs/spec/attribution.md, "usage: one constraint").
81
+ */
82
+ export interface UsageReport {
83
+ readonly context?: ContextUsage;
84
+ readonly tokens?: TokenTotals;
85
+ }
86
+ export type EventView = {
87
+ readonly kind: "text_delta";
88
+ readonly text: string;
89
+ }
90
+ /** A reasoning output item; its lifecycle remains observable without readable contents. */
91
+ | {
92
+ readonly kind: "reasoning";
93
+ readonly content: ReasoningContent;
94
+ } | {
95
+ readonly kind: "tool_call_started";
96
+ readonly callId: string;
97
+ readonly tool: string;
98
+ /** Best-effort human-readable invocation detail when the runtime exposes it. */
99
+ readonly input?: string;
100
+ } | {
101
+ readonly kind: "tool_call_ended";
102
+ readonly callId: string;
103
+ /** Best-effort human-readable result detail when the runtime exposes it. */
104
+ readonly output?: string;
105
+ }
106
+ /** The runtime's OWN completion report for a turn (claude `result`, codex `turn/completed`, pi `agent_end`, an ACP prompt answer). The turn's start is the prompt request record itself; if a runtime reports no end, none appears. */
107
+ | {
108
+ readonly kind: "turn_ended";
109
+ readonly outcome: TurnOutcome;
110
+ } | {
111
+ readonly kind: "usage";
112
+ readonly usage: UsageReport;
113
+ }
114
+ /** The model the runtime reports as in effect: its own report, never the request echoed. */
115
+ | {
116
+ readonly kind: "model";
117
+ readonly model: string;
118
+ };
119
+ export type RequestBody = {
120
+ readonly kind: "prompt";
121
+ readonly input: string;
122
+ } | {
123
+ readonly kind: "steer";
124
+ readonly input: string;
125
+ } | {
126
+ readonly kind: "queue";
127
+ readonly input: string;
128
+ } | {
129
+ readonly kind: "abort";
130
+ } | {
131
+ readonly kind: "dispose";
132
+ }
133
+ /** A runtime→app request, verbatim; `type` is the runtime's method/subtype. */
134
+ | {
135
+ readonly kind: "native";
136
+ readonly type: string;
137
+ readonly native: unknown;
138
+ };
139
+ /**
140
+ * Control responses answer only "accepted or not"; final states and landing
141
+ * points are always events. The remaining bodies are outcomes only oar
142
+ * observes: its own answer to a runtime→app request, and the process exit.
143
+ */
144
+ export type ResponseBody =
145
+ /** The adapter (or runtime) took the action over. For prompt/steer/queue this is ONE deliberately weak promise: the caller's delivery obligation ENDS; do not resubmit. No guarantee it lands in the current turn, that the model attends to it, or that any business outcome happened; where input landed is the event stream's job. `native` is the runtime's own acknowledgement when it gave one. */
146
+ {
147
+ readonly kind: "accepted";
148
+ readonly native?: unknown;
149
+ }
150
+ /** Not taken over; the caller still owns the input. `busy` (another turn is active), `not_steerable`, a dead process, or the runtime's typed refusal. */
151
+ | {
152
+ readonly kind: "rejected";
153
+ readonly reason: string;
154
+ readonly native?: unknown;
155
+ }
156
+ /** oar's reply to a `toApp` request (e.g. the automatic permission grant), verbatim. */
157
+ | {
158
+ readonly kind: "answered";
159
+ readonly native: unknown;
160
+ }
161
+ /** The runtime process exited, an outcome the runtime cannot say itself. Answers a `dispose` request when oar caused it; also recorded for an unrequested exit, pointing at no request. */
162
+ | {
163
+ readonly kind: "exited";
164
+ readonly code: number | null;
165
+ };
166
+ /** Coarse failure classification so applications can react (re-login, back off, report a bug) without parsing vendor error prose. Best-effort: adapters map what the runtime reveals; "unknown" is an honest answer. */
167
+ export type FailureClass = "auth" | "quota" | "invalid_request" | "overloaded" | "provider" | "runtime_exited" | "unknown";
168
+ export type TurnOutcome = {
169
+ readonly kind: "completed";
170
+ } | {
171
+ readonly kind: "aborted";
172
+ } | {
173
+ readonly kind: "failed";
174
+ readonly reason: string;
175
+ readonly failure: FailureClass;
176
+ };
177
+ /**
178
+ * Current context fullness, borrowed from pi's shape because it already
179
+ * models the hard case: `tokens` is null when unknown (right after compaction,
180
+ * before the next model response), and `percent` follows.
181
+ */
182
+ export interface ContextUsage {
183
+ readonly tokens: number | null;
184
+ readonly contextWindow: number | null;
185
+ readonly percent: number | null;
186
+ }
187
+ /** True sessions only (docs/spec/session-graph-and-cursor.md): derived child sessions and transcript branches. Agent parent/child is `agentPath`, not a node. */
188
+ export interface SessionNode {
189
+ readonly id: string;
190
+ }
191
+ export interface SessionEdge {
192
+ readonly parent: string;
193
+ readonly child: string;
194
+ readonly via: "tool_call" | "fork" | "resume";
195
+ }
196
+ export interface SessionGraph {
197
+ readonly nodes: readonly SessionNode[];
198
+ readonly edges: readonly SessionEdge[];
199
+ }
200
+ /** Resume reading after `afterSeq`; `-1` (or omitting the cursor) reads from the start. */
201
+ export interface Cursor {
202
+ readonly sessionId: string;
203
+ readonly afterSeq: number;
204
+ }
205
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/contracts/records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,mRAAmR;IACnR,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6KAA6K;IAC7K,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,2IAA2I;IAC3I,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wIAAwI;IACxI,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM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iB,GACjB,YAAY,GACZ,UAAU,GACV,gBAAgB,GAChB,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAID,iKAAiK;AACjK,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC;AAED,2FAA2F;AAC3F,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The record stream: envelope, the three record kinds, event bodies and
3
+ * views, request/response bodies, and the session graph + cursor types.
4
+ * Semantics live in docs/spec; the session control surface that produces
5
+ * these records is in ./session.ts.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.js","sourceRoot":"","sources":["../../src/contracts/records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,24 +1,33 @@
1
+ import type { ContextUsage, Cursor, RequestRecord, ResponseRecord, SessionGraph, SessionRecord, TokenTotals } from "./records.js";
1
2
  import type { AvailableInstallation } from "./installation.js";
3
+ export type { ContextUsage, Cursor, EventBody, EventRecord, EventView, FailureClass, ReasoningContent, RecordEnvelope, RecordKind, RequestBody, RequestDirection, RequestRecord, ResponseBody, ResponseRecord, SessionEdge, SessionGraph, SessionNode, SessionRecord, TokenTotals, TurnOutcome, UsageReport, } from "./records.js";
2
4
  /**
3
- * Session/Turn contract v1. Behavior invariants live as comments on the
4
- * member they constrain; each "must/never" has (or gets) a sea-trial case.
5
+ * Session contract: one ordered, resumable record stream.
6
+ *
7
+ * The external promise (docs/spec): everything the runtime said is in the
8
+ * stream, nothing oar didn't observe is in it, every record knows whose it
9
+ * is, and the stream is readable again from any position. Records split by
10
+ * OBLIGATION into three kinds, event (the runtime's own words), request (an
11
+ * action that expects an outcome) and response (points at a request), and
12
+ * travel on one channel with one monotonic `seq`. Behavior invariants live as
13
+ * comments on the member they constrain; each "must/never" has (or gets) a
14
+ * sea-trial case.
5
15
  *
6
16
  * Scope notes that fit no single member:
7
17
  * - Ownership is the object reference; no in-process lease. Multi-controller
8
18
  * arbitration belongs to the application layer.
9
19
  * - Sessions run YOLO by default: adapters disable interactive permission
10
20
  * gates (claude --dangerously-skip-permissions, codex approvalPolicy
11
- * never, pi pre-trusted cwd) AND default sandboxes off (codex
12
- * danger-full-access; claude/pi have none). In embedded use nobody sits
13
- * at an approval prompt — a gate is a hang, not safety. A host wanting
14
- * isolation opts in (OAR_CODEX_SANDBOX), and codex's exec follows the
15
- * USER's config-level sandbox_mode on real logins, which OAR never
16
- * overrides.
17
- * - v1 defers resume/persistence, interactive permission settlement, and any
18
- * remote/multi-consumer model.
19
- * - pi emits session-scoped events (compaction_start/end, queue_update) that
20
- * belong to no turn; representing those is a deliberate v2 decision
21
- * (nullable turnId vs a second event scope). Until then adapters drop them.
21
+ * never, pi pre-trusted cwd, ACP allow_always) AND default sandboxes off
22
+ * (codex danger-full-access; claude/pi have none). In embedded use nobody
23
+ * sits at an approval prompt: a gate is a hang, not safety. A host wanting
24
+ * isolation opts in (OAR_CODEX_SANDBOX). Runtime→app requests that DO
25
+ * arrive are recorded verbatim (direction "toApp") and oar's automatic
26
+ * answer, when it gives one, is the matching response record.
27
+ * - The cursor is honored for the lifetime of the adapter process: a
28
+ * subscriber reconnecting with `afterSeq` misses nothing and repeats
29
+ * nothing. `SessionOptions.resume` reopens the runtime-native conversation
30
+ * with a fresh stream starting at seq 0.
22
31
  */
23
32
  export interface SessionOptions {
24
33
  /** Working directory the runtime operates in. */
@@ -27,11 +36,11 @@ export interface SessionOptions {
27
36
  readonly model?: string;
28
37
  /** Resume the runtime-native session identified by a previous Session.id. */
29
38
  readonly resume?: string;
30
- /** Extra environment overlaid on the host env for the processes THIS session spawns. Subprocess runtimes: the runtime process itself (tools inherit). In-process runtimes: only the agent's tool subprocesses — provider config needs the runtime's native channel there. CAVEAT for PATH-like entries: a runtime that runs tools through a login shell (codex: zsh/bash -lc) lets profile scripts reorder or rebuild PATH — probed: codex demotes injected entries on Linux and macOS path_helper/.zprofile can drop them. Injected CLIs should be invoked by ABSOLUTE path. */
39
+ /** Extra environment overlaid on the host env for the processes THIS session spawns. Subprocess runtimes: the runtime process itself (tools inherit). In-process runtimes: only the agent's tool subprocesses; provider config needs the runtime's native channel there. CAVEAT for PATH-like entries: a runtime that runs tools through a login shell (codex: zsh/bash -lc) lets profile scripts reorder or rebuild PATH (probed: codex demotes injected entries on Linux and macOS path_helper/.zprofile can drop them). Injected CLIs should be invoked by ABSOLUTE path. */
31
40
  readonly env?: Readonly<Record<string, string>>;
32
- /** REPLACE the runtime's built-in system prompt (claude --system-prompt, codex thread baseInstructions, pi resource-loader systemPrompt). Survives runtime compaction — pinned per vendor. */
41
+ /** REPLACE the runtime's built-in system prompt (claude --system-prompt, codex thread baseInstructions, pi resource-loader systemPrompt). Survives runtime compaction (pinned per vendor). */
33
42
  readonly systemPrompt?: string;
34
- /** APPEND to the runtime's built-in system prompt, keeping its harness behavior intact (claude --append-system-prompt, codex developerInstructions, pi appendSystemPrompt). Survives runtime compaction — pinned per vendor. */
43
+ /** APPEND to the runtime's built-in system prompt, keeping its harness behavior intact (claude --append-system-prompt, codex developerInstructions, pi appendSystemPrompt). Survives runtime compaction (pinned per vendor). */
35
44
  readonly appendSystemPrompt?: string;
36
45
  }
37
46
  /**
@@ -40,150 +49,80 @@ export interface SessionOptions {
40
49
  * runtime's message).
41
50
  */
42
51
  export type StartSession = (installation: AvailableInstallation, options: SessionOptions) => Promise<Session>;
52
+ /** Both records a control call produced: the request (its `seq` is where the action sits in the stream) and the accept/reject response. */
53
+ export interface ControlResult {
54
+ readonly request: RequestRecord;
55
+ readonly response: ResponseRecord;
56
+ }
43
57
  /**
44
- * The SPI face: what an adapter actually builds. Today every member is also
45
- * public, so the API face extends this; if an SPI-internal member ever
46
- * appears, the extends breaks into an explicit mapping inside sealSession —
47
- * that seam is already the only place the two faces meet.
58
+ * Which tier of the attribution spectrum the adapter carries, declared
59
+ * explicitly and required to match what the runtime exposes (adapter red
60
+ * line, docs/spec/runtime-matrix.md): `none`: the runtime has no sub-agents;
61
+ * `opaque`: it has them but its selected interface shows only the root;
62
+ * `attributed`: child records self-attribute via `agentPath`; `nested`:
63
+ * children are sessions of their own, linked in the graph.
48
64
  */
49
- export interface AdapterSession {
50
- readonly id: string;
51
- prompt(input: string): PromptResult;
52
- subscribe(observer: SessionObserver): Unsubscribe;
53
- readonly queue?: TurnQueue;
54
- model?(): string | null;
55
- contextUsage?(): ContextUsage | null;
56
- dispose(): Promise<void>;
65
+ export type AttributionTier = "none" | "opaque" | "attributed" | "nested";
66
+ export interface SessionCapabilities {
67
+ /** Mid-turn input can be injected into the active turn. */
68
+ readonly steer: boolean;
69
+ /** Input can be held for a LATER turn; `durable` says whether that survives a process restart (codex: runtime-persisted; claude/pi/ACP: this process only). Null when the runtime cannot even hold input. */
70
+ readonly queue: {
71
+ readonly durable: boolean;
72
+ } | null;
73
+ readonly attribution: AttributionTier;
57
74
  }
75
+ export type SessionObserver = (record: SessionRecord) => void;
76
+ export type Unsubscribe = () => void;
58
77
  /**
59
- * Current context fullness — borrowed from pi's shape because it already
60
- * models the hard case: `tokens` is null when unknown (right after compaction,
61
- * before the next model response), and `percent` follows. NOT a running sum of
62
- * usage deltas; the latest authoritative snapshot the runtime reported.
78
+ * The SPI face: what an adapter actually builds. The API face extends it
79
+ * with derivations sealSession computes over the stream.
63
80
  */
64
- export interface ContextUsage {
65
- readonly tokens: number | null;
66
- readonly contextWindow: number | null;
67
- readonly percent: number | null;
81
+ export interface AdapterSession {
82
+ readonly id: string;
83
+ readonly capabilities: SessionCapabilities;
84
+ prompt(input: string): Promise<ControlResult>;
85
+ steer(input: string): Promise<ControlResult>;
86
+ queue(input: string): Promise<ControlResult>;
87
+ abort(): Promise<ControlResult>;
88
+ subscribe(observer: SessionObserver, cursor?: Cursor): Unsubscribe;
89
+ records(): readonly SessionRecord[];
90
+ graph(): SessionGraph;
91
+ dispose(): Promise<void>;
68
92
  }
69
- /** The API face: the SPI plus surfaces sealSession derives. */
93
+ /** The API face: the SPI plus surfaces sealSession derives from the stream. */
70
94
  export interface Session extends AdapterSession {
95
+ /** Latest `model` event; null until the runtime has said one. A fold, not an echo of the request. */
96
+ model(): string | null;
97
+ /** THIS session's token total plus a per-agent breakdown when children reported: deduplicated, directly summable (sum = total). A derived child session (own `sessionId`, in `graph()`) is not aggregated here; its usage is in its own records. */
98
+ usage(): SessionUsage;
99
+ /** Latest context fullness the runtime reported for this session's root agent; null before any. */
100
+ contextUsage(): ContextUsage | null;
71
101
  /**
72
- * DERIVED, not adapter-implemented: steer when the runtime can, fall back to
73
- * queueing, always report where the input landed. `rejected` means the input
74
- * was NOT taken over and the caller still owns it.
102
+ * DERIVED: steer when the runtime can, fall back to queueing, always report
103
+ * where the input landed. `rejected` means the input was NOT taken over and
104
+ * the caller still owns it.
75
105
  */
76
- steerOrQueue(turn: Turn, input: string): Promise<SteerOrQueueResult>;
106
+ steerOrQueue(input: string): Promise<SteerOrQueueResult>;
107
+ }
108
+ export interface SessionUsage {
109
+ /** Null until the runtime has reported token totals, never a guessed zero (kimi's ACP surface reports context only). */
110
+ readonly total: TokenTotals | null;
111
+ /** Present only when more than the root agent reported tokens. */
112
+ readonly byAgent?: readonly {
113
+ readonly agentPath: readonly string[];
114
+ readonly tokens: TokenTotals;
115
+ }[];
77
116
  }
78
117
  export type SteerOrQueueResult = {
79
118
  readonly landed: "steered";
119
+ readonly result: ControlResult;
80
120
  } | {
81
121
  readonly landed: "queued";
122
+ readonly result: ControlResult;
82
123
  } | {
83
124
  readonly landed: "rejected";
84
125
  readonly reason: string;
85
- };
86
- /**
87
- * Queue input to run as a future turn. `add` follows the same weak
88
- * delivery-obligation transfer as steer's accepted: the adapter (or runtime)
89
- * now owns not losing it; whether that survives a process restart is what
90
- * `durable` reports honestly (codex: runtime-persisted; claude/pi: held in
91
- * this process only).
92
- */
93
- export interface TurnQueue {
94
- readonly durable: boolean;
95
- add(input: string): Promise<void>;
96
- }
97
- export type PromptResult = {
98
- readonly kind: "turn";
99
- readonly turn: Turn;
100
- } | {
101
- readonly kind: "busy";
102
- };
103
- export type SessionObserver = (event: SessionEvent) => void;
104
- export type Unsubscribe = () => void;
105
- export interface Turn {
106
- readonly id: string;
107
- readonly outcome: Promise<TurnOutcome>;
108
- abort(): Promise<void>;
109
- /**
110
- * Mid-turn input; absent when the runtime cannot inject into an active turn.
111
- * `accepted` is ONE deliberately weak promise, identical on every runtime:
112
- * the adapter has taken over this input and the caller's delivery
113
- * obligation ENDS — do not resubmit. Taking over means the adapter now owns
114
- * not losing it (e.g. holding it through runtime-autonomous compaction);
115
- * failure to take over is a typed not_steerable or a thrown operational
116
- * error, never a silent drop. No guarantee it lands in the current turn,
117
- * that the model attends to it, or that any business outcome happened. How
118
- * acceptance happens (stdin write, native enqueue, a runtime-side steer
119
- * ack) is adapter-internal and adapter-tested, never an application-facing
120
- * difference. Input written during
121
- * runtime-autonomous compaction is HELD, not lost; codex Compact/Review
122
- * turns reject with not_steerable instead. Where input landed is the event
123
- * stream's job: same turnId, or a fresh turn_started when a runtime
124
- * auto-queues past a turn that just ended (that spontaneous turn has events
125
- * but no control handle yet).
126
- */
127
- readonly steer?: (input: string) => Promise<SteerResult>;
128
- }
129
- /** Coarse failure classification so applications can react (re-login, back off, report a bug) without parsing vendor error prose. Best-effort: adapters map what the runtime reveals; "unknown" is an honest answer. */
130
- export type FailureClass = "auth" | "quota" | "invalid_request" | "overloaded" | "provider" | "runtime_exited" | "unknown";
131
- export type TurnOutcome = {
132
- readonly kind: "completed";
133
- } | {
134
- readonly kind: "aborted";
135
- } | {
136
- readonly kind: "failed";
137
- readonly reason: string;
138
- readonly failure: FailureClass;
139
- };
140
- export type SteerResult = {
141
- readonly kind: "accepted";
142
- } | {
143
- readonly kind: "not_steerable";
144
- readonly reason: string;
145
- };
146
- /** Envelope + minimal body; runtime-specific detail waits for real demand. */
147
- export type SessionEvent = SessionEventEnvelope & SessionEventBody;
148
- export interface SessionEventEnvelope {
149
- readonly sessionId: string;
150
- readonly turnId: string;
151
- /** Monotonic per session; total order for trace alignment. */
152
- readonly seq: number;
153
- /** Unix epoch milliseconds stamped at adapter ingress — same clock as Date.now(), so fold×clock consumers (stallOf) compose directly. */
154
- readonly receivedAt: number;
155
- }
156
- export type ReasoningContent = {
157
- readonly kind: "text";
158
- readonly text: string;
159
- } | {
160
- readonly kind: "redacted";
161
- } | {
162
- readonly kind: "empty";
163
- };
164
- export type SessionEventBody = {
165
- readonly kind: "turn_started";
166
- } | {
167
- readonly kind: "text_delta";
168
- readonly text: string;
169
- }
170
- /** A reasoning output item; its lifecycle remains observable without readable contents. */
171
- | {
172
- readonly kind: "reasoning";
173
- readonly content: ReasoningContent;
174
- } | {
175
- readonly kind: "tool_call_started";
176
- readonly callId: string;
177
- readonly tool: string;
178
- /** Best-effort human-readable invocation detail when the runtime exposes it. */
179
- readonly input?: string;
180
- } | {
181
- readonly kind: "tool_call_ended";
182
- readonly callId: string;
183
- /** Best-effort human-readable result detail when the runtime exposes it. */
184
- readonly output?: string;
185
- } | {
186
- readonly kind: "turn_ended";
187
- readonly outcome: TurnOutcome;
126
+ readonly result: ControlResult;
188
127
  };
189
128
  //# sourceMappingURL=session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/contracts/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,ijBAAijB;IACjjB,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,8LAA8L;IAC9L,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,gOAAgO;IAChO,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,YAAY,EAAE,qBAAqB,EACnC,OAAO,EAAE,cAAc,KACpB,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAA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AAI,MAAM,GAAG,IAAI,CAAC;IACvB,oPAAoP;IACpP,KAAK,IAAI,YAAY,CAAC;IACtB,mGAAmG;IACnG,YAAY,IAAI,YAAY,GAAG,IAAI,CAAC;IACpC;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,YAAY;IAC3B,wHAAwH;IACxH,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CACvG;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAC9D;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,12 +5,12 @@ export type { ProviderAuthFacade, ProviderAuthStatus, ProviderLoginEvent, Provid
5
5
  export type { CatalogModel, CatalogProvider, CatalogRefreshOptions, CatalogRefreshResult, ModelCatalogFacade, } from "./contracts/model-catalog.js";
6
6
  export type { ListModelsOptions, ListModelsResult, ModelEntry, ModelLister, } from "./contracts/list-models.js";
7
7
  export type { Runtime } from "./contracts/runtime.js";
8
- export type { AdapterSession, PromptResult, ReasoningContent, Session, SessionEvent, SessionEventBody, SessionEventEnvelope, SessionObserver, SessionOptions, StartSession, SteerOrQueueResult, SteerResult, Turn, TurnOutcome, TurnQueue, Unsubscribe, } from "./contracts/session.js";
8
+ export type { AdapterSession, AttributionTier, ContextUsage, ControlResult, Cursor, EventBody, EventRecord, EventView, FailureClass, ReasoningContent, RecordEnvelope, RecordKind, RequestBody, RequestDirection, RequestRecord, ResponseBody, ResponseRecord, Session, SessionCapabilities, SessionEdge, SessionGraph, SessionNode, SessionObserver, SessionOptions, SessionRecord, SessionUsage, StartSession, SteerOrQueueResult, TokenTotals, TurnOutcome, Unsubscribe, UsageReport, } from "./contracts/session.js";
9
9
  export { defineRuntime } from "./contracts/runtime.js";
10
10
  export { utcInstantFromDate } from "./shared/instant.js";
11
11
  export { RuntimeRegistry, createRuntimeRegistry } from "./registry.js";
12
- export { VOYAGE_FORMAT, endLine, eventLine, headerLine, openVoyage, submissionLine, } from "./voyage.js";
13
- export type { SubmissionVia, VoyageHeader, VoyageRecorder } from "./voyage.js";
12
+ export { VOYAGE_FORMAT, endLine, headerLine, openVoyage, recordLine, } from "./voyage.js";
13
+ export type { VoyageHeader, VoyageRecorder } from "./voyage.js";
14
14
  export { aggregateDeltas } from "./observe/aggregate-events.js";
15
15
  export { initialStatus, reduceStatus, stallOf, } from "./observe/agent-status.js";
16
16
  export type { AgentStatus, RunningPhase } from "./observe/agent-status.js";
@@ -20,6 +20,9 @@ export { observeAgent, simpleStateOf } from "./observe/observe-agent.js";
20
20
  export { classifyTool, toolActionLabel } from "./observe/tool-activity.js";
21
21
  export type { ToolAction, ToolActionKind } from "./observe/tool-activity.js";
22
22
  export type { AgentObserver, AgentView, ObserveAgentOptions } from "./observe/observe-agent.js";
23
+ export { awaitTurnEnd, promptAndWait, turnEndAfter } from "./observe/turns.js";
24
+ export type { PromptRun } from "./observe/turns.js";
25
+ export { contextUsageOf, modelOf, usageOf } from "./observe/usage.js";
23
26
  export { claudeRuntime } from "./runtimes/claude/index.js";
24
27
  export { claudeListModels, projectClaudeModels } from "./runtimes/claude/list-models.js";
25
28
  export { claudeSession } from "./runtimes/claude/session.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,aAAa,EACb,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,a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