agim-cli 1.1.6 → 1.1.7

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.1.7] - 2026-05-16
8
+
9
+ ### Fixed — Viewer page leaked the IM user id
10
+
11
+ - `/v/:id` rendered the `source` field (thread key
12
+ `platform:channelId:threadId`) in the page header. That string
13
+ contains the IM user id (wxid on WeChat, numeric id on Telegram).
14
+ Since the `/v/:id` URL is anyone-with-link, this exposed the user
15
+ id to anyone the link was forwarded to. The render template now
16
+ omits `source` entirely — the field stays in the local DB for the
17
+ operator's own dashboard but no longer ships in HTML.
18
+
7
19
  ## [1.1.6] - 2026-05-16
8
20
 
9
21
  ### Added — IM long-message viewer (local-first, never leaves your host)
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-render.d.ts","sourceRoot":"","sources":["../../src/web/viewer-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAgBvD,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAsGrD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
1
+ {"version":3,"file":"viewer-render.d.ts","sourceRoot":"","sources":["../../src/web/viewer-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAgBvD,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAuGrD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
@@ -17,7 +17,9 @@ function fmtDate(unix) {
17
17
  export function renderPasteHtml(row) {
18
18
  const isMd = row.content_type !== 'plain';
19
19
  const title = row.title || (isMd ? 'agim · markdown' : 'agim · plaintext');
20
- const source = row.source ? `<span class="source">${escapeHtml(row.source)}</span>` : '';
20
+ // Intentionally do NOT render `source` (thread_key). It contains the IM
21
+ // user id (wxid / telegram id), and the /v/:id URL is anyone-with-link.
22
+ // Source stays in the DB for the operator's own dashboard.
21
23
  const created = fmtDate(row.created_at);
22
24
  const body = isMd
23
25
  ? `<pre id="md-src" hidden>${escapeHtml(row.content)}</pre><article id="rendered" class="prose"></article>`
@@ -70,7 +72,6 @@ footer a{color:#0969da;text-decoration:none}
70
72
  <div class="wrap">
71
73
  <header>
72
74
  <div class="title">${escapeHtml(title)}</div>
73
- ${source}
74
75
  <span class="meta">${created}</span>
75
76
  <button id="copy-btn" title="copy raw">📋 Copy</button>
76
77
  </header>
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-render.js","sourceRoot":"","sources":["../../src/web/viewer-render.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,qEAAqE;AAIrE,SAAS,UAAU,CAAC,CAA4B;IAC9C,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,EAAE,CAAA;IACxB,OAAO,MAAM,CAAC,CAAC,CAAC;SACb,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AACvF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAa;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,KAAK,OAAO,CAAA;IACzC,MAAM,KAAK,GAA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AAkB;IAChC,OAAO,yfAAyf,CAAA;AAClgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agim-cli",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Agim (阿吉姆) — universal messenger-to-agent bridge. Connect WeChat / Feishu / DingTalk / Telegram / Discord to Claude Code / Codex / Copilot / OpenCode, or any custom agent via ACP. Installs the `agim` command.",
5
5
  "type": "module",
6
6
  "bin": {