claude-code-jsonl-parser 0.1.4-beta.24 → 0.1.4-beta.25

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,5 +1,5 @@
1
1
  /**
2
- * claude-code-jsonl-parser — Claude Code の JSONL 会話ログを型安全にパースする。
2
+ * claude-code-jsonl-parser: type-safe parser for Claude Code JSONL conversation logs.
3
3
  *
4
4
  * @example
5
5
  * ```ts
@@ -16,16 +16,15 @@
16
16
  * ```
17
17
  */
18
18
  /**
19
- * Claude Code JSONL の各エントリ型定義。
20
- * 形状の根拠は実サンプルコーパスの調査結果。
19
+ * Type definitions of the Claude Code JSONL entries.
21
20
  *
22
- * claude-code-jsonl-generator でコーパスから再生成できるが、
23
- * content-block guards / message shapes は手動でキュレーションしているため、
24
- * 生成結果をそのまま上書きするのではなく差分を確認して反映すること。
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.
25
24
  */
26
- /** parser が付与する内部判別子。`type` フィールドとは別。 */
25
+ /** Internal discriminator added by the parser. Separate from the `type` field. */
27
26
  type ParsedKind = 'known' | 'unknown' | 'error';
28
- /** assistant / user / attachment / system が共有する必須メタデータ。 */
27
+ /** Required metadata shared by assistant / user / attachment / system. */
29
28
  interface EntryBase {
30
29
  cwd: string;
31
30
  entrypoint: string;
@@ -37,7 +36,7 @@ interface EntryBase {
37
36
  userType: string;
38
37
  uuid: string;
39
38
  version: string;
40
- /** サイドチェーン/サブエージェント関連の任意フィールド群 (観測されたもの) */
39
+ /** Optional sidechain / sub-agent related fields (as observed) */
41
40
  agentId?: string;
42
41
  agentName?: string;
43
42
  teamName?: string;
@@ -45,7 +44,7 @@ interface EntryBase {
45
44
  sessionKind?: string;
46
45
  session_id?: string;
47
46
  }
48
- /** `type: "assistant"` — アシスタント応答 (Anthropic API メッセージを内包)。 */
47
+ /** `type: "assistant"`: assistant response (wraps an Anthropic API message). */
49
48
  interface AssistantEntry extends EntryBase {
50
49
  _kind: 'known';
51
50
  type: 'assistant';
@@ -60,13 +59,13 @@ interface AssistantEntry extends EntryBase {
60
59
  attributionMcpServer?: string;
61
60
  attributionMcpTool?: string;
62
61
  }
63
- /** `user.origin` — 発生元の種別と付随情報。 */
62
+ /** `user.origin`: kind of origin and accompanying information. */
64
63
  interface UserOrigin {
65
64
  kind: string;
66
65
  from?: string;
67
66
  senderTaskId?: string;
68
67
  }
69
- /** `type: "user"` — ユーザ入力 / ツール結果を内包。 */
68
+ /** `type: "user"`: wraps user input / tool results. */
70
69
  interface UserEntry extends EntryBase {
71
70
  _kind: 'known';
72
71
  type: 'user';
@@ -88,13 +87,13 @@ interface UserEntry extends EntryBase {
88
87
  toolDenialKind?: string;
89
88
  toolEndsTurn?: boolean;
90
89
  }
91
- /** `type: "attachment"` — 添付データ。 */
90
+ /** `type: "attachment"`: attached data. */
92
91
  interface AttachmentEntry extends EntryBase {
93
92
  _kind: 'known';
94
93
  type: 'attachment';
95
94
  attachment: Record<string, unknown>;
96
95
  }
97
- /** `type: "system"` — システムイベント (subtype で細分化)。 */
96
+ /** `type: "system"`: system event (refined by `subtype`). */
98
97
  interface SystemEntry extends EntryBase {
99
98
  _kind: 'known';
100
99
  type: 'system';
@@ -149,7 +148,7 @@ interface AgentNameEntry {
149
148
  agentName: string;
150
149
  sessionId: string;
151
150
  }
152
- /** `type: "agent-setting"` — `agentSetting` は文字列。 */
151
+ /** `type: "agent-setting"`: `agentSetting` is a string. */
153
152
  interface AgentSettingEntry {
154
153
  _kind: 'known';
155
154
  type: 'agent-setting';
@@ -163,7 +162,7 @@ interface RelocatedEntry {
163
162
  relocatedCwd: string;
164
163
  sessionId: string;
165
164
  }
166
- /** `type: "last-prompt"` — `lastPrompt` は任意。 */
165
+ /** `type: "last-prompt"`: `lastPrompt` is optional. */
167
166
  interface LastPromptEntry {
168
167
  _kind: 'known';
169
168
  type: 'last-prompt';
@@ -171,7 +170,7 @@ interface LastPromptEntry {
171
170
  sessionId: string;
172
171
  lastPrompt?: string;
173
172
  }
174
- /** `type: "worktree-state"` — `worktreeSession` は object または null。 */
173
+ /** `type: "worktree-state"`: `worktreeSession` is an object or null. */
175
174
  interface WorktreeStateEntry {
176
175
  _kind: 'known';
177
176
  type: 'worktree-state';
@@ -186,7 +185,7 @@ interface BridgeSessionEntry {
186
185
  lastSequenceNum: number;
187
186
  sessionId: string;
188
187
  }
189
- /** `type: "queue-operation"` — `content` は任意。 */
188
+ /** `type: "queue-operation"`: `content` is optional. */
190
189
  interface QueueOperationEntry {
191
190
  _kind: 'known';
192
191
  type: 'queue-operation';
@@ -214,7 +213,7 @@ interface FrameLinkEntry {
214
213
  sessionId: string;
215
214
  timestamp: string;
216
215
  }
217
- /** `type: "file-history-snapshot"` — sessionId を持たない。 */
216
+ /** `type: "file-history-snapshot"`: has no sessionId. */
218
217
  interface FileHistorySnapshotEntry {
219
218
  _kind: 'known';
220
219
  type: 'file-history-snapshot';
@@ -222,14 +221,14 @@ interface FileHistorySnapshotEntry {
222
221
  messageId: string;
223
222
  snapshot: Record<string, unknown>;
224
223
  }
225
- /** `type: "started"` — workflow journal 由来。sessionId を持たない。 */
224
+ /** `type: "started"`: comes from the workflow journal. Has no sessionId. */
226
225
  interface StartedEntry {
227
226
  _kind: 'known';
228
227
  type: 'started';
229
228
  key: string;
230
229
  agentId: string;
231
230
  }
232
- /** `type: "result"` — workflow journal 由来。`result` は任意形状。 */
231
+ /** `type: "result"`: comes from the workflow journal. `result` has an arbitrary shape. */
233
232
  interface ResultEntry {
234
233
  _kind: 'known';
235
234
  type: 'result';
@@ -237,26 +236,26 @@ interface ResultEntry {
237
236
  agentId: string;
238
237
  result: unknown;
239
238
  }
240
- /** 既知 type のエントリ全種。 */
239
+ /** All entries of known types. */
241
240
  type KnownEntry = AssistantEntry | UserEntry | AttachmentEntry | SystemEntry | ModeEntry | PermissionModeEntry | AiTitleEntry | AgentNameEntry | AgentSettingEntry | RelocatedEntry | LastPromptEntry | WorktreeStateEntry | BridgeSessionEntry | QueueOperationEntry | PrLinkEntry | FrameLinkEntry | FileHistorySnapshotEntry | StartedEntry | ResultEntry;
242
- /** type 不明、または既知 type だが shape 不一致だった行。生の JSON を保持。 */
241
+ /** A line with an unknown type, or a known type whose shape did not match. Keeps the raw JSON. */
243
242
  interface UnknownEntry {
244
243
  _kind: 'unknown';
245
244
  lineNumber: number;
246
245
  raw: unknown;
247
- /** ガードが存在する既知 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. */
248
247
  typeHint?: string;
249
- /** `typeHint` がある場合、どのフィールドが原因で shape 不一致になったかの診断メッセージ。 */
248
+ /** When `typeHint` is set, a diagnostic message naming the fields that caused the mismatch. */
250
249
  reason?: string;
251
250
  }
252
- /** JSON 構文エラー行。 */
251
+ /** A line with a JSON syntax error. */
253
252
  interface LineParseError {
254
253
  _kind: 'error';
255
254
  lineNumber: number;
256
255
  rawLine: string;
257
256
  message: string;
258
257
  }
259
- /** パース結果 1 行分。 */
258
+ /** Parse result of one line. */
260
259
  type ParsedLine = KnownEntry | UnknownEntry | LineParseError;
261
260
  /** `{ type: "text", text }`。 */
262
261
  interface TextBlock {
@@ -280,7 +279,7 @@ interface ToolUseBlock {
280
279
  input: unknown;
281
280
  caller?: unknown;
282
281
  }
283
- /** tool_result 内 `{ type: "image", source }`。 */
282
+ /** `{ type: "image", source }` inside a tool_result. */
284
283
  interface ImageBlock {
285
284
  _kind: 'known';
286
285
  type: 'image';
@@ -290,13 +289,13 @@ interface ImageBlock {
290
289
  data: string;
291
290
  };
292
291
  }
293
- /** tool_result 内 `{ type: "tool_reference", tool_name }`。 */
292
+ /** `{ type: "tool_reference", tool_name }` inside a tool_result. */
294
293
  interface ToolReferenceBlock {
295
294
  _kind: 'known';
296
295
  type: 'tool_reference';
297
296
  tool_name: string;
298
297
  }
299
- /** tool_result の content 配列要素 union。 */
298
+ /** Union of the elements of a tool_result content array. */
300
299
  type ToolResultContentBlock = TextBlock | ImageBlock | ToolReferenceBlock | UnknownContentBlock;
301
300
  /** `{ type: "tool_result", tool_use_id, content, is_error? }`。 */
302
301
  interface ToolResultBlock {
@@ -307,20 +306,20 @@ interface ToolResultBlock {
307
306
  is_error?: boolean;
308
307
  }
309
308
  /**
310
- * content ブロックがどの既知形状にも一致しなかった場合の部分フォールバック。
311
- * `_kind` は既知ブロック側と同じ判別子で、まずこれを見て `'unknown'` かどうかを
312
- * 判定すれば、既知ブロック側は安全に `.type` で絞り込める
313
- * (例: `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') {...}`).
314
313
  */
315
314
  interface UnknownContentBlock {
316
315
  _kind: 'unknown';
317
316
  raw: unknown;
318
317
  }
319
- /** assistant `message.content[]` の要素 union。 */
318
+ /** Union of the elements of assistant `message.content[]`. */
320
319
  type AssistantContentBlock = TextBlock | ThinkingBlock | ToolUseBlock | UnknownContentBlock;
321
- /** user `message.content[]` の要素 union (content が配列のとき)。 */
320
+ /** Union of the elements of user `message.content[]` (when content is an array). */
322
321
  type UserContentBlock = TextBlock | ToolResultBlock | UnknownContentBlock;
323
- /** assistant の Anthropic API メッセージ。 */
322
+ /** The Anthropic API message of an assistant entry. */
324
323
  interface AssistantMessage {
325
324
  id: string;
326
325
  type: string;
@@ -335,7 +334,7 @@ interface AssistantMessage {
335
334
  container?: unknown;
336
335
  context_management?: unknown;
337
336
  }
338
- /** user メッセージ。content は string または配列。 */
337
+ /** User message. `content` is a string or an array. */
339
338
  interface UserMessage {
340
339
  role: string;
341
340
  content: string | UserContentBlock[];
@@ -343,9 +342,9 @@ interface UserMessage {
343
342
  /**
344
343
  * Zero-dependency Result / ResultAsync implementation.
345
344
  *
346
- * neverthrow に近い使い勝手を、外部依存なしで提供する。
345
+ * Offers neverthrow-like ergonomics without any external dependency.
347
346
  */
348
- /** 成功を表す。`value` を保持する。 */
347
+ /** A success. Holds `value`. */
349
348
  interface OkResult<T> {
350
349
  readonly isOk: true;
351
350
  readonly isErr: false;
@@ -356,7 +355,7 @@ interface OkResult<T> {
356
355
  match<U>(onOk: (value: T) => U, _onErr: (error: never) => U): U;
357
356
  unwrapOr(_fallback: T): T;
358
357
  }
359
- /** 失敗を表す。`error` を保持する。 */
358
+ /** A failure. Holds `error`. */
360
359
  interface ErrResult<E> {
361
360
  readonly isOk: false;
362
361
  readonly isErr: true;
@@ -367,120 +366,119 @@ interface ErrResult<E> {
367
366
  match<U>(_onOk: (value: never) => U, onErr: (error: E) => U): U;
368
367
  unwrapOr<T>(fallback: T): T;
369
368
  }
370
- /** `OkResult<T>` または `ErrResult<E>`。 */
369
+ /** Either `OkResult<T>` or `ErrResult<E>`. */
371
370
  type Result<T, E> = OkResult<T> | ErrResult<E>;
372
371
  /**
373
- * 成功 `Result<T, never>` を生成する。
372
+ * Creates a success `Result<T, never>`.
374
373
  *
375
- * @param value - 成功値
374
+ * @param value - Success value
376
375
  */
377
376
  export declare function ok<T>(value: T): OkResult<T>;
378
377
  /**
379
- * 失敗 `Result<never, E>` を生成する。
378
+ * Creates a failure `Result<never, E>`.
380
379
  *
381
- * @param error - エラー値
380
+ * @param error - Error value
382
381
  */
383
382
  export declare function err<E>(error: E): ErrResult<E>;
384
383
  /**
385
- * `await` 可能で `map / mapErr / andThen` を連鎖できる `PromiseLike<Result<T, E>>`。
384
+ * A `PromiseLike<Result<T, E>>` that can be awaited and chained with `map` / `mapErr` / `andThen`.
386
385
  */
387
386
  export declare class ResultAsync<T, E> implements PromiseLike<Result<T, E>> {
388
387
  private readonly _promise;
389
388
  constructor(promise: Promise<Result<T, E>>);
390
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>;
391
390
  /**
392
- * `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`.
393
392
  *
394
- * @param promise - 対象 Promise
395
- * @param onError - エラー写像
393
+ * @param promise - Target promise
394
+ * @param onError - Error mapper
396
395
  */
397
396
  static fromPromise<T, E>(promise: Promise<T>, onError: (reason: unknown) => E): ResultAsync<T, E>;
398
397
  /**
399
- * 解決済み `Result<T, E>` を `ResultAsync<T, E>` に包む。
398
+ * Wraps a resolved `Result<T, E>` in a `ResultAsync<T, E>`.
400
399
  *
401
- * @param result - 対象 Result
400
+ * @param result - Target result
402
401
  */
403
402
  static fromResult<T, E>(result: Result<T, E>): ResultAsync<T, E>;
404
403
  /**
405
- * 成功値を変換する。
404
+ * Transforms the success value.
406
405
  *
407
- * @param fn - 同期写像
406
+ * @param fn - Synchronous mapper
408
407
  */
409
408
  map<U>(fn: (value: T) => U): ResultAsync<U, E>;
410
409
  /**
411
- * エラー値を変換する。
410
+ * Transforms the error value.
412
411
  *
413
- * @param fn - 同期エラー写像
412
+ * @param fn - Synchronous error mapper
414
413
  */
415
414
  mapErr<F>(fn: (error: E) => F): ResultAsync<T, F>;
416
415
  /**
417
- * 失敗しうる非同期処理を連鎖する。
416
+ * Chains a step that may fail.
418
417
  *
419
- * @param fn - `ResultAsync<U, F>` または `Result<U, F>` を返す写像
418
+ * @param fn - Mapper returning a `ResultAsync<U, F>` or `Result<U, F>`
420
419
  */
421
420
  andThen<U, F>(fn: (value: T) => ResultAsync<U, F> | Result<U, F>): ResultAsync<U, E | F>;
422
421
  /**
423
- * 成功 / 失敗でパターンマッチする。
422
+ * Pattern-matches on success / failure.
424
423
  *
425
- * @param onOk - 成功値ハンドラ
426
- * @param onErr - エラー値ハンドラ
424
+ * @param onOk - Success handler
425
+ * @param onErr - Error handler
427
426
  */
428
427
  match<U>(onOk: (value: T) => U | Promise<U>, onErr: (error: E) => U | Promise<U>): Promise<U>;
429
428
  /**
430
- * 成功なら value、失敗なら fallback を返す。
429
+ * Returns the value on success, or `fallback` on failure.
431
430
  *
432
- * @param fallback - フォールバック値
431
+ * @param fallback - Fallback value
433
432
  */
434
433
  unwrapOr(fallback: T): Promise<T>;
435
434
  }
436
- /** ファイル読み込み (I/O) 起因のエラー。JSON 構文エラーや未知 type は含まない。 */
435
+ /** An error caused by file I/O. JSON syntax errors and unknown types are not included. */
437
436
  interface FileReadError {
438
437
  _tag: 'FileReadError';
439
438
  path: string;
440
- /** Node.js のエラーコード (ENOENT / EACCES など)。取得できなければ undefined。 */
439
+ /** Node.js error code (`ENOENT`, `EACCES`, ...). `undefined` if unavailable. */
441
440
  code?: string;
442
441
  message: string;
443
442
  }
444
443
  /**
445
- * FileReadError を生成する。
444
+ * Creates a `FileReadError`.
446
445
  *
447
- * @param path - 対象パス
448
- * @param error - 捕捉した例外
446
+ * @param path - Target path
447
+ * @param error - Caught exception
449
448
  */
450
449
  export declare function fileReadError(path: string, error: unknown): FileReadError;
451
450
  /**
452
- * JSONL 文字列を行単位で逐次パースする同期イテレータ。
453
- * `text.split('\n')` で全行配列を作らず、`indexOf` で 1 行ずつ切り出すため、
454
- * 追加メモリは 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.
455
453
  *
456
- * 空行 (トリム後に空) はスキップし、行番号カウントには含めない。
454
+ * Blank lines (empty after trimming) are skipped and not counted in line numbers.
457
455
  *
458
- * @param text - JSONL テキスト全体
456
+ * @param text - Whole JSONL text
459
457
  */
460
458
  export declare function parseJsonlLines(text: string): Iterable<ParsedLine>;
461
459
  /**
462
- * JSONL 文字列全体を一括パースして配列で返す。
463
- * 行単位のエラーは配列要素として表現されるため、この関数は 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`.
464
462
  *
465
- * @param text - JSONL テキスト全体
463
+ * @param text - Whole JSONL text
466
464
  */
467
465
  export declare function parseJsonl(text: string): Result<ParsedLine[], never>;
468
466
  /**
469
- * ファイルを行単位で逐次読み込み・パースする非同期イテレータ (定数メモリ)。
470
- * 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.
471
469
  *
472
- * @param path - JSONL ファイルパス
470
+ * @param path - JSONL file path
473
471
  */
474
472
  export declare function parseJsonlFileStream(path: string): AsyncIterable<ParsedLine>;
475
473
  /**
476
- * ファイル全体を読み込み一括パースする。I/O エラーのみ Err になる。
474
+ * Reads a whole file and parses it at once. Only I/O errors become `Err`.
477
475
  *
478
- * @param path - JSONL ファイルパス
476
+ * @param path - JSONL file path
479
477
  */
480
478
  export declare function parseJsonlFile(path: string): ResultAsync<ParsedLine[], FileReadError>;
481
479
  /**
482
- * ガード判定結果。`ok: false` の場合、`reason` に不一致だったフィールド名などの
483
- * 診断メッセージを含む (どこが 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.
484
482
  */
485
483
  interface GuardResult {
486
484
  ok: boolean;
@@ -505,7 +503,7 @@ declare function isFrameLink(v: unknown): GuardResult;
505
503
  declare function isFileHistorySnapshot(v: unknown): GuardResult;
506
504
  declare function isStarted(v: unknown): GuardResult;
507
505
  declare function isResult(v: unknown): GuardResult;
508
- /** type 文字列 → ガード関数のマップ。 */
506
+ /** Map from type string to guard function. */
509
507
  export declare const guards: {
510
508
  readonly assistant: typeof isAssistant;
511
509
  readonly user: typeof isUser;
@@ -527,28 +525,30 @@ export declare const guards: {
527
525
  readonly started: typeof isStarted;
528
526
  readonly result: typeof isResult;
529
527
  };
530
- /** 既知 type 名の配列。 */
528
+ /** Names of the known types. */
531
529
  export declare const KNOWN_TYPES: (keyof typeof guards)[];
532
530
  /**
533
- * 指定 type のガードを適用する。ガードが存在しない type なら undefined。
534
- * 一致すれば `{ ok: true }`、不一致なら `{ ok: false, reason }` (reason に
535
- * 診断メッセージ、どのフィールドが原因で 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.
536
534
  *
537
- * @param type - 判別子
538
- * @param v - 検査対象の生 JSON
535
+ * @param type - Discriminator
536
+ * @param v - Raw JSON to check
539
537
  */
540
538
  export declare function guardByType(type: string, v: unknown): GuardResult | undefined;
541
539
  /**
542
- * assistant の message.content 配列を正規化する。
543
- * 既知ブロックはそのまま、未知は 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`.
544
543
  *
545
- * @param content - 生の content 配列
544
+ * @param content - Raw content
546
545
  */
547
546
  export declare function normalizeAssistantContent(content: unknown): AssistantContentBlock[];
548
547
  /**
549
- * 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`.
550
550
  *
551
- * @param content - 生の content (string または配列)
551
+ * @param content - Raw content (string or array)
552
552
  */
553
553
  export declare function normalizeUserContent(content: unknown): string | UserContentBlock[];
554
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,iBAAiB,IAAI,UAAU;EAC5C,OAAO,GAAG,KAAK,OAAO,MAAM,IAAI,UAAU;EAC1C,QAAQ,GAAG,GAAG,MAAM,i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AAc;;;;;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,IAAI,SAAS;EAEtC,OAAO,GAAG,MAAM,iBAAiB,IAAI,SAAS;EAC9C,QAAQ,GAAG,GAAG,KAAK,OAAO,MAAM,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