@artyfacts/claude 1.3.23 → 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.
- package/dist/chunk-7QRIXWMF.mjs +1085 -0
- package/dist/chunk-HPMSVN7C.mjs +1084 -0
- package/dist/cli.js +146 -78
- package/dist/cli.mjs +50 -33
- package/dist/index.d.mts +100 -29
- package/dist/index.d.ts +100 -29
- package/dist/index.js +231 -80
- package/dist/index.mjs +135 -35
- package/package.json +9 -9
- package/src/cli.ts +80 -46
- package/src/context.ts +117 -41
- package/src/executor.ts +52 -26
- package/src/listener.ts +42 -15
- package/src/tools/handlers.ts +90 -17
- package/src/tools/registry.ts +90 -20
- package/src/tools/types.ts +87 -0
package/dist/index.d.mts
CHANGED
|
@@ -63,19 +63,32 @@ declare function getCredentials(options?: {
|
|
|
63
63
|
* Now supports fetching full context (organization, project, artifact, related sections)
|
|
64
64
|
* to provide Claude with the information needed to complete tasks effectively.
|
|
65
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* Task context for execution (v2)
|
|
68
|
+
*/
|
|
66
69
|
interface TaskContext$1 {
|
|
67
|
-
/** Task
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/** Task
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
/**
|
|
70
|
+
/** Task UUID */
|
|
71
|
+
id: string;
|
|
72
|
+
/** @deprecated Use id instead */
|
|
73
|
+
taskId?: string;
|
|
74
|
+
/** Task title */
|
|
75
|
+
title: string;
|
|
76
|
+
/** @deprecated Use title instead */
|
|
77
|
+
heading?: string;
|
|
78
|
+
/** Task description */
|
|
79
|
+
description?: string;
|
|
80
|
+
/** @deprecated Use description instead */
|
|
81
|
+
content?: string;
|
|
82
|
+
/** Goal UUID this task belongs to */
|
|
83
|
+
goalId: string;
|
|
84
|
+
/** @deprecated Use goalId instead */
|
|
85
|
+
artifactId?: string;
|
|
86
|
+
/** Goal title for context */
|
|
87
|
+
goalTitle?: string;
|
|
88
|
+
/** @deprecated Use goalTitle instead */
|
|
76
89
|
artifactTitle?: string;
|
|
77
|
-
/** Task priority
|
|
78
|
-
priority?:
|
|
90
|
+
/** Task priority */
|
|
91
|
+
priority?: 'low' | 'medium' | 'high';
|
|
79
92
|
/** Additional context */
|
|
80
93
|
context?: Record<string, unknown>;
|
|
81
94
|
}
|
|
@@ -121,7 +134,7 @@ declare class ClaudeExecutor {
|
|
|
121
134
|
*/
|
|
122
135
|
private runClaude;
|
|
123
136
|
/**
|
|
124
|
-
* Build the task prompt
|
|
137
|
+
* Build the task prompt (v2)
|
|
125
138
|
*/
|
|
126
139
|
private buildTaskPrompt;
|
|
127
140
|
/**
|
|
@@ -148,18 +161,39 @@ declare function createExecutor(config?: ExecutorConfig$1): ClaudeExecutor;
|
|
|
148
161
|
* Connects to the Artyfacts SSE stream and listens for task_assigned events.
|
|
149
162
|
* Uses EventSource for automatic reconnection handling.
|
|
150
163
|
*/
|
|
164
|
+
/**
|
|
165
|
+
* Task assigned event (v2)
|
|
166
|
+
* Uses task ID and goal ID (not section_id/artifact_id)
|
|
167
|
+
*/
|
|
151
168
|
interface TaskAssignedEvent {
|
|
152
169
|
type: 'task_assigned';
|
|
153
170
|
timestamp: string;
|
|
154
171
|
data: {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
172
|
+
/** Task UUID (primary identifier) */
|
|
173
|
+
id: string;
|
|
174
|
+
/** @deprecated Use id instead */
|
|
175
|
+
taskId?: string;
|
|
176
|
+
/** Goal UUID this task belongs to */
|
|
177
|
+
goalId: string;
|
|
178
|
+
/** @deprecated Use goalId instead */
|
|
179
|
+
artifactId?: string;
|
|
180
|
+
/** Task title */
|
|
181
|
+
title: string;
|
|
182
|
+
/** @deprecated Use title instead */
|
|
183
|
+
heading?: string;
|
|
184
|
+
/** Task description */
|
|
185
|
+
description?: string;
|
|
186
|
+
/** @deprecated Use description instead */
|
|
187
|
+
content?: string;
|
|
188
|
+
/** Goal title for context */
|
|
189
|
+
goalTitle?: string;
|
|
190
|
+
/** @deprecated Use goalTitle instead */
|
|
160
191
|
artifactTitle?: string;
|
|
161
|
-
|
|
192
|
+
/** Priority level */
|
|
193
|
+
priority?: 'low' | 'medium' | 'high';
|
|
194
|
+
/** Assigned agent ID */
|
|
162
195
|
assignedTo: string;
|
|
196
|
+
/** Assignment timestamp */
|
|
163
197
|
assignedAt: string;
|
|
164
198
|
};
|
|
165
199
|
}
|
|
@@ -270,7 +304,8 @@ declare function createListener(config: ListenerConfig): ArtyfactsListener;
|
|
|
270
304
|
/**
|
|
271
305
|
* Context fetcher for Artyfacts tasks
|
|
272
306
|
*
|
|
273
|
-
* Fetches full context including organization, project,
|
|
307
|
+
* Fetches full context including organization, project, goal, and related tasks.
|
|
308
|
+
* Updated for Schema v2 - tasks are first-class entities linked to goals.
|
|
274
309
|
*/
|
|
275
310
|
interface OrganizationContext {
|
|
276
311
|
id: string;
|
|
@@ -282,6 +317,18 @@ interface ProjectContext {
|
|
|
282
317
|
name: string;
|
|
283
318
|
description?: string;
|
|
284
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Related task summary (v2)
|
|
322
|
+
*/
|
|
323
|
+
interface RelatedTaskContext {
|
|
324
|
+
id: string;
|
|
325
|
+
title: string;
|
|
326
|
+
status: 'pending' | 'in_progress' | 'blocked' | 'done';
|
|
327
|
+
priority?: 'low' | 'medium' | 'high';
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Section context (kept for artifact content)
|
|
331
|
+
*/
|
|
285
332
|
interface SectionContext {
|
|
286
333
|
id: string;
|
|
287
334
|
heading: string;
|
|
@@ -289,26 +336,53 @@ interface SectionContext {
|
|
|
289
336
|
section_type?: string;
|
|
290
337
|
task_status?: string;
|
|
291
338
|
}
|
|
292
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Goal context (v2 - replaces artifact context for task work)
|
|
341
|
+
*/
|
|
342
|
+
interface GoalContext {
|
|
293
343
|
id: string;
|
|
294
344
|
title: string;
|
|
345
|
+
objective?: string;
|
|
295
346
|
summary?: string;
|
|
296
347
|
description?: string;
|
|
297
348
|
artifact_type?: string;
|
|
298
|
-
|
|
349
|
+
/** Related tasks on this goal */
|
|
350
|
+
tasks?: RelatedTaskContext[];
|
|
351
|
+
/** Legacy: sections for content-based artifacts */
|
|
352
|
+
sections?: SectionContext[];
|
|
299
353
|
}
|
|
354
|
+
/** @deprecated Use GoalContext instead */
|
|
355
|
+
interface ArtifactContext extends GoalContext {
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Full task context (v2)
|
|
359
|
+
*/
|
|
300
360
|
interface TaskFullContext {
|
|
301
361
|
task: {
|
|
362
|
+
/** Task UUID */
|
|
302
363
|
id: string;
|
|
303
|
-
|
|
304
|
-
|
|
364
|
+
/** Task title */
|
|
365
|
+
title: string;
|
|
366
|
+
/** @deprecated Use title instead */
|
|
367
|
+
heading?: string;
|
|
368
|
+
/** Task description */
|
|
369
|
+
description?: string;
|
|
370
|
+
/** @deprecated Use description instead */
|
|
371
|
+
content?: string;
|
|
372
|
+
/** Expected output format and requirements */
|
|
305
373
|
expected_output?: {
|
|
306
374
|
format?: string;
|
|
307
375
|
requirements?: string[];
|
|
308
376
|
};
|
|
309
|
-
|
|
377
|
+
/** Priority level */
|
|
378
|
+
priority?: 'low' | 'medium' | 'high';
|
|
379
|
+
/** Dependencies */
|
|
380
|
+
depends_on?: string[];
|
|
310
381
|
};
|
|
311
|
-
|
|
382
|
+
/** The goal this task belongs to */
|
|
383
|
+
goal: GoalContext;
|
|
384
|
+
/** @deprecated Use goal instead */
|
|
385
|
+
artifact?: GoalContext;
|
|
312
386
|
project?: ProjectContext;
|
|
313
387
|
organization: OrganizationContext;
|
|
314
388
|
}
|
|
@@ -325,14 +399,11 @@ declare class ContextFetcher {
|
|
|
325
399
|
fetchTaskContext(taskId: string): Promise<TaskFullContext>;
|
|
326
400
|
}
|
|
327
401
|
/**
|
|
328
|
-
* Build a rich prompt with full context
|
|
402
|
+
* Build a rich prompt with full context (v2)
|
|
329
403
|
*/
|
|
330
404
|
declare function buildPromptWithContext(context: TaskFullContext): string;
|
|
331
405
|
declare function createContextFetcher(config: ContextFetcherConfig): ContextFetcher;
|
|
332
406
|
|
|
333
|
-
/**
|
|
334
|
-
* Tool Types for Artyfacts
|
|
335
|
-
*/
|
|
336
407
|
/**
|
|
337
408
|
* JSON Schema for tool input
|
|
338
409
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -63,19 +63,32 @@ declare function getCredentials(options?: {
|
|
|
63
63
|
* Now supports fetching full context (organization, project, artifact, related sections)
|
|
64
64
|
* to provide Claude with the information needed to complete tasks effectively.
|
|
65
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* Task context for execution (v2)
|
|
68
|
+
*/
|
|
66
69
|
interface TaskContext$1 {
|
|
67
|
-
/** Task
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/** Task
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
/**
|
|
70
|
+
/** Task UUID */
|
|
71
|
+
id: string;
|
|
72
|
+
/** @deprecated Use id instead */
|
|
73
|
+
taskId?: string;
|
|
74
|
+
/** Task title */
|
|
75
|
+
title: string;
|
|
76
|
+
/** @deprecated Use title instead */
|
|
77
|
+
heading?: string;
|
|
78
|
+
/** Task description */
|
|
79
|
+
description?: string;
|
|
80
|
+
/** @deprecated Use description instead */
|
|
81
|
+
content?: string;
|
|
82
|
+
/** Goal UUID this task belongs to */
|
|
83
|
+
goalId: string;
|
|
84
|
+
/** @deprecated Use goalId instead */
|
|
85
|
+
artifactId?: string;
|
|
86
|
+
/** Goal title for context */
|
|
87
|
+
goalTitle?: string;
|
|
88
|
+
/** @deprecated Use goalTitle instead */
|
|
76
89
|
artifactTitle?: string;
|
|
77
|
-
/** Task priority
|
|
78
|
-
priority?:
|
|
90
|
+
/** Task priority */
|
|
91
|
+
priority?: 'low' | 'medium' | 'high';
|
|
79
92
|
/** Additional context */
|
|
80
93
|
context?: Record<string, unknown>;
|
|
81
94
|
}
|
|
@@ -121,7 +134,7 @@ declare class ClaudeExecutor {
|
|
|
121
134
|
*/
|
|
122
135
|
private runClaude;
|
|
123
136
|
/**
|
|
124
|
-
* Build the task prompt
|
|
137
|
+
* Build the task prompt (v2)
|
|
125
138
|
*/
|
|
126
139
|
private buildTaskPrompt;
|
|
127
140
|
/**
|
|
@@ -148,18 +161,39 @@ declare function createExecutor(config?: ExecutorConfig$1): ClaudeExecutor;
|
|
|
148
161
|
* Connects to the Artyfacts SSE stream and listens for task_assigned events.
|
|
149
162
|
* Uses EventSource for automatic reconnection handling.
|
|
150
163
|
*/
|
|
164
|
+
/**
|
|
165
|
+
* Task assigned event (v2)
|
|
166
|
+
* Uses task ID and goal ID (not section_id/artifact_id)
|
|
167
|
+
*/
|
|
151
168
|
interface TaskAssignedEvent {
|
|
152
169
|
type: 'task_assigned';
|
|
153
170
|
timestamp: string;
|
|
154
171
|
data: {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
172
|
+
/** Task UUID (primary identifier) */
|
|
173
|
+
id: string;
|
|
174
|
+
/** @deprecated Use id instead */
|
|
175
|
+
taskId?: string;
|
|
176
|
+
/** Goal UUID this task belongs to */
|
|
177
|
+
goalId: string;
|
|
178
|
+
/** @deprecated Use goalId instead */
|
|
179
|
+
artifactId?: string;
|
|
180
|
+
/** Task title */
|
|
181
|
+
title: string;
|
|
182
|
+
/** @deprecated Use title instead */
|
|
183
|
+
heading?: string;
|
|
184
|
+
/** Task description */
|
|
185
|
+
description?: string;
|
|
186
|
+
/** @deprecated Use description instead */
|
|
187
|
+
content?: string;
|
|
188
|
+
/** Goal title for context */
|
|
189
|
+
goalTitle?: string;
|
|
190
|
+
/** @deprecated Use goalTitle instead */
|
|
160
191
|
artifactTitle?: string;
|
|
161
|
-
|
|
192
|
+
/** Priority level */
|
|
193
|
+
priority?: 'low' | 'medium' | 'high';
|
|
194
|
+
/** Assigned agent ID */
|
|
162
195
|
assignedTo: string;
|
|
196
|
+
/** Assignment timestamp */
|
|
163
197
|
assignedAt: string;
|
|
164
198
|
};
|
|
165
199
|
}
|
|
@@ -270,7 +304,8 @@ declare function createListener(config: ListenerConfig): ArtyfactsListener;
|
|
|
270
304
|
/**
|
|
271
305
|
* Context fetcher for Artyfacts tasks
|
|
272
306
|
*
|
|
273
|
-
* Fetches full context including organization, project,
|
|
307
|
+
* Fetches full context including organization, project, goal, and related tasks.
|
|
308
|
+
* Updated for Schema v2 - tasks are first-class entities linked to goals.
|
|
274
309
|
*/
|
|
275
310
|
interface OrganizationContext {
|
|
276
311
|
id: string;
|
|
@@ -282,6 +317,18 @@ interface ProjectContext {
|
|
|
282
317
|
name: string;
|
|
283
318
|
description?: string;
|
|
284
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Related task summary (v2)
|
|
322
|
+
*/
|
|
323
|
+
interface RelatedTaskContext {
|
|
324
|
+
id: string;
|
|
325
|
+
title: string;
|
|
326
|
+
status: 'pending' | 'in_progress' | 'blocked' | 'done';
|
|
327
|
+
priority?: 'low' | 'medium' | 'high';
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Section context (kept for artifact content)
|
|
331
|
+
*/
|
|
285
332
|
interface SectionContext {
|
|
286
333
|
id: string;
|
|
287
334
|
heading: string;
|
|
@@ -289,26 +336,53 @@ interface SectionContext {
|
|
|
289
336
|
section_type?: string;
|
|
290
337
|
task_status?: string;
|
|
291
338
|
}
|
|
292
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Goal context (v2 - replaces artifact context for task work)
|
|
341
|
+
*/
|
|
342
|
+
interface GoalContext {
|
|
293
343
|
id: string;
|
|
294
344
|
title: string;
|
|
345
|
+
objective?: string;
|
|
295
346
|
summary?: string;
|
|
296
347
|
description?: string;
|
|
297
348
|
artifact_type?: string;
|
|
298
|
-
|
|
349
|
+
/** Related tasks on this goal */
|
|
350
|
+
tasks?: RelatedTaskContext[];
|
|
351
|
+
/** Legacy: sections for content-based artifacts */
|
|
352
|
+
sections?: SectionContext[];
|
|
299
353
|
}
|
|
354
|
+
/** @deprecated Use GoalContext instead */
|
|
355
|
+
interface ArtifactContext extends GoalContext {
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Full task context (v2)
|
|
359
|
+
*/
|
|
300
360
|
interface TaskFullContext {
|
|
301
361
|
task: {
|
|
362
|
+
/** Task UUID */
|
|
302
363
|
id: string;
|
|
303
|
-
|
|
304
|
-
|
|
364
|
+
/** Task title */
|
|
365
|
+
title: string;
|
|
366
|
+
/** @deprecated Use title instead */
|
|
367
|
+
heading?: string;
|
|
368
|
+
/** Task description */
|
|
369
|
+
description?: string;
|
|
370
|
+
/** @deprecated Use description instead */
|
|
371
|
+
content?: string;
|
|
372
|
+
/** Expected output format and requirements */
|
|
305
373
|
expected_output?: {
|
|
306
374
|
format?: string;
|
|
307
375
|
requirements?: string[];
|
|
308
376
|
};
|
|
309
|
-
|
|
377
|
+
/** Priority level */
|
|
378
|
+
priority?: 'low' | 'medium' | 'high';
|
|
379
|
+
/** Dependencies */
|
|
380
|
+
depends_on?: string[];
|
|
310
381
|
};
|
|
311
|
-
|
|
382
|
+
/** The goal this task belongs to */
|
|
383
|
+
goal: GoalContext;
|
|
384
|
+
/** @deprecated Use goal instead */
|
|
385
|
+
artifact?: GoalContext;
|
|
312
386
|
project?: ProjectContext;
|
|
313
387
|
organization: OrganizationContext;
|
|
314
388
|
}
|
|
@@ -325,14 +399,11 @@ declare class ContextFetcher {
|
|
|
325
399
|
fetchTaskContext(taskId: string): Promise<TaskFullContext>;
|
|
326
400
|
}
|
|
327
401
|
/**
|
|
328
|
-
* Build a rich prompt with full context
|
|
402
|
+
* Build a rich prompt with full context (v2)
|
|
329
403
|
*/
|
|
330
404
|
declare function buildPromptWithContext(context: TaskFullContext): string;
|
|
331
405
|
declare function createContextFetcher(config: ContextFetcherConfig): ContextFetcher;
|
|
332
406
|
|
|
333
|
-
/**
|
|
334
|
-
* Tool Types for Artyfacts
|
|
335
|
-
*/
|
|
336
407
|
/**
|
|
337
408
|
* JSON Schema for tool input
|
|
338
409
|
*/
|