cc-claw 0.16.1 → 0.16.2

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 +12 -10
  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.16.1" : (() => {
36
+ VERSION = true ? "0.16.2" : (() => {
37
37
  try {
38
38
  return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
39
39
  } catch {
@@ -3339,16 +3339,16 @@ var init_gemini_slots = __esm({
3339
3339
  function getBackendSlots(backend2) {
3340
3340
  return getDb().prepare(`
3341
3341
  SELECT ${SLOT_COLUMNS}
3342
- FROM backend_credentials WHERE backend = ? ORDER BY priority ASC, id ASC
3342
+ FROM backend_credentials bc WHERE bc.backend = ? ORDER BY bc.priority ASC, bc.id ASC
3343
3343
  `).all(backend2);
3344
3344
  }
3345
3345
  function getEligibleBackendSlots(backend2) {
3346
3346
  return getDb().prepare(`
3347
3347
  SELECT ${SLOT_COLUMNS}
3348
- FROM backend_credentials
3349
- WHERE backend = ? AND enabled = 1
3350
- AND (cooldown_until IS NULL OR cooldown_until <= datetime('now'))
3351
- ORDER BY priority ASC, last_used ASC NULLS FIRST
3348
+ FROM backend_credentials bc
3349
+ WHERE bc.backend = ? AND bc.enabled = 1
3350
+ AND (bc.cooldown_until IS NULL OR bc.cooldown_until <= datetime('now'))
3351
+ ORDER BY bc.priority ASC, bc.last_used ASC NULLS FIRST
3352
3352
  `).all(backend2);
3353
3353
  }
3354
3354
  function getChatBackendSlotId(chatId, backend2) {
@@ -3425,9 +3425,9 @@ var init_backend_slots = __esm({
3425
3425
  "use strict";
3426
3426
  init_store5();
3427
3427
  SLOT_COLUMNS = `
3428
- id, backend, slot_type AS slotType, label, api_key AS apiKey, config_home AS configHome,
3429
- priority, enabled, cooldown_until AS cooldownUntil, last_used AS lastUsed,
3430
- consecutive_errors AS consecutiveErrors, created_at AS createdAt
3428
+ bc.id, bc.backend, bc.slot_type AS slotType, bc.label, bc.api_key AS apiKey, bc.config_home AS configHome,
3429
+ bc.priority, bc.enabled, bc.cooldown_until AS cooldownUntil, bc.last_used AS lastUsed,
3430
+ bc.consecutive_errors AS consecutiveErrors, bc.created_at AS createdAt
3431
3431
  `;
3432
3432
  }
3433
3433
  });
@@ -13697,7 +13697,9 @@ var init_guard = __esm({
13697
13697
  /\bnpm\s+(start|run\s+dev)\b/,
13698
13698
  // daemon-starting npm commands
13699
13699
  // CC-Claw config mutation — agents must not silently change backend/model/permissions
13700
- /\bcc-claw\s+(backend|model|permissions)\s+set\b/
13700
+ /\bcc-claw\s+(backend|model|permissions)\s+set\b/,
13701
+ // Direct database access — agents must use the CLI/API, never raw SQL
13702
+ /\bsqlite3\b.*\bcc-claw\b/
13701
13703
  ];
13702
13704
  pendingCommands = /* @__PURE__ */ new Map();
13703
13705
  PENDING_TTL_MS = 5 * 60 * 1e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
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",