@fungi.computer/oyster 0.1.0 → 0.3.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 (292) hide show
  1. package/README.md +376 -72
  2. package/dist/agent-avatars.d.ts +103 -0
  3. package/dist/agent-avatars.js +66 -0
  4. package/dist/agents.d.ts +15 -4
  5. package/dist/agents.js +43 -4
  6. package/dist/app-builds.d.ts +81 -8
  7. package/dist/app-builds.js +210 -60
  8. package/dist/app-storage.d.ts +3 -3
  9. package/dist/approval-capability.d.ts +5 -0
  10. package/dist/approval-capability.js +46 -0
  11. package/dist/approval-home.d.ts +51 -0
  12. package/dist/approval-home.js +226 -0
  13. package/dist/apps/catalog.d.ts +335 -0
  14. package/dist/apps/catalog.js +46 -0
  15. package/dist/apps/gate.d.ts +26 -12
  16. package/dist/apps/gate.js +48 -22
  17. package/dist/apps/index.d.ts +3 -1
  18. package/dist/apps/index.js +3 -1
  19. package/dist/apps/installation.d.ts +147 -66
  20. package/dist/apps/installation.js +193 -86
  21. package/dist/apps/permissions.d.ts +247 -0
  22. package/dist/apps/permissions.js +255 -0
  23. package/dist/boot-capability-route.d.ts +15 -0
  24. package/dist/boot-capability-route.js +196 -0
  25. package/dist/boot-capability.d.ts +103 -0
  26. package/dist/boot-capability.js +141 -0
  27. package/dist/boot-construction.d.ts +12 -0
  28. package/dist/boot-construction.js +175 -0
  29. package/dist/boot-gate.d.ts +267 -0
  30. package/dist/boot-gate.js +236 -0
  31. package/dist/boot-host-script.d.ts +2 -0
  32. package/dist/boot-host-script.js +1 -0
  33. package/dist/boot-mount.d.ts +21 -0
  34. package/dist/boot-mount.js +65 -0
  35. package/dist/browser/boot.d.ts +73 -0
  36. package/dist/browser/boot.js +502 -0
  37. package/dist/browser/browser.d.ts +104 -0
  38. package/dist/browser/browser.js +374 -0
  39. package/dist/browser/capability-source.d.ts +76 -0
  40. package/dist/browser/capability-source.js +338 -0
  41. package/dist/browser/cdp-client.d.ts +56 -0
  42. package/dist/browser/cdp-client.js +184 -0
  43. package/dist/browser/errors.d.ts +79 -0
  44. package/dist/browser/errors.js +32 -0
  45. package/dist/browser/index.d.ts +16 -0
  46. package/dist/browser/index.js +14 -0
  47. package/dist/browser/lease-registry.d.ts +61 -0
  48. package/dist/browser/lease-registry.js +101 -0
  49. package/dist/browser/operations.d.ts +225 -0
  50. package/dist/browser/operations.js +137 -0
  51. package/dist/browser/page.d.ts +25 -0
  52. package/dist/browser/page.js +172 -0
  53. package/dist/browser/quick-reads.d.ts +29 -0
  54. package/dist/browser/quick-reads.js +160 -0
  55. package/dist/browser/sessions.d.ts +52 -0
  56. package/dist/browser/sessions.js +118 -0
  57. package/dist/browser/url-policy.d.ts +18 -0
  58. package/dist/browser/url-policy.js +58 -0
  59. package/dist/build/app-imports.d.ts +12 -0
  60. package/dist/build/app-imports.js +105 -0
  61. package/dist/build/build-policy.d.ts +5 -3
  62. package/dist/build/build-policy.js +5 -3
  63. package/dist/build/candidate-builder.d.ts +1 -1
  64. package/dist/build/candidate-cli.mjs +8428 -337
  65. package/dist/build/local-build.d.ts +2 -0
  66. package/dist/build/local-build.js +28 -6
  67. package/dist/build/snapshot-package-store.d.ts +1 -1
  68. package/dist/build/snapshot-package-store.js +7 -2
  69. package/dist/build/workspace-build.d.ts +92 -5
  70. package/dist/build/workspace-build.js +93 -19
  71. package/dist/build-egress.js +4 -4
  72. package/dist/build.d.ts +1 -1
  73. package/dist/build.js +1 -1
  74. package/dist/catalog-frame.js +1 -1
  75. package/dist/cloudflare.d.ts +13 -3
  76. package/dist/cloudflare.js +106 -8
  77. package/dist/frame-binding-wire-script.js +1 -1
  78. package/dist/frame-binding-wire.d.ts +1 -1
  79. package/dist/frame-binding-wire.js +5 -3
  80. package/dist/git-auth.d.ts +0 -2
  81. package/dist/git-auth.js +0 -2
  82. package/dist/git-journal.js +4 -4
  83. package/dist/git.d.ts +0 -1
  84. package/dist/git.js +0 -2
  85. package/dist/host.d.ts +39 -13
  86. package/dist/host.js +268 -142
  87. package/dist/index.d.ts +26 -15
  88. package/dist/index.js +40 -16
  89. package/dist/install-release-cli.d.ts +2 -0
  90. package/dist/install-release-cli.js +46 -0
  91. package/dist/installation-client.d.ts +43 -0
  92. package/dist/installation-client.js +178 -0
  93. package/dist/installation-execution.d.ts +11 -0
  94. package/dist/installation-execution.js +184 -0
  95. package/dist/installation-operations.d.ts +1437 -0
  96. package/dist/installation-operations.js +664 -0
  97. package/dist/installation-store-generation.d.ts +3 -0
  98. package/dist/installation-store-generation.js +16 -0
  99. package/dist/instance-id.d.ts +10 -0
  100. package/dist/instance-id.js +10 -0
  101. package/dist/instance-refusal.d.ts +11 -0
  102. package/dist/instance-refusal.js +21 -0
  103. package/dist/internal/delivery.js +4 -2
  104. package/dist/internal/host-gate.js +7 -1
  105. package/dist/internal/registry-installations.js +4 -4
  106. package/dist/keys.d.ts +5 -1
  107. package/dist/keys.js +10 -2
  108. package/dist/machine-link/authority.d.ts +89 -0
  109. package/dist/machine-link/authority.js +37 -0
  110. package/dist/machine-link/client.d.ts +66 -0
  111. package/dist/machine-link/client.js +94 -0
  112. package/dist/machine-link/delivery.d.ts +18 -0
  113. package/dist/machine-link/delivery.js +55 -0
  114. package/dist/machine-link/enrollment.d.ts +111 -0
  115. package/dist/machine-link/enrollment.js +286 -0
  116. package/dist/machine-link/fences.d.ts +37 -0
  117. package/dist/machine-link/fences.js +166 -0
  118. package/dist/machine-link/home.d.ts +20 -0
  119. package/dist/machine-link/home.js +24 -0
  120. package/dist/machine-link/host.d.ts +43 -0
  121. package/dist/machine-link/host.js +189 -0
  122. package/dist/machine-link/index.d.ts +15 -0
  123. package/dist/machine-link/index.js +15 -0
  124. package/dist/machine-link/link.d.ts +48 -0
  125. package/dist/machine-link/link.js +223 -0
  126. package/dist/machine-link/presence.d.ts +10 -0
  127. package/dist/machine-link/presence.js +25 -0
  128. package/dist/machine-link/workers.d.ts +6 -0
  129. package/dist/machine-link/workers.js +6 -0
  130. package/dist/mcp-owner.d.ts +2 -2
  131. package/dist/mcp-owner.js +41 -33
  132. package/dist/mcp.d.ts +15 -3
  133. package/dist/mcp.js +146 -25
  134. package/dist/pack.d.ts +14 -3
  135. package/dist/pack.js +44 -19
  136. package/dist/page/app-access.d.ts +7 -0
  137. package/dist/page/app-access.js +75 -0
  138. package/dist/page/boot-host.js +57 -0
  139. package/dist/page/capabilities.d.ts +3 -3
  140. package/dist/page/capabilities.js +16 -12
  141. package/dist/page/computer-handles.d.ts +3 -3
  142. package/dist/page/computer-target.d.ts +3 -0
  143. package/dist/page/computer-target.js +9 -0
  144. package/dist/page/mount.d.ts +23 -7
  145. package/dist/page/mount.js +152 -16
  146. package/dist/page-assets.d.ts +22 -0
  147. package/dist/page-assets.js +28 -0
  148. package/dist/page-script.d.ts +3 -0
  149. package/dist/page-script.js +5 -4
  150. package/dist/release.d.ts +13 -6
  151. package/dist/release.js +10 -7
  152. package/dist/root-data.d.ts +16 -6
  153. package/dist/root-data.js +2 -2
  154. package/dist/source/index.d.ts +1 -1
  155. package/dist/source/team-source.d.ts +20 -8
  156. package/dist/source/team-source.js +39 -10
  157. package/dist/source/template-seed.d.ts +2 -2
  158. package/dist/standalone/agent-mail.d.ts +24 -0
  159. package/dist/standalone/agent-mail.js +62 -0
  160. package/dist/standalone/agent-store.d.ts +9 -0
  161. package/dist/standalone/agent-store.js +30 -0
  162. package/dist/standalone/agents.d.ts +78 -12
  163. package/dist/standalone/agents.js +470 -59
  164. package/dist/standalone/app-builds-binding.d.ts +20 -2
  165. package/dist/standalone/app-builds-binding.js +151 -27
  166. package/dist/standalone/app-set.d.ts +5 -2
  167. package/dist/standalone/app-set.js +174 -143
  168. package/dist/standalone/browser.d.ts +11 -0
  169. package/dist/standalone/browser.js +72 -0
  170. package/dist/standalone/builds.d.ts +13 -4
  171. package/dist/standalone/builds.js +28 -44
  172. package/dist/standalone/computer-egress.d.ts +2 -0
  173. package/dist/standalone/computer-egress.js +13 -4
  174. package/dist/standalone/computer-fleet.d.ts +43 -0
  175. package/dist/standalone/computer-fleet.js +200 -0
  176. package/dist/standalone/computer.d.ts +44 -9
  177. package/dist/standalone/computer.js +132 -25
  178. package/dist/standalone/install-apps-cli.js +43 -6
  179. package/dist/standalone/instance.d.ts +2 -2
  180. package/dist/standalone/instance.js +8 -11
  181. package/dist/standalone/machine-link.d.ts +354 -0
  182. package/dist/standalone/machine-link.js +368 -0
  183. package/dist/standalone/media.d.ts +2 -2
  184. package/dist/standalone/media.js +19 -16
  185. package/dist/standalone/preview.d.ts +2 -2
  186. package/dist/standalone/preview.js +39 -12
  187. package/dist/standalone/registry.d.ts +149 -9
  188. package/dist/standalone/registry.js +299 -8
  189. package/dist/standalone/worker.d.ts +19 -5
  190. package/dist/standalone/worker.js +90 -54
  191. package/dist/standalone/workflow-binding.d.ts +28 -32
  192. package/dist/standalone/workflow-binding.js +20 -20
  193. package/dist/standalone/workflow-control.d.ts +4 -0
  194. package/dist/standalone/workflow-control.js +40 -0
  195. package/dist/standalone/workflow-events.d.ts +2 -2
  196. package/dist/standalone/workflow-events.js +9 -10
  197. package/dist/standalone/workflow-git-capture.js +4 -3
  198. package/dist/standalone/workflow-host.d.ts +177 -152
  199. package/dist/standalone/workflow-host.js +137 -30
  200. package/dist/standalone/workflow-node-capture.js +11 -4
  201. package/dist/standalone/workflow-schedules.d.ts +5 -2
  202. package/dist/standalone/workflow-schedules.js +9 -10
  203. package/dist/standalone/workflow-trigger-host.d.ts +88 -6
  204. package/dist/standalone/workflow-trigger-host.js +2 -2
  205. package/dist/standalone/workflow-webhooks.d.ts +22 -0
  206. package/dist/standalone/workflow-webhooks.js +39 -0
  207. package/dist/standalone/workflows.d.ts +203 -50
  208. package/dist/standalone/workflows.js +198 -39
  209. package/dist/storage-frame.d.ts +6 -6
  210. package/dist/testing/capabilities.js +14 -3
  211. package/dist/testing/installation.js +26 -2
  212. package/dist/testing/worker.js +1 -1
  213. package/dist/testing/workers-runtime.d.ts +8 -2
  214. package/dist/testing/workers-runtime.js +20 -2
  215. package/dist/webhook-abuse.d.ts +25 -0
  216. package/dist/webhook-abuse.js +54 -0
  217. package/dist/webhook-custody.d.ts +144 -0
  218. package/dist/webhook-custody.js +222 -0
  219. package/dist/webhook-ingress.d.ts +36 -0
  220. package/dist/webhook-ingress.js +146 -0
  221. package/dist/webhooks.d.ts +111 -0
  222. package/dist/webhooks.js +189 -0
  223. package/dist/workers-git.d.ts +12 -17
  224. package/dist/workers-git.js +60 -55
  225. package/dist/workers.d.ts +224 -13
  226. package/dist/workers.js +351 -51
  227. package/dist/workflow-agent-authority.d.ts +8 -0
  228. package/dist/workflow-agent-authority.js +42 -0
  229. package/dist/workflows.d.ts +66 -0
  230. package/dist/workflows.js +97 -0
  231. package/docs/api/README.md +63 -37
  232. package/docs/api/agents.md +17 -0
  233. package/docs/api/app-storage.md +1 -1
  234. package/docs/api/apps.md +1394 -543
  235. package/docs/api/browser/boot.md +132 -0
  236. package/docs/api/browser.md +1440 -0
  237. package/docs/api/build-contract.md +38 -25
  238. package/docs/api/build.md +263 -84
  239. package/docs/api/cloudflare.md +93 -7
  240. package/docs/api/git.md +3 -13
  241. package/docs/api/host.md +944 -118
  242. package/docs/api/index.md +320 -18
  243. package/docs/api/keys.md +24 -1
  244. package/docs/api/mcp.md +59 -12
  245. package/docs/api/modules.md +33 -40
  246. package/docs/api/pack.md +57 -8
  247. package/docs/api/page/mount.md +92 -4
  248. package/docs/api/workers-git.md +103 -24
  249. package/docs/api/workers.md +1581 -244
  250. package/docs/site/agent-quickstart.mdx +28 -14
  251. package/examples/standalone/worker.ts +3 -1
  252. package/examples/standalone/wrangler.jsonc +2 -0
  253. package/package.json +73 -69
  254. package/dist/installation-consent.d.ts +0 -79
  255. package/dist/installation-consent.js +0 -82
  256. package/dist/shell/app-directory.d.ts +0 -542
  257. package/dist/shell/app-directory.js +0 -199
  258. package/dist/shell/browser-actions.d.ts +0 -7
  259. package/dist/shell/browser-actions.js +0 -56
  260. package/dist/shell/command-host.d.ts +0 -112
  261. package/dist/shell/command-host.js +0 -502
  262. package/dist/shell/commands.d.ts +0 -25
  263. package/dist/shell/commands.js +0 -78
  264. package/dist/shell/index.d.ts +0 -8
  265. package/dist/shell/index.js +0 -8
  266. package/dist/shell/keys.d.ts +0 -41
  267. package/dist/shell/keys.js +0 -134
  268. package/dist/shell/shell-module.d.ts +0 -55
  269. package/dist/shell/shell-module.js +0 -86
  270. package/dist/shell/window-manager.d.ts +0 -124
  271. package/dist/shell/window-manager.js +0 -711
  272. package/dist/shell/workbench-contract.d.ts +0 -68
  273. package/dist/shell/workbench-directory.d.ts +0 -332
  274. package/dist/shell/workbench-directory.js +0 -35
  275. package/dist/shell/workbench-host-types.d.ts +0 -96
  276. package/dist/shell/workbench-host-types.js +0 -1
  277. package/dist/shell/workbench-host.d.ts +0 -34
  278. package/dist/shell/workbench-host.js +0 -347
  279. package/dist/shell/workbench-model.d.ts +0 -192
  280. package/dist/shell/workbench-model.js +0 -53
  281. package/dist/shell/workbench.d.ts +0 -4
  282. package/dist/shell/workbench.js +0 -2
  283. package/docs/api/shell/app-directory.md +0 -599
  284. package/docs/api/shell/command-host.md +0 -224
  285. package/docs/api/shell/commands.md +0 -197
  286. package/docs/api/shell/keys.md +0 -183
  287. package/docs/api/shell/shell-module.md +0 -204
  288. package/docs/api/shell/window-manager.md +0 -267
  289. package/docs/api/shell/workbench-directory.md +0 -119
  290. package/docs/api/shell/workbench.md +0 -205
  291. package/docs/api/shell.md +0 -1915
  292. /package/dist/{shell/workbench-contract.js → page/boot-host.d.ts} +0 -0
