@contractspec/example.policy-safe-knowledge-assistant 1.44.1 → 1.45.0

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.
@@ -7,29 +7,29 @@ $ tsdown
7
7
  ℹ Build start
8
8
  ℹ Cleaning 28 files
9
9
  ℹ dist/orchestrator/buildAnswer.js 2.47 kB │ gzip: 0.93 kB
10
- ℹ dist/feature.js 2.23 kB │ gzip: 0.66 kB
10
+ ℹ dist/feature.js 2.40 kB │ gzip: 0.67 kB
11
11
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.js 1.88 kB │ gzip: 0.90 kB
12
- ℹ dist/example.js 1.02 kB │ gzip: 0.51 kB
12
+ ℹ dist/example.js 1.13 kB │ gzip: 0.56 kB
13
13
  ℹ dist/seed/fixtures.js 0.80 kB │ gzip: 0.40 kB
14
14
  ℹ dist/index.js 0.38 kB │ gzip: 0.20 kB
15
15
  ℹ dist/seed/index.js 0.07 kB │ gzip: 0.07 kB
16
16
  ℹ dist/docs/index.js 0.06 kB │ gzip: 0.08 kB
17
17
  ℹ dist/orchestrator/buildAnswer.js.map 5.08 kB │ gzip: 1.68 kB
18
- ℹ dist/feature.js.map 3.53 kB │ gzip: 1.05 kB
18
+ ℹ dist/feature.js.map 3.71 kB │ gzip: 1.05 kB
19
19
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.js.map 2.38 kB │ gzip: 1.08 kB
20
- ℹ dist/example.js.map 1.41 kB │ gzip: 0.70 kB
20
+ ℹ dist/example.js.map 1.69 kB │ gzip: 0.79 kB
21
21
  ℹ dist/seed/fixtures.js.map 1.29 kB │ gzip: 0.55 kB
22
22
  ℹ dist/orchestrator/buildAnswer.d.ts.map 0.39 kB │ gzip: 0.25 kB
23
23
  ℹ dist/seed/fixtures.d.ts.map 0.20 kB │ gzip: 0.15 kB
24
- ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
25
24
  ℹ dist/feature.d.ts.map 0.13 kB │ gzip: 0.12 kB
25
+ ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
26
26
  ℹ dist/orchestrator/buildAnswer.d.ts 1.31 kB │ gzip: 0.57 kB
27
- ℹ dist/example.d.ts 1.24 kB │ gzip: 0.51 kB
28
27
  ℹ dist/seed/fixtures.d.ts 1.03 kB │ gzip: 0.37 kB
29
28
  ℹ dist/index.d.ts 0.40 kB │ gzip: 0.20 kB
30
29
  ℹ dist/feature.d.ts 0.26 kB │ gzip: 0.18 kB
30
+ ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
31
31
  ℹ dist/seed/index.d.ts 0.07 kB │ gzip: 0.07 kB
32
32
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
33
33
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
34
- ℹ 25 files, total: 27.79 kB
35
- ✔ Build complete in 14025ms
34
+ ℹ 25 files, total: 27.47 kB
35
+ ✔ Build complete in 14053ms
@@ -8,29 +8,29 @@ $ tsdown
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
10
  ℹ dist/orchestrator/buildAnswer.js 2.47 kB │ gzip: 0.93 kB
11
- ℹ dist/feature.js 2.23 kB │ gzip: 0.66 kB
11
+ ℹ dist/feature.js 2.40 kB │ gzip: 0.67 kB
12
12
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.js 1.88 kB │ gzip: 0.90 kB
13
- ℹ dist/example.js 1.02 kB │ gzip: 0.51 kB
13
+ ℹ dist/example.js 1.13 kB │ gzip: 0.56 kB
14
14
  ℹ dist/seed/fixtures.js 0.80 kB │ gzip: 0.40 kB
15
15
  ℹ dist/index.js 0.38 kB │ gzip: 0.20 kB
