@artyfacts/claude 1.3.24 → 1.3.26
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/dist/chunk-7QRIXWMF.mjs +1085 -0
- package/dist/chunk-HPMSVN7C.mjs +1084 -0
- package/dist/cli.js +145 -77
- package/dist/cli.mjs +49 -32
- package/dist/index.d.mts +100 -29
- package/dist/index.d.ts +100 -29
- package/dist/index.js +280 -80
- package/dist/index.mjs +184 -35
- package/package.json +9 -9
- package/src/cli.ts +79 -46
- package/src/context.ts +117 -41
- package/src/executor.ts +52 -26
- package/src/listener.ts +42 -15
- package/src/tools/handlers.ts +112 -17
- package/src/tools/registry.ts +124 -20
- package/src/tools/types.ts +87 -0
package/src/tools/registry.ts
CHANGED
|
@@ -413,7 +413,7 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
413
413
|
},
|
|
414
414
|
|
|
415
415
|
// ---------------------------------------------------------------------------
|
|
416
|
-
// Task Tools
|
|
416
|
+
// Task Tools (v2 - tasks are first-class entities)
|
|
417
417
|
// ---------------------------------------------------------------------------
|
|
418
418
|
get_task: {
|
|
419
419
|
name: 'get_task',
|
|
@@ -423,7 +423,7 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
423
423
|
properties: {
|
|
424
424
|
task_id: {
|
|
425
425
|
type: 'string',
|
|
426
|
-
description: 'The task UUID
|
|
426
|
+
description: 'The task UUID',
|
|
427
427
|
},
|
|
428
428
|
},
|
|
429
429
|
required: ['task_id'],
|
|
@@ -432,13 +432,13 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
432
432
|
|
|
433
433
|
list_tasks: {
|
|
434
434
|
name: 'list_tasks',
|
|
435
|
-
description: 'List tasks with
|
|
435
|
+
description: 'List tasks from the queue. Returns tasks from the tasks table with goal context.',
|
|
436
436
|
input_schema: {
|
|
437
437
|
type: 'object',
|
|
438
438
|
properties: {
|
|
439
|
-
|
|
439
|
+
goal_id: {
|
|
440
440
|
type: 'string',
|
|
441
|
-
description: 'Filter by
|
|
441
|
+
description: 'Filter by goal ID',
|
|
442
442
|
},
|
|
443
443
|
status: {
|
|
444
444
|
type: 'string',
|
|
@@ -459,21 +459,55 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
459
459
|
},
|
|
460
460
|
},
|
|
461
461
|
|
|
462
|
+
create_goal: {
|
|
463
|
+
name: 'create_goal',
|
|
464
|
+
description: 'Create a new goal (v2). Goals are first-class entities that contain tasks.',
|
|
465
|
+
input_schema: {
|
|
466
|
+
type: 'object',
|
|
467
|
+
properties: {
|
|
468
|
+
title: {
|
|
469
|
+
type: 'string',
|
|
470
|
+
description: 'Goal title',
|
|
471
|
+
},
|
|
472
|
+
description: {
|
|
473
|
+
type: 'string',
|
|
474
|
+
description: 'Goal description and objectives',
|
|
475
|
+
},
|
|
476
|
+
priority: {
|
|
477
|
+
type: 'string',
|
|
478
|
+
enum: ['low', 'medium', 'high', 'urgent'],
|
|
479
|
+
default: 'medium',
|
|
480
|
+
description: 'Priority level',
|
|
481
|
+
},
|
|
482
|
+
target_date: {
|
|
483
|
+
type: 'string',
|
|
484
|
+
description: 'Optional: target completion date (ISO format)',
|
|
485
|
+
},
|
|
486
|
+
tags: {
|
|
487
|
+
type: 'array',
|
|
488
|
+
items: { type: 'string' },
|
|
489
|
+
description: 'Optional: tags for categorization',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
required: ['title'],
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
|
|
462
496
|
create_task: {
|
|
463
497
|
name: 'create_task',
|
|
464
|
-
description: 'Create a new task
|
|
498
|
+
description: 'Create a new task under a goal.',
|
|
465
499
|
input_schema: {
|
|
466
500
|
type: 'object',
|
|
467
501
|
properties: {
|
|
468
|
-
|
|
502
|
+
goal_id: {
|
|
469
503
|
type: 'string',
|
|
470
|
-
description: 'The
|
|
504
|
+
description: 'The goal UUID to add the task to',
|
|
471
505
|
},
|
|
472
|
-
|
|
506
|
+
title: {
|
|
473
507
|
type: 'string',
|
|
474
|
-
description: 'Task title
|
|
508
|
+
description: 'Task title',
|
|
475
509
|
},
|
|
476
|
-
|
|
510
|
+
description: {
|
|
477
511
|
type: 'string',
|
|
478
512
|
description: 'Task description and requirements',
|
|
479
513
|
},
|
|
@@ -484,27 +518,43 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
484
518
|
depends_on: {
|
|
485
519
|
type: 'array',
|
|
486
520
|
items: { type: 'string' },
|
|
487
|
-
description: 'Optional:
|
|
521
|
+
description: 'Optional: task IDs this depends on',
|
|
488
522
|
},
|
|
489
523
|
priority: {
|
|
490
|
-
type: '
|
|
491
|
-
enum: [
|
|
492
|
-
|
|
524
|
+
type: 'string',
|
|
525
|
+
enum: ['low', 'medium', 'high'],
|
|
526
|
+
default: 'medium',
|
|
527
|
+
description: 'Optional: priority level',
|
|
493
528
|
},
|
|
494
529
|
},
|
|
495
|
-
required: ['
|
|
530
|
+
required: ['goal_id', 'title'],
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
claim_task: {
|
|
535
|
+
name: 'claim_task',
|
|
536
|
+
description: 'Claim a task for execution. Sets status to in_progress.',
|
|
537
|
+
input_schema: {
|
|
538
|
+
type: 'object',
|
|
539
|
+
properties: {
|
|
540
|
+
task_id: {
|
|
541
|
+
type: 'string',
|
|
542
|
+
description: 'The task UUID to claim',
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
required: ['task_id'],
|
|
496
546
|
},
|
|
497
547
|
},
|
|
498
548
|
|
|
499
549
|
complete_task: {
|
|
500
550
|
name: 'complete_task',
|
|
501
|
-
description: 'Mark a task as completed
|
|
551
|
+
description: 'Mark a task as completed. Returns list of unblocked tasks that can now be worked on.',
|
|
502
552
|
input_schema: {
|
|
503
553
|
type: 'object',
|
|
504
554
|
properties: {
|
|
505
555
|
task_id: {
|
|
506
556
|
type: 'string',
|
|
507
|
-
description: 'The task UUID
|
|
557
|
+
description: 'The task UUID',
|
|
508
558
|
},
|
|
509
559
|
output: {
|
|
510
560
|
type: 'string',
|
|
@@ -531,7 +581,7 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
531
581
|
properties: {
|
|
532
582
|
task_id: {
|
|
533
583
|
type: 'string',
|
|
534
|
-
description: 'The task UUID
|
|
584
|
+
description: 'The task UUID',
|
|
535
585
|
},
|
|
536
586
|
reason: {
|
|
537
587
|
type: 'string',
|
|
@@ -547,6 +597,58 @@ const schemas: Record<string, ToolSchema> = {
|
|
|
547
597
|
},
|
|
548
598
|
},
|
|
549
599
|
|
|
600
|
+
// ---------------------------------------------------------------------------
|
|
601
|
+
// Inbox Tools (v2)
|
|
602
|
+
// ---------------------------------------------------------------------------
|
|
603
|
+
list_inbox: {
|
|
604
|
+
name: 'list_inbox',
|
|
605
|
+
description: 'List pending inbox items (decisions, approvals, reviews).',
|
|
606
|
+
input_schema: {
|
|
607
|
+
type: 'object',
|
|
608
|
+
properties: {
|
|
609
|
+
status: {
|
|
610
|
+
type: 'string',
|
|
611
|
+
enum: ['pending', 'resolved'],
|
|
612
|
+
description: 'Filter by status',
|
|
613
|
+
},
|
|
614
|
+
kind: {
|
|
615
|
+
type: 'string',
|
|
616
|
+
enum: ['decision', 'approval', 'review'],
|
|
617
|
+
description: 'Filter by type',
|
|
618
|
+
},
|
|
619
|
+
limit: {
|
|
620
|
+
type: 'number',
|
|
621
|
+
default: 20,
|
|
622
|
+
description: 'Max results',
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
required: [],
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
|
|
629
|
+
resolve_inbox: {
|
|
630
|
+
name: 'resolve_inbox',
|
|
631
|
+
description: 'Resolve an inbox item with a decision. May trigger auto-execution.',
|
|
632
|
+
input_schema: {
|
|
633
|
+
type: 'object',
|
|
634
|
+
properties: {
|
|
635
|
+
inbox_id: {
|
|
636
|
+
type: 'string',
|
|
637
|
+
description: 'The inbox item UUID',
|
|
638
|
+
},
|
|
639
|
+
decision: {
|
|
640
|
+
type: 'string',
|
|
641
|
+
description: 'The decision/resolution',
|
|
642
|
+
},
|
|
643
|
+
notes: {
|
|
644
|
+
type: 'string',
|
|
645
|
+
description: 'Optional: additional notes',
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
required: ['inbox_id', 'decision'],
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
|
|
550
652
|
// ---------------------------------------------------------------------------
|
|
551
653
|
// Blocker Tools
|
|
552
654
|
// ---------------------------------------------------------------------------
|
|
@@ -713,7 +815,9 @@ export const permissionToTools: Record<string, string[]> = {
|
|
|
713
815
|
'agents:read': ['get_agent', 'list_agents'],
|
|
714
816
|
'agents:write': ['create_agent', 'update_agent'],
|
|
715
817
|
'tasks:read': ['get_task', 'list_tasks'],
|
|
716
|
-
'tasks:write': ['create_task', 'complete_task', 'block_task'],
|
|
818
|
+
'tasks:write': ['create_task', 'claim_task', 'complete_task', 'block_task'],
|
|
819
|
+
'inbox:read': ['list_inbox'],
|
|
820
|
+
'inbox:write': ['resolve_inbox'],
|
|
717
821
|
'blockers:read': ['get_blocker', 'list_blockers'],
|
|
718
822
|
'blockers:write': ['create_blocker', 'resolve_blocker'],
|
|
719
823
|
'org:read': ['get_org_context', 'get_project', 'list_projects'],
|
package/src/tools/types.ts
CHANGED
|
@@ -1,7 +1,94 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool Types for Artyfacts
|
|
3
|
+
*
|
|
4
|
+
* Updated for Schema v2 - tasks are now first-class entities
|
|
3
5
|
*/
|
|
4
6
|
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// API v2 Types
|
|
9
|
+
// =============================================================================
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Task from the tasks table (v2)
|
|
13
|
+
*/
|
|
14
|
+
export interface Task {
|
|
15
|
+
id: string;
|
|
16
|
+
goal_id: string;
|
|
17
|
+
goal_title?: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
status: 'pending' | 'in_progress' | 'blocked' | 'done';
|
|
21
|
+
priority: 'low' | 'medium' | 'high';
|
|
22
|
+
assignee_agent_id?: string;
|
|
23
|
+
created_at?: string;
|
|
24
|
+
updated_at?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Task queue response (GET /api/v1/tasks/queue)
|
|
29
|
+
*/
|
|
30
|
+
export interface TaskQueueResponse {
|
|
31
|
+
tasks: Task[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Task claim response (POST /api/v1/tasks/:id/claim)
|
|
36
|
+
*/
|
|
37
|
+
export interface TaskClaimResponse {
|
|
38
|
+
task: Task;
|
|
39
|
+
claimed: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Unblocked task summary
|
|
44
|
+
*/
|
|
45
|
+
export interface UnblockedTask {
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Task complete response (POST /api/v1/tasks/:id/complete)
|
|
52
|
+
*/
|
|
53
|
+
export interface TaskCompleteResponse {
|
|
54
|
+
task: Task;
|
|
55
|
+
unblocked_tasks: UnblockedTask[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Inbox item
|
|
60
|
+
*/
|
|
61
|
+
export interface InboxItem {
|
|
62
|
+
id: string;
|
|
63
|
+
kind: 'decision' | 'approval' | 'review';
|
|
64
|
+
title: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
artifact_id?: string;
|
|
67
|
+
task_id?: string;
|
|
68
|
+
options?: Array<{ name: string; description?: string }>;
|
|
69
|
+
status: 'pending' | 'resolved';
|
|
70
|
+
created_at?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Inbox list response (GET /api/v1/inbox)
|
|
75
|
+
*/
|
|
76
|
+
export interface InboxResponse {
|
|
77
|
+
items: InboxItem[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Inbox resolve response (POST /api/v1/inbox/:id/resolve)
|
|
82
|
+
*/
|
|
83
|
+
export interface InboxResolveResponse {
|
|
84
|
+
item: InboxItem;
|
|
85
|
+
auto_executed?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// =============================================================================
|
|
89
|
+
// Tool Schema Types
|
|
90
|
+
// =============================================================================
|
|
91
|
+
|
|
5
92
|
/**
|
|
6
93
|
* JSON Schema for tool input
|
|
7
94
|
*/
|