@odla-ai/cli 0.46.10 → 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.cjs +87 -19
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-QI2UJSSB.js → chunk-Q4BGAUEH.js} +81 -13
- package/dist/chunk-Q4BGAUEH.js.map +1 -0
- package/dist/{cli-URBPUBP5.js → cli-5CDFI4AY.js} +2 -2
- package/dist/index.cjs +80 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-QI2UJSSB.js.map +0 -1
- /package/dist/{cli-URBPUBP5.js.map → cli-5CDFI4AY.js.map} +0 -0
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-
|
|
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-
|
|
5946
|
+
// ../harness/dist/chunk-I43KTCJ2.js
|
|
5947
5947
|
var HARNESS_PROTOCOL_VERSION = 1;
|
|
5948
5948
|
|
|
5949
|
-
// ../harness/dist/chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 = [];
|
|
@@ -7399,12 +7399,14 @@ async function runCodeRuntimeHeartbeatLoop(options) {
|
|
|
7399
7399
|
} while (!options.signal?.aborted);
|
|
7400
7400
|
}
|
|
7401
7401
|
var CodeRuntimeReconciler = class {
|
|
7402
|
-
constructor(control, engine) {
|
|
7402
|
+
constructor(control, engine, onDiagnostic) {
|
|
7403
7403
|
this.control = control;
|
|
7404
7404
|
this.engine = engine;
|
|
7405
|
+
this.onDiagnostic = onDiagnostic;
|
|
7405
7406
|
}
|
|
7406
7407
|
control;
|
|
7407
7408
|
engine;
|
|
7409
|
+
onDiagnostic;
|
|
7408
7410
|
results = /* @__PURE__ */ new Map();
|
|
7409
7411
|
async reconcile(snapshot) {
|
|
7410
7412
|
for (const command of snapshot.commands) {
|
|
@@ -7422,7 +7424,13 @@ var CodeRuntimeReconciler = class {
|
|
|
7422
7424
|
}
|
|
7423
7425
|
await this.control.acknowledge(command.commandId, completed.result);
|
|
7424
7426
|
if (!completed.notified) {
|
|
7425
|
-
|
|
7427
|
+
try {
|
|
7428
|
+
await this.engine.acknowledged?.(command, completed.result);
|
|
7429
|
+
} catch (error) {
|
|
7430
|
+
this.onDiagnostic?.(
|
|
7431
|
+
`command ${command.commandId} acknowledged handling failed \xB7 ${error instanceof Error ? error.message : String(error)}`
|
|
7432
|
+
);
|
|
7433
|
+
}
|
|
7426
7434
|
completed.notified = true;
|
|
7427
7435
|
}
|
|
7428
7436
|
}
|
|
@@ -9866,6 +9874,55 @@ function codeRuntimeAcknowledgementGate(signal) {
|
|
|
9866
9874
|
else signal.addEventListener("abort", onAbort, { once: true });
|
|
9867
9875
|
return { ready, release };
|
|
9868
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
|
+
}
|
|
9869
9926
|
var TheseusRuntimeEngine = class {
|
|
9870
9927
|
constructor(options) {
|
|
9871
9928
|
this.options = options;
|
|
@@ -10062,7 +10119,7 @@ var TheseusRuntimeEngine = class {
|
|
|
10062
10119
|
event: (event) => this.#event(command, event, active.conversationRefs)
|
|
10063
10120
|
});
|
|
10064
10121
|
await this.#event(command, { type: "status", status: "running" }, active.conversationRefs);
|
|
10065
|
-
const extraSkills = await sessionSkillsFor(this.options, command);
|
|
10122
|
+
const extraSkills = observeCodeRuntimeSessionSkills(command, await sessionSkillsFor(this.options, command), (event) => this.#event(command, event, active.conversationRefs));
|
|
10066
10123
|
const result = await this.#attempt({
|
|
10067
10124
|
inference,
|
|
10068
10125
|
broker,
|
|
@@ -10586,7 +10643,11 @@ async function runCodeRuntime(input) {
|
|
|
10586
10643
|
localSource: input.localSource,
|
|
10587
10644
|
onDiagnostic: (message2) => input.stdout.error(`Theseus runtime failed \xB7 ${message2}`)
|
|
10588
10645
|
});
|
|
10589
|
-
const reconciler = new CodeRuntimeReconciler(
|
|
10646
|
+
const reconciler = new CodeRuntimeReconciler(
|
|
10647
|
+
control,
|
|
10648
|
+
commandEngine,
|
|
10649
|
+
(message2) => input.stdout.error(`Theseus runtime \xB7 ${message2}`)
|
|
10650
|
+
);
|
|
10590
10651
|
try {
|
|
10591
10652
|
await runCodeRuntimeHeartbeatLoop({
|
|
10592
10653
|
control,
|
|
@@ -12434,13 +12495,15 @@ async function pmNext(ctx, parsed) {
|
|
|
12434
12495
|
const ready = tasks.filter((record11) => record11.column === READY_COLUMN);
|
|
12435
12496
|
const doing = tasks.filter((record11) => record11.column === "doing");
|
|
12436
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`;
|
|
12437
12499
|
const result = {
|
|
12438
12500
|
appId,
|
|
12439
12501
|
projectId,
|
|
12440
12502
|
openGoals: leanRecords("goal", goals, verbose),
|
|
12441
12503
|
doing: leanRecords("task", doing, verbose),
|
|
12442
12504
|
ready: leanRecords("task", ready, verbose),
|
|
12443
|
-
next: guidance
|
|
12505
|
+
next: guidance,
|
|
12506
|
+
monitor
|
|
12444
12507
|
};
|
|
12445
12508
|
emit2(ctx, result, () => {
|
|
12446
12509
|
ctx.out.log(`${appId}: goal-aligned work intake (read only)`);
|
|
@@ -12454,6 +12517,7 @@ async function pmNext(ctx, parsed) {
|
|
|
12454
12517
|
else for (const record11 of records) printRecord(ctx, entity, record11);
|
|
12455
12518
|
}
|
|
12456
12519
|
ctx.out.log(`next: ${guidance}`);
|
|
12520
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
12457
12521
|
});
|
|
12458
12522
|
}
|
|
12459
12523
|
async function pmHandoff(ctx, parsed) {
|
|
@@ -12465,17 +12529,20 @@ async function pmHandoff(ctx, parsed) {
|
|
|
12465
12529
|
listFiltered(ctx, "bug", appId, projectId, { status: OPEN_BUG_STATUSES })
|
|
12466
12530
|
]);
|
|
12467
12531
|
const clean4 = !goals.length && !tasks.length && !bugs.length;
|
|
12532
|
+
const monitor = `odla-ai pm watch --app ${appId} --jsonl`;
|
|
12468
12533
|
const result = {
|
|
12469
12534
|
appId,
|
|
12470
12535
|
projectId,
|
|
12471
12536
|
unmetGoals: leanRecords("goal", goals, verbose),
|
|
12472
12537
|
activeTasks: leanRecords("task", tasks, verbose),
|
|
12473
12538
|
openBugs: leanRecords("bug", bugs, verbose),
|
|
12474
|
-
clean: clean4
|
|
12539
|
+
clean: clean4,
|
|
12540
|
+
monitor
|
|
12475
12541
|
};
|
|
12476
12542
|
emit2(ctx, result, () => {
|
|
12477
12543
|
if (clean4) {
|
|
12478
12544
|
ctx.out.log(`${appId}: no unresolved PM work`);
|
|
12545
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
12479
12546
|
return;
|
|
12480
12547
|
}
|
|
12481
12548
|
ctx.out.log(`${appId}: authoritative PM handoff`);
|
|
@@ -12488,6 +12555,7 @@ async function pmHandoff(ctx, parsed) {
|
|
|
12488
12555
|
if (!records.length) ctx.out.log("- (none)");
|
|
12489
12556
|
else for (const record11 of records) printRecord(ctx, entity, record11);
|
|
12490
12557
|
}
|
|
12558
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
12491
12559
|
});
|
|
12492
12560
|
}
|
|
12493
12561
|
|
|
@@ -16424,4 +16492,4 @@ export {
|
|
|
16424
16492
|
isTerminalHostedSecurityStatus,
|
|
16425
16493
|
runCli
|
|
16426
16494
|
};
|
|
16427
|
-
//# sourceMappingURL=chunk-
|
|
16495
|
+
//# sourceMappingURL=chunk-Q4BGAUEH.js.map
|