@odla-ai/cli 0.25.17 → 0.25.18
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/bin.cjs +71 -46
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-5MRY3V2K.js → chunk-B6DISJPC.js} +72 -47
- package/dist/chunk-B6DISJPC.js.map +1 -0
- package/dist/index.cjs +71 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5MRY3V2K.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -5980,11 +5980,21 @@ Usage:
|
|
|
5980
5980
|
odla-ai app owners list [--config odla.config.mjs] [--email <odla-account>] [--json]
|
|
5981
5981
|
odla-ai app owners add <email> [--email <odla-account>] [--json]
|
|
5982
5982
|
odla-ai app owners remove <email> [--email <odla-account>] [--json]
|
|
5983
|
-
odla-ai pm
|
|
5984
|
-
odla-ai pm
|
|
5983
|
+
odla-ai pm goal list [--app <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
5984
|
+
odla-ai pm task list [--app <id>] [--column <c>] [--goal <id>] [--assignee <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
5985
|
+
odla-ai pm decision list [--app <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
5986
|
+
odla-ai pm bug list [--app <id>] [--status <s>] [--severity <s>] [--goal <id>] [--assignee <id>] [--decision <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
5987
|
+
odla-ai pm goal add --app <id> --title <t> [--status <s>] [--proof <text>] [--target <pct>] [--mutation-id <id>] [--json]
|
|
5988
|
+
odla-ai pm task add --app <id> --title <t> [--column <c>] [--goal <id>] [--assignee <id>] [--description <text>|--body <text>] [--due <epoch-ms>] [--mutation-id <id>] [--json]
|
|
5989
|
+
odla-ai pm decision add --app <id> --title <t> --body <text> [--status <s>] [--mutation-id <id>] [--json]
|
|
5990
|
+
odla-ai pm bug add --app <id> --title <t> (--description <text>|--body <text>) [--status <s>] [--severity <s>] [--goal <id>] [--assignee <id>] [--decision <id>] [--mutation-id <id>] [--json]
|
|
5985
5991
|
odla-ai pm <goal|task|decision|bug> get <id> [--json]
|
|
5986
|
-
odla-ai pm
|
|
5987
|
-
odla-ai pm
|
|
5992
|
+
odla-ai pm goal set <id> [--title <t>|--status <s>|--proof <text>|--no-proof|--target <pct>|--no-target] [--mutation-id <id>] [--json]
|
|
5993
|
+
odla-ai pm task set <id> [--title <t>|--column <c>|--rank <n>|--goal <id>|--no-goal|--assignee <id>|--no-assignee|--description <text>|--body <text>|--due <epoch-ms>|--no-due] [--mutation-id <id>] [--json]
|
|
5994
|
+
odla-ai pm decision set <id> [--title <t>|--status <s>|--body <text>] [--mutation-id <id>] [--json]
|
|
5995
|
+
odla-ai pm bug set <id> [--title <t>|--status <s>|--severity <s>|--goal <id>|--no-goal|--assignee <id>|--no-assignee|--decision <id>|--no-decision|--description <text>|--body <text>] [--mutation-id <id>] [--json]
|
|
5996
|
+
odla-ai pm <goal|task|decision> done <id> [--mutation-id <id>]
|
|
5997
|
+
odla-ai pm bug done <id> [--decision <accepted-decision-id>] [--mutation-id <id>]
|
|
5988
5998
|
odla-ai pm <goal|task|decision|bug> comment <id> --body "..." [--mutation-id <id>]
|
|
5989
5999
|
odla-ai pm <goal|task|decision|bug> comments <id> [--json]
|
|
5990
6000
|
odla-ai pm <goal|task|decision|bug> rm <id>
|
|
@@ -7274,8 +7284,8 @@ function parseArgv(argv) {
|
|
|
7274
7284
|
}
|
|
7275
7285
|
return { positionals, options };
|
|
7276
7286
|
}
|
|
7277
|
-
function assertArgs(parsed,
|
|
7278
|
-
const allowed = new Set(
|
|
7287
|
+
function assertArgs(parsed, allowedOptions2, maxPositionals) {
|
|
7288
|
+
const allowed = new Set(allowedOptions2);
|
|
7279
7289
|
for (const name of Object.keys(parsed.options)) {
|
|
7280
7290
|
if (!allowed.has(name)) throw new Error(`unknown option "--${name}"; run "odla-ai help" for supported options`);
|
|
7281
7291
|
}
|
|
@@ -9239,33 +9249,53 @@ var ALIASES = {
|
|
|
9239
9249
|
decision: "decision",
|
|
9240
9250
|
bug: "bug"
|
|
9241
9251
|
};
|
|
9242
|
-
var
|
|
9243
|
-
|
|
9244
|
-
"
|
|
9245
|
-
"
|
|
9246
|
-
|
|
9247
|
-
"
|
|
9248
|
-
"
|
|
9249
|
-
"
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
]
|
|
9252
|
+
var COMMON_OPTIONS = ["config", "token", "email", "json", "platform", "context"];
|
|
9253
|
+
var ACTION_OPTIONS = {
|
|
9254
|
+
list: ["app", "q", "limit", "offset"],
|
|
9255
|
+
add: ["app", "title", "mutation-id"],
|
|
9256
|
+
get: [],
|
|
9257
|
+
set: ["mutation-id"],
|
|
9258
|
+
done: ["mutation-id"],
|
|
9259
|
+
comment: ["body", "mutation-id"],
|
|
9260
|
+
comments: [],
|
|
9261
|
+
rm: []
|
|
9262
|
+
};
|
|
9263
|
+
var ENTITY_OPTIONS = {
|
|
9264
|
+
goal: {
|
|
9265
|
+
list: ["status"],
|
|
9266
|
+
add: ["status", "proof", "target"],
|
|
9267
|
+
set: ["title", "status", "proof", "target"],
|
|
9268
|
+
done: []
|
|
9269
|
+
},
|
|
9270
|
+
task: {
|
|
9271
|
+
list: ["column", "goal", "assignee"],
|
|
9272
|
+
add: ["column", "goal", "assignee", "due", "description", "desc", "body"],
|
|
9273
|
+
set: ["title", "column", "rank", "goal", "assignee", "due", "description", "desc", "body"],
|
|
9274
|
+
done: []
|
|
9275
|
+
},
|
|
9276
|
+
decision: {
|
|
9277
|
+
list: ["status"],
|
|
9278
|
+
add: ["status", "body"],
|
|
9279
|
+
set: ["title", "status", "body"],
|
|
9280
|
+
done: []
|
|
9281
|
+
},
|
|
9282
|
+
bug: {
|
|
9283
|
+
list: ["status", "severity", "goal", "assignee", "decision"],
|
|
9284
|
+
add: ["status", "severity", "goal", "assignee", "decision", "description", "desc", "body"],
|
|
9285
|
+
set: ["title", "status", "severity", "goal", "assignee", "decision", "description", "desc", "body"],
|
|
9286
|
+
done: ["decision"]
|
|
9287
|
+
}
|
|
9288
|
+
};
|
|
9289
|
+
function canonicalAction(action) {
|
|
9290
|
+
if (action === "create") return "add";
|
|
9291
|
+
if (action === "update" || action === "status" || action === "move") return "set";
|
|
9292
|
+
if (action === "delete") return "rm";
|
|
9293
|
+
return action in ACTION_OPTIONS ? action : null;
|
|
9294
|
+
}
|
|
9295
|
+
function allowedOptions(entity, action) {
|
|
9296
|
+
const entityOptions = action === "list" || action === "add" || action === "set" || action === "done" ? ENTITY_OPTIONS[entity][action] : [];
|
|
9297
|
+
return [...COMMON_OPTIONS, ...ACTION_OPTIONS[action], ...entityOptions];
|
|
9298
|
+
}
|
|
9269
9299
|
function requireId2(id, action) {
|
|
9270
9300
|
if (!id) throw new Error(`"pm ... ${action}" needs an item id`);
|
|
9271
9301
|
return id;
|
|
@@ -9297,27 +9327,25 @@ async function buildContext2(parsed, deps) {
|
|
|
9297
9327
|
async function pmCommand(parsed, deps = {}) {
|
|
9298
9328
|
const word = parsed.positionals[1] ?? "";
|
|
9299
9329
|
if (word === "handoff") {
|
|
9300
|
-
assertArgs(parsed,
|
|
9330
|
+
assertArgs(parsed, [...COMMON_OPTIONS, "app"], 2);
|
|
9301
9331
|
return pmHandoff(await buildContext2(parsed, deps), parsed);
|
|
9302
9332
|
}
|
|
9303
9333
|
const entity = ALIASES[word];
|
|
9304
9334
|
if (!entity) throw new Error(`unknown pm entity "${word}". Try "odla-ai pm bug list" (goal|task|decision|bug).`);
|
|
9305
|
-
const
|
|
9306
|
-
|
|
9335
|
+
const requestedAction = parsed.positionals[2] ?? "list";
|
|
9336
|
+
const action = canonicalAction(requestedAction);
|
|
9337
|
+
if (!action) throw new Error(`unknown pm action "${requestedAction}". Try list|add|get|set|done|comment|comments|rm.`);
|
|
9338
|
+
assertArgs(parsed, allowedOptions(entity, action), 4);
|
|
9307
9339
|
const ctx = await buildContext2(parsed, deps);
|
|
9308
9340
|
const id = parsed.positionals[3];
|
|
9309
9341
|
switch (action) {
|
|
9310
9342
|
case "list":
|
|
9311
9343
|
return pmList(ctx, entity, parsed);
|
|
9312
9344
|
case "add":
|
|
9313
|
-
case "create":
|
|
9314
9345
|
return pmAdd(ctx, entity, parsed);
|
|
9315
9346
|
case "get":
|
|
9316
9347
|
return pmGet(ctx, entity, requireId2(id, action));
|
|
9317
9348
|
case "set":
|
|
9318
|
-
case "update":
|
|
9319
|
-
case "status":
|
|
9320
|
-
case "move":
|
|
9321
9349
|
return pmSet(ctx, entity, requireId2(id, action), parsed);
|
|
9322
9350
|
case "done":
|
|
9323
9351
|
return pmDone(ctx, entity, requireId2(id, action), parsed);
|
|
@@ -9326,10 +9354,7 @@ async function pmCommand(parsed, deps = {}) {
|
|
|
9326
9354
|
case "comments":
|
|
9327
9355
|
return pmComments(ctx, entity, requireId2(id, action));
|
|
9328
9356
|
case "rm":
|
|
9329
|
-
case "delete":
|
|
9330
9357
|
return pmRemove(ctx, entity, requireId2(id, action));
|
|
9331
|
-
default:
|
|
9332
|
-
throw new Error(`unknown pm action "${action}". Try list|add|get|set|done|comment|comments|rm.`);
|
|
9333
9358
|
}
|
|
9334
9359
|
}
|
|
9335
9360
|
|
|
@@ -9748,7 +9773,7 @@ function recordInvocation(parsed) {
|
|
|
9748
9773
|
try {
|
|
9749
9774
|
const entry = {
|
|
9750
9775
|
path: invocationPath(parsed.positionals),
|
|
9751
|
-
options: Object.
|
|
9776
|
+
options: Object.entries(parsed.options).map(([name, value]) => value === false ? `no-${name}` : name).sort()
|
|
9752
9777
|
};
|
|
9753
9778
|
if (!entry.path.length) return;
|
|
9754
9779
|
appendFileSync(file, `${JSON.stringify(entry)}
|
|
@@ -10521,7 +10546,7 @@ async function whoamiCommand(parsed, deps = {}) {
|
|
|
10521
10546
|
}
|
|
10522
10547
|
|
|
10523
10548
|
// src/runbook-command.ts
|
|
10524
|
-
var
|
|
10549
|
+
var ALLOWED2 = [
|
|
10525
10550
|
"config",
|
|
10526
10551
|
"token",
|
|
10527
10552
|
"email",
|
|
@@ -10609,7 +10634,7 @@ async function buildContext3(parsed, deps, action) {
|
|
|
10609
10634
|
}
|
|
10610
10635
|
async function runbookCommand(parsed, deps = {}) {
|
|
10611
10636
|
const action = parsed.positionals[1] ?? "list";
|
|
10612
|
-
assertArgs(parsed,
|
|
10637
|
+
assertArgs(parsed, ALLOWED2, action === "ask" || action === "search" ? 64 : 4);
|
|
10613
10638
|
const ctx = await buildContext3(parsed, deps, action);
|
|
10614
10639
|
const slug = parsed.positionals[2];
|
|
10615
10640
|
switch (action) {
|
|
@@ -11326,4 +11351,4 @@ export {
|
|
|
11326
11351
|
exitCodeFor,
|
|
11327
11352
|
runCli
|
|
11328
11353
|
};
|
|
11329
|
-
//# sourceMappingURL=chunk-
|
|
11354
|
+
//# sourceMappingURL=chunk-B6DISJPC.js.map
|