@nebutra/contracts 0.1.2 → 2.0.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.
@@ -1,37 +1,47 @@
1
1
 
2
- > @nebutra/contracts@0.1.2 build /Users/tseka_luk/Documents/Nebutra-SaaS-Lab/Nebutra-Sailor/packages/commerce/contracts
2
+ > @nebutra/contracts@2.0.0 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/commerce/contracts
3
3
  > tsup
4
4
 
5
- CLI Building entry: src/billing.ts, src/events.ts, src/identity.ts, src/index.ts, src/notifications.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Using tsup config: /Users/tseka_luk/Documents/Nebutra-SaaS-Lab/Nebutra-Sailor/packages/commerce/contracts/tsup.config.ts
9
- CLI Target: es2022
10
- CLI Cleaning output folder
11
- ESM Build start
12
- ESM dist/index.js 2.01 KB
13
- ESM dist/billing.js 332.00 B
14
- ESM dist/chunk-NFJTVIKD.js 1.32 KB
15
- ESM dist/chunk-2NXI4PJM.js 565.00 B
16
- ESM dist/chunk-5JNQ2KAT.js 2.07 KB
17
- ESM dist/notifications.js 1.11 KB
18
- ESM dist/events.js 173.00 B
19
- ESM dist/identity.js 563.00 B
20
- ESM dist/chunk-F4BR76CX.js 2.91 KB
21
- ESM dist/billing.js.map 71.00 B
22
- ESM dist/chunk-5JNQ2KAT.js.map 4.47 KB
23
- ESM dist/index.js.map 71.00 B
24
- ESM dist/chunk-NFJTVIKD.js.map 2.78 KB
25
- ESM dist/events.js.map 71.00 B
26
- ESM dist/identity.js.map 71.00 B
27
- ESM dist/notifications.js.map 71.00 B
28
- ESM dist/chunk-2NXI4PJM.js.map 1.16 KB
29
- ESM dist/chunk-F4BR76CX.js.map 6.05 KB
30
- ESM ⚡️ Build success in 95ms
31
- DTS Build start
32
- DTS ⚡️ Build success in 4639ms
33
- DTS dist/index.d.ts 1.69 KB
34
- DTS dist/billing.d.ts 2.11 KB
35
- DTS dist/events.d.ts 1020.00 B
36
- DTS dist/identity.d.ts 4.03 KB
37
- DTS dist/notifications.d.ts 6.09 KB
5
+ CLI Building entry: src/admin.ts, src/billing.ts, src/events.ts, src/identity.ts, src/index.ts, src/notifications.ts, src/sleptons.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/commerce/contracts/tsup.config.ts
9
+ CLI Target: es2022
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ ESM dist/admin.js 1.04 KB
13
+ ESM dist/billing.js 332.00 B
14
+ ESM dist/events.js 173.00 B
15
+ ESM dist/identity.js 563.00 B
16
+ ESM dist/index.js 4.36 KB
17
+ ESM dist/chunk-ERZTZ3PW.js 8.13 KB
18
+ ESM dist/chunk-NFJTVIKD.js 1.32 KB
19
+ ESM dist/chunk-2NXI4PJM.js 565.00 B
20
+ ESM dist/chunk-5JNQ2KAT.js 2.07 KB
21
+ ESM dist/notifications.js 1.11 KB
22
+ ESM dist/chunk-F4BR76CX.js 2.91 KB
23
+ ESM dist/sleptons.js 1.40 KB
24
+ ESM dist/chunk-PU65L2HQ.js 6.74 KB
25
+ ESM dist/admin.js.map 71.00 B
26
+ ESM dist/billing.js.map 71.00 B
27
+ ESM dist/events.js.map 71.00 B
28
+ ESM dist/identity.js.map 71.00 B
29
+ ESM dist/index.js.map 71.00 B
30
+ ESM dist/chunk-ERZTZ3PW.js.map 16.58 KB
31
+ ESM dist/chunk-NFJTVIKD.js.map 2.78 KB
32
+ ESM dist/chunk-2NXI4PJM.js.map 1.16 KB
33
+ ESM dist/chunk-5JNQ2KAT.js.map 4.47 KB
34
+ ESM dist/notifications.js.map 71.00 B
35
+ ESM dist/chunk-F4BR76CX.js.map 6.05 KB
36
+ ESM dist/sleptons.js.map 71.00 B
37
+ ESM dist/chunk-PU65L2HQ.js.map 14.02 KB
38
+ ESM ⚡️ Build success in 94ms
39
+ DTS Build start
40
+ DTS ⚡️ Build success in 22232ms
41
+ DTS dist/index.d.ts 3.15 KB
42
+ DTS dist/admin.d.ts 14.76 KB
43
+ DTS dist/billing.d.ts 2.11 KB
44
+ DTS dist/events.d.ts 1020.00 B
45
+ DTS dist/identity.d.ts 4.03 KB
46
+ DTS dist/notifications.d.ts 6.09 KB
47
+ DTS dist/sleptons.d.ts 21.11 KB
@@ -0,0 +1,15 @@
1
+
2
+ > @nebutra/contracts@2.0.0 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/commerce/contracts
3
+ > vitest run
4
+
5
+
6
+  RUN  v4.1.4 /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/commerce/contracts
7
+
8
+ ✓ src/__tests__/admin.test.ts (5 tests) 91ms
9
+ ✓ src/sleptons.test.ts (6 tests) 50ms
10
+
11
+  Test Files  2 passed (2)
12
+  Tests  11 passed (11)
13
+  Start at  02:31:07
14
+  Duration  1.49s (transform 388ms, setup 0ms, import 1.34s, tests 141ms, environment 0ms)
15
+
@@ -1,4 +1,4 @@
1
1
 
