aicodeman 1.44.0 → 1.45.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.
Files changed (211) hide show
  1. package/README.md +6 -2
  2. package/dist/case-rename.d.ts +65 -0
  3. package/dist/case-rename.d.ts.map +1 -0
  4. package/dist/case-rename.js +198 -0
  5. package/dist/case-rename.js.map +1 -0
  6. package/dist/cli-agent.d.ts +60 -1
  7. package/dist/cli-agent.d.ts.map +1 -1
  8. package/dist/cli-agent.js +225 -13
  9. package/dist/cli-agent.js.map +1 -1
  10. package/dist/config/auth-config.d.ts +16 -1
  11. package/dist/config/auth-config.d.ts.map +1 -1
  12. package/dist/config/auth-config.js +16 -1
  13. package/dist/config/auth-config.js.map +1 -1
  14. package/dist/host-sensors.d.ts +115 -0
  15. package/dist/host-sensors.d.ts.map +1 -0
  16. package/dist/host-sensors.js +457 -0
  17. package/dist/host-sensors.js.map +1 -0
  18. package/dist/remote-hosts.d.ts +7 -0
  19. package/dist/remote-hosts.d.ts.map +1 -1
  20. package/dist/remote-hosts.js +17 -3
  21. package/dist/remote-hosts.js.map +1 -1
  22. package/dist/remote-pane-history.d.ts.map +1 -1
  23. package/dist/remote-pane-history.js +2 -2
  24. package/dist/remote-pane-history.js.map +1 -1
  25. package/dist/session.d.ts.map +1 -1
  26. package/dist/session.js +13 -0
  27. package/dist/session.js.map +1 -1
  28. package/dist/tmux-manager.d.ts +7 -3
  29. package/dist/tmux-manager.d.ts.map +1 -1
  30. package/dist/tmux-manager.js +47 -15
  31. package/dist/tmux-manager.js.map +1 -1
  32. package/dist/tmux-prefix-table.d.ts +37 -5
  33. package/dist/tmux-prefix-table.d.ts.map +1 -1
  34. package/dist/tmux-prefix-table.js +40 -5
  35. package/dist/tmux-prefix-table.js.map +1 -1
  36. package/dist/tui/tui-app.d.ts +8 -1
  37. package/dist/tui/tui-app.d.ts.map +1 -1
  38. package/dist/tui/tui-app.js +49 -12
  39. package/dist/tui/tui-app.js.map +1 -1
  40. package/dist/tui/tui-client.d.ts +90 -3
  41. package/dist/tui/tui-client.d.ts.map +1 -1
  42. package/dist/tui/tui-client.js +195 -26
  43. package/dist/tui/tui-client.js.map +1 -1
  44. package/dist/web/agent-inbox-persistence.d.ts +52 -0
  45. package/dist/web/agent-inbox-persistence.d.ts.map +1 -0
  46. package/dist/web/agent-inbox-persistence.js +139 -0
  47. package/dist/web/agent-inbox-persistence.js.map +1 -0
  48. package/dist/web/agent-inbox.d.ts +140 -0
  49. package/dist/web/agent-inbox.d.ts.map +1 -0
  50. package/dist/web/agent-inbox.js +258 -0
  51. package/dist/web/agent-inbox.js.map +1 -0
  52. package/dist/web/middleware/auth.d.ts +2 -0
  53. package/dist/web/middleware/auth.d.ts.map +1 -1
  54. package/dist/web/middleware/auth.js +145 -52
  55. package/dist/web/middleware/auth.js.map +1 -1
  56. package/dist/web/public/admin-ui.js.gz +0 -0
  57. package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
  58. package/dist/web/public/app.42d0abae.js +43 -0
  59. package/dist/web/public/app.42d0abae.js.br +0 -0
  60. package/dist/web/public/app.42d0abae.js.gz +0 -0
  61. package/dist/web/public/approvals-ui.js.gz +0 -0
  62. package/dist/web/public/{constants.4866ecc3.js → constants.0b3cdde9.js} +11 -0
  63. package/dist/web/public/constants.0b3cdde9.js.br +0 -0
  64. package/dist/web/public/constants.0b3cdde9.js.gz +0 -0
  65. package/dist/web/public/cron-ui.js.gz +0 -0
  66. package/dist/web/public/entrance-animations.js.gz +0 -0
  67. package/dist/web/public/git-status-ui.js.gz +0 -0
  68. package/dist/web/public/header-divider.eb2d2463.js +1 -0
  69. package/dist/web/public/header-divider.eb2d2463.js.br +0 -0
  70. package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
  71. package/dist/web/public/home-sessions.js.gz +0 -0
  72. package/dist/web/public/host-wake-ui.js.gz +0 -0
  73. package/dist/web/public/i18n.1e68220d.js +2 -0
  74. package/dist/web/public/i18n.1e68220d.js.br +0 -0
  75. package/dist/web/public/i18n.1e68220d.js.gz +0 -0
  76. package/dist/web/public/image-input.941386e7.js.gz +0 -0
  77. package/dist/web/public/index.html +74 -11
  78. package/dist/web/public/index.html.br +0 -0
  79. package/dist/web/public/index.html.gz +0 -0
  80. package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
  81. package/dist/web/public/keyboard-accessory.4e8b20ac.js.gz +0 -0
  82. package/dist/web/public/{mobile-handlers.44adaa07.js → mobile-handlers.1c0cbcd8.js} +4 -2
  83. package/dist/web/public/mobile-handlers.1c0cbcd8.js.br +0 -0
  84. package/dist/web/public/mobile-handlers.1c0cbcd8.js.gz +0 -0
  85. package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
  86. package/dist/web/public/mobile-overview.js.gz +0 -0
  87. package/dist/web/public/mobile.12fb18de.css.gz +0 -0
  88. package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
  89. package/dist/web/public/orchestrator-panel.js.gz +0 -0
  90. package/dist/web/public/{panels-ui.cbb24ba1.js → panels-ui.78c3defb.js} +76 -70
  91. package/dist/web/public/panels-ui.78c3defb.js.br +0 -0
  92. package/dist/web/public/panels-ui.78c3defb.js.gz +0 -0
  93. package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
  94. package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
  95. package/dist/web/public/readmymind-ui.js.gz +0 -0
  96. package/dist/web/public/reboot-restore-ui.js.gz +0 -0
  97. package/dist/web/public/respawn-ui.d7adcf6a.js.gz +0 -0
  98. package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
  99. package/dist/web/public/session-lineage.js.gz +0 -0
  100. package/dist/web/public/{session-ui.9c1f009b.js → session-ui.ea6b1994.js} +28 -26
  101. package/dist/web/public/session-ui.ea6b1994.js.br +0 -0
  102. package/dist/web/public/session-ui.ea6b1994.js.gz +0 -0
  103. package/dist/web/public/{settings-ui.fea9ddae.js → settings-ui.085dd202.js} +3 -3
  104. package/dist/web/public/settings-ui.085dd202.js.br +0 -0
  105. package/dist/web/public/settings-ui.085dd202.js.gz +0 -0
  106. package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
  107. package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
  108. package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
  109. package/dist/web/public/styles.3b59b41d.css +1 -0
  110. package/dist/web/public/styles.3b59b41d.css.br +0 -0
  111. package/dist/web/public/styles.3b59b41d.css.gz +0 -0
  112. package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
  113. package/dist/web/public/sw.js +2 -2
  114. package/dist/web/public/sw.js.br +0 -0
  115. package/dist/web/public/sw.js.gz +0 -0
  116. package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
  117. package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
  118. package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
  119. package/dist/web/public/terminal-split.js.gz +0 -0
  120. package/dist/web/public/terminal-tile.js +8 -1
  121. package/dist/web/public/terminal-tile.js.br +0 -0
  122. package/dist/web/public/terminal-tile.js.gz +0 -0
  123. package/dist/web/public/terminal-ui.fb2a27f5.js +2 -0
  124. package/dist/web/public/terminal-ui.fb2a27f5.js.br +0 -0
  125. package/dist/web/public/terminal-ui.fb2a27f5.js.gz +0 -0
  126. package/dist/web/public/tile-grid.js.gz +0 -0
  127. package/dist/web/public/ultracode-panel.js.gz +0 -0
  128. package/dist/web/public/ultracode-windows.js.gz +0 -0
  129. package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
  130. package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
  131. package/dist/web/public/vendor/fflate.min.js.gz +0 -0
  132. package/dist/web/public/vendor/marked.min.js.gz +0 -0
  133. package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
  134. package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
  135. package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
  136. package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
  137. package/dist/web/public/vendor/xterm-predictive-echo.ae5e3d5d.js.gz +0 -0
  138. package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.js.gz +0 -0
  139. package/dist/web/public/vendor/xterm.css.gz +0 -0
  140. package/dist/web/public/vendor/xterm.min.js.gz +0 -0
  141. package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
  142. package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
  143. package/dist/web/public/webview-tabs.js.gz +0 -0
  144. package/dist/web/public/whats-new.json +9 -9
  145. package/dist/web/route-helpers.d.ts +57 -6
  146. package/dist/web/route-helpers.d.ts.map +1 -1
  147. package/dist/web/route-helpers.js +72 -4
  148. package/dist/web/route-helpers.js.map +1 -1
  149. package/dist/web/routes/case-routes.d.ts.map +1 -1
  150. package/dist/web/routes/case-routes.js +183 -2
  151. package/dist/web/routes/case-routes.js.map +1 -1
  152. package/dist/web/routes/inbox-routes.d.ts +43 -0
  153. package/dist/web/routes/inbox-routes.d.ts.map +1 -0
  154. package/dist/web/routes/inbox-routes.js +148 -0
  155. package/dist/web/routes/inbox-routes.js.map +1 -0
  156. package/dist/web/routes/index.d.ts +1 -0
  157. package/dist/web/routes/index.d.ts.map +1 -1
  158. package/dist/web/routes/index.js +1 -0
  159. package/dist/web/routes/index.js.map +1 -1
  160. package/dist/web/routes/session-routes.d.ts.map +1 -1
  161. package/dist/web/routes/session-routes.js +25 -47
  162. package/dist/web/routes/session-routes.js.map +1 -1
  163. package/dist/web/routes/system-routes.d.ts.map +1 -1
  164. package/dist/web/routes/system-routes.js +23 -2
  165. package/dist/web/routes/system-routes.js.map +1 -1
  166. package/dist/web/schemas.d.ts +26 -0
  167. package/dist/web/schemas.d.ts.map +1 -1
  168. package/dist/web/schemas.js +48 -0
  169. package/dist/web/schemas.js.map +1 -1
  170. package/dist/web/sensitive-path.d.ts.map +1 -1
  171. package/dist/web/sensitive-path.js +2 -0
  172. package/dist/web/sensitive-path.js.map +1 -1
  173. package/dist/web/server.d.ts +2 -0
  174. package/dist/web/server.d.ts.map +1 -1
  175. package/dist/web/server.js +61 -3
  176. package/dist/web/server.js.map +1 -1
  177. package/dist/web/session-wait-registry.d.ts +48 -4
  178. package/dist/web/session-wait-registry.d.ts.map +1 -1
  179. package/dist/web/session-wait-registry.js +144 -6
  180. package/dist/web/session-wait-registry.js.map +1 -1
  181. package/dist/web/sse-events.d.ts +4 -1
  182. package/dist/web/sse-events.d.ts.map +1 -1
  183. package/dist/web/sse-events.js +4 -1
  184. package/dist/web/sse-events.js.map +1 -1
  185. package/package.json +1 -1
  186. package/skills/codeman/SKILL.md +7 -4
  187. package/skills/codeman/preamble.sh +3 -3
  188. package/skills/codeman/reference/endpoints.md +24 -3
  189. package/skills/codeman/reference/verbs.md +47 -0
  190. package/dist/web/public/app.9314ee60.js +0 -43
  191. package/dist/web/public/app.9314ee60.js.br +0 -0
  192. package/dist/web/public/app.9314ee60.js.gz +0 -0
  193. package/dist/web/public/constants.4866ecc3.js.br +0 -0
  194. package/dist/web/public/constants.4866ecc3.js.gz +0 -0
  195. package/dist/web/public/i18n.22ca902b.js +0 -2
  196. package/dist/web/public/i18n.22ca902b.js.br +0 -0
  197. package/dist/web/public/i18n.22ca902b.js.gz +0 -0
  198. package/dist/web/public/mobile-handlers.44adaa07.js.br +0 -0
  199. package/dist/web/public/mobile-handlers.44adaa07.js.gz +0 -0
  200. package/dist/web/public/panels-ui.cbb24ba1.js.br +0 -0
  201. package/dist/web/public/panels-ui.cbb24ba1.js.gz +0 -0
  202. package/dist/web/public/session-ui.9c1f009b.js.br +0 -0
  203. package/dist/web/public/session-ui.9c1f009b.js.gz +0 -0
  204. package/dist/web/public/settings-ui.fea9ddae.js.br +0 -0
  205. package/dist/web/public/settings-ui.fea9ddae.js.gz +0 -0
  206. package/dist/web/public/styles.e096fcd6.css +0 -1
  207. package/dist/web/public/styles.e096fcd6.css.br +0 -0
  208. package/dist/web/public/styles.e096fcd6.css.gz +0 -0
  209. package/dist/web/public/terminal-ui.68dbd352.js +0 -2
  210. package/dist/web/public/terminal-ui.68dbd352.js.br +0 -0
  211. package/dist/web/public/terminal-ui.68dbd352.js.gz +0 -0
