@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,117 @@
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) / files
8
+
9
+ # files
10
+
11
+ ## Type Aliases
12
+
13
+ ### FileEntry
14
+
15
+ ```ts
16
+ type FileEntry = Readonly<{
17
+ name: string;
18
+ type: "file" | "directory" | "symlink";
19
+ size: number;
20
+ modifiedAt: number;
21
+ }>;
22
+ ```
23
+
24
+ One entry of a directory listing, in Agar's `computer.list` contract.
25
+
26
+ ---
27
+
28
+ ### FileListing
29
+
30
+ ```ts
31
+ type FileListing = Readonly<{
32
+ path: string;
33
+ entries: readonly FileEntry[];
34
+ nextOffset: number | null;
35
+ }>;
36
+ ```
37
+
38
+ A page of a directory, in Agar's `computer.list` contract.
39
+
40
+ ---
41
+
42
+ ### FileReplaceOutcome
43
+
44
+ ```ts
45
+ type FileReplaceOutcome =
46
+ | Readonly<{
47
+ kind: "replaced";
48
+ path: string;
49
+ bytes: number;
50
+ }>
51
+ | Readonly<{
52
+ kind: "conflict";
53
+ }>;
54
+ ```
55
+
56
+ What a conditional replace did, in Agar's `computer.writeFile` contract.
57
+
58
+ ---
59
+
60
+ ### FileSource
61
+
62
+ ```ts
63
+ type FileSource = Readonly<{
64
+ list: Promise<Readonly<{
65
+ path: string;
66
+ entries: readonly FileEntry[];
67
+ nextOffset: number | null;
68
+ }> | null>;
69
+ read: Promise<Uint8Array<ArrayBufferLike> | null>;
70
+ write: Promise<void>;
71
+ mkdir: Promise<void>;
72
+ replace: Promise<FileReplaceOutcome>;
73
+ }>;
74
+ ```
75
+
76
+ Where an Oyster's files live. Paths are absolute (`/notes/a.md`) and already
77
+ normalized by the routes; a source never sees `..`.
78
+
79
+ ## Functions
80
+
81
+ ### normalizeFilePath()
82
+
83
+ ```ts
84
+ function normalizeFilePath(raw): string | null;
85
+ ```
86
+
87
+ Normalize an absolute path; `null` when it is not one or escapes the root.
88
+
89
+ #### Parameters
90
+
91
+ | Parameter | Type |
92
+ | --------- | -------- |
93
+ | `raw` | `string` |
94
+
95
+ #### Returns
96
+
97
+ `string` \| `null`
98
+
99
+ ---
100
+
101
+ ### fileCapabilities()
102
+
103
+ ```ts
104
+ function fileCapabilities(source): readonly Readonly<object & object>[];
105
+ ```
106
+
107
+ File capabilities sharing the existing `/files/` wire and one file source.
108
+
109
+ #### Parameters
110
+
111
+ | Parameter | Type |
112
+ | --------- | --------------------------- |
113
+ | `source` | [`FileSource`](#filesource) |
114
+
115
+ #### Returns
116
+
117
+ readonly `Readonly`\<`object` & `object`\>[]
@@ -0,0 +1,470 @@
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) / git
8
+
9
+ # git
10
+
11
+ ## Type Aliases
12
+
13
+ ### GitStore
14
+
15
+ ```ts
16
+ type GitStore = GitBinding;
17
+ ```
18
+
19
+ Installation-scoped storage; transport and credentials stay with its provider
20
+ adapter.
21
+
22
+ ---
23
+
24
+ ### GitGrants
25
+
26
+ ```ts
27
+ type GitGrants = Readonly<{
28
+ admits: Promise<boolean>;
29
+ }>;
30
+ ```
31
+
32
+ Live host authority, reopened before every provider call. Null is an anonymous
33
+ reader.
34
+
35
+ ---
36
+
37
+ ### GitPolicy
38
+
39
+ ```ts
40
+ type GitPolicy = Readonly<{
41
+ authorize: Promise<
42
+ | {
43
+ allowed: z.ZodLiteral<true>;
44
+ }
45
+ | {
46
+ allowed: z.ZodLiteral<false>;
47
+ refused: z.ZodArray<
48
+ z.ZodObject<
49
+ {
50
+ ref: z.ZodString;
51
+ message: z.ZodString;
52
+ },
53
+ z.core.$strict
54
+ >
55
+ >;
56
+ }
57
+ >;
58
+ }>;
59
+ ```
60
+
61
+ Repository rules owned by the selected App; a missing or malformed answer
62
+ refuses.
63
+
64
+ ---
65
+
66
+ ### GitJournal
67
+
68
+ ```ts
69
+ type GitJournal = Readonly<{
70
+ tip: Promise<string | null>;
71
+ record: Promise<void>;
72
+ }>;
73
+ ```
74
+
75
+ Durable accepted-ref journal; record commits before the provider result is
76
+ acknowledged.
77
+
78
+ ---
79
+
80
+ ### AdmittedGit
81
+
82
+ ```ts
83
+ type AdmittedGit = Readonly<{
84
+ push: Promise<
85
+ Readonly<{
86
+ status: number;
87
+ headers: Readonly<Record<string, string>>;
88
+ body: Uint8Array;
89
+ }>
90
+ >;
91
+ read: Promise<
92
+ Readonly<{
93
+ status: number;
94
+ headers: Readonly<Record<string, string>>;
95
+ body: Uint8Array;
96
+ }>
97
+ >;
98
+ binding: GitBinding;
99
+ }>;
100
+ ```
101
+
102
+ Host-held read/write path; Apps receive only its installation-authored binding.
103
+
104
+ ---
105
+
106
+ ### GitDoorTarget
107
+
108
+ ```ts
109
+ type GitDoorTarget = Readonly<{
110
+ installationId: string;
111
+ repository: string;
112
+ scope: "read" | "write";
113
+ }>;
114
+ ```
115
+
116
+ The repository and access one smart-HTTP request names.
117
+
118
+ ---
119
+
120
+ ### GitDoorHost
121
+
122
+ ```ts
123
+ type GitDoorHost = Readonly<{
124
+ authenticate: Promise<
125
+ | Readonly<{
126
+ kind: "actor";
127
+ actor: HostActor;
128
+ role?: "owner" | "member";
129
+ workflow?: WorkflowAttestation & object;
130
+ }>
131
+ | null>;
132
+ isPublic: Promise<boolean>;
133
+ git: Promise<
134
+ | Readonly<{
135
+ push: Promise<Readonly<{
136
+ status: number;
137
+ headers: Readonly<Record<..., ...>>;
138
+ body: Uint8Array;
139
+ }>>;
140
+ read: Promise<Readonly<{
141
+ status: number;
142
+ headers: Readonly<Record<..., ...>>;
143
+ body: Uint8Array;
144
+ }>>;
145
+ binding: GitBinding;
146
+ }>
147
+ | null>;
148
+ }>;
149
+ ```
150
+
151
+ Identity and selected installation come only from host-held ports.
152
+
153
+ ---
154
+
155
+ ### GitPushJournalPorts
156
+
157
+ ```ts
158
+ type GitPushJournalPorts = Readonly<{
159
+ owner: WatchdogSqliteOwner;
160
+ deliver: Promise<void>;
161
+ deliverSync: Promise<PostDeliveryResult>;
162
+ scheduleWake: Promise<void>;
163
+ now?: () => number;
164
+ }>;
165
+ ```
166
+
167
+ The standalone composition supplies selected-Instance admission and its alarm.
168
+
169
+ ---
170
+
171
+ ### EventSink
172
+
173
+ ```ts
174
+ type EventSink = Readonly<{
175
+ emit: Promise<void>;
176
+ }>;
177
+ ```
178
+
179
+ The EVENTS binding: an App emits typed events the host routes.
180
+
181
+ ---
182
+
183
+ ### StandardWebhookPayload
184
+
185
+ ```ts
186
+ type StandardWebhookPayload = Readonly<{
187
+ type: string;
188
+ timestamp: string;
189
+ data: Schema.Json;
190
+ }>;
191
+ ```
192
+
193
+ The Standard Webhooks payload shape.
194
+
195
+ ## Variables
196
+
197
+ ### workflowGitPassPrefix
198
+
199
+ ```ts
200
+ const workflowGitPassPrefix: "wgp." = "wgp.";
201
+ ```
202
+
203
+ A Workflow Git pass presented as `Authorization: Bearer` starts with this.
204
+
205
+ ## Functions
206
+
207
+ ### createInstallationGitAdmission()
208
+
209
+ ```ts
210
+ function createInstallationGitAdmission(
211
+ ports,
212
+ ): (writer, repository, scope) => Promise<boolean>;
213
+ ```
214
+
215
+ Reuse the live installation/verified Release rule without opening provider
216
+ storage.
217
+
218
+ #### Parameters
219
+
220
+ | Parameter | Type |
221
+ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
222
+ | `ports` | `Readonly`\<\{ `currentInstallation`: `Promise`\< \| `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `Schema.refine`\<`ReleaseId`, `Schema.String`\>; `appId`: `Schema.refine`\<`AppId`, `Schema.String`\>; `artifact`: `Schema.Struct`\<\{ `artifactRef`: `Schema.refine`\<`ArtifactRef`, `Schema.String`\>; `artifactDigest`: `Schema.refine`\<`Sha256Digest`, `Schema.String`\>; `provenance`: `Schema.Struct`\<\{ `sourceRevision`: ...; `sourceTreeDigest`: ...; `buildRecipeDigest`: ...; \}\>; \}\>; \}; `releasePin`: `"pinned"` \| `"floating"`; `authorityVersion`: `number`; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; `visibility`: `"private"` \| `"public"`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"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"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: `"tenant-scope"` \| readonly ...[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: ...; `memberId`: ...; \} \| \{ `kind`: ...; `agentId`: ...; \} \| \{ `kind`: ...; `keyId`: ...; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; `approvedAnonymousMethods`: readonly `Readonly`\<\{ `name`: `string`; `digest`: `Sha256Digest`; \}\>[]; `anonymousApproval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: ...; `memberId`: ...; \} \| \{ `kind`: ...; `agentId`: ...; \} \| \{ `kind`: ...; `keyId`: ...; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}\> \| `null`\>; `declaration`: `Promise`\< \| `Readonly`\<\{ `api?`: `AppApi`; `displayName?`: `string`; `capabilities`: readonly `AppCapabilityId`[]; `calls?`: readonly `Readonly`\<\{ `appId`: ...; `methods`: ...; \}\>[]; `guidance?`: `string`; `handlers`: readonly `AppHandler`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly `AppRole`[]; `storage?`: readonly `AppStorageKey`[]; `commands?`: readonly `AppDeclaredCommand`[]; `gills?`: readonly `AppDeclaredGill`[]; `backend?`: `Readonly`\<\{ `bindings`: readonly ...[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\> \| `null`\>; \}\> |
223
+
224
+ #### Returns
225
+
226
+ ```ts
227
+ (
228
+ writer,
229
+ repository,
230
+ scope
231
+ ): Promise<boolean>;
232
+ ```
233
+
234
+ Reopen the host authority for this repository and requested scope.
235
+
236
+ ##### Parameters
237
+
238
+ | Parameter | Type |
239
+ | ------------ | --------------------- |
240
+ | `writer` | `GitWriter` \| `null` |
241
+ | `repository` | `string` |
242
+ | `scope` | `"read"` \| `"write"` |
243
+
244
+ ##### Returns
245
+
246
+ `Promise`\<`boolean`\>
247
+
248
+ ---
249
+
250
+ ### createAdmittedGit()
251
+
252
+ ```ts
253
+ function createAdmittedGit(ports): AdmittedGit;
254
+ ```
255
+
256
+ Fixed order: host grant, Workflow ceiling, App policy, provider exchange,
257
+ durable journal.
258
+
259
+ #### Parameters
260
+
261
+ | Parameter | Type |
262
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
263
+ | `ports` | `Readonly`\<\{ `installationId`: `string`; `store`: [`GitStore`](#gitstore); `grants`: [`GitGrants`](#gitgrants); `policy`: [`GitPolicy`](#gitpolicy); `journal`: [`GitJournal`](#gitjournal); `beforeProvider?`: () => `void`; \}\> |
264
+
265
+ #### Returns
266
+
267
+ [`AdmittedGit`](#admittedgit)
268
+
269
+ ---
270
+
271
+ ### smartHttpExchange()
272
+
273
+ ```ts
274
+ function smartHttpExchange(
275
+ method,
276
+ url,
277
+ suffix,
278
+ ): Readonly<{
279
+ scope: "read" | "write";
280
+ advertise: boolean;
281
+ }> | null;
282
+ ```
283
+
284
+ One smart-HTTP exchange: the method, `service` query and path suffix a Git
285
+ client sends, whatever path names the repository. Null otherwise.
286
+
287
+ #### Parameters
288
+
289
+ | Parameter | Type |
290
+ | --------- | -------- |
291
+ | `method` | `string` |
292
+ | `url` | `URL` |
293
+ | `suffix` | `string` |
294
+
295
+ #### Returns
296
+
297
+ \| `Readonly`\<\{ `scope`: `"read"` \| `"write"`; `advertise`: `boolean`; \}\>
298
+ \| `null`
299
+
300
+ ---
301
+
302
+ ### gitDoorRoute()
303
+
304
+ ```ts
305
+ function gitDoorRoute(
306
+ method,
307
+ url,
308
+ ):
309
+ | (Readonly<{
310
+ installationId: string;
311
+ repository: string;
312
+ scope: "read" | "write";
313
+ }> &
314
+ Readonly<{
315
+ advertise: boolean;
316
+ }>)
317
+ | null;
318
+ ```
319
+
320
+ Oyster's own Git address: the repository, scope and phase one request names, or
321
+ null when it is not an exact Oyster Git exchange.
322
+
323
+ #### Parameters
324
+
325
+ | Parameter | Type |
326
+ | --------- | -------- |
327
+ | `method` | `string` |
328
+ | `url` | `URL` |
329
+
330
+ #### Returns
331
+
332
+ \| `Readonly`\<\{ `installationId`: `string`; `repository`: `string`; `scope`:
333
+ `"read"` \| `"write"`; \}\> & `Readonly`\<\{ `advertise`: `boolean`; \}\> \|
334
+ `null`
335
+
336
+ ---
337
+
338
+ ### createGitDoor()
339
+
340
+ ```ts
341
+ function createGitDoor(host): Hono;
342
+ ```
343
+
344
+ Mount one smart-HTTP door with no provider credentials or alternate write
345
+ branch.
346
+
347
+ #### Parameters
348
+
349
+ | Parameter | Type |
350
+ | --------- | ----------------------------- |
351
+ | `host` | [`GitDoorHost`](#gitdoorhost) |
352
+
353
+ #### Returns
354
+
355
+ `Hono`
356
+
357
+ ---
358
+
359
+ ### createGitPushJournal()
360
+
361
+ ```ts
362
+ function createGitPushJournal(ports): Promise<{
363
+ armSync: Promise<number>;
364
+ tip: string | null;
365
+ accept: Promise<"duplicate" | "recorded">;
366
+ alarm: Promise<void>;
367
+ nextWake: () => number | null;
368
+ }>;
369
+ ```
370
+
371
+ Carrier owns delivery state; this journal owns accepted fact identity.
372
+
373
+ #### Parameters
374
+
375
+ | Parameter | Type |
376
+ | --------- | --------------------------------------------- |
377
+ | `ports` | [`GitPushJournalPorts`](#gitpushjournalports) |
378
+
379
+ #### Returns
380
+
381
+ `Promise`\<\{ `armSync`: `Promise`\<`number`\>; `tip`: `string` \| `null`;
382
+ `accept`: `Promise`\<`"duplicate"` \| `"recorded"`\>; `alarm`:
383
+ `Promise`\<`void`\>; `nextWake`: () => `number` \| `null`; \}\>
384
+
385
+ ---
386
+
387
+ ### lsRefsRequest()
388
+
389
+ ```ts
390
+ function lsRefsRequest(): Uint8Array;
391
+ ```
392
+
393
+ The protocol-v2 ls-refs request body.
394
+
395
+ #### Returns
396
+
397
+ `Uint8Array`
398
+
399
+ ---
400
+
401
+ ### parseLsRefs()
402
+
403
+ ```ts
404
+ function parseLsRefs(response): object[];
405
+ ```
406
+
407
+ Parse an ls-refs response into refs.
408
+
409
+ #### Parameters
410
+
411
+ | Parameter | Type |
412
+ | ---------- | ------------ |
413
+ | `response` | `Uint8Array` |
414
+
415
+ #### Returns
416
+
417
+ `object`[]
418
+
419
+ ---
420
+
421
+ ### signStandardWebhook()
422
+
423
+ ```ts
424
+ function signStandardWebhook(secret, id, timestamp, body): Promise<string>;
425
+ ```
426
+
427
+ The Standard Webhooks `webhook-signature` value for one delivery.
428
+
429
+ #### Parameters
430
+
431
+ | Parameter | Type |
432
+ | ----------- | -------- |
433
+ | `secret` | `string` |
434
+ | `id` | `string` |
435
+ | `timestamp` | `number` |
436
+ | `body` | `string` |
437
+
438
+ #### Returns
439
+
440
+ `Promise`\<`string`\>
441
+
442
+ ---
443
+
444
+ ### webhookHeaders()
445
+
446
+ ```ts
447
+ function webhookHeaders(
448
+ secret,
449
+ id,
450
+ type,
451
+ timestamp,
452
+ body,
453
+ ): Promise<Record<string, string>>;
454
+ ```
455
+
456
+ Headers for one signed delivery: Standard Webhooks plus `X-Hub-Signature-256`.
457
+
458
+ #### Parameters
459
+
460
+ | Parameter | Type |
461
+ | ----------- | -------- |
462
+ | `secret` | `string` |
463
+ | `id` | `string` |
464
+ | `type` | `string` |
465
+ | `timestamp` | `number` |
466
+ | `body` | `string` |
467
+
468
+ #### Returns
469
+
470
+ `Promise`\<`Record`\<`string`, `string`\>\>