claude-code-types 0.2.0 → 0.4.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Pedro Carvalho
3
+ Copyright (c) 2026 Pedro Paulo Vezza Campos
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # claude-code-types
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/claude-code-types)](https://www.npmjs.com/package/claude-code-types) [![docs](https://img.shields.io/badge/docs-API%20reference-blue)](docs/README.md)
4
+
3
5
  TypeScript type definitions for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) chat history JSONL files.
4
6
 
5
7
  Claude Code stores conversation history at `~/.claude/projects/<project-slug>/<session-id>.jsonl`. Each line is a JSON object. This package provides full type coverage for all entry types.
@@ -16,6 +18,7 @@ npm install claude-code-types
16
18
  import type { TranscriptEntry } from 'claude-code-types';
17
19
  import { readFileSync } from 'fs';
18
20
 
21
+ const path = '~/.claude/projects/my-project/abc123.jsonl';
19
22
  const entries: TranscriptEntry[] = readFileSync(path, 'utf-8')
20
23
  .split('\n')
21
24
  .filter(Boolean)
@@ -50,6 +53,10 @@ for (const entry of entries) {
50
53
  | `saved_hook_context` | `SavedHookContextEntry` | Hook execution context |
51
54
  | `summary` | `SummaryEntry` | Conversation summaries |
52
55
 
56
+ ## Versioning
57
+
58
+ This project follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). See [CHANGELOG.md](CHANGELOG.md) for release history.
59
+
53
60
  ## Contributing
54
61
 
55
62
  See [AGENTS.md](AGENTS.md) for publishing instructions and project conventions.
package/index.d.ts CHANGED
@@ -65,6 +65,8 @@ interface EntryBase {
65
65
  gitBranch?: string;
66
66
  /** Project slug derived from the working directory. */
67
67
  slug?: string;
68
+ /** Present on entries produced by subagents / Task tool invocations (e.g. `"a4044e6"`). */
69
+ agentId?: string;
68
70
  teamName?: string;
69
71
  userType: 'external';
70
72
  }
@@ -710,6 +712,8 @@ export type BuiltinToolName =
710
712
  | 'TaskOutput'
711
713
  | 'TaskStop'
712
714
  | 'TaskUpdate'
715
+ | 'TeamCreate'
716
+ | 'TeamDelete'
713
717
  | 'TodoWrite'
714
718
  | 'WebFetch'
715
719
  | 'WebSearch'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-types",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript type definitions for Claude Code chat history JSONL files",
5
5
  "types": "./index.d.ts",
6
6
  "files": [
@@ -8,7 +8,8 @@
8
8
  ],
9
9
  "scripts": {
10
10
  "typecheck": "tsc --noEmit",
11
- "test": "tsx test/smoke.test.ts"
11
+ "test": "tsx test/smoke.local.test.ts",
12
+ "docs": "typedoc --plugin typedoc-plugin-markdown --disableSources --readme none --out docs index.d.ts"
12
13
  },
13
14
  "keywords": [
14
15
  "claude",
@@ -27,6 +28,8 @@
27
28
  },
28
29
  "devDependencies": {
29
30
  "tsx": "^4.0.0",
31
+ "typedoc": "^0.28.0",
32
+ "typedoc-plugin-markdown": "^4.10.0",
30
33
  "typescript": "^5.7.0"
31
34
  }
32
35
  }