@lssm/example.versioned-knowledge-base 0.0.0-canary-20251216033905 → 0.0.0-canary-20251216062412
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.log +2 -2
- package/CHANGELOG.md +3 -3
- package/README.md +2 -0
- package/dist/contracts/kb.js +1 -1
- package/dist/versioned-knowledge-base.feature.js +1 -1
- package/package.json +1 -1
- package/src/contracts/kb.ts +5 -5
- package/src/versioned-knowledge-base.feature.ts +1 -1
- package/tsconfig.json +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/tsdown.config.js +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -6,7 +6,7 @@ $ tsdown
|
|
|
6
6
|
[34mℹ[39m target: [34mesnext[39m
|
|
7
7
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
8
8
|
[34mℹ[39m Build start
|
|
9
|
-
[34mℹ[39m [2mdist/[22m[1mcontracts/kb.js[22m [2m4.
|
|
9
|
+
[34mℹ[39m [2mdist/[22m[1mcontracts/kb.js[22m [2m4.36 kB[22m [2m│ gzip: 1.33 kB[22m
|
|
10
10
|
[34mℹ[39m [2mdist/[22m[1mhandlers/memory.handlers.js[22m [2m2.16 kB[22m [2m│ gzip: 0.91 kB[22m
|
|
11
11
|
[34mℹ[39m [2mdist/[22m[1mentities/models.js[22m [2m2.13 kB[22m [2m│ gzip: 0.59 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[1mevents.js[22m [2m1.72 kB[22m [2m│ gzip: 0.49 kB[22m
|
|
@@ -19,5 +19,5 @@ $ tsdown
|
|
|
19
19
|
[34mℹ[39m [2mdist/[22m[1mhandlers/index.js[22m [2m0.15 kB[22m [2m│ gzip: 0.10 kB[22m
|
|
20
20
|
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.05 kB[22m [2m│ gzip: 0.07 kB[22m
|
|
21
21
|
[34mℹ[39m 12 files, total: 15.05 kB
|
|
22
|
-
[32m✔[39m Build complete in [
|
|
22
|
+
[32m✔[39m Build complete in [32m85ms[39m
|
|
23
23
|
$ tsc --noEmit
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @lssm/example.versioned-knowledge-base
|
|
2
2
|
|
|
3
|
-
## 0.0.0-canary-
|
|
3
|
+
## 0.0.0-canary-20251216062412
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies [3086383]
|
|
8
|
-
- @lssm/lib.contracts@0.0.0-canary-
|
|
9
|
-
- @lssm/lib.schema@0.0.0-canary-
|
|
8
|
+
- @lssm/lib.contracts@0.0.0-canary-20251216062412
|
|
9
|
+
- @lssm/lib.schema@0.0.0-canary-20251216062412
|
package/dist/contracts/kb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{KBSnapshotModel as e,RuleVersionModel as t,SourceDocumentModel as n,SourceRefModel as r}from"../entities/models.js";import{defineCommand as i,defineQuery as a}from"@lssm/lib.contracts";import{ScalarTypeEnum as o,defineSchemaModel as s}from"@lssm/lib.schema";const c=s({name:`KbIngestSourceInput`,description:`Ingest immutable source metadata referencing a stored file.`,fields:{jurisdiction:{type:o.String_unsecure(),isOptional:!1},authority:{type:o.String_unsecure(),isOptional:!1},title:{type:o.String_unsecure(),isOptional:!1},fetchedAt:{type:o.DateTime(),isOptional:!1},hash:{type:o.String_unsecure(),isOptional:!1},fileId:{type:o.String_unsecure(),isOptional:!1}}}),l=s({name:`KbUpsertRuleVersionInput`,description:`Create a new draft rule version (immutable history).`,fields:{ruleId:{type:o.String_unsecure(),isOptional:!1},content:{type:o.String_unsecure(),isOptional:!1},sourceRefs:{type:r,isArray:!0,isOptional:!1}}}),u=s({name:`KbApproveRuleVersionInput`,description:`Approve a rule version (human verification).`,fields:{ruleVersionId:{type:o.String_unsecure(),isOptional:!1},approver:{type:o.String_unsecure(),isOptional:!1}}}),d=s({name:`KbPublishSnapshotInput`,description:`Publish a snapshot for a jurisdiction as-of a date.`,fields:{jurisdiction:{type:o.String_unsecure(),isOptional:!1},asOfDate:{type:o.DateTime(),isOptional:!1}}}),f=s({name:`KbSearchInput`,description:`Search within a published snapshot.`,fields:{snapshotId:{type:o.String_unsecure(),isOptional:!1},jurisdiction:{type:o.String_unsecure(),isOptional:!1},query:{type:o.String_unsecure(),isOptional:!1}}}),p=s({name:`KbSearchOutput`,description:`Search results constrained to snapshot + jurisdiction.`,fields:{items:{type:s({name:`KbSearchResultItem`,description:`Search result referencing a specific rule version.`,fields:{ruleVersionId:{type:o.String_unsecure(),isOptional:!1},excerpt:{type:o.String_unsecure(),isOptional:!0}}}),isArray:!0,isOptional:!1}}}),m=i({meta:{name:`kb.ingestSource`,version:1,stability:`experimental`,owners:[
|
|
1
|
+
import{KBSnapshotModel as e,RuleVersionModel as t,SourceDocumentModel as n,SourceRefModel as r}from"../entities/models.js";import{defineCommand as i,defineQuery as a}from"@lssm/lib.contracts";import{ScalarTypeEnum as o,defineSchemaModel as s}from"@lssm/lib.schema";const c=s({name:`KbIngestSourceInput`,description:`Ingest immutable source metadata referencing a stored file.`,fields:{jurisdiction:{type:o.String_unsecure(),isOptional:!1},authority:{type:o.String_unsecure(),isOptional:!1},title:{type:o.String_unsecure(),isOptional:!1},fetchedAt:{type:o.DateTime(),isOptional:!1},hash:{type:o.String_unsecure(),isOptional:!1},fileId:{type:o.String_unsecure(),isOptional:!1}}}),l=s({name:`KbUpsertRuleVersionInput`,description:`Create a new draft rule version (immutable history).`,fields:{ruleId:{type:o.String_unsecure(),isOptional:!1},content:{type:o.String_unsecure(),isOptional:!1},sourceRefs:{type:r,isArray:!0,isOptional:!1}}}),u=s({name:`KbApproveRuleVersionInput`,description:`Approve a rule version (human verification).`,fields:{ruleVersionId:{type:o.String_unsecure(),isOptional:!1},approver:{type:o.String_unsecure(),isOptional:!1}}}),d=s({name:`KbPublishSnapshotInput`,description:`Publish a snapshot for a jurisdiction as-of a date.`,fields:{jurisdiction:{type:o.String_unsecure(),isOptional:!1},asOfDate:{type:o.DateTime(),isOptional:!1}}}),f=s({name:`KbSearchInput`,description:`Search within a published snapshot.`,fields:{snapshotId:{type:o.String_unsecure(),isOptional:!1},jurisdiction:{type:o.String_unsecure(),isOptional:!1},query:{type:o.String_unsecure(),isOptional:!1}}}),p=s({name:`KbSearchOutput`,description:`Search results constrained to snapshot + jurisdiction.`,fields:{items:{type:s({name:`KbSearchResultItem`,description:`Search result referencing a specific rule version.`,fields:{ruleVersionId:{type:o.String_unsecure(),isOptional:!1},excerpt:{type:o.String_unsecure(),isOptional:!0}}}),isArray:!0,isOptional:!1}}}),m=i({meta:{name:`kb.ingestSource`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`sources`,`ingestion`],description:`Ingest immutable source document metadata.`,goal:`Store traceable source documents for curated KB.`,context:`Called when an admin uploads/records authoritative sources.`},io:{input:c,output:n},policy:{auth:`user`}}),h=i({meta:{name:`kb.upsertRuleVersion`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`rules`,`versioning`],description:`Create a new draft rule version with source references.`,goal:`Propose curated knowledge updates with traceability.`,context:`Automation or curators propose draft rule versions.`},io:{input:l,output:t,errors:{SOURCE_REFS_REQUIRED:{description:`Rule version must cite at least one sourceRef`,http:400,gqlCode:`SOURCE_REFS_REQUIRED`,when:`sourceRefs is empty`},RULE_NOT_FOUND:{description:`Rule does not exist`,http:404,gqlCode:`RULE_NOT_FOUND`,when:`ruleId is unknown`}}},policy:{auth:`user`}}),g=i({meta:{name:`kb.approveRuleVersion`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`rules`,`approval`],description:`Approve a draft rule version.`,goal:`Human verification step before publishing snapshots.`,context:`Curators/experts approve proposed KB changes.`},io:{input:u,output:t},policy:{auth:`user`}}),_=i({meta:{name:`kb.publishSnapshot`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`snapshots`,`publishing`],description:`Publish a KB snapshot for a jurisdiction.`,goal:`Create a stable snapshot that assistant answers can cite.`,context:`Publishing happens after approvals; snapshot is referenced by answers.`},io:{input:d,output:e,errors:{NO_APPROVED_RULES:{description:`No approved rule versions available to publish`,http:409,gqlCode:`NO_APPROVED_RULES`,when:`jurisdiction has zero approved rule versions`}}},policy:{auth:`user`}}),v=a({meta:{name:`kb.search`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`search`,`snapshots`],description:`Search within a published KB snapshot.`,goal:`Provide scoped retrieval for assistant answers.`,context:`Assistant queries curated rules from a specific snapshot.`},io:{input:f,output:p},policy:{auth:`user`}});export{g as KbApproveRuleVersionContract,m as KbIngestSourceContract,_ as KbPublishSnapshotContract,v as KbSearchContract,h as KbUpsertRuleVersionContract};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={meta:{key:`versioned-knowledge-base`,title:`Versioned Knowledge Base`,description:`Curated KB with immutable sources, rule versions, and published snapshots.`,domain:`knowledge`,owners:[
|
|
1
|
+
const e={meta:{key:`versioned-knowledge-base`,title:`Versioned Knowledge Base`,description:`Curated KB with immutable sources, rule versions, and published snapshots.`,domain:`knowledge`,owners:[`@examples`],tags:[`knowledge`,`versioning`,`snapshots`],stability:`experimental`},operations:[{name:`kb.ingestSource`,version:1},{name:`kb.upsertRuleVersion`,version:1},{name:`kb.approveRuleVersion`,version:1},{name:`kb.publishSnapshot`,version:1},{name:`kb.search`,version:1}],events:[{name:`kb.source.ingested`,version:1},{name:`kb.ruleVersion.created`,version:1},{name:`kb.ruleVersion.approved`,version:1},{name:`kb.snapshot.published`,version:1}],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{requires:[{key:`knowledge`,version:1}]}};export{e as VersionedKnowledgeBaseFeature};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.versioned-knowledge-base",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251216062412",
|
|
4
4
|
"description": "Example: curated, versioned knowledge base with immutable sources, rule versions, and published snapshots.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/contracts/kb.ts
CHANGED
|
@@ -87,7 +87,7 @@ export const KbIngestSourceContract = defineCommand({
|
|
|
87
87
|
name: 'kb.ingestSource',
|
|
88
88
|
version: 1,
|
|
89
89
|
stability: 'experimental',
|
|
90
|
-
owners: ['examples'],
|
|
90
|
+
owners: ['@examples'],
|
|
91
91
|
tags: ['knowledge', 'sources', 'ingestion'],
|
|
92
92
|
description: 'Ingest immutable source document metadata.',
|
|
93
93
|
goal: 'Store traceable source documents for curated KB.',
|
|
@@ -105,7 +105,7 @@ export const KbUpsertRuleVersionContract = defineCommand({
|
|
|
105
105
|
name: 'kb.upsertRuleVersion',
|
|
106
106
|
version: 1,
|
|
107
107
|
stability: 'experimental',
|
|
108
|
-
owners: ['examples'],
|
|
108
|
+
owners: ['@examples'],
|
|
109
109
|
tags: ['knowledge', 'rules', 'versioning'],
|
|
110
110
|
description: 'Create a new draft rule version with source references.',
|
|
111
111
|
goal: 'Propose curated knowledge updates with traceability.',
|
|
@@ -137,7 +137,7 @@ export const KbApproveRuleVersionContract = defineCommand({
|
|
|
137
137
|
name: 'kb.approveRuleVersion',
|
|
138
138
|
version: 1,
|
|
139
139
|
stability: 'experimental',
|
|
140
|
-
owners: ['examples'],
|
|
140
|
+
owners: ['@examples'],
|
|
141
141
|
tags: ['knowledge', 'rules', 'approval'],
|
|
142
142
|
description: 'Approve a draft rule version.',
|
|
143
143
|
goal: 'Human verification step before publishing snapshots.',
|
|
@@ -155,7 +155,7 @@ export const KbPublishSnapshotContract = defineCommand({
|
|
|
155
155
|
name: 'kb.publishSnapshot',
|
|
156
156
|
version: 1,
|
|
157
157
|
stability: 'experimental',
|
|
158
|
-
owners: ['examples'],
|
|
158
|
+
owners: ['@examples'],
|
|
159
159
|
tags: ['knowledge', 'snapshots', 'publishing'],
|
|
160
160
|
description: 'Publish a KB snapshot for a jurisdiction.',
|
|
161
161
|
goal: 'Create a stable snapshot that assistant answers can cite.',
|
|
@@ -182,7 +182,7 @@ export const KbSearchContract = defineQuery({
|
|
|
182
182
|
name: 'kb.search',
|
|
183
183
|
version: 1,
|
|
184
184
|
stability: 'experimental',
|
|
185
|
-
owners: ['examples'],
|
|
185
|
+
owners: ['@examples'],
|
|
186
186
|
tags: ['knowledge', 'search', 'snapshots'],
|
|
187
187
|
description: 'Search within a published KB snapshot.',
|
|
188
188
|
goal: 'Provide scoped retrieval for assistant answers.',
|
|
@@ -7,7 +7,7 @@ export const VersionedKnowledgeBaseFeature: FeatureModuleSpec = {
|
|
|
7
7
|
description:
|
|
8
8
|
'Curated KB with immutable sources, rule versions, and published snapshots.',
|
|
9
9
|
domain: 'knowledge',
|
|
10
|
-
owners: ['examples'],
|
|
10
|
+
owners: ['@examples'],
|
|
11
11
|
tags: ['knowledge', 'versioning', 'snapshots'],
|
|
12
12
|
stability: 'experimental',
|
|
13
13
|
},
|