@claudetree/shared 0.1.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 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.
@@ -0,0 +1,2 @@
1
+ export * from './types/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './types/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export type ReviewStatus = 'pending' | 'approved' | 'rejected' | 'changes_requested';
2
+ export interface FileChange {
3
+ path: string;
4
+ additions: number;
5
+ deletions: number;
6
+ status: 'added' | 'modified' | 'deleted';
7
+ }
8
+ export interface CodeReview {
9
+ id: string;
10
+ sessionId: string;
11
+ status: ReviewStatus;
12
+ comment: string | null;
13
+ changes: FileChange[];
14
+ requestedAt: Date;
15
+ resolvedAt: Date | null;
16
+ }
17
+ export interface SerializedCodeReview extends Omit<CodeReview, 'requestedAt' | 'resolvedAt'> {
18
+ requestedAt: string;
19
+ resolvedAt: string | null;
20
+ }
21
+ //# sourceMappingURL=code-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-review.d.ts","sourceRoot":"","sources":["../../src/types/code-review.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,UAAU,GACV,UAAU,GACV,mBAAmB,CAAC;AAExB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,YAAY,CAAC;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=code-review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-review.js","sourceRoot":"","sources":["../../src/types/code-review.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export type EventType = 'output' | 'file_change' | 'commit' | 'test_run' | 'tool_call' | 'error' | 'milestone';
2
+ export interface SessionEvent {
3
+ id: string;
4
+ sessionId: string;
5
+ type: EventType;
6
+ content: string;
7
+ metadata?: Record<string, unknown>;
8
+ timestamp: Date;
9
+ }
10
+ export interface SerializedSessionEvent extends Omit<SessionEvent, 'timestamp'> {
11
+ timestamp: string;
12
+ }
13
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,UAAU,GACV,WAAW,GACX,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export * from './session.js';
2
+ export * from './worktree.js';
3
+ export * from './issue.js';
4
+ export * from './event.js';
5
+ export * from './tool-approval.js';
6
+ export * from './code-review.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './session.js';
2
+ export * from './worktree.js';
3
+ export * from './issue.js';
4
+ export * from './event.js';
5
+ export * from './tool-approval.js';
6
+ export * from './code-review.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface Issue {
2
+ number: number;
3
+ title: string;
4
+ body: string;
5
+ labels: string[];
6
+ state: 'open' | 'closed';
7
+ url: string;
8
+ }
9
+ export interface CreatePRInput {
10
+ owner: string;
11
+ repo: string;
12
+ title: string;
13
+ body: string;
14
+ head: string;
15
+ base: string;
16
+ }
17
+ //# sourceMappingURL=issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../src/types/issue.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../src/types/issue.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export type SessionStatus = 'pending' | 'running' | 'paused' | 'completed' | 'failed';
2
+ export interface Session {
3
+ id: string;
4
+ worktreeId: string;
5
+ claudeSessionId: string | null;
6
+ status: SessionStatus;
7
+ issueNumber: number | null;
8
+ prompt: string | null;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
12
+ export interface CreateSessionInput {
13
+ worktreeId: string;
14
+ issueNumber?: number;
15
+ prompt?: string;
16
+ }
17
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ export type ApprovalStatus = 'pending' | 'approved' | 'rejected';
2
+ export interface ToolApproval {
3
+ id: string;
4
+ sessionId: string;
5
+ toolName: string;
6
+ parameters: Record<string, unknown>;
7
+ status: ApprovalStatus;
8
+ approvedBy: string | null;
9
+ requestedAt: Date;
10
+ resolvedAt: Date | null;
11
+ }
12
+ export interface SerializedToolApproval extends Omit<ToolApproval, 'requestedAt' | 'resolvedAt'> {
13
+ requestedAt: string;
14
+ resolvedAt: string | null;
15
+ }
16
+ //# sourceMappingURL=tool-approval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-approval.d.ts","sourceRoot":"","sources":["../../src/types/tool-approval.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,IAAI,CAAC;IAClB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,YAAY,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tool-approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-approval.js","sourceRoot":"","sources":["../../src/types/tool-approval.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface Worktree {
2
+ id: string;
3
+ path: string;
4
+ branch: string;
5
+ isMainWorktree: boolean;
6
+ issueNumber: number | null;
7
+ createdAt: Date;
8
+ }
9
+ export interface CreateWorktreeInput {
10
+ path: string;
11
+ branch: string;
12
+ issueNumber?: number;
13
+ }
14
+ export interface WorktreeListItem {
15
+ path: string;
16
+ branch: string;
17
+ commit: string;
18
+ isMainWorktree: boolean;
19
+ }
20
+ //# sourceMappingURL=worktree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/types/worktree.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worktree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/types/worktree.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@claudetree/shared",
3
+ "version": "0.1.0",
4
+ "description": "Shared types and utilities for claudetree",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/notwonjang/claude-tree.git",
20
+ "directory": "packages/shared"
21
+ },
22
+ "license": "MIT",
23
+ "devDependencies": {
24
+ "typescript": "^5.7.0"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc",
28
+ "dev": "tsc --watch"
29
+ }
30
+ }