@odla-ai/cli 0.46.11 → 0.46.12

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.js CHANGED
@@ -172,7 +172,7 @@ function absoluteEntryPath(entryPath) {
172
172
 
173
173
  // src/bin.ts
174
174
  var argv = process.argv.slice(2);
175
- requireCurrentCliForProvision(argv).then(() => requireCoherentProvisionRuntime(argv)).then(async () => (await import("./cli-BI26ENP4.js")).runCli()).catch((err) => {
175
+ requireCurrentCliForProvision(argv).then(() => requireCoherentProvisionRuntime(argv)).then(async () => (await import("./cli-5CDFI4AY.js")).runCli()).catch((err) => {
176
176
  console.error(redactSecrets(`odla-ai: ${err instanceof Error ? err.message : String(err)}`));
177
177
  process.exitCode = exitCodeFor(err);
178
178
  });
@@ -5943,10 +5943,10 @@ import { existsSync as existsSync10 } from "fs";
5943
5943
  import { cpus, hostname, totalmem } from "os";
5944
5944
  import { resolve as resolve11 } from "path";
5945
5945
 
5946
- // ../harness/dist/chunk-RXNHCGWE.js
5946
+ // ../harness/dist/chunk-I43KTCJ2.js
5947
5947
  var HARNESS_PROTOCOL_VERSION = 1;
5948
5948
 
5949
- // ../harness/dist/chunk-CR6RE3A2.js
5949
+ // ../harness/dist/chunk-HDIR4MM5.js
5950
5950
  import { execFile, spawn as spawn3 } from "child_process";
5951
5951
  import { constants } from "fs";
5952
5952
  import { access } from "fs/promises";
@@ -6319,7 +6319,7 @@ async function stageWorkspacePair(baselineSource, workspaceSource, options = {})
6319
6319
  }
6320
6320
  }
6321
6321
 
6322
- // ../harness/dist/chunk-J7XU5QB7.js
6322
+ // ../harness/dist/chunk-4EPJJMFG.js
6323
6323
  import { createHash as createHash3 } from "crypto";
6324
6324
  import { readFile as readFile2, readdir as readdir2 } from "fs/promises";
6325
6325
  import { relative as relative4, resolve as resolve10 } from "path";
@@ -6656,7 +6656,7 @@ function validateSnapshot(snapshot, limits) {
6656
6656
  }
6657
6657
  }
6658
6658
 
6659
- // ../harness/dist/chunk-J7XU5QB7.js
6659
+ // ../harness/dist/chunk-4EPJJMFG.js
6660
6660
  import { spawn as spawn4 } from "child_process";
6661
6661
  import { lstat as lstat2 } from "fs/promises";
6662
6662
  import { resolve as resolve23, sep as sep3 } from "path";
@@ -6963,7 +6963,7 @@ function looksLikeDestination(value2) {
6963
6963
  return /^(?:[a-z][a-z0-9+.-]*:\/\/|\/|\\\\)/i.test(text4) || /^[\w.-]+\.[a-z]{2,}(?:[/:]|$)/i.test(text4);
6964
6964
  }
6965
6965
 
6966
- // ../harness/dist/chunk-J7XU5QB7.js
6966
+ // ../harness/dist/chunk-4EPJJMFG.js
6967
6967
  import { readFile as readFile4, stat as stat2 } from "fs/promises";
6968
6968
  import { readFile as readFile3 } from "fs/promises";
6969
6969
  import { join as join33 } from "path";
@@ -7231,7 +7231,7 @@ async function buildCodeGraph(input) {
7231
7231
  return builder.build();
7232
7232
  }
7233
7233
 
7234
- // ../harness/dist/chunk-J7XU5QB7.js
7234
+ // ../harness/dist/chunk-4EPJJMFG.js
7235
7235
  import { createHash as createHash32 } from "crypto";
