@claudetree/shared 0.2.3 → 0.2.5
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 +21 -0
- package/README.ja.md +76 -0
- package/README.ko.md +76 -0
- package/README.md +7 -0
- package/README.zh.md +76 -0
- package/package.json +6 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="README.md">English</a> |
|
|
3
|
+
<a href="README.ko.md">한국어</a> |
|
|
4
|
+
<a href="README.ja.md">日本語</a> |
|
|
5
|
+
<a href="README.zh.md">中文</a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# @claudetree/shared
|
|
9
|
+
|
|
10
|
+
claudetreeの共有TypeScript型とユーティリティ。
|
|
11
|
+
|
|
12
|
+
## インストール
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @claudetree/shared
|
|
16
|
+
# または
|
|
17
|
+
pnpm add @claudetree/shared
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 型
|
|
21
|
+
|
|
22
|
+
### Session
|
|
23
|
+
```typescript
|
|
24
|
+
interface Session {
|
|
25
|
+
id: string;
|
|
26
|
+
worktreeId: string;
|
|
27
|
+
claudeSessionId: string | null;
|
|
28
|
+
status: SessionStatus;
|
|
29
|
+
issueNumber: number | null;
|
|
30
|
+
prompt: string | null;
|
|
31
|
+
usage: TokenUsage | null;
|
|
32
|
+
// ...
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type SessionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### TokenUsage
|
|
39
|
+
```typescript
|
|
40
|
+
interface TokenUsage {
|
|
41
|
+
inputTokens: number;
|
|
42
|
+
outputTokens: number;
|
|
43
|
+
cacheReadInputTokens: number;
|
|
44
|
+
cacheCreationInputTokens: number;
|
|
45
|
+
totalCostUsd: number;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### その他の型
|
|
50
|
+
- `Worktree` - Git worktree情報
|
|
51
|
+
- `Issue` - GitHub課題データ
|
|
52
|
+
- `SessionEvent` - セッション活動イベント
|
|
53
|
+
- `ToolApproval` - ツール承認リクエスト
|
|
54
|
+
- `CodeReview` - コードレビューリクエスト
|
|
55
|
+
- `SessionTemplate` - セッションテンプレート
|
|
56
|
+
|
|
57
|
+
## 使用方法
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import type { Session, SessionStatus, TokenUsage } from '@claudetree/shared';
|
|
61
|
+
|
|
62
|
+
const session: Session = {
|
|
63
|
+
id: 'abc123',
|
|
64
|
+
status: 'running',
|
|
65
|
+
// ...
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## リンク
|
|
70
|
+
|
|
71
|
+
- [GitHubリポジトリ](https://github.com/wonjangcloud9/claude-tree)
|
|
72
|
+
- [CLIパッケージ](https://www.npmjs.com/package/@claudetree/cli)
|
|
73
|
+
|
|
74
|
+
## ライセンス
|
|
75
|
+
|
|
76
|
+
MIT
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="README.md">English</a> |
|
|
3
|
+
<a href="README.ko.md">한국어</a> |
|
|
4
|
+
<a href="README.ja.md">日本語</a> |
|
|
5
|
+
<a href="README.zh.md">中文</a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# @claudetree/shared
|
|
9
|
+
|
|
10
|
+
claudetree의 공유 TypeScript 타입과 유틸리티.
|
|
11
|
+
|
|
12
|
+
## 설치
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @claudetree/shared
|
|
16
|
+
# 또는
|
|
17
|
+
pnpm add @claudetree/shared
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 타입
|
|
21
|
+
|
|
22
|
+
### Session
|
|
23
|
+
```typescript
|
|
24
|
+
interface Session {
|
|
25
|
+
id: string;
|
|
26
|
+
worktreeId: string;
|
|
27
|
+
claudeSessionId: string | null;
|
|
28
|
+
status: SessionStatus;
|
|
29
|
+
issueNumber: number | null;
|
|
30
|
+
prompt: string | null;
|
|
31
|
+
usage: TokenUsage | null;
|
|
32
|
+
// ...
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type SessionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### TokenUsage
|
|
39
|
+
```typescript
|
|
40
|
+
interface TokenUsage {
|
|
41
|
+
inputTokens: number;
|
|
42
|
+
outputTokens: number;
|
|
43
|
+
cacheReadInputTokens: number;
|
|
44
|
+
cacheCreationInputTokens: number;
|
|
45
|
+
totalCostUsd: number;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 기타 타입
|
|
50
|
+
- `Worktree` - Git worktree 정보
|
|
51
|
+
- `Issue` - GitHub 이슈 데이터
|
|
52
|
+
- `SessionEvent` - 세션 활동 이벤트
|
|
53
|
+
- `ToolApproval` - 도구 승인 요청
|
|
54
|
+
- `CodeReview` - 코드 리뷰 요청
|
|
55
|
+
- `SessionTemplate` - 세션 템플릿
|
|
56
|
+
|
|
57
|
+
## 사용법
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import type { Session, SessionStatus, TokenUsage } from '@claudetree/shared';
|
|
61
|
+
|
|
62
|
+
const session: Session = {
|
|
63
|
+
id: 'abc123',
|
|
64
|
+
status: 'running',
|
|
65
|
+
// ...
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 링크
|
|
70
|
+
|
|
71
|
+
- [GitHub 저장소](https://github.com/wonjangcloud9/claude-tree)
|
|
72
|
+
- [CLI 패키지](https://www.npmjs.com/package/@claudetree/cli)
|
|
73
|
+
|
|
74
|
+
## 라이선스
|
|
75
|
+
|
|
76
|
+
MIT
|
package/README.md
CHANGED
package/README.zh.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="README.md">English</a> |
|
|
3
|
+
<a href="README.ko.md">한국어</a> |
|
|
4
|
+
<a href="README.ja.md">日本語</a> |
|
|
5
|
+
<a href="README.zh.md">中文</a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# @claudetree/shared
|
|
9
|
+
|
|
10
|
+
claudetree的共享TypeScript类型和工具。
|
|
11
|
+
|
|
12
|
+
## 安装
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @claudetree/shared
|
|
16
|
+
# 或
|
|
17
|
+
pnpm add @claudetree/shared
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 类型
|
|
21
|
+
|
|
22
|
+
### Session
|
|
23
|
+
```typescript
|
|
24
|
+
interface Session {
|
|
25
|
+
id: string;
|
|
26
|
+
worktreeId: string;
|
|
27
|
+
claudeSessionId: string | null;
|
|
28
|
+
status: SessionStatus;
|
|
29
|
+
issueNumber: number | null;
|
|
30
|
+
prompt: string | null;
|
|
31
|
+
usage: TokenUsage | null;
|
|
32
|
+
// ...
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type SessionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### TokenUsage
|
|
39
|
+
```typescript
|
|
40
|
+
interface TokenUsage {
|
|
41
|
+
inputTokens: number;
|
|
42
|
+
outputTokens: number;
|
|
43
|
+
cacheReadInputTokens: number;
|
|
44
|
+
cacheCreationInputTokens: number;
|
|
45
|
+
totalCostUsd: number;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 其他类型
|
|
50
|
+
- `Worktree` - Git worktree信息
|
|
51
|
+
- `Issue` - GitHub问题数据
|
|
52
|
+
- `SessionEvent` - 会话活动事件
|
|
53
|
+
- `ToolApproval` - 工具审批请求
|
|
54
|
+
- `CodeReview` - 代码审查请求
|
|
55
|
+
- `SessionTemplate` - 会话模板
|
|
56
|
+
|
|
57
|
+
## 使用方法
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import type { Session, SessionStatus, TokenUsage } from '@claudetree/shared';
|
|
61
|
+
|
|
62
|
+
const session: Session = {
|
|
63
|
+
id: 'abc123',
|
|
64
|
+
status: 'running',
|
|
65
|
+
// ...
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 链接
|
|
70
|
+
|
|
71
|
+
- [GitHub仓库](https://github.com/wonjangcloud9/claude-tree)
|
|
72
|
+
- [CLI包](https://www.npmjs.com/package/@claudetree/cli)
|
|
73
|
+
|
|
74
|
+
## 许可证
|
|
75
|
+
|
|
76
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudetree/shared",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Shared types and utilities for claudetree",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"dist",
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
20
|
-
"dev": "tsc --watch",
|
|
21
|
-
"prepublishOnly": "pnpm build"
|
|
22
|
-
},
|
|
23
18
|
"repository": {
|
|
24
19
|
"type": "git",
|
|
25
20
|
"url": "https://github.com/wonjangcloud9/claude-tree.git",
|
|
@@ -29,5 +24,9 @@
|
|
|
29
24
|
"license": "MIT",
|
|
30
25
|
"devDependencies": {
|
|
31
26
|
"typescript": "^5.7.0"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc",
|
|
30
|
+
"dev": "tsc --watch"
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
}
|