cc-claw 0.20.3 → 0.20.4

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 +62 -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.20.3" : (() => {
36
+ VERSION = true ? "0.20.4" : (() => {
37
37
  try {
38
38
  return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
39
39
  } catch {
@@ -8716,7 +8716,8 @@ var init_helpers = __esm({
8716
8716
  { cmd: "/mcps", desc: "List MCP servers" },
8717
8717
  { cmd: "/mcp", desc: "Manage MCP servers" },
8718
8718
  { cmd: "/evolve", desc: "Self-learning controls" },
8719
- { cmd: "/intent", desc: "Test intent classifier" }
8719
+ { cmd: "/intent", desc: "Test intent classifier" },
8720
+ { cmd: "/info", desc: "Current chat/topic context" }
8720
8721
  ]
8721
8722
  };
8722
8723
  USAGE_WINDOW_MAP = { "24h": "daily", "7d": "weekly" };
@@ -21591,6 +21592,48 @@ async function handleRunsCommand(chatId, commandArgs, msg, channel) {
21591
21592
  await channel.sendText(chatId, lines.join("\n\n"), { parseMode: "plain" });
21592
21593
  }
21593
21594
  }
21595
+ async function handleInfoCommand(chatId, commandArgs, msg, channel) {
21596
+ const lines = ["\u2139\uFE0F Chat Info", "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"];
21597
+ if (msg.senderId) lines.push(`User ID: ${msg.senderId}`);
21598
+ if (msg.senderUsername) lines.push(`Username: ${msg.senderUsername}`);
21599
+ if (msg.senderName) lines.push(`Name: ${msg.senderName}`);
21600
+ lines.push("");
21601
+ lines.push(`Chat ID: ${chatId}`);
21602
+ if (msg.chatTitle) lines.push(`Group: ${msg.chatTitle}`);
21603
+ if (msg.threadId) lines.push(`Topic thread: ${msg.threadId}`);
21604
+ const aliases = getAllChatAliases();
21605
+ const alias = aliases.find((a) => a.chatId === chatId);
21606
+ if (alias) lines.push(`Alias: ${alias.alias}`);
21607
+ const sessionId = getSessionId(chatId);
21608
+ if (sessionId) lines.push(`Session: ${sessionId.slice(0, 13)}\u2026`);
21609
+ const backendId = getBackend(chatId) ?? "claude";
21610
+ const currentModel = getModel(chatId);
21611
+ lines.push(`Backend: ${backendId}`);
21612
+ if (currentModel) lines.push(`Model: ${currentModel}`);
21613
+ const execMode = getExecMode(chatId);
21614
+ lines.push(`Exec mode: ${execMode}`);
21615
+ const { getSkillSuggestionsEnabled: getSkillSuggestionsEnabled2 } = await Promise.resolve().then(() => (init_store5(), store_exports5));
21616
+ const skillSuggestions = getSkillSuggestionsEnabled2(chatId);
21617
+ lines.push(`Skill suggestions: ${skillSuggestions ? "on" : "off"}`);
21618
+ const cwd = getCwd(chatId);
21619
+ if (cwd) lines.push(`CWD: ${cwd}`);
21620
+ const { getMessagePairCount: getMessagePairCount2 } = await Promise.resolve().then(() => (init_session_log(), session_log_exports));
21621
+ const pairCount = getMessagePairCount2(chatId);
21622
+ if (pairCount > 0) lines.push(`Messages this session: ${pairCount} pairs`);
21623
+ try {
21624
+ const { getReflectionStatus: getReflectionStatus2 } = await Promise.resolve().then(() => (init_store4(), store_exports4));
21625
+ const db3 = getDb();
21626
+ const reflectionStatus = getReflectionStatus2(db3, chatId);
21627
+ lines.push(`Reflection: ${reflectionStatus}`);
21628
+ } catch {
21629
+ }
21630
+ if (msg.source) lines.push(`Channel: ${msg.source}`);
21631
+ if (msg.threadId) {
21632
+ lines.push("");
21633
+ lines.push(`\u{1F4CB} Target for cron: ${chatId}:topic:${msg.threadId}`);
21634
+ }
21635
+ await channel.sendText(chatId, lines.join("\n"), { parseMode: "plain" });
21636
+ }
21594
21637
  async function handleSkillsCommand(chatId, commandArgs, msg, channel) {
21595
21638
  const skills2 = await discoverAllSkills();
21596
21639
  if (skills2.length === 0) {
@@ -22529,6 +22572,9 @@ async function handleCommand(msg, channel) {
22529
22572
  case "debate":
22530
22573
  await handleCouncilCommand(chatId, commandArgs, msg, channel);
22531
22574
  break;
22575
+ case "info":
22576
+ await handleInfoCommand(chatId, commandArgs, msg, channel);
22577
+ break;
22532
22578
  case "evolve":
22533
22579
  await handleEvolveCommandWrapper(chatId, commandArgs, msg, channel);
22534
22580
  break;
@@ -26608,6 +26654,8 @@ var init_telegram2 = __esm({
26608
26654
  const chatId = ctx.chat.id.toString();
26609
26655
  const messageId = ctx.message?.message_id?.toString() ?? "";
26610
26656
  const senderName = ctx.from?.first_name ?? "User";
26657
+ const senderId = ctx.from?.id?.toString();
26658
+ const senderUsername = ctx.from?.username ? `@${ctx.from.username}` : void 0;
26611
26659
  const chatTitle = ctx.chat?.title;
26612
26660
  const replyTo = ctx.message?.reply_to_message;
26613
26661
  const replyToRaw = replyTo ? replyTo.text ?? replyTo.caption ?? "" : "";
@@ -26622,6 +26670,8 @@ var init_telegram2 = __esm({
26622
26670
  messageId,
26623
26671
  text: "",
26624
26672
  senderName,
26673
+ senderId,
26674
+ senderUsername,
26625
26675
  type: "voice",
26626
26676
  source: "telegram",
26627
26677
  fileName: ctx.message.voice.file_id,
@@ -26641,6 +26691,8 @@ var init_telegram2 = __esm({
26641
26691
  messageId,
26642
26692
  text: "",
26643
26693
  senderName,
26694
+ senderId,
26695
+ senderUsername,
26644
26696
  type: "photo",
26645
26697
  source: "telegram",
26646
26698
  caption: ctx.message.caption ?? "",
@@ -26659,6 +26711,8 @@ var init_telegram2 = __esm({
26659
26711
  messageId,
26660
26712
  text: "",
26661
26713
  senderName,
26714
+ senderId,
26715
+ senderUsername,
26662
26716
  type: "document",
26663
26717
  source: "telegram",
26664
26718
  caption: ctx.message.caption ?? "",
@@ -26678,6 +26732,8 @@ var init_telegram2 = __esm({
26678
26732
  messageId,
26679
26733
  text: "",
26680
26734
  senderName,
26735
+ senderId,
26736
+ senderUsername,
26681
26737
  type: "video",
26682
26738
  source: "telegram",
26683
26739
  caption: ctx.message.caption ?? "",
@@ -26709,6 +26765,8 @@ var init_telegram2 = __esm({
26709
26765
  messageId,
26710
26766
  text,
26711
26767
  senderName,
26768
+ senderId,
26769
+ senderUsername,
26712
26770
  type: "command",
26713
26771
  source: "telegram",
26714
26772
  command,
@@ -26725,6 +26783,8 @@ var init_telegram2 = __esm({
26725
26783
  messageId,
26726
26784
  text,
26727
26785
  senderName,
26786
+ senderId,
26787
+ senderUsername,
26728
26788
  type: "text",
26729
26789
  source: "telegram",
26730
26790
  chatTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-claw",
3
- "version": "0.20.3",
3
+ "version": "0.20.4",
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",