sealbridge 0.2.2 → 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.ja.md +492 -30
- package/README.md +522 -109
- package/dist/cli/dist/accept.d.ts +13 -0
- package/dist/cli/dist/accept.js +115 -0
- package/dist/cli/dist/accept.js.map +1 -0
- package/dist/cli/dist/approval-summary.d.ts +1 -1
- package/dist/cli/dist/board.d.ts +10 -9
- package/dist/cli/dist/board.js +62 -31
- package/dist/cli/dist/board.js.map +1 -1
- package/dist/cli/dist/command-identity.d.ts +6 -0
- package/dist/cli/dist/command-identity.js +13 -0
- package/dist/cli/dist/command-identity.js.map +1 -0
- package/dist/cli/dist/config.d.ts +3 -0
- package/dist/cli/dist/config.js +29 -0
- package/dist/cli/dist/config.js.map +1 -0
- package/dist/cli/dist/connections.d.ts +15 -0
- package/dist/cli/dist/connections.js +191 -0
- package/dist/cli/dist/connections.js.map +1 -0
- package/dist/cli/dist/contacts.d.ts +4 -3
- package/dist/cli/dist/contacts.js +39 -28
- package/dist/cli/dist/contacts.js.map +1 -1
- package/dist/cli/dist/doctor.d.ts +9 -0
- package/dist/cli/dist/doctor.js +46 -5
- package/dist/cli/dist/doctor.js.map +1 -1
- package/dist/cli/dist/error-messages.js +22 -0
- package/dist/cli/dist/error-messages.js.map +1 -1
- package/dist/cli/dist/index.js +44 -6
- package/dist/cli/dist/index.js.map +1 -1
- package/dist/cli/dist/invite-output.d.ts +14 -0
- package/dist/cli/dist/invite-output.js +66 -0
- package/dist/cli/dist/invite-output.js.map +1 -0
- package/dist/cli/dist/invite-share.d.ts +6 -3
- package/dist/cli/dist/invite-share.js +40 -15
- package/dist/cli/dist/invite-share.js.map +1 -1
- package/dist/cli/dist/invites-migrate.d.ts +3 -0
- package/dist/cli/dist/invites-migrate.js +33 -0
- package/dist/cli/dist/invites-migrate.js.map +1 -0
- package/dist/cli/dist/mcp.d.ts +7 -5
- package/dist/cli/dist/mcp.js +23 -18
- package/dist/cli/dist/mcp.js.map +1 -1
- package/dist/cli/dist/network.d.ts +11 -1
- package/dist/cli/dist/network.js +150 -87
- package/dist/cli/dist/network.js.map +1 -1
- package/dist/cli/dist/pending.d.ts +8 -0
- package/dist/cli/dist/pending.js +50 -0
- package/dist/cli/dist/pending.js.map +1 -0
- package/dist/cli/dist/public-settings.d.ts +5 -4
- package/dist/cli/dist/public-settings.js +13 -15
- package/dist/cli/dist/public-settings.js.map +1 -1
- package/dist/cli/dist/receipt.d.ts +1 -1
- package/dist/cli/dist/relay-auth.d.ts +3 -0
- package/dist/cli/dist/relay-auth.js +23 -0
- package/dist/cli/dist/relay-auth.js.map +1 -0
- package/dist/cli/dist/requests.d.ts +10 -0
- package/dist/cli/dist/requests.js +91 -0
- package/dist/cli/dist/requests.js.map +1 -0
- package/dist/cli/dist/sdk.d.ts +10 -0
- package/dist/cli/dist/sdk.js +7 -0
- package/dist/cli/dist/sdk.js.map +1 -0
- package/dist/cli/dist/setup-files.d.ts +24 -0
- package/dist/cli/dist/setup-files.js +190 -0
- package/dist/cli/dist/setup-files.js.map +1 -0
- package/dist/cli/dist/setup-hosts.d.ts +29 -0
- package/dist/cli/dist/setup-hosts.js +75 -0
- package/dist/cli/dist/setup-hosts.js.map +1 -0
- package/dist/cli/dist/setup.d.ts +61 -0
- package/dist/cli/dist/setup.js +243 -0
- package/dist/cli/dist/setup.js.map +1 -0
- package/dist/cli/dist/task-input.d.ts +1 -1
- package/dist/cli/dist/wake-hook.d.ts +1 -1
- package/dist/cli/dist/worker-json.d.ts +4 -0
- package/dist/cli/dist/worker-json.js +87 -0
- package/dist/cli/dist/worker-json.js.map +1 -0
- package/dist/examples/two-owner-demo/dist/run-demo.d.ts +13 -13
- package/dist/package.json +1 -1
- package/dist/packages/adapters/dist/command.d.ts +2 -2
- package/dist/packages/adapters/dist/credential-proxy.d.ts +2 -2
- package/dist/packages/adapters/dist/index.d.ts +1 -1
- package/dist/packages/adapters/dist/mcp.d.ts +2 -2
- package/dist/packages/adapters/dist/openai.d.ts +2 -2
- package/dist/packages/adapters/dist/sandbox.d.ts +2 -2
- package/dist/packages/core/dist/connection.d.ts +58 -0
- package/dist/packages/core/dist/connection.js +132 -0
- package/dist/packages/core/dist/connection.js.map +1 -0
- package/dist/packages/core/dist/delivery-status.d.ts +22 -0
- package/dist/packages/core/dist/delivery-status.js +53 -0
- package/dist/packages/core/dist/delivery-status.js.map +1 -0
- package/dist/packages/core/dist/discovery.d.ts +7 -6
- package/dist/packages/core/dist/discovery.js +19 -20
- package/dist/packages/core/dist/discovery.js.map +1 -1
- package/dist/packages/core/dist/edge.d.ts +1 -0
- package/dist/packages/core/dist/edge.js +1 -0
- package/dist/packages/core/dist/edge.js.map +1 -1
- package/dist/packages/core/dist/index.d.ts +3 -0
- package/dist/packages/core/dist/index.js +3 -0
- package/dist/packages/core/dist/index.js.map +1 -1
- package/dist/packages/core/dist/protocol.d.ts +24 -0
- package/dist/packages/core/dist/protocol.js +54 -0
- package/dist/packages/core/dist/protocol.js.map +1 -0
- package/dist/packages/core/dist/receipts.d.ts +1 -0
- package/dist/packages/core/dist/receipts.js +1 -1
- package/dist/packages/core/dist/receipts.js.map +1 -1
- package/dist/packages/core/dist/schema.d.ts +1 -0
- package/dist/packages/core/dist/schema.js +13 -2
- package/dist/packages/core/dist/schema.js.map +1 -1
- package/dist/packages/ledger/dist/index.d.ts +1 -1
- package/dist/packages/relay/dist/admission.d.ts +14 -0
- package/dist/packages/relay/dist/admission.js +70 -0
- package/dist/packages/relay/dist/admission.js.map +1 -0
- package/dist/packages/relay/dist/fetch.d.ts +8 -2
- package/dist/packages/relay/dist/fetch.js +41 -12
- package/dist/packages/relay/dist/fetch.js.map +1 -1
- package/dist/packages/relay/dist/index.d.ts +23 -12
- package/dist/packages/relay/dist/index.js +130 -78
- package/dist/packages/relay/dist/index.js.map +1 -1
- package/dist/packages/relay/dist/journal.d.ts +1 -1
- package/dist/packages/relay/dist/notifications.d.ts +1 -1
- package/dist/packages/relay/dist/retry.d.ts +23 -0
- package/dist/packages/relay/dist/retry.js +43 -1
- package/dist/packages/relay/dist/retry.js.map +1 -1
- package/dist/packages/relay/dist/ssrf.d.ts +3 -2
- package/dist/packages/relay/dist/ssrf.js.map +1 -1
- package/dist/packages/relay/dist/worker.js +1 -1
- package/dist/packages/relay/dist/worker.js.map +1 -1
- package/dist/packages/runtime/dist/a2a.d.ts +1 -1
- package/dist/packages/runtime/dist/a2a.js +1 -1
- package/dist/packages/runtime/dist/adapter.d.ts +2 -2
- package/dist/packages/runtime/dist/application-config.d.ts +20 -0
- package/dist/packages/runtime/dist/application-config.js +222 -0
- package/dist/packages/runtime/dist/application-config.js.map +1 -0
- package/dist/packages/runtime/dist/approval-providers.d.ts +24 -3
- package/dist/packages/runtime/dist/approval-providers.js +79 -3
- package/dist/packages/runtime/dist/approval-providers.js.map +1 -1
- package/dist/packages/runtime/dist/connection-admission-review.d.ts +39 -0
- package/dist/packages/runtime/dist/connection-admission-review.js +86 -0
- package/dist/packages/runtime/dist/connection-admission-review.js.map +1 -0
- package/dist/packages/runtime/dist/connection-persistence.d.ts +35 -0
- package/dist/packages/runtime/dist/connection-persistence.js +181 -0
- package/dist/packages/runtime/dist/connection-persistence.js.map +1 -0
- package/dist/packages/runtime/dist/connection-records.d.ts +167 -0
- package/dist/packages/runtime/dist/connection-records.js +132 -0
- package/dist/packages/runtime/dist/connection-records.js.map +1 -0
- package/dist/packages/runtime/dist/connection-router.d.ts +45 -0
- package/dist/packages/runtime/dist/connection-router.js +130 -0
- package/dist/packages/runtime/dist/connection-router.js.map +1 -0
- package/dist/packages/runtime/dist/connection-service.d.ts +159 -0
- package/dist/packages/runtime/dist/connection-service.js +239 -0
- package/dist/packages/runtime/dist/connection-service.js.map +1 -0
- package/dist/packages/runtime/dist/connection-transport.d.ts +14 -0
- package/dist/packages/runtime/dist/connection-transport.js +89 -0
- package/dist/packages/runtime/dist/connection-transport.js.map +1 -0
- package/dist/packages/runtime/dist/delivery-records.d.ts +180 -0
- package/dist/packages/runtime/dist/delivery-records.js +205 -0
- package/dist/packages/runtime/dist/delivery-records.js.map +1 -0
- package/dist/packages/runtime/dist/delivery-status-router.d.ts +27 -0
- package/dist/packages/runtime/dist/delivery-status-router.js +150 -0
- package/dist/packages/runtime/dist/delivery-status-router.js.map +1 -0
- package/dist/packages/runtime/dist/delivery-status.d.ts +43 -0
- package/dist/packages/runtime/dist/delivery-status.js +193 -0
- package/dist/packages/runtime/dist/delivery-status.js.map +1 -0
- package/dist/packages/runtime/dist/delivery-store.d.ts +125 -0
- package/dist/packages/runtime/dist/delivery-store.js +1047 -0
- package/dist/packages/runtime/dist/delivery-store.js.map +1 -0
- package/dist/packages/runtime/dist/gateway.d.ts +4 -3
- package/dist/packages/runtime/dist/gateway.js.map +1 -1
- package/dist/packages/runtime/dist/held-request-review.d.ts +49 -0
- package/dist/packages/runtime/dist/held-request-review.js +122 -0
- package/dist/packages/runtime/dist/held-request-review.js.map +1 -0
- package/dist/packages/runtime/dist/held-request-store.d.ts +112 -0
- package/dist/packages/runtime/dist/held-request-store.js +290 -0
- package/dist/packages/runtime/dist/held-request-store.js.map +1 -0
- package/dist/packages/runtime/dist/idempotency-store.d.ts +53 -0
- package/dist/packages/runtime/dist/idempotency-store.js +331 -0
- package/dist/packages/runtime/dist/idempotency-store.js.map +1 -0
- package/dist/packages/runtime/dist/inbox.d.ts +1 -1
- package/dist/packages/runtime/dist/index.d.ts +27 -1
- package/dist/packages/runtime/dist/index.js +26 -0
- package/dist/packages/runtime/dist/index.js.map +1 -1
- package/dist/packages/runtime/dist/invite-store.d.ts +76 -0
- package/dist/packages/runtime/dist/invite-store.js +337 -0
- package/dist/packages/runtime/dist/invite-store.js.map +1 -0
- package/dist/packages/runtime/dist/key-store.d.ts +77 -0
- package/dist/packages/runtime/dist/key-store.js +226 -0
- package/dist/packages/runtime/dist/key-store.js.map +1 -0
- package/dist/packages/runtime/dist/local-identity.d.ts +33 -0
- package/dist/packages/runtime/dist/local-identity.js +278 -0
- package/dist/packages/runtime/dist/local-identity.js.map +1 -0
- package/dist/packages/runtime/dist/mcp-rpc.d.ts +19 -0
- package/dist/packages/runtime/dist/mcp-rpc.js +175 -0
- package/dist/packages/runtime/dist/mcp-rpc.js.map +1 -0
- package/dist/packages/runtime/dist/mcp-server.d.ts +46 -19
- package/dist/packages/runtime/dist/mcp-server.js +427 -184
- package/dist/packages/runtime/dist/mcp-server.js.map +1 -1
- package/dist/packages/runtime/dist/mcp-tool-catalog.d.ts +1 -1
- package/dist/packages/runtime/dist/mcp-tool-catalog.js +172 -13
- package/dist/packages/runtime/dist/mcp-tool-catalog.js.map +1 -1
- package/dist/packages/runtime/dist/mcp.d.ts +2 -2
- package/dist/packages/runtime/dist/message-status.d.ts +32 -0
- package/dist/packages/runtime/dist/message-status.js +29 -0
- package/dist/packages/runtime/dist/message-status.js.map +1 -0
- package/dist/packages/runtime/dist/outbox.d.ts +91 -0
- package/dist/packages/runtime/dist/outbox.js +462 -0
- package/dist/packages/runtime/dist/outbox.js.map +1 -0
- package/dist/packages/runtime/dist/policy.d.ts +1 -1
- package/dist/packages/runtime/dist/protocol-peer-store.d.ts +40 -0
- package/dist/packages/runtime/dist/protocol-peer-store.js +176 -0
- package/dist/packages/runtime/dist/protocol-peer-store.js.map +1 -0
- package/dist/packages/runtime/dist/protocol-release.d.ts +26 -0
- package/dist/packages/runtime/dist/protocol-release.js +76 -0
- package/dist/packages/runtime/dist/protocol-release.js.map +1 -0
- package/dist/packages/runtime/dist/quota.d.ts +1 -1
- package/dist/packages/runtime/dist/relay-selection.d.ts +20 -0
- package/dist/packages/runtime/dist/relay-selection.js +34 -0
- package/dist/packages/runtime/dist/relay-selection.js.map +1 -0
- package/dist/packages/runtime/dist/requester-pending-store.d.ts +59 -0
- package/dist/packages/runtime/dist/requester-pending-store.js +266 -0
- package/dist/packages/runtime/dist/requester-pending-store.js.map +1 -0
- package/dist/packages/runtime/dist/secret-store.d.ts +19 -0
- package/dist/packages/runtime/dist/secret-store.js +51 -0
- package/dist/packages/runtime/dist/secret-store.js.map +1 -0
- package/dist/packages/runtime/dist/session-audit.d.ts +29 -7
- package/dist/packages/runtime/dist/session-audit.js +149 -29
- package/dist/packages/runtime/dist/session-audit.js.map +1 -1
- package/dist/packages/runtime/dist/session.d.ts +101 -9
- package/dist/packages/runtime/dist/session.js +696 -96
- package/dist/packages/runtime/dist/session.js.map +1 -1
- package/dist/packages/runtime/dist/task-journal.d.ts +18 -3
- package/dist/packages/runtime/dist/task-journal.js +271 -18
- package/dist/packages/runtime/dist/task-journal.js.map +1 -1
- package/dist/packages/runtime/dist/verifier.d.ts +3 -2
- package/dist/packages/runtime/dist/verifier.js +1 -0
- package/dist/packages/runtime/dist/verifier.js.map +1 -1
- package/dist/packages/runtime/dist/worker-trust-store.d.ts +111 -0
- package/dist/packages/runtime/dist/worker-trust-store.js +592 -0
- package/dist/packages/runtime/dist/worker-trust-store.js.map +1 -0
- package/dist/packages/sandbox/dist/container.d.ts +1 -1
- package/dist/packages/sandbox/dist/index.d.ts +1 -1
- package/dist/spec/README.ja.md +21 -1
- package/dist/spec/README.md +20 -1
- package/dist/spec/agent-card.schema.json +11 -1
- package/dist/spec/delivery-status.schema.json +106 -0
- package/dist/spec/examples/protocol-versions/sample-agent-card.json +35 -0
- package/dist/spec/examples/sample-delivery-status.json +21 -0
- package/dist/spec/examples/sample-task-manifest.0.1.0.json +173 -0
- package/dist/spec/examples/sample-task-manifest.0.2.0.json +173 -0
- package/dist/spec/task-manifest.0.1.0.schema.json +422 -0
- package/dist/spec/task-manifest.0.2.0.schema.json +422 -0
- package/dist/spec/task-manifest.schema.json +9 -418
- package/docs/sdk.ja.md +133 -0
- package/docs/sdk.md +138 -0
- package/package.json +15 -3
package/docs/sdk.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Embedding SDK
|
|
2
|
+
|
|
3
|
+
[日本語](sdk.ja.md)
|
|
4
|
+
|
|
5
|
+
`sealbridge/sdk` is the supported ESM entry point for embedding existing Sealbridge
|
|
6
|
+
APIs. It is available in the next package release after 0.2.2. Use Node.js 22 or
|
|
7
|
+
later and TypeScript `NodeNext` (or another resolver that supports package export
|
|
8
|
+
maps). The package includes JavaScript and declarations; workspace packages are
|
|
9
|
+
not required in the consuming application.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { InviteStore, resolveStoredIdentity } from 'sealbridge/sdk';
|
|
13
|
+
import type { InviteStoreOptions, SavedInvite } from 'sealbridge/sdk';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Contract and compatibility
|
|
17
|
+
|
|
18
|
+
The explicit exports below and their declared public signatures are the supported
|
|
19
|
+
SDK contract. Additions can appear in compatible releases. During 0.x, breaking
|
|
20
|
+
SDK changes require a minor release and release notes; patch releases preserve
|
|
21
|
+
compatibility. Imports under `sealbridge/dist/...` remain resolvable for existing
|
|
22
|
+
consumers, but the internal layout is outside this contract. Migrate those imports
|
|
23
|
+
to `sealbridge/sdk`. There is no CommonJS entry point.
|
|
24
|
+
|
|
25
|
+
Importing the SDK does not create identities, read invitations, start a listener,
|
|
26
|
+
or contact a relay. Operations retain their existing behavior, storage formats,
|
|
27
|
+
approval requirements and defaults. No relay deployment is required.
|
|
28
|
+
|
|
29
|
+
## Exported surface
|
|
30
|
+
|
|
31
|
+
All values are direct re-exports of existing implementations, without wrappers.
|
|
32
|
+
|
|
33
|
+
| Area | Values |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| Saved invitations | `InviteStore` |
|
|
36
|
+
| Invitation strings | `KeychainSecretStore`, `openKeychainSecretStore` |
|
|
37
|
+
| Identity selection | `FileKeyStore`, `KeychainKeyStore`, `inspectStoredIdentity`, `resolveStoredIdentity`, `selectKeyStore`, `keyStoreSelection`, `keychainService`, `resolveDataRoot` |
|
|
38
|
+
| Application config | `readApplicationConfig`, `setApplicationKeyStore` |
|
|
39
|
+
| Connection metadata | `WorkerTrustStore` (including `listConnections`), `workerIntakePath` |
|
|
40
|
+
| Connection exchange | `ConnectionService`, `ConnectionRouter`, `StoredConnectionExchange`, `syncConnections` |
|
|
41
|
+
| Owner confirmation command | `connectionsCommand`, `connectionHumanReview` |
|
|
42
|
+
| Held review | `ConnectionAdmissionReview`, `HeldRequestReview`, `unavailableHeldContentReviewProvider` |
|
|
43
|
+
| Discovery and invitations | `createSignedAgentCard`, `verifySignedAgentCard`, `createInviteToken`, `inviteTokenFromUri`, `isInviteTarget`, `parseAndVerifyInviteToken`, `discoverAgentCards`, `findDiscoveredAgentCard` |
|
|
44
|
+
| Key creation | `generateKeyPair` |
|
|
45
|
+
| MCP hosting | `AcpMcpServer`, `mcpServerCommand`, `parseMcpServerArgs`, `mcpServerOptionsFromArgs` |
|
|
46
|
+
|
|
47
|
+
Named type exports:
|
|
48
|
+
|
|
49
|
+
- Invitations: `SavedInvite`, `InviteStoreOptions`, `SecretStore`.
|
|
50
|
+
- Identity/config: `DataRootOptions`, `LocalIdentityOptions`, `IdentityRole`,
|
|
51
|
+
`IdentityStoreOptions`, `StoredIdentity`, `KeyStore`, `KeyStoreDescription`,
|
|
52
|
+
`KeyStoreSelection`, `KeyringEntry`, `KeyringModule`, `ApplicationConfig`,
|
|
53
|
+
`ApplicationConfigOptions`, `RelaySelectionOptions`.
|
|
54
|
+
- Connections: `ConnectionState`, `ConnectionTrust`, `ConnectionRecord`,
|
|
55
|
+
`ConnectionSummary`, `PriorApprovedPeer`, `ConnectionServiceOptions`,
|
|
56
|
+
`ConnectionServiceResult`, `ConnectionHumanReviewProvider`,
|
|
57
|
+
`ConnectionInspectionPort`, `ConnectionPersistencePort`, `ConnectionOffer`,
|
|
58
|
+
`ConnectionConsent`, `ConnectionOutboxEntry`, `ConnectionAcceptanceCommit`,
|
|
59
|
+
`ConnectionRedemptionCommit`, `ConnectionTransport`, `ConnectionFrame`,
|
|
60
|
+
`ConnectionRouterOptions`, `ConnectedEvent`, `ConnectionsCommandOptions`.
|
|
61
|
+
- Review: `HeldRequestReviewOptions`, `HeldContentReviewProvider`,
|
|
62
|
+
`HeldInspectionContext`, `InspectionCompletion`, `ConnectionAdmissionReviewOptions`,
|
|
63
|
+
`InboundConnectionSummary`.
|
|
64
|
+
- MCP: `AcpMcpServerOptions`, `ApprovalProvider`, `ParsedMcpServerArgs`.
|
|
65
|
+
- Core/transport: `KeyPair`, `Json`, `Signed`, `SignedEnvelope`, `Invite`,
|
|
66
|
+
`AgentSkill`, `DiscoveryAgentCard`, `CreateAgentCardOptions`, `SignedAgentCard`,
|
|
67
|
+
`RelayEndpointPolicy`, `ConnectionRequest`, `ConnectionAccepted`, `ConnectionAck`,
|
|
68
|
+
`ConnectionControl`, `RelayTransport`.
|
|
69
|
+
|
|
70
|
+
## Identity and invitation storage
|
|
71
|
+
|
|
72
|
+
Pass the same identity/data-root options to all operations that share an owner.
|
|
73
|
+
Requester and worker identities remain separate. `resolveDataRoot` only resolves a
|
|
74
|
+
path; `inspectStoredIdentity` inspects without creating an identity, while
|
|
75
|
+
`resolveStoredIdentity` can create one. `WorkerTrustStore` takes a `path` rather
|
|
76
|
+
than identity options; use `workerIntakePath(owner.did, identityOptions)`.
|
|
77
|
+
|
|
78
|
+
For OS credential storage, explicitly select `keyStore: 'keychain'` and use
|
|
79
|
+
`InviteStore.open`. The optional native backend must be available to the runtime;
|
|
80
|
+
see [key storage](../README.md). A host may inject
|
|
81
|
+
`keyStore`, `keyringLoader` or `secretStore` through the documented option types.
|
|
82
|
+
The default remains file storage, and existing inline entries do not migrate
|
|
83
|
+
automatically. `SavedInvite` contains metadata only; `resolve` returns invitation
|
|
84
|
+
material for local use and must not be logged or passed as MCP arguments. Use
|
|
85
|
+
`workerRef` or the exact alias for MCP delegation.
|
|
86
|
+
|
|
87
|
+
The following function runs inside the host's invitation input boundary. Its data
|
|
88
|
+
root is an absolute host-managed path, and its input stays in memory:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { InviteStore, resolveStoredIdentity } from 'sealbridge/sdk';
|
|
92
|
+
|
|
93
|
+
async function saveInvitation(link: string, dataRoot: string) {
|
|
94
|
+
const identityOptions = {
|
|
95
|
+
env: { ...process.env, SEALBRIDGE_DATA_DIR: dataRoot },
|
|
96
|
+
keyStore: 'keychain' as const,
|
|
97
|
+
};
|
|
98
|
+
const owner = await resolveStoredIdentity('requester', identityOptions);
|
|
99
|
+
const invites = await InviteStore.open(owner, identityOptions);
|
|
100
|
+
return invites.import(link); // SavedInvite: return only metadata to the UI.
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Owner review and connections
|
|
105
|
+
|
|
106
|
+
`connectionsCommand(['confirm-invite', workerRef], options)` exposes the existing
|
|
107
|
+
command flow. `ConnectionsCommandOptions.identityOptions` selects the local
|
|
108
|
+
identity; `review(summary)` must present the exact decision to the human owner and
|
|
109
|
+
return that decision for this operation. `output` receives JSON metadata/events.
|
|
110
|
+
`now`, `transportFactory` and `inspectionProvider` support host injection. Omitted
|
|
111
|
+
review uses the existing TTY rules; it does not imply consent.
|
|
112
|
+
|
|
113
|
+
For a custom host flow, `ConnectionService` accepts persistence, transport,
|
|
114
|
+
inspection and `ConnectionHumanReviewProvider` ports. `ConnectionRouter` and
|
|
115
|
+
`StoredConnectionExchange` connect the existing stores and held review to that
|
|
116
|
+
service. Import/preview grants no consent. Confirming an invitation records local
|
|
117
|
+
consent and sends a request; it does not establish remote completion. Read
|
|
118
|
+
`WorkerTrustStore.listConnections()` after receiving the signed exchange, or use
|
|
119
|
+
explicit `syncConnections`. Connected remains limited; each task requires
|
|
120
|
+
inspection and owner opening. The default inspection provider is unavailable.
|
|
121
|
+
See [connection exchange](connections/connection-exchange.md) and
|
|
122
|
+
[held-content review](connections/held-content.md).
|
|
123
|
+
|
|
124
|
+
`ConnectionAdmissionReview` exposes `list()`, `approve(id)` and `reject(id)` for held
|
|
125
|
+
inbound connections. Bind decisions to explicit owner actions. Its
|
|
126
|
+
`InboundConnectionSummary` includes optional `peerDisplayName` when known; display
|
|
127
|
+
names are informational data. Built-in inspection covers connection metadata only.
|
|
128
|
+
See [owner admission review](connections/admission.md#owner-admission-review).
|
|
129
|
+
|
|
130
|
+
## MCP lifecycle
|
|
131
|
+
|
|
132
|
+
In a dedicated stdio MCP process, `mcpServerCommand(args, identityOptions)` runs the
|
|
133
|
+
existing CLI lifecycle. For host-owned streams, construct `AcpMcpServer`, call
|
|
134
|
+
`startDelivery()`, await `serve(readable, writable)`, and call `stopDelivery()` in
|
|
135
|
+
`finally`. Configure `requireInteractiveApproval: true` for host form approval or
|
|
136
|
+
inject an `approvalProvider`; the unflagged policy-auto default is unchanged.
|
|
137
|
+
Approval before sending and final verification remain separate. Connection review
|
|
138
|
+
is a separate `connectionReview` option. See [MCP integration](../README.md#mcp-live-progress-revocation-and-quorum).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sealbridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"sealbridge": "tsx cli/src/index.ts",
|
|
21
21
|
"package:cli": "pnpm build && node scripts/package-cli.mjs",
|
|
22
22
|
"prepack": "pnpm run package:cli",
|
|
23
|
+
"check:protocol-release": "pnpm build && node scripts/check-protocol-release.mjs",
|
|
24
|
+
"prepublishOnly": "pnpm run check:protocol-release",
|
|
23
25
|
"publish:dry-run": "npm publish --dry-run"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
@@ -36,7 +38,8 @@
|
|
|
36
38
|
"@modelcontextprotocol/sdk": "^1.20.0",
|
|
37
39
|
"canonicalize": "^5.1.0",
|
|
38
40
|
"ws": "^8.18.3",
|
|
39
|
-
"@a2a-js/sdk": "^0.3.10"
|
|
41
|
+
"@a2a-js/sdk": "^0.3.10",
|
|
42
|
+
"jsonc-parser": "3.3.1"
|
|
40
43
|
},
|
|
41
44
|
"description": "Sealbridge: encrypted cross-owner agent collaboration",
|
|
42
45
|
"keywords": [
|
|
@@ -48,12 +51,21 @@
|
|
|
48
51
|
"sealbridge": "./dist/cli/dist/index.js",
|
|
49
52
|
"acp": "./dist/cli/dist/acp.js"
|
|
50
53
|
},
|
|
54
|
+
"exports": {
|
|
55
|
+
"./sdk": {
|
|
56
|
+
"types": "./dist/cli/dist/sdk.d.ts",
|
|
57
|
+
"import": "./dist/cli/dist/sdk.js"
|
|
58
|
+
},
|
|
59
|
+
"./*": "./*"
|
|
60
|
+
},
|
|
51
61
|
"files": [
|
|
52
62
|
"dist/",
|
|
53
63
|
"LICENSE",
|
|
54
64
|
"NOTICE",
|
|
55
65
|
"README.md",
|
|
56
|
-
"README.ja.md"
|
|
66
|
+
"README.ja.md",
|
|
67
|
+
"docs/sdk.md",
|
|
68
|
+
"docs/sdk.ja.md"
|
|
57
69
|
],
|
|
58
70
|
"publishConfig": {
|
|
59
71
|
"access": "public"
|