@intentic/sandbox-contract 1.326.0 → 1.328.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 (537) hide show
  1. package/README.md +24 -12
  2. package/dist/chores/chores.d.ts.map +1 -1
  3. package/dist/chores/chores.js +29 -20
  4. package/dist/chores/chores.js.map +1 -1
  5. package/dist/chores/probes.d.ts +1 -0
  6. package/dist/chores/probes.d.ts.map +1 -1
  7. package/dist/chores/probes.js +81 -12
  8. package/dist/chores/probes.js.map +1 -1
  9. package/dist/contracts/agent.contract.d.ts +1467 -6
  10. package/dist/contracts/agent.contract.d.ts.map +1 -1
  11. package/dist/contracts/agent.contract.js +2 -2
  12. package/dist/contracts/agent.contract.js.map +1 -1
  13. package/dist/contracts/agents.contract.d.ts +1391 -0
  14. package/dist/contracts/agents.contract.d.ts.map +1 -1
  15. package/dist/contracts/agents.contract.js +1 -1
  16. package/dist/contracts/automations.contract.d.ts +123 -4
  17. package/dist/contracts/automations.contract.d.ts.map +1 -1
  18. package/dist/contracts/automations.contract.js +13 -2
  19. package/dist/contracts/automations.contract.js.map +1 -1
  20. package/dist/contracts/capabilities.contract.d.ts +79 -8
  21. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  22. package/dist/contracts/chores.contract.d.ts +2 -0
  23. package/dist/contracts/chores.contract.d.ts.map +1 -1
  24. package/dist/contracts/ci.contract.d.ts +2 -0
  25. package/dist/contracts/ci.contract.d.ts.map +1 -1
  26. package/dist/contracts/device.contract.d.ts +52 -0
  27. package/dist/contracts/device.contract.d.ts.map +1 -1
  28. package/dist/contracts/device.contract.js +2 -0
  29. package/dist/contracts/device.contract.js.map +1 -1
  30. package/dist/contracts/endpoints.contract.d.ts +42 -33
  31. package/dist/contracts/endpoints.contract.d.ts.map +1 -1
  32. package/dist/contracts/endpoints.contract.js +17 -7
  33. package/dist/contracts/endpoints.contract.js.map +1 -1
  34. package/dist/contracts/extensions.contract.d.ts +192 -0
  35. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  36. package/dist/contracts/extensions.contract.js +37 -1
  37. package/dist/contracts/extensions.contract.js.map +1 -1
  38. package/dist/contracts/needs.contract.d.ts +1009 -0
  39. package/dist/contracts/needs.contract.d.ts.map +1 -1
  40. package/dist/contracts/pages.contract.d.ts +34 -0
  41. package/dist/contracts/pages.contract.d.ts.map +1 -0
  42. package/dist/contracts/pages.contract.js +49 -0
  43. package/dist/contracts/pages.contract.js.map +1 -0
  44. package/dist/contracts/phone.contract.d.ts +78 -0
  45. package/dist/contracts/phone.contract.d.ts.map +1 -0
  46. package/dist/contracts/phone.contract.js +11 -0
  47. package/dist/contracts/phone.contract.js.map +1 -0
  48. package/dist/contracts/privacy.contract.d.ts +20 -0
  49. package/dist/contracts/privacy.contract.d.ts.map +1 -1
  50. package/dist/contracts/privacy.contract.js +12 -2
  51. package/dist/contracts/privacy.contract.js.map +1 -1
  52. package/dist/contracts/runner.contract.d.ts +648 -127
  53. package/dist/contracts/runner.contract.d.ts.map +1 -1
  54. package/dist/contracts/runner.contract.js +1 -1
  55. package/dist/contracts/runner.contract.js.map +1 -1
  56. package/dist/contracts/secrets.contract.d.ts +88 -0
  57. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  58. package/dist/contracts/secrets.contract.js +20 -1
  59. package/dist/contracts/secrets.contract.js.map +1 -1
  60. package/dist/contracts/sessions.contract.d.ts +184 -0
  61. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  62. package/dist/contracts/settings.contract.d.ts +16 -58
  63. package/dist/contracts/settings.contract.d.ts.map +1 -1
  64. package/dist/contracts/settings.contract.js +10 -1
  65. package/dist/contracts/settings.contract.js.map +1 -1
  66. package/dist/contracts/system.contract.d.ts +227 -32
  67. package/dist/contracts/system.contract.d.ts.map +1 -1
  68. package/dist/contracts/system.contract.js +18 -1
  69. package/dist/contracts/system.contract.js.map +1 -1
  70. package/dist/documents/conversions.d.ts.map +1 -1
  71. package/dist/documents/conversions.js +2 -1
  72. package/dist/documents/conversions.js.map +1 -1
  73. package/dist/documents/read.d.ts.map +1 -1
  74. package/dist/documents/read.js +4 -4
  75. package/dist/documents/read.js.map +1 -1
  76. package/dist/events/agent-events.d.ts +747 -1
  77. package/dist/events/agent-events.d.ts.map +1 -1
  78. package/dist/events/agent-events.js +14 -1
  79. package/dist/events/agent-events.js.map +1 -1
  80. package/dist/events/requests.d.ts +40 -0
  81. package/dist/events/requests.d.ts.map +1 -1
  82. package/dist/events/requests.js +39 -0
  83. package/dist/events/requests.js.map +1 -1
  84. package/dist/events/system-events.d.ts +120 -0
  85. package/dist/events/system-events.d.ts.map +1 -1
  86. package/dist/events/transcript.d.ts +1131 -1
  87. package/dist/events/transcript.d.ts.map +1 -1
  88. package/dist/events/transcript.js +9 -1
  89. package/dist/events/transcript.js.map +1 -1
  90. package/dist/ids/hostnames.d.ts +2 -0
  91. package/dist/ids/hostnames.d.ts.map +1 -1
  92. package/dist/ids/hostnames.js +18 -15
  93. package/dist/ids/hostnames.js.map +1 -1
  94. package/dist/ids/sandbox-id.d.ts +2 -0
  95. package/dist/ids/sandbox-id.d.ts.map +1 -0
  96. package/dist/ids/sandbox-id.js +2 -0
  97. package/dist/ids/sandbox-id.js.map +1 -0
  98. package/dist/ids/tunnel-ids.d.ts +1 -1
  99. package/dist/ids/tunnel-ids.d.ts.map +1 -1
  100. package/dist/ids/tunnel-ids.js +1 -1
  101. package/dist/ids/tunnel-ids.js.map +1 -1
  102. package/dist/index.d.ts +4902 -177
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +25 -9
  105. package/dist/index.js.map +1 -1
  106. package/dist/models/agent-catalog.d.ts +0 -1
  107. package/dist/models/agent-catalog.d.ts.map +1 -1
  108. package/dist/models/agent-catalog.js +0 -1
  109. package/dist/models/agent-catalog.js.map +1 -1
  110. package/dist/models/agent-runtimes.d.ts +1 -1
  111. package/dist/models/agent-runtimes.d.ts.map +1 -1
  112. package/dist/models/agent-runtimes.js +1 -1
  113. package/dist/models/agent-runtimes.js.map +1 -1
  114. package/dist/models/provider-specs.d.ts +1 -0
  115. package/dist/models/provider-specs.d.ts.map +1 -1
  116. package/dist/models/provider-specs.js +11 -0
  117. package/dist/models/provider-specs.js.map +1 -1
  118. package/dist/netd/browser-wire.d.ts.map +1 -0
  119. package/dist/netd/browser-wire.js.map +1 -0
  120. package/dist/{front → netd}/generated/browser-wire.d.ts +8 -0
  121. package/dist/netd/generated/browser-wire.d.ts.map +1 -0
  122. package/dist/netd/generated/browser-wire.js.map +1 -0
  123. package/dist/{front → netd}/generated/wire.d.ts +20 -11
  124. package/dist/netd/generated/wire.d.ts.map +1 -0
  125. package/dist/{front → netd}/generated/wire.js.map +1 -1
  126. package/dist/netd/netd-wire.d.ts +9 -0
  127. package/dist/netd/netd-wire.d.ts.map +1 -0
  128. package/dist/netd/netd-wire.js +8 -0
  129. package/dist/netd/netd-wire.js.map +1 -0
  130. package/dist/policy/credential-material.d.ts +2 -0
  131. package/dist/policy/credential-material.d.ts.map +1 -1
  132. package/dist/policy/credential-material.js +14 -8
  133. package/dist/policy/credential-material.js.map +1 -1
  134. package/dist/policy/message-limits.d.ts +14 -0
  135. package/dist/policy/message-limits.d.ts.map +1 -0
  136. package/dist/policy/message-limits.js +15 -0
  137. package/dist/policy/message-limits.js.map +1 -0
  138. package/dist/policy/request-status.d.ts.map +1 -1
  139. package/dist/policy/request-status.js +9 -1
  140. package/dist/policy/request-status.js.map +1 -1
  141. package/dist/policy/reserved-servers.d.ts.map +1 -1
  142. package/dist/policy/reserved-servers.js +1 -0
  143. package/dist/policy/reserved-servers.js.map +1 -1
  144. package/dist/policy/turned-away.d.ts.map +1 -1
  145. package/dist/policy/turned-away.js +2 -0
  146. package/dist/policy/turned-away.js.map +1 -1
  147. package/dist/protocol/container-requirements.d.ts.map +1 -1
  148. package/dist/protocol/container-requirements.js +3 -4
  149. package/dist/protocol/container-requirements.js.map +1 -1
  150. package/dist/protocol/doors/host-protocol.d.ts.map +1 -0
  151. package/dist/protocol/doors/host-protocol.js.map +1 -0
  152. package/dist/protocol/{listener-protocol.d.ts → doors/listener-protocol.d.ts} +22 -0
  153. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -0
  154. package/dist/protocol/doors/listener-protocol.js +38 -0
  155. package/dist/protocol/doors/listener-protocol.js.map +1 -0
  156. package/dist/protocol/doors/phone-links.d.ts +16 -0
  157. package/dist/protocol/doors/phone-links.d.ts.map +1 -0
  158. package/dist/protocol/doors/phone-links.js +28 -0
  159. package/dist/protocol/doors/phone-links.js.map +1 -0
  160. package/dist/protocol/doors/phone-protocol.d.ts +47 -0
  161. package/dist/protocol/doors/phone-protocol.d.ts.map +1 -0
  162. package/dist/protocol/doors/phone-protocol.js +33 -0
  163. package/dist/protocol/doors/phone-protocol.js.map +1 -0
  164. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -0
  165. package/dist/protocol/{runner-protocol.js → doors/runner-protocol.js} +1 -1
  166. package/dist/protocol/doors/runner-protocol.js.map +1 -0
  167. package/dist/protocol/{webext-links.d.ts → doors/webext-links.d.ts} +1 -0
  168. package/dist/protocol/doors/webext-links.d.ts.map +1 -0
  169. package/dist/protocol/{webext-links.js → doors/webext-links.js} +1 -0
  170. package/dist/protocol/doors/webext-links.js.map +1 -0
  171. package/dist/protocol/doors/webext-protocol.d.ts.map +1 -0
  172. package/dist/protocol/doors/webext-protocol.js.map +1 -0
  173. package/dist/protocol/edge-verdict.d.ts +1 -1
  174. package/dist/protocol/edge-verdict.d.ts.map +1 -1
  175. package/dist/protocol/headers.d.ts +4 -0
  176. package/dist/protocol/headers.d.ts.map +1 -0
  177. package/dist/protocol/headers.js +4 -0
  178. package/dist/protocol/headers.js.map +1 -0
  179. package/dist/protocol/ingress-contract.d.ts +1 -1
  180. package/dist/protocol/ingress-contract.d.ts.map +1 -1
  181. package/dist/protocol/ingress-contract.js +1 -5
  182. package/dist/protocol/ingress-contract.js.map +1 -1
  183. package/dist/protocol/peer-dial.d.ts.map +1 -1
  184. package/dist/protocol/peer-dial.js +18 -36
  185. package/dist/protocol/peer-dial.js.map +1 -1
  186. package/dist/protocol/raw/extension-protocol.d.ts +47 -0
  187. package/dist/protocol/raw/extension-protocol.d.ts.map +1 -0
  188. package/dist/protocol/raw/extension-protocol.js +32 -0
  189. package/dist/protocol/raw/extension-protocol.js.map +1 -0
  190. package/dist/protocol/raw/raw-json-routes.d.ts +855 -0
  191. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -0
  192. package/dist/protocol/raw/raw-json-routes.js +28 -0
  193. package/dist/protocol/raw/raw-json-routes.js.map +1 -0
  194. package/dist/protocol/{raw-routes.d.ts → raw/raw-routes.d.ts} +50 -3
  195. package/dist/protocol/raw/raw-routes.d.ts.map +1 -0
  196. package/dist/protocol/{raw-routes.js → raw/raw-routes.js} +17 -3
  197. package/dist/protocol/raw/raw-routes.js.map +1 -0
  198. package/dist/protocol/raw/route-path.d.ts +3 -0
  199. package/dist/protocol/raw/route-path.d.ts.map +1 -0
  200. package/dist/protocol/raw/route-path.js +8 -0
  201. package/dist/protocol/raw/route-path.js.map +1 -0
  202. package/dist/protocol/route-meta.d.ts +1 -1
  203. package/dist/protocol/route-meta.d.ts.map +1 -1
  204. package/dist/protocol/routes.d.ts +1 -0
  205. package/dist/protocol/routes.d.ts.map +1 -1
  206. package/dist/protocol/routes.js +8 -0
  207. package/dist/protocol/routes.js.map +1 -1
  208. package/dist/protocol/sse.d.ts +2 -1
  209. package/dist/protocol/sse.d.ts.map +1 -1
  210. package/dist/protocol/sse.js +23 -12
  211. package/dist/protocol/sse.js.map +1 -1
  212. package/dist/protocol/tunnel-bulk.js +1 -1
  213. package/dist/protocol/tunnel-bulk.js.map +1 -1
  214. package/dist/protocol/vitals.d.ts +2 -1
  215. package/dist/protocol/vitals.d.ts.map +1 -1
  216. package/dist/protocol/vitals.js +1 -0
  217. package/dist/protocol/vitals.js.map +1 -1
  218. package/dist/schemas/activity.d.ts +1 -0
  219. package/dist/schemas/activity.d.ts.map +1 -1
  220. package/dist/schemas/activity.js.map +1 -1
  221. package/dist/schemas/agent.d.ts +6 -0
  222. package/dist/schemas/agent.d.ts.map +1 -1
  223. package/dist/schemas/agent.js +9 -4
  224. package/dist/schemas/agent.js.map +1 -1
  225. package/dist/schemas/agents-list.d.ts +404 -0
  226. package/dist/schemas/agents-list.d.ts.map +1 -0
  227. package/dist/schemas/agents-list.js +14 -0
  228. package/dist/schemas/agents-list.js.map +1 -0
  229. package/dist/schemas/agents.d.ts +203 -0
  230. package/dist/schemas/agents.d.ts.map +1 -1
  231. package/dist/schemas/agents.js +44 -0
  232. package/dist/schemas/agents.js.map +1 -1
  233. package/dist/schemas/automations.d.ts +235 -347
  234. package/dist/schemas/automations.d.ts.map +1 -1
  235. package/dist/schemas/automations.js +82 -13
  236. package/dist/schemas/automations.js.map +1 -1
  237. package/dist/schemas/capabilities.d.ts +43 -8
  238. package/dist/schemas/capabilities.d.ts.map +1 -1
  239. package/dist/schemas/capabilities.js +6 -2
  240. package/dist/schemas/capabilities.js.map +1 -1
  241. package/dist/schemas/ci.d.ts +4 -0
  242. package/dist/schemas/ci.d.ts.map +1 -1
  243. package/dist/schemas/ci.js +8 -0
  244. package/dist/schemas/ci.js.map +1 -1
  245. package/dist/schemas/devices.d.ts +67 -0
  246. package/dist/schemas/devices.d.ts.map +1 -1
  247. package/dist/schemas/devices.js +8 -0
  248. package/dist/schemas/devices.js.map +1 -1
  249. package/dist/schemas/engines.d.ts +57 -0
  250. package/dist/schemas/engines.d.ts.map +1 -1
  251. package/dist/schemas/engines.js +4 -0
  252. package/dist/schemas/engines.js.map +1 -1
  253. package/dist/schemas/extension-updates.d.ts +329 -0
  254. package/dist/schemas/extension-updates.d.ts.map +1 -1
  255. package/dist/schemas/extension-updates.js +68 -3
  256. package/dist/schemas/extension-updates.js.map +1 -1
  257. package/dist/schemas/git/git.d.ts +11 -0
  258. package/dist/schemas/git/git.d.ts.map +1 -1
  259. package/dist/schemas/git/git.js +4 -4
  260. package/dist/schemas/git/git.js.map +1 -1
  261. package/dist/schemas/history.d.ts +2 -0
  262. package/dist/schemas/history.d.ts.map +1 -1
  263. package/dist/schemas/history.js.map +1 -1
  264. package/dist/schemas/hosts.d.ts +74 -0
  265. package/dist/schemas/hosts.d.ts.map +1 -1
  266. package/dist/schemas/hosts.js +10 -1
  267. package/dist/schemas/hosts.js.map +1 -1
  268. package/dist/schemas/loopback-catch.d.ts +1 -0
  269. package/dist/schemas/loopback-catch.d.ts.map +1 -1
  270. package/dist/schemas/loopback-catch.js +1 -0
  271. package/dist/schemas/loopback-catch.js.map +1 -1
  272. package/dist/schemas/maintenance.d.ts +8 -0
  273. package/dist/schemas/maintenance.d.ts.map +1 -1
  274. package/dist/schemas/maintenance.js +6 -0
  275. package/dist/schemas/maintenance.js.map +1 -1
  276. package/dist/schemas/members.d.ts +58 -0
  277. package/dist/schemas/members.d.ts.map +1 -0
  278. package/dist/schemas/members.js +16 -0
  279. package/dist/schemas/members.js.map +1 -0
  280. package/dist/schemas/metrics.d.ts +10 -0
  281. package/dist/schemas/metrics.d.ts.map +1 -1
  282. package/dist/schemas/metrics.js +19 -3
  283. package/dist/schemas/metrics.js.map +1 -1
  284. package/dist/schemas/needs.d.ts +1159 -1
  285. package/dist/schemas/needs.d.ts.map +1 -1
  286. package/dist/schemas/needs.js +25 -3
  287. package/dist/schemas/needs.js.map +1 -1
  288. package/dist/schemas/offload.js +1 -1
  289. package/dist/schemas/offload.js.map +1 -1
  290. package/dist/schemas/peer-enrollment.d.ts +7 -0
  291. package/dist/schemas/peer-enrollment.d.ts.map +1 -0
  292. package/dist/schemas/peer-enrollment.js +6 -0
  293. package/dist/schemas/peer-enrollment.js.map +1 -0
  294. package/dist/schemas/phone.d.ts +231 -0
  295. package/dist/schemas/phone.d.ts.map +1 -0
  296. package/dist/schemas/phone.js +57 -0
  297. package/dist/schemas/phone.js.map +1 -0
  298. package/dist/schemas/privacy.d.ts +41 -0
  299. package/dist/schemas/privacy.d.ts.map +1 -1
  300. package/dist/schemas/privacy.js +20 -3
  301. package/dist/schemas/privacy.js.map +1 -1
  302. package/dist/schemas/project-delivery.d.ts +94 -0
  303. package/dist/schemas/project-delivery.d.ts.map +1 -0
  304. package/dist/schemas/project-delivery.js +35 -0
  305. package/dist/schemas/project-delivery.js.map +1 -0
  306. package/dist/schemas/providers/plan-limits.d.ts +7 -0
  307. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  308. package/dist/schemas/providers/plan-limits.js +22 -1
  309. package/dist/schemas/providers/plan-limits.js.map +1 -1
  310. package/dist/schemas/providers/usage.d.ts +1 -2
  311. package/dist/schemas/providers/usage.d.ts.map +1 -1
  312. package/dist/schemas/providers/usage.js +1 -2
  313. package/dist/schemas/providers/usage.js.map +1 -1
  314. package/dist/schemas/push.d.ts +1 -0
  315. package/dist/schemas/push.d.ts.map +1 -1
  316. package/dist/schemas/push.js.map +1 -1
  317. package/dist/schemas/secrets.d.ts +99 -0
  318. package/dist/schemas/secrets.d.ts.map +1 -1
  319. package/dist/schemas/secrets.js +34 -3
  320. package/dist/schemas/secrets.js.map +1 -1
  321. package/dist/schemas/settings-history.d.ts +1 -1
  322. package/dist/schemas/settings-history.d.ts.map +1 -1
  323. package/dist/schemas/settings-history.js +1 -0
  324. package/dist/schemas/settings-history.js.map +1 -1
  325. package/dist/schemas/settings.d.ts +13 -58
  326. package/dist/schemas/settings.d.ts.map +1 -1
  327. package/dist/schemas/settings.js +8 -13
  328. package/dist/schemas/settings.js.map +1 -1
  329. package/dist/schemas/terminal.d.ts +32 -0
  330. package/dist/schemas/terminal.d.ts.map +1 -1
  331. package/dist/schemas/terminal.js +37 -0
  332. package/dist/schemas/terminal.js.map +1 -1
  333. package/dist/schemas/updates.d.ts +1 -0
  334. package/dist/schemas/updates.d.ts.map +1 -1
  335. package/dist/schemas/updates.js +4 -0
  336. package/dist/schemas/updates.js.map +1 -1
  337. package/dist/schemas/workspace/workspace-search.d.ts +1 -0
  338. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  339. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  340. package/dist/schemas/workspace/workspace-tree.d.ts +3 -0
  341. package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
  342. package/dist/schemas/workspace/workspace-tree.js +22 -5
  343. package/dist/schemas/workspace/workspace-tree.js.map +1 -1
  344. package/dist/state/arrival.d.ts +59 -0
  345. package/dist/state/arrival.d.ts.map +1 -1
  346. package/dist/state/arrival.js +17 -0
  347. package/dist/state/arrival.js.map +1 -1
  348. package/dist/state/contract-lock.js +2 -2
  349. package/dist/state/contract-lock.js.map +1 -1
  350. package/dist/state/definition.d.ts +82 -16
  351. package/dist/state/definition.d.ts.map +1 -1
  352. package/dist/state/history-state.d.ts.map +1 -1
  353. package/dist/state/history-state.js +38 -0
  354. package/dist/state/history-state.js.map +1 -1
  355. package/dist/state/runtime-state.d.ts +6 -0
  356. package/dist/state/runtime-state.d.ts.map +1 -1
  357. package/dist/state/runtime-state.js +2 -0
  358. package/dist/state/runtime-state.js.map +1 -1
  359. package/dist/state/workspace-state.d.ts +24 -6
  360. package/dist/state/workspace-state.d.ts.map +1 -1
  361. package/dist/state/workspace-state.js +29 -7
  362. package/dist/state/workspace-state.js.map +1 -1
  363. package/dist/text/embed.d.ts +10 -0
  364. package/dist/text/embed.d.ts.map +1 -1
  365. package/dist/text/embed.js +25 -0
  366. package/dist/text/embed.js.map +1 -1
  367. package/dist/text/pages.d.ts +53 -0
  368. package/dist/text/pages.d.ts.map +1 -0
  369. package/dist/text/pages.js +230 -0
  370. package/dist/text/pages.js.map +1 -0
  371. package/dist/text/transcript-fold.d.ts +1 -0
  372. package/dist/text/transcript-fold.d.ts.map +1 -1
  373. package/dist/text/transcript-fold.js +30 -2
  374. package/dist/text/transcript-fold.js.map +1 -1
  375. package/dist/webext/index.d.ts +3 -2
  376. package/dist/webext/index.d.ts.map +1 -1
  377. package/dist/webext/index.js +3 -2
  378. package/dist/webext/index.js.map +1 -1
  379. package/package.json +77 -22
  380. package/src/chores/chores.ts +41 -21
  381. package/src/chores/{probes.test.ts → probes.integration.test.ts} +134 -1
  382. package/src/chores/probes.ts +128 -14
  383. package/src/chores/verdict.test.ts +29 -0
  384. package/src/contracts/agent.contract.ts +2 -2
  385. package/src/contracts/agents.contract.ts +1 -1
  386. package/src/contracts/automations.contract.ts +19 -1
  387. package/src/contracts/device.contract.ts +5 -0
  388. package/src/contracts/endpoints.contract.ts +32 -26
  389. package/src/contracts/extensions.contract.ts +49 -0
  390. package/src/contracts/pages.contract.ts +61 -0
  391. package/src/contracts/phone.contract.ts +21 -0
  392. package/src/contracts/privacy.contract.ts +13 -1
  393. package/src/contracts/runner.contract.ts +1 -1
  394. package/src/contracts/secrets.contract.ts +25 -0
  395. package/src/contracts/settings.contract.ts +10 -0
  396. package/src/contracts/system.contract.ts +26 -0
  397. package/src/documents/conversions.ts +3 -1
  398. package/src/documents/read.ts +4 -5
  399. package/src/events/agent-events.ts +27 -3
  400. package/src/events/requests.ts +47 -0
  401. package/src/events/transcript.ts +14 -0
  402. package/src/ids/hostnames.fixture.json +14 -10
  403. package/src/ids/hostnames.test.ts +21 -2
  404. package/src/ids/hostnames.ts +34 -15
  405. package/src/ids/sandbox-id.ts +3 -0
  406. package/src/ids/tunnel-ids.ts +1 -2
  407. package/src/index.ts +29 -12
  408. package/src/models/agent-catalog.ts +1 -2
  409. package/src/models/agent-runtimes.ts +12 -6
  410. package/src/models/provider-specs.test.ts +12 -0
  411. package/src/models/provider-specs.ts +16 -0
  412. package/src/{front → netd}/browser-wire.ts +1 -1
  413. package/src/{front → netd}/generated/browser-wire.json +80 -7
  414. package/src/{front → netd}/generated/browser-wire.ts +34 -7
  415. package/src/{front/generated/front-wire.json → netd/generated/netd-wire.json} +103 -41
  416. package/src/{front → netd}/generated/tunnel.json +15 -1
  417. package/src/{front → netd}/generated/wire.ts +26 -21
  418. package/src/netd/netd-wire.ts +24 -0
  419. package/src/{front → netd}/wire-manifests.test.ts +31 -11
  420. package/src/policy/credential-material.ts +39 -11
  421. package/src/policy/message-limits.ts +25 -0
  422. package/src/policy/request-status.ts +10 -1
  423. package/src/policy/reserved-servers.ts +3 -2
  424. package/src/policy/tests/credential-material.test.ts +49 -1
  425. package/src/policy/tests/message-limits.test.ts +27 -0
  426. package/src/policy/tests/reserved-servers.test.ts +3 -3
  427. package/src/policy/turned-away.ts +5 -1
  428. package/src/protocol/container-requirements.ts +4 -5
  429. package/src/protocol/{listener-protocol.ts → doors/listener-protocol.ts} +37 -15
  430. package/src/protocol/doors/phone-links.ts +50 -0
  431. package/src/protocol/doors/phone-protocol.test.ts +136 -0
  432. package/src/protocol/doors/phone-protocol.ts +71 -0
  433. package/src/protocol/{runner-protocol.ts → doors/runner-protocol.ts} +1 -1
  434. package/src/protocol/{webext-links.ts → doors/webext-links.ts} +4 -0
  435. package/src/protocol/edge-verdict.ts +1 -1
  436. package/src/protocol/headers.ts +14 -0
  437. package/src/protocol/ingress-contract.ts +6 -10
  438. package/src/protocol/peer-dial.test.ts +83 -4
  439. package/src/protocol/peer-dial.ts +33 -40
  440. package/src/protocol/raw/extension-protocol.ts +59 -0
  441. package/src/protocol/raw/raw-json-routes.ts +61 -0
  442. package/src/protocol/{raw-routes.ts → raw/raw-routes.ts} +40 -7
  443. package/src/protocol/raw/route-path.ts +13 -0
  444. package/src/protocol/route-meta.ts +4 -4
  445. package/src/protocol/routes.ts +12 -0
  446. package/src/protocol/sse.test.ts +49 -0
  447. package/src/protocol/sse.ts +29 -14
  448. package/src/protocol/tunnel-bulk.test.ts +1 -1
  449. package/src/protocol/tunnel-bulk.ts +2 -2
  450. package/src/protocol/vitals.test.ts +7 -7
  451. package/src/protocol/vitals.ts +12 -7
  452. package/src/schemas/activity.ts +1 -0
  453. package/src/schemas/agent.ts +11 -4
  454. package/src/schemas/agents-list.ts +24 -0
  455. package/src/schemas/agents.ts +71 -2
  456. package/src/schemas/automations.ts +126 -24
  457. package/src/schemas/capabilities.ts +13 -3
  458. package/src/schemas/ci.ts +10 -0
  459. package/src/schemas/devices.ts +24 -0
  460. package/src/schemas/engines.ts +7 -0
  461. package/src/schemas/extension-updates.ts +93 -3
  462. package/src/schemas/git/git.ts +15 -4
  463. package/src/schemas/history.ts +2 -0
  464. package/src/schemas/hosts.ts +23 -1
  465. package/src/schemas/loopback-catch.ts +6 -1
  466. package/src/schemas/maintenance.ts +9 -0
  467. package/src/schemas/members.ts +33 -0
  468. package/src/schemas/metrics.ts +21 -3
  469. package/src/schemas/needs.ts +36 -3
  470. package/src/schemas/offload.ts +1 -1
  471. package/src/schemas/peer-enrollment.ts +14 -0
  472. package/src/schemas/phone.ts +121 -0
  473. package/src/schemas/privacy.ts +36 -7
  474. package/src/schemas/project-delivery.ts +78 -0
  475. package/src/schemas/providers/plan-limits.ts +27 -3
  476. package/src/schemas/providers/usage.ts +3 -3
  477. package/src/schemas/push.ts +1 -0
  478. package/src/schemas/secrets.ts +54 -3
  479. package/src/schemas/settings-history.ts +2 -0
  480. package/src/schemas/settings.ts +20 -22
  481. package/src/schemas/terminal.ts +50 -0
  482. package/src/schemas/updates.test.ts +47 -0
  483. package/src/schemas/updates.ts +4 -0
  484. package/src/schemas/workspace/workspace-search.ts +2 -0
  485. package/src/schemas/workspace/workspace-tree.ts +40 -12
  486. package/src/state/arrival.ts +40 -0
  487. package/src/state/contract-lock.test.ts +1 -1
  488. package/src/state/contract-lock.ts +5 -5
  489. package/src/state/history-state.ts +72 -1
  490. package/src/state/runtime-state.ts +4 -0
  491. package/src/state/workspace-state.ts +65 -20
  492. package/src/text/embed.test.ts +21 -1
  493. package/src/text/embed.ts +50 -3
  494. package/src/text/pages.test.ts +161 -0
  495. package/src/text/pages.ts +344 -0
  496. package/src/text/transcript-fold.test.ts +22 -0
  497. package/src/text/transcript-fold.ts +41 -2
  498. package/src/webext/index.ts +3 -2
  499. package/dist/front/browser-wire.d.ts.map +0 -1
  500. package/dist/front/browser-wire.js.map +0 -1
  501. package/dist/front/front-wire.d.ts +0 -6
  502. package/dist/front/front-wire.d.ts.map +0 -1
  503. package/dist/front/front-wire.js +0 -5
  504. package/dist/front/front-wire.js.map +0 -1
  505. package/dist/front/generated/browser-wire.d.ts.map +0 -1
  506. package/dist/front/generated/browser-wire.js.map +0 -1
  507. package/dist/front/generated/wire.d.ts.map +0 -1
  508. package/dist/protocol/host-protocol.d.ts.map +0 -1
  509. package/dist/protocol/host-protocol.js.map +0 -1
  510. package/dist/protocol/listener-protocol.d.ts.map +0 -1
  511. package/dist/protocol/listener-protocol.js +0 -33
  512. package/dist/protocol/listener-protocol.js.map +0 -1
  513. package/dist/protocol/raw-routes.d.ts.map +0 -1
  514. package/dist/protocol/raw-routes.js.map +0 -1
  515. package/dist/protocol/request-id.d.ts +0 -2
  516. package/dist/protocol/request-id.d.ts.map +0 -1
  517. package/dist/protocol/request-id.js +0 -2
  518. package/dist/protocol/request-id.js.map +0 -1
  519. package/dist/protocol/runner-protocol.d.ts.map +0 -1
  520. package/dist/protocol/runner-protocol.js.map +0 -1
  521. package/dist/protocol/webext-links.d.ts.map +0 -1
  522. package/dist/protocol/webext-links.js.map +0 -1
  523. package/dist/protocol/webext-protocol.d.ts.map +0 -1
  524. package/dist/protocol/webext-protocol.js.map +0 -1
  525. package/src/front/front-wire.ts +0 -15
  526. package/src/protocol/request-id.ts +0 -2
  527. /package/dist/{front → netd}/browser-wire.d.ts +0 -0
  528. /package/dist/{front → netd}/browser-wire.js +0 -0
  529. /package/dist/{front → netd}/generated/browser-wire.js +0 -0
  530. /package/dist/{front → netd}/generated/wire.js +0 -0
  531. /package/dist/protocol/{host-protocol.d.ts → doors/host-protocol.d.ts} +0 -0
  532. /package/dist/protocol/{host-protocol.js → doors/host-protocol.js} +0 -0
  533. /package/dist/protocol/{runner-protocol.d.ts → doors/runner-protocol.d.ts} +0 -0
  534. /package/dist/protocol/{webext-protocol.d.ts → doors/webext-protocol.d.ts} +0 -0
  535. /package/dist/protocol/{webext-protocol.js → doors/webext-protocol.js} +0 -0
  536. /package/src/protocol/{host-protocol.ts → doors/host-protocol.ts} +0 -0
  537. /package/src/protocol/{webext-protocol.ts → doors/webext-protocol.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/sandbox-contract",
3
- "version": "1.326.0",
3
+ "version": "1.328.0",
4
4
  "description": "oRPC wire contract for the intentic sandbox daemon, shared by the daemon and its browser client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,6 +40,28 @@
40
40
  "default": "./dist/chores/index.js"
41
41
  }
