@substrat-run/engine-workorder 0.9.2 → 0.10.2

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/dist/index.d.ts CHANGED
@@ -1,3 +1,22 @@
1
+ /**
2
+ * engine-workorder — composed **by call**, not by event.
3
+ *
4
+ * The in-scope functions are the surface: `createWorkOrder`, `assignWorkOrder`,
5
+ * `startWorkOrder`, `reportTime`, `reportMaterial`, `completeWorkOrder`,
6
+ * `closeWorkOrder`, `getReportedLines`, `listOrders`. A vertical imports those into
7
+ * its OWN operations and runs them inside its own transaction — Callout's
8
+ * `callout/complete-workorder` is a permission check and one call.
9
+ *
10
+ * So the registered operations below are thin by design: each is
11
+ * `assertAllowed(await ctx.check(PERM.…))` plus the matching export, and it is the
12
+ * export that carries the invariant. That is what lets a vertical extend by
13
+ * composition rather than by forking — and why the lifecycle check lives with the
14
+ * in-scope function (`lifecycle.ts`), where both routes in pass through it.
15
+ *
16
+ * This engine emits events as every engine does, but nothing composes it by
17
+ * consuming them: `invoicing` is the by-event engine downstream of
18
+ * `workorder.completed`, which is a different relationship from being composed.
19
+ */
1
20
  import { z } from 'zod';
2
21
  import { type Page, type Money } from '@substrat-run/contracts';
3
22
  import type { PageParams } from '@substrat-run/kernel';
@@ -147,6 +166,34 @@ export declare const createWorkOrderInput: z.ZodObject<{
147
166
  description: z.ZodOptional<z.ZodString>;
148
167
  }, z.core.$strip>;
149
168
  export type CreateWorkOrderInput = z.infer<typeof createWorkOrderInput>;
