@fungi.computer/oyster 0.31.2 → 0.33.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 +59 -0
- package/dist/agent-computer-source.d.ts +1 -0
- package/dist/agent-computer-source.js +1 -0
- package/dist/app-test-copies.d.ts +87 -0
- package/dist/app-test-copies.js +170 -0
- package/dist/app-test-copy-page.d.ts +4 -0
- package/dist/app-test-copy-page.js +89 -0
- package/dist/apps/installation.js +19 -14
- package/dist/browser/operations.d.ts +1 -1
- package/dist/cloudflare.d.ts +68 -3
- package/dist/cloudflare.js +214 -3
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +2 -2
- package/dist/host.d.ts +16 -0
- package/dist/host.js +309 -1
- package/dist/installation-operations.d.ts +247 -8
- package/dist/installation-operations.js +145 -7
- package/dist/installation-recovery-page.d.ts +24 -0
- package/dist/installation-recovery-page.js +168 -0
- package/dist/older-oyster-store.d.ts +1 -1
- package/dist/older-oyster-store.js +2 -4
- package/dist/page/mount.d.ts +2 -101
- package/dist/page/mount.js +1 -22
- package/dist/page-config.d.ts +102 -0
- package/dist/page-config.js +24 -0
- package/dist/page-script.js +1 -1
- package/dist/platform-skills.generated.d.ts +11 -0
- package/dist/platform-skills.generated.js +16 -0
- package/dist/recovery-style.d.ts +5 -0
- package/dist/recovery-style.js +32 -0
- package/dist/standalone/agents.d.ts +1 -1
- package/dist/standalone/agents.js +1 -0
- package/dist/standalone/computer-skill-source.d.ts +13 -2
- package/dist/standalone/computer-skill-source.js +80 -6
- package/dist/standalone/workflow-host.d.ts +4 -4
- package/dist/standalone/workflows.d.ts +9 -9
- package/dist/storage-frame.d.ts +3 -3
- package/dist/upgrade/old-worker-http.d.ts +2 -0
- package/dist/upgrade/old-worker-http.js +22 -0
- package/dist/upgrade/old-worker-readonly.d.ts +14 -0
- package/dist/upgrade/old-worker-readonly.js +22 -0
- package/dist/upgrade/old-worker-sql.d.ts +10 -0
- package/dist/upgrade/old-worker-sql.js +68 -0
- package/dist/upgrade/old-worker-stream.d.ts +12 -0
- package/dist/upgrade/old-worker-stream.js +54 -0
- package/dist/upgrade/private-stage.d.ts +23 -0
- package/dist/upgrade/private-stage.js +109 -0
- package/dist/upgrade/standalone-001.d.ts +16 -0
- package/dist/upgrade/standalone-001.js +31 -0
- package/dist/upgrade/standalone-01.d.ts +37 -0
- package/dist/upgrade/standalone-01.js +55 -0
- package/dist/upgrade/standalone-02.d.ts +37 -0
- package/dist/upgrade/standalone-02.js +55 -0
- package/dist/workers.d.ts +16 -2
- package/dist/workers.js +117 -7
- package/docs/api/README.md +8 -3
- package/docs/api/apps.md +33 -33
- package/docs/api/cloudflare.md +57 -0
- package/docs/api/host.md +223 -14
- package/docs/api/page/mount.md +10 -78
- package/docs/api/workers-git.md +246 -1
- package/docs/api/workers.md +352 -14
- package/package.json +23 -10
package/docs/api/host.md
CHANGED
|
@@ -74,6 +74,26 @@ readonly code:
|
|
|
74
74
|
|
|
75
75
|
## Type Aliases
|
|
76
76
|
|
|
77
|
+
### AppTestCopyAuthority
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
type AppTestCopyAuthority = z.output<typeof appTestCopyAuthoritySchema>;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Exact source selection and store incarnation observed by the owner.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### AppTestCopy
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
type AppTestCopy = z.output<typeof appTestCopySchema>;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Observed sibling identity and nonrenewing deadline, never live host grants.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
77
97
|
### CapabilityMethodKind
|
|
78
98
|
|
|
79
99
|
```ts
|
|
@@ -214,6 +234,19 @@ The result of one Instance operation; refusals carry Oyster's error code.
|
|
|
214
234
|
|
|
215
235
|
```ts
|
|
216
236
|
type InstanceHandle = Readonly<{
|
|
237
|
+
testCopies?: Readonly<{
|
|
238
|
+
open: (authority, requestId) => Promise<InstanceResult<AppTestCopy>>;
|
|
239
|
+
inspect: (authority) => Promise<InstanceResult<AppTestCopy | null>>;
|
|
240
|
+
discard: (authority, copyId) => Promise<InstanceResult<boolean>>;
|
|
241
|
+
fetch: (authority, copyId, request) => Promise<Response>;
|
|
242
|
+
call: (
|
|
243
|
+
authority,
|
|
244
|
+
copyId,
|
|
245
|
+
name,
|
|
246
|
+
input,
|
|
247
|
+
caller,
|
|
248
|
+
) => Promise<InstanceResult<AppMethodReply>>;
|
|
249
|
+
}>;
|
|
217
250
|
prepare: (
|
|
218
251
|
state,
|
|
219
252
|
release,
|
|
@@ -500,6 +533,60 @@ One host's declared routes and the one way to serve them.
|
|
|
500
533
|
|
|
501
534
|
```ts
|
|
502
535
|
type InstallationOperations = Readonly<{
|
|
536
|
+
recovery: Promise<
|
|
537
|
+
| {
|
|
538
|
+
authorityVersion: number;
|
|
539
|
+
storeGeneration: string;
|
|
540
|
+
release: {
|
|
541
|
+
releaseId: Schema.refine<ReleaseId, Schema.String>;
|
|
542
|
+
appId: Schema.refine<AppId, Schema.String>;
|
|
543
|
+
artifact: Schema.Struct<{
|
|
544
|
+
artifactRef: Schema.refine<ArtifactRef, Schema.String>;
|
|
545
|
+
artifactDigest: Schema.refine<Sha256Digest, Schema.String>;
|
|
546
|
+
provenance: Schema.Struct<{
|
|
547
|
+
sourceRevision: Schema.refine<..., ...>;
|
|
548
|
+
sourceTreeDigest: Schema.refine<..., ...>;
|
|
549
|
+
buildRecipeDigest: Schema.refine<..., ...>;
|
|
550
|
+
}>;
|
|
551
|
+
}>;
|
|
552
|
+
};
|
|
553
|
+
uiCheck: | {
|
|
554
|
+
kind: "passed";
|
|
555
|
+
}
|
|
556
|
+
| {
|
|
557
|
+
kind: "failed";
|
|
558
|
+
code: "ui_mount_failed";
|
|
559
|
+
diagnostics?: {
|
|
560
|
+
failedPredicate: | "unexpected_candidate_request"
|
|
561
|
+
| "response_status"
|
|
562
|
+
| "request_failed"
|
|
563
|
+
| "page_error"
|
|
564
|
+
| "candidate_not_mounted";
|
|
565
|
+
errorName?: | "Error"
|
|
566
|
+
| "TypeError"
|
|
567
|
+
| "RangeError"
|
|
568
|
+
| "SyntaxError"
|
|
569
|
+
| "AbortError"
|
|
570
|
+
| "TimeoutError"
|
|
571
|
+
| "Other";
|
|
572
|
+
finalUrlPath: string;
|
|
573
|
+
consoleErrors: string[];
|
|
574
|
+
pageErrors: string[];
|
|
575
|
+
failedRequests: object[];
|
|
576
|
+
droppedCount: number;
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
| {
|
|
580
|
+
kind: "not_checked";
|
|
581
|
+
code: | "boot_runner_unavailable"
|
|
582
|
+
| "boot_browser_binding_missing"
|
|
583
|
+
| "boot_clone_unavailable"
|
|
584
|
+
| "boot_timeout"
|
|
585
|
+
| "boot_cleanup_failed"
|
|
586
|
+
| "ui_check_not_run_on_host";
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
| null>;
|
|
503
590
|
admit: Promise<
|
|
504
591
|
| {
|
|
505
592
|
requestId: string;
|
|
@@ -975,20 +1062,16 @@ type InstallationOperations = Readonly<{
|
|
|
975
1062
|
| null>;
|
|
976
1063
|
load: Promise<
|
|
977
1064
|
| {
|
|
978
|
-
admission: {
|
|
1065
|
+
admission: | {
|
|
979
1066
|
requestId: string;
|
|
980
1067
|
installationId: string;
|
|
981
1068
|
release: {
|
|
982
1069
|
releaseId: Schema.refine<ReleaseId, Schema.String>;
|
|
983
1070
|
appId: Schema.refine<AppId, Schema.String>;
|
|
984
1071
|
artifact: Schema.Struct<{
|
|
985
|
-
artifactRef: Schema.refine
|
|
986
|
-
artifactDigest: Schema.refine
|
|
987
|
-
provenance: Schema.Struct
|
|
988
|
-
sourceRevision: ...;
|
|
989
|
-
sourceTreeDigest: ...;
|
|
990
|
-
buildRecipeDigest: ...;
|
|
991
|
-
}>;
|
|
1072
|
+
artifactRef: Schema.refine<..., ...>;
|
|
1073
|
+
artifactDigest: Schema.refine<..., ...>;
|
|
1074
|
+
provenance: Schema.Struct<...>;
|
|
992
1075
|
}>;
|
|
993
1076
|
};
|
|
994
1077
|
actor: | {
|
|
@@ -1005,7 +1088,36 @@ type InstallationOperations = Readonly<{
|
|
|
1005
1088
|
};
|
|
1006
1089
|
intent: "install-or-select" | "install-or-remint" | "create-only";
|
|
1007
1090
|
origin: "workflow" | "owner-direct";
|
|
1008
|
-
|
|
1091
|
+
}
|
|
1092
|
+
| {
|
|
1093
|
+
authorityVersion: number;
|
|
1094
|
+
storeGeneration: string;
|
|
1095
|
+
requestId: string;
|
|
1096
|
+
installationId: string;
|
|
1097
|
+
actor: | {
|
|
1098
|
+
kind: z.ZodMiniLiteral<"member">;
|
|
1099
|
+
memberId: z.ZodMiniString<string>;
|
|
1100
|
+
}
|
|
1101
|
+
| {
|
|
1102
|
+
kind: z.ZodMiniLiteral<"agent">;
|
|
1103
|
+
agentId: z.ZodMiniString<string>;
|
|
1104
|
+
}
|
|
1105
|
+
| {
|
|
1106
|
+
kind: z.ZodMiniLiteral<"team-key">;
|
|
1107
|
+
keyId: z.ZodMiniString<string>;
|
|
1108
|
+
};
|
|
1109
|
+
intent: "rollback";
|
|
1110
|
+
origin: "owner-direct";
|
|
1111
|
+
release: {
|
|
1112
|
+
releaseId: Schema.refine<ReleaseId, Schema.String>;
|
|
1113
|
+
appId: Schema.refine<AppId, Schema.String>;
|
|
1114
|
+
artifact: Schema.Struct<{
|
|
1115
|
+
artifactRef: Schema.refine<..., ...>;
|
|
1116
|
+
artifactDigest: Schema.refine<..., ...>;
|
|
1117
|
+
provenance: Schema.Struct<...>;
|
|
1118
|
+
}>;
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1009
1121
|
scope: {
|
|
1010
1122
|
tenantId: string & Brand<"OysterTenantId">;
|
|
1011
1123
|
origin: string;
|
|
@@ -1124,7 +1236,7 @@ type InstallationOperations = Readonly<{
|
|
|
1124
1236
|
}
|
|
1125
1237
|
| null>;
|
|
1126
1238
|
plan: Promise<{
|
|
1127
|
-
admission: {
|
|
1239
|
+
admission: | {
|
|
1128
1240
|
requestId: string;
|
|
1129
1241
|
installationId: string;
|
|
1130
1242
|
release: {
|
|
@@ -1134,9 +1246,9 @@ type InstallationOperations = Readonly<{
|
|
|
1134
1246
|
artifactRef: Schema.refine<ArtifactRef, Schema.String>;
|
|
1135
1247
|
artifactDigest: Schema.refine<Sha256Digest, Schema.String>;
|
|
1136
1248
|
provenance: Schema.Struct<{
|
|
1137
|
-
sourceRevision:
|
|
1138
|
-
sourceTreeDigest:
|
|
1139
|
-
buildRecipeDigest:
|
|
1249
|
+
sourceRevision: ...;
|
|
1250
|
+
sourceTreeDigest: ...;
|
|
1251
|
+
buildRecipeDigest: ...;
|
|
1140
1252
|
}>;
|
|
1141
1253
|
}>;
|
|
1142
1254
|
};
|
|
@@ -1154,7 +1266,40 @@ type InstallationOperations = Readonly<{
|
|
|
1154
1266
|
};
|
|
1155
1267
|
intent: "install-or-select" | "install-or-remint" | "create-only";
|
|
1156
1268
|
origin: "workflow" | "owner-direct";
|
|
1157
|
-
|
|
1269
|
+
}
|
|
1270
|
+
| {
|
|
1271
|
+
authorityVersion: number;
|
|
1272
|
+
storeGeneration: string;
|
|
1273
|
+
requestId: string;
|
|
1274
|
+
installationId: string;
|
|
1275
|
+
actor: | {
|
|
1276
|
+
kind: z.ZodMiniLiteral<"member">;
|
|
1277
|
+
memberId: z.ZodMiniString<string>;
|
|
1278
|
+
}
|
|
1279
|
+
| {
|
|
1280
|
+
kind: z.ZodMiniLiteral<"agent">;
|
|
1281
|
+
agentId: z.ZodMiniString<string>;
|
|
1282
|
+
}
|
|
1283
|
+
| {
|
|
1284
|
+
kind: z.ZodMiniLiteral<"team-key">;
|
|
1285
|
+
keyId: z.ZodMiniString<string>;
|
|
1286
|
+
};
|
|
1287
|
+
intent: "rollback";
|
|
1288
|
+
origin: "owner-direct";
|
|
1289
|
+
release: {
|
|
1290
|
+
releaseId: Schema.refine<ReleaseId, Schema.String>;
|
|
1291
|
+
appId: Schema.refine<AppId, Schema.String>;
|
|
1292
|
+
artifact: Schema.Struct<{
|
|
1293
|
+
artifactRef: Schema.refine<ArtifactRef, Schema.String>;
|
|
1294
|
+
artifactDigest: Schema.refine<Sha256Digest, Schema.String>;
|
|
1295
|
+
provenance: Schema.Struct<{
|
|
1296
|
+
sourceRevision: ...;
|
|
1297
|
+
sourceTreeDigest: ...;
|
|
1298
|
+
buildRecipeDigest: ...;
|
|
1299
|
+
}>;
|
|
1300
|
+
}>;
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1158
1303
|
scope: {
|
|
1159
1304
|
tenantId: string & Brand<"OysterTenantId">;
|
|
1160
1305
|
origin: string;
|
|
@@ -1382,6 +1527,70 @@ another store read or hash.
|
|
|
1382
1527
|
|
|
1383
1528
|
## Variables
|
|
1384
1529
|
|
|
1530
|
+
### appTestCopyAuthoritySchema
|
|
1531
|
+
|
|
1532
|
+
```ts
|
|
1533
|
+
const appTestCopyAuthoritySchema: ZodObject<
|
|
1534
|
+
{
|
|
1535
|
+
selection: ZodPipe<
|
|
1536
|
+
ZodUnknown,
|
|
1537
|
+
ZodTransform<
|
|
1538
|
+
{
|
|
1539
|
+
instanceId: InstanceId;
|
|
1540
|
+
owner: {
|
|
1541
|
+
kind: "installation" | "deployment";
|
|
1542
|
+
id: string;
|
|
1543
|
+
};
|
|
1544
|
+
appId: AppId;
|
|
1545
|
+
releaseId: ReleaseId;
|
|
1546
|
+
authorityVersion: number;
|
|
1547
|
+
},
|
|
1548
|
+
unknown
|
|
1549
|
+
>
|
|
1550
|
+
>;
|
|
1551
|
+
storeGeneration: ZodString;
|
|
1552
|
+
},
|
|
1553
|
+
$strict
|
|
1554
|
+
>;
|
|
1555
|
+
```
|
|
1556
|
+
|
|
1557
|
+
A test copy is fenced to the same store and owner selection as its source.
|
|
1558
|
+
|
|
1559
|
+
---
|
|
1560
|
+
|
|
1561
|
+
### appTestCopySchema
|
|
1562
|
+
|
|
1563
|
+
```ts
|
|
1564
|
+
const appTestCopySchema: ZodObject<
|
|
1565
|
+
{
|
|
1566
|
+
selection: ZodPipe<
|
|
1567
|
+
ZodUnknown,
|
|
1568
|
+
ZodTransform<
|
|
1569
|
+
{
|
|
1570
|
+
instanceId: InstanceId;
|
|
1571
|
+
owner: {
|
|
1572
|
+
kind: "installation" | "deployment";
|
|
1573
|
+
id: string;
|
|
1574
|
+
};
|
|
1575
|
+
appId: AppId;
|
|
1576
|
+
releaseId: ReleaseId;
|
|
1577
|
+
authorityVersion: number;
|
|
1578
|
+
},
|
|
1579
|
+
unknown
|
|
1580
|
+
>
|
|
1581
|
+
>;
|
|
1582
|
+
storeGeneration: ZodString;
|
|
1583
|
+
copyId: ZodString;
|
|
1584
|
+
expiresAt: ZodNumber;
|
|
1585
|
+
},
|
|
1586
|
+
$strict
|
|
1587
|
+
>;
|
|
1588
|
+
```
|
|
1589
|
+
|
|
1590
|
+
Host-owned identity and fixed deadline of one disposable App-data sibling.
|
|
1591
|
+
|
|
1592
|
+
---
|
|
1593
|
+
|
|
1385
1594
|
### capabilityMethodKindSchema
|
|
1386
1595
|
|
|
1387
1596
|
```ts
|
package/docs/api/page/mount.md
CHANGED
|
@@ -92,6 +92,16 @@ Admit the selected Agent through the reporting App's existing write door.
|
|
|
92
92
|
|
|
93
93
|
## Type Aliases
|
|
94
94
|
|
|
95
|
+
### OysterAppConfig
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
type OysterAppConfig = typeof oysterAppConfigSchema.Type;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Host-authored configuration for the ordinary sandboxed App mount.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
95
105
|
### OysterAppOpenRouting
|
|
96
106
|
|
|
97
107
|
```ts
|
|
@@ -108,16 +118,6 @@ surface.
|
|
|
108
118
|
|
|
109
119
|
---
|
|
110
120
|
|
|
111
|
-
### OysterAppConfig
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
type OysterAppConfig = typeof oysterAppConfigSchema.Type;
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
The host-admitted App configuration served by Oyster.
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
121
|
### OysterAppConnectionOptions
|
|
122
122
|
|
|
123
123
|
```ts
|
|
@@ -152,74 +152,6 @@ const appSandbox: "allow-scripts allow-modals allow-popups allow-forms" =
|
|
|
152
152
|
|
|
153
153
|
The sandbox every installed App frame runs in, shell-mounted or not.
|
|
154
154
|
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
### oysterAppConfigSchema
|
|
158
|
-
|
|
159
|
-
```ts
|
|
160
|
-
const oysterAppConfigSchema: Struct<{
|
|
161
|
-
workbench: Boolean;
|
|
162
|
-
shellModuleUrl: NullOr<String>;
|
|
163
|
-
storage: Boolean;
|
|
164
|
-
appsOpen: Boolean;
|
|
165
|
-
computerId: NullOr<String>;
|
|
166
|
-
authorityVersion: Int;
|
|
167
|
-
commands: $Array<Codec<Readonly<{
|
|
168
|
-
id: string;
|
|
169
|
-
title: string;
|
|
170
|
-
category: string;
|
|
171
|
-
description?: string;
|
|
172
|
-
sigil?: string;
|
|
173
|
-
projections?: Readonly<{
|
|
174
|
-
bindings?: ... & ...;
|
|
175
|
-
agent?: ... & ...;
|
|
176
|
-
help?: Readonly<...>;
|
|
177
|
-
menu?: Readonly<...>;
|
|
178
|
-
palette?: Readonly<...>;
|
|
179
|
-
slash?: ... & ...;
|
|
180
|
-
}>;
|
|
181
|
-
}>, Readonly<{
|
|
182
|
-
id: string;
|
|
183
|
-
title: string;
|
|
184
|
-
category: string;
|
|
185
|
-
description?: string;
|
|
186
|
-
sigil?: string;
|
|
187
|
-
projections?: Readonly<{
|
|
188
|
-
bindings?: ... & ...;
|
|
189
|
-
agent?: ... & ...;
|
|
190
|
-
help?: Readonly<...>;
|
|
191
|
-
menu?: Readonly<...>;
|
|
192
|
-
palette?: Readonly<...>;
|
|
193
|
-
slash?: ... & ...;
|
|
194
|
-
}>;
|
|
195
|
-
}>, never, never>>;
|
|
196
|
-
icon: NullOr<String>;
|
|
197
|
-
roles: $Array<String>;
|
|
198
|
-
installationId: String;
|
|
199
|
-
appId: String;
|
|
200
|
-
releaseId: String;
|
|
201
|
-
uiUrl: String;
|
|
202
|
-
backendUrl: String;
|
|
203
|
-
methodsUrl: String;
|
|
204
|
-
capabilities: $Array<Struct<{
|
|
205
|
-
id: String;
|
|
206
|
-
version: Number;
|
|
207
|
-
base: String;
|
|
208
|
-
methods: $Record<String, Union<readonly [Struct<{
|
|
209
|
-
kind: Literal<...>;
|
|
210
|
-
method: Literals<...>;
|
|
211
|
-
path: String;
|
|
212
|
-
}>, Struct<{
|
|
213
|
-
kind: Literals<...>;
|
|
214
|
-
method: Literals<...>;
|
|
215
|
-
path: String;
|
|
216
|
-
}>]>>;
|
|
217
|
-
}>>;
|
|
218
|
-
}>;
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Current server-admitted configuration for one installed App page.
|
|
222
|
-
|
|
223
155
|
## Functions
|
|
224
156
|
|
|
225
157
|
### readOysterPageConfig()
|