@lssm/example.policy-safe-knowledge-assistant 0.0.0-canary-20251217054315 → 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,27 @@
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/policy-safe-knowledge-assistant/tsdown.config.js (unrun)
5
+ ℹ entry: src/example.ts, src/feature.ts, src/index.ts, src/docs/index.ts, src/docs/policy-safe-knowledge-assistant.docblock.ts, src/seed/fixtures.ts, src/seed/index.ts, src/orchestrator/buildAnswer.ts
6
+ ℹ target: esnext
7
+ ℹ tsconfig: tsconfig.json
8
+ ℹ Build start
9
+ ℹ Cleaning 19 files
10
+ ℹ dist/orchestrator/buildAnswer.js 1.65 kB │ gzip: 0.71 kB
11
+ ℹ dist/docs/policy-safe-knowledge-assistant.docblock.js 1.62 kB │ gzip: 0.83 kB
12
+ ℹ dist/feature.js 1.57 kB │ gzip: 0.57 kB
13
+ ℹ dist/example.js 0.72 kB │ gzip: 0.41 kB
14
+ ℹ dist/seed/fixtures.js 0.56 kB │ gzip: 0.31 kB
15
+ ℹ dist/index.js 0.35 kB │ gzip: 0.20 kB
16
+ ℹ dist/seed/index.js 0.07 kB │ gzip: 0.08 kB
17
+ ℹ dist/docs/index.js 0.05 kB │ gzip: 0.07 kB
18
+ ℹ dist/orchestrator/buildAnswer.d.ts 1.27 kB │ gzip: 0.55 kB
19
+ ℹ dist/example.d.ts 1.20 kB │ gzip: 0.48 kB
20
+ ℹ dist/seed/fixtures.d.ts 0.99 kB │ gzip: 0.35 kB
21
+ ℹ dist/index.d.ts 0.40 kB │ gzip: 0.20 kB
22
+ ℹ dist/feature.d.ts 0.21 kB │ gzip: 0.15 kB
23
+ ℹ dist/seed/index.d.ts 0.07 kB │ gzip: 0.07 kB
24
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
25
+ ℹ dist/docs/policy-safe-knowledge-assistant.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
26
+ ℹ 16 files, total: 10.77 kB
27
+ ✔ Build complete in 4821ms
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lssm/example.policy-safe-knowledge-assistant
2
2
 
