@rubytech/create-realagent 1.0.653 → 1.0.655

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 (135) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/cloudflare/references/manual-setup.md +1 -1
  3. package/payload/platform/plugins/cloudflare/scripts/_stream-log.sh +33 -18
  4. package/payload/platform/plugins/cloudflare/scripts/list-cf-domains.ts +6 -3
  5. package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +5 -4
  6. package/payload/server/public/assets/{admin-DLp3geZN.js → admin-CVZaji3A.js} +10 -10
  7. package/payload/server/public/assets/{arc-CRqJUbyK.js → arc-BMhgytDB.js} +1 -1
  8. package/payload/server/public/assets/architecture-YZFGNWBL-S9-oeq_x.js +1 -0
  9. package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-DtICG195.js → architectureDiagram-Q4EWVU46-BePoi8XC.js} +1 -1
  10. package/payload/server/public/assets/{blockDiagram-DXYQGD6D-nw1V7I38.js → blockDiagram-DXYQGD6D-BkiwLTtq.js} +1 -1
  11. package/payload/server/public/assets/{c4Diagram-AHTNJAMY-C1eEC43O.js → c4Diagram-AHTNJAMY-bpjPj2Ln.js} +1 -1
  12. package/payload/server/public/assets/channel-D3U0_a1j.js +1 -0
  13. package/payload/server/public/assets/{chunk-2KRD3SAO-Bybqj-wj.js → chunk-2KRD3SAO-ZcHg_orY.js} +1 -1
  14. package/payload/server/public/assets/{chunk-336JU56O-Dszn2qEY.js → chunk-336JU56O-BpATJiGl.js} +2 -2
  15. package/payload/server/public/assets/chunk-426QAEUC-Wz6Bpsil.js +1 -0
  16. package/payload/server/public/assets/{chunk-4BX2VUAB-DrKtrnWH.js → chunk-4BX2VUAB-zJekz2NU.js} +1 -1
  17. package/payload/server/public/assets/{chunk-4TB4RGXK-CBFzVYqS.js → chunk-4TB4RGXK-CLXL19Wd.js} +1 -1
  18. package/payload/server/public/assets/{chunk-55IACEB6-BNsOFSNf.js → chunk-55IACEB6-CzqB8aoU.js} +1 -1
  19. package/payload/server/public/assets/{chunk-5FUZZQ4R-CXZykYh_.js → chunk-5FUZZQ4R-BoTfWHuW.js} +1 -1
  20. package/payload/server/public/assets/{chunk-5PVQY5BW-CLNppenz.js → chunk-5PVQY5BW-RhIfPCRB.js} +1 -1
  21. package/payload/server/public/assets/{chunk-67CJDMHE-DFyE0-n0.js → chunk-67CJDMHE-mM1sFmlz.js} +1 -1
  22. package/payload/server/public/assets/{chunk-7N4EOEYR-BIKZD1_4.js → chunk-7N4EOEYR-GUck0jv1.js} +1 -1
  23. package/payload/server/public/assets/{chunk-AA7GKIK3-D4_g24le.js → chunk-AA7GKIK3-BYhfUc1V.js} +1 -1
  24. package/payload/server/public/assets/{chunk-BSJP7CBP-Cd9H-V61.js → chunk-BSJP7CBP-CTsYuARh.js} +1 -1
  25. package/payload/server/public/assets/{chunk-CIAEETIT-CAU9PIQi.js → chunk-CIAEETIT-CGsGmUze.js} +1 -1
  26. package/payload/server/public/assets/{chunk-EDXVE4YY-CR1JfOwe.js → chunk-EDXVE4YY-utELKGQK.js} +1 -1
  27. package/payload/server/public/assets/{chunk-ENJZ2VHE-CuXW3Isg.js → chunk-ENJZ2VHE-CNHjq5xK.js} +1 -1
  28. package/payload/server/public/assets/{chunk-FMBD7UC4-BwGAtkIr.js → chunk-FMBD7UC4-DaRrfk3s.js} +1 -1
  29. package/payload/server/public/assets/{chunk-FOC6F5B3-Cn0552qP.js → chunk-FOC6F5B3-BaeLcJVt.js} +1 -1
  30. package/payload/server/public/assets/{chunk-ICPOFSXX-DEZT2XyQ.js → chunk-ICPOFSXX-Di63NBur.js} +2 -2
  31. package/payload/server/public/assets/{chunk-K5T4RW27-KwBFTzJ9.js → chunk-K5T4RW27-CTTOezMH.js} +1 -1
  32. package/payload/server/public/assets/{chunk-KGLVRYIC-1-3y582Z.js → chunk-KGLVRYIC-DCkohKP2.js} +1 -1
  33. package/payload/server/public/assets/{chunk-LIHQZDEY-DXIBsDHL.js → chunk-LIHQZDEY-osQO30uB.js} +1 -1
  34. package/payload/server/public/assets/{chunk-ORNJ4GCN-CRbOike7.js → chunk-ORNJ4GCN-DoLajOOe.js} +1 -1
  35. package/payload/server/public/assets/{chunk-OYMX7WX6-CVT9itnY.js → chunk-OYMX7WX6-BSPzqyxs.js} +1 -1
  36. package/payload/server/public/assets/chunk-QZHKN3VN-BAQp1OEl.js +1 -0
  37. package/payload/server/public/assets/{chunk-U2HBQHQK-BLgNHWFf.js → chunk-U2HBQHQK-BZnA7c4T.js} +1 -1
  38. package/payload/server/public/assets/{chunk-X2U36JSP-DHYLiYqc.js → chunk-X2U36JSP-DpQ2OA_c.js} +1 -1
  39. package/payload/server/public/assets/{chunk-XPW4576I-DBdiQ3Zy.js → chunk-XPW4576I-BccP1mlQ.js} +1 -1
  40. package/payload/server/public/assets/{chunk-YZCP3GAM-DXaosB5Z.js → chunk-YZCP3GAM-BAkNXu0G.js} +1 -1
  41. package/payload/server/public/assets/{chunk-ZZ45TVLE-B5dCmOpH.js → chunk-ZZ45TVLE-DBSm41oP.js} +1 -1
  42. package/payload/server/public/assets/classDiagram-6PBFFD2Q-6EGGLDD_.js +1 -0
  43. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DfAV4tgE.js +1 -0
  44. package/payload/server/public/assets/clone-BoV8noAi.js +1 -0
  45. package/payload/server/public/assets/{cose-bilkent-S5V4N54A-DaHtPQvk.js → cose-bilkent-S5V4N54A-Boeb8aWs.js} +1 -1
  46. package/payload/server/public/assets/{dagre-KV5264BT-CAL9V_HR.js → dagre-KV5264BT-BkvWofSp.js} +1 -1
  47. package/payload/server/public/assets/{dagre-N8C5Xujx.js → dagre-nvPNAunb.js} +1 -1
  48. package/payload/server/public/assets/data-DgI19qYm.js +1 -0
  49. package/payload/server/public/assets/{diagram-5BDNPKRD-pzBSPqlM.js → diagram-5BDNPKRD-CMEgyt4E.js} +1 -1
  50. package/payload/server/public/assets/{diagram-G4DWMVQ6-DStdLqos.js → diagram-G4DWMVQ6-ChorrAF0.js} +1 -1
  51. package/payload/server/public/assets/{diagram-MMDJMWI5-D-SfeX-6.js → diagram-MMDJMWI5-D_iD27po.js} +1 -1
  52. package/payload/server/public/assets/{diagram-TYMM5635-Cdr1DQ84.js → diagram-TYMM5635-8qXI1ioG.js} +1 -1
  53. package/payload/server/public/assets/{erDiagram-SMLLAGMA-CIg1dDZT.js → erDiagram-SMLLAGMA-BFjtKDSB.js} +1 -1
  54. package/payload/server/public/assets/{file-Buaz89w8.js → file-J1JpJF4E.js} +1 -1
  55. package/payload/server/public/assets/{flatten-CpKIi5d2.js → flatten-ya0TqRLc.js} +1 -1
  56. package/payload/server/public/assets/{flowDiagram-DWJPFMVM-CJtU1T6d.js → flowDiagram-DWJPFMVM-Bpd7IL9l.js} +1 -1
  57. package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-R4fuRAT1.js → ganttDiagram-T4ZO3ILL-CwOozU85.js} +1 -1
  58. package/payload/server/public/assets/gitGraph-7Q5UKJZL-BOC4CldZ.js +1 -0
  59. package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-sifugSGn.js → gitGraphDiagram-UUTBAWPF-CcPILiC9.js} +1 -1
  60. package/payload/server/public/assets/{graph-B_TxtKJP.js → graph-CFwxUVS0.js} +19 -19
  61. package/payload/server/public/assets/{graphlib-DrlxPM8j.js → graphlib-B_mcXEVr.js} +1 -1
  62. package/payload/server/public/assets/{house-B5wS-2kc.js → house-Dche6_m0.js} +1 -1
  63. package/payload/server/public/assets/info-OMHHGYJF-BSCPTUIx.js +1 -0
  64. package/payload/server/public/assets/infoDiagram-42DDH7IO-T2sn--WJ.js +2 -0
  65. package/payload/server/public/assets/{isEmpty-C3Vxk1It.js → isEmpty-h-wRi_o9.js} +1 -1
  66. package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-CYUJOA2c.js → ishikawaDiagram-UXIWVN3A-DOP9-Q8H.js} +1 -1
  67. package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-UltrLajs.js → journeyDiagram-VCZTEJTY-DGATg0WC.js} +1 -1
  68. package/payload/server/public/assets/{jsx-runtime-WYScGBOd.js → jsx-runtime-BE1CBORz.js} +1 -1
  69. package/payload/server/public/assets/{jsx-runtime-ChVPhhAG.css → jsx-runtime-C7zbe_Pq.css} +1 -1
  70. package/payload/server/public/assets/{kanban-definition-6JOO6SKY-BBaThtP3.js → kanban-definition-6JOO6SKY-C5PigmKg.js} +1 -1
  71. package/payload/server/public/assets/{line-BhOwLD_o.js → line-DlKKhwkO.js} +1 -1
  72. package/payload/server/public/assets/{linear-D76hoLvZ.js → linear-DD4JiB1l.js} +1 -1
  73. package/payload/server/public/assets/{mermaid-parser.core-D8n5xV7A.js → mermaid-parser.core-C8xGCa9p.js} +2 -2
  74. package/payload/server/public/assets/{mermaid.core-C3TZA9fX.js → mermaid.core-CCUSwZB_.js} +3 -3
  75. package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-Bv1kghvk.js → mindmap-definition-QFDTVHPH-75k-IVhC.js} +1 -1
  76. package/payload/server/public/assets/{ordinal-BLrOss5K.js → ordinal-Dwxksj1B.js} +1 -1
  77. package/payload/server/public/assets/packet-4T2RLAQJ-pBa_ZhNI.js +1 -0
  78. package/payload/server/public/assets/pie-ZZUOXDRM-BzYOyiMb.js +1 -0
  79. package/payload/server/public/assets/{pieDiagram-DEJITSTG-BSYldcKa.js → pieDiagram-DEJITSTG-DN5RsDwZ.js} +1 -1
  80. package/payload/server/public/assets/public-LhnMTdDE.js +5 -0
  81. package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-lCDshgz1.js → quadrantDiagram-34T5L4WZ-Sd9x6pNe.js} +1 -1
  82. package/payload/server/public/assets/radar-PYXPWWZC-CTVOaAq6.js +1 -0
  83. package/payload/server/public/assets/{reduce-C5tBOlxC.js → reduce-BUuWaDl2.js} +1 -1
  84. package/payload/server/public/assets/{requirementDiagram-MS252O5E-C7j42RrO.js → requirementDiagram-MS252O5E-BDgifYzj.js} +1 -1
  85. package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-plPbHhuF.js → sankeyDiagram-XADWPNL6-BX9VULNJ.js} +1 -1
  86. package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-D3Y8MXiX.js → sequenceDiagram-FGHM5R23-z3vMxhgE.js} +1 -1
  87. package/payload/server/public/assets/{share-2-Z5v9aWZ2.js → share-2-6hJtFYgM.js} +1 -1
  88. package/payload/server/public/assets/{stateDiagram-FHFEXIEX-D4BdhMPy.js → stateDiagram-FHFEXIEX-DlP0hBxF.js} +1 -1
  89. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-DSddQStC.js +1 -0
  90. package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-Lh9jrYCl.js → timeline-definition-GMOUNBTQ-DwQbhKCo.js} +1 -1
  91. package/payload/server/public/assets/treeView-SZITEDCU-OTnF4Qzw.js +1 -0
  92. package/payload/server/public/assets/treemap-W4RFUUIX-DlIRmHFb.js +1 -0
  93. package/payload/server/public/assets/{useVoiceRecorder-CgMo3FDt.js → useVoiceRecorder-PUde6itK.js} +4 -4
  94. package/payload/server/public/assets/{vennDiagram-DHZGUBPP-Cx0v19iv.js → vennDiagram-DHZGUBPP-WTqmZWWa.js} +1 -1
  95. package/payload/server/public/assets/wardley-RL74JXVD-DwMXAC4U.js +1 -0
  96. package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-BYewCTre.js → wardleyDiagram-NUSXRM2D-BUY50x5T.js} +1 -1
  97. package/payload/server/public/assets/x-DmqRGGHj.js +1 -0
  98. package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-CkfIdbJu.js → xychartDiagram-5P7HB3ND-Btdq-fDj.js} +1 -1
  99. package/payload/server/public/data.html +6 -7
  100. package/payload/server/public/graph.html +6 -6
  101. package/payload/server/public/index.html +8 -9
  102. package/payload/server/public/public.html +5 -6
  103. package/payload/server/server.js +402 -104
  104. package/payload/server/public/assets/architecture-YZFGNWBL-CXIHKKCa.js +0 -1
  105. package/payload/server/public/assets/channel-CA7njeKl.js +0 -1
  106. package/payload/server/public/assets/chunk-426QAEUC-tWQOa3-I.js +0 -1
  107. package/payload/server/public/assets/chunk-QZHKN3VN-BwkFBCAY.js +0 -1
  108. package/payload/server/public/assets/classDiagram-6PBFFD2Q-CUZ9BU_6.js +0 -1
  109. package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BGYsCDux.js +0 -1
  110. package/payload/server/public/assets/clone-BjouONkW.js +0 -1
  111. package/payload/server/public/assets/data-DPqrIvgB.js +0 -1
  112. package/payload/server/public/assets/gitGraph-7Q5UKJZL-tvzbaNdg.js +0 -1
  113. package/payload/server/public/assets/info-OMHHGYJF-ByeBaFw5.js +0 -1
  114. package/payload/server/public/assets/infoDiagram-42DDH7IO-CjgCxerY.js +0 -2
  115. package/payload/server/public/assets/packet-4T2RLAQJ-Csybj5RO.js +0 -1
  116. package/payload/server/public/assets/pie-ZZUOXDRM-Iw1du1Bn.js +0 -1
  117. package/payload/server/public/assets/public-BNEciseE.js +0 -5
  118. package/payload/server/public/assets/radar-PYXPWWZC-rEet4TBV.js +0 -1
  119. package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-DhKxVkX3.js +0 -1
  120. package/payload/server/public/assets/trash-2-BaLFnigq.js +0 -1
  121. package/payload/server/public/assets/treeView-SZITEDCU-PaLYyjtc.js +0 -1
  122. package/payload/server/public/assets/treemap-W4RFUUIX-CEhGYFbO.js +0 -1
  123. package/payload/server/public/assets/wardley-RL74JXVD-xtJ4_o4d.js +0 -1
  124. package/payload/server/public/assets/x-DYxtrMFK.js +0 -1
  125. /package/payload/server/public/assets/{_baseFor-WfS9pKAn.js → _baseFor-Dn4GSmI6.js} +0 -0
  126. /package/payload/server/public/assets/{array-HeX70jSN.js → array-DJN9YAVf.js} +0 -0
  127. /package/payload/server/public/assets/{cytoscape.esm-CDZo0kst.js → cytoscape.esm-BcJTl1re.js} +0 -0
  128. /package/payload/server/public/assets/{defaultLocale-GJwWH1Jr.js → defaultLocale-B4F_XsBB.js} +0 -0
  129. /package/payload/server/public/assets/{dist-BKbAaes5.js → dist-CrzV1W3-.js} +0 -0
  130. /package/payload/server/public/assets/{init-BPLPMQ3Y.js → init-DX0Y1qU4.js} +0 -0
  131. /package/payload/server/public/assets/{katex-CKZ-HWMQ.js → katex-CjHJ1D7d.js} +0 -0
  132. /package/payload/server/public/assets/{path-YdFzr2W6.js → path-7vUsG-o2.js} +0 -0
  133. /package/payload/server/public/assets/{preload-helper-BEFjQwLd.js → preload-helper-qlgyTAkD.js} +0 -0
  134. /package/payload/server/public/assets/{rough.esm-HAx67Hnb.js → rough.esm-NLRoWnq-.js} +0 -0
  135. /package/payload/server/public/assets/{src-BvrHnOMG.js → src-Bo15iQ7w.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-realagent",
3
- "version": "1.0.653",
3
+ "version": "1.0.655",
4
4
  "description": "Install Real Agent — Built for agents. By agents.",
5
5
  "bin": {
6
6
  "create-realagent": "./dist/index.js"
@@ -318,7 +318,7 @@ systemd-run --user --unit=maxy-tunnel-restart-<nonce>.service --on-active=3s --c
318
318
  /bin/systemctl --user restart "${BRAND}.service"
319
319
  ```
320
320
 
321
- The script then emits `[setup-tunnel] step=service-restart-dispatched` and `step=service-restart-armed exit=0` in the per-conversation stream log so operators see exactly when the restart was scheduled, exits 0, and the transient timer fires from outside the service's cgroup — semantically identical to this manual runbook's `systemctl --user restart`.
321
+ The script then emits `[script:setup-tunnel] step=service-restart-dispatched` and `step=service-restart-armed exit=0` in the per-conversation stream log so operators see exactly when the restart was scheduled, exits 0, and the transient timer fires from outside the service's cgroup — semantically identical to this manual runbook's `systemctl --user restart`. (The `script:` prefix is Task 605's chat-surface namespace — see `_stream-log.sh` header.)
322
322
 
323
323
  When walking through manually you do **not** need `systemd-run` — your SSH shell already lives in a separate user-scope cgroup (`user@<uid>.service`), so the direct `systemctl restart` does not kill the caller. The script's extra indirection only matters when the caller *is* the service being restarted.
324
324
 
@@ -7,27 +7,38 @@
7
7
  # per-conversation file the chat UI's server-side tailer reads.
8
8
  #
9
9
  # Contract (read by platform/ui/app/lib/script-stream-tailer.ts tailer and
10
- # .docs/platform.md):
11
- # [<ISO-ts>] [<scope>] <kv …>
12
- # [<ISO-ts>] [<scope>:<subprocess-tag>] <raw line>
13
- # Canonical regex — SCRIPT_STREAM_RE at platform/ui/app/lib/script-stream-tailer.ts:51:
14
- # ^\[([^\]]+)\] \[([a-z][a-z0-9-]*)((?::[a-z0-9:_-]+)?)\] (.*)$
10
+ # .docs/web-chat.md):
11
+ # [<ISO-ts>] [script:<scope>] <kv …>
12
+ # [<ISO-ts>] [script:<scope>:<subprocess-tag>] <raw line>
13
+ # Canonical regex — SCRIPT_STREAM_RE at platform/ui/app/lib/script-stream-tailer.ts:
14
+ # ^\[([^\]]+)\] \[script:([a-z][a-z0-9-]*)((?::[a-z0-9:_-]+)?)\] (.*)$
15
+ # The literal `script:` prefix is the chat-surface namespace (Task 605). It
16
+ # separates chat-surface emitters from log-file-only scopes (`[mcp:<server>]`
17
+ # from mcp-stderr-tee, `[init]` / `[api-wait-*]` / `[mcp-init-error]` /
18
+ # `[subproc-stderr]` / `[compaction-*]` from claude-agent.ts) which share
19
+ # the same per-conversation stream log but must NOT reach the chat UI.
20
+ # Callers of phase_line / tee_subprocess / tee_subprocess_capture pass the
21
+ # bare scope (e.g. `setup-tunnel`, `list-cf-domains`, `reset-tunnel:cloudflared`);
22
+ # these helpers prepend `script:` to the stream-log write. Stderr mirrors
23
+ # stay unprefixed — stderr is for direct-SSH operators and route-handler
24
+ # `reason=<enum>` regex, not the chat-surface contract.
15
25
  # <scope> is any `[a-z][a-z0-9-]*` token (Task 592 generalised from the
16
26
  # pre-592 enum `setup-tunnel|reset-tunnel`, which silently filtered out the
17
27
  # `[list-cf-domains]` lines Task 589 emitted). <subprocess-tag> may contain
18
- # lowercase, digits, `-`, `_`, `:`. Adding a new <scope> requires no edit to
19
- # the regex — the shape is the only contract. Any prefix-shape change must
20
- # be made on both sides (this helper + script-stream-tailer.ts) atomically.
28
+ # lowercase, digits, `-`, `_`, `:`. Adding a new chat-surface scope requires
29
+ # no edit to the regex — the shape is the only contract. Any prefix-shape
30
+ # change must be made on both sides (this helper + script-stream-tailer.ts)
31
+ # atomically.
21
32
  #
22
33
  # Inner layers (e.g. a node/python helper a .sh wrapper spawns — Task 598's
23
34
  # `list-cf-domains.sh` → `list-cf-domains.ts` pattern) must write phase lines
24
- # directly to STREAM_LOG_PATH with the same prefix shape: stderr alone is
25
- # silently discarded by runFormSpawn on exit 0. The build-gate
26
- # `platform/ui/scripts/check-stream-log-contract.mjs` (Task 600) enforces this
27
- # by rejecting any .sh under `platform/plugins/*/scripts/` that sources this
28
- # helper and invokes an interpreter subprocess whose target does not pair a
29
- # STREAM_LOG_PATH env read with an append/write call. Opt out per invocation
30
- # with `# stream-log-contract: stderr-only (reason: <prose>)`.
35
+ # directly to STREAM_LOG_PATH with the same prefix shape (including the
36
+ # `script:` namespace): stderr alone is silently discarded by runFormSpawn on
37
+ # exit 0. The build-gate `platform/ui/scripts/check-stream-log-contract.mjs`
38
+ # (Task 600) enforces this by rejecting any .sh under `platform/plugins/*/scripts/`
39
+ # that sources this helper and invokes an interpreter subprocess whose target
40
+ # does not pair a STREAM_LOG_PATH env read with an append/write call. Opt out
41
+ # per invocation with `# stream-log-contract: stderr-only (reason: <prose>)`.
31
42
 
32
43
  # Exit 1 loudly with the variable name and the invoking scope so direct-SSH
33
44
  # invocations fail fast and the operator reads exactly what to set. No
@@ -56,12 +67,16 @@ stream_log_ts() {
56
67
  # tool's stderr capture carries it. Both paths matter: the stream log is
57
68
  # the live tailer surface; stderr is the exit-time Bash-tool surface.
58
69
  #
70
+ # The stream-log write carries the `script:` chat-surface namespace (Task 605);
71
+ # the stderr mirror stays unprefixed because stderr is read by direct-SSH
72
+ # operators and the route-handler `reason=<enum>` regex, not the chat UI.
73
+ #
59
74
  # Usage: phase_line <scope> <key=value …>
60
75
  phase_line() {
61
76
  local scope="$1"; shift
62
77
  local ts
63
78
  ts="$(stream_log_ts)"
64
- printf '[%s] [%s] %s\n' "${ts}" "${scope}" "$*" >> "${STREAM_LOG_PATH}"
79
+ printf '[%s] [script:%s] %s\n' "${ts}" "${scope}" "$*" >> "${STREAM_LOG_PATH}"
65
80
  printf '[%s] %s\n' "${scope}" "$*" >&2
66
81
  }
67
82
 
@@ -97,7 +112,7 @@ tee_subprocess() {
97
112
  "${buf_prefix[@]}" "$@" 2>&1 | while IFS= read -r line; do
98
113
  local ts
99
114
  ts="$(stream_log_ts)"
100
- printf '[%s] [%s] %s\n' "${ts}" "${tag}" "${line}" >> "${STREAM_LOG_PATH}"
115
+ printf '[%s] [script:%s] %s\n' "${ts}" "${tag}" "${line}" >> "${STREAM_LOG_PATH}"
101
116
  printf '%s\n' "${line}" >&2
102
117
  done
103
118
  return "${PIPESTATUS[0]}"
@@ -132,7 +147,7 @@ tee_subprocess_capture() {
132
147
  "${buf_prefix[@]}" "$@" 2>&1 | while IFS= read -r line; do
133
148
  local ts
134
149
  ts="$(stream_log_ts)"
135
- printf '[%s] [%s] %s\n' "${ts}" "${tag}" "${line}" >> "${STREAM_LOG_PATH}"
150
+ printf '[%s] [script:%s] %s\n' "${ts}" "${tag}" "${line}" >> "${STREAM_LOG_PATH}"
136
151
  printf '%s\n' "${line}"
137
152
  done
138
153
  return "${PIPESTATUS[0]}"
@@ -91,15 +91,18 @@ function logPhase(line: string): void {
91
91
  // Stream log: direct write by the TS helper (not via wrapper tee) so phase
92
92
  // lines reach the per-conversation file the Task 592 tailer reads, even on
93
93
  // exit 0 where runFormSpawn discards `result.stderr`. Format parity with
94
- // `_stream-log.sh phase_line`: `[<ISO-ts>] [<scope>] <content>\n`, asserted
95
- // by the vitest regression under platform/ui/__tests__. Sync append so the
94
+ // `_stream-log.sh phase_line`: `[<ISO-ts>] [script:<scope>] <content>\n`
95
+ // the `script:` prefix is Task 605's chat-surface namespace so the line
96
+ // passes the tightened tailer regex (`[mcp:*]` / `[init]` / `[api-wait-*]`
97
+ // lines in the same file are excluded by construction). Asserted by the
98
+ // vitest regression under platform/ui/__tests__. Sync append so the
96
99
  // terminal `phase=script-exit code=0 count=N` lands before process exit.
97
100
  const streamLogPath = process.env.STREAM_LOG_PATH;
98
101
  if (!streamLogPath || streamLogWriteFailed) return;
99
102
  try {
100
103
  appendFileSync(
101
104
  streamLogPath,
102
- `[${new Date().toISOString()}] [list-cf-domains] ${line}\n`,
105
+ `[${new Date().toISOString()}] [script:list-cf-domains] ${line}\n`,
103
106
  );
104
107
  } catch (err) {
105
108
  streamLogWriteFailed = true;
@@ -65,7 +65,8 @@ mkdir -p "${CFG_DIR}"
65
65
  # Control flow, rewritten per Task 556:
66
66
  # 1. CDP precheck on 127.0.0.1:9222 — loud failure if Chromium isn't up.
67
67
  # 2. Spawn cloudflared with stdout+stderr teed line-by-line to
68
- # $STREAM_LOG_PATH with prefix [setup-tunnel:cloudflared].
68
+ # $STREAM_LOG_PATH with prefix [script:setup-tunnel:cloudflared]
69
+ # (Task 605's chat-surface namespace — see _stream-log.sh header).
69
70
  # 3. Extract the authorize URL with a tolerant regex as it streams.
70
71
  # 4. Drive the VNC Chromium to that URL via CDP `PUT /json/new?<url>`.
71
72
  # 5. Wait for ~/.cloudflared/cert.pem to land with bounded timeout.
@@ -113,7 +114,7 @@ if [ ! -f "${CFG_DIR}/cert.pem" ]; then
113
114
  --origincert "${CFG_DIR}/cert.pem" tunnel login 2>&1 |
114
115
  while IFS= read -r line; do
115
116
  ts="$(stream_log_ts)"
116
- printf '[%s] [setup-tunnel:cloudflared] %s\n' "${ts}" "${line}" >> "${STREAM_LOG_PATH}"
117
+ printf '[%s] [script:setup-tunnel:cloudflared] %s\n' "${ts}" "${line}" >> "${STREAM_LOG_PATH}"
117
118
  printf '%s\n' "${line}" >&2
118
119
  printf '%s\n' "${line}" > "${LAST_LINE_FILE}"
119
120
  if [ ! -s "${URL_FILE}" ]; then
@@ -418,8 +419,8 @@ for H in "${HOSTNAMES[@]}"; do
418
419
  phase_line setup-tunnel step=route-dns hostname="${H}" tunnel_id="${TUNNEL_ID}"
419
420
  ROUTE_LOG="$(mktemp -t maxy-route-dns.XXXXXX)"
420
421
  # tee_subprocess_capture streams cloudflared's combined stdout+stderr
421
- # into STREAM_LOG_PATH line-by-line with the [setup-tunnel:cloudflared]
422
- # tag (live-tailable) AND passes the same output through this shell's
422
+ # into STREAM_LOG_PATH line-by-line with the [script:setup-tunnel:cloudflared]
423
+ # tag (live-tailable — Task 605 chat-surface namespace) AND passes the same output through this shell's
423
424
  # stdout so the `> "${ROUTE_LOG}"` redirection can capture it for the
424
425
  # failure-path phase_line. Exit code is cloudflared's PIPESTATUS[0].
425
426
  if tee_subprocess_capture setup-tunnel:cloudflared -- \