@substrat-run/engine-protocol 0.2.0 → 0.3.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 +22 -19
- package/dist/index.d.ts +43 -199
- package/dist/index.d.ts.map +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -9,29 +9,27 @@ The engine owns only the invariants. Template *content* — which protocols exis
|
|
|
9
9
|
what they contain — is 100% vertical-owned, and an instance binds to any `EntityRef`
|
|
10
10
|
(a work order today, anything tomorrow).
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Invariants the engine owns
|
|
12
|
+
## What it owns
|
|
15
13
|
|
|
16
14
|
1. **Sign freezes** — any write to a signed instance's responses fails.
|
|
17
15
|
2. **Content hash** — SHA-256 over template content + latest responses at sign time,
|
|
18
16
|
verifiable against replayed state.
|
|
19
|
-
3. **Counter-sign** —
|
|
20
|
-
|
|
21
|
-
Exactly one primary signature per instance.
|
|
17
|
+
3. **Counter-sign** — a second signature on the *same* frozen content; the hash is
|
|
18
|
+
recomputed and must match.
|
|
22
19
|
4. **Append-only responses** — an edit is a new row; history is audit material.
|
|
23
|
-
5. **Version-pinned templates** —
|
|
24
|
-
`(key, version)` at instantiation forever.
|
|
20
|
+
5. **Version-pinned templates** — an instance pins `(key, version)` at instantiation forever.
|
|
25
21
|
6. **Void, not delete** — a protocol is superseded, never mutated or removed.
|
|
26
22
|
|
|
27
|
-
##
|
|
23
|
+
## Install
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
```sh
|
|
26
|
+
pnpm add @substrat-run/engine-protocol
|
|
27
|
+
```
|
|
32
28
|
|
|
33
29
|
```ts
|
|
34
|
-
import { instantiateProtocol,
|
|
30
|
+
import { instantiateProtocol, PROTOCOL_PERM, protocolModule } from '@substrat-run/engine-protocol';
|
|
31
|
+
|
|
32
|
+
host.registerModule(protocolModule);
|
|
35
33
|
|
|
36
34
|
host.defineOperation('acme/start-inspection', async (ctx, input) => {
|
|
37
35
|
assertAllowed(await ctx.check(PROTOCOL_PERM.create));
|
|
@@ -42,13 +40,18 @@ host.defineOperation('acme/start-inspection', async (ctx, input) => {
|
|
|
42
40
|
});
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
`requireSigned(ctx, entity, templateKey)` is the completion-guard building block: a
|
|
46
|
-
|
|
43
|
+
`requireSigned(ctx, entity, templateKey)` is the completion-guard building block: a vertical
|
|
44
|
+
can refuse to close its own entity until the protocol on it is signed. The engine also
|
|
45
|
+
contributes a `protocol/all-signed` guard predicate, so the same rule can be **declared** in a
|
|
46
|
+
vertical's manifest instead — where dropping it shows up in a reviewable diff.
|
|
47
|
+
|
|
48
|
+
## Documentation
|
|
49
|
+
|
|
50
|
+
**https://substrat.ahlstrand.es/engines/protocol/** — the domain model and invariants, the
|
|
51
|
+
signature/evidence model, the full operation and permission surface, event contracts, and how
|
|
52
|
+
to compose or extend it.
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
methods (BankID/Scrive-class) arrive later through the same operation shape with
|
|
50
|
-
upgraded evidence. Signed/countersigned events carry the frozen answers in the
|
|
51
|
-
payload — consumers never query back.
|
|
54
|
+
The docs site is the single source of truth; this README deliberately doesn't restate it.
|
|
52
55
|
|
|
53
56
|
## Related packages
|
|
54
57
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,21 +2,21 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type EntityRef } from '@substrat-run/contracts';
|
|
3
3
|
import { type GuardPredicate, type ModuleRegistration, type OperationContext } from '@substrat-run/kernel';
|
|
4
4
|
export declare const PROTOCOL_PERM: {
|
|
5
|
-
create: string & z.
|
|
6
|
-
fill: string & z.
|
|
7
|
-
sign: string & z.
|
|
8
|
-
countersign: string & z.
|
|
9
|
-
read: string & z.
|
|
10
|
-
void: string & z.
|
|
5
|
+
create: string & z.core.$brand<"PermissionKey">;
|
|
6
|
+
fill: string & z.core.$brand<"PermissionKey">;
|
|
7
|
+
sign: string & z.core.$brand<"PermissionKey">;
|
|
8
|
+
countersign: string & z.core.$brand<"PermissionKey">;
|
|
9
|
+
read: string & z.core.$brand<"PermissionKey">;
|
|
10
|
+
void: string & z.core.$brand<"PermissionKey">;
|
|
11
11
|
};
|
|
12
12
|
export declare const protocolManifest: {
|
|
13
|
-
id: string & z.
|
|
13
|
+
id: string & z.core.$brand<"ModuleId">;
|
|
14
|
+
version: string;
|
|
15
|
+
kernelContract: string;
|
|
14
16
|
permissions: {
|
|
15
|
-
key: string & z.
|
|
17
|
+
key: string & z.core.$brand<"PermissionKey">;
|
|
16
18
|
description: string;
|
|
17
19
|
}[];
|
|
18
|
-
version: string;
|
|
19
|
-
kernelContract: string;
|
|
20
20
|
events: {
|
|
21
21
|
emits: {
|
|
22
22
|
type: string;
|
|
@@ -33,7 +33,7 @@ export declare const protocolManifest: {
|
|
|
33
33
|
};
|
|
34
34
|
attachmentTargets: {
|
|
35
35
|
entityType: string;
|
|
36
|
-
readPermission: string & z.
|
|
36
|
+
readPermission: string & z.core.$brand<"PermissionKey">;
|
|
37
37
|
}[];
|
|
38
38
|
entitlementKey: string;
|
|
39
39
|
entityRelations?: {
|
|
@@ -54,13 +54,13 @@ export declare const protocolManifest: {
|
|
|
54
54
|
ui?: {
|
|
55
55
|
routes?: {
|
|
56
56
|
path: string;
|
|
57
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
58
57
|
screen: string;
|
|
58
|
+
permission: string & z.core.$brand<"PermissionKey">;
|
|
59
59
|
}[] | undefined;
|
|
60
60
|
nav?: {
|
|
61
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
62
61
|
label: string;
|
|
63
62
|
to: string;
|
|
63
|
+
permission: string & z.core.$brand<"PermissionKey">;
|
|
64
64
|
icon?: string | undefined;
|
|
65
65
|
}[] | undefined;
|
|
66
66
|
entityViews?: {
|
|
@@ -68,14 +68,14 @@ export declare const protocolManifest: {
|
|
|
68
68
|
view: string;
|
|
69
69
|
}[] | undefined;
|
|
70
70
|
widgets?: {
|
|
71
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
72
71
|
slot: string;
|
|
73
72
|
component: string;
|
|
73
|
+
permission: string & z.core.$brand<"PermissionKey">;
|
|
74
74
|
}[] | undefined;
|
|
75
75
|
settingsPanels?: {
|
|
76
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
77
76
|
label: string;
|
|
78
77
|
component: string;
|
|
78
|
+
permission: string & z.core.$brand<"PermissionKey">;
|
|
79
79
|
}[] | undefined;
|
|
80
80
|
} | undefined;
|
|
81
81
|
};
|
|
@@ -86,19 +86,13 @@ export declare const protocolMigrations: {
|
|
|
86
86
|
export declare const protocolItem: z.ZodObject<{
|
|
87
87
|
key: z.ZodString;
|
|
88
88
|
label: z.ZodString;
|
|
89
|
-
type: z.ZodEnum<
|
|
89
|
+
type: z.ZodEnum<{
|
|
90
|
+
check: "check";
|
|
91
|
+
value: "value";
|
|
92
|
+
text: "text";
|
|
93
|
+
}>;
|
|
90
94
|
unit: z.ZodOptional<z.ZodString>;
|
|
91
|
-
},
|
|
92
|
-
key: string;
|
|
93
|
-
label: string;
|
|
94
|
-
type: "value" | "check" | "text";
|
|
95
|
-
unit?: string | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
key: string;
|
|
98
|
-
label: string;
|
|
99
|
-
type: "value" | "check" | "text";
|
|
100
|
-
unit?: string | undefined;
|
|
101
|
-
}>;
|
|
95
|
+
}, z.core.$strip>;
|
|
102
96
|
export type ProtocolItem = z.infer<typeof protocolItem>;
|
|
103
97
|
export declare const protocolTemplateContent: z.ZodObject<{
|
|
104
98
|
sections: z.ZodArray<z.ZodObject<{
|
|
@@ -106,57 +100,15 @@ export declare const protocolTemplateContent: z.ZodObject<{
|
|
|
106
100
|
items: z.ZodArray<z.ZodObject<{
|
|
107
101
|
key: z.ZodString;
|
|
108
102
|
label: z.ZodString;
|
|
109
|
-
type: z.ZodEnum<
|
|
103
|
+
type: z.ZodEnum<{
|
|
104
|
+
check: "check";
|
|
105
|
+
value: "value";
|
|
106
|
+
text: "text";
|
|
107
|
+
}>;
|
|
110
108
|
unit: z.ZodOptional<z.ZodString>;
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
type: "value" | "check" | "text";
|
|
115
|
-
unit?: string | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
key: string;
|
|
118
|
-
label: string;
|
|
119
|
-
type: "value" | "check" | "text";
|
|
120
|
-
unit?: string | undefined;
|
|
121
|
-
}>, "many">;
|
|
122
|
-
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
title: string;
|
|
124
|
-
items: {
|
|
125
|
-
key: string;
|
|
126
|
-
label: string;
|
|
127
|
-
type: "value" | "check" | "text";
|
|
128
|
-
unit?: string | undefined;
|
|
129
|
-
}[];
|
|
130
|
-
}, {
|
|
131
|
-
title: string;
|
|
132
|
-
items: {
|
|
133
|
-
key: string;
|
|
134
|
-
label: string;
|
|
135
|
-
type: "value" | "check" | "text";
|
|
136
|
-
unit?: string | undefined;
|
|
137
|
-
}[];
|
|
138
|
-
}>, "many">;
|
|
139
|
-
}, "strip", z.ZodTypeAny, {
|
|
140
|
-
sections: {
|
|
141
|
-
title: string;
|
|
142
|
-
items: {
|
|
143
|
-
key: string;
|
|
144
|
-
label: string;
|
|
145
|
-
type: "value" | "check" | "text";
|
|
146
|
-
unit?: string | undefined;
|
|
147
|
-
}[];
|
|
148
|
-
}[];
|
|
149
|
-
}, {
|
|
150
|
-
sections: {
|
|
151
|
-
title: string;
|
|
152
|
-
items: {
|
|
153
|
-
key: string;
|
|
154
|
-
label: string;
|
|
155
|
-
type: "value" | "check" | "text";
|
|
156
|
-
unit?: string | undefined;
|
|
157
|
-
}[];
|
|
158
|
-
}[];
|
|
159
|
-
}>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
160
112
|
export type ProtocolTemplateContent = z.infer<typeof protocolTemplateContent>;
|
|
161
113
|
export interface ProtocolTemplateRow {
|
|
162
114
|
id: string;
|
|
@@ -219,17 +171,7 @@ export declare const allSignedGuardConfig: z.ZodObject<{
|
|
|
219
171
|
entityType: z.ZodString;
|
|
220
172
|
entityIdFrom: z.ZodString;
|
|
221
173
|
countersigned: z.ZodDefault<z.ZodBoolean>;
|
|
222
|
-
},
|
|
223
|
-
templateKey: string;
|
|
224
|
-
entityType: string;
|
|
225
|
-
entityIdFrom: string;
|
|
226
|
-
countersigned: boolean;
|
|
227
|
-
}, {
|
|
228
|
-
templateKey: string;
|
|
229
|
-
entityType: string;
|
|
230
|
-
entityIdFrom: string;
|
|
231
|
-
countersigned?: boolean | undefined;
|
|
232
|
-
}>;
|
|
174
|
+
}, z.core.$strip>;
|
|
233
175
|
export type AllSignedGuardConfig = z.input<typeof allSignedGuardConfig>;
|
|
234
176
|
/** The named predicate the kernel resolves for `predicate: 'protocol/all-signed'`. */
|
|
235
177
|
export declare const allSignedPredicate: GuardPredicate;
|
|
@@ -242,86 +184,16 @@ export declare const defineTemplateInput: z.ZodObject<{
|
|
|
242
184
|
items: z.ZodArray<z.ZodObject<{
|
|
243
185
|
key: z.ZodString;
|
|
244
186
|
label: z.ZodString;
|
|
245
|
-
type: z.ZodEnum<
|
|
187
|
+
type: z.ZodEnum<{
|
|
188
|
+
check: "check";
|
|
189
|
+
value: "value";
|
|
190
|
+
text: "text";
|
|
191
|
+
}>;
|
|
246
192
|
unit: z.ZodOptional<z.ZodString>;
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
unit?: string | undefined;
|
|
252
|
-
}, {
|
|
253
|
-
key: string;
|
|
254
|
-
label: string;
|
|
255
|
-
type: "value" | "check" | "text";
|
|
256
|
-
unit?: string | undefined;
|
|
257
|
-
}>, "many">;
|
|
258
|
-
}, "strip", z.ZodTypeAny, {
|
|
259
|
-
title: string;
|
|
260
|
-
items: {
|
|
261
|
-
key: string;
|
|
262
|
-
label: string;
|
|
263
|
-
type: "value" | "check" | "text";
|
|
264
|
-
unit?: string | undefined;
|
|
265
|
-
}[];
|
|
266
|
-
}, {
|
|
267
|
-
title: string;
|
|
268
|
-
items: {
|
|
269
|
-
key: string;
|
|
270
|
-
label: string;
|
|
271
|
-
type: "value" | "check" | "text";
|
|
272
|
-
unit?: string | undefined;
|
|
273
|
-
}[];
|
|
274
|
-
}>, "many">;
|
|
275
|
-
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
sections: {
|
|
277
|
-
title: string;
|
|
278
|
-
items: {
|
|
279
|
-
key: string;
|
|
280
|
-
label: string;
|
|
281
|
-
type: "value" | "check" | "text";
|
|
282
|
-
unit?: string | undefined;
|
|
283
|
-
}[];
|
|
284
|
-
}[];
|
|
285
|
-
}, {
|
|
286
|
-
sections: {
|
|
287
|
-
title: string;
|
|
288
|
-
items: {
|
|
289
|
-
key: string;
|
|
290
|
-
label: string;
|
|
291
|
-
type: "value" | "check" | "text";
|
|
292
|
-
unit?: string | undefined;
|
|
293
|
-
}[];
|
|
294
|
-
}[];
|
|
295
|
-
}>;
|
|
296
|
-
}, "strip", z.ZodTypeAny, {
|
|
297
|
-
key: string;
|
|
298
|
-
title: string;
|
|
299
|
-
content: {
|
|
300
|
-
sections: {
|
|
301
|
-
title: string;
|
|
302
|
-
items: {
|
|
303
|
-
key: string;
|
|
304
|
-
label: string;
|
|
305
|
-
type: "value" | "check" | "text";
|
|
306
|
-
unit?: string | undefined;
|
|
307
|
-
}[];
|
|
308
|
-
}[];
|
|
309
|
-
};
|
|
310
|
-
}, {
|
|
311
|
-
key: string;
|
|
312
|
-
title: string;
|
|
313
|
-
content: {
|
|
314
|
-
sections: {
|
|
315
|
-
title: string;
|
|
316
|
-
items: {
|
|
317
|
-
key: string;
|
|
318
|
-
label: string;
|
|
319
|
-
type: "value" | "check" | "text";
|
|
320
|
-
unit?: string | undefined;
|
|
321
|
-
}[];
|
|
322
|
-
}[];
|
|
323
|
-
};
|
|
324
|
-
}>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
}, z.core.$strip>;
|
|
325
197
|
export type DefineTemplateInput = z.infer<typeof defineTemplateInput>;
|
|
326
198
|
/**
|
|
327
199
|
* Templates version immutably: same key + new content = next version, the
|
|
@@ -336,26 +208,8 @@ export declare const instantiateProtocolInput: z.ZodObject<{
|
|
|
336
208
|
entity: z.ZodObject<{
|
|
337
209
|
entityType: z.ZodString;
|
|
338
210
|
entityId: z.ZodString;
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
entityId: string;
|
|
342
|
-
}, {
|
|
343
|
-
entityType: string;
|
|
344
|
-
entityId: string;
|
|
345
|
-
}>;
|
|
346
|
-
}, "strip", z.ZodTypeAny, {
|
|
347
|
-
templateKey: string;
|
|
348
|
-
entity: {
|
|
349
|
-
entityType: string;
|
|
350
|
-
entityId: string;
|
|
351
|
-
};
|
|
352
|
-
}, {
|
|
353
|
-
templateKey: string;
|
|
354
|
-
entity: {
|
|
355
|
-
entityType: string;
|
|
356
|
-
entityId: string;
|
|
357
|
-
};
|
|
358
|
-
}>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
}, z.core.$strip>;
|
|
359
213
|
export type InstantiateProtocolInput = z.infer<typeof instantiateProtocolInput>;
|
|
360
214
|
/**
|
|
361
215
|
* Pins the latest template version at instantiation — forever (invariant 5).
|
|
@@ -366,19 +220,9 @@ export declare function instantiateProtocol(ctx: OperationContext, rawInput: Ins
|
|
|
366
220
|
export declare const fillProtocolInput: z.ZodObject<{
|
|
367
221
|
instanceId: z.ZodString;
|
|
368
222
|
itemKey: z.ZodString;
|
|
369
|
-
value: z.ZodUnion<[z.ZodBoolean, z.ZodString]>;
|
|
223
|
+
value: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
370
224
|
note: z.ZodOptional<z.ZodString>;
|
|
371
|
-
},
|
|
372
|
-
value: string | boolean;
|
|
373
|
-
instanceId: string;
|
|
374
|
-
itemKey: string;
|
|
375
|
-
note?: string | undefined;
|
|
376
|
-
}, {
|
|
377
|
-
value: string | boolean;
|
|
378
|
-
instanceId: string;
|
|
379
|
-
itemKey: string;
|
|
380
|
-
note?: string | undefined;
|
|
381
|
-
}>;
|
|
225
|
+
}, z.core.$strip>;
|
|
382
226
|
export type FillProtocolInput = z.infer<typeof fillProtocolInput>;
|
|
383
227
|
export declare function fillProtocol(ctx: OperationContext, rawInput: FillProtocolInput): ProtocolResponseRow;
|
|
384
228
|
export interface SignResult {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AA2B9B,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AA2B9B,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B3B,CAAC;AAEH,eAAO,MAAM,kBAAk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,EAAE,uBAAuB,CAAA;KAAE,CAAC;IAC5F,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC5C,SAAS,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACvC,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAkBrF;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,GAAG,eAAe,EAAE,CAyBlG;AAoED,eAAO,MAAM,cAAc,EAAE,kBAoB5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/engine-protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Substrat engine: protocols/checklists with the sign → immutable invariant — versioned templates, append-only responses, verifiable content hash, counter-signatures on frozen content",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -25,15 +25,18 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"zod": "^
|
|
29
|
-
"@substrat-run/contracts": "^0.
|
|
30
|
-
"@substrat-run/kernel": "^0.
|
|
28
|
+
"zod": "^4.4.3",
|
|
29
|
+
"@substrat-run/contracts": "^0.4.0",
|
|
30
|
+
"@substrat-run/kernel": "^0.4.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"typescript": "^5.6.0"
|
|
33
|
+
"typescript": "^5.6.0",
|
|
34
|
+
"vitest": "^3.0.0",
|
|
35
|
+
"@substrat-run/engine-test-kit": "^0.0.2"
|
|
34
36
|
},
|
|
35
37
|
"scripts": {
|
|
36
38
|
"build": "tsc -p tsconfig.json",
|
|
37
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
39
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
40
|
+
"test": "vitest run"
|
|
38
41
|
}
|
|
39
42
|
}
|