@oxagen/cli 5.5.1-160 → 5.5.1-165
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/oxagen.mjs +49 -9
- package/package.json +1 -1
package/oxagen.mjs
CHANGED
|
@@ -32034,7 +32034,7 @@ import { readFileSync as readFileSync11 } from "node:fs";
|
|
|
32034
32034
|
import { dirname as dirname14, resolve as resolve3 } from "node:path";
|
|
32035
32035
|
import { fileURLToPath } from "node:url";
|
|
32036
32036
|
function readVersion() {
|
|
32037
|
-
if (true) return "5.5.1-
|
|
32037
|
+
if (true) return "5.5.1-165";
|
|
32038
32038
|
try {
|
|
32039
32039
|
const here = dirname14(fileURLToPath(import.meta.url));
|
|
32040
32040
|
const pkg = JSON.parse(
|
|
@@ -78060,7 +78060,7 @@ var init_package = __esm({
|
|
|
78060
78060
|
"package.json"() {
|
|
78061
78061
|
package_default = {
|
|
78062
78062
|
name: "@oxagen/cli",
|
|
78063
|
-
version: "5.5.1-
|
|
78063
|
+
version: "5.5.1-165",
|
|
78064
78064
|
description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
|
|
78065
78065
|
type: "module",
|
|
78066
78066
|
main: "./dist/index.js",
|
|
@@ -92774,7 +92774,7 @@ var init_work_order_shared = __esm({
|
|
|
92774
92774
|
workRevisionSchema = external_exports.number().int().min(1);
|
|
92775
92775
|
workDigestSchema = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
92776
92776
|
workHeadShaSchema = external_exports.string().regex(/^[0-9a-f]{40}$/, "a head commit is 40 lowercase hex characters");
|
|
92777
|
-
workReasonSchema = external_exports.string().trim().
|
|
92777
|
+
workReasonSchema = external_exports.string().trim().max(2e3).default("");
|
|
92778
92778
|
WORK_STEERING_MAX = 4e3;
|
|
92779
92779
|
workSteeringSchema = external_exports.string().trim().max(WORK_STEERING_MAX);
|
|
92780
92780
|
WORK_STEERING_MENTIONS_MAX = 20;
|
|
@@ -92840,7 +92840,9 @@ var init_work_order_shared = __esm({
|
|
|
92840
92840
|
"declined",
|
|
92841
92841
|
"duplicate",
|
|
92842
92842
|
"stale",
|
|
92843
|
-
"addressed"
|
|
92843
|
+
"addressed",
|
|
92844
|
+
"fixed",
|
|
92845
|
+
"shipped"
|
|
92844
92846
|
];
|
|
92845
92847
|
WORK_CLOSURE_RESOLUTIONS = [
|
|
92846
92848
|
...WORK_ACTION_CLOSE_RESOLUTIONS,
|
|
@@ -119835,6 +119837,14 @@ function switchOf(name2) {
|
|
|
119835
119837
|
const found = SWITCHES.find(([key, flag2]) => key === name2 || flag2 === name2);
|
|
119836
119838
|
return found ? found[0] : null;
|
|
119837
119839
|
}
|
|
119840
|
+
function printBacklog(workspace, writer) {
|
|
119841
|
+
const [, flag2, label] = BACKLOG;
|
|
119842
|
+
const closer = workspace.closer;
|
|
119843
|
+
writer.write("Workspace");
|
|
119844
|
+
writer.write(
|
|
119845
|
+
` ${label} (${flag2}): ${closer === null ? "asks first" : `acts alone as ${closer.name ?? closer.id}`}`
|
|
119846
|
+
);
|
|
119847
|
+
}
|
|
119838
119848
|
function printSwitches(permissions, writer) {
|
|
119839
119849
|
for (const [key, flag2, label] of SWITCHES)
|
|
119840
119850
|
writer.write(
|
|
@@ -119856,14 +119866,16 @@ async function stellaPermissions(opts = {}, writer = stdoutWriter) {
|
|
|
119856
119866
|
}
|
|
119857
119867
|
writer.write("What stella may do alone for you in this workspace");
|
|
119858
119868
|
printSwitches(result2.permissions, writer);
|
|
119869
|
+
if (result2.workspace !== void 0) printBacklog(result2.workspace, writer);
|
|
119859
119870
|
}
|
|
119860
119871
|
async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter) {
|
|
119861
119872
|
const cmd = createOutput({ json: opts.json }, writer);
|
|
119873
|
+
const backlog = name2 === BACKLOG[0] || name2 === BACKLOG[1];
|
|
119862
119874
|
const key = switchOf(name2);
|
|
119863
|
-
if (key === null) {
|
|
119875
|
+
if (key === null && !backlog) {
|
|
119864
119876
|
cmd.error(
|
|
119865
119877
|
new Error(
|
|
119866
|
-
`There is no switch named ${name2}. Use one of ${SWITCHES.map(([, flag2]) => flag2).join(", ")}.`
|
|
119878
|
+
`There is no switch named ${name2}. Use one of ${[...SWITCHES.map(([, flag2]) => flag2), BACKLOG[1]].join(", ")}.`
|
|
119867
119879
|
),
|
|
119868
119880
|
"input"
|
|
119869
119881
|
);
|
|
@@ -119873,6 +119885,28 @@ async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter
|
|
|
119873
119885
|
cmd.error(new Error(`Set a switch to ask or alone, not ${mode}.`), "input");
|
|
119874
119886
|
return;
|
|
119875
119887
|
}
|
|
119888
|
+
if (backlog) {
|
|
119889
|
+
let written2;
|
|
119890
|
+
try {
|
|
119891
|
+
written2 = await apiPostOrThrow(
|
|
119892
|
+
"stella/workspace-permissions/set",
|
|
119893
|
+
{ closeStaleBacklogWork: mode }
|
|
119894
|
+
);
|
|
119895
|
+
} catch (err2) {
|
|
119896
|
+
cmd.error(err2, "api");
|
|
119897
|
+
return;
|
|
119898
|
+
}
|
|
119899
|
+
if (cmd.isJson) {
|
|
119900
|
+
cmd.data(written2);
|
|
119901
|
+
return;
|
|
119902
|
+
}
|
|
119903
|
+
writer.write(
|
|
119904
|
+
written2.changed.length === 0 ? "Nothing changed. The switch already held that value." : "Saved. The change is in the audit log."
|
|
119905
|
+
);
|
|
119906
|
+
printBacklog(written2, writer);
|
|
119907
|
+
return;
|
|
119908
|
+
}
|
|
119909
|
+
if (key === null) return;
|
|
119876
119910
|
let result2;
|
|
119877
119911
|
try {
|
|
119878
119912
|
result2 = await apiPostOrThrow("stella/permissions/set", {
|
|
@@ -119891,7 +119925,7 @@ async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter
|
|
|
119891
119925
|
);
|
|
119892
119926
|
printSwitches(result2.permissions, writer);
|
|
119893
119927
|
}
|
|
119894
|
-
var SWITCHES;
|
|
119928
|
+
var SWITCHES, BACKLOG;
|
|
119895
119929
|
var init_stella_permissions = __esm({
|
|
119896
119930
|
"src/commands/stella-permissions.ts"() {
|
|
119897
119931
|
init_api();
|
|
@@ -119906,7 +119940,13 @@ var init_stella_permissions = __esm({
|
|
|
119906
119940
|
["relaunchFailedWork", "relaunch-failed-work", "Relaunch failed work"],
|
|
119907
119941
|
["createIssues", "create-issues", "Create issues"],
|
|
119908
119942
|
["updateSourceIssues", "update-source-issues", "Update source issues"],
|
|
119909
|
-
["steerAgents", "steer-agents", "Steer my agents"]
|
|
119943
|
+
["steerAgents", "steer-agents", "Steer my agents"],
|
|
119944
|
+
["closeStaleWork", "close-stale-work", "Close stale work"]
|
|
119945
|
+
];
|
|
119946
|
+
BACKLOG = [
|
|
119947
|
+
"closeStaleBacklogWork",
|
|
119948
|
+
"close-stale-backlog-work",
|
|
119949
|
+
"Close stale backlog work"
|
|
119910
119950
|
];
|
|
119911
119951
|
}
|
|
119912
119952
|
});
|
|
@@ -187334,7 +187374,7 @@ function buildProgram() {
|
|
|
187334
187374
|
await stellaPermissions2(opts);
|
|
187335
187375
|
});
|
|
187336
187376
|
stellaCmd.command("set-permission <switch> <mode>").description(
|
|
187337
|
-
"Set one switch to ask or alone: answer-from-rules, relaunch-failed-work, create-issues, update-source-issues or
|
|
187377
|
+
"Set one switch to ask or alone: answer-from-rules, relaunch-failed-work, create-issues, update-source-issues, steer-agents, close-stale-work, or the workspace's close-stale-backlog-work"
|
|
187338
187378
|
).option("--json", "Output the raw contract payload as JSON", false).action(async (name2, mode, opts) => {
|
|
187339
187379
|
const { stellaSetPermission: stellaSetPermission2 } = await Promise.resolve().then(() => (init_stella_permissions(), stella_permissions_exports));
|
|
187340
187380
|
await stellaSetPermission2(name2, mode, opts);
|
package/package.json
CHANGED