clawborrator-cli 0.0.43 → 0.0.45

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.
@@ -64009,7 +64009,10 @@ var import_node_fs = require("node:fs");
64009
64009
  var CONFIG_DIR = (0, import_node_path.resolve)((0, import_node_os.homedir)(), ".clawborrator");
64010
64010
  var CONFIG_PATH = (0, import_node_path.resolve)(CONFIG_DIR, "config.json");
64011
64011
  var DEFAULTS = {
64012
- hubUrl: process.env.CLAWBORRATOR_HUB ?? "http://localhost:8787",
64012
+ // Default to the public hub. Local-dev users override via either
64013
+ // CLAWBORRATOR_HUB=http://localhost:8787 or `claw login --hub <url>`,
64014
+ // which persists into ~/.clawborrator/config.json.
64015
+ hubUrl: process.env.CLAWBORRATOR_HUB ?? "https://next.clawborrator.com",
64013
64016
  sessionToken: null
64014
64017
  };
64015
64018
  function loadConfig() {
@@ -64197,9 +64200,10 @@ async function browserOAuthFlow(hubUrl) {
64197
64200
  }
64198
64201
  return res.json();
64199
64202
  }
64200
- var loginCmd = new Command("login").description("authenticate against a hub_v1 instance via GitHub OAuth (browser callback)").option("--hub <url>", "hub URL to use (defaults to config or http://localhost:8787)").action(async (opts) => {
64203
+ var loginCmd = new Command("login").description("authenticate against a hub_v1 instance via GitHub OAuth (browser callback)").option("--hub <url>", "hub URL (overrides config and CLAWBORRATOR_HUB; persists on success). Default: https://next.clawborrator.com").action(async (opts) => {
64201
64204
  const cfg = loadConfig();
64202
- const hubUrl = opts.hub ?? cfg.hubUrl;
64205
+ const hubUrl = (opts.hub ?? cfg.hubUrl).replace(/\/+$/, "");
64206
+ console.log(`hub: ${hubUrl}`);
64203
64207
  try {
64204
64208
  const { user, session } = await browserOAuthFlow(hubUrl);
64205
64209
  saveConfig({ hubUrl, sessionToken: session.token });
@@ -68729,12 +68733,13 @@ var agentsList = new Command("list").alias("ls").description("list published age
68729
68733
  for (const a of data.items) {
68730
68734
  const dot = a.online ? "\u25CF" : "\u25CB";
68731
68735
  const tag2 = a.status === "draft" ? " [draft]" : "";
68736
+ const iso = a.isolated ? " [isolated]" : " [composable]";
68732
68737
  const stats = `${a.queriesAllTime} queries`;
68733
68738
  const tagln = a.tagline ? ` \u2014 ${a.tagline}` : "";
68734
- console.log(`${dot} @${a.handle}${tag2} ${a.name} ${stats}${tagln}`);
68739
+ console.log(`${dot} @${a.handle}${tag2}${iso} ${a.name} ${stats}${tagln}`);
68735
68740
  }
68736
68741
  });
68737
- var agentsPublish = new Command("publish").description("publish a session as a public agent").requiredOption("--session <id>", "the session UUID to back the agent").requiredOption("--name <name>", 'display name (e.g. "viper-rust-expert")').option("--tagline <text>", "one-line description (160 chars max)").option("--description <text>", "long-form description, markdown allowed (4 KB max)").option("--slug <slug>", "explicit slug (default: derived from session routingName)").option("--draft", "publish as draft (status=draft); use --published to go live immediately").option("--published", "publish as live (status=published)").option("--budget <n>", "daily budget in queries (default 1000, max 100000)", (v) => parseInt(v, 10)).option("--concurrency <n>", "concurrent in-flight queries cap (default 5, max 20)", (v) => parseInt(v, 10)).action(async (opts) => {
68742
+ var agentsPublish = new Command("publish").description("publish a session as a public agent").requiredOption("--session <id>", "the session UUID to back the agent").requiredOption("--name <name>", 'display name (e.g. "viper-rust-expert")').option("--tagline <text>", "one-line description (160 chars max)").option("--description <text>", "long-form description, markdown allowed (4 KB max)").option("--slug <slug>", "explicit slug (default: derived from session routingName)").option("--draft", "publish as draft (status=draft); use --published to go live immediately").option("--published", "publish as live (status=published)").option("--budget <n>", "daily budget in queries (default 1000, max 100000)", (v) => parseInt(v, 10)).option("--concurrency <n>", "concurrent in-flight queries cap (default 5, max 20)", (v) => parseInt(v, 10)).option("--isolated", "isolated mode: agent CC cannot use cross-session routing tools while answering (default true; safer)").option("--composable", "composable mode: agent CC may use cross-session routing tools (gated against the requester's own access)").action(async (opts) => {
68738
68743
  const status = opts.published ? "published" : "draft";
68739
68744
  const body = {
68740
68745
  sessionId: opts.session,
@@ -68746,10 +68751,13 @@ var agentsPublish = new Command("publish").description("publish a session as a p
68746
68751
  if (opts.slug) body.slug = opts.slug;
68747
68752
  if (typeof opts.budget === "number") body.dailyBudgetQueries = opts.budget;
68748
68753
  if (typeof opts.concurrency === "number") body.concurrencyCap = opts.concurrency;
68754
+ if (opts.composable) body.isolated = false;
68755
+ else if (opts.isolated) body.isolated = true;
68749
68756
  const r = await api.post("/api/v1/agents", body);
68750
68757
  console.log(`\u2713 ${r.restored ? "restored" : "published"} agent: @${r.handle}`);
68751
68758
  console.log(` name: ${r.name}`);
68752
68759
  console.log(` status: ${r.status}`);
68760
+ console.log(` mode: ${r.isolated ? "isolated (cross-session routing disabled while answering)" : "composable (CC may route to peers)"}`);
68753
68761
  console.log(` budget: ${r.dailyBudgetQueries}/day, concurrency ${r.concurrencyCap}`);
68754
68762
  console.log(` session: ${r.sessionId}`);
68755
68763
  if (r.status === "draft") {
@@ -68758,7 +68766,7 @@ var agentsPublish = new Command("publish").description("publish a session as a p
68758
68766
  console.log(` call as: '@${r.handle} <question>' from any session prompt`);
68759
68767
  }
68760
68768
  });
68761
- var agentsUpdate = new Command("update").description("update an agent").argument("<handle>", "@owner/slug").option("--status <s>", "draft | published").option("--name <name>").option("--tagline <text>").option("--description <text>").option("--budget <n>", "daily budget in queries", (v) => parseInt(v, 10)).option("--concurrency <n>", "concurrency cap", (v) => parseInt(v, 10)).action(async (handleArg, opts) => {
68769
+ var agentsUpdate = new Command("update").description("update an agent").argument("<handle>", "@owner/slug").option("--status <s>", "draft | published").option("--name <name>").option("--tagline <text>").option("--description <text>").option("--budget <n>", "daily budget in queries", (v) => parseInt(v, 10)).option("--concurrency <n>", "concurrency cap", (v) => parseInt(v, 10)).option("--isolated", "switch to isolated mode (block cross-session routing while answering)").option("--composable", "switch to composable mode (allow cross-session routing tools)").action(async (handleArg, opts) => {
68762
68770
  const handle = handleArg.replace(/^@/, "");
68763
68771
  const agent = await api.get(`/api/v1/agents/by-handle/${encodeURIComponent(handle.split("/")[0])}/${encodeURIComponent(handle.split("/")[1] ?? "")}`);
68764
68772
  const body = {};
@@ -68768,6 +68776,8 @@ var agentsUpdate = new Command("update").description("update an agent").argument
68768
68776
  if (opts.description) body.description = opts.description;
68769
68777
  if (typeof opts.budget === "number") body.dailyBudgetQueries = opts.budget;
68770
68778
  if (typeof opts.concurrency === "number") body.concurrencyCap = opts.concurrency;
68779
+ if (opts.composable) body.isolated = false;
68780
+ else if (opts.isolated) body.isolated = true;
68771
68781
  if (Object.keys(body).length === 0) {
68772
68782
  console.error("no fields to update");
68773
68783
  process.exit(2);
@@ -68775,6 +68785,7 @@ var agentsUpdate = new Command("update").description("update an agent").argument
68775
68785
  const r = await api.patch(`/api/v1/agents/${agent.id}`, body);
68776
68786
  console.log(`\u2713 updated @${r.handle}`);
68777
68787
  console.log(` status: ${r.status}`);
68788
+ console.log(` mode: ${r.isolated ? "isolated" : "composable"}`);
68778
68789
  console.log(` budget: ${r.dailyBudgetQueries}/day, concurrency ${r.concurrencyCap}`);
68779
68790
  });
68780
68791
  var agentsUnpublish = new Command("unpublish").description("soft-delete an agent (drops its handle)").argument("<handle>", "@owner/slug").action(async (handleArg) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "type": "module",
5
5
  "description": "claw — command-line client for clawborrator hub_v1. Manages PATs, channel tokens, sessions, cross-session routing, and webhooks; ships an inline TUI for live multi-operator session attach.",
6
6
  "license": "MIT",