2026-06-08 00:21:26 +00:00
|
|
|
# @open-matrix/sdk
|
feat: initial Matrix SDK
Full SDK workspace: core, contracts, sdk, cli, browser-host, browser-kit,
federation, omega-core, oracle, self-healing, strategies, tools, emacs.
Clean extraction from the development monorepo.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:54:15 -06:00
|
|
|
|
2026-06-08 00:21:26 +00:00
|
|
|
Public Matrix actor SDK facade for package authors.
|
feat: initial Matrix SDK
Full SDK workspace: core, contracts, sdk, cli, browser-host, browser-kit,
federation, omega-core, oracle, self-healing, strategies, tools, emacs.
Clean extraction from the development monorepo.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:54:15 -06:00
|
|
|
|
|
|
|
|
Prefer narrow package imports when a package only needs one layer:
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
import { MatrixActor } from '@open-matrix/core';
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Use this umbrella package when a package intentionally needs the combined actor,
|
|
|
|
|
browser host, contracts, federation, and Omega kernel facade.
|
|
|
|
|
|
|
|
|
|
Import browser app build utilities directly from `@open-matrix/browser-kit` so
|
2026-06-08 00:21:26 +00:00
|
|
|
headless actor packages can import `@open-matrix/sdk` without loading
|
feat: initial Matrix SDK
Full SDK workspace: core, contracts, sdk, cli, browser-host, browser-kit,
federation, omega-core, oracle, self-healing, strategies, tools, emacs.
Clean extraction from the development monorepo.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:54:15 -06:00
|
|
|
browser-only custom element code.
|
2026-06-08 06:41:34 +00:00
|
|
|
|
|
|
|
|
## HiveCast-Managed Transport
|
|
|
|
|
|
|
|
|
|
For HiveCast-backed actors, use a HiveCast API key to exchange for short-lived
|
|
|
|
|
actor-scoped NATS credentials:
|
|
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
import { exchangeHiveCastActorCredential } from '@open-matrix/sdk';
|
|
|
|
|
|
|
|
|
|
const credential = await exchangeHiveCastActorCredential({
|
|
|
|
|
cloud: process.env.MATRIX_CLOUD!,
|
|
|
|
|
space: process.env.MATRIX_SPACE!,
|
|
|
|
|
apiKey: process.env.MATRIX_API_KEY!,
|
|
|
|
|
}, {
|
|
|
|
|
mount: 'fresh.server.echo',
|
2026-06-08 18:46:44 +00:00
|
|
|
accepts: { echo: { description: 'Echo a message', message: 'string' } },
|
2026-06-08 06:41:34 +00:00
|
|
|
});
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The exchange returns NATS URLs plus a JWT/seed pair for the requested mount.
|
|
|
|
|
Server actors use `NatsTransport` with `credential.transport.natsUrl`; browser
|
|
|
|
|
actors use `createBrowserNatsTransport` with
|
|
|
|
|
`credential.transport.natsWsUrl`.
|
|
|
|
|
|
2026-06-08 17:43:01 +00:00
|
|
|
Runnable demos:
|
2026-06-08 06:41:34 +00:00
|
|
|
|
2026-06-08 17:43:01 +00:00
|
|
|
- `demos/fresh-server-actor`
|
|
|
|
|
- `demos/fresh-web-page`
|
2026-06-08 06:41:34 +00:00
|
|
|
|
|
|
|
|
Proof:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
MATRIX_CLOUD=https://<your-hivecast-cloud> \
|
|
|
|
|
MATRIX_SPACE=<your-space-root> \
|
|
|
|
|
MATRIX_API_KEY=<your-hivecast-api-key> \
|
|
|
|
|
pnpm run prove:fresh-samples
|
|
|
|
|
```
|