2
- > @nebutra/contracts@0.1.2 typecheck /Users/tseka_luk/Documents/Nebutra-SaaS-Lab/Nebutra-Sailor/packages/commerce/contracts
2
+ > @nebutra/contracts@2.0.0 typecheck /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/commerce/contracts
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @nebutra/contracts
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#541](https://github.com/Nebutra/Nebutra-Sailor/pull/541) [`a29746f`](https://github.com/Nebutra/Nebutra-Sailor/commit/a29746fdd9eabdfb9c1692a2dc43fc7d5810779c) Thanks [@TsekaLuk](https://github.com/TsekaLuk)! - Sleptons résumé R0: schema, storage, and owner read/write.
8
+ - `@nebutra/contracts/sleptons` — `ResumeContentV1Schema` (the structured "track record" attached to a member profile), `ResumeWriteSchema`, `ResumeDerivedSchema`. Additive subpath export; nothing else in the package changes.
9
+ - `@nebutra/db` — `SleptonsResume` model + `ResumeLang` enum (migration `20260907000000_sleptons_resume`), 1:1 on `sleptons_member_profiles`, cascade delete. Not tenant-scoped, same as the other Sleptons tables.
10
+ - `@nebutra/sleptons` — `GET/PUT /api/resume` for the signed-in member: validate → derive (`headline`, `skills_flat`, `highlights`, `years_active`, `completeness`) → upsert. Plus a one-time importer for legacy CVise JSON exports.
11
+
12
+ Spec: `docs/superpowers/specs/2026-09-07-sleptons-resume-system-design.md`.
13
+
3
14
  ## 0.1.2
4
15
 
5
16
  ### Patch Changes
