polygram 0.17.2 → 0.17.3

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.
@@ -38,7 +38,7 @@
38
38
  * `let x = null; wired in main()` pattern, made explicit.
39
39
  */
40
40
 
41
- const ADMIN_CMD_RE = /^\/(model|effort|config|pair-code|pairings|unpair|new|reset|context|compact)(\s|$)/;
41
+ const ADMIN_CMD_RE = /^\/(model|effort|config|pair-code|pairings|unpair|new|reset|clear|context|compact)(\s|$)/;
42
42
  const PAIR_CLAIM_RE = /^\/pair\s+\S+/;
43
43
 
44
44
  function createGateInbound({
@@ -203,7 +203,7 @@ function createQuestionHandlers({
203
203
  // every group member's message for the whole question lifetime).
204
204
  if (!row.awaiting_other) return { consumed: false };
205
205
  // /stop, /new and other commands are never consumed as a free-text answer.
206
- if (/^\/(stop|new|reset|cancel|abort)\b/i.test(String(text || '').trim())) return { consumed: false };
206
+ if (/^\/(stop|new|reset|clear|cancel|abort)\b/i.test(String(text || '').trim())) return { consumed: false };
207
207
  // Identity: only the claimed owner supplies the free-text answer.
208
208
  const auth = questions.claimOrCheck(row.id, fromId);
209
209
  if (!auth.ok) {
@@ -157,8 +157,8 @@ function createSlashCommands({
157
157
  return true;
158
158
  }
159
159
 
160
- // /new + /reset — fresh session
161
- if (botAllowsCommands && (text === '/new' || text === '/reset')) {
160
+ // /new + /reset + /clear — fresh session (all synonyms)
161
+ if (botAllowsCommands && (text === '/new' || text === '/reset' || text === '/clear')) {
162
162
  let drained = 0;
163
163
  try {
164
164
  const r = await pm.resetSession(sessionKey, { reason: text.slice(1) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polygram",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
5
5
  "main": "lib/ipc/client.js",
6
6
  "bin": {