@odla-ai/cli 0.48.4 → 0.49.0

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-BD5KIG63.js";
4
+ } from "./chunk-7627AY5G.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-MXYYOFBR.js.map
12
+ //# sourceMappingURL=cli-AT6M3FCR.js.map
package/dist/index.cjs CHANGED
@@ -1379,6 +1379,7 @@ var COMMAND_SURFACE = {
1379
1379
  pm: {
1380
1380
  ...PM_ENTITIES,
1381
1381
  project: { list: {}, add: {}, create: {}, use: {}, set: {} },
1382
+ brief: {},
1382
1383
  handoff: {},
1383
1384
  next: {},
1384
1385
  start: {},
@@ -11500,7 +11501,8 @@ Usage:
11500
11501
  odla-ai pm bug list [--app <id>|--platform-wide] [--status <s>] [--severity <s>] [--goal <id>] [--assignee <id>] [--decision <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
11501
11502
  odla-ai pm goal add --app <id> --title <t> [--status <s>] [--proof <text>] [--target <pct>] [--mutation-id <id>] [--json]
11502
11503
  odla-ai pm task add --app <id> --title <t> [--column <backlog|ready|doing|review|done>] [--goal <id>|--alignment-decision <id>] [--assignee <id>] [--description <text>|--body <text>] [--acceptance <text>] [--execution <human|agent|either>] [--due <epoch-ms>] [--mutation-id <id>] [--json]
11503
- odla-ai pm next --app <id> [--project <id>] [--verbose] [--json]
11504
+ odla-ai pm brief --app <id> [--project <id>] [--json] [bounded counts + actionable windows]
11505
+ odla-ai pm next --app <id> [--project <id>] [--brief|--verbose] [--json]
11504
11506
  odla-ai pm start --app <id> [<task-id>] [--goal <id>] [--verbose] [--mutation-id <id>] [--json] [claims the top Ready task in one call]
11505
11507
  odla-ai pm watch --app <id> [--cursor <cursor>] [--entity goal|task|decision|bug] [--action created|updated|deleted|comment.created|comment.updated] [--state <state>] [--by <principalId>] [--self <principalId>] [--interval <s>] [--timeout <s>] [--json|--jsonl]
11506
11508
  odla-ai pm task ready <id> --expected-revision <n> [--goal <id>|--alignment-decision <id>] [--description <text>|--body <text>] [--acceptance <text>] [--execution <human|agent|either>] [--mutation-id <id>] [--json]
@@ -11522,7 +11524,7 @@ Usage:
11522
11524
  odla-ai pm <goal|task|decision|bug> comments <id> [--json]
11523
11525
  odla-ai pm <goal|task|decision|bug> history <id> [--limit <n>] [--json]
11524
11526
  odla-ai pm <goal|task|decision|bug> rm <id>
11525
- odla-ai pm handoff --app <id> [--project <id>] [--verbose] [--json]
11527
+ odla-ai pm handoff --app <id> [--project <id>] [--brief|--verbose] [--json]
11526
11528
  odla-ai discuss groups [--json]
11527
11529
  odla-ai discuss list [--app <id>] [--q <text>] [--state open|resolved|all] [--mentions] [--json]
11528
11530
  odla-ai discuss read <topic> [--limit <n> --offset <n>] [--json]
@@ -12767,7 +12769,36 @@ function requireApp(ctx, parsed, command) {
12767
12769
  if (!appId) throw new Error(`pm ${command} needs --app <appId>`);
12768
12770
  return { appId, projectId: stringOpt(parsed.options.project) ?? ctx.projectId };
12769
12771
  }
12772
+ function printBriefingSection(ctx, label, entity, section) {
12773
+ ctx.out.log(`${label}: ${section.shown} shown of ${section.total}`);
12774
+ if (!section.records.length) ctx.out.log("- (none)");
12775
+ else for (const record12 of section.records) printRecord(ctx, entity, record12);
12776
+ if (section.truncated) ctx.out.log(` expand: ${section.expand}`);
12777
+ }
12778
+ async function pmBrief(ctx, parsed) {
12779
+ const { appId, projectId } = requireApp(ctx, parsed, "brief");
12780
+ const q = new URLSearchParams({ app: appId });
12781
+ if (projectId) q.set("project", projectId);
12782
+ const result = await pmRequest(ctx, "GET", `/briefing?${q}`);
12783
+ emit2(ctx, result, () => {
12784
+ ctx.out.log(`${appId}: bounded PM briefing (read only)`);
12785
+ ctx.out.log(
12786
+ `counts: goals ${result.counts.openGoals}; Ready ${result.counts.ready}; active tasks ${result.counts.activeTasks}; Doing ${result.counts.doing}; yours ${result.counts.currentPrincipal}; bugs ${result.counts.openBugs}`
12787
+ );
12788
+ printBriefingSection(ctx, "your current work", "task", result.currentWork);
12789
+ printBriefingSection(ctx, "top Ready", "task", result.ready);
12790
+ printBriefingSection(ctx, "context goals", "goal", result.goals);
12791
+ printBriefingSection(ctx, "open bugs", "bug", result.openBugs);
12792
+ if (result.counts.doing > 0) {
12793
+ ctx.out.log(`doing expansion: ${result.expansions.doing}`);
12794
+ }
12795
+ ctx.out.log(`next: ${result.next}`);
12796
+ ctx.out.log(`monitor: ${result.monitor}`);
12797
+ ctx.out.log(`full handoff: ${result.expandFull}`);
12798
+ });
12799
+ }
12770
12800
  async function pmNext(ctx, parsed) {
12801
+ if (parsed.options.brief === true) return pmBrief(ctx, parsed);
12771
12802
  const { appId, projectId } = requireApp(ctx, parsed, "next");
12772
12803
  const verbose = wantsVerbose(parsed);
12773
12804
  const [goals, tasks] = await Promise.all([
@@ -12804,6 +12835,7 @@ async function pmNext(ctx, parsed) {
12804
12835
  });
12805
12836
  }
12806
12837
  async function pmHandoff(ctx, parsed) {
12838
+ if (parsed.options.brief === true) return pmBrief(ctx, parsed);
12807
12839
  const { appId, projectId } = requireApp(ctx, parsed, "handoff");
12808
12840
  const verbose = wantsVerbose(parsed);
12809
12841
  const [goals, tasks, bugs] = await Promise.all([
@@ -13409,9 +13441,13 @@ async function pmCommand(parsed, deps = {}) {
13409
13441
  rejectWord(["pm", "project"], action3);
13410
13442
  }
13411
13443
  if (word === "next") {
13412
- assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose"], 2);
13444
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose", "brief"], 2);
13413
13445
  return pmNext(await buildContext2(parsed, deps), parsed);
13414
13446
  }
13447
+ if (word === "brief") {
13448
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project"], 2);
13449
+ return pmBrief(await buildContext2(parsed, deps), parsed);
13450
+ }
13415
13451
  if (word === "start") {
13416
13452
  assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "goal", "verbose", "mutation-id"], 3);
13417
13453
  return pmStart(await buildContext2(parsed, deps), parsed);
@@ -13433,7 +13469,7 @@ async function pmCommand(parsed, deps = {}) {
13433
13469
  return pmWatch(await buildContext2(parsed, deps), parsed).then(() => void 0);
13434
13470
  }
13435
13471
  if (word === "handoff") {
13436
- assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose"], 2);
13472
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose", "brief"], 2);
13437
13473
  return pmHandoff(await buildContext2(parsed, deps), parsed);
13438
13474
  }
13439
13475
  const entity = ALIASES[word];