42
42
  },
43
+ "./message-limits": {
44
+ "types": "./dist/policy/message-limits.d.ts",
45
+ "import": {
46
+ "@intentic/src": "./src/policy/message-limits.ts",
47
+ "default": "./dist/policy/message-limits.js"
48
+ },
49
+ "require": {
50
+ "@intentic/src": "./src/policy/message-limits.ts",
51
+ "default": "./dist/policy/message-limits.js"
52
+ }
53
+ },
54
+ "./workspace-state": {
55
+ "types": "./dist/state/workspace-state.d.ts",
56
+ "import": {
57
+ "@intentic/src": "./src/state/workspace-state.ts",
58
+ "default": "./dist/state/workspace-state.js"
59
+ },
60
+ "require": {
61
+ "@intentic/src": "./src/state/workspace-state.ts",
62
+ "default": "./dist/state/workspace-state.js"
63
+ }
64
+ },
43
65
  "./batch-runs": {
44
66
  "types": "./dist/policy/batch-runs.d.ts",
45
67
  "import": {
@@ -106,6 +128,39 @@
106
128
  "default": "./dist/ids/tunnel-ids.js"
107
129
  }
108
130
  },
131
+ "./headers": {
132
+ "types": "./dist/protocol/headers.d.ts",
133
+ "import": {
134
+ "@intentic/src": "./src/protocol/headers.ts",
135
+ "default": "./dist/protocol/headers.js"
136
+ },
137
+ "require": {
138
+ "@intentic/src": "./src/protocol/headers.ts",
139
+ "default": "./dist/protocol/headers.js"
140
+ }
141
+ },
142
+ "./listener-protocol": {
143
+ "types": "./dist/protocol/doors/listener-protocol.d.ts",
144
+ "import": {
145
+ "@intentic/src": "./src/protocol/doors/listener-protocol.ts",
146
+ "default": "./dist/protocol/doors/listener-protocol.js"
147
+ },
148
+ "require": {
149
+ "@intentic/src": "./src/protocol/doors/listener-protocol.ts",
150
+ "default": "./dist/protocol/doors/listener-protocol.js"
151
+ }
152
+ },
153
+ "./extension-protocol": {
154
+ "types": "./dist/protocol/raw/extension-protocol.d.ts",
155
+ "import": {
156
+ "@intentic/src": "./src/protocol/raw/extension-protocol.ts",
157
+ "default": "./dist/protocol/raw/extension-protocol.js"
158
+ },
159
+ "require": {
160
+ "@intentic/src": "./src/protocol/raw/extension-protocol.ts",
161
+ "default": "./dist/protocol/raw/extension-protocol.js"
162
+ }
163
+ },
109
164
  "./edge-verdict": {
110
165
  "types": "./dist/protocol/edge-verdict.d.ts",
111
166
  "import": {
@@ -161,26 +216,26 @@
161
216
  "default": "./dist/policy/owner-ticket.js"
162
217
  }
163
218
  },
