@lssm/example.kb-update-pipeline 1.41.0 → 1.42.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.
Files changed (61) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +55 -0
  2. package/.turbo/turbo-build.log +51 -19
  3. package/CHANGELOG.md +37 -0
  4. package/LICENSE +21 -0
  5. package/README.md +2 -0
  6. package/dist/docs/index.d.ts +1 -0
  7. package/dist/docs/index.js +1 -1
  8. package/dist/docs/kb-update-pipeline.docblock.d.ts +1 -0
  9. package/dist/docs/kb-update-pipeline.docblock.js +29 -17
  10. package/dist/docs/kb-update-pipeline.docblock.js.map +1 -0
  11. package/dist/entities/index.d.ts +2 -0
  12. package/dist/entities/index.js +3 -1
  13. package/dist/entities/models.d.ts +61 -0
  14. package/dist/entities/models.d.ts.map +1 -0
  15. package/dist/entities/models.js +74 -1
  16. package/dist/entities/models.js.map +1 -0
  17. package/dist/events.d.ts +74 -0
  18. package/dist/events.d.ts.map +1 -0
  19. package/dist/events.js +150 -1
  20. package/dist/events.js.map +1 -0
  21. package/dist/example.d.ts +36 -0
  22. package/dist/example.d.ts.map +1 -0
  23. package/dist/example.js +43 -1
  24. package/dist/example.js.map +1 -0
  25. package/dist/feature.d.ts +7 -0
  26. package/dist/feature.d.ts.map +1 -0
  27. package/dist/feature.js +80 -1
  28. package/dist/feature.js.map +1 -0
  29. package/dist/handlers/index.d.ts +2 -0
  30. package/dist/handlers/index.js +3 -1
  31. package/dist/handlers/memory.handlers.d.ts +68 -0
  32. package/dist/handlers/memory.handlers.d.ts.map +1 -0
  33. package/dist/handlers/memory.handlers.js +93 -1
  34. package/dist/handlers/memory.handlers.js.map +1 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.js +12 -1
  37. package/dist/kb-update-pipeline.feature.d.ts +7 -0
  38. package/dist/kb-update-pipeline.feature.d.ts.map +1 -0
  39. package/dist/kb-update-pipeline.feature.js +140 -1
  40. package/dist/kb-update-pipeline.feature.js.map +1 -0
  41. package/dist/operations/index.d.ts +2 -0
  42. package/dist/operations/index.js +3 -0
  43. package/dist/operations/pipeline.d.ts +137 -0
  44. package/dist/operations/pipeline.d.ts.map +1 -0
  45. package/dist/operations/pipeline.js +183 -0
  46. package/dist/operations/pipeline.js.map +1 -0
  47. package/dist/presentations.d.ts +9 -0
  48. package/dist/presentations.d.ts.map +1 -0
  49. package/dist/presentations.js +71 -0
  50. package/dist/presentations.js.map +1 -0
  51. package/package.json +33 -23
  52. package/src/events.ts +45 -16
  53. package/src/feature.ts +10 -9
  54. package/src/index.ts +3 -1
  55. package/src/kb-update-pipeline.feature.ts +35 -13
  56. package/src/{contracts → operations}/pipeline.ts +8 -8
  57. package/src/presentations.ts +69 -0
  58. package/tsconfig.tsbuildinfo +1 -1
  59. package/dist/contracts/index.js +0 -1
  60. package/dist/contracts/pipeline.js +0 -1
  61. /package/src/{contracts → operations}/index.ts +0 -0
