claude-code-jsonl-parser 0.1.4-beta.3 → 0.1.4-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,14 +1,30 @@
1
1
  /**
2
- * Claude Code JSONL の各エントリ型定義。
3
- * 形状の根拠は実サンプルコーパスの調査結果。
2
+ * claude-code-jsonl-parser: type-safe parser for Claude Code JSONL conversation logs.
4
3
  *
5
- * claude-code-jsonl-generator でコーパスから再生成できるが、
6
- * content-block guards / message shapes は手動でキュレーションしているため、
7
- * 生成結果をそのまま上書きするのではなく差分を確認して反映すること。
4
+ * @example
5
+ * ```ts
6
+ * import { parseJsonlFile } from 'claude-code-jsonl-parser'
7
+ *
8
+ * const result = await parseJsonlFile('/path/to/session.jsonl')
9
+ * if (result.isOk) {
10
+ * for (const line of result.value) {
11
+ * if (line._kind === 'known' && line.type === 'assistant') {
12
+ * console.log(line.message.content)
13
+ * }
14
+ * }
15
+ * }
16
+ * ```
17
+ */
18
+ /**
19
+ * Type definitions of the Claude Code JSONL entries.
20
+ *
21
+ * This file is maintained by hand.
22
+ * claude-code-jsonl-generator emits `types.generated.ts` for a corpus; diff that output against this file and merge intentionally.
23
+ * Content blocks and message shapes are curated by hand, so never overwrite them wholesale.
8
24
  */
9
- /** parser が付与する内部判別子。`type` フィールドとは別。 */
25
+ /** Internal discriminator added by the parser. Separate from the `type` field. */
10
26
  type ParsedKind = 'known' | 'unknown' | 'error';
