@intentic/sandbox-contract 1.429.0 → 1.431.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 (594) hide show
  1. package/README.md +12 -2
  2. package/dist/app-routes/app-pages.d.ts +1 -0
  3. package/dist/app-routes/app-pages.d.ts.map +1 -1
  4. package/dist/app-routes/app-pages.js +1 -0
  5. package/dist/app-routes/app-pages.js.map +1 -1
  6. package/dist/app-routes/index.d.ts +1 -0
  7. package/dist/app-routes/index.d.ts.map +1 -1
  8. package/dist/app-routes/index.js +1 -0
  9. package/dist/app-routes/index.js.map +1 -1
  10. package/dist/app-routes/return-path.d.ts +2 -0
  11. package/dist/app-routes/return-path.d.ts.map +1 -0
  12. package/dist/app-routes/return-path.js +8 -0
  13. package/dist/app-routes/return-path.js.map +1 -0
  14. package/dist/contracts/accounts.contract.d.ts +7 -0
  15. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  16. package/dist/contracts/accounts.contract.js +2 -0
  17. package/dist/contracts/accounts.contract.js.map +1 -1
  18. package/dist/contracts/agent.contract.d.ts +381 -0
  19. package/dist/contracts/agent.contract.d.ts.map +1 -1
  20. package/dist/contracts/agents.contract.d.ts +3297 -1568
  21. package/dist/contracts/agents.contract.d.ts.map +1 -1
  22. package/dist/contracts/agents.contract.js +35 -5
  23. package/dist/contracts/agents.contract.js.map +1 -1
  24. package/dist/contracts/automations.contract.d.ts +31 -0
  25. package/dist/contracts/automations.contract.d.ts.map +1 -1
  26. package/dist/contracts/automations.contract.js +1 -0
  27. package/dist/contracts/automations.contract.js.map +1 -1
  28. package/dist/contracts/bookmarks.contract.d.ts +101 -0
  29. package/dist/contracts/bookmarks.contract.d.ts.map +1 -0
  30. package/dist/contracts/bookmarks.contract.js +51 -0
  31. package/dist/contracts/bookmarks.contract.js.map +1 -0
  32. package/dist/contracts/browser.contract.d.ts +176 -0
  33. package/dist/contracts/browser.contract.d.ts.map +1 -0
  34. package/dist/contracts/browser.contract.js +150 -0
  35. package/dist/contracts/browser.contract.js.map +1 -0
  36. package/dist/contracts/capabilities.contract.d.ts +48 -0
  37. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  38. package/dist/contracts/capabilities.contract.js +3 -1
  39. package/dist/contracts/capabilities.contract.js.map +1 -1
  40. package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
  41. package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
  42. package/dist/contracts/device-ci-runners.contract.js +56 -0
  43. package/dist/contracts/device-ci-runners.contract.js.map +1 -0
  44. package/dist/contracts/device.contract.d.ts +87 -0
  45. package/dist/contracts/device.contract.d.ts.map +1 -1
  46. package/dist/contracts/device.contract.js +4 -0
  47. package/dist/contracts/device.contract.js.map +1 -1
  48. package/dist/contracts/extensions.contract.d.ts +1 -0
  49. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  50. package/dist/contracts/extensions.contract.js +1 -1
  51. package/dist/contracts/extensions.contract.js.map +1 -1
  52. package/dist/contracts/git.contract.d.ts +7 -0
  53. package/dist/contracts/git.contract.d.ts.map +1 -1
  54. package/dist/contracts/issues.contract.d.ts +11 -0
  55. package/dist/contracts/issues.contract.d.ts.map +1 -1
  56. package/dist/contracts/needs.contract.d.ts +408 -0
  57. package/dist/contracts/needs.contract.d.ts.map +1 -1
  58. package/dist/contracts/offload.contract.d.ts +4 -0
  59. package/dist/contracts/offload.contract.d.ts.map +1 -1
  60. package/dist/contracts/ports.contract.d.ts +8 -0
  61. package/dist/contracts/ports.contract.d.ts.map +1 -1
  62. package/dist/contracts/ports.contract.js +6 -5
  63. package/dist/contracts/ports.contract.js.map +1 -1
  64. package/dist/contracts/remote.contract.d.ts +121 -0
  65. package/dist/contracts/remote.contract.d.ts.map +1 -0
  66. package/dist/contracts/remote.contract.js +80 -0
  67. package/dist/contracts/remote.contract.js.map +1 -0
  68. package/dist/contracts/runner.contract.d.ts +716 -15
  69. package/dist/contracts/runner.contract.d.ts.map +1 -1
  70. package/dist/contracts/runner.contract.js +49 -2
  71. package/dist/contracts/runner.contract.js.map +1 -1
  72. package/dist/contracts/runners.contract.d.ts +16 -0
  73. package/dist/contracts/runners.contract.d.ts.map +1 -0
  74. package/dist/contracts/runners.contract.js +15 -0
  75. package/dist/contracts/runners.contract.js.map +1 -0
  76. package/dist/contracts/safety.contract.d.ts.map +1 -1
  77. package/dist/contracts/safety.contract.js +1 -0
  78. package/dist/contracts/safety.contract.js.map +1 -1
  79. package/dist/contracts/seal.contract.d.ts +105 -0
  80. package/dist/contracts/seal.contract.d.ts.map +1 -1
  81. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  82. package/dist/contracts/secrets.contract.js +6 -0
  83. package/dist/contracts/secrets.contract.js.map +1 -1
  84. package/dist/contracts/sessions.contract.d.ts +48 -0
  85. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  86. package/dist/contracts/settings.contract.d.ts +28 -0
  87. package/dist/contracts/settings.contract.d.ts.map +1 -1
  88. package/dist/contracts/settings.contract.js +1 -0
  89. package/dist/contracts/settings.contract.js.map +1 -1
  90. package/dist/contracts/skills.contract.d.ts +6 -0
  91. package/dist/contracts/skills.contract.d.ts.map +1 -1
  92. package/dist/contracts/system.contract.d.ts +482 -4
  93. package/dist/contracts/system.contract.d.ts.map +1 -1
  94. package/dist/contracts/system.contract.js +70 -3
  95. package/dist/contracts/system.contract.js.map +1 -1
  96. package/dist/contracts/translator.contract.d.ts +7 -0
  97. package/dist/contracts/translator.contract.d.ts.map +1 -1
  98. package/dist/contracts/usage.contract.d.ts +3 -0
  99. package/dist/contracts/usage.contract.d.ts.map +1 -1
  100. package/dist/events/agent-events.d.ts +194 -0
  101. package/dist/events/agent-events.d.ts.map +1 -1
  102. package/dist/events/agent-events.js +2 -2
  103. package/dist/events/agent-events.js.map +1 -1
  104. package/dist/events/agent-transcript.d.ts +48 -0
  105. package/dist/events/agent-transcript.d.ts.map +1 -1
  106. package/dist/events/agent-words.d.ts +5 -0
  107. package/dist/events/agent-words.d.ts.map +1 -1
  108. package/dist/events/agent-words.js +20 -1
  109. package/dist/events/agent-words.js.map +1 -1
  110. package/dist/events/failure-rows.d.ts +2 -2
  111. package/dist/events/failure-rows.d.ts.map +1 -1
  112. package/dist/events/failure-rows.js +13 -13
  113. package/dist/events/failure-rows.js.map +1 -1
  114. package/dist/events/refusal-incidents.d.ts +1 -0
  115. package/dist/events/refusal-incidents.d.ts.map +1 -1
  116. package/dist/events/refusal-incidents.js +42 -19
  117. package/dist/events/refusal-incidents.js.map +1 -1
  118. package/dist/events/resume.d.ts.map +1 -1
  119. package/dist/events/resume.js +12 -12
  120. package/dist/events/resume.js.map +1 -1
  121. package/dist/events/sandbox-notice.d.ts.map +1 -1
  122. package/dist/events/sandbox-notice.js.map +1 -1
  123. package/dist/events/system-events.d.ts +102 -0
  124. package/dist/events/system-events.d.ts.map +1 -1
  125. package/dist/events/transcript.d.ts +240 -0
  126. package/dist/events/transcript.d.ts.map +1 -1
  127. package/dist/ids/conversation-ids.d.ts +1 -0
  128. package/dist/ids/conversation-ids.d.ts.map +1 -1
  129. package/dist/ids/conversation-ids.js +2 -1
  130. package/dist/ids/conversation-ids.js.map +1 -1
  131. package/dist/ids/project-id.d.ts.map +1 -1
  132. package/dist/ids/project-id.js +4 -4
  133. package/dist/ids/project-id.js.map +1 -1
  134. package/dist/ids/run-row-ids.d.ts +8 -0
  135. package/dist/ids/run-row-ids.d.ts.map +1 -0
  136. package/dist/ids/run-row-ids.js +32 -0
  137. package/dist/ids/run-row-ids.js.map +1 -0
  138. package/dist/index.d.ts +12 -4
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +12 -4
  141. package/dist/index.js.map +1 -1
  142. package/dist/models/agent-catalog.d.ts.map +1 -1
  143. package/dist/models/agent-catalog.js +3 -2
  144. package/dist/models/agent-catalog.js.map +1 -1
  145. package/dist/models/agent-lanes.d.ts.map +1 -1
  146. package/dist/models/agent-lanes.js +4 -1
  147. package/dist/models/agent-lanes.js.map +1 -1
  148. package/dist/models/agent-runtimes.d.ts.map +1 -1
  149. package/dist/models/agent-runtimes.js +2 -2
  150. package/dist/models/agent-runtimes.js.map +1 -1
  151. package/dist/models/agent-standing.d.ts +6 -1
  152. package/dist/models/agent-standing.d.ts.map +1 -1
  153. package/dist/models/agent-standing.js +1 -0
  154. package/dist/models/agent-standing.js.map +1 -1
  155. package/dist/models/providers/provider-traits.d.ts +215 -0
  156. package/dist/models/providers/provider-traits.d.ts.map +1 -0
  157. package/dist/models/providers/provider-traits.js +60 -0
  158. package/dist/models/providers/provider-traits.js.map +1 -0
  159. package/dist/netd/browser-wire.d.ts +58 -1
  160. package/dist/netd/browser-wire.d.ts.map +1 -1
  161. package/dist/netd/browser-wire.js +27 -0
  162. package/dist/netd/browser-wire.js.map +1 -1
  163. package/dist/netd/generated/browser-wire.d.ts +135 -0
  164. package/dist/netd/generated/browser-wire.d.ts.map +1 -1
  165. package/dist/netd/generated/wire.d.ts +56 -1
  166. package/dist/netd/generated/wire.d.ts.map +1 -1
  167. package/dist/policy/admin/admin-grant.d.ts +21 -0
  168. package/dist/policy/admin/admin-grant.d.ts.map +1 -0
  169. package/dist/policy/admin/admin-grant.js +41 -0
  170. package/dist/policy/admin/admin-grant.js.map +1 -0
  171. package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
  172. package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
  173. package/dist/policy/capabilities/capability-kinds.js +47 -0
  174. package/dist/policy/capabilities/capability-kinds.js.map +1 -0
  175. package/dist/policy/command-classes.d.ts.map +1 -1
  176. package/dist/policy/command-classes.js +3 -1
  177. package/dist/policy/command-classes.js.map +1 -1
  178. package/dist/policy/device-programs.d.ts +79 -2
  179. package/dist/policy/device-programs.d.ts.map +1 -1
  180. package/dist/policy/device-programs.js +15 -16
  181. package/dist/policy/device-programs.js.map +1 -1
  182. package/dist/policy/reserved-servers.d.ts.map +1 -1
  183. package/dist/policy/reserved-servers.js +5 -1
  184. package/dist/policy/reserved-servers.js.map +1 -1
  185. package/dist/policy/role-capability.d.ts.map +1 -1
  186. package/dist/policy/role-capability.js +2 -1
  187. package/dist/policy/role-capability.js.map +1 -1
  188. package/dist/policy/shell/command-normalise.d.ts +10 -0
  189. package/dist/policy/shell/command-normalise.d.ts.map +1 -0
  190. package/dist/policy/shell/command-normalise.js +153 -0
  191. package/dist/policy/shell/command-normalise.js.map +1 -0
  192. package/dist/protocol/doors/listener-protocol.d.ts +4 -0
  193. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  194. package/dist/protocol/doors/listener-protocol.js +4 -0
  195. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  196. package/dist/protocol/doors/loopback-proof.d.ts +8 -0
  197. package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
  198. package/dist/protocol/doors/loopback-proof.js +11 -0
  199. package/dist/protocol/doors/loopback-proof.js.map +1 -0
  200. package/dist/protocol/doors/pass-scopes.d.ts +4 -0
  201. package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
  202. package/dist/protocol/doors/pass-scopes.js +3 -0
  203. package/dist/protocol/doors/pass-scopes.js.map +1 -0
  204. package/dist/protocol/doors/runner-protocol.d.ts +187 -0
  205. package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
  206. package/dist/protocol/doors/runner-protocol.js +48 -1
  207. package/dist/protocol/doors/runner-protocol.js.map +1 -1
  208. package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
  209. package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
  210. package/dist/protocol/doors/sandbox-pass.js +42 -10
  211. package/dist/protocol/doors/sandbox-pass.js.map +1 -1
  212. package/dist/protocol/member-reach.d.ts +6 -0
  213. package/dist/protocol/member-reach.d.ts.map +1 -1
  214. package/dist/protocol/member-reach.js +24 -0
  215. package/dist/protocol/member-reach.js.map +1 -1
  216. package/dist/protocol/peer-mcp-server.d.ts +2 -0
  217. package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
  218. package/dist/protocol/peer-mcp-server.js +1 -0
  219. package/dist/protocol/peer-mcp-server.js.map +1 -1
  220. package/dist/protocol/raw/raw-json-routes.d.ts +518 -0
  221. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  222. package/dist/protocol/raw/raw-json-routes.js +26 -2
  223. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  224. package/dist/protocol/raw/raw-routes.d.ts +182 -2
  225. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  226. package/dist/protocol/raw/raw-routes.js +67 -35
  227. package/dist/protocol/raw/raw-routes.js.map +1 -1
  228. package/dist/protocol/route-meta.d.ts.map +1 -1
  229. package/dist/protocol/route-meta.js.map +1 -1
  230. package/dist/schemas/account-routes.d.ts +176 -0
  231. package/dist/schemas/account-routes.d.ts.map +1 -0
  232. package/dist/schemas/account-routes.js +73 -0
  233. package/dist/schemas/account-routes.js.map +1 -0
  234. package/dist/schemas/activity.d.ts.map +1 -1
  235. package/dist/schemas/activity.js.map +1 -1
  236. package/dist/schemas/agent-background.d.ts +48 -0
  237. package/dist/schemas/agent-background.d.ts.map +1 -0
  238. package/dist/schemas/agent-background.js +63 -0
  239. package/dist/schemas/agent-background.js.map +1 -0
  240. package/dist/schemas/agent-land.d.ts +7 -0
  241. package/dist/schemas/agent-land.d.ts.map +1 -1
  242. package/dist/schemas/agent-land.js +11 -0
  243. package/dist/schemas/agent-land.js.map +1 -1
  244. package/dist/schemas/agent.d.ts +16 -0
  245. package/dist/schemas/agent.d.ts.map +1 -1
  246. package/dist/schemas/agent.js +3 -4
  247. package/dist/schemas/agent.js.map +1 -1
  248. package/dist/schemas/agents-list.d.ts +42 -0
  249. package/dist/schemas/agents-list.d.ts.map +1 -1
  250. package/dist/schemas/agents.d.ts +668 -17
  251. package/dist/schemas/agents.d.ts.map +1 -1
  252. package/dist/schemas/agents.js +16 -41
  253. package/dist/schemas/agents.js.map +1 -1
  254. package/dist/schemas/auto-approve.d.ts +12 -0
  255. package/dist/schemas/auto-approve.d.ts.map +1 -0
  256. package/dist/schemas/auto-approve.js +12 -0
  257. package/dist/schemas/auto-approve.js.map +1 -0
  258. package/dist/schemas/automations.d.ts +83 -0
  259. package/dist/schemas/automations.d.ts.map +1 -1
  260. package/dist/schemas/automations.js +11 -1
  261. package/dist/schemas/automations.js.map +1 -1
  262. package/dist/schemas/bookmarks.d.ts +85 -0
  263. package/dist/schemas/bookmarks.d.ts.map +1 -0
  264. package/dist/schemas/bookmarks.js +56 -0
  265. package/dist/schemas/bookmarks.js.map +1 -0
  266. package/dist/schemas/bridge-heads.d.ts +57 -0
  267. package/dist/schemas/bridge-heads.d.ts.map +1 -0
  268. package/dist/schemas/bridge-heads.js +22 -0
  269. package/dist/schemas/bridge-heads.js.map +1 -0
  270. package/dist/schemas/browser-tools.d.ts +167 -0
  271. package/dist/schemas/browser-tools.d.ts.map +1 -0
  272. package/dist/schemas/browser-tools.js +121 -0
  273. package/dist/schemas/browser-tools.js.map +1 -0
  274. package/dist/schemas/browsing.d.ts +139 -0
  275. package/dist/schemas/browsing.d.ts.map +1 -0
  276. package/dist/schemas/browsing.js +83 -0
  277. package/dist/schemas/browsing.js.map +1 -0
  278. package/dist/schemas/capabilities.d.ts +57 -0
  279. package/dist/schemas/capabilities.d.ts.map +1 -1
  280. package/dist/schemas/capabilities.js +9 -0
  281. package/dist/schemas/capabilities.js.map +1 -1
  282. package/dist/schemas/checkout-hooks.d.ts +24 -0
  283. package/dist/schemas/checkout-hooks.d.ts.map +1 -0
  284. package/dist/schemas/checkout-hooks.js +23 -0
  285. package/dist/schemas/checkout-hooks.js.map +1 -0
  286. package/dist/schemas/ci-fleet.d.ts +216 -0
  287. package/dist/schemas/ci-fleet.d.ts.map +1 -0
  288. package/dist/schemas/ci-fleet.js +87 -0
  289. package/dist/schemas/ci-fleet.js.map +1 -0
  290. package/dist/schemas/connection-hub.d.ts +3 -1
  291. package/dist/schemas/connection-hub.d.ts.map +1 -1
  292. package/dist/schemas/connection-hub.js +2 -1
  293. package/dist/schemas/connection-hub.js.map +1 -1
  294. package/dist/schemas/context-continues.d.ts.map +1 -1
  295. package/dist/schemas/context-continues.js +2 -2
  296. package/dist/schemas/context-continues.js.map +1 -1
  297. package/dist/schemas/context-trim.js +3 -3
  298. package/dist/schemas/context-trim.js.map +1 -1
  299. package/dist/schemas/device-remote.d.ts +84 -0
  300. package/dist/schemas/device-remote.d.ts.map +1 -0
  301. package/dist/schemas/device-remote.js +54 -0
  302. package/dist/schemas/device-remote.js.map +1 -0
  303. package/dist/schemas/devices.d.ts +64 -0
  304. package/dist/schemas/devices.d.ts.map +1 -1
  305. package/dist/schemas/devices.js +6 -1
  306. package/dist/schemas/devices.js.map +1 -1
  307. package/dist/schemas/environment.d.ts +1 -0
  308. package/dist/schemas/environment.d.ts.map +1 -1
  309. package/dist/schemas/environment.js +1 -0
  310. package/dist/schemas/environment.js.map +1 -1
  311. package/dist/schemas/extension-updates.d.ts +2 -0
  312. package/dist/schemas/extension-updates.d.ts.map +1 -1
  313. package/dist/schemas/extension-updates.js +4 -0
  314. package/dist/schemas/extension-updates.js.map +1 -1
  315. package/dist/schemas/git/git.d.ts +13 -0
  316. package/dist/schemas/git/git.d.ts.map +1 -1
  317. package/dist/schemas/git/git.js +7 -7
  318. package/dist/schemas/git/git.js.map +1 -1
  319. package/dist/schemas/git/index-run.d.ts +1 -0
  320. package/dist/schemas/git/index-run.d.ts.map +1 -1
  321. package/dist/schemas/host-power.d.ts +54 -0
  322. package/dist/schemas/host-power.d.ts.map +1 -0
  323. package/dist/schemas/host-power.js +46 -0
  324. package/dist/schemas/host-power.js.map +1 -0
  325. package/dist/schemas/hosts.d.ts +145 -0
  326. package/dist/schemas/hosts.d.ts.map +1 -1
  327. package/dist/schemas/hosts.js +15 -1
  328. package/dist/schemas/hosts.js.map +1 -1
  329. package/dist/schemas/issues.d.ts +44 -0
  330. package/dist/schemas/issues.d.ts.map +1 -1
  331. package/dist/schemas/issues.js +12 -0
  332. package/dist/schemas/issues.js.map +1 -1
  333. package/dist/schemas/keep-warm.d.ts.map +1 -1
  334. package/dist/schemas/keep-warm.js +2 -3
  335. package/dist/schemas/keep-warm.js.map +1 -1
  336. package/dist/schemas/keyring-native.d.ts.map +1 -1
  337. package/dist/schemas/keyring-native.js +3 -1
  338. package/dist/schemas/keyring-native.js.map +1 -1
  339. package/dist/schemas/keyring.d.ts +1 -0
  340. package/dist/schemas/keyring.d.ts.map +1 -1
  341. package/dist/schemas/keyring.js +3 -1
  342. package/dist/schemas/keyring.js.map +1 -1
  343. package/dist/schemas/members.d.ts.map +1 -1
  344. package/dist/schemas/members.js +2 -14
  345. package/dist/schemas/members.js.map +1 -1
  346. package/dist/schemas/metrics.d.ts +8 -0
  347. package/dist/schemas/metrics.d.ts.map +1 -1
  348. package/dist/schemas/metrics.js +8 -0
  349. package/dist/schemas/metrics.js.map +1 -1
  350. package/dist/schemas/needs.d.ts +349 -1
  351. package/dist/schemas/needs.d.ts.map +1 -1
  352. package/dist/schemas/needs.js +45 -5
  353. package/dist/schemas/needs.js.map +1 -1
  354. package/dist/schemas/offload.d.ts +9 -0
  355. package/dist/schemas/offload.d.ts.map +1 -1
  356. package/dist/schemas/offload.js +2 -1
  357. package/dist/schemas/offload.js.map +1 -1
  358. package/dist/schemas/ports.d.ts +4 -0
  359. package/dist/schemas/ports.d.ts.map +1 -1
  360. package/dist/schemas/ports.js +3 -0
  361. package/dist/schemas/ports.js.map +1 -1
  362. package/dist/schemas/providers/capacity.d.ts +6 -0
  363. package/dist/schemas/providers/capacity.d.ts.map +1 -1
  364. package/dist/schemas/providers/handoff.d.ts.map +1 -1
  365. package/dist/schemas/providers/handoff.js +11 -11
  366. package/dist/schemas/providers/handoff.js.map +1 -1
  367. package/dist/schemas/providers/provider-oauth.d.ts +14 -0
  368. package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
  369. package/dist/schemas/providers/provider-oauth.js +6 -2
  370. package/dist/schemas/providers/provider-oauth.js.map +1 -1
  371. package/dist/schemas/providers/refusals.d.ts +12 -0
  372. package/dist/schemas/providers/refusals.d.ts.map +1 -1
  373. package/dist/schemas/providers/refusals.js +4 -0
  374. package/dist/schemas/providers/refusals.js.map +1 -1
  375. package/dist/schemas/providers/switched.js +1 -1
  376. package/dist/schemas/providers/switched.js.map +1 -1
  377. package/dist/schemas/queued-trial-retry.d.ts +7 -0
  378. package/dist/schemas/queued-trial-retry.d.ts.map +1 -0
  379. package/dist/schemas/queued-trial-retry.js +8 -0
  380. package/dist/schemas/queued-trial-retry.js.map +1 -0
  381. package/dist/schemas/remote-access.d.ts +138 -0
  382. package/dist/schemas/remote-access.d.ts.map +1 -0
  383. package/dist/schemas/remote-access.js +72 -0
  384. package/dist/schemas/remote-access.js.map +1 -0
  385. package/dist/schemas/run-targets.d.ts.map +1 -1
  386. package/dist/schemas/run-targets.js +2 -1
  387. package/dist/schemas/run-targets.js.map +1 -1
  388. package/dist/schemas/runner-views.d.ts +24 -0
  389. package/dist/schemas/runner-views.d.ts.map +1 -0
  390. package/dist/schemas/runner-views.js +16 -0
  391. package/dist/schemas/runner-views.js.map +1 -0
  392. package/dist/schemas/sandbox-reach.d.ts +157 -0
  393. package/dist/schemas/sandbox-reach.d.ts.map +1 -0
  394. package/dist/schemas/sandbox-reach.js +112 -0
  395. package/dist/schemas/sandbox-reach.js.map +1 -0
  396. package/dist/schemas/seal.d.ts +1 -1
  397. package/dist/schemas/seal.d.ts.map +1 -1
  398. package/dist/schemas/seal.js +1 -1
  399. package/dist/schemas/seal.js.map +1 -1
  400. package/dist/schemas/settings.d.ts +44 -0
  401. package/dist/schemas/settings.d.ts.map +1 -1
  402. package/dist/schemas/settings.js +24 -1
  403. package/dist/schemas/settings.js.map +1 -1
  404. package/dist/schemas/system.d.ts +19 -0
  405. package/dist/schemas/system.d.ts.map +1 -1
  406. package/dist/schemas/system.js +9 -0
  407. package/dist/schemas/system.js.map +1 -1
  408. package/dist/schemas/terminal.d.ts +182 -0
  409. package/dist/schemas/terminal.d.ts.map +1 -1
  410. package/dist/schemas/terminal.js +60 -1
  411. package/dist/schemas/terminal.js.map +1 -1
  412. package/dist/state/auth-state.d.ts.map +1 -1
  413. package/dist/state/auth-state.js +2 -0
  414. package/dist/state/auth-state.js.map +1 -1
  415. package/dist/state/definition.d.ts +64 -0
  416. package/dist/state/definition.d.ts.map +1 -1
  417. package/dist/state/runtime-state.d.ts +4 -1
  418. package/dist/state/runtime-state.d.ts.map +1 -1
  419. package/dist/state/runtime-state.js +2 -1
  420. package/dist/state/runtime-state.js.map +1 -1
  421. package/dist/state/workspace-state.d.ts +1 -1
  422. package/dist/state/workspace-state.d.ts.map +1 -1
  423. package/dist/state/workspace-state.js +1 -1
  424. package/dist/state/workspace-state.js.map +1 -1
  425. package/dist/sync/workspace-sync-ignores.d.ts +4 -0
  426. package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
  427. package/dist/sync/workspace-sync-ignores.js +75 -0
  428. package/dist/sync/workspace-sync-ignores.js.map +1 -0
  429. package/dist/text/land-rows.d.ts.map +1 -1
  430. package/dist/text/land-rows.js +13 -17
  431. package/dist/text/land-rows.js.map +1 -1
  432. package/dist/text/notice-rows.js +6 -6
  433. package/dist/text/notice-rows.js.map +1 -1
  434. package/dist/text/pages.d.ts.map +1 -1
  435. package/dist/text/pages.js +17 -4
  436. package/dist/text/pages.js.map +1 -1
  437. package/dist/text/transcript-fold.js +2 -2
  438. package/dist/text/transcript-fold.js.map +1 -1
  439. package/package.json +5 -5
  440. package/src/app-routes/app-pages.ts +3 -0
  441. package/src/app-routes/index.ts +1 -0
  442. package/src/app-routes/return-path.ts +16 -0
  443. package/src/contracts/accounts.contract.ts +3 -0
  444. package/src/contracts/agents.contract.ts +41 -5
  445. package/src/contracts/automations.contract.ts +2 -0
  446. package/src/contracts/bookmarks.contract.ts +66 -0
  447. package/src/contracts/browser.contract.ts +181 -0
  448. package/src/contracts/capabilities.contract.ts +7 -2
  449. package/src/contracts/device-ci-runners.contract.ts +81 -0
  450. package/src/contracts/device.contract.ts +15 -0
  451. package/src/contracts/extensions.contract.ts +1 -1
  452. package/src/contracts/ports.contract.ts +6 -6
  453. package/src/contracts/remote.contract.ts +104 -0
  454. package/src/contracts/runner.contract.ts +117 -3
  455. package/src/contracts/runners.contract.ts +19 -0
  456. package/src/contracts/safety.contract.ts +2 -0
  457. package/src/contracts/secrets.contract.ts +12 -0
  458. package/src/contracts/settings.contract.ts +2 -0
  459. package/src/contracts/system.contract.ts +98 -3
  460. package/src/events/agent-events.ts +3 -2
  461. package/src/events/agent-words.test.ts +19 -1
  462. package/src/events/agent-words.ts +33 -1
  463. package/src/events/failure-rows.ts +13 -14
  464. package/src/events/refusal-incidents.ts +60 -19
  465. package/src/events/resume.test.ts +3 -3
  466. package/src/events/resume.ts +12 -18
  467. package/src/events/sandbox-notice.ts +2 -0
  468. package/src/ids/conversation-ids.test.ts +3 -1
  469. package/src/ids/conversation-ids.ts +6 -4
  470. package/src/ids/project-dir.test.ts +1 -1
  471. package/src/ids/project-dir.ts +1 -1
  472. package/src/ids/project-id.test.ts +14 -0
  473. package/src/ids/project-id.ts +6 -4
  474. package/src/ids/run-row-ids.test.ts +38 -0
  475. package/src/ids/run-row-ids.ts +49 -0
  476. package/src/index.ts +18 -6
  477. package/src/models/agent-catalog.test.ts +7 -4
  478. package/src/models/agent-catalog.ts +3 -2
  479. package/src/models/agent-lanes.ts +8 -1
  480. package/src/models/agent-runtimes.ts +7 -6
  481. package/src/models/agent-standing.ts +13 -0
  482. package/src/models/provider-specs.test.ts +2 -2
  483. package/src/models/providers/provider-traits.test.ts +71 -0
  484. package/src/models/providers/provider-traits.ts +144 -0
  485. package/src/netd/browser-wire.ts +97 -0
  486. package/src/netd/generated/browser-wire.json +904 -0
  487. package/src/netd/generated/browser-wire.ts +62 -3
  488. package/src/netd/generated/netd-wire.json +299 -1
  489. package/src/netd/generated/wire.ts +27 -6
  490. package/src/netd/wire-manifests.test.ts +92 -1
  491. package/src/policy/admin/admin-grant.ts +69 -0
  492. package/src/policy/capabilities/capability-kinds.test.ts +112 -0
  493. package/src/policy/capabilities/capability-kinds.ts +110 -0
  494. package/src/policy/command-classes.ts +5 -3
  495. package/src/policy/credential-material.ts +1 -1
  496. package/src/policy/device-programs.ts +29 -20
  497. package/src/policy/overlay-lint.ts +1 -1
  498. package/src/policy/reserved-servers.ts +5 -1
  499. package/src/policy/role-capability.ts +3 -1
  500. package/src/policy/shell/command-normalise.test.ts +72 -0
  501. package/src/policy/shell/command-normalise.ts +212 -0
  502. package/src/policy/tests/admin-grant.test.ts +35 -0
  503. package/src/policy/tests/command-classes.test.ts +41 -0
  504. package/src/protocol/doors/listener-protocol.ts +18 -1
  505. package/src/protocol/doors/loopback-proof.ts +34 -0
  506. package/src/protocol/doors/pass-scopes.ts +12 -0
  507. package/src/protocol/doors/runner-protocol.ts +133 -4
  508. package/src/protocol/doors/sandbox-pass.test.ts +33 -1
  509. package/src/protocol/doors/sandbox-pass.ts +92 -16
  510. package/src/protocol/ingress-contract.fixture.json +9 -1
  511. package/src/protocol/member-reach.test.ts +40 -1
  512. package/src/protocol/member-reach.ts +40 -0
  513. package/src/protocol/peer-mcp-server.ts +6 -0
  514. package/src/protocol/raw/raw-json-routes.ts +48 -1
  515. package/src/protocol/raw/raw-routes.ts +99 -36
  516. package/src/protocol/route-meta.ts +4 -1
  517. package/src/schemas/account-routes.ts +126 -0
  518. package/src/schemas/activity.ts +4 -3
  519. package/src/schemas/agent-background.ts +104 -0
  520. package/src/schemas/agent-land.ts +21 -2
  521. package/src/schemas/agent.ts +3 -4
  522. package/src/schemas/agents.ts +26 -65
  523. package/src/schemas/auto-approve.ts +31 -0
  524. package/src/schemas/automations.ts +26 -1
  525. package/src/schemas/bookmarks.ts +79 -0
  526. package/src/schemas/bridge-heads.ts +33 -0
  527. package/src/schemas/browser-tools.ts +164 -0
  528. package/src/schemas/browsing.ts +129 -0
  529. package/src/schemas/capabilities.ts +32 -0
  530. package/src/schemas/checkout-hooks.ts +44 -0
  531. package/src/schemas/ci-fleet.ts +180 -0
  532. package/src/schemas/compose-overlay.test.ts +1 -1
  533. package/src/schemas/compose-overlay.ts +1 -1
  534. package/src/schemas/connection-hub.ts +4 -2
  535. package/src/schemas/context-continues.ts +6 -3
  536. package/src/schemas/context-trim.test.ts +6 -6
  537. package/src/schemas/context-trim.ts +3 -3
  538. package/src/schemas/data-protection.ts +1 -1
  539. package/src/schemas/device-remote.ts +106 -0
  540. package/src/schemas/device-swaps.test.ts +1 -1
  541. package/src/schemas/devices.ts +19 -1
  542. package/src/schemas/egress-private.test.ts +1 -1
  543. package/src/schemas/environment.ts +4 -0
  544. package/src/schemas/extension-updates.ts +8 -0
  545. package/src/schemas/git/git.ts +14 -14
  546. package/src/schemas/host-power.ts +79 -0
  547. package/src/schemas/hosts.ts +37 -2
  548. package/src/schemas/intentic-os.ts +2 -2
  549. package/src/schemas/issues.ts +14 -0
  550. package/src/schemas/keep-warm.test.ts +1 -1
  551. package/src/schemas/keep-warm.ts +2 -3
  552. package/src/schemas/keyring-native.test.ts +11 -3
  553. package/src/schemas/keyring-native.ts +3 -1
  554. package/src/schemas/keyring.ts +6 -1
  555. package/src/schemas/members.ts +4 -16
  556. package/src/schemas/metrics.test.ts +9 -1
  557. package/src/schemas/metrics.ts +8 -0
  558. package/src/schemas/needs.ts +68 -5
  559. package/src/schemas/offload.ts +6 -3
  560. package/src/schemas/ports.ts +5 -0
  561. package/src/schemas/providers/handoff.test.ts +8 -10
  562. package/src/schemas/providers/handoff.ts +11 -12
  563. package/src/schemas/providers/provider-oauth.ts +10 -2
  564. package/src/schemas/providers/refusals.ts +9 -0
  565. package/src/schemas/providers/switched.test.ts +6 -6
  566. package/src/schemas/providers/switched.ts +1 -1
  567. package/src/schemas/queued-trial-retry.ts +14 -0
  568. package/src/schemas/remote-access.ts +143 -0
  569. package/src/schemas/run-targets.ts +2 -1
  570. package/src/schemas/runner-views.ts +27 -0
  571. package/src/schemas/sandbox-reach.ts +161 -0
  572. package/src/schemas/seal.ts +2 -1
  573. package/src/schemas/settings.test.ts +5 -4
  574. package/src/schemas/settings.ts +54 -10
  575. package/src/schemas/state-plan.test.ts +1 -1
  576. package/src/schemas/state-plan.ts +2 -2
  577. package/src/schemas/system.ts +16 -1
  578. package/src/schemas/terminal.ts +87 -1
  579. package/src/schemas/updates.test.ts +1 -1
  580. package/src/schemas/updates.ts +1 -1
  581. package/src/state/auth-state.ts +6 -0
  582. package/src/state/runtime-state.test.ts +3 -2
  583. package/src/state/runtime-state.ts +7 -1
  584. package/src/state/update-probation.ts +1 -1
  585. package/src/state/ways-back.test.ts +1 -1
  586. package/src/state/workspace-state.test.ts +2 -0
  587. package/src/state/workspace-state.ts +4 -4
  588. package/src/sync/workspace-sync-ignores.test.ts +48 -0
  589. package/src/sync/workspace-sync-ignores.ts +143 -0
  590. package/src/text/land-rows.ts +13 -18
  591. package/src/text/notice-rows.ts +6 -6
  592. package/src/text/pages.ts +34 -7
  593. package/src/text/transcript-fold.test.ts +77 -39
  594. package/src/text/transcript-fold.ts +2 -2
