switchroom 0.20.11 → 0.20.13
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/dist/agent-scheduler/index.js +5 -2
- package/dist/auth-broker/index.js +32 -25
- package/dist/cli/notion-write-pretool.mjs +5 -2
- package/dist/cli/self-improve-stop.mjs +13 -1
- package/dist/cli/switchroom.js +3069 -1146
- package/dist/host-control/main.js +33 -26
- package/dist/vault/approvals/kernel-server.js +32 -25
- package/dist/vault/broker/server.js +32 -25
- package/examples/personal-google-workspace-mcp/compose.yaml +1 -1
- package/package.json +7 -4
- package/skills/switchroom-architecture/telegram.md +0 -1
- package/skills/switchroom-cli/SKILL.md +0 -1
- package/skills/switchroom-release/SKILL.md +3 -2
- package/telegram-plugin/README.md +2 -11
- package/telegram-plugin/bridge/bridge.ts +0 -12
- package/telegram-plugin/bunfig.toml +9 -5
- package/telegram-plugin/chat-lock.ts +1 -1
- package/telegram-plugin/dist/bridge/bridge.js +0 -12
- package/telegram-plugin/dist/gateway/gateway.js +219 -127
- package/telegram-plugin/dist/server.js +0 -12
- package/telegram-plugin/gateway/captured-answer-resume.ts +23 -1
- package/telegram-plugin/gateway/gateway.ts +25 -59
- package/telegram-plugin/gateway/liveness-wiring.ts +6 -1
- package/telegram-plugin/gateway/outbound-send-path.ts +111 -6
- package/telegram-plugin/gateway/outbox-sweep.ts +69 -0
- package/telegram-plugin/gateway/stale-pin-sweep.ts +4 -3
- package/telegram-plugin/gateway/status-pin-store.ts +10 -9
- package/telegram-plugin/gateway/stream-render.ts +8 -4
- package/telegram-plugin/gateway/turn-record-status.ts +32 -1
- package/telegram-plugin/hooks/audience-classify.d.mts +26 -0
- package/telegram-plugin/hooks/audience-classify.mjs +193 -0
- package/telegram-plugin/hooks/hooks.json +13 -12
- package/telegram-plugin/hooks/narration-classify.mjs +1 -2
- package/telegram-plugin/hooks/silent-end-interrupt-stop.mjs +31 -1
- package/telegram-plugin/hooks/silent-end-scan.mjs +9 -2
- package/telegram-plugin/outbox.ts +69 -3
- package/telegram-plugin/silent-end.ts +48 -5
- package/telegram-plugin/status-pin.ts +2 -5
- package/telegram-plugin/tests/backstop-exactly-once.test.ts +8 -2
- package/telegram-plugin/tests/captured-answer-resume.test.ts +26 -11
- package/telegram-plugin/tests/framework-fallback-duration-guard.test.ts +125 -0
- package/telegram-plugin/tests/hindsight-bank-preload.test.ts +50 -0
- package/telegram-plugin/tests/outbox-live-path-review-4490.test.ts +613 -0
- package/telegram-plugin/tests/outbox-self-improve-review.test.ts +401 -0
- package/telegram-plugin/tests/pin-message-tool-retired.test.ts +64 -0
- package/telegram-plugin/tests/status-pin-boot-recovery.test.ts +38 -0
- package/telegram-plugin/tests/worker-activity-feed.test.ts +40 -1
- package/telegram-plugin/worker-activity-feed.ts +1 -1
- package/vendor/hindsight-memory/scripts/recall.py +140 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_latency_instrumentation.py +277 -0
|
@@ -22,12 +22,13 @@ Cut a release of `switchroom/switchroom` and get it live on the fleet. This is a
|
|
|
22
22
|
1. `git fetch origin`, confirm `main` is at the commit you want released.
|
|
23
23
|
2. `gh pr list --state open` — confirm no PR meant for this release is still open. Ask the operator if unsure.
|
|
24
24
|
3. Confirm CI on `main` is green (`gh run list --branch main --limit 3`).
|
|
25
|
-
4. Read `CHANGELOG.md` — the `## Unreleased` section is the staging area for this release's notes.
|
|
25
|
+
4. Read `CHANGELOG.md` — the `## Unreleased` section is the **continuously-maintained** staging area for this release's notes. Every PR since the last release stages its own entry there as it merges, enforced by `scripts/check-changelog-entry.mjs` (part of `npm run lint`), so by release time this section should already read as a near-complete draft — you tidy and summarise, you do NOT author it from scratch. **An empty (or missing) `## Unreleased` at release time is now an ANOMALY, not the normal state:** it means either there genuinely is nothing to release, OR the enforcement was bypassed (`no-changelog` labels / `[skip changelog]` tokens on their own line on PRs that should have staged entries). Before assuming the former, cross-check against `git log <last-tag>..origin/main` — if real shippable work landed but Unreleased is bare, investigate and reconstruct rather than shipping a hollow release (this is exactly the v0.20.12 failure mode the enforcement exists to prevent).
|
|
26
26
|
5. Pick the next version: read the latest tag (`git tag --list 'v*' --sort=-v:refname | head -1`) and bump the patch (or minor if the operator asks). Confirm with the operator which.
|
|
27
27
|
|
|
28
28
|
## Step 1 — Consolidate the changelog (the release commit is CHANGELOG-only)
|
|
29
29
|
|
|
30
|
-
-
|
|
30
|
+
- The section is maintained continuously (see pre-flight 4), so this step is now a **rename + tidy**, not authorship: change the `## Unreleased` header to `## vX.Y.Z — <one-line summary>`, then read through the staged entries and lightly edit for grouping/summary. If Unreleased was empty or thin, STOP and resolve the anomaly (pre-flight 4) before proceeding — do not invent a release note.
|
|
31
|
+
- **Re-seed a fresh empty `## Unreleased` block at the top** (header + the convention HTML comment) immediately below `# Changelog`, so the staging area exists for the next cycle and `scripts/check-changelog-entry.mjs` keeps enforcing it. (Copy the comment block from the section you just renamed.)
|
|
31
32
|
- The release commit touches **CHANGELOG.md only**. Do NOT bump `package.json` (placeholder discipline).
|
|
32
33
|
- Branch protection blocks direct push to `main`, so: create a `release/vX.Y.Z` branch, push it, open a `chore: release vX.Y.Z` PR (base `main`), arm auto-merge (squash, delete-branch) on green CI.
|
|
33
34
|
|
|
@@ -38,8 +38,8 @@ adds the ergonomics and reliability that an always-on agent fleet needs:
|
|
|
38
38
|
- **Switchroom slash-commands** — `/agents`, `/restart`, `/logs`, `/memory`,
|
|
39
39
|
`/grant`, `/dangerous`, `/permissions`, `/reconcile` etc., handled by the
|
|
40
40
|
plugin without consuming Claude Code tokens.
|
|
41
|
-
- **
|
|
42
|
-
`delete_message`, `forward_message`, `
|
|
41
|
+
- **10 MCP tools** — `reply`, `react`, `edit_message`,
|
|
42
|
+
`delete_message`, `forward_message`, `send_typing`,
|
|
43
43
|
`download_attachment`, `get_recent_messages`, `send_checklist`,
|
|
44
44
|
`update_checklist` (the latter two ship native Telegram checklists,
|
|
45
45
|
see #272).
|
|
@@ -228,15 +228,6 @@ Sends a typing indicator ("Bot is typing...") to a chat. Auto-expires after ~5 s
|
|
|
228
228
|
|-----------|----------|-------------|
|
|
229
229
|
| `chat_id` | yes | Target chat ID |
|
|
230
230
|
|
|
231
|
-
### `pin_message` tool
|
|
232
|
-
|
|
233
|
-
Pins a message in a chat. Requires admin rights in groups.
|
|
234
|
-
|
|
235
|
-
| Parameter | Required | Description |
|
|
236
|
-
|-----------|----------|-------------|
|
|
237
|
-
| `chat_id` | yes | Chat ID |
|
|
238
|
-
| `message_id` | yes | Message to pin |
|
|
239
|
-
|
|
240
231
|
### `forward_message` tool
|
|
241
232
|
|
|
242
233
|
Forwards an existing message to a chat, preserving original sender attribution. In forum topics, the forwarded message lands in the correct thread (auto-detected or explicit).
|
|
@@ -213,18 +213,6 @@ const TOOL_SCHEMAS = [
|
|
|
213
213
|
required: ['chat_id'],
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
|
-
{
|
|
217
|
-
name: 'pin_message',
|
|
218
|
-
description: 'Pin a message in a Telegram chat. Useful for important outputs the user wants to find later. Requires admin rights in groups.',
|
|
219
|
-
inputSchema: {
|
|
220
|
-
type: 'object',
|
|
221
|
-
properties: {
|
|
222
|
-
chat_id: { type: 'string' },
|
|
223
|
-
message_id: { type: 'string' },
|
|
224
|
-
},
|
|
225
|
-
required: ['chat_id', 'message_id'],
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
216
|
{
|
|
229
217
|
name: 'delete_message',
|
|
230
218
|
description: 'Delete a message the bot previously sent. Prefer edit_message if you just want to update text — delete_message is for true removal.',
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
# `bun-test-run` job (scripts/bun-test-ci.sh) and `bun run --cwd telegram-plugin`.
|
|
3
3
|
#
|
|
4
4
|
# bun reads the bunfig.toml in its CWD only, so this file exists purely to load
|
|
5
|
-
# the same state
|
|
6
|
-
# two in sync; `npm run lint:agent-state-dir-hermeticity`
|
|
7
|
-
#
|
|
8
|
-
# tests/vitest-setup/agent-state-dir-guard.mjs
|
|
5
|
+
# the same shared-state hermeticity preloads as the repo-root bunfig.toml. Keep
|
|
6
|
+
# the two in sync; `npm run lint:agent-state-dir-hermeticity` and
|
|
7
|
+
# `npm run lint:hindsight-bank-hermeticity` fail if either bunfig stops loading
|
|
8
|
+
# either guard. Rationale lives in tests/vitest-setup/agent-state-dir-guard.mjs
|
|
9
|
+
# and tests/vitest-setup/hindsight-bank-guard.mjs.
|
|
9
10
|
[test]
|
|
10
|
-
preload = [
|
|
11
|
+
preload = [
|
|
12
|
+
"../tests/vitest-setup/agent-state-dir-guard.mjs",
|
|
13
|
+
"../tests/vitest-setup/hindsight-bank-guard.mjs",
|
|
14
|
+
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Per-(chat, thread) FIFO serialization for outbound Telegram API calls.
|
|
3
3
|
*
|
|
4
4
|
* Without this, concurrent MCP tool handlers (reply, stream_reply, react,
|
|
5
|
-
* edit_message, delete_message,
|
|
5
|
+
* edit_message, delete_message, forward_message) all call
|
|
6
6
|
* `bot.api.*` independently. When two calls race, HTTP latency can flip
|
|
7
7
|
* their delivery order — a later `reply` can land before an earlier
|
|
8
8
|
* `stream_reply` edit, or a `react` can resolve before the `reply` it
|
|
@@ -25196,18 +25196,6 @@ var TOOL_SCHEMAS = [
|
|
|
25196
25196
|
required: ["chat_id"]
|
|
25197
25197
|
}
|
|
25198
25198
|
},
|
|
25199
|
-
{
|
|
25200
|
-
name: "pin_message",
|
|
25201
|
-
description: "Pin a message in a Telegram chat. Useful for important outputs the user wants to find later. Requires admin rights in groups.",
|
|
25202
|
-
inputSchema: {
|
|
25203
|
-
type: "object",
|
|
25204
|
-
properties: {
|
|
25205
|
-
chat_id: { type: "string" },
|
|
25206
|
-
message_id: { type: "string" }
|
|
25207
|
-
},
|
|
25208
|
-
required: ["chat_id", "message_id"]
|
|
25209
|
-
}
|
|
25210
|
-
},
|
|
25211
25199
|
{
|
|
25212
25200
|
name: "delete_message",
|
|
25213
25201
|
description: "Delete a message the bot previously sent. Prefer edit_message if you just want to update text \u2014 delete_message is for true removal.",
|