164
- "./front-wire": {
165
- "types": "./dist/front/front-wire.d.ts",
219
+ "./netd-wire": {
220
+ "types": "./dist/netd/netd-wire.d.ts",
166
221
  "import": {
167
- "@intentic/src": "./src/front/front-wire.ts",
168
- "default": "./dist/front/front-wire.js"
222
+ "@intentic/src": "./src/netd/netd-wire.ts",
223
+ "default": "./dist/netd/netd-wire.js"
169
224
  },
170
225
  "require": {
171
- "@intentic/src": "./src/front/front-wire.ts",
172
- "default": "./dist/front/front-wire.js"
226
+ "@intentic/src": "./src/netd/netd-wire.ts",
227
+ "default": "./dist/netd/netd-wire.js"
173
228
  }
174
229
  },
175
230
  "./browser-wire": {
176
- "types": "./dist/front/browser-wire.d.ts",
231
+ "types": "./dist/netd/browser-wire.d.ts",
177
232
  "import": {
178
- "@intentic/src": "./src/front/browser-wire.ts",
179
- "default": "./dist/front/browser-wire.js"
233
+ "@intentic/src": "./src/netd/browser-wire.ts",
234
+ "default": "./dist/netd/browser-wire.js"
180
235
  },
181
236
  "require": {
182
- "@intentic/src": "./src/front/browser-wire.ts",
183
- "default": "./dist/front/browser-wire.js"
237
+ "@intentic/src": "./src/netd/browser-wire.ts",
238
+ "default": "./dist/netd/browser-wire.js"
184
239
  }
185
240
  },
186
241
  "./share-paths": {
@@ -239,22 +294,22 @@
239
294
  }
240
295
  },