@@ -0,0 +1,55 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
3
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/kb-update-pipeline/tsdown.config.js
4
+ ℹ entry: src/events.ts, src/example.ts, src/feature.ts, src/index.ts, src/kb-update-pipeline.feature.ts, src/presentations.ts, src/docs/index.ts, src/docs/kb-update-pipeline.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts, src/operations/index.ts, src/operations/pipeline.ts
5
+ ℹ target: esnext
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ Cleaning 49 files
9
+ ℹ dist/operations/pipeline.js 4.91 kB │ gzip: 1.36 kB
10
+ ℹ dist/events.js 3.65 kB │ gzip: 0.72 kB
11
+ ℹ dist/handlers/memory.handlers.js 3.37 kB │ gzip: 1.12 kB
12
+ ℹ dist/kb-update-pipeline.feature.js 2.12 kB │ gzip: 0.64 kB
13
+ ℹ dist/entities/models.js 1.80 kB │ gzip: 0.53 kB
14
+ ℹ dist/presentations.js 1.79 kB │ gzip: 0.61 kB
15
+ ℹ dist/docs/kb-update-pipeline.docblock.js 1.48 kB │ gzip: 0.70 kB
16
+ ℹ dist/index.js 1.44 kB │ gzip: 0.42 kB
17
+ ℹ dist/feature.js 1.30 kB │ gzip: 0.54 kB
18
+ ℹ dist/example.js 0.86 kB │ gzip: 0.47 kB
19
+ ℹ dist/operations/index.js 0.31 kB │ gzip: 0.14 kB
20
+ ℹ dist/entities/index.js 0.25 kB │ gzip: 0.13 kB
21
+ ℹ dist/handlers/index.js 0.16 kB │ gzip: 0.10 kB
22
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
23
+ ℹ dist/handlers/memory.handlers.js.map 8.17 kB │ gzip: 2.35 kB
24
+ ℹ dist/operations/pipeline.js.map 7.16 kB │ gzip: 1.80 kB
25
+ ℹ dist/events.js.map 5.60 kB │ gzip: 1.04 kB
26
+ ℹ dist/kb-update-pipeline.feature.js.map 3.37 kB │ gzip: 1.02 kB
27
+ ℹ dist/presentations.js.map 2.98 kB │ gzip: 0.84 kB
28
+ ℹ dist/entities/models.js.map 2.67 kB │ gzip: 0.81 kB
29
+ ℹ dist/feature.js.map 2.09 kB │ gzip: 0.83 kB
30
+ ℹ dist/docs/kb-update-pipeline.docblock.js.map 1.99 kB │ gzip: 0.89 kB
31
+ ℹ dist/example.js.map 1.24 kB │ gzip: 0.65 kB
32
+ ℹ dist/handlers/memory.handlers.d.ts.map 0.92 kB │ gzip: 0.44 kB
33
+ ℹ dist/events.d.ts.map 0.84 kB │ gzip: 0.33 kB
34
+ ℹ dist/operations/pipeline.d.ts.map 0.77 kB │ gzip: 0.34 kB
35
+ ℹ dist/entities/models.d.ts.map 0.47 kB │ gzip: 0.28 kB
36
+ ℹ dist/presentations.d.ts.map 0.19 kB │ gzip: 0.16 kB
37
+ ℹ dist/kb-update-pipeline.feature.d.ts.map 0.16 kB │ gzip: 0.14 kB
38
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
39
+ ℹ dist/feature.d.ts.map 0.13 kB │ gzip: 0.12 kB
40
+ ℹ dist/operations/pipeline.d.ts 3.97 kB │ gzip: 0.57 kB
41
+ ℹ dist/events.d.ts 2.31 kB │ gzip: 0.42 kB
42
+ ℹ dist/handlers/memory.handlers.d.ts 1.94 kB │ gzip: 0.64 kB
43
+ ℹ dist/entities/models.d.ts 1.85 kB │ gzip: 0.41 kB
44
+ ℹ dist/index.d.ts 1.48 kB │ gzip: 0.41 kB
45
+ ℹ dist/example.d.ts 1.10 kB │ gzip: 0.47 kB
46
+ ℹ dist/presentations.d.ts 0.41 kB │ gzip: 0.19 kB
47
+ ℹ dist/operations/index.d.ts 0.31 kB │ gzip: 0.13 kB
48
+ ℹ dist/kb-update-pipeline.feature.d.ts 0.27 kB │ gzip: 0.17 kB
49
+ ℹ dist/handlers/index.d.ts 0.25 kB │ gzip: 0.10 kB
50
+ ℹ dist/entities/index.d.ts 0.25 kB │ gzip: 0.13 kB
51
+ ℹ dist/feature.d.ts 0.23 kB │ gzip: 0.16 kB
52
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
53
+ ℹ dist/docs/kb-update-pipeline.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
54
+ ℹ 45 files, total: 76.74 kB
55
+ ✔ Build complete in 22809ms
@@ -1,24 +1,56 @@
1
- $ bun build:bundle && bun build:types
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
2
3
  $ tsdown
3
- ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
4
5
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/kb-update-pipeline/tsdown.config.js
5
- ℹ entry: src/events.ts, src/example.ts, src/feature.ts, src/index.ts, src/kb-update-pipeline.feature.ts, src/docs/index.ts, src/docs/kb-update-pipeline.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/contracts/index.ts, src/contracts/pipeline.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts
6
+ ℹ entry: src/events.ts, src/example.ts, src/feature.ts, src/index.ts, src/kb-update-pipeline.feature.ts, src/presentations.ts, src/docs/index.ts, src/docs/kb-update-pipeline.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts, src/operations/index.ts, src/operations/pipeline.ts
6
7
  ℹ target: esnext
