instar 1.3.1613 → 1.3.1614

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.
Files changed (92) hide show
  1. package/dashboard/console/machines-model.js +48 -0
  2. package/dashboard/console/machines.js +6 -3
  3. package/dashboard/console/plans-model.js +8 -6
  4. package/dist/core/AppConversationService.d.ts.map +1 -1
  5. package/dist/core/AppConversationService.js +3 -4
  6. package/dist/core/AppConversationService.js.map +1 -1
  7. package/dist/core/AppConversationStore.d.ts +26 -2
  8. package/dist/core/AppConversationStore.d.ts.map +1 -1
  9. package/dist/core/AppConversationStore.js +39 -1
  10. package/dist/core/AppConversationStore.js.map +1 -1
  11. package/dist/core/AppConversationsReplicatedStore.js +1 -1
  12. package/dist/core/AppConversationsReplicatedStore.js.map +1 -1
  13. package/dist/core/MobilePush.d.ts +3 -0
  14. package/dist/core/MobilePush.d.ts.map +1 -1
  15. package/dist/core/MobilePush.js +9 -3
  16. package/dist/core/MobilePush.js.map +1 -1
  17. package/dist/core/PostUpdateMigrator.d.ts +6 -0
  18. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  19. package/dist/core/PostUpdateMigrator.js +24 -0
  20. package/dist/core/PostUpdateMigrator.js.map +1 -1
  21. package/dist/core/appMediaReplyFiles.d.ts +10 -0
  22. package/dist/core/appMediaReplyFiles.d.ts.map +1 -1
  23. package/dist/core/appMediaReplyFiles.js +37 -19
  24. package/dist/core/appMediaReplyFiles.js.map +1 -1
  25. package/dist/core/appMediaTypes.d.ts +7 -0
  26. package/dist/core/appMediaTypes.d.ts.map +1 -1
  27. package/dist/core/appMediaTypes.js +17 -0
  28. package/dist/core/appMediaTypes.js.map +1 -1
  29. package/dist/core/appPlatformMedia.d.ts +44 -0
  30. package/dist/core/appPlatformMedia.d.ts.map +1 -0
  31. package/dist/core/appPlatformMedia.js +121 -0
  32. package/dist/core/appPlatformMedia.js.map +1 -0
  33. package/dist/data/standards-guard-index.json +1 -1
  34. package/dist/data/standards-guard-index.meta.json +2 -2
  35. package/dist/data/standards-registry.meta.json +1 -1
  36. package/dist/messaging/TelegramAdapter.d.ts +21 -0
  37. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  38. package/dist/messaging/TelegramAdapter.js +48 -0
  39. package/dist/messaging/TelegramAdapter.js.map +1 -1
  40. package/dist/monitoring/GreenPrAutoMerger.d.ts.map +1 -1
  41. package/dist/monitoring/GreenPrAutoMerger.js +5 -2
  42. package/dist/monitoring/GreenPrAutoMerger.js.map +1 -1
  43. package/dist/monitoring/greenPrLogic.d.ts +7 -1
  44. package/dist/monitoring/greenPrLogic.d.ts.map +1 -1
  45. package/dist/monitoring/greenPrLogic.js +13 -0
  46. package/dist/monitoring/greenPrLogic.js.map +1 -1
  47. package/dist/native/instar-desktop-host +0 -0
  48. package/dist/scaffold/templates.d.ts.map +1 -1
  49. package/dist/scaffold/templates.js +2 -1
  50. package/dist/scaffold/templates.js.map +1 -1
  51. package/dist/server/AgentServer.d.ts.map +1 -1
  52. package/dist/server/AgentServer.js +17 -1
  53. package/dist/server/AgentServer.js.map +1 -1
  54. package/dist/server/CapabilityIndex.js +3 -3
  55. package/dist/server/CapabilityIndex.js.map +1 -1
  56. package/dist/server/machineMaintenancePool.d.ts +84 -0
  57. package/dist/server/machineMaintenancePool.d.ts.map +1 -0
  58. package/dist/server/machineMaintenancePool.js +165 -0
  59. package/dist/server/machineMaintenancePool.js.map +1 -0
  60. package/dist/server/mobileConversationRoutes.d.ts +7 -0
  61. package/dist/server/mobileConversationRoutes.d.ts.map +1 -1
  62. package/dist/server/mobileConversationRoutes.js +55 -1
  63. package/dist/server/mobileConversationRoutes.js.map +1 -1
  64. package/dist/server/mobileMediaRoutes.d.ts.map +1 -1
  65. package/dist/server/mobileMediaRoutes.js +9 -5
  66. package/dist/server/mobileMediaRoutes.js.map +1 -1
  67. package/dist/server/mobilePairingRoutes.d.ts +0 -5
  68. package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
  69. package/dist/server/mobilePairingRoutes.js +11 -2
  70. package/dist/server/mobilePairingRoutes.js.map +1 -1
  71. package/dist/server/routes.d.ts.map +1 -1
  72. package/dist/server/routes.js +59 -4
  73. package/dist/server/routes.js.map +1 -1
  74. package/package.json +1 -1
  75. package/scripts/lib/release-local-steps.mjs +11 -2
  76. package/scripts/safe-merge.mjs +35 -0
  77. package/scripts/standards-coverage.mjs +6 -1
  78. package/src/data/builtin-manifest.json +64 -64
  79. package/src/data/standards-guard-index.json +1 -1
  80. package/src/data/standards-guard-index.meta.json +2 -2
  81. package/src/data/standards-registry.meta.json +1 -1
  82. package/src/scaffold/templates.ts +2 -1
  83. package/upgrades/1.3.1614.md +73 -0
  84. package/upgrades/side-effects/app-reply-push-preview.eli16.md +11 -0
  85. package/upgrades/side-effects/app-reply-push-preview.md +57 -0
  86. package/upgrades/side-effects/chat-media-telegram-inbound.eli16.md +11 -0
  87. package/upgrades/side-effects/chat-media-telegram-inbound.md +75 -0
  88. package/upgrades/side-effects/console-blocker-topic-names.eli16.md +5 -0
  89. package/upgrades/side-effects/console-blocker-topic-names.md +34 -0
  90. package/upgrades/side-effects/machine-maintenance-pool-view.md +107 -0
  91. package/upgrades/side-effects/release-local-pending-runs.md +60 -0
  92. package/upgrades/side-effects/stacked-pr-and-ci-timeouts.md +120 -0
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "db01d9f92c6aa26ca903702896b41be53722982ed07d27633237bb254c214290",
5
- "packageVersion": "1.3.1613",
5
+ "packageVersion": "1.3.1614",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "50a9567a7b535152834f272abb8682cd9693e948b9b25722e5a399af224074a0",
2
+ "sha256": "e00d47e5402151b0f3928791f18f24634b67c03b29f6f268568e6d309a544644",
3
3
  "registrySha256": "db01d9f92c6aa26ca903702896b41be53722982ed07d27633237bb254c214290",
