condukt 0.25.0 → 0.27.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 (96) hide show
  1. package/dist/runtimes/claude/bridge-cache.d.ts +58 -0
  2. package/dist/runtimes/claude/bridge-cache.d.ts.map +1 -0
  3. package/dist/runtimes/claude/bridge-cache.js +257 -0
  4. package/dist/runtimes/claude/bridge-cache.js.map +1 -0
  5. package/dist/runtimes/claude/claude-runtime.d.ts +30 -0
  6. package/dist/runtimes/claude/claude-runtime.d.ts.map +1 -0
  7. package/dist/runtimes/claude/claude-runtime.js +88 -0
  8. package/dist/runtimes/claude/claude-runtime.js.map +1 -0
  9. package/dist/runtimes/claude/claude-session.d.ts +154 -0
  10. package/dist/runtimes/claude/claude-session.d.ts.map +1 -0
  11. package/dist/runtimes/claude/claude-session.js +851 -0
  12. package/dist/runtimes/claude/claude-session.js.map +1 -0
  13. package/dist/runtimes/claude/config-mapper.d.ts +69 -0
  14. package/dist/runtimes/claude/config-mapper.d.ts.map +1 -0
  15. package/dist/runtimes/claude/config-mapper.js +458 -0
  16. package/dist/runtimes/claude/config-mapper.js.map +1 -0
  17. package/dist/runtimes/claude/epoch-store.d.ts +28 -0
  18. package/dist/runtimes/claude/epoch-store.d.ts.map +1 -0
  19. package/dist/runtimes/claude/epoch-store.js +199 -0
  20. package/dist/runtimes/claude/epoch-store.js.map +1 -0
  21. package/dist/runtimes/claude/fallback-runtime.d.ts +14 -0
  22. package/dist/runtimes/claude/fallback-runtime.d.ts.map +1 -0
  23. package/dist/runtimes/claude/fallback-runtime.js +64 -0
  24. package/dist/runtimes/claude/fallback-runtime.js.map +1 -0
  25. package/dist/runtimes/claude/index.d.ts +24 -0
  26. package/dist/runtimes/claude/index.d.ts.map +1 -0
  27. package/dist/runtimes/claude/index.js +61 -0
  28. package/dist/runtimes/claude/index.js.map +1 -0
  29. package/dist/runtimes/claude/message-mapper.d.ts +135 -0
  30. package/dist/runtimes/claude/message-mapper.d.ts.map +1 -0
  31. package/dist/runtimes/claude/message-mapper.js +504 -0
  32. package/dist/runtimes/claude/message-mapper.js.map +1 -0
  33. package/dist/runtimes/claude/one-shot.d.ts +48 -0
  34. package/dist/runtimes/claude/one-shot.d.ts.map +1 -0
  35. package/dist/runtimes/claude/one-shot.js +186 -0
  36. package/dist/runtimes/claude/one-shot.js.map +1 -0
  37. package/dist/runtimes/claude/protocol-bridge.d.ts +138 -0
  38. package/dist/runtimes/claude/protocol-bridge.d.ts.map +1 -0
  39. package/dist/runtimes/claude/protocol-bridge.js +1170 -0
  40. package/dist/runtimes/claude/protocol-bridge.js.map +1 -0
  41. package/dist/runtimes/claude/protocol-router.d.ts +113 -0
  42. package/dist/runtimes/claude/protocol-router.d.ts.map +1 -0
  43. package/dist/runtimes/claude/protocol-router.js +514 -0
  44. package/dist/runtimes/claude/protocol-router.js.map +1 -0
  45. package/dist/runtimes/claude/session-epoch.d.ts +156 -0
  46. package/dist/runtimes/claude/session-epoch.d.ts.map +1 -0
  47. package/dist/runtimes/claude/session-epoch.js +365 -0
  48. package/dist/runtimes/claude/session-epoch.js.map +1 -0
  49. package/dist/runtimes/claude/session-recovery.d.ts +78 -0
  50. package/dist/runtimes/claude/session-recovery.d.ts.map +1 -0
  51. package/dist/runtimes/claude/session-recovery.js +259 -0
  52. package/dist/runtimes/claude/session-recovery.js.map +1 -0
  53. package/dist/runtimes/claude/sse.d.ts +16 -0
  54. package/dist/runtimes/claude/sse.d.ts.map +1 -0
  55. package/dist/runtimes/claude/sse.js +46 -0
  56. package/dist/runtimes/claude/sse.js.map +1 -0
  57. package/dist/runtimes/claude/translate-chat.d.ts +106 -0
  58. package/dist/runtimes/claude/translate-chat.d.ts.map +1 -0
  59. package/dist/runtimes/claude/translate-chat.js +857 -0
  60. package/dist/runtimes/claude/translate-chat.js.map +1 -0
  61. package/dist/runtimes/claude/translate-responses.d.ts +76 -0
  62. package/dist/runtimes/claude/translate-responses.d.ts.map +1 -0
  63. package/dist/runtimes/claude/translate-responses.js +625 -0
  64. package/dist/runtimes/claude/translate-responses.js.map +1 -0
  65. package/dist/runtimes/claude/usage-ledger.d.ts +108 -0
  66. package/dist/runtimes/claude/usage-ledger.d.ts.map +1 -0
  67. package/dist/runtimes/claude/usage-ledger.js +189 -0
  68. package/dist/runtimes/claude/usage-ledger.js.map +1 -0
  69. package/dist/runtimes/copilot/copilot-backend.d.ts +8 -0
  70. package/dist/runtimes/copilot/copilot-backend.d.ts.map +1 -1
  71. package/dist/runtimes/copilot/sdk-backend.d.ts.map +1 -1
  72. package/dist/runtimes/copilot/sdk-backend.js +314 -135
  73. package/dist/runtimes/copilot/sdk-backend.js.map +1 -1
  74. package/dist/runtimes/mcp-env.d.ts +24 -0
  75. package/dist/runtimes/mcp-env.d.ts.map +1 -0
  76. package/dist/runtimes/mcp-env.js +81 -0
  77. package/dist/runtimes/mcp-env.js.map +1 -0
  78. package/dist/runtimes/mock/mock-runtime.d.ts +2 -2
  79. package/dist/runtimes/mock/mock-runtime.d.ts.map +1 -1
  80. package/dist/runtimes/mock/mock-runtime.js +38 -1
  81. package/dist/runtimes/mock/mock-runtime.js.map +1 -1
  82. package/dist/src/agent.d.ts.map +1 -1
  83. package/dist/src/agent.js +171 -3
  84. package/dist/src/agent.js.map +1 -1
  85. package/dist/src/index.d.ts +1 -1
  86. package/dist/src/index.d.ts.map +1 -1
  87. package/dist/src/index.js.map +1 -1
  88. package/dist/src/session-recovery-policy.d.ts +19 -0
  89. package/dist/src/session-recovery-policy.d.ts.map +1 -0
  90. package/dist/src/session-recovery-policy.js +43 -0
  91. package/dist/src/session-recovery-policy.js.map +1 -0
  92. package/dist/src/types.d.ts +118 -1
  93. package/dist/src/types.d.ts.map +1 -1
  94. package/dist/src/types.js +11 -1
  95. package/dist/src/types.js.map +1 -1
  96. package/package.json +20 -4
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Sidecar persistence for session epoch state (reference parity with
3
+ * opencode.py `_epoch_load` / `_epoch_write_snapshot`).
4
+ *
5
+ * Strict shape validation: any entry that is not a well-formed state
6
+ * with ints >= 0, a `lastSeen` within [0, now] and inside the TTL, a
7
+ * list-of-strings `seen`, and a string-or-null `streakHead` is skipped —
8
+ * a predating/hand-edited file must never wipe an established epoch
9
+ * into bare reuse. Missing/corrupt files start empty. All IO is
10
+ * best-effort and never throws into the request path; writes go through
11
+ * a temp file + rename so a torn read is impossible.
12
+ */
13
+ import { type SessionEpochConstants, type SessionEpochState } from './session-epoch';
14
+ declare const STATE_KEYS: readonly ["epoch", "rot", "max", "calm", "seen", "cooldown", "lastSeen", "rebaseSize", "rebaseHits", "streak", "prevIn", "prevCached", "prevSize", "streakHead"];
15
+ /** Validate one raw entry; returns a normalized state or null (skip). */
16
+ export declare function validateEpochEntry(raw: unknown, now: number, c: SessionEpochConstants): SessionEpochState | null;
17
+ /** Read + validate + TTL-GC a sidecar. Missing/corrupt → empty map. */
18
+ export declare function readEpochStore(file: string, now: number, c: SessionEpochConstants): Record<string, SessionEpochState>;
19
+ /** TTL-GC + atomic write (temp file + rename). Never throws. */
20
+ export declare function writeEpochStore(file: string, store: Record<string, SessionEpochState>, now: number, c: SessionEpochConstants): void;
21
+ /** Shared (per resolved path) store, loaded once from disk. */
22
+ export declare function sharedEpochStore(file: string, now: number, c: SessionEpochConstants): Record<string, SessionEpochState>;
23
+ /** Test helper: forget shared stores (forces a fresh disk load). */
24
+ export declare function clearSharedEpochStores(): void;
25
+ /** Get-or-create the tracked entry for `session` in a store. */
26
+ export declare function epochEntry(store: Record<string, SessionEpochState>, session: string, now: number): SessionEpochState;
27
+ export { STATE_KEYS };
28
+ //# sourceMappingURL=epoch-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epoch-store.d.ts","sourceRoot":"","sources":["../../../runtimes/claude/epoch-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,QAAA,MAAM,UAAU,kKAeN,CAAC;AAcX,yEAAyE;AACzE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,MAAM,EACX,CAAC,EAAE,qBAAqB,GACvB,iBAAiB,GAAG,IAAI,CA2D1B;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,CAAC,EAAE,qBAAqB,GACvB,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAcnC;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACxC,GAAG,EAAE,MAAM,EACX,CAAC,EAAE,qBAAqB,GACvB,IAAI,CA4BN;AASD,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,CAAC,EAAE,qBAAqB,GACvB,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAQnC;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED,gEAAgE;AAChE,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACxC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,iBAAiB,CAOnB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+ /**
3
+ * Sidecar persistence for session epoch state (reference parity with
4
+ * opencode.py `_epoch_load` / `_epoch_write_snapshot`).
5
+ *
6
+ * Strict shape validation: any entry that is not a well-formed state
7
+ * with ints >= 0, a `lastSeen` within [0, now] and inside the TTL, a
8
+ * list-of-strings `seen`, and a string-or-null `streakHead` is skipped —
9
+ * a predating/hand-edited file must never wipe an established epoch
10
+ * into bare reuse. Missing/corrupt files start empty. All IO is
11
+ * best-effort and never throws into the request path; writes go through
12
+ * a temp file + rename so a torn read is impossible.
13
+ */
14
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.STATE_KEYS = void 0;
19
+ exports.validateEpochEntry = validateEpochEntry;
20
+ exports.readEpochStore = readEpochStore;
21
+ exports.writeEpochStore = writeEpochStore;
22
+ exports.sharedEpochStore = sharedEpochStore;
23
+ exports.clearSharedEpochStores = clearSharedEpochStores;
24
+ exports.epochEntry = epochEntry;
25
+ const node_crypto_1 = require("node:crypto");
26
+ const node_fs_1 = __importDefault(require("node:fs"));
27
+ const node_path_1 = __importDefault(require("node:path"));
28
+ const session_epoch_1 = require("./session-epoch");
29
+ const STATE_KEYS = [
30
+ 'epoch',
31
+ 'rot',
32
+ 'max',
33
+ 'calm',
34
+ 'seen',
35
+ 'cooldown',
36
+ 'lastSeen',
37
+ 'rebaseSize',
38
+ 'rebaseHits',
39
+ 'streak',
40
+ 'prevIn',
41
+ 'prevCached',
42
+ 'prevSize',
43
+ 'streakHead',
44
+ ];
45
+ exports.STATE_KEYS = STATE_KEYS;
46
+ function nonNegativeInt(value) {
47
+ if (typeof value === 'boolean' || typeof value !== 'number')
48
+ return null;
49
+ if (!Number.isFinite(value) || value < 0)
50
+ return null;
51
+ return Math.trunc(value);
52
+ }
53
+ function nullableNonNegativeInt(value) {
54
+ if (value === null || value === undefined)
55
+ return null;
56
+ const n = nonNegativeInt(value);
57
+ return n === null ? undefined : n;
58
+ }
59
+ /** Validate one raw entry; returns a normalized state or null (skip). */
60
+ function validateEpochEntry(raw, now, c) {
61
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
62
+ return null;
63
+ const r = raw;
64
+ const epoch = nonNegativeInt(r['epoch'] ?? 0);
65
+ const rot = nonNegativeInt(r['rot'] ?? 0);
66
+ const max = nonNegativeInt(r['max'] ?? 0);
67
+ const calm = nonNegativeInt(r['calm'] ?? 0);
68
+ const cooldown = nonNegativeInt(r['cooldown'] ?? 0);
69
+ const rebaseSize = nonNegativeInt(r['rebaseSize'] ?? 0);
70
+ const rebaseHits = nonNegativeInt(r['rebaseHits'] ?? 0);
71
+ const streak = nonNegativeInt(r['streak'] ?? 0);
72
+ if (epoch === null ||
73
+ rot === null ||
74
+ max === null ||
75
+ calm === null ||
76
+ cooldown === null ||
77
+ rebaseSize === null ||
78
+ rebaseHits === null ||
79
+ streak === null) {
80
+ return null;
81
+ }
82
+ const lastSeen = r['lastSeen'];
83
+ if (typeof lastSeen !== 'number' || !Number.isFinite(lastSeen))
84
+ return null;
85
+ if (lastSeen < 0 || lastSeen > now || now - lastSeen > c.ttlMs)
86
+ return null;
87
+ const prevIn = nullableNonNegativeInt(r['prevIn']);
88
+ const prevCached = nullableNonNegativeInt(r['prevCached']);
89
+ const prevSize = nullableNonNegativeInt(r['prevSize']);
90
+ if (prevIn === undefined || prevCached === undefined || prevSize === undefined)
91
+ return null;
92
+ const streakHead = r['streakHead'];
93
+ if (streakHead !== null && streakHead !== undefined && typeof streakHead !== 'string')
94
+ return null;
95
+ const seenRaw = r['seen'];
96
+ // Keep the NEWEST hashes (matching the in-memory trim in trackLocked;
97
+ // the reference's load path keeps the oldest, conflicting with its own
98
+ // runtime behavior — we keep the run-relevant suffix instead).
99
+ const seen = Array.isArray(seenRaw)
100
+ ? seenRaw.filter((h) => typeof h === 'string').slice(-c.seenMax)
101
+ : [];
102
+ return {
103
+ epoch,
104
+ rot,
105
+ max,
106
+ calm,
107
+ seen,
108
+ cooldown,
109
+ lastSeen,
110
+ rebaseSize,
111
+ rebaseHits,
112
+ streak,
113
+ prevIn,
114
+ prevCached,
115
+ prevSize,
116
+ streakHead: typeof streakHead === 'string' ? streakHead : null,
117
+ };
118
+ }
119
+ /** Read + validate + TTL-GC a sidecar. Missing/corrupt → empty map. */
120
+ function readEpochStore(file, now, c) {
121
+ const out = {};
122
+ try {
123
+ const parsed = JSON.parse(node_fs_1.default.readFileSync(file, 'utf8'));
124
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
125
+ return out;
126
+ for (const [session, raw] of Object.entries(parsed)) {
127
+ if (!session)
128
+ continue;
129
+ const state = validateEpochEntry(raw, now, c);
130
+ if (state)
131
+ out[session] = state;
132
+ }
133
+ }
134
+ catch {
135
+ /* missing/corrupt starts empty */
136
+ }
137
+ return out;
138
+ }
139
+ /** TTL-GC + atomic write (temp file + rename). Never throws. */
140
+ function writeEpochStore(file, store, now, c) {
141
+ try {
142
+ const data = {};
143
+ for (const [session, st] of Object.entries(store)) {
144
+ if (now - st.lastSeen > c.ttlMs) {
145
+ // Python parity: TTL-GC evicts stale sessions from the live map
146
+ // on the write path, so a session idle beyond the TTL restarts
147
+ // at -e0 instead of resurrecting its old era from the sidecar.
148
+ delete store[session];
149
+ continue;
150
+ }
151
+ data[session] = st;
152
+ }
153
+ const dir = node_path_1.default.dirname(file);
154
+ try {
155
+ node_fs_1.default.mkdirSync(dir, { recursive: true });
156
+ }
157
+ catch {
158
+ /* best effort */
159
+ }
160
+ // A shared fixed temp name lets two processes share one sidecar file
161
+ // interleave: one renames the other's half-written file into place. The
162
+ // pid + random suffix keeps each writer's temp file its own.
163
+ const tmp = `${file}.${process.pid}.${(0, node_crypto_1.randomBytes)(6).toString('hex')}.tmp`;
164
+ node_fs_1.default.writeFileSync(tmp, JSON.stringify(data), 'utf8');
165
+ node_fs_1.default.renameSync(tmp, file);
166
+ }
167
+ catch {
168
+ /* persistence is best effort; the in-memory ratchet rebuilds */
169
+ }
170
+ }
171
+ // ── Shared in-process stores ─────────────────────────────────────────
172
+ // One bridge per Claude session: several bridges in one process may
173
+ // share a sidecar file, so their in-memory copies must be the same
174
+ // object or a write from one would clobber the other's keys.
175
+ const sharedStores = new Map();
176
+ /** Shared (per resolved path) store, loaded once from disk. */
177
+ function sharedEpochStore(file, now, c) {
178
+ const key = node_path_1.default.resolve(file);
179
+ let store = sharedStores.get(key);
180
+ if (!store) {
181
+ store = readEpochStore(key, now, c);
182
+ sharedStores.set(key, store);
183
+ }
184
+ return store;
185
+ }
186
+ /** Test helper: forget shared stores (forces a fresh disk load). */
187
+ function clearSharedEpochStores() {
188
+ sharedStores.clear();
189
+ }
190
+ /** Get-or-create the tracked entry for `session` in a store. */
191
+ function epochEntry(store, session, now) {
192
+ let state = store[session];
193
+ if (!state) {
194
+ state = (0, session_epoch_1.initialEpochState)(now);
195
+ store[session] = state;
196
+ }
197
+ return state;
198
+ }
199
+ //# sourceMappingURL=epoch-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epoch-store.js","sourceRoot":"","sources":["../../../runtimes/claude/epoch-store.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;AAyCH,gDA+DC;AAGD,wCAkBC;AAGD,0CAiCC;AAUD,4CAYC;AAGD,wDAEC;AAGD,gCAWC;AAxMD,6CAA0C;AAC1C,sDAAyB;AACzB,0DAA6B;AAC7B,mDAIyB;AAEzB,MAAM,UAAU,GAAG;IACjB,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AAkLF,gCAAU;AAhLnB,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAc;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAA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AAG,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACpC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,oEAAoE;AACpE,SAAgB,sBAAsB;IACpC,YAAY,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC;AAED,gEAAgE;AAChE,SAAgB,UAAU,CACxB,KAAwC,EACxC,OAAe,EACf,GAAW;IAEX,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,IAAA,iCAAiB,EAAC,GAAG,CAAC,CAAC;QAC/B,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { AgentRuntime, AgentSession, SessionConfig, SessionCreationOptions, RuntimeCapabilities } from '../../src/types';
2
+ import type { ClaudeRuntimeOptions } from './claude-runtime';
3
+ export declare class FallbackRuntime implements AgentRuntime {
4
+ readonly name = "fallback";
5
+ private copilot;
6
+ private claude;
7
+ private active;
8
+ constructor(copilot: AgentRuntime | null, claudeOptions?: ClaudeRuntimeOptions);
9
+ isAvailable(): Promise<boolean>;
10
+ get capabilities(): RuntimeCapabilities | undefined;
11
+ createSession(config: SessionConfig, options?: SessionCreationOptions): Promise<AgentSession>;
12
+ }
13
+ export declare function createFallbackRuntime(copilot: AgentRuntime | null, claudeOptions?: ClaudeRuntimeOptions): AgentRuntime;
14
+ //# sourceMappingURL=fallback-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fallback-runtime.d.ts","sourceRoot":"","sources":["../../../runtimes/claude/fallback-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE9H,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,qBAAa,eAAgB,YAAW,YAAY;IAClD,QAAQ,CAAC,IAAI,cAAc;IAC3B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAA6B;gBAE/B,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAE,oBAAyB;IAK5E,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,IAAI,YAAY,IAAI,mBAAmB,GAAG,SAAS,CAkBlD;IAEK,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC;CAiBpG;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,GAAE,oBAAyB,GAAG,YAAY,CAE1H"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FallbackRuntime = void 0;
4
+ exports.createFallbackRuntime = createFallbackRuntime;
5
+ const claude_runtime_1 = require("./claude-runtime");
6
+ class FallbackRuntime {
7
+ name = 'fallback';
8
+ copilot;
9
+ claude;
10
+ active = null;
11
+ constructor(copilot, claudeOptions = {}) {
12
+ this.copilot = copilot;
13
+ this.claude = new claude_runtime_1.ClaudeAgentRuntime(claudeOptions);
14
+ }
15
+ async isAvailable() {
16
+ if (this.copilot && (await this.copilot.isAvailable()))
17
+ return true;
18
+ return this.claude.isAvailable();
19
+ }
20
+ get capabilities() {
21
+ const claude = this.claude.capabilities;
22
+ if (this.copilot === null)
23
+ return claude;
24
+ const copilot = this.copilot.capabilities;
25
+ // Either runtime may serve the next session, so advertise only what both
26
+ // guarantee. A Copilot runtime that claims nothing makes its guarantees
27
+ // unknown: repeating the required mode-verification flags on its behalf
28
+ // would let a caller require enforcement that may not exist. Claude's
29
+ // capabilities are all it has, and the fallback never exceeds them.
30
+ if (copilot === undefined || claude === undefined)
31
+ return undefined;
32
+ // Recovery is opt-in per turn: it is safe to promise only when both
33
+ // runtimes can actually resume a failed turn in its persisted session.
34
+ const recovery = copilot.sessionRecovery === true && claude.sessionRecovery === true;
35
+ return {
36
+ readOnlyPermissions: true,
37
+ requiredModeVerification: true,
38
+ ...(recovery ? { sessionRecovery: true } : {}),
39
+ };
40
+ }
41
+ async createSession(config, options) {
42
+ if (this.copilot) {
43
+ try {
44
+ if (await this.copilot.isAvailable()) {
45
+ this.active = this.copilot;
46
+ return await this.copilot.createSession(config, options);
47
+ }
48
+ }
49
+ catch {
50
+ // fall through
51
+ }
52
+ }
53
+ this.active = this.claude;
54
+ // Transparency event via logger? Emit through session not available yet; log to stderr.
55
+ // eslint-disable-next-line no-console
56
+ console.warn('[condukt] Copilot unavailable; falling back to Claude runtime');
57
+ return this.claude.createSession(config, options);
58
+ }
59
+ }
60
+ exports.FallbackRuntime = FallbackRuntime;
61
+ function createFallbackRuntime(copilot, claudeOptions = {}) {
62
+ return new FallbackRuntime(copilot, claudeOptions);
63
+ }
64
+ //# sourceMappingURL=fallback-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fallback-runtime.js","sourceRoot":"","sources":["../../../runtimes/claude/fallback-runtime.ts"],"names":[],"mappings":";;;AA2DA,sDAEC;AA5DD,qDAAsD;AAGtD,MAAa,eAAe;IACjB,IAAI,GAAG,UAAU,CAAC;IACnB,OAAO,CAAsB;IAC7B,MAAM,CAAe;IACrB,MAAM,GAAwB,IAAI,CAAC;IAE3C,YAAY,OAA4B,EAAE,gBAAsC,EAAE;QAChF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,mCAAkB,CA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D,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,eAAe;YACjB,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,wFAAwF;QACxF,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;QAC9E,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AArDD,0CAqDC;AAED,SAAgB,qBAAqB,CAAC,OAA4B,EAAE,gBAAsC,EAAE;IAC1G,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,24 @@
1
+ export { ClaudeAgentRuntime, createClaudeRuntime } from './claude-runtime';
2
+ export type { ClaudeRuntimeOptions } from './claude-runtime';
3
+ export { ClaudeAgentSession } from './claude-session';
4
+ export type { ClaudeQueryHandle, ClaudeSessionDeps } from './claude-session';
5
+ export { FallbackRuntime, createFallbackRuntime } from './fallback-runtime';
6
+ export { mapSdkMessage, createMapState } from './message-mapper';
7
+ export type { ClaudeApiRetryInfo, ClaudeCompactionInfo, ClaudeInitInfo, ClaudeResultOutcome, ClaudeSessionEmitter, MapOptions, MapState, } from './message-mapper';
8
+ export { ModelUsageLedger } from './usage-ledger';
9
+ export type { ClaudeUsageRecord, ModelUsageObservation, TokenCounts } from './usage-ledger';
10
+ export { CONTINUATION_PROMPT, ClaudeConfigurationError, ClaudeResumeAttemptError, ClaudeStreamEndedError, classifyClaudeFailure, failureFromOutcome, outcomeIsFailure, toResumeAttemptError, } from './session-recovery';
11
+ export type { ClaudeFailureClassification, ClaudeFailureSignals, ClaudeRecoveryStage } from './session-recovery';
12
+ export { mapConfig, mapPermissionMode, isSafeMode } from './config-mapper';
13
+ export type { ClaudeConfigMapping, ClaudeConfigMapOptions } from './config-mapper';
14
+ export { runOneShot, buildAdvisorStandInServer } from './one-shot';
15
+ export { createBridge, buildBridgeEnv, timeoutSignal } from './protocol-bridge';
16
+ export type { BridgeConfig, BridgeHandle, BridgeMetrics, BridgeRuntimeConfig } from './protocol-bridge';
17
+ export * from './bridge-cache';
18
+ export * from './session-epoch';
19
+ export * from './epoch-store';
20
+ export * from './protocol-router';
21
+ export * from './translate-chat';
22
+ export * from './translate-responses';
23
+ export { sseFrame, createLineReader, parseDataLine } from './sse';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../runtimes/claude/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3E,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxG,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.parseDataLine = exports.createLineReader = exports.sseFrame = exports.timeoutSignal = exports.buildBridgeEnv = exports.createBridge = exports.buildAdvisorStandInServer = exports.runOneShot = exports.isSafeMode = exports.mapPermissionMode = exports.mapConfig = exports.toResumeAttemptError = exports.outcomeIsFailure = exports.failureFromOutcome = exports.classifyClaudeFailure = exports.ClaudeStreamEndedError = exports.ClaudeResumeAttemptError = exports.ClaudeConfigurationError = exports.CONTINUATION_PROMPT = exports.ModelUsageLedger = exports.createMapState = exports.mapSdkMessage = exports.createFallbackRuntime = exports.FallbackRuntime = exports.ClaudeAgentSession = exports.createClaudeRuntime = exports.ClaudeAgentRuntime = void 0;
18
+ var claude_runtime_1 = require("./claude-runtime");
19
+ Object.defineProperty(exports, "ClaudeAgentRuntime", { enumerable: true, get: function () { return claude_runtime_1.ClaudeAgentRuntime; } });
20
+ Object.defineProperty(exports, "createClaudeRuntime", { enumerable: true, get: function () { return claude_runtime_1.createClaudeRuntime; } });
21
+ var claude_session_1 = require("./claude-session");
22
+ Object.defineProperty(exports, "ClaudeAgentSession", { enumerable: true, get: function () { return claude_session_1.ClaudeAgentSession; } });
23
+ var fallback_runtime_1 = require("./fallback-runtime");
24
+ Object.defineProperty(exports, "FallbackRuntime", { enumerable: true, get: function () { return fallback_runtime_1.FallbackRuntime; } });
25
+ Object.defineProperty(exports, "createFallbackRuntime", { enumerable: true, get: function () { return fallback_runtime_1.createFallbackRuntime; } });
26
+ var message_mapper_1 = require("./message-mapper");
27
+ Object.defineProperty(exports, "mapSdkMessage", { enumerable: true, get: function () { return message_mapper_1.mapSdkMessage; } });
28
+ Object.defineProperty(exports, "createMapState", { enumerable: true, get: function () { return message_mapper_1.createMapState; } });
29
+ var usage_ledger_1 = require("./usage-ledger");
30
+ Object.defineProperty(exports, "ModelUsageLedger", { enumerable: true, get: function () { return usage_ledger_1.ModelUsageLedger; } });
31
+ var session_recovery_1 = require("./session-recovery");
32
+ Object.defineProperty(exports, "CONTINUATION_PROMPT", { enumerable: true, get: function () { return session_recovery_1.CONTINUATION_PROMPT; } });
33
+ Object.defineProperty(exports, "ClaudeConfigurationError", { enumerable: true, get: function () { return session_recovery_1.ClaudeConfigurationError; } });
34
+ Object.defineProperty(exports, "ClaudeResumeAttemptError", { enumerable: true, get: function () { return session_recovery_1.ClaudeResumeAttemptError; } });
35
+ Object.defineProperty(exports, "ClaudeStreamEndedError", { enumerable: true, get: function () { return session_recovery_1.ClaudeStreamEndedError; } });
36
+ Object.defineProperty(exports, "classifyClaudeFailure", { enumerable: true, get: function () { return session_recovery_1.classifyClaudeFailure; } });
37
+ Object.defineProperty(exports, "failureFromOutcome", { enumerable: true, get: function () { return session_recovery_1.failureFromOutcome; } });
38
+ Object.defineProperty(exports, "outcomeIsFailure", { enumerable: true, get: function () { return session_recovery_1.outcomeIsFailure; } });
39
+ Object.defineProperty(exports, "toResumeAttemptError", { enumerable: true, get: function () { return session_recovery_1.toResumeAttemptError; } });
40
+ var config_mapper_1 = require("./config-mapper");
41
+ Object.defineProperty(exports, "mapConfig", { enumerable: true, get: function () { return config_mapper_1.mapConfig; } });
42
+ Object.defineProperty(exports, "mapPermissionMode", { enumerable: true, get: function () { return config_mapper_1.mapPermissionMode; } });
43
+ Object.defineProperty(exports, "isSafeMode", { enumerable: true, get: function () { return config_mapper_1.isSafeMode; } });
44
+ var one_shot_1 = require("./one-shot");
45
+ Object.defineProperty(exports, "runOneShot", { enumerable: true, get: function () { return one_shot_1.runOneShot; } });
46
+ Object.defineProperty(exports, "buildAdvisorStandInServer", { enumerable: true, get: function () { return one_shot_1.buildAdvisorStandInServer; } });
47
+ var protocol_bridge_1 = require("./protocol-bridge");
48
+ Object.defineProperty(exports, "createBridge", { enumerable: true, get: function () { return protocol_bridge_1.createBridge; } });
49
+ Object.defineProperty(exports, "buildBridgeEnv", { enumerable: true, get: function () { return protocol_bridge_1.buildBridgeEnv; } });
50
+ Object.defineProperty(exports, "timeoutSignal", { enumerable: true, get: function () { return protocol_bridge_1.timeoutSignal; } });
51
+ __exportStar(require("./bridge-cache"), exports);
52
+ __exportStar(require("./session-epoch"), exports);
53
+ __exportStar(require("./epoch-store"), exports);
54
+ __exportStar(require("./protocol-router"), exports);
55
+ __exportStar(require("./translate-chat"), exports);
56
+ __exportStar(require("./translate-responses"), exports);
57
+ var sse_1 = require("./sse");
58
+ Object.defineProperty(exports, "sseFrame", { enumerable: true, get: function () { return sse_1.sseFrame; } });
59
+ Object.defineProperty(exports, "createLineReader", { enumerable: true, get: function () { return sse_1.createLineReader; } });
60
+ Object.defineProperty(exports, "parseDataLine", { enumerable: true, get: function () { return sse_1.parseDataLine; } });
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../runtimes/claude/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAA2E;AAAlE,oHAAA,kBAAkB,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAEhD,mDAAsD;AAA7C,oHAAA,kBAAkB,OAAA;AAE3B,uDAA4E;AAAnE,mHAAA,eAAe,OAAA;AAAE,yHAAA,qBAAqB,OAAA;AAC/C,mDAAiE;AAAxD,+GAAA,aAAa,OAAA;AAAE,gHAAA,cAAc,OAAA;AAUtC,+CAAkD;AAAzC,gHAAA,gBAAgB,OAAA;AAEzB,uDAS4B;AAR1B,uHAAA,mBAAmB,OAAA;AACnB,4HAAA,wBAAwB,OAAA;AACxB,4HAAA,wBAAwB,OAAA;AACxB,0HAAA,sBAAsB,OAAA;AACtB,yHAAA,qBAAqB,OAAA;AACrB,sHAAA,kBAAkB,OAAA;AAClB,oHAAA,gBAAgB,OAAA;AAChB,wHAAA,oBAAoB,OAAA;AAGtB,iDAA2E;AAAlE,0GAAA,SAAS,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAAE,2GAAA,UAAU,OAAA;AAEjD,uCAAmE;AAA1D,sGAAA,UAAU,OAAA;AAAE,qHAAA,yBAAyB,OAAA;AAC9C,qDAAgF;AAAvE,+GAAA,YAAY,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,gHAAA,aAAa,OAAA;AAEpD,iDAA+B;AAC/B,kDAAgC;AAChC,gDAA8B;AAC9B,oDAAkC;AAClC,mDAAiC;AACjC,wDAAsC;AACtC,6BAAkE;AAAzD,+FAAA,QAAQ,OAAA;AAAE,uGAAA,gBAAgB,OAAA;AAAE,oGAAA,aAAa,OAAA"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Pure mapping from Claude Agent SDK messages to condukt AgentSession events.
3
+ *
4
+ * The SDK and condukt describe the same stream differently:
5
+ *
6
+ * - Assistant frames carry `parent_tool_use_id`, so subagent tool calls and
7
+ * text can be nested in the UI exactly like the Copilot runtime.
8
+ * - `assistant.message.usage` is a non-final, per-block snapshot. It is used
9
+ * only to estimate the current context size; token accounting comes from
10
+ * `result.modelUsage` (see `usage-ledger.ts`).
11
+ * - `result.subtype === 'success'` is not proof of success: `is_error` can be
12
+ * set on a transient API failure. The mapper reports a `ResultOutcome` and
13
+ * leaves idle/error/recovery to the session.
14
+ * - There is no `task_completed` system subtype; `task_notification` ends a
15
+ * subagent task.
16
+ */
17
+ import type { SDKMessage } from '@anthropic-ai/claude-agent-sdk';
18
+ import type { ToolUsageData } from '../../src/types';
19
+ import { ModelUsageLedger } from './usage-ledger';
20
+ export interface ClaudeSessionEmitter {
21
+ text(text: string, parentToolCallId?: string): void;
22
+ reasoning(text: string): void;
23
+ toolStart(tool: string, input: string, args: Record<string, unknown>, callId?: string, parentToolCallId?: string): void;
24
+ toolComplete(tool: string, output: string, callId?: string, parentToolCallId?: string): void;
25
+ /** Rich (non-text) tool result blocks, rendered by the UI. */
26
+ toolCompleteRich(tool: string, contents: ReadonlyArray<Record<string, unknown>>, callId?: string): void;
27
+ toolOutput(tool: string, output: string, parentToolCallId?: string): void;
28
+ idle(): void;
29
+ error(err: Error): void;
30
+ usage(data: Record<string, unknown>): void;
31
+ compaction(phase: 'start' | 'complete', summary?: string): void;
32
+ subagentStart(name: string, data: Record<string, unknown>): void;
33
+ subagentEnd(name: string, data: Record<string, unknown>): void;
34
+ permission(data: Record<string, unknown>): void;
35
+ toolUsage(data: ToolUsageData): void;
36
+ }
37
+ /** Session configuration read back from the `init` system message. */
38
+ export interface ClaudeInitInfo {
39
+ readonly permissionMode: string;
40
+ readonly tools: readonly string[];
41
+ readonly agents: readonly string[];
42
+ readonly model: string;
43
+ readonly cwd: string;
44
+ }
45
+ /** SDK-native retry notification (`system` / `api_retry`). */
46
+ export interface ClaudeApiRetryInfo {
47
+ readonly attempt: number;
48
+ readonly maxRetries: number;
49
+ readonly delayMs: number;
50
+ readonly status: number | null;
51
+ readonly error: string;
52
+ readonly noResponse: boolean;
53
+ }
54
+ /** Metadata attached to a completed compaction boundary. */
55
+ export interface ClaudeCompactionInfo {
56
+ readonly trigger: 'manual' | 'auto';
57
+ readonly preTokens: number;
58
+ readonly postTokens?: number;
59
+ readonly durationMs?: number;
60
+ }
61
+ /**
62
+ * What a `result` message reported. The session decides whether this is a
63
+ * clean finish, a recoverable failure, or a terminal one.
64
+ */
65
+ export interface ClaudeResultOutcome {
66
+ readonly subtype: string;
67
+ /** `is_error` on a `success` result means a transient API failure. */
68
+ readonly isError: boolean;
69
+ readonly apiErrorStatus?: number | null;
70
+ readonly errors: readonly string[];
71
+ readonly terminalReason?: string;
72
+ readonly startupFailureReason?: string;
73
+ readonly resumeReason?: string;
74
+ readonly stopReason: string | null;
75
+ readonly numTurns: number;
76
+ readonly durationMs: number;
77
+ }
78
+ /** Caller-supplied classification hints collected while streaming. */
79
+ export interface MapOptions {
80
+ readonly includePartialMessages: boolean;
81
+ /**
82
+ * Session-lifetime usage ledger. When omitted, the mapper keeps one on the
83
+ * per-turn `MapState` (handy for unit tests, wrong across turns).
84
+ */
85
+ readonly ledger?: ModelUsageLedger;
86
+ /** Whether this turn continues an existing session (`resume` was passed). */
87
+ readonly resumed?: boolean;
88
+ /** Model from SessionConfig, for main-loop usage attribution. */
89
+ readonly fallbackModel?: string;
90
+ /** `system` / `init`: the actual permission mode and tool set. */
91
+ readonly onInit?: (info: ClaudeInitInfo) => void;
92
+ /** Terminal result; when absent the mapper falls back to idle/error. */
93
+ readonly onResult?: (outcome: ClaudeResultOutcome) => void;
94
+ /** `assistant.error` on a frame (classification hint). */
95
+ readonly onAssistantError?: (error: string) => void;
96
+ /** `system` / `api_retry`: the SDK is already retrying natively. */
97
+ readonly onApiRetry?: (info: ClaudeApiRetryInfo) => void;
98
+ /** A compaction completed (boundary or status success), once per event. */
99
+ readonly onCompaction?: (info?: ClaudeCompactionInfo) => void;
100
+ /** A compaction failed; no completion event follows. */
101
+ readonly onCompactionFailed?: (error?: string) => void;
102
+ /** Latest assistant frame's prompt size (input + cache reads/writes). */
103
+ readonly onAssistantUsage?: (contextTokens: number, outputTokens: number) => void;
104
+ /** Abort state, so crash-shaped frames do not look like fresh failures. */
105
+ readonly isAborted?: () => boolean;
106
+ }
107
+ export interface MapState {
108
+ /** True once a streamed delta was seen; complete frames are then echoes. */
109
+ sawPartial: boolean;
110
+ /** Maps tool call id -> tool name for attributing tool_complete events. */
111
+ toolNames: Map<string, string>;
112
+ /** In-flight tool blocks during streaming, keyed by parent + block index. */
113
+ toolBlocks: Map<string, {
114
+ name: string;
115
+ id?: string;
116
+ buffer: string;
117
+ parentToolCallId?: string;
118
+ }>;
119
+ /** Maps task id -> display name for subagent_start / subagent_end pairing. */
120
+ subagentNames: Map<string, string>;
121
+ /** Model of the latest assistant frame (main-loop usage attribution). */
122
+ lastModel?: string;
123
+ /** Prompt size of the latest assistant frame, in tokens. */
124
+ lastCallContextTokens: number;
125
+ /** A compaction is running; suppresses duplicate `start` markers. */
126
+ compactionInFlight: boolean;
127
+ /** The current compaction already reported completion (status vs boundary). */
128
+ compactionCompleted: boolean;
129
+ /** Per-turn ledger fallback when MapOptions.ledger is not supplied. */
130
+ ledger?: ModelUsageLedger;
131
+ }
132
+ export declare function createMapState(): MapState;
133
+ export declare function mapSdkMessage(msg: SDKMessage, emitter: ClaudeSessionEmitter, state: MapState, options: MapOptions): boolean;
134
+ export type { ToolUsageData } from '../../src/types';
135
+ //# sourceMappingURL=message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