@fungi.computer/oyster 0.0.0-stage → 0.1.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 (339) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1134 -2
  3. package/dist/agents.d.ts +114 -0
  4. package/dist/agents.js +322 -0
  5. package/dist/app-builds.d.ts +210 -0
  6. package/dist/app-builds.js +499 -0
  7. package/dist/app-sandbox.d.ts +2 -0
  8. package/dist/app-sandbox.js +2 -0
  9. package/dist/app-sources.d.ts +31 -0
  10. package/dist/app-sources.js +370 -0
  11. package/dist/app-storage.d.ts +141 -0
  12. package/dist/app-storage.js +281 -0
  13. package/dist/apps/gate.d.ts +105 -0
  14. package/dist/apps/gate.js +273 -0
  15. package/dist/apps/index.d.ts +5 -0
  16. package/dist/apps/index.js +5 -0
  17. package/dist/apps/installation.d.ts +248 -0
  18. package/dist/apps/installation.js +307 -0
  19. package/dist/apps/operations.d.ts +8 -0
  20. package/dist/apps/operations.js +98 -0
  21. package/dist/apps/tools.d.ts +33 -0
  22. package/dist/apps/tools.js +17 -0
  23. package/dist/auth.d.ts +11 -0
  24. package/dist/auth.js +93 -0
  25. package/dist/backend-request.d.ts +3 -0
  26. package/dist/backend-request.js +53 -0
  27. package/dist/build/artifact-writer.d.ts +40 -0
  28. package/dist/build/artifact-writer.js +181 -0
  29. package/dist/build/build-jobs.d.ts +128 -0
  30. package/dist/build/build-jobs.js +203 -0
  31. package/dist/build/build-policy.d.ts +10 -0
  32. package/dist/build/build-policy.js +10 -0
  33. package/dist/build/build-step.d.ts +37 -0
  34. package/dist/build/build-step.js +28 -0
  35. package/dist/build/bundled-html.d.ts +7 -0
  36. package/dist/build/bundled-html.js +64 -0
  37. package/dist/build/candidate-builder.d.ts +68 -0
  38. package/dist/build/candidate-builder.js +91 -0
  39. package/dist/build/candidate-cli.d.ts +1 -0
  40. package/dist/build/candidate-cli.js +119 -0
  41. package/dist/build/candidate-cli.mjs +28170 -0
  42. package/dist/build/content-objects.d.ts +37 -0
  43. package/dist/build/content-objects.js +53 -0
  44. package/dist/build/definition-emission.d.ts +34 -0
  45. package/dist/build/definition-emission.js +201 -0
  46. package/dist/build/effect.d.ts +249 -0
  47. package/dist/build/effect.js +436 -0
  48. package/dist/build/git-environment.d.ts +9 -0
  49. package/dist/build/git-environment.js +60 -0
  50. package/dist/build/html-recipe.d.ts +20 -0
  51. package/dist/build/html-recipe.js +51 -0
  52. package/dist/build/local-build.d.ts +67 -0
  53. package/dist/build/local-build.js +1128 -0
  54. package/dist/build/snapshot-package-store.d.ts +12 -0
  55. package/dist/build/snapshot-package-store.js +36 -0
  56. package/dist/build/snapshot-program-scripts.d.ts +6 -0
  57. package/dist/build/snapshot-program-scripts.js +2 -0
  58. package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
  59. package/dist/build/snapshot-programs/snapshot-path.js +6 -0
  60. package/dist/build/submission-contract.d.ts +828 -0
  61. package/dist/build/submission-contract.js +180 -0
  62. package/dist/build/workspace-build.d.ts +55 -0
  63. package/dist/build/workspace-build.js +200 -0
  64. package/dist/build-contract.d.ts +7 -0
  65. package/dist/build-contract.js +7 -0
  66. package/dist/build-egress.d.ts +62 -0
  67. package/dist/build-egress.js +148 -0
  68. package/dist/build-jobs.d.ts +2 -0
  69. package/dist/build-jobs.js +2 -0
  70. package/dist/build.d.ts +12 -0
  71. package/dist/build.js +14 -0
  72. package/dist/capability-descriptor.d.ts +46 -0
  73. package/dist/capability-descriptor.js +51 -0
  74. package/dist/catalog-frame.d.ts +39 -0
  75. package/dist/catalog-frame.js +72 -0
  76. package/dist/cause-class.d.ts +19 -0
  77. package/dist/cause-class.js +54 -0
  78. package/dist/cloudflare.d.ts +123 -0
  79. package/dist/cloudflare.js +391 -0
  80. package/dist/computer-terminal.d.ts +38 -0
  81. package/dist/computer-terminal.js +410 -0
  82. package/dist/computer.d.ts +60 -0
  83. package/dist/computer.js +33 -0
  84. package/dist/event-recipients.d.ts +57 -0
  85. package/dist/event-recipients.js +144 -0
  86. package/dist/facet-invocation.d.ts +4 -0
  87. package/dist/facet-invocation.js +45 -0
  88. package/dist/files.d.ts +42 -0
  89. package/dist/files.js +123 -0
  90. package/dist/frame-binding-wire-script.d.ts +2 -0
  91. package/dist/frame-binding-wire-script.js +1 -0
  92. package/dist/frame-binding-wire.d.ts +28 -0
  93. package/dist/frame-binding-wire.js +54 -0
  94. package/dist/git-admission.d.ts +52 -0
  95. package/dist/git-admission.js +188 -0
  96. package/dist/git-auth.d.ts +11 -0
  97. package/dist/git-auth.js +27 -0
  98. package/dist/git-door.d.ts +35 -0
  99. package/dist/git-door.js +108 -0
  100. package/dist/git-journal.d.ts +31 -0
  101. package/dist/git-journal.js +188 -0
  102. package/dist/git.d.ts +31 -0
  103. package/dist/git.js +64 -0
  104. package/dist/guest-policy.d.ts +9 -0
  105. package/dist/guest-policy.js +13 -0
  106. package/dist/host.d.ts +244 -0
  107. package/dist/host.js +1043 -0
  108. package/dist/index.d.ts +166 -0
  109. package/dist/index.js +320 -0
  110. package/dist/installation-consent.d.ts +79 -0
  111. package/dist/installation-consent.js +82 -0
  112. package/dist/internal/background-origins.d.ts +3 -0
  113. package/dist/internal/background-origins.js +8 -0
  114. package/dist/internal/delivery.d.ts +12 -0
  115. package/dist/internal/delivery.js +167 -0
  116. package/dist/internal/host-gate.d.ts +14 -0
  117. package/dist/internal/host-gate.js +62 -0
  118. package/dist/internal/registry-installations.d.ts +6 -0
  119. package/dist/internal/registry-installations.js +12 -0
  120. package/dist/invocation.d.ts +251 -0
  121. package/dist/invocation.js +377 -0
  122. package/dist/keys.d.ts +48 -0
  123. package/dist/keys.js +52 -0
  124. package/dist/mcp-owner.d.ts +27 -0
  125. package/dist/mcp-owner.js +155 -0
  126. package/dist/mcp.d.ts +89 -0
  127. package/dist/mcp.js +429 -0
  128. package/dist/media.d.ts +23 -0
  129. package/dist/media.js +12 -0
  130. package/dist/pack.d.ts +79 -0
  131. package/dist/pack.js +151 -0
  132. package/dist/page/capabilities.d.ts +23 -0
  133. package/dist/page/capabilities.js +256 -0
  134. package/dist/page/computer-handles.d.ts +79 -0
  135. package/dist/page/computer-handles.js +44 -0
  136. package/dist/page/gill-observation.d.ts +4 -0
  137. package/dist/page/gill-observation.js +31 -0
  138. package/dist/page/lifetime.d.ts +6 -0
  139. package/dist/page/lifetime.js +19 -0
  140. package/dist/page/mount.d.ts +163 -0
  141. package/dist/page/mount.js +390 -0
  142. package/dist/page/storage.d.ts +3 -0
  143. package/dist/page/storage.js +82 -0
  144. package/dist/page/terminal.d.ts +5 -0
  145. package/dist/page/terminal.js +7 -0
  146. package/dist/page/window-launch.d.ts +18 -0
  147. package/dist/page/window-launch.js +11 -0
  148. package/dist/page-script.d.ts +14 -0
  149. package/dist/page-script.js +5 -0
  150. package/dist/r2-files.d.ts +3 -0
  151. package/dist/r2-files.js +79 -0
  152. package/dist/release.d.ts +83 -0
  153. package/dist/release.js +167 -0
  154. package/dist/root-data.d.ts +86 -0
  155. package/dist/root-data.js +69 -0
  156. package/dist/shell/app-directory.d.ts +542 -0
  157. package/dist/shell/app-directory.js +199 -0
  158. package/dist/shell/browser-actions.d.ts +7 -0
  159. package/dist/shell/browser-actions.js +56 -0
  160. package/dist/shell/command-host.d.ts +112 -0
  161. package/dist/shell/command-host.js +502 -0
  162. package/dist/shell/commands.d.ts +25 -0
  163. package/dist/shell/commands.js +78 -0
  164. package/dist/shell/index.d.ts +8 -0
  165. package/dist/shell/index.js +8 -0
  166. package/dist/shell/keys.d.ts +41 -0
  167. package/dist/shell/keys.js +134 -0
  168. package/dist/shell/shell-module.d.ts +55 -0
  169. package/dist/shell/shell-module.js +86 -0
  170. package/dist/shell/window-manager.d.ts +124 -0
  171. package/dist/shell/window-manager.js +711 -0
  172. package/dist/shell/workbench-contract.d.ts +68 -0
  173. package/dist/shell/workbench-contract.js +1 -0
  174. package/dist/shell/workbench-directory.d.ts +332 -0
  175. package/dist/shell/workbench-directory.js +35 -0
  176. package/dist/shell/workbench-host-types.d.ts +96 -0
  177. package/dist/shell/workbench-host-types.js +1 -0
  178. package/dist/shell/workbench-host.d.ts +34 -0
  179. package/dist/shell/workbench-host.js +347 -0
  180. package/dist/shell/workbench-model.d.ts +192 -0
  181. package/dist/shell/workbench-model.js +53 -0
  182. package/dist/shell/workbench.d.ts +4 -0
  183. package/dist/shell/workbench.js +2 -0
  184. package/dist/source/fork.d.ts +27 -0
  185. package/dist/source/fork.js +46 -0
  186. package/dist/source/index.d.ts +10 -0
  187. package/dist/source/index.js +10 -0
  188. package/dist/source/seed-receipt.d.ts +53 -0
  189. package/dist/source/seed-receipt.js +18 -0
  190. package/dist/source/team-source.d.ts +32 -0
  191. package/dist/source/team-source.js +42 -0
  192. package/dist/source/template-push.d.ts +33 -0
  193. package/dist/source/template-push.js +223 -0
  194. package/dist/source/template-repository.d.ts +4 -0
  195. package/dist/source/template-repository.js +21 -0
  196. package/dist/source/template-seed.d.ts +68 -0
  197. package/dist/source/template-seed.js +80 -0
  198. package/dist/standalone/agent-directory.d.ts +4 -0
  199. package/dist/standalone/agent-directory.js +4 -0
  200. package/dist/standalone/agents.d.ts +220 -0
  201. package/dist/standalone/agents.js +795 -0
  202. package/dist/standalone/app-builds-binding.d.ts +36 -0
  203. package/dist/standalone/app-builds-binding.js +119 -0
  204. package/dist/standalone/app-set.d.ts +91 -0
  205. package/dist/standalone/app-set.js +395 -0
  206. package/dist/standalone/app-source.d.ts +41 -0
  207. package/dist/standalone/app-source.js +59 -0
  208. package/dist/standalone/builds.d.ts +18 -0
  209. package/dist/standalone/builds.js +101 -0
  210. package/dist/standalone/computer-egress.d.ts +37 -0
  211. package/dist/standalone/computer-egress.js +111 -0
  212. package/dist/standalone/computer.d.ts +122 -0
  213. package/dist/standalone/computer.js +714 -0
  214. package/dist/standalone/install-apps-cli.d.ts +2 -0
  215. package/dist/standalone/install-apps-cli.js +126 -0
  216. package/dist/standalone/instance.d.ts +35 -0
  217. package/dist/standalone/instance.js +74 -0
  218. package/dist/standalone/media.d.ts +76 -0
  219. package/dist/standalone/media.js +227 -0
  220. package/dist/standalone/preview.d.ts +51 -0
  221. package/dist/standalone/preview.js +167 -0
  222. package/dist/standalone/registry.d.ts +102 -0
  223. package/dist/standalone/registry.js +193 -0
  224. package/dist/standalone/tenancy.d.ts +42 -0
  225. package/dist/standalone/tenancy.js +241 -0
  226. package/dist/standalone/worker.d.ts +55 -0
  227. package/dist/standalone/worker.js +147 -0
  228. package/dist/standalone/workflow-authority-readers.d.ts +16 -0
  229. package/dist/standalone/workflow-authority-readers.js +35 -0
  230. package/dist/standalone/workflow-binding.d.ts +216 -0
  231. package/dist/standalone/workflow-binding.js +217 -0
  232. package/dist/standalone/workflow-events.d.ts +46 -0
  233. package/dist/standalone/workflow-events.js +39 -0
  234. package/dist/standalone/workflow-git-capture.d.ts +7 -0
  235. package/dist/standalone/workflow-git-capture.js +62 -0
  236. package/dist/standalone/workflow-host.d.ts +931 -0
  237. package/dist/standalone/workflow-host.js +751 -0
  238. package/dist/standalone/workflow-node-capture.d.ts +13 -0
  239. package/dist/standalone/workflow-node-capture.js +72 -0
  240. package/dist/standalone/workflow-root-authority.d.ts +27 -0
  241. package/dist/standalone/workflow-root-authority.js +87 -0
  242. package/dist/standalone/workflow-schedules.d.ts +52 -0
  243. package/dist/standalone/workflow-schedules.js +40 -0
  244. package/dist/standalone/workflow-trigger-host.d.ts +1694 -0
  245. package/dist/standalone/workflow-trigger-host.js +52 -0
  246. package/dist/standalone/workflows.d.ts +657 -0
  247. package/dist/standalone/workflows.js +554 -0
  248. package/dist/storage-frame.d.ts +64 -0
  249. package/dist/storage-frame.js +28 -0
  250. package/dist/tenancy/auth0.d.ts +64 -0
  251. package/dist/tenancy/auth0.js +198 -0
  252. package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
  253. package/dist/tenancy/cloudflare/rate-limit.js +19 -0
  254. package/dist/tenancy/cloudflare/registry.d.ts +50 -0
  255. package/dist/tenancy/cloudflare/registry.js +301 -0
  256. package/dist/tenancy/cloudflare.d.ts +2 -0
  257. package/dist/tenancy/cloudflare.js +2 -0
  258. package/dist/tenancy/cold-directory.d.ts +13 -0
  259. package/dist/tenancy/cold-directory.js +43 -0
  260. package/dist/tenancy/contracts.d.ts +195 -0
  261. package/dist/tenancy/contracts.js +1 -0
  262. package/dist/tenancy/index.d.ts +19 -0
  263. package/dist/tenancy/index.js +156 -0
  264. package/dist/tenancy/owner-key.d.ts +26 -0
  265. package/dist/tenancy/owner-key.js +63 -0
  266. package/dist/tenancy/oyster.d.ts +4 -0
  267. package/dist/tenancy/oyster.js +25 -0
  268. package/dist/tenancy/registry-record.d.ts +7 -0
  269. package/dist/tenancy/registry-record.js +44 -0
  270. package/dist/tenancy/registry.d.ts +27 -0
  271. package/dist/tenancy/registry.js +138 -0
  272. package/dist/tenancy/resolve.d.ts +7 -0
  273. package/dist/tenancy/resolve.js +64 -0
  274. package/dist/tenant.d.ts +81 -0
  275. package/dist/tenant.js +71 -0
  276. package/dist/testing/capabilities.d.ts +29 -0
  277. package/dist/testing/capabilities.js +130 -0
  278. package/dist/testing/catalog.d.ts +3 -0
  279. package/dist/testing/catalog.js +53 -0
  280. package/dist/testing/index.d.ts +10 -0
  281. package/dist/testing/index.js +10 -0
  282. package/dist/testing/installation.d.ts +11 -0
  283. package/dist/testing/installation.js +25 -0
  284. package/dist/testing/native-worker.d.ts +21 -0
  285. package/dist/testing/native-worker.js +106 -0
  286. package/dist/testing/worker.d.ts +18 -0
  287. package/dist/testing/worker.js +67 -0
  288. package/dist/testing/workers-runtime.d.ts +24 -0
  289. package/dist/testing/workers-runtime.js +33 -0
  290. package/dist/webhook-delivery.d.ts +14 -0
  291. package/dist/webhook-delivery.js +17 -0
  292. package/dist/workers-git.d.ts +285 -0
  293. package/dist/workers-git.js +1174 -0
  294. package/dist/workers.d.ts +352 -0
  295. package/dist/workers.js +868 -0
  296. package/docs/api/README.md +82 -0
  297. package/docs/api/agents.md +332 -0
  298. package/docs/api/app-storage.md +209 -0
  299. package/docs/api/apps.md +1375 -0
  300. package/docs/api/auth.md +63 -0
  301. package/docs/api/build-contract.md +1304 -0
  302. package/docs/api/build.md +1712 -0
  303. package/docs/api/cloudflare.md +421 -0
  304. package/docs/api/computer.md +203 -0
  305. package/docs/api/files.md +117 -0
  306. package/docs/api/git.md +470 -0
  307. package/docs/api/host.md +1328 -0
  308. package/docs/api/index.md +430 -0
  309. package/docs/api/invocation.md +738 -0
  310. package/docs/api/keys.md +175 -0
  311. package/docs/api/mcp.md +301 -0
  312. package/docs/api/media.md +40 -0
  313. package/docs/api/modules.md +50 -0
  314. package/docs/api/pack.md +141 -0
  315. package/docs/api/page/mount.md +298 -0
  316. package/docs/api/root-data.md +111 -0
  317. package/docs/api/shell/app-directory.md +599 -0
  318. package/docs/api/shell/command-host.md +224 -0
  319. package/docs/api/shell/commands.md +197 -0
  320. package/docs/api/shell/keys.md +183 -0
  321. package/docs/api/shell/shell-module.md +204 -0
  322. package/docs/api/shell/window-manager.md +267 -0
  323. package/docs/api/shell/workbench-directory.md +119 -0
  324. package/docs/api/shell/workbench.md +205 -0
  325. package/docs/api/shell.md +1915 -0
  326. package/docs/api/tenancy/auth0.md +110 -0
  327. package/docs/api/tenancy/cloudflare.md +221 -0
  328. package/docs/api/tenancy/cold-directory.md +46 -0
  329. package/docs/api/tenancy/owner-key.md +63 -0
  330. package/docs/api/tenancy/registry.md +77 -0
  331. package/docs/api/tenancy/resolve.md +69 -0
  332. package/docs/api/tenancy.md +430 -0
  333. package/docs/api/tenant.md +194 -0
  334. package/docs/api/workers-git.md +1646 -0
  335. package/docs/api/workers.md +1691 -0
  336. package/docs/site/agent-quickstart.mdx +346 -0
  337. package/examples/standalone/worker.ts +7 -0
  338. package/examples/standalone/wrangler.jsonc +82 -0
  339. package/package.json +300 -3
