cc-claw 0.21.0 → 0.21.1

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/cli.js +29 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -33,7 +33,7 @@ var VERSION;
33
33
  var init_version = __esm({
34
34
  "src/version.ts"() {
35
35
  "use strict";
36
- VERSION = true ? "0.21.0" : (() => {
36
+ VERSION = true ? "0.21.1" : (() => {
37
37
  try {
38
38
  return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
39
39
  } catch {
@@ -11179,6 +11179,10 @@ var init_scheduler = __esm({
11179
11179
  updates.push("delivery_mode = ?");
11180
11180
  values.push(body.deliveryMode);
11181
11181
  }
11182
+ if (body.credentialSlotId !== void 0) {
11183
+ updates.push("credential_slot_id = ?");
11184
+ values.push(body.credentialSlotId ?? null);
11185
+ }
11182
11186
  if (updates.length === 0) {
11183
11187
  return jsonResponse(res, { error: "No fields to update" }, 400);
11184
11188
  }
@@ -32748,6 +32752,29 @@ async function cronEdit(globalOpts, id, opts) {
32748
32752
  if (opts.fallback?.length) {
32749
32753
  payload.fallbacks = parseFallbacks(opts.fallback);
32750
32754
  }
32755
+ if (opts.account !== void 0) {
32756
+ const accountVal = opts.account;
32757
+ if (accountVal === "auto" || accountVal === "none" || accountVal === "0") {
32758
+ payload.credentialSlotId = null;
32759
+ } else if (/^\d+$/.test(accountVal)) {
32760
+ payload.credentialSlotId = parseInt(accountVal, 10);
32761
+ } else {
32762
+ const { openDatabaseReadOnly: openDatabaseReadOnly2 } = await Promise.resolve().then(() => (init_store5(), store_exports5));
32763
+ const readDb = openDatabaseReadOnly2();
32764
+ const geminiSlot = readDb.prepare(
32765
+ "SELECT id, label FROM gemini_credentials WHERE label = ? OR CAST(id AS TEXT) = ?"
32766
+ ).get(accountVal, accountVal);
32767
+ const backendSlot = !geminiSlot ? readDb.prepare(
32768
+ "SELECT id, label FROM backend_credentials WHERE (label = ? OR CAST(id AS TEXT) = ?)"
32769
+ ).get(accountVal, accountVal) : void 0;
32770
+ const resolved = geminiSlot ?? backendSlot;
32771
+ if (!resolved) {
32772
+ outputError("ACCOUNT_NOT_FOUND", `No credential slot found with label or ID "${accountVal}". Run cc-claw gemini list or cc-claw claude list to see available slots.`);
32773
+ process.exit(1);
32774
+ }
32775
+ payload.credentialSlotId = resolved.id;
32776
+ }
32777
+ }
32751
32778
  const fieldCount = Object.keys(payload).length - 1;
32752
32779
  if (fieldCount === 0) {
32753
32780
  outputError("NO_CHANGES", "No fields to update. Specify fields with flags (e.g. --description, --cron).");
@@ -36011,7 +36038,7 @@ function registerCronCommands(cmd) {
36011
36038
  const { cronAction: cronAction2 } = await Promise.resolve().then(() => (init_cron2(), cron_exports2));
36012
36039
  await cronAction2(program.opts(), "run", id);
36013
36040
  });
36014
- cmd.command("edit <id>").description("Edit a job (same flags as create)").option("--title <text>", "Short title for job list").option("--description <text>").option("--cron <expr>").option("--at <iso8601>").option("--every <interval>").option("--backend <name>").option("--model <name>").option("--thinking <level>").option("--timeout <seconds>", "Job timeout in seconds (30-3600)").option("--fallback <backend:model>", "Fallback backend:model (repeatable, max 3)", (val, prev) => [...prev, val], []).option("--timezone <tz>").option("--target <id>", "Delivery target (chat ID, or chatId:topicId for forum topics)").option("--delivery <mode>", "Delivery mode (announce/webhook/none)").action(async (id, opts) => {
36041
+ cmd.command("edit <id>").description("Edit a job (same flags as create)").option("--title <text>", "Short title for job list").option("--description <text>").option("--cron <expr>").option("--at <iso8601>").option("--every <interval>").option("--backend <name>").option("--model <name>").option("--thinking <level>").option("--timeout <seconds>", "Job timeout in seconds (30-3600)").option("--fallback <backend:model>", "Fallback backend:model (repeatable, max 3)", (val, prev) => [...prev, val], []).option("--timezone <tz>").option("--target <id>", "Delivery target (chat ID, or chatId:topicId for forum topics)").option("--delivery <mode>", "Delivery mode (announce/webhook/none)").option("--account <id-or-label>", "Pin a credential slot by ID or label (use 'auto' to clear)").action(async (id, opts) => {
36015
36042
  const { cronEdit: cronEdit2 } = await Promise.resolve().then(() => (init_cron2(), cron_exports2));
36016
36043
  await cronEdit2(program.opts(), id, opts);
36017
36044
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "CC-Claw: Personal AI assistant on Telegram — multi-backend (Claude, Gemini, Codex, Cursor), sub-agent orchestration, MCP management",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",