4
- "packageVersion": "1.3.1613"
4
+ "packageVersion": "1.3.1614"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "db01d9f92c6aa26ca903702896b41be53722982ed07d27633237bb254c214290",
3
3
  "articleCount": 93,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1613"
5
+ "packageVersion": "1.3.1614"
6
6
  }
@@ -20,7 +20,7 @@ import { JOB_DECLARED_FAILURE_AWARENESS } from "../scheduler/jobDeclaredFailure.
20
20
  // existing-agent migration there) so the two can never drift. Imported as a runtime
21
21
  // function call inside generateClaudeMd — no module-init cycle (PostUpdateMigrator
22
22
  // never imports templates).
23
- import { APPRENTICESHIP_STALL_GATE_CLAUDEMD_SECTION, SESSION_LISTING_HYGIENE_CLAUDEMD_SECTION, PLAYWRIGHT_PROFILE_REGISTRY_CLAUDEMD_SECTION, MACHINE_LOAD_ASSESSMENT_CLAUDEMD_SECTION, CODEX_CONNECT_CLAUDEMD_SECTION, FEATURE_SWITCH_CLAUDEMD_SECTION, NORMAL_CHROME_BROWSER_CLAUDEMD_SECTION, SINGLE_MACHINE_FAILOVER_GAP_CLAUDEMD_SECTION, MISSING_LOGIN_SESSION_CLAUDEMD_SECTION, DYNAMIC_MCP_CLAUDEMD_SECTION, ULTRACODE_SPAWN_CLAUDEMD_SECTION, AGENT_SIGNATURE_PROVENANCE_CLAUDEMD_SECTION, SENDER_REJECTION_CLAUDEMD_SECTION, SCOPE_ACCRETION_CLAUDEMD_SECTION, MESH_SELF_HEALING_CLAUDEMD_SECTION, LEASE_MEDIUM_CLAUDEMD_SECTION, WRITE_ADMISSION_CLAUDEMD_SECTION, DOORWAY_REGISTRY_CLAUDEMD_SECTION, EXTERNAL_HOG_CLAUDEMD_SECTION, ROUTING_SPEND_CLAUDEMD_SECTION, MATURATION_BOARD_CLAUDEMD_SECTION, QUEUE_PACE_CLAUDEMD_SECTION, ECOSYSTEM_IDEAS_CLAUDEMD_SECTION, MOBILE_PAIRING_CLAUDEMD_SECTION, MOBILE_CHAT_CLAUDEMD_SECTION, APP_CONVERSATIONS_CLAUDEMD_SECTION, MOBILE_ROUTES_CLAUDEMD_SECTION, MOBILE_PUSH_CLAUDEMD_SECTION, DECISION_QUALITY_CLAUDEMD_SECTION, BENCHMARK_DIVERGENCE_CLAUDEMD_SECTION, DUPLICATE_RECONCILER_CLAUDEMD_SECTION, AUDIT_CONVERGENCE_CLAUDEMD_SECTION, TONE_ADVISORY_MIGRATION_CLAUDEMD_SECTION, DECISION_JOURNAL_CONFIDENCE_CLAUDEMD_GUIDANCE, WINDOW_RUN_LIVENESS_CLAUDEMD_SECTION, SCRIPT_JOBS_CLAUDEMD_SECTION, JOB_RESULT_SUPERVISION_CLAUDEMD_SECTION, DEDICATED_PROFILE_REGISTRY_ROW_ANSWER, CODEX_ARM_SWEEPER_CLAUDEMD_SECTION, MACHINE_MAINTENANCE_CLAUDEMD_SECTION, APP_MEDIA_CLAUDEMD_SECTION, MACHINE_BROWSER_CARE_CLAUDEMD_SECTION, PAIRING_WITHOUT_TELEGRAM_CLAUDEMD_SECTION, SLACK_FROM_APP_CLAUDEMD_SECTION } from '../core/PostUpdateMigrator.js';
23
+ import { APPRENTICESHIP_STALL_GATE_CLAUDEMD_SECTION, SESSION_LISTING_HYGIENE_CLAUDEMD_SECTION, PLAYWRIGHT_PROFILE_REGISTRY_CLAUDEMD_SECTION, MACHINE_LOAD_ASSESSMENT_CLAUDEMD_SECTION, CODEX_CONNECT_CLAUDEMD_SECTION, FEATURE_SWITCH_CLAUDEMD_SECTION, NORMAL_CHROME_BROWSER_CLAUDEMD_SECTION, SINGLE_MACHINE_FAILOVER_GAP_CLAUDEMD_SECTION, MISSING_LOGIN_SESSION_CLAUDEMD_SECTION, DYNAMIC_MCP_CLAUDEMD_SECTION, ULTRACODE_SPAWN_CLAUDEMD_SECTION, AGENT_SIGNATURE_PROVENANCE_CLAUDEMD_SECTION, SENDER_REJECTION_CLAUDEMD_SECTION, SCOPE_ACCRETION_CLAUDEMD_SECTION, MESH_SELF_HEALING_CLAUDEMD_SECTION, LEASE_MEDIUM_CLAUDEMD_SECTION, WRITE_ADMISSION_CLAUDEMD_SECTION, DOORWAY_REGISTRY_CLAUDEMD_SECTION, EXTERNAL_HOG_CLAUDEMD_SECTION, ROUTING_SPEND_CLAUDEMD_SECTION, MATURATION_BOARD_CLAUDEMD_SECTION, QUEUE_PACE_CLAUDEMD_SECTION, ECOSYSTEM_IDEAS_CLAUDEMD_SECTION, MOBILE_PAIRING_CLAUDEMD_SECTION, MOBILE_CHAT_CLAUDEMD_SECTION, APP_CONVERSATIONS_CLAUDEMD_SECTION, MOBILE_ROUTES_CLAUDEMD_SECTION, MOBILE_PUSH_CLAUDEMD_SECTION, DECISION_QUALITY_CLAUDEMD_SECTION, BENCHMARK_DIVERGENCE_CLAUDEMD_SECTION, DUPLICATE_RECONCILER_CLAUDEMD_SECTION, AUDIT_CONVERGENCE_CLAUDEMD_SECTION, TONE_ADVISORY_MIGRATION_CLAUDEMD_SECTION, DECISION_JOURNAL_CONFIDENCE_CLAUDEMD_GUIDANCE, WINDOW_RUN_LIVENESS_CLAUDEMD_SECTION, SCRIPT_JOBS_CLAUDEMD_SECTION, JOB_RESULT_SUPERVISION_CLAUDEMD_SECTION, DEDICATED_PROFILE_REGISTRY_ROW_ANSWER, CODEX_ARM_SWEEPER_CLAUDEMD_SECTION, MACHINE_MAINTENANCE_CLAUDEMD_SECTION, APP_MEDIA_CLAUDEMD_SECTION, MACHINE_BROWSER_CARE_CLAUDEMD_SECTION, PAIRING_WITHOUT_TELEGRAM_CLAUDEMD_SECTION, SLACK_FROM_APP_CLAUDEMD_SECTION, MACHINE_MAINTENANCE_POOL_CLAUDEMD_SECTION } from '../core/PostUpdateMigrator.js';
24
24
  import { MINIMUM_OPERATOR_EFFORT_CLAUDEMD_SECTION } from '../core/PostUpdateMigrator.js';
