@linxiraos/pi-channels 1.3.2 → 1.4.0

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
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.4.0] - 2026-10-21
4
+
5
+ - Feishu and Telegram log in with credentials as well as the WeChat QR: credentials are validated before they are written (Feishu tenant token plus bot info, Telegram `getMe`), secrets are masked in errors, and unbinding clears exactly the fields that channel owns
6
+
7
+ - Channel config writes go through a read-modify-write under one file lock with a shared reader, and the runtime lock is published atomically (temp file + link), so concurrent `login`/`serve`/settings writers no longer drop keys
8
+ - `channels.reportPolicy` is read from settings instead of being inert, and a session-only route mapping is cleaned up when its session ends
9
+
3
10
  ## [1.3.2] - 2026-10-19
4
11
 
5
12
  - Version line moves to 1.3.2 with the rest of the suite; no user-visible change in this package.
@@ -1,14 +1,15 @@
1
1
  /**
2
- * Channel bootstrapping for `zetacode serve` (web/desktop mode only).
2
+ * Channel bootstrapping shared by `zetacode serve` and normal CLI/TUI
3
+ * sessions.
3
4
  *
4
5
  * Enables every channel marked `enabled` in the web config and routes its
5
- * inbound messages into the coordinator session through `ChannelHost`.
6
- * Channels missing required credentials are skipped with a warning — a
7
- * misconfigured channel must never prevent the server from starting.
6
+ * inbound messages into the host session through `ChannelHost`. Channels
7
+ * missing required credentials are skipped with a warning — a misconfigured
8
+ * channel must never prevent the host from starting.
8
9
  *
9
- * The CLI never imports this module: `zeta`/`zeta --interactive` sessions
10
- * don't create a ZetaServer, so no channel listeners exist there and
11
- * `channel_send`/`workspace_run` stay unavailable.
10
+ * The runtime is transport-agnostic: it needs only the `ChannelSession`
11
+ * contract, so `zetacode` (interactive or `--print`) hosts it directly when a
12
+ * channel is enabled, and `channel_send` becomes available there too.
12
13
  */
13
14
  import type { ChannelId, ChatChannel, ChatImage } from "./channel.js";
14
15
  import { ChannelHost } from "./host.js";
package/package.json CHANGED
@@ -22,15 +22,15 @@
22
22
  "bun": ">=1.3.14"
23
23
  },
24
24
  "peerDependencies": {
25
- "@linxiraos/pi-ai": "1.3.2"
25
+ "@linxiraos/pi-ai": "1.4.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/bun": "1.4.3",
29
- "@linxiraos/pi-ai": "1.3.2"
29
+ "@linxiraos/pi-ai": "1.4.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@larksuiteoapi/node-sdk": "^1.71.1",
33
- "@linxiraos/pi-utils": "1.3.2"
33
+ "@linxiraos/pi-utils": "1.4.0"
34
34
  },
35
35
  "scripts": {
36
36
  "test": "bun test --parallel",
@@ -62,6 +62,6 @@
62
62
  "homepage": "https://linxira-os.github.io/zeta/",
63
63
  "description": "IM channel adapters for Zeta (WeChat / Feishu / Telegram)",
64
64
  "type": "module",
65
- "version": "1.3.2",
65
+ "version": "1.4.0",
66
66
  "name": "@linxiraos/pi-channels"
67
67
  }
package/src/index.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  /**
2
- * Channel bootstrapping for `zetacode serve` (web/desktop mode only).
2
+ * Channel bootstrapping shared by `zetacode serve` and normal CLI/TUI
3
+ * sessions.
3
4
  *
4
5
  * Enables every channel marked `enabled` in the web config and routes its
5
- * inbound messages into the coordinator session through `ChannelHost`.
6
- * Channels missing required credentials are skipped with a warning — a
7
- * misconfigured channel must never prevent the server from starting.
6
+ * inbound messages into the host session through `ChannelHost`. Channels
7
+ * missing required credentials are skipped with a warning — a misconfigured
8
+ * channel must never prevent the host from starting.
8
9
  *
9
- * The CLI never imports this module: `zeta`/`zeta --interactive` sessions
10
- * don't create a ZetaServer, so no channel listeners exist there and
11
- * `channel_send`/`workspace_run` stay unavailable.
10
+ * The runtime is transport-agnostic: it needs only the `ChannelSession`
11
+ * contract, so `zetacode` (interactive or `--print`) hosts it directly when a
12
+ * channel is enabled, and `channel_send` becomes available there too.
12
13
  */
13
14
 
14
15
  import { logger } from "@linxiraos/pi-utils";