@fungi.computer/oyster 0.9.0 → 0.11.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 +46 -2
- package/dist/agents.d.ts +82 -23
- package/dist/agents.js +187 -40
- package/dist/authorization.d.ts +25 -3
- package/dist/authorization.js +47 -14
- package/dist/browser/capability-source.d.ts +23 -5
- package/dist/browser/capability-source.js +19 -22
- package/dist/browser/index.d.ts +2 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/live-view.d.ts +38 -0
- package/dist/browser/live-view.js +179 -0
- package/dist/channels/binding.d.ts +2 -0
- package/dist/channels/run-decision.d.ts +33 -0
- package/dist/channels/run-decision.js +25 -0
- package/dist/channels/visitor-channel.d.ts +84 -14
- package/dist/channels/visitor-channel.js +55 -32
- package/dist/channels/visitor-edge.d.ts +18 -2
- package/dist/channels/visitor-edge.js +67 -5
- package/dist/channels/visitors.d.ts +4 -0
- package/dist/channels/visitors.js +22 -1
- package/dist/channels/web-binding.d.ts +117 -0
- package/dist/channels/web-binding.js +227 -0
- package/dist/computer-control-port.d.ts +20 -1
- package/dist/embed-metafiles.d.ts +8 -0
- package/dist/embed-metafiles.js +2 -0
- package/dist/embed-scripts.d.ts +8 -0
- package/dist/embed-scripts.js +3 -0
- package/dist/host.d.ts +3 -1
- package/dist/host.js +6 -1
- package/dist/mcp.d.ts +128 -0
- package/dist/mcp.js +63 -1
- package/dist/page/embed-challenge.d.ts +19 -0
- package/dist/page/embed-challenge.js +45 -0
- package/dist/page/embed-error.d.ts +2 -0
- package/dist/page/embed-error.js +16 -0
- package/dist/page/embed-loader-protocol.d.ts +12 -0
- package/dist/page/embed-loader-protocol.js +29 -0
- package/dist/standalone/agent-computers.d.ts +12 -1
- package/dist/standalone/agent-computers.js +35 -0
- package/dist/standalone/agent-connections.d.ts +50 -0
- package/dist/standalone/agent-connections.js +214 -0
- package/dist/standalone/agent-model-choice.d.ts +7 -3
- package/dist/standalone/agent-model-choice.js +33 -4
- package/dist/standalone/agents.d.ts +224 -9
- package/dist/standalone/agents.js +485 -115
- package/dist/standalone/browser.d.ts +16 -3
- package/dist/standalone/browser.js +54 -5
- package/dist/standalone/channel-session-door.d.ts +4 -0
- package/dist/standalone/channel-session-door.js +72 -0
- package/dist/standalone/computer-control.js +55 -1
- package/dist/standalone/computer-fleet.d.ts +21 -0
- package/dist/standalone/computer-fleet.js +30 -6
- package/dist/standalone/computer.d.ts +20 -1
- package/dist/standalone/computer.js +63 -1
- package/dist/standalone/model-key-vault.d.ts +50 -0
- package/dist/standalone/model-key-vault.js +147 -0
- package/dist/standalone/owner-routes.d.ts +4 -3
- package/dist/standalone/owner-routes.js +7 -1
- package/dist/standalone/registry.d.ts +23 -0
- package/dist/standalone/registry.js +30 -0
- package/dist/standalone/visitor-edge.d.ts +36 -0
- package/dist/standalone/visitor-edge.js +67 -0
- package/dist/standalone/visitor-proof.d.ts +23 -0
- package/dist/standalone/visitor-proof.js +67 -0
- package/dist/standalone/web.d.ts +10 -0
- package/dist/standalone/web.js +34 -0
- package/dist/standalone/website-channels.d.ts +134 -0
- package/dist/standalone/website-channels.js +262 -0
- package/dist/standalone/worker-routes.d.ts +6 -1
- package/dist/standalone/worker-routes.js +4 -0
- package/dist/standalone/worker.d.ts +2 -1
- package/dist/standalone/worker.js +13 -1
- package/dist/testing/capabilities.d.ts +3 -0
- package/dist/testing/capabilities.js +1 -0
- package/dist/testing/installation.d.ts +4 -2
- package/dist/testing/installation.js +7 -2
- package/dist/web/index.d.ts +3 -0
- package/dist/web/index.js +3 -0
- package/dist/web/search-contract.d.ts +19 -0
- package/dist/web/search-contract.js +14 -0
- package/dist/web/search.d.ts +25 -0
- package/dist/web/search.js +123 -0
- package/dist/web/source.d.ts +46 -0
- package/dist/web/source.js +335 -0
- package/dist/workers-git.js +3 -2
- package/docs/api/agents.md +184 -39
- package/docs/api/apps.md +129 -111
- package/docs/api/browser.md +115 -8
- package/docs/api/build-contract.md +27 -21
- package/docs/api/build.md +55 -54
- package/docs/api/git.md +3 -3
- package/docs/api/host.md +69 -60
- package/docs/api/mcp.md +81 -44
- package/docs/api/workers-git.md +6 -6
- package/docs/api/workers.md +53 -47
- package/package.json +52 -22
package/docs/api/browser.md
CHANGED
|
@@ -693,6 +693,21 @@ The agent-facing slice of `Browser`, possibly behind a host RPC hop.
|
|
|
693
693
|
|
|
694
694
|
---
|
|
695
695
|
|
|
696
|
+
### BrowserHandoffPorts
|
|
697
|
+
|
|
698
|
+
```ts
|
|
699
|
+
type BrowserHandoffPorts = Readonly<{
|
|
700
|
+
channel: ((sessionId, reason) => boolean) | null;
|
|
701
|
+
viewPath: (owner, leaseId) => string;
|
|
702
|
+
}>;
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
How a host hands a paused lease to a person. A channel Session (a website
|
|
706
|
+
visitor) takes the conversation handoff; every other Session gets the live view
|
|
707
|
+
and asks the person itself.
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
696
711
|
### CdpSocket
|
|
697
712
|
|
|
698
713
|
```ts
|
|
@@ -768,6 +783,55 @@ long-term.
|
|
|
768
783
|
|
|
769
784
|
---
|
|
770
785
|
|
|
786
|
+
### LiveViewDoor
|
|
787
|
+
|
|
788
|
+
```ts
|
|
789
|
+
type LiveViewDoor = (action, signal) => Promise<BinaryResult | null>;
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
One admitted viewer's door into one lease: `Browser.member` already bound to it.
|
|
793
|
+
|
|
794
|
+
#### Parameters
|
|
795
|
+
|
|
796
|
+
| Parameter | Type |
|
|
797
|
+
| --------- | --------------------------------------------- |
|
|
798
|
+
| `action` | [`BrowserMemberAction`](#browsermemberaction) |
|
|
799
|
+
| `signal` | `AbortSignal` |
|
|
800
|
+
|
|
801
|
+
#### Returns
|
|
802
|
+
|
|
803
|
+
`Promise`\<[`BinaryResult`](#binaryresult) \| `null`\>
|
|
804
|
+
|
|
805
|
+
---
|
|
806
|
+
|
|
807
|
+
### LiveViewPaths
|
|
808
|
+
|
|
809
|
+
```ts
|
|
810
|
+
type LiveViewPaths = Readonly<{
|
|
811
|
+
view: string;
|
|
812
|
+
frame: string;
|
|
813
|
+
input: string;
|
|
814
|
+
}>;
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
The three paths a host serves for one lease, relative to its own origin.
|
|
818
|
+
|
|
819
|
+
---
|
|
820
|
+
|
|
821
|
+
### LiveView
|
|
822
|
+
|
|
823
|
+
```ts
|
|
824
|
+
type LiveView = Readonly<{
|
|
825
|
+
page: () => Response;
|
|
826
|
+
frame: (signal) => Promise<Response>;
|
|
827
|
+
input: (request, signal) => Promise<Response>;
|
|
828
|
+
}>;
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
The handlers for one lease's view, frame and input routes.
|
|
832
|
+
|
|
833
|
+
---
|
|
834
|
+
|
|
771
835
|
### MarkdownInput
|
|
772
836
|
|
|
773
837
|
```ts
|
|
@@ -1118,7 +1182,7 @@ const CLOUD_BROWSER_DESCRIPTIONS: Readonly<{
|
|
|
1118
1182
|
scroll: "Scroll an open session's page by a pixel delta.";
|
|
1119
1183
|
screenshot: "Capture a PNG screenshot of an open session's page and save it to a Computer path; returns the saved byte count, never the bytes.";
|
|
1120
1184
|
pdf: "Render an open session's page to PDF and save it to a Computer path; returns the saved byte count, never the bytes.";
|
|
1121
|
-
handoff: "
|
|
1185
|
+
handoff: "Pause an open session so the person can take over for a login or captcha. In a channel conversation the owner is notified and takes over. Otherwise the result is {paused: true, view}: ask the person with the question tool, include the view link, and wait for their answer. They press Done in the view to resume; drive again only after that.";
|
|
1122
1186
|
close: "End a driven session and release its lease.";
|
|
1123
1187
|
}>;
|
|
1124
1188
|
```
|
|
@@ -1367,16 +1431,16 @@ function browserCapabilitySource(deps): CapabilitySource;
|
|
|
1367
1431
|
|
|
1368
1432
|
Compose the `cloudBrowser` source for one Session, on either host. `browser` is
|
|
1369
1433
|
the module's lease door (in-process, or the Hub's egress RPC); `saveFile` is the
|
|
1370
|
-
host's Computer bytes writer and `
|
|
1371
|
-
|
|
1372
|
-
needs a Session identity, so a session-free host (e.g. the MCP execute
|
|
1373
|
-
gets no module at all.
|
|
1434
|
+
host's Computer bytes writer and `handoff` its "needs you" ports. A host without
|
|
1435
|
+
a Computer passes `null` for `saveFile` and that operation is not offered. A
|
|
1436
|
+
lease needs a Session identity, so a session-free host (e.g. the MCP execute
|
|
1437
|
+
path) gets no module at all.
|
|
1374
1438
|
|
|
1375
1439
|
#### Parameters
|
|
1376
1440
|
|
|
1377
|
-
| Parameter | Type
|
|
1378
|
-
| --------- |
|
|
1379
|
-
| `deps` | `Readonly`\<\{ `identity`: () => \| `Readonly`\<\{ `teamId`: `string`; `agentId`: `string`; \}\> \| `null`; `browser`: [`AgentBrowserDoor`](#agentbrowserdoor); `quickReads`: `boolean`; `saveFile`: [`SaveBrowserFile`](#savebrowserfile) \| `null`; `
|
|
1441
|
+
| Parameter | Type |
|
|
1442
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1443
|
+
| `deps` | `Readonly`\<\{ `identity`: () => \| `Readonly`\<\{ `teamId`: `string`; `agentId`: `string`; \}\> \| `null`; `browser`: [`AgentBrowserDoor`](#agentbrowserdoor); `quickReads`: `boolean`; `saveFile`: [`SaveBrowserFile`](#savebrowserfile) \| `null`; `handoff`: [`BrowserHandoffPorts`](#browserhandoffports); \}\> |
|
|
1380
1444
|
|
|
1381
1445
|
#### Returns
|
|
1382
1446
|
|
|
@@ -1384,6 +1448,49 @@ gets no module at all.
|
|
|
1384
1448
|
|
|
1385
1449
|
---
|
|
1386
1450
|
|
|
1451
|
+
### liveViewPaths()
|
|
1452
|
+
|
|
1453
|
+
```ts
|
|
1454
|
+
function liveViewPaths(base): LiveViewPaths;
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
The host-relative paths for a lease whose live view is served under `base`.
|
|
1458
|
+
|
|
1459
|
+
#### Parameters
|
|
1460
|
+
|
|
1461
|
+
| Parameter | Type |
|
|
1462
|
+
| --------- | -------- |
|
|
1463
|
+
| `base` | `string` |
|
|
1464
|
+
|
|
1465
|
+
#### Returns
|
|
1466
|
+
|
|
1467
|
+
[`LiveViewPaths`](#liveviewpaths)
|
|
1468
|
+
|
|
1469
|
+
---
|
|
1470
|
+
|
|
1471
|
+
### liveView()
|
|
1472
|
+
|
|
1473
|
+
```ts
|
|
1474
|
+
function liveView(door, paths, report): LiveView;
|
|
1475
|
+
```
|
|
1476
|
+
|
|
1477
|
+
Build the handlers for one admitted viewer and lease. `report` receives a
|
|
1478
|
+
request body that did not decode, so the host can log it with its own sink.
|
|
1479
|
+
|
|
1480
|
+
#### Parameters
|
|
1481
|
+
|
|
1482
|
+
| Parameter | Type |
|
|
1483
|
+
| --------- | --------------------------------- |
|
|
1484
|
+
| `door` | [`LiveViewDoor`](#liveviewdoor) |
|
|
1485
|
+
| `paths` | [`LiveViewPaths`](#liveviewpaths) |
|
|
1486
|
+
| `report` | (`event`, `cause`) => `void` |
|
|
1487
|
+
|
|
1488
|
+
#### Returns
|
|
1489
|
+
|
|
1490
|
+
[`LiveView`](#liveview)
|
|
1491
|
+
|
|
1492
|
+
---
|
|
1493
|
+
|
|
1387
1494
|
### browserRunQuickReads()
|
|
1388
1495
|
|
|
1389
1496
|
```ts
|