@claudetree/shared 0.2.0 → 0.2.1

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 (2) hide show
  1. package/README.md +69 -0
  2. package/package.json +5 -3
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @claudetree/shared
2
+
3
+ Shared TypeScript types and utilities for claudetree.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @claudetree/shared
9
+ # or
10
+ pnpm add @claudetree/shared
11
+ ```
12
+
13
+ ## Types
14
+
15
+ ### Session
16
+ ```typescript
17
+ interface Session {
18
+ id: string;
19
+ worktreeId: string;
20
+ claudeSessionId: string | null;
21
+ status: SessionStatus;
22
+ issueNumber: number | null;
23
+ prompt: string | null;
24
+ usage: TokenUsage | null;
25
+ // ...
26
+ }
27
+
28
+ type SessionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed';
29
+ ```
30
+
31
+ ### TokenUsage
32
+ ```typescript
33
+ interface TokenUsage {
34
+ inputTokens: number;
35
+ outputTokens: number;
36
+ cacheReadInputTokens: number;
37
+ cacheCreationInputTokens: number;
38
+ totalCostUsd: number;
39
+ }
40
+ ```
41
+
42
+ ### Other Types
43
+ - `Worktree` - Git worktree information
44
+ - `Issue` - GitHub issue data
45
+ - `SessionEvent` - Session activity events
46
+ - `ToolApproval` - Tool approval requests
47
+ - `CodeReview` - Code review requests
48
+ - `SessionTemplate` - Session templates
49
+
50
+ ## Usage
51
+
52
+ ```typescript
53
+ import type { Session, SessionStatus, TokenUsage } from '@claudetree/shared';
54
+
55
+ const session: Session = {
56
+ id: 'abc123',
57
+ status: 'running',
58
+ // ...
59
+ };
60
+ ```
61
+
62
+ ## Links
63
+
64
+ - [GitHub Repository](https://github.com/wonjangcloud9/claude-tree)
65
+ - [CLI Package](https://www.npmjs.com/package/@claudetree/cli)
66
+
67
+ ## License
68
+
69
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudetree/shared",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared types and utilities for claudetree",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,13 +12,15 @@
12
12
  }
13
13
  },
14
14
  "files": [
15
- "dist"
15
+ "dist",
16
+ "README.md"
16
17
  ],
17
18
  "repository": {
18
19
  "type": "git",
19
- "url": "https://github.com/notwonjang/claude-tree.git",
20
+ "url": "https://github.com/wonjangcloud9/claude-tree.git",
20
21
  "directory": "packages/shared"
21
22
  },
23
+ "homepage": "https://github.com/wonjangcloud9/claude-tree#readme",
22
24
  "license": "MIT",
23
25
  "devDependencies": {
24
26
  "typescript": "^5.7.0"