16
16
  ℹ dist/seed/index.js 0.07 kB │ gzip: 0.07 kB
17
17
  ℹ dist/docs/index.js 0.06 kB │ gzip: 0.08 kB
18
18
  ℹ dist/orchestrator/buildAnswer.js.map 5.08 kB │ gzip: 1.68 kB
19
- ℹ dist/feature.js.map 3.53 kB │ gzip: 1.05 kB
19
+ ℹ dist/feature.js.map 3.71 kB │ gzip: 1.05 kB
20
20
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.js.map 2.38 kB │ gzip: 1.08 kB
21
- ℹ dist/example.js.map 1.41 kB │ gzip: 0.70 kB
21
+ ℹ dist/example.js.map 1.69 kB │ gzip: 0.79 kB
22
22
  ℹ dist/seed/fixtures.js.map 1.29 kB │ gzip: 0.55 kB
23
23
  ℹ dist/orchestrator/buildAnswer.d.ts.map 0.39 kB │ gzip: 0.25 kB
24
24
  ℹ dist/seed/fixtures.d.ts.map 0.20 kB │ gzip: 0.15 kB
25
- ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
26
25
  ℹ dist/feature.d.ts.map 0.13 kB │ gzip: 0.12 kB
26
+ ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
27
27
  ℹ dist/orchestrator/buildAnswer.d.ts 1.31 kB │ gzip: 0.57 kB
28
- ℹ dist/example.d.ts 1.24 kB │ gzip: 0.51 kB
29
28
  ℹ dist/seed/fixtures.d.ts 1.03 kB │ gzip: 0.37 kB
30
29
  ℹ dist/index.d.ts 0.40 kB │ gzip: 0.20 kB
31
30
  ℹ dist/feature.d.ts 0.26 kB │ gzip: 0.18 kB
31
+ ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
32
32
  ℹ dist/seed/index.d.ts 0.07 kB │ gzip: 0.07 kB
33
33
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
34
34
  ℹ dist/docs/policy-safe-knowledge-assistant.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
35
- ℹ 25 files, total: 27.79 kB
36
- ✔ Build complete in 12526ms
35
+ ℹ 25 files, total: 27.47 kB
36
+ ✔ Build complete in 15100ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @contractspec/example.policy-safe-knowledge-assistant
2
2
 
3
+ ## 1.45.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e73ca1d: feat: improve app config and examples contracts
8
+ feat: Contract layers support (features, examples, app-configs)
9
+
10
+ ### New CLI Commands
11
+ - `contractspec list layers` - List all contract layers with filtering
12
+
13
+ ### Enhanced Commands
14
+ - `contractspec ci` - New `layers` check category validates features/examples/config
15
+ - `contractspec doctor` - New `layers` health checks
16
+ - `contractspec integrity` - Now shows layer statistics
17
+
18
+ ### New APIs
19
+ - `discoverLayers()` - Scan workspace for all layer files
20
+ - `scanExampleSource()` - Parse ExampleSpec from source code
21
+ - `isExampleFile()` - Check if file is an example spec
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [e73ca1d]
26
+ - @contractspec/example.locale-jurisdiction-gate@1.45.0
27
+ - @contractspec/example.versioned-knowledge-base@1.45.0
28
+ - @contractspec/example.kb-update-pipeline@1.45.0
29
+ - @contractspec/example.learning-patterns@1.45.0
30
+ - @contractspec/module.learning-journey@1.45.0
31
+ - @contractspec/module.notifications@1.45.0
32
+ - @contractspec/module.audit-trail@1.45.0
33
+ - @contractspec/lib.feature-flags@1.45.0
34
+ - @contractspec/lib.identity-rbac@1.45.0
35
+ - @contractspec/lib.contracts@1.45.0
36
+ - @contractspec/lib.metering@1.45.0
37
+ - @contractspec/lib.schema@1.45.0
38
+ - @contractspec/lib.files@1.45.0
39
+ - @contractspec/lib.jobs@1.45.0
40
+
3
41
  ## 1.44.1
