@lssm/example.kb-update-pipeline 0.0.0-canary-20251217034842 → 0.0.0-canary-20251217060433

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.
@@ -0,0 +1,37 @@
1
+
2
+ $ tsdown
3
+ ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
+ ℹ config file: /Users/tboutron/Documents/clients/lssm/monorepo-lssm/packages/contractspec/packages/examples/kb-update-pipeline/tsdown.config.js (unrun)
5
+ ℹ entry: src/events.ts, src/example.ts, src/feature.ts, src/index.ts, src/kb-update-pipeline.feature.ts, src/contracts/index.ts, src/contracts/pipeline.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
6
+ ℹ target: esnext
7
+ ℹ tsconfig: tsconfig.json
8
+ ℹ Build start
9
+ ℹ Cleaning 30 files
10
+ ℹ dist/contracts/pipeline.js 3.44 kB │ gzip: 1.18 kB
11
+ ℹ dist/handlers/memory.handlers.js 2.27 kB │ gzip: 0.87 kB
12
+ ℹ dist/events.js 2.02 kB │ gzip: 0.54 kB
13
+ ℹ dist/index.js 1.32 kB │ gzip: 0.46 kB
14
+ ℹ dist/docs/kb-update-pipeline.docblock.js 1.26 kB │ gzip: 0.64 kB
15
+ ℹ dist/entities/models.js 1.11 kB │ gzip: 0.44 kB
16
+ ℹ dist/feature.js 0.92 kB │ gzip: 0.45 kB
17
+ ℹ dist/kb-update-pipeline.feature.js 0.92 kB │ gzip: 0.45 kB
18
+ ℹ dist/example.js 0.58 kB │ gzip: 0.36 kB
19
+ ℹ dist/contracts/index.js 0.33 kB │ gzip: 0.16 kB
20
+ ℹ dist/entities/index.js 0.28 kB │ gzip: 0.16 kB
21
+ ℹ dist/handlers/index.js 0.17 kB │ gzip: 0.11 kB
22
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
23
+ ℹ dist/contracts/pipeline.d.ts 3.97 kB │ gzip: 0.55 kB
24
+ ℹ dist/events.d.ts 2.26 kB │ gzip: 0.40 kB
25
+ ℹ dist/handlers/memory.handlers.d.ts 1.89 kB │ gzip: 0.62 kB
26
+ ℹ dist/entities/models.d.ts 1.81 kB │ gzip: 0.39 kB
27
+ ℹ dist/index.d.ts 1.28 kB │ gzip: 0.37 kB
28
+ ℹ dist/example.d.ts 1.06 kB │ gzip: 0.44 kB
29
+ ℹ dist/contracts/index.d.ts 0.31 kB │ gzip: 0.13 kB
30
+ ℹ dist/handlers/index.d.ts 0.25 kB │ gzip: 0.10 kB
31
+ ℹ dist/entities/index.d.ts 0.25 kB │ gzip: 0.13 kB
32
+ ℹ dist/kb-update-pipeline.feature.d.ts 0.21 kB │ gzip: 0.15 kB
33
+ ℹ dist/feature.d.ts 0.19 kB │ gzip: 0.15 kB
34
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
35
+ ℹ dist/docs/kb-update-pipeline.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
36
+ ℹ 26 files, total: 28.16 kB
37
+ ✔ Build complete in 8767ms
@@ -1,24 +1,26 @@
1
- $ bun build:bundle && bun build:types
2
- $ tsdown
3
- ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
- ℹ 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/contracts/index.ts, src/contracts/pipeline.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
6
- ℹ target: esnext
7
- ℹ tsconfig: tsconfig.json
8
- ℹ 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 58ms
24
- $ tsc --noEmit
1
+
2
+ $ bun build:bundle && bun build:types
3
+ $ tsdown
4
+ ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
5
+ ℹ config file: /Users/tboutron/Documents/clients/lssm/monorepo-lssm/packages/contractspec/packages/examples/kb-update-pipeline/tsdown.config.js (unrun)
6
+ ℹ entry: src/events.ts, src/example.ts, src/feature.ts, src/index.ts, src/kb-update-pipeline.feature.ts, src/contracts/index.ts, src/contracts/pipeline.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts, src/docs/index.ts, src/docs/kb-update-pipeline.docblock.ts
7
+ ℹ target: esnext
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ Cleaning 17 files
11
+ ℹ dist/contracts/pipeline.js 3.44 kB │ gzip: 1.18 kB
12
+ ℹ dist/handlers/memory.handlers.js 2.27 kB │ gzip: 0.87 kB
13
+ ℹ dist/events.js 2.02 kB │ gzip: 0.54 kB
14
+ ℹ dist/index.js 1.32 kB │ gzip: 0.46 kB
15
+ ℹ dist/docs/kb-update-pipeline.docblock.js 1.26 kB │ gzip: 0.64 kB
16
+ ℹ dist/entities/models.js 1.11 kB │ gzip: 0.44 kB
17
+ ℹ dist/feature.js 0.92 kB │ gzip: 0.45 kB
18
+ ℹ dist/kb-update-pipeline.feature.js 0.92 kB │ gzip: 0.45 kB
19
+ ℹ dist/example.js 0.58 kB │ gzip: 0.36 kB
20
+ ℹ dist/contracts/index.js 0.33 kB │ gzip: 0.16 kB
21
+ ℹ dist/entities/index.js 0.28 kB │ gzip: 0.16 kB
22
+ ℹ dist/handlers/index.js 0.17 kB │ gzip: 0.11 kB
23
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
24
+ ℹ 13 files, total: 14.66 kB
25
+ ✔ Build complete in 357ms
26
+ $ tsc --noEmit
package/CHANGELOG.md CHANGED
@@ -1,11 +1,15 @@
1
1
  # @lssm/example.kb-update-pipeline
