@sechroom/cli 2026.6.213-rc.dcf65ffe → 2026.6.215-rc.f61ddf0a

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.
Files changed (2) hide show
  1. package/dist/index.js +68 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3318,6 +3318,73 @@ async function runClients(clients, cmd, opts) {
3318
3318
  process.stdout.write(opts.dryRun ? "\n(dry run \u2014 nothing written)\n" : "\nDone.\n");
3319
3319
  }
3320
3320
 
3321
+ // src/commands/namespace.ts
3322
+ function registerNamespace(program2) {
3323
+ const namespace = program2.command("namespace").description("Browse, inspect, and wire up MCP namespaces");
3324
+ namespace.addHelpText(
3325
+ "after",
3326
+ `
3327
+ Examples:
3328
+ $ sechroom namespace list
3329
+ $ sechroom namespace show eng
3330
+ $ sechroom namespace use eng wire Claude Code to the 'eng' namespace
3331
+ $ sechroom namespace use eng --client all`
3332
+ );
3333
+ namespace.command("list").description("List the namespaces you can reach (GET /mcp-aggregator/namespaces)").action(async (_opts, cmd) => {
3334
+ const cfg = resolveConfig(cmd.optsWithGlobals());
3335
+ const data = await runApi("Listing namespaces", async () => {
3336
+ const client = await makeClient(cfg);
3337
+ return client.GET("/mcp-aggregator/namespaces", {});
3338
+ });
3339
+ emit(data, cmd.optsWithGlobals().json);
3340
+ });
3341
+ namespace.command("show <slug>").description("Show a namespace's details (GET /mcp-aggregator/namespaces/{slug}). For the tool list it exposes, point an OpenAPI client at /t/{tenant}/namespaces/{slug}/api/openapi.json.").action(async (slug, _opts, cmd) => {
3342
+ const cfg = resolveConfig(cmd.optsWithGlobals());
3343
+ const data = await runApi("Fetching namespace", async () => {
3344
+ const client = await makeClient(cfg);
3345
+ return client.GET("/mcp-aggregator/namespaces/{slug}", {
3346
+ params: { path: { slug } }
3347
+ });
3348
+ });
3349
+ emit(data, cmd.optsWithGlobals().json);
3350
+ });
3351
+ namespace.command("use <slug>").description("Wire an AI client's MCP config to this namespace's URL").option(
3352
+ "--client <list>",
3353
+ `comma-separated clients (${ALL_CLIENT_KEYS.join(", ")}) or 'all'`,
3354
+ DEFAULT_CLIENT_KEY
3355
+ ).option("--dry-run", "print what would be written without writing", false).action(async (slug, opts, cmd) => {
3356
+ const cfg = resolveConfig(cmd.optsWithGlobals());
3357
+ const setup = await withSpinner(
3358
+ "Fetching setup descriptors",
3359
+ () => fetchSetup(cfg, slug)
3360
+ );
3361
+ const targets = clientTargets(process.cwd());
3362
+ const keys = resolveClientKeys(opts.client);
3363
+ const json = cmd.optsWithGlobals().json;
3364
+ const result = [];
3365
+ for (const key of keys) {
3366
+ const target = targets[key];
3367
+ const actions = await applyClient(cfg, setup, target, {
3368
+ dryRun: Boolean(opts.dryRun),
3369
+ mcp: true,
3370
+ agentFiles: false,
3371
+ personalWorkspaceId: null
3372
+ });
3373
+ result.push({ client: key, actions });
3374
+ if (!json) printActions(target, actions);
3375
+ }
3376
+ if (json) {
3377
+ emit({ namespace: slug, dryRun: Boolean(opts.dryRun), clients: result }, true);
3378
+ return;
3379
+ }
3380
+ process.stdout.write(
3381
+ opts.dryRun ? "\n(dry run \u2014 nothing written)\n" : `
3382
+ Wired to namespace '${slug}'. Restart your AI client (or reload MCP) to pick it up.
3383
+ `
3384
+ );
3385
+ });
3386
+ }
3387
+
3321
3388
  // src/commands/onboard.ts
3322
3389
  import { existsSync as existsSync8 } from "fs";
3323
3390
  import { basename as basename3, join as join8 } from "path";
@@ -4507,6 +4574,7 @@ registerAccount(program);
4507
4574
  registerChat(program);
4508
4575
  registerInit(program);
4509
4576
  registerSetup(program);
4577
+ registerNamespace(program);
4510
4578
  registerOnboard(program);
4511
4579
  registerSweep(program);
4512
4580
  registerSkills(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sechroom/cli",
3
- "version": "2026.6.213-rc.dcf65ffe",
3
+ "version": "2026.6.215-rc.f61ddf0a",
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",