@contractspec/lib.personalization 6.0.7 → 6.0.12

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.
@@ -195,7 +195,7 @@ var personalization_workflow_composition_DocBlocks = [
195
195
  {
196
196
  id: "docs.personalization.workflow-composition",
197
197
  title: "Workflow Composition",
198
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
198
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
199
199
  kind: "reference",
200
200
  visibility: "public",
201
201
  route: "/docs/personalization/workflow-composition",
@@ -224,10 +224,12 @@ composer.register({
224
224
  label: 'Legal Review (ACME)',
225
225
  description: 'Tenant-specific compliance step.',
226
226
  }),
227
+ transitionFrom: 'validate-invoice',
227
228
  transitionTo: 'final-approval',
228
229
  },
229
230
  ],
230
231
  hiddenSteps: ['internal-audit'],
232
+ metadata: { rollout: 'tenant-acme' },
231
233
  });
232
234
  \`\`\`
233
235
 
@@ -242,29 +244,14 @@ const runtimeSpec = composer.compose({
242
244
  workflowRunner.execute(runtimeSpec, ctx);
243
245
  \`\`\`
244
246
 
245
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
247
+ ## Guarantees
266
248
 
249
+ - Extensions are normalized in deterministic priority order before composition.
250
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
251
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
252
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
267
253
 
254
+ This keeps tenant overlays additive, auditable, and replay-safe.
268
255
  `
269
256
  }
270
257
  ];
@@ -4,7 +4,7 @@ var personalization_workflow_composition_DocBlocks = [
4
4
  {
5
5
  id: "docs.personalization.workflow-composition",
6
6
  title: "Workflow Composition",
7
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
7
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
8
8
  kind: "reference",
9
9
  visibility: "public",
10
10
  route: "/docs/personalization/workflow-composition",
@@ -33,10 +33,12 @@ composer.register({
33
33
  label: 'Legal Review (ACME)',
34
34
  description: 'Tenant-specific compliance step.',
35
35
  }),
36
+ transitionFrom: 'validate-invoice',
36
37
  transitionTo: 'final-approval',
37
38
  },
38
39
  ],
39
40
  hiddenSteps: ['internal-audit'],
41
+ metadata: { rollout: 'tenant-acme' },
40
42
  });
41
43
  \`\`\`
42
44
 
@@ -51,29 +53,14 @@ const runtimeSpec = composer.compose({
51
53
  workflowRunner.execute(runtimeSpec, ctx);
52
54
  \`\`\`
53
55
 
54
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
56
+ ## Guarantees
75
57
 
58
+ - Extensions are normalized in deterministic priority order before composition.
59
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
60
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
61
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
76
62
 
63
+ This keeps tenant overlays additive, auditable, and replay-safe.
77
64
  `
78
65
  }
79
66
  ];
@@ -308,7 +308,7 @@ var personalization_workflow_composition_DocBlocks = [
308
308
  {
309
309
  id: "docs.personalization.workflow-composition",
310
310
  title: "Workflow Composition",
311
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
311
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
312
312
  kind: "reference",
313
313
  visibility: "public",
314
314
  route: "/docs/personalization/workflow-composition",
@@ -337,10 +337,12 @@ composer.register({
337
337
  label: 'Legal Review (ACME)',
338
338
  description: 'Tenant-specific compliance step.',
339
339
  }),
340
+ transitionFrom: 'validate-invoice',
340
341
  transitionTo: 'final-approval',
341
342
  },
342
343
  ],
343
344
  hiddenSteps: ['internal-audit'],
345
+ metadata: { rollout: 'tenant-acme' },
344
346
  });
345
347
  \`\`\`
346
348
 
@@ -355,29 +357,14 @@ const runtimeSpec = composer.compose({
355
357
  workflowRunner.execute(runtimeSpec, ctx);
356
358
  \`\`\`
357
359
 
358
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
360
+ ## Guarantees
379
361
 
362
+ - Extensions are normalized in deterministic priority order before composition.
363
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
364
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
365
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
380
366
 
367
+ This keeps tenant overlays additive, auditable, and replay-safe.
381
368
  `
382
369
  }
383
370
  ];
@@ -196,7 +196,7 @@ var personalization_workflow_composition_DocBlocks = [
196
196
  {
197
197
  id: "docs.personalization.workflow-composition",
198
198
  title: "Workflow Composition",
199
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
199
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
200
200
  kind: "reference",
201
201
  visibility: "public",
202
202
  route: "/docs/personalization/workflow-composition",
@@ -225,10 +225,12 @@ composer.register({
225
225
  label: 'Legal Review (ACME)',
226
226
  description: 'Tenant-specific compliance step.',
227
227
  }),
228
+ transitionFrom: 'validate-invoice',
228
229
  transitionTo: 'final-approval',
229
230
  },
230
231
  ],
231
232
  hiddenSteps: ['internal-audit'],
