cc-claw 0.3.4 → 0.3.6

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 +43 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -48,7 +48,7 @@ var VERSION;
48
48
  var init_version = __esm({
49
49
  "src/version.ts"() {
50
50
  "use strict";
51
- VERSION = true ? "0.3.4" : (() => {
51
+ VERSION = true ? "0.3.6" : (() => {
52
52
  try {
53
53
  return JSON.parse(readFileSync(join2(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
54
54
  } catch {
@@ -7100,6 +7100,7 @@ var init_telegram2 = __esm({
7100
7100
  // Core
7101
7101
  { command: "help", description: "Show available commands" },
7102
7102
  { command: "status", description: "Session, backend, model, and usage" },
7103
+ { command: "new", description: "Start a fresh conversation" },
7103
7104
  { command: "newchat", description: "Start a fresh conversation" },
7104
7105
  { command: "summarize", description: "Save session to memory (or 'all' for pre-restart)" },
7105
7106
  { command: "stop", description: "Cancel the current running task" },
@@ -7125,6 +7126,7 @@ var init_telegram2 = __esm({
7125
7126
  { command: "limits", description: "Configure usage limits per backend" },
7126
7127
  // Scheduling
7127
7128
  { command: "schedule", description: "Schedule a recurring task" },
7129
+ { command: "cron", description: "List jobs or manage scheduling" },
7128
7130
  { command: "jobs", description: "List scheduled jobs" },
7129
7131
  { command: "run", description: "Trigger a job immediately" },
7130
7132
  { command: "runs", description: "Show recent job run history" },
@@ -9208,6 +9210,7 @@ Tap to toggle:`,
9208
9210
  }
9209
9211
  break;
9210
9212
  }
9213
+ case "new":
9211
9214
  case "newchat": {
9212
9215
  const summarized = await summarizeSession(chatId);
9213
9216
  clearSession(chatId);
@@ -9761,20 +9764,8 @@ Topics: ${s.topics}`;
9761
9764
  await channel.sendText(chatId, "No skills found. Install skills with /skill-install <github-url> or place them in ~/.cc-claw/workspace/skills/", "plain");
9762
9765
  return;
9763
9766
  }
9764
- if (typeof channel.sendKeyboard === "function") {
9765
- const buttons = skills2.map((s) => {
9766
- const tags = s.sources.join(", ");
9767
- return [{ label: `${s.name} [${tags}]`, data: `skill:${s.source}:${s.name}` }];
9768
- });
9769
- await channel.sendKeyboard(chatId, `${skills2.length} skills available. Select one to invoke:`, buttons);
9770
- } else {
9771
- const lines = skills2.map((s) => {
9772
- const tags = s.sources.join(", ");
9773
- const desc = s.description ? ` \u2014 ${s.description.slice(0, 50)}` : "";
9774
- return `\u2022 ${s.name} [${tags}]${desc}`;
9775
- });
9776
- await channel.sendText(chatId, ["Available skills:", "", ...lines].join("\n"), "plain");
9777
- }
9767
+ const page = commandArgs ? parseInt(commandArgs, 10) || 1 : 1;
9768
+ await sendSkillsPage(chatId, channel, skills2, page);
9778
9769
  break;
9779
9770
  }
9780
9771
  case "skill-install": {
@@ -10743,6 +10734,10 @@ ${PERM_MODES[chosen]}`,
10743
10734
  touchBookmark(chatId, alias);
10744
10735
  logActivity(getDb(), { chatId, source: "telegram", eventType: "config_changed", summary: `Working directory set to ${bookmark.path}`, detail: { field: "cwd", value: bookmark.path } });
10745
10736
  await sendCwdSessionChoice(chatId, bookmark.path, channel);
10737
+ } else if (data.startsWith("skills:page:")) {
10738
+ const page = parseInt(data.slice(12), 10);
10739
+ const skills2 = await discoverAllSkills();
10740
+ await sendSkillsPage(chatId, channel, skills2, page);
10746
10741
  } else if (data.startsWith("skill:")) {
10747
10742
  const parts = data.slice(6).split(":");
10748
10743
  let skillName;
@@ -10919,7 +10914,38 @@ function isTextExt(ext) {
10919
10914
  "log"
10920
10915
  ].includes(ext);
10921
10916
  }
10922
- var PERM_MODES, VERBOSE_LEVELS, CLI_INSTALL_HINTS, BLOCKED_PATH_PATTERNS2;
10917
+ async function sendSkillsPage(chatId, channel, skills2, page) {
10918
+ const totalPages = Math.ceil(skills2.length / SKILLS_PER_PAGE);
10919
+ const safePage = Math.max(1, Math.min(page, totalPages));
10920
+ const start = (safePage - 1) * SKILLS_PER_PAGE;
10921
+ const pageSkills = skills2.slice(start, start + SKILLS_PER_PAGE);
10922
+ if (typeof channel.sendKeyboard !== "function") {
10923
+ const lines = pageSkills.map((s) => {
10924
+ const tags = s.sources.join(", ");
10925
+ const desc = s.description ? ` \u2014 ${s.description.slice(0, 50)}` : "";
10926
+ return `\u2022 ${s.name} [${tags}]${desc}`;
10927
+ });
10928
+ const header3 = totalPages > 1 ? `Skills (page ${safePage}/${totalPages}, ${skills2.length} total):` : "Available skills:";
10929
+ const footer = totalPages > 1 ? `
10930
+ Use /skills <page> to navigate (e.g. /skills 2)` : "";
10931
+ await channel.sendText(chatId, [header3, "", ...lines, footer].join("\n"), "plain");
10932
+ return;
10933
+ }
10934
+ const buttons = pageSkills.map((s) => {
10935
+ const tags = s.sources.join(", ");
10936
+ return [{ label: `${s.name} [${tags}]`, data: `skill:${s.source}:${s.name}` }];
10937
+ });
10938
+ if (totalPages > 1) {
10939
+ const navRow = [];
10940
+ if (safePage > 1) navRow.push({ label: `\u2190 Page ${safePage - 1}`, data: `skills:page:${safePage - 1}` });
10941
+ navRow.push({ label: `${safePage}/${totalPages}`, data: "skills:page:noop" });
10942
+ if (safePage < totalPages) navRow.push({ label: `Page ${safePage + 1} \u2192`, data: `skills:page:${safePage + 1}` });
10943
+ buttons.push(navRow);
10944
+ }
10945
+ const header2 = totalPages > 1 ? `${skills2.length} skills (page ${safePage}/${totalPages}). Select one to invoke:` : `${skills2.length} skills available. Select one to invoke:`;
10946
+ await channel.sendKeyboard(chatId, header2, buttons);
10947
+ }
10948
+ var PERM_MODES, VERBOSE_LEVELS, CLI_INSTALL_HINTS, BLOCKED_PATH_PATTERNS2, SKILLS_PER_PAGE;
10923
10949
  var init_router = __esm({
10924
10950
  "src/router.ts"() {
10925
10951
  "use strict";
@@ -10976,6 +11002,7 @@ var init_router = __esm({
10976
11002
  /\/etc\/shadow$/,
10977
11003
  /\/etc\/passwd$/
10978
11004
  ];
11005
+ SKILLS_PER_PAGE = 25;
10979
11006
  }
10980
11007
  });
10981
11008
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "CC-Claw: Personal AI assistant on Telegram — multi-backend (Claude, Gemini, Codex), sub-agent orchestration, MCP management",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",