@oxagen/cli 5.5.1-160 → 5.5.1-161
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 +45 -7
- 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-161";
|
|
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-161",
|
|
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",
|
|
@@ -119835,6 +119835,14 @@ function switchOf(name2) {
|
|
|
119835
119835
|
const found = SWITCHES.find(([key, flag2]) => key === name2 || flag2 === name2);
|
|
119836
119836
|
return found ? found[0] : null;
|
|
119837
119837
|
}
|
|
119838
|
+
function printBacklog(workspace, writer) {
|
|
119839
|
+
const [, flag2, label] = BACKLOG;
|
|
119840
|
+
const closer = workspace.closer;
|
|
119841
|
+
writer.write("Workspace");
|
|
119842
|
+
writer.write(
|
|
119843
|
+
` ${label} (${flag2}): ${closer === null ? "asks first" : `acts alone as ${closer.name ?? closer.id}`}`
|
|
119844
|
+
);
|
|
119845
|
+
}
|
|
119838
119846
|
function printSwitches(permissions, writer) {
|
|
119839
119847
|
for (const [key, flag2, label] of SWITCHES)
|
|
119840
119848
|
writer.write(
|
|
@@ -119856,14 +119864,16 @@ async function stellaPermissions(opts = {}, writer = stdoutWriter) {
|
|
|
119856
119864
|
}
|
|
119857
119865
|
writer.write("What stella may do alone for you in this workspace");
|
|
119858
119866
|
printSwitches(result2.permissions, writer);
|
|
119867
|
+
if (result2.workspace !== void 0) printBacklog(result2.workspace, writer);
|
|
119859
119868
|
}
|
|
119860
119869
|
async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter) {
|
|
119861
119870
|
const cmd = createOutput({ json: opts.json }, writer);
|
|
119871
|
+
const backlog = name2 === BACKLOG[0] || name2 === BACKLOG[1];
|
|
119862
119872
|
const key = switchOf(name2);
|
|
119863
|
-
if (key === null) {
|
|
119873
|
+
if (key === null && !backlog) {
|
|
119864
119874
|
cmd.error(
|
|
119865
119875
|
new Error(
|
|
119866
|
-
`There is no switch named ${name2}. Use one of ${SWITCHES.map(([, flag2]) => flag2).join(", ")}.`
|
|
119876
|
+
`There is no switch named ${name2}. Use one of ${[...SWITCHES.map(([, flag2]) => flag2), BACKLOG[1]].join(", ")}.`
|
|
119867
119877
|
),
|
|
119868
119878
|
"input"
|
|
119869
119879
|
);
|
|
@@ -119873,6 +119883,28 @@ async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter
|
|
|
119873
119883
|
cmd.error(new Error(`Set a switch to ask or alone, not ${mode}.`), "input");
|
|
119874
119884
|
return;
|
|
119875
119885
|
}
|
|
119886
|
+
if (backlog) {
|
|
119887
|
+
let written2;
|
|
119888
|
+
try {
|
|
119889
|
+
written2 = await apiPostOrThrow(
|
|
119890
|
+
"stella/workspace-permissions/set",
|
|
119891
|
+
{ closeStaleBacklogWork: mode }
|
|
119892
|
+
);
|
|
119893
|
+
} catch (err2) {
|
|
119894
|
+
cmd.error(err2, "api");
|
|
119895
|
+
return;
|
|
119896
|
+
}
|
|
119897
|
+
if (cmd.isJson) {
|
|
119898
|
+
cmd.data(written2);
|
|
119899
|
+
return;
|
|
119900
|
+
}
|
|
119901
|
+
writer.write(
|
|
119902
|
+
written2.changed.length === 0 ? "Nothing changed. The switch already held that value." : "Saved. The change is in the audit log."
|
|
119903
|
+
);
|
|
119904
|
+
printBacklog(written2, writer);
|
|
119905
|
+
return;
|
|
119906
|
+
}
|
|
119907
|
+
if (key === null) return;
|
|
119876
119908
|
let result2;
|
|
119877
119909
|
try {
|
|
119878
119910
|
result2 = await apiPostOrThrow("stella/permissions/set", {
|
|
@@ -119891,7 +119923,7 @@ async function stellaSetPermission(name2, mode, opts = {}, writer = stdoutWriter
|
|
|
119891
119923
|
);
|
|
119892
119924
|
printSwitches(result2.permissions, writer);
|
|
119893
119925
|
}
|
|
119894
|
-
var SWITCHES;
|
|
119926
|
+
var SWITCHES, BACKLOG;
|
|
119895
119927
|
var init_stella_permissions = __esm({
|
|
119896
119928
|
"src/commands/stella-permissions.ts"() {
|
|
119897
119929
|
init_api();
|
|
@@ -119906,7 +119938,13 @@ var init_stella_permissions = __esm({
|
|
|
119906
119938
|
["relaunchFailedWork", "relaunch-failed-work", "Relaunch failed work"],
|
|
119907
119939
|
["createIssues", "create-issues", "Create issues"],
|
|
119908
119940
|
["updateSourceIssues", "update-source-issues", "Update source issues"],
|
|
119909
|
-
["steerAgents", "steer-agents", "Steer my agents"]
|
|
119941
|
+
["steerAgents", "steer-agents", "Steer my agents"],
|
|
119942
|
+
["closeStaleWork", "close-stale-work", "Close stale work"]
|
|
119943
|
+
];
|
|
119944
|
+
BACKLOG = [
|
|
119945
|
+
"closeStaleBacklogWork",
|
|
119946
|
+
"close-stale-backlog-work",
|
|
119947
|
+
"Close stale backlog work"
|
|
119910
119948
|
];
|
|
119911
119949
|
}
|
|
119912
119950
|
});
|
|
@@ -187334,7 +187372,7 @@ function buildProgram() {
|
|
|
187334
187372
|
await stellaPermissions2(opts);
|
|
187335
187373
|
});
|
|
187336
187374
|
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
|
|
187375
|
+
"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
187376
|
).option("--json", "Output the raw contract payload as JSON", false).action(async (name2, mode, opts) => {
|
|
187339
187377
|
const { stellaSetPermission: stellaSetPermission2 } = await Promise.resolve().then(() => (init_stella_permissions(), stella_permissions_exports));
|
|
187340
187378
|
await stellaSetPermission2(name2, mode, opts);
|
package/package.json
CHANGED