7
8
  ℹ tsconfig: tsconfig.json
8
9
  ℹ Build start
9
- ℹ dist/contracts/pipeline.js 3.44 kB │ gzip: 1.18 kB
10
- ℹ dist/handlers/memory.handlers.js 2.27 kB │ gzip: 0.87 kB
11
- ℹ dist/events.js 2.02 kB │ gzip: 0.54 kB
12
- ℹ dist/index.js 1.32 kB │ gzip: 0.46 kB
13
- ℹ dist/docs/kb-update-pipeline.docblock.js 1.26 kB │ gzip: 0.64 kB
14
- ℹ dist/entities/models.js 1.11 kB │ gzip: 0.44 kB
15
- ℹ dist/feature.js 0.92 kB │ gzip: 0.45 kB
16
- ℹ dist/kb-update-pipeline.feature.js 0.92 kB │ gzip: 0.45 kB
17
- ℹ dist/example.js 0.58 kB │ gzip: 0.36 kB
18
- ℹ dist/contracts/index.js 0.33 kB │ gzip: 0.16 kB
19
- ℹ dist/entities/index.js 0.28 kB │ gzip: 0.16 kB
20
- ℹ dist/handlers/index.js 0.17 kB │ gzip: 0.11 kB
21
- ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
22
- ℹ 13 files, total: 14.66 kB
23
- ✔ Build complete in 44ms
24
- $ tsc --noEmit
10
+ ℹ dist/operations/pipeline.js 4.91 kB │ gzip: 1.36 kB
11
+ ℹ dist/events.js 3.65 kB │ gzip: 0.72 kB
12
+ ℹ dist/handlers/memory.handlers.js 3.37 kB │ gzip: 1.12 kB
13
+ ℹ dist/kb-update-pipeline.feature.js 2.12 kB │ gzip: 0.64 kB
14
+ ℹ dist/entities/models.js 1.80 kB │ gzip: 0.53 kB
15
+ ℹ dist/presentations.js 1.79 kB │ gzip: 0.61 kB
16
+ ℹ dist/docs/kb-update-pipeline.docblock.js 1.48 kB │ gzip: 0.70 kB
17
+ ℹ dist/index.js 1.44 kB │ gzip: 0.42 kB
18
+ ℹ dist/feature.js 1.30 kB │ gzip: 0.54 kB
19
+ ℹ dist/example.js 0.86 kB │ gzip: 0.47 kB
20
+ ℹ dist/operations/index.js 0.31 kB │ gzip: 0.14 kB
21
+ ℹ dist/entities/index.js 0.25 kB │ gzip: 0.13 kB
22
+ ℹ dist/handlers/index.js 0.16 kB │ gzip: 0.10 kB
23
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
24
+ ℹ dist/handlers/memory.handlers.js.map 8.17 kB │ gzip: 2.35 kB
25
+ ℹ dist/operations/pipeline.js.map 7.16 kB │ gzip: 1.80 kB
26
+ ℹ dist/events.js.map 5.60 kB │ gzip: 1.04 kB
27
+ ℹ dist/kb-update-pipeline.feature.js.map 3.37 kB │ gzip: 1.02 kB
28
+ ℹ dist/presentations.js.map 2.98 kB │ gzip: 0.84 kB
29
+ ℹ dist/entities/models.js.map 2.67 kB │ gzip: 0.81 kB
30
+ ℹ dist/feature.js.map 2.09 kB │ gzip: 0.83 kB
31
+ ℹ dist/docs/kb-update-pipeline.docblock.js.map 1.99 kB │ gzip: 0.89 kB
32
+ ℹ dist/example.js.map 1.24 kB │ gzip: 0.65 kB
33
+ ℹ dist/handlers/memory.handlers.d.ts.map 0.92 kB │ gzip: 0.44 kB
34
+ ℹ dist/events.d.ts.map 0.84 kB │ gzip: 0.33 kB
35
+ ℹ dist/operations/pipeline.d.ts.map 0.77 kB │ gzip: 0.34 kB
36
+ ℹ dist/entities/models.d.ts.map 0.47 kB │ gzip: 0.28 kB
37
+ ℹ dist/presentations.d.ts.map 0.19 kB │ gzip: 0.16 kB
38
+ ℹ dist/kb-update-pipeline.feature.d.ts.map 0.16 kB │ gzip: 0.14 kB
39
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
40
+ ℹ dist/feature.d.ts.map 0.13 kB │ gzip: 0.12 kB
41
+ ℹ dist/operations/pipeline.d.ts 3.97 kB │ gzip: 0.57 kB
42
+ ℹ dist/events.d.ts 2.31 kB │ gzip: 0.42 kB
43
+ ℹ dist/handlers/memory.handlers.d.ts 1.94 kB │ gzip: 0.64 kB
44
+ ℹ dist/entities/models.d.ts 1.85 kB │ gzip: 0.41 kB
45
+ ℹ dist/index.d.ts 1.48 kB │ gzip: 0.41 kB
46
+ ℹ dist/example.d.ts 1.10 kB │ gzip: 0.47 kB
47
+ ℹ dist/presentations.d.ts 0.41 kB │ gzip: 0.19 kB
48
+ ℹ dist/operations/index.d.ts 0.31 kB │ gzip: 0.13 kB
49
+ ℹ dist/kb-update-pipeline.feature.d.ts 0.27 kB │ gzip: 0.17 kB
50
+ ℹ dist/handlers/index.d.ts 0.25 kB │ gzip: 0.10 kB
51
+ ℹ dist/entities/index.d.ts 0.25 kB │ gzip: 0.13 kB
52
+ ℹ dist/feature.d.ts 0.23 kB │ gzip: 0.16 kB
53
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
54
+ ℹ dist/docs/kb-update-pipeline.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
55
+ ℹ 45 files, total: 76.74 kB
56
+ ✔ Build complete in 23790ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # @lssm/example.kb-update-pipeline
2
+
3
+ ## 1.42.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1f9ac4c: fix
8
+ - Updated dependencies [1f9ac4c]
9
+ - @lssm/lib.contracts@1.42.2
10
+ - @lssm/lib.identity-rbac@1.42.2
11
+ - @lssm/lib.schema@1.42.2
12
+ - @lssm/module.notifications@1.42.2
13
+
14
+ ## 1.42.1
15
+
16
+ ### Patch Changes
17
+
18
+ - f043995: Fix release
19
+ - Updated dependencies [f043995]
20
+ - @lssm/module.notifications@1.42.1
21
+ - @lssm/lib.identity-rbac@1.42.1
22
+ - @lssm/lib.contracts@1.42.1
23
+ - @lssm/lib.schema@1.42.1
24
+
25
+ ## 1.42.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 8eefd9c: initial release
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [8eefd9c]
34
+ - @lssm/lib.contracts@1.42.0
35
+ - @lssm/lib.identity-rbac@1.42.0
36
+ - @lssm/lib.schema@1.42.0
37
+ - @lssm/module.notifications@1.42.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # `@lssm/example.kb-update-pipeline`
2
2
 