@@ -18,9 +18,9 @@ fi
18
18
  AUTH=(); [ -n "${CODEMAN_PASSWORD:-}" ] && AUTH=(-u "${CODEMAN_USERNAME:-admin}:$CODEMAN_PASSWORD")
19
19
  # -k: harmless on http, required on https (self-signed cert).
20
20
  # X-Codeman-Parent-Session: tags workers YOU spawn as your children, so the web UI can
21
- # draw the lineage. Set once here and every present and future create call carries it;
22
- # it is ignored on every other endpoint. Purely cosmetic (see §5.1) and it can never
23
- # fail a spawn, so there is no case where you would want to leave it off.
21
+ # draw the lineage. Set once here and every present and future create call carries it.
22
+ # The agent inbox reads it too, as "who is calling" (§5.15); every other endpoint ignores
23
+ # it. It can never fail a spawn, so there is no case where you would want to leave it off.
24
24
  # X-Codeman-Agent-Origin: marks a case directory a spawn CREATES as agent scratch, so the
25
25
  # user can find and delete it long after your workers are gone (§5.14). Same deal: set
26
26
  # once, cosmetic, never fails a spawn, and it labels only directories Codeman creates.
@@ -35,8 +35,13 @@ only and can never drive a session.
35
35
  with a parse error and `.errorCode` is simply absent (see
36
36
  [symptom 6](#6-jq-parse-error-instead-of-an-errorcode)). Ten failed attempts from one
37
37
  IP then get a plain-text `429 Too Many Requests` with `Retry-After`, decaying over 15
38
- minutes (`AUTH_FAILURE_MAX` = 10, `AUTH_FAILURE_WINDOW_MS` = 15 min). **Never retry a
39
- failing credential in a loop**: you will lock the address out of the login path for
38
+ minutes (`AUTH_FAILURE_MAX` = 10, `AUTH_FAILURE_WINDOW_MS` = 15 min). In multi-user
39
+ mode the per-IP cap is 50 (`AUTH_IP_FAILURE_MAX`) and each account allows 10 failed
40
+ guesses per IP; both are checked before the password, so past either even a correct
41
+ password from that address gets the 429 (for the per-account one, only for that
42
+ account). From the 10th failed guess on, an account's wrong guesses also get the 429
43
+ from every address, but a correct password still logs in. **Never retry a failing
44
+ credential in a loop**: you will lock the address out of the login path for
40
45
  everything, including the user's browser through a tunnel (tunneled traffic arrives as
41
46
  127.0.0.1, so one bucket covers it all).
42
47
 
@@ -608,6 +613,22 @@ Approving a permission dialog on your own is exactly the laundering this skill f
608
613
  can access, which includes the user's own working sessions. An approval belonging to one
609
614
  of those is something you **report**, never something you answer.
610
615
 
616
+ ### Agent inbox: hand a worker text without typing into its pane
617
+
618
+ Stored, not typed: the receiver reads it when it asks. Semantics, CLI form and the
619
+ receiver loop: `verbs.md` §5.15.
620
+
621
+ | Task | Call |
622
+ |------|------|
623
+ | post to a session's inbox | `POST /api/v1/sessions/:id/inbox` body `{"text":"…"}` → `.data.message.{id,from}`; 409 = inbox full, nothing stored |
624
+ | read (yours marks seen, anyone else's is a peek) | `GET /api/v1/sessions/:id/inbox` → `.data.{receiver,pending,unseen,messages[]}` |
625
+ | block until something unseen arrives | `GET /api/v1/sessions/:id/inbox?wait=60000` → `.data.wait.{posted,timedOut,ended}` |
626
+ | remove what you handled (receiver only, idempotent) | `POST /api/v1/sessions/:id/inbox/ack` body `{"ids":["…"]}`; 403 from anyone else |
627
+ | counts per session, never text | `GET /api/v1/agent-inbox/summary` → `.data.sessions[id].{pending,unseen,oldestUnseenAt,parked}` |
628
+
629
+ `from` and "who is the receiver" both come from the `X-Codeman-Parent-Session` header the
630
+ preamble's `CURL` sends, never from the body.
631
+
611
632
  ### The wait primitives
612
633
 
613
634
  Three bounded long-polls. Shared semantics:
@@ -801,7 +822,7 @@ response echoes.
801
822
  | sessions, per user | half the global cap (25 by default) in multi-user mode | the same 409, with a different message |
802
823
  | SSE clients, process-wide | 100 (`MAX_SSE_CLIENTS`) | plain-text `503 Too many SSE connections`; shared with every browser tab |
803
824
  | active bash tools tracked | 20 per session | oldest entries drop off `active-tools` |
804
- | auth failures per IP | 10, decaying over 15 min | plain-text 429 with `Retry-After`; locks out the login path, so never loop a bad credential |
825
+ | auth failures per IP | 10, decaying over 15 min (multi-user: 50 per IP, plus 10 per account per IP) | plain-text 429 with `Retry-After`; locks out the login path, so never loop a bad credential |
805
826
 
806
827
  Case creation is **uncapped**, which is the one place restraint has to come from you:
807
828
  every `quick-start` with a new `caseName` creates a real directory on the user's disk.
@@ -764,3 +764,50 @@ Confirm cleanup with `GET /api/v1/sessions`, never with `/api/v1/sessions/unifie
764
764
  (that one folds in transcript history from the whole machine and will keep showing
765
765
  your worker forever).
766
766
 
767
+ ### 5.15 Agent inbox
768
+
769
+ Every session has an inbox. A message posted there is stored, not typed: the receiver's
770
+ pane is untouched, no turn starts, and the text may span several lines. The receiver
771
+ reads when it is ready. Use it for results a worker hands back, for a follow-up task a
772
+ busy worker should pick up after its current one, and for anything longer than one
773
+ composer line. Use `send` when you want a turn to start now.
774
+
775
+ ```bash
776
+ codeman agent post "$WORKER" "$(cat task.md)" # ONE quoted argument; prints pending/unseen
777
+ codeman agent inbox --wait --timeout 300000 # your own inbox; blocks while nothing is new
778
+ codeman agent ack <id> [<id>…] # remove what you handled, by the full id inbox printed
779
+ codeman agent inbox "$WORKER" # peek at someone else's: marks nothing
780
+ codeman agent ls # INBOX column: pending (new), parked
781
+ ```
782
+
783
+ The same over HTTP: `POST /api/v1/sessions/:id/inbox {"text":…}`, `GET
784
+ /api/v1/sessions/:id/inbox?wait=<ms>`, `POST /api/v1/sessions/:id/inbox/ack {"ids":[…]}`,
785
+ `GET /api/v1/agent-inbox/summary`. The preamble's `CURL` already sends
786
+ `X-Codeman-Parent-Session`, which is how the server knows who you are.
787
+
788
+ Rules that matter:
789
+
790
+ - **Reading removes nothing.** Every read returns every pending message until you ack
791
+ it, so a crash between reading and doing loses nothing. Ack once the work is done,
792
+ not when you have read it: a sender looking at `ls` sees unacked mail as not done.
793
+ - **Only the receiver's own read counts.** Your read of your own inbox marks messages
794
+ seen (`seen: true` on the next read); reading another session's inbox is a peek and
795
+ changes nothing for it. Only the receiver can ack (403 otherwise).
796
+ - **`--wait` waits for something new.** It returns at once when there is unseen mail
797
+ and otherwise blocks until a post arrives; seen but unacked messages come back with it
798
+ and do not end the wait. Timeout is exit 2, and so is a wait the server cut short
799
+ (a restart): loop again. Exit 3 means the session list no longer has the session.
800
+ `--wait` on someone else's inbox returns at once while they have unseen mail (only
801
+ their read clears it); check `ls` instead.
802
+ - **The sender is resolved, not claimed.** `from` is the session the header resolves to,
803
+ or `null` (the user). In single-user mode that is a hint, since every local process
804
+ holds the same credentials. In multi-user mode it is checked against the owner;
805
+ an admin can still act as any session of the receiver's owner.
806
+ - **Full means refused.** 200 messages or 512 KiB per inbox, 16 KiB per message. A full
807
+ inbox answers 409 and stores nothing; the oldest is never dropped. Messages expire 12
808
+ hours after they were posted.
809
+ - **Nobody is woken.** An idle receiver does not look at its inbox by itself, and the
810
+ server never types into its pane. When `ls` shows a worker idle with unread mail and
811
+ not parked, `send` it one line ("read your inbox: `codeman agent inbox`").
812
+ - **Lifetime.** An inbox goes with its session on delete. A server restart empties all
813
+ inboxes unless the user turned on *Keep agent inbox across restarts* in Settings.