11
- /** assistant / user / attachment / system が共有する必須メタデータ。 */
27
+ /** Required metadata shared by assistant / user / attachment / system. */
12
28
  interface EntryBase {
13
29
  cwd: string;
14
30
  entrypoint: string;
@@ -20,7 +36,7 @@ interface EntryBase {
20
36
  userType: string;
21
37
  uuid: string;
22
38
  version: string;
23
- /** サイドチェーン/サブエージェント関連の任意フィールド群 (観測されたもの) */
39
+ /** Optional sidechain / sub-agent related fields (as observed) */
24
40
  agentId?: string;
25
41
  agentName?: string;
26
42
  teamName?: string;
@@ -28,7 +44,7 @@ interface EntryBase {
28
44
  sessionKind?: string;
29
45
  session_id?: string;
30
46
  }
31
- /** `type: "assistant"` — アシスタント応答 (Anthropic API メッセージを内包)。 */
47
+ /** `type: "assistant"`: assistant response (wraps an Anthropic API message). */
32
48
  interface AssistantEntry extends EntryBase {
33
49
  _kind: 'known';
34
50
  type: 'assistant';
@@ -43,13 +59,13 @@ interface AssistantEntry extends EntryBase {
43
59
  attributionMcpServer?: string;
44
60
  attributionMcpTool?: string;
45
61
  }
46
- /** `user.origin` — 発生元の種別と付随情報。 */
62
+ /** `user.origin`: kind of origin and accompanying information. */
47
63
  interface UserOrigin {
48
64
  kind: string;
49
65
  from?: string;
50
66
  senderTaskId?: string;
51
67
  }
52
- /** `type: "user"` — ユーザ入力 / ツール結果を内包。 */
68
+ /** `type: "user"`: wraps user input / tool results. */
53
69
  interface UserEntry extends EntryBase {
54
70
  _kind: 'known';
55
71
  type: 'user';
@@ -71,13 +87,13 @@ interface UserEntry extends EntryBase {
71
87
  toolDenialKind?: string;
72
88
  toolEndsTurn?: boolean;
73
89
  }
74
- /** `type: "attachment"` — 添付データ。 */
90
+ /** `type: "attachment"`: attached data. */
75
91
  interface AttachmentEntry extends EntryBase {
76
92
  _kind: 'known';
77
93
  type: 'attachment';
78
94
  attachment: Record<string, unknown>;
79
95
  }
80
- /** `type: "system"` — システムイベント (subtype で細分化)。 */
96
+ /** `type: "system"`: system event (refined by `subtype`). */
81
97
  interface SystemEntry extends EntryBase {
82
98
  _kind: 'known';
83
99
  type: 'system';
@@ -132,7 +148,7 @@ interface AgentNameEntry {
132
148
  agentName: string;
133
149
  sessionId: string;
134
150
  }
135
- /** `type: "agent-setting"` — `agentSetting` は文字列。 */
151
+ /** `type: "agent-setting"`: `agentSetting` is a string. */
136
152
  interface AgentSettingEntry {
137
153
  _kind: 'known';
138
154
  type: 'agent-setting';
@@ -146,7 +162,7 @@ interface RelocatedEntry {
146
162
  relocatedCwd: string;
147
163
  sessionId: string;
148
164
  }
149
- /** `type: "last-prompt"` — `lastPrompt` は任意。 */
165
+ /** `type: "last-prompt"`: `lastPrompt` is optional. */
150
166
  interface LastPromptEntry {
151
167
  _kind: 'known';
152
168
  type: 'last-prompt';
@@ -154,7 +170,7 @@ interface LastPromptEntry {
154
170
  sessionId: string;
155
171
  lastPrompt?: string;
156
172
  }
157
- /** `type: "worktree-state"` — `worktreeSession` は object または null。 */
173
+ /** `type: "worktree-state"`: `worktreeSession` is an object or null. */
158
174
  interface WorktreeStateEntry {
159
175
  _kind: 'known';
160
176
  type: 'worktree-state';
@@ -169,7 +185,7 @@ interface BridgeSessionEntry {
169
185
  lastSequenceNum: number;
170
186
  sessionId: string;
171
187
  }
172
- /** `type: "queue-operation"` — `content` は任意。 */
188
+ /** `type: "queue-operation"`: `content` is optional. */
173
189
  interface QueueOperationEntry {
174
190
  _kind: 'known';
175
191
  type: 'queue-operation';
@@ -197,7 +213,7 @@ interface FrameLinkEntry {
197
213
  sessionId: string;
198
214
  timestamp: string;
199
215
  }
200
- /** `type: "file-history-snapshot"` — sessionId を持たない。 */
216
+ /** `type: "file-history-snapshot"`: has no sessionId. */
201
217
  interface FileHistorySnapshotEntry {
202
218
  _kind: 'known';
203
219
  type: 'file-history-snapshot';
@@ -205,14 +221,14 @@ interface FileHistorySnapshotEntry {
205
221
  messageId: string;
206
222
  snapshot: Record<string, unknown>;
207
223
  }
208
- /** `type: "started"` — workflow journal 由来。sessionId を持たない。 */
224
+ /** `type: "started"`: comes from the workflow journal. Has no sessionId. */
209
225
  interface StartedEntry {
210
226
  _kind: 'known';
211
227
  type: 'started';
212
228
  key: string;
213
229
  agentId: string;
214
230
  }
215
- /** `type: "result"` — workflow journal 由来。`result` は任意形状。 */
231
+ /** `type: "result"`: comes from the workflow journal. `result` has an arbitrary shape. */
216
232
  interface ResultEntry {
217
233
  _kind: 'known';
218
234
  type: 'result';
@@ -220,26 +236,26 @@ interface ResultEntry {
220
236
  agentId: string;
221
237
  result: unknown;
222
238
  }
223
- /** 既知 type のエントリ全種。 */
239
+ /** All entries of known types. */
224
240
  type KnownEntry = AssistantEntry | UserEntry | AttachmentEntry | SystemEntry | ModeEntry | PermissionModeEntry | AiTitleEntry | AgentNameEntry | AgentSettingEntry | RelocatedEntry | LastPromptEntry | WorktreeStateEntry | BridgeSessionEntry | QueueOperationEntry | PrLinkEntry | FrameLinkEntry | FileHistorySnapshotEntry | StartedEntry | ResultEntry;
225
- /** type 不明、または既知 type だが shape 不一致だった行。生の JSON を保持。 */
241
+ /** A line with an unknown type, or a known type whose shape did not match. Keeps the raw JSON. */
226
242
  interface UnknownEntry {
227
243
  _kind: 'unknown';
228
244
  lineNumber: number;
229
245
  raw: unknown;
230
- /** ガードが存在する既知 type だが shape 不一致だった場合の type 値。存在しない type なら undefined。 */
246
+ /** The type value when a guard exists for it but the shape did not match. `undefined` for an unknown type. */
231
247
  typeHint?: string;
232
- /** `typeHint` がある場合、どのフィールドが原因で shape 不一致になったかの診断メッセージ。 */
248
+ /** When `typeHint` is set, a diagnostic message naming the fields that caused the mismatch. */
233
249
  reason?: string;
234
250
  }
235
- /** JSON 構文エラー行。 */
251
+ /** A line with a JSON syntax error. */
236
252
  interface LineParseError {
237
253
  _kind: 'error';
238
254
  lineNumber: number;
239
255
  rawLine: string;
240
256
  message: string;
241
257
  }
242
- /** パース結果 1 行分。 */
258
+ /** Parse result of one line. */
243
259
  type ParsedLine = KnownEntry | UnknownEntry | LineParseError;
244
260
  /** `{ type: "text", text }`。 */
245
261
  interface TextBlock {
@@ -263,7 +279,7 @@ interface ToolUseBlock {
263
279
  input: unknown;
264
280
  caller?: unknown;
265
281
  }
266
- /** tool_result 内 `{ type: "image", source }`。 */
282
+ /** `{ type: "image", source }` inside a tool_result. */
267
283
  interface ImageBlock {
268
284
  _kind: 'known';
269
285
  type: 'image';
@@ -273,13 +289,13 @@ interface ImageBlock {
273
289
  data: string;
274
290
  };
275
291
  }
276
- /** tool_result 内 `{ type: "tool_reference", tool_name }`。 */
292
+ /** `{ type: "tool_reference", tool_name }` inside a tool_result. */
277
293
  interface ToolReferenceBlock {
278
294
  _kind: 'known';
279
295
  type: 'tool_reference';
280
296
  tool_name: string;
281
297
  }
282
- /** tool_result の content 配列要素 union。 */
298
+ /** Union of the elements of a tool_result content array. */
283
299
  type ToolResultContentBlock = TextBlock | ImageBlock | ToolReferenceBlock | UnknownContentBlock;
284
300
  /** `{ type: "tool_result", tool_use_id, content, is_error? }`。 */
285
301
  interface ToolResultBlock {
@@ -290,20 +306,20 @@ interface ToolResultBlock {
290
306
  is_error?: boolean;
291
307
  }
292
308
  /**
293
- * content ブロックがどの既知形状にも一致しなかった場合の部分フォールバック。
294
- * `_kind` は既知ブロック側と同じ判別子で、まずこれを見て `'unknown'` かどうかを
295
- * 判定すれば、既知ブロック側は安全に `.type` で絞り込める
296
- * (例: `if (block._kind === 'unknown') {...} else if (block.type === 'text') {...}`)。
309
+ * Partial fallback for a content block that matches no known shape.
310
+ * `_kind` is the same discriminator as on known blocks: check it for `'unknown'`
311
+ * first, and the known side can then be narrowed safely with `.type`
312
+ * (e.g. `if (block._kind === 'unknown') {...} else if (block.type === 'text') {...}`).
297
313
  */
298
314
  interface UnknownContentBlock {
299
315
  _kind: 'unknown';
300
316
  raw: unknown;
301
317
  }
302
- /** assistant `message.content[]` の要素 union。 */
318
+ /** Union of the elements of assistant `message.content[]`. */
303
319
  type AssistantContentBlock = TextBlock | ThinkingBlock | ToolUseBlock | UnknownContentBlock;
304
- /** user `message.content[]` の要素 union (content が配列のとき)。 */
320
+ /** Union of the elements of user `message.content[]` (when content is an array). */
305
321
  type UserContentBlock = TextBlock | ToolResultBlock | UnknownContentBlock;
306
- /** assistant の Anthropic API メッセージ。 */
322
+ /** The Anthropic API message of an assistant entry. */
307
323
  interface AssistantMessage {
308
324
  id: string;
309
325
  type: string;
@@ -318,7 +334,7 @@ interface AssistantMessage {
318
334
  container?: unknown;
319
335
  context_management?: unknown;
320
336
  }
321
- /** user メッセージ。content は string または配列。 */
337
+ /** User message. `content` is a string or an array. */
322
338
  interface UserMessage {
323
339
  role: string;
324
340
  content: string | UserContentBlock[];
@@ -326,9 +342,9 @@ interface UserMessage {
326
342
  /**
327
343
  * Zero-dependency Result / ResultAsync implementation.
328
344
  *
329
- * neverthrow に近い使い勝手を、外部依存なしで提供する。
345
+ * Offers neverthrow-like ergonomics without any external dependency.
330
346
  */
331
- /** 成功を表す。`value` を保持する。 */
347
+ /** A success. Holds `value`. */
332
348
  interface OkResult<T> {
333
349
  readonly isOk: true;
334
350
  readonly isErr: false;
@@ -339,7 +355,7 @@ interface OkResult<T> {
339
355
  match<U>(onOk: (value: T) => U, _onErr: (error: never) => U): U;
340
356
  unwrapOr(_fallback: T): T;
341
357
  }
342
- /** 失敗を表す。`error` を保持する。 */
358
+ /** A failure. Holds `error`. */
343
359
  interface ErrResult<E> {
344
360
  readonly isOk: false;
345
361
  readonly isErr: true;
@@ -350,120 +366,119 @@ interface ErrResult<E> {
350
366
  match<U>(_onOk: (value: never) => U, onErr: (error: E) => U): U;
351
367
  unwrapOr<T>(fallback: T): T;
352
368
  }
353
- /** `OkResult<T>` または `ErrResult<E>`。 */
369
+ /** Either `OkResult<T>` or `ErrResult<E>`. */
354
370
  type Result<T, E> = OkResult<T> | ErrResult<E>;
355
371
  /**
356
- * 成功 `Result<T, never>` を生成する。
372
+ * Creates a success `Result<T, never>`.
357
373
  *
358
- * @param value - 成功値
374
+ * @param value - Success value
359
375
  */
360
376
  export declare function ok<T>(value: T): OkResult<T>;
361
377
  /**
362
- * 失敗 `Result<never, E>` を生成する。
378
+ * Creates a failure `Result<never, E>`.
363
379
  *
364
- * @param error - エラー値
380
+ * @param error - Error value
365
381
  */
366
382
  export declare function err<E>(error: E): ErrResult<E>;
367
383
  /**
368
- * `await` 可能で `map / mapErr / andThen` を連鎖できる `PromiseLike<Result<T, E>>`。
384
+ * A `PromiseLike<Result<T, E>>` that can be awaited and chained with `map` / `mapErr` / `andThen`.
369
385
  */
370
386
  export declare class ResultAsync<T, E> implements PromiseLike<Result<T, E>> {
371
387
  private readonly _promise;
372
388
  constructor(promise: Promise<Result<T, E>>);
373
389
  then<TResult1 = Result<T, E>, TResult2 = never>(onfulfilled?: ((value: Result<T, E>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
374
390
  /**
375
- * `Promise<T>` を `ResultAsync<T, E>` に包む。reject 時は `onError` で E に写像する。
391
+ * Wraps a `Promise<T>` in a `ResultAsync<T, E>`. A rejection is mapped to `E` with `onError`.
376
392
  *
377
- * @param promise - 対象 Promise
378
- * @param onError - エラー写像
393
+ * @param promise - Target promise
394
+ * @param onError - Error mapper
379
395
  */
380
396
  static fromPromise<T, E>(promise: Promise<T>, onError: (reason: unknown) => E): ResultAsync<T, E>;
381
397
  /**
382
- * 解決済み `Result<T, E>` を `ResultAsync<T, E>` に包む。
398
+ * Wraps a resolved `Result<T, E>` in a `ResultAsync<T, E>`.
383
399
  *
384
- * @param result - 対象 Result
400
+ * @param result - Target result
385
401
  */
386
402
  static fromResult<T, E>(result: Result<T, E>): ResultAsync<T, E>;
387
403
  /**
388
- * 成功値を変換する。
404
+ * Transforms the success value.
389
405
  *
390
- * @param fn - 同期写像
406
+ * @param fn - Synchronous mapper
391
407
  */
392
408
  map<U>(fn: (value: T) => U): ResultAsync<U, E>;
393
409
  /**
394
- * エラー値を変換する。
410
+ * Transforms the error value.
395
411
  *
396
- * @param fn - 同期エラー写像
412
+ * @param fn - Synchronous error mapper
397
413
  */
398
414
  mapErr<F>(fn: (error: E) => F): ResultAsync<T, F>;
399
415
  /**
400
- * 失敗しうる非同期処理を連鎖する。
416
+ * Chains a step that may fail.
401
417
  *
402
- * @param fn - `ResultAsync<U, F>` または `Result<U, F>` を返す写像
418
+ * @param fn - Mapper returning a `ResultAsync<U, F>` or `Result<U, F>`
403
419
  */
404
420
  andThen<U, F>(fn: (value: T) => ResultAsync<U, F> | Result<U, F>): ResultAsync<U, E | F>;
405
421
  /**
406
- * 成功 / 失敗でパターンマッチする。
422
+ * Pattern-matches on success / failure.
407
423
  *
408
- * @param onOk - 成功値ハンドラ
409
- * @param onErr - エラー値ハンドラ
424
+ * @param onOk - Success handler
425
+ * @param onErr - Error handler
410
426
  */
411
427
  match<U>(onOk: (value: T) => U | Promise<U>, onErr: (error: E) => U | Promise<U>): Promise<U>;
412
428
  /**
413
- * 成功なら value、失敗なら fallback を返す。
429
+ * Returns the value on success, or `fallback` on failure.
414
430
  *
415
- * @param fallback - フォールバック値
431
+ * @param fallback - Fallback value
416
432
  */
417
433
  unwrapOr(fallback: T): Promise<T>;
418
434
  }
419
- /** ファイル読み込み (I/O) 起因のエラー。JSON 構文エラーや未知 type は含まない。 */
435
+ /** An error caused by file I/O. JSON syntax errors and unknown types are not included. */
420
436
  interface FileReadError {
421
437
  _tag: 'FileReadError';
422
438
  path: string;
423
- /** Node.js のエラーコード (ENOENT / EACCES など)。取得できなければ undefined。 */
439
+ /** Node.js error code (`ENOENT`, `EACCES`, ...). `undefined` if unavailable. */
424
440
  code?: string;
425
441
  message: string;
426
442
  }
427
443
  /**
428
- * FileReadError を生成する。
444
+ * Creates a `FileReadError`.
429
445
  *
430
- * @param path - 対象パス
431
- * @param error - 捕捉した例外
446
+ * @param path - Target path
447
+ * @param error - Caught exception
432
448
  */
433
449
  export declare function fileReadError(path: string, error: unknown): FileReadError;
434
450
  /**
435
- * JSONL 文字列を行単位で逐次パースする同期イテレータ。
436
- * `text.split('\n')` で全行配列を作らず、`indexOf` で 1 行ずつ切り出すため、
437
- * 追加メモリは 1 行分にとどまる (全行配列分の追加確保が発生しない)。
451
+ * Synchronous iterator that parses a JSONL string line by line.
452
+ * It slices one line at a time with `indexOf` instead of building a full line array with `text.split('\n')`, so the extra memory stays at one line.
438
453
  *
439
- * 空行 (トリム後に空) はスキップし、行番号カウントには含めない。
454
+ * Blank lines (empty after trimming) are skipped and not counted in line numbers.
440
455
  *
441
- * @param text - JSONL テキスト全体
456
+ * @param text - Whole JSONL text
442
457
  */
443
458
  export declare function parseJsonlLines(text: string): Iterable<ParsedLine>;
444
459
  /**
445
- * JSONL 文字列全体を一括パースして配列で返す。
446
- * 行単位のエラーは配列要素として表現されるため、この関数は Err を返さない。
460
+ * Parses a whole JSONL string and returns the lines as an array.
461
+ * Per-line errors are represented as array elements, so this function never returns `Err`.
447
462
  *
448
- * @param text - JSONL テキスト全体
463
+ * @param text - Whole JSONL text
449
464
  */
450
465
  export declare function parseJsonl(text: string): Result<ParsedLine[], never>;
451
466
  /**
452
- * ファイルを行単位で逐次読み込み・パースする非同期イテレータ (定数メモリ)。
453
- * I/O エラーは反復時に FileReadError を throw する。
467
+ * Asynchronous iterator that reads and parses a file line by line (constant memory).
468
+ * An I/O error is thrown as a `FileReadError` during iteration.
454
469
  *
455
- * @param path - JSONL ファイルパス
470
+ * @param path - JSONL file path
456
471
  */
457
472
  export declare function parseJsonlFileStream(path: string): AsyncIterable<ParsedLine>;
458
473
  /**
459
- * ファイル全体を読み込み一括パースする。I/O エラーのみ Err になる。
474
+ * Reads a whole file and parses it at once. Only I/O errors become `Err`.
460
475
  *
461
- * @param path - JSONL ファイルパス
476
+ * @param path - JSONL file path
462
477
  */
463
478
  export declare function parseJsonlFile(path: string): ResultAsync<ParsedLine[], FileReadError>;
464
479
  /**
465
- * ガード判定結果。`ok: false` の場合、`reason` に不一致だったフィールド名などの
466
- * 診断メッセージを含む (どこが shape 不一致の原因かを consumer が把握できるように)。
480
+ * Result of a guard. When `ok` is false, `reason` holds a diagnostic message such
481
+ * as the names of the mismatching fields, so consumers can see what caused the mismatch.
467
482
  */
468
483
  interface GuardResult {
469
484
  ok: boolean;
@@ -488,7 +503,7 @@ declare function isFrameLink(v: unknown): GuardResult;
488
503
  declare function isFileHistorySnapshot(v: unknown): GuardResult;
489
504
  declare function isStarted(v: unknown): GuardResult;
490
505
  declare function isResult(v: unknown): GuardResult;
491
- /** type 文字列 → ガード関数のマップ。 */
506
+ /** Map from type string to guard function. */
492
507
  export declare const guards: {
493
508
  readonly assistant: typeof isAssistant;
494
509
  readonly user: typeof isUser;
@@ -510,28 +525,30 @@ export declare const guards: {
510
525
  readonly started: typeof isStarted;
511
526
  readonly result: typeof isResult;
512
527
  };
513
- /** 既知 type 名の配列。 */
528
+ /** Names of the known types. */
514
529
  export declare const KNOWN_TYPES: (keyof typeof guards)[];
515
530
  /**
516
- * 指定 type のガードを適用する。ガードが存在しない type なら undefined。
517
- * 一致すれば `{ ok: true }`、不一致なら `{ ok: false, reason }` (reason に
518
- * 診断メッセージ、どのフィールドが原因で shape 不一致になったかを含む)。
531
+ * Applies the guard of the given type, or returns undefined if no guard exists for it.
532
+ * Returns `{ ok: true }` on a match and `{ ok: false, reason }` on a mismatch, where
533
+ * `reason` names the fields that caused it.
519
534
  *
520
- * @param type - 判別子
521
- * @param v - 検査対象の生 JSON
535
+ * @param type - Discriminator
536
+ * @param v - Raw JSON to check
522
537
  */
523
538
  export declare function guardByType(type: string, v: unknown): GuardResult | undefined;
524
539
  /**
525
- * assistant の message.content 配列を正規化する。
526
- * 既知ブロックはそのまま、未知は UnknownContentBlock に降格する。
540
+ * Normalizes the message.content of an assistant entry.
541
+ * Known blocks are kept as is; unknown ones are demoted to `UnknownContentBlock`.
542
+ * A non-array value becomes a single `UnknownContentBlock`.
527
543
  *
528
- * @param content - 生の content 配列
544
+ * @param content - Raw content
529
545
  */
530
546
  export declare function normalizeAssistantContent(content: unknown): AssistantContentBlock[];
531
547
  /**
532
- * user の message.content を正規化する。string ならそのまま、配列なら要素ごとに正規化。
548
+ * Normalizes the message.content of a user entry. A string is returned as is and an array is normalized per element.
549
+ * Any other value becomes a single `UnknownContentBlock`.
533
550
  *
534
- * @param content - 生の content (string または配列)
551
+ * @param content - Raw content (string or array)
535
552
  */
536
553
  export declare function normalizeUserContent(content: unknown): string | UserContentBlock[];
537
554
  export type { AgentNameEntry, AgentSettingEntry, AiTitleEntry, AssistantContentBlock, AssistantEntry, AssistantMessage, AttachmentEntry, BridgeSessionEntry, EntryBase, ErrResult, FileHistorySnapshotEntry, FileReadError, FrameLinkEntry, GuardResult, ImageBlock, KnownEntry, LastPromptEntry, LineParseError, ModeEntry, OkResult, ParsedKind, ParsedLine, PermissionModeEntry, PrLinkEntry, QueueOperationEntry, RelocatedEntry, Result, ResultEntry, StartedEntry, SystemEntry, TextBlock, ThinkingBlock, ToolReferenceBlock, ToolResultBlock, ToolResultContentBlock, ToolUseBlock, UnknownContentBlock, UnknownEntry, UserContentBlock, UserEntry, UserMessage, WorktreeStateEntry };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/generated/types.ts","../src/result.ts","../src/errors.ts","../src/parse.ts","../src/generated/guards.ts"],"mappings":";;;;;;;;;KAcY;;UAOK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;;;UAQe,uBAAuB;EACtC;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe,kBAAkB;EACjC;EACA;EACA,SAAS;EACT;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe,wBAAwB;EACvC;EACA;EACA,YAAY;;;UAIG,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAQe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,iBAAiB;EACjB;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA,UAAU;;;UAIK;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;KAQU,aACR,iBACA,YACA,kBACA,cACA,YACA,sBACA,eACA,iBACA,oBACA,iBACA,kBACA,qBACA,qBACA,sBACA,cACA,iBACA,2BACA,eACA;;UAGa;EACf;EACA;EACA;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;EACA;;;KAIU,aAAa,aAAa,eAAe;;UAOpC;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;IACE;IACA;IACA;;;;UAKa;EACf;EACA;EACA;;;KAIU,yBACR,YACA,aACA,qBACA;;UAGa;EACf;EACA;EACA;EACA,kBAAkB;EAClB;;;;;;;;UASe;EACf;EACA;;;KAIU,wBACR,YACA,gBACA,eACA;;KAGQ,mBAAmB,YAAY,kBAAkB;;UAO5C;EACf;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA,kBAAkB;;;;;;;;UCrZH,SAAS;WACf;WACA;WACA,OAAO;EAChB,IAAI,GAAG,KAAK,OAAO,MAAM,IAAI,SAAS;EAEtC,OAAO,GAAG,MAAM,iBAAiB,IAAI,SAAS;EAC9C,QAAQ,GAAG,GAAG,KAAK,OAAO,MAAM,OAAO,GAAG,KAAK,OAAO,GAAG;EACzD,MAAM,GAAG,OAAO,OAAO,MAAM,GAAG,SAAS,iBAAiB,IAAI;EAC9D,SAAS,WAAW,IAAI;;;UAIT,UAAU;WAChB;WACA;WACA,OAAO;EAEhB,IAAI,GAAG,MAAM,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AS;;;;;;;wBAwBzC,WAAW,eAAe,OAAO;;;;;;;wBAU1B,qBACrB,eACC,cAAc;;;;;;wBAyBD,eACd,eACC,YAAY,cAAc;;;;;UCzCZ;EACf;EACA;;iBA+BO,YAAY,aAAa;iBAazB,OAAO,aAAa;iBASpB,aAAa,aAAa;iBAQ1B,SAAS,aAAa;iBAQtB,OAAO,aAAa;iBASpB,iBAAiB,aAAa;iBAS9B,UAAU,aAAa;iBASvB,YAAY,aAAa;iBASzB,eAAe,aAAa;iBAS5B,YAAY,aAAa;iBASzB,aAAa,aAAa;iBAS1B,gBAAgB,aAAa;iBAS7B,gBAAgB,aAAa;iBAU7B,iBAAiB,aAAa;iBAU9B,SAAS,aAAa;iBAYtB,YAAY,aAAa;iBAWzB,sBAAsB,aAAa;iBAUnC,UAAU,aAAa;iBASvB,SAAS,aAAa;;qBAgBlB;;;;;;;;;;;;;;;;;;;;;;qBAuBA,2BAAmD;;;;;;;;;wBAUhD,YAAY,cAAc,aAAa;;;;;;;wBAoEvC,0BACd,mBACC;;;;;;wBAgBa,qBACd,4BACU"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/generated/types.ts","../src/result.ts","../src/errors.ts","../src/parse.ts","../src/generated/guards.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAaY;;UAOK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;;;UAQe,uBAAuB;EACtC;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe,kBAAkB;EACjC;EACA;EACA,SAAS;EACT;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe,wBAAwB;EACvC;EACA;EACA,YAAY;;;UAIG,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAQe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,iBAAiB;EACjB;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA,UAAU;;;UAIK;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;KAQU,aACR,iBACA,YACA,kBACA,cACA,YACA,sBACA,eACA,iBACA,oBACA,iBACA,kBACA,qBACA,qBACA,sBACA,cACA,iBACA,2BACA,eACA;;UAGa;EACf;EACA;EACA;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;EACA;;;KAIU,aAAa,aAAa,eAAe;;UAOpC;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;IACE;IACA;IACA;;;;UAKa;EACf;EACA;EACA;;;KAIU,yBACR,YACA,aACA,qBACA;;UAGa;EACf;EACA;EACA;EACA,kBAAkB;EAClB;;;;;;;;UASe;EACf;EACA;;;KAIU,wBACR,YACA,gBACA,eACA;;KAGQ,mBAAmB,YAAY,kBAAkB;;UAO5C;EACf;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA,kBAAkB;;;;;;;;UCpZH,SAAS;WACf;WACA;WACA,OAAO;EAChB,IAAI,GAAG,KAAK,OAAO,MAAM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