2
2
 
3
- ## 0.0.0-canary-20251217034842
3
+ ## 0.0.0-canary-20251217060433
4
+
5
+ ### Minor Changes
6
+
7
+ - 66a5dfd: initial release
4
8
 
5
9
  ### Patch Changes
6
10
 
7
- - Updated dependencies [3086383]
8
- - @lssm/lib.contracts@0.0.0-canary-20251217034842
9
- - @lssm/lib.schema@0.0.0-canary-20251217034842
10
- - @lssm/lib.identity-rbac@0.0.0-canary-20251217034842
11
- - @lssm/module.notifications@0.0.0-canary-20251217034842
11
+ - Updated dependencies [66a5dfd]
12
+ - @lssm/lib.contracts@0.0.0-canary-20251217060433
13
+ - @lssm/lib.identity-rbac@0.0.0-canary-20251217060433
14
+ - @lssm/lib.schema@0.0.0-canary-20251217060433
15
+ - @lssm/module.notifications@0.0.0-canary-20251217060433
@@ -0,0 +1,2 @@
1
+ import { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract } from "./pipeline.js";
2
+ export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
@@ -0,0 +1,136 @@
1
+ import * as _lssm_lib_contracts4 from "@lssm/lib.contracts";
2
+ import * as _lssm_lib_schema18 from "@lssm/lib.schema";
3
+
4
+ //#region src/contracts/pipeline.d.ts
5
+ declare const KbPipelineRunWatchContract: _lssm_lib_contracts4.ContractSpec<_lssm_lib_schema18.SchemaModel<{
6
+ jurisdiction: {
7
+ type: _lssm_lib_schema18.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ }>, _lssm_lib_schema18.SchemaModel<{
11
+ candidates: {
12
+ type: _lssm_lib_schema18.SchemaModel<{
13
+ id: {
14
+ type: _lssm_lib_schema18.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ sourceDocumentId: {
18
+ type: _lssm_lib_schema18.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ detectedAt: {
22
+ type: _lssm_lib_schema18.FieldType<Date, string>;
23
+ isOptional: false;
24
+ };
25
+ diffSummary: {
26
+ type: _lssm_lib_schema18.FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ riskLevel: {
30
+ type: _lssm_lib_schema18.EnumType<[string, string, string]>;
31
+ isOptional: false;
32
+ };
33
+ }>;
34
+ isArray: true;
35
+ isOptional: false;
36
+ };
37
+ }>, undefined>;
38
+ declare const KbPipelineCreateReviewTaskContract: _lssm_lib_contracts4.ContractSpec<_lssm_lib_schema18.SchemaModel<{
39
+ changeCandidateId: {
40
+ type: _lssm_lib_schema18.FieldType<string, string>;
41
+ isOptional: false;
42
+ };
43
+ }>, _lssm_lib_schema18.SchemaModel<{
44
+ id: {
45
+ type: _lssm_lib_schema18.FieldType<string, string>;
46
+ isOptional: false;
47
+ };
48
+ changeCandidateId: {
49
+ type: _lssm_lib_schema18.FieldType<string, string>;
50
+ isOptional: false;
51
+ };
52
+ status: {
53
+ type: _lssm_lib_schema18.FieldType<string, string>;
54
+ isOptional: false;
55
+ };
56
+ assignedRole: {
57
+ type: _lssm_lib_schema18.EnumType<[string, string]>;
58
+ isOptional: false;
59
+ };
60
+ decision: {
61
+ type: _lssm_lib_schema18.EnumType<[string, string]>;
62
+ isOptional: true;
63
+ };
64
+ decidedAt: {
65
+ type: _lssm_lib_schema18.FieldType<Date, string>;
66
+ isOptional: true;
67
+ };
68
+ decidedBy: {
69
+ type: _lssm_lib_schema18.FieldType<string, string>;
70
+ isOptional: true;
71
+ };
72
+ }>, undefined>;
73
+ declare const KbPipelineSubmitDecisionContract: _lssm_lib_contracts4.ContractSpec<_lssm_lib_schema18.SchemaModel<{
74
+ reviewTaskId: {
75
+ type: _lssm_lib_schema18.FieldType<string, string>;
76
+ isOptional: false;
77
+ };
78
+ decision: {
79
+ type: _lssm_lib_schema18.EnumType<[string, string]>;
80
+ isOptional: false;
81
+ };
82
+ decidedBy: {
83
+ type: _lssm_lib_schema18.FieldType<string, string>;
84
+ isOptional: false;
85
+ };
86
+ decidedByRole: {
87
+ type: _lssm_lib_schema18.FieldType<string, string>;
88
+ isOptional: false;
89
+ };
90
+ }>, _lssm_lib_schema18.SchemaModel<{
91
+ id: {
92
+ type: _lssm_lib_schema18.FieldType<string, string>;
93
+ isOptional: false;
94
+ };
95
+ changeCandidateId: {
96
+ type: _lssm_lib_schema18.FieldType<string, string>;
97
+ isOptional: false;
98
+ };
99
+ status: {
100
+ type: _lssm_lib_schema18.FieldType<string, string>;
101
+ isOptional: false;
102
+ };
103
+ assignedRole: {
104
+ type: _lssm_lib_schema18.EnumType<[string, string]>;
105
+ isOptional: false;
106
+ };
107
+ decision: {
108
+ type: _lssm_lib_schema18.EnumType<[string, string]>;
109
+ isOptional: true;
110
+ };
111
+ decidedAt: {
112
+ type: _lssm_lib_schema18.FieldType<Date, string>;
113
+ isOptional: true;
114
+ };
115
+ decidedBy: {
116
+ type: _lssm_lib_schema18.FieldType<string, string>;
117
+ isOptional: true;
118
+ };
119
+ }>, undefined>;
120
+ declare const KbPipelinePublishIfReadyContract: _lssm_lib_contracts4.ContractSpec<_lssm_lib_schema18.SchemaModel<{
121
+ jurisdiction: {
122
+ type: _lssm_lib_schema18.FieldType<string, string>;
123
+ isOptional: false;
124
+ };
125
+ }>, _lssm_lib_schema18.SchemaModel<{
126
+ published: {
127
+ type: _lssm_lib_schema18.FieldType<boolean, boolean>;
128
+ isOptional: false;
129
+ };
130
+ reason: {
131
+ type: _lssm_lib_schema18.FieldType<string, string>;
132
+ isOptional: true;
133
+ };
134
+ }>, undefined>;
135
+ //#endregion
136
+ export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel } from "./models.js";
2
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
@@ -0,0 +1,60 @@
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 };
@@ -0,0 +1,73 @@
1
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
2
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
3
+
4
+ //#region src/events.d.ts
5
+ declare const KbChangeDetectedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
6
+ changeCandidateId: {
7
+ type: _lssm_lib_schema0.FieldType<string, string>;
8
+ isOptional: false;
9
+ };
10
+ sourceDocumentId: {
11
+ type: _lssm_lib_schema0.FieldType<string, string>;
12
+ isOptional: false;
13
+ };
14
+ riskLevel: {
15
+ type: _lssm_lib_schema0.FieldType<string, string>;
16
+ isOptional: false;
17
+ };
18
+ }>>;
19
+ declare const KbChangeSummarizedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
20
+ changeCandidateId: {
21
+ type: _lssm_lib_schema0.FieldType<string, string>;
22
+ isOptional: false;
23
+ };
24
+ summary: {
25
+ type: _lssm_lib_schema0.FieldType<string, string>;
26
+ isOptional: false;
27
+ };
28
+ riskLevel: {
29
+ type: _lssm_lib_schema0.FieldType<string, string>;
30
+ isOptional: false;
31
+ };
32
+ }>>;
33
+ declare const KbPatchProposedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
34
+ changeCandidateId: {
35
+ type: _lssm_lib_schema0.FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ proposedRuleVersionIds: {
39
+ type: _lssm_lib_schema0.FieldType<string, string>;
40
+ isArray: true;
41
+ isOptional: false;
42
+ };
43
+ }>>;
44
+ declare const KbReviewRequestedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
45
+ reviewTaskId: {
46
+ type: _lssm_lib_schema0.FieldType<string, string>;
47
+ isOptional: false;
48
+ };
49
+ changeCandidateId: {
50
+ type: _lssm_lib_schema0.FieldType<string, string>;
51
+ isOptional: false;
52
+ };
53
+ assignedRole: {
54
+ type: _lssm_lib_schema0.FieldType<string, string>;
55
+ isOptional: false;
56
+ };
57
+ }>>;
58
+ declare const KbReviewDecidedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
59
+ reviewTaskId: {
60
+ type: _lssm_lib_schema0.FieldType<string, string>;
61
+ isOptional: false;
62
+ };
63
+ decision: {
64
+ type: _lssm_lib_schema0.FieldType<string, string>;
65
+ isOptional: false;
66
+ };
67
+ decidedBy: {
68
+ type: _lssm_lib_schema0.FieldType<string, string>;
69
+ isOptional: false;
70
+ };
71
+ }>>;
72
+ //#endregion
73
+ export { KbChangeDetectedEvent, KbChangeSummarizedEvent, KbPatchProposedEvent, KbReviewDecidedEvent, KbReviewRequestedEvent };
@@ -0,0 +1,35 @@
1
+ //#region src/example.d.ts
2
+ declare const example: {
3
+ readonly id: "kb-update-pipeline";
4
+ readonly title: "KB Update Pipeline";
5
+ readonly summary: "Automation proposes KB updates; humans verify; everything audited and notified.";
6
+ readonly tags: readonly ["knowledge", "pipeline", "hitl", "audit"];
7
+ readonly kind: "knowledge";
8
+ readonly visibility: "public";
9
+ readonly docs: {
10
+ readonly rootDocId: "docs.examples.kb-update-pipeline";
11
+ };
12
+ readonly entrypoints: {
13
+ readonly packageName: "@lssm/example.kb-update-pipeline";
14
+ readonly feature: "./feature";
15
+ readonly contracts: "./contracts";
16
+ readonly handlers: "./handlers";
17
+ readonly docs: "./docs";
18
+ };
19
+ readonly surfaces: {
20
+ readonly templates: true;
21
+ readonly sandbox: {
22
+ readonly enabled: true;
23
+ readonly modes: readonly ["markdown", "specs", "builder"];
24
+ };
25
+ readonly studio: {
26
+ readonly enabled: true;
27
+ readonly installable: true;
28
+ };
29
+ readonly mcp: {
30
+ readonly enabled: true;
31
+ };
32
+ };
33
+ };
34
+ //#endregion
35
+ export { example as default };
@@ -0,0 +1,6 @@
1
+ import { FeatureModuleSpec } from "@lssm/lib.contracts";
2
+
3
+ //#region src/feature.d.ts
4
+ declare const KbUpdatePipelineFeature: FeatureModuleSpec;
5
+ //#endregion
6
+ export { KbUpdatePipelineFeature };
@@ -0,0 +1,2 @@
1
+ import { PipelineMemoryHandlers, PipelineMemoryStore, createPipelineMemoryHandlers, createPipelineMemoryStore } from "./memory.handlers.js";
2
+ export { PipelineMemoryHandlers, PipelineMemoryStore, createPipelineMemoryHandlers, createPipelineMemoryStore };
@@ -0,0 +1,67 @@
1
+ //#region src/handlers/memory.handlers.d.ts
2
+ interface ChangeCandidate {
3
+ id: string;
4
+ sourceDocumentId: string;
5
+ detectedAt: Date;
6
+ diffSummary: string;
7
+ riskLevel: 'low' | 'medium' | 'high';
8
+ }
9
+ interface ReviewTask {
10
+ id: string;
11
+ changeCandidateId: string;
12
+ status: 'open' | 'decided';
13
+ assignedRole: 'curator' | 'expert';
14
+ decision?: 'approve' | 'reject';
15
+ decidedAt?: Date;
16
+ decidedBy?: string;
17
+ }
18
+ interface PipelineMemoryStore {
19
+ candidates: Map<string, ChangeCandidate>;
20
+ reviewTasks: Map<string, ReviewTask>;
21
+ proposedRuleVersionIdsByCandidate: Map<string, string[]>;
22
+ approvedRuleVersionIds: Set<string>;
23
+ notifications: {
24
+ kind: 'kb.review.requested';
25
+ reviewTaskId: string;
26
+ changeCandidateId: string;
27
+ assignedRole: 'curator' | 'expert';
28
+ createdAt: Date;
29
+ }[];
30
+ }
31
+ declare function createPipelineMemoryStore(): PipelineMemoryStore;
32
+ interface PipelineMemoryHandlers {
33
+ runWatch(input: {
34
+ jurisdiction: string;
35
+ }): Promise<{
36
+ candidates: ChangeCandidate[];
37
+ }>;
38
+ createReviewTask(input: {
39
+ changeCandidateId: string;
40
+ }): Promise<ReviewTask>;
41
+ proposeRulePatch(input: {
42
+ changeCandidateId: string;
43
+ proposedRuleVersionIds: string[];
44
+ }): Promise<{
45
+ proposedRuleVersionIds: string[];
46
+ }>;
47
+ markRuleVersionApproved(input: {
48
+ ruleVersionId: string;
49
+ }): Promise<{
50
+ ruleVersionId: string;
51
+ }>;
52
+ submitDecision(input: {
53
+ reviewTaskId: string;
54
+ decision: 'approve' | 'reject';
55
+ decidedBy: string;
56
+ decidedByRole: 'curator' | 'expert';
57
+ }): Promise<ReviewTask>;
58
+ publishIfReady(input: {
59
+ jurisdiction: string;
60
+ }): Promise<{
61
+ published: boolean;
62
+ reason?: string;
63
+ }>;
64
+ }
65
+ declare function createPipelineMemoryHandlers(store: PipelineMemoryStore): PipelineMemoryHandlers;
66
+ //#endregion
67
+ export { PipelineMemoryHandlers, PipelineMemoryStore, createPipelineMemoryHandlers, createPipelineMemoryStore };
@@ -0,0 +1,9 @@
1
+ import { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract } from "./contracts/pipeline.js";
2
+ import "./contracts/index.js";
3
+ import { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel } from "./entities/models.js";
4
+ import "./entities/index.js";
5
+ import { KbChangeDetectedEvent, KbChangeSummarizedEvent, KbPatchProposedEvent, KbReviewDecidedEvent, KbReviewRequestedEvent } from "./events.js";
6
+ import example from "./example.js";
7
+ import { PipelineMemoryHandlers, PipelineMemoryStore, createPipelineMemoryHandlers, createPipelineMemoryStore } from "./handlers/memory.handlers.js";
8
+ import { KbUpdatePipelineFeature } from "./kb-update-pipeline.feature.js";
9
+ export { ChangeCandidateModel, ChangeRiskLevelEnum, KbChangeDetectedEvent, KbChangeSummarizedEvent, KbPatchProposedEvent, KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract, KbReviewDecidedEvent, KbReviewRequestedEvent, KbUpdatePipelineFeature, PipelineMemoryHandlers, PipelineMemoryStore, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel, createPipelineMemoryHandlers, createPipelineMemoryStore, example };
@@ -0,0 +1,6 @@
1
+ import { FeatureModuleSpec } from "@lssm/lib.contracts";
2
+
3
+ //#region src/kb-update-pipeline.feature.d.ts
4
+ declare const KbUpdatePipelineFeature: FeatureModuleSpec;
5
+ //#endregion
6
+ export { KbUpdatePipelineFeature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/example.kb-update-pipeline",
3
- "version": "0.0.0-canary-20251217034842",
3
+ "version": "0.0.0-canary-20251217060433",
4
4
  "description": "Example: KB update automation pipeline with HITL review and auditability.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,6 +23,8 @@
23
23
  "./*": "./*"
24
24
  },
