@happyvertical/smrt-manufacturing 0.53.5 → 0.53.6

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.
Files changed (67) hide show
  1. package/AGENTS.md +18 -6
  2. package/README.md +69 -3
  3. package/agents/multilevel-and-runs.md +28 -0
  4. package/dist/collections/ProductionRunCollection.d.ts +15 -0
  5. package/dist/collections/ProductionRunCollection.d.ts.map +1 -0
  6. package/dist/collections/ProductionRunCompletionCollection.d.ts +14 -0
  7. package/dist/collections/ProductionRunCompletionCollection.d.ts.map +1 -0
  8. package/dist/collections/index.d.ts +2 -0
  9. package/dist/collections/index.d.ts.map +1 -1
  10. package/dist/index.d.ts +13 -5
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +972 -81
  13. package/dist/index.js.map +1 -1
  14. package/dist/manifest.json +630 -1
  15. package/dist/models/ProductionRun.d.ts +67 -0
  16. package/dist/models/ProductionRun.d.ts.map +1 -0
  17. package/dist/models/ProductionRunCompletion.d.ts +36 -0
  18. package/dist/models/ProductionRunCompletion.d.ts.map +1 -0
  19. package/dist/models/index.d.ts +2 -0
  20. package/dist/models/index.d.ts.map +1 -1
  21. package/dist/operation-types.d.ts +9 -0
  22. package/dist/operation-types.d.ts.map +1 -1
  23. package/dist/production-run-types.d.ts +100 -0
  24. package/dist/production-run-types.d.ts.map +1 -0
  25. package/dist/quantity.d.ts +36 -0
  26. package/dist/quantity.d.ts.map +1 -0
  27. package/dist/services/AssemblyService.d.ts +7 -2
  28. package/dist/services/AssemblyService.d.ts.map +1 -1
  29. package/dist/services/BomService.d.ts +84 -5
  30. package/dist/services/BomService.d.ts.map +1 -1
  31. package/dist/services/ProductionRunService.d.ts +123 -0
  32. package/dist/services/ProductionRunService.d.ts.map +1 -0
  33. package/dist/services/ProductionService.d.ts +11 -0
  34. package/dist/services/ProductionService.d.ts.map +1 -1
  35. package/dist/services/index.d.ts +2 -0
  36. package/dist/services/index.d.ts.map +1 -1
  37. package/dist/services/structure-walk.d.ts +77 -0
  38. package/dist/services/structure-walk.d.ts.map +1 -0
  39. package/dist/smrt-knowledge.json +514 -7
  40. package/dist/svelte/components/ProductionRunList.svelte +213 -0
  41. package/dist/svelte/components/ProductionRunList.svelte.d.ts +18 -0
  42. package/dist/svelte/components/ProductionRunList.svelte.d.ts.map +1 -0
  43. package/dist/svelte/components/RequirementsTree.svelte +125 -0
  44. package/dist/svelte/components/RequirementsTree.svelte.d.ts +13 -0
  45. package/dist/svelte/components/RequirementsTree.svelte.d.ts.map +1 -0
  46. package/dist/svelte/components/RequirementsTreeLevel.svelte +120 -0
  47. package/dist/svelte/components/RequirementsTreeLevel.svelte.d.ts +12 -0
  48. package/dist/svelte/components/RequirementsTreeLevel.svelte.d.ts.map +1 -0
  49. package/dist/svelte/i18n.d.ts +32 -0
  50. package/dist/svelte/i18n.d.ts.map +1 -1
  51. package/dist/svelte/i18n.js +32 -0
  52. package/dist/svelte/index.d.ts +9 -4
  53. package/dist/svelte/index.d.ts.map +1 -1
  54. package/dist/svelte/index.js +9 -4
  55. package/dist/svelte/types.d.ts +87 -0
  56. package/dist/svelte/types.d.ts.map +1 -1
  57. package/dist/svelte/types.js +123 -0
  58. package/dist/tenant-scope.d.ts +25 -0
  59. package/dist/tenant-scope.d.ts.map +1 -0
  60. package/dist/types.d.ts +207 -3
  61. package/dist/types.d.ts.map +1 -1
  62. package/dist/types.js +13 -1
  63. package/dist/types.js.map +1 -1
  64. package/dist/ui.d.ts.map +1 -1
  65. package/dist/ui.js +23 -1
  66. package/dist/ui.js.map +1 -1
  67. package/package.json +11 -10