241
296
  "./webext-links": {
242
- "types": "./dist/protocol/webext-links.d.ts",
297
+ "types": "./dist/protocol/doors/webext-links.d.ts",
243
298
  "import": {
244
- "@intentic/src": "./src/protocol/webext-links.ts",
245
- "default": "./dist/protocol/webext-links.js"
299
+ "@intentic/src": "./src/protocol/doors/webext-links.ts",
300
+ "default": "./dist/protocol/doors/webext-links.js"
246
301
  },
247
302
  "require": {
248
- "@intentic/src": "./src/protocol/webext-links.ts",
249
- "default": "./dist/protocol/webext-links.js"
303
+ "@intentic/src": "./src/protocol/doors/webext-links.ts",
304
+ "default": "./dist/protocol/doors/webext-links.js"
250
305
  }
251
306
  }
252
307
  },
253
308
  "dependencies": {
254
- "@intentic/base": "1.326.0",
255
- "@intentic/constants": "1.326.0",
256
- "@intentic/extension-manifest": "1.326.0",
257
- "@intentic/registry": "1.326.0",
309
+ "@intentic/base": "1.328.0",
310
+ "@intentic/constants": "1.328.0",
311
+ "@intentic/extension-manifest": "1.328.0",
312
+ "@intentic/registry": "1.328.0",
258
313
  "@orpc/contract": "1.15.4",
259
314
  "tslib": "2.8.1",
260
315
  "zod": "4.6.5"
@@ -263,7 +318,7 @@
263
318
  "@intentic/testing": "0.0.0",
264
319
  "@intentic/tsconfig": "0.0.0",
265
320
  "@types/bun": "1.4.2",
266
- "@types/node": "24.13.6",
321
+ "@types/node": "24.19.1",
267
322
  "@typescript/native-preview": "7.0.0-dev.20260707.2"
268
323
  },