25
25
  "scripts": {
26
+ "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
27
+ "publish:pkg:canary": "bun publish:pkg --tag canary",
26
28
  "build": "bun build:bundle && bun build:types",
27
29
  "build:bundle": "tsdown",
28
30
  "build:types": "tsc --noEmit",
@@ -34,15 +36,15 @@
34
36
  "test": "bun test"
35
37
  },
36
38
  "dependencies": {
37
- "@lssm/lib.contracts": "workspace:*",
38
- "@lssm/lib.identity-rbac": "workspace:*",
39
- "@lssm/lib.schema": "workspace:*",
40
- "@lssm/module.notifications": "workspace:*",
39
+ "@lssm/lib.contracts": "0.0.0-canary-20251217060433",
40
+ "@lssm/lib.identity-rbac": "0.0.0-canary-20251217060433",
41
+ "@lssm/lib.schema": "0.0.0-canary-20251217060433",
42
+ "@lssm/module.notifications": "0.0.0-canary-20251217060433",
41
43
  "zod": "^4.1.13"
42
44
  },
43
45
  "devDependencies": {
44
- "@lssm/tool.tsdown": "workspace:*",
45
- "@lssm/tool.typescript": "workspace:*",
46
+ "@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
47
+ "@lssm/tool.typescript": "0.0.0-canary-20251217060433",
46
48
  "tsdown": "^0.17.4",
47
49
  "typescript": "^5.9.3"
48
50
  },