@@ -23,4 +23,18 @@ describe("project id", () => {
23
23
  expect(normalizeProjectId(text)).toBeUndefined();
24
24
  }
25
25
  });
26
+
27
+ it("drops a query, a fragment and trailing slashes as before", () => {
28
+ expect(normalizeProjectId("https://github.com/acme/app.git//?ref=main#readme")).toBe("github.com/acme/app");
29
+ expect(normalizeProjectId("https://github.com//acme///app///")).toBe("github.com/acme/app");
30
+ expect(normalizeProjectId("https://github.com/acme/app#x?y")).toBe("github.com/acme/app");
31
+ expect(normalizeProjectId("github.com/acme/.git")).toBeUndefined();
32
+ });
33
+
34
+ it("answers at once for a long run of `#` or `/`", () => {
35
+ // No clock: the old patterns were quadratic on these, so a return of them runs past the test's own timeout.
36
+ expect(normalizeProjectId(`#${"#".repeat(100_000)}`)).toBeUndefined();
37
+ expect(normalizeProjectId(`a${"/".repeat(100_000)}b?`)).toBeUndefined();
38
+ expect(normalizeProjectId(`github.com${"/".repeat(100_000)}acme/app${"/".repeat(100_000)}`)).toBe("github.com/acme/app");
39
+ });
26
40
  });