269
324
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  import type { Advisory, ChoreSignals, OutdatedPackage, ProbeId, ProbeResult } from "../schemas/maintenance.js";
2
- import { plural } from "@intentic/base/format";
2
+ import { plural, sizeLabel } from "@intentic/base/format";
3
3
  import { bucketOf, digestOf } from "./digest.js";
4
+ import { AUDIT_COMMAND } from "./probes.js";
4
5
  import { CHORE_INVARIANTS, composeAsk, REPORT_INVARIANTS, TRIAGE_NOTE } from "./prompt.js";
5
6
  import { componentStem, frameworksOf, idiomRule, normalizePath, UI_FRAMEWORKS, usesTailwind } from "./stack.js";
6
7
  import { WORKSPACE_ROOT_JSCPD_EXCLUDE_ARG } from "./workspace-scope.js";
@@ -97,9 +98,18 @@ export const repoLabel = (repo: string): string => (repo === `root` || repo ===
97
98
  // workspace root reposi…").
98
99
  export const repoName = (repo: string): string => (repo === `root` || repo === `` ? `workspace root` : repo);
99
100
 
101
+ // Where a finding lives when it is not the workspace's own tree: a package pnpm-workspace.yaml leaves out, whose fix
102
+ // goes in its own package.json. Empty for the workspace, so its lines read as they always did.
103
+ const whereOf = (finding: { readonly standalone?: string | undefined }): string =>
104
+ finding.standalone === undefined ? `` : ` in ${finding.standalone}`;
105
+ // The same folder prefixed to a digest identity; a workspace finding keeps the identity it always had, so this change
106
+ // rebadges nothing that was already settled.
107
+ const identityOf = (finding: { readonly standalone?: string | undefined }, identity: string): string =>
108
+ finding.standalone === undefined ? identity : `${finding.standalone}:${identity}`;
109
+
100
110
  // One outdated dependency, as the panel lists it; the semver step leads, since it decides whether the row is a
101
111
  // morning's work or a project.
102
- const outdatedLine = (entry: OutdatedPackage): string => `${entry.kind} · ${entry.name} ${entry.current} → ${entry.latest}`;
112
+ const outdatedLine = (entry: OutdatedPackage): string => `${entry.kind} · ${entry.name}${whereOf(entry)} ${entry.current} → ${entry.latest}`;
103
113
 
104
114
  // The facts of a probe that actually ran; anything else (never run, unavailable, failed) reads as absent, so
105
115
  // assess() can't mistake an unmeasured repo for a clean one.
@@ -124,7 +134,7 @@ const security: Chore = {
124
134
  icon: `shield`,
125
135
  description: `Published advisories against this dependency tree, and the ones whose fix is a version bump.`,
126
136
  kind: `carrying`,
127
- criterion: `pnpm audit reports an advisory of high or critical severity against the resolved tree.`,
137
+ criterion: `pnpm audit reports an advisory of high or critical severity against the resolved tree, or against a package the workspace leaves out.`,
128
138
  applies: (signals) => (signals.shape.lockfile ? undefined : `no lockfile`),
129
139
  stance: `act`,
130
140
  needs: [`audit`],
@@ -132,11 +142,14 @@ const security: Chore = {
132
142
  automation: {
133
143
  cron: `0 4 * * *`,
134
144
  guard:
135
- `pnpm audit --json > ${AUDIT_REPORT} 2>/dev/null; ` +
136
- `[ "$(jq '(.metadata.vulnerabilities.high // 0) + (.metadata.vulnerabilities.critical // 0)' ${AUDIT_REPORT} 2>/dev/null || echo 0)" -gt 0 ]`,
145
+ `{ ${AUDIT_COMMAND}; } > ${AUDIT_REPORT}; ` +
146
+ `[ "$(jq -s '[.[] | .metadata.vulnerabilities? // empty | (.high // 0) + (.critical // 0)] | add // 0' ${AUDIT_REPORT} 2>/dev/null || echo 0)" -gt 0 ]`,
137
147
  note: `nightly · high + critical only`,
138
148
  report: AUDIT_REPORT,
139
- woke: `pnpm audit's report for this workspace is in ${AUDIT_REPORT} (JSON), and it woke you because it carries a high or critical advisory.`,
149
+ woke:
150
+ `pnpm audit's report for this workspace is in ${AUDIT_REPORT}, a stream of JSON documents (read it with \`jq -s\`): pnpm's own ` +
151
+ `report first, then for each package the workspace leaves out a \`{"standalone": dir}\` line and that package's report. ` +
152
+ `It woke you because it carries a high or critical advisory.`,
140
153
  },
141
154
  assess: (context) => {
142
155
  const facts = factsOf(context, `audit`);
@@ -155,18 +168,18 @@ const security: Chore = {
155
168
  .toSorted((left, right) => left.name.localeCompare(right.name))
156
169
  .map(
157
170
  (advisory) =>
158
- `${advisory.severity} · ${advisory.name}, ${advisory.title}${advisory.patched === undefined ? ` (no patch yet)` : ``}`,
171
+ `${advisory.severity} · ${advisory.name}${whereOf(advisory)}, ${advisory.title}${advisory.patched === undefined ? ` (no patch yet)` : ``}`,
159
172
  ),
160
173
  // Identities, not counts: every advisory that appears or is fixed is genuinely news, with no ordinary drift
161
174
  // to absorb.
162
- digest: digestOf(...blocking.map((advisory) => `${advisory.name}@${advisory.severity}`).toSorted()),
175
+ digest: digestOf(...blocking.map((advisory) => identityOf(advisory, `${advisory.name}@${advisory.severity}`)).toSorted()),
163
176
  severity: production.length > 0 ? `warning` : `info`,
164
177
  // Named, not counted; re-deriving the list itself would be slow, and pnpm audit would read a different tree
165
178
  // by then.
166
179
  why:
167
180
  `pnpm audit reports ${plural(blocking.length, `high or critical advisory`, `high or critical advisories`)} against ` +
168
181
  `${repoLabel(context.repo)}, ${production.length} reaching a production dependency path, ${patchable.length} with a published patched range: ` +
169
- `${blocking.map((advisory) => `${advisory.name} (${advisory.severity}${advisory.dev ? `, dev-only` : ``}${advisory.patched === undefined ? `, no patch` : `, fixed in ${advisory.patched}`})`).join(`; `)}.`,
182
+ `${blocking.map((advisory) => `${advisory.name}${whereOf(advisory)} (${advisory.severity}${advisory.dev ? `, dev-only` : ``}${advisory.patched === undefined ? `, no patch` : `, fixed in ${advisory.patched}`})`).join(`; `)}.`,
170
183
  };
171
184
  },
172
185
  diagnosis: `An advisory with a published fix is a version bump someone has to actually make; one without is a risk to decide about.`,
@@ -174,8 +187,12 @@ const security: Chore = {
174
187
  `For each advisory, establish whether this workspace reaches the vulnerable code path at all: a transitive dependency of a ` +
175
188
  `build-time tool is a different problem from one in a running service. Where the fix is a version bump the lockfile can absorb, ` +
176
189
  `make it. Where it needs a real upgrade or has no patch published, leave it and say what it would take. Never rewrite ` +
177
- `application code to route around a CVE.`,
178
- done: `Done when \`pnpm audit\` reports fewer high/critical advisories than it did, and the type-check and tests of what it changed pass.`,
190
+ `application code to route around a CVE. An advisory named "in <folder>" is in a package the pnpm workspace leaves out ` +
191
+ `and installs on its own: bump it in that folder's package.json, and check it by auditing a scratch copy of the folder ` +
192
+ `(\`pnpm install --lockfile-only --ignore-workspace\`, then \`pnpm audit --ignore-workspace\`), never by leaving a lockfile in it.`,
193
+ done:
194
+ `Done when \`pnpm audit\`, and the scratch-copy audit of any folder you touched, reports fewer high/critical advisories than ` +
195
+ `it did, and the type-check and tests of what it changed pass.`,
179
196
  };
180
197
 
181
198
  // Majors are the finding, the total is context: the digest is keyed to which packages have a major waiting, with
@@ -210,14 +227,17 @@ const dependencies: Chore = {
210
227
  ? `${plural(facts.packages.length, `package`)} behind`
211
228
  : `${plural(majors.length, `major`)} waiting, ${facts.packages.length} behind in total`,
212
229
  detail: majors.toSorted((left, right) => left.name.localeCompare(right.name)).map(outdatedLine),
213
- digest: digestOf(...majors.map((entry) => `${entry.name}@${entry.latest}`).toSorted(), `total:${bucketOf(facts.packages.length)}`),
230
+ digest: digestOf(
231
+ ...majors.map((entry) => identityOf(entry, `${entry.name}@${entry.latest}`)).toSorted(),
232
+ `total:${bucketOf(facts.packages.length)}`,
233
+ ),
214
234
  severity: `info`,
215
235
  // Majors are named since they are what the turn is about; minors and patches are a bulk operation the agent
216
236
  // enumerates itself.
217
237
  why:
218
238
  `pnpm outdated reports ${plural(facts.packages.length, `dependency`, `dependencies`)} behind the registry in ` +
219
239
  `${repoLabel(context.repo)}, ${majors.length} of them by a major version` +
220
- `${majors.length === 0 ? `` : `: ${majors.map((entry) => `${entry.name} ${entry.current} → ${entry.latest}`).join(`; `)}`}.`,
240
+ `${majors.length === 0 ? `` : `: ${majors.map((entry) => `${entry.name}${whereOf(entry)} ${entry.current} → ${entry.latest}`).join(`; `)}`}.`,
221
241
  };
222
242
  },
223
243
  diagnosis: `Version drift is cheap to fix continuously and expensive to fix in one go, because the majors start depending on each other.`,
@@ -225,7 +245,9 @@ const dependencies: Chore = {
225
245
  `Take the patch and minor upgrades in one pass: those are what the lockfile can absorb without argument. Then take the majors ` +
226
246
  `ONE AT A TIME, reading each one's changelog for breaking changes before you touch anything, and stop at the first one that ` +
227
247
  `needs more than a mechanical fix: leave it, and say what it would take. Do not batch majors; a failing test after eight of them ` +
228
- `is a bisect nobody wanted.`,
248
+ `is a bisect nobody wanted. Where a manifest says \`catalog:\`, the version lives in the catalog in pnpm-workspace.yaml: bump ` +
249
+ `it there, once, then \`pnpm install\`. A dependency named "in <folder>" is in a package the workspace leaves out and installs ` +
250
+ `on its own, so it is bumped in that folder's package.json.`,
229
251
  done: `Done when the type-check and tests of what it changed pass, and your summary names every major you took and every one you left, with the reason.`,
230
252
  };
231
253
 
@@ -609,8 +631,6 @@ const FRAMEWORK_LABELS = UI_FRAMEWORKS.map((framework) => framework.label).join(
609
631
  const needsFramework = (signals: ChoreSignals): string | undefined =>
610
632
  frameworksOf(signals.shape.deps).length > 0 ? undefined : `no ${FRAMEWORK_LABELS}`;
611
633
 
612
- const bytesLabel = (bytes: number): string => (bytes >= 1024 * 1024 ? `${(bytes / (1024 * 1024)).toFixed(1)} MB` : `${Math.round(bytes / 1024)} kB`);
613
-
614
634
  // The criterion is a share of total size, not a byte threshold, since a byte value would need a different number
615
635
  // per app. Report-stance: where to split is a product decision no unattended agent should make.
616
636
  const BUNDLE_SHARE_FLOOR = 50;
@@ -653,10 +673,10 @@ const bundleWeight: Chore = {
653
673
  return undefined;
654
674
  }
655
675
  return {
656
- headline: `${largest.path} is ${Math.round(share)}% of the ${bytesLabel(totalGzip)} this build ships`,
676
+ headline: `${largest.path} is ${Math.round(share)}% of the ${sizeLabel(totalGzip)} this build ships`,
657
677
  detail: ranked
658
678
  .slice(0, DETAIL_LIMIT)
659
- .map((asset) => `${bytesLabel(asset.gzip)} gzipped · ${asset.path} (${bytesLabel(asset.bytes)} on disk)`),
679
+ .map((asset) => `${sizeLabel(asset.gzip)} gzipped · ${asset.path} (${sizeLabel(asset.bytes)} on disk)`),
660
680
  // The bucketed total and hash-stripped identities of the biggest chunks; a rebuild of the same code stays
661
681
  // silent, a new heavy chunk doesn't.
662
682
  digest: digestOf(
@@ -669,11 +689,11 @@ const bundleWeight: Chore = {
669
689
  // Not a risk being carried, however large; `warning` is reserved for something with a clock on it.
670
690
  severity: `info`,
671
691
  why:
672
- `The build output in ${dir}/ of ${repoLabel(context.repo)} is ${bytesLabel(totalGzip)} gzipped across ` +
673
- `${plural(assets.length, `asset`)}, and ${largest.path} alone is ${bytesLabel(largest.gzip)} of it: ${Math.round(share)}%. ` +
692
+ `The build output in ${dir}/ of ${repoLabel(context.repo)} is ${sizeLabel(totalGzip)} gzipped across ` +
693
+ `${plural(assets.length, `asset`)}, and ${largest.path} alone is ${sizeLabel(largest.gzip)} of it: ${Math.round(share)}%. ` +
674
694
  `The next largest are ${ranked
675
695
  .slice(1, 4)
676
- .map((asset) => `${asset.path} (${bytesLabel(asset.gzip)})`)
696
+ .map((asset) => `${asset.path} (${sizeLabel(asset.gzip)})`)
677
697
  .join(`, `)}. ` +
678
698
  `This is the last build someone ran, read off disk; nothing rebuilt it to measure.`,
679
699
  };
@@ -1,5 +1,9 @@
1
+ import { execFileSync } from "node:child_process";
2
+ import { chmodSync, existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
3
+ import { tmpdir } from "node:os";
4
+ import { dirname, join } from "node:path";
1
5
  import { choreById } from "./chores.js";
2
- import { probeSpec } from "./probes.js";
6
+ import { AUDIT_COMMAND, probeSpec } from "./probes.js";
3
7
  import { IDIOM_RULES } from "./stack.js";
4
8
  import { WORKSPACE_ROOT_JSCPD_EXCLUDE_ARG, WORKSPACE_ROOT_RG_EXCLUDE_ARG } from "./workspace-scope.js";
5
9
 
@@ -53,6 +57,49 @@ describe(`outdated`, () => {
53
57
  test(`output that is not JSON at all is a failure, never a clean result`, () => {
54
58
  expect(parse(`outdated`, `ERR_PNPM_NO_LOCKFILE Cannot proceed`)).toBeUndefined();
55
59
  });
60
+
61
+ // pnpm 12's recursive report, verbatim in shape: a package seen as both a dependency and a devDependency is keyed
62
+ // `name@version` and `name@version (dev)`, which once surfaced as two rows under names no registry knows.
63
+ test(`reads pnpm 12's disambiguated keys as the package they name, one row per upgrade`, () => {
64
+ const facts = parse(
65
+ `outdated`,
66
+ JSON.stringify({
67
+ "mermaid@12.0.0 (dev)": { current: `12.0.0`, latest: `12.1.0`, dependencyType: `devDependencies` },
68
+ "mermaid@12.0.0": { current: `12.0.0`, latest: `12.1.0`, dependencyType: `dependencies` },
69
+ "@scope/tool@1.0.0 (dev)": { current: `1.0.0`, latest: `2.0.0`, dependencyType: `devDependencies` },
70
+ "@scope/tool@1.1.0": { current: `1.1.0`, latest: `2.0.0`, dependencyType: `dependencies` },
71
+ }),
72
+ );
73
+ expect(facts).toEqual({
74
+ id: `outdated`,
75
+ packages: [
76
+ // The shipped copy wins the section, whichever order pnpm listed them in.
77
+ { name: `mermaid`, current: `12.0.0`, latest: `12.1.0`, kind: `minor`, section: `dependencies` },
78
+ // Two versions in the tree are two upgrades, so they stay two rows.
79
+ { name: `@scope/tool`, current: `1.0.0`, latest: `2.0.0`, kind: `major`, section: `devDependencies` },
80
+ { name: `@scope/tool`, current: `1.1.0`, latest: `2.0.0`, kind: `major`, section: `dependencies` },
81
+ ],
82
+ });
83
+ });
84
+
85
+ test(`a package the workspace leaves out is measured too, and says which folder it is`, () => {
86
+ const stdout = [
87
+ JSON.stringify({ vue: { current: `3.4.1`, latest: `3.4.2`, dependencyType: `dependencies` } }, null, 2),
88
+ `{"standalone":"_editor/ios-app"}`,
89
+ JSON.stringify({ "@capacitor/ios": { current: `8.5.0`, latest: `8.5.2`, dependencyType: `dependencies` } }, null, 2),
90
+ ].join(`\n`);
91
+ expect(parse(`outdated`, stdout)).toEqual({
92
+ id: `outdated`,
93
+ packages: [
94
+ { name: `vue`, current: `3.4.1`, latest: `3.4.2`, kind: `patch`, section: `dependencies` },
95
+ { name: `@capacitor/ios`, current: `8.5.0`, latest: `8.5.2`, kind: `patch`, section: `dependencies`, standalone: `_editor/ios-app` },
96
+ ],
97
+ });
98
+ });
99
+
100
+ test(`a standalone package that printed nothing fails the probe rather than reading as up to date`, () => {
101
+ expect(parse(`outdated`, `{}\n{"standalone":"_editor/ios-app"}\n`)).toBeUndefined();
102
+ });
56
103
  });
57
104
 
58
105
  describe(`audit`, () => {
@@ -89,6 +136,92 @@ describe(`audit`, () => {
89
136
  });
90
137
  });
91
138
 
139
+ // The audit command run for real, against a fake `pnpm` on PATH: what is under test is the shell (which folders count
140
+ // as standalone, the scratch copy, the markers), not pnpm, and not the network.
141
+ describe(`the audit command across packages the workspace leaves out`, () => {
142
+ const roots: string[] = [];
143
+ afterEach(() => {
144
+ for (const root of roots.splice(0)) {
145
+ rmSync(root, { recursive: true, force: true });
146
+ }
147
+ });
148
+
149
+ // Reports one advisory named after the package it was run in, so the test can see where each run happened.
150
+ // `FAIL_INSTALL` stands in for a registry that cannot be reached.
151
+ const FAKE_PNPM = `#!/bin/sh
152
+ name=$(sed -n 's/.*"name": *"\\([^"]*\\)".*/\\1/p' package.json)
153
+ case "$*" in
154
+ *"install --lockfile-only"*) [ -z "$FAIL_INSTALL" ] || exit 1; echo "lockfileVersion: '9.0'" > pnpm-lock.yaml ;;
155
+ *audit*) printf '{"advisories":{"1":{"module_name":"%s","severity":"critical","title":"ran in %s","findings":[{"dev":false}]}}}\\n' "$name" "$PWD"; exit 1 ;;
156
+ esac
157
+ `;
158
+
159
+ const repo = (files: Record<string, string>): string => {
160
+ const root = mkdtempSync(join(tmpdir(), `probe-standalone-`));
161
+ roots.push(root);
162
+ for (const [path, text] of Object.entries({ ...files, "bin/pnpm": FAKE_PNPM })) {
163
+ mkdirSync(dirname(join(root, path)), { recursive: true });
164
+ writeFileSync(join(root, path), text);
165
+ }
166
+ chmodSync(join(root, `bin/pnpm`), 0o755);
167
+ return root;
168
+ };
169
+
170
+ const audit = (root: string, env: Record<string, string> = {}) =>
171
+ probeSpec(`audit`).parse(
172
+ execFileSync(`sh`, [`-c`, AUDIT_COMMAND], {
173
+ cwd: root,
174
+ encoding: `utf8`,
175
+ env: { ...process.env, ...env, PATH: `${join(root, `bin`)}:${process.env[`PATH`] ?? ``}` },
176
+ }),
177
+ );
178
+
179
+ const WORKSPACE = [
180
+ `packages:`,
181
+ ` - "app"`,
182
+ ` # The shell is installed on its own.`,
183
+ ` - "!shell"`,
184
+ ` - '!native/**'`,
185
+ ` - "!**/fixtures/**"`,
186
+ ` - "!gone"`,
187
+ `publicHoistPattern:`,
188
+ ` - "!app"`,
189
+ ``,
190
+ ].join(`\n`);
191
+
192
+ test(`audits each literal exclusion with a manifest, in a scratch copy, and names the folder`, () => {
193
+ const root = repo({
194
+ "pnpm-workspace.yaml": WORKSPACE,
195
+ "package.json": `{"name": "root"}`,
196
+ "app/package.json": `{"name": "app"}`,
197
+ "shell/package.json": `{"name": "shell"}`,
198
+ "native/package.json": `{"name": "native"}`,
199
+ "fixtures/x/package.json": `{"name": "fixture"}`,
200
+ });
201
+ const facts = audit(root);
202
+ const advisories = facts?.id === `audit` ? facts.advisories : [];
203
+ // The workspace's own report carries no folder; a fixture, a hoist pattern and a folder that is gone are not packages.
204
+ expect(advisories.map((advisory) => [advisory.name, advisory.standalone])).toEqual([
205
+ [`root`, undefined],
206
+ [`shell`, `shell`],
207
+ [`native`, `native`],
208
+ ]);
209
+ // Measured in a copy: nothing was written into the folder pnpm deliberately does not manage.
210
+ expect(existsSync(join(root, `shell/pnpm-lock.yaml`))).toBe(false);
211
+ expect(JSON.stringify(facts)).not.toContain(`ran in ${join(root, `shell`)}`);
212
+ });
213
+
214
+ test(`a standalone package that cannot be resolved fails the probe, never reads as clean`, () => {
215
+ const root = repo({ "pnpm-workspace.yaml": WORKSPACE, "package.json": `{"name": "root"}`, "shell/package.json": `{"name": "shell"}` });
216
+ expect(audit(root, { FAIL_INSTALL: `1` })).toBeUndefined();
217
+ });
218
+
219
+ test(`a repo with no workspace file is audited as it always was`, () => {
220
+ const root = repo({ "package.json": `{"name": "root"}` });
221
+ expect(audit(root)).toMatchObject({ advisories: [{ name: `root` }] });
222
+ });
223
+ });
224
+
92
225
  describe(`knip`, () => {
93
226
  test(`sums the per-file issue arrays and samples the wholly unreferenced files`, () => {
94
227
  const facts = parse(