@sechroom/cli 2026.7.22 → 2026.7.23
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/index.js +55 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5922,23 +5922,23 @@ Examples:
|
|
|
5922
5922
|
});
|
|
5923
5923
|
emit(data, cmd.optsWithGlobals().json);
|
|
5924
5924
|
});
|
|
5925
|
-
suggestion.command("accept <id>").description("Accept a suggestion (POST /relationship-suggestions/{
|
|
5925
|
+
suggestion.command("accept <id>").description("Accept a suggestion (POST /relationship-suggestions/{instanceId}/accept)").action(async (id, _opts, cmd) => {
|
|
5926
5926
|
const cfg = resolveConfig(cmd.optsWithGlobals());
|
|
5927
5927
|
const data = await runApi("Accepting suggestion", async () => {
|
|
5928
5928
|
const client = await makeClient(cfg);
|
|
5929
|
-
return client.POST("/relationship-suggestions/{
|
|
5930
|
-
params: { path: { id } },
|
|
5929
|
+
return client.POST("/relationship-suggestions/{instanceId}/accept", {
|
|
5930
|
+
params: { path: { instanceId: id } },
|
|
5931
5931
|
body: {}
|
|
5932
5932
|
});
|
|
5933
5933
|
});
|
|
5934
5934
|
emitAction(`accepted suggestion ${style.bold(id)}`, data, cmd.optsWithGlobals().json);
|
|
5935
5935
|
});
|
|
5936
|
-
suggestion.command("reject <id>").description("Reject a suggestion (POST /relationship-suggestions/{
|
|
5936
|
+
suggestion.command("reject <id>").description("Reject a suggestion (POST /relationship-suggestions/{instanceId}/reject)").option("--reason <reason>", "Why it's being rejected").option("--reason-code <code>", "Structured reason code").action(async (id, opts, cmd) => {
|
|
5937
5937
|
const cfg = resolveConfig(cmd.optsWithGlobals());
|
|
5938
5938
|
const data = await runApi("Rejecting suggestion", async () => {
|
|
5939
5939
|
const client = await makeClient(cfg);
|
|
5940
|
-
return client.POST("/relationship-suggestions/{
|
|
5941
|
-
params: { path: { id } },
|
|
5940
|
+
return client.POST("/relationship-suggestions/{instanceId}/reject", {
|
|
5941
|
+
params: { path: { instanceId: id } },
|
|
5942
5942
|
body: {
|
|
5943
5943
|
reason: opts.reason ?? null,
|
|
5944
5944
|
...opts.reasonCode ? { reasonCode: opts.reasonCode } : {}
|
|
@@ -6913,6 +6913,54 @@ Examples:
|
|
|
6913
6913
|
});
|
|
6914
6914
|
}
|
|
6915
6915
|
|
|
6916
|
+
// src/commands/work-brief.ts
|
|
6917
|
+
function registerWorkBrief(program2) {
|
|
6918
|
+
const workBrief = program2.command("work-brief").description("Control an active work brief run");
|
|
6919
|
+
workBrief.addHelpText(
|
|
6920
|
+
"after",
|
|
6921
|
+
`
|
|
6922
|
+
Examples:
|
|
6923
|
+
$ sechroom work-brief pause mem_XXXX --reason-code operator-hold --source claude-code-chris
|
|
6924
|
+
$ sechroom work-brief resume mem_XXXX --reason-code operator-resume --source claude-code-chris --reason "Ready to continue"`
|
|
6925
|
+
);
|
|
6926
|
+
registerLifecycleAction(workBrief, "pause");
|
|
6927
|
+
registerLifecycleAction(workBrief, "resume");
|
|
6928
|
+
}
|
|
6929
|
+
function registerLifecycleAction(workBrief, action) {
|
|
6930
|
+
const presentParticiple = action === "pause" ? "Pausing" : "Resuming";
|
|
6931
|
+
const pastTense = action === "pause" ? "paused" : "resumed";
|
|
6932
|
+
workBrief.command(`${action} <briefId>`).description(`${capitalize(action)} an active work brief run`).requiredOption(
|
|
6933
|
+
"--reason-code <code>",
|
|
6934
|
+
"Stable machine-readable reason code"
|
|
6935
|
+
).requiredOption(
|
|
6936
|
+
"--source <source>",
|
|
6937
|
+
"Calling surface or lane recorded in the audit"
|
|
6938
|
+
).option("--reason <text>", "Optional human-readable reason").action(async (briefId, opts, cmd) => {
|
|
6939
|
+
const globals = cmd.optsWithGlobals();
|
|
6940
|
+
const cfg = resolveConfig(globals);
|
|
6941
|
+
const data = await runApi(`${presentParticiple} work brief`, async () => {
|
|
6942
|
+
const client = await makeClient(cfg);
|
|
6943
|
+
return client.POST("/work-briefs/{id}/lifecycle", {
|
|
6944
|
+
params: { path: { id: briefId } },
|
|
6945
|
+
body: {
|
|
6946
|
+
action,
|
|
6947
|
+
reasonCode: opts.reasonCode,
|
|
6948
|
+
source: opts.source,
|
|
6949
|
+
reasonText: opts.reason ?? null
|
|
6950
|
+
}
|
|
6951
|
+
});
|
|
6952
|
+
});
|
|
6953
|
+
emitAction(
|
|
6954
|
+
`${pastTense} work brief ${style.bold(briefId)} \u2192 ${data.outcome}`,
|
|
6955
|
+
data,
|
|
6956
|
+
globals.json
|
|
6957
|
+
);
|
|
6958
|
+
});
|
|
6959
|
+
}
|
|
6960
|
+
function capitalize(value) {
|
|
6961
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
6962
|
+
}
|
|
6963
|
+
|
|
6916
6964
|
// src/index.ts
|
|
6917
6965
|
function resolveVersion() {
|
|
6918
6966
|
try {
|
|
@@ -7075,6 +7123,7 @@ registerLookup(program);
|
|
|
7075
7123
|
registerRelationships(program);
|
|
7076
7124
|
registerWorkspace(program);
|
|
7077
7125
|
registerProject(program);
|
|
7126
|
+
registerWorkBrief(program);
|
|
7078
7127
|
registerDecomposition(program);
|
|
7079
7128
|
registerExecutor(program);
|
|
7080
7129
|
registerClose(program);
|
package/package.json
CHANGED