@sechroom/cli 2026.6.20 → 2026.6.21
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 +42 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2588,9 +2588,46 @@ async function applyClient(cfg, setup, target, opts) {
|
|
|
2588
2588
|
return actions;
|
|
2589
2589
|
}
|
|
2590
2590
|
|
|
2591
|
+
// src/setup/hooks-offer.ts
|
|
2592
|
+
import { homedir as homedir4 } from "os";
|
|
2593
|
+
async function maybeOfferHooks(opts) {
|
|
2594
|
+
if (opts.dryRun) return;
|
|
2595
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
2596
|
+
const surfaces = detectHookSurfaces(cwd);
|
|
2597
|
+
if (surfaces.length === 0) return;
|
|
2598
|
+
const names = surfaces.map((s) => HOOK_SURFACE_LABEL[s]).join(" + ");
|
|
2599
|
+
process.stderr.write(
|
|
2600
|
+
`
|
|
2601
|
+
Sechroom can wire continuity lifecycle hooks into ${style.bold(names)} so your agent
|
|
2602
|
+
auto-resumes where you left off and checkpoints working state before compacting.
|
|
2603
|
+
`
|
|
2604
|
+
);
|
|
2605
|
+
const install = opts.yes ? true : canPrompt() ? await promptYesNo(`Install the continuity hooks for ${names}?`) : false;
|
|
2606
|
+
if (!install) return;
|
|
2607
|
+
try {
|
|
2608
|
+
const installed = installHookSurfaces(surfaces, { dryRun: false, cwd, home: homedir4() });
|
|
2609
|
+
let changed = false;
|
|
2610
|
+
for (const { surface, results } of installed) {
|
|
2611
|
+
for (const r of results) {
|
|
2612
|
+
if (r.status !== "current") changed = true;
|
|
2613
|
+
const verb = r.status === "current" ? "already configured" : r.status === "created" ? "created" : "updated";
|
|
2614
|
+
process.stderr.write(`${style.green("\u2713")} ${HOOK_SURFACE_LABEL[surface]}: ${r.path} (${verb})
|
|
2615
|
+
`);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
if (changed) {
|
|
2619
|
+
process.stderr.write(`${style.dim("Restart (or reload) your agent for the hooks to take effect.")}
|
|
2620
|
+
`);
|
|
2621
|
+
}
|
|
2622
|
+
} catch (err2) {
|
|
2623
|
+
process.stderr.write(`${style.dim(`(skipped hook install: ${err2.message})`)}
|
|
2624
|
+
`);
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2591
2628
|
// src/setup/skills-offer.ts
|
|
2592
2629
|
import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync5 } from "fs";
|
|
2593
|
-
import { homedir as
|
|
2630
|
+
import { homedir as homedir5 } from "os";
|
|
2594
2631
|
import { join as join5 } from "path";
|
|
2595
2632
|
|
|
2596
2633
|
// src/setup/lane-pin.ts
|
|
@@ -2706,7 +2743,7 @@ async function maybeOfferSkills(cfg, personalWorkspaceId, opts) {
|
|
|
2706
2743
|
Found ${style.bold(String(names.length))} operator skill(s) installed in your workspace: ${names.join(", ")}.
|
|
2707
2744
|
`
|
|
2708
2745
|
);
|
|
2709
|
-
const dir = join5(
|
|
2746
|
+
const dir = join5(homedir5(), ".claude", "skills");
|
|
2710
2747
|
const materialise = opts.yes ? true : canPrompt() ? await promptYesNo(`Write them to ${dir}/ so ${surface} can use them?`) : false;
|
|
2711
2748
|
if (!materialise) return;
|
|
2712
2749
|
const written = [];
|
|
@@ -2810,6 +2847,9 @@ Examples:
|
|
|
2810
2847
|
if (!json && !opts.dryRun && !opts.mcpOnly) {
|
|
2811
2848
|
await maybeOfferSkills(cfg, personalWorkspaceId, { yes: false, dryRun: Boolean(opts.dryRun), surface: "claude-code" });
|
|
2812
2849
|
}
|
|
2850
|
+
if (!json && !opts.dryRun && !opts.mcpOnly) {
|
|
2851
|
+
await maybeOfferHooks({ yes: false, dryRun: Boolean(opts.dryRun), cwd: process.cwd() });
|
|
2852
|
+
}
|
|
2813
2853
|
if (json) {
|
|
2814
2854
|
emit({ dryRun: Boolean(opts.dryRun), clients: result }, true);
|
|
2815
2855
|
return;
|
|
@@ -2865,43 +2905,6 @@ async function runClients(clients, cmd, opts) {
|
|
|
2865
2905
|
process.stdout.write(opts.dryRun ? "\n(dry run \u2014 nothing written)\n" : "\nDone.\n");
|
|
2866
2906
|
}
|
|
2867
2907
|
|
|
2868
|
-
// src/setup/hooks-offer.ts
|
|
2869
|
-
import { homedir as homedir5 } from "os";
|
|
2870
|
-
async function maybeOfferHooks(opts) {
|
|
2871
|
-
if (opts.dryRun) return;
|
|
2872
|
-
const cwd = opts.cwd ?? process.cwd();
|
|
2873
|
-
const surfaces = detectHookSurfaces(cwd);
|
|
2874
|
-
if (surfaces.length === 0) return;
|
|
2875
|
-
const names = surfaces.map((s) => HOOK_SURFACE_LABEL[s]).join(" + ");
|
|
2876
|
-
process.stderr.write(
|
|
2877
|
-
`
|
|
2878
|
-
Sechroom can wire continuity lifecycle hooks into ${style.bold(names)} so your agent
|
|
2879
|
-
auto-resumes where you left off and checkpoints working state before compacting.
|
|
2880
|
-
`
|
|
2881
|
-
);
|
|
2882
|
-
const install = opts.yes ? true : canPrompt() ? await promptYesNo(`Install the continuity hooks for ${names}?`) : false;
|
|
2883
|
-
if (!install) return;
|
|
2884
|
-
try {
|
|
2885
|
-
const installed = installHookSurfaces(surfaces, { dryRun: false, cwd, home: homedir5() });
|
|
2886
|
-
let changed = false;
|
|
2887
|
-
for (const { surface, results } of installed) {
|
|
2888
|
-
for (const r of results) {
|
|
2889
|
-
if (r.status !== "current") changed = true;
|
|
2890
|
-
const verb = r.status === "current" ? "already configured" : r.status === "created" ? "created" : "updated";
|
|
2891
|
-
process.stderr.write(`${style.green("\u2713")} ${HOOK_SURFACE_LABEL[surface]}: ${r.path} (${verb})
|
|
2892
|
-
`);
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
if (changed) {
|
|
2896
|
-
process.stderr.write(`${style.dim("Restart (or reload) your agent for the hooks to take effect.")}
|
|
2897
|
-
`);
|
|
2898
|
-
}
|
|
2899
|
-
} catch (err2) {
|
|
2900
|
-
process.stderr.write(`${style.dim(`(skipped hook install: ${err2.message})`)}
|
|
2901
|
-
`);
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
|
|
2905
2908
|
// src/commands/onboard.ts
|
|
2906
2909
|
var DEFAULT_BASE_URL2 = "https://app.sechroom.ai/api";
|
|
2907
2910
|
function systemTimezone() {
|
package/package.json
CHANGED