@@ -0,0 +1,416 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Admin Contract — `nebutra.admin/v1`.
5
+ *
6
+ * Every Nebutra SaaS exposes one manifest describing the admin surface it
7
+ * owns: resources (nouns), actions (audited verbs, plan → apply), signals
8
+ * (probed facts) and policies (actions the system runs by itself). The
9
+ * platform admin renders any product from its manifest; an agent derives
10
+ * tools from it. Nothing product-specific lives in the renderer.
11
+ *
12
+ * See docs/plans/2026-09-08-admin-of-admins-model.md.
13
+ */
14
+ declare const ADMIN_CONTRACT_VERSION: "nebutra.admin/v1";
15
+ /** One status vocabulary. `unknown` is first-class and never renders green. */
16
+ declare const AdminStatusSchema: z.ZodEnum<{
17
+ healthy: "healthy";
18
+ degraded: "degraded";
19
+ down: "down";
20
+ unknown: "unknown";
21
+ }>;
22
+ type AdminStatus = z.infer<typeof AdminStatusSchema>;
23
+ /** One role ladder; product roles map onto it, staff grants mean the same everywhere. */
24
+ declare const StaffRoleSchema: z.ZodEnum<{
25
+ platform_readonly: "platform_readonly";
26
+ platform_support: "platform_support";
27
+ platform_operator: "platform_operator";
28
+ platform_owner: "platform_owner";
29
+ }>;
30
+ type StaffRole = z.infer<typeof StaffRoleSchema>;
31
+ declare const STAFF_ROLE_RANK: Record<StaffRole, number>;
32
+ declare function roleAtLeast(role: StaffRole, required: StaffRole): boolean;
33
+ declare const AdminSeveritySchema: z.ZodEnum<{
34
+ info: "info";
35
+ warn: "warn";
36
+ critical: "critical";
37
+ }>;
38
+ type AdminSeverity = z.infer<typeof AdminSeveritySchema>;
39
+ /** The canonical eleven. A product declares the subset it has. */
40
+ declare const AdminDomainIdSchema: z.ZodEnum<{
41
+ identity: "identity";
42
+ access: "access";
43
+ commerce: "commerce";
44
+ usage: "usage";
45
+ catalog: "catalog";
46
+ operations: "operations";
47
+ integrations: "integrations";
48
+ trust: "trust";
49
+ support: "support";
50
+ growth: "growth";
51
+ settings: "settings";
52
+ supply: "supply";
53
+ }>;
54
+ type AdminDomainId = z.infer<typeof AdminDomainIdSchema>;
55
+ declare const AdminColumnSchema: z.ZodObject<{
56
+ key: z.ZodString;
57
+ label: z.ZodString;
58
+ kind: z.ZodDefault<z.ZodEnum<{
59
+ number: "number";
60
+ text: "text";
61
+ mono: "mono";
62
+ status: "status";
63
+ badge: "badge";
64
+ time: "time";
65
+ link: "link";
66
+ }>>;
67
+ align: z.ZodDefault<z.ZodEnum<{
68
+ start: "start";
69
+ end: "end";
70
+ }>>;
71
+ }, z.core.$strip>;
72
+ type AdminColumn = z.infer<typeof AdminColumnSchema>;
73
+ declare const AdminResourceSchema: z.ZodObject<{
74
+ id: z.ZodString;
75
+ label: z.ZodString;
76
+ list: z.ZodString;
77
+ detail: z.ZodOptional<z.ZodString>;
78
+ columns: z.ZodArray<z.ZodObject<{
79
+ key: z.ZodString;
80
+ label: z.ZodString;
81
+ kind: z.ZodDefault<z.ZodEnum<{
82
+ number: "number";
83
+ text: "text";
84
+ mono: "mono";
85
+ status: "status";
86
+ badge: "badge";
87
+ time: "time";
88
+ link: "link";
89
+ }>>;
90
+ align: z.ZodDefault<z.ZodEnum<{
91
+ start: "start";
92
+ end: "end";
93
+ }>>;
94
+ }, z.core.$strip>>;
95
+ key: z.ZodDefault<z.ZodString>;
96
+ search: z.ZodDefault<z.ZodBoolean>;
97
+ actions: z.ZodDefault<z.ZodArray<z.ZodString>>;
98
+ }, z.core.$strip>;
99
+ type AdminResource = z.infer<typeof AdminResourceSchema>;
100
+ declare const AdminActionSchema: z.ZodObject<{
101
+ id: z.ZodString;
102
+ verb: z.ZodString;
103
+ resource: z.ZodOptional<z.ZodString>;
104
+ role: z.ZodEnum<{
105
+ platform_readonly: "platform_readonly";
106
+ platform_support: "platform_support";
107
+ platform_operator: "platform_operator";
108
+ platform_owner: "platform_owner";
109
+ }>;
110
+ url: z.ZodString;
111
+ plan: z.ZodDefault<z.ZodBoolean>;
112
+ destructive: z.ZodDefault<z.ZodBoolean>;
113
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
114
+ description: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>;
116
+ type AdminAction = z.infer<typeof AdminActionSchema>;
117
+ declare const AdminSignalSchema: z.ZodObject<{
118
+ id: z.ZodString;
119
+ label: z.ZodString;
120
+ severity: z.ZodEnum<{
121
+ info: "info";
122
+ warn: "warn";
123
+ critical: "critical";
124
+ }>;
125
+ probe: z.ZodString;
126
+ resource: z.ZodOptional<z.ZodString>;
127
+ action: z.ZodOptional<z.ZodString>;
128
+ }, z.core.$strip>;
129
+ type AdminSignal = z.infer<typeof AdminSignalSchema>;
130
+ declare const AdminPolicySchema: z.ZodObject<{
131
+ id: z.ZodString;
132
+ label: z.ZodString;
133
+ on: z.ZodString;
134
+ runs: z.ZodString;
135
+ enabled: z.ZodDefault<z.ZodBoolean>;
136
+ intent: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>;
138
+ type AdminPolicy = z.infer<typeof AdminPolicySchema>;
139
+ declare const AdminDomainSchema: z.ZodObject<{
140
+ id: z.ZodEnum<{
141
+ identity: "identity";
142
+ access: "access";
143
+ commerce: "commerce";
144
+ usage: "usage";
145
+ catalog: "catalog";
146
+ operations: "operations";
147
+ integrations: "integrations";
148
+ trust: "trust";
149
+ support: "support";
150
+ growth: "growth";
151
+ settings: "settings";
152
+ supply: "supply";
153
+ }>;
154
+ label: z.ZodString;
155
+ resources: z.ZodDefault<z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ label: z.ZodString;
158
+ list: z.ZodString;
159
+ detail: z.ZodOptional<z.ZodString>;
160
+ columns: z.ZodArray<z.ZodObject<{
161
+ key: z.ZodString;
162
+ label: z.ZodString;
163
+ kind: z.ZodDefault<z.ZodEnum<{
164
+ number: "number";
165
+ text: "text";
166
+ mono: "mono";
167
+ status: "status";
168
+ badge: "badge";
169
+ time: "time";
170
+ link: "link";
171
+ }>>;
172
+ align: z.ZodDefault<z.ZodEnum<{
173
+ start: "start";
174
+ end: "end";
175
+ }>>;
176
+ }, z.core.$strip>>;
177
+ key: z.ZodDefault<z.ZodString>;
178
+ search: z.ZodDefault<z.ZodBoolean>;
179
+ actions: z.ZodDefault<z.ZodArray<z.ZodString>>;
180
+ }, z.core.$strip>>>;
181
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
182
+ id: z.ZodString;
183
+ verb: z.ZodString;
184
+ resource: z.ZodOptional<z.ZodString>;
185
+ role: z.ZodEnum<{
186
+ platform_readonly: "platform_readonly";
187
+ platform_support: "platform_support";
188
+ platform_operator: "platform_operator";
189
+ platform_owner: "platform_owner";
190
+ }>;
191
+ url: z.ZodString;
192
+ plan: z.ZodDefault<z.ZodBoolean>;
193
+ destructive: z.ZodDefault<z.ZodBoolean>;
194
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
195
+ description: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strip>>>;
197
+ signals: z.ZodDefault<z.ZodArray<z.ZodObject<{
198
+ id: z.ZodString;
199
+ label: z.ZodString;
200
+ severity: z.ZodEnum<{
201
+ info: "info";
202
+ warn: "warn";
203
+ critical: "critical";
204
+ }>;
205
+ probe: z.ZodString;
206
+ resource: z.ZodOptional<z.ZodString>;
207
+ action: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strip>>>;
209
+ policies: z.ZodDefault<z.ZodArray<z.ZodObject<{
210
+ id: z.ZodString;
211
+ label: z.ZodString;
212
+ on: z.ZodString;
213
+ runs: z.ZodString;
214
+ enabled: z.ZodDefault<z.ZodBoolean>;
215
+ intent: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strip>>>;
217
+ slot: z.ZodOptional<z.ZodString>;
218
+ }, z.core.$strip>;
219
+ type AdminDomain = z.infer<typeof AdminDomainSchema>;
220
+ declare const AdminManifestSchema: z.ZodObject<{
221
+ contract: z.ZodLiteral<"nebutra.admin/v1">;
222
+ product: z.ZodString;
223
+ label: z.ZodString;
224
+ version: z.ZodString;
225
+ origin: z.ZodString;
226
+ graph: z.ZodEnum<{
227
+ core: "core";
228
+ runtime: "runtime";
229
+ labs: "labs";
230
+ }>;
231
+ status: z.ZodEnum<{
232
+ stable: "stable";
233
+ foundation: "foundation";
234
+ wip: "wip";
235
+ experimental: "experimental";
236
+ }>;
237
+ health: z.ZodString;
238
+ audit: z.ZodOptional<z.ZodString>;
239
+ domains: z.ZodArray<z.ZodObject<{
240
+ id: z.ZodEnum<{
241
+ identity: "identity";
242
+ access: "access";
243
+ commerce: "commerce";
244
+ usage: "usage";
245
+ catalog: "catalog";
246
+ operations: "operations";
247
+ integrations: "integrations";
248
+ trust: "trust";
249
+ support: "support";
250
+ growth: "growth";
251
+ settings: "settings";
252
+ supply: "supply";
253
+ }>;
254
+ label: z.ZodString;
255
+ resources: z.ZodDefault<z.ZodArray<z.ZodObject<{
256
+ id: z.ZodString;
257
+ label: z.ZodString;
258
+ list: z.ZodString;
259
+ detail: z.ZodOptional<z.ZodString>;
260
+ columns: z.ZodArray<z.ZodObject<{
261
+ key: z.ZodString;
262
+ label: z.ZodString;
263
+ kind: z.ZodDefault<z.ZodEnum<{
264
+ number: "number";
265
+ text: "text";
266
+ mono: "mono";
267
+ status: "status";
268
+ badge: "badge";
269
+ time: "time";
270
+ link: "link";
271
+ }>>;
272
+ align: z.ZodDefault<z.ZodEnum<{
273
+ start: "start";
274
+ end: "end";
275
+ }>>;
276
+ }, z.core.$strip>>;
277
+ key: z.ZodDefault<z.ZodString>;
278
+ search: z.ZodDefault<z.ZodBoolean>;
279
+ actions: z.ZodDefault<z.ZodArray<z.ZodString>>;
280
+ }, z.core.$strip>>>;
281
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
282
+ id: z.ZodString;
283
+ verb: z.ZodString;
284
+ resource: z.ZodOptional<z.ZodString>;
285
+ role: z.ZodEnum<{
286
+ platform_readonly: "platform_readonly";
287
+ platform_support: "platform_support";
288
+ platform_operator: "platform_operator";
289
+ platform_owner: "platform_owner";
290
+ }>;
291
+ url: z.ZodString;
292
+ plan: z.ZodDefault<z.ZodBoolean>;
293
+ destructive: z.ZodDefault<z.ZodBoolean>;
294
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
295
+ description: z.ZodOptional<z.ZodString>;
296
+ }, z.core.$strip>>>;
297
+ signals: z.ZodDefault<z.ZodArray<z.ZodObject<{
298
+ id: z.ZodString;
299
+ label: z.ZodString;
300
+ severity: z.ZodEnum<{
301
+ info: "info";
302
+ warn: "warn";
303
+ critical: "critical";
304
+ }>;
305
+ probe: z.ZodString;
306
+ resource: z.ZodOptional<z.ZodString>;
307
+ action: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>>>;
309
+ policies: z.ZodDefault<z.ZodArray<z.ZodObject<{
310
+ id: z.ZodString;
311
+ label: z.ZodString;
312
+ on: z.ZodString;
313
+ runs: z.ZodString;
314
+ enabled: z.ZodDefault<z.ZodBoolean>;
315
+ intent: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strip>>>;
317
+ slot: z.ZodOptional<z.ZodString>;
318
+ }, z.core.$strip>>;
319
+ }, z.core.$strip>;
320
+ type AdminManifest = z.infer<typeof AdminManifestSchema>;
321
+ declare const ResourceListSchema: z.ZodObject<{
322
+ items: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
323
+ total: z.ZodNumber;
324
+ probedAt: z.ZodOptional<z.ZodString>;
325
+ }, z.core.$strip>;
326
+ type ResourceList = z.infer<typeof ResourceListSchema>;
327
+ declare const ActionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
328
+ mode: z.ZodLiteral<"plan">;
329
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
330
+ }, z.core.$strip>, z.ZodObject<{
331
+ mode: z.ZodLiteral<"apply">;
332
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
333
+ planId: z.ZodOptional<z.ZodString>;
334
+ }, z.core.$strip>], "mode">;
335
+ type ActionRequest = z.infer<typeof ActionRequestSchema>;
336
+ declare const PlanDiffEntrySchema: z.ZodObject<{
337
+ op: z.ZodEnum<{
338
+ add: "add";
339
+ remove: "remove";
340
+ change: "change";
341
+ }>;
342
+ path: z.ZodString;
343
+ from: z.ZodOptional<z.ZodUnknown>;
344
+ to: z.ZodOptional<z.ZodUnknown>;
345
+ }, z.core.$strip>;
346
+ declare const ActionPlanSchema: z.ZodObject<{
347
+ planId: z.ZodString;
348
+ summary: z.ZodString;
349
+ diff: z.ZodArray<z.ZodObject<{
350
+ op: z.ZodEnum<{
351
+ add: "add";
352
+ remove: "remove";
353
+ change: "change";
354
+ }>;
355
+ path: z.ZodString;
356
+ from: z.ZodOptional<z.ZodUnknown>;
357
+ to: z.ZodOptional<z.ZodUnknown>;
358
+ }, z.core.$strip>>;
359
+ affected: z.ZodDefault<z.ZodArray<z.ZodObject<{
360
+ resource: z.ZodString;
361
+ id: z.ZodString;
362
+ label: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>>>;
364
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
365
+ expiresAt: z.ZodString;
366
+ }, z.core.$strip>;
367
+ type ActionPlan = z.infer<typeof ActionPlanSchema>;
368
+ declare const ActionResultSchema: z.ZodObject<{
369
+ auditId: z.ZodString;
370
+ summary: z.ZodString;
371
+ result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
372
+ }, z.core.$strip>;
373
+ type ActionResult = z.infer<typeof ActionResultSchema>;
374
+ declare const SignalReadingSchema: z.ZodObject<{
375
+ id: z.ZodString;
376
+ status: z.ZodEnum<{
377
+ unknown: "unknown";
378
+ ok: "ok";
379
+ raised: "raised";
380
+ }>;
381
+ severity: z.ZodEnum<{
382
+ info: "info";
383
+ warn: "warn";
384
+ critical: "critical";
385
+ }>;
386
+ probedAt: z.ZodString;
387
+ title: z.ZodOptional<z.ZodString>;
388
+ detail: z.ZodOptional<z.ZodString>;
389
+ resource: z.ZodOptional<z.ZodString>;
390
+ action: z.ZodOptional<z.ZodString>;
391
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
392
+ }, z.core.$strip>;
393
+ type SignalReading = z.infer<typeof SignalReadingSchema>;
394
+ /** Standard error body for contract endpoints. */
395
+ declare const AdminErrorSchema: z.ZodObject<{
396
+ error: z.ZodObject<{
397
+ code: z.ZodEnum<{
398
+ unauthenticated: "unauthenticated";
399
+ forbidden: "forbidden";
400
+ not_found: "not_found";
401
+ invalid_input: "invalid_input";
402
+ plan_required: "plan_required";
403
+ plan_expired: "plan_expired";
404
+ upstream_unavailable: "upstream_unavailable";
405
+ internal: "internal";
406
+ }>;
407
+ message: z.ZodString;
408
+ }, z.core.$strip>;
409
+ }, z.core.$strip>;
410
+ type AdminError = z.infer<typeof AdminErrorSchema>;
411
+ /** Validate an apply against its action: destructive applies must reference a plan. */
412
+ declare function assertApplyAllowed(action: AdminAction, request: ActionRequest): AdminError | null;
413
+ /** Resolve a contract path against the manifest origin. */
414
+ declare function resolveContractUrl(manifest: Pick<AdminManifest, "origin">, path: string): string;
415
+
416
+ export { ADMIN_CONTRACT_VERSION, type ActionPlan, ActionPlanSchema, type ActionRequest, ActionRequestSchema, type ActionResult, ActionResultSchema, type AdminAction, AdminActionSchema, type AdminColumn, AdminColumnSchema, type AdminDomain, type AdminDomainId, AdminDomainIdSchema, AdminDomainSchema, type AdminError, AdminErrorSchema, type AdminManifest, AdminManifestSchema, type AdminPolicy, AdminPolicySchema, type AdminResource, AdminResourceSchema, type AdminSeverity, AdminSeveritySchema, type AdminSignal, AdminSignalSchema, type AdminStatus, AdminStatusSchema, PlanDiffEntrySchema, type ResourceList, ResourceListSchema, STAFF_ROLE_RANK, type SignalReading, SignalReadingSchema, type StaffRole, StaffRoleSchema, assertApplyAllowed, resolveContractUrl, roleAtLeast };
package/dist/admin.js ADDED
@@ -0,0 +1,51 @@
1
+ import {
2
+ ADMIN_CONTRACT_VERSION,
3
+ ActionPlanSchema,
4
+ ActionRequestSchema,
5
+ ActionResultSchema,
6
+ AdminActionSchema,
7
+ AdminColumnSchema,
8
+ AdminDomainIdSchema,
9
+ AdminDomainSchema,
10
+ AdminErrorSchema,
11
+ AdminManifestSchema,
12
+ AdminPolicySchema,
13
+ AdminResourceSchema,
14
+ AdminSeveritySchema,
15
+ AdminSignalSchema,
16
+ AdminStatusSchema,
17
+ PlanDiffEntrySchema,
18
+ ResourceListSchema,
19
+ STAFF_ROLE_RANK,
20
+ SignalReadingSchema,
21
+ StaffRoleSchema,
22
+ assertApplyAllowed,
23
+ resolveContractUrl,
24
+ roleAtLeast
25
+ } from "./chunk-ERZTZ3PW.js";
26
+ export {
27
+ ADMIN_CONTRACT_VERSION,
28
+ ActionPlanSchema,
29
+ ActionRequestSchema,
30
+ ActionResultSchema,
31
+ AdminActionSchema,
32
+ AdminColumnSchema,
33
+ AdminDomainIdSchema,
34
+ AdminDomainSchema,
35
+ AdminErrorSchema,
36
+ AdminManifestSchema,
37
+ AdminPolicySchema,
38
+ AdminResourceSchema,
39
+ AdminSeveritySchema,
40
+ AdminSignalSchema,
41
+ AdminStatusSchema,
42
+ PlanDiffEntrySchema,
43
+ ResourceListSchema,
44
+ STAFF_ROLE_RANK,
45
+ SignalReadingSchema,
46
+ StaffRoleSchema,
47
+ assertApplyAllowed,
48
+ resolveContractUrl,
49
+ roleAtLeast
50
+ };
51
+ //# sourceMappingURL=admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}