@fungi.computer/oyster 0.11.0 → 0.12.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/README.md +70 -10
- package/dist/app-builds.d.ts +2 -0
- package/dist/app-builds.js +17 -6
- package/dist/authorization.d.ts +1 -1
- package/dist/build/artifact-writer.d.ts +11 -2
- package/dist/build/artifact-writer.js +42 -24
- package/dist/build/candidate-cli.mjs +33 -19
- package/dist/build/content-objects.d.ts +29 -14
- package/dist/build/content-objects.js +57 -19
- package/dist/build/local-build.js +7 -1
- package/dist/build/submission-contract.d.ts +1 -1
- package/dist/build/submission-contract.js +5 -5
- package/dist/build-egress.d.ts +8 -7
- package/dist/build-egress.js +4 -3
- package/dist/build.d.ts +1 -1
- package/dist/hello-app-script.d.ts +2 -0
- package/dist/hello-app-script.js +1 -0
- package/dist/install-release-cli.d.ts +2 -1
- package/dist/install-release-cli.js +18 -10
- package/dist/installation-client.d.ts +1 -0
- package/dist/installation-operations.d.ts +2 -0
- package/dist/installation-operations.js +1 -0
- package/dist/pack.d.ts +5 -2
- package/dist/pack.js +3 -1
- package/dist/standalone/agents.d.ts +6 -2
- package/dist/standalone/agents.js +21 -4
- package/dist/standalone/computer-egress.d.ts +5 -3
- package/dist/standalone/computer-egress.js +1 -1
- package/dist/standalone/hello-app.d.ts +10 -0
- package/dist/standalone/hello-app.js +81 -0
- package/dist/standalone/install-apps-cli.d.ts +2 -1
- package/dist/standalone/install-apps-cli.js +36 -14
- package/dist/standalone/instance.js +2 -2
- package/dist/standalone/local-desktop.d.ts +11 -0
- package/dist/standalone/local-desktop.js +75 -0
- package/dist/standalone/registry.d.ts +2 -0
- package/dist/standalone/sign-in-link.d.ts +9 -0
- package/dist/standalone/sign-in-link.js +49 -0
- package/dist/standalone/try-cli.d.ts +52 -0
- package/dist/standalone/try-cli.js +427 -0
- package/dist/standalone/worker.js +1 -1
- package/dist/webhook-abuse.d.ts +7 -1
- package/dist/webhook-abuse.js +8 -2
- package/dist/workers.d.ts +7 -2
- package/dist/workers.js +1 -1
- package/docs/api/authorization.md +56 -11
- package/docs/api/build-contract.md +52 -10
- package/docs/api/build.md +16 -2
- package/docs/api/host.md +1 -0
- package/docs/api/pack.md +179 -3
- package/docs/site/agent-quickstart.mdx +8 -0
- package/package.json +13 -8
|
@@ -458,6 +458,7 @@ type RequestFacts = Readonly<{
|
|
|
458
458
|
body: <T>(schema) => Promise<T | null>;
|
|
459
459
|
principal: () => Promise<OysterAuthResult>;
|
|
460
460
|
mediated: boolean;
|
|
461
|
+
agents: AgentCeiling;
|
|
461
462
|
ports: AuthorityPorts;
|
|
462
463
|
}>;
|
|
463
464
|
```
|
|
@@ -466,6 +467,18 @@ The request facts a requirement reads.
|
|
|
466
467
|
|
|
467
468
|
---
|
|
468
469
|
|
|
470
|
+
### AgentCeiling
|
|
471
|
+
|
|
472
|
+
```ts
|
|
473
|
+
type AgentCeiling = "all" | ReadonlySet<string>;
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
The Agents an App's admitted capability grant reaches: every Agent its principal
|
|
477
|
+
reaches, or exactly the selected ones. A request no App capability narrowed
|
|
478
|
+
carries `"all"`; principal reach still decides.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
469
482
|
### RequirementKind
|
|
470
483
|
|
|
471
484
|
```ts
|
|
@@ -516,6 +529,7 @@ the shell.
|
|
|
516
529
|
type OwnerAdmission = Readonly<{
|
|
517
530
|
principal: OwnerPrincipal;
|
|
518
531
|
origin: OwnerOrigin;
|
|
532
|
+
delegatesAgent: (agentId) => boolean;
|
|
519
533
|
}>;
|
|
520
534
|
```
|
|
521
535
|
|
|
@@ -556,6 +570,19 @@ What an Agent route receives.
|
|
|
556
570
|
|
|
557
571
|
---
|
|
558
572
|
|
|
573
|
+
### AgentCollectionAdmission
|
|
574
|
+
|
|
575
|
+
```ts
|
|
576
|
+
type AgentCollectionAdmission = CollectionAdmission<string> &
|
|
577
|
+
Readonly<{
|
|
578
|
+
everyAgent: boolean;
|
|
579
|
+
}>;
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
What an Agent collection route receives.
|
|
583
|
+
|
|
584
|
+
---
|
|
585
|
+
|
|
559
586
|
### Method
|
|
560
587
|
|
|
561
588
|
```ts
|
|
@@ -969,6 +996,27 @@ Whether a live key's grants permit a one-use device enrollment.
|
|
|
969
996
|
|
|
970
997
|
---
|
|
971
998
|
|
|
999
|
+
### agentCeiling()
|
|
1000
|
+
|
|
1001
|
+
```ts
|
|
1002
|
+
function agentCeiling(resources): AgentCeiling;
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
An admitted grant's resources as an Agent ceiling; a non-Agent selection reaches
|
|
1006
|
+
no Agent.
|
|
1007
|
+
|
|
1008
|
+
#### Parameters
|
|
1009
|
+
|
|
1010
|
+
| Parameter | Type |
|
|
1011
|
+
| ----------- | --------------------------------------------------------------------------------------- |
|
|
1012
|
+
| `resources` | \| `"tenant-scope"` \| readonly `Readonly`\<\{ `kind`: `string`; `id`: `string`; \}\>[] |
|
|
1013
|
+
|
|
1014
|
+
#### Returns
|
|
1015
|
+
|
|
1016
|
+
[`AgentCeiling`](#agentceiling)
|
|
1017
|
+
|
|
1018
|
+
---
|
|
1019
|
+
|
|
972
1020
|
### unauthenticated()
|
|
973
1021
|
|
|
974
1022
|
```ts
|
|
@@ -1039,6 +1087,7 @@ function owner(via): Requirement<
|
|
|
1039
1087
|
Readonly<{
|
|
1040
1088
|
principal: OwnerPrincipal;
|
|
1041
1089
|
origin: OwnerOrigin;
|
|
1090
|
+
delegatesAgent: (agentId) => boolean;
|
|
1042
1091
|
}>
|
|
1043
1092
|
>;
|
|
1044
1093
|
```
|
|
@@ -1057,7 +1106,7 @@ serves): consent and secrets never ride an App.
|
|
|
1057
1106
|
|
|
1058
1107
|
[`Requirement`](#requirement)\<`Readonly`\<\{ `principal`:
|
|
1059
1108
|
[`OwnerPrincipal`](#ownerprincipal); `origin`: [`OwnerOrigin`](#ownerorigin);
|
|
1060
|
-
\}\>\>
|
|
1109
|
+
`delegatesAgent`: (`agentId`) => `boolean`; \}\>\>
|
|
1061
1110
|
|
|
1062
1111
|
---
|
|
1063
1112
|
|
|
@@ -1160,20 +1209,15 @@ owner, or a key granted `agents.use` for that Agent id.
|
|
|
1160
1209
|
### agents()
|
|
1161
1210
|
|
|
1162
1211
|
```ts
|
|
1163
|
-
function agents(): Requirement<
|
|
1164
|
-
Readonly<{
|
|
1165
|
-
authority: Authority;
|
|
1166
|
-
reaches: (item) => Promise<boolean>;
|
|
1167
|
-
}>
|
|
1168
|
-
>;
|
|
1212
|
+
function agents(): Requirement<AgentCollectionAdmission>;
|
|
1169
1213
|
```
|
|
1170
1214
|
|
|
1171
|
-
Agents (and their inbox rows): the owner sees all, a key its granted Agents
|
|
1215
|
+
Agents (and their inbox rows): the owner sees all, a key its granted Agents, and
|
|
1216
|
+
either only within the App grant that carried the request.
|
|
1172
1217
|
|
|
1173
1218
|
#### Returns
|
|
1174
1219
|
|
|
1175
|
-
[`Requirement`](#requirement)
|
|
1176
|
-
[`Authority`](#authority); `reaches`: (`item`) => `Promise`\<`boolean`\>; \}\>\>
|
|
1220
|
+
[`Requirement`](#requirement)\<[`AgentCollectionAdmission`](#agentcollectionadmission)\>
|
|
1177
1221
|
|
|
1178
1222
|
---
|
|
1179
1223
|
|
|
@@ -1286,7 +1330,8 @@ Serve one capability's declared table under the host dispatcher's admission,
|
|
|
1286
1330
|
read from `c.env`: the App already holds the capability, and each route still
|
|
1287
1331
|
decides its own resource. Every request here is App-mediated, however it was
|
|
1288
1332
|
admitted (a header or a browser socket's query), so `owner("direct")` always
|
|
1289
|
-
refuses inside a capability
|
|
1333
|
+
refuses inside a capability, and every Agent decision stays within the admitted
|
|
1334
|
+
grant's selection.
|
|
1290
1335
|
|
|
1291
1336
|
#### Parameters
|
|
1292
1337
|
|
|
@@ -28,6 +28,18 @@ The parts of an R2 bucket a content-object store uses.
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
+
### ContentObjectOwner
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
type ContentObjectOwner = Readonly<{
|
|
35
|
+
namespace: string;
|
|
36
|
+
}>;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The one Team or tenant whose uploads share a key namespace.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
31
43
|
### CandidateObject
|
|
32
44
|
|
|
33
45
|
```ts
|
|
@@ -916,19 +928,42 @@ asset's type is its manifest's, so it is an octet stream.
|
|
|
916
928
|
|
|
917
929
|
## Functions
|
|
918
930
|
|
|
931
|
+
### contentObjectOwner()
|
|
932
|
+
|
|
933
|
+
```ts
|
|
934
|
+
function contentObjectOwner(id): ContentObjectOwner;
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
Name the upload namespace of a Team or tenant id. Ids are opaque to the store,
|
|
938
|
+
so the namespace is a fixed-length digest of the id.
|
|
939
|
+
|
|
940
|
+
#### Parameters
|
|
941
|
+
|
|
942
|
+
| Parameter | Type |
|
|
943
|
+
| --------- | -------- |
|
|
944
|
+
| `id` | `string` |
|
|
945
|
+
|
|
946
|
+
#### Returns
|
|
947
|
+
|
|
948
|
+
[`ContentObjectOwner`](#contentobjectowner)
|
|
949
|
+
|
|
950
|
+
---
|
|
951
|
+
|
|
919
952
|
### contentObjectRef()
|
|
920
953
|
|
|
921
954
|
```ts
|
|
922
|
-
function contentObjectRef(digest): ArtifactRef;
|
|
955
|
+
function contentObjectRef(owner, digest, mediaType): ArtifactRef;
|
|
923
956
|
```
|
|
924
957
|
|
|
925
|
-
The store key of one
|
|
958
|
+
The store key of one uploaded object: its owner, digest and stored media type.
|
|
926
959
|
|
|
927
960
|
#### Parameters
|
|
928
961
|
|
|
929
|
-
| Parameter
|
|
930
|
-
|
|
|
931
|
-
| `
|
|
962
|
+
| Parameter | Type |
|
|
963
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------- |
|
|
964
|
+
| `owner` | [`ContentObjectOwner`](#contentobjectowner) |
|
|
965
|
+
| `digest` | `Sha256Digest` |
|
|
966
|
+
| `mediaType` | \| `"text/html; charset=utf-8"` \| `"application/vnd.fungi.app-backend+json"` \| `"application/octet-stream"` |
|
|
932
967
|
|
|
933
968
|
#### Returns
|
|
934
969
|
|
|
@@ -969,22 +1004,28 @@ Describe a stored object by its size and the SHA-256 the store verified.
|
|
|
969
1004
|
```ts
|
|
970
1005
|
function putContentObject(
|
|
971
1006
|
bucket,
|
|
1007
|
+
owner,
|
|
972
1008
|
object,
|
|
973
1009
|
body,
|
|
974
1010
|
mediaType,
|
|
975
1011
|
): Promise<"stored" | "refused">;
|
|
976
1012
|
```
|
|
977
1013
|
|
|
978
|
-
Stream one object into the store under its digest
|
|
979
|
-
whose SHA-256 differs
|
|
980
|
-
|
|
981
|
-
|
|
1014
|
+
Stream one object into the store under its owner, digest and media type. The
|
|
1015
|
+
store refuses a body whose SHA-256 differs. The key is write-once (a stored
|
|
1016
|
+
version may be pinned by a Release): the put is conditional on the key being
|
|
1017
|
+
absent, and an existing object is never replaced. When the key already holds an
|
|
1018
|
+
object of the named size whose store-verified digest is the named one, or that
|
|
1019
|
+
the store never checksummed (a packed upload's plain bytes, which the candidate
|
|
1020
|
+
check reads and hashes), the body is discarded and the object kept; any other
|
|
1021
|
+
existing object refuses the upload.
|
|
982
1022
|
|
|
983
1023
|
#### Parameters
|
|
984
1024
|
|
|
985
1025
|
| Parameter | Type |
|
|
986
1026
|
| ------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
987
1027
|
| `bucket` | [`ContentObjectBucket`](#contentobjectbucket) |
|
|
1028
|
+
| `owner` | [`ContentObjectOwner`](#contentobjectowner) |
|
|
988
1029
|
| `object` | \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \} |
|
|
989
1030
|
| `object.digest` | `Sha256Digest` |
|
|
990
1031
|
| `object.byteLength` | `number` |
|
|
@@ -1082,7 +1123,8 @@ The stored media type a request names, if it is one an object may carry.
|
|
|
1082
1123
|
function candidateManifestObjects(output): readonly CandidateUpload[];
|
|
1083
1124
|
```
|
|
1084
1125
|
|
|
1085
|
-
Every distinct object a manifest names, each once, in
|
|
1126
|
+
Every distinct object (digest and stored type) a manifest names, each once, in
|
|
1127
|
+
manifest order.
|
|
1086
1128
|
|
|
1087
1129
|
#### Parameters
|
|
1088
1130
|
|
package/docs/api/build.md
CHANGED
|
@@ -147,12 +147,26 @@ One object ready to store under its reference.
|
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
|
150
|
+
### StagedCandidateObject
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
type StagedCandidateObject = Readonly<{
|
|
154
|
+
bytes: Uint8Array;
|
|
155
|
+
digest: Sha256Digest;
|
|
156
|
+
mediaType: CandidateObjectMediaType;
|
|
157
|
+
}>;
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
One distinct object a build's output manifest names, before it has an owner.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
150
164
|
### StagedBuildOutput
|
|
151
165
|
|
|
152
166
|
```ts
|
|
153
167
|
type StagedBuildOutput = Readonly<{
|
|
154
168
|
manifest: CandidateOutputManifest;
|
|
155
|
-
objects: readonly
|
|
169
|
+
objects: readonly StagedCandidateObject[];
|
|
156
170
|
}>;
|
|
157
171
|
```
|
|
158
172
|
|
|
@@ -947,7 +961,7 @@ names are already stored, and checked, by the caller.
|
|
|
947
961
|
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
948
962
|
| `manifest` | \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `capabilities`: readonly ( \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"files"` \| `"dashboard"` \| `"inbox"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"ui"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `capabilities`: readonly ( \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"files"` \| `"dashboard"` \| `"inbox"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"backend"`; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Readonly`\<...\>\>\>; `toolFamily?`: `Readonly`\<\{ `name`: ...; `list`: ...; `call`: ...; \}\>; `events?`: `Readonly`\<`Record`\<..., ...\>\>; \}\>; `displayName?`: `string`; `capabilities`: readonly ( \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly `Readonly`\<\{ `appId`: `string`; `methods`: readonly `string`[]; \}\>[]; `guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"files"` \| `"dashboard"` \| `"inbox"` \| `"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly (... \| ...)[]; `maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `sigil?`: `string`; `projections?`: `Readonly`\<...\>; \}\>[]; `gills?`: readonly `Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`: readonly ...[]; `watch?`: `AppGillWatch`; `desktop?`: `Readonly`\<...\>; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`: readonly `Readonly`\<\{ `name`: ...; `operations`: ...; \}\>[]; `sync?`: `Readonly`\<\{ `method`: ...; \}\>; \}\>; \}\>; `kind`: `"app"`; `ui`: \| \{ `mediaType`: `"text/html; charset=utf-8"`; `content`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; `kind`: `"html"`; \}; \} \| \{ `mediaType`: `"application/vnd.fungi.app-assets+json"`; `content`: \{ `kind`: `"assets"`; `base`: `string`; `assets`: readonly `object`[]; \}; \}; `backend`: \{ `digest`: `Sha256Digest`; `byteLength`: `number`; \}; \} |
|
|
949
963
|
| `objects` | [`ImmutableArtifactObjects`](#immutableartifactobjects) |
|
|
950
|
-
| `options` | `Readonly`\<\{ `rootArtifactRef`: `ArtifactRef`; `assetPolicy`: `AssetBuildPolicy` \| `undefined`; \}\>
|
|
964
|
+
| `options` | `Readonly`\<\{ `owner`: [`ContentObjectOwner`](build-contract.md#contentobjectowner); `rootArtifactRef`: `ArtifactRef`; `assetPolicy`: `AssetBuildPolicy` \| `undefined`; \}\> |
|
|
951
965
|
|
|
952
966
|
#### Returns
|
|
953
967
|
|
package/docs/api/host.md
CHANGED
package/docs/api/pack.md
CHANGED
|
@@ -53,6 +53,31 @@ readonly requestId: string;
|
|
|
53
53
|
|
|
54
54
|
## Type Aliases
|
|
55
55
|
|
|
56
|
+
### InstallationCompletion
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
type InstallationCompletion = Exclude<
|
|
60
|
+
InstallationOperation,
|
|
61
|
+
{
|
|
62
|
+
state: "pending";
|
|
63
|
+
}
|
|
64
|
+
>;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
An installation operation that has finished: it is no longer pending.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### InstallationOperation
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
type InstallationOperation = z.output<typeof installationOperationSchema>;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The owner's answer about one installation request.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
56
81
|
### PackOptions
|
|
57
82
|
|
|
58
83
|
```ts
|
|
@@ -85,6 +110,157 @@ type PackedRelease = Readonly<{
|
|
|
85
110
|
|
|
86
111
|
A packed Release on disk.
|
|
87
112
|
|
|
113
|
+
## Variables
|
|
114
|
+
|
|
115
|
+
### installationOperationSchema
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
const installationOperationSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
119
|
+
requestId: ZodString;
|
|
120
|
+
requestedInstallationId: ZodLazy<ZodString>;
|
|
121
|
+
installationId: ZodLazy<ZodString>;
|
|
122
|
+
release: ZodPipe<ZodUnknown, ZodTransform<{
|
|
123
|
+
releaseId: ReleaseId;
|
|
124
|
+
appId: AppId;
|
|
125
|
+
artifact: {
|
|
126
|
+
artifactRef: ArtifactRef;
|
|
127
|
+
artifactDigest: Sha256Digest;
|
|
128
|
+
provenance: {
|
|
129
|
+
sourceRevision: SourceRevision;
|
|
130
|
+
sourceTreeDigest: Sha256Digest;
|
|
131
|
+
buildRecipeDigest: Sha256Digest;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}, unknown>>;
|
|
135
|
+
state: ZodLiteral<"pending">;
|
|
136
|
+
}, $strict>, ZodObject<{
|
|
137
|
+
requestId: ZodString;
|
|
138
|
+
requestedInstallationId: ZodLazy<ZodString>;
|
|
139
|
+
installationId: ZodLazy<ZodString>;
|
|
140
|
+
release: ZodPipe<ZodUnknown, ZodTransform<{
|
|
141
|
+
releaseId: ReleaseId;
|
|
142
|
+
appId: AppId;
|
|
143
|
+
artifact: {
|
|
144
|
+
artifactRef: ArtifactRef;
|
|
145
|
+
artifactDigest: Sha256Digest;
|
|
146
|
+
provenance: {
|
|
147
|
+
sourceRevision: SourceRevision;
|
|
148
|
+
sourceTreeDigest: Sha256Digest;
|
|
149
|
+
buildRecipeDigest: Sha256Digest;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}, unknown>>;
|
|
153
|
+
state: ZodLiteral<"succeeded">;
|
|
154
|
+
reference: ZodObject<{
|
|
155
|
+
generation: ZodString;
|
|
156
|
+
instanceId: ZodPipe<ZodUnknown, ZodTransform<InstanceId, unknown>>;
|
|
157
|
+
authorityVersion: ZodNumber;
|
|
158
|
+
status: ZodEnum<{
|
|
159
|
+
enabled: "enabled";
|
|
160
|
+
disabled: "disabled";
|
|
161
|
+
deleted: "deleted";
|
|
162
|
+
}>;
|
|
163
|
+
}, $strict>;
|
|
164
|
+
creation: ZodEnum<{
|
|
165
|
+
fresh: "fresh";
|
|
166
|
+
replacement: "replacement";
|
|
167
|
+
reminted: "reminted";
|
|
168
|
+
}>;
|
|
169
|
+
uiCheck: ZodNullable<ZodDiscriminatedUnion<[ZodObject<{
|
|
170
|
+
kind: ZodLiteral<"passed">;
|
|
171
|
+
}, $strict>, ZodObject<{
|
|
172
|
+
kind: ZodLiteral<"failed">;
|
|
173
|
+
code: ZodLiteral<"ui_mount_failed">;
|
|
174
|
+
diagnostics: ZodOptional<ZodObject<..., ...>>;
|
|
175
|
+
}, $strict>, ZodObject<{
|
|
176
|
+
kind: ZodLiteral<"not_checked">;
|
|
177
|
+
code: ZodEnum<{
|
|
178
|
+
boot_runner_unavailable: ...;
|
|
179
|
+
boot_browser_binding_missing: ...;
|
|
180
|
+
boot_clone_unavailable: ...;
|
|
181
|
+
boot_timeout: ...;
|
|
182
|
+
boot_cleanup_failed: ...;
|
|
183
|
+
ui_check_not_run_on_host: ...;
|
|
184
|
+
}>;
|
|
185
|
+
}, $strict>], "kind">>;
|
|
186
|
+
installation: ZodNullable<ZodObject<{
|
|
187
|
+
installationId: ZodLazy<ZodString>;
|
|
188
|
+
instanceId: ZodNullable<ZodPipe<ZodUnknown, ZodTransform<InstanceId, unknown>>>;
|
|
189
|
+
appId: ZodPipe<ZodUnknown, ZodTransform<AppId, unknown>>;
|
|
190
|
+
release: ZodPipe<ZodUnknown, ZodTransform<{
|
|
191
|
+
releaseId: ReleaseId;
|
|
192
|
+
appId: AppId;
|
|
193
|
+
artifact: {
|
|
194
|
+
artifactRef: ...;
|
|
195
|
+
artifactDigest: ...;
|
|
196
|
+
provenance: ...;
|
|
197
|
+
};
|
|
198
|
+
}, unknown>>;
|
|
199
|
+
releasePin: ZodEnum<{
|
|
200
|
+
pinned: "pinned";
|
|
201
|
+
floating: "floating";
|
|
202
|
+
}>;
|
|
203
|
+
authority: ZodObject<{
|
|
204
|
+
authorityVersion: ZodLazy<ZodNumber>;
|
|
205
|
+
declaredOperationsDigest: ZodPipe<ZodUnknown, ZodTransform<..., ...>>;
|
|
206
|
+
approvedGrants: ZodLazy<ZodReadonly<...>>;
|
|
207
|
+
approval: ZodNullable<ZodLazy<...>>;
|
|
208
|
+
}, $strict>;
|
|
209
|
+
status: ZodEnum<{
|
|
210
|
+
enabled: "enabled";
|
|
211
|
+
disabled: "disabled";
|
|
212
|
+
deleted: "deleted";
|
|
213
|
+
}>;
|
|
214
|
+
}, $strict>>;
|
|
215
|
+
}, $strict>, ZodObject<{
|
|
216
|
+
requestId: ZodString;
|
|
217
|
+
requestedInstallationId: ZodLazy<ZodString>;
|
|
218
|
+
installationId: ZodLazy<ZodString>;
|
|
219
|
+
release: ZodPipe<ZodUnknown, ZodTransform<{
|
|
220
|
+
releaseId: ReleaseId;
|
|
221
|
+
appId: AppId;
|
|
222
|
+
artifact: {
|
|
223
|
+
artifactRef: ArtifactRef;
|
|
224
|
+
artifactDigest: Sha256Digest;
|
|
225
|
+
provenance: {
|
|
226
|
+
sourceRevision: SourceRevision;
|
|
227
|
+
sourceTreeDigest: Sha256Digest;
|
|
228
|
+
buildRecipeDigest: Sha256Digest;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
}, unknown>>;
|
|
232
|
+
state: ZodLiteral<"refused">;
|
|
233
|
+
status: ZodNumber;
|
|
234
|
+
code: ZodString;
|
|
235
|
+
}, $strict>, ZodObject<{
|
|
236
|
+
requestId: ZodString;
|
|
237
|
+
requestedInstallationId: ZodLazy<ZodString>;
|
|
238
|
+
installationId: ZodLazy<ZodString>;
|
|
239
|
+
release: ZodPipe<ZodUnknown, ZodTransform<{
|
|
240
|
+
releaseId: ReleaseId;
|
|
241
|
+
appId: AppId;
|
|
242
|
+
artifact: {
|
|
243
|
+
artifactRef: ArtifactRef;
|
|
244
|
+
artifactDigest: Sha256Digest;
|
|
245
|
+
provenance: {
|
|
246
|
+
sourceRevision: SourceRevision;
|
|
247
|
+
sourceTreeDigest: Sha256Digest;
|
|
248
|
+
buildRecipeDigest: Sha256Digest;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
}, unknown>>;
|
|
252
|
+
state: ZodLiteral<"unconfirmed">;
|
|
253
|
+
outcome: ZodEnum<{
|
|
254
|
+
cancelled: "cancelled";
|
|
255
|
+
outcome_unknown: "outcome_unknown";
|
|
256
|
+
interrupted: "interrupted";
|
|
257
|
+
}>;
|
|
258
|
+
}, $strict>], "state">;
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Parses the owner's answer about one installation request: pending, installed,
|
|
262
|
+
refused or unconfirmed.
|
|
263
|
+
|
|
88
264
|
## Functions
|
|
89
265
|
|
|
90
266
|
### packRelease()
|
|
@@ -156,9 +332,9 @@ is reported as an unconfirmed observation, not refusal.
|
|
|
156
332
|
|
|
157
333
|
#### Parameters
|
|
158
334
|
|
|
159
|
-
| Parameter | Type
|
|
160
|
-
| --------- |
|
|
161
|
-
| `input` | `Readonly`\<\{ `directory`: `string`; `url`: `string`; `key`: `string`; `installationId?`: `string`; `onAdmitted?`: (`operation`) => `void`; \}\> & `Readonly`\<\{ `waitMs?`: `number`; `signal?`: `AbortSignal`; \}\> |
|
|
335
|
+
| Parameter | Type |
|
|
336
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
337
|
+
| `input` | `Readonly`\<\{ `directory`: `string`; `url`: `string`; `key`: `string`; `installationId?`: `string`; `onAdmitted?`: (`operation`) => `void`; `onCompleted?`: (`operation`) => `Promise`\<`void`\>; \}\> & `Readonly`\<\{ `waitMs?`: `number`; `signal?`: `AbortSignal`; \}\> |
|
|
162
338
|
|
|
163
339
|
#### Returns
|
|
164
340
|
|
|
@@ -95,6 +95,14 @@ cp node_modules/@fungi.computer/oyster/examples/standalone/worker.ts .
|
|
|
95
95
|
cp node_modules/@fungi.computer/oyster/examples/standalone/wrangler.jsonc .
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
pnpm 11 holds back any version published in the last day, so a brand-new release
|
|
99
|
+
may not be the one it installs. Run
|
|
100
|
+
`pnpm ls @fungi.computer/oyster @fungi.computer/computer` to see which versions
|
|
101
|
+
you got, and compare them with
|
|
102
|
+
[Package versions in each Fungi release](https://docs.fungi.computer/reference/packages/#package-versions-in-each-fungi-release).
|
|
103
|
+
To install a specific release, name its versions, as in
|
|
104
|
+
[Upgrade Oyster](https://docs.fungi.computer/guides/run-your-own-oyster/#upgrade-oyster).
|
|
105
|
+
|
|
98
106
|
Expected output: pnpm lists the added package after each `add`, and `ls` now
|
|
99
107
|
shows `node_modules`, `package.json`, `pnpm-workspace.yaml`, `worker.ts` and
|
|
100
108
|
`wrangler.jsonc`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/oyster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Run your own Apps on Cloudflare Workers or celld: installable App Releases, each with its own Durable Object, SQLite database and declared bindings",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./src/frame-binding-wire-script.d.ts",
|
|
31
31
|
"default": "./dist/frame-binding-wire-script.js"
|
|
32
32
|
},
|
|
33
|
+
"#hello-app-script": {
|
|
34
|
+
"types": "./src/hello-app-script.d.ts",
|
|
35
|
+
"default": "./dist/hello-app-script.js"
|
|
36
|
+
},
|
|
33
37
|
"#page-script": {
|
|
34
38
|
"types": "./src/page-script.d.ts",
|
|
35
39
|
"default": "./dist/page-script.js"
|
|
@@ -344,28 +348,29 @@
|
|
|
344
348
|
"@fungi.computer/capnweb": "0.12.0",
|
|
345
349
|
"@fungi.computer/caps": "0.7.1",
|
|
346
350
|
"@fungi.computer/carrier": "0.2.1",
|
|
347
|
-
"@fungi.computer/computer": "0.6.
|
|
351
|
+
"@fungi.computer/computer": "0.6.1",
|
|
348
352
|
"@fungi.computer/computer-contract": "0.0.10",
|
|
349
353
|
"@fungi.computer/darkroom": "0.5.1",
|
|
350
354
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
351
355
|
"@fungi.computer/forage": "0.3.1",
|
|
352
356
|
"@fungi.computer/gills": "0.2.1",
|
|
353
357
|
"@fungi.computer/knapsack": "0.4.5",
|
|
358
|
+
"@fungi.computer/lantern": "0.4.0",
|
|
354
359
|
"@fungi.computer/mycelium": "0.3.4",
|
|
355
360
|
"@fungi.computer/nacre": "0.2.0",
|
|
356
|
-
"@fungi.computer/parakeet": "0.8.
|
|
361
|
+
"@fungi.computer/parakeet": "0.8.1",
|
|
357
362
|
"@fungi.computer/puffball": "0.5.1",
|
|
358
|
-
"@fungi.computer/seam": "0.2.
|
|
359
|
-
"@fungi.computer/shiitake": "0.
|
|
360
|
-
"@fungi.computer/shiitake-extensions": "0.6.
|
|
363
|
+
"@fungi.computer/seam": "0.2.2",
|
|
364
|
+
"@fungi.computer/shiitake": "0.11.0",
|
|
365
|
+
"@fungi.computer/shiitake-extensions": "0.6.5",
|
|
361
366
|
"@fungi.computer/sigils": "0.3.0",
|
|
362
367
|
"@fungi.computer/sprite": "0.2.0",
|
|
363
368
|
"@fungi.computer/sprite-zdog": "0.3.0",
|
|
364
|
-
"@fungi.computer/veil": "0.
|
|
369
|
+
"@fungi.computer/veil": "0.6.0",
|
|
365
370
|
"@fungi.computer/watchdog": "0.1.0",
|
|
366
371
|
"@fungi.computer/whistle": "0.3.0",
|
|
367
372
|
"@fungi.computer/workflows-wire": "0.4.3",
|
|
368
|
-
"@fungi.computer/zookeeper": "0.0.
|
|
373
|
+
"@fungi.computer/zookeeper": "0.0.12",
|
|
369
374
|
"@modelcontextprotocol/server": "2.0.0",
|
|
370
375
|
"@pnpm/lockfile.fs": "1100.2.13",
|
|
371
376
|
"@pnpm/lockfile.pruner": "1100.0.27",
|