3
+ Website: https://contractspec.lssm.tech/
4
+
3
5
  Spec-first example for a **knowledge base update pipeline** where:
4
6
 
5
7
  - automation **proposes** changes (watch/diff/summarize/propose patches)\n+- humans **verify** (HITL) with role-based rules\n+- snapshots are published only when rule versions are approved\n+- notifications + audit trails provide traceability\n+
@@ -0,0 +1 @@
1
+ export { };
@@ -1 +1 @@
1
- import"./kb-update-pipeline.docblock.js";
1
+ import "./kb-update-pipeline.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -1,19 +1,31 @@
1
- import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.examples.kb-update-pipeline.goal`,title:`KB Update Pipeline — Goal`,summary:`Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.`,kind:`goal`,visibility:`public`,route:`/docs/examples/kb-update-pipeline/goal`,tags:[`knowledge`,`pipeline`,`hitl`,`audit`],body:`## Why it matters
2
- - Keeps humans as the verifiers (HITL) while automation does the busywork.
3
- - Produces an auditable chain: source change -> diff -> proposal -> review -> publish.
1
+ import { registerDocBlocks } from "@lssm/lib.contracts/docs";
4
2
 
5
- ## Guardrails
6
- - High-risk changes require expert approval.
7
- - Publishing fails if any included rule versions are not approved.
8
- - Review requests emit notifications/events.`},{id:`docs.examples.kb-update-pipeline.reference`,title:`KB Update Pipeline — Reference`,summary:`Entities, contracts, and events for the KB update pipeline example.`,kind:`reference`,visibility:`public`,route:`/docs/examples/kb-update-pipeline`,tags:[`knowledge`,`reference`],body:`## Contracts
9
- - kbPipeline.runWatch
10
- - kbPipeline.createReviewTask
11
- - kbPipeline.submitDecision
12
- - kbPipeline.publishIfReady
3
+ //#region src/docs/kb-update-pipeline.docblock.ts
4
+ registerDocBlocks([{
5
+ id: "docs.examples.kb-update-pipeline.goal",
6
+ title: "KB Update Pipeline — Goal",
7
+ summary: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
8
+ kind: "goal",
9
+ visibility: "public",
10
+ route: "/docs/examples/kb-update-pipeline/goal",
11
+ tags: [
12
+ "knowledge",
13
+ "pipeline",
14
+ "hitl",
15
+ "audit"
16
+ ],
17
+ body: `## Why it matters
18
+ - Keeps humans as the verifiers (HITL) while automation does the busywork.\n- Produces an auditable chain: source change -> diff -> proposal -> review -> publish.\n\n## Guardrails\n- High-risk changes require expert approval.\n- Publishing fails if any included rule versions are not approved.\n- Review requests emit notifications/events.`
19
+ }, {
20
+ id: "docs.examples.kb-update-pipeline.reference",
21
+ title: "KB Update Pipeline — Reference",
22
+ summary: "Entities, contracts, and events for the KB update pipeline example.",
23
+ kind: "reference",
24
+ visibility: "public",
25
+ route: "/docs/examples/kb-update-pipeline",
26
+ tags: ["knowledge", "reference"],
27
+ body: `## Contracts\n- kbPipeline.runWatch\n- kbPipeline.createReviewTask\n- kbPipeline.submitDecision\n- kbPipeline.publishIfReady\n\n## Events\n- kb.change.detected\n- kb.change.summarized\n- kb.patch.proposed\n- kb.review.requested\n- kb.review.decided`
28
+ }]);
13
29
 