233
+ metadata: { rollout: 'tenant-acme' },
232
234
  });
233
235
  \`\`\`
234
236
 
@@ -243,29 +245,14 @@ const runtimeSpec = composer.compose({
243
245
  workflowRunner.execute(runtimeSpec, ctx);
244
246
  \`\`\`
245
247
 
246
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
248
+ ## Guarantees
267
249
 
250
+ - Extensions are normalized in deterministic priority order before composition.
251
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
252
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
253
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
268
254
 
255
+ This keeps tenant overlays additive, auditable, and replay-safe.
269
256
  `
270
257
  }
271
258
  ];
@@ -5,7 +5,7 @@ var personalization_workflow_composition_DocBlocks = [
5
5
  {
6
6
  id: "docs.personalization.workflow-composition",
7
7
  title: "Workflow Composition",
8
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
8
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
9
9
  kind: "reference",
10
10
  visibility: "public",
11
11
  route: "/docs/personalization/workflow-composition",
@@ -34,10 +34,12 @@ composer.register({
34
34
  label: 'Legal Review (ACME)',
35
35
  description: 'Tenant-specific compliance step.',
36
36
  }),
37
+ transitionFrom: 'validate-invoice',
37
38
  transitionTo: 'final-approval',
38
39
  },
39
40
  ],
40
41
  hiddenSteps: ['internal-audit'],
42
+ metadata: { rollout: 'tenant-acme' },
41
43
  });
42
44
  \`\`\`
43
45
 
@@ -52,29 +54,14 @@ const runtimeSpec = composer.compose({
52
54
  workflowRunner.execute(runtimeSpec, ctx);
53
55
  \`\`\`
54
56
 
55
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
57
+ ## Guarantees
76
58
 
59
+ - Extensions are normalized in deterministic priority order before composition.
60
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
61
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
62
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
77
63
 
64
+ This keeps tenant overlays additive, auditable, and replay-safe.
78
65
  `
79
66
  }
80
67
  ];
package/dist/index.js CHANGED
@@ -309,7 +309,7 @@ var personalization_workflow_composition_DocBlocks = [
309
309
  {
310
310
  id: "docs.personalization.workflow-composition",
311
311
  title: "Workflow Composition",
312
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
312
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
313
313
  kind: "reference",
314
314
  visibility: "public",
315
315
  route: "/docs/personalization/workflow-composition",
@@ -338,10 +338,12 @@ composer.register({
338
338
  label: 'Legal Review (ACME)',
339
339
  description: 'Tenant-specific compliance step.',
340
340
  }),
341
+ transitionFrom: 'validate-invoice',
341
342
  transitionTo: 'final-approval',
342
343
  },
343
344
  ],
344
345
  hiddenSteps: ['internal-audit'],
346
+ metadata: { rollout: 'tenant-acme' },
345
347
  });
346
348
  \`\`\`
347
349
 
@@ -356,29 +358,14 @@ const runtimeSpec = composer.compose({
356
358
  workflowRunner.execute(runtimeSpec, ctx);
357
359
  \`\`\`
358
360
 
359
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
361
+ ## Guarantees
380
362
 
363
+ - Extensions are normalized in deterministic priority order before composition.
364
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
365
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
366
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
381
367
 
368
+ This keeps tenant overlays additive, auditable, and replay-safe.
382
369
  `
383
370
  }
384
371
  ];
@@ -195,7 +195,7 @@ var personalization_workflow_composition_DocBlocks = [
195
195
  {
196
196
  id: "docs.personalization.workflow-composition",
197
197
  title: "Workflow Composition",
198
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
198
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
199
199
  kind: "reference",
200
200
  visibility: "public",
201
201
  route: "/docs/personalization/workflow-composition",
@@ -224,10 +224,12 @@ composer.register({
224
224
  label: 'Legal Review (ACME)',
225
225
  description: 'Tenant-specific compliance step.',
226
226
  }),
227
+ transitionFrom: 'validate-invoice',
227
228
  transitionTo: 'final-approval',
228
229
  },
229
230
  ],
230
231
  hiddenSteps: ['internal-audit'],
232
+ metadata: { rollout: 'tenant-acme' },
231
233
  });
232
234
  \`\`\`
233
235
 
@@ -242,29 +244,14 @@ const runtimeSpec = composer.compose({
242
244
  workflowRunner.execute(runtimeSpec, ctx);
243
245
  \`\`\`
244
246
 
245
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
247
+ ## Guarantees
266
248
 
249
+ - Extensions are normalized in deterministic priority order before composition.
250
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
251
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
252
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
267
253
 
254
+ This keeps tenant overlays additive, auditable, and replay-safe.
268
255
  `
269
256
  }
270
257
  ];
