@fungi.computer/oyster 0.13.1 → 0.14.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 +30 -15
- package/dist/agents.js +2 -1
- package/dist/approval-home.js +4 -2
- package/dist/boot-host-script.js +1 -1
- package/dist/browser/cdp-client.d.ts +1 -1
- package/dist/browser/cdp-client.js +73 -37
- package/dist/browser/errors.d.ts +2 -0
- package/dist/browser/lease-registry.d.ts +5 -1
- package/dist/browser/lease-registry.js +2 -6
- package/dist/build/candidate-cli.mjs +10 -104
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +1 -1
- package/dist/git-journal.js +12 -9
- package/dist/hello-app-script.js +1 -1
- package/dist/host.js +16 -1
- package/dist/installation-operations.js +1 -1
- package/dist/machine-link/host.js +18 -13
- package/dist/page-script.js +2 -2
- package/dist/standalone/agent-mail.d.ts +38 -11
- package/dist/standalone/agent-mail.js +8 -22
- package/dist/standalone/agents.d.ts +1 -0
- package/dist/standalone/agents.js +30 -5
- package/dist/standalone/try-cli.js +101 -14
- package/docs/api/browser.md +24 -7
- package/docs/api/workers-git.md +2 -2
- package/docs/api/workers.md +2 -2
- package/docs/site/agent-quickstart.mdx +109 -354
- package/examples/standalone/wrangler.jsonc +1 -1
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -940,21 +940,36 @@ unpinned Agent refuses. A stale revision returns 409, an unknown Agent returns
|
|
|
940
940
|
|
|
941
941
|
### Connect an Agent to a remote MCP server
|
|
942
942
|
|
|
943
|
-
|
|
944
|
-
codemode
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
`GET /api/
|
|
950
|
-
|
|
951
|
-
`
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
943
|
+
Connect a Streamable HTTP MCP server once, then choose which Agents can use it.
|
|
944
|
+
Each Agent's codemode sees its granted tools as `env.mcp.<name>.<tool>()`,
|
|
945
|
+
beside the installed Apps. Oyster keeps credentials sealed on the owner side.
|
|
946
|
+
Agents receive access without receiving tokens, and the API never returns stored
|
|
947
|
+
secrets.
|
|
948
|
+
|
|
949
|
+
`GET /api/connections` returns the shared connections, their Agent grants, the
|
|
950
|
+
available Agents and the OAuth `callbackUrl`. Create a connection with
|
|
951
|
+
`POST /api/connections` and
|
|
952
|
+
`{"name":"linear","url":"https://mcp.example.com/mcp","bearer":null}`. The name
|
|
953
|
+
starts with a lowercase letter and contains up to 32 lowercase letters, digits
|
|
954
|
+
or `_`. The endpoint must be `https:` with no credentials or fragment.
|
|
955
|
+
|
|
956
|
+
Use `bearer:null` for an unauthenticated server, or set `bearer` to its static
|
|
957
|
+
token. For OAuth, keep `bearer:null` and add `oauth:{}`. You can provide
|
|
958
|
+
`clientId`, `clientSecret` and `scope` inside `oauth` when needed. Without a
|
|
959
|
+
client ID, Oyster uses the server's dynamic client registration. The response
|
|
960
|
+
contains `connectionId` and `authorizeUrl`. For OAuth, open `authorizeUrl` in
|
|
961
|
+
your signed-in owner browser to finish connecting. If you register your own
|
|
962
|
+
OAuth client, use the `callbackUrl` returned by `GET /api/connections`.
|
|
963
|
+
|
|
964
|
+
A new connection grants no Agent access. Send
|
|
965
|
+
`PUT /api/connections/:connectionId/agents/:agentId` with `{"access":"read"}`,
|
|
966
|
+
`{"access":"all"}` or `{"access":["tool_name"]}` to grant or change access.
|
|
967
|
+
`GET /api/connections/:connectionId/tools` lists the available tool names.
|
|
968
|
+
`DELETE` on the Agent grant path removes only that Agent's access.
|
|
969
|
+
`DELETE /api/connections/:connectionId` revokes the shared connection for every
|
|
970
|
+
Agent. A repeated connection name or a grant beyond 16 connections per Agent
|
|
971
|
+
returns 409. These routes are owner-direct and reject an App installation
|
|
972
|
+
header.
|
|
958
973
|
|
|
959
974
|
### Give an Agent a browser
|
|
960
975
|
|
package/dist/agents.js
CHANGED
|
@@ -241,7 +241,8 @@ function createAgentRoutes(agents) {
|
|
|
241
241
|
const incoming = context.req.raw;
|
|
242
242
|
const url = new URL(incoming.url);
|
|
243
243
|
const path = url.pathname.slice(`/agents/${agentId}`.length);
|
|
244
|
-
if (!(path === "/
|
|
244
|
+
if (!((path === "/models" && incoming.method === "GET") ||
|
|
245
|
+
path === "/acp" ||
|
|
245
246
|
path === "/sessions" ||
|
|
246
247
|
path.startsWith("/sessions/") ||
|
|
247
248
|
path.startsWith("/browser/")))
|
package/dist/approval-home.js
CHANGED
|
@@ -31,8 +31,10 @@ export class OysterApprovalHome {
|
|
|
31
31
|
this.host = host;
|
|
32
32
|
host.owner.sql.exec("CREATE TABLE IF NOT EXISTS oyster_approval_targets (record_id TEXT PRIMARY KEY, target_json TEXT NOT NULL) STRICT");
|
|
33
33
|
this.ledger = this.createLedger();
|
|
34
|
-
// A new native home represents boot,
|
|
35
|
-
this.ledger.recoverClaims()
|
|
34
|
+
// A new native home represents boot, before any live call can claim work.
|
|
35
|
+
while (this.ledger.recoverClaims().length > 0) {
|
|
36
|
+
// Each bounded batch settles part of the finite orphan set.
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
createLedger(persistIntent) {
|
|
38
40
|
const home = { kind: "oyster", id: this.host.scope.tenantId };
|