@odla-ai/cli 0.46.1 → 0.46.3

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-JHB6352A.js";
4
+ } from "./chunk-PCEGBCLZ.js";
5
5
  import {
6
6
  exitCodeFor
7
7
  } from "./chunk-5MEO3BVF.js";
@@ -9,4 +9,4 @@ export {
9
9
  exitCodeFor,
10
10
  runCli
11
11
  };
12
- //# sourceMappingURL=cli-2FTL245Y.js.map
12
+ //# sourceMappingURL=cli-UTMLBANX.js.map
package/dist/index.cjs CHANGED
@@ -1377,7 +1377,7 @@ var COMMAND_SURFACE = {
1377
1377
  },
1378
1378
  pm: {
1379
1379
  ...PM_ENTITIES,
1380
- project: { list: {}, add: {}, create: {}, use: {} },
1380
+ project: { list: {}, add: {}, create: {}, use: {}, set: {} },
1381
1381
  handoff: {},
1382
1382
  next: {},
1383
1383
  start: {},
@@ -11126,6 +11126,7 @@ Usage:
11126
11126
  odla-ai pm project list [--app <product-id>] [--status <s>] [--json]
11127
11127
  odla-ai pm project add --app <product-id> --name <name> [--description <text>] [--json]
11128
11128
  odla-ai pm project use <project-id> [--json] [saved for this app, on this machine]
11129
+ odla-ai pm project set <project-id> [--name <n>|--description <text>|--status <active|completed|archived>] [--mutation-id <id>] [--json]
11129
11130
  odla-ai pm goal list [--app <id>] [--project <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
11130
11131
  odla-ai pm task list [--app <id>] [--column <backlog|ready|doing|review|done>] [--goal <id>] [--assignee <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
11131
11132
  odla-ai pm decision list [--app <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
@@ -12845,6 +12846,23 @@ async function pmProjectUse(ctx, id2) {
12845
12846
  writePmProjectContext(ctx.rootDir, { appId: project.appId, projectId: project.id });
12846
12847
  emit2(ctx, project, () => ctx.out.log(`using ${project.appId} / ${project.name} (${project.id}) in this worktree`));
12847
12848
  }
12849
+ async function pmProjectSet(ctx, id2, parsed) {
12850
+ const patch2 = {};
12851
+ for (const key of ["name", "description", "status"]) {
12852
+ const value2 = stringOpt(parsed.options[key]);
12853
+ if (value2 !== void 0) patch2[key] = value2;
12854
+ }
12855
+ if (!Object.keys(patch2).length) {
12856
+ throw new Error("pm project set needs --name, --description, or --status <active|completed|archived>");
12857
+ }
12858
+ const { project } = await pmRequest(
12859
+ ctx,
12860
+ "PATCH",
12861
+ `/project/${encodeURIComponent(id2)}`,
12862
+ { patch: patch2, mutationId: writeMutationId2(parsed) }
12863
+ );
12864
+ emit2(ctx, project, () => ctx.out.log(`project ${project.name} (${project.id}) is ${project.status}`));
12865
+ }
12848
12866
 
12849
12867
  // src/pm-command.ts
12850
12868
  var ALIASES = {
@@ -12965,6 +12983,10 @@ async function pmCommand(parsed, deps = {}) {
12965
12983
  assertArgs(parsed, COMMON_OPTIONS, 4);
12966
12984
  return pmProjectUse(await buildContext2(parsed, deps), requireId2(parsed.positionals[3], action3));
12967
12985
  }
12986
+ if (action3 === "set") {
12987
+ assertArgs(parsed, [...COMMON_OPTIONS, "name", "description", "status", "mutation-id"], 4);
12988
+ return pmProjectSet(await buildContext2(parsed, deps), requireId2(parsed.positionals[3], action3), parsed);
12989
+ }
12968
12990
  rejectWord(["pm", "project"], action3);
12969
12991
  }
12970
12992
  if (word === "next") {