switchroom 0.13.53 → 0.13.54
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 +82 -81
- package/dist/auth-broker/index.js +82 -81
- package/dist/cli/drive-write-pretool.mjs +10 -10
- package/dist/cli/ms-365-write-pretool.mjs +259 -0
- package/dist/cli/skill-validate-pretool.mjs +72 -72
- package/dist/cli/switchroom.js +1162 -662
- package/dist/host-control/main.js +150 -149
- package/dist/vault/approvals/kernel-server.js +84 -83
- package/dist/vault/broker/server.js +85 -84
- package/package.json +1 -1
- package/profiles/_base/start.sh.hbs +17 -0
- package/profiles/_shared/telegram-style.md.hbs +2 -0
- package/telegram-plugin/dist/bridge/bridge.js +112 -112
- package/telegram-plugin/dist/gateway/gateway.js +537 -229
- package/telegram-plugin/dist/server.js +160 -160
- package/telegram-plugin/gateway/gateway.ts +227 -17
- package/telegram-plugin/gateway/ipc-protocol.ts +37 -0
- package/telegram-plugin/gateway/ipc-server.ts +59 -0
- package/telegram-plugin/gateway/ms365-write-approval.test.ts +314 -0
- package/telegram-plugin/gateway/ms365-write-approval.ts +335 -0
- package/telegram-plugin/tests/ipc-validator.test.ts +61 -0
- package/telegram-plugin/tests/slash-command-smart-split.test.ts +115 -0
- package/vendor/hindsight-memory/scripts/lib/gateway_ipc.py +35 -0
- package/vendor/hindsight-memory/scripts/recall.py +164 -4
- package/vendor/hindsight-memory/scripts/retain.py +52 -0
- package/vendor/hindsight-memory/scripts/tests/test_gateway_ipc.py +42 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_topic_filter.py +139 -0
package/package.json
CHANGED
|
@@ -239,6 +239,23 @@ export HINDSIGHT_RECALL_CACHE_TTL_SECS={{hindsightRecallCacheTtlSecs}}
|
|
|
239
239
|
{{#if (isNumber hindsightRecallMinOverlap)}}
|
|
240
240
|
export HINDSIGHT_RECALL_MIN_OVERLAP={{hindsightRecallMinOverlap}}
|
|
241
241
|
{{/if}}
|
|
242
|
+
# PR6 — supergroup-mode topic tagging. JSON map of {alias: thread_id}
|
|
243
|
+
# parsed by retain.py + recall.py to (a) stamp chat_id/thread_id/topic_alias
|
|
244
|
+
# into retained memory metadata and (b) emit a "Current topic: …" preamble
|
|
245
|
+
# on recall blocks so the model self-scopes. Empty / absent for fleet-shared
|
|
246
|
+
# or DM agents where the supergroup topology isn't in use.
|
|
247
|
+
{{#if hindsightTopicAliasesJsonQ}}
|
|
248
|
+
export HINDSIGHT_TOPIC_ALIASES_JSON={{{hindsightTopicAliasesJsonQ}}}
|
|
249
|
+
{{/if}}
|
|
250
|
+
# PR6 — topic filter mode for cross-topic memory recall. Default
|
|
251
|
+
# "soft-preamble": all topic-tagged memories surface and the model
|
|
252
|
+
# decides relevance via the preamble. "hard-filter": drop memories
|
|
253
|
+
# whose source thread_id differs from the active prompt's thread_id.
|
|
254
|
+
# Operators flip this when instrumentation (the active_thread_id /
|
|
255
|
+
# source_topics fields in recall_log.jsonl) shows binding failures.
|
|
256
|
+
{{#if hindsightTopicFilterMode}}
|
|
257
|
+
export HINDSIGHT_TOPIC_FILTER_MODE={{hindsightTopicFilterMode}}
|
|
258
|
+
{{/if}}
|
|
242
259
|
# Wait for Hindsight API to be reachable before launching Claude, otherwise
|
|
243
260
|
# the MCP server connection fails at startup with "1 MCP server failed".
|
|
244
261
|
HINDSIGHT_WAIT=0
|
|
@@ -21,6 +21,8 @@ The 👀→🤔→🔥→👍 status reaction and the typing indicator are *ambi
|
|
|
21
21
|
|
|
22
22
|
**Reactions ON your replies.** Sometimes you'll receive a turn whose body is wrapped in `<channel source="reaction">`. That means the user reacted to one of your earlier messages and the gateway forwarded the reaction as a synthetic turn (the message preview is included so you know which reply they reacted to). 👎 / ❌ are stop signals — pause, reconsider the approach, ask what's off. 👍 / ✅ are acknowledgements — keep going if mid-task, no extra reply needed. A brief explicit acknowledgement is fine but not required; don't ceremonially reply to every reaction. The allowlist + per-hour cap are operator-tunable (default 10/hour); other emojis you might see don't trigger turns.
|
|
23
23
|
|
|
24
|
+
**Topics are organizational, you are one identity.** When you're in a supergroup, the `<channel>` envelope carries both `chat_id` and `message_thread_id` — the pair identifies a topic, and the user organizes work across topics like folders. You are still one entity that knows them all, but each topic has its own audience and its own thread of work: keep replies focused on the topic the user wrote into. Don't preface with "as I mentioned in #planning" unless the user in *this* topic brought it up; don't drag a deep-dive from one topic into a quick exchange in another. Hindsight memories and your own transcript span every topic — when recalled memories from other topics surface, use them when context genuinely transfers (the user references prior work; the topics share a project) and ignore them when they don't.
|
|
25
|
+
|
|
24
26
|
**Follow-ups while a turn is in flight.** Claude Code's native FIFO queue means a follow-up Telegram message arrives AFTER your current turn ends, not during it — you can't interrupt your own turn. Every follow-up becomes the next prompt you see. The plugin enriches the `<channel>` meta so you can classify correctly:
|
|
25
27
|
|
|
26
28
|
- `queued="true"` — DEFAULT for mid-turn follow-ups (no prefix). Treat as a new, independent task. Do NOT reference the in-flight work — start fresh. Also fires when the user typed `/queue ` or `/q ` (legacy alias; the prefix is stripped from the body you see).
|