@@ -1,12 +1,13 @@
1
1
  import * as S from "effect/Schema";
2
2
  import { admitRunInput, accepts, catalogEvents, catalogMethods, catalogSchema, contentDigest, canonicalJson, parseProjection, nodeEventSchema, } from "@fungi.computer/braid";
3
3
  import { deriveDeclaredOperations, approvedBindingGrants, grantsFor, } from "../apps/index.js";
4
- import { pendingSchema } from "@fungi.computer/agar/backend-definition";
4
+ import { pendingSchema, presentMethodName, } from "@fungi.computer/agar/backend-definition";
5
+ import { resultRowSchemaV1 } from "@fungi.computer/gills";
5
6
  import { verifyRelease, } from "../host.js";
6
7
  import { APP_INVOCATION_CEILING_MS, invocationAuthorityOf, invocationFacts, invocationFactsSchema, } from "../invocation.js";
7
8
  import { AppInstanceError } from "../index.js";
8
9
  import { appCapabilityIds } from "@fungi.computer/puffball";
9
- import { createGraphWorkflowRuns, compileForMember, graphStartRequestSchema, preparationFromRun, planNodeCall, workflowRunContextSchema, } from "@fungi.computer/braid/runtime";
10
+ import { createGraphWorkflowRuns, createTriggerRunReservations, compileForMember, graphStartRequestSchema, preparationFromRun, planNodeCall, workflowRunContextSchema, } from "@fungi.computer/braid/runtime";
10
11
  import { appMethodCallContextSchema } from "@fungi.computer/puffball/app";
