@artyfacts/claude 1.3.25 → 1.3.27

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/cli.js CHANGED
@@ -255,10 +255,10 @@ Your job is to complete the assigned task. You have full context about the organ
255
255
 
256
256
  You have access to Artyfacts MCP tools. USE THEM to complete your task:
257
257
 
258
- - **create_artifact** - Create new artifacts (documents, specs, reports)
259
- - **create_section** - Add sections to artifacts (content, tasks, decisions)
260
- - **update_section** - Update existing sections
261
- - **create_task** - Create new tasks under a goal
258
+ - **create_task** - Create a new task under a goal (requires goal_id)
259
+ - **create_goal** - Create a new goal (top-level objective)
260
+ - **create_artifact** - Create a new artifact (document output linked to a task, NOT a goal or task itself)
261
+ - **create_section** - Add a chapter/section to an artifact document
262
262
  - **claim_task** - Claim a task for execution
263
263
  - **complete_task** - Mark a task as complete (returns unblocked tasks)
264
264
  - **block_task** - Block a task with a reason
@@ -266,7 +266,11 @@ You have access to Artyfacts MCP tools. USE THEM to complete your task:
266
266
  - **list_inbox** - Check pending decisions/approvals
267
267
  - **resolve_inbox** - Resolve an inbox item
268
268
 
269
- IMPORTANT: When asked to create agents or update artifacts, USE THE TOOLS. Don't just describe what you would do - actually do it with the tools.
269
+ IMPORTANT:
270
+ - Tasks and goals are SEPARATE from artifacts. Use **create_task** to create tasks, **create_goal** to create goals.
271
+ - Use **create_artifact** only for document outputs (specs, reports, research) \u2014 never to represent a goal or task.
272
+ - When asked to generate tasks for a goal, use **create_task** with the goal's ID for each task. Do NOT create an artifact.
273
+ - USE THE TOOLS to take action \u2014 don't just describe what you would do.
270
274
 
271
275
  ## Guidelines
272
276
 
@@ -583,9 +587,13 @@ ${DEFAULT_SYSTEM_PROMPT}` : DEFAULT_SYSTEM_PROMPT;
583
587
  parts.push(`# Task: ${taskTitle}`);
584
588
  parts.push("");
585
589
  const goalTitle = task.goalTitle || task.artifactTitle;
590
+ const goalId = task.goalId || task.artifactId;
586
591
  if (goalTitle) {
587
592
  parts.push(`**Goal:** ${goalTitle}`);
588
593
  }
594
+ if (goalId) {
595
+ parts.push(`**Goal ID:** ${goalId}`);
596
+ }
589
597
  if (task.priority) {
590
598
  const priorityEmoji = {
591
599
  high: "\u{1F534} High",
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getCredentials,
8
8
  loadCredentials,
9
9
  promptForApiKey
10
- } from "./chunk-7QRIXWMF.mjs";
10
+ } from "./chunk-FHAIFO6L.mjs";
11
11
 
12
12
  // src/cli.ts
13
13
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -287,10 +287,10 @@ Your job is to complete the assigned task. You have full context about the organ
287
287
 
288
288
  You have access to Artyfacts MCP tools. USE THEM to complete your task:
289
289
 
290
- - **create_artifact** - Create new artifacts (documents, specs, reports)
291
- - **create_section** - Add sections to artifacts (content, tasks, decisions)
292
- - **update_section** - Update existing sections
293
- - **create_task** - Create new tasks under a goal
290
+ - **create_task** - Create a new task under a goal (requires goal_id)
291
+ - **create_goal** - Create a new goal (top-level objective)
292
+ - **create_artifact** - Create a new artifact (document output linked to a task, NOT a goal or task itself)
293
+ - **create_section** - Add a chapter/section to an artifact document
294
294
  - **claim_task** - Claim a task for execution
295
295
  - **complete_task** - Mark a task as complete (returns unblocked tasks)
296
296
  - **block_task** - Block a task with a reason