4
42
 
5
43
  ### Patch Changes
package/dist/example.d.ts CHANGED
@@ -1,35 +1,7 @@
1
+ import { ExampleSpec } from "@contractspec/lib.contracts";
2
+
1
3
  //#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: "@contractspec/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
- };
4
+ declare const example: ExampleSpec;
33
5
  //#endregion
34
6
  export { example as default };
35
7
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EA0BI,EAAA,iCAAA"}
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAAS"}
package/dist/example.js CHANGED
@@ -1,17 +1,22 @@
1
1
  //#region src/example.ts
2
2
  const example = {
3
- id: "policy-safe-knowledge-assistant",
4
- title: "Policy-safe Knowledge Assistant",
5
- summary: "All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.",
6
- tags: [
7
- "assistant",
8
- "knowledge",
9
- "policy",
10
- "hitl",
11
- "learning"
12
- ],
13
- kind: "template",
14
- visibility: "public",
3
+ meta: {
4
+ key: "policy-safe-knowledge-assistant",
5
+ version: "1.0.0",
6
+ title: "Policy-safe Knowledge Assistant",
7
+ description: "All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.",
8
+ kind: "template",
9
+ visibility: "public",
10
+ stability: "experimental",
11
+ owners: ["@platform.core"],
12
+ tags: [
13
+ "assistant",
14
+ "knowledge",
15
+ "policy",
16
+ "hitl",
17
+ "learning"
18
+ ]
19
+ },
15
20
  docs: {
16
21
  goalDocId: "docs.examples.policy-safe-knowledge-assistant.goal",
17
22
  usageDocId: "docs.examples.policy-safe-knowledge-assistant.usage"
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'policy-safe-knowledge-assistant',\n title: 'Policy-safe Knowledge Assistant',\n summary:\n 'All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.',\n tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],\n kind: 'template',\n visibility: 'public',\n docs: {\n goalDocId: 'docs.examples.policy-safe-knowledge-assistant.goal',\n usageDocId: 'docs.examples.policy-safe-knowledge-assistant.usage',\n },\n entrypoints: {\n packageName: '@contractspec/example.policy-safe-knowledge-assistant',\n feature: './feature',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;EAAC;EAAa;EAAa;EAAU;EAAQ;EAAW;CAC9D,MAAM;CACN,YAAY;CACZ,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
1
+ {"version":3,"file":"example.js","names":["example: ExampleSpec"],"sources":["../src/example.ts"],"sourcesContent":["import type { ExampleSpec } from '@contractspec/lib.contracts';\n\nconst example: ExampleSpec = {\n meta: {\n key: 'policy-safe-knowledge-assistant',\n version: '1.0.0',\n title: 'Policy-safe Knowledge Assistant',\n description:\n 'All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],\n },\n docs: {\n goalDocId: 'docs.examples.policy-safe-knowledge-assistant.goal',\n usageDocId: 'docs.examples.policy-safe-knowledge-assistant.usage',\n },\n entrypoints: {\n packageName: '@contractspec/example.policy-safe-knowledge-assistant',\n feature: './feature',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n};\n\nexport default example;\n"],"mappings":";AAEA,MAAMA,UAAuB;CAC3B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAa;GAAa;GAAU;GAAQ;GAAW;EAC/D;CACD,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
package/dist/feature.js CHANGED
@@ -2,7 +2,7 @@
2
2
  const PolicySafeKnowledgeAssistantFeature = {
3
3
  meta: {
4
4
  key: "policy-safe-knowledge-assistant",
5
- version: 1,
5
+ version: "1.0.0",
6
6
  title: "Policy-safe Knowledge Assistant",
7
7
  description: "All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.",
8
8
  domain: "knowledge",
@@ -19,89 +19,89 @@ const PolicySafeKnowledgeAssistantFeature = {
19
19
  operations: [
20
20
  {
21
21
  key: "assistant.answer",
22
- version: 1
22
+ version: "1.0.0"
23
23
  },
24
24
  {
25
25
  key: "assistant.explainConcept",
26
- version: 1
26
+ version: "1.0.0"
27
27
  },
28
28
  {
29
29
  key: "kb.ingestSource",
30
- version: 1
30
+ version: "1.0.0"
31
31
  },
32
32
  {
33
33
  key: "kb.upsertRuleVersion",
34
- version: 1
34
+ version: "1.0.0"
35
35
  },
36
36
  {
37
37
  key: "kb.approveRuleVersion",
38
- version: 1
38
+ version: "1.0.0"
39
39
  },
40
40
  {
41
41
  key: "kb.publishSnapshot",
42
- version: 1
42
+ version: "1.0.0"
43
43
  },
44
44
  {
45
45
  key: "kb.search",
46
- version: 1
46
+ version: "1.0.0"
47
47
  },
48
48
  {
49
49
  key: "kbPipeline.runWatch",
50
- version: 1
50
+ version: "1.0.0"
51
51
  },
52
52
  {
53
53
  key: "kbPipeline.createReviewTask",
54
- version: 1
54
+ version: "1.0.0"
55
55
  },
56
56
  {
57
57
  key: "kbPipeline.submitDecision",
58
- version: 1
58
+ version: "1.0.0"
59
59
  },
60
60
  {
61
61
  key: "kbPipeline.publishIfReady",
62
- version: 1
62
+ version: "1.0.0"
63
63
  }
64
64
  ],
65
65
  events: [
66
66
  {
67
67
  key: "assistant.answer.requested",
68
- version: 1
68
+ version: "1.0.0"
69
69
  },
70
70
  {
71
71
  key: "assistant.answer.blocked",
72
- version: 1
72
+ version: "1.0.0"
73
73
  },
74
74
  {
75
75
  key: "assistant.answer.delivered",
76
- version: 1
76
+ version: "1.0.0"
77
77
  },
78
78
  {
79
79
  key: "kb.source.ingested",
80
- version: 1
80
+ version: "1.0.0"
81
81
  },
82
82
  {
83
83
  key: "kb.ruleVersion.created",
84
- version: 1
84
+ version: "1.0.0"
85
85
  },
86
86
  {
87
87
  key: "kb.ruleVersion.approved",
88
- version: 1
88
+ version: "1.0.0"
89
89
  },
90
90
  {
91
91
  key: "kb.snapshot.published",
92
- version: 1
92
+ version: "1.0.0"
93
93
  },
94
94
  {
95
95
  key: "kb.change.detected",
96
- version: 1
96
+ version: "1.0.0"
97
97
  },
98
98
  {
99
99
  key: "kb.review.requested",
100
- version: 1
100
+ version: "1.0.0"
101
101
  },
102
102
  {
103
103
  key: "kb.review.decided",
104
- version: 1
104
+ version: "1.0.0"
105
105
  }
106
106
  ],
107
107
  presentations: [],
@@ -110,35 +110,35 @@ const PolicySafeKnowledgeAssistantFeature = {
110
110
  capabilities: { requires: [
111
111
  {
112
112
  key: "identity",
113
- version: 1
113
+ version: "1.0.0"
114
114
  },
115
115
  {
116
116
  key: "audit-trail",
117
- version: 1
117
+ version: "1.0.0"
118
118
  },
119
119
  {
120
120
  key: "notifications",
121
- version: 1
121
+ version: "1.0.0"
122
122
  },
123
123
  {
124
124
  key: "jobs",
125
- version: 1
125
+ version: "1.0.0"
126
126
  },
127
127
  {
128
128
  key: "feature-flags",
129
- version: 1
129
+ version: "1.0.0"
130
130
  },
131
131
  {
132
132
  key: "files",
133
- version: 1
133
+ version: "1.0.0"
134
134
  },
135
135
  {
136
136
  key: "metering",
137
- version: 1
137
+ version: "1.0.0"
138
138
  },
139
139
  {
140
140
  key: "learning-journey",
141
- version: 1
141
+ version: "1.0.0"
142
142
  }
143
143
  ] }
144
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"feature.js","names":["PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec"],"sources":["../src/feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {\n meta: {\n key: 'policy-safe-knowledge-assistant',\n version: 1,\n title: 'Policy-safe Knowledge Assistant',\n description:\n 'All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],\n stability: 'experimental',\n },\n operations: [\n // Gate\n { key: 'assistant.answer', version: 1 },\n { key: 'assistant.explainConcept', version: 1 },\n // KB\n { key: 'kb.ingestSource', version: 1 },\n { key: 'kb.upsertRuleVersion', version: 1 },\n { key: 'kb.approveRuleVersion', version: 1 },\n { key: 'kb.publishSnapshot', version: 1 },\n { key: 'kb.search', version: 1 },\n // Pipeline\n { key: 'kbPipeline.runWatch', version: 1 },\n { key: 'kbPipeline.createReviewTask', version: 1 },\n { key: 'kbPipeline.submitDecision', version: 1 },\n { key: 'kbPipeline.publishIfReady', version: 1 },\n ],\n events: [\n { key: 'assistant.answer.requested', version: 1 },\n { key: 'assistant.answer.blocked', version: 1 },\n { key: 'assistant.answer.delivered', version: 1 },\n { key: 'kb.source.ingested', version: 1 },\n { key: 'kb.ruleVersion.created', version: 1 },\n { key: 'kb.ruleVersion.approved', version: 1 },\n { key: 'kb.snapshot.published', version: 1 },\n { key: 'kb.change.detected', version: 1 },\n { key: 'kb.review.requested', version: 1 },\n { key: 'kb.review.decided', version: 1 },\n ],\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n capabilities: {\n requires: [\n { key: 'identity', version: 1 },\n { key: 'audit-trail', version: 1 },\n { key: 'notifications', version: 1 },\n { key: 'jobs', version: 1 },\n { key: 'feature-flags', version: 1 },\n { key: 'files', version: 1 },\n { key: 'metering', version: 1 },\n { key: 'learning-journey', version: 1 },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,sCAAyD;CACpE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAa;GAAU;GAAQ;GAAW;EAC9D,WAAW;EACZ;CACD,YAAY;EAEV;GAAE,KAAK;GAAoB,SAAS;GAAG;EACvC;GAAE,KAAK;GAA4B,SAAS;GAAG;EAE/C;GAAE,KAAK;GAAmB,SAAS;GAAG;EACtC;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAAa,SAAS;GAAG;EAEhC;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC1C;GAAE,KAAK;GAA+B,SAAS;GAAG;EAClD;GAAE,KAAK;GAA6B,SAAS;GAAG;EAChD;GAAE,KAAK;GAA6B,SAAS;GAAG;EACjD;CACD,QAAQ;EACN;GAAE,KAAK;GAA8B,SAAS;GAAG;EACjD;GAAE,KAAK;GAA4B,SAAS;GAAG;EAC/C;GAAE,KAAK;GAA8B,SAAS;GAAG;EACjD;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAA2B,SAAS;GAAG;EAC9C;GAAE,KAAK;GAAyB,SAAS;GAAG;EAC5C;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC1C;GAAE,KAAK;GAAqB,SAAS;GAAG;EACzC;CACD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CACxB,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAG;EAC/B;GAAE,KAAK;GAAe,SAAS;GAAG;EAClC;GAAE,KAAK;GAAiB,SAAS;GAAG;EACpC;GAAE,KAAK;GAAQ,SAAS;GAAG;EAC3B;GAAE,KAAK;GAAiB,SAAS;GAAG;EACpC;GAAE,KAAK;GAAS,SAAS;GAAG;EAC5B;GAAE,KAAK;GAAY,SAAS;GAAG;EAC/B;GAAE,KAAK;GAAoB,SAAS;GAAG;EACxC,EACF;CACF"}
1
+ {"version":3,"file":"feature.js","names":["PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec"],"sources":["../src/feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {\n meta: {\n key: 'policy-safe-knowledge-assistant',\n version: '1.0.0',\n title: 'Policy-safe Knowledge Assistant',\n description:\n 'All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.',\n domain: 'knowledge',\n owners: ['@examples'],\n tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],\n stability: 'experimental',\n },\n operations: [\n // Gate\n { key: 'assistant.answer', version: '1.0.0' },\n { key: 'assistant.explainConcept', version: '1.0.0' },\n // KB\n { key: 'kb.ingestSource', version: '1.0.0' },\n { key: 'kb.upsertRuleVersion', version: '1.0.0' },\n { key: 'kb.approveRuleVersion', version: '1.0.0' },\n { key: 'kb.publishSnapshot', version: '1.0.0' },\n { key: 'kb.search', version: '1.0.0' },\n // Pipeline\n { key: 'kbPipeline.runWatch', version: '1.0.0' },\n { key: 'kbPipeline.createReviewTask', version: '1.0.0' },\n { key: 'kbPipeline.submitDecision', version: '1.0.0' },\n { key: 'kbPipeline.publishIfReady', version: '1.0.0' },\n ],\n events: [\n { key: 'assistant.answer.requested', version: '1.0.0' },\n { key: 'assistant.answer.blocked', version: '1.0.0' },\n { key: 'assistant.answer.delivered', version: '1.0.0' },\n { key: 'kb.source.ingested', version: '1.0.0' },\n { key: 'kb.ruleVersion.created', version: '1.0.0' },\n { key: 'kb.ruleVersion.approved', version: '1.0.0' },\n { key: 'kb.snapshot.published', version: '1.0.0' },\n { key: 'kb.change.detected', version: '1.0.0' },\n { key: 'kb.review.requested', version: '1.0.0' },\n { key: 'kb.review.decided', version: '1.0.0' },\n ],\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n { key: 'jobs', version: '1.0.0' },\n { key: 'feature-flags', version: '1.0.0' },\n { key: 'files', version: '1.0.0' },\n { key: 'metering', version: '1.0.0' },\n { key: 'learning-journey', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,sCAAyD;CACpE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,YAAY;EACrB,MAAM;GAAC;GAAa;GAAa;GAAU;GAAQ;GAAW;EAC9D,WAAW;EACZ;CACD,YAAY;EAEV;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAA4B,SAAS;GAAS;EAErD;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAAyB,SAAS;GAAS;EAClD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAa,SAAS;GAAS;EAEtC;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAA+B,SAAS;GAAS;EACxD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACvD;CACD,QAAQ;EACN;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACpD;GAAE,KAAK;GAAyB,SAAS;GAAS;EAClD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC/C;CACD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CACxB,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC1C;GAAE,KAAK;GAAQ,SAAS;GAAS;EACjC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC1C;GAAE,KAAK;GAAS,SAAS;GAAS;EAClC;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC9C,EACF;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.policy-safe-knowledge-assistant",
3
- "version": "1.44.1",
3
+ "version": "1.45.0",
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,24 +31,24 @@
31
31
  "test": "bun test"
32
32
  },
33
33
  "dependencies": {
34
- "@contractspec/example.locale-jurisdiction-gate": "1.44.1",
35
- "@contractspec/example.versioned-knowledge-base": "1.44.1",
36
- "@contractspec/example.kb-update-pipeline": "1.44.1",
37
- "@contractspec/example.learning-patterns": "1.44.1",
38
- "@contractspec/lib.schema": "1.44.1",
39
- "@contractspec/lib.contracts": "1.44.1",
40
- "@contractspec/lib.identity-rbac": "1.44.1",
41
- "@contractspec/lib.jobs": "1.44.1",
42
- "@contractspec/lib.feature-flags": "1.44.1",
43
- "@contractspec/lib.files": "1.44.1",
44
- "@contractspec/lib.metering": "1.44.1",
45
- "@contractspec/module.audit-trail": "1.44.1",
46
- "@contractspec/module.notifications": "1.44.1",
47
- "@contractspec/module.learning-journey": "1.44.1"
34
+ "@contractspec/example.locale-jurisdiction-gate": "1.45.0",
35
+ "@contractspec/example.versioned-knowledge-base": "1.45.0",
36
+ "@contractspec/example.kb-update-pipeline": "1.45.0",
37
+ "@contractspec/example.learning-patterns": "1.45.0",
38
+ "@contractspec/lib.schema": "1.45.0",
39
+ "@contractspec/lib.contracts": "1.45.0",
40
+ "@contractspec/lib.identity-rbac": "1.45.0",
41
+ "@contractspec/lib.jobs": "1.45.0",
42
+ "@contractspec/lib.feature-flags": "1.45.0",
43
+ "@contractspec/lib.files": "1.45.0",
44
+ "@contractspec/lib.metering": "1.45.0",
45
+ "@contractspec/module.audit-trail": "1.45.0",
46
+ "@contractspec/module.notifications": "1.45.0",
47
+ "@contractspec/module.learning-journey": "1.45.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@contractspec/tool.tsdown": "1.44.1",
51
- "@contractspec/tool.typescript": "1.44.1",
50
+ "@contractspec/tool.tsdown": "1.45.0",
51
+ "@contractspec/tool.typescript": "1.45.0",
52
52
  "tsdown": "^0.18.3",
53
53
  "typescript": "^5.9.3"
54
54
  },
package/src/example.ts CHANGED
@@ -1,11 +1,18 @@
1
- const example = {
2
- id: 'policy-safe-knowledge-assistant',
3
- title: 'Policy-safe Knowledge Assistant',
4
- summary:
5
- 'All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.',
6
- tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],
7
- kind: 'template',
8
- visibility: 'public',
1
+ import type { ExampleSpec } from '@contractspec/lib.contracts';
2
+
3
+ const example: ExampleSpec = {
4
+ meta: {
5
+ key: 'policy-safe-knowledge-assistant',
6
+ version: '1.0.0',
7
+ title: 'Policy-safe Knowledge Assistant',
8
+ description:
9
+ 'All-in-one template: locale/jurisdiction gating + versioned KB snapshots + HITL update pipeline + learning hub.',
10
+ kind: 'template',
11
+ visibility: 'public',
12
+ stability: 'experimental',
13
+ owners: ['@platform.core'],
14
+ tags: ['assistant', 'knowledge', 'policy', 'hitl', 'learning'],
15
+ },
9
16
  docs: {
10
17
  goalDocId: 'docs.examples.policy-safe-knowledge-assistant.goal',
11
18
  usageDocId: 'docs.examples.policy-safe-knowledge-assistant.usage',
@@ -24,6 +31,6 @@ const example = {
24
31
  studio: { enabled: true, installable: true },
25
32
  mcp: { enabled: true },
26
33
  },
27
- } as const;
34
+ };
28
35
 
29
36
  export default example;
package/src/feature.ts CHANGED
@@ -3,7 +3,7 @@ import type { FeatureModuleSpec } from '@contractspec/lib.contracts';
3
3
  export const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {
4
4
  meta: {
5
5
  key: 'policy-safe-knowledge-assistant',
6
- version: 1,
6
+ version: '1.0.0',
7
7
  title: 'Policy-safe Knowledge Assistant',
8
8
  description:
9
9
  'All-in-one example composing locale/jurisdiction gate + versioned KB + HITL pipeline + learning hub.',
@@ -14,45 +14,45 @@ export const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {
14
14
  },
15
15
  operations: [
16
16
  // Gate
17
- { key: 'assistant.answer', version: 1 },
18
- { key: 'assistant.explainConcept', version: 1 },
17
+ { key: 'assistant.answer', version: '1.0.0' },
18
+ { key: 'assistant.explainConcept', version: '1.0.0' },
19
19
  // KB
20
- { key: 'kb.ingestSource', version: 1 },
21
- { key: 'kb.upsertRuleVersion', version: 1 },
22
- { key: 'kb.approveRuleVersion', version: 1 },
23
- { key: 'kb.publishSnapshot', version: 1 },
24
- { key: 'kb.search', version: 1 },
20
+ { key: 'kb.ingestSource', version: '1.0.0' },
21
+ { key: 'kb.upsertRuleVersion', version: '1.0.0' },
22
+ { key: 'kb.approveRuleVersion', version: '1.0.0' },
23
+ { key: 'kb.publishSnapshot', version: '1.0.0' },
24
+ { key: 'kb.search', version: '1.0.0' },
25
25
  // Pipeline
26
- { key: 'kbPipeline.runWatch', version: 1 },
27
- { key: 'kbPipeline.createReviewTask', version: 1 },
28
- { key: 'kbPipeline.submitDecision', version: 1 },
29
- { key: 'kbPipeline.publishIfReady', version: 1 },
26
+ { key: 'kbPipeline.runWatch', version: '1.0.0' },
27
+ { key: 'kbPipeline.createReviewTask', version: '1.0.0' },
28
+ { key: 'kbPipeline.submitDecision', version: '1.0.0' },
29
+ { key: 'kbPipeline.publishIfReady', version: '1.0.0' },
30
30
  ],
31
31
  events: [
32
- { key: 'assistant.answer.requested', version: 1 },
33
- { key: 'assistant.answer.blocked', version: 1 },
34
- { key: 'assistant.answer.delivered', version: 1 },
35
- { key: 'kb.source.ingested', version: 1 },
36
- { key: 'kb.ruleVersion.created', version: 1 },
37
- { key: 'kb.ruleVersion.approved', version: 1 },
38
- { key: 'kb.snapshot.published', version: 1 },
39
- { key: 'kb.change.detected', version: 1 },
40
- { key: 'kb.review.requested', version: 1 },
41
- { key: 'kb.review.decided', version: 1 },
32
+ { key: 'assistant.answer.requested', version: '1.0.0' },
33
+ { key: 'assistant.answer.blocked', version: '1.0.0' },
34
+ { key: 'assistant.answer.delivered', version: '1.0.0' },
35
+ { key: 'kb.source.ingested', version: '1.0.0' },
36
+ { key: 'kb.ruleVersion.created', version: '1.0.0' },
37
+ { key: 'kb.ruleVersion.approved', version: '1.0.0' },
38
+ { key: 'kb.snapshot.published', version: '1.0.0' },
39
+ { key: 'kb.change.detected', version: '1.0.0' },
40
+ { key: 'kb.review.requested', version: '1.0.0' },
41
+ { key: 'kb.review.decided', version: '1.0.0' },
42
42
  ],
43
43
  presentations: [],
44
44
  opToPresentation: [],
45
45
  presentationsTargets: [],
46
46
  capabilities: {
47
47
  requires: [
48
- { key: 'identity', version: 1 },
49
- { key: 'audit-trail', version: 1 },
50
- { key: 'notifications', version: 1 },
51
- { key: 'jobs', version: 1 },
52
- { key: 'feature-flags', version: 1 },
53
- { key: 'files', version: 1 },
54
- { key: 'metering', version: 1 },
55
- { key: 'learning-journey', version: 1 },
48
+ { key: 'identity', version: '1.0.0' },
49
+ { key: 'audit-trail', version: '1.0.0' },
50
+ { key: 'notifications', version: '1.0.0' },
51
+ { key: 'jobs', version: '1.0.0' },
52
+ { key: 'feature-flags', version: '1.0.0' },
53
+ { key: 'files', version: '1.0.0' },
54
+ { key: 'metering', version: '1.0.0' },
55
+ { key: 'learning-journey', version: '1.0.0' },
56
56
  ],
57
57
  },
58
58
  };