@rkt-tools/contracts 0.1.0 → 0.1.1
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 +6 -11
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -15,6 +15,12 @@ The pure, shared **ingestion-envelope contract** for the `rkt-comms` monorepo: t
|
|
|
15
15
|
| `parseBridgeEnvelope(value)` | `bridgeEnvelopeSchema.parse` |
|
|
16
16
|
| types: `BridgeEnvelope` (union), `CoreEnvelope` (**iMessage member only**, not the union), `CallEnvelope`, `SafeMetadata` | inferred |
|
|
17
17
|
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @rkt-tools/contracts
|
|
22
|
+
```
|
|
23
|
+
|
|
18
24
|
## Build & test
|
|
19
25
|
|
|
20
26
|
```bash
|
|
@@ -23,17 +29,6 @@ pnpm --filter @rkt-tools/contracts test # golden-fixture contract guard
|
|
|
23
29
|
pnpm --filter @rkt-tools/contracts typecheck
|
|
24
30
|
```
|
|
25
31
|
|
|
26
|
-
Consumers build it deps-first on every build/deploy path via the trailing-`...` filter, e.g. `pnpm --filter "rkt-crm..." build`.
|
|
27
|
-
|
|
28
32
|
## Changing the wire contract
|
|
29
33
|
|
|
30
34
|
Edit `src/envelope.ts` **and extend the golden fixtures in `test/envelope.test.ts` in the same commit.** The fixtures (known-good must-parse, known-bad must-reject) are the regression guard that the contract can't silently loosen or tighten. The build must keep `declaration: true` (in `tsconfig.build.json`) or NodeNext consumers fail type resolution.
|
|
31
|
-
|
|
32
|
-
## Consumption
|
|
33
|
-
|
|
34
|
-
| Consumer | How |
|
|
35
|
-
| ----------------------------------- | ---------------------------------------------------------------------------------- |
|
|
36
|
-
| **rkt-comms** (`crm`, `imap-mcp`) | `"@rkt-tools/contracts": "workspace:*"` — no npm auth needed for local/Railway builds |
|
|
37
|
-
| **rkt-ship** (and other cross-repo) | `"@rkt-tools/contracts": "^0.1.0"` from public npm (`publishConfig.access: public`) |
|
|
38
|
-
|
|
39
|
-
Release and registry runbook: [`docs/contracts-registry.md`](../../docs/contracts-registry.md). ADR: [`0033`](../../packages/crm/docs/adr/0033-rkt-contracts-npm-registry-consumption.md).
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rkt-tools/contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Shared ingestion-envelope Zod schemas for the rkt stack",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/daviesayo/rkt-comms.git",
|
|
9
|
+
"directory": "packages/contracts"
|
|
10
|
+
},
|
|
6
11
|
"engines": {
|
|
7
12
|
"node": ">=22"
|
|
8
13
|
},
|