@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.cjs
CHANGED
|
@@ -6878,17 +6878,17 @@ var init_cli_project = __esm({
|
|
|
6878
6878
|
}
|
|
6879
6879
|
});
|
|
6880
6880
|
|
|
6881
|
-
// ../harness/dist/chunk-
|
|
6881
|
+
// ../harness/dist/chunk-I43KTCJ2.js
|
|
6882
6882
|
var HARNESS_PROTOCOL_VERSION;
|
|
6883
|
-
var
|
|
6884
|
-
"../harness/dist/chunk-
|
|
6883
|
+
var init_chunk_I43KTCJ2 = __esm({
|
|
6884
|
+
"../harness/dist/chunk-I43KTCJ2.js"() {
|
|
6885
6885
|
"use strict";
|
|
6886
6886
|
init_cjs_shims();
|
|
6887
6887
|
HARNESS_PROTOCOL_VERSION = 1;
|
|
6888
6888
|
}
|
|
6889
6889
|
});
|
|
6890
6890
|
|
|
6891
|
-
// ../harness/dist/chunk-
|
|
6891
|
+
// ../harness/dist/chunk-HDIR4MM5.js
|
|
6892
6892
|
function assertPinnedImage(image) {
|
|
6893
6893
|
if (!DIGEST_IMAGE.test(image)) throw new TypeError("container image must be pinned by sha256 digest");
|
|
6894
6894
|
}
|
|
@@ -7237,8 +7237,8 @@ async function stageWorkspacePair(baselineSource, workspaceSource, options = {})
|
|
|
7237
7237
|
}
|
|
7238
7238
|
}
|
|
7239
7239
|
var import_child_process, import_fs, import_promises2, import_path, import_process, import_promises3, import_os, import_path2, import_child_process2, import_path3, import_promises4, import_os2, import_path4, import_child_process3, DIGEST_IMAGE, SKIP_WORKSPACE_DIRS, SECRET_WORKSPACE_FILE;
|
|
7240
|
-
var
|
|
7241
|
-
"../harness/dist/chunk-
|
|
7240
|
+
var init_chunk_HDIR4MM5 = __esm({
|
|
7241
|
+
"../harness/dist/chunk-HDIR4MM5.js"() {
|
|
7242
7242
|
"use strict";
|
|
7243
7243
|
init_cjs_shims();
|
|
7244
7244
|
import_child_process = require("child_process");
|
|
@@ -8236,7 +8236,7 @@ var init_code2 = __esm({
|
|
|
8236
8236
|
}
|
|
8237
8237
|
});
|
|
8238
8238
|
|
|
8239
|
-
// ../harness/dist/chunk-
|
|
8239
|
+
// ../harness/dist/chunk-4EPJJMFG.js
|
|
8240
8240
|
async function digestStagedWorkspace(root, limits) {
|
|
8241
8241
|
const files = [];
|
|
8242
8242
|
const walk = async (directory) => {
|
|
@@ -10640,13 +10640,62 @@ function codeRuntimeAcknowledgementGate(signal) {
|
|
|
10640
10640
|
else signal.addEventListener("abort", onAbort, { once: true });
|
|
10641
10641
|
return { ready, release };
|
|
10642
10642
|
}
|
|
10643
|
+
function observeCodeRuntimeSessionSkills(command, skills, emit4) {
|
|
10644
|
+
return skills.map((skill) => ({
|
|
10645
|
+
...skill,
|
|
10646
|
+
tools: skill.tools.map((tool) => {
|
|
10647
|
+
if (!tool.handler) return tool;
|
|
10648
|
+
const handler = tool.handler;
|
|
10649
|
+
return {
|
|
10650
|
+
...tool,
|
|
10651
|
+
handler: async (input, context) => {
|
|
10652
|
+
const startedAt = Date.now();
|
|
10653
|
+
const operationId = digestRuntimeValue(
|
|
10654
|
+
`${command.commandId}:${skill.name}:${tool.name}:${context.toolCallId ?? "missing"}`
|
|
10655
|
+
);
|
|
10656
|
+
await emit4({
|
|
10657
|
+
type: "collaboration",
|
|
10658
|
+
phase: "started",
|
|
10659
|
+
skill: skill.name,
|
|
10660
|
+
tool: tool.name,
|
|
10661
|
+
operationId
|
|
10662
|
+
}).catch(() => void 0);
|
|
10663
|
+
try {
|
|
10664
|
+
const output = await handler(input, context);
|
|
10665
|
+
await emit4({
|
|
10666
|
+
type: "collaboration",
|
|
10667
|
+
phase: "completed",
|
|
10668
|
+
skill: skill.name,
|
|
10669
|
+
tool: tool.name,
|
|
10670
|
+
operationId,
|
|
10671
|
+
ok: output.isError !== true,
|
|
10672
|
+
durationMs: Date.now() - startedAt
|
|
10673
|
+
}).catch(() => void 0);
|
|
10674
|
+
return output;
|
|
10675
|
+
} catch (cause) {
|
|
10676
|
+
await emit4({
|
|
10677
|
+
type: "collaboration",
|
|
10678
|
+
phase: "completed",
|
|
10679
|
+
skill: skill.name,
|
|
10680
|
+
tool: tool.name,
|
|
10681
|
+
operationId,
|
|
10682
|
+
ok: false,
|
|
10683
|
+
durationMs: Date.now() - startedAt
|
|
10684
|
+
}).catch(() => void 0);
|
|
10685
|
+
throw cause;
|
|
10686
|
+
}
|
|
10687
|
+
}
|
|
10688
|
+
};
|
|
10689
|
+
})
|
|
10690
|
+
}));
|
|
10691
|
+
}
|
|
10643
10692
|
var import_crypto, import_promises5, import_path5, import_child_process4, import_promises6, import_path6, import_child_process5, import_process2, import_crypto2, import_crypto3, import_fs2, import_promises7, import_path7, import_promises8, import_os3, import_path8, import_ai4, import_ai5, import_child_process6, import_promises9, import_path9, import_promises10, import_promises11, import_path10, import_crypto4, CODE_RUNTIME_PROTOCOL_VERSION, CodeRuntimeReconciler, CodeRuntimeControlError, record5, invalid, RESERVED, SECRET, PATH, FORBIDDEN, ARTIFACT_PATH, PRIVATE_ARTIFACT_PART, SHA3, DIGEST3, ID3, RULE, DEFAULT_PREFIXES, DEFAULT_SUFFIXES, message, CodeRuntimeCheckpointManager, record22, SOURCE_LIMITS, RESERVED2, SECRET2, SOURCE_MAX_FILES, SOURCE_MAX_BYTES, SOURCE_SET_MAX_BYTES, V1_SYSTEM_PROMPT, V2_SYSTEM_PROMPT, V3_SYSTEM_PROMPT, SYSTEM_PROMPT_FOR, DEFAULT_MAX_FILES, DEFAULT_MAX_RESULTS, DEFAULT_MAX_FILE_BYTES, MAX_NATIVE_ARG_BYTES, DESTINATIONS, READ, LIST, SEARCH, GRAPH, PATCH, RECIPE, cache, shortId, GRAPH_TOOLS, MAX_MEMORY_BODY, POSITIVE, digestRuntimeValue, runtimeErrorMessage, text3, integer2, record32, excerpt, paths, TheseusRuntimeEngine;
|
|
10644
|
-
var
|
|
10645
|
-
"../harness/dist/chunk-
|
|
10693
|
+
var init_chunk_4EPJJMFG = __esm({
|
|
10694
|
+
"../harness/dist/chunk-4EPJJMFG.js"() {
|
|
10646
10695
|
"use strict";
|
|
10647
10696
|
init_cjs_shims();
|
|
10648
|
-
|
|
10649
|
-
|
|
10697
|
+
init_chunk_HDIR4MM5();
|
|
10698
|
+
init_chunk_I43KTCJ2();
|
|
10650
10699
|
import_crypto = require("crypto");
|
|
10651
10700
|
import_promises5 = require("fs/promises");
|
|
10652
10701
|
import_path5 = require("path");
|
|
@@ -10681,12 +10730,14 @@ var init_chunk_NG7AYYH3 = __esm({
|
|
|
10681
10730
|
import_crypto4 = require("crypto");
|
|
10682
10731
|
CODE_RUNTIME_PROTOCOL_VERSION = 1;
|
|
10683
10732
|
CodeRuntimeReconciler = class {
|
|
10684
|
-
constructor(control, engine) {
|
|
10733
|
+
constructor(control, engine, onDiagnostic) {
|
|
10685
10734
|
this.control = control;
|
|
10686
10735
|
this.engine = engine;
|
|
10736
|
+
this.onDiagnostic = onDiagnostic;
|
|
10687
10737
|
}
|
|
10688
10738
|
control;
|
|
10689
10739
|
engine;
|
|
10740
|
+
onDiagnostic;
|
|
10690
10741
|
results = /* @__PURE__ */ new Map();
|
|
10691
10742
|
async reconcile(snapshot) {
|
|
10692
10743
|
for (const command of snapshot.commands) {
|
|
@@ -10704,7 +10755,13 @@ var init_chunk_NG7AYYH3 = __esm({
|
|
|
10704
10755
|
}
|
|
10705
10756
|
await this.control.acknowledge(command.commandId, completed.result);
|
|
10706
10757
|
if (!completed.notified) {
|
|
10707
|
-
|
|
10758
|
+
try {
|
|
10759
|
+
await this.engine.acknowledged?.(command, completed.result);
|
|
10760
|
+
} catch (error) {
|
|
10761
|
+
this.onDiagnostic?.(
|
|
10762
|
+
`command ${command.commandId} acknowledged handling failed \xB7 ${error instanceof Error ? error.message : String(error)}`
|
|
10763
|
+
);
|
|
10764
|
+
}
|
|
10708
10765
|
completed.notified = true;
|
|
10709
10766
|
}
|
|
10710
10767
|
}
|
|
@@ -11105,7 +11162,7 @@ Never claim a build or test passed unless odla_run_recipe returned that result.`
|
|
|
11105
11162
|
event: (event) => this.#event(command, event, active.conversationRefs)
|
|
11106
11163
|
});
|
|
11107
11164
|
await this.#event(command, { type: "status", status: "running" }, active.conversationRefs);
|
|
11108
|
-
const extraSkills = await sessionSkillsFor(this.options, command);
|
|
11165
|
+
const extraSkills = observeCodeRuntimeSessionSkills(command, await sessionSkillsFor(this.options, command), (event) => this.#event(command, event, active.conversationRefs));
|
|
11109
11166
|
const result = await this.#attempt({
|
|
11110
11167
|
inference,
|
|
11111
11168
|
broker,
|
|
@@ -11210,8 +11267,8 @@ var init_node = __esm({
|
|
|
11210
11267
|
"../harness/dist/node.js"() {
|
|
11211
11268
|
"use strict";
|
|
11212
11269
|
init_cjs_shims();
|
|
11213
|
-
|
|
11214
|
-
|
|
11270
|
+
init_chunk_4EPJJMFG();
|
|
11271
|
+
init_chunk_HDIR4MM5();
|
|
11215
11272
|
MEASURED_PREMIUM = Object.freeze({
|
|
11216
11273
|
/** 3 racers vs pure depth at equal budget: 21,044 / 7,936. */
|
|
11217
11274
|
racePerRacer: 0.55,
|
|
@@ -11601,7 +11658,11 @@ async function runCodeRuntime(input) {
|
|
|
11601
11658
|
localSource: input.localSource,
|
|
11602
11659
|
onDiagnostic: (message2) => input.stdout.error(`Theseus runtime failed \xB7 ${message2}`)
|
|
11603
11660
|
});
|
|
11604
|
-
const reconciler = new CodeRuntimeReconciler(
|
|
11661
|
+
const reconciler = new CodeRuntimeReconciler(
|
|
11662
|
+
control,
|
|
11663
|
+
commandEngine,
|
|
11664
|
+
(message2) => input.stdout.error(`Theseus runtime \xB7 ${message2}`)
|
|
11665
|
+
);
|
|
11605
11666
|
try {
|
|
11606
11667
|
await runCodeRuntimeHeartbeatLoop({
|
|
11607
11668
|
control,
|
|
@@ -13629,13 +13690,15 @@ async function pmNext(ctx, parsed) {
|
|
|
13629
13690
|
const ready = tasks.filter((record11) => record11.column === READY_COLUMN);
|
|
13630
13691
|
const doing = tasks.filter((record11) => record11.column === "doing");
|
|
13631
13692
|
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}`;
|
|
13693
|
+
const monitor = `odla-ai pm watch --app ${appId} --jsonl`;
|
|
13632
13694
|
const result = {
|
|
13633
13695
|
appId,
|
|
13634
13696
|
projectId,
|
|
13635
13697
|
openGoals: leanRecords("goal", goals, verbose),
|
|
13636
13698
|
doing: leanRecords("task", doing, verbose),
|
|
13637
13699
|
ready: leanRecords("task", ready, verbose),
|
|
13638
|
-
next: guidance
|
|
13700
|
+
next: guidance,
|
|
13701
|
+
monitor
|
|
13639
13702
|
};
|
|
13640
13703
|
emit2(ctx, result, () => {
|
|
13641
13704
|
ctx.out.log(`${appId}: goal-aligned work intake (read only)`);
|
|
@@ -13649,6 +13712,7 @@ async function pmNext(ctx, parsed) {
|
|
|
13649
13712
|
else for (const record11 of records) printRecord(ctx, entity, record11);
|
|
13650
13713
|
}
|
|
13651
13714
|
ctx.out.log(`next: ${guidance}`);
|
|
13715
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
13652
13716
|
});
|
|
13653
13717
|
}
|
|
13654
13718
|
async function pmHandoff(ctx, parsed) {
|
|
@@ -13660,17 +13724,20 @@ async function pmHandoff(ctx, parsed) {
|
|
|
13660
13724
|
listFiltered(ctx, "bug", appId, projectId, { status: OPEN_BUG_STATUSES })
|
|
13661
13725
|
]);
|
|
13662
13726
|
const clean4 = !goals.length && !tasks.length && !bugs.length;
|
|
13727
|
+
const monitor = `odla-ai pm watch --app ${appId} --jsonl`;
|
|
13663
13728
|
const result = {
|
|
13664
13729
|
appId,
|
|
13665
13730
|
projectId,
|
|
13666
13731
|
unmetGoals: leanRecords("goal", goals, verbose),
|
|
13667
13732
|
activeTasks: leanRecords("task", tasks, verbose),
|
|
13668
13733
|
openBugs: leanRecords("bug", bugs, verbose),
|
|
13669
|
-
clean: clean4
|
|
13734
|
+
clean: clean4,
|
|
13735
|
+
monitor
|
|
13670
13736
|
};
|
|
13671
13737
|
emit2(ctx, result, () => {
|
|
13672
13738
|
if (clean4) {
|
|
13673
13739
|
ctx.out.log(`${appId}: no unresolved PM work`);
|
|
13740
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
13674
13741
|
return;
|
|
13675
13742
|
}
|
|
13676
13743
|
ctx.out.log(`${appId}: authoritative PM handoff`);
|
|
@@ -13683,6 +13750,7 @@ async function pmHandoff(ctx, parsed) {
|
|
|
13683
13750
|
if (!records.length) ctx.out.log("- (none)");
|
|
13684
13751
|
else for (const record11 of records) printRecord(ctx, entity, record11);
|
|
13685
13752
|
}
|
|
13753
|
+
ctx.out.log(`monitor: ${monitor}`);
|
|
13686
13754
|
});
|
|
13687
13755
|
}
|
|
13688
13756
|
var READY_COLUMN, UNMET_GOAL_STATUS, ACTIVE_TASK_COLUMNS, OPEN_BUG_STATUSES, wantsVerbose;
|