@ouro.bot/cli 0.1.0-alpha.820 → 0.1.0-alpha.821

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.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.821",
6
+ "changes": [
7
+ "Show a typing indicator while the Butler works a Telegram turn, and drop the honesty-announcing reply opener."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.820",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.820",
2
+ "runtimeVersion": "0.1.0-alpha.821",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -5,7 +5,9 @@
5
5
  - Keep approved household contact reactive or request-bound. Only Ari receives unrelated proactive household attention.
6
6
  - Treat an intentionally offline service as healthy when that matches the current desired state.
7
7
  - For Ari's whole-household status questions, read current evidence before answering and separate active work, waiting on Ari, snoozed wake times, intentionally quiet services, healthy systems, and other current issues. Do not narrate daemon, event-queue, provider-lane, or backend service internals; translate them into compact household outcomes only when they are currently relevant.
8
- - For household media questions, use the restricted catalog read when it is available. Answer like a tasteful steward of the shelf: pick, recommend, compare, or confirm from current evidence without volunteering an AI or `I cannot watch` disclaimer.
8
+ - For household media questions, use the media tools when they are available and the restricted catalog read otherwise. Answer like a tasteful steward of the shelf: pick, recommend, compare, or confirm from current evidence without volunteering an AI or `I cannot watch` disclaimer.
9
+ - Check shelf state before naming a title. Never suggest going to find something that is already here, and never name a title the current search did not return.
10
+ - Do not open a reply by announcing its honesty. Say the true thing plainly; `Honest:`, `Honest answer:`, and `To be honest` add nothing and read as apology. Report a limit once, without ceremony, and never in place of an answer that the tools can actually give.
9
11
  - Never touch array/parity/disk configuration, permissions, network/security settings, or `/mnt/user` paths.
10
12
  - Never send server data off-box or enter credentials into another system.
11
13
  - When state is ambiguous, investigate safely, say what is known, and ask only if the answer changes the next safe move.
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.820</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.821</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -237,6 +237,21 @@ class SanctuaryTelegramAuthorityService {
237
237
  throw new Error("Sanctuary Telegram callback body is invalid");
238
238
  }
239
239
  }
240
+ else if (requestMethod === "sendChatAction") {
241
+ // A typing indicator is ephemeral and carries no content, so it is admitted
242
+ // for chats the agent may already message — but only as "typing", and only
243
+ // with the two fields that action needs, so it cannot become a side channel.
244
+ if (!exactBody(body, ["chat_id", "action"])) {
245
+ throw new Error("Sanctuary Telegram chat action is invalid");
246
+ }
247
+ if (body.action !== "typing") {
248
+ throw new Error("Sanctuary Telegram chat action is invalid");
249
+ }
250
+ const actionChatId = String(body.chat_id);
251
+ if (actionChatId !== ownerChatId && !this.#gateway.isAuthorizedChat(actionChatId)) {
252
+ throw new Error("Sanctuary Telegram chat action target is invalid");
253
+ }
254
+ }
240
255
  else if (requestMethod === "getFile") {
241
256
  if (!exactBody(body, ["file_id"]) || !boundedText(body.file_id, 512)) {
242
257
  throw new Error("Sanctuary Telegram file body is invalid");
@@ -51,6 +51,7 @@ exports.loadTelegramSenseCredentials = loadTelegramSenseCredentials;
51
51
  exports.createProductionTelegramRelationshipComposition = createProductionTelegramRelationshipComposition;
52
52
  exports.startTelegramSenseApp = startTelegramSenseApp;
53
53
  exports.sendTelegramExternalEventDecision = sendTelegramExternalEventDecision;
54
+ exports.withTelegramTypingIndicator = withTelegramTypingIndicator;
54
55
  exports.sendTelegramAwaitFollowUp = sendTelegramAwaitFollowUp;
55
56
  const node_crypto_1 = require("node:crypto");
56
57
  const node_async_hooks_1 = require("node:async_hooks");
@@ -717,6 +718,11 @@ function createTelegramSenseApp(options) {
717
718
  const transportPrivateValues = [botToken ?? "", authorizedUserId, authorizedChatId];
718
719
  const transportError = (error) => redactTelegramPrivateValues(error, transportPrivateValues);
719
720
  const api = authorityTransport?.api ?? options.api ?? (0, telegram_client_1.createTelegramBotApi)({ token: botToken });
721
+ // Only the root authority transport admits sendChatAction, so presence is offered
722
+ // exactly where it is actually supported rather than attempted everywhere.
723
+ const sendTypingIndicator = authorityTransport
724
+ ? async (chatId) => { await api.request("sendChatAction", { chat_id: chatId, action: "typing" }); }
725
+ : undefined;
720
726
  const offsetStore = options.offsetStore ?? new telegram_client_1.FileTelegramOffsetStore(path.join(agentRoot, "state", "senses", "telegram", "offset.json"));
721
727
  const inboxStore = options.inboxStore ?? new telegram_client_1.FileTelegramUpdateInboxStore(path.join(agentRoot, "state", "senses", "telegram", "inbox.json"));
722
728
  const admissionStore = options.admission
@@ -1674,7 +1680,13 @@ function createTelegramSenseApp(options) {
1674
1680
  if (!actor || actor.friendId !== configuredOwnerFriendId)
1675
1681
  throw new Error("Telegram attachment owner relationship is not active");
1676
1682
  }
1677
- await onMessageBody(message);
1683
+ // Show the household that the Butler is working rather than silently thinking.
1684
+ // Presence is deliberately separate from delivery: a transport that cannot do
1685
+ // it degrades to silence instead of failing, and message-delivery assertions
1686
+ // stay about messages.
1687
+ await (sendTypingIndicator
1688
+ ? withTelegramTypingIndicator(() => sendTypingIndicator(message.chatId), () => onMessageBody(message))
1689
+ : onMessageBody(message));
1678
1690
  });
1679
1691
  const onUnknownMessage = admissionController && options.admission ? async (message) => {
1680
1692
  const approved = await options.admission.resolveApprovedFriend(message);
@@ -2222,6 +2234,25 @@ async function sendTelegramExternalEventDecision(agentName, input) {
2222
2234
  await app.stop();
2223
2235
  }
2224
2236
  }
2237
+ /**
2238
+ * Telegram clears a typing indicator after roughly five seconds, so a turn that
2239
+ * thinks for longer has to refresh it or the chat goes silent while the Butler is
2240
+ * still working — which is what "leaving me on read" actually looked like.
2241
+ *
2242
+ * Indicator failures are swallowed on purpose: a missing typing bubble must never
2243
+ * take down the reply it was decorating.
2244
+ */
2245
+ async function withTelegramTypingIndicator(send, run, intervalMs = 4_000) {
2246
+ const tick = () => { void Promise.resolve().then(send).catch(() => undefined); };
2247
+ tick();
2248
+ const timer = setInterval(tick, intervalMs);
2249
+ try {
2250
+ return await run();
2251
+ }
2252
+ finally {
2253
+ clearInterval(timer);
2254
+ }
2255
+ }
2225
2256
  async function sendTelegramAwaitFollowUp(agentName, request) {
2226
2257
  const app = await startTelegramSenseApp(agentName);
2227
2258
  try {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.820",
3
+ "version": "0.1.0-alpha.821",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.820",
9
+ "version": "0.1.0-alpha.821",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.820",
3
+ "version": "0.1.0-alpha.821",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },