@sixb/core 0.2.5 → 0.2.7

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 (427) hide show
  1. package/dist/actions/index.js +36 -35
  2. package/dist/actions/index.js.map +1 -1
  3. package/dist/actions/validation.d.ts.map +1 -1
  4. package/dist/agents/errors.d.ts +1 -1
  5. package/dist/agents/errors.d.ts.map +1 -1
  6. package/dist/agents/execution.d.ts +17 -2
  7. package/dist/agents/execution.d.ts.map +1 -1
  8. package/dist/agents/index.d.ts +3 -3
  9. package/dist/agents/index.d.ts.map +1 -1
  10. package/dist/agents/index.js +53 -45
  11. package/dist/agents/index.js.map +1 -1
  12. package/dist/agents/model-routing.d.ts +16 -2
  13. package/dist/agents/model-routing.d.ts.map +1 -1
  14. package/dist/agents/request.d.ts +45 -4
  15. package/dist/agents/request.d.ts.map +1 -1
  16. package/dist/agents/run-events.d.ts +4 -0
  17. package/dist/agents/run-events.d.ts.map +1 -1
  18. package/dist/agents/run-session-children.d.ts.map +1 -1
  19. package/dist/agents/run-token.d.ts +6 -0
  20. package/dist/agents/run-token.d.ts.map +1 -1
  21. package/dist/agents/run-turn.d.ts +9 -1
  22. package/dist/agents/run-turn.d.ts.map +1 -1
  23. package/dist/agents/streams/index.d.ts +1 -1
  24. package/dist/agents/streams/index.d.ts.map +1 -1
  25. package/dist/agents/streams/index.js +1 -1
  26. package/dist/agents/streams/internal.d.ts +2 -1
  27. package/dist/agents/streams/internal.d.ts.map +1 -1
  28. package/dist/agents/streams/internal.js +22 -2
  29. package/dist/agents/streams/internal.js.map +1 -1
  30. package/dist/agents/streams/protocol.d.ts +37 -0
  31. package/dist/agents/streams/protocol.d.ts.map +1 -1
  32. package/dist/agents/streams/steps.d.ts +24 -0
  33. package/dist/agents/streams/steps.d.ts.map +1 -0
  34. package/dist/agents/thread-access.d.ts +44 -2
  35. package/dist/agents/thread-access.d.ts.map +1 -1
  36. package/dist/artifacts/live/server.js +19 -18
  37. package/dist/artifacts/live/server.js.map +1 -1
  38. package/dist/artifacts/publish/index.js +18 -17
  39. package/dist/artifacts/publish/index.js.map +1 -1
  40. package/dist/artifacts/publish/merge.d.ts +2 -1
  41. package/dist/artifacts/publish/merge.d.ts.map +1 -1
  42. package/dist/artifacts/run-query.d.ts.map +1 -1
  43. package/dist/auth/index.js +6 -6
  44. package/dist/authorization/index.js +2 -2
  45. package/dist/bootstrap/discovery.d.ts +6 -0
  46. package/dist/bootstrap/discovery.d.ts.map +1 -1
  47. package/dist/bootstrap/index.js +40 -38
  48. package/dist/bootstrap/index.js.map +2 -2
  49. package/dist/calendar.d.ts +55 -0
  50. package/dist/calendar.d.ts.map +1 -0
  51. package/dist/calendar.js +19 -0
  52. package/dist/calendar.js.map +9 -0
  53. package/dist/chunk-04r2fdsd.js +386 -0
  54. package/dist/chunk-04r2fdsd.js.map +14 -0
  55. package/dist/{chunk-gjhrz66x.js → chunk-06kpaqg4.js} +248 -21
  56. package/dist/{chunk-gjhrz66x.js.map → chunk-06kpaqg4.js.map} +6 -6
  57. package/dist/{chunk-5a4a52tq.js → chunk-0pmpwn3g.js} +18 -2
  58. package/dist/chunk-0pmpwn3g.js.map +10 -0
  59. package/dist/{chunk-nxysqbt0.js → chunk-389ybvw9.js} +6 -2
  60. package/dist/chunk-389ybvw9.js.map +10 -0
  61. package/dist/{chunk-xcrnrpfh.js → chunk-394zjzjs.js} +20 -10
  62. package/dist/{chunk-xcrnrpfh.js.map → chunk-394zjzjs.js.map} +5 -5
  63. package/dist/{chunk-stmxh0hv.js → chunk-3neam1y5.js} +2 -2
  64. package/dist/{chunk-zeykm8my.js → chunk-3qtk0070.js} +16 -42
  65. package/dist/chunk-3qtk0070.js.map +14 -0
  66. package/dist/{chunk-0hkdtwqk.js → chunk-44hrfmbk.js} +5 -5
  67. package/dist/{chunk-ey1p8w68.js → chunk-5pz3htbe.js} +86 -5
  68. package/dist/chunk-5pz3htbe.js.map +13 -0
  69. package/dist/{chunk-s5pj68fa.js → chunk-5sswe5ej.js} +2 -2
  70. package/dist/{chunk-k3jh8gsg.js → chunk-5xkqasvn.js} +21 -4
  71. package/dist/chunk-5xkqasvn.js.map +10 -0
  72. package/dist/{chunk-5t9gm5tt.js → chunk-6md802cc.js} +38 -14
  73. package/dist/chunk-6md802cc.js.map +22 -0
  74. package/dist/{chunk-3zagkr6w.js → chunk-7mhbs9yy.js} +4 -4
  75. package/dist/{chunk-3zagkr6w.js.map → chunk-7mhbs9yy.js.map} +1 -1
  76. package/dist/{chunk-ewqn51gr.js → chunk-88xeh6zx.js} +6 -4
  77. package/dist/{chunk-ewqn51gr.js.map → chunk-88xeh6zx.js.map} +4 -4
  78. package/dist/{chunk-z1njfqqs.js → chunk-8qmp9fpa.js} +783 -171
  79. package/dist/{chunk-z1njfqqs.js.map → chunk-8qmp9fpa.js.map} +13 -13
  80. package/dist/{chunk-r2psmn42.js → chunk-95ps0k5q.js} +3 -3
  81. package/dist/{chunk-r2psmn42.js.map → chunk-95ps0k5q.js.map} +3 -3
  82. package/dist/{chunk-fpf57gca.js → chunk-9cyq87qa.js} +276 -68
  83. package/dist/{chunk-fpf57gca.js.map → chunk-9cyq87qa.js.map} +6 -6
  84. package/dist/{chunk-q9nkpr8k.js → chunk-9tpmfh3n.js} +1 -1
  85. package/dist/chunk-9wr3yajk.js.map +2 -2
  86. package/dist/{chunk-naxjka9v.js → chunk-brhp9d97.js} +2 -2
  87. package/dist/{chunk-8a8k38tz.js → chunk-brybqw5k.js} +1 -1
  88. package/dist/{chunk-vehcr9eb.js → chunk-cg7cygfj.js} +1 -1
  89. package/dist/{chunk-b4escq4c.js → chunk-cpy282b8.js} +6 -6
  90. package/dist/chunk-dq3t5sr3.js +114 -0
  91. package/dist/chunk-dq3t5sr3.js.map +11 -0
  92. package/dist/{chunk-68hm50qh.js → chunk-fdk0ks9p.js} +16 -46
  93. package/dist/chunk-fdk0ks9p.js.map +12 -0
  94. package/dist/{chunk-fzae1jpq.js → chunk-fycac8e9.js} +50 -16
  95. package/dist/{chunk-fzae1jpq.js.map → chunk-fycac8e9.js.map} +3 -3
  96. package/dist/{chunk-zft9bzbc.js → chunk-hkbks1xm.js} +2 -1
  97. package/dist/{chunk-zft9bzbc.js.map → chunk-hkbks1xm.js.map} +3 -3
  98. package/dist/{chunk-m3qx2pns.js → chunk-hvq8xs66.js} +28 -12
  99. package/dist/{chunk-m3qx2pns.js.map → chunk-hvq8xs66.js.map} +5 -5
  100. package/dist/{chunk-bc3y6gff.js → chunk-jka26v8c.js} +1 -1
  101. package/dist/{chunk-s1mqyqmm.js → chunk-js9e6487.js} +12 -8
  102. package/dist/chunk-js9e6487.js.map +18 -0
  103. package/dist/{chunk-zxhym8tr.js → chunk-k29rdc3h.js} +1 -1
  104. package/dist/{chunk-rg725hry.js → chunk-m1cwncee.js} +86 -34
  105. package/dist/{chunk-rg725hry.js.map → chunk-m1cwncee.js.map} +8 -8
  106. package/dist/{chunk-1yh6jgtz.js → chunk-mrs7jy17.js} +2 -2
  107. package/dist/{chunk-qavwr628.js → chunk-n1hbwc6y.js} +5 -6
  108. package/dist/chunk-n1hbwc6y.js.map +12 -0
  109. package/dist/{chunk-pqvvqc65.js → chunk-pfdq1ga6.js} +3 -3
  110. package/dist/{chunk-k29n4176.js → chunk-phs5fbff.js} +6 -6
  111. package/dist/{chunk-wqe9shx2.js → chunk-qbd282aa.js} +2 -2
  112. package/dist/{chunk-e91fmg6t.js → chunk-qsa7nw6f.js} +2 -1
  113. package/dist/{chunk-e91fmg6t.js.map → chunk-qsa7nw6f.js.map} +3 -3
  114. package/dist/chunk-r588h4ev.js +98 -0
  115. package/dist/chunk-r588h4ev.js.map +10 -0
  116. package/dist/{chunk-rtdrm592.js → chunk-t58sktr5.js} +12 -4
  117. package/dist/{chunk-rtdrm592.js.map → chunk-t58sktr5.js.map} +3 -3
  118. package/dist/{chunk-paxabbqd.js → chunk-tapdssb5.js} +1 -1
  119. package/dist/{chunk-dhkc9b23.js → chunk-v8a1qjzp.js} +1 -1
  120. package/dist/{chunk-q8d9p0tb.js → chunk-wzcjhv54.js} +8 -1
  121. package/dist/{chunk-q8d9p0tb.js.map → chunk-wzcjhv54.js.map} +3 -3
  122. package/dist/{chunk-pc7kra3k.js → chunk-xavet0qs.js} +1 -1
  123. package/dist/{chunk-m9ketb51.js → chunk-ygvay56w.js} +1 -1
  124. package/dist/{chunk-0mvjpgvm.js → chunk-yyj009tv.js} +4 -4
  125. package/dist/connectors/connections/capability.d.ts +11 -0
  126. package/dist/connectors/connections/capability.d.ts.map +1 -1
  127. package/dist/connectors/connections/internal.d.ts +2 -1
  128. package/dist/connectors/connections/internal.d.ts.map +1 -1
  129. package/dist/connectors/connections/internal.js +8 -4
  130. package/dist/connectors/connections/internal.js.map +1 -1
  131. package/dist/connectors/connections/service.d.ts +9 -1
  132. package/dist/connectors/connections/service.d.ts.map +1 -1
  133. package/dist/connectors/execution.d.ts +7 -1
  134. package/dist/connectors/execution.d.ts.map +1 -1
  135. package/dist/connectors/service.d.ts +5 -1
  136. package/dist/connectors/service.d.ts.map +1 -1
  137. package/dist/deploy/index.d.ts +1 -1
  138. package/dist/deploy/index.d.ts.map +1 -1
  139. package/dist/deploy/internal.js +2 -2
  140. package/dist/deploy/internal.js.map +2 -2
  141. package/dist/deploy/types.d.ts +12 -59
  142. package/dist/deploy/types.d.ts.map +1 -1
  143. package/dist/env/index.d.ts +10 -3
  144. package/dist/env/index.d.ts.map +1 -1
  145. package/dist/env/index.js.map +2 -2
  146. package/dist/events/execution.d.ts +8 -1
  147. package/dist/events/execution.d.ts.map +1 -1
  148. package/dist/events/types/syncs.d.ts +4 -0
  149. package/dist/events/types/syncs.d.ts.map +1 -1
  150. package/dist/execution/agent.js +37 -36
  151. package/dist/execution/agent.js.map +1 -1
  152. package/dist/execution/authorized-object-reader.d.ts +4 -0
  153. package/dist/execution/authorized-object-reader.d.ts.map +1 -1
  154. package/dist/execution/object-reader-ontology.d.ts +3 -0
  155. package/dist/execution/object-reader-ontology.d.ts.map +1 -1
  156. package/dist/execution/primitive.js +36 -35
  157. package/dist/execution/primitive.js.map +1 -1
  158. package/dist/execution/request.d.ts +1 -1
  159. package/dist/execution/request.d.ts.map +1 -1
  160. package/dist/execution/request.js +33 -32
  161. package/dist/execution/request.js.map +3 -3
  162. package/dist/http/api-routes.d.ts.map +1 -1
  163. package/dist/http/index.js +1 -1
  164. package/dist/index.d.ts +7 -7
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +63 -59
  167. package/dist/index.js.map +1 -1
  168. package/dist/maintenance/index.js +1 -1
  169. package/dist/materializer/index.js +22 -21
  170. package/dist/materializer/index.js.map +1 -1
  171. package/dist/models/audio/runtime.d.ts.map +1 -1
  172. package/dist/models/audio/types.d.ts +19 -0
  173. package/dist/models/audio/types.d.ts.map +1 -1
  174. package/dist/models/execution/index.js +20 -19
  175. package/dist/models/execution/index.js.map +1 -1
  176. package/dist/models/index.d.ts +1 -1
  177. package/dist/models/index.d.ts.map +1 -1
  178. package/dist/objects/index.js +36 -35
  179. package/dist/objects/index.js.map +1 -1
  180. package/dist/objects/query/executor.d.ts +3 -1
  181. package/dist/objects/query/executor.d.ts.map +1 -1
  182. package/dist/objects/query/explain.d.ts +3 -1
  183. package/dist/objects/query/explain.d.ts.map +1 -1
  184. package/dist/objects/query/index.d.ts +1 -1
  185. package/dist/objects/query/index.d.ts.map +1 -1
  186. package/dist/objects/query/index.js +19 -18
  187. package/dist/objects/query/index.js.map +1 -1
  188. package/dist/objects/query/link-query-clearance.d.ts +3 -0
  189. package/dist/objects/query/link-query-clearance.d.ts.map +1 -1
  190. package/dist/objects/query/links.d.ts +1 -1
  191. package/dist/objects/query/links.d.ts.map +1 -1
  192. package/dist/objects/query/validate.d.ts +17 -0
  193. package/dist/objects/query/validate.d.ts.map +1 -1
  194. package/dist/objects/sdk/runtime-query-executor.d.ts +1 -1
  195. package/dist/objects/sdk/runtime-query-executor.d.ts.map +1 -1
  196. package/dist/ontology/index.js +3 -3
  197. package/dist/ontology/internal.js +3 -3
  198. package/dist/pipelines/index.js +21 -20
  199. package/dist/pipelines/index.js.map +1 -1
  200. package/dist/projections/internal.js +20 -19
  201. package/dist/projections/internal.js.map +1 -1
  202. package/dist/queues/in-memory.d.ts +1 -1
  203. package/dist/queues/in-memory.d.ts.map +1 -1
  204. package/dist/runtime/create.d.ts.map +1 -1
  205. package/dist/runtime/definitions.d.ts +14 -0
  206. package/dist/runtime/definitions.d.ts.map +1 -1
  207. package/dist/runtime/host.d.ts +3 -1
  208. package/dist/runtime/host.d.ts.map +1 -1
  209. package/dist/runtime/index.d.ts +1 -1
  210. package/dist/runtime/index.d.ts.map +1 -1
  211. package/dist/runtime/internal.js +24 -23
  212. package/dist/runtime/internal.js.map +2 -2
  213. package/dist/runtime/locale.d.ts +0 -2
  214. package/dist/runtime/locale.d.ts.map +1 -1
  215. package/dist/runtime/resolve-definitions.d.ts +2 -1
  216. package/dist/runtime/resolve-definitions.d.ts.map +1 -1
  217. package/dist/runtime/sixb.d.ts.map +1 -1
  218. package/dist/sandboxes/auth.d.ts +26 -4
  219. package/dist/sandboxes/auth.d.ts.map +1 -1
  220. package/dist/sandboxes/errors.d.ts +19 -0
  221. package/dist/sandboxes/errors.d.ts.map +1 -1
  222. package/dist/sandboxes/exec.d.ts +2 -0
  223. package/dist/sandboxes/exec.d.ts.map +1 -1
  224. package/dist/sandboxes/index.d.ts +4 -2
  225. package/dist/sandboxes/index.d.ts.map +1 -1
  226. package/dist/sandboxes/index.js +13 -7
  227. package/dist/sandboxes/index.js.map +1 -1
  228. package/dist/sandboxes/sandbox.d.ts +15 -1
  229. package/dist/sandboxes/sandbox.d.ts.map +1 -1
  230. package/dist/security/view-conditions.d.ts.map +1 -1
  231. package/dist/shares/internal.js +16 -15
  232. package/dist/shares/internal.js.map +2 -2
  233. package/dist/storage/agents/in-memory.d.ts +18 -1
  234. package/dist/storage/agents/in-memory.d.ts.map +1 -1
  235. package/dist/storage/agents/index.d.ts +1 -1
  236. package/dist/storage/agents/index.d.ts.map +1 -1
  237. package/dist/storage/agents/provider.d.ts +43 -9
  238. package/dist/storage/agents/provider.d.ts.map +1 -1
  239. package/dist/storage/agents/provider.js +19 -3
  240. package/dist/storage/agents/provider.js.map +1 -1
  241. package/dist/storage/agents/types.d.ts +150 -4
  242. package/dist/storage/agents/types.d.ts.map +1 -1
  243. package/dist/storage/ai-cost/analytics.d.ts +3 -2
  244. package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
  245. package/dist/storage/ai-cost/provider.js +4 -3
  246. package/dist/storage/ai-cost/provider.js.map +1 -1
  247. package/dist/storage/ai-cost/types.d.ts +5 -1
  248. package/dist/storage/ai-cost/types.d.ts.map +1 -1
  249. package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
  250. package/dist/storage/artifacts/record.d.ts +3 -1
  251. package/dist/storage/artifacts/record.d.ts.map +1 -1
  252. package/dist/storage/artifacts/types.d.ts +7 -0
  253. package/dist/storage/artifacts/types.d.ts.map +1 -1
  254. package/dist/storage/file-upload-sessions/provider.js +7 -7
  255. package/dist/storage/index.d.ts +2 -2
  256. package/dist/storage/index.d.ts.map +1 -1
  257. package/dist/storage/index.js +23 -22
  258. package/dist/storage/index.js.map +1 -1
  259. package/dist/storage/internal.js +8 -8
  260. package/dist/storage/operation-scope.d.ts.map +1 -1
  261. package/dist/storage/operation-scope.js +1 -1
  262. package/dist/storage/sync-runs/idempotency.d.ts.map +1 -1
  263. package/dist/storage/sync-runs/in-memory.d.ts +2 -1
  264. package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
  265. package/dist/storage/sync-runs/index.d.ts +1 -1
  266. package/dist/storage/sync-runs/index.d.ts.map +1 -1
  267. package/dist/storage/sync-runs/types.d.ts +27 -2
  268. package/dist/storage/sync-runs/types.d.ts.map +1 -1
  269. package/dist/storage/workflow-runs/provider.js +7 -7
  270. package/dist/syncs/accounts.d.ts +36 -0
  271. package/dist/syncs/accounts.d.ts.map +1 -0
  272. package/dist/syncs/builders.d.ts.map +1 -1
  273. package/dist/syncs/connections.d.ts +36 -0
  274. package/dist/syncs/connections.d.ts.map +1 -0
  275. package/dist/syncs/execution.d.ts +14 -4
  276. package/dist/syncs/execution.d.ts.map +1 -1
  277. package/dist/syncs/index.d.ts +2 -1
  278. package/dist/syncs/index.d.ts.map +1 -1
  279. package/dist/syncs/index.js +22 -21
  280. package/dist/syncs/index.js.map +1 -1
  281. package/dist/syncs/request.d.ts +16 -2
  282. package/dist/syncs/request.d.ts.map +1 -1
  283. package/dist/syncs/run-dispatch.d.ts +14 -2
  284. package/dist/syncs/run-dispatch.d.ts.map +1 -1
  285. package/dist/testing/agent-approval-storage-contract.d.ts.map +1 -1
  286. package/dist/testing/agent-inbox-storage-contract.d.ts.map +1 -1
  287. package/dist/testing/agent-storage-contract.d.ts.map +1 -1
  288. package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
  289. package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
  290. package/dist/testing/index.js +1157 -100
  291. package/dist/testing/index.js.map +9 -9
  292. package/dist/testing/run-claim-storage-contract.d.ts.map +1 -1
  293. package/dist/testing/sandboxes-contract.d.ts.map +1 -1
  294. package/dist/webhooks/internal.js +17 -16
  295. package/dist/webhooks/internal.js.map +2 -2
  296. package/dist/workers/index.js +66 -13
  297. package/dist/workers/index.js.map +4 -4
  298. package/dist/workers/queue-worker.d.ts +5 -0
  299. package/dist/workers/queue-worker.d.ts.map +1 -1
  300. package/dist/workers/worker.d.ts +8 -0
  301. package/dist/workers/worker.d.ts.map +1 -1
  302. package/dist/workflows/index.js +42 -40
  303. package/dist/workflows/index.js.map +1 -1
  304. package/package.json +7 -1
  305. package/src/actions/validation.ts +3 -1
  306. package/src/agents/children.ts +6 -0
  307. package/src/agents/errors.ts +3 -0
  308. package/src/agents/execution.ts +170 -20
  309. package/src/agents/index.ts +5 -0
  310. package/src/agents/model-routing.ts +116 -34
  311. package/src/agents/request.ts +783 -38
  312. package/src/agents/run-events.ts +235 -38
  313. package/src/agents/run-session-children.ts +13 -2
  314. package/src/agents/run-token.ts +7 -0
  315. package/src/agents/run-turn.ts +140 -23
  316. package/src/agents/streams/index.ts +2 -0
  317. package/src/agents/streams/internal.ts +12 -0
  318. package/src/agents/streams/protocol.ts +69 -1
  319. package/src/agents/streams/steps.ts +131 -0
  320. package/src/agents/thread-access.ts +57 -2
  321. package/src/artifacts/publish/merge.ts +14 -3
  322. package/src/artifacts/run-query.ts +5 -2
  323. package/src/bootstrap/discovery.ts +61 -11
  324. package/src/calendar.ts +195 -0
  325. package/src/connectors/connections/capability.ts +40 -0
  326. package/src/connectors/connections/internal.ts +3 -0
  327. package/src/connectors/connections/service.ts +74 -5
  328. package/src/connectors/execution.ts +5 -6
  329. package/src/connectors/service.ts +23 -0
  330. package/src/deploy/index.ts +0 -5
  331. package/src/deploy/types.ts +12 -64
  332. package/src/deploy/validation.ts +1 -1
  333. package/src/env/index.ts +10 -4
  334. package/src/events/execution.ts +42 -2
  335. package/src/events/types/syncs.ts +4 -0
  336. package/src/execution/authorized-object-reader.ts +33 -5
  337. package/src/execution/object-reader-ontology.ts +6 -0
  338. package/src/execution/request.ts +1 -0
  339. package/src/http/api-routes.ts +8 -0
  340. package/src/index.ts +21 -2
  341. package/src/models/audio/runtime.ts +57 -14
  342. package/src/models/audio/types.ts +20 -0
  343. package/src/models/index.ts +1 -0
  344. package/src/objects/query/executor.ts +4 -0
  345. package/src/objects/query/explain.ts +5 -0
  346. package/src/objects/query/index.ts +1 -0
  347. package/src/objects/query/link-query-clearance.ts +4 -1
  348. package/src/objects/query/links.ts +5 -1
  349. package/src/objects/query/validate.ts +33 -1
  350. package/src/objects/sdk/runtime-query-executor.ts +7 -3
  351. package/src/runtime/create.ts +1 -0
  352. package/src/runtime/definitions.ts +25 -0
  353. package/src/runtime/host.ts +16 -8
  354. package/src/runtime/index.ts +6 -1
  355. package/src/runtime/locale.ts +0 -10
  356. package/src/runtime/resolve-definitions.ts +7 -1
  357. package/src/runtime/sixb.ts +12 -2
  358. package/src/sandboxes/README.md +12 -1
  359. package/src/sandboxes/auth.ts +32 -4
  360. package/src/sandboxes/errors.ts +27 -0
  361. package/src/sandboxes/exec.ts +3 -1
  362. package/src/sandboxes/index.ts +18 -1
  363. package/src/sandboxes/sandbox.ts +15 -1
  364. package/src/security/view-conditions.ts +2 -1
  365. package/src/storage/agents/in-memory.ts +271 -6
  366. package/src/storage/agents/index.ts +10 -0
  367. package/src/storage/agents/provider.ts +178 -13
  368. package/src/storage/agents/types.ts +166 -4
  369. package/src/storage/ai-cost/analytics.ts +22 -43
  370. package/src/storage/ai-cost/types.ts +5 -1
  371. package/src/storage/artifacts/in-memory.ts +20 -5
  372. package/src/storage/artifacts/record.ts +8 -2
  373. package/src/storage/artifacts/types.ts +7 -0
  374. package/src/storage/index.ts +11 -0
  375. package/src/storage/operation-scope.ts +1 -0
  376. package/src/storage/sync-runs/idempotency.ts +1 -0
  377. package/src/storage/sync-runs/in-memory.ts +43 -1
  378. package/src/storage/sync-runs/index.ts +1 -0
  379. package/src/storage/sync-runs/types.ts +30 -1
  380. package/src/syncs/accounts.ts +85 -0
  381. package/src/syncs/builders.ts +18 -1
  382. package/src/syncs/connections.ts +123 -0
  383. package/src/syncs/execution.ts +64 -22
  384. package/src/syncs/index.ts +3 -0
  385. package/src/syncs/request.ts +81 -23
  386. package/src/syncs/run-dispatch.ts +69 -7
  387. package/src/testing/agent-approval-storage-contract.ts +123 -0
  388. package/src/testing/agent-inbox-storage-contract.ts +59 -0
  389. package/src/testing/agent-storage-contract.ts +794 -8
  390. package/src/testing/ai-cost-storage-contract.ts +80 -0
  391. package/src/testing/artifact-storage-contract.ts +139 -0
  392. package/src/testing/run-claim-storage-contract.ts +116 -0
  393. package/src/testing/sandboxes-contract.ts +50 -0
  394. package/src/workers/README.md +4 -1
  395. package/src/workers/lost-runs.ts +1 -0
  396. package/src/workers/queue-worker.ts +16 -5
  397. package/src/workers/worker.ts +67 -7
  398. package/dist/chunk-5a4a52tq.js.map +0 -10
  399. package/dist/chunk-5t9gm5tt.js.map +0 -22
  400. package/dist/chunk-68hm50qh.js.map +0 -13
  401. package/dist/chunk-aw1z0gre.js +0 -234
  402. package/dist/chunk-aw1z0gre.js.map +0 -12
  403. package/dist/chunk-ey1p8w68.js.map +0 -13
  404. package/dist/chunk-k3jh8gsg.js.map +0 -10
  405. package/dist/chunk-nxysqbt0.js.map +0 -10
  406. package/dist/chunk-qavwr628.js.map +0 -12
  407. package/dist/chunk-s1mqyqmm.js.map +0 -18
  408. package/dist/chunk-zeykm8my.js.map +0 -14
  409. /package/dist/{chunk-stmxh0hv.js.map → chunk-3neam1y5.js.map} +0 -0
  410. /package/dist/{chunk-0hkdtwqk.js.map → chunk-44hrfmbk.js.map} +0 -0
  411. /package/dist/{chunk-s5pj68fa.js.map → chunk-5sswe5ej.js.map} +0 -0
  412. /package/dist/{chunk-q9nkpr8k.js.map → chunk-9tpmfh3n.js.map} +0 -0
  413. /package/dist/{chunk-naxjka9v.js.map → chunk-brhp9d97.js.map} +0 -0
  414. /package/dist/{chunk-8a8k38tz.js.map → chunk-brybqw5k.js.map} +0 -0
  415. /package/dist/{chunk-vehcr9eb.js.map → chunk-cg7cygfj.js.map} +0 -0
  416. /package/dist/{chunk-b4escq4c.js.map → chunk-cpy282b8.js.map} +0 -0
  417. /package/dist/{chunk-bc3y6gff.js.map → chunk-jka26v8c.js.map} +0 -0
  418. /package/dist/{chunk-zxhym8tr.js.map → chunk-k29rdc3h.js.map} +0 -0
  419. /package/dist/{chunk-1yh6jgtz.js.map → chunk-mrs7jy17.js.map} +0 -0
  420. /package/dist/{chunk-pqvvqc65.js.map → chunk-pfdq1ga6.js.map} +0 -0
  421. /package/dist/{chunk-k29n4176.js.map → chunk-phs5fbff.js.map} +0 -0
  422. /package/dist/{chunk-wqe9shx2.js.map → chunk-qbd282aa.js.map} +0 -0
  423. /package/dist/{chunk-paxabbqd.js.map → chunk-tapdssb5.js.map} +0 -0
  424. /package/dist/{chunk-dhkc9b23.js.map → chunk-v8a1qjzp.js.map} +0 -0
  425. /package/dist/{chunk-pc7kra3k.js.map → chunk-xavet0qs.js.map} +0 -0
  426. /package/dist/{chunk-m9ketb51.js.map → chunk-ygvay56w.js.map} +0 -0
  427. /package/dist/{chunk-0mvjpgvm.js.map → chunk-yyj009tv.js.map} +0 -0
@@ -38,6 +38,31 @@ export interface SixbDefinitions {
38
38
  readonly shares: DefinitionCatalog<ShareDefinition>
39
39
  readonly syncs: DefinitionCatalog<SyncDefinition>
40
40
  readonly workflows: DefinitionCatalog<WorkflowDefinition>
41
+ /** Where each discovered definition sits inside its directory, for browsing them by folder. */
42
+ readonly folders: DefinitionFolderIndex
43
+ }
44
+
45
+ /** The definition families whose folders are kept, named as their `SixbDefinitions` catalogs. */
46
+ export type DefinitionFolderFamily =
47
+ | "actions"
48
+ | "connectors"
49
+ | "datasets"
50
+ | "objectTypes"
51
+ | "pipelines"
52
+ | "projections"
53
+ | "rules"
54
+ | "syncs"
55
+ | "workflows"
56
+
57
+ /**
58
+ * Each family's folders by definition id, as POSIX paths below the family's directory:
59
+ * `datasets/raw/erp/orders.ts` puts every dataset it exports in `raw/erp`. Folders only arrange
60
+ * definitions for people browsing them; ids stay unique across the whole project, so moving a file
61
+ * renames nothing. A definition at the top of its directory, or passed to createSixb() directly,
62
+ * has none.
63
+ */
64
+ export type DefinitionFolderIndex = {
65
+ readonly [TFamily in DefinitionFolderFamily]?: ReadonlyMap<string, string>
41
66
  }
42
67
 
43
68
  /** Build a read-only catalog over an already validated definition index. */
@@ -23,8 +23,13 @@ import {
23
23
  } from "../auth"
24
24
  import type { BlobStorage } from "../blob-storage"
25
25
  import type { Broker } from "../broker"
26
- import { registerConnectorConnectionCallbackProcess } from "../connectors/connections/capability"
26
+ import { canonicalTimeZone } from "../calendar"
27
+ import {
28
+ registerConnectorConnectionCallbackProcess,
29
+ registerSandboxConnectionTokenAccess,
30
+ } from "../connectors/connections/capability"
27
31
  import { createConnectorCredentialProtectorFromKey } from "../connectors/credentials"
32
+ import { assertPersonalConnectionRequester } from "../connectors/execution"
28
33
  import { ConnectorService } from "../connectors/service"
29
34
  import {
30
35
  type ConnectorConnectionOptions,
@@ -120,17 +125,13 @@ import type { ParamsConfig } from "../shared/params/types"
120
125
  import type { ShareDefinition } from "../shares"
121
126
  import type { Storage } from "../storage"
122
127
  import type { SyncDefinition } from "../syncs"
128
+ import { createSyncConnections, registerSyncConnections } from "../syncs/connections"
123
129
  import type { RegisteredWebhook } from "../webhooks"
124
130
  import { WebhookRegistry, WebhookValidationError } from "../webhooks"
125
131
  import type { WorkflowDefinition } from "../workflows"
126
- import type { SixbDefinitions } from "./definitions"
132
+ import type { DefinitionFolderIndex, SixbDefinitions } from "./definitions"
127
133
  import { RuntimeError } from "./errors"
128
- import {
129
- canonicalLocale,
130
- canonicalTimeZone,
131
- DEFAULT_PROJECT_LOCALE,
132
- DEFAULT_PROJECT_TIME_ZONE,
133
- } from "./locale"
134
+ import { canonicalLocale, DEFAULT_PROJECT_LOCALE, DEFAULT_PROJECT_TIME_ZONE } from "./locale"
134
135
  import {
135
136
  createOntologyMutationRuntime,
136
137
  registerOntologyMutationRuntime,
@@ -189,6 +190,8 @@ export interface SixbHostOptions<in out TParams extends ParamsConfig = ParamsCon
189
190
  roles?: readonly RoleDefinition[]
190
191
  membershipPolicies?: readonly MembershipPolicyDefinition[]
191
192
  shares?: readonly ShareDefinition[]
193
+ /** The folder each definition sits in below its directory. createSixb() discovers them. */
194
+ definitionFolders?: DefinitionFolderIndex
192
195
  auth?: SixbAuthConfig
193
196
  }
194
197
 
@@ -320,7 +323,12 @@ export class SixbHost<in out TParams extends ParamsConfig = ParamsConfig> {
320
323
  this,
321
324
  this.connectorService.connectionProcess.callbackProcess
322
325
  )
326
+ registerSyncConnections(this, createSyncConnections(this.connectorService))
323
327
  }
328
+ registerSandboxConnectionTokenAccess(this, ({ connector, selector, requestedBy }) => {
329
+ assertPersonalConnectionRequester(connector, requestedBy, selector)
330
+ return this.connectorService.createConnectionTokenSource(connector, selector)
331
+ })
324
332
  assertWebhookRunStorage(connectors, this.storage)
325
333
  this.webhookRegistry = new WebhookRegistry({ connectors })
326
334
 
@@ -22,7 +22,12 @@ export type { RegisteredWebhook } from "../webhooks"
22
22
  export { WebhookValidationError } from "../webhooks"
23
23
  export type { CreateSixbOptions } from "./create"
24
24
  export { createSixb } from "./create"
25
- export type { DefinitionCatalog, SixbDefinitions } from "./definitions"
25
+ export type {
26
+ DefinitionCatalog,
27
+ DefinitionFolderFamily,
28
+ DefinitionFolderIndex,
29
+ SixbDefinitions,
30
+ } from "./definitions"
26
31
  export { RuntimeError } from "./errors"
27
32
  export type { SixbHostOptions, SixbHostView } from "./host"
28
33
  export { SixbHost } from "./host"
@@ -14,13 +14,3 @@ export function canonicalLocale(value: unknown): string | undefined {
14
14
  return undefined
15
15
  }
16
16
  }
17
-
18
- /** The canonical IANA name of a time zone (`europe/paris` → `Europe/Paris`), or `undefined`. */
19
- export function canonicalTimeZone(value: unknown): string | undefined {
20
- if (typeof value !== "string" || value.trim() !== value || value === "") return undefined
21
- try {
22
- return new Intl.DateTimeFormat("en-US", { timeZone: value }).resolvedOptions().timeZone
23
- } catch {
24
- return undefined
25
- }
26
- }
@@ -37,7 +37,11 @@ import {
37
37
  } from "../syncs/validation"
38
38
  import type { WorkflowDefinition } from "../workflows"
39
39
  import { validateWorkflowAgentStepGroupReferences, validateWorkflowsAtStartup } from "../workflows"
40
- import { createDefinitionCatalog, type SixbDefinitions } from "./definitions"
40
+ import {
41
+ createDefinitionCatalog,
42
+ type DefinitionFolderIndex,
43
+ type SixbDefinitions,
44
+ } from "./definitions"
41
45
  import { RuntimeError } from "./errors"
42
46
  import type { OntologySource } from "./types"
43
47
 
@@ -60,6 +64,7 @@ interface DefinitionOptions {
60
64
  readonly groups?: readonly GroupDefinition[]
61
65
  readonly roles?: readonly RoleDefinition[]
62
66
  readonly membershipPolicies?: readonly MembershipPolicyDefinition[]
67
+ readonly definitionFolders?: DefinitionFolderIndex
63
68
  }
64
69
 
65
70
  interface ResolvedDefinitions extends SixbDefinitions {
@@ -245,6 +250,7 @@ export function resolveDefinitions(options: DefinitionOptions): ResolvedDefiniti
245
250
  shares: createDefinitionCatalog(sharesById),
246
251
  syncs: createDefinitionCatalog(syncsById),
247
252
  workflows: createDefinitionCatalog(workflowsById),
253
+ folders: Object.freeze({ ...options.definitionFolders }),
248
254
  })
249
255
  }
250
256
 
@@ -38,6 +38,7 @@ import type { SandboxDefinition } from "../sandboxes/configuration"
38
38
  import { createSchedulesRuntime, type SchedulesRuntime } from "../schedules/execution"
39
39
  import type { DatasetVersionMarkings } from "../security/dataset-version-markings"
40
40
  import { createSharesRuntime, type SharesRuntime } from "../shares/execution"
41
+ import { createSyncConnections, visibleSyncConnectionIds } from "../syncs/connections"
41
42
  import { createSyncsRuntime, type SyncsRuntime } from "../syncs/execution"
42
43
  import { createUsersRuntime, type MemberStatusRuntime, type UsersRuntime } from "../users"
43
44
  import { createWorkflowsRuntime, type WorkflowsRuntime } from "../workflows/execution"
@@ -135,6 +136,7 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
135
136
  dependencies: SixbDependencies
136
137
  ): Omit<Sixb<TParams>, "execution"> {
137
138
  const actions = createActionsRuntime(runtime, execution)
139
+ const syncConnections = createSyncConnections(dependencies.connectorService)
138
140
  const workflows = createWorkflowsRuntime(runtime, execution, dependencies.definitions.workflows)
139
141
  // One session per execution: the facade's model calls and the Agent's decisions share its
140
142
  // accounting, AI limits and cancellation.
@@ -170,7 +172,7 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
170
172
  dependencies.datasetIngest
171
173
  ),
172
174
  workflows,
173
- syncs: createSyncsRuntime(runtime, execution, dependencies.definitions.syncs),
175
+ syncs: createSyncsRuntime(runtime, execution, dependencies.definitions.syncs, syncConnections),
174
176
  pipelines: createPipelinesRuntime(runtime, execution, dependencies.definitions.pipelines),
175
177
  projections: createProjectionsRuntime(runtime, dependencies.definitions.projections),
176
178
  rules: createRulesRuntime(runtime, dependencies.definitions.rules),
@@ -191,7 +193,15 @@ function createExecutionFacades<TParams extends Record<string, unknown>>(
191
193
  dependencies.blobStorage
192
194
  ),
193
195
  aiUsage: createAiUsageRuntime(runtime, dependencies.definitions.security),
194
- events: createEventsRuntime(runtime),
196
+ events: createEventsRuntime(runtime, {
197
+ visibleSyncConnectionIds: (syncIds) =>
198
+ visibleSyncConnectionIds(
199
+ runtime,
200
+ execution,
201
+ syncIds.map((syncId) => dependencies.definitions.syncs.getById(syncId)),
202
+ syncConnections
203
+ ),
204
+ }),
195
205
  logs: createLogsRuntime(runtime, dependencies.logging),
196
206
  activity: createActivityRuntime(runtime, dependencies.activity),
197
207
  schedules: createSchedulesRuntime(runtime, dependencies.definitions.schedules),
@@ -43,13 +43,24 @@ Factories define environments; threads retain immutable parameters; runs provide
43
43
  - Request origins are read from the first grant, so renewals must keep to the same origins: a
44
44
  provider rejects a credential for an origin the network does not allow.
45
45
 
46
+ - A save is refused only by an operation that may have reached the VM: a timeout, a reset or no
47
+ answer. A provider throws `SandboxRequestRefusedError` for a request it refused before anything
48
+ ran (an HTTP 4xx, its own validation), and that, like `SandboxNotRunningError`, leaves the
49
+ workspace saveable. A run whose save fails keeps its outcome and its own error, with a
50
+ `workspace_not_saved` diagnostic.
51
+ - Each provider declares `maxCommandTimeout` and caps a longer timeout to it: Vercel refuses more
52
+ than five hours, and a timer fires at once past 2³¹−1 ms (`MAX_TIMER_DELAY_MS`). A background
53
+ command is held for that long at most.
54
+
46
55
  ## V1 limits
47
56
 
48
57
  Vercel requests can outlive their worker: storage fencing cannot cancel provider-side work.
49
58
  Uncertain sandboxes stay blocked; explicit recreation uses a new name without deleting old state.
50
59
  Saved files remain subject to provider retention.
51
60
 
52
- Source `auth` stays host-side. Providers advertising `supportsRequestCredentials`, as every
61
+ Source `auth` stays host-side and receives the run's `requestedBy` principal and a host-only
62
+ `connectionToken` resolver for OAuth connector connections, enforcing the same personal-connection
63
+ ownership and member-suspension rules as `sixb.connector()`. Providers advertising `supportsRequestCredentials`, as every
53
64
  agent's provider must, apply execution-prepared credentials; direct create/resume never invoke `auth` implicitly. They apply
54
65
  initial credentials before setup and expose session-scoped renewal, for ephemeral and named
55
66
  sandboxes alike. Unsupported providers reject credentials before provisioning. During initial
@@ -1,6 +1,37 @@
1
+ import type { ConnectorAccessToken, ConnectorConnectionSelector } from "../connectors/types"
2
+ import type { AuthorizablePrincipal } from "../execution/types"
1
3
  import type { SandboxSource } from "./configuration"
2
4
  import type { SandboxRequestCredential } from "./sandbox"
3
5
 
6
+ /** Registered OAuth connector accepted by host-side sandbox source authentication. */
7
+ export interface SandboxOAuthConnector {
8
+ readonly kind: "connector"
9
+ readonly id: string
10
+ readonly adapter: {
11
+ readonly authentication: {
12
+ readonly type: "oauth2"
13
+ }
14
+ }
15
+ }
16
+
17
+ /** Resolve a live token from an OAuth connector connection on the host. */
18
+ export type SandboxConnectionTokenResolver = (
19
+ connector: SandboxOAuthConnector,
20
+ selector: ConnectorConnectionSelector
21
+ ) => Promise<ConnectorAccessToken>
22
+
23
+ export interface SandboxSourceAuthInput {
24
+ readonly source: SandboxSource
25
+ readonly signal: AbortSignal
26
+ /** Who requested the run, when a person or service account started it. */
27
+ readonly requestedBy?: AuthorizablePrincipal
28
+ /**
29
+ * Resolve a live access token from an OAuth connector connection on the host.
30
+ * Enforces the same requester and member-status rules as `sixb.connector()`.
31
+ */
32
+ readonly connectionToken?: SandboxConnectionTokenResolver
33
+ }
34
+
4
35
  /** Per-run source access. Never persist these grants or expose them to the guest. */
5
36
  export interface SandboxSourceCredentials {
6
37
  /**
@@ -26,8 +57,5 @@ export interface SandboxSourceCredentials {
26
57
  /** Integration-owned authentication; grant source.access (read by default), or reject. */
27
58
  export interface SandboxSourceAuth {
28
59
  /** A thrown error is reported to onError: it and its causes must never contain a credential. */
29
- authorize(input: {
30
- readonly source: SandboxSource
31
- readonly signal: AbortSignal
32
- }): Promise<SandboxSourceCredentials>
60
+ authorize(input: SandboxSourceAuthInput): Promise<SandboxSourceCredentials>
33
61
  }
@@ -11,6 +11,16 @@ export class SandboxStateUnavailableError extends SandboxError {
11
11
  override readonly name = "SandboxStateUnavailableError"
12
12
  }
13
13
 
14
+ /**
15
+ * The provider refused the request before anything ran: an HTTP 4xx answer, or a request its own
16
+ * validation rejected. Unlike a transport failure, it proves the sandbox did nothing, so a caller
17
+ * may go on as if the call was never made. Its message names why, and is safe to show to the
18
+ * model and the user: it holds nothing a guest command could not already see.
19
+ */
20
+ export class SandboxRequestRefusedError extends SandboxError {
21
+ override readonly name = "SandboxRequestRefusedError"
22
+ }
23
+
14
24
  /** runCommand / stop / destroy called after the sandbox is stopped or destroyed. */
15
25
  export class SandboxNotRunningError extends SandboxError {
16
26
  override readonly name = "SandboxNotRunningError"
@@ -25,3 +35,20 @@ export class SandboxTimeoutError extends SandboxError {
25
35
  export class SandboxIsolationUnavailableError extends SandboxError {
26
36
  override readonly name = "SandboxIsolationUnavailableError"
27
37
  }
38
+
39
+ /**
40
+ * The longest delay a JavaScript timer holds, in milliseconds: a longer one fires at once. A
41
+ * provider that times its commands with a timer caps their timeouts here.
42
+ */
43
+ export const MAX_TIMER_DELAY_MS = 2_147_483_647
44
+
45
+ /**
46
+ * A command's timeout within its provider's maximum. Absent or zero stays as it is: the provider's
47
+ * default, or no timeout.
48
+ */
49
+ export function cappedCommandTimeout(
50
+ timeout: number | undefined,
51
+ maxCommandTimeout: number
52
+ ): number | undefined {
53
+ return timeout === undefined || timeout <= 0 ? timeout : Math.min(timeout, maxCommandTimeout)
54
+ }
@@ -7,6 +7,8 @@ export interface ExecOptions {
7
7
  readonly env: Readonly<Record<string, string>>
8
8
  readonly timeoutMs?: number
9
9
  readonly signal?: AbortSignal
10
+ /** Written to the command's standard input, which is otherwise empty. */
11
+ readonly stdin?: Blob
10
12
  }
11
13
 
12
14
  const DEFAULT_KILL_EXIT_CODE = 137
@@ -38,7 +40,7 @@ export async function exec(options: ExecOptions): Promise<CommandResult> {
38
40
  proc = Bun.spawn([head, ...rest], {
39
41
  cwd: options.cwd,
40
42
  env: options.env,
41
- stdin: "ignore",
43
+ stdin: options.stdin ?? "ignore",
42
44
  stdout: "pipe",
43
45
  stderr: "pipe",
44
46
  detached: true,
@@ -1,5 +1,19 @@
1
+ export type {
2
+ ConnectorAccessToken,
3
+ ConnectorConnectionOwner,
4
+ ConnectorConnectionSelector,
5
+ ProjectConnectorConnectionOwner,
6
+ UserConnectorConnectionOwner,
7
+ } from "../connectors/types"
8
+ export type { AuthorizablePrincipal } from "../execution/types"
1
9
  export type { InferParams, ParamsConfig } from "../shared/params/types"
2
- export type { SandboxSourceAuth, SandboxSourceCredentials } from "./auth"
10
+ export type {
11
+ SandboxConnectionTokenResolver,
12
+ SandboxOAuthConnector,
13
+ SandboxSourceAuth,
14
+ SandboxSourceAuthInput,
15
+ SandboxSourceCredentials,
16
+ } from "./auth"
3
17
  export { sandboxConfig } from "./config"
4
18
  export type {
5
19
  SandboxConfig,
@@ -13,9 +27,12 @@ export {
13
27
  sandboxProjectDirectory,
14
28
  } from "./environment"
15
29
  export {
30
+ cappedCommandTimeout,
31
+ MAX_TIMER_DELAY_MS,
16
32
  SandboxError,
17
33
  SandboxIsolationUnavailableError,
18
34
  SandboxNotRunningError,
35
+ SandboxRequestRefusedError,
19
36
  SandboxStateUnavailableError,
20
37
  SandboxTimeoutError,
21
38
  } from "./errors"
@@ -23,7 +23,10 @@ export interface RunCommandOptions {
23
23
  readonly cwd?: string
24
24
  /** Merged on top of sandbox-level env. Per-call wins on collision. */
25
25
  readonly env?: Readonly<Record<string, string>>
26
- /** Overrides the sandbox-level timeout, in milliseconds. */
26
+ /**
27
+ * Overrides the sandbox-level timeout, in milliseconds. One above the sandbox's
28
+ * {@link Sandbox.maxCommandTimeout} is capped to it.
29
+ */
27
30
  readonly timeout?: number
28
31
  /** Per-call only; there is no sandbox-level equivalent. */
29
32
  readonly signal?: AbortSignal
@@ -143,6 +146,13 @@ export interface Sandbox {
143
146
  readonly provider: string
144
147
  readonly status: SandboxStatus
145
148
  readonly workingDirectory: string
149
+ /**
150
+ * The longest timeout a command can have here, in milliseconds: the provider's own limit, or
151
+ * the longest a JavaScript timer holds (`MAX_TIMER_DELAY_MS`). `runCommand` caps a longer one to it
152
+ * rather than fail, and a command that runs that long ends `timedOut`, as at any timeout. Every
153
+ * provider should declare it. A caller asks for the timeout it wants and lets the provider cap it.
154
+ */
155
+ readonly maxCommandTimeout?: number
146
156
 
147
157
  /** Optional secure injection capability. Replaces all credentials on this session only.
148
158
  * An empty list removes injection. Guest commands must never be able to read a secret.
@@ -162,6 +172,10 @@ export interface Sandbox {
162
172
  */
163
173
  readonly credentialedUrl?: (url: string) => string
164
174
 
175
+ /**
176
+ * Run a command and gather its result. A request the provider refused before anything ran
177
+ * rejects with {@link SandboxRequestRefusedError}; any other rejection may have run it.
178
+ */
165
179
  runCommand(
166
180
  command: string,
167
181
  args?: readonly string[],
@@ -61,7 +61,8 @@ export function resolveViewCondition(
61
61
  input: { kind: "start", objectTypeId, includeSubtypes: true },
62
62
  predicate: grant.condition,
63
63
  },
64
- { ontology },
64
+ // The author writes the role, so the issue may name every property of the type.
65
+ { ontology, discovery: ontology },
65
66
  unmarkedPropertiesOnly(subject, objectTypeIds, ontology)
66
67
  )
67
68