@@ -4,7 +4,7 @@ var personalization_workflow_composition_DocBlocks = [
4
4
  {
5
5
  id: "docs.personalization.workflow-composition",
6
6
  title: "Workflow Composition",
7
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
7
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
8
8
  kind: "reference",
9
9
  visibility: "public",
10
10
  route: "/docs/personalization/workflow-composition",
@@ -33,10 +33,12 @@ composer.register({
33
33
  label: 'Legal Review (ACME)',
34
34
  description: 'Tenant-specific compliance step.',
35
35
  }),
36
+ transitionFrom: 'validate-invoice',
36
37
  transitionTo: 'final-approval',
37
38
  },
38
39
  ],
39
40
  hiddenSteps: ['internal-audit'],
41
+ metadata: { rollout: 'tenant-acme' },
40
42
  });
41
43
  \`\`\`
42
44
 
@@ -51,29 +53,14 @@ const runtimeSpec = composer.compose({
51
53
  workflowRunner.execute(runtimeSpec, ctx);
52
54
  \`\`\`
53
55
 
54
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
56
+ ## Guarantees
75
57
 
58
+ - Extensions are normalized in deterministic priority order before composition.
59
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
60
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
61
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
76
62
 
63
+ This keeps tenant overlays additive, auditable, and replay-safe.
77
64
  `
78
65
  }
79
66
  ];
@@ -308,7 +308,7 @@ var personalization_workflow_composition_DocBlocks = [
308
308
  {
309
309
  id: "docs.personalization.workflow-composition",
310
310
  title: "Workflow Composition",
311
- summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, and metadata/annotation overlays.",
311
+ summary: "`@contractspec/lib.workflow-composer` composes base WorkflowSpecs with tenant/role/device-specific extensions, strict validation, deterministic merge ordering, metadata/annotation overlays, and orphan-graph protection for hidden-step rewrites.",
312
312
  kind: "reference",
313
313
  visibility: "public",
314
314
  route: "/docs/personalization/workflow-composition",
@@ -337,10 +337,12 @@ composer.register({
337
337
  label: 'Legal Review (ACME)',
338
338
  description: 'Tenant-specific compliance step.',
339
339
  }),
340
+ transitionFrom: 'validate-invoice',
340
341
  transitionTo: 'final-approval',
341
342
  },
342
343
  ],
343
344
  hiddenSteps: ['internal-audit'],
345
+ metadata: { rollout: 'tenant-acme' },
344
346
  });
345
347
  \`\`\`
346
348
 
@@ -355,29 +357,14 @@ const runtimeSpec = composer.compose({
355
357
  workflowRunner.execute(runtimeSpec, ctx);
356
358
  \`\`\`
357
359
 
358
- The composer uses anchor references (\`after\`/\`before\`) to place injected steps and cleans up transitions when steps are hidden.
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
360
+ ## Guarantees
379
361
 
362
+ - Extensions are normalized in deterministic priority order before composition.
363
+ - Duplicate injected step ids, invalid anchors, and invalid transition endpoints are rejected early.
364
+ - Hidden-step rewrites are validated so remaining steps stay reachable from the workflow entry step.
365
+ - \`metadata\` and \`annotations\` overlays are merged into the composed runtime workflow for downstream observability and rollout tracing.
380
366
 
367
+ This keeps tenant overlays additive, auditable, and replay-safe.
381
368
  `
382
369
  }
383
370
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.personalization",
3
- "version": "6.0.7",
3
+ "version": "6.0.12",
4
4
  "description": "Behavior tracking, analysis, and adaptation helpers for ContractSpec personalization.",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -32,16 +32,16 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@contractspec/lib.bus": "3.7.7",
36
- "@contractspec/lib.schema": "3.7.6",
37
- "@contractspec/lib.contracts-spec": "4.0.0",
38
- "@contractspec/lib.knowledge": "3.7.7",
39
- "@contractspec/lib.overlay-engine": "3.7.7",
35
+ "@contractspec/lib.bus": "3.7.12",
36
+ "@contractspec/lib.schema": "3.7.10",
37
+ "@contractspec/lib.contracts-spec": "5.0.0",
38
+ "@contractspec/lib.knowledge": "3.7.12",
39
+ "@contractspec/lib.overlay-engine": "3.7.12",
40
40
  "@opentelemetry/api": "^1.9.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@opentelemetry/api": "^1.9.0",
44
- "@contractspec/lib.surface-runtime": "0.5.7"
44
+ "@contractspec/lib.surface-runtime": "0.5.12"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "@contractspec/lib.surface-runtime": {
@@ -49,9 +49,9 @@
49
49
  }
50
50
  },
51
51
  "devDependencies": {
52
- "@contractspec/tool.typescript": "3.7.6",
52
+ "@contractspec/tool.typescript": "3.7.9",
53
53
  "typescript": "^5.9.3",
54
- "@contractspec/tool.bun": "3.7.6"
54
+ "@contractspec/tool.bun": "3.7.9"
55
55
  },
56
56
  "exports": {
57
57
  ".": {