7236
7236
  async function digestStagedWorkspace(root, limits) {
7237
7237
  const files = [];
@@ -9874,6 +9874,55 @@ function codeRuntimeAcknowledgementGate(signal) {
9874
9874
  else signal.addEventListener("abort", onAbort, { once: true });
9875
9875
  return { ready, release };
9876
9876
  }
9877
+ function observeCodeRuntimeSessionSkills(command, skills, emit4) {
9878
+ return skills.map((skill) => ({
9879
+ ...skill,
9880
+ tools: skill.tools.map((tool) => {
9881
+ if (!tool.handler) return tool;
9882
+ const handler = tool.handler;
9883
+ return {
9884
+ ...tool,
9885
+ handler: async (input, context) => {
9886
+ const startedAt = Date.now();
9887
+ const operationId = digestRuntimeValue(
9888
+ `${command.commandId}:${skill.name}:${tool.name}:${context.toolCallId ?? "missing"}`
9889
+ );
9890
+ await emit4({
9891
+ type: "collaboration",
9892
+ phase: "started",
9893
+ skill: skill.name,
9894
+ tool: tool.name,
9895
+ operationId
9896
+ }).catch(() => void 0);
9897
+ try {
9898
+ const output = await handler(input, context);
9899
+ await emit4({
9900
+ type: "collaboration",
9901
+ phase: "completed",
9902
+ skill: skill.name,
9903
+ tool: tool.name,
9904
+ operationId,
9905
+ ok: output.isError !== true,
9906
+ durationMs: Date.now() - startedAt
9907
+ }).catch(() => void 0);
9908
+ return output;
9909
+ } catch (cause) {
9910
+ await emit4({
9911
+ type: "collaboration",
9912
+ phase: "completed",
9913
+ skill: skill.name,
9914
+ tool: tool.name,
9915
+ operationId,
9916
+ ok: false,
9917
+ durationMs: Date.now() - startedAt
9918
+ }).catch(() => void 0);
9919
+ throw cause;
9920
+ }
9921
+ }
9922
+ };
9923
+ })
9924
+ }));
9925
+ }
9877
9926
  var TheseusRuntimeEngine = class {
9878
9927
  constructor(options) {
9879
9928
  this.options = options;
@@ -10070,7 +10119,7 @@ var TheseusRuntimeEngine = class {
10070
10119
  event: (event) => this.#event(command, event, active.conversationRefs)
10071
10120
  });
10072
10121
  await this.#event(command, { type: "status", status: "running" }, active.conversationRefs);
10073
- const extraSkills = await sessionSkillsFor(this.options, command);
10122
+ const extraSkills = observeCodeRuntimeSessionSkills(command, await sessionSkillsFor(this.options, command), (event) => this.#event(command, event, active.conversationRefs));
10074
10123
  const result = await this.#attempt({
10075
10124
  inference,
10076
10125
  broker,
@@ -12446,13 +12495,15 @@ async function pmNext(ctx, parsed) {
12446
12495
  const ready = tasks.filter((record11) => record11.column === READY_COLUMN);
12447
12496
  const doing = tasks.filter((record11) => record11.column === "doing");
12448
12497
  const guidance = !goals.length ? "discuss alignment with the user before creating or claiming project work" : !ready.length ? 'refine a linked Backlog task and mark it Ready with "pm task ready <id>"' : `claim the top Ready task in one call: odla-ai pm start --app ${appId}`;
12498
+ const monitor = `odla-ai pm watch --app ${appId} --jsonl`;
12449
12499
  const result = {
12450
12500
  appId,
12451
12501
  projectId,
12452
12502
  openGoals: leanRecords("goal", goals, verbose),
12453
12503
  doing: leanRecords("task", doing, verbose),
12454
12504
  ready: leanRecords("task", ready, verbose),
12455
- next: guidance
12505
+ next: guidance,
12506
+ monitor
12456
12507
  };
12457
12508
  emit2(ctx, result, () => {
12458
12509
  ctx.out.log(`${appId}: goal-aligned work intake (read only)`);
@@ -12466,6 +12517,7 @@ async function pmNext(ctx, parsed) {
12466
12517
  else for (const record11 of records) printRecord(ctx, entity, record11);
12467
12518
  }
12468
12519
  ctx.out.log(`next: ${guidance}`);
12520
+ ctx.out.log(`monitor: ${monitor}`);
12469
12521
  });
12470
12522
  }
12471
12523
  async function pmHandoff(ctx, parsed) {
@@ -12477,17 +12529,20 @@ async function pmHandoff(ctx, parsed) {
12477
12529
  listFiltered(ctx, "bug", appId, projectId, { status: OPEN_BUG_STATUSES })
12478
12530
  ]);
12479
12531
  const clean4 = !goals.length && !tasks.length && !bugs.length;
12532
+ const monitor = `odla-ai pm watch --app ${appId} --jsonl`;
12480
12533
  const result = {
12481
12534
  appId,
12482
12535
  projectId,
12483
12536
  unmetGoals: leanRecords("goal", goals, verbose),
12484
12537
  activeTasks: leanRecords("task", tasks, verbose),
12485
12538
  openBugs: leanRecords("bug", bugs, verbose),
12486
- clean: clean4
12539
+ clean: clean4,
12540
+ monitor
12487
12541
  };
12488
12542
  emit2(ctx, result, () => {
12489
12543
  if (clean4) {
12490
12544
  ctx.out.log(`${appId}: no unresolved PM work`);
12545
+ ctx.out.log(`monitor: ${monitor}`);
12491
12546
  return;
12492
12547
  }
12493
12548
  ctx.out.log(`${appId}: authoritative PM handoff`);
@@ -12500,6 +12555,7 @@ async function pmHandoff(ctx, parsed) {
12500
12555
  if (!records.length) ctx.out.log("- (none)");
12501
12556
  else for (const record11 of records) printRecord(ctx, entity, record11);
12502
12557
  }
12558
+ ctx.out.log(`monitor: ${monitor}`);
12503
12559
  });
12504
12560
  }
12505
12561
 
@@ -16436,4 +16492,4 @@ export {
16436
16492
  isTerminalHostedSecurityStatus,
16437
16493
  runCli
16438
16494
  };
16439
- //# sourceMappingURL=chunk-J6GIGX6T.js.map
16495
+ //# sourceMappingURL=chunk-Q4BGAUEH.js.map