@fungi.computer/agar 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -18
- package/dist/agent-message-meta.d.ts +21 -16
- package/dist/agent-message-meta.js +17 -6
- package/dist/agents.d.ts +86 -13
- package/dist/agents.js +48 -25
- package/dist/approvals.d.ts +5 -0
- package/dist/approvals.js +36 -0
- package/dist/apps.js +4 -4
- package/dist/backend-definition.d.ts +41 -4
- package/dist/backend-definition.js +70 -10
- package/dist/backend-refusal.d.ts +1 -0
- package/dist/backend-refusal.js +1 -0
- package/dist/backend.js +4 -4
- package/dist/channels.js +4 -4
- package/dist/computer-contracts.d.ts +11 -28
- package/dist/computer-contracts.js +10 -29
- package/dist/computer.js +16 -16
- package/dist/connect.d.ts +3 -3
- package/dist/connect.js +7 -17
- package/dist/errors.d.ts +39 -1
- package/dist/errors.js +62 -5
- package/dist/game-servers.js +2 -2
- package/dist/git-rpc.d.ts +23 -23
- package/dist/git-rpc.js +14 -16
- package/dist/git.d.ts +9 -9
- package/dist/git.js +8 -8
- package/dist/host.d.ts +3 -1
- package/dist/host.js +5 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +5 -2
- package/dist/inference.js +2 -1
- package/dist/internal/app-session.js +37 -1
- package/dist/internal/media-diagnostic.d.ts +11 -0
- package/dist/internal/media-diagnostic.js +21 -0
- package/dist/internal/protocol.d.ts +4 -4
- package/dist/internal/schemas.d.ts +40 -7
- package/dist/internal/schemas.js +122 -35
- package/dist/marketplace.js +7 -5
- package/dist/media-json.d.ts +14 -0
- package/dist/media-json.js +1 -0
- package/dist/media-request-id.d.ts +1 -1
- package/dist/media-request-id.js +2 -2
- package/dist/media.d.ts +11 -0
- package/dist/media.js +8 -2
- package/dist/method-presentation.d.ts +7 -0
- package/dist/method-presentation.js +14 -0
- package/dist/method-refusal.d.ts +5 -5
- package/dist/method-refusal.js +4 -4
- package/dist/query.d.ts +2 -2
- package/dist/react-mount.d.ts +7 -1
- package/dist/react-mount.js +28 -8
- package/dist/react.d.ts +14 -2
- package/dist/react.js +40 -4
- package/dist/read-copy.d.ts +1 -1
- package/dist/read-copy.js +3 -6
- package/dist/storage.js +1 -1
- package/dist/test-kit/git.js +19 -2
- package/dist/window.d.ts +68 -0
- package/dist/window.js +31 -0
- package/docs/api/README.md +15 -15
- package/docs/api/backend-definition.md +83 -9
- package/docs/api/backend.md +45 -38
- package/docs/api/errors.md +104 -0
- package/docs/api/git-rpc.md +35 -35
- package/docs/api/git.md +66 -80
- package/docs/api/index.md +851 -143
- package/docs/api/media-json.md +32 -59
- package/docs/api/media-request-id.md +1 -1
- package/docs/api/method-presentation.md +21 -0
- package/docs/api/modules.md +1 -0
- package/docs/api/query.md +1 -1
- package/docs/api/react.md +23 -10
- package/package.json +16 -6
package/docs/api/backend.md
CHANGED
|
@@ -99,6 +99,7 @@ const appBackendRefusalSchema: ZodObject<
|
|
|
99
99
|
{
|
|
100
100
|
error: ZodLiteral<"App execution unavailable">;
|
|
101
101
|
reason: ZodEnum<{
|
|
102
|
+
disabled: "disabled";
|
|
102
103
|
exec_isolation_required: "exec_isolation_required";
|
|
103
104
|
execution_not_admitted: "execution_not_admitted";
|
|
104
105
|
artifact_unavailable: "artifact_unavailable";
|
|
@@ -215,19 +216,21 @@ Bound on the App-authored refusal message that reaches callers.
|
|
|
215
216
|
### appMethodRefusedReplySchema
|
|
216
217
|
|
|
217
218
|
```ts
|
|
218
|
-
const appMethodRefusedReplySchema:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
const appMethodRefusedReplySchema: ZodLazy<
|
|
220
|
+
ZodObject<
|
|
221
|
+
{
|
|
222
|
+
kind: ZodLiteral<"refused">;
|
|
223
|
+
code: ZodEnum<{
|
|
224
|
+
unavailable: "unavailable";
|
|
225
|
+
invalid: "invalid";
|
|
226
|
+
conflict: "conflict";
|
|
227
|
+
forbidden: "forbidden";
|
|
228
|
+
not_found: "not_found";
|
|
229
|
+
}>;
|
|
230
|
+
message: ZodString;
|
|
231
|
+
},
|
|
232
|
+
$strict
|
|
233
|
+
>
|
|
231
234
|
>;
|
|
232
235
|
```
|
|
233
236
|
|
|
@@ -238,31 +241,35 @@ A refused call as it crosses the generated method boundary.
|
|
|
238
241
|
### appMethodReplySchema
|
|
239
242
|
|
|
240
243
|
```ts
|
|
241
|
-
const appMethodReplySchema:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
244
|
+
const appMethodReplySchema: ZodLazy<
|
|
245
|
+
ZodDiscriminatedUnion<
|
|
246
|
+
[
|
|
247
|
+
ZodObject<
|
|
248
|
+
{
|
|
249
|
+
kind: ZodLiteral<"ok">;
|
|
250
|
+
value: ZodJSONSchema;
|
|
251
|
+
},
|
|
252
|
+
$strict
|
|
253
|
+
>,
|
|
254
|
+
ZodLazy<
|
|
255
|
+
ZodObject<
|
|
256
|
+
{
|
|
257
|
+
kind: ZodLiteral<"refused">;
|
|
258
|
+
code: ZodEnum<{
|
|
259
|
+
unavailable: "unavailable";
|
|
260
|
+
invalid: "invalid";
|
|
261
|
+
conflict: "conflict";
|
|
262
|
+
forbidden: "forbidden";
|
|
263
|
+
not_found: "not_found";
|
|
264
|
+
}>;
|
|
265
|
+
message: ZodString;
|
|
266
|
+
},
|
|
267
|
+
$strict
|
|
268
|
+
>
|
|
269
|
+
>,
|
|
270
|
+
],
|
|
271
|
+
"kind"
|
|
272
|
+
>
|
|
266
273
|
>;
|
|
267
274
|
```
|
|
268
275
|
|
package/docs/api/errors.md
CHANGED
|
@@ -61,6 +61,30 @@ readonly retryable: boolean;
|
|
|
61
61
|
|
|
62
62
|
## Type Aliases
|
|
63
63
|
|
|
64
|
+
### MediaProviderDiagnostic
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
type MediaProviderDiagnostic =
|
|
68
|
+
| Readonly<{
|
|
69
|
+
category:
|
|
70
|
+
| "InferenceUpstreamError"
|
|
71
|
+
| "AiInternalError"
|
|
72
|
+
| "TypeError"
|
|
73
|
+
| "AbortError"
|
|
74
|
+
| "TimeoutError"
|
|
75
|
+
| "Error";
|
|
76
|
+
code: number | null;
|
|
77
|
+
}>
|
|
78
|
+
| Readonly<{
|
|
79
|
+
category: "result_download";
|
|
80
|
+
status: number;
|
|
81
|
+
}>;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Declaration-safe projection of the canonical Media diagnostic grammar.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
64
88
|
### AppErrorCode
|
|
65
89
|
|
|
66
90
|
```ts
|
|
@@ -145,8 +169,88 @@ type ErrorDescription = ErrorCopy &
|
|
|
145
169
|
Recovery hints are for the caller's UI, never an instruction to retry
|
|
146
170
|
automatically.
|
|
147
171
|
|
|
172
|
+
## Variables
|
|
173
|
+
|
|
174
|
+
### mediaProviderDiagnosticWireSchema
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
const mediaProviderDiagnosticWireSchema: ZodPipe<
|
|
178
|
+
ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
|
|
179
|
+
ZodTransform<
|
|
180
|
+
| Readonly<{
|
|
181
|
+
category:
|
|
182
|
+
| "InferenceUpstreamError"
|
|
183
|
+
| "AiInternalError"
|
|
184
|
+
| "TypeError"
|
|
185
|
+
| "AbortError"
|
|
186
|
+
| "TimeoutError"
|
|
187
|
+
| "Error";
|
|
188
|
+
code: number | null;
|
|
189
|
+
}>
|
|
190
|
+
| Readonly<{
|
|
191
|
+
category: "result_download";
|
|
192
|
+
status: number;
|
|
193
|
+
}>,
|
|
194
|
+
unknown
|
|
195
|
+
>
|
|
196
|
+
>;
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Documentable wire projection of the canonical diagnostic grammar. Maintained
|
|
200
|
+
converters preserve its closed objects and numeric bounds; decoding still
|
|
201
|
+
returns the declaration-safe public diagnostic type.
|
|
202
|
+
|
|
148
203
|
## Functions
|
|
149
204
|
|
|
205
|
+
### decodeMediaProviderDiagnostic()
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
function decodeMediaProviderDiagnostic(input): MediaProviderDiagnostic;
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Decode only safe provider facts, rejecting unmodeled private fields.
|
|
212
|
+
|
|
213
|
+
#### Parameters
|
|
214
|
+
|
|
215
|
+
| Parameter | Type |
|
|
216
|
+
| --------- | --------- |
|
|
217
|
+
| `input` | `unknown` |
|
|
218
|
+
|
|
219
|
+
#### Returns
|
|
220
|
+
|
|
221
|
+
[`MediaProviderDiagnostic`](#mediaproviderdiagnostic)
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### decodeMediaProviderErrorCategory()
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
function decodeMediaProviderErrorCategory(
|
|
229
|
+
input,
|
|
230
|
+
):
|
|
231
|
+
| "InferenceUpstreamError"
|
|
232
|
+
| "AiInternalError"
|
|
233
|
+
| "TypeError"
|
|
234
|
+
| "AbortError"
|
|
235
|
+
| "TimeoutError"
|
|
236
|
+
| "Error";
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Decode an ordinary Error name without retaining arbitrary upstream text.
|
|
240
|
+
|
|
241
|
+
#### Parameters
|
|
242
|
+
|
|
243
|
+
| Parameter | Type |
|
|
244
|
+
| --------- | ----------------------- |
|
|
245
|
+
| `input` | `string` \| `undefined` |
|
|
246
|
+
|
|
247
|
+
#### Returns
|
|
248
|
+
|
|
249
|
+
\| `"InferenceUpstreamError"` \| `"AiInternalError"` \| `"TypeError"` \|
|
|
250
|
+
`"AbortError"` \| `"TimeoutError"` \| `"Error"`
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
150
254
|
### describeAppError()
|
|
151
255
|
|
|
152
256
|
```ts
|
package/docs/api/git-rpc.md
CHANGED
|
@@ -30,41 +30,41 @@ The native tuple and result grammar shared by the handle and frame entrypoint.
|
|
|
30
30
|
|
|
31
31
|
#### Type Declaration
|
|
32
32
|
|
|
33
|
-
| Name | Type
|
|
34
|
-
| --------------------------------------------- |
|
|
35
|
-
| <a id="property-create"></a> `create` | `object`
|
|
36
|
-
| `create.args` | `ZodTuple`\<\[`ZodString`, `ZodOptional`\<`ZodObject`\<\{ `description`: `ZodOptional`\<`ZodString`\>; `defaultBranch`: `ZodOptional`\<`ZodString`\>; \}, `$strict
|
|
37
|
-
| `create.result` | `ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict
|
|
38
|
-
| <a id="property-fork"></a> `fork` | `object`
|
|
39
|
-
| `fork.args` | `ZodTuple`\<\[`ZodString`, `ZodString`, `ZodOptional`\<`ZodObject`\<\{ `description`: `ZodOptional`\<`ZodString`\>; \}, `$strict
|
|
40
|
-
| `fork.result` | `ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict
|
|
41
|
-
| <a id="property-cloneurl"></a> `cloneUrl` | `object`
|
|
42
|
-
| `cloneUrl.args` | `ZodTuple`\<\[`ZodString`\], `null`\>
|
|
43
|
-
| `cloneUrl.result` | `ZodURL`
|
|
44
|
-
| <a id="property-info"></a> `info` | `object`
|
|
45
|
-
| `info.args` | `ZodTuple`\<\[`ZodString`\], `null`\>
|
|
46
|
-
| `info.result` | `ZodNullable`\<`ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict
|
|
47
|
-
| <a id="property-delete"></a> `delete` | `object`
|
|
48
|
-
| `delete.args` | `ZodTuple`\<\[`ZodString`\], `null`\>
|
|
49
|
-
| `delete.result` | `ZodBoolean`
|
|
50
|
-
| <a id="property-log"></a> `log` | `object`
|
|
51
|
-
| `log.args` | `ZodTuple`\<\[`ZodString`, `ZodObject`\<\{ `ref`: `ZodString`; `limit`: `ZodOptional`\<`ZodNumber`\>; `offset`: `ZodOptional`\<`ZodNumber`\>; \}, `$strict
|
|
52
|
-
| `log.result` | `ZodArray`\<`ZodObject`\<\{ `hash`: `ZodString`; `treeHash`: `ZodString`; `message`: `ZodString`; `author`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `committer`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `parents`: `ZodArray`\<`ZodString`\>; `authoredAt`: `ZodNumber`; `committedAt`: `ZodNumber`; \}, `$strict
|
|
53
|
-
| <a id="property-readcommit"></a> `readCommit` | `object`
|
|
54
|
-
| `readCommit.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\>
|
|
55
|
-
| `readCommit.result` | `ZodNullable`\<`ZodObject`\<\{ `hash`: `ZodString`; `treeHash`: `ZodString`; `message`: `ZodString`; `author`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `committer`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `parents`: `ZodArray`\<`ZodString`\>; `authoredAt`: `ZodNumber`; `committedAt`: `ZodNumber`; \}, `$strict
|
|
56
|
-
| <a id="property-readtree"></a> `readTree` | `object`
|
|
57
|
-
| `readTree.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\>
|
|
58
|
-
| `readTree.result` | `ZodNullable`\<`ZodArray`\<`ZodObject`\<\{ `name`: `ZodString`; `mode`: `ZodString`; `hash`: `ZodString`; `type`: `ZodEnum`\<\{ `blob`: `"blob"`; `tree`: `"tree"`; `commit`: `"commit"`; \}\>; \}, `$strict
|
|
59
|
-
| <a id="property-readblob"></a> `readBlob` | `object`
|
|
60
|
-
| `readBlob.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\>
|
|
61
|
-
| `readBlob.result` | `ZodNullable`\<`ZodCustom`\<`Uint8Array`\<`ArrayBuffer`\>, `Uint8Array`\<`ArrayBuffer
|
|
62
|
-
| <a id="property-refs"></a> `refs` | `object`
|
|
63
|
-
| `refs.args` | `ZodTuple`\<\[`ZodString`\], `null`\>
|
|
64
|
-
| `refs.result` | `ZodArray`\<`ZodObject`\<\{ `name`: `ZodString`; `hash`: `ZodString`; \}, `$strict`\>\>
|
|
65
|
-
| <a id="property-exchange"></a> `exchange` | `object`
|
|
66
|
-
| `exchange.args` | `ZodTuple`\<\[`ZodString`, `ZodObject`\<\{ `service`: `ZodEnum`\<\{ `upload-pack`: `"upload-pack"`; `receive-pack`: `"receive-pack"`; \}\>; `phase`: `ZodEnum`\<\{ `advertise`: `"advertise"`; `exchange`: `"exchange"`; \}\>; `body`: `ZodNullable`\<`ZodCustom`\<`Uint8Array`\<`ArrayBuffer`\>, `Uint8Array`\<`ArrayBuffer
|
|
67
|
-
| `exchange.result` | `ZodObject`\<\{ `status`: `ZodNumber`; `headers`: `ZodRecord`\<`ZodString`, `ZodString
|
|
33
|
+
| Name | Type | Default value |
|
|
34
|
+
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
35
|
+
| <a id="property-create"></a> `create` | `object` | - |
|
|
36
|
+
| `create.args` | `ZodTuple`\<\[`ZodString`, `ZodLazy`\<`ZodOptional`\<`ZodObject`\<\{ `description`: `ZodOptional`\<`ZodString`\>; `defaultBranch`: `ZodOptional`\<`ZodString`\>; \}, `$strict`\>\>\>\], `null`\> | - |
|
|
37
|
+
| `create.result` | `ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict`\>\> | `info` |
|
|
38
|
+
| <a id="property-fork"></a> `fork` | `object` | - |
|
|
39
|
+
| `fork.args` | `ZodTuple`\<\[`ZodString`, `ZodString`, `ZodLazy`\<`ZodOptional`\<`ZodObject`\<\{ `description`: `ZodOptional`\<`ZodString`\>; \}, `$strict`\>\>\>\], `null`\> | - |
|
|
40
|
+
| `fork.result` | `ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict`\>\> | `info` |
|
|
41
|
+
| <a id="property-cloneurl"></a> `cloneUrl` | `object` | - |
|
|
42
|
+
| `cloneUrl.args` | `ZodTuple`\<\[`ZodString`\], `null`\> | - |
|
|
43
|
+
| `cloneUrl.result` | `ZodURL` | - |
|
|
44
|
+
| <a id="property-info"></a> `info` | `object` | - |
|
|
45
|
+
| `info.args` | `ZodTuple`\<\[`ZodString`\], `null`\> | - |
|
|
46
|
+
| `info.result` | `ZodNullable`\<`ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `defaultBranch`: `ZodString`; `lastPushAt`: `ZodNullable`\<`ZodString`\>; `source`: `ZodNullable`\<`ZodString`\>; \}, `$strict`\>\>\> | - |
|
|
47
|
+
| <a id="property-delete"></a> `delete` | `object` | - |
|
|
48
|
+
| `delete.args` | `ZodTuple`\<\[`ZodString`\], `null`\> | - |
|
|
49
|
+
| `delete.result` | `ZodBoolean` | - |
|
|
50
|
+
| <a id="property-log"></a> `log` | `object` | - |
|
|
51
|
+
| `log.args` | `ZodTuple`\<\[`ZodString`, `ZodLazy`\<`ZodObject`\<\{ `ref`: `ZodString`; `limit`: `ZodOptional`\<`ZodNumber`\>; `offset`: `ZodOptional`\<`ZodNumber`\>; \}, `$strict`\>\>\], `null`\> | - |
|
|
52
|
+
| `log.result` | `ZodArray`\<`ZodLazy`\<`ZodObject`\<\{ `hash`: `ZodString`; `treeHash`: `ZodString`; `message`: `ZodString`; `author`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `committer`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `parents`: `ZodArray`\<`ZodString`\>; `authoredAt`: `ZodNumber`; `committedAt`: `ZodNumber`; \}, `$strict`\>\>\> | - |
|
|
53
|
+
| <a id="property-readcommit"></a> `readCommit` | `object` | - |
|
|
54
|
+
| `readCommit.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\> | - |
|
|
55
|
+
| `readCommit.result` | `ZodNullable`\<`ZodLazy`\<`ZodObject`\<\{ `hash`: `ZodString`; `treeHash`: `ZodString`; `message`: `ZodString`; `author`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `committer`: `ZodObject`\<\{ `name`: `ZodString`; `email`: `ZodString`; \}, `$strict`\>; `parents`: `ZodArray`\<`ZodString`\>; `authoredAt`: `ZodNumber`; `committedAt`: `ZodNumber`; \}, `$strict`\>\>\> | - |
|
|
56
|
+
| <a id="property-readtree"></a> `readTree` | `object` | - |
|
|
57
|
+
| `readTree.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\> | - |
|
|
58
|
+
| `readTree.result` | `ZodNullable`\<`ZodArray`\<`ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `mode`: `ZodString`; `hash`: `ZodString`; `type`: `ZodEnum`\<\{ `blob`: `"blob"`; `tree`: `"tree"`; `commit`: `"commit"`; \}\>; \}, `$strict`\>\>\>\> | - |
|
|
59
|
+
| <a id="property-readblob"></a> `readBlob` | `object` | - |
|
|
60
|
+
| `readBlob.args` | `ZodTuple`\<\[`ZodString`, `ZodString`\], `null`\> | - |
|
|
61
|
+
| `readBlob.result` | `ZodNullable`\<`ZodLazy`\<`ZodCustom`\<`Uint8Array`\<`ArrayBuffer`\>, `Uint8Array`\<`ArrayBuffer`\>\>\>\> | - |
|
|
62
|
+
| <a id="property-refs"></a> `refs` | `object` | - |
|
|
63
|
+
| `refs.args` | `ZodTuple`\<\[`ZodString`\], `null`\> | - |
|
|
64
|
+
| `refs.result` | `ZodArray`\<`ZodObject`\<\{ `name`: `ZodString`; `hash`: `ZodString`; \}, `$strict`\>\> | - |
|
|
65
|
+
| <a id="property-exchange"></a> `exchange` | `object` | - |
|
|
66
|
+
| `exchange.args` | `ZodTuple`\<\[`ZodString`, `ZodObject`\<\{ `service`: `ZodEnum`\<\{ `upload-pack`: `"upload-pack"`; `receive-pack`: `"receive-pack"`; \}\>; `phase`: `ZodEnum`\<\{ `advertise`: `"advertise"`; `exchange`: `"exchange"`; \}\>; `body`: `ZodNullable`\<`ZodLazy`\<`ZodCustom`\<`Uint8Array`\<`ArrayBuffer`\>, `Uint8Array`\<`ArrayBuffer`\>\>\>\>; `headers`: `ZodLazy`\<`ZodRecord`\<`ZodString`, `ZodString`\>\>; \}, `$strict`\>\], `null`\> | - |
|
|
67
|
+
| `exchange.result` | `ZodObject`\<\{ `status`: `ZodNumber`; `headers`: `ZodLazy`\<`ZodRecord`\<`ZodString`, `ZodString`\>\>; `body`: `ZodLazy`\<`ZodCustom`\<`Uint8Array`\<`ArrayBuffer`\>, `Uint8Array`\<`ArrayBuffer`\>\>\>; \}, `$strict`\> | `response` |
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
package/docs/api/git.md
CHANGED
|
@@ -290,25 +290,27 @@ Requested installation-scoped Git authority; a declaration is never a grant.
|
|
|
290
290
|
### repositoryRefSchema
|
|
291
291
|
|
|
292
292
|
```ts
|
|
293
|
-
const repositoryRefSchema:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
293
|
+
const repositoryRefSchema: ZodLazy<
|
|
294
|
+
ZodDiscriminatedUnion<
|
|
295
|
+
[
|
|
296
|
+
ZodObject<
|
|
297
|
+
{
|
|
298
|
+
kind: ZodLiteral<"installation">;
|
|
299
|
+
installationId: ZodString;
|
|
300
|
+
repository: ZodString;
|
|
301
|
+
},
|
|
302
|
+
$strict
|
|
303
|
+
>,
|
|
304
|
+
ZodObject<
|
|
305
|
+
{
|
|
306
|
+
kind: ZodLiteral<"team-source">;
|
|
307
|
+
repository: ZodString;
|
|
308
|
+
},
|
|
309
|
+
$strict
|
|
310
|
+
>,
|
|
311
|
+
],
|
|
312
|
+
"kind"
|
|
313
|
+
>
|
|
312
314
|
>;
|
|
313
315
|
```
|
|
314
316
|
|
|
@@ -375,7 +377,7 @@ Canonical Git writer decoder; identity is attested by a host, never by an App.
|
|
|
375
377
|
### gitPushQuestionSchema
|
|
376
378
|
|
|
377
379
|
```ts
|
|
378
|
-
const gitPushQuestionSchema: ZodObject<{
|
|
380
|
+
const gitPushQuestionSchema: ZodLazy<ZodObject<{
|
|
379
381
|
repository: ZodString;
|
|
380
382
|
writer: ZodObject<{
|
|
381
383
|
kind: ZodLiteral<"actor">;
|
|
@@ -394,16 +396,7 @@ const gitPushQuestionSchema: ZodObject<{
|
|
|
394
396
|
owner: "owner";
|
|
395
397
|
}>>;
|
|
396
398
|
workflow: ZodOptional<ZodObject<{
|
|
397
|
-
armedBy: ZodDiscriminatedUnion<[ZodObject
|
|
398
|
-
kind: ...;
|
|
399
|
-
memberId: ...;
|
|
400
|
-
}, $strict>, ZodObject<{
|
|
401
|
-
kind: ...;
|
|
402
|
-
agentId: ...;
|
|
403
|
-
}, $strict>, ZodObject<{
|
|
404
|
-
kind: ...;
|
|
405
|
-
keyId: ...;
|
|
406
|
-
}, $strict>], "kind">;
|
|
399
|
+
armedBy: ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>, ZodObject<..., ...>], "kind">;
|
|
407
400
|
branches: ZodArray<ZodString>;
|
|
408
401
|
workflowId: ZodMiniString<string>;
|
|
409
402
|
runId: ZodMiniString<string>;
|
|
@@ -415,7 +408,7 @@ const gitPushQuestionSchema: ZodObject<{
|
|
|
415
408
|
before: ZodString;
|
|
416
409
|
after: ZodString;
|
|
417
410
|
}, $strict>>;
|
|
418
|
-
}, $strict
|
|
411
|
+
}, $strict>>;
|
|
419
412
|
```
|
|
420
413
|
|
|
421
414
|
The App's question covers the whole push, under host-held attribution.
|
|
@@ -425,31 +418,33 @@ The App's question covers the whole push, under host-held attribution.
|
|
|
425
418
|
### gitPushVerdictSchema
|
|
426
419
|
|
|
427
420
|
```ts
|
|
428
|
-
const gitPushVerdictSchema:
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
421
|
+
const gitPushVerdictSchema: ZodLazy<
|
|
422
|
+
ZodDiscriminatedUnion<
|
|
423
|
+
[
|
|
424
|
+
ZodObject<
|
|
425
|
+
{
|
|
426
|
+
allowed: ZodLiteral<true>;
|
|
427
|
+
},
|
|
428
|
+
$strict
|
|
429
|
+
>,
|
|
430
|
+
ZodObject<
|
|
431
|
+
{
|
|
432
|
+
allowed: ZodLiteral<false>;
|
|
433
|
+
refused: ZodArray<
|
|
434
|
+
ZodObject<
|
|
435
|
+
{
|
|
436
|
+
ref: ZodString;
|
|
437
|
+
message: ZodString;
|
|
438
|
+
},
|
|
439
|
+
$strict
|
|
440
|
+
>
|
|
441
|
+
>;
|
|
442
|
+
},
|
|
443
|
+
$strict
|
|
444
|
+
>,
|
|
445
|
+
],
|
|
446
|
+
"allowed"
|
|
447
|
+
>
|
|
453
448
|
>;
|
|
454
449
|
```
|
|
455
450
|
|
|
@@ -460,44 +455,35 @@ A whole push verdict; refusal messages are shown by ordinary Git clients.
|
|
|
460
455
|
### appGitPushFactSchema
|
|
461
456
|
|
|
462
457
|
```ts
|
|
463
|
-
const appGitPushFactSchema: ZodObject<{
|
|
458
|
+
const appGitPushFactSchema: ZodLazy<ZodObject<{
|
|
464
459
|
repository: ZodString;
|
|
465
460
|
writer: ZodDiscriminatedUnion<[ZodObject<{
|
|
466
461
|
kind: ZodLiteral<"actor">;
|
|
467
462
|
actor: ZodDiscriminatedUnion<[ZodObject<{
|
|
468
|
-
kind:
|
|
469
|
-
memberId:
|
|
463
|
+
kind: ...;
|
|
464
|
+
memberId: ...;
|
|
470
465
|
}, $strict>, ZodObject<{
|
|
471
|
-
kind:
|
|
472
|
-
agentId:
|
|
466
|
+
kind: ...;
|
|
467
|
+
agentId: ...;
|
|
473
468
|
}, $strict>, ZodObject<{
|
|
474
|
-
kind:
|
|
475
|
-
keyId:
|
|
469
|
+
kind: ...;
|
|
470
|
+
keyId: ...;
|
|
476
471
|
}, $strict>], "kind">;
|
|
477
472
|
role: ZodMiniOptional<ZodMiniEnum<{
|
|
478
473
|
member: "member";
|
|
479
474
|
owner: "owner";
|
|
480
475
|
}>>;
|
|
481
476
|
workflow: ZodOptional<ZodObject<{
|
|
482
|
-
armedBy: ZodDiscriminatedUnion
|
|
483
|
-
branches: ZodArray
|
|
484
|
-
workflowId: ZodMiniString
|
|
485
|
-
runId: ZodMiniString
|
|
486
|
-
nodeId: ZodMiniString
|
|
477
|
+
armedBy: ZodDiscriminatedUnion<..., ...>;
|
|
478
|
+
branches: ZodArray<...>;
|
|
479
|
+
workflowId: ZodMiniString<...>;
|
|
480
|
+
runId: ZodMiniString<...>;
|
|
481
|
+
nodeId: ZodMiniString<...>;
|
|
487
482
|
}, $strict>>;
|
|
488
483
|
}, $strict>, ZodObject<{
|
|
489
484
|
kind: ZodLiteral<"installation">;
|
|
490
485
|
installationId: ZodString;
|
|
491
|
-
onBehalfOf: ZodNullable<ZodDiscriminatedUnion<[ZodObject
|
|
492
|
-
kind: ...;
|
|
493
|
-
memberId: ...;
|
|
494
|
-
}, $strict>, ZodObject<{
|
|
495
|
-
kind: ...;
|
|
496
|
-
agentId: ...;
|
|
497
|
-
}, $strict>, ZodObject<{
|
|
498
|
-
kind: ...;
|
|
499
|
-
keyId: ...;
|
|
500
|
-
}, $strict>], "kind">>;
|
|
486
|
+
onBehalfOf: ZodNullable<ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>, ZodObject<..., ...>], "kind">>;
|
|
501
487
|
}, $strict>], "kind">;
|
|
502
488
|
updates: ZodArray<ZodObject<{
|
|
503
489
|
ref: ZodString;
|
|
@@ -508,8 +494,8 @@ const appGitPushFactSchema: ZodObject<{
|
|
|
508
494
|
ref: ZodString;
|
|
509
495
|
journaled: ZodNullable<ZodString>;
|
|
510
496
|
}, $strict>>>;
|
|
511
|
-
eventId: ZodString
|
|
512
|
-
}, $strict
|
|
497
|
+
eventId: ZodLazy<ZodString>;
|
|
498
|
+
}, $strict>>;
|
|
513
499
|
```
|
|
514
500
|
|
|
515
501
|
One accepted push, with host attribution and no remote or credential.
|