@fungi.computer/oyster 0.0.0-stage → 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +1082 -2
- package/dist/agents.d.ts +114 -0
- package/dist/agents.js +322 -0
- package/dist/app-builds.d.ts +151 -0
- package/dist/app-builds.js +355 -0
- package/dist/app-sandbox.d.ts +2 -0
- package/dist/app-sandbox.js +2 -0
- package/dist/app-sources.d.ts +46 -0
- package/dist/app-sources.js +335 -0
- package/dist/app-storage.d.ts +141 -0
- package/dist/app-storage.js +281 -0
- package/dist/apps/gate.d.ts +105 -0
- package/dist/apps/gate.js +273 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.js +5 -0
- package/dist/apps/installation.d.ts +248 -0
- package/dist/apps/installation.js +307 -0
- package/dist/apps/operations.d.ts +8 -0
- package/dist/apps/operations.js +98 -0
- package/dist/apps/tools.d.ts +33 -0
- package/dist/apps/tools.js +17 -0
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +93 -0
- package/dist/backend-request.d.ts +3 -0
- package/dist/backend-request.js +53 -0
- package/dist/build/build-jobs.d.ts +128 -0
- package/dist/build/build-jobs.js +197 -0
- package/dist/build/build-step.d.ts +26 -0
- package/dist/build/build-step.js +20 -0
- package/dist/build/bundled-html.d.ts +7 -0
- package/dist/build/bundled-html.js +64 -0
- package/dist/build/definition-emission.d.ts +34 -0
- package/dist/build/definition-emission.js +201 -0
- package/dist/build/effect.d.ts +231 -0
- package/dist/build/effect.js +396 -0
- package/dist/build/git-environment.d.ts +6 -0
- package/dist/build/git-environment.js +48 -0
- package/dist/build/html-recipe.d.ts +20 -0
- package/dist/build/html-recipe.js +51 -0
- package/dist/build/local-build.d.ts +57 -0
- package/dist/build/local-build.js +1078 -0
- package/dist/build/r2-artifact-writer.d.ts +31 -0
- package/dist/build/r2-artifact-writer.js +179 -0
- package/dist/build/snapshot-package-store.d.ts +2 -0
- package/dist/build/snapshot-package-store.js +21 -0
- package/dist/build/snapshot-program-scripts.d.ts +6 -0
- package/dist/build/snapshot-program-scripts.js +2 -0
- package/dist/build/submission-contract.d.ts +384 -0
- package/dist/build/submission-contract.js +70 -0
- package/dist/build/workspace-build.d.ts +50 -0
- package/dist/build/workspace-build.js +156 -0
- package/dist/build-contract.d.ts +4 -0
- package/dist/build-contract.js +4 -0
- package/dist/build-jobs.d.ts +2 -0
- package/dist/build-jobs.js +2 -0
- package/dist/build.d.ts +11 -0
- package/dist/build.js +13 -0
- package/dist/capability-descriptor.d.ts +46 -0
- package/dist/capability-descriptor.js +51 -0
- package/dist/catalog-frame.d.ts +39 -0
- package/dist/catalog-frame.js +72 -0
- package/dist/cause-class.d.ts +19 -0
- package/dist/cause-class.js +54 -0
- package/dist/cloudflare.d.ts +123 -0
- package/dist/cloudflare.js +391 -0
- package/dist/computer-terminal.d.ts +38 -0
- package/dist/computer-terminal.js +410 -0
- package/dist/computer.d.ts +60 -0
- package/dist/computer.js +33 -0
- package/dist/event-recipients.d.ts +57 -0
- package/dist/event-recipients.js +144 -0
- package/dist/facet-invocation.d.ts +4 -0
- package/dist/facet-invocation.js +45 -0
- package/dist/files.d.ts +42 -0
- package/dist/files.js +123 -0
- package/dist/frame-binding-wire-script.d.ts +2 -0
- package/dist/frame-binding-wire-script.js +1 -0
- package/dist/frame-binding-wire.d.ts +28 -0
- package/dist/frame-binding-wire.js +54 -0
- package/dist/git-admission.d.ts +52 -0
- package/dist/git-admission.js +188 -0
- package/dist/git-auth.d.ts +11 -0
- package/dist/git-auth.js +27 -0
- package/dist/git-door.d.ts +35 -0
- package/dist/git-door.js +108 -0
- package/dist/git-journal.d.ts +31 -0
- package/dist/git-journal.js +188 -0
- package/dist/git.d.ts +31 -0
- package/dist/git.js +64 -0
- package/dist/guest-policy.d.ts +9 -0
- package/dist/guest-policy.js +13 -0
- package/dist/host.d.ts +244 -0
- package/dist/host.js +1043 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +320 -0
- package/dist/installation-consent.d.ts +79 -0
- package/dist/installation-consent.js +82 -0
- package/dist/internal/background-origins.d.ts +3 -0
- package/dist/internal/background-origins.js +8 -0
- package/dist/internal/delivery.d.ts +12 -0
- package/dist/internal/delivery.js +167 -0
- package/dist/internal/host-gate.d.ts +14 -0
- package/dist/internal/host-gate.js +62 -0
- package/dist/internal/registry-installations.d.ts +6 -0
- package/dist/internal/registry-installations.js +12 -0
- package/dist/invocation.d.ts +251 -0
- package/dist/invocation.js +377 -0
- package/dist/keys.d.ts +48 -0
- package/dist/keys.js +52 -0
- package/dist/mcp-owner.d.ts +27 -0
- package/dist/mcp-owner.js +143 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +429 -0
- package/dist/media.d.ts +23 -0
- package/dist/media.js +12 -0
- package/dist/pack.d.ts +76 -0
- package/dist/pack.js +134 -0
- package/dist/page/capabilities.d.ts +23 -0
- package/dist/page/capabilities.js +256 -0
- package/dist/page/computer-handles.d.ts +79 -0
- package/dist/page/computer-handles.js +44 -0
- package/dist/page/lifetime.d.ts +6 -0
- package/dist/page/lifetime.js +19 -0
- package/dist/page/mount.d.ts +163 -0
- package/dist/page/mount.js +390 -0
- package/dist/page/storage.d.ts +3 -0
- package/dist/page/storage.js +82 -0
- package/dist/page/terminal.d.ts +5 -0
- package/dist/page/terminal.js +7 -0
- package/dist/page-script.d.ts +14 -0
- package/dist/page-script.js +5 -0
- package/dist/r2-files.d.ts +3 -0
- package/dist/r2-files.js +79 -0
- package/dist/release.d.ts +72 -0
- package/dist/release.js +164 -0
- package/dist/root-data.d.ts +86 -0
- package/dist/root-data.js +69 -0
- package/dist/shell/app-directory.d.ts +537 -0
- package/dist/shell/app-directory.js +195 -0
- package/dist/shell/browser-actions.d.ts +7 -0
- package/dist/shell/browser-actions.js +56 -0
- package/dist/shell/command-host.d.ts +112 -0
- package/dist/shell/command-host.js +502 -0
- package/dist/shell/commands.d.ts +25 -0
- package/dist/shell/commands.js +78 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/keys.d.ts +41 -0
- package/dist/shell/keys.js +134 -0
- package/dist/shell/shell-module.d.ts +31 -0
- package/dist/shell/shell-module.js +37 -0
- package/dist/shell/window-manager.d.ts +124 -0
- package/dist/shell/window-manager.js +711 -0
- package/dist/shell/workbench-contract.d.ts +68 -0
- package/dist/shell/workbench-contract.js +1 -0
- package/dist/shell/workbench-host-types.d.ts +96 -0
- package/dist/shell/workbench-host-types.js +1 -0
- package/dist/shell/workbench-host.d.ts +34 -0
- package/dist/shell/workbench-host.js +347 -0
- package/dist/shell/workbench-model.d.ts +192 -0
- package/dist/shell/workbench-model.js +53 -0
- package/dist/shell/workbench.d.ts +4 -0
- package/dist/shell/workbench.js +2 -0
- package/dist/source/fork.d.ts +27 -0
- package/dist/source/fork.js +46 -0
- package/dist/source/index.d.ts +11 -0
- package/dist/source/index.js +11 -0
- package/dist/source/seed-receipt.d.ts +53 -0
- package/dist/source/seed-receipt.js +18 -0
- package/dist/source/team-source.d.ts +32 -0
- package/dist/source/team-source.js +42 -0
- package/dist/source/template-repository.d.ts +2 -0
- package/dist/source/template-repository.js +8 -0
- package/dist/source/template-write.d.ts +69 -0
- package/dist/source/template-write.js +344 -0
- package/dist/storage-frame.d.ts +64 -0
- package/dist/storage-frame.js +28 -0
- package/dist/tenant.d.ts +81 -0
- package/dist/tenant.js +71 -0
- package/dist/testing/capabilities.d.ts +29 -0
- package/dist/testing/capabilities.js +130 -0
- package/dist/testing/catalog.d.ts +3 -0
- package/dist/testing/catalog.js +53 -0
- package/dist/testing/index.d.ts +10 -0
- package/dist/testing/index.js +10 -0
- package/dist/testing/installation.d.ts +11 -0
- package/dist/testing/installation.js +25 -0
- package/dist/testing/native-worker.d.ts +21 -0
- package/dist/testing/native-worker.js +106 -0
- package/dist/testing/worker.d.ts +18 -0
- package/dist/testing/worker.js +67 -0
- package/dist/testing/workers-runtime.d.ts +24 -0
- package/dist/testing/workers-runtime.js +33 -0
- package/dist/webhook-delivery.d.ts +14 -0
- package/dist/webhook-delivery.js +17 -0
- package/dist/workers-git.d.ts +285 -0
- package/dist/workers-git.js +1174 -0
- package/dist/workers.d.ts +352 -0
- package/dist/workers.js +866 -0
- package/docs/api/README.md +82 -0
- package/docs/api/agents.md +332 -0
- package/docs/api/app-storage.md +209 -0
- package/docs/api/apps.md +1375 -0
- package/docs/api/auth.md +63 -0
- package/docs/api/build-contract.md +507 -0
- package/docs/api/build.md +1476 -0
- package/docs/api/cloudflare.md +421 -0
- package/docs/api/computer.md +203 -0
- package/docs/api/files.md +117 -0
- package/docs/api/git.md +470 -0
- package/docs/api/host.md +1328 -0
- package/docs/api/index.md +430 -0
- package/docs/api/invocation.md +738 -0
- package/docs/api/keys.md +175 -0
- package/docs/api/mcp.md +301 -0
- package/docs/api/media.md +40 -0
- package/docs/api/modules.md +42 -0
- package/docs/api/pack.md +138 -0
- package/docs/api/page/mount.md +298 -0
- package/docs/api/root-data.md +111 -0
- package/docs/api/shell/app-directory.md +332 -0
- package/docs/api/shell/command-host.md +224 -0
- package/docs/api/shell/commands.md +197 -0
- package/docs/api/shell/keys.md +183 -0
- package/docs/api/shell/shell-module.md +143 -0
- package/docs/api/shell/window-manager.md +267 -0
- package/docs/api/shell/workbench.md +186 -0
- package/docs/api/shell.md +1788 -0
- package/docs/api/tenant.md +194 -0
- package/docs/api/workers-git.md +1527 -0
- package/docs/api/workers.md +1678 -0
- package/docs/media/architecture.mmd +32 -0
- package/docs/media/architecture.png +0 -0
- package/docs/media/bonsai-network.png +0 -0
- package/docs/media/bonsai-repository.png +0 -0
- package/docs/site/agent-quickstart.mdx +349 -0
- package/examples/git/worker.ts +39 -0
- package/examples/git/wrangler.jsonc +32 -0
- package/examples/standalone/worker.ts +14 -0
- package/examples/standalone/wrangler.jsonc +21 -0
- package/package.json +249 -3
|
@@ -0,0 +1,1527 @@
|
|
|
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) / workers-git
|
|
8
|
+
|
|
9
|
+
# workers-git
|
|
10
|
+
|
|
11
|
+
## Classes
|
|
12
|
+
|
|
13
|
+
### OysterKeys
|
|
14
|
+
|
|
15
|
+
Named keys an owner issues directly: an Ear Tag key store scoped to this tenant.
|
|
16
|
+
A key's id is the name the owner chose for it, so forks and other name-derived
|
|
17
|
+
identities (`service.ts:95`) stay stable across a reissue. Plaintext keys are
|
|
18
|
+
never stored.
|
|
19
|
+
|
|
20
|
+
#### Extends
|
|
21
|
+
|
|
22
|
+
- `DurableObject`\<[`OysterKeysEnv`](#oysterkeysenv)\>
|
|
23
|
+
|
|
24
|
+
#### Constructors
|
|
25
|
+
|
|
26
|
+
##### Constructor
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
new OysterKeys(ctx, env): OysterKeys;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
###### Parameters
|
|
33
|
+
|
|
34
|
+
| Parameter | Type |
|
|
35
|
+
| --------- | --------------------------------- |
|
|
36
|
+
| `ctx` | `DurableObjectState` |
|
|
37
|
+
| `env` | [`OysterKeysEnv`](#oysterkeysenv) |
|
|
38
|
+
|
|
39
|
+
###### Returns
|
|
40
|
+
|
|
41
|
+
[`OysterKeys`](#oysterkeys)
|
|
42
|
+
|
|
43
|
+
###### Overrides
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
DurableObject<OysterKeysEnv>.constructor
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Methods
|
|
50
|
+
|
|
51
|
+
##### issue()
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
issue(owner, input): Promise<KeyOutcome<Readonly<{
|
|
55
|
+
key: string;
|
|
56
|
+
record: KeyRecord<Capability>;
|
|
57
|
+
}>>>;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Issue a key named `name`, its id too. Refuses `conflict` once a name has been
|
|
61
|
+
used, including by a now-revoked key: a name is never reused.
|
|
62
|
+
|
|
63
|
+
###### Parameters
|
|
64
|
+
|
|
65
|
+
| Parameter | Type |
|
|
66
|
+
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `owner` | `string` |
|
|
68
|
+
| `input` | `Readonly`\<\{ `name`: `string`; `grants`: readonly `Grant`\<[`OysterKeyCapability`](keys.md#oysterkeycapability)\>[]; `expiresAt?`: `number`; \}\> |
|
|
69
|
+
|
|
70
|
+
###### Returns
|
|
71
|
+
|
|
72
|
+
`Promise`\<`KeyOutcome`\<`Readonly`\<\{ `key`: `string`; `record`:
|
|
73
|
+
`KeyRecord`\<`Capability`\>; \}\>\>\>
|
|
74
|
+
|
|
75
|
+
##### revoke()
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
revoke(
|
|
79
|
+
owner,
|
|
80
|
+
requestId,
|
|
81
|
+
keyId
|
|
82
|
+
): Promise<KeyOutcome<Readonly<{
|
|
83
|
+
keyId: string;
|
|
84
|
+
owner: string;
|
|
85
|
+
name: string;
|
|
86
|
+
scope: | Readonly<{
|
|
87
|
+
grants: readonly Readonly<{
|
|
88
|
+
capability: OysterKeyCapability;
|
|
89
|
+
targets: GrantTargets;
|
|
90
|
+
}>[];
|
|
91
|
+
}>
|
|
92
|
+
| null;
|
|
93
|
+
grantVersion: number;
|
|
94
|
+
expiresAt: number | null;
|
|
95
|
+
revokedAt: number | null;
|
|
96
|
+
rateLimit: | Readonly<{
|
|
97
|
+
limit: number;
|
|
98
|
+
windowSeconds: number;
|
|
99
|
+
}>
|
|
100
|
+
| null;
|
|
101
|
+
lastUsedAt: number | null;
|
|
102
|
+
createdAt: number;
|
|
103
|
+
updatedAt: number;
|
|
104
|
+
}>>>;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Revoke a key by id; idempotent on repeat.
|
|
108
|
+
|
|
109
|
+
###### Parameters
|
|
110
|
+
|
|
111
|
+
| Parameter | Type |
|
|
112
|
+
| ----------- | -------- |
|
|
113
|
+
| `owner` | `string` |
|
|
114
|
+
| `requestId` | `string` |
|
|
115
|
+
| `keyId` | `string` |
|
|
116
|
+
|
|
117
|
+
###### Returns
|
|
118
|
+
|
|
119
|
+
`Promise`\<`KeyOutcome`\<`Readonly`\<\{ `keyId`: `string`; `owner`: `string`;
|
|
120
|
+
`name`: `string`; `scope`: \| `Readonly`\<\{ `grants`: readonly `Readonly`\<\{
|
|
121
|
+
`capability`: [`OysterKeyCapability`](keys.md#oysterkeycapability); `targets`:
|
|
122
|
+
`GrantTargets`; \}\>[]; \}\> \| `null`; `grantVersion`: `number`; `expiresAt`:
|
|
123
|
+
`number` \| `null`; `revokedAt`: `number` \| `null`; `rateLimit`: \|
|
|
124
|
+
`Readonly`\<\{ `limit`: `number`; `windowSeconds`: `number`; \}\> \| `null`;
|
|
125
|
+
`lastUsedAt`: `number` \| `null`; `createdAt`: `number`; `updatedAt`: `number`;
|
|
126
|
+
\}\>\>\>
|
|
127
|
+
|
|
128
|
+
##### list()
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
list(owner): Promise<KeyOutcome<readonly Readonly<{
|
|
132
|
+
keyId: string;
|
|
133
|
+
owner: string;
|
|
134
|
+
name: string;
|
|
135
|
+
scope: | Readonly<{
|
|
136
|
+
grants: readonly Readonly<{
|
|
137
|
+
capability: ...;
|
|
138
|
+
targets: ...;
|
|
139
|
+
}>[];
|
|
140
|
+
}>
|
|
141
|
+
| null;
|
|
142
|
+
grantVersion: number;
|
|
143
|
+
expiresAt: number | null;
|
|
144
|
+
revokedAt: number | null;
|
|
145
|
+
rateLimit: | Readonly<{
|
|
146
|
+
limit: number;
|
|
147
|
+
windowSeconds: number;
|
|
148
|
+
}>
|
|
149
|
+
| null;
|
|
150
|
+
lastUsedAt: number | null;
|
|
151
|
+
createdAt: number;
|
|
152
|
+
updatedAt: number;
|
|
153
|
+
}>[]>>;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Every key this tenant has issued, newest first.
|
|
157
|
+
|
|
158
|
+
###### Parameters
|
|
159
|
+
|
|
160
|
+
| Parameter | Type |
|
|
161
|
+
| --------- | -------- |
|
|
162
|
+
| `owner` | `string` |
|
|
163
|
+
|
|
164
|
+
###### Returns
|
|
165
|
+
|
|
166
|
+
`Promise`\<`KeyOutcome`\<readonly `Readonly`\<\{ `keyId`: `string`; `owner`:
|
|
167
|
+
`string`; `name`: `string`; `scope`: \| `Readonly`\<\{ `grants`: readonly
|
|
168
|
+
`Readonly`\<\{ `capability`: ...; `targets`: ...; \}\>[]; \}\> \| `null`;
|
|
169
|
+
`grantVersion`: `number`; `expiresAt`: `number` \| `null`; `revokedAt`: `number`
|
|
170
|
+
\| `null`; `rateLimit`: \| `Readonly`\<\{ `limit`: `number`; `windowSeconds`:
|
|
171
|
+
`number`; \}\> \| `null`; `lastUsedAt`: `number` \| `null`; `createdAt`:
|
|
172
|
+
`number`; `updatedAt`: `number`; \}\>[]\>\>
|
|
173
|
+
|
|
174
|
+
##### verify()
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
verify(secret): Promise<KeyOutcome<Readonly<{
|
|
178
|
+
keyId: string;
|
|
179
|
+
owner: string;
|
|
180
|
+
name: string;
|
|
181
|
+
scope: Scope<Capability>;
|
|
182
|
+
grantVersion: number;
|
|
183
|
+
expiresAt: number | null;
|
|
184
|
+
}>>>;
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Verify a bearer secret and return its current principal.
|
|
188
|
+
|
|
189
|
+
###### Parameters
|
|
190
|
+
|
|
191
|
+
| Parameter | Type |
|
|
192
|
+
| --------- | -------- |
|
|
193
|
+
| `secret` | `string` |
|
|
194
|
+
|
|
195
|
+
###### Returns
|
|
196
|
+
|
|
197
|
+
`Promise`\<`KeyOutcome`\<`Readonly`\<\{ `keyId`: `string`; `owner`: `string`;
|
|
198
|
+
`name`: `string`; `scope`: `Scope`\<`Capability`\>; `grantVersion`: `number`;
|
|
199
|
+
`expiresAt`: `number` \| `null`; \}\>\>\>
|
|
200
|
+
|
|
201
|
+
##### live()
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
live(keyId): Promise<
|
|
205
|
+
| Readonly<{
|
|
206
|
+
keyId: string;
|
|
207
|
+
owner: string;
|
|
208
|
+
grantVersion: number;
|
|
209
|
+
grants: readonly Readonly<{
|
|
210
|
+
capability: OysterKeyCapability;
|
|
211
|
+
targets: GrantTargets;
|
|
212
|
+
}>[];
|
|
213
|
+
}>
|
|
214
|
+
| null>;
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The live facts behind one key id, for the host's `keys.live` port; `null` for an
|
|
218
|
+
unknown, revoked, expired or suspended key.
|
|
219
|
+
|
|
220
|
+
###### Parameters
|
|
221
|
+
|
|
222
|
+
| Parameter | Type |
|
|
223
|
+
| --------- | -------- |
|
|
224
|
+
| `keyId` | `string` |
|
|
225
|
+
|
|
226
|
+
###### Returns
|
|
227
|
+
|
|
228
|
+
`Promise`\< \| `Readonly`\<\{ `keyId`: `string`; `owner`: `string`;
|
|
229
|
+
`grantVersion`: `number`; `grants`: readonly `Readonly`\<\{ `capability`:
|
|
230
|
+
[`OysterKeyCapability`](keys.md#oysterkeycapability); `targets`: `GrantTargets`;
|
|
231
|
+
\}\>[]; \}\> \| `null`\>
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### OysterWebhooks
|
|
236
|
+
|
|
237
|
+
Webhook subscriptions, their secrets and signed, retried deliveries.
|
|
238
|
+
|
|
239
|
+
#### Extends
|
|
240
|
+
|
|
241
|
+
- `DurableObject`\<[`OysterKeysEnv`](#oysterkeysenv)\>
|
|
242
|
+
|
|
243
|
+
#### Constructors
|
|
244
|
+
|
|
245
|
+
##### Constructor
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
new OysterWebhooks(ctx, env): OysterWebhooks;
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
###### Parameters
|
|
252
|
+
|
|
253
|
+
| Parameter | Type |
|
|
254
|
+
| --------- | --------------------------------- |
|
|
255
|
+
| `ctx` | `DurableObjectState` |
|
|
256
|
+
| `env` | [`OysterKeysEnv`](#oysterkeysenv) |
|
|
257
|
+
|
|
258
|
+
###### Returns
|
|
259
|
+
|
|
260
|
+
[`OysterWebhooks`](#oysterwebhooks)
|
|
261
|
+
|
|
262
|
+
###### Overrides
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
DurableObject<OysterKeysEnv>.constructor
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Methods
|
|
269
|
+
|
|
270
|
+
##### subscribe()
|
|
271
|
+
|
|
272
|
+
```ts
|
|
273
|
+
subscribe(input): SubscriptionCreated;
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Subscribe `url` to an installation's events; returns the secret once.
|
|
277
|
+
|
|
278
|
+
###### Parameters
|
|
279
|
+
|
|
280
|
+
| Parameter | Type |
|
|
281
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
282
|
+
| `input` | \{ `installationId`: `string`; `url`: `string`; `types`: readonly `string`[]; `secret?`: `string`; \} |
|
|
283
|
+
| `input.installationId` | `string` |
|
|
284
|
+
| `input.url` | `string` |
|
|
285
|
+
| `input.types` | readonly `string`[] |
|
|
286
|
+
| `input.secret?` | `string` |
|
|
287
|
+
|
|
288
|
+
###### Returns
|
|
289
|
+
|
|
290
|
+
[`SubscriptionCreated`](#subscriptioncreated)
|
|
291
|
+
|
|
292
|
+
##### subscriptions()
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
subscriptions(): Readonly<{
|
|
296
|
+
id: string;
|
|
297
|
+
installationId: string;
|
|
298
|
+
url: string;
|
|
299
|
+
types: readonly string[];
|
|
300
|
+
createdAt: number;
|
|
301
|
+
}>[];
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Every subscription.
|
|
305
|
+
|
|
306
|
+
###### Returns
|
|
307
|
+
|
|
308
|
+
`Readonly`\<\{ `id`: `string`; `installationId`: `string`; `url`: `string`;
|
|
309
|
+
`types`: readonly `string`[]; `createdAt`: `number`; \}\>[]
|
|
310
|
+
|
|
311
|
+
##### unsubscribe()
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
unsubscribe(id): boolean;
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Remove a subscription and its deliveries.
|
|
318
|
+
|
|
319
|
+
###### Parameters
|
|
320
|
+
|
|
321
|
+
| Parameter | Type |
|
|
322
|
+
| --------- | -------- |
|
|
323
|
+
| `id` | `string` |
|
|
324
|
+
|
|
325
|
+
###### Returns
|
|
326
|
+
|
|
327
|
+
`boolean`
|
|
328
|
+
|
|
329
|
+
##### deliveries()
|
|
330
|
+
|
|
331
|
+
```ts
|
|
332
|
+
deliveries(subscription): Readonly<{
|
|
333
|
+
id: string;
|
|
334
|
+
subscription: string;
|
|
335
|
+
type: string;
|
|
336
|
+
state: "pending" | "failed" | "delivered";
|
|
337
|
+
attempts: number;
|
|
338
|
+
lastStatus: number | null;
|
|
339
|
+
updatedAt: number;
|
|
340
|
+
}>[];
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Recent deliveries for one subscription, newest first.
|
|
344
|
+
|
|
345
|
+
###### Parameters
|
|
346
|
+
|
|
347
|
+
| Parameter | Type |
|
|
348
|
+
| -------------- | -------- |
|
|
349
|
+
| `subscription` | `string` |
|
|
350
|
+
|
|
351
|
+
###### Returns
|
|
352
|
+
|
|
353
|
+
`Readonly`\<\{ `id`: `string`; `subscription`: `string`; `type`: `string`;
|
|
354
|
+
`state`: `"pending"` \| `"failed"` \| `"delivered"`; `attempts`: `number`;
|
|
355
|
+
`lastStatus`: `number` \| `null`; `updatedAt`: `number`; \}\>[]
|
|
356
|
+
|
|
357
|
+
##### enqueue()
|
|
358
|
+
|
|
359
|
+
```ts
|
|
360
|
+
enqueue(
|
|
361
|
+
installationId,
|
|
362
|
+
payload,
|
|
363
|
+
eventId
|
|
364
|
+
): number;
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Queue an event for every matching subscription (idempotent per event id).
|
|
368
|
+
|
|
369
|
+
###### Parameters
|
|
370
|
+
|
|
371
|
+
| Parameter | Type |
|
|
372
|
+
| ---------------- | --------------------------------------------------------- |
|
|
373
|
+
| `installationId` | `string` |
|
|
374
|
+
| `payload` | [`StandardWebhookPayload`](git.md#standardwebhookpayload) |
|
|
375
|
+
| `eventId` | `string` |
|
|
376
|
+
|
|
377
|
+
###### Returns
|
|
378
|
+
|
|
379
|
+
`number`
|
|
380
|
+
|
|
381
|
+
##### alarm()
|
|
382
|
+
|
|
383
|
+
```ts
|
|
384
|
+
alarm(): Promise<void>;
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Deliver due webhooks, then schedule the next retry.
|
|
388
|
+
|
|
389
|
+
###### Returns
|
|
390
|
+
|
|
391
|
+
`Promise`\<`void`\>
|
|
392
|
+
|
|
393
|
+
###### Overrides
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
DurableObject.alarm;
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
### OysterBinding
|
|
402
|
+
|
|
403
|
+
A git Worker's one guest binding entrypoint, over `gitBindings`.
|
|
404
|
+
|
|
405
|
+
#### Extends
|
|
406
|
+
|
|
407
|
+
- `WorkerEntrypoint`\<[`OysterGitWorkerEnv`](#oystergitworkerenv),
|
|
408
|
+
`Readonly`\<\{ `instanceId`: `string`; `binding`: \| `"BACKGROUND"` \| `"GIT"`
|
|
409
|
+
\| `"EVENTS"` \| `"APPS"` \| `"WORKFLOWS"` \| `"APP_STORAGE"` \| `"MEDIA"` \|
|
|
410
|
+
`"COMPUTER"` \| `"INBOX"` \| `"AGENTS"`; `frameId`: `string`; \}\>, `this`\>
|
|
411
|
+
|
|
412
|
+
#### Constructors
|
|
413
|
+
|
|
414
|
+
##### Constructor
|
|
415
|
+
|
|
416
|
+
```ts
|
|
417
|
+
new OysterBinding(ctx, env): OysterBinding;
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
###### Parameters
|
|
421
|
+
|
|
422
|
+
| Parameter | Type |
|
|
423
|
+
| --------- | ------------------------------------------- |
|
|
424
|
+
| `ctx` | `ExecutionContext` |
|
|
425
|
+
| `env` | [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
426
|
+
|
|
427
|
+
###### Returns
|
|
428
|
+
|
|
429
|
+
[`OysterBinding`](#oysterbinding)
|
|
430
|
+
|
|
431
|
+
###### Inherited from
|
|
432
|
+
|
|
433
|
+
```ts
|
|
434
|
+
oysterBindingEntrypoint(gitBindings).constructor;
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
### `abstract` OysterGitInstance
|
|
440
|
+
|
|
441
|
+
An App Instance whose backend may also receive declared Git and Events bindings.
|
|
442
|
+
Background wakes readmit members through the deployable root's `hostFor`, the
|
|
443
|
+
same composition HTTP and MCP use.
|
|
444
|
+
|
|
445
|
+
#### Extends
|
|
446
|
+
|
|
447
|
+
- [`OysterInstance`](workers.md#oysterinstance)\<`Env`\>
|
|
448
|
+
|
|
449
|
+
#### Type Parameters
|
|
450
|
+
|
|
451
|
+
| Type Parameter | Default type |
|
|
452
|
+
| ----------------------------------------------------------- | ------------------------------------------- |
|
|
453
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) | [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
454
|
+
|
|
455
|
+
#### Constructors
|
|
456
|
+
|
|
457
|
+
##### Constructor
|
|
458
|
+
|
|
459
|
+
```ts
|
|
460
|
+
new OysterGitInstance<Env>(ctx, env): OysterGitInstance<Env>;
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
###### Parameters
|
|
464
|
+
|
|
465
|
+
| Parameter | Type |
|
|
466
|
+
| --------- | -------------------- |
|
|
467
|
+
| `ctx` | `DurableObjectState` |
|
|
468
|
+
| `env` | `Env` |
|
|
469
|
+
|
|
470
|
+
###### Returns
|
|
471
|
+
|
|
472
|
+
[`OysterGitInstance`](#abstract-oystergitinstance)\<`Env`\>
|
|
473
|
+
|
|
474
|
+
###### Inherited from
|
|
475
|
+
|
|
476
|
+
[`OysterInstance`](workers.md#oysterinstance).[`constructor`](workers.md#constructor-3)
|
|
477
|
+
|
|
478
|
+
#### Methods
|
|
479
|
+
|
|
480
|
+
##### bindingCall()
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
bindingCall(
|
|
484
|
+
raw,
|
|
485
|
+
method,
|
|
486
|
+
input
|
|
487
|
+
): Promise<FrameBindingReply<OysterBindingResult>>;
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Resolve each guest packet against its immutable frame before any host effect.
|
|
491
|
+
|
|
492
|
+
###### Parameters
|
|
493
|
+
|
|
494
|
+
| Parameter | Type |
|
|
495
|
+
| --------- | ------------------------------------------------------ |
|
|
496
|
+
| `raw` | [`FrameBindingProps`](cloudflare.md#framebindingprops) |
|
|
497
|
+
| `method` | `string` |
|
|
498
|
+
| `input` | readonly `unknown`[] |
|
|
499
|
+
|
|
500
|
+
###### Returns
|
|
501
|
+
|
|
502
|
+
`Promise`\<[`FrameBindingReply`](cloudflare.md#framebindingreply)\<[`OysterBindingResult`](workers.md#oysterbindingresult)\>\>
|
|
503
|
+
|
|
504
|
+
###### Inherited from
|
|
505
|
+
|
|
506
|
+
[`OysterInstance`](workers.md#oysterinstance).[`bindingCall`](workers.md#bindingcall)
|
|
507
|
+
|
|
508
|
+
##### gitTip()
|
|
509
|
+
|
|
510
|
+
```ts
|
|
511
|
+
gitTip(
|
|
512
|
+
installationId,
|
|
513
|
+
repository,
|
|
514
|
+
ref,
|
|
515
|
+
tenantId?
|
|
516
|
+
): Promise<string | null>;
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Last provider-accepted ref recorded by this installation's journal.
|
|
520
|
+
|
|
521
|
+
###### Parameters
|
|
522
|
+
|
|
523
|
+
| Parameter | Type | Default value |
|
|
524
|
+
| ---------------- | ---------------------------------------- | --------------- |
|
|
525
|
+
| `installationId` | `string` | `undefined` |
|
|
526
|
+
| `repository` | `string` | `undefined` |
|
|
527
|
+
| `ref` | `string` | `undefined` |
|
|
528
|
+
| `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
529
|
+
|
|
530
|
+
###### Returns
|
|
531
|
+
|
|
532
|
+
`Promise`\<`string` \| `null`\>
|
|
533
|
+
|
|
534
|
+
###### Inherited from
|
|
535
|
+
|
|
536
|
+
[`OysterInstance`](workers.md#oysterinstance).[`gitTip`](workers.md#gittip)
|
|
537
|
+
|
|
538
|
+
##### recordGitPush()
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
recordGitPush(
|
|
542
|
+
installationId,
|
|
543
|
+
fact,
|
|
544
|
+
tenantId?
|
|
545
|
+
): Promise<"duplicate" | "recorded">;
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
Join accepted fact identity and Carrier delivery in one local transaction.
|
|
549
|
+
|
|
550
|
+
###### Parameters
|
|
551
|
+
|
|
552
|
+
| Parameter | Type | Default value |
|
|
553
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
554
|
+
| `installationId` | `string` | `undefined` |
|
|
555
|
+
| `fact` | \{ `repository`: `string`; `writer`: \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \}; `updates`: `object`[]; `unexplained?`: `object`[]; `eventId`: `string`; \} | `undefined` |
|
|
556
|
+
| `fact.repository` | `string` | `undefined` |
|
|
557
|
+
| `fact.writer` | \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \} | `undefined` |
|
|
558
|
+
| `fact.updates` | `object`[] | `undefined` |
|
|
559
|
+
| `fact.unexplained?` | `object`[] | `undefined` |
|
|
560
|
+
| `fact.eventId` | `string` | `undefined` |
|
|
561
|
+
| `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
562
|
+
|
|
563
|
+
###### Returns
|
|
564
|
+
|
|
565
|
+
`Promise`\<`"duplicate"` \| `"recorded"`\>
|
|
566
|
+
|
|
567
|
+
###### Inherited from
|
|
568
|
+
|
|
569
|
+
[`OysterInstance`](workers.md#oysterinstance).[`recordGitPush`](workers.md#recordgitpush)
|
|
570
|
+
|
|
571
|
+
##### alarm()
|
|
572
|
+
|
|
573
|
+
```ts
|
|
574
|
+
alarm(): Promise<void>;
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
Carrier owns retries, dead letters and retained delivery receipts.
|
|
578
|
+
|
|
579
|
+
###### Returns
|
|
580
|
+
|
|
581
|
+
`Promise`\<`void`\>
|
|
582
|
+
|
|
583
|
+
###### Inherited from
|
|
584
|
+
|
|
585
|
+
[`OysterInstance`](workers.md#oysterinstance).[`alarm`](workers.md#alarm)
|
|
586
|
+
|
|
587
|
+
##### revoke()
|
|
588
|
+
|
|
589
|
+
```ts
|
|
590
|
+
revoke(
|
|
591
|
+
installationId,
|
|
592
|
+
runId?,
|
|
593
|
+
tenantId?
|
|
594
|
+
): Promise<void>;
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
Installation changes end guest work; a Workflow cancel targets only its run.
|
|
598
|
+
|
|
599
|
+
###### Parameters
|
|
600
|
+
|
|
601
|
+
| Parameter | Type | Default value |
|
|
602
|
+
| ---------------- | ---------------------------------------- | --------------- |
|
|
603
|
+
| `installationId` | `string` | `undefined` |
|
|
604
|
+
| `runId?` | `string` | `undefined` |
|
|
605
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
606
|
+
|
|
607
|
+
###### Returns
|
|
608
|
+
|
|
609
|
+
`Promise`\<`void`\>
|
|
610
|
+
|
|
611
|
+
###### Inherited from
|
|
612
|
+
|
|
613
|
+
[`OysterInstance`](workers.md#oysterinstance).[`revoke`](workers.md#revoke)
|
|
614
|
+
|
|
615
|
+
##### apply()
|
|
616
|
+
|
|
617
|
+
```ts
|
|
618
|
+
apply(
|
|
619
|
+
state,
|
|
620
|
+
release,
|
|
621
|
+
limits,
|
|
622
|
+
tenant
|
|
623
|
+
): Promise<InstanceResult<{
|
|
624
|
+
instanceId: InstanceId;
|
|
625
|
+
owner: {
|
|
626
|
+
kind: "installation" | "deployment";
|
|
627
|
+
id: string;
|
|
628
|
+
};
|
|
629
|
+
appId: AppId;
|
|
630
|
+
releaseId: ReleaseId;
|
|
631
|
+
authorityVersion: number;
|
|
632
|
+
stateSchema: number | null;
|
|
633
|
+
desiredStatus: "enabled" | "disabled" | "deleted";
|
|
634
|
+
status: "disabled" | "deleted" | "active" | "deleting";
|
|
635
|
+
}>>;
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Remember `release`, then apply the owner state under the host's tenant pin.
|
|
639
|
+
|
|
640
|
+
###### Parameters
|
|
641
|
+
|
|
642
|
+
| Parameter | Type |
|
|
643
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
644
|
+
| `state` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \} |
|
|
645
|
+
| `state.instanceId` | [`InstanceId`](index.md#instanceid) |
|
|
646
|
+
| `state.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} |
|
|
647
|
+
| `state.owner.kind` | `"installation"` \| `"deployment"` |
|
|
648
|
+
| `state.owner.id` | `string` |
|
|
649
|
+
| `state.appId` | `AppId` |
|
|
650
|
+
| `state.releaseId` | `ReleaseId` |
|
|
651
|
+
| `state.authorityVersion` | `number` |
|
|
652
|
+
| `state.status` | `"enabled"` \| `"disabled"` \| `"deleted"` |
|
|
653
|
+
| `release` | `Release` |
|
|
654
|
+
| `limits` | \| `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> \| `undefined` |
|
|
655
|
+
| `tenant` | `Pick`\<[`TenantScope`](tenant.md#tenantscope), `"tenantId"` \| `"origin"`\> |
|
|
656
|
+
|
|
657
|
+
###### Returns
|
|
658
|
+
|
|
659
|
+
`Promise`\<[`InstanceResult`](host.md#instanceresult)\<\{ `instanceId`:
|
|
660
|
+
[`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \|
|
|
661
|
+
`"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`;
|
|
662
|
+
`authorityVersion`: `number`; `stateSchema`: `number` \| `null`;
|
|
663
|
+
`desiredStatus`: `"enabled"` \| `"disabled"` \| `"deleted"`; `status`:
|
|
664
|
+
`"disabled"` \| `"deleted"` \| `"active"` \| `"deleting"`; \}\>\>
|
|
665
|
+
|
|
666
|
+
###### Inherited from
|
|
667
|
+
|
|
668
|
+
[`OysterInstance`](workers.md#oysterinstance).[`apply`](workers.md#apply)
|
|
669
|
+
|
|
670
|
+
##### backend()
|
|
671
|
+
|
|
672
|
+
```ts
|
|
673
|
+
backend(
|
|
674
|
+
facts,
|
|
675
|
+
request,
|
|
676
|
+
limits?,
|
|
677
|
+
tenantId?
|
|
678
|
+
): Promise<Response>;
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
Forward an admitted HTTP request to the App backend.
|
|
682
|
+
|
|
683
|
+
###### Parameters
|
|
684
|
+
|
|
685
|
+
| Parameter | Type | Default value |
|
|
686
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
687
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
688
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
689
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
690
|
+
| `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
691
|
+
| `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
692
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
693
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
694
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
695
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
696
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
697
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
698
|
+
| `facts.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"`; \} | `...` |
|
|
699
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
700
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
701
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
702
|
+
| `request?` | `Request` | `undefined` |
|
|
703
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
704
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
705
|
+
|
|
706
|
+
###### Returns
|
|
707
|
+
|
|
708
|
+
`Promise`\<`Response`\>
|
|
709
|
+
|
|
710
|
+
###### Inherited from
|
|
711
|
+
|
|
712
|
+
[`OysterInstance`](workers.md#oysterinstance).[`backend`](workers.md#backend)
|
|
713
|
+
|
|
714
|
+
##### onGitPush()
|
|
715
|
+
|
|
716
|
+
```ts
|
|
717
|
+
onGitPush(
|
|
718
|
+
facts,
|
|
719
|
+
fact,
|
|
720
|
+
limits?,
|
|
721
|
+
tenantId?
|
|
722
|
+
): Promise<void>;
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
Deliver a Git push through the same selected-Instance admission as methods.
|
|
726
|
+
|
|
727
|
+
###### Parameters
|
|
728
|
+
|
|
729
|
+
| Parameter | Type | Default value |
|
|
730
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
731
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
732
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
733
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
734
|
+
| `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
735
|
+
| `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
736
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
737
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
738
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
739
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
740
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
741
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
742
|
+
| `facts.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"`; \} | `...` |
|
|
743
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
744
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
745
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
746
|
+
| `fact?` | \{ `repository`: `string`; `writer`: \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \}; `updates`: `object`[]; `unexplained?`: `object`[]; `eventId`: `string`; \} | `undefined` |
|
|
747
|
+
| `fact.repository?` | `string` | `undefined` |
|
|
748
|
+
| `fact.writer?` | \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \} | `undefined` |
|
|
749
|
+
| `fact.updates?` | `object`[] | `undefined` |
|
|
750
|
+
| `fact.unexplained?` | `object`[] | `undefined` |
|
|
751
|
+
| `fact.eventId?` | `string` | `undefined` |
|
|
752
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
753
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
754
|
+
|
|
755
|
+
###### Returns
|
|
756
|
+
|
|
757
|
+
`Promise`\<`void`\>
|
|
758
|
+
|
|
759
|
+
###### Inherited from
|
|
760
|
+
|
|
761
|
+
[`OysterInstance`](workers.md#oysterinstance).[`onGitPush`](workers.md#ongitpush)
|
|
762
|
+
|
|
763
|
+
##### authorizeGitPush()
|
|
764
|
+
|
|
765
|
+
```ts
|
|
766
|
+
authorizeGitPush(
|
|
767
|
+
facts,
|
|
768
|
+
question,
|
|
769
|
+
limits?,
|
|
770
|
+
tenantId?
|
|
771
|
+
): Promise<
|
|
772
|
+
| {
|
|
773
|
+
allowed: true;
|
|
774
|
+
}
|
|
775
|
+
| {
|
|
776
|
+
allowed: false;
|
|
777
|
+
refused: object[];
|
|
778
|
+
}>;
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
Ask the App's declared authorizer through the same frame-bound connection.
|
|
782
|
+
|
|
783
|
+
###### Parameters
|
|
784
|
+
|
|
785
|
+
| Parameter | Type | Default value |
|
|
786
|
+
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
787
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
788
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
789
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
790
|
+
| `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
791
|
+
| `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
792
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
793
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
794
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
795
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
796
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
797
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
798
|
+
| `facts.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"`; \} | `...` |
|
|
799
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
800
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
801
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
802
|
+
| `question?` | \{ `repository`: `string`; `writer`: \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \}; `updates`: `object`[]; \} | `undefined` |
|
|
803
|
+
| `question.repository?` | `string` | `undefined` |
|
|
804
|
+
| `question.writer?` | \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} | `undefined` |
|
|
805
|
+
| `question.writer.kind?` | `"actor"` | `undefined` |
|
|
806
|
+
| `question.writer.actor?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
|
|
807
|
+
| `question.writer.role?` | `"member"` \| `"owner"` | `undefined` |
|
|
808
|
+
| `question.writer.workflow?` | \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \} | `undefined` |
|
|
809
|
+
| `question.writer.workflow.armedBy?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
|
|
810
|
+
| `question.writer.workflow.branches?` | `string`[] | `undefined` |
|
|
811
|
+
| `question.writer.workflow.workflowId?` | `string` | `undefined` |
|
|
812
|
+
| `question.writer.workflow.runId?` | `string` | `undefined` |
|
|
813
|
+
| `question.writer.workflow.nodeId?` | `string` | `undefined` |
|
|
814
|
+
| `question.updates?` | `object`[] | `undefined` |
|
|
815
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
816
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
817
|
+
|
|
818
|
+
###### Returns
|
|
819
|
+
|
|
820
|
+
`Promise`\< \| \{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `refused`:
|
|
821
|
+
`object`[]; \}\>
|
|
822
|
+
|
|
823
|
+
###### Inherited from
|
|
824
|
+
|
|
825
|
+
[`OysterInstance`](workers.md#oysterinstance).[`authorizeGitPush`](workers.md#authorizegitpush)
|
|
826
|
+
|
|
827
|
+
##### syncRefused()
|
|
828
|
+
|
|
829
|
+
```ts
|
|
830
|
+
syncRefused(
|
|
831
|
+
facts,
|
|
832
|
+
refusal,
|
|
833
|
+
limits?,
|
|
834
|
+
tenantId?
|
|
835
|
+
): Promise<void>;
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
An available lane settles a refusal under an active frame with no binding
|
|
839
|
+
grants.
|
|
840
|
+
|
|
841
|
+
###### Parameters
|
|
842
|
+
|
|
843
|
+
| Parameter | Type | Default value |
|
|
844
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
845
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
846
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
847
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
848
|
+
| `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
849
|
+
| `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
850
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
851
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
852
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
853
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
854
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
855
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
856
|
+
| `facts.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"`; \} | `...` |
|
|
857
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
858
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
859
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
860
|
+
| `refusal?` | \{ `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `undefined` |
|
|
861
|
+
| `refusal.lane?` | `string` | `undefined` |
|
|
862
|
+
| `refusal.code?` | `"access_changed"` \| `"installation_unavailable"` | `undefined` |
|
|
863
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
864
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
865
|
+
|
|
866
|
+
###### Returns
|
|
867
|
+
|
|
868
|
+
`Promise`\<`void`\>
|
|
869
|
+
|
|
870
|
+
###### Inherited from
|
|
871
|
+
|
|
872
|
+
[`OysterInstance`](workers.md#oysterinstance).[`syncRefused`](workers.md#syncrefused)
|
|
873
|
+
|
|
874
|
+
##### gill()
|
|
875
|
+
|
|
876
|
+
```ts
|
|
877
|
+
gill(
|
|
878
|
+
facts,
|
|
879
|
+
_api,
|
|
880
|
+
source,
|
|
881
|
+
input,
|
|
882
|
+
limits?,
|
|
883
|
+
tenantId?
|
|
884
|
+
): Promise<InstanceResult<
|
|
885
|
+
| {
|
|
886
|
+
viewId: string;
|
|
887
|
+
title: string;
|
|
888
|
+
state: "empty";
|
|
889
|
+
rows: readonly [];
|
|
890
|
+
next?: string;
|
|
891
|
+
}
|
|
892
|
+
| {
|
|
893
|
+
viewId: string;
|
|
894
|
+
title: string;
|
|
895
|
+
state: "error";
|
|
896
|
+
rows: readonly [];
|
|
897
|
+
reason?: "exec_isolation_required" | "params_required";
|
|
898
|
+
error: string;
|
|
899
|
+
recovery?: | {
|
|
900
|
+
kind: "configure";
|
|
901
|
+
param: string;
|
|
902
|
+
}
|
|
903
|
+
| {
|
|
904
|
+
kind: "open";
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
| {
|
|
908
|
+
viewId: string;
|
|
909
|
+
title: string;
|
|
910
|
+
state: "full";
|
|
911
|
+
rows: readonly object[];
|
|
912
|
+
next?: string;
|
|
913
|
+
}
|
|
914
|
+
| {
|
|
915
|
+
options: readonly object[];
|
|
916
|
+
next?: string;
|
|
917
|
+
}>>;
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Invoke a Release-declared Gill in a fresh immutable frame.
|
|
921
|
+
|
|
922
|
+
###### Parameters
|
|
923
|
+
|
|
924
|
+
| Parameter | Type | Default value |
|
|
925
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
926
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
927
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
928
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
929
|
+
| `facts.selection.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
930
|
+
| `facts.selection.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
931
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
932
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
933
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
934
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
935
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
936
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
937
|
+
| `facts.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"`; \} | `...` |
|
|
938
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
939
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
940
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
941
|
+
| `_api?` | `AppApi` | `undefined` |
|
|
942
|
+
| `source?` | `string` | `undefined` |
|
|
943
|
+
| `input?` | \{ `id`: `string`; `params?`: \{ \[`key`: `string`\]: `string`; \}; `after?`: `string`; `options?`: `string`; \} | `undefined` |
|
|
944
|
+
| `input.id?` | `string` | `undefined` |
|
|
945
|
+
| `input.params?` | \{ \[`key`: `string`\]: `string`; \} | `undefined` |
|
|
946
|
+
| `input.after?` | `string` | `undefined` |
|
|
947
|
+
| `input.options?` | `string` | `undefined` |
|
|
948
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
949
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
950
|
+
|
|
951
|
+
###### Returns
|
|
952
|
+
|
|
953
|
+
`Promise`\<[`InstanceResult`](host.md#instanceresult)\< \| \{ `viewId`:
|
|
954
|
+
`string`; `title`: `string`; `state`: `"empty"`; `rows`: readonly \[\]; `next?`:
|
|
955
|
+
`string`; \} \| \{ `viewId`: `string`; `title`: `string`; `state`: `"error"`;
|
|
956
|
+
`rows`: readonly \[\]; `reason?`: `"exec_isolation_required"` \|
|
|
957
|
+
`"params_required"`; `error`: `string`; `recovery?`: \| \{ `kind`:
|
|
958
|
+
`"configure"`; `param`: `string`; \} \| \{ `kind`: `"open"`; \}; \} \| \{
|
|
959
|
+
`viewId`: `string`; `title`: `string`; `state`: `"full"`; `rows`: readonly
|
|
960
|
+
`object`[]; `next?`: `string`; \} \| \{ `options`: readonly `object`[]; `next?`:
|
|
961
|
+
`string`; \}\>\>
|
|
962
|
+
|
|
963
|
+
###### Inherited from
|
|
964
|
+
|
|
965
|
+
[`OysterInstance`](workers.md#oysterinstance).[`gill`](workers.md#gill)
|
|
966
|
+
|
|
967
|
+
##### call()
|
|
968
|
+
|
|
969
|
+
```ts
|
|
970
|
+
call(
|
|
971
|
+
facts,
|
|
972
|
+
_api,
|
|
973
|
+
name,
|
|
974
|
+
input,
|
|
975
|
+
limits?,
|
|
976
|
+
tenantId?
|
|
977
|
+
): Promise<InstanceResult<Json>>;
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
Invoke one declared App method; the value is its AppMethodReply wire, which the
|
|
981
|
+
host handle decodes.
|
|
982
|
+
|
|
983
|
+
###### Parameters
|
|
984
|
+
|
|
985
|
+
| Parameter | Type | Default value |
|
|
986
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
|
|
987
|
+
| `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `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"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
|
|
988
|
+
| `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
989
|
+
| `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
|
|
990
|
+
| `facts.selection.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
|
|
991
|
+
| `facts.selection.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
|
|
992
|
+
| `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
|
|
993
|
+
| `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
|
|
994
|
+
| `facts.selection.appId?` | `AppId` | `appIdSchema` |
|
|
995
|
+
| `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
|
|
996
|
+
| `facts.selection.authorityVersion?` | `number` | `...` |
|
|
997
|
+
| `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
|
|
998
|
+
| `facts.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"`; \} | `...` |
|
|
999
|
+
| `facts.grants?` | readonly `object`[] | `grantsSchema` |
|
|
1000
|
+
| `facts.deadlineAt?` | `number` | `...` |
|
|
1001
|
+
| `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
|
|
1002
|
+
| `_api?` | `AppApi` | `undefined` |
|
|
1003
|
+
| `name?` | `string` | `undefined` |
|
|
1004
|
+
| `input?` | `Json` | `undefined` |
|
|
1005
|
+
| `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
|
|
1006
|
+
| `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
|
|
1007
|
+
|
|
1008
|
+
###### Returns
|
|
1009
|
+
|
|
1010
|
+
`Promise`\<[`InstanceResult`](host.md#instanceresult)\<`Json`\>\>
|
|
1011
|
+
|
|
1012
|
+
###### Inherited from
|
|
1013
|
+
|
|
1014
|
+
[`OysterInstance`](workers.md#oysterinstance).[`call`](workers.md#call)
|
|
1015
|
+
|
|
1016
|
+
## Type Aliases
|
|
1017
|
+
|
|
1018
|
+
### ArtifactsGit
|
|
1019
|
+
|
|
1020
|
+
```ts
|
|
1021
|
+
type ArtifactsGit = Omit<GitBinding, "cloneUrl"> &
|
|
1022
|
+
Readonly<{
|
|
1023
|
+
credential: Promise<
|
|
1024
|
+
Readonly<{
|
|
1025
|
+
remote: string;
|
|
1026
|
+
token: string;
|
|
1027
|
+
}>
|
|
1028
|
+
>;
|
|
1029
|
+
}>;
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
The GIT binding plus the credential only the host's git door may use.
|
|
1033
|
+
|
|
1034
|
+
---
|
|
1035
|
+
|
|
1036
|
+
### OysterKeysEnv
|
|
1037
|
+
|
|
1038
|
+
```ts
|
|
1039
|
+
type OysterKeysEnv = Readonly<Record<never, never>>;
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
Bindings the keys and webhook objects need: none of their own.
|
|
1043
|
+
|
|
1044
|
+
---
|
|
1045
|
+
|
|
1046
|
+
### WebhookSubscription
|
|
1047
|
+
|
|
1048
|
+
```ts
|
|
1049
|
+
type WebhookSubscription = Readonly<{
|
|
1050
|
+
id: string;
|
|
1051
|
+
installationId: string;
|
|
1052
|
+
url: string;
|
|
1053
|
+
types: readonly string[];
|
|
1054
|
+
createdAt: number;
|
|
1055
|
+
}>;
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
One webhook subscription for an installation's events.
|
|
1059
|
+
|
|
1060
|
+
---
|
|
1061
|
+
|
|
1062
|
+
### SubscriptionCreated
|
|
1063
|
+
|
|
1064
|
+
```ts
|
|
1065
|
+
type SubscriptionCreated = Readonly<{
|
|
1066
|
+
subscription: WebhookSubscription;
|
|
1067
|
+
secret: string;
|
|
1068
|
+
}>;
|
|
1069
|
+
```
|
|
1070
|
+
|
|
1071
|
+
A new subscription and its signing secret, shown once.
|
|
1072
|
+
|
|
1073
|
+
---
|
|
1074
|
+
|
|
1075
|
+
### WebhookDelivery
|
|
1076
|
+
|
|
1077
|
+
```ts
|
|
1078
|
+
type WebhookDelivery = Readonly<{
|
|
1079
|
+
id: string;
|
|
1080
|
+
subscription: string;
|
|
1081
|
+
type: string;
|
|
1082
|
+
state: "pending" | "delivered" | "failed";
|
|
1083
|
+
attempts: number;
|
|
1084
|
+
lastStatus: number | null;
|
|
1085
|
+
updatedAt: number;
|
|
1086
|
+
}>;
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
One delivery attempt record.
|
|
1090
|
+
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
### OysterGitEnv
|
|
1094
|
+
|
|
1095
|
+
```ts
|
|
1096
|
+
type OysterGitEnv = Readonly<{
|
|
1097
|
+
ARTIFACTS?: ArtifactsNamespace;
|
|
1098
|
+
ARTIFACTS_ACCOUNT_ID?: string;
|
|
1099
|
+
ARTIFACTS_NAMESPACE?: string;
|
|
1100
|
+
ARTIFACTS_API_TOKEN?: string;
|
|
1101
|
+
KEYS: DurableObjectNamespace<OysterKeys>;
|
|
1102
|
+
WEBHOOKS: DurableObjectNamespace<OysterWebhooks>;
|
|
1103
|
+
}>;
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
Bindings the git adapters read from a standalone Oyster Worker.
|
|
1107
|
+
|
|
1108
|
+
---
|
|
1109
|
+
|
|
1110
|
+
### OysterKeySummary
|
|
1111
|
+
|
|
1112
|
+
```ts
|
|
1113
|
+
type OysterKeySummary = Readonly<{
|
|
1114
|
+
keyId: string;
|
|
1115
|
+
name: string;
|
|
1116
|
+
grants: readonly Grant<OysterKeyCapability>[];
|
|
1117
|
+
expiresAt: number | null;
|
|
1118
|
+
createdAt: number;
|
|
1119
|
+
lastUsedAt: number | null;
|
|
1120
|
+
revokedAt: number | null;
|
|
1121
|
+
}>;
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
One listed or issued key's owner-facing summary; never its secret or owner id.
|
|
1125
|
+
|
|
1126
|
+
---
|
|
1127
|
+
|
|
1128
|
+
### OysterGitWorkerEnv
|
|
1129
|
+
|
|
1130
|
+
```ts
|
|
1131
|
+
type OysterGitWorkerEnv = OysterWorkerEnv &
|
|
1132
|
+
OysterGitEnv &
|
|
1133
|
+
Readonly<{
|
|
1134
|
+
OYSTER_ORIGIN: string;
|
|
1135
|
+
OYSTER_OWNER_NAME?: string;
|
|
1136
|
+
}>;
|
|
1137
|
+
```
|
|
1138
|
+
|
|
1139
|
+
A standalone Oyster Worker that also hosts git Apps.
|
|
1140
|
+
|
|
1141
|
+
---
|
|
1142
|
+
|
|
1143
|
+
### OysterGitWorkerOptions
|
|
1144
|
+
|
|
1145
|
+
```ts
|
|
1146
|
+
type OysterGitWorkerOptions<Env> = Readonly<{
|
|
1147
|
+
tenancy: (env) => OysterTenancy;
|
|
1148
|
+
homeInstallationId?: (env) => string;
|
|
1149
|
+
pageScript?: string;
|
|
1150
|
+
agents?: (env, scope) => OysterAgents;
|
|
1151
|
+
workspace?: (env, keysLive) => OysterWorkspace;
|
|
1152
|
+
capabilities?: (env, workspace, keysLive) => readonly OysterCapability[];
|
|
1153
|
+
workflowGitPass?: (
|
|
1154
|
+
env,
|
|
1155
|
+
scope,
|
|
1156
|
+
pass,
|
|
1157
|
+
target,
|
|
1158
|
+
) => Promise<Extract<
|
|
1159
|
+
GitWriter,
|
|
1160
|
+
{
|
|
1161
|
+
kind: "actor";
|
|
1162
|
+
}
|
|
1163
|
+
> | null>;
|
|
1164
|
+
buildGitPass?: (
|
|
1165
|
+
env,
|
|
1166
|
+
scope,
|
|
1167
|
+
pass,
|
|
1168
|
+
target,
|
|
1169
|
+
) => Promise<Extract<
|
|
1170
|
+
GitWriter,
|
|
1171
|
+
{
|
|
1172
|
+
kind: "actor";
|
|
1173
|
+
}
|
|
1174
|
+
> | null>;
|
|
1175
|
+
ownerRoutes?: (env, scope) => Hono<OysterEnv>;
|
|
1176
|
+
}>;
|
|
1177
|
+
```
|
|
1178
|
+
|
|
1179
|
+
One deployable Git root's options. Every door (HTTP, MCP, Agents, Workflows,
|
|
1180
|
+
background wakes) composes its tenant host from this one value through
|
|
1181
|
+
`oysterGitRoot(options).hostFor`.
|
|
1182
|
+
|
|
1183
|
+
#### Type Parameters
|
|
1184
|
+
|
|
1185
|
+
| Type Parameter |
|
|
1186
|
+
| ----------------------------------------------------------- |
|
|
1187
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1188
|
+
|
|
1189
|
+
---
|
|
1190
|
+
|
|
1191
|
+
### OysterGitWorkerHost
|
|
1192
|
+
|
|
1193
|
+
```ts
|
|
1194
|
+
type OysterGitWorkerHost = OysterHost &
|
|
1195
|
+
Readonly<{
|
|
1196
|
+
git: OysterGitHost;
|
|
1197
|
+
}>;
|
|
1198
|
+
```
|
|
1199
|
+
|
|
1200
|
+
A tenant's whole Git host: the App server, `host.git` and the owner routes.
|
|
1201
|
+
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
### OysterKeysLivePort
|
|
1205
|
+
|
|
1206
|
+
```ts
|
|
1207
|
+
type OysterKeysLivePort = (keyId) => Promise<LiveOysterKey | null>;
|
|
1208
|
+
```
|
|
1209
|
+
|
|
1210
|
+
`host.keys.live`'s own shape: the live facts behind a key id, re-checked against
|
|
1211
|
+
the tenant's current owner on every read; null for an unknown, revoked, expired,
|
|
1212
|
+
suspended key, or one a since-reassigned tenant's former owner held. The one
|
|
1213
|
+
path every caller -- the HTTP/MCP host, a workspace's own Computer admission --
|
|
1214
|
+
reaches a key's liveness through.
|
|
1215
|
+
|
|
1216
|
+
#### Parameters
|
|
1217
|
+
|
|
1218
|
+
| Parameter | Type |
|
|
1219
|
+
| --------- | -------- |
|
|
1220
|
+
| `keyId` | `string` |
|
|
1221
|
+
|
|
1222
|
+
#### Returns
|
|
1223
|
+
|
|
1224
|
+
`Promise`\<[`LiveOysterKey`](keys.md#liveoysterkey) \| `null`\>
|
|
1225
|
+
|
|
1226
|
+
---
|
|
1227
|
+
|
|
1228
|
+
### OysterGitRoot
|
|
1229
|
+
|
|
1230
|
+
```ts
|
|
1231
|
+
type OysterGitRoot<Env> = Readonly<{
|
|
1232
|
+
admit: Promise<Readonly<{
|
|
1233
|
+
scope: TenantScope;
|
|
1234
|
+
auth: OysterAuth;
|
|
1235
|
+
}> | null>;
|
|
1236
|
+
hostFor: OysterGitWorkerHost;
|
|
1237
|
+
}>;
|
|
1238
|
+
```
|
|
1239
|
+
|
|
1240
|
+
The one composition root of a Git Worker; build it once from its options.
|
|
1241
|
+
|
|
1242
|
+
#### Type Parameters
|
|
1243
|
+
|
|
1244
|
+
| Type Parameter |
|
|
1245
|
+
| ----------------------------------------------------------- |
|
|
1246
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1247
|
+
|
|
1248
|
+
---
|
|
1249
|
+
|
|
1250
|
+
### OysterWorkerGitOptions
|
|
1251
|
+
|
|
1252
|
+
```ts
|
|
1253
|
+
type OysterWorkerGitOptions<Env> = Pick<
|
|
1254
|
+
OysterGitWorkerOptions<Env>,
|
|
1255
|
+
"workflowGitPass" | "buildGitPass"
|
|
1256
|
+
> &
|
|
1257
|
+
Readonly<{
|
|
1258
|
+
scope: TenantScope;
|
|
1259
|
+
}>;
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
What `oysterWorkerGit` needs beyond the Worker's bindings.
|
|
1263
|
+
|
|
1264
|
+
#### Type Parameters
|
|
1265
|
+
|
|
1266
|
+
| Type Parameter |
|
|
1267
|
+
| ----------------------------------------------------------- |
|
|
1268
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1269
|
+
|
|
1270
|
+
---
|
|
1271
|
+
|
|
1272
|
+
### OysterGitFrame
|
|
1273
|
+
|
|
1274
|
+
```ts
|
|
1275
|
+
type OysterGitFrame = Readonly<{
|
|
1276
|
+
invocation: InvocationFrame<OysterInvocationHost>;
|
|
1277
|
+
store?: ArtifactsGit;
|
|
1278
|
+
}>;
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
One live guest frame's Git custody; never a guest argument.
|
|
1282
|
+
|
|
1283
|
+
## Variables
|
|
1284
|
+
|
|
1285
|
+
### eventsBinding
|
|
1286
|
+
|
|
1287
|
+
```ts
|
|
1288
|
+
const eventsBinding: OysterBindingRow<OysterGitWorkerEnv>;
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
EVENTS: signed webhook delivery in this Instance's tenant namespace.
|
|
1292
|
+
|
|
1293
|
+
---
|
|
1294
|
+
|
|
1295
|
+
### gitBindings
|
|
1296
|
+
|
|
1297
|
+
```ts
|
|
1298
|
+
const gitBindings: OysterBindingTable<OysterGitWorkerEnv>;
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
The plain host's bindings plus native GIT over Artifacts and signed EVENTS.
|
|
1302
|
+
|
|
1303
|
+
## Functions
|
|
1304
|
+
|
|
1305
|
+
### createArtifactsGit()
|
|
1306
|
+
|
|
1307
|
+
```ts
|
|
1308
|
+
function createArtifactsGit(binding, prefix, grant): ArtifactsGit;
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
The GIT binding over Artifacts for one installation (`prefix` scopes its names).
|
|
1312
|
+
Credentials remain host-held and are reused until thirty seconds before the
|
|
1313
|
+
provider expiry or eight minutes, whichever comes first. Every operation still
|
|
1314
|
+
checks its captured grant. Provider 401/403 discards the credential for remint.
|
|
1315
|
+
|
|
1316
|
+
#### Parameters
|
|
1317
|
+
|
|
1318
|
+
| Parameter | Type |
|
|
1319
|
+
| --------- | --------------------------------------------------------------------------------------- |
|
|
1320
|
+
| `binding` | `ArtifactsNamespace` |
|
|
1321
|
+
| `prefix` | `string` |
|
|
1322
|
+
| `grant` | `Readonly`\<\{ `operations`: readonly `string`[]; `beforeProvider?`: () => `void`; \}\> |
|
|
1323
|
+
|
|
1324
|
+
#### Returns
|
|
1325
|
+
|
|
1326
|
+
[`ArtifactsGit`](#artifactsgit)
|
|
1327
|
+
|
|
1328
|
+
---
|
|
1329
|
+
|
|
1330
|
+
### artifactsOf()
|
|
1331
|
+
|
|
1332
|
+
```ts
|
|
1333
|
+
function artifactsOf(env): ArtifactsNamespace;
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
The Artifacts namespace: the binding when present, else the REST API.
|
|
1337
|
+
|
|
1338
|
+
#### Parameters
|
|
1339
|
+
|
|
1340
|
+
| Parameter | Type |
|
|
1341
|
+
| --------- | ------------------------------- |
|
|
1342
|
+
| `env` | [`OysterGitEnv`](#oystergitenv) |
|
|
1343
|
+
|
|
1344
|
+
#### Returns
|
|
1345
|
+
|
|
1346
|
+
`ArtifactsNamespace`
|
|
1347
|
+
|
|
1348
|
+
---
|
|
1349
|
+
|
|
1350
|
+
### gitAdminRoutes()
|
|
1351
|
+
|
|
1352
|
+
```ts
|
|
1353
|
+
function gitAdminRoutes(env, scope): Hono<OysterEnv>;
|
|
1354
|
+
```
|
|
1355
|
+
|
|
1356
|
+
Owner routes for keys and webhooks; `createOyster` mounts them owner-only.
|
|
1357
|
+
|
|
1358
|
+
#### Parameters
|
|
1359
|
+
|
|
1360
|
+
| Parameter | Type |
|
|
1361
|
+
| --------- | -------------------------------------- |
|
|
1362
|
+
| `env` | [`OysterGitEnv`](#oystergitenv) |
|
|
1363
|
+
| `scope` | [`TenantScope`](tenant.md#tenantscope) |
|
|
1364
|
+
|
|
1365
|
+
#### Returns
|
|
1366
|
+
|
|
1367
|
+
`Hono`\<[`OysterEnv`](host.md#oysterenv)\>
|
|
1368
|
+
|
|
1369
|
+
---
|
|
1370
|
+
|
|
1371
|
+
### oysterGitRoot()
|
|
1372
|
+
|
|
1373
|
+
```ts
|
|
1374
|
+
function oysterGitRoot<Env>(options): OysterGitRoot<Env>;
|
|
1375
|
+
```
|
|
1376
|
+
|
|
1377
|
+
Compose a Git Worker's root from its one options value.
|
|
1378
|
+
|
|
1379
|
+
#### Type Parameters
|
|
1380
|
+
|
|
1381
|
+
| Type Parameter |
|
|
1382
|
+
| ----------------------------------------------------------- |
|
|
1383
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1384
|
+
|
|
1385
|
+
#### Parameters
|
|
1386
|
+
|
|
1387
|
+
| Parameter | Type |
|
|
1388
|
+
| --------- | ------------------------------------------------------------ |
|
|
1389
|
+
| `options` | [`OysterGitWorkerOptions`](#oystergitworkeroptions)\<`Env`\> |
|
|
1390
|
+
|
|
1391
|
+
#### Returns
|
|
1392
|
+
|
|
1393
|
+
[`OysterGitRoot`](#oystergitroot)\<`Env`\>
|
|
1394
|
+
|
|
1395
|
+
---
|
|
1396
|
+
|
|
1397
|
+
### ownerOrKeyTenancy()
|
|
1398
|
+
|
|
1399
|
+
```ts
|
|
1400
|
+
function ownerOrKeyTenancy(env): OysterTenancy;
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
The single-owner root's tenancy: the owner key or a named key, at the configured
|
|
1404
|
+
origin only.
|
|
1405
|
+
|
|
1406
|
+
#### Parameters
|
|
1407
|
+
|
|
1408
|
+
| Parameter | Type |
|
|
1409
|
+
| --------- | ------------------------------------------- |
|
|
1410
|
+
| `env` | [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1411
|
+
|
|
1412
|
+
#### Returns
|
|
1413
|
+
|
|
1414
|
+
[`OysterTenancy`](tenant.md#oystertenancy)
|
|
1415
|
+
|
|
1416
|
+
---
|
|
1417
|
+
|
|
1418
|
+
### createOysterGitWorker()
|
|
1419
|
+
|
|
1420
|
+
```ts
|
|
1421
|
+
function createOysterGitWorker<Env>(root): ExportedHandler<Env>;
|
|
1422
|
+
```
|
|
1423
|
+
|
|
1424
|
+
The standalone Worker's `fetch` handler with the git door and owner routes.
|
|
1425
|
+
|
|
1426
|
+
#### Type Parameters
|
|
1427
|
+
|
|
1428
|
+
| Type Parameter |
|
|
1429
|
+
| ----------------------------------------------------------- |
|
|
1430
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1431
|
+
|
|
1432
|
+
#### Parameters
|
|
1433
|
+
|
|
1434
|
+
| Parameter | Type |
|
|
1435
|
+
| --------- | ------------------------------------------ |
|
|
1436
|
+
| `root` | [`OysterGitRoot`](#oystergitroot)\<`Env`\> |
|
|
1437
|
+
|
|
1438
|
+
#### Returns
|
|
1439
|
+
|
|
1440
|
+
`ExportedHandler`\<`Env`\>
|
|
1441
|
+
|
|
1442
|
+
---
|
|
1443
|
+
|
|
1444
|
+
### oysterWorkerGit()
|
|
1445
|
+
|
|
1446
|
+
```ts
|
|
1447
|
+
function oysterWorkerGit<Env>(env, options, frame?): OysterGitHost;
|
|
1448
|
+
```
|
|
1449
|
+
|
|
1450
|
+
`host.git` for an Oyster Worker: the git door's writer projection and the
|
|
1451
|
+
admitted, installation-scoped Artifacts path with the App's push policy and the
|
|
1452
|
+
Instance journal. Set it on your own `createOyster` host; the full standalone
|
|
1453
|
+
composition (`oysterGitWorkerHost`) uses this same builder.
|
|
1454
|
+
|
|
1455
|
+
#### Type Parameters
|
|
1456
|
+
|
|
1457
|
+
| Type Parameter |
|
|
1458
|
+
| ----------------------------------------------------------- |
|
|
1459
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1460
|
+
|
|
1461
|
+
#### Parameters
|
|
1462
|
+
|
|
1463
|
+
| Parameter | Type |
|
|
1464
|
+
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1465
|
+
| `env` | `Env` |
|
|
1466
|
+
| `options` | [`OysterWorkerGitOptions`](#oysterworkergitoptions)\<`Env`\> |
|
|
1467
|
+
| `frame?` | `Readonly`\<\{ `invocation`: [`InvocationFrame`](invocation.md#invocationframe)\<[`OysterInvocationHost`](workers.md#oysterinvocationhost)\>; `store?`: [`ArtifactsGit`](#artifactsgit); \}\> |
|
|
1468
|
+
|
|
1469
|
+
#### Returns
|
|
1470
|
+
|
|
1471
|
+
[`OysterGitHost`](host.md#oystergithost)
|
|
1472
|
+
|
|
1473
|
+
---
|
|
1474
|
+
|
|
1475
|
+
### oysterGitWorkerHost()
|
|
1476
|
+
|
|
1477
|
+
```ts
|
|
1478
|
+
function oysterGitWorkerHost<Env>(env, options, selected): OysterGitWorkerHost;
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
One selected tenant's whole host from a root's options. Roots reach it through
|
|
1482
|
+
`oysterGitRoot(options).hostFor`; a cold directory passes its own resolved
|
|
1483
|
+
tenant.
|
|
1484
|
+
|
|
1485
|
+
#### Type Parameters
|
|
1486
|
+
|
|
1487
|
+
| Type Parameter |
|
|
1488
|
+
| ----------------------------------------------------------- |
|
|
1489
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1490
|
+
|
|
1491
|
+
#### Parameters
|
|
1492
|
+
|
|
1493
|
+
| Parameter | Type |
|
|
1494
|
+
| ---------- | ------------------------------------------------------------ |
|
|
1495
|
+
| `env` | `Env` |
|
|
1496
|
+
| `options` | [`OysterGitWorkerOptions`](#oystergitworkeroptions)\<`Env`\> |
|
|
1497
|
+
| `selected` | [`ResolvedTenant`](tenant.md#resolvedtenant) |
|
|
1498
|
+
|
|
1499
|
+
#### Returns
|
|
1500
|
+
|
|
1501
|
+
[`OysterGitWorkerHost`](#oystergitworkerhost)
|
|
1502
|
+
|
|
1503
|
+
---
|
|
1504
|
+
|
|
1505
|
+
### createOysterGitMcpOwner()
|
|
1506
|
+
|
|
1507
|
+
```ts
|
|
1508
|
+
function createOysterGitMcpOwner<Env>(root): (ctx, env) => OysterMcpOwner<Env>;
|
|
1509
|
+
```
|
|
1510
|
+
|
|
1511
|
+
Deploy the MCP owner from the same root as createOysterGitWorker.
|
|
1512
|
+
|
|
1513
|
+
#### Type Parameters
|
|
1514
|
+
|
|
1515
|
+
| Type Parameter |
|
|
1516
|
+
| ----------------------------------------------------------- |
|
|
1517
|
+
| `Env` _extends_ [`OysterGitWorkerEnv`](#oystergitworkerenv) |
|
|
1518
|
+
|
|
1519
|
+
#### Parameters
|
|
1520
|
+
|
|
1521
|
+
| Parameter | Type |
|
|
1522
|
+
| --------- | ------------------------------------------ |
|
|
1523
|
+
| `root` | [`OysterGitRoot`](#oystergitroot)\<`Env`\> |
|
|
1524
|
+
|
|
1525
|
+
#### Returns
|
|
1526
|
+
|
|
1527
|
+
(`ctx`, `env`) => [`OysterMcpOwner`](workers.md#oystermcpowner)\<`Env`\>
|