3
- ## 0.0.0-canary-20251217054315
3
+ ## 0.0.0-canary-20251217060433
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -9,62 +9,16 @@
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies [66a5dfd]
12
- - @lssm/example.kb-update-pipeline@0.0.0-canary-20251217054315
13
- - @lssm/example.learning-patterns@0.0.0-canary-20251217054315
14
- - @lssm/example.locale-jurisdiction-gate@0.0.0-canary-20251217054315
15
- - @lssm/example.versioned-knowledge-base@0.0.0-canary-20251217054315
16
- - @lssm/lib.contracts@0.0.0-canary-20251217054315
17
- - @lssm/lib.feature-flags@0.0.0-canary-20251217054315
18
- - @lssm/lib.files@0.0.0-canary-20251217054315
19
- - @lssm/lib.identity-rbac@0.0.0-canary-20251217054315
20
- - @lssm/lib.jobs@0.0.0-canary-20251217054315
21
- - @lssm/lib.metering@0.0.0-canary-20251217054315
22
- - @lssm/module.audit-trail@0.0.0-canary-20251217054315
23
- - @lssm/module.learning-journey@0.0.0-canary-20251217054315
24
- - @lssm/module.notifications@0.0.0-canary-20251217054315
25
-
26
- ## 1.42.0
27
-
28
- ### Minor Changes
29
-
30
- - 66a5dfd: initial release
31
-
32
- ### Patch Changes
33
-
34
- - Updated dependencies [66a5dfd]
35
- - @lssm/example.kb-update-pipeline@1.42.0
36
- - @lssm/example.learning-patterns@1.42.0
37
- - @lssm/example.locale-jurisdiction-gate@1.42.0
38
- - @lssm/example.versioned-knowledge-base@1.42.0
39
- - @lssm/lib.contracts@1.42.0
40
- - @lssm/lib.feature-flags@1.42.0
41
- - @lssm/lib.files@1.42.0
42
- - @lssm/lib.identity-rbac@1.42.0
43
- - @lssm/lib.jobs@1.42.0
44
- - @lssm/lib.metering@1.42.0
45
- - @lssm/module.audit-trail@1.42.0
46
- - @lssm/module.learning-journey@1.42.0
47
- - @lssm/module.notifications@1.42.0
48
-
49
- ## 0.0.0-canary-20251217053014
50
-
51
- ### Minor Changes
52
-
53
- - 66a5dfd: initial release
54
-
55
- ### Patch Changes
56
-
57
- - Updated dependencies [66a5dfd]
58
- - @lssm/example.kb-update-pipeline@0.0.0-canary-20251217053014
59
- - @lssm/example.learning-patterns@0.0.0-canary-20251217053014
60
- - @lssm/example.locale-jurisdiction-gate@0.0.0-canary-20251217053014
61
- - @lssm/example.versioned-knowledge-base@0.0.0-canary-20251217053014
62
- - @lssm/lib.contracts@0.0.0-canary-20251217053014
63
- - @lssm/lib.feature-flags@0.0.0-canary-20251217053014
64
- - @lssm/lib.files@0.0.0-canary-20251217053014
65
- - @lssm/lib.identity-rbac@0.0.0-canary-20251217053014
66
- - @lssm/lib.jobs@0.0.0-canary-20251217053014
67
- - @lssm/lib.metering@0.0.0-canary-20251217053014
68
- - @lssm/module.audit-trail@0.0.0-canary-20251217053014
69
- - @lssm/module.learning-journey@0.0.0-canary-20251217053014
70
- - @lssm/module.notifications@0.0.0-canary-20251217053014
12
+ - @lssm/example.kb-update-pipeline@0.0.0-canary-20251217060433
13
+ - @lssm/example.learning-patterns@0.0.0-canary-20251217060433
14
+ - @lssm/example.locale-jurisdiction-gate@0.0.0-canary-20251217060433
15
+ - @lssm/example.versioned-knowledge-base@0.0.0-canary-20251217060433
16
+ - @lssm/lib.contracts@0.0.0-canary-20251217060433
17
+ - @lssm/lib.feature-flags@0.0.0-canary-20251217060433
18
+ - @lssm/lib.files@0.0.0-canary-20251217060433
19
+ - @lssm/lib.identity-rbac@0.0.0-canary-20251217060433
20
+ - @lssm/lib.jobs@0.0.0-canary-20251217060433
21
+ - @lssm/lib.metering@0.0.0-canary-20251217060433
22
+ - @lssm/module.audit-trail@0.0.0-canary-20251217060433
23
+ - @lssm/module.learning-journey@0.0.0-canary-20251217060433
24
+ - @lssm/module.notifications@0.0.0-canary-20251217060433
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,34 @@
1
+ //#region src/example.d.ts
2
+ declare const example: {
3
+ readonly id: "policy-safe-knowledge-assistant";
4
+ readonly title: "Policy-safe Knowledge Assistant";
5
+ readonly summary: "All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.";
6
+ readonly tags: readonly ["assistant", "knowledge", "policy", "hitl", "learning"];
7
+ readonly kind: "template";
8
+ readonly visibility: "public";
9
+ readonly docs: {
10
+ readonly goalDocId: "docs.examples.policy-safe-knowledge-assistant.goal";
11
+ readonly usageDocId: "docs.examples.policy-safe-knowledge-assistant.usage";
12
+ };
13
+ readonly entrypoints: {
14
+ readonly packageName: "@lssm/example.policy-safe-knowledge-assistant";
15
+ readonly feature: "./feature";
16
+ readonly docs: "./docs";
17
+ };
18
+ readonly surfaces: {
19
+ readonly templates: true;
20
+ readonly sandbox: {
21
+ readonly enabled: true;
22
+ readonly modes: readonly ["playground", "specs", "builder", "markdown", "evolution"];
23
+ };
24
+ readonly studio: {
25
+ readonly enabled: true;
26
+ readonly installable: true;
27
+ };
28
+ readonly mcp: {
29
+ readonly enabled: true;
30
+ };
31
+ };
32
+ };
33
+ //#endregion
34
+ 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 PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec;
5
+ //#endregion
6
+ export { PolicySafeKnowledgeAssistantFeature };
@@ -0,0 +1,5 @@
1
+ import example from "./example.js";
2
+ import { PolicySafeKnowledgeAssistantFeature } from "./feature.js";
3
+ import { DEMO_FIXTURES } from "./seed/fixtures.js";
4
+ import { AssistantAnswerIR, BuildAnswerInput, buildPolicySafeAnswer } from "./orchestrator/buildAnswer.js";
5
+ export { AssistantAnswerIR, BuildAnswerInput, DEMO_FIXTURES, PolicySafeKnowledgeAssistantFeature, buildPolicySafeAnswer, example };
@@ -0,0 +1,52 @@
1
+ //#region src/orchestrator/buildAnswer.d.ts
2
+ type AllowedScope = 'education_only' | 'generic_info' | 'escalation_required';
3
+ interface AssistantAnswerIR {
4
+ locale: string;
5
+ jurisdiction: string;
6
+ allowedScope: AllowedScope;
7
+ sections: {
8
+ heading: string;
9
+ body: string;
10
+ }[];
11
+ citations: {
12
+ kbSnapshotId: string;
13
+ sourceType: string;
14
+ sourceId: string;
15
+ title?: string;
16
+ excerpt?: string;
17
+ }[];
18
+ disclaimers?: string[];
19
+ riskFlags?: string[];
20
+ refused?: boolean;
21
+ refusalReason?: string;
22
+ }
23
+ interface BuildAnswerInput {
24
+ envelope: {
25
+ traceId: string;
26
+ locale: string;
27
+ kbSnapshotId: string;
28
+ allowedScope: AllowedScope;
29
+ regulatoryContext: {
30
+ jurisdiction: string;
31
+ };
32
+ };
33
+ question: string;
34
+ kbSearch: (input: {
35
+ snapshotId: string;
36
+ jurisdiction: string;
37
+ query: string;
38
+ }) => Promise<{
39
+ items: {
40
+ ruleVersionId: string;
41
+ excerpt?: string;
42
+ }[];
43
+ }>;
44
+ }
45
+ /**
46
+ * Build a policy-safe assistant answer derived from KB search results.
47
+ *
48
+ * Deterministic: no LLM calls; if search yields no results, it refuses.
49
+ */
50
+ declare function buildPolicySafeAnswer(input: BuildAnswerInput): Promise<AssistantAnswerIR>;
51
+ //#endregion
52
+ export { AssistantAnswerIR, BuildAnswerInput, buildPolicySafeAnswer };
@@ -0,0 +1,34 @@
1
+ //#region src/seed/fixtures.d.ts
2
+ declare const DEMO_FIXTURES: {
3
+ readonly jurisdictions: readonly ["EU", "FR"];
4
+ readonly locales: readonly ["en-GB", "fr-FR"];
5
+ readonly demoOrgId: "org_demo";
6
+ readonly demoUserId: "user_demo";
7
+ readonly sources: {
8
+ readonly EU_SOURCE_1: {
9
+ readonly jurisdiction: "EU";
10
+ readonly authority: "DemoAuthority";
11
+ readonly title: "EU Demo Source v1";
12
+ readonly fetchedAt: Date;
13
+ readonly hash: "hash_eu_v1";
14
+ readonly fileId: "file_eu_v1";
15
+ };
16
+ readonly EU_SOURCE_2: {
17
+ readonly jurisdiction: "EU";
18
+ readonly authority: "DemoAuthority";
19
+ readonly title: "EU Demo Source v2";
20
+ readonly fetchedAt: Date;
21
+ readonly hash: "hash_eu_v2";
22
+ readonly fileId: "file_eu_v2";
23
+ };
24
+ };
25
+ readonly rules: {
26
+ readonly EU_RULE_TAX: {
27
+ readonly id: "rule_eu_tax";
28
+ readonly jurisdiction: "EU";
29
+ readonly topicKey: "tax_reporting";
30
+ };
31
+ };
32
+ };
33
+ //#endregion
34
+ export { DEMO_FIXTURES };
@@ -0,0 +1,2 @@
1
+ import { DEMO_FIXTURES } from "./fixtures.js";
2
+ export { DEMO_FIXTURES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/example.policy-safe-knowledge-assistant",
3
- "version": "0.0.0-canary-20251217054315",
3
+ "version": "0.0.0-canary-20251217060433",
4
4
  "description": "All-in-one template example: policy-safe knowledge assistant with locale/jurisdiction gating, versioned KB snapshots, HITL update pipeline, and learning hub.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,23 +31,23 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@lssm/example.locale-jurisdiction-gate": "0.0.0-canary-20251217054315",
35
- "@lssm/example.versioned-knowledge-base": "0.0.0-canary-20251217054315",
36
- "@lssm/example.kb-update-pipeline": "0.0.0-canary-20251217054315",
37
- "@lssm/example.learning-patterns": "0.0.0-canary-20251217054315",
38
- "@lssm/lib.contracts": "0.0.0-canary-20251217054315",
39
- "@lssm/lib.identity-rbac": "0.0.0-canary-20251217054315",
40
- "@lssm/lib.jobs": "0.0.0-canary-20251217054315",
41
- "@lssm/lib.feature-flags": "0.0.0-canary-20251217054315",
42
- "@lssm/lib.files": "0.0.0-canary-20251217054315",
43
- "@lssm/lib.metering": "0.0.0-canary-20251217054315",
44
- "@lssm/module.audit-trail": "0.0.0-canary-20251217054315",
45
- "@lssm/module.notifications": "0.0.0-canary-20251217054315",
46
- "@lssm/module.learning-journey": "0.0.0-canary-20251217054315"
34
+ "@lssm/example.locale-jurisdiction-gate": "0.0.0-canary-20251217060433",
35
+ "@lssm/example.versioned-knowledge-base": "0.0.0-canary-20251217060433",
36
+ "@lssm/example.kb-update-pipeline": "0.0.0-canary-20251217060433",
37
+ "@lssm/example.learning-patterns": "0.0.0-canary-20251217060433",
38
+ "@lssm/lib.contracts": "0.0.0-canary-20251217060433",
39
+ "@lssm/lib.identity-rbac": "0.0.0-canary-20251217060433",
40
+ "@lssm/lib.jobs": "0.0.0-canary-20251217060433",
41
+ "@lssm/lib.feature-flags": "0.0.0-canary-20251217060433",
42
+ "@lssm/lib.files": "0.0.0-canary-20251217060433",
43
+ "@lssm/lib.metering": "0.0.0-canary-20251217060433",
44
+ "@lssm/module.audit-trail": "0.0.0-canary-20251217060433",
45
+ "@lssm/module.notifications": "0.0.0-canary-20251217060433",
46
+ "@lssm/module.learning-journey": "0.0.0-canary-20251217060433"
47
47
  },
48
48
  "devDependencies": {
49
- "@lssm/tool.tsdown": "0.0.0-canary-20251217054315",
50
- "@lssm/tool.typescript": "0.0.0-canary-20251217054315",
49
+ "@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
50
+ "@lssm/tool.typescript": "0.0.0-canary-20251217060433",
51
51
  "tsdown": "^0.17.4",
52
52
  "typescript": "^5.9.3"
53
53
  },