@odla-ai/cli 0.46.7 → 0.46.9
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/README.md +8 -1
- package/dist/bin.cjs +78 -23
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-AVUBGTWE.js → chunk-OW5WW5ET.js} +77 -24
- package/dist/chunk-OW5WW5ET.js.map +1 -0
- package/dist/{cli-IAA6SOCV.js → cli-CDIXAFN4.js} +2 -2
- package/dist/index.cjs +76 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-AVUBGTWE.js.map +0 -1
- /package/dist/{cli-IAA6SOCV.js.map → cli-CDIXAFN4.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-CDIXAFN4.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
|
});
|
|
@@ -653,6 +653,7 @@ function audienceBoundEnvToken(token, platform) {
|
|
|
653
653
|
}
|
|
654
654
|
var SCOPE_PURPOSE = {
|
|
655
655
|
"platform:status:read": "read the platform fleet health and deployment snapshot",
|
|
656
|
+
"platform:pm:read": "read the core PM inventory across all current odla projects",
|
|
656
657
|
"app:config:read": "compare checked-in intent with an exact-id app Registry configuration",
|
|
657
658
|
"app:config:write": "apply or inspect one revision-bound configuration operation for an app you own",
|
|
658
659
|
"platform:runbook:write": "read and edit all of odla's operational runbooks, including admin-visible content",
|
|
@@ -6318,7 +6319,7 @@ async function stageWorkspacePair(baselineSource, workspaceSource, options = {})
|
|
|
6318
6319
|
}
|
|
6319
6320
|
}
|
|
6320
6321
|
|
|
6321
|
-
// ../harness/dist/chunk-
|
|
6322
|
+
// ../harness/dist/chunk-IWVGSWY6.js
|
|
6322
6323
|
import { createHash as createHash3 } from "crypto";
|
|
6323
6324
|
import { readFile as readFile2, readdir as readdir2 } from "fs/promises";
|
|
6324
6325
|
import { relative as relative4, resolve as resolve10 } from "path";
|
|
@@ -6655,7 +6656,7 @@ function validateSnapshot(snapshot, limits) {
|
|
|
6655
6656
|
}
|
|
6656
6657
|
}
|
|
6657
6658
|
|
|
6658
|
-
// ../harness/dist/chunk-
|
|
6659
|
+
// ../harness/dist/chunk-IWVGSWY6.js
|
|
6659
6660
|
import { spawn as spawn4 } from "child_process";
|
|
6660
6661
|
import { lstat as lstat2 } from "fs/promises";
|
|
6661
6662
|
import { resolve as resolve23, sep as sep3 } from "path";
|
|
@@ -6962,7 +6963,7 @@ function looksLikeDestination(value2) {
|
|
|
6962
6963
|
return /^(?:[a-z][a-z0-9+.-]*:\/\/|\/|\\\\)/i.test(text4) || /^[\w.-]+\.[a-z]{2,}(?:[/:]|$)/i.test(text4);
|
|
6963
6964
|
}
|
|
6964
6965
|
|
|
6965
|
-
// ../harness/dist/chunk-
|
|
6966
|
+
// ../harness/dist/chunk-IWVGSWY6.js
|
|
6966
6967
|
import { readFile as readFile4, stat as stat2 } from "fs/promises";
|
|
6967
6968
|
import { readFile as readFile3 } from "fs/promises";
|
|
6968
6969
|
import { join as join33 } from "path";
|
|
@@ -7230,7 +7231,7 @@ async function buildCodeGraph(input) {
|
|
|
7230
7231
|
return builder.build();
|
|
7231
7232
|
}
|
|
7232
7233
|
|
|
7233
|
-
// ../harness/dist/chunk-
|
|
7234
|
+
// ../harness/dist/chunk-IWVGSWY6.js
|
|
7234
7235
|
import { createHash as createHash32 } from "crypto";
|
|
7235
7236
|
async function digestStagedWorkspace(root, limits) {
|
|
7236
7237
|
const files = [];
|
|
@@ -8515,6 +8516,7 @@ async function runCodeAgentAttempt(options) {
|
|
|
8515
8516
|
model: "brokered",
|
|
8516
8517
|
surface,
|
|
8517
8518
|
...options.recipeIds ? { recipeIds: options.recipeIds } : {},
|
|
8519
|
+
...options.extraSkills ? { extraSkills: options.extraSkills } : {},
|
|
8518
8520
|
...options.maxSteps === void 0 ? {} : { maxSteps: options.maxSteps },
|
|
8519
8521
|
...options.budget ? { budget: options.budget } : {},
|
|
8520
8522
|
...options.signal ? { signal: options.signal } : {},
|
|
@@ -9408,6 +9410,16 @@ function assertBudget(budget) {
|
|
|
9408
9410
|
throw new TypeError("goal budget deadline must be epoch milliseconds");
|
|
9409
9411
|
}
|
|
9410
9412
|
}
|
|
9413
|
+
async function sessionSkillsFor(options, command) {
|
|
9414
|
+
try {
|
|
9415
|
+
return await options.sessionSkills?.(command) ?? [];
|
|
9416
|
+
} catch (cause) {
|
|
9417
|
+
options.onDiagnostic?.(
|
|
9418
|
+
`session skills unavailable, continuing with code tools only: ${cause instanceof Error ? cause.message : String(cause)}`
|
|
9419
|
+
);
|
|
9420
|
+
return [];
|
|
9421
|
+
}
|
|
9422
|
+
}
|
|
9411
9423
|
function createCodeRuntimeToolBroker(input, lease, role) {
|
|
9412
9424
|
const broker = createCodeToolBroker({
|
|
9413
9425
|
recipes: input.recipes,
|
|
@@ -9891,6 +9903,7 @@ var TheseusRuntimeEngine = class {
|
|
|
9891
9903
|
event: (event) => this.#event(command, event, active.conversationRefs)
|
|
9892
9904
|
});
|
|
9893
9905
|
await this.#event(command, { type: "status", status: "running" }, active.conversationRefs);
|
|
9906
|
+
const extraSkills = await sessionSkillsFor(this.options, command);
|
|
9894
9907
|
const result = await this.#attempt({
|
|
9895
9908
|
inference,
|
|
9896
9909
|
broker,
|
|
@@ -9898,7 +9911,8 @@ var TheseusRuntimeEngine = class {
|
|
|
9898
9911
|
workspaceDir: active.workspace.workspaceDir,
|
|
9899
9912
|
prompt: metadata2.prompt,
|
|
9900
9913
|
signal: active.abort.signal,
|
|
9901
|
-
recipeIds: this.options.recipes.map((recipe2) => recipe2.id)
|
|
9914
|
+
recipeIds: this.options.recipes.map((recipe2) => recipe2.id),
|
|
9915
|
+
...extraSkills.length ? { extraSkills } : {}
|
|
9902
9916
|
});
|
|
9903
9917
|
const closing = result.finalText.trim();
|
|
9904
9918
|
const completed = result.status === "completed" && Boolean(closing);
|
|
@@ -10981,10 +10995,10 @@ Usage:
|
|
|
10981
10995
|
odla-ai pm project add --app <product-id> --name <name> [--description <text>] [--json]
|
|
10982
10996
|
odla-ai pm project use <project-id> [--json] [saved for this app, on this machine]
|
|
10983
10997
|
odla-ai pm project set <project-id> [--name <n>|--description <text>|--status <active|completed|archived>] [--mutation-id <id>] [--json]
|
|
10984
|
-
odla-ai pm goal list [--app <id>] [--project <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
10985
|
-
odla-ai pm task list [--app <id>] [--column <backlog|ready|doing|review|done>] [--goal <id>] [--assignee <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
10986
|
-
odla-ai pm decision list [--app <id>] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
10987
|
-
odla-ai pm bug list [--app <id
|
|
10998
|
+
odla-ai pm goal list [--app <id>] [--project <id>] [--platform-wide] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
10999
|
+
odla-ai pm task list [--app <id>] [--platform-wide] [--column <backlog|ready|doing|review|done>] [--goal <id>] [--assignee <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
11000
|
+
odla-ai pm decision list [--app <id>] [--platform-wide] [--status <s>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
|
|
11001
|
+
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]
|
|
10988
11002
|
odla-ai pm goal add --app <id> --title <t> [--status <s>] [--proof <text>] [--target <pct>] [--mutation-id <id>] [--json]
|
|
10989
11003
|
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]
|
|
10990
11004
|
odla-ai pm next --app <id> [--project <id>] [--verbose] [--json]
|
|
@@ -10996,7 +11010,7 @@ Usage:
|
|
|
10996
11010
|
odla-ai pm decision add --app <id> --title <t> --body <text> [--status <s>] [--mutation-id <id>] [--json]
|
|
10997
11011
|
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]
|
|
10998
11012
|
odla-ai bug report --app <id> --title <t> (--description <text>|--body <text>) [--severity <s>] [--json]
|
|
10999
|
-
odla-ai pm <goal|task|decision|bug> get <id> [--json]
|
|
11013
|
+
odla-ai pm <goal|task|decision|bug> get <id-or-uuid-prefix> [--platform-wide] [--json]
|
|
11000
11014
|
odla-ai pm <goal|task|decision|bug> link <id> [--json]
|
|
11001
11015
|
odla-ai pm <goal|task|decision|bug> ref <id> [--json]
|
|
11002
11016
|
odla-ai pm goal set <id> [--title <t>|--status <s>|--proof <text>|--no-proof|--target <pct>|--no-target] [--mutation-id <id>] [--json]
|
|
@@ -12088,8 +12102,39 @@ async function pmAdd(ctx, entity, parsed) {
|
|
|
12088
12102
|
const record11 = { id: res.id, appId, title: String(input.title) };
|
|
12089
12103
|
emit2(ctx, res, () => ctx.out.log(`created ${entity}: ${studioRecordLink(ctx, entity, record11)}`));
|
|
12090
12104
|
}
|
|
12105
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12106
|
+
var UUID_PREFIX = /^[0-9a-f-]{8,35}$/i;
|
|
12107
|
+
function looksLikeUuidPrefix(value2) {
|
|
12108
|
+
if (!UUID_PREFIX.test(value2) || !/[0-9a-f]/i.test(value2)) return false;
|
|
12109
|
+
return "00000000-0000-0000-0000-000000000000".slice(0, value2.length).split("").every((expected, index) => expected === "-" ? value2[index] === "-" : value2[index] !== "-");
|
|
12110
|
+
}
|
|
12111
|
+
async function resolvePmId(ctx, entity, supplied) {
|
|
12112
|
+
if (UUID.test(supplied) || !looksLikeUuidPrefix(supplied)) return supplied;
|
|
12113
|
+
const prefix = supplied.toLowerCase();
|
|
12114
|
+
const matches = [];
|
|
12115
|
+
const limit = 200;
|
|
12116
|
+
let offset = 0;
|
|
12117
|
+
for (; ; ) {
|
|
12118
|
+
const page2 = await pmRequest(
|
|
12119
|
+
ctx,
|
|
12120
|
+
"GET",
|
|
12121
|
+
`/${entity}?limit=${limit}&offset=${offset}`
|
|
12122
|
+
);
|
|
12123
|
+
matches.push(...page2.records.map((record11) => record11.id).filter((id2) => id2.toLowerCase().startsWith(prefix)));
|
|
12124
|
+
offset += page2.records.length;
|
|
12125
|
+
if (matches.length > 1 || page2.records.length === 0 || offset >= page2.total) break;
|
|
12126
|
+
}
|
|
12127
|
+
if (matches.length === 0) {
|
|
12128
|
+
throw new Error(`no ${entity} id matches prefix "${supplied}"`);
|
|
12129
|
+
}
|
|
12130
|
+
if (matches.length > 1) {
|
|
12131
|
+
throw new Error(`ambiguous ${entity} id prefix "${supplied}"`);
|
|
12132
|
+
}
|
|
12133
|
+
return matches[0];
|
|
12134
|
+
}
|
|
12091
12135
|
async function pmGet(ctx, entity, id2) {
|
|
12092
|
-
const
|
|
12136
|
+
const resolved = await resolvePmId(ctx, entity, id2);
|
|
12137
|
+
const { record: record11 } = await pmRequest(ctx, "GET", `/${entity}/${encodeURIComponent(resolved)}`);
|
|
12093
12138
|
emit2(ctx, record11, () => printRecord(ctx, entity, record11));
|
|
12094
12139
|
}
|
|
12095
12140
|
async function pmReference(ctx, entity, id2) {
|
|
@@ -12730,9 +12775,9 @@ var ALIASES = {
|
|
|
12730
12775
|
};
|
|
12731
12776
|
var COMMON_OPTIONS = ["config", "token", "email", "json", "platform", "context", "open"];
|
|
12732
12777
|
var ACTION_OPTIONS = {
|
|
12733
|
-
list: ["app", "project", "q", "limit", "offset"],
|
|
12778
|
+
list: ["app", "project", "q", "limit", "offset", "platform-wide"],
|
|
12734
12779
|
add: ["app", "project", "title", "mutation-id"],
|
|
12735
|
-
get: [],
|
|
12780
|
+
get: ["platform-wide"],
|
|
12736
12781
|
set: ["mutation-id"],
|
|
12737
12782
|
done: ["mutation-id"],
|
|
12738
12783
|
comment: ["body", "mutation-id"],
|
|
@@ -12792,15 +12837,23 @@ async function buildContext2(parsed, deps) {
|
|
|
12792
12837
|
const { cfg } = context;
|
|
12793
12838
|
const doFetch = deps.fetch ?? fetch;
|
|
12794
12839
|
const out = deps.stdout ?? console;
|
|
12795
|
-
const
|
|
12840
|
+
const platformWide = parsed.options["platform-wide"] === true;
|
|
12841
|
+
const tokenOptions = {
|
|
12842
|
+
token: stringOpt(parsed.options.token),
|
|
12843
|
+
email: stringOpt(parsed.options.email),
|
|
12844
|
+
open: parsed.options.open === false ? false : parsed.options.open === true ? true : void 0,
|
|
12845
|
+
openApprovalUrl: deps.openUrl
|
|
12846
|
+
};
|
|
12847
|
+
const token = platformWide ? await resolveAdminPlatformToken({
|
|
12848
|
+
platform: cfg.platformUrl,
|
|
12849
|
+
scope: "platform:pm:read",
|
|
12850
|
+
rootDir: cfg.rootDir,
|
|
12851
|
+
fetch: doFetch,
|
|
12852
|
+
stdout: out,
|
|
12853
|
+
...tokenOptions
|
|
12854
|
+
}) : await getDeveloperToken(
|
|
12796
12855
|
cfg,
|
|
12797
|
-
{
|
|
12798
|
-
configPath: cfg.configPath,
|
|
12799
|
-
token: stringOpt(parsed.options.token),
|
|
12800
|
-
email: stringOpt(parsed.options.email),
|
|
12801
|
-
open: parsed.options.open === false ? false : parsed.options.open === true ? true : void 0,
|
|
12802
|
-
openApprovalUrl: deps.openUrl
|
|
12803
|
-
},
|
|
12856
|
+
{ configPath: cfg.configPath, ...tokenOptions },
|
|
12804
12857
|
doFetch,
|
|
12805
12858
|
out
|
|
12806
12859
|
);
|
|
@@ -12815,8 +12868,8 @@ async function buildContext2(parsed, deps) {
|
|
|
12815
12868
|
json: parsed.options.json === true,
|
|
12816
12869
|
// Preserve PM's existing cross-project default when a config is present;
|
|
12817
12870
|
// only an explicit remote-agent environment or profile selects an app.
|
|
12818
|
-
appId: context.app.source === "environment" || context.app.source === "profile" ? context.app.value ?? void 0 : compatibleProject?.appId,
|
|
12819
|
-
projectId: compatibleProject?.projectId,
|
|
12871
|
+
appId: platformWide ? void 0 : context.app.source === "environment" || context.app.source === "profile" ? context.app.value ?? void 0 : compatibleProject?.appId,
|
|
12872
|
+
projectId: platformWide ? void 0 : compatibleProject?.projectId,
|
|
12820
12873
|
rootDir: cfg.rootDir,
|
|
12821
12874
|
...deps.sleep ? { sleep: deps.sleep } : {},
|
|
12822
12875
|
...deps.now ? { now: deps.now } : {}
|
|
@@ -16211,4 +16264,4 @@ export {
|
|
|
16211
16264
|
isTerminalHostedSecurityStatus,
|
|
16212
16265
|
runCli
|
|
16213
16266
|
};
|
|
16214
|
-
//# sourceMappingURL=chunk-
|
|
16267
|
+
//# sourceMappingURL=chunk-OW5WW5ET.js.map
|