@helm-ai/cli 0.30.0 → 0.31.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.
Files changed (3) hide show
  1. package/README.md +6 -3
  2. package/dist/cli.js +13 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -108,11 +108,14 @@ helm-ai task create --title "Fix the webhook retry" --project <project-id>
108
108
  helm-ai task complete TASK-42
109
109
  helm-ai task comment TASK-42 "Shipped in 1.4.2"
110
110
 
111
+ # Name the task's owner: a person, or an agent on the project
112
+ helm-ai task owner TASK-42 --user sam@client.com
113
+
111
114
  # Let an agent front the work you do yourself: it owns the task without
112
115
  # running it, and your updates post under its name (admins only)
113
- helm-ai task owner TASK-42 Devin
114
- helm-ai task comment TASK-42 "Shipped in 1.4.2" --as Devin
115
- helm-ai task complete TASK-42 --as Devin
116
+ helm-ai task owner TASK-42 Gemma
117
+ helm-ai task comment TASK-42 "Shipped in 1.4.2" --as Gemma
118
+ helm-ai task complete TASK-42 --as Gemma
116
119
 
117
120
  # Log the time against it
118
121
  helm-ai time log --task TASK-42 --duration 90m --description "Webhook retry fix"
package/dist/cli.js CHANGED
@@ -25,7 +25,7 @@ function renderSplash(ctx) {
25
25
  }
26
26
 
27
27
  // src/version.ts
28
- var version = "0.30.0";
28
+ var version = "0.31.1";
29
29
 
30
30
  // src/commands/auth.ts
31
31
  import prompts from "prompts";
@@ -237,11 +237,11 @@ var HelmClient = class _HelmClient {
237
237
  return data.comment;
238
238
  },
239
239
  /**
240
- * Name an agent as the task's owner (assigned and visible, never runs it),
241
- * or pass null to clear the owner.
240
+ * Name the task's owner: a person (email or user id) or an agent (name,
241
+ * slug or id; the name on the task, never runs it). null clears it.
242
242
  */
243
- setOwner: async (taskId, agent) => {
244
- const data = await this.request("set_task_owner", "POST", { task_id: taskId, agent });
243
+ setOwner: async (taskId, owner) => {
244
+ const data = await this.request("set_task_owner", "POST", { task_id: taskId, ...owner ?? { user: null } });
245
245
  return data;
246
246
  }
247
247
  };
@@ -2046,7 +2046,7 @@ function registerTaskCommands(parent) {
2046
2046
  return;
2047
2047
  }
2048
2048
  });
2049
- cmd.command("update <id>").description("Update a task").option("-t, --title <title>").option("-d, --description <text>").option("-s, --status <status>").option("--priority <level>").option("--due <date>", "ISO 8601 date").option("--parent <id>", 'parent task ID or visible_id (use "none" to detach)').option("-a, --assignee <id...>").option("--as <agent>", "make the change as one of your agents (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
2049
+ cmd.command("update <id>").description("Update a task").option("-t, --title <title>").option("-d, --description <text>").option("-s, --status <status>").option("--priority <level>").option("--due <date>", "ISO 8601 date").option("--parent <id>", 'parent task ID or visible_id (use "none" to detach)').option("-a, --assignee <id...>").option("--as <agent>", "make the change as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
2050
2050
  try {
2051
2051
  const client = HelmClient.fromProfile(resolveProfile(opts.profile));
2052
2052
  const task = await client.tasks.update(id, {
@@ -2064,7 +2064,7 @@ function registerTaskCommands(parent) {
2064
2064
  return;
2065
2065
  }
2066
2066
  });
2067
- cmd.command("complete <id>").description("Mark a task as completed").option("--as <agent>", "complete it as one of your agents (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
2067
+ cmd.command("complete <id>").description("Mark a task as completed").option("--as <agent>", "complete it as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, opts) => {
2068
2068
  try {
2069
2069
  const client = HelmClient.fromProfile(resolveProfile(opts.profile));
2070
2070
  await client.tasks.update(id, { status: "completed" }, opts.as);
@@ -2105,7 +2105,7 @@ Showing ${result.returned} of ${result.total}. Use --offset to page.`);
2105
2105
  return;
2106
2106
  }
2107
2107
  });
2108
- cmd.command("comment <id> <content>").description("Add a comment to a task").option("--attach <path...>", "file(s) to attach (repeatable, any type, max 25MB each)").option("--as <agent>", "post it as one of your agents (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, content, opts) => {
2108
+ cmd.command("comment <id> <content>").description("Add a comment to a task").option("--attach <path...>", "file(s) to attach (repeatable, any type, max 25MB each)").option("--as <agent>", "post it as an agent on the task's project (name, slug, or id; admins only)").option("-p, --profile <name>").action(async (id, content, opts) => {
2109
2109
  try {
2110
2110
  const client = HelmClient.fromProfile(resolveProfile(opts.profile));
2111
2111
  const attachments = opts.attach ? await uploadAttachments(client, opts.attach) : void 0;
@@ -2117,13 +2117,13 @@ Showing ${result.returned} of ${result.total}. Use --offset to page.`);
2117
2117
  return;
2118
2118
  }
2119
2119
  });
2120
- cmd.command("owner <id> [agent]").description("Name an agent as the task's owner: assigned and visible on the task, but it never runs the task").option("--clear", "remove the agent owner").option("-p, --profile <name>").action(async (id, agent, opts) => {
2120
+ cmd.command("owner <id> [agent]").description("Name the task's owner, one person or one agent. An agent owner is the name on the task but never runs it").option("--user <email>", "make a person the owner (their email or user id)").option("--clear", "remove the owner").option("-p, --profile <name>").action(async (id, agent, opts) => {
2121
2121
  try {
2122
- if (opts.clear && agent) throw new Error("Pass an agent or --clear, not both");
2123
- if (!opts.clear && !agent) throw new Error("Pass an agent (name, slug, or id), or --clear");
2122
+ const picked = [agent, opts.user, opts.clear].filter(Boolean).length;
2123
+ if (picked !== 1) throw new Error("Pass an agent (name, slug, or id), --user <email>, or --clear");
2124
2124
  const client = HelmClient.fromProfile(resolveProfile(opts.profile));
2125
- const result = await client.tasks.setOwner(id, opts.clear ? null : agent);
2126
- console.log(result.owner ? `\u2713 ${result.owner.name} owns ${result.task_id}` : result.removed_owner_count > 0 ? `\u2713 Cleared the owner of ${result.task_id}` : `${result.task_id} had no agent owner`);
2125
+ const result = await client.tasks.setOwner(id, opts.clear ? null : opts.user ? { user: opts.user } : { agent });
2126
+ console.log(result.owner ? `\u2713 ${result.owner.name} owns ${result.task_id}` : result.changed ? `\u2713 Cleared the owner of ${result.task_id}` : `${result.task_id} had no owner`);
2127
2127
  } catch (err) {
2128
2128
  console.error(formatErrorForCli(err));
2129
2129
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helm-ai/cli",
3
- "version": "0.30.0",
3
+ "version": "0.31.1",
4
4
  "description": "Command line interface for Helm",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",