@sechroom/cli 2026.6.223-rc.d98a230b → 2026.6.224-rc.00eccea5
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 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1911,8 +1911,34 @@ function writeSem(values, path = localSemPath()) {
|
|
|
1911
1911
|
mkdirSync2(dirname2(path), { recursive: true });
|
|
1912
1912
|
writeFileSync2(path, serializeSem(values));
|
|
1913
1913
|
ensureSemIgnored(path);
|
|
1914
|
+
ensureContinuityScaffold(path);
|
|
1914
1915
|
return path;
|
|
1915
1916
|
}
|
|
1917
|
+
var CONTINUITY_FILE_NAME = "continuity.json";
|
|
1918
|
+
var CONTINUITY_SCAFFOLD = JSON.stringify(
|
|
1919
|
+
{
|
|
1920
|
+
_readme: "Agent-maintained continuity intent. Keep these current during the session; `sechroom checkpoint` and the PreCompact hook snapshot from here. The five required fields (objective, state, lastAction, nextAction, resumeInstruction) must all be non-empty for a snapshot to be created.",
|
|
1921
|
+
objective: "",
|
|
1922
|
+
state: "",
|
|
1923
|
+
lastAction: "",
|
|
1924
|
+
nextAction: "",
|
|
1925
|
+
resumeInstruction: "",
|
|
1926
|
+
constraints: [],
|
|
1927
|
+
questions: [],
|
|
1928
|
+
artifacts: [],
|
|
1929
|
+
confidence: null
|
|
1930
|
+
},
|
|
1931
|
+
null,
|
|
1932
|
+
2
|
|
1933
|
+
) + "\n";
|
|
1934
|
+
function ensureContinuityScaffold(semPath) {
|
|
1935
|
+
try {
|
|
1936
|
+
const target = join2(dirname2(semPath), CONTINUITY_FILE_NAME);
|
|
1937
|
+
if (existsSync2(target)) return;
|
|
1938
|
+
writeFileSync2(target, CONTINUITY_SCAFFOLD);
|
|
1939
|
+
} catch {
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1916
1942
|
function ignoresSem(content) {
|
|
1917
1943
|
return content.split("\n").some((line) => {
|
|
1918
1944
|
const t = line.trim();
|
|
@@ -2543,6 +2569,8 @@ Fail-soft: no lane / no auth / no-or-partial intent file / API error -> exit 0,
|
|
|
2543
2569
|
const input = parseHookInput(raw);
|
|
2544
2570
|
const lane = resolveLane(opts.lane, input.cwd);
|
|
2545
2571
|
if (!lane) return process.exit(0);
|
|
2572
|
+
const semPath = resolveSemPathForRead(input.cwd ?? process.cwd());
|
|
2573
|
+
if (semPath) ensureContinuityScaffold(semPath);
|
|
2546
2574
|
const cfg = resolveConfig(cmd.optsWithGlobals());
|
|
2547
2575
|
const client = await makeClient(cfg);
|
|
2548
2576
|
const { data } = await client.POST("/continuity/resume/lane", {
|
|
@@ -3307,6 +3335,8 @@ var SKILL_ROLE_TAG = "sechroom:role:skill-template";
|
|
|
3307
3335
|
var SKILL_NAME_PREFIX = "skill:";
|
|
3308
3336
|
var AGENT_ROLE_TAG = "sechroom:role:agent-template";
|
|
3309
3337
|
var AGENT_NAME_PREFIX = "agent:";
|
|
3338
|
+
var REFERENCE_ROLE_TAG = "sechroom:role:skill-reference";
|
|
3339
|
+
var REFERENCE_NAME_PREFIX = "component:";
|
|
3310
3340
|
function tagsOf(row) {
|
|
3311
3341
|
const m = row?.item ?? row;
|
|
3312
3342
|
return m?.tags ?? m?.Tags ?? [];
|
|
@@ -3343,6 +3373,9 @@ function resolveSkills(systemRows, personalRows, surface) {
|
|
|
3343
3373
|
function resolveAgents(systemRows, personalRows, surface) {
|
|
3344
3374
|
return resolveByRole(systemRows, personalRows, surface, AGENT_ROLE_TAG, AGENT_NAME_PREFIX);
|
|
3345
3375
|
}
|
|
3376
|
+
function resolveReferences(systemRows, personalRows, surface) {
|
|
3377
|
+
return resolveByRole(systemRows, personalRows, surface, REFERENCE_ROLE_TAG, REFERENCE_NAME_PREFIX);
|
|
3378
|
+
}
|
|
3346
3379
|
|
|
3347
3380
|
// src/setup/skill-resolution-io.ts
|
|
3348
3381
|
var AGENT_TARGET = { "claude-code": "claude-agent" };
|
|
@@ -3378,6 +3411,9 @@ function resolveSkillSet(rows, surface) {
|
|
|
3378
3411
|
function resolveAgentSet(rows, surface) {
|
|
3379
3412
|
return resolveAgents(rows.systemRows, rows.personalRows, agentTargetFor(surface));
|
|
3380
3413
|
}
|
|
3414
|
+
function resolveReferenceSet(rows, surface) {
|
|
3415
|
+
return resolveReferences(rows.systemRows, rows.personalRows, surface);
|
|
3416
|
+
}
|
|
3381
3417
|
|
|
3382
3418
|
// src/setup/skills-lock.ts
|
|
3383
3419
|
import { existsSync as existsSync6, mkdirSync as mkdirSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync6 } from "fs";
|
|
@@ -4733,6 +4769,17 @@ function writeAgents(dir, agents, surface) {
|
|
|
4733
4769
|
if (written.length) recordMaterialisedSkills(dir, DEFAULT_SKILLS_SLUG, written, { surface });
|
|
4734
4770
|
return written;
|
|
4735
4771
|
}
|
|
4772
|
+
function writeReferencesIntoSkillDirs(dir, skills, refs) {
|
|
4773
|
+
if (!refs.length || !skills.length) return [];
|
|
4774
|
+
for (const s of skills) {
|
|
4775
|
+
const refDir = join12(dir, s.name, "references");
|
|
4776
|
+
mkdirSync8(refDir, { recursive: true });
|
|
4777
|
+
for (const r of refs) {
|
|
4778
|
+
writeFileSync8(join12(refDir, `${r.name}.md`), r.body.endsWith("\n") ? r.body : r.body + "\n");
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4781
|
+
return refs.map((r) => r.name);
|
|
4782
|
+
}
|
|
4736
4783
|
var SKILL_SPEC = { kind: "skill", dir: skillsDir, resolve: resolveSkillSet, write: writeSkills };
|
|
4737
4784
|
var AGENT_SPEC = { kind: "agent", dir: agentsDir, resolve: resolveAgentSet, write: writeAgents };
|
|
4738
4785
|
function scopeOf(opts) {
|
|
@@ -4753,12 +4800,14 @@ async function runInstall(spec, cmd, opts) {
|
|
|
4753
4800
|
const personalWorkspaceId = await getPersonalWorkspaceId(cfg);
|
|
4754
4801
|
const rows = await fetchTemplateRows(cfg, personalWorkspaceId);
|
|
4755
4802
|
const items = spec.resolve(rows, CLIENT_SURFACE);
|
|
4803
|
+
const refs = spec.kind === "skill" ? resolveReferenceSet(rows, CLIENT_SURFACE) : [];
|
|
4756
4804
|
const results = targets.map((t) => {
|
|
4757
4805
|
const dir = spec.dir(t.dir);
|
|
4758
4806
|
const written = dryRun ? items.map((i) => i.name) : spec.write(dir, items, CLIENT_SURFACE);
|
|
4759
|
-
|
|
4807
|
+
const refsWritten = dryRun ? refs.map((r) => r.name) : writeReferencesIntoSkillDirs(dir, items, refs);
|
|
4808
|
+
return { dir, label: t.label, written, refsWritten };
|
|
4760
4809
|
});
|
|
4761
|
-
if (json) return emit({ kind: spec.kind, dryRun, available: items.length, targets: results }, true);
|
|
4810
|
+
if (json) return emit({ kind: spec.kind, dryRun, available: items.length, references: refs.length, targets: results }, true);
|
|
4762
4811
|
if (items.length === 0) {
|
|
4763
4812
|
console.log(style.dim(`No ${spec.kind}s available to install \u2014 is the bundle installed for your account?`));
|
|
4764
4813
|
return;
|
|
@@ -4767,6 +4816,10 @@ async function runInstall(spec, cmd, opts) {
|
|
|
4767
4816
|
console.log(
|
|
4768
4817
|
`${dryRun ? "" : style.green("\u2713 ")}${dryRun ? "would write" : "wrote"} ${r.written.length} ${spec.kind}(s) ${style.dim("\u2192")} ${r.dir}`
|
|
4769
4818
|
);
|
|
4819
|
+
if (r.refsWritten.length)
|
|
4820
|
+
console.log(
|
|
4821
|
+
`${dryRun ? "" : style.green("\u2713 ")}${dryRun ? "would write" : "wrote"} ${r.refsWritten.length} reference(s) into each skill ${style.dim("\u2192")} ${r.dir}/<skill>/references`
|
|
4822
|
+
);
|
|
4770
4823
|
if (dryRun) for (const i of items) console.log(` ${i.name} ${style.dim(`[${i.source}]`)}`);
|
|
4771
4824
|
}
|
|
4772
4825
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sechroom/cli",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.224-rc.00eccea5",
|
|
4
4
|
"description": "Sechroom CLI — a thin, generated client over the Sechroom HTTP API. An agent/human surface alongside MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|