agkan 3.14.1 → 3.15.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.
- package/README.ja.md +29 -0
- package/README.md +29 -0
- package/dist/board/BulkRunService.d.ts.map +1 -1
- package/dist/board/BulkRunService.js +20 -4
- package/dist/board/BulkRunService.js.map +1 -1
- package/dist/board/boardRoutes.d.ts +1 -0
- package/dist/board/boardRoutes.d.ts.map +1 -1
- package/dist/board/boardRoutes.js +17 -1
- package/dist/board/boardRoutes.js.map +1 -1
- package/dist/board/client/main.js +18 -4
- package/dist/board/server.js +1 -1
- package/dist/board/server.js.map +1 -1
- package/dist/cli/commands/agent-guide.d.ts.map +1 -1
- package/dist/cli/commands/agent-guide.js +8 -1
- package/dist/cli/commands/agent-guide.js.map +1 -1
- package/dist/cli/commands/block/add.js +10 -10
- package/dist/cli/commands/block/add.js.map +1 -1
- package/dist/cli/commands/block/list.js +4 -4
- package/dist/cli/commands/block/list.js.map +1 -1
- package/dist/cli/commands/block/remove.js +9 -9
- package/dist/cli/commands/block/remove.js.map +1 -1
- package/dist/cli/commands/comment/add.js +2 -2
- package/dist/cli/commands/comment/add.js.map +1 -1
- package/dist/cli/commands/comment/delete.js +2 -2
- package/dist/cli/commands/comment/delete.js.map +1 -1
- package/dist/cli/commands/comment/list.js +2 -2
- package/dist/cli/commands/comment/list.js.map +1 -1
- package/dist/cli/commands/config/get.js +2 -2
- package/dist/cli/commands/config/get.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +9 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/meta/delete.js +3 -3
- package/dist/cli/commands/meta/delete.js.map +1 -1
- package/dist/cli/commands/meta/get.js +3 -3
- package/dist/cli/commands/meta/get.js.map +1 -1
- package/dist/cli/commands/meta/list.js +2 -2
- package/dist/cli/commands/meta/list.js.map +1 -1
- package/dist/cli/commands/meta/set.js +4 -4
- package/dist/cli/commands/meta/set.js.map +1 -1
- package/dist/cli/commands/tag/add.js +7 -7
- package/dist/cli/commands/tag/add.js.map +1 -1
- package/dist/cli/commands/tag/attach.d.ts.map +1 -1
- package/dist/cli/commands/tag/attach.js +14 -25
- package/dist/cli/commands/tag/attach.js.map +1 -1
- package/dist/cli/commands/tag/delete.d.ts.map +1 -1
- package/dist/cli/commands/tag/delete.js +12 -24
- package/dist/cli/commands/tag/delete.js.map +1 -1
- package/dist/cli/commands/tag/detach.d.ts.map +1 -1
- package/dist/cli/commands/tag/detach.js +14 -25
- package/dist/cli/commands/tag/detach.js.map +1 -1
- package/dist/cli/commands/tag/list.js +2 -2
- package/dist/cli/commands/tag/list.js.map +1 -1
- package/dist/cli/commands/tag/rename.d.ts.map +1 -1
- package/dist/cli/commands/tag/rename.js +15 -27
- package/dist/cli/commands/tag/rename.js.map +1 -1
- package/dist/cli/commands/tag/show.js +3 -3
- package/dist/cli/commands/tag/show.js.map +1 -1
- package/dist/cli/commands/task/add.js +11 -11
- package/dist/cli/commands/task/add.js.map +1 -1
- package/dist/cli/commands/task/archive.js +3 -3
- package/dist/cli/commands/task/archive.js.map +1 -1
- package/dist/cli/commands/task/copy.js +5 -5
- package/dist/cli/commands/task/copy.js.map +1 -1
- package/dist/cli/commands/task/count.js +4 -4
- package/dist/cli/commands/task/count.js.map +1 -1
- package/dist/cli/commands/task/delete.js +3 -3
- package/dist/cli/commands/task/delete.js.map +1 -1
- package/dist/cli/commands/task/find.js +2 -2
- package/dist/cli/commands/task/find.js.map +1 -1
- package/dist/cli/commands/task/get.js +3 -3
- package/dist/cli/commands/task/get.js.map +1 -1
- package/dist/cli/commands/task/list.d.ts.map +1 -1
- package/dist/cli/commands/task/list.js +169 -170
- package/dist/cli/commands/task/list.js.map +1 -1
- package/dist/cli/commands/task/purge.js +3 -3
- package/dist/cli/commands/task/purge.js.map +1 -1
- package/dist/cli/commands/task/unarchive.js +3 -3
- package/dist/cli/commands/task/unarchive.js.map +1 -1
- package/dist/cli/commands/task/update-helpers.js +11 -11
- package/dist/cli/commands/task/update-helpers.js.map +1 -1
- package/dist/cli/commands/task/update-parent.js +8 -8
- package/dist/cli/commands/task/update-parent.js.map +1 -1
- package/dist/cli/commands/task/update.js +3 -3
- package/dist/cli/commands/task/update.js.map +1 -1
- package/dist/cli/utils/error-handler.js +4 -4
- package/dist/cli/utils/error-handler.js.map +1 -1
- package/dist/cli/utils/output-formatter.js +2 -2
- package/dist/cli/utils/output-formatter.js.map +1 -1
- package/dist/cli/utils/tag-resolver.d.ts +21 -0
- package/dist/cli/utils/tag-resolver.d.ts.map +1 -0
- package/dist/cli/utils/tag-resolver.js +22 -0
- package/dist/cli/utils/tag-resolver.js.map +1 -0
- package/dist/db/config.d.ts +8 -0
- package/dist/db/config.d.ts.map +1 -1
- package/dist/db/config.js +14 -0
- package/dist/db/config.js.map +1 -1
- package/dist/hooks/hook-stop.mjs +135 -56
- package/dist/services/index.d.ts +1 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/types.d.ts +28 -0
- package/dist/services/types.d.ts.map +1 -0
- package/dist/services/types.js +6 -0
- package/dist/services/types.js.map +1 -0
- package/dist/terminal/PtySessionService.d.ts +1 -1
- package/dist/terminal/PtySessionService.d.ts.map +1 -1
- package/dist/terminal/PtySessionService.js +14 -9
- package/dist/terminal/PtySessionService.js.map +1 -1
- package/dist/terminal/buildHookEnv.d.ts +8 -0
- package/dist/terminal/buildHookEnv.d.ts.map +1 -0
- package/dist/terminal/buildHookEnv.js +24 -0
- package/dist/terminal/buildHookEnv.js.map +1 -0
- package/dist/utils/runTargetStatus.d.ts +9 -0
- package/dist/utils/runTargetStatus.d.ts.map +1 -0
- package/dist/utils/runTargetStatus.js +17 -0
- package/dist/utils/runTargetStatus.js.map +1 -0
- package/package.json +20 -30
- package/dist/board/client/board.js +0 -2743
- package/dist/cli/utils/response-formatter.d.ts +0 -19
- package/dist/cli/utils/response-formatter.d.ts.map +0 -1
- package/dist/cli/utils/response-formatter.js +0 -43
- package/dist/cli/utils/response-formatter.js.map +0 -1
- package/dist/models/Attachment.d.ts +0 -25
- package/dist/models/Attachment.d.ts.map +0 -1
- package/dist/models/Attachment.js +0 -7
- package/dist/models/Attachment.js.map +0 -1
- package/dist/services/AttachmentService.d.ts +0 -62
- package/dist/services/AttachmentService.d.ts.map +0 -1
- package/dist/services/AttachmentService.js +0 -95
- package/dist/services/AttachmentService.js.map +0 -1
- package/dist/services/ClaudeProcessService.d.ts +0 -110
- package/dist/services/ClaudeProcessService.d.ts.map +0 -1
- package/dist/services/ClaudeProcessService.js +0 -310
- package/dist/services/ClaudeProcessService.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response formatter utility
|
|
3
|
-
* Provides consistent JSON output formatting for CLI commands
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Format a successful response in JSON format
|
|
7
|
-
* @param data - The data to include in the response
|
|
8
|
-
* @param metadata - Optional metadata to include
|
|
9
|
-
* @returns Formatted JSON string
|
|
10
|
-
*/
|
|
11
|
-
export declare function formatJsonSuccess(data: unknown, metadata?: unknown): string;
|
|
12
|
-
/**
|
|
13
|
-
* Format an error response in JSON format
|
|
14
|
-
* @param message - The error message
|
|
15
|
-
* @param code - Optional error code
|
|
16
|
-
* @returns Formatted JSON string
|
|
17
|
-
*/
|
|
18
|
-
export declare function formatJsonError(message: string, code?: string): string;
|
|
19
|
-
//# sourceMappingURL=response-formatter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response-formatter.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/response-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAW3E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAatE"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Response formatter utility
|
|
4
|
-
* Provides consistent JSON output formatting for CLI commands
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.formatJsonSuccess = formatJsonSuccess;
|
|
8
|
-
exports.formatJsonError = formatJsonError;
|
|
9
|
-
/**
|
|
10
|
-
* Format a successful response in JSON format
|
|
11
|
-
* @param data - The data to include in the response
|
|
12
|
-
* @param metadata - Optional metadata to include
|
|
13
|
-
* @returns Formatted JSON string
|
|
14
|
-
*/
|
|
15
|
-
function formatJsonSuccess(data, metadata) {
|
|
16
|
-
const response = {
|
|
17
|
-
success: true,
|
|
18
|
-
data,
|
|
19
|
-
};
|
|
20
|
-
if (metadata !== undefined) {
|
|
21
|
-
response.metadata = metadata;
|
|
22
|
-
}
|
|
23
|
-
return JSON.stringify(response, null, 2);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Format an error response in JSON format
|
|
27
|
-
* @param message - The error message
|
|
28
|
-
* @param code - Optional error code
|
|
29
|
-
* @returns Formatted JSON string
|
|
30
|
-
*/
|
|
31
|
-
function formatJsonError(message, code) {
|
|
32
|
-
const response = {
|
|
33
|
-
success: false,
|
|
34
|
-
error: {
|
|
35
|
-
message,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
if (code !== undefined) {
|
|
39
|
-
response.error.code = code;
|
|
40
|
-
}
|
|
41
|
-
return JSON.stringify(response, null, 2);
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=response-formatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response-formatter.js","sourceRoot":"","sources":["../../../src/cli/utils/response-formatter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAQH,8CAWC;AAQD,0CAaC;AAtCD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,IAAa,EAAE,QAAkB;IACjE,MAAM,QAAQ,GAA4D;QACxE,OAAO,EAAE,IAAI;QACb,IAAI;KACL,CAAC;IAEF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,OAAe,EAAE,IAAa;IAC5D,MAAM,QAAQ,GAAoE;QAChF,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL,OAAO;SACR;KACF,CAAC;IAEF,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Attachment model
|
|
3
|
-
* Type definitions for attachments
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Complete attachment type definition
|
|
7
|
-
* Represents an attachment retrieved from the database
|
|
8
|
-
*/
|
|
9
|
-
export interface Attachment {
|
|
10
|
-
id: number;
|
|
11
|
-
task_id: number;
|
|
12
|
-
file_name: string;
|
|
13
|
-
file_path: string;
|
|
14
|
-
created_at: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Attachment creation input type
|
|
18
|
-
* Excludes id and created_at as they are auto-generated
|
|
19
|
-
*/
|
|
20
|
-
export interface CreateAttachmentInput {
|
|
21
|
-
task_id: number;
|
|
22
|
-
file_name: string;
|
|
23
|
-
file_path: string;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=Attachment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../src/models/Attachment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../src/models/Attachment.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Attachment, CreateAttachmentInput } from '../models';
|
|
2
|
-
import Database from 'better-sqlite3';
|
|
3
|
-
/**
|
|
4
|
-
* Attachment Service
|
|
5
|
-
* Provides management of attachment records
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* **Future Feature**: This service is fully implemented but CLI commands are not yet available.
|
|
9
|
-
* See docs/planned-features.md for implementation timeline and planned CLI interface.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const service = new AttachmentService();
|
|
14
|
-
* const attachment = service.createAttachment({
|
|
15
|
-
* task_id: 1,
|
|
16
|
-
* file_name: 'design.pdf',
|
|
17
|
-
* file_path: '/path/to/design.pdf'
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare class AttachmentService {
|
|
22
|
-
private db;
|
|
23
|
-
constructor(db?: Database.Database);
|
|
24
|
-
/**
|
|
25
|
-
* Create a new attachment record
|
|
26
|
-
*
|
|
27
|
-
* @remarks
|
|
28
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
29
|
-
* Planned command: `agkan task attach add <task-id> <file-path>`
|
|
30
|
-
*
|
|
31
|
-
* @param input - Attachment creation input
|
|
32
|
-
* @returns Created attachment record
|
|
33
|
-
* @throws Will throw if task_id does not exist (foreign key constraint)
|
|
34
|
-
*/
|
|
35
|
-
createAttachment(input: CreateAttachmentInput): Attachment;
|
|
36
|
-
/**
|
|
37
|
-
* Get attachments for a specific task
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
41
|
-
* Planned command: `agkan task attach list <task-id>`
|
|
42
|
-
*
|
|
43
|
-
* @param taskId - Task ID
|
|
44
|
-
* @returns Array of attachments ordered by creation date (newest first)
|
|
45
|
-
*/
|
|
46
|
-
getAttachmentsByTaskId(taskId: number): Attachment[];
|
|
47
|
-
/**
|
|
48
|
-
* Delete an attachment record
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
52
|
-
* Planned command: `agkan task attach delete <attachment-id>`
|
|
53
|
-
*
|
|
54
|
-
* @param id - Attachment ID
|
|
55
|
-
* @returns True if deletion succeeded, false if not found
|
|
56
|
-
*
|
|
57
|
-
* @todo Implement file deletion from filesystem
|
|
58
|
-
* @todo Add --keep-file option to CLI command
|
|
59
|
-
*/
|
|
60
|
-
deleteAttachment(id: number): boolean;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=AttachmentService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentService.d.ts","sourceRoot":"","sources":["../../src/services/AttachmentService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,EAAE,CAAoB;gBAElB,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ;IAIlC;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,UAAU;IAoB1D;;;;;;;;;OASG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE;IAOpD;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAetC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AttachmentService = void 0;
|
|
4
|
-
const connection_1 = require("../db/connection");
|
|
5
|
-
/**
|
|
6
|
-
* Attachment Service
|
|
7
|
-
* Provides management of attachment records
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* **Future Feature**: This service is fully implemented but CLI commands are not yet available.
|
|
11
|
-
* See docs/planned-features.md for implementation timeline and planned CLI interface.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* const service = new AttachmentService();
|
|
16
|
-
* const attachment = service.createAttachment({
|
|
17
|
-
* task_id: 1,
|
|
18
|
-
* file_name: 'design.pdf',
|
|
19
|
-
* file_path: '/path/to/design.pdf'
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
class AttachmentService {
|
|
24
|
-
constructor(db) {
|
|
25
|
-
this.db = db || (0, connection_1.getDatabase)();
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Create a new attachment record
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
32
|
-
* Planned command: `agkan task attach add <task-id> <file-path>`
|
|
33
|
-
*
|
|
34
|
-
* @param input - Attachment creation input
|
|
35
|
-
* @returns Created attachment record
|
|
36
|
-
* @throws Will throw if task_id does not exist (foreign key constraint)
|
|
37
|
-
*/
|
|
38
|
-
createAttachment(input) {
|
|
39
|
-
const db = this.db;
|
|
40
|
-
const now = new Date().toISOString();
|
|
41
|
-
const stmt = db.prepare(`
|
|
42
|
-
INSERT INTO attachments (task_id, file_name, file_path, created_at)
|
|
43
|
-
VALUES (?, ?, ?, ?)
|
|
44
|
-
`);
|
|
45
|
-
const result = stmt.run(input.task_id, input.file_name, input.file_path, now);
|
|
46
|
-
return {
|
|
47
|
-
id: result.lastInsertRowid,
|
|
48
|
-
task_id: input.task_id,
|
|
49
|
-
file_name: input.file_name,
|
|
50
|
-
file_path: input.file_path,
|
|
51
|
-
created_at: now,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Get attachments for a specific task
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
59
|
-
* Planned command: `agkan task attach list <task-id>`
|
|
60
|
-
*
|
|
61
|
-
* @param taskId - Task ID
|
|
62
|
-
* @returns Array of attachments ordered by creation date (newest first)
|
|
63
|
-
*/
|
|
64
|
-
getAttachmentsByTaskId(taskId) {
|
|
65
|
-
const db = this.db;
|
|
66
|
-
const stmt = db.prepare('SELECT * FROM attachments WHERE task_id = ? ORDER BY created_at DESC');
|
|
67
|
-
return stmt.all(taskId);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Delete an attachment record
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* **Future Feature**: CLI command not yet implemented.
|
|
74
|
-
* Planned command: `agkan task attach delete <attachment-id>`
|
|
75
|
-
*
|
|
76
|
-
* @param id - Attachment ID
|
|
77
|
-
* @returns True if deletion succeeded, false if not found
|
|
78
|
-
*
|
|
79
|
-
* @todo Implement file deletion from filesystem
|
|
80
|
-
* @todo Add --keep-file option to CLI command
|
|
81
|
-
*/
|
|
82
|
-
deleteAttachment(id) {
|
|
83
|
-
const db = this.db;
|
|
84
|
-
const stmt = db.prepare('SELECT * FROM attachments WHERE id = ?');
|
|
85
|
-
const attachment = stmt.get(id);
|
|
86
|
-
if (!attachment) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
const deleteStmt = db.prepare('DELETE FROM attachments WHERE id = ?');
|
|
90
|
-
deleteStmt.run(id);
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.AttachmentService = AttachmentService;
|
|
95
|
-
//# sourceMappingURL=AttachmentService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentService.js","sourceRoot":"","sources":["../../src/services/AttachmentService.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAG/C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,iBAAiB;IAG5B,YAAY,EAAsB;QAChC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,IAAA,wBAAW,GAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;;;OAUG;IACH,gBAAgB,CAAC,KAA4B;QAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAErC,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC;;;KAGvB,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;QAE9E,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,eAAyB;YACpC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,sBAAsB,CAAC,MAAc;QACnC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAEnB,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,sEAAsE,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAiB,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAU;QACzB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAEnB,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,UAAU,GAAG,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;QACtE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEnB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnFD,8CAmFC"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { StorageBackend } from '../db/types/repository';
|
|
2
|
-
export type ClaudeStreamEvent = {
|
|
3
|
-
type: 'system';
|
|
4
|
-
subtype: string;
|
|
5
|
-
session_id?: string;
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'assistant';
|
|
9
|
-
message: {
|
|
10
|
-
content: Array<{
|
|
11
|
-
type: 'text';
|
|
12
|
-
text: string;
|
|
13
|
-
} | {
|
|
14
|
-
type: 'tool_use';
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
input: Record<string, unknown>;
|
|
18
|
-
}>;
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
};
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'result';
|
|
24
|
-
subtype: string;
|
|
25
|
-
result?: string;
|
|
26
|
-
duration_ms?: number;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
} | {
|
|
29
|
-
type: string;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
export type OutputEvent = {
|
|
33
|
-
kind: 'text';
|
|
34
|
-
text: string;
|
|
35
|
-
} | {
|
|
36
|
-
kind: 'tool_use';
|
|
37
|
-
name: string;
|
|
38
|
-
input: Record<string, unknown>;
|
|
39
|
-
} | {
|
|
40
|
-
kind: 'done';
|
|
41
|
-
exitCode: number;
|
|
42
|
-
} | {
|
|
43
|
-
kind: 'error';
|
|
44
|
-
message: string;
|
|
45
|
-
};
|
|
46
|
-
export type SubscribeCallback = (event: OutputEvent) => void;
|
|
47
|
-
export interface RunLog {
|
|
48
|
-
id: number;
|
|
49
|
-
task_id: number;
|
|
50
|
-
started_at: string;
|
|
51
|
-
finished_at: string | null;
|
|
52
|
-
exit_code: number | null;
|
|
53
|
-
session_id: string | null;
|
|
54
|
-
events: OutputEvent[];
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* ClaudeProcessService
|
|
58
|
-
* Manages claude CLI processes running in stream-json mode.
|
|
59
|
-
* Keyed by taskId, supports start/stop/subscribe/list operations.
|
|
60
|
-
*/
|
|
61
|
-
export type CompletionConfirmCallback = (taskId: number, targetStatus: string) => void;
|
|
62
|
-
export declare class ClaudeProcessService {
|
|
63
|
-
private processes;
|
|
64
|
-
private db;
|
|
65
|
-
private runningTasksChangeSubscribers;
|
|
66
|
-
private userStoppedTasks;
|
|
67
|
-
private completionConfirmSubscribers;
|
|
68
|
-
constructor(db?: StorageBackend | null);
|
|
69
|
-
subscribeRunningTasksChange(callback: () => void): () => void;
|
|
70
|
-
subscribeCompletionConfirm(callback: CompletionConfirmCallback): () => void;
|
|
71
|
-
notifyCompletionConfirm(taskId: number, targetStatus: string): void;
|
|
72
|
-
isUserStopped(taskId: number): boolean;
|
|
73
|
-
private clearUserStopped;
|
|
74
|
-
private notifyRunningTasksChange;
|
|
75
|
-
/**
|
|
76
|
-
* Start a claude process for the given taskId and prompt.
|
|
77
|
-
* Prevents duplicate processes for the same taskId.
|
|
78
|
-
*/
|
|
79
|
-
startProcess(taskId: number, prompt: string, command?: string, model?: string, effort?: string): void;
|
|
80
|
-
/**
|
|
81
|
-
* Stop the process for the given taskId.
|
|
82
|
-
* Returns true if the process was found and signalled, false otherwise.
|
|
83
|
-
*/
|
|
84
|
-
stopProcess(taskId: number): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* List all currently running tasks with their command type.
|
|
87
|
-
*/
|
|
88
|
-
listRunningTasks(): {
|
|
89
|
-
taskId: number;
|
|
90
|
-
command: string;
|
|
91
|
-
}[];
|
|
92
|
-
/**
|
|
93
|
-
* Subscribe to output events for a given taskId.
|
|
94
|
-
* If process is running: replay past events and subscribe to future events.
|
|
95
|
-
* If no process but DB available: replay last saved log from DB.
|
|
96
|
-
* Returns an unsubscribe function.
|
|
97
|
-
*/
|
|
98
|
-
subscribeOutput(taskId: number, callback: SubscribeCallback): () => void;
|
|
99
|
-
/**
|
|
100
|
-
* Get the buffered output events for a taskId.
|
|
101
|
-
* Useful for late subscribers who missed earlier events.
|
|
102
|
-
*/
|
|
103
|
-
getOutputBuffer(taskId: number): ClaudeStreamEvent[];
|
|
104
|
-
/**
|
|
105
|
-
* Get saved run logs for a task from DB (most recent first, up to 5).
|
|
106
|
-
*/
|
|
107
|
-
getRunLogs(taskId: number): RunLog[];
|
|
108
|
-
private _notifySubscribers;
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=ClaudeProcessService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClaudeProcessService.d.ts","sourceRoot":"","sources":["../../src/services/ClaudeProcessService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAmB7D,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