@lssm/example.kb-update-pipeline 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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/.turbo/turbo-build$colon$bundle.log +169 -134
- package/CHANGELOG.md +5 -5
- package/dist/contracts/index.js +3 -1
- package/dist/contracts/pipeline.js +185 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/kb-update-pipeline.docblock.js +29 -17
- package/dist/entities/index.js +3 -1
- package/dist/entities/models.d.ts +18 -18
- package/dist/entities/models.js +76 -1
- package/dist/events.d.ts +20 -20
- package/dist/events.js +127 -1
- package/dist/example.js +42 -1
- package/dist/feature.js +78 -1
- package/dist/handlers/index.js +3 -1
- package/dist/handlers/memory.handlers.js +92 -1
- package/dist/index.js +11 -1
- package/dist/kb-update-pipeline.feature.js +78 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +56 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/package.json +7 -7
|
@@ -1 +1,185 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineCommand } from "../libs/contracts/dist/spec.js";
|
|
2
|
+
import "../libs/contracts/dist/index.js";
|
|
3
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
4
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
5
|
+
import "../libs/schema/dist/index.js";
|
|
6
|
+
import { ChangeCandidateModel, ReviewDecisionEnum, ReviewTaskModel } from "../entities/models.js";
|
|
7
|
+
|
|
8
|
+
//#region src/contracts/pipeline.ts
|
|
9
|
+
const RunWatchInput = defineSchemaModel({
|
|
10
|
+
name: "KbPipelineRunWatchInput",
|
|
11
|
+
description: "Trigger a watch cycle for KB sources (demo).",
|
|
12
|
+
fields: { jurisdiction: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
} }
|
|
16
|
+
});
|
|
17
|
+
const RunWatchOutput = defineSchemaModel({
|
|
18
|
+
name: "KbPipelineRunWatchOutput",
|
|
19
|
+
description: "Output containing detected changes.",
|
|
20
|
+
fields: { candidates: {
|
|
21
|
+
type: ChangeCandidateModel,
|
|
22
|
+
isArray: true,
|
|
23
|
+
isOptional: false
|
|
24
|
+
} }
|
|
25
|
+
});
|
|
26
|
+
const CreateReviewTaskInput = defineSchemaModel({
|
|
27
|
+
name: "KbPipelineCreateReviewTaskInput",
|
|
28
|
+
description: "Create a review task for a change candidate.",
|
|
29
|
+
fields: { changeCandidateId: {
|
|
30
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
} }
|
|
33
|
+
});
|
|
34
|
+
const SubmitDecisionInput = defineSchemaModel({
|
|
35
|
+
name: "KbPipelineSubmitDecisionInput",
|
|
36
|
+
description: "Submit a decision for a review task.",
|
|
37
|
+
fields: {
|
|
38
|
+
reviewTaskId: {
|
|
39
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
40
|
+
isOptional: false
|
|
41
|
+
},
|
|
42
|
+
decision: {
|
|
43
|
+
type: ReviewDecisionEnum,
|
|
44
|
+
isOptional: false
|
|
45
|
+
},
|
|
46
|
+
decidedBy: {
|
|
47
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
48
|
+
isOptional: false
|
|
49
|
+
},
|
|
50
|
+
decidedByRole: {
|
|
51
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
52
|
+
isOptional: false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const PublishIfReadyInput = defineSchemaModel({
|
|
57
|
+
name: "KbPipelinePublishIfReadyInput",
|
|
58
|
+
description: "Publish snapshot if approvals are satisfied for a jurisdiction.",
|
|
59
|
+
fields: { jurisdiction: {
|
|
60
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
61
|
+
isOptional: false
|
|
62
|
+
} }
|
|
63
|
+
});
|
|
64
|
+
const PublishIfReadyOutput = defineSchemaModel({
|
|
65
|
+
name: "KbPipelinePublishIfReadyOutput",
|
|
66
|
+
description: "Output for publish-if-ready operation.",
|
|
67
|
+
fields: {
|
|
68
|
+
published: {
|
|
69
|
+
type: ScalarTypeEnum.Boolean(),
|
|
70
|
+
isOptional: false
|
|
71
|
+
},
|
|
72
|
+
reason: {
|
|
73
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
+
isOptional: true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const KbPipelineRunWatchContract = defineCommand({
|
|
79
|
+
meta: {
|
|
80
|
+
name: "kbPipeline.runWatch",
|
|
81
|
+
version: 1,
|
|
82
|
+
stability: "experimental",
|
|
83
|
+
owners: ["examples"],
|
|
84
|
+
tags: [
|
|
85
|
+
"knowledge",
|
|
86
|
+
"pipeline",
|
|
87
|
+
"jobs"
|
|
88
|
+
],
|
|
89
|
+
description: "Detect source changes and create change candidates.",
|
|
90
|
+
goal: "Automate discovery of updates needing review.",
|
|
91
|
+
context: "Scheduled job or manual trigger in demos."
|
|
92
|
+
},
|
|
93
|
+
io: {
|
|
94
|
+
input: RunWatchInput,
|
|
95
|
+
output: RunWatchOutput
|
|
96
|
+
},
|
|
97
|
+
policy: { auth: "user" }
|
|
98
|
+
});
|
|
99
|
+
const KbPipelineCreateReviewTaskContract = defineCommand({
|
|
100
|
+
meta: {
|
|
101
|
+
name: "kbPipeline.createReviewTask",
|
|
102
|
+
version: 1,
|
|
103
|
+
stability: "experimental",
|
|
104
|
+
owners: ["examples"],
|
|
105
|
+
tags: [
|
|
106
|
+
"knowledge",
|
|
107
|
+
"pipeline",
|
|
108
|
+
"hitl"
|
|
109
|
+
],
|
|
110
|
+
description: "Create a review task for a detected change.",
|
|
111
|
+
goal: "Route work to human verifiers.",
|
|
112
|
+
context: "Called after change detection or manual selection."
|
|
113
|
+
},
|
|
114
|
+
io: {
|
|
115
|
+
input: CreateReviewTaskInput,
|
|
116
|
+
output: ReviewTaskModel
|
|
117
|
+
},
|
|
118
|
+
policy: { auth: "user" }
|
|
119
|
+
});
|
|
120
|
+
const KbPipelineSubmitDecisionContract = defineCommand({
|
|
121
|
+
meta: {
|
|
122
|
+
name: "kbPipeline.submitDecision",
|
|
123
|
+
version: 1,
|
|
124
|
+
stability: "experimental",
|
|
125
|
+
owners: ["examples"],
|
|
126
|
+
tags: [
|
|
127
|
+
"knowledge",
|
|
128
|
+
"pipeline",
|
|
129
|
+
"hitl",
|
|
130
|
+
"rbac"
|
|
131
|
+
],
|
|
132
|
+
description: "Submit approve/reject decision for a review task.",
|
|
133
|
+
goal: "Ensure humans verify before publishing.",
|
|
134
|
+
context: "Curator/expert reviews and decides."
|
|
135
|
+
},
|
|
136
|
+
io: {
|
|
137
|
+
input: SubmitDecisionInput,
|
|
138
|
+
output: ReviewTaskModel,
|
|
139
|
+
errors: {
|
|
140
|
+
FORBIDDEN_ROLE: {
|
|
141
|
+
description: "Role not allowed to approve the given risk level",
|
|
142
|
+
http: 403,
|
|
143
|
+
gqlCode: "FORBIDDEN_ROLE",
|
|
144
|
+
when: "curator attempts to approve a high-risk change"
|
|
145
|
+
},
|
|
146
|
+
REVIEW_TASK_NOT_FOUND: {
|
|
147
|
+
description: "Review task not found",
|
|
148
|
+
http: 404,
|
|
149
|
+
gqlCode: "REVIEW_TASK_NOT_FOUND",
|
|
150
|
+
when: "reviewTaskId is invalid"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
policy: { auth: "user" }
|
|
155
|
+
});
|
|
156
|
+
const KbPipelinePublishIfReadyContract = defineCommand({
|
|
157
|
+
meta: {
|
|
158
|
+
name: "kbPipeline.publishIfReady",
|
|
159
|
+
version: 1,
|
|
160
|
+
stability: "experimental",
|
|
161
|
+
owners: ["examples"],
|
|
162
|
+
tags: [
|
|
163
|
+
"knowledge",
|
|
164
|
+
"pipeline",
|
|
165
|
+
"publishing"
|
|
166
|
+
],
|
|
167
|
+
description: "Publish snapshot if ready (all approvals satisfied).",
|
|
168
|
+
goal: "Prevent publishing until all required approvals exist.",
|
|
169
|
+
context: "Called by job or UI to attempt publish."
|
|
170
|
+
},
|
|
171
|
+
io: {
|
|
172
|
+
input: PublishIfReadyInput,
|
|
173
|
+
output: PublishIfReadyOutput,
|
|
174
|
+
errors: { NOT_READY: {
|
|
175
|
+
description: "Publishing is blocked because approvals are incomplete",
|
|
176
|
+
http: 409,
|
|
177
|
+
gqlCode: "NOT_READY",
|
|
178
|
+
when: "there are open review tasks or unapproved rule versions"
|
|
179
|
+
} }
|
|
180
|
+
},
|
|
181
|
+
policy: { auth: "user" }
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
//#endregion
|
|
185
|
+
export { KbPipelineCreateReviewTaskContract, KbPipelinePublishIfReadyContract, KbPipelineRunWatchContract, KbPipelineSubmitDecisionContract };
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./kb-update-pipeline.docblock.js";
|
|
1
|
+
import "./kb-update-pipeline.docblock.js";
|
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
3
|
-
- Produces an auditable chain: source change -> diff -> proposal -> review -> publish.
|
|
1
|
+
import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
|
|
2
|
+
import "../libs/contracts/dist/docs/index.js";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
4
|
+
//#region src/docs/kb-update-pipeline.docblock.ts
|
|
5
|
+
registerDocBlocks([{
|
|
6
|
+
id: "docs.examples.kb-update-pipeline.goal",
|
|
7
|
+
title: "KB Update Pipeline — Goal",
|
|
8
|
+
summary: "Automation proposes KB patches; humans verify; publishing is blocked until approvals are complete.",
|
|
9
|
+
kind: "goal",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/kb-update-pipeline/goal",
|
|
12
|
+
tags: [
|
|
13
|
+
"knowledge",
|
|
14
|
+
"pipeline",
|
|
15
|
+
"hitl",
|
|
16
|
+
"audit"
|
|
17
|
+
],
|
|
18
|
+
body: `## Why it matters
|
|
19
|
+
- 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.`
|
|
20
|
+
}, {
|
|
21
|
+
id: "docs.examples.kb-update-pipeline.reference",
|
|
22
|
+
title: "KB Update Pipeline — Reference",
|
|
23
|
+
summary: "Entities, contracts, and events for the KB update pipeline example.",
|
|
24
|
+
kind: "reference",
|
|
25
|
+
visibility: "public",
|
|
26
|
+
route: "/docs/examples/kb-update-pipeline",
|
|
27
|
+
tags: ["knowledge", "reference"],
|
|
28
|
+
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`
|
|
29
|
+
}]);
|
|
13
30
|
|
|
14
|
-
|
|
15
|
-
- kb.change.detected
|
|
16
|
-
- kb.change.summarized
|
|
17
|
-
- kb.patch.proposed
|
|
18
|
-
- kb.review.requested
|
|
19
|
-
- kb.review.decided`}]);
|
|
31
|
+
//#endregion
|
package/dist/entities/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{ChangeCandidateModel
|
|
1
|
+
import { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel } from "./models.js";
|
|
2
|
+
|
|
3
|
+
export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema55 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/models.d.ts
|
|
4
|
-
declare const ChangeRiskLevelEnum:
|
|
5
|
-
declare const ReviewAssignedRoleEnum:
|
|
6
|
-
declare const ReviewDecisionEnum:
|
|
7
|
-
declare const ChangeCandidateModel:
|
|
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
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
sourceDocumentId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
detectedAt: {
|
|
17
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema55.FieldType<Date, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
diffSummary: {
|
|
21
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
riskLevel: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema55.EnumType<[string, string, string]>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
}>;
|
|
29
|
-
declare const ReviewTaskModel:
|
|
29
|
+
declare const ReviewTaskModel: _lssm_lib_schema55.SchemaModel<{
|
|
30
30
|
id: {
|
|
31
|
-
type:
|
|
31
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
changeCandidateId: {
|
|
35
|
-
type:
|
|
35
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
status: {
|
|
39
|
-
type:
|
|
39
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
40
40
|
isOptional: false;
|
|
41
41
|
};
|
|
42
42
|
assignedRole: {
|
|
43
|
-
type:
|
|
43
|
+
type: _lssm_lib_schema55.EnumType<[string, string]>;
|
|
44
44
|
isOptional: false;
|
|
45
45
|
};
|
|
46
46
|
decision: {
|
|
47
|
-
type:
|
|
47
|
+
type: _lssm_lib_schema55.EnumType<[string, string]>;
|
|
48
48
|
isOptional: true;
|
|
49
49
|
};
|
|
50
50
|
decidedAt: {
|
|
51
|
-
type:
|
|
51
|
+
type: _lssm_lib_schema55.FieldType<Date, string>;
|
|
52
52
|
isOptional: true;
|
|
53
53
|
};
|
|
54
54
|
decidedBy: {
|
|
55
|
-
type:
|
|
55
|
+
type: _lssm_lib_schema55.FieldType<string, string>;
|
|
56
56
|
isOptional: true;
|
|
57
57
|
};
|
|
58
58
|
}>;
|
package/dist/entities/models.js
CHANGED
|
@@ -1 +1,76 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEnum } from "../libs/schema/dist/EnumType.js";
|
|
2
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
3
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
4
|
+
import "../libs/schema/dist/index.js";
|
|
5
|
+
|
|
6
|
+
//#region src/entities/models.ts
|
|
7
|
+
const ChangeRiskLevelEnum = defineEnum("ChangeRiskLevel", [
|
|
8
|
+
"low",
|
|
9
|
+
"medium",
|
|
10
|
+
"high"
|
|
11
|
+
]);
|
|
12
|
+
const ReviewAssignedRoleEnum = defineEnum("ReviewAssignedRole", ["curator", "expert"]);
|
|
13
|
+
const ReviewDecisionEnum = defineEnum("ReviewDecision", ["approve", "reject"]);
|
|
14
|
+
const ChangeCandidateModel = defineSchemaModel({
|
|
15
|
+
name: "ChangeCandidate",
|
|
16
|
+
description: "Candidate change detected in a source document.",
|
|
17
|
+
fields: {
|
|
18
|
+
id: {
|
|
19
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
20
|
+
isOptional: false
|
|
21
|
+
},
|
|
22
|
+
sourceDocumentId: {
|
|
23
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
24
|
+
isOptional: false
|
|
25
|
+
},
|
|
26
|
+
detectedAt: {
|
|
27
|
+
type: ScalarTypeEnum.DateTime(),
|
|
28
|
+
isOptional: false
|
|
29
|
+
},
|
|
30
|
+
diffSummary: {
|
|
31
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
32
|
+
isOptional: false
|
|
33
|
+
},
|
|
34
|
+
riskLevel: {
|
|
35
|
+
type: ChangeRiskLevelEnum,
|
|
36
|
+
isOptional: false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const ReviewTaskModel = defineSchemaModel({
|
|
41
|
+
name: "ReviewTask",
|
|
42
|
+
description: "Human verification task for a change candidate.",
|
|
43
|
+
fields: {
|
|
44
|
+
id: {
|
|
45
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
},
|
|
48
|
+
changeCandidateId: {
|
|
49
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
+
isOptional: false
|
|
51
|
+
},
|
|
52
|
+
status: {
|
|
53
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
+
isOptional: false
|
|
55
|
+
},
|
|
56
|
+
assignedRole: {
|
|
57
|
+
type: ReviewAssignedRoleEnum,
|
|
58
|
+
isOptional: false
|
|
59
|
+
},
|
|
60
|
+
decision: {
|
|
61
|
+
type: ReviewDecisionEnum,
|
|
62
|
+
isOptional: true
|
|
63
|
+
},
|
|
64
|
+
decidedAt: {
|
|
65
|
+
type: ScalarTypeEnum.DateTime(),
|
|
66
|
+
isOptional: true
|
|
67
|
+
},
|
|
68
|
+
decidedBy: {
|
|
69
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
70
|
+
isOptional: true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { ChangeCandidateModel, ChangeRiskLevelEnum, ReviewAssignedRoleEnum, ReviewDecisionEnum, ReviewTaskModel };
|
package/dist/events.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema36 from "@lssm/lib.schema";
|
|
2
2
|
import * as _lssm_lib_contracts3 from "@lssm/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/events.d.ts
|
|
5
|
-
declare const KbChangeDetectedEvent: _lssm_lib_contracts3.EventSpec<
|
|
5
|
+
declare const KbChangeDetectedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
|
|
6
6
|
changeCandidateId: {
|
|
7
|
-
type:
|
|
7
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
9
9
|
};
|
|
10
10
|
sourceDocumentId: {
|
|
11
|
-
type:
|
|
11
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
12
12
|
isOptional: false;
|
|
13
13
|
};
|
|
14
14
|
riskLevel: {
|
|
15
|
-
type:
|
|
15
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
}>>;
|
|
19
|
-
declare const KbChangeSummarizedEvent: _lssm_lib_contracts3.EventSpec<
|
|
19
|
+
declare const KbChangeSummarizedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
|
|
20
20
|
changeCandidateId: {
|
|
21
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
summary: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
riskLevel: {
|
|
29
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
}>>;
|
|
33
|
-
declare const KbPatchProposedEvent: _lssm_lib_contracts3.EventSpec<
|
|
33
|
+
declare const KbPatchProposedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
|
|
34
34
|
changeCandidateId: {
|
|
35
|
-
type:
|
|
35
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
proposedRuleVersionIds: {
|
|
39
|
-
type:
|
|
39
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
40
40
|
isArray: true;
|
|
41
41
|
isOptional: false;
|
|
42
42
|
};
|
|
43
43
|
}>>;
|
|
44
|
-
declare const KbReviewRequestedEvent: _lssm_lib_contracts3.EventSpec<
|
|
44
|
+
declare const KbReviewRequestedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
|
|
45
45
|
reviewTaskId: {
|
|
46
|
-
type:
|
|
46
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
changeCandidateId: {
|
|
50
|
-
type:
|
|
50
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
assignedRole: {
|
|
54
|
-
type:
|
|
54
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
55
55
|
isOptional: false;
|
|
56
56
|
};
|
|
57
57
|
}>>;
|
|
58
|
-
declare const KbReviewDecidedEvent: _lssm_lib_contracts3.EventSpec<
|
|
58
|
+
declare const KbReviewDecidedEvent: _lssm_lib_contracts3.EventSpec<_lssm_lib_schema36.SchemaModel<{
|
|
59
59
|
reviewTaskId: {
|
|
60
|
-
type:
|
|
60
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
61
61
|
isOptional: false;
|
|
62
62
|
};
|
|
63
63
|
decision: {
|
|
64
|
-
type:
|
|
64
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
65
65
|
isOptional: false;
|
|
66
66
|
};
|
|
67
67
|
decidedBy: {
|
|
68
|
-
type:
|
|
68
|
+
type: _lssm_lib_schema36.FieldType<string, string>;
|
|
69
69
|
isOptional: false;
|
|
70
70
|
};
|
|
71
71
|
}>>;
|
package/dist/events.js
CHANGED
|
@@ -1 +1,127 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineSchemaModel } from "./libs/contracts/dist/schema/dist/SchemaModel.js";
|
|
2
|
+
import { defineEvent } from "./libs/contracts/dist/events.js";
|
|
3
|
+
import "./libs/contracts/dist/index.js";
|
|
4
|
+
import { ScalarTypeEnum } from "./libs/schema/dist/ScalarTypeEnum.js";
|
|
5
|
+
import "./libs/schema/dist/index.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events.ts
|
|
8
|
+
const KbChangeDetectedPayload = defineSchemaModel({
|
|
9
|
+
name: "KbChangeDetectedPayload",
|
|
10
|
+
description: "Emitted when a source change is detected.",
|
|
11
|
+
fields: {
|
|
12
|
+
changeCandidateId: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
sourceDocumentId: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
riskLevel: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const KbChangeDetectedEvent = defineEvent({
|
|
27
|
+
name: "kb.change.detected",
|
|
28
|
+
version: 1,
|
|
29
|
+
description: "KB source change detected.",
|
|
30
|
+
payload: KbChangeDetectedPayload
|
|
31
|
+
});
|
|
32
|
+
const KbChangeSummarizedPayload = defineSchemaModel({
|
|
33
|
+
name: "KbChangeSummarizedPayload",
|
|
34
|
+
description: "Emitted when a change summary is produced.",
|
|
35
|
+
fields: {
|
|
36
|
+
changeCandidateId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
summary: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
riskLevel: {
|
|
45
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const KbChangeSummarizedEvent = defineEvent({
|
|
51
|
+
name: "kb.change.summarized",
|
|
52
|
+
version: 1,
|
|
53
|
+
description: "KB change summarized.",
|
|
54
|
+
payload: KbChangeSummarizedPayload
|
|
55
|
+
});
|
|
56
|
+
const KbPatchProposedPayload = defineSchemaModel({
|
|
57
|
+
name: "KbPatchProposedPayload",
|
|
58
|
+
description: "Emitted when draft rule patches are proposed.",
|
|
59
|
+
fields: {
|
|
60
|
+
changeCandidateId: {
|
|
61
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
+
isOptional: false
|
|
63
|
+
},
|
|
64
|
+
proposedRuleVersionIds: {
|
|
65
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
+
isArray: true,
|
|
67
|
+
isOptional: false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const KbPatchProposedEvent = defineEvent({
|
|
72
|
+
name: "kb.patch.proposed",
|
|
73
|
+
version: 1,
|
|
74
|
+
description: "KB rule patch proposed (draft versions created).",
|
|
75
|
+
payload: KbPatchProposedPayload
|
|
76
|
+
});
|
|
77
|
+
const KbReviewRequestedPayload = defineSchemaModel({
|
|
78
|
+
name: "KbReviewRequestedPayload",
|
|
79
|
+
description: "Emitted when a review is requested.",
|
|
80
|
+
fields: {
|
|
81
|
+
reviewTaskId: {
|
|
82
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
83
|
+
isOptional: false
|
|
84
|
+
},
|
|
85
|
+
changeCandidateId: {
|
|
86
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
87
|
+
isOptional: false
|
|
88
|
+
},
|
|
89
|
+
assignedRole: {
|
|
90
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
+
isOptional: false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const KbReviewRequestedEvent = defineEvent({
|
|
96
|
+
name: "kb.review.requested",
|
|
97
|
+
version: 1,
|
|
98
|
+
description: "KB review requested.",
|
|
99
|
+
payload: KbReviewRequestedPayload
|
|
100
|
+
});
|
|
101
|
+
const KbReviewDecidedPayload = defineSchemaModel({
|
|
102
|
+
name: "KbReviewDecidedPayload",
|
|
103
|
+
description: "Emitted when a review task is decided.",
|
|
104
|
+
fields: {
|
|
105
|
+
reviewTaskId: {
|
|
106
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
107
|
+
isOptional: false
|
|
108
|
+
},
|
|
109
|
+
decision: {
|
|
110
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
111
|
+
isOptional: false
|
|
112
|
+
},
|
|
113
|
+
decidedBy: {
|
|
114
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
115
|
+
isOptional: false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const KbReviewDecidedEvent = defineEvent({
|
|
120
|
+
name: "kb.review.decided",
|
|
121
|
+
version: 1,
|
|
122
|
+
description: "KB review decided.",
|
|
123
|
+
payload: KbReviewDecidedPayload
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
export { KbChangeDetectedEvent, KbChangeSummarizedEvent, KbPatchProposedEvent, KbReviewDecidedEvent, KbReviewRequestedEvent };
|
package/dist/example.js
CHANGED
|
@@ -1 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/example.ts
|
|
2
|
+
const example = {
|
|
3
|
+
id: "kb-update-pipeline",
|
|
4
|
+
title: "KB Update Pipeline",
|
|
5
|
+
summary: "Automation proposes KB updates; humans verify; everything audited and notified.",
|
|
6
|
+
tags: [
|
|
7
|
+
"knowledge",
|
|
8
|
+
"pipeline",
|
|
9
|
+
"hitl",
|
|
10
|
+
"audit"
|
|
11
|
+
],
|
|
12
|
+
kind: "knowledge",
|
|
13
|
+
visibility: "public",
|
|
14
|
+
docs: { rootDocId: "docs.examples.kb-update-pipeline" },
|
|
15
|
+
entrypoints: {
|
|
16
|
+
packageName: "@lssm/example.kb-update-pipeline",
|
|
17
|
+
feature: "./feature",
|
|
18
|
+
contracts: "./contracts",
|
|
19
|
+
handlers: "./handlers",
|
|
20
|
+
docs: "./docs"
|
|
21
|
+
},
|
|
22
|
+
surfaces: {
|
|
23
|
+
templates: true,
|
|
24
|
+
sandbox: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
modes: [
|
|
27
|
+
"markdown",
|
|
28
|
+
"specs",
|
|
29
|
+
"builder"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
studio: {
|
|
33
|
+
enabled: true,
|
|
34
|
+
installable: true
|
|
35
|
+
},
|
|
36
|
+
mcp: { enabled: true }
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var example_default = example;
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { example_default as default };
|