@@ -0,0 +1,738 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/oyster**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/oyster](modules.md) / invocation
8
+
9
+ # invocation
10
+
11
+ ## Type Aliases
12
+
13
+ ### InvocationFacts
14
+
15
+ ```ts
16
+ type InvocationFacts = typeof invocationFactsSchema.Type;
17
+ ```
18
+
19
+ The immutable authority and attribution supplied at host admission.
20
+
21
+ ---
22
+
23
+ ### InvocationMethod
24
+
25
+ ```ts
26
+ type InvocationMethod = NonNullable<
27
+ Extract<
28
+ InvocationFacts["subject"],
29
+ {
30
+ kind: "call";
31
+ }
32
+ >["method"]
33
+ >;
34
+ ```
35
+
36
+ Method name/effect taken from a verified API; raw backend requests have no
37
+ method.
38
+
39
+ ---
40
+
41
+ ### InvocationAgentPolicy
42
+
43
+ ```ts
44
+ type InvocationAgentPolicy = NonNullable<
45
+ Extract<
46
+ InvocationFacts["subject"],
47
+ {
48
+ kind: "call";
49
+ }
50
+ >["agentPolicy"]
51
+ >;
52
+ ```
53
+
54
+ Captured policy identity; the Agent id remains on the canonical call actor.
55
+
56
+ ---
57
+
58
+ ### InvocationFrame
59
+
60
+ ```ts
61
+ type InvocationFrame<Host> = Readonly<{
62
+ frameId: string;
63
+ facts: InvocationFacts;
64
+ host: Host;
65
+ signal: AbortSignal;
66
+ }>;
67
+ ```
68
+
69
+ A live frame stays inside its Instance; host state and signals never cross RPC.
70
+
71
+ #### Type Parameters
72
+
73
+ | Type Parameter | Default type |
74
+ | -------------- | ------------ |
75
+ | `Host` | `unknown` |
76
+
77
+ ---
78
+
79
+ ### BackgroundFrameState
80
+
81
+ ```ts
82
+ type BackgroundFrameState = object;
83
+ ```
84
+
85
+ One mutable origin latch on the host state of one invocation, never shared
86
+ across frames.
87
+
88
+ #### Properties
89
+
90
+ ##### origin
91
+
92
+ ```ts
93
+ origin: "unchecked" | "admitted" | "refused";
94
+ ```
95
+
96
+ This frame's one claimed-origin decision; never carried into another frame.
97
+
98
+ ---
99
+
100
+ ### InvocationGatePorts
101
+
102
+ ```ts
103
+ type InvocationGatePorts<Host> = Readonly<{
104
+ abortGuest: () => Promise<void>;
105
+ close: (frame) => Promise<void>;
106
+ now?: () => number;
107
+ }>;
108
+ ```
109
+
110
+ The host's native guest-abort and authority-close hooks.
111
+
112
+ #### Type Parameters
113
+
114
+ | Type Parameter |
115
+ | -------------- |
116
+ | `Host` |
117
+
118
+ ---
119
+
120
+ ### InvocationGate
121
+
122
+ ```ts
123
+ type InvocationGate<Host> = Readonly<{
124
+ run: <A>(facts, host, work) => Promise<A>;
125
+ active: () => InvocationFrame<Host>;
126
+ revoke: (reason?, target?) => Promise<void>;
127
+ exclusive: <A>(work) => Promise<A>;
128
+ }>;
129
+ ```
130
+
131
+ One invocation owner shared by Hub shards and standalone Instances.
132
+
133
+ #### Type Parameters
134
+
135
+ | Type Parameter |
136
+ | -------------- |
137
+ | `Host` |
138
+
139
+ ---
140
+
141
+ ### InvocationAuthority
142
+
143
+ ```ts
144
+ type InvocationAuthority = Omit<InvocationFacts, "subject" | "deadlineAt">;
145
+ ```
146
+
147
+ Verified selection, artifact and binding grants before caller attribution.
148
+
149
+ ---
150
+
151
+ ### InvocationDeadline
152
+
153
+ ```ts
154
+ type InvocationDeadline = Readonly<{
155
+ deadlineAt: number;
156
+ grantExpiresAt: number;
157
+ }>;
158
+ ```
159
+
160
+ The host supplies both deadlines; the frame cannot outlive either.
161
+
162
+ ## Variables
163
+
164
+ ### APP\_INVOCATION\_CEILING\_MS
165
+
166
+ ```ts
167
+ const APP_INVOCATION_CEILING_MS: 60000 = 60_000;
168
+ ```
169
+
170
+ One App invocation may hold authority for at most the Hub grant's lifetime.
171
+
172
+ ---
173
+
174
+ ### invocationFactsSchema
175
+
176
+ ```ts
177
+ const invocationFactsSchema: Struct<{
178
+ instanceId: Codec<InstanceId, string, never, never>;
179
+ selection: Struct<{
180
+ instanceId: Codec<InstanceId, string, never, never>;
181
+ owner: Struct<{
182
+ kind: Literals<readonly ["installation", "deployment"]>;
183
+ id: NonEmptyString;
184
+ }>;
185
+ appId: refine<AppId, String>;
186
+ releaseId: refine<ReleaseId, String>;
187
+ authorityVersion: Number;
188
+ }>;
189
+ artifactDigest: refine<Sha256Digest, String>;
190
+ subject: Union<readonly [Struct<{
191
+ kind: Literal<"call">;
192
+ context: declareConstructor<{
193
+ computerId: string | null;
194
+ actor: | {
195
+ kind: "member";
196
+ memberId: string;
197
+ }
198
+ | {
199
+ kind: "agent";
200
+ agentId: string;
201
+ }
202
+ | {
203
+ kind: "team-key";
204
+ keyId: string;
205
+ };
206
+ backgroundLane?: string;
207
+ backgroundOrigin?: {
208
+ method: string;
209
+ seal: string;
210
+ };
211
+ role?: "member" | "owner";
212
+ soleMember?: true;
213
+ workflow?: {
214
+ workflowId: string;
215
+ runId: string;
216
+ nodeId: string;
217
+ armedBy: ... | ... | ...;
218
+ };
219
+ idempotencyKey?: string;
220
+ }, {
221
+ computerId: string | null;
222
+ actor: | {
223
+ kind: "member";
224
+ memberId: string;
225
+ }
226
+ | {
227
+ kind: "agent";
228
+ agentId: string;
229
+ }
230
+ | {
231
+ kind: "team-key";
232
+ keyId: string;
233
+ };
234
+ backgroundLane?: string;
235
+ backgroundOrigin?: {
236
+ method: string;
237
+ seal: string;
238
+ };
239
+ role?: "member" | "owner";
240
+ soleMember?: true;
241
+ workflow?: {
242
+ workflowId: string;
243
+ runId: string;
244
+ nodeId: string;
245
+ armedBy: ... | ... | ...;
246
+ };
247
+ idempotencyKey?: string;
248
+ }, readonly [], {
249
+ computerId: string | null;
250
+ actor: | {
251
+ kind: "member";
252
+ memberId: string;
253
+ }
254
+ | {
255
+ kind: "agent";
256
+ agentId: string;
257
+ }
258
+ | {
259
+ kind: "team-key";
260
+ keyId: string;
261
+ };
262
+ backgroundLane?: string;
263
+ backgroundOrigin?: {
264
+ method: string;
265
+ seal: string;
266
+ };
267
+ role?: "member" | "owner";
268
+ soleMember?: true;
269
+ workflow?: {
270
+ workflowId: string;
271
+ runId: string;
272
+ nodeId: string;
273
+ armedBy: ... | ... | ...;
274
+ };
275
+ idempotencyKey?: string;
276
+ }>;
277
+ sessionId: optionalKey<String>;
278
+ agentPolicy: optionalKey<Struct<{
279
+ policyRevision: NonEmptyString;
280
+ grantorMemberId: NonEmptyString;
281
+ }>>;
282
+ method: optionalKey<Struct<{
283
+ name: String;
284
+ effect: Literals<readonly [..., ..., ...]>;
285
+ }>>;
286
+ replay: optionalKey<Struct<{
287
+ lane: NonEmptyString;
288
+ epoch: Number;
289
+ admitted: $Array<String>;
290
+ }>>;
291
+ }>, Struct<{
292
+ kind: Literal<"lifecycle">;
293
+ name: Literal<"onGitPush">;
294
+ eventId: NonEmptyString;
295
+ }>, Struct<{
296
+ kind: Literal<"lifecycle">;
297
+ name: Literal<"syncRefused">;
298
+ lane: String;
299
+ code: Literals<("access_changed" | "installation_unavailable")[]>;
300
+ }>]>;
301
+ grants: $Array<Struct<{
302
+ binding: refine<
303
+ | "BACKGROUND"
304
+ | "GIT"
305
+ | "EVENTS"
306
+ | "APPS"
307
+ | "WORKFLOWS"
308
+ | "APP_STORAGE"
309
+ | "MEDIA"
310
+ | "COMPUTER"
311
+ | "INBOX"
312
+ | "AGENTS", String>;
313
+ operations: $Array<NonEmptyString>;
314
+ }>>;
315
+ deadlineAt: Number;
316
+ ancestry: $Array<Codec<InstanceId, string, never, never>>;
317
+ }>;
318
+ ```
319
+
320
+ Host-admitted facts; shape decoding does not establish host authority.
321
+
322
+ ---
323
+
324
+ ### invocationFrameIdSchema
325
+
326
+ ```ts
327
+ const invocationFrameIdSchema: String;
328
+ ```
329
+
330
+ Decode only identities minted from the invocation-frame ID family.
331
+
332
+ ---
333
+
334
+ ### invocationFacts
335
+
336
+ ```ts
337
+ const invocationFacts: object;
338
+ ```
339
+
340
+ Shared host-held caller/Workflow fact builders, never guest argument decoders.
341
+
342
+ #### Type Declaration
343
+
344
+ | Name | Type | Description |
345
+ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
346
+ | <a id="property-fromcaller"></a> `fromCaller()` | (`authority`, `context`, `deadline`, `method?`, `sessionId?`, `agentPolicy?`) => `object` | Combine host-admitted caller facts with the invocation and grant deadlines. |
347
+ | <a id="property-fromworkflownode"></a> `fromWorkflowNode()` | (`authority`, `input`, `deadline`) => `object` | Attribute an already host-admitted published node to its retained arming actor. |
348
+
349
+ ## Functions
350
+
351
+ ### assertBackgroundBinding()
352
+
353
+ ```ts
354
+ function assertBackgroundBinding(frame, binding): void;
355
+ ```
356
+
357
+ Block replay capability effects before job-origin admission; storage permits
358
+ claiming/settling.
359
+
360
+ #### Parameters
361
+
362
+ | Parameter | Type |
363
+ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
364
+ | `frame` | [`InvocationFrame`](#invocationframe)\<[`BackgroundFrameState`](#backgroundframestate)\> |
365
+ | `binding` | \| `"BACKGROUND"` \| `"GIT"` \| `"EVENTS"` \| `"APPS"` \| `"WORKFLOWS"` \| `"APP_STORAGE"` \| `"MEDIA"` \| `"COMPUTER"` \| `"INBOX"` \| `"AGENTS"` |
366
+
367
+ #### Returns
368
+
369
+ `void`
370
+
371
+ ---
372
+
373
+ ### admitBackgroundFrame()
374
+
375
+ ```ts
376
+ function admitBackgroundFrame(
377
+ key,
378
+ frame,
379
+ raw,
380
+ ): Promise<
381
+ | {
382
+ kind: "admitted";
383
+ }
384
+ | {
385
+ kind: "refused";
386
+ code: "access_changed";
387
+ }
388
+ >;
389
+ ```
390
+
391
+ Consume this frame's one origin check before awaiting verification, then retain
392
+ only its decision.
393
+
394
+ #### Parameters
395
+
396
+ | Parameter | Type |
397
+ | --------- | ---------------------------------------------------------------------------------------- |
398
+ | `key` | `CryptoKey` |
399
+ | `frame` | [`InvocationFrame`](#invocationframe)\<[`BackgroundFrameState`](#backgroundframestate)\> |
400
+ | `raw` | `unknown` |
401
+
402
+ #### Returns
403
+
404
+ `Promise`\< \| \{ `kind`: `"admitted"`; \} \| \{ `kind`: `"refused"`; `code`:
405
+ `"access_changed"`; \}\>
406
+
407
+ ---
408
+
409
+ ### createInvocationGate()
410
+
411
+ ```ts
412
+ function createInvocationGate<Host>(ports): InvocationGate<Host>;
413
+ ```
414
+
415
+ Serialize authority, preempt replay only for verified writes, and close each
416
+ guest before admission.
417
+
418
+ #### Type Parameters
419
+
420
+ | Type Parameter |
421
+ | -------------- |
422
+ | `Host` |
423
+
424
+ #### Parameters
425
+
426
+ | Parameter | Type |
427
+ | --------- | ------------------------------------------------------- |
428
+ | `ports` | [`InvocationGatePorts`](#invocationgateports)\<`Host`\> |
429
+
430
+ #### Returns
431
+
432
+ [`InvocationGate`](#invocationgate)\<`Host`\>
433
+
434
+ ---
435
+
436
+ ### invocationCallerContext()
437
+
438
+ ```ts
439
+ function invocationCallerContext(principal, computerId): object;
440
+ ```
441
+
442
+ Project an admitted principal into App attribution; only the host chooses the
443
+ fixed Computer context. The App caller grammar has no visitor actor, so the
444
+ anonymous public reader is attributed as the reserved `visitor` key without a
445
+ Computer. Host admission reads the principal, never this projection.
446
+
447
+ #### Parameters
448
+
449
+ | Parameter | Type |
450
+ | ------------ | -------------------------------------------- |
451
+ | `principal` | [`OysterPrincipal`](host.md#oysterprincipal) |
452
+ | `computerId` | `string` \| `null` |
453
+
454
+ #### Returns
455
+
456
+ `object`
457
+
458
+ | Name | Type |
459
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
460
+ | `computerId` | `string` \| `null` |
461
+ | `actor` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} |
462
+ | `backgroundLane?` | `string` |
463
+ | `backgroundOrigin?` | `object` |
464
+ | `backgroundOrigin.method` | `string` |
465
+ | `backgroundOrigin.seal` | `string` |
466
+ | `role?` | `"member"` \| `"owner"` |
467
+ | `soleMember?` | `true` |
468
+ | `workflow?` | `object` |
469
+ | `workflow.workflowId` | `string` |
470
+ | `workflow.runId` | `string` |
471
+ | `workflow.nodeId` | `string` |
472
+ | `workflow.armedBy` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} |
473
+ | `idempotencyKey?` | `string` |
474
+
475
+ ---
476
+
477
+ ### invocationAuthorityOf()
478
+
479
+ ```ts
480
+ function invocationAuthorityOf(
481
+ installation,
482
+ release,
483
+ ancestry?,
484
+ ): InvocationAuthority;
485
+ ```
486
+
487
+ Authority comes from the admitted installation and its verified backend bytes.
488
+
489
+ #### Parameters
490
+
491
+ | Parameter | Type | Default value |
492
+ | -------------- | ---------------------------------------------- | ------------- |
493
+ | `installation` | [`Installation`](apps.md#installation) | `undefined` |
494
+ | `release` | [`VerifiedRelease`](host.md#verifiedrelease) | `undefined` |
495
+ | `ancestry` | readonly [`InstanceId`](index.md#instanceid)[] | `[]` |
496
+
497
+ #### Returns
498
+
499
+ [`InvocationAuthority`](#invocationauthority)
500
+
501
+ ---
502
+
503
+ ### admittedCallerFacts()
504
+
505
+ ```ts
506
+ function admittedCallerFacts(
507
+ installation,
508
+ release,
509
+ context,
510
+ grants,
511
+ ancestry?,
512
+ sessionId?,
513
+ agentPolicy?,
514
+ method?,
515
+ origin?,
516
+ ): object;
517
+ ```
518
+
519
+ Mint standalone facts only after host caller and Release admission.
520
+
521
+ #### Parameters
522
+
523
+ | Parameter | Type | Default value |
524
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
525
+ | `installation` | [`Installation`](apps.md#installation) | `undefined` |
526
+ | `release` | [`VerifiedRelease`](host.md#verifiedrelease) | `undefined` |
527
+ | `context` | \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \} | `undefined` |
528
+ | `context.computerId` | `string` \| `null` | `undefined` |
529
+ | `context.actor` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
530
+ | `context.backgroundLane?` | `string` | `undefined` |
531
+ | `context.backgroundOrigin?` | \{ `method`: `string`; `seal`: `string`; \} | `undefined` |
532
+ | `context.backgroundOrigin.method?` | `string` | `undefined` |
533
+ | `context.backgroundOrigin.seal?` | `string` | `undefined` |
534
+ | `context.role?` | `"member"` \| `"owner"` | `undefined` |
535
+ | `context.soleMember?` | `true` | `undefined` |
536
+ | `context.workflow?` | \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \} | `undefined` |
537
+ | `context.workflow.workflowId?` | `string` | `undefined` |
538
+ | `context.workflow.runId?` | `string` | `undefined` |
539
+ | `context.workflow.nodeId?` | `string` | `undefined` |
540
+ | `context.workflow.armedBy?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
541
+ | `context.idempotencyKey?` | `string` | `undefined` |
542
+ | `grants?` | readonly `object`[] | `undefined` |
543
+ | `ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `[]` |
544
+ | `sessionId?` | `string` | `undefined` |
545
+ | `agentPolicy?` | \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \} | `undefined` |
546
+ | `agentPolicy.policyRevision?` | `string` | `appToolPolicySchema.fields.revision` |
547
+ | `agentPolicy.grantorMemberId?` | `string` | `appToolPolicySchema.fields.grantedBy` |
548
+ | `method?` | \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \} | `undefined` |
549
+ | `method.name?` | `string` | `appApiMethodNameSchema` |
550
+ | `method.effect?` | `"read"` \| `"write"` \| `"external"` | `...` |
551
+ | `origin?` | \{ `method`: `string`; `seal`: `string`; \} | `undefined` |
552
+ | `origin.method?` | `string` | `undefined` |
553
+ | `origin.seal?` | `string` | `undefined` |
554
+
555
+ #### Returns
556
+
557
+ `object`
558
+
559
+ | Name | Type | Default value |
560
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
561
+ | `instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
562
+ | `selection` | `object` | `selectionSchema` |
563
+ | `selection.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
564
+ | `selection.owner` | `object` | `ownerSchema` |
565
+ | `selection.owner.kind` | `"installation"` \| `"deployment"` | - |
566
+ | `selection.owner.id` | `string` | `Schema.NonEmptyString` |
567
+ | `selection.appId` | `AppId` | `appIdSchema` |
568
+ | `selection.releaseId` | `ReleaseId` | `releaseIdSchema` |
569
+ | `selection.authorityVersion` | `number` | - |
570
+ | `artifactDigest` | `Sha256Digest` | `sha256DigestSchema` |
571
+ | `subject` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | - |
572
+ | `grants` | readonly `object`[] | `grantsSchema` |
573
+ | `deadlineAt` | `number` | - |
574
+ | `ancestry` | readonly [`InstanceId`](index.md#instanceid)[] | - |
575
+
576
+ ---
577
+
578
+ ### admittedMethodCallerFacts()
579
+
580
+ ```ts
581
+ function admittedMethodCallerFacts(
582
+ host,
583
+ installation,
584
+ release,
585
+ context,
586
+ grants,
587
+ method,
588
+ ancestry?,
589
+ sessionId?,
590
+ agentPolicy?,
591
+ ): Promise<{
592
+ instanceId: InstanceId;
593
+ selection: {
594
+ instanceId: InstanceId;
595
+ owner: {
596
+ kind: "installation" | "deployment";
597
+ id: string;
598
+ };
599
+ appId: AppId;
600
+ releaseId: ReleaseId;
601
+ authorityVersion: number;
602
+ };
603
+ artifactDigest: Sha256Digest;
604
+ subject:
605
+ | {
606
+ kind: "call";
607
+ context: {
608
+ computerId: string | null;
609
+ actor:
610
+ | {
611
+ kind: "member";
612
+ memberId: string;
613
+ }
614
+ | {
615
+ kind: "agent";
616
+ agentId: string;
617
+ }
618
+ | {
619
+ kind: "team-key";
620
+ keyId: string;
621
+ };
622
+ backgroundLane?: string;
623
+ backgroundOrigin?: {
624
+ method: string;
625
+ seal: string;
626
+ };
627
+ role?: "member" | "owner";
628
+ soleMember?: true;
629
+ workflow?: {
630
+ workflowId: string;
631
+ runId: string;
632
+ nodeId: string;
633
+ armedBy:
634
+ | {
635
+ kind: "member";
636
+ memberId: string;
637
+ }
638
+ | {
639
+ kind: "agent";
640
+ agentId: string;
641
+ }
642
+ | {
643
+ kind: "team-key";
644
+ keyId: string;
645
+ };
646
+ };
647
+ idempotencyKey?: string;
648
+ };
649
+ sessionId?: string;
650
+ agentPolicy?: {
651
+ policyRevision: string;
652
+ grantorMemberId: string;
653
+ };
654
+ method?: {
655
+ name: string;
656
+ effect: "read" | "write" | "external";
657
+ };
658
+ replay?: {
659
+ lane: string;
660
+ epoch: number;
661
+ admitted: readonly string[];
662
+ };
663
+ }
664
+ | {
665
+ kind: "lifecycle";
666
+ name: "onGitPush";
667
+ eventId: string;
668
+ }
669
+ | {
670
+ kind: "lifecycle";
671
+ name: "syncRefused";
672
+ lane: string;
673
+ code: "access_changed" | "installation_unavailable";
674
+ };
675
+ grants: readonly object[];
676
+ deadlineAt: number;
677
+ ancestry: readonly InstanceId[];
678
+ }>;
679
+ ```
680
+
681
+ Seal the host-verified named method after its current admission checks.
682
+
683
+ #### Parameters
684
+
685
+ | Parameter | Type | Default value |
686
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
687
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), `"backgroundOriginKey"`\> | `undefined` |
688
+ | `installation` | [`Installation`](apps.md#installation) | `undefined` |
689
+ | `release` | [`VerifiedRelease`](host.md#verifiedrelease) | `undefined` |
690
+ | `context` | \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \} | `undefined` |
691
+ | `context.computerId` | `string` \| `null` | `undefined` |
692
+ | `context.actor` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
693
+ | `context.backgroundLane?` | `string` | `undefined` |
694
+ | `context.backgroundOrigin?` | \{ `method`: `string`; `seal`: `string`; \} | `undefined` |
695
+ | `context.backgroundOrigin.method?` | `string` | `undefined` |
696
+ | `context.backgroundOrigin.seal?` | `string` | `undefined` |
697
+ | `context.role?` | `"member"` \| `"owner"` | `undefined` |
698
+ | `context.soleMember?` | `true` | `undefined` |
699
+ | `context.workflow?` | \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \} | `undefined` |
700
+ | `context.workflow.workflowId?` | `string` | `undefined` |
701
+ | `context.workflow.runId?` | `string` | `undefined` |
702
+ | `context.workflow.nodeId?` | `string` | `undefined` |
703
+ | `context.workflow.armedBy?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
704
+ | `context.idempotencyKey?` | `string` | `undefined` |
705
+ | `grants?` | readonly `object`[] | `undefined` |
706
+ | `method?` | \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \} | `undefined` |
707
+ | `method.name?` | `string` | `appApiMethodNameSchema` |
708
+ | `method.effect?` | `"read"` \| `"write"` \| `"external"` | `...` |
709
+ | `ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `[]` |
710
+ | `sessionId?` | `string` | `undefined` |
711
+ | `agentPolicy?` | \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \} | `undefined` |
712
+ | `agentPolicy.policyRevision?` | `string` | `appToolPolicySchema.fields.revision` |
713
+ | `agentPolicy.grantorMemberId?` | `string` | `appToolPolicySchema.fields.grantedBy` |
714
+
715
+ #### Returns
716
+
717
+ `Promise`\<\{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{
718
+ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`:
719
+ `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`;
720
+ `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`:
721
+ `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`:
722
+ `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \}
723
+ \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`;
724
+ `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{
725
+ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`;
726
+ `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`:
727
+ `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`:
728
+ `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`:
729
+ `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \};
730
+ `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`;
731
+ `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`:
732
+ `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`;
733
+ `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`:
734
+ `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`:
735
+ `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`:
736
+ `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly
737
+ `object`[]; `deadlineAt`: `number`; `ancestry`: readonly
738
+ [`InstanceId`](index.md#instanceid)[]; \}\>