25
25
  import { CODEX_DEVICE_LIMIT_CLAUDEMD_BULLET } from '../core/PostUpdateMigrator.js';
26
26
  import { UPDATE_APPLY_VERIFY_HOLD_CLAUDEMD_LINE } from '../core/PostUpdateMigrator.js';
@@ -458,6 +458,7 @@ ${CODEX_ARM_SWEEPER_CLAUDEMD_SECTION(port)}
458
458
 
459
459
  ${MACHINE_MAINTENANCE_CLAUDEMD_SECTION(port)}
460
460
  ${MACHINE_BROWSER_CARE_CLAUDEMD_SECTION(port)}
461
+ ${MACHINE_MAINTENANCE_POOL_CLAUDEMD_SECTION(port)}
461
462
 
462
463
  ### Cold-Start Lifeline Fallback (no silent resource rejection)
463
464
 
@@ -0,0 +1,73 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ A phone notification for an agent reply in an app conversation said only "New reply". It can now show what the reply says (docs/specs/mobile-native-chat-media.md §4.11, increment 4).
9
+
10
+ - The push payload for a reply carries the reply's message id and machine (never its text). Apple still only sees "New reply".
11
+ - New route `GET /mobile/chat/app/:conversationKey/preview/:messageId` answers `{title, body}`: the reply's first 100 characters, or "sent a photo" / "sent a video" / "sent a voice message" / "sent a file: <name>" / "sent N files", then the caption. Open to the paired device, its notification read token (which until now opened only the attention title), and the agent's own token. A deleted conversation, an operator message or a reply not yet copied to that machine answers 404, and the phone keeps "New reply".
12
+ - Peer push triggers carry the message id too.
13
+
14
+ - Telegram files in the Instar iPhone app (docs/specs/mobile-native-chat-media.md §4.9, Telegram half). When files in app conversations are on, every photo, document and voice note that arrives in a Telegram topic is also copied into the app's file store and recorded as a durable event that is copied to the agent's other machines.
15
+ - The app's view of a Telegram conversation now shows those files: a phone reading a topic's history gets each recorded file as an `attachments` entry, and can download it with `GET /mobile/media/<hash>?ref=telegram:<topicId>`. Only a file recorded in that topic can be downloaded through that topic.
16
+ - A phone never sees a server file path any more: history rows (and the conversation list's preview line) show `[photo]`, `[file: <name>]` or `[voice note]` instead of the path, whether or not the file was recorded.
17
+ - The copy uses the same checks as the agent's reply files: the store's size limit, the disk-space floor, the 50 MiB file limit, a hash, and the file type read from its bytes. A voice note is copied before the Telegram handler deletes its download. If the copy fails (store full, disk low), the session still gets the Telegram message exactly as before and the failure is reported.
18
+ - The session's Telegram messages, the agent's Bearer reads of topic history, and the app conversation routes are unchanged.
19
+
20
+ - The Plans page's "In the way" list shows a conversation's name where a line mentioned it by topic number.
21
+
22
+ - `GET /machine-maintenance?scope=pool` and `GET /machine-maintenance/lock-state?scope=pool`: one call from any machine returns every online machine's watch-only maintenance state (uptime, last practice run, holds, browser care) or lock reading, each tagged with `machineId` and `machineNickname`. A machine that is dark, offline, on an older version without the route, or unreachable is listed under `pool.failed` with a normalized reason, never a 500 and never a peer address or token. Read-only: the view carries `authority: "none"`, `canRestart: false`, `canStopWork: false`. Peer fetches go through the shared pool poll cache when it is on.
23
+ - The console Machines page now shows each machine's restart-care line on that machine's own card, and names the machines it could not read.
24
+ - A short awareness section reaches fresh agents and existing agents through the CLAUDE.md migration.
25
+
26
+ `npm run release:local` refuses while any publish.yml run is unfinished. It queried GitHub by status (queued, in_progress, waiting, requested, action_required), which never returns a run GitHub marks `pending` while it waits behind another run in `concurrency: publish`. It now also lists the 100 most recent publish.yml runs unfiltered and counts every run not `completed`, so a pending run is named among the runs to cancel. A failed query is still unknown, which stops a real release.
27
+
28
+ - A pull request aimed at a feature branch (a "stacked" PR) can no longer be merged by the merge tooling: `scripts/safe-merge.mjs` refuses any base other than main (`refused:non-main-base`) before any other step, on every path including `--auto`. A new `stacked-pr-guard` workflow turns such a PR's GitHub badge red with a "retarget to main" instruction, so it no longer shows as clean. The green-PR watcher skips stacked PRs (`non-main-base`) and its stuck-red alarm ignores them. Closes ACT-053.
29
+ - Every job in `.github/workflows/ci.yml` now declares `timeout-minutes` (unit 60, integration 50, e2e 70, everything else 15), sized from the slowest of 79 recent runs, so a hung job fails within about an hour instead of GitHub's 6-hour default. Closes ACT-059.
30
+
31
+ ## What to Tell Your User
32
+
33
+ Once your iPhone app updates, a notification for my reply shows the start of what I said, or "sent a photo", instead of just "New reply". The text goes from me to your phone directly; Apple never sees it.
34
+
35
+ Photos, documents and voice notes you send in a Telegram topic now show up in that conversation in the Instar app, and you can open them there, on any of my machines. This only works while files in app conversations are switched on. The app needs its next update to display them.
36
+
37
+ The Plans page names your conversations instead of showing their internal numbers.
38
+
39
+ You can now ask me about restart care or screen locks for all your machines at once, not only the one I am on. Each answer names the machine, and if one of them cannot be read I say which one and why instead of guessing. The Machines page in the console shows the same per machine. It is still watch-only: nothing restarts or closes.
40
+
41
+ Nothing changes for you day to day. If you develop Instar itself: a pull request aimed at another pull request's branch now shows a red "retarget to main" check and the merge tooling will not merge it there. Merge the one underneath into main first, then point this one at main.
42
+
43
+ ## Summary of New Capabilities
44
+
45
+ `GET /mobile/chat/app/:conversationKey/preview/:messageId`.
46
+
47
+ - Telegram photos, documents and voice notes are kept for the app and shown in its view of the Telegram conversation (`platform-media` events, download with `ref=telegram:<topicId>`). Behind `mobilePairing.native.media.enabled` (development-agent gated).
48
+
49
+ None.
50
+
51
+ - `?scope=pool` on `GET /machine-maintenance` and `GET /machine-maintenance/lock-state`.
52
+ - Per-machine restart-care lines on the console Machines page.
53
+
54
+ None. This tightens the existing merge safety checks and adds time limits to CI jobs.
55
+
56
+ ## Evidence
57
+
58
+ Unit tests for the preview phrases and the payload; integration test for the route through the real device authenticator (signed device, read token, wrong token, read token refused on history, agent token, unknown message, bad key). Existing push tests updated for the message id.
59
+
60
+ - Unit tests: the new event kind's validator (refuses an app conversation key, a mismatched id, a bad platform id, an empty file list), the replicated wire round trip, the index (a reference for downloads and the store size, never a chat message, appended once, rebuilt from the files), the copy (blob then event, type from the bytes, a duplicate, store full and disk floor refusals that hold nothing), the path replacement, and the Telegram adapter hook (a voice note is handed over while its download still exists; a throwing hook never stops delivery; no hook means no copy).
61
+ - Integration tests through the real device authenticator: a recorded photo and document appear as attachments with no path in the text; a row from before the feature also has no path; the Bearer read is unchanged; a download with `ref=telegram:42` serves the bytes; a hash recorded in another topic, an unknown hash and a bad ref answer 404; a Bearer token cannot download; the same message twice keeps one event; media off answers 503.
62
+ - End-to-end test: an AgentServer on a development agent with a real TelegramAdapter wires the hook; a Telegram photo is recorded on the production path, a phone paired through the production path sees it in the topic's history and downloads it. A fleet agent sets no hook.
63
+
64
+ - Live scan of every dashboard page found one raw topic number, on Plans; on the preview with this change it shows the conversation's name. Unit test covers known and unknown numbers.
65
+
66
+ - Unit tests cover the merge (this machine, an answering peer, a failed peer, an older peer without the route, a dark self, id-shaped names) and every failure reason, and check no address, token or raw error text appears.
67
+ - An integration test serves both routes through the real server with real peer HTTP servers: an answering peer, an older peer (404), a dark peer (503) and a closed port.
68
+ - Console model tests cover per-machine lines and an older server that ignores the pool scope.
69
+
70
+ At 2026-11-03T01:55Z publish run 41559178936 was queued and 41561504298 was pending. The previous check returned `{"state":"active","ids":[41559178936]}`; the fixed check returns `{"state":"active","ids":[41559178936,41561504298]}` against the same live repository. Unit tests cover a pending run, a run seen by both queries, and a failed recent-runs query.
71
+
72
+ - Before: PR #2142 (base `feat/a2a-inbound-id-ledger`) ran no CI suite yet showed mergeStateStatus CLEAN; PR #2202 was merged branch-to-branch on 2026-10-19. A unit shard on PR 2141 ran 6h00m before failing.
73
+ - After: `tests/integration/safe-merge-non-main-base.test.ts` runs the real script with a fake `gh`: a stacked PR is refused on `--auto` and `--admin` with no merge call; a main PR passes the base check. `tests/unit/ci-workflow-timeouts.test.ts` fails if any ci.yml job lacks a timeout.
@@ -0,0 +1,11 @@
1
+ # Reply notifications show what I said (plain-English overview)
2
+
3
+ When I answer you in a conversation inside the Instar iPhone app, your phone gets a notification. Until now it only ever said "New reply", so you had to open the app to see whether it mattered.
4
+
5
+ Notifications travel through Apple's servers, and we never put your conversations through Apple. So the notification still leaves here saying only "New reply", plus a reference number for the message. When it reaches your phone, a small piece of the app (the notification extension) asks me directly, using a read-only key stored on the phone, for a short preview of that one message, and swaps it in before you see the notification.
6
+
7
+ The preview is the first 100 characters of my reply, or a short phrase like "sent a photo" or "sent a file: report.pdf", followed by the start of any caption. If the phone can't reach me in time, or the message isn't on the machine it asked yet, the notification just stays "New reply".
8
+
9
+ The read-only key can fetch these previews and the titles of Attention items, nothing else: it can't read your conversation history or send anything. This is the server half; the phone half ships in the next app build.
10
+
11
+ The phone also asks with its own signed request (not only the read-only key) when the app is open.
@@ -0,0 +1,57 @@
1
+ # Side-Effects Review — reply notification preview
2
+
3
+ **Version / slug:** `app-reply-push-preview`
4
+ **Date:** `2026-11-02`
5
+ **Author:** `Echo`
6
+ **Second-pass reviewer:** `independent reviewer subagent (see below)`
7
+
8
+ ## Summary of the change
9
+
10
+ Chat-media spec §4.11 (increment 4): the iPhone notification extension fetches a short preview of an agent reply from the agent.
11
+
12
+ 1. `src/core/appMediaTypes.ts`: `pushPreviewBody(attachments, text)`.
13
+ 2. `src/core/MobilePush.ts`: `PushTrigger.messageId`; `onAppReply` sets it; the reply payload's `instar` block carries `messageId` and `machine` (a plain-id pattern check drops anything else). The alert body stays "New reply".
14
+ 3. `src/server/mobilePairingRoutes.ts`: the notification read token's allowlist grows from exactly `GET /mobile/attention/<id>` to also `GET /mobile/chat/app/<uuid>/preview/<id>`; `/mobile/push/notify` carries a valid `messageId` between machines.
15
+ 4. `src/server/mobileConversationRoutes.ts`: the preview route (device, device-notify or the agent token; agent replies only; 404 otherwise).
16
+
17
+ ## Decision-point inventory
18
+
19
+ - Notification read token allowlist — modify — invariant: a fixed list of two exact read paths. Deterministic by design (authentication).
20
+
21
+ ## 1. Over-block
22
+
23
+ A reply not yet replicated to the machine the phone asks gets 404; the phone keeps "New reply" (spec-accepted). The machine in the payload is the one that sent the push, which holds the reply.
24
+
25
+ ## 2. Under-block
26
+
27
+ The read token now reveals the first 100 characters of an agent reply to anything holding that token. It is stored only in the phone's app group, for the notification extension; it is the same token that already reads attention titles, active devices only, rate-limited per device. It opens no history, no send and no other conversation route (tested).
28
+
29
+ ## 3. Level-of-abstraction fit
30
+
31
+ The route sits with the other app conversation routes and reads the existing index (`getMessageEvent`); the phrase builder sits next to the existing `mediaPreview`.
32
+
33
+ ## 4. Signal vs authority compliance
34
+
35
+ No decision about agent behaviour; an authentication allowlist is extended by one exact path. Reference: docs/signal-vs-authority.md.
36
+
37
+ ## 5. Interactions
38
+
39
+ Dedupe keys are unchanged (`app-reply:<messageId>`), so a peer echo still dedupes. Older phones ignore the new payload fields.
40
+
41
+ ## 6. External surfaces
42
+
43
+ APNs payload gains a message id and machine id (opaque identifiers, no content). One new device-readable route.
44
+
45
+ ## 7. Multi-machine posture
46
+
47
+ Proxied-by-owner: the payload names the machine that sent the push, which holds the reply; the phone asks that machine (spec §4.11). No new replicated state.
48
+
49
+ ## 8. Rollback cost
50
+
51
+ Revert. Phones fall back to "New reply". No state.
52
+
53
+ ## Second-pass review
54
+
55
+ Independent reviewer — Concur with the review. The read token reaches only the two anchored GET paths; a messageId from another conversation is refused (lookup is by the conversation's own key); operator messages and deleted conversations 404; messageId is pattern-checked on payload build and on peer notify. Its one note (the payload and notify checks allowed capitals the route refuses) is fixed: all three use the same lowercase pattern.
56
+
57
+ Follow-up: the integration test caught that a signed device request to the preview was refused by the device allowlist; the allowlist now names the preview path for active devices.
@@ -0,0 +1,11 @@
1
+ # Telegram files in the Instar app, explained simply
2
+
3
+ The Instar iPhone app can already show the operator's Telegram conversations with the agent. Until now it could only show the words. When someone sent a photo, a document or a voice note in a Telegram topic, the agent got the file, but the app had no way to show it, and the history it got back even contained the place on the computer where the file was saved, which a phone should never see.
4
+
5
+ This change fixes both. When the "files in app conversations" switch is on, each photo, document or voice note that arrives in a Telegram topic is also copied into the same file store the app already uses for its own conversations. A small record is written that says "message 77 in topic 42 had this file", and that record is copied to the agent's other machines, which then fetch the file itself too. The app can now ask for a topic's history and see the file listed with that message, and download it. It can only download a file through a topic if that file was really recorded in that topic, so a phone cannot go fishing for other files.
6
+
7
+ The copy follows the same safety rules as the files the agent sends back: it is refused if the store is full, if the computer is nearly out of disk space, or if the file is larger than 50 MB. A voice note is copied before the Telegram code deletes its temporary download. If the copy fails for any reason, nothing changes for the agent: it still gets the Telegram message exactly as before, and the problem is reported so someone can look at it.
8
+
9
+ Finally, the phone never sees a file path again. Where the history used to say "[image:/Users/.../photo.jpg]", the phone now sees "[photo]", "[file: report.pdf]" or "[voice note]". The agent's own view of the history is unchanged.
10
+
11
+ If anything goes wrong, turning the switch off stops new copies at the next restart and makes the app's download route unavailable.
@@ -0,0 +1,75 @@
1
+ # Side-Effects Review — Telegram media in the app's history (chat media §4.9, Telegram half)
2
+
3
+ **Version / slug:** `chat-media-telegram-inbound`
4
+ **Date:** `2026-11-02`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not run yet`
7
+ **Tier:** 2 (spec-driven; a new replicated event kind and an inbound handler hook). Size: 9 source files (one new module), 1 extended e2e file, 2 new test files.
8
+
9
+ ## Summary of the change
10
+
11
+ docs/specs/mobile-native-chat-media.md §4.9, third and fourth bullets, Telegram only (Slack is not part of this change).
12
+
13
+ - **New event kind `platform-media`** in `AppConversationStore`: `{eventId, kind, conversationKey: telegram:<topicId> | Slack key, messageId, platformMessageId, attachments, at, machineId}`. `eventId === messageId === derivedEventId('pm', key, platformMessageId)`, so the same platform message appends once. The validator refuses an app conversation key, a mismatched id, a bad platform id and any bad attachment. Indexing adds media references only (the download authorization, the store's size total, pulls); it never adds a messages row, a preview or a delivery state, so browse and the conversation list are unaffected. `platformMessageId` is a replicated known field; peers on an older version refuse the unknown kind (counted), never store it wrongly.
14
+ - **Admission reuse:** `prepareReplyFiles` was split; its open-check, size limits, reservation (disk floor and store cap) and snapshot are now `admitFileSnapshots`, used both by the agent reply path (with its confinement and credential wall, unchanged) and by the new `recordPlatformMedia`, which then sniffs the type, publishes the blob and appends the event (blob before event).
15
+ - **Telegram hook:** `TelegramAdapter.setInboundMediaHook`. The photo and document handlers call it after their download without waiting for it; the voice handler awaits it (at most 30 s) before transcribing, because its download is deleted afterwards. Errors are logged and swallowed. AgentServer sets the hook only when native media is on (`isMobileMediaEnabled`) and the conversation service exists; a failed copy (other than a duplicate) is reported as a degradation.
16
+ - **Download:** `GET /mobile/media/:sha256` accepts `ref=telegram:<topicId>`, authorized by an unpurged media reference in that topic. The app path is unchanged except that the attachment lookup now also resolves `platform-media` (`getMediaAttachments`).
17
+ - **Device history read:** `GET /telegram/topics/:topicId/messages` for a device: each Telegram row whose message id has a `platform-media` event gets `attachments` (the app history shape, with `bytes`); every row's text has `[image:<path>]`, `[document:<path>]`, `[video:<path>]` and `[voice:<path>]` replaced. The conversation list's Telegram preview gets the same replacement. Bearer reads are unchanged.
18
+
19
+ ## Decision-point inventory
20
+
21
+ - Inbound media admission — add — invariant floors reused from the reply path (disk floor, store cap, size cap); no judgment.
22
+ - Download authorization for `telegram:` refs — add — invariant: an unpurged media reference in that exact topic, else 404.
23
+ - Device text path replacement — add — invariant pattern replacement (structure, not content judgment).
24
+
25
+ ---
26
+
27
+ ## 1. Over-block
28
+
29
+ - A Telegram file over 50 MiB, or arriving while the store is full or the disk is low, is not kept for the app (the session still gets it). The app then shows the row without attachments. Intended by §4.7.
30
+ - A hard-linked download is refused by the shared admission check; Telegram downloads are fresh files, so this should not happen.
31
+
32
+ ## 2. Under-block
33
+
34
+ - The download route checks only that the hash is referenced in the named Telegram topic; it does not check that the topic is still mapped on this machine. All paired devices are the operator's (§4.8), so this matches the app path's trust model.
35
+ - The path replacement covers the bracketed tag forms the Telegram handlers write. Free text containing a path (an agent reply quoting one) is not rewritten; that existed before and is out of scope.
36
+
37
+ ## 3. Level-of-abstraction fit
38
+
39
+ The event lives in the existing app conversation store (the spec's chosen store for app-sent platform messages); admission reuses the reply path rather than a third copy; the adapter only exposes a hook and knows nothing about the store.
40
+
41
+ ## 4. Signal vs authority compliance
42
+
43
+ No new authority. The hook is signal-only toward delivery (it can never block or change what the session receives). The download authorization is a structural reference check.
44
+
45
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
46
+
47
+ No judgment points added; all decisions are deterministic floors.
48
+
49
+ ## 5. Interactions
50
+
51
+ - Replication: a `platform-media` event marks its hashes wanted on landing, so peers pull the blob like a `media-message` blob.
52
+ - Purge: `POST /mobile/media/purge` already accepted `telegram:<topicId>` keys; it now has attachments to purge there.
53
+ - Orphan sweep: a blob published without its event (crash between the two) is reclaimed after 7 days, as for reply files.
54
+ - `getMessageEvent` is unchanged; a new `getMediaAttachments` is used by the download route and the pending-delivery resolver.
55
+ - Voice handling waits for the copy (bounded at 30 s) before transcription, so a voice note can reach the session slightly later when the copy is slow.
56
+
57
+ ## 6. External surfaces
58
+
59
+ - iOS app: can read `attachments` on Telegram history rows and download with `ref=telegram:<topicId>`; the app needs an update to show them.
60
+ - Bearer API callers: no change.
61
+
62
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
63
+
64
+ - `platform-media` events: **replicated** through the existing `appConversations` kind; blobs are pulled by every machine like other app media. A Telegram file is recorded on the machine whose adapter downloaded it (the polling machine).
65
+ - An older peer refuses the new kind and counts it; nothing is stored wrongly there.
66
+
67
+ ## 8. Rollback cost
68
+
69
+ Switch `mobilePairing.native.media.enabled` off: the hook is not set at the next boot and the download route answers 503. Reverting the PR leaves `platform-media` lines in conversation files; an older version skips them as invalid events (reported once per line, left in place) and its sweep treats their blobs as orphans after 7 days. No data migration.
70
+
71
+ ---
72
+
73
+ ## Second-pass review
74
+
75
+ Independent reviewer — Concur with the review. A download needs the hash recorded in the named conversation; every device-facing history read (local and pool) and the list preview strip server paths; the replicated validator binds the event id to the message id and a platform key; photo and document copies never block delivery, the voice copy waits at most 30 s and releases everything on failure, and the copy happens before the download is deleted. Note for a later step: purge and tombstone of `telegram:` conversations (Telegram topics are never deleted through the app today, so no current path leaves files behind).
@@ -0,0 +1,5 @@
1
+ # Plans names conversations instead of showing their numbers
2
+
3
+ Every conversation with the agent has an internal number, and also a name such as "Instar Virtual Machine". The dashboard's rule is to show names, never numbers. One place still broke it: the "In the way" list on the Plans page shows the first line of a message the agent wrote, and sometimes that message mentions a conversation by its number, like "Request from topic 136110". The operator cannot tell what that is without looking it up.
4
+
5
+ Now, when such a line mentions "topic" followed by a number, the page swaps in that conversation's name, in quotes, if it knows the name. The Plans page already loads the names of all conversations for other parts of the page, so nothing new is fetched. If a number is not one the page knows, it is left as it was rather than guessed. Nothing else on the page changes.
@@ -0,0 +1,34 @@
1
+ # Side-effects review: "In the way" rows name the conversation, not its topic number
2
+
3
+ ## Change
4
+ `dashboard/console/plans-model.js`: `blockerText(raw, topicNames)` replaces `topic <number>` (or `topic #<number>`) in a row's text with the conversation's name in quotes when the Plans page's topic-name map knows it; an unknown number is left as written. `blockerRow` and `buildInTheWay` pass the map through; `buildPlansPage` supplies `opts.topicNames` (already loaded by `plans.js`).
5
+
6
+ ## Evidence
7
+ On 1.3.1612 (2026-11-02 17:50) the raw-id scan of every console page found one hit: Plans "In the way" row "Request from topic 136110 (cloud server test…)". Topic 136110 is "Instar Virtual Machine" in the pooled topic list. On the preview with this change the scan finds none.
8
+
9
+ ## 1. Over-block
10
+ None.
11
+
12
+ ## 2. Under-block
13
+ Only the "topic N" phrasing is mapped; other id shapes in free text are untouched.
14
+
15
+ ## 3. Level-of-abstraction fit
16
+ The display layer that already cleans blocker text.
17
+
18
+ ## 4. Signal vs authority
19
+ Display only.
20
+
21
+ ## 5. Interactions
22
+ None.
23
+
24
+ ## 6. External surfaces
25
+ Plans rows.
26
+
27
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
28
+ A row that refers to a conversation shows its name, matching the rule that the console shows names, never ids.
29
+
30
+ ## 7. Multi-machine posture
31
+ Uses the pooled topic-name map Plans already reads.
32
+
33
+ ## 8. Rollback cost
34
+ Revert.
@@ -0,0 +1,107 @@
1
+ # Side-Effects Review — Machine maintenance pool view (CMT-1199)
2
+
3
+ **Version / slug:** `machine-maintenance-pool-view`
4
+ **Date:** `2026-11-02`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required (read-only view; no gate, guard, lifecycle or messaging decision)`
7
+
8
+ ## Summary of the change
9
+
10
+ Adds `?scope=pool` to `GET /machine-maintenance` and `GET /machine-maintenance/lock-state`. A new module, `src/server/machineMaintenancePool.ts`, asks every peer from `resolvePeerUrls()` for its PLAIN route (no recursion) through `poolPeerFetch` (rope-health recording), behind `isPeerUrlAllowedForCredentials`, through the shared `PoolPollCache` when it is wired, with a 2.5 s timeout, a 1 MiB body cap, at most 16 peers in batches of 4, and a 5 s per-part result cache in the route. It merges this machine's answer with the peers', tags each with `machineId` and a verified `machineNickname`, and lists unreadable machines in `pool.failed` with a closed reason set (`offline`, `url-rejected`, `not-enabled`, `route-missing`, `unauthorized`, `http-error`, `too-large`, `invalid-body`, `read-failed`, `peer-unreachable`). The plain routes are unchanged. The console Machines page reads the pool view and shows each machine's care line on its own card. CLAUDE.md awareness section + idempotent migration (sniff `/machine-maintenance?scope=pool`), CapabilityIndex description, release note.
11
+
12
+ Tier 1 (read-only, reversible by revert). Size: 1 new module (~210 lines), route wiring (~50), console model + page (~50), awareness section + migration (~25), 2 new test files + 1 extended. Effort: no spec rounds; one commit attempt planned.
13
+
14
+ ## Decision-point inventory
15
+
16
+ - None added or modified. The failure-reason classification is a label on a read, consumed by nobody as an input to any decision.
17
+
18
+ ---
19
+
20
+ ## 1. Over-block
21
+
22
+ No block/allow surface. The plain routes keep their 503-when-dark behavior; the pool scope always answers 200.
23
+
24
+ ---
25
+
26
+ ## 2. Under-block
27
+
28
+ Not a gate. Known gaps in the view itself, all visible: a peer whose route answers 2xx with a non-maintenance JSON object is shown as its state (the body is data, not validated against the schema); a machine missing from `resolvePeerUrls()` (no known URL) does not appear at all, the same boundary as the other pool views that use this resolver.
29
+
30
+ ---
31
+
32
+ ## 3. Level-of-abstraction fit
33
+
34
+ Same layer and pattern as `/jobs/triage?scope=pool` (`createJobTriagePoolFetcher`: URL guard, `poolPeerFetch`, normalized reasons) and `/jobs?scope=pool` (`PoolPollCache`). The merge is a pure function so it is unit-tested without HTTP.
35
+
36
+ ---
37
+
38
+ ## 4. Signal vs authority compliance
39
+
40
+ - [x] No — this change has no block/allow surface.
41
+
42
+ It is a read. The response says so explicitly (`authority: "none"`, `readOnly: true`, `canRestart: false`, `canStopWork: false`). A peer's own `canRestart` claim is carried as data inside `state` and never lifted to the view.
43
+
44
+ ---
45
+
46
+ ## 4b. Judgment-point check (Judgment Within Floors standard)
47
+
48
+ No new static heuristic at a competing-signals decision point. The status→reason map is a label, not a decision.
49
+
50
+ ---
51
+
52
+ ## 5. Interactions
53
+
54
+ - **Shadowing:** the new branch runs only when `scope=pool`; the plain route path is byte-identical.
55
+ - **Double-fire:** none; no side effects.
56
+ - **Races:** the per-part cache is per route-module instance; concurrent cold reads may both fan out (bounded, read-only).
57
+ - **Feedback loops:** peers are asked for the plain route, so a pool read never triggers another pool read. `PoolPollCache` keys include the route path, so a status read and a lock read do not share a cache entry.
58
+ - Rope health: peer dials record rope outcomes through `poolPeerFetch`, like every other pool read.
59
+
60
+ ---
61
+
62
+ ## 6. External surfaces
63
+
64
+ - Other machines of the same agent receive at most one plain GET per part per 5 s per reader (or per poll-cache interval when the shared cache is on).
65
+ - No persistent state, no external service, no messages.
66
+ - Operator surface: the console Machines page (read-only); no operator action added.
67
+
68
+ ---
69
+
70
+ ## 6b. Operator-surface quality (Operator-Surface Quality standard)
71
+
72
+ 1. **Leads with the primary action?** The page is a status page; the machine cards stay first, each now carrying its own "Restart care: …" line. No action is added.
73
+ 2. **Zero raw internals as primary content?** Yes. Lines read "Up 9 days · practice run: would have waited a night"; failures read "Mama PC: can't tell, on an older version". Machine ids and reason codes are not shown; a machine with no verified name shows "a machine with no name yet".
74
+ 3. **Destructive actions de-emphasized?** None exist on this surface.
75
+ 4. **Plain language + phone width?** Lines reuse the existing `mc-evidence` card style (wraps, no table, no horizontal scroll); the summary uses the existing `note` block.
76
+
77
+ ---
78
+
79
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
80
+
81
+ **proxied-on-read** — the maintenance state is machine-local by design (each machine's uptime, holds and lock are physical facts of that machine); the pool question is now answered by `?scope=pool`. No notices, no durable state, no generated URLs.
82
+
83
+ ---
84
+
85
+ ## 8. Rollback cost
86
+
87
+ Pure code change — revert and ship a patch. No persistent state. The CLAUDE.md section left on updated agents would describe a scope the server then ignores (an older-style answer); harmless, and the console already treats an answer without `machines` as this machine only.
88
+
89
+ ---
90
+
91
+ ## Conclusion
92
+
93
+ A read-only, machine-tagged pool view built from the existing fan-out pieces. Clear to ship.
94
+
95
+ ---
96
+
97
+ ## Second-pass review (if required)
98
+
99
+ Not required: no gate, sentinel, watchdog, lifecycle, messaging or trust decision is touched.
100
+
101
+ ---
102
+
103
+ ## Evidence pointers
104
+
105
+ - `tests/unit/machine-maintenance-pool.test.ts`
106
+ - `tests/integration/machine-maintenance-pool-route.test.ts`
107
+ - `tests/unit/console-machines.test.ts` (machineCarePool)
@@ -0,0 +1,60 @@
1
+ # Side-Effects Review — Local release counts pending publish runs
2
+
3
+ **Version / slug:** `release-local-pending-runs`
4
+ **Date:** 2026-11-03
5
+ **Author:** Echo
6
+ **Second-pass reviewer:** independent subagent review (see below)
7
+
8
+ ## Summary of the change
9
+
10
+ `activePublishRuns` in `scripts/lib/release-local-steps.mjs` adds one unfiltered `gh run list --workflow publish.yml --limit 100` query and counts every run whose status is not `completed`, deduplicated with the existing per-status results. This closes a gap where a run in GitHub's `pending` state (waiting behind another run in `concurrency: publish`) was invisible, so cancelling only the reported queued run would admit the pending one to race a local publish. Tier 1: one function, 2 files of code (about 5 lines of source, 25 of test); spec-driven by the approved `docs/specs/local-release.md`, which already requires refusing while "any publish.yml run on the repo is unfinished". Effort: one build, one targeted test run (95/95), a live before/after check.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - Local release preflight and pre-publish publish.yml check — modified: the set of runs counted as active grows; the stop/proceed rule (`ciGateAction`) is unchanged.
15
+
16
+ ## 1. Over-block
17
+
18
+ A run in an unfinished state that cannot actually publish (for example a stuck `pending` run that will be superseded) now stops a local release until it is cancelled. That is the intended conservative direction: the spec says unfinished runs block, and cancelling a not-started run is cheap.
19
+
20
+ ## 2. Under-block
21
+
22
+ A pending run older than the 100 most recent publish runs would still be missed by the new query. Publish concurrency allows only one pending run, and it is always among the newest, so this is not reachable in practice. A run created after the final check but before the npm publish still races; that window existed before and is unchanged.
23
+
24
+ ## 3. Level-of-abstraction fit
25
+
26
+ Correct layer: the single function both checks (preflight and pre-publish) call. No other caller.
27
+
28
+ ## 4. Signal vs authority compliance
29
+
30
+ Deterministic safety floor on an irreversible action (npm publish). It widens what counts as an existing exact fact (an unfinished run), adds no brittle detector, and an unknown answer stays a stop. See [signal vs authority](../../docs/signal-vs-authority.md).
31
+
32
+ ## 4b. Judgment-point check
33
+
34
+ None. Run status is an exact field.
35
+
36
+ ## 5. Interactions
37
+
38
+ `ciRunState` already treated any non-`completed` status as active; the new query reuses it. The test asserting one query per active status now filters to status queries and asserts exactly one unfiltered query. One extra GitHub API call per check.
39
+
40
+ ## 6. External surfaces
41
+
42
+ Read-only GitHub queries only. The operator-visible change is that the refusal message lists the pending run id too.
43
+
44
+ ## 6b. Operator-surface quality
45
+
46
+ The refusal message and its cancel instruction now name every run that must be cancelled, instead of one that leads to a second surprise.
47
+
48
+ ## 7. Multi-machine posture
49
+
50
+ Machine-local by design: whichever workstation runs the release queries the shared GitHub authority directly.
51
+
52
+ ## 8. Rollback cost
53
+
54
+ Revert the commit. No state, no migration.
55
+
56
+ ## Second-pass review
57
+
58
+ (appended below)
59
+
60
+ Concur with the review. Independent reviewer (separate subagent, read-only, live `gh run list` check, 2026-11-03T01:56Z): the pending/queued pair was confirmed live; duplicates are listed once; a failed or unreadable recent-runs query yields unknown, never clear; under `concurrency: publish` with `cancel-in-progress: false` at most one run is pending and it is always among the newest, so the 100-run window cannot miss it; only `completed` runs are excluded, so nothing is wrongly blocked; no existing safety property is weakened; the tests exercise the new query directly.