@@ -24,11 +24,13 @@ export const normalizeProjectId = (raw: string): string | undefined => {
24
24
  text = text.replace(/^[^@/]*@/, "");
25
25
  text = text.replace(/^([^/:]+):\d+\//, "$1/");
26
26
  }
27
- text = text
28
- .replace(/[?#].*$/, "")
29
- .replace(/\/+$/, "")
30
- .replace(/\.git$/i, "")
27
+ // Cut at the first `?` or `#` and collapse slash runs before taking the trailing one: `/[?#].*$/` and `/\/+$/` retried
28
+ // from every `#` or `/` in a long remote, quadratic in its length.
29
+ const query = text.search(/[?#]/);
30
+ text = (query === -1 ? text : text.slice(0, query))
31
31
  .replace(/\/+/g, "/")
32
+ .replace(/\/$/, "")
33
+ .replace(/\.git$/i, "")
32
34
  .toLowerCase();
33
35
  return text.length <= PROJECT_ID_MAX && PROJECT_ID.test(text) ? text : undefined;
34
36
  };
@@ -0,0 +1,38 @@
1
+ import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
2
+ import { RunRowIds } from "./run-row-ids.js";
3
+
4
+ // The stamp every server of a run puts on its rows (the sandbox daemon, the desktop app's agents on a computer): which
5
+ // run made a row, and the row's own id, kept in step with the fold's rows by following its patches.
6
+
7
+ const row = (text: string, rowId?: string): TranscriptRow => (rowId === undefined ? { role: `assistant`, text } : { role: `assistant`, text, rowId });
8
+
9
+ describe(`RunRowIds`, () => {
10
+ it(`keeps the ids its opening rows came with, and draws one for a row that has none`, () => {
11
+ const ids = new RunRowIds([row(`kept`, `row_kept`), row(`new`)]);
12
+ expect(ids.at(0)).toBe(`row_kept`);
13
+ expect(ids.at(1)).toEqual(expect.any(String));
14
+ expect(ids.at(1)).not.toBe(`row_kept`);
15
+ expect(ids.at(2)).toBeUndefined();
16
+ });
17
+
18
+ it(`stamps an appended row with its run and a fresh id, and names the row every later change is about`, () => {
19
+ const ids = new RunRowIds([]);
20
+ const appended = ids.stamp({ op: `append`, row: row(`hello`) }, `run-1`);
21
+ const rowId = ids.at(0);
22
+ expect(appended).toEqual({ op: `append`, row: { role: `assistant`, text: `hello`, run: `run-1`, rowId } });
23
+ expect(ids.stamp({ op: `text`, index: 0, text: ` there` }, `run-1`)).toEqual({ op: `text`, index: 0, rowId, text: ` there` });
24
+ const replaced: TranscriptPatch = ids.stamp({ op: `replace`, index: 0, row: row(`whole`) }, `run-1`);
25
+ expect(replaced).toEqual({ op: `replace`, index: 0, rowId, row: { role: `assistant`, text: `whole`, run: `run-1`, rowId } });
26
+ });
27
+
28
+ it(`lets a dropped row's id go, so the rows after it keep their own`, () => {
29
+ const ids = new RunRowIds([row(`a`, `row_a`), row(`b`, `row_b`)]);
30
+ expect(ids.stamp({ op: `drop`, index: 0 }, `run-1`)).toEqual({ op: `drop`, index: 0, rowId: `row_a` });
31
+ expect(ids.at(0)).toBe(`row_b`);
32
+ });
33
+
34
+ it(`leaves a change to a row it never saw as it came`, () => {
35
+ const ids = new RunRowIds([]);
36
+ expect(ids.stamp({ op: `text`, index: 3, text: `late` }, `run-1`)).toEqual({ op: `text`, index: 3, text: `late` });
37
+ });
38
+ });
@@ -0,0 +1,49 @@
1
+ import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
2
+ import { newRowId } from "./row-ids.js";
3
+
4
+ // Each of a run's rows by its own id (TranscriptRow.rowId), kept beside the fold's rows (index for index) rather than in
5
+ // them: the fold mints nothing, and every change it makes to its rows leaves as a patch, so following the patches, in
6
+ // the fold's order, keeps the two aligned. A run carried on after a restart keeps the ids its rows were drawn under,
7
+ // which the windows showing it hold.
8
+ //
9
+ // In the contract, beside the row ids it hands out, because everything that serves a run stamps its rows the same way: the sandbox's
10
+ // daemon, and the desktop app's agents on a computer (2026-11-24). A reader finds where a run's rows sit in what it
11
+ // already holds by these stamps (`run`, `rowId`), so a server that left them off had its finished turn drawn twice.
12
+ export class RunRowIds {
13
+ private readonly ids: string[];
14
+
15
+ constructor(opening: readonly TranscriptRow[]) {
16
+ this.ids = opening.map((row) => row.rowId ?? newRowId());
17
+ }
18
+
19
+ /** The id of the row at `index` as the fold holds it now. */
20
+ at(index: number): string | undefined {
21
+ return this.ids[index];
22
+ }
23
+
24
+ /**
25
+ * A patch naming its row, and the stamp `run` on any row it carries: an append draws a new id (or keeps the one the
26
+ * row came with), a drop lets its row's go, and every other change names the row it changes.
27
+ */
28
+ stamp(patch: TranscriptPatch, run: string): TranscriptPatch {
29
+ switch (patch.op) {
30
+ case "append": {
31
+ const rowId = patch.row.rowId ?? newRowId();
32
+ this.ids.push(rowId);
33
+ return { ...patch, row: { ...patch.row, run, rowId } };
34
+ }
35
+ case "drop": {
36
+ const [rowId] = this.ids.splice(patch.index, 1);
37
+ return rowId === undefined ? patch : { ...patch, rowId };
38
+ }
39
+ case "replace": {
40
+ const rowId = this.ids[patch.index];
41
+ return rowId === undefined ? { ...patch, row: { ...patch.row, run } } : { ...patch, rowId, row: { ...patch.row, run, rowId } };
42
+ }
43
+ default: {
44
+ const rowId = this.ids[patch.index];
45
+ return rowId === undefined ? patch : { ...patch, rowId };
46
+ }
47
+ }
48
+ }
49
+ }
package/src/index.ts CHANGED
@@ -13,6 +13,8 @@ import { areasContract } from "./contracts/areas.contract.js";
13
13
  import { auditContract } from "./contracts/audit.contract.js";
14
14
  import { automationsContract } from "./contracts/automations.contract.js";
15
15
  import { basesContract } from "./contracts/bases.contract.js";
16
+ import { bookmarksContract } from "./contracts/bookmarks.contract.js";
17
+ import { browserContract } from "./contracts/browser.contract.js";
16
18
  import { capabilitiesContract } from "./contracts/capabilities.contract.js";
17
19
  import { choresContract } from "./contracts/chores.contract.js";
18
20
  import { ciContract } from "./contracts/ci.contract.js";
@@ -33,19 +35,21 @@ import { offloadContract } from "./contracts/offload.contract.js";
33
35
  import { orgContract } from "./contracts/org.contract.js";
34
36
  import { pagesContract } from "./contracts/pages.contract.js";
35
37
  import { panelsContract } from "./contracts/panels.contract.js";
36
- import { rolesContract } from "./contracts/roles.contract.js";
37
38
  import { portsContract } from "./contracts/ports.contract.js";
38
39
  import { privacyContract } from "./contracts/privacy.contract.js";
39
40
  import { providersContract } from "./contracts/providers.contract.js";
40
41
  import { publicContract } from "./contracts/public.contract.js";
41
42
  import { pushContract } from "./contracts/push.contract.js";
43
+ import { remoteContract } from "./contracts/remote.contract.js";
44
+ import { runnersContract } from "./contracts/runners.contract.js";
45
+ import { rolesContract } from "./contracts/roles.contract.js";
42
46
  import { runsContract } from "./contracts/runs.contract.js";
43
47
  import { safetyContract } from "./contracts/safety.contract.js";
48
+ import { sealContract } from "./contracts/seal.contract.js";
44
49
  import { secretsContract } from "./contracts/secrets.contract.js";
45
50
  import { servicesContract } from "./contracts/services.contract.js";
46
51
  import { sessionsContract } from "./contracts/sessions.contract.js";
47
52
  import { settingsContract } from "./contracts/settings.contract.js";
48
- import { sealContract } from "./contracts/seal.contract.js";
49
53
  import { shareContract } from "./contracts/share.contract.js";
50
54
  import { skillsContract } from "./contracts/skills.contract.js";
51
55
  import { systemContract } from "./contracts/system.contract.js";
@@ -71,6 +75,8 @@ export const sandboxContract: {
71
75
  audit: typeof auditContract;
72
76
  automations: typeof automationsContract;
73
77
  bases: typeof basesContract;
78
+ bookmarks: typeof bookmarksContract;
79
+ browser: typeof browserContract;
74
80
  capabilities: typeof capabilitiesContract;
75
81
  chores: typeof choresContract;
76
82
  ci: typeof ciContract;
@@ -91,19 +97,21 @@ export const sandboxContract: {
91
97
  org: typeof orgContract;
92
98
  pages: typeof pagesContract;
93
99
  panels: typeof panelsContract;
94
- roles: typeof rolesContract;
95
100
  ports: typeof portsContract;
96
101
  privacy: typeof privacyContract;
97
102
  providers: typeof providersContract;
98
103
  public: typeof publicContract;
99
104
  push: typeof pushContract;
105
+ remote: typeof remoteContract;
106
+ roles: typeof rolesContract;
107
+ runners: typeof runnersContract;
100
108
  runs: typeof runsContract;
101
109
  safety: typeof safetyContract;
110
+ seal: typeof sealContract;
102
111
  secrets: typeof secretsContract;
103
112
  services: typeof servicesContract;
104
113
  sessions: typeof sessionsContract;
105
114
  settings: typeof settingsContract;
106
- seal: typeof sealContract;
107
115
  share: typeof shareContract;
108
116
  skills: typeof skillsContract;
109
117
  system: typeof systemContract;
@@ -123,6 +131,8 @@ export const sandboxContract: {
123
131
  audit: auditContract,
124
132
  automations: automationsContract,
125
133
  bases: basesContract,
134
+ bookmarks: bookmarksContract,
135
+ browser: browserContract,
126
136
  capabilities: capabilitiesContract,
127
137
  chores: choresContract,
128
138
  ci: ciContract,
@@ -143,19 +153,21 @@ export const sandboxContract: {
143
153
  org: orgContract,
144
154
  pages: pagesContract,
145
155
  panels: panelsContract,
146
- roles: rolesContract,
147
156
  ports: portsContract,
148
157
  privacy: privacyContract,
149
158
  providers: providersContract,
150
159
  public: publicContract,
151
160
  push: pushContract,
161
+ remote: remoteContract,
162
+ roles: rolesContract,
163
+ runners: runnersContract,
152
164
  runs: runsContract,
153
165
  safety: safetyContract,
166
+ seal: sealContract,
154
167
  secrets: secretsContract,
155
168
  services: servicesContract,
156
169
  sessions: sessionsContract,
157
170
  settings: settingsContract,
158
- seal: sealContract,
159
171
  share: shareContract,
160
172
  skills: skillsContract,
161
173
  system: systemContract,
@@ -275,14 +275,17 @@ test("the ceiling has nothing to disclose; a floor names what it lacks", () => {
275
275
  expect(acp).not.toContain("no code runs, shell only");
276
276
  expect(acpCaps.commands).toBe(true);
277
277
  expect(acpCaps.terminals).toBe(true);
278
- // Per-tool approvals and questions ride the protocol's own seams (request_permission, form elicitation); effort and
279
- // isolation stay off, since the record is every agent's and the pooled process is every conversation's. Recovery is
280
- // the turn's one exit's (a failure coded by its words, a silent agent coded an outage), so it is every agent's too.
278
+ // Per-tool approvals, questions and effort ride the protocol's own seams (request_permission, form elicitation, the
279
+ // session's `thought_level` option where the agent offers one); isolation stays off, since the pooled process is
280
+ // every conversation's. Recovery is the turn's one exit's (a failure coded by its words, a silent agent coded an
281
+ // outage), so it is every agent's too.
281
282
  expect(acpCaps.permissions).toBe("modes");
282
283
  expect(acpCaps.questions).toBe(true);
284
+ expect(acpCaps.effort).toBe(true);
283
285
  expect(acp).not.toContain("no per-tool approvals");
284
286
  expect(acp).not.toContain("no clarifying questions");
285
- expect(acp).toEqual(expect.arrayContaining(["no effort control", "worktree by cwd only"]));
287
+ expect(acp).not.toContain("no effort control");
288
+ expect(acp).toContain("worktree by cwd only");
286
289
  expect(acp).not.toContain("no auto-resume after outage");
287
290
 
288
291
  // Codex takes the daemon's own servers too, over the door, so only plugins are missing.
@@ -1,3 +1,4 @@
1
+ import { providerHas, providerTraits } from "./providers/provider-traits.js";
1
2
  import { ACP, type AgentCapabilities, CLAUDE_CODE, CODEX, MUSE, OPENCODE, PI } from "./agent-runtimes.js";
2
3
  import { type LoopTerms, type NativeProvider, PROVIDER_SPECS, type ProviderAccess, type ProviderLoops, providerSpec } from "./provider-specs.js";
3
4
  import type { AgentHarness, AgentLoop, AgentProvider, PermissionMode } from "../schemas/agent.js";
@@ -257,7 +258,7 @@ export const EFFORT_TIERS: readonly string[] = ["minimal", "low", "medium", "hig
257
258
  // Filters exactly one pair: Claude's `max` with thinking explicitly false, the one combination Anthropic's API refuses
258
259
  // (400). Absent thinking is not off; the model's own default answers, every other tier or provider passes through.
259
260
  export const effortAllowed = (effort: string, provider: AgentProvider, thinking: boolean | undefined): boolean =>
260
- effort !== "max" || provider !== "claude" || thinking !== false;
261
+ effort !== "max" || providerTraits(provider)?.effortScale !== "anthropic" || thinking !== false;
261
262
 
262
263
  // The same rule applied as a repair, not a filter: a route, extension, restored tab or pinned model can all bypass the
263
264
  // picker. The tier moves, not the thinking setting, since turning thinking off was the user's own deliberate choice.
@@ -273,4 +274,4 @@ export const sendableThinking = (effort: string | undefined, thinking: boolean |
273
274
  // false). The Claude Code loop also needs a first-party route, since it serves translated and non-Anthropic endpoints
274
275
  // that refuse it; any other loop that can ask speaks to its own vendor, whose catalog is where the badge came from.
275
276
  export const fastAllowed = (capabilities: AgentCapabilities, provider: AgentProvider, badges: readonly ModelBadge[] | undefined): boolean =>
276
- capabilities.fastMode && (capabilities.runtime !== "claude-code" || provider === "claude") && (badges ?? []).includes("fast");
277
+ capabilities.fastMode && (capabilities.runtime !== "claude-code" || providerHas(provider, "firstPartyAnthropic")) && (badges ?? []).includes("fast");
@@ -3,7 +3,7 @@ import type { AutomationApproval } from "../schemas/automations.js";
3
3
  import { goesBySelf } from "../schemas/agent-next.js";
4
4
  import { automationOf, movedAt, type StackMember, stackHeads } from "./agent-stack.js";
5
5
  import { parentOf } from "./agent-starter.js";
6
- import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, turnInFlight, turnWorking, watching } from "./agent-standing.js";
6
+ import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, supervising, turnInFlight, turnWorking, watching } from "./agent-standing.js";
7
7
 
8
8
  // The lane every surface files a conversation in, and what of a fleet calls the person. Moved here from the editor
9
9
  // (_editor/web/src/models/agent-status/agentStatus-lanes.ts, which re-exports it) on 2026-10-16, so the daemon's
@@ -81,6 +81,13 @@ export const laneOf = (agent: AgentStanding): FleetLane => {
81
81
  if (goesBySelf(agent)) {
82
82
  return "active";
83
83
  }
84
+ // A parent whose own turn ended while what it started works on (a workflow run, a spawned child still running or
85
+ // still waiting to start) is woken by their reports, so the same holds: Finished would call over an orchestration
86
+ // that is half done. The board already lifted a family into Active for a child conversation running under it
87
+ // (childFold), but a workflow between agents and a child not yet started are no card, so nothing lifted it.
88
+ if (supervising(agent)) {
89
+ return "active";
90
+ }
84
91
  // `landed`/`idle`/`ready` all finish here: `ready` is work held on the branch because auto-land is off, still
85
92
  // finished rather than attention since nothing is failing. `resumed` lands here too: nothing running, nothing
86
93
  // owed.
@@ -268,9 +268,10 @@ export const ACP: AgentCapabilities = {
268
268
  mcp: "tools",
269
269
  // The JS backend is the door's `code` server, each script asked of the turn's gate before it runs.
270
270
  execution: ["shell", "js"],
271
- // A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts), but this
272
- // record is every agent's and most offer none, so the picker shows no scale.
273
- effort: false,
271
+ // A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts); one offering
272
+ // none keeps its own level. The agent owns its reasoning settings, so the picker draws no scale and names no effort
273
+ // for it (the editor's effortScale.ts ownsReasoning): only an effort a turn names itself, a spawn's, reaches it.
274
+ effort: true,
274
275
  fastMode: false,
275
276
  // One warm process serves every conversation on the agent, each session in its own cwd; a mount namespace belongs to
276
277
  // one turn, so a process shared across conversations can stand in none of them. Keying the pool by namespace would
@@ -329,9 +330,9 @@ export const GROK_BUILD: AgentCapabilities = {
329
330
  ...ACP,
330
331
  runtime: "grok-build",
331
332
  effort: true,
332
- // Its ask-user tool reaches its own client through an xAI protocol extension, not form elicitation, so the daemon
333
- // switches the tool off for every session it opens (grok-build-cli.ts) rather than leave the model asking nobody.
334
- questions: false,
333
+ // Its ask-user tool asks through an xAI protocol extension (`_x.ai/ask_user_question`), not form elicitation; the
334
+ // daemon answers it on the question card through Grok's dialect (@intentic/acp-events dialects/grok-questions.ts).
335
+ questions: true,
335
336
  };
336
337
 
337
338
  // Pi driven over its RPC mode: above the ACP floor and below the Claude Code ceiling. Real mid-turn steering, an effort
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  type AgentAttention,
3
3
  type AgentJob,
4
+ type AgentScriptRun,
4
5
  type AgentStatus,
5
6
  type AgentWatch,
6
7
  awaitsWake,
@@ -67,6 +68,10 @@ export interface AgentStanding {
67
68
  // review, test or ask, which hangs under that conversation's card and is never reported to it
68
69
  // (subagents/child-report.ts), so nothing it stops on is that conversation's news. Absent for every other one.
69
70
  readonly fresh?: { readonly of: string } | undefined;
71
+ // Workflow runs it started that are still going (AgentSummary.scriptRuns), and how many of the subagents it started
72
+ // are still live (AgentSummary.subagents); `supervising` reads both. Absent for nearly every conversation.
73
+ readonly scriptRuns?: readonly AgentScriptRun[] | undefined;
74
+ readonly subagents?: { readonly running: number } | undefined;
70
75
  }
71
76
 
72
77
  // A spent allowance, not a failure to fix: nothing broken, and it comes back. Read off `failureCode` rather than
@@ -100,6 +105,14 @@ export const conflictIsYours = (agent: AgentStanding): boolean =>
100
105
  // reading (a watch, or a wake waiting in its queue); a daemon older than it is read by its watches.
101
106
  export const watching = (agent: AgentStanding): boolean => awaitsWake(agent);
102
107
 
108
+ // Something it started is still at work and will be reported to it in a turn of its own: a workflow run still starting
109
+ // agents, or a subagent that is live (spawned, handed over a link, or waiting for a seat, memory or the owner to
110
+ // start). Such a parent is not finished even when its own turn ended. An in-process subagent dies with the turn that ran
111
+ // it (subagents.ts `closeSubagents`), so once that turn is over the count holds only children that will report back.
112
+ // 2026-11-25: an orchestrator whose workflow had three children waiting to start was shown in Finished with "3 at work"
113
+ // in its tray.
114
+ export const supervising = (agent: AgentStanding): boolean => (agent.scriptRuns?.length ?? 0) > 0 || (agent.subagents?.running ?? 0) > 0;
115
+
103
116
  // The running job behind one of its armed watches that sits at a prompt (AgentJob.inputWait: blocked reading its
104
117
  // terminal, nothing moving), the first such where there are several. Its watch fires only on an exit that will not
105
118
  // come, so the card names it and offers to end it.
@@ -165,12 +165,12 @@ test("cursor holds every mode, a tool list, the terminal panel and its own skill
165
165
  });
166
166
 
167
167
  // Devin runs the ACP floor under its own name: what the floor gained (approvals, questions) it has too, and the effort
168
- // scale it does not advertise stays off.
168
+ // scale it does not advertise stays off, the one place it differs from the floor.
169
169
  test("devin is the ACP floor under its own name", () => {
170
170
  const devin = capabilitiesOf("devin", "native");
171
171
  const floor = capabilitiesOf("some-installed-agent", "native");
172
172
  expect(devin.runtime).toBe("devin");
173
- expect({ ...devin, runtime: floor.runtime }).toEqual(floor);
173
+ expect({ ...devin, runtime: floor.runtime, effort: floor.effort }).toEqual(floor);
174
174
  expect(devin.permissions).toBe("modes");
175
175
  expect(devin.questions).toBe(true);
176
176
  expect(devin.effort).toBe(false);
@@ -0,0 +1,71 @@
1
+ import { HUB_ACCOUNT_PROVIDERS } from "../../schemas/connection-hub.js";
2
+ import { NATIVE_PROVIDERS, providerSpec } from "../provider-specs.js";
3
+ import { HUB_PROVIDERS, isModelPlaced, PROVIDER_TRAITS, providerHas, providersWhere, providerTraits } from "./provider-traits.js";
4
+
5
+ // Sorted, so a pin reads as a list and order never decides a match.
6
+ const sorted = (providers: Iterable<string>): string[] => [...providers].toSorted();
7
+ const where = (pick: Parameters<typeof providersWhere>[0]): string[] => sorted(providersWhere(pick));
8
+ const byProvider = <T,>(read: (provider: (typeof NATIVE_PROVIDERS)[number]) => T): Record<string, T> =>
9
+ Object.fromEntries(NATIVE_PROVIDERS.map((provider) => [provider, read(provider)]));
10
+
11
+ test("the table has one row per native provider", () => {
12
+ expect(sorted(Object.keys(PROVIDER_TRAITS))).toEqual(sorted(NATIVE_PROVIDERS));
13
+ });
14
+
15
+ // Each pin is the hand-kept list or `provider === "x"` branch the trait replaced, as it stood on 2026-11-23: a change here is
16
+ // a behaviour change.
17
+ test("every derived set matches the list or branch it replaced", () => {
18
+ expect(HUB_ACCOUNT_PROVIDERS).toEqual(["cursor", "devin", "zai", "meta"]);
19
+ expect(HUB_PROVIDERS).toEqual(HUB_ACCOUNT_PROVIDERS);
20
+ expect(where((t) => t.firstPartyAnthropic)).toEqual(["claude"]);
21
+ expect(where((t) => t.effortScale === "anthropic")).toEqual(["claude"]);
22
+ expect(where((t) => t.thinkingToggle)).toEqual(["claude"]);
23
+ expect(where((t) => t.seatProbe)).toEqual(["claude"]);
24
+ expect(where((t) => t.placesByModel)).toEqual(sorted(["claude", "cursor"]));
25
+ expect(where((t) => t.childPlacement === "per-account")).toEqual(["claude"]);
26
+ expect(where((t) => t.needsProject)).toEqual(["gemini"]);
27
+ expect(where((t) => t.refusesClaudeCodeMentions)).toEqual(["gemini"]);
28
+ expect(where((t) => t.opencodeWire === "openai-responses")).toEqual(["codex"]);
29
+ expect(where((t) => t.pasteBack === "token")).toEqual(["devin"]);
30
+ expect(where((t) => t.signInCodePrefilled)).toEqual(["grok"]);
31
+ expect(Object.fromEntries(providersWhere((t) => t.ownSignInLoop !== undefined).map((p) => [p, providerTraits(p)?.ownSignInLoop]))).toEqual({
32
+ grok: "opencode",
33
+ });
34
+ expect(Object.fromEntries(providersWhere((t) => t.translatorSignIn !== undefined).map((p) => [p, providerTraits(p)?.translatorSignIn]))).toEqual({
35
+ codex: "device-or-loopback",
36
+ grok: "device",
37
+ kimi: "device",
38
+ gemini: "redirect",
39
+ });
40
+ });
41
+
42
+ test("the compliance report's provider hosts are today's", () => {
43
+ expect(byProvider((provider) => providerTraits(provider)?.destination)).toEqual({
44
+ claude: { hosts: ["api.anthropic.com"], operator: "Anthropic PBC", region: "US", thirdCountry: true },
45
+ codex: { hosts: ["chatgpt.com", "api.openai.com"], operator: "OpenAI", region: "US", thirdCountry: true },
46
+ grok: { hosts: ["api.x.ai"], operator: "xAI", region: "US", thirdCountry: true },
47
+ kimi: { hosts: ["api.kimi.com"], operator: "Moonshot AI", region: "CN", thirdCountry: true },
48
+ gemini: undefined,
49
+ cursor: undefined,
50
+ devin: undefined,
51
+ meta: { hosts: ["api.meta.ai"], operator: "Meta Platforms", region: "US", thirdCountry: true },
52
+ zai: { hosts: ["api.z.ai"], operator: "Z.ai", thirdCountry: true },
53
+ });
54
+ });
55
+
56
+ test("translator-only traits sit on translator providers alone", () => {
57
+ for (const provider of NATIVE_PROVIDERS) {
58
+ const translator = providerSpec(provider)?.auth.kind === "translator";
59
+ expect({ provider, signIn: providerTraits(provider)?.translatorSignIn !== undefined }).toEqual({ provider, signIn: translator });
60
+ if (providerTraits(provider)?.ownSignInLoop !== undefined) {
61
+ expect(translator).toBe(true);
62
+ }
63
+ }
64
+ });
65
+
66
+ test("a string no native provider answers to has no traits", () => {
67
+ expect(providerTraits("endpoint/acme")).toBeUndefined();
68
+ expect(providerHas("endpoint/acme", "firstPartyAnthropic")).toBe(false);
69
+ expect(isModelPlaced("cursor")).toBe(true);
70
+ expect(isModelPlaced("devin")).toBe(false);
71
+ });
@@ -0,0 +1,144 @@
1
+ // WHAT EACH NATIVE PROVIDER IS, beyond what its spec row (provider-specs.ts) says it costs and how it signs in: one row per
2
+ // provider of every fact a surface used to answer with `provider === "x"`. A reader asks the trait ("is Anthropic itself on
3
+ // the wire", "does its key travel through the hub"), never the name, so a new provider is one row the compiler makes
4
+ // complete (`satisfies Record<NativeProvider, …>`) instead of a branch hunt across the editor and the daemon.
5
+ // Pure data with no schema, so the contract lock does not see it.
6
+ import type { AgentLoop } from "../../schemas/agent.js";
7
+ import type { NativeProvider } from "../provider-specs.js";
8
+
9
+ // Who a model provider's own hosts belong to, for the compliance report's data-flow list. A region is given only where the
10
+ // operator publishes one.
11
+ export interface ProviderDestination {
12
+ readonly hosts: readonly string[];
13
+ readonly operator: string;
14
+ readonly region?: string;
15
+ readonly thirdCountry: boolean;
16
+ }
17
+
18
+ export interface ProviderTraits {
19
+ // Its account is a key that does not rotate, so it may travel through the connections hub (schemas/connection-hub.ts).
20
+ readonly hubAccount: boolean;
21
+ // Its own hosts and their operator, for the compliance report; absent where the report names none.
22
+ readonly destination?: ProviderDestination;
23
+ // Anthropic itself serves the wire, not a vendor wearing Anthropic's API: its prompt cache lifetime is published, the
24
+ // CLI's tool search and fast mode reach it, and a cold-cache trim is worth making.
25
+ readonly firstPartyAnthropic: boolean;
26
+ // The reasoning ladder its models climb before a catalog says otherwise. `anthropic` claims `max` in the floor, and its
27
+ // API refuses `max` with thinking explicitly off.
28
+ readonly effortScale: "anthropic" | "standard";
29
+ // It publishes an extended-thinking switch a person may turn off.
30
+ readonly thinkingToggle: boolean;
31
+ // An account an admin held back is probed again for its seat (the seat check), so a lifted hold is found.
32
+ readonly seatProbe: boolean;
33
+ // Which account an unnamed pick lands on depends on the model, so an unnamed model is judged as the catalog's default.
34
+ readonly placesByModel: boolean;
35
+ // How the budget planner sees its ready accounts: each one a child may be placed on, or one pool the gateway spends.
36
+ readonly childPlacement: "per-account" | "pooled";
37
+ // A loop of a translator provider that spends the provider's own default sign-in (held at its own door) rather than the
38
+ // translator's subscription: OpenCode holds Grok's xAI account. That loop holds one such account.
39
+ readonly ownSignInLoop?: AgentLoop;
40
+ // How the translator's sign-in for it runs, for a translator provider: a device code, a redirect the vendor's page
41
+ // ends on, or a device login that may instead end on a loopback redirect a paired computer catches.
42
+ readonly translatorSignIn?: "device" | "redirect" | "device-or-loopback";
43
+ // Its sign-in must also discover a billing project, and a credential filed without one cannot run a turn.
44
+ readonly needsProject: boolean;
45
+ // Its vendor refuses requests that announce Claude Code, so the gateway scrubs those phrases on the way out.
46
+ readonly refusesClaudeCodeMentions: boolean;
47
+ // The wire its translator route speaks to OpenCode: Codex's own Responses surface, or Chat Completions.
48
+ readonly opencodeWire: "openai-responses" | "openai-chat";
49
+ // What the person brings back from a paste-back sign-in, named as the vendor's page names it.
50
+ readonly pasteBack: "code" | "token";
51
+ // Its device sign-in opens with the code already filled in, so there is nothing to type.
52
+ readonly signInCodePrefilled: boolean;
53
+ }
54
+
55
+ const plain = {
56
+ hubAccount: false,
57
+ firstPartyAnthropic: false,
58
+ effortScale: "standard",
59
+ thinkingToggle: false,
60
+ seatProbe: false,
61
+ placesByModel: false,
62
+ childPlacement: "pooled",
63
+ needsProject: false,
64
+ refusesClaudeCodeMentions: false,
65
+ opencodeWire: "openai-chat",
66
+ pasteBack: "code",
67
+ signInCodePrefilled: false,
68
+ } as const;
69
+
70
+ // In PROVIDER_SPECS' order but for Z.ai before Meta: a derived list keeps the table's order, and HUB_ACCOUNT_PROVIDERS'
71
+ // wire enum has always listed zai first (the contract lock would see the swap).
72
+ export const PROVIDER_TRAITS = {
73
+ claude: {
74
+ ...plain,
75
+ destination: { hosts: ["api.anthropic.com"], operator: "Anthropic PBC", region: "US", thirdCountry: true },
76
+ firstPartyAnthropic: true,
77
+ effortScale: "anthropic",
78
+ thinkingToggle: true,
79
+ seatProbe: true,
80
+ placesByModel: true,
81
+ childPlacement: "per-account",
82
+ },
83
+ codex: {
84
+ ...plain,
85
+ destination: { hosts: ["chatgpt.com", "api.openai.com"], operator: "OpenAI", region: "US", thirdCountry: true },
86
+ translatorSignIn: "device-or-loopback",
87
+ opencodeWire: "openai-responses",
88
+ },
89
+ grok: {
90
+ ...plain,
91
+ destination: { hosts: ["api.x.ai"], operator: "xAI", region: "US", thirdCountry: true },
92
+ ownSignInLoop: "opencode",
93
+ translatorSignIn: "device",
94
+ signInCodePrefilled: true,
95
+ },
96
+ kimi: {
97
+ ...plain,
98
+ destination: { hosts: ["api.kimi.com"], operator: "Moonshot AI", region: "CN", thirdCountry: true },
99
+ translatorSignIn: "device",
100
+ },
101
+ gemini: { ...plain, translatorSignIn: "redirect", needsProject: true, refusesClaudeCodeMentions: true },
102
+ cursor: { ...plain, hubAccount: true, placesByModel: true },
103
+ devin: { ...plain, hubAccount: true, pasteBack: "token" },
104
+ zai: { ...plain, hubAccount: true, destination: { hosts: ["api.z.ai"], operator: "Z.ai", thirdCountry: true } },
105
+ meta: { ...plain, hubAccount: true, destination: { hosts: ["api.meta.ai"], operator: "Meta Platforms", region: "US", thirdCountry: true } },
106
+ } as const satisfies Record<NativeProvider, ProviderTraits>;
107
+
108
+ type Table = typeof PROVIDER_TRAITS;
109
+
110
+ // The providers whose row matches `P`, as a type: `ProvidersWhere<{ hubAccount: true }>` is "cursor" | "devin" | ….
111
+ export type ProvidersWhere<P> = { [K in keyof Table]: Table[K] extends P ? K : never }[keyof Table];
112
+
113
+ // The table's own keys, which `satisfies` holds to exactly the native providers.
114
+ // SAFETY: Object.keys of a table that satisfies Record<NativeProvider, …> lists native providers and nothing else.
115
+ const PROVIDERS = Object.keys(PROVIDER_TRAITS) as NativeProvider[];
116
+
117
+ // The providers whose row passes `test`, in the table's order.
118
+ export const providersWhere = (test: (traits: ProviderTraits) => boolean): readonly NativeProvider[] =>
119
+ PROVIDERS.filter((provider) => test(PROVIDER_TRAITS[provider]));
120
+
121
+ // One provider's row, or undefined for anything else (an endpoint, an ACP agent, a provider a newer build knows).
122
+ export const providerTraits = (provider: string): ProviderTraits | undefined => {
123
+ const found = PROVIDERS.find((candidate) => candidate === provider);
124
+ return found === undefined ? undefined : PROVIDER_TRAITS[found];
125
+ };
126
+
127
+ // Whether a provider's row has this trait on; false for a string no native provider answers to.
128
+ export const providerHas = (provider: string, trait: BooleanTrait): boolean => providerTraits(provider)?.[trait] === true;
129
+
130
+ type BooleanTrait = { [K in keyof ProviderTraits]-?: ProviderTraits[K] extends boolean ? K : never }[keyof ProviderTraits];
131
+
132
+ // The providers whose row matches `P`, as a list typed by them. `P` and `test` must say the same thing; the contract's test
133
+ // pins every list built with this to its literal.
134
+ const providersTyped = <P>(test: (traits: ProviderTraits) => boolean): readonly ProvidersWhere<P>[] =>
135
+ // SAFETY: the caller's `test` selects the rows `P` describes, pinned per list in provider-traits.test.ts.
136
+ providersWhere(test) as readonly ProvidersWhere<P>[];
137
+
138
+ // The providers whose static key may travel through the connections hub, typed by them.
139
+ export type HubProvider = ProvidersWhere<{ readonly hubAccount: true }>;
140
+ export const HUB_PROVIDERS = providersTyped<{ readonly hubAccount: true }>((traits) => traits.hubAccount);
141
+
142
+ // The providers whose unnamed account pick is judged for the model, typed by them.
143
+ export type ModelPlacedProvider = ProvidersWhere<{ readonly placesByModel: true }>;
144
+ export const isModelPlaced = (provider: string): provider is ModelPlacedProvider => providerHas(provider, "placesByModel");