@@ -100,6 +100,12 @@ export interface ConsumeMaterialsOptions {
100
100
  * Optional free-form note attached to every emitted movement.
101
101
  */
102
102
  note?: string;
103
+ /**
104
+ * Optional override of the `sourceType` stamped on each movement, with
105
+ * the order's `id` as `sourceId`. Defaults to `'ProductionOrder'`;
106
+ * `ProductionRunService` passes `'ProductionRunCompletion'`.
107
+ */
108
+ sourceType?: string;
103
109
  }
104
110
  /**
105
111
  * Per-call options for {@link ProductionService.produceFinishedGoods}.
@@ -131,6 +137,11 @@ export interface ProduceFinishedGoodsOptions {
131
137
  * Optional free-form note attached to the emitted movement.
132
138
  */
133
139
  note?: string;
140
+ /**
141
+ * Optional override of the `sourceType` stamped on the movement. Defaults
142
+ * to `'ProductionOrder'`; see {@link ConsumeMaterialsOptions.sourceType}.
143
+ */
144
+ sourceType?: string;
134
145
  }
135
146
  /**
136
147
  * Options accepted by {@link ProductionService.create}.
@@ -1 +1 @@
1
- {"version":3,"file":"ProductionService.d.ts","sourceRoot":"","sources":["../../src/services/ProductionService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EACV,mBAAmB,EAEnB,YAAY,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;A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G,gBAAgB,CACpB,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,aAAa,EAAE,CAAC;IAO3B;;;;;;;;OAQG;IACG,oBAAoB,CACxB,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,aAAa,CAAC;IAOzB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,aAAa,CACjB,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE;QACP,OAAO,EAAE,uBAAuB,CAAC;QACjC,OAAO,EAAE,2BAA2B,CAAC;KACtC,GACA,OAAO,CAAC,mBAAmB,CAAC;IAc/B;;;;;OAKG;YACW,cAAc;IA4B5B;;;;;;OAMG;YACW,oBAAoB;IAuBlC;;;;OAIG;YACW,wBAAwB;IAiBtC;;;;;;;;;;;;;;;;;;;;OAoBG;YACW,UAAU;CAyBzB;AA4FD;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAID,YAAY,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"ProductionService.d.ts","sourceRoot":"","sources":["../../src/services/ProductionService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EACV,mBAAmB,EAEnB,YAAY,EACb,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIpD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,EAAE,CAAC,EA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ceOptions, type BillStructure, type
7
7
  export { BomService, type BomServiceOptions, type ComponentCostResolver, createBomService, } from './BomService.js';
8
8
  export { type InstalledManufacturingDispatchHandlers, type InstallManufacturingDispatchHandlersOptions, installManufacturingDispatchHandlers, type ProductionOrderCompletedPayload, type ProductionOrderPostedPayload, } from './dispatch-handlers.js';
9
9
  export { createOperationService, OperationService, type OperationServiceOptions, } from './OperationService.js';
10
+ export { createProductionRunService, ProductionRunService, type ProductionRunServiceOptions, } from './ProductionRunService.js';
10
11
  export { type ConsumeMaterialsOptions, type ConsumeResult, createProductionService, type ProduceFinishedGoodsOptions, type ProduceResult, type ProductionOrderRef, ProductionService, type ProductionServiceOptions, } from './ProductionService.js';
11
12
  export { createRoutingService, RoutingService, type RoutingServiceOptions, } from './RoutingService.js';
13
+ export { BomStructureCycleError } from './structure-walk.js';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,2CAA2C,EAChD,oCAAoC,EACpC,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,GAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,uBAAuB,EACvB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,2CAA2C,EAChD,oCAAoC,EACpC,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,GAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,uBAAuB,EACvB,KAAK,2BAA2B,EAChC,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The shared step of every multi-level walk in {@link BomService}: read a
3
+ * bill's lines, resolve each component, and decide whether to open a
4
+ * sub-assembly's active bill. Explosion, planning, cost and labour all walk
5
+ * the same way through this class, so they agree on what is opened.
6
+ *
7
+ * A walk is bounded three ways: by the caller's `levels`, by
8
+ * {@link MAX_EXPLOSION_DEPTH} and {@link MAX_EXPLOSION_LINES}, and by the path
9
+ * of products above the current line, which turns a cycle already present in
10
+ * stored data into a {@link BomStructureCycleError} instead of a loop.
11
+ *
12
+ * @internal
13
+ * @packageDocumentation
14
+ */
15
+ import type { BillOfMaterials } from '../models/BillOfMaterials.js';
16
+ import type { BomLine } from '../models/BomLine.js';
17
+ import { type ExplosionLevels, type ExplosionPathEntry } from '../types.js';
18
+ import { type AssemblyService, BomCycleError, type BomCyclePathEntry, type ResolvedComponent } from './AssemblyService.js';
19
+ /**
20
+ * Thrown when a multi-level walk meets a product that already contains
21
+ * itself in stored data (a loop saved before cycle refusal existed, or
22
+ * written around it). Carries the loop as `path`, like the
23
+ * {@link BomCycleError} it extends.
24
+ */
25
+ export declare class BomStructureCycleError extends BomCycleError {
26
+ name: string;
27
+ constructor(bomId: string, path: BomCyclePathEntry[]);
28
+ }
29
+ /**
30
+ * The deepest level a walk may open for `levels`. Throws for anything that is
31
+ * not a whole number from 1 to {@link MAX_EXPLOSION_DEPTH} or `'all'`.
32
+ */
33
+ export declare function maxLevelFor(levels: ExplosionLevels | undefined): number;
34
+ /** `true` when the caller asked for a walk rather than the single-level form. */
35
+ export declare function isMultiLevel(levels: ExplosionLevels | undefined): boolean;
36
+ /** One walk from one top bill; caches what it reads for the walk's lifetime. */
37
+ export declare class StructureWalk {
38
+ private readonly assemblies;
39
+ /** The bill the walk starts from. */
40
+ readonly top: BillOfMaterials;
41
+ /** The caller's `levels`. */
42
+ readonly levels: ExplosionLevels;
43
+ private readonly components;
44
+ private readonly bills;
45
+ private lineCount;
46
+ /** The deepest level whose lines the walk reads. */
47
+ readonly maxLevel: number;
48
+ constructor(assemblies: AssemblyService,
49
+ /** The bill the walk starts from. */
50
+ top: BillOfMaterials,
51
+ /** The caller's `levels`. */
52
+ levels: ExplosionLevels);
53
+ /**
54
+ * Resolve a component SKU, reading assemblies' active bills in the top
55
+ * bill's tenant so a shared assembly opens that tenant's bill.
56
+ */
57
+ resolve(skuId: string): Promise<ResolvedComponent>;
58
+ /**
59
+ * A bill's lines in the top bill's tenant (and global lines), counted
60
+ * against {@link MAX_EXPLOSION_LINES} every time the walk visits them (a
61
+ * shared sub-assembly counts once per use).
62
+ */
63
+ linesOf(bomId: string): Promise<BomLine[]>;
64
+ /** The path entry for the top bill. */
65
+ root(): Promise<ExplosionPathEntry>;
66
+ /**
67
+ * The bill to open below a line at `level`, or `null` when the component
68
+ * is not a sub-assembly with an active bill or `levels` stops here.
69
+ *
70
+ * @throws {BomStructureCycleError} when the sub-assembly is already on
71
+ * `path` (it would contain itself).
72
+ * @throws {BomExplosionLimitError} when `levels: 'all'` would go deeper
73
+ * than {@link MAX_EXPLOSION_DEPTH}.
74
+ */
75
+ open(component: ResolvedComponent, level: number, path: readonly ExplosionPathEntry[]): ExplosionPathEntry | null;
76
+ }
77
+ //# sourceMappingURL=structure-walk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structure-walk.d.ts","sourceRoot":"","sources":["../../src/services/structure-walk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAGxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,eAAe,EACpB,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,sBAA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