@artyfacts/claude 1.3.24 → 1.3.25

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.
@@ -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 or section_id',
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 optional filters.',
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
- artifact_id: {
439
+ goal_id: {
440
440
  type: 'string',
441
- description: 'Filter by artifact',
441
+ description: 'Filter by goal ID',
442
442
  },
443
443
  status: {
444
444
  type: 'string',
@@ -461,19 +461,19 @@ const schemas: Record<string, ToolSchema> = {
461
461
 
462
462
  create_task: {
463
463
  name: 'create_task',
464
- description: 'Create a new task on an artifact.',
464
+ description: 'Create a new task under a goal.',
465
465
  input_schema: {
466
466
  type: 'object',
467
467
  properties: {
468
- artifact_id: {
468
+ goal_id: {
469
469
  type: 'string',
470
- description: 'The artifact to add the task to',
470
+ description: 'The goal UUID to add the task to',
471
471
  },
472
- heading: {
472
+ title: {
473
473
  type: 'string',
474
- description: 'Task title/heading',
474
+ description: 'Task title',
475
475
  },
476
- content: {
476
+ description: {
477
477
  type: 'string',
478
478
  description: 'Task description and requirements',
479
479
  },
@@ -484,27 +484,43 @@ const schemas: Record<string, ToolSchema> = {
484
484
  depends_on: {
485
485
  type: 'array',
486
486
  items: { type: 'string' },
487
- description: 'Optional: section_ids of tasks this depends on',
487
+ description: 'Optional: task IDs this depends on',
488
488
  },
489
489
  priority: {
490
- type: 'number',
491
- enum: [1, 2, 3],
492
- description: 'Optional: priority (1=high, 2=medium, 3=low)',
490
+ type: 'string',
491
+ enum: ['low', 'medium', 'high'],
492
+ default: 'medium',
493
+ description: 'Optional: priority level',
493
494
  },
494
495
  },
495
- required: ['artifact_id', 'heading', 'content'],
496
+ required: ['goal_id', 'title'],
497
+ },
498
+ },
499
+
500
+ claim_task: {
501
+ name: 'claim_task',
502
+ description: 'Claim a task for execution. Sets status to in_progress.',
503
+ input_schema: {
504
+ type: 'object',
505
+ properties: {
506
+ task_id: {
507
+ type: 'string',
508
+ description: 'The task UUID to claim',
509
+ },
510
+ },
511
+ required: ['task_id'],
496
512
  },
497
513
  },
498
514
 
499
515
  complete_task: {
500
516
  name: 'complete_task',
501
- description: 'Mark a task as completed with output.',
517
+ description: 'Mark a task as completed. Returns list of unblocked tasks that can now be worked on.',
502
518
  input_schema: {
503
519
  type: 'object',
504
520
  properties: {
505
521
  task_id: {
506
522
  type: 'string',
507
- description: 'The task UUID or section_id',
523
+ description: 'The task UUID',
508
524
  },
509
525
  output: {
510
526
  type: 'string',
@@ -531,7 +547,7 @@ const schemas: Record<string, ToolSchema> = {
531
547
  properties: {
532
548
  task_id: {
533
549
  type: 'string',
534
- description: 'The task UUID or section_id',
550
+ description: 'The task UUID',
535
551
  },
536
552
  reason: {
537
553
  type: 'string',
@@ -547,6 +563,58 @@ const schemas: Record<string, ToolSchema> = {
547
563
  },
548
564
  },
549
565
 
566
+ // ---------------------------------------------------------------------------
567
+ // Inbox Tools (v2)
568
+ // ---------------------------------------------------------------------------
569
+ list_inbox: {
570
+ name: 'list_inbox',
571
+ description: 'List pending inbox items (decisions, approvals, reviews).',
572
+ input_schema: {
573
+ type: 'object',
574
+ properties: {
575
+ status: {
576
+ type: 'string',
577
+ enum: ['pending', 'resolved'],
578
+ description: 'Filter by status',
579
+ },
580
+ kind: {
581
+ type: 'string',
582
+ enum: ['decision', 'approval', 'review'],
583
+ description: 'Filter by type',
584
+ },
585
+ limit: {
586
+ type: 'number',
587
+ default: 20,
588
+ description: 'Max results',
589
+ },
590
+ },
591
+ required: [],
592
+ },
593
+ },
594
+
595
+ resolve_inbox: {
596
+ name: 'resolve_inbox',
597
+ description: 'Resolve an inbox item with a decision. May trigger auto-execution.',
598
+ input_schema: {
599
+ type: 'object',
600
+ properties: {
601
+ inbox_id: {
602
+ type: 'string',
603
+ description: 'The inbox item UUID',
604
+ },
605
+ decision: {
606
+ type: 'string',
607
+ description: 'The decision/resolution',
608
+ },
609
+ notes: {
610
+ type: 'string',
611
+ description: 'Optional: additional notes',
612
+ },
613
+ },
614
+ required: ['inbox_id', 'decision'],
615
+ },
616
+ },
617
+
550
618
  // ---------------------------------------------------------------------------
551
619
  // Blocker Tools
552
620
  // ---------------------------------------------------------------------------
@@ -713,7 +781,9 @@ export const permissionToTools: Record<string, string[]> = {
713
781
  'agents:read': ['get_agent', 'list_agents'],
714
782
  'agents:write': ['create_agent', 'update_agent'],
715
783
  'tasks:read': ['get_task', 'list_tasks'],
716
- 'tasks:write': ['create_task', 'complete_task', 'block_task'],
784
+ 'tasks:write': ['create_task', 'claim_task', 'complete_task', 'block_task'],
785
+ 'inbox:read': ['list_inbox'],
786
+ 'inbox:write': ['resolve_inbox'],
717
787
  'blockers:read': ['get_blocker', 'list_blockers'],
718
788
  'blockers:write': ['create_blocker', 'resolve_blocker'],
719
789
  'org:read': ['get_org_context', 'get_project', 'list_projects'],
@@ -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
  */