@@ -298,7 +298,11 @@ You have access to Artyfacts MCP tools. USE THEM to complete your task:
298
298
  - **list_inbox** - Check pending decisions/approvals
299
299
  - **resolve_inbox** - Resolve an inbox item
300
300
 
301
- IMPORTANT: When asked to create agents or update artifacts, USE THE TOOLS. Don't just describe what you would do - actually do it with the tools.
301
+ IMPORTANT:
302
+ - Tasks and goals are SEPARATE from artifacts. Use **create_task** to create tasks, **create_goal** to create goals.
303
+ - Use **create_artifact** only for document outputs (specs, reports, research) \u2014 never to represent a goal or task.
304
+ - When asked to generate tasks for a goal, use **create_task** with the goal's ID for each task. Do NOT create an artifact.
305
+ - USE THE TOOLS to take action \u2014 don't just describe what you would do.
302
306
 
303
307
  ## Guidelines
304
308
 
@@ -615,9 +619,13 @@ ${DEFAULT_SYSTEM_PROMPT}` : DEFAULT_SYSTEM_PROMPT;
615
619
  parts.push(`# Task: ${taskTitle}`);
616
620
  parts.push("");
617
621
  const goalTitle = task.goalTitle || task.artifactTitle;
622
+ const goalId = task.goalId || task.artifactId;
618
623
  if (goalTitle) {
619
624
  parts.push(`**Goal:** ${goalTitle}`);
620
625
  }