14
- ## Events
15
- - kb.change.detected
16
- - kb.change.summarized
17
- - kb.patch.proposed
18
- - kb.review.requested
19
- - kb.review.decided`}]);
30
+ //#endregion
31
+ //# sourceMappingURL=kb-update-pipeline.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kb-update-pipeline.docblock.js","names":[],"sources":["../../src/docs/kb-update-pipeline.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/lib.contracts/docs';\n\nconst docBlocks: DocBlock[] = [\n {\n id: 'docs.examples.kb-update-pipeline.goal',\n title: 'KB Update Pipeline — Goal',\n summary:\n 'Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/kb-update-pipeline/goal',\n tags: ['knowledge', 'pipeline', 'hitl', 'audit'],\n body: `## Why it matters\n- Keeps humans as the verifiers (HITL) while automation does the busywork.\\n- Produces an auditable chain: source change -> diff -> proposal -> review -> publish.\\n\\n## Guardrails\\n- High-risk changes require expert approval.\\n- Publishing fails if any included rule versions are not approved.\\n- Review requests emit notifications/events.`,\n },\n {\n id: 'docs.examples.kb-update-pipeline.reference',\n title: 'KB Update Pipeline — Reference',\n summary:\n 'Entities, contracts, and events for the KB update pipeline example.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/kb-update-pipeline',\n tags: ['knowledge', 'reference'],\n body: `## Contracts\\n- kbPipeline.runWatch\\n- kbPipeline.createReviewTask\\n- kbPipeline.submitDecision\\n- kbPipeline.publishIfReady\\n\\n## Events\\n- kb.change.detected\\n- kb.change.summarized\\n- kb.patch.proposed\\n- kb.review.requested\\n- kb.review.decided`,\n },\n];\n\nregisterDocBlocks(docBlocks);\n"],"mappings":";;;AA6BA,kBA1B8B,CAC5B;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAa;EAAY;EAAQ;EAAQ;CAChD,MAAM;;CAEP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,aAAa,YAAY;CAChC,MAAM;CACP,CACF,CAE2B"}
@@ -0,0 +1,2 @@
1
+ import { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel } from "./models.js";
2
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
@@ -1 +1,3 @@
1
- import{ChangeCandidateModel as e,ChangeRiskLevelEnum as t,ReviewAssignedRoleEnum as n,ReviewDecisionEnum as r,ReviewTaskModel as i}from"./models.js";export{e as ChangeCandidateModel,t as ChangeRiskLevelEnum,n as ReviewAssignedRoleEnum,r as ReviewDecisionEnum,i as ReviewTaskModel};
1
+ import { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel } from "./models.js";
2
+
3
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
@@ -0,0 +1,61 @@
1
+ import * as _lssm_lib_schema55 from "@lssm/lib.schema";
2
+
3
+ //#region src/entities/models.d.ts
4
+ declare const ChangeRiskLevelEnum: _lssm_lib_schema55.EnumType<[string, string, string]>;
5
+ declare const ReviewAssignedRoleEnum: _lssm_lib_schema55.EnumType<[string, string]>;
6
+ declare const ReviewDecisionEnum: _lssm_lib_schema55.EnumType<[string, string]>;
7
+ declare const ChangeCandidateModel: _lssm_lib_schema55.SchemaModel<{
8
+ id: {
9
+ type: _lssm_lib_schema55.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ sourceDocumentId: {
13
+ type: _lssm_lib_schema55.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ detectedAt: {
17
+ type: _lssm_lib_schema55.FieldType<Date, string>;
18
+ isOptional: false;
19
+ };
20
+ diffSummary: {
21
+ type: _lssm_lib_schema55.FieldType<string, string>;
22
+ isOptional: false;
23
+ };
24
+ riskLevel: {
25
+ type: _lssm_lib_schema55.EnumType<[string, string, string]>;
26
+ isOptional: false;
27
+ };
28
+ }>;
29
+ declare const ReviewTaskModel: _lssm_lib_schema55.SchemaModel<{
30
+ id: {
31
+ type: _lssm_lib_schema55.FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ changeCandidateId: {
35
+ type: _lssm_lib_schema55.FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ status: {
39
+ type: _lssm_lib_schema55.FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ assignedRole: {
43
+ type: _lssm_lib_schema55.EnumType<[string, string]>;
44
+ isOptional: false;
45
+ };
46
+ decision: {
47
+ type: _lssm_lib_schema55.EnumType<[string, string]>;
48
+ isOptional: true;
49
+ };
50
+ decidedAt: {
51
+ type: _lssm_lib_schema55.FieldType<Date, string>;
52
+ isOptional: true;
53
+ };
54
+ decidedBy: {
55
+ type: _lssm_lib_schema55.FieldType<string, string>;
56
+ isOptional: true;
57
+ };
58
+ }>;
59
+ //#endregion
60
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
61
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","names":[],"sources":["../../src/entities/models.ts"],"sourcesContent":[],"mappings":";;;cAMa,qBAIX,kBAAA,CAJ8B;cAMnB,wBAGX,kBAAA,CAHiC;cAKtB,oBAGX,kBAAA,CAH6B;AAXlB,cAgBA,oBAZX,qBAY+B,WAhBD,CAAA;EAMnB,EAAA,EAAA;IAKA,IAAA,EAkBX,kBAAA,CAAA,SAfA,CAAA,MAH6B,EAAA,MAAA,CAAA;IAKlB,UAAA,EAAA,KAAA;EAaX,CAAA;;;;;;sCAb+B,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAepB,CAAA;EAeX,WAAA,EAAA;;;;;;;;;AAf0B,cAAf,eAAe,qBAAA,WAAA,CAAA;;UAe1B,kBAAA,CAAA"}
@@ -1 +1,74 @@
1
- import{ScalarTypeEnum as e,defineEnum as t,defineSchemaModel as n}from"@lssm/lib.schema";const r=t(`ChangeRiskLevel`,[`low`,`medium`,`high`]),i=t(`ReviewAssignedRole`,[`curator`,`expert`]),a=t(`ReviewDecision`,[`approve`,`reject`]),o=n({name:`ChangeCandidate`,description:`Candidate change detected in a source document.`,fields:{id:{type:e.String_unsecure(),isOptional:!1},sourceDocumentId:{type:e.String_unsecure(),isOptional:!1},detectedAt:{type:e.DateTime(),isOptional:!1},diffSummary:{type:e.String_unsecure(),isOptional:!1},riskLevel:{type:r,isOptional:!1}}}),s=n({name:`ReviewTask`,description:`Human verification task for a change candidate.`,fields:{id:{type:e.String_unsecure(),isOptional:!1},changeCandidateId:{type:e.String_unsecure(),isOptional:!1},status:{type:e.String_unsecure(),isOptional:!1},assignedRole:{type:i,isOptional:!1},decision:{type:a,isOptional:!0},decidedAt:{type:e.DateTime(),isOptional:!0},decidedBy:{type:e.String_unsecure(),isOptional:!0}}});export{o as ChangeCandidateModel,r as ChangeRiskLevelEnum,i as ReviewAssignedRoleEnum,a as ReviewDecisionEnum,s as ReviewTaskModel};
1
+ import { ScalarTypeEnum, defineEnum, defineSchemaModel } from "@lssm/lib.schema";
2
+
3
+ //#region src/entities/models.ts
4
+ const ChangeRiskLevelEnum = defineEnum("ChangeRiskLevel", [
5
+ "low",
6
+ "medium",
7
+ "high"
8
+ ]);
9
+ const ReviewAssignedRoleEnum = defineEnum("ReviewAssignedRole", ["curator", "expert"]);
10
+ const ReviewDecisionEnum = defineEnum("ReviewDecision", ["approve", "reject"]);
11
+ const ChangeCandidateModel = defineSchemaModel({
12
+ name: "ChangeCandidate",
13
+ description: "Candidate change detected in a source document.",
14
+ fields: {
15
+ id: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false
18
+ },
19
+ sourceDocumentId: {
20
+ type: ScalarTypeEnum.String_unsecure(),
21
+ isOptional: false
22
+ },
23
+ detectedAt: {
24
+ type: ScalarTypeEnum.DateTime(),
25
+ isOptional: false
26
+ },
27
+ diffSummary: {
28
+ type: ScalarTypeEnum.String_unsecure(),
29
+ isOptional: false
30
+ },
31
+ riskLevel: {
32
+ type: ChangeRiskLevelEnum,
33
+ isOptional: false
34
+ }
35
+ }
36
+ });
37
+ const ReviewTaskModel = defineSchemaModel({
38
+ name: "ReviewTask",
39
+ description: "Human verification task for a change candidate.",
40
+ fields: {
41
+ id: {
42
+ type: ScalarTypeEnum.String_unsecure(),
43
+ isOptional: false
44
+ },
45
+ changeCandidateId: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ status: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: false
52
+ },
53
+ assignedRole: {
54
+ type: ReviewAssignedRoleEnum,
55
+ isOptional: false
56
+ },
57
+ decision: {
58
+ type: ReviewDecisionEnum,
59
+ isOptional: true
60
+ },
61
+ decidedAt: {
62
+ type: ScalarTypeEnum.DateTime(),
63
+ isOptional: true
64
+ },
65
+ decidedBy: {
66
+ type: ScalarTypeEnum.String_unsecure(),
67
+ isOptional: true
68
+ }
69
+ }
70
+ });
71
+
72
+ //#endregion
73
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
74
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","names":[],"sources":["../../src/entities/models.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n defineEnum,\n defineSchemaModel,\n} from '@lssm/lib.schema';\n\nexport const ChangeRiskLevelEnum = defineEnum('ChangeRiskLevel', [\n 'low',\n 'medium',\n 'high',\n]);\n\nexport const ReviewAssignedRoleEnum = defineEnum('ReviewAssignedRole', [\n 'curator',\n 'expert',\n]);\n\nexport const ReviewDecisionEnum = defineEnum('ReviewDecision', [\n 'approve',\n 'reject',\n]);\n\nexport const ChangeCandidateModel = defineSchemaModel({\n name: 'ChangeCandidate',\n description: 'Candidate change detected in a source document.',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceDocumentId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n detectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n diffSummary: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n riskLevel: { type: ChangeRiskLevelEnum, isOptional: false },\n },\n});\n\nexport const ReviewTaskModel = defineSchemaModel({\n name: 'ReviewTask',\n description: 'Human verification task for a change candidate.',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changeCandidateId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // open|decided\n assignedRole: { type: ReviewAssignedRoleEnum, isOptional: false },\n decision: { type: ReviewDecisionEnum, isOptional: true },\n decidedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n decidedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;AAMA,MAAa,sBAAsB,WAAW,mBAAmB;CAC/D;CACA;CACA;CACD,CAAC;AAEF,MAAa,yBAAyB,WAAW,sBAAsB,CACrE,WACA,SACD,CAAC;AAEF,MAAa,qBAAqB,WAAW,kBAAkB,CAC7D,WACA,SACD,CAAC;AAEF,MAAa,uBAAuB,kBAAkB;CACpD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,kBAAkB;GAChB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,WAAW;GAAE,MAAM;GAAqB,YAAY;GAAO;EAC5D;CACF,CAAC;AAEF,MAAa,kBAAkB,kBAAkB;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,mBAAmB;GACjB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,cAAc;GAAE,MAAM;GAAwB,YAAY;GAAO;EACjE,UAAU;GAAE,MAAM;GAAoB,YAAY;GAAM;EACxD,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAChE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE;CACF,CAAC"}
@@ -0,0 +1,74 @@
1
+ import * as _lssm_lib_contracts3 from "@lssm/lib.contracts";
2
+ import * as _lssm_lib_schema36 from "@lssm/lib.schema";
3
+
4
+ //#region src/events.d.ts
5
+ declare const KbChangeDetectedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
6
+ changeCandidateId: {
7
+ type: _lssm_lib_schema36.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ sourceDocumentId: {
11
+ type: _lssm_lib_schema36.FieldType<string, string>;
12
+ isOptional: false;
13
+ };
14
+ riskLevel: {
15
+ type: _lssm_lib_schema36.FieldType<string, string>;
16
+ isOptional: false;
17
+ };
18
+ }>>;
19
+ declare const KbChangeSummarizedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
20
+ changeCandidateId: {
21
+ type: _lssm_lib_schema36.FieldType<string, string>;
22
+ isOptional: false;
23
+ };
24
+ summary: {
25
+ type: _lssm_lib_schema36.FieldType<string, string>;
26
+ isOptional: false;
27
+ };
28
+ riskLevel: {
29
+ type: _lssm_lib_schema36.FieldType<string, string>;
30
+ isOptional: false;
31
+ };
32
+ }>>;
33
+ declare const KbPatchProposedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
34
+ changeCandidateId: {
35
+ type: _lssm_lib_schema36.FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ proposedRuleVersionIds: {
39
+ type: _lssm_lib_schema36.FieldType<string, string>;
40
+ isArray: true;
41
+ isOptional: false;
42
+ };
43
+ }>>;
44
+ declare const KbReviewRequestedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
45
+ reviewTaskId: {
46
+ type: _lssm_lib_schema36.FieldType<string, string>;
47
+ isOptional: false;
48
+ };
49
+ changeCandidateId: {
50
+ type: _lssm_lib_schema36.FieldType<string, string>;
51
+ isOptional: false;
52
+ };
53
+ assignedRole: {
54
+ type: _lssm_lib_schema36.FieldType<string, string>;
55
+ isOptional: false;
56
+ };
57
+ }>>;
58
+ declare const KbReviewDecidedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
59
+ reviewTaskId: {
60
+ type: _lssm_lib_schema36.FieldType<string, string>;
61
+ isOptional: false;
62
+ };
63
+ decision: {
64
+ type: _lssm_lib_schema36.FieldType<string, string>;
65
+ isOptional: false;
66
+ };
67
+ decidedBy: {
68
+ type: _lssm_lib_schema36.FieldType<string, string>;
69
+ isOptional: false;
70
+ };
71
+ }>>;
72
+ //#endregion
73
+ export { KbChangeDetectedEvent, KbChangeSummarizedEvent, KbPatchProposedEvent, KbReviewDecidedEvent, KbReviewRequestedEvent };
74
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;cAuBa,uBAAqB,oBAAA,CAAA,6BAAA;;UAUhC,kBAAA,CAAA;;EAVW,CAAA;EAUX,gBAAA,EAAA;;;;EAVgC,SAAA,EAAA;IAAA,IAAA,8BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAyBrB,UAAA,EAAA,KAAA;EAUX,CAAA;;cAVW,yBAAuB,oBAAA,CAAA,6BAAA;mBAAA,EAAA;IAAA,IAAA,EAUlC,kBAAA,CAAA,SAVkC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EA4BvB,CAAA;EAUX,OAAA,EAAA;;gBAV+B,KAAA;EAAA,CAAA;EAAA,SAAA,EAAA;IAyBpB,IAAA,8BAUX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;cAnCW,oBAyBsB,EAzBF,oBAAA,CAAA,SAyBE,oBAzBF,WAyBE,CAAA;EAAA,iBAAA,EAAA;IAAA,IAAA,EAfjC,kBAAA,CAAA,SAeiC,CAAA,MAAA,EAAA,MAAA,CAAA;IAsBtB,UAAA,EAAA,KAAA;EAUX,CAAA;;;iBAV+B;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;;cAtBpB,wBAAsB,oBAAA,CAAA,6BAAA;;UAUjC,kBAAA,CAAA;;;;;;;;;;;;cAYW,sBAAoB,oBAAA,CAAA,6BAAA;;UAU/B,kBAAA,CAAA"}