@open-matrix/contracts (1.1.33)
Installation
@open-matrix:registry=npm install @open-matrix/contracts@1.1.33"@open-matrix/contracts": "1.1.33"About this package
Platform contracts
Shared TypeScript contracts and pure grammar functions, without a runtime SDK dependency.
Import contracts from @open-matrix/contracts or the declared package subpaths.
@open-matrix/contracts/service-mounts owns the canonical well-known service
mounts used by runtimes, credential planning, and broker account bridges.
NotificationPost, HomeNotification, NotificationPage and NotificationChange
describe the persistent home inbox. A producer supplies a stable source event identity;
the service deduplicates that identity within the authenticated home. List cursors are
opaque, and change sequences belong to one home. Consumers must refresh their list when
replay reports a history gap. See the system-notifications package README for operations,
authentication and retention limits.
The deployment composition contract permits a boolean protected on a desired
package instance. This is policy declared by the deployment source. The runtime
launcher preserves it during composition compilation and load-list migration;
the supervising host refuses removal when it is true. Runtime registration
cannot grant or remove this protection.
Run pnpm test, pnpm type-check and pnpm build within this package.
Device authorization exports the shared HiveDock heartbeat interval and three-missed-heartbeat lease so device presence displays use the same expiry as host topology claims.
Device inventory removal uses AccountDeviceForgetRequestV1, AccountDeviceForgetResultV1
and AccountDeviceForgetRefusal from device-authorization. Both auth and Settings use
DEVICE_OFFLINE_AFTER_MS for the minimum silence window; forgetting carries only a device ID
and expected association revision, never a caller-supplied account identity at the profile facade.
Password signup and Settings share readProfileDisplayName from @open-matrix/contracts: trim,
collapse whitespace, and cap at 120 characters. Registration requires a nonblank displayName;
the password principal stores that name. OAuth retains the provider's name.
SessionListRequest / SessionListPage describe bounded conversation pages:
cursor and limit in, sessions and optional nextCursor out. The common
limit/cursor helpers cap pages at 100 (default 50) and preserve both the home
store's numeric clock and Postgres's full timestamp precision.
The coding-agent contract declares explicit fleet.agent-workstream/v1 metadata and its validator. Agent identity, functional area and workstream are authored values; absence never permits inference. Optional dependency links describe coordination only.
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^25.0.10 |
| tsx | ^4.15.6 |
| typescript | ^5.7.0 |