626
+ if (goalId) {
627
+ parts.push(`**Goal ID:** ${goalId}`);
628
+ }
621
629
  if (task.priority) {
622
630
  const priorityEmoji = {
623
631
  high: "\u{1F534} High",
@@ -5153,6 +5161,39 @@ var schemas = {
5153
5161
  required: []
5154
5162
  }
5155
5163
  },
5164
+ create_goal: {
5165
+ name: "create_goal",
5166
+ description: "Create a new goal (v2). Goals are first-class entities that contain tasks.",
5167
+ input_schema: {
5168
+ type: "object",
5169
+ properties: {
5170
+ title: {
5171
+ type: "string",
5172
+ description: "Goal title"
5173
+ },
5174
+ description: {
5175
+ type: "string",
5176
+ description: "Goal description and objectives"
5177
+ },
5178
+ priority: {
5179
+ type: "string",
5180
+ enum: ["low", "medium", "high", "urgent"],
5181
+ default: "medium",
5182
+ description: "Priority level"
5183
+ },
5184
+ target_date: {
5185
+ type: "string",
5186
+ description: "Optional: target completion date (ISO format)"
5187
+ },
5188
+ tags: {
5189
+ type: "array",
5190
+ items: { type: "string" },
5191
+ description: "Optional: tags for categorization"
5192
+ }
5193
+ },
5194
+ required: ["title"]
5195
+ }
5196
+ },
5156
5197
  create_task: {
5157
5198
  name: "create_task",
5158
5199
  description: "Create a new task under a goal.",
@@ -5705,6 +5746,20 @@ var listTasksHandler = async (args, client) => {
5705
5746
  return { success: false, error: String(error) };
5706
5747
  }
5707
5748
  };
5749
+ var createGoalHandler = async (args, client) => {
5750
+ try {
5751
+ const data = await client.post("/goals", {
5752
+ title: args.title,
5753
+ description: args.description,
5754
+ priority: args.priority || "medium",
5755
+ target_date: args.target_date,
5756
+ tags: args.tags
5757
+ });
5758
+ return { success: true, data };
5759
+ } catch (error) {
5760
+ return { success: false, error: String(error) };
5761
+ }
5762
+ };
5708
5763
  var createTaskHandler = async (args, client) => {
5709
5764
  try {
5710
5765
  const data = await client.post("/tasks", {
@@ -5871,6 +5926,8 @@ var handlers = {
5871
5926
  list_agents: listAgentsHandler,
5872
5927
  create_agent: createAgentHandler,
5873
5928
  update_agent: updateAgentHandler,
5929
+ // Goals (v2)
5930
+ create_goal: createGoalHandler,
5874
5931
  // Tasks (v2)
5875
5932
  get_task: getTaskHandler,
5876
5933
  list_tasks: listTasksHandler,
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  promptForApiKey,
15
15
  runDeviceAuth,
16
16
  saveCredentials
17
- } from "./chunk-7QRIXWMF.mjs";
17
+ } from "./chunk-FHAIFO6L.mjs";
18
18
 
19
19
  // node_modules/@anthropic-ai/sdk/internal/tslib.mjs
20
20
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
@@ -4264,6 +4264,39 @@ var schemas = {
4264
4264
  required: []
4265
4265
  }
4266
4266
  },
4267
+ create_goal: {
4268
+ name: "create_goal",
4269
+ description: "Create a new goal (v2). Goals are first-class entities that contain tasks.",
4270
+ input_schema: {
4271
+ type: "object",
4272
+ properties: {
4273
+ title: {
4274
+ type: "string",
4275
+ description: "Goal title"
4276
+ },
4277
+ description: {
4278
+ type: "string",
4279
+ description: "Goal description and objectives"
4280
+ },
4281
+ priority: {
4282
+ type: "string",
4283
+ enum: ["low", "medium", "high", "urgent"],
4284
+ default: "medium",
4285
+ description: "Priority level"
4286
+ },
4287
+ target_date: {
4288
+ type: "string",
4289
+ description: "Optional: target completion date (ISO format)"
4290
+ },
4291
+ tags: {
4292
+ type: "array",
4293
+ items: { type: "string" },
4294
+ description: "Optional: tags for categorization"
4295
+ }
4296
+ },
4297
+ required: ["title"]
4298
+ }
4299
+ },
4267
4300
  create_task: {
4268
4301
  name: "create_task",
4269
4302
  description: "Create a new task under a goal.",
@@ -4816,6 +4849,20 @@ var listTasksHandler = async (args, client) => {
4816
4849
  return { success: false, error: String(error) };
4817
4850
  }
4818
4851
  };
4852
+ var createGoalHandler = async (args, client) => {
4853
+ try {
4854
+ const data = await client.post("/goals", {
4855
+ title: args.title,
4856
+ description: args.description,
4857
+ priority: args.priority || "medium",
4858
+ target_date: args.target_date,
4859
+ tags: args.tags
4860
+ });
4861
+ return { success: true, data };
4862
+ } catch (error) {
4863
+ return { success: false, error: String(error) };
4864
+ }
4865
+ };
4819
4866
  var createTaskHandler = async (args, client) => {
4820
4867
  try {
4821
4868
  const data = await client.post("/tasks", {
@@ -4982,6 +5029,8 @@ var handlers = {
4982
5029
  list_agents: listAgentsHandler,
4983
5030
  create_agent: createAgentHandler,
4984
5031
  update_agent: updateAgentHandler,
5032
+ // Goals (v2)
5033
+ create_goal: createGoalHandler,
4985
5034
  // Tasks (v2)
4986
5035
  get_task: getTaskHandler,
4987
5036
  list_tasks: listTasksHandler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/claude",
3
- "version": "1.3.25",
3
+ "version": "1.3.27",
4
4
  "description": "Claude adapter for Artyfacts - Execute tasks using Claude Code CLI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15,6 +15,13 @@
15
15
  "require": "./dist/index.js"
16
16
  }
17
17
  },
18
+ "scripts": {
19
+ "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
20
+ "dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
21
+ "start": "node bin/artyfacts-claude.js",
22
+ "test": "vitest",
23
+ "lint": "eslint src/"
24
+ },
18
25
  "keywords": [
19
26
  "artyfacts",
20
27
  "claude",
@@ -47,12 +54,5 @@
47
54
  },
48
55
  "engines": {
49
56
  "node": ">=18.0.0"
50
- },
51
- "scripts": {
52
- "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
53
- "dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
54
- "start": "node bin/artyfacts-claude.js",
55
- "test": "vitest",
56
- "lint": "eslint src/"
57
57
  }
58
- }
58
+ }
package/src/context.ts CHANGED
@@ -153,10 +153,10 @@ Your job is to complete the assigned task. You have full context about the organ
153
153
 
154
154
  You have access to Artyfacts MCP tools. USE THEM to complete your task:
155
155
 
156
- - **create_artifact** - Create new artifacts (documents, specs, reports)
157
- - **create_section** - Add sections to artifacts (content, tasks, decisions)
158
- - **update_section** - Update existing sections
159
- - **create_task** - Create new tasks under a goal
156
+ - **create_task** - Create a new task under a goal (requires goal_id)
157
+ - **create_goal** - Create a new goal (top-level objective)
158
+ - **create_artifact** - Create a new artifact (document output linked to a task, NOT a goal or task itself)
159
+ - **create_section** - Add a chapter/section to an artifact document
160
160
  - **claim_task** - Claim a task for execution
161
161
  - **complete_task** - Mark a task as complete (returns unblocked tasks)
162
162
  - **block_task** - Block a task with a reason
@@ -164,7 +164,11 @@ You have access to Artyfacts MCP tools. USE THEM to complete your task:
164
164
  - **list_inbox** - Check pending decisions/approvals
165
165
  - **resolve_inbox** - Resolve an inbox item
166
166
 
167
- IMPORTANT: When asked to create agents or update artifacts, USE THE TOOLS. Don't just describe what you would do - actually do it with the tools.
167
+ IMPORTANT:
168
+ - Tasks and goals are SEPARATE from artifacts. Use **create_task** to create tasks, **create_goal** to create goals.
169
+ - Use **create_artifact** only for document outputs (specs, reports, research) — never to represent a goal or task.
170
+ - When asked to generate tasks for a goal, use **create_task** with the goal's ID for each task. Do NOT create an artifact.
171
+ - USE THE TOOLS to take action — don't just describe what you would do.
168
172
 
169
173
  ## Guidelines
170
174
 
package/src/executor.ts CHANGED
@@ -288,9 +288,13 @@ export class ClaudeExecutor {
288
288
 
289
289
  // Goal context (v2: was artifact)
290
290
  const goalTitle = task.goalTitle || task.artifactTitle;
291
+ const goalId = task.goalId || task.artifactId;
291
292
  if (goalTitle) {
292
293
  parts.push(`**Goal:** ${goalTitle}`);
293
294
  }
295
+ if (goalId) {
296
+ parts.push(`**Goal ID:** ${goalId}`);
297
+ }
294
298
 
295
299
  // Priority (v2: string-based)
296
300
  if (task.priority) {
@@ -260,6 +260,25 @@ export const listTasksHandler: ToolHandler = async (args, client) => {
260
260
  }
261
261
  };
262
262
 
263
+ /**
264
+ * Create a goal (v2)
265
+ * Uses POST /api/v1/goals - creates in goals table
266
+ */
267
+ export const createGoalHandler: ToolHandler = async (args, client) => {
268
+ try {
269
+ const data = await client.post('/goals', {
270
+ title: args.title,
271
+ description: args.description,
272
+ priority: args.priority || 'medium',
273
+ target_date: args.target_date,
274
+ tags: args.tags,
275
+ });
276
+ return { success: true, data };
277
+ } catch (error) {
278
+ return { success: false, error: String(error) };
279
+ }
280
+ };
281
+
263
282
  /**
264
283
  * Create a task (v2)
265
284
  * Uses POST /api/v1/tasks - creates in tasks table
@@ -486,6 +505,9 @@ export const handlers: Record<string, ToolHandler> = {
486
505
  create_agent: createAgentHandler,
487
506
  update_agent: updateAgentHandler,
488
507
 
508
+ // Goals (v2)
509
+ create_goal: createGoalHandler,
510
+
489
511
  // Tasks (v2)
490
512
  get_task: getTaskHandler,
491
513
  list_tasks: listTasksHandler,
@@ -459,6 +459,40 @@ 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
498
  description: 'Create a new task under a goal.',