169
+ /**
170
+ * The inputs of the four in-scope functions extracted in #975 are the schemas
171
+ * their default operation bindings DECLARE — read from `operations.ts`, never
172
+ * restated here. One description of each input, parsed on the way in whether
173
+ * the call arrives through the operation or from a vertical's own code.
174
+ */
175
+ export declare const assignWorkOrderInput: z.ZodObject<{
176
+ orderId: z.ZodString;
177
+ technician: z.ZodString;
178
+ }, z.core.$strip>;
179
+ export type AssignWorkOrderInput = z.infer<typeof assignWorkOrderInput>;
180
+ export declare const startWorkOrderInput: z.ZodObject<{
181
+ orderId: z.ZodString;
182
+ }, z.core.$strip>;
183
+ export type StartWorkOrderInput = z.infer<typeof startWorkOrderInput>;
184
+ export declare const reportTimeInput: z.ZodObject<{
185
+ orderId: z.ZodString;
186
+ hours: z.ZodString;
187
+ note: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strip>;
189
+ export type ReportTimeInput = z.infer<typeof reportTimeInput>;
190
+ export declare const reportMaterialInput: z.ZodObject<{
191
+ orderId: z.ZodString;
192
+ article: z.ZodString;
193
+ qty: z.ZodString;
194
+ note: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>;
196
+ export type ReportMaterialInput = z.infer<typeof reportMaterialInput>;
150
197
  export declare function createWorkOrder(ctx: OperationContext, rawInput: CreateWorkOrderInput): WorkOrder;
151
198
  /**
152
199
  * Everything reported against one order — the read a vertical prices FROM (§4).
@@ -189,6 +236,27 @@ export declare function listOrders(ctx: OperationContext, page: PageParams): Pag
189
236
  * names nothing is a caller's mistake, and `getRow` already refuses it.
190
237
  */
191
238
  export declare function getWorkOrder(ctx: OperationContext, orderId: string): WorkOrder;
239
+ /**
240
+ * Assign a technician. Records and emits; the order stays `planned` (§3).
241
+ *
242
+ * In-scope (K-16) since #975: `assignWorkOrder`, `startWorkOrder`, `reportTime`
243
+ * and `reportMaterial` used to live inline in their operation handlers, so a
244
+ * vertical could not assign, start or report inside its own transaction without
245
+ * forking — the exact failure the by-call shape exists to prevent. Each is now a
246
+ * plain export, and `workorder/assign` … `workorder/report-material` below are
247
+ * their default bindings. The CALLER owns the permission check, as with every
248
+ * other function in this section.
249
+ */
250
+ export declare function assignWorkOrder(ctx: OperationContext, rawInput: AssignWorkOrderInput): WorkOrder;
251
+ /** planned → in_progress. See `assignWorkOrder` for why this is exported. */
252
+ export declare function startWorkOrder(ctx: OperationContext, rawInput: StartWorkOrderInput): WorkOrder;
253
+ /**
254
+ * Append a time entry, attributed to the acting principal. Append-only: there
255
+ * is no update path, so a correction is another entry (§2).
256
+ */
257
+ export declare function reportTime(ctx: OperationContext, rawInput: ReportTimeInput): TimeEntry;
258
+ /** Append a material line, reported by the acting principal. Append-only, as above. */
259
+ export declare function reportMaterial(ctx: OperationContext, rawInput: ReportMaterialInput): MaterialLine;
192
260
  export declare function completeWorkOrder(ctx: OperationContext, input: {
193
261
  orderId: string;
194
262
  billable: BillableLine[];
@@ -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,EAaL,KAAK,IAAI,EAET,KAAK,KAAK,EAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,iCAI7B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAElF,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAStB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,OAAO,EACP,SAAS,EACT,SAAS,EACT,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAQ9B,eAAO,MAAM,IAAI;IACf,MAAM;IACN,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AWG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAE9E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,GAAG,SAAS,CAiBhG;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,GAAG,SAAS,CAa9F;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,eAAe,GAAG,SAAS,CA2BtF;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,GAAG,YAAY,CA0BjG;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,GACnD;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CA+BpC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAY3F;AAyDD,eAAO,MAAM,eAAe,EAAE,kBAiB7B,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,24 @@
1
+ /**
2
+ * engine-workorder — composed **by call**, not by event.
3
+ *
4
+ * The in-scope functions are the surface: `createWorkOrder`, `assignWorkOrder`,
5
+ * `startWorkOrder`, `reportTime`, `reportMaterial`, `completeWorkOrder`,
6
+ * `closeWorkOrder`, `getReportedLines`, `listOrders`. A vertical imports those into
7
+ * its OWN operations and runs them inside its own transaction — Callout's
8
+ * `callout/complete-workorder` is a permission check and one call.
9
+ *
10
+ * So the registered operations below are thin by design: each is
11
+ * `assertAllowed(await ctx.check(PERM.…))` plus the matching export, and it is the
12
+ * export that carries the invariant. That is what lets a vertical extend by
13
+ * composition rather than by forking — and why the lifecycle check lives with the
14
+ * in-scope function (`lifecycle.ts`), where both routes in pass through it.
15
+ *
16
+ * This engine emits events as every engine does, but nothing composes it by
17
+ * consuming them: `invoicing` is the by-event engine downstream of
18
+ * `workorder.completed`, which is a different relationship from being composed.
19
+ */
1
20
  import { z } from 'zod';
2
- import { addMoney, assertTransition, INVALID_TRANSITION, dataSubjectId, entityRef, money, mapPage, moduleManifest, moneyOf, permissionKey, listsDeclaredBy, substratError, } from '@substrat-run/contracts';
21
+ import { addMoney, assertTransition, INVALID_TRANSITION, dataSubjectId, entityRef, money, mapPage, moduleManifest, moneyOf, operationInputsOf, permissionKey, listsDeclaredBy, substratError, } from '@substrat-run/contracts';
3
22
  /**
4
23
  * The conflict reasons this engine raises — its own vocabulary, narrowing the platform's
5
24
  * `conflict` code (#113). Exported so a vertical can branch on WHY a refusal happened
@@ -133,6 +152,16 @@ export const createWorkOrderInput = z.object({
133
152
  title: z.string().min(1),
134
153
  description: z.string().optional(),
135
154
  });
155
+ /**
156
+ * The inputs of the four in-scope functions extracted in #975 are the schemas
157
+ * their default operation bindings DECLARE — read from `operations.ts`, never
158
+ * restated here. One description of each input, parsed on the way in whether
159
+ * the call arrives through the operation or from a vertical's own code.
160
+ */
161
+ export const assignWorkOrderInput = workorderOperations['workorder/assign'].input;
162
+ export const startWorkOrderInput = workorderOperations['workorder/start'].input;
163
+ export const reportTimeInput = workorderOperations['workorder/report-time'].input;
164
+ export const reportMaterialInput = workorderOperations['workorder/report-material'].input;
136
165
  /**
137
166
  * A work order as this engine PUBLISHES it — not as it stores it.
138
167
  *
@@ -301,6 +330,90 @@ export function listOrders(ctx, page) {
301
330
  export function getWorkOrder(ctx, orderId) {
302
331
  return toWorkOrder(getRow(ctx, orderId));
303
332
  }
333
+ /**
334
+ * Assign a technician. Records and emits; the order stays `planned` (§3).
335
+ *
336
+ * In-scope (K-16) since #975: `assignWorkOrder`, `startWorkOrder`, `reportTime`
337
+ * and `reportMaterial` used to live inline in their operation handlers, so a
338
+ * vertical could not assign, start or report inside its own transaction without
339
+ * forking — the exact failure the by-call shape exists to prevent. Each is now a
340
+ * plain export, and `workorder/assign` … `workorder/report-material` below are
341
+ * their default bindings. The CALLER owns the permission check, as with every
342
+ * other function in this section.
343
+ */
344
+ export function assignWorkOrder(ctx, rawInput) {
345
+ const input = assignWorkOrderInput.parse(rawInput);
346
+ const row = getRow(ctx, input.orderId);
347
+ requireTransition(row, 'workorder/assign');
348
+ ctx.sql.exec('UPDATE workorder_orders SET assigned_to = ? WHERE id = ?', [
349
+ input.technician,
350
+ row.id,
351
+ ]);
352
+ ctx.emit({
353
+ type: 'workorder.assigned',
354
+ schemaVersion: 1,
355
+ entity: orderRef(row.id),
356
+ piiClass: 'pseudonymous',
357
+ subjectId: dataSubjectId.parse(input.technician),
358
+ payload: { orderId: row.id, technician: input.technician },
359
+ });
360
+ return toWorkOrder(getRow(ctx, row.id));
361
+ }
362
+ /** planned → in_progress. See `assignWorkOrder` for why this is exported. */
363
+ export function startWorkOrder(ctx, rawInput) {
364
+ const input = startWorkOrderInput.parse(rawInput);
365
+ const row = getRow(ctx, input.orderId);
366
+ requireTransition(row, 'workorder/start');
367
+ ctx.sql.exec(`UPDATE workorder_orders SET status = 'in_progress' WHERE id = ?`, [row.id]);
368
+ ctx.emit({
369
+ type: 'workorder.started',
370
+ schemaVersion: 1,
371
+ entity: orderRef(row.id),
372
+ piiClass: 'none',
373
+ payload: { orderId: row.id },
374
+ });
375
+ return toWorkOrder(getRow(ctx, row.id));
376
+ }
377
+ /**
378
+ * Append a time entry, attributed to the acting principal. Append-only: there
379
+ * is no update path, so a correction is another entry (§2).
380
+ */
381
+ export function reportTime(ctx, rawInput) {
382
+ const input = reportTimeInput.parse(rawInput);
383
+ const hours = decimal.parse(input.hours);
384
+ const row = getRow(ctx, input.orderId);
385
+ requireTransition(row, 'workorder/report-time');
386
+ const id = ulid();
387
+ ctx.sql.exec(`INSERT INTO workorder_time_entries (id, order_id, technician, hours, note, reported_at)
388
+ VALUES (?, ?, ?, ?, ?, ?)`, [id, row.id, ctx.principal, hours, input.note ?? null, ctx.now()]);
389
+ ctx.emit({
390
+ type: 'workorder.time-reported',
391
+ schemaVersion: 1,
392
+ entity: orderRef(row.id),
393
+ piiClass: 'pseudonymous',
394
+ subjectId: dataSubjectId.parse(ctx.principal),
395
+ payload: { orderId: row.id, entryId: id, hours },
396
+ });
397
+ return returns(timeEntry, `time entry ${id}`, ctx.sql.query(`SELECT ${TIME_ENTRY_COLUMNS} FROM workorder_time_entries WHERE id = ?`, [id])[0]);
398
+ }
399
+ /** Append a material line, reported by the acting principal. Append-only, as above. */
400
+ export function reportMaterial(ctx, rawInput) {
401
+ const input = reportMaterialInput.parse(rawInput);
402
+ const qty = decimal.parse(input.qty);
403
+ const row = getRow(ctx, input.orderId);
404
+ requireTransition(row, 'workorder/report-material');
405
+ const id = ulid();
406
+ ctx.sql.exec(`INSERT INTO workorder_material_lines (id, order_id, article, qty, note, reported_by, reported_at)
407
+ VALUES (?, ?, ?, ?, ?, ?, ?)`, [id, row.id, input.article, qty, input.note ?? null, ctx.principal, ctx.now()]);
408
+ ctx.emit({
409
+ type: 'workorder.material-reported',
410
+ schemaVersion: 1,
411
+ entity: orderRef(row.id),
412
+ piiClass: 'none',
413
+ payload: { orderId: row.id, lineId: id, article: input.article, qty },
414
+ });
415
+ return returns(materialLine, `material line ${id}`, ctx.sql.query(`SELECT ${MATERIAL_LINE_COLUMNS} FROM workorder_material_lines WHERE id = ?`, [id])[0]);
416
+ }
304
417
  export function completeWorkOrder(ctx, input) {
305
418
  const row = getRow(ctx, input.orderId);
306
419
  requireTransition(row, 'workorder/complete');
@@ -364,70 +477,19 @@ const listOp = async (ctx, input) => {
364
477
  };
365
478
  const assignOp = async (ctx, input) => {
366
479
  assertAllowed(await ctx.check(PERM.assign));
367
- const row = getRow(ctx, input.orderId);
368
- requireTransition(row, 'workorder/assign');
369
- ctx.sql.exec('UPDATE workorder_orders SET assigned_to = ? WHERE id = ?', [
370
- input.technician,
371
- row.id,
372
- ]);
373
- ctx.emit({
374
- type: 'workorder.assigned',
375
- schemaVersion: 1,
376
- entity: orderRef(row.id),
377
- piiClass: 'pseudonymous',
378
- subjectId: dataSubjectId.parse(input.technician),
379
- payload: { orderId: row.id, technician: input.technician },
380
- });
381
- return toWorkOrder(getRow(ctx, row.id));
480
+ return assignWorkOrder(ctx, input);
382
481
  };
383
482
  const startOp = async (ctx, input) => {
384
483
  assertAllowed(await ctx.check(PERM.report));
385
- const row = getRow(ctx, input.orderId);
386
- requireTransition(row, 'workorder/start');
387
- ctx.sql.exec(`UPDATE workorder_orders SET status = 'in_progress' WHERE id = ?`, [row.id]);
388
- ctx.emit({
389
- type: 'workorder.started',
390
- schemaVersion: 1,
391
- entity: orderRef(row.id),
392
- piiClass: 'none',
393
- payload: { orderId: row.id },
394
- });
395
- return toWorkOrder(getRow(ctx, row.id));
484
+ return startWorkOrder(ctx, input);
396
485
  };
397
486
  const reportTimeOp = async (ctx, input) => {
398
487
  assertAllowed(await ctx.check(PERM.report));
399
- const hours = decimal.parse(input.hours);
400
- const row = getRow(ctx, input.orderId);
401
- requireTransition(row, 'workorder/report-time');
402
- const id = ulid();
403
- ctx.sql.exec(`INSERT INTO workorder_time_entries (id, order_id, technician, hours, note, reported_at)
404
- VALUES (?, ?, ?, ?, ?, ?)`, [id, row.id, ctx.principal, hours, input.note ?? null, ctx.now()]);
405
- ctx.emit({
406
- type: 'workorder.time-reported',
407
- schemaVersion: 1,
408
- entity: orderRef(row.id),
409
- piiClass: 'pseudonymous',
410
- subjectId: dataSubjectId.parse(ctx.principal),
411
- payload: { orderId: row.id, entryId: id, hours },
412
- });
413
- return returns(timeEntry, `time entry ${id}`, ctx.sql.query(`SELECT ${TIME_ENTRY_COLUMNS} FROM workorder_time_entries WHERE id = ?`, [id])[0]);
488
+ return reportTime(ctx, input);
414
489
  };
415
490
  const reportMaterialOp = async (ctx, input) => {
416
491
  assertAllowed(await ctx.check(PERM.report));
417
- const qty = decimal.parse(input.qty);
418
- const row = getRow(ctx, input.orderId);
419
- requireTransition(row, 'workorder/report-material');
420
- const id = ulid();
421
- ctx.sql.exec(`INSERT INTO workorder_material_lines (id, order_id, article, qty, note, reported_by, reported_at)
422
- VALUES (?, ?, ?, ?, ?, ?, ?)`, [id, row.id, input.article, qty, input.note ?? null, ctx.principal, ctx.now()]);
423
- ctx.emit({
424
- type: 'workorder.material-reported',
425
- schemaVersion: 1,
426
- entity: orderRef(row.id),
427
- piiClass: 'none',
428
- payload: { orderId: row.id, lineId: id, article: input.article, qty },
429
- });
430
- return returns(materialLine, `material line ${id}`, ctx.sql.query(`SELECT ${MATERIAL_LINE_COLUMNS} FROM workorder_material_lines WHERE id = ?`, [id])[0]);
492
+ return reportMaterial(ctx, input);
431
493
  };
432
494
  const completeOp = async (ctx, input) => {
433
495
  assertAllowed(await ctx.check(PERM.complete));
@@ -440,6 +502,10 @@ const closeOp = async (ctx, input) => {
440
502
  export const workorderModule = {
441
503
  manifest: workorderManifest,
442
504
  migrations: workorderMigrations,
505
+ // The host parses every invocation against the same declaration the manifest
506
+ // and the routes come from, so "parse, don't trust" holds on every path in
507
+ // rather than in the handlers that remembered (#953).
508
+ operationInputs: operationInputsOf(workorderOperations),
443
509
  operations: {
444
510
  'workorder/get': getOp,
445
511
  'workorder/list': listOp,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,KAAK,EACL,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,EACb,eAAe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GAAwD,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IACjG,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,OAAO,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,UAAU,GAGZ,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IACvB,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9C,OAAO,iBAAiB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,OAAO,GAAqD,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IACrF,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,OAAO,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,mBAAmB;IAC/B,6EAA6E;IAC7E,2EAA2E;IAC3E,sDAAsD;IACtD,eAAe,EAAE,iBAAiB,CAAC,mBAAmB,CAAC;IACvD,UAAU,EAAE;QACV,eAAe,EAAE,KAAyC;QAC1D,gBAAgB,EAAE,MAA0C;QAC5D,kBAAkB,EAAE,QAA4C;QAChE,iBAAiB,EAAE,OAA2C;QAC9D,uBAAuB,EAAE,YAAgD;QACzE,2BAA2B,EAAE,gBAAoD;QACjF,oBAAoB,EAAE,UAA8C;QACpE,iBAAiB,EAAE,OAA2C;KAC/D;CACF,CAAC"}
@@ -153,7 +153,7 @@ export declare const workorderOperations: {
153
153
  };
154
154
  readonly 'workorder/start': {
155
155
  readonly summary: "Start the work";
156
- readonly permission: "workorder:assign";
156
+ readonly permission: "workorder:report";
157
157
  readonly input: z.ZodObject<{
158
158
  orderId: z.ZodString;
159
159
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAoB,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAI9D,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,YAChC,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,CACT,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2E9B,CAAC"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAoB,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAI9D,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,YAChC,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,CACT,CAAC;AAIX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E9B,CAAC"}
@@ -71,7 +71,11 @@ export const workorderOperations = defineOperations(workorderEntities, WORKORDER
71
71
  },
72
72
  'workorder/start': {
73
73
  summary: 'Start the work',
74
- permission: 'workorder:assign',
74
+ // `workorder:report`, not `workorder:assign` (#960): the handler checks
75
+ // `PERM.report` and the manifest describes that key as "Start work, report
76
+ // time and material". `test/permissions.test.ts` holds every declaration
77
+ // here to the key its handler actually checks.
78
+ permission: 'workorder:report',
75
79
  input: orderId,
76
80
  output: workOrder,
77
81
  },
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,gBAAgB,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,mEAAmE;AACnE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;CACT,CAAC;AAEX,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;IAC5F,eAAe,EAAE;QACf,OAAO,EA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AAE,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;KAC1D;IAED,iBAAiB,EAAE;QACjB,OAAO,EAAE,8BAA8B;QACvC,UAAU,EAAE,iBAAiB;QAC7B,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAC"}
package/dist/seam.d.ts CHANGED
@@ -1,64 +1,5 @@
1
- /**
2
- * The engine seam, PARSED rather than asserted (#771).
3
- *
4
- * "Parse, don't trust" was enforced in one direction only. Operation inputs go
5
- * through Zod at the boundary; return values crossing the engine seam were
6
- * trusted because TypeScript said so — and TypeScript is not there at runtime.
7
- * The failure that lets through is precise: a vertical compiled against engine
8
- * 0.3, running against engine 0.4, whose row shape moved. The vertical reads a
9
- * field that is now `null`, or misses one that appeared, and the first symptom is
10
- * wrong data on a screen rather than a throw.
11
- *
12
- * This file is the two halves of closing that:
13
- *
14
- * - `returns(schema, surface, value)` — every published shape is parsed on the way
15
- * OUT, by the same schema a composing vertical declares its `output` with. The
16
- * engine's five public surfaces (D-28) evolve additively *by review*; this makes
17
- * a row that stopped matching the published shape a throw at the seam.
18
- * - `columnsOf(schema)` — the SELECT list is DERIVED from the published schema, so
19
- * a read asks for exactly the columns the seam promises. `SELECT *` pinned the
20
- * public return shape to whatever the physical table currently held: a column
21
- * added upstream leaked through the seam, and a column renamed became a missing
22
- * field nothing noticed.
23
- *
24
- * ## Decisions (#771 open questions 1 and 2)
25
- *
26
- * **Parse always** — including on bulk reads. The boring answer, taken because no
27
- * benchmark says otherwise and the alternative (dev-only validation) makes the
28
- * check absent exactly where the version skew lives: in production, against an
29
- * engine nobody in this repo deployed. Every read here is either one row or one
30
- * page (#811), so the parsed set is bounded by construction.
31
- *
32
- * **A helper, not a convention.** One call site per surface, one spelling, and a
33
- * shape `boundary-lint` can plausibly be taught to require of an exported in-scope
34
- * function later — a convention repeated in seven engines is a habit, and habits
35
- * are what the checkpoints in this repo exist to replace.
36
- */
37
- import { z } from '@substrat-run/contracts';
38
- /**
39
- * Parse a value on its way ACROSS the seam, or refuse to publish it.
40
- *
41
- * The throw is `internal`, deliberately, and not `validation_failed`: the caller's
42
- * input was already parsed and is not what went wrong — the engine's own stored
43
- * row no longer matches the shape the engine publishes. `validation_failed` is a
44
- * 400 blaming the caller for a fault on this side, and `toProblem` drops
45
- * `internal`'s detail from the response body, so the drift is logged rather than
46
- * handed to a client that can do nothing with it.
47
- */
48
- export declare function returns<T>(schema: z.ZodType<T>, surface: string, value: unknown): T;
49
- /**
50
- * The SELECT list a schema describes: `'id, order_id, technician, …'`.
51
- *
52
- * Derived rather than transcribed, for the same reason the manifest's `lists` are
53
- * derived from the operations' own `paged.over` — two descriptions of one column
54
- * set is how they come to disagree. A column dropped from the table is then a SQL
55
- * error naming it, and a column added to the table is simply never read.
56
- *
57
- * Structurally typed (`{ shape }`) rather than taking a `z.ZodObject`, so it
58
- * accepts both the published schemas and the entity registry's row schema without
59
- * either widening to `any`.
60
- */
61
- export declare function columnsOf(schema: {
1
+ /** How this engine names itself in a seam failure. */
2
+ export declare const columnsOf: (schema: {
62
3
  readonly shape: Readonly<Record<string, unknown>>;
63
- }): string;
4
+ }) => string, returns: <T>(schema: import("zod").ZodType<T>, surface: string, value: unknown) => T;
64
5
  //# sourceMappingURL=seam.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seam.d.ts","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAuC,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAKjF;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAUnF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAAE,GAAG,MAAM,CAU/F"}
1
+ {"version":3,"file":"seam.d.ts","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAcA,sDAAsD;AACtD,eAAO,MAAQ,SAAS;;cAAE,OAAO,6EAAmC,CAAC"}
package/dist/seam.js CHANGED
@@ -1,82 +1,16 @@
1
1
  /**
2
- * The engine seam, PARSED rather than asserted (#771).
3
- *
4
- * "Parse, don't trust" was enforced in one direction only. Operation inputs go
5
- * through Zod at the boundary; return values crossing the engine seam were
6
- * trusted because TypeScript said so and TypeScript is not there at runtime.
7
- * The failure that lets through is precise: a vertical compiled against engine
8
- * 0.3, running against engine 0.4, whose row shape moved. The vertical reads a
9
- * field that is now `null`, or misses one that appeared, and the first symptom is
10
- * wrong data on a screen rather than a throw.
11
- *
12
- * This file is the two halves of closing that:
13
- *
14
- * - `returns(schema, surface, value)` — every published shape is parsed on the way
15
- * OUT, by the same schema a composing vertical declares its `output` with. The
16
- * engine's five public surfaces (D-28) evolve additively *by review*; this makes
17
- * a row that stopped matching the published shape a throw at the seam.
18
- * - `columnsOf(schema)` — the SELECT list is DERIVED from the published schema, so
19
- * a read asks for exactly the columns the seam promises. `SELECT *` pinned the
20
- * public return shape to whatever the physical table currently held: a column
21
- * added upstream leaked through the seam, and a column renamed became a missing
22
- * field nothing noticed.
23
- *
24
- * ## Decisions (#771 open questions 1 and 2)
25
- *
26
- * **Parse always** — including on bulk reads. The boring answer, taken because no
27
- * benchmark says otherwise and the alternative (dev-only validation) makes the
28
- * check absent exactly where the version skew lives: in production, against an
29
- * engine nobody in this repo deployed. Every read here is either one row or one
30
- * page (#811), so the parsed set is bounded by construction.
31
- *
32
- * **A helper, not a convention.** One call site per surface, one spelling, and a
33
- * shape `boundary-lint` can plausibly be taught to require of an exported in-scope
34
- * function later — a convention repeated in seven engines is a habit, and habits
35
- * are what the checkpoints in this repo exist to replace.
2
+ * The engine seam (#771) for engine-workorder the NAME, and nothing else.
3
+ *
4
+ * `returns(schema, surface, value)` and `columnsOf(schema)` live in
5
+ * `@substrat-run/contracts` (#970). Four engines carried byte-identical copies of
6
+ * the implementation, differing only in the name each put into a seam failure —
7
+ * so the seam had itself become the kind of convention-repeated-in-seven-engines
8
+ * that it was written to replace. The prose explaining what the two helpers are
9
+ * FOR, and why parsing is unconditional, lives with them in
10
+ * `packages/contracts/src/seam.ts`; this engine's reference conversion is the
11
+ * call sites in `index.ts`.
36
12
  */
37
- import { substratError, validationIssuesFrom, z } from '@substrat-run/contracts';
13
+ import { engineSeam } from '@substrat-run/contracts';
38
14
  /** How this engine names itself in a seam failure. */
39
- const ENGINE = 'engine-workorder';
40
- /**
41
- * Parse a value on its way ACROSS the seam, or refuse to publish it.
42
- *
43
- * The throw is `internal`, deliberately, and not `validation_failed`: the caller's
44
- * input was already parsed and is not what went wrong — the engine's own stored
45
- * row no longer matches the shape the engine publishes. `validation_failed` is a
46
- * 400 blaming the caller for a fault on this side, and `toProblem` drops
47
- * `internal`'s detail from the response body, so the drift is logged rather than
48
- * handed to a client that can do nothing with it.
49
- */
50
- export function returns(schema, surface, value) {
51
- const result = schema.safeParse(value);
52
- if (result.success)
53
- return result.data;
54
- const issues = validationIssuesFrom(result.error)
55
- .map((issue) => `${issue.path || '(root)'}: ${issue.message}`)
56
- .join('; ');
57
- throw substratError('internal', `${ENGINE}: ${surface} does not match the shape this engine publishes — ${issues}`);
58
- }
59
- /**
60
- * The SELECT list a schema describes: `'id, order_id, technician, …'`.
61
- *
62
- * Derived rather than transcribed, for the same reason the manifest's `lists` are
63
- * derived from the operations' own `paged.over` — two descriptions of one column
64
- * set is how they come to disagree. A column dropped from the table is then a SQL
65
- * error naming it, and a column added to the table is simply never read.
66
- *
67
- * Structurally typed (`{ shape }`) rather than taking a `z.ZodObject`, so it
68
- * accepts both the published schemas and the entity registry's row schema without
69
- * either widening to `any`.
70
- */
71
- export function columnsOf(schema) {
72
- const names = Object.keys(schema.shape);
73
- for (const name of names) {
74
- // These are code-defined identifiers, never input — the check is here so that
75
- // stays true of a schema key somebody adds later.
76
- if (!/^[a-z_][a-z0-9_]*$/i.test(name)) {
77
- throw new Error(`${ENGINE}: ${name} is not a column name`);
78
- }
79
- }
80
- return names.join(', ');
81
- }
15
+ export const { columnsOf, returns } = engineSeam('engine-workorder');
82
16
  //# sourceMappingURL=seam.js.map
package/dist/seam.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"seam.js","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAEjF,sDAAsD;AACtD,MAAM,MAAM,GAAG,kBAAkB,CAAC;AAElC;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAI,MAAoB,EAAE,OAAe,EAAE,KAAc;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC;IACvC,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;SAC7D,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,aAAa,CACjB,UAAU,EACV,GAAG,MAAM,KAAK,OAAO,qDAAqD,MAAM,EAAE,CACnF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,MAA6D;IACrF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,8EAA8E;QAC9E,kDAAkD;QAClD,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,KAAK,IAAI,uBAAuB,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"seam.js","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,sDAAsD;AACtD,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/engine-workorder",
3
- "version": "0.9.2",
3
+ "version": "0.10.2",
4
4
  "description": "Substrat engine: work orders + time + material — one engine, one state machine, append-only reporting",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -25,16 +25,16 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@substrat-run/kernel": "^0.91.0",
29
- "@substrat-run/contracts": "^0.91.0"
28
+ "@substrat-run/contracts": "^0.94.0",
29
+ "@substrat-run/kernel": "^0.94.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "typescript": "^7.0.0",
33
33
  "vitest": "^3.2.7",
34
34
  "zod": "^4.4.3",
35
- "@substrat-run/engine-test-kit": "^0.3.18",
36
- "@substrat-run/model-emit": "0.8.4",
37
- "@substrat-run/contract-tests": "^0.91.0"
35
+ "@substrat-run/contract-tests": "^0.94.0",
36
+ "@substrat-run/model-emit": "0.8.9",
37
+ "@substrat-run/engine-test-kit": "^0.3.21"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "zod": "^4.4.0"