11
12
  import { appEventFactSchema, } from "@fungi.computer/puffball/app-event-facts";
12
13
  import { keyAppAccess } from "../keys.js";
@@ -96,7 +97,19 @@ const summarizedEntry = (entry) => {
96
97
  };
97
98
  /** The standalone host's installation admission, above the portable engine. */
98
99
  export function createStandaloneWorkflowHost(owner, host, options) {
99
- const store = createGraphWorkflowRuns(owner);
100
+ const graph = createGraphWorkflowRuns(owner);
101
+ const reservations = createTriggerRunReservations(owner);
102
+ const store = {
103
+ ...graph,
104
+ markTerminal(...args) {
105
+ // The standalone run owner ends graph/review state and the SAME Braid
106
+ // reservation atomically, without creating a Hub Computer-cleanup queue.
107
+ owner.transactionSync(() => {
108
+ graph.markTerminal(...args);
109
+ reservations.terminalTriggerRun(args[0]);
110
+ });
111
+ },
112
+ };
100
113
  // Only the host's attested invocation context is associated here. Lifecycle,
101
114
  // events, reviews and replay are owned by the shared runtime store.
102
115
  owner.sql.exec(`CREATE TABLE IF NOT EXISTS standalone_workflow_callers (
@@ -168,14 +181,22 @@ export function createStandaloneWorkflowHost(owner, host, options) {
168
181
  if (declaration === null)
169
182
  return false;
170
183
  const snapshot = await deriveDeclaredOperations(selected.installation.release, declaration, host.capabilities ?? []);
171
- return (grantsFor(selected.installation, declaration, snapshot, "workflow.publish") !== null);
184
+ return (grantsFor({
185
+ status: selected.installation.status,
186
+ authority: selected.installation.authority,
187
+ artifactDigest: selected.installation.release.artifact.artifactDigest,
188
+ }, declaration, snapshot, "workflow.publish") !== null);
172
189
  };
173
190
  const runGranted = async (selected) => {
174
191
  const declaration = selected.verified.declaration;
175
192
  if (declaration === null)
176
193
  return false;
177
194
  const snapshot = await deriveDeclaredOperations(selected.installation.release, declaration, host.capabilities ?? []);
178
- if (grantsFor(selected.installation, declaration, snapshot, "workflow.run") === null)
195
+ if (grantsFor({
196
+ status: selected.installation.status,
197
+ authority: selected.installation.authority,
198
+ artifactDigest: selected.installation.release.artifact.artifactDigest,
199
+ }, declaration, snapshot, "workflow.run") === null)
179
200
  return false;
180
201
  return approvedBindingGrants(selected.installation, declaration).some((binding) => binding.binding === "WORKFLOWS" &&
181
202
  binding.operations.includes("runGraph"));
@@ -191,12 +212,10 @@ export function createStandaloneWorkflowHost(owner, host, options) {
191
212
  checkLibraryOperation(selected, operation);
192
213
  return selected;
193
214
  };
194
- const admitInvocation = async (raw, operation) => {
195
- const facts = S.decodeUnknownSync(invocationFactsSchema)(raw, {
196
- onExcessProperty: "error",
197
- });
198
- if (facts.subject.kind !== "call" ||
199
- facts.selection.owner.kind !== "installation")
215
+ // All frame kinds re-open the same live installation pin and grants.
216
+ // A lifecycle admission does not turn the frame into a member call.
217
+ const admitFrame = async (facts, operation) => {
218
+ if (facts.selection.owner.kind !== "installation")
200
219
  throw new AppInstanceError("revoked");
201
220
  if (facts.deadlineAt <= Date.now())
202
221
  throw new AppInstanceError("expired");
@@ -216,13 +235,54 @@ export function createStandaloneWorkflowHost(owner, host, options) {
216
235
  return {
217
236
  ...selected,
218
237
  libraryId,
219
- context: facts.subject.context,
220
238
  installationAuthority: {
221
239
  selection: current.selection,
222
240
  artifactDigest: current.artifactDigest,
223
241
  },
224
242
  };
225
243
  };
244
+ const admitInvocation = async (raw, operation) => {
245
+ const facts = S.decodeUnknownSync(invocationFactsSchema)(raw, {
246
+ onExcessProperty: "error",
247
+ });
248
+ if (facts.subject.kind !== "call")
249
+ throw new AppInstanceError("revoked");
250
+ return {
251
+ ...(await admitFrame(facts, operation)),
252
+ context: facts.subject.context,
253
+ };
254
+ };
255
+ const admitLifecycle = async (raw, operation) => {
256
+ const facts = S.decodeUnknownSync(invocationFactsSchema)(raw, {
257
+ onExcessProperty: "error",
258
+ });
259
+ if (facts.subject.kind !== "lifecycle" ||
260
+ facts.subject.name !== "onGitPush")
261
+ throw new AppInstanceError("revoked");
262
+ return admitFrame(facts, operation);
263
+ };
264
+ const admitStart = async (raw) => {
265
+ const facts = S.decodeUnknownSync(invocationFactsSchema)(raw, {
266
+ onExcessProperty: "error",
267
+ });
268
+ if (facts.subject.kind === "call")
269
+ return admitInvocation(facts, "runGraph");
270
+ const selected = await admitLifecycle(facts, "runGraph");
271
+ const member = await options.lifecycleMember();
272
+ if (member === null)
273
+ throw new AppInstanceError("revoked");
274
+ const current = await options
275
+ .authority(selected.libraryId)
276
+ .member(member.memberId);
277
+ if (current.membershipVersion !== member.membershipVersion)
278
+ throw new AppInstanceError("revoked");
279
+ const context = {
280
+ actor: { kind: "member", memberId: member.memberId },
281
+ role: "owner",
282
+ computerId: host.computerId ?? null,
283
+ };
284
+ return { ...selected, context };
285
+ };
226
286
  /** A trigger's live library pin; any missing grant is a typed revocation. */
227
287
  const triggerAuthority = async (installationId) => {
228
288
  const installation = await host.installations.get(installationId);
@@ -324,7 +384,8 @@ export function createStandaloneWorkflowHost(owner, host, options) {
324
384
  workflowRunGranted = await runGranted(selected);
325
385
  const after = await host.installations.get(current.installationId);
326
386
  if (after?.status !== "enabled" ||
327
- after.authorityVersion !== current.authorityVersion ||
387
+ after.authority.authorityVersion !==
388
+ current.authority.authorityVersion ||
328
389
  releaseKey(after) !== releaseKey(current))
329
390
  throw new AppInstanceError("revoked");
330
391
  }
@@ -356,7 +417,9 @@ export function createStandaloneWorkflowHost(owner, host, options) {
356
417
  return { apps };
357
418
  }
358
419
  const catalog = async (facts, input) => {
359
- const library = await admitInvocation(facts, "catalog");
420
+ const library = facts.subject.kind === "call"
421
+ ? await admitInvocation(facts, "catalog")
422
+ : await admitLifecycle(facts, "catalog");
360
423
  if (input?.installationId === undefined)
361
424
  return catalogForLibrary(library);
362
425
  const { apps } = await catalogForLibrary(library, {
@@ -398,12 +461,15 @@ export function createStandaloneWorkflowHost(owner, host, options) {
398
461
  // Host readers use this only after admitting the live member and library.
399
462
  catalogForLibrary,
400
463
  async prepare(facts, raw) {
401
- const selected = await admitInvocation(facts, "runGraph");
464
+ const selected = await admitStart(facts);
402
465
  const { libraryId, context } = selected;
403
466
  const request = S.decodeUnknownSync(graphStartRequestSchema)(raw, {
404
467
  onExcessProperty: "error",
405
468
  });
406
469
  const publication = request.published;
470
+ // Only immutable, published runs receive Workflow node attestations.
471
+ if (facts.subject.kind === "lifecycle" && publication === undefined)
472
+ return { error: "not_granted" };
407
473
  if (publication !== undefined) {
408
474
  if (!(await publisherGranted(selected)))
409
475
  return { error: "not_granted" };
@@ -458,8 +524,11 @@ export function createStandaloneWorkflowHost(owner, host, options) {
458
524
  const admitted = admitRunInput(compiled.plan.definition, request.input);
459
525
  if (admitted.kind === "invalid")
460
526
  return { error: "invalid_input" };
461
- const runId = "run_" +
462
- (await contentDigest([libraryId, request.requestId])).slice(7, 47);
527
+ // The host's accepted event owns lifecycle replay, not a guest request id.
528
+ const requestId = facts.subject.kind === "lifecycle" && facts.subject.name === "onGitPush"
529
+ ? ["onGitPush", facts.subject.eventId]
530
+ : request.requestId;
531
+ const runId = "run_" + (await contentDigest([libraryId, requestId])).slice(7, 47);
463
532
  // An Agent runs with the access of the person who approved its App
464
533
  // tools.
465
534
  const subject = facts.subject.kind === "call" ? facts.subject : null;
@@ -515,7 +584,7 @@ export function createStandaloneWorkflowHost(owner, host, options) {
515
584
  }
516
585
  : {
517
586
  initiatedBy: { kind: "member", memberId: actorId },
518
- source: "manual",
587
+ source: facts.subject.kind === "lifecycle" ? "event" : "manual",
519
588
  libraryInstallationId: libraryId,
520
589
  computerId: context.computerId,
521
590
  plan: compiled.plan,
@@ -531,7 +600,7 @@ export function createStandaloneWorkflowHost(owner, host, options) {
531
600
  const started = {
532
601
  teamId: libraryId,
533
602
  runId,
534
- requestId: await contentDigest([libraryId, request.requestId]),
603
+ requestId: await contentDigest([libraryId, requestId]),
535
604
  actorId,
536
605
  computerId: context.computerId,
537
606
  plan: compiled.plan,
@@ -541,7 +610,10 @@ export function createStandaloneWorkflowHost(owner, host, options) {
541
610
  initiatedBy: preparation.initiatedBy,
542
611
  };
543
612
  const record = delivery === undefined ? started : { ...started, delivery };
544
- const current = await admitInvocation(facts, "runGraph");
613
+ const current = await admitStart(facts);
614
+ if (canonicalJson(S.decodeUnknownSync(S.Json)(current.context)) !==
615
+ canonicalJson(S.decodeUnknownSync(S.Json)(context)))
616
+ return { error: "not_granted" };
545
617
  if (publication !== undefined && !(await publisherGranted(current)))
546
618
  return { error: "not_granted" };
547
619
  const callContext = {
@@ -653,11 +725,8 @@ export function createStandaloneWorkflowHost(owner, host, options) {
653
725
  };
654
726
  const deadlineAt = Date.now() + APP_INVOCATION_CEILING_MS;
655
727
  const deadline = { deadlineAt, grantExpiresAt: deadlineAt };
656
- const facts = run.publication === undefined
657
- ? invocationFacts.fromCaller(authority, {
658
- ...savedCaller,
659
- idempotencyKey: call.idempotencyKey,
660
- }, deadline)
728
+ const factsFor = (idempotencyKey) => run.publication === undefined
729
+ ? invocationFacts.fromCaller(authority, { ...savedCaller, idempotencyKey }, deadline)
661
730
  : invocationFacts.fromWorkflowNode(authority, {
662
731
  ...savedCaller,
663
732
  workflow: {
@@ -666,8 +735,9 @@ export function createStandaloneWorkflowHost(owner, host, options) {
666
735
  nodeId: resolved.nodeId,
667
736
  armedBy: savedCaller.actor,
668
737
  },
669
- idempotencyKey: call.idempotencyKey,
738
+ idempotencyKey,
670
739
  }, deadline);
740
+ const facts = factsFor(call.idempotencyKey);
671
741
  if (resolved.gitAccess !== undefined)
672
742
  recordGitNode(call.idempotencyKey, {
673
743
  teamId: run.teamId,
@@ -700,6 +770,7 @@ export function createStandaloneWorkflowHost(owner, host, options) {
700
770
  // retryable fault; same for an instance the owner state marks
701
771
  // inactive.
702
772
  case "revoked":
773
+ case "disabled":
703
774
  case "instance_owner_mismatch":
704
775
  case "instance_authority_version_mismatch":
705
776
  case "instance_release_mismatch":
@@ -715,6 +786,14 @@ export function createStandaloneWorkflowHost(owner, host, options) {
715
786
  ? "App execution failed"
716
787
  : `App execution failed (${result.causeClass})`);
717
788
  case "expired":
789
+ case "backend_load_failed":
790
+ case "backend_construction_failed":
791
+ case "ui_mount_failed":
792
+ case "boot_runner_unavailable":
793
+ case "boot_browser_binding_missing":
794
+ case "boot_clone_unavailable":
795
+ case "boot_timeout":
796
+ case "boot_cleanup_failed":
718
797
  case "binding_unavailable":
719
798
  case "reentrant":
720
799
  case "conflicting_owner_state":
@@ -732,20 +811,48 @@ export function createStandaloneWorkflowHost(owner, host, options) {
732
811
  }
733
812
  }
734
813
  // The engine's closed refusal vocabulary names host decisions; an App's
735
- // own domain refusal fails the node with its code.
814
+ // own domain refusal fails the node with its code and caller-facing reason.
736
815
  if (result.value.kind === "refused")
737
- throw new Error(`App method refused (${result.value.code})`);
816
+ throw new Error(`App method refused (${result.value.code}): ${result.value.message}`);
738
817
  const value = result.value.value;
739
818
  const pending = pinned.pending === true ? pendingSchema.safeParse(value) : null;
740
819
  if (pending?.success)
741
820
  return pending.data;
742
821
  if (!accepts(parseProjection(pinned.output), value))
743
822
  return { kind: "refused", code: "invalid_output" };
744
- return {
823
+ const output = S.decodeUnknownSync(S.Json)(value);
824
+ const row = verified.api.methods[resolved.method]?.present === undefined
825
+ ? undefined
826
+ : await presentedRow(resolved.method, host.instances
827
+ .get(authority.instanceId)
828
+ .call(factsFor(`${call.idempotencyKey}:present`), verified.api, presentMethodName, { method: resolved.method, input: resolved.input, output }));
829
+ const complete = {
745
830
  kind: "complete",
746
- output: S.decodeUnknownSync(S.Json)(value),
831
+ output,
747
832
  costMilliunits: 0,
748
833
  };
834
+ return row === undefined ? complete : { ...complete, row };
749
835
  },
750
836
  };
751
837
  }
838
+ /**
839
+ * A failed or malformed projection costs the step only its row: the step stays
840
+ * complete, Trellis reads it as "<App> ran <method>" with the raw view, and
841
+ * the operator log records why.
842
+ */
843
+ async function presentedRow(method, reply) {
844
+ try {
845
+ const result = await reply;
846
+ if (!result.ok || result.value.kind !== "ok") {
847
+ console.error("Workflow step presentation was refused", method);
848
+ return undefined;
849
+ }
850
+ return S.decodeUnknownSync(resultRowSchemaV1, {
851
+ onExcessProperty: "error",
852
+ })(result.value.value);
853
+ }
854
+ catch (cause) {
855
+ console.error("Workflow step presentation failed", method, cause);
856
+ return undefined;
857
+ }
858
+ }
@@ -31,7 +31,13 @@ export function createStandaloneWorkflowNodeCapture(options) {
31
31
  return null;
32
32
  const facts = {
33
33
  principal: { actor: caller.actor, role: caller.role ?? null },
34
- installation,
34
+ installation: {
35
+ status: installation.status,
36
+ visibility: installation.visibility,
37
+ instanceId: installation.instanceId,
38
+ authority: installation.authority,
39
+ artifactDigest: installation.release.artifact.artifactDigest,
40
+ },
35
41
  declaration: verified.declaration,
36
42
  declaredOperations: await deriveDeclaredOperations(installation.release, verified.declaration, host.capabilities ?? []),
37
43
  api: verified.api,
@@ -57,9 +63,10 @@ export function createStandaloneWorkflowNodeCapture(options) {
57
63
  const after = await readers.member(actor.memberId);
58
64
  if (latest?.status !== "enabled" ||
59
65
  latest.instanceId !== installation.instanceId ||
60
- latest.authorityVersion !== installation.authorityVersion ||
61
- latest.declaredOperationsDigest !==
62
- installation.declaredOperationsDigest ||
66
+ latest.authority.authorityVersion !==
67
+ installation.authority.authorityVersion ||
68
+ latest.authority.declaredOperationsDigest !==
69
+ installation.authority.declaredOperationsDigest ||
63
70
  latest.release.releaseId !== installation.release.releaseId ||
64
71
  latest.release.artifact.artifactDigest !==
65
72
  installation.release.artifact.artifactDigest ||
@@ -1,8 +1,10 @@
1
1
  import { createWorkflowSchedules, type WorkflowInstallationAuthority } from "@fungi.computer/braid/runtime";
2
2
  import type { AppMethodCallContext } from "@fungi.computer/puffball/app-method-runtime";
3
+ import type { workflowAgentAuthority } from "../workflow-agent-authority.js";
3
4
  import { type TriggerArmTarget, type ScheduleDisarmInput } from "./workflow-binding.js";
4
5
  /** The host supplies this result only after reopening the protected invocation. */
5
6
  export type TriggerAdmission = Readonly<{
7
+ authority: Awaited<ReturnType<typeof workflowAgentAuthority>>;
6
8
  libraryId: string;
7
9
  context: AppMethodCallContext;
8
10
  /** The admitted frame's selection and verified artifact, pinned on arm. */
@@ -26,7 +28,7 @@ export declare function createStandaloneWorkflowSchedules<Frame>(options: Parame
26
28
  } | {
27
29
  kind: "refused";
28
30
  reason: string;
29
- readonly error?: undefined;
31
+ error?: undefined;
30
32
  }>;
31
33
  disarm(frame: Frame, raw: ScheduleDisarmInput): Promise<{
32
34
  kind: "not_found";
@@ -41,12 +43,13 @@ export declare function createStandaloneWorkflowSchedules<Frame>(options: Parame
41
43
  } | {
42
44
  schedules: {
43
45
  scheduleId: string;
46
+ installationId: string;
44
47
  workflowId: string;
45
48
  triggerId: string;
46
49
  nextDueAt: number;
47
50
  state: "active" | "finished" | "paused" | "cancelled";
48
51
  lastError: string | null;
49
52
  }[];
50
- readonly error?: undefined;
53
+ error?: undefined;
51
54
  }>;
52
55
  };
@@ -10,30 +10,29 @@ export function createStandaloneWorkflowSchedules(options) {
10
10
  alarm: () => schedules.fireDue(),
11
11
  async arm(frame, raw) {
12
12
  const target = triggerArmTargetSchema.parse(raw);
13
- const { libraryId, context, installationAuthority } = await options.admitInvocation(frame, "armSchedule");
14
- if (context.actor.kind !== "member")
13
+ const { libraryId, context, installationAuthority, authority } = await options.admitInvocation(frame, "armSchedule");
14
+ if (authority === null)
15
15
  return { error: "not_granted" };
16
16
  if (context.computerId === null)
17
17
  return {
18
18
  kind: "refused",
19
19
  reason: "Select a Computer before arming a schedule",
20
20
  };
21
- // Standalone has no Agent arming source: the owner arms as themself.
22
- return schedules.arm({ armedBy: context.actor.memberId, armedVia: null }, { ...target, installationId: libraryId }, context.computerId, installationAuthority);
21
+ return schedules.arm(authority.armer, { ...target, installationId: libraryId }, context.computerId, installationAuthority);
23
22
  },
24
23
  async disarm(frame, raw) {
25
24
  const { scheduleId } = scheduleDisarmInputSchema.parse(raw);
26
- const { libraryId, context } = await options.admitInvocation(frame, "disarmSchedule");
27
- if (context.actor.kind !== "member")
25
+ const { libraryId, authority } = await options.admitInvocation(frame, "disarmSchedule");
26
+ if (authority === null)
28
27
  return { error: "not_granted" };
29
- return schedules.disarm({ kind: "member", memberId: context.actor.memberId }, libraryId, scheduleId);
28
+ return schedules.disarm(authority.principal, libraryId, scheduleId);
30
29
  },
31
30
  async list(frame) {
32
- const { libraryId, context } = await options.admitInvocation(frame, "schedules");
33
- if (context.actor.kind !== "member")
31
+ const { libraryId, authority } = await options.admitInvocation(frame, "schedules");
32
+ if (authority === null)
34
33
  return { error: "not_granted" };
35
34
  return {
36
- schedules: await schedules.list({ kind: "member", memberId: context.actor.memberId }, libraryId),
35
+ schedules: await schedules.list(authority.principal, libraryId),
37
36
  };
38
37
  },
39
38
  };
@@ -1,4 +1,4 @@
1
- import { createTeamWorkflowRuns, createTeamWorkflowTriggers, type WorkflowErrorPort, type WorkflowRunAuthority } from "@fungi.computer/braid/runtime";
1
+ import { createTeamWorkflowRuns, createTeamWorkflowTriggers, type WorkflowErrorPort, type WorkflowRunAuthority, type WorkflowTriggerAdmission } from "@fungi.computer/braid/runtime";
2
2
  /** Standalone denial is the Instance's revoked refusal; other failures retry. */
3
3
  export declare const standaloneTriggerErrors: WorkflowErrorPort;
4
4
  /**
@@ -8,7 +8,7 @@ export declare const standaloneTriggerErrors: WorkflowErrorPort;
8
8
  */
9
9
  export declare function createStandaloneWorkflowTriggerHost(options: {
10
10
  authority: WorkflowRunAuthority;
11
- runs: Pick<Parameters<typeof createTeamWorkflowRuns>[0], "sql" | "transactionSync" | "teamId">;
11
+ runs: Pick<Parameters<typeof createTeamWorkflowRuns>[0], "sql" | "transactionSync" | "teamId" | "now">;
12
12
  triggers: Omit<Parameters<typeof createTeamWorkflowTriggers>[0], "runs" | "errors">;
13
13
  /** Whether this member may have run endings reported to the Agent Session. */
14
14
  admitDelivery: Parameters<typeof createTeamWorkflowRuns>[0]["admitDelivery"];
@@ -29,6 +29,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
29
29
  readonly source: "key" | "manual" | "event" | "schedule" | "agent";
30
30
  readonly runId: string;
31
31
  readonly computerId: string | null;
32
+ readonly teamId: string;
32
33
  readonly plan: {
33
34
  readonly planDigest: string;
34
35
  readonly definition: {
@@ -87,9 +88,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
87
88
  readonly timeout: number;
88
89
  readonly kind: "review";
89
90
  readonly reviewers: "runner" | "owners";
91
+ readonly detail?: string;
90
92
  readonly choices?: readonly {
91
93
  readonly id: string;
92
94
  readonly label: string;
95
+ readonly description?: string;
93
96
  }[];
94
97
  } | {
95
98
  readonly id: string;
@@ -188,9 +191,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
188
191
  readonly timeout: number;
189
192
  readonly kind: "review";
190
193
  readonly reviewers: "runner" | "owners";
194
+ readonly detail?: string;
191
195
  readonly choices?: readonly {
192
196
  readonly id: string;
193
197
  readonly label: string;
198
+ readonly description?: string;
194
199
  }[];
195
200
  } | {
196
201
  readonly id: string;
@@ -329,7 +334,6 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
329
334
  readonly pending?: true;
330
335
  }[];
331
336
  };
332
- readonly teamId: string;
333
337
  readonly requestId: string;
334
338
  readonly actorId: string;
335
339
  readonly ceiling: {
@@ -340,7 +344,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
340
344
  readonly operations: readonly string[];
341
345
  }[];
342
346
  readonly nodeId: string;
343
- readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
347
+ readonly capabilities: readonly ("approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
344
348
  readonly graphId?: string;
345
349
  }[];
346
350
  readonly nodeGitAccess: readonly {
@@ -588,9 +592,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
588
592
  readonly timeout: number;
589
593
  readonly kind: "review";
590
594
  readonly reviewers: "runner" | "owners";
595
+ readonly detail?: string;
591
596
  readonly choices?: readonly {
592
597
  readonly id: string;
593
598
  readonly label: string;
599
+ readonly description?: string;
594
600
  }[];
595
601
  } | {
596
602
  readonly id: string;
@@ -689,9 +695,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
689
695
  readonly timeout: number;
690
696
  readonly kind: "review";
691
697
  readonly reviewers: "runner" | "owners";
698
+ readonly detail?: string;
692
699
  readonly choices?: readonly {
693
700
  readonly id: string;
694
701
  readonly label: string;
702
+ readonly description?: string;
695
703
  }[];
696
704
  } | {
697
705
  readonly id: string;
@@ -966,9 +974,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
966
974
  readonly timeout: number;
967
975
  readonly kind: "review";
968
976
  readonly reviewers: "runner" | "owners";
977
+ readonly detail?: string;
969
978
  readonly choices?: readonly {
970
979
  readonly id: string;
971
980
  readonly label: string;
981
+ readonly description?: string;
972
982
  }[];
973
983
  } | {
974
984
  readonly id: string;
@@ -1067,9 +1077,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1067
1077
  readonly timeout: number;
1068
1078
  readonly kind: "review";
1069
1079
  readonly reviewers: "runner" | "owners";
1080
+ readonly detail?: string;
1070
1081
  readonly choices?: readonly {
1071
1082
  readonly id: string;
1072
1083
  readonly label: string;
1084
+ readonly description?: string;
1073
1085
  }[];
1074
1086
  } | {
1075
1087
  readonly id: string;
@@ -1230,7 +1242,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1230
1242
  }>;
1231
1243
  startCachedGraph(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, started: Pick<import("@fungi.computer/braid/runtime").GraphStartRequest, "requestId" | "input"> & {
1232
1244
  triggerRepository?: string;
1233
- }): Promise<{
1245
+ }, admission?: WorkflowTriggerAdmission): Promise<{
1234
1246
  kind: "conflict" | "started" | "replay";
1235
1247
  runId: string;
1236
1248
  planDigest: string;
@@ -1252,6 +1264,66 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1252
1264
  revokeInstallationInMutation(rawInstallationId: string): void;
1253
1265
  revokeReleaseInMutation(appIds: readonly string[]): void;
1254
1266
  onLifecycle(status: "active" | "suspended"): void;
1267
+ reserveWebhookDelivery(raw: import("zod").input<import("zod").ZodObject<{
1268
+ scope: import("zod").ZodLazy<import("zod").ZodObject<{
1269
+ installationId: import("zod").ZodString;
1270
+ workflowId: import("zod").ZodString;
1271
+ commit: import("zod").ZodString;
1272
+ triggerId: import("zod").ZodString;
1273
+ }, import("zod/v4/core").$strict>>;
1274
+ delivery: import("zod").ZodObject<{
1275
+ host: import("zod").ZodString;
1276
+ tenant: import("zod").ZodString;
1277
+ bindingId: import("zod").ZodString;
1278
+ eventId: import("zod").ZodString;
1279
+ }, import("zod/v4/core").$strict>;
1280
+ cargo: import("zod").ZodJSONSchema;
1281
+ limits: import("zod").ZodObject<{
1282
+ hostConcurrency: import("zod").ZodNumber;
1283
+ bindingConcurrency: import("zod").ZodNumber;
1284
+ }, import("zod/v4/core").$strict>;
1285
+ }, import("zod/v4/core").$strict>>): {
1286
+ kind: "reserved" | "replay";
1287
+ reservationId: string;
1288
+ runId: string | null;
1289
+ } | {
1290
+ kind: "refused";
1291
+ reason: "limit";
1292
+ };
1293
+ pendingWebhookDeliveries(rawOwner: import("zod").input<import("zod").ZodObject<{
1294
+ host: import("zod").ZodString;
1295
+ tenant: import("zod").ZodString;
1296
+ }, import("zod/v4/core").$strict>>): ({
1297
+ kind: "launch";
1298
+ reservationId: string;
1299
+ runId: string;
1300
+ } | {
1301
+ scope: {
1302
+ installationId: string;
1303
+ workflowId: string;
1304
+ commit: string;
1305
+ triggerId: string;
1306
+ };
1307
+ delivery: {
1308
+ host: string;
1309
+ tenant: string;
1310
+ bindingId: string;
1311
+ eventId: string;
1312
+ };
1313
+ cargo: import("zod").JSONType;
1314
+ limits: {
1315
+ hostConcurrency: number;
1316
+ bindingConcurrency: number;
1317
+ };
1318
+ kind: "start";
1319
+ reservationId: string;
1320
+ runId?: never;
1321
+ })[];
1322
+ nextWebhookWake(rawOwner: import("zod").input<import("zod").ZodObject<{
1323
+ host: import("zod").ZodString;
1324
+ tenant: import("zod").ZodString;
1325
+ }, import("zod/v4/core").$strict>>): number | null;
1326
+ completeWebhookDelivery(rawReservationId: string): void;
1255
1327
  reserveTriggerRun(raw: {
1256
1328
  scope: import("@fungi.computer/braid/runtime").TriggerRunScope;
1257
1329
  requestId: string;
@@ -1293,6 +1365,12 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1293
1365
  readonly iteration: string;
1294
1366
  readonly instanceId: string;
1295
1367
  readonly eventType: string;
1368
+ readonly position?: readonly {
1369
+ readonly node: string;
1370
+ readonly loop: "repeat" | "map";
1371
+ readonly index: number;
1372
+ readonly count: number;
1373
+ }[];
1296
1374
  readonly choices?: readonly string[];
1297
1375
  };
1298
1376
  status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
@@ -1486,9 +1564,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1486
1564
  readonly timeout: number;
1487
1565
  readonly kind: "review";
1488
1566
  readonly reviewers: "runner" | "owners";
1567
+ readonly detail?: string;
1489
1568
  readonly choices?: readonly {
1490
1569
  readonly id: string;
1491
1570
  readonly label: string;
1571
+ readonly description?: string;
1492
1572
  }[];
1493
1573
  } | {
1494
1574
  readonly id: string;
@@ -1587,9 +1667,11 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1587
1667
  readonly timeout: number;
1588
1668
  readonly kind: "review";
1589
1669
  readonly reviewers: "runner" | "owners";
1670
+ readonly detail?: string;
1590
1671
  readonly choices?: readonly {
1591
1672
  readonly id: string;
1592
1673
  readonly label: string;
1674
+ readonly description?: string;
1593
1675
  }[];
1594
1676
  } | {
1595
1677
  readonly id: string;
@@ -1680,7 +1762,7 @@ export declare function createStandaloneWorkflowTriggerHost(options: {
1680
1762
  refusal: (binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger) => string | null;
1681
1763
  invalidateInstallation: (installationId: string) => void;
1682
1764
  revalidatePublished(installationId: string, git: import("@fungi.computer/agar/git").GitBinding): Promise<void>;
1683
- fire(raw: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, scope: string, event: import("@fungi.computer/braid").TriggerEvent): Promise<Readonly<{
1765
+ fire(raw: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, scope: string, event: import("@fungi.computer/braid").TriggerEvent, admission?: WorkflowTriggerAdmission): Promise<Readonly<{
1684
1766
  kind: "ignored";
1685
1767
  }> | Readonly<{
1686
1768
  kind: "started" | "replay" | "conflict";