@contractspec/example.knowledge-canon 1.44.1 → 1.45.1

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.
@@ -8,30 +8,30 @@ $ tsdown
8
8
  ℹ Cleaning 28 files
9
9
  ℹ dist/docs/knowledge-canon.docblock.js 1.68 kB │ gzip: 0.79 kB
10
10
  ℹ dist/agent.js 1.25 kB │ gzip: 0.62 kB
11
- ℹ dist/example.js 0.90 kB │ gzip: 0.48 kB
12
- ℹ dist/blueprint.js 0.84 kB │ gzip: 0.46 kB
13
- ℹ dist/tenant.js 0.80 kB │ gzip: 0.44 kB
14
- ℹ dist/source.sample.js 0.69 kB │ gzip: 0.40 kB
11
+ ℹ dist/example.js 1.01 kB │ gzip: 0.53 kB
12
+ ℹ dist/blueprint.js 0.85 kB │ gzip: 0.46 kB
13
+ ℹ dist/tenant.js 0.82 kB │ gzip: 0.45 kB
14
+ ℹ dist/source.sample.js 0.70 kB │ gzip: 0.41 kB
15
15
  ℹ dist/index.js 0.50 kB │ gzip: 0.21 kB
16
16
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
17
17
  ℹ dist/docs/knowledge-canon.docblock.js.map 2.18 kB │ gzip: 0.97 kB
18
18
  ℹ dist/agent.js.map 2.13 kB │ gzip: 1.00 kB
19
- ℹ dist/tenant.js.map 1.39 kB │ gzip: 0.68 kB
20
- ℹ dist/blueprint.js.map 1.30 kB │ gzip: 0.64 kB
21
- ℹ dist/example.js.map 1.26 kB │ gzip: 0.65 kB
22
- ℹ dist/source.sample.js.map 1.18 kB │ gzip: 0.58 kB
19
+ ℹ dist/example.js.map 1.54 kB │ gzip: 0.75 kB
20
+ ℹ dist/tenant.js.map 1.40 kB │ gzip: 0.69 kB
21
+ ℹ dist/blueprint.js.map 1.31 kB │ gzip: 0.65 kB
22
+ ℹ dist/source.sample.js.map 1.19 kB │ gzip: 0.59 kB
23
23
  ℹ dist/agent.d.ts.map 0.29 kB │ gzip: 0.20 kB
24
- ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
25
24
  ℹ dist/source.sample.d.ts.map 0.14 kB │ gzip: 0.12 kB
26
25
  ℹ dist/blueprint.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/tenant.d.ts.map 0.12 kB │ gzip: 0.12 kB
28
- ℹ dist/example.d.ts 1.14 kB │ gzip: 0.48 kB
29
- ℹ dist/agent.d.ts 0.97 kB │ gzip: 0.44 kB
28
+ ℹ dist/agent.d.ts 0.91 kB │ gzip: 0.44 kB
30
29
  ℹ dist/index.d.ts 0.44 kB │ gzip: 0.19 kB
31
30
  ℹ dist/source.sample.d.ts 0.28 kB │ gzip: 0.18 kB
32
31
  ℹ dist/blueprint.d.ts 0.26 kB │ gzip: 0.18 kB
33
32
  ℹ dist/tenant.d.ts 0.26 kB │ gzip: 0.18 kB
33
+ ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
34
34
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
35
35
  ℹ dist/docs/knowledge-canon.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
36
- ℹ 27 files, total: 20.33 kB
37
- ✔ Build complete in 17233ms
36
+ ℹ 27 files, total: 19.78 kB
37
+ ✔ Build complete in 20462ms
@@ -9,30 +9,30 @@ $ tsdown
9
9
  ℹ Build start
10
10
  ℹ dist/docs/knowledge-canon.docblock.js 1.68 kB │ gzip: 0.79 kB
11
11
  ℹ dist/agent.js 1.25 kB │ gzip: 0.62 kB
12
- ℹ dist/example.js 0.90 kB │ gzip: 0.48 kB
13
- ℹ dist/blueprint.js 0.84 kB │ gzip: 0.46 kB
14
- ℹ dist/tenant.js 0.80 kB │ gzip: 0.44 kB
15
- ℹ dist/source.sample.js 0.69 kB │ gzip: 0.40 kB
12
+ ℹ dist/example.js 1.01 kB │ gzip: 0.53 kB
13
+ ℹ dist/blueprint.js 0.85 kB │ gzip: 0.46 kB
14
+ ℹ dist/tenant.js 0.82 kB │ gzip: 0.45 kB
15
+ ℹ dist/source.sample.js 0.70 kB │ gzip: 0.41 kB
16
16
  ℹ dist/index.js 0.50 kB │ gzip: 0.21 kB
17
17
  ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
18
18
  ℹ dist/docs/knowledge-canon.docblock.js.map 2.18 kB │ gzip: 0.97 kB
19
19
  ℹ dist/agent.js.map 2.13 kB │ gzip: 1.00 kB
20
- ℹ dist/tenant.js.map 1.39 kB │ gzip: 0.68 kB
21
- ℹ dist/blueprint.js.map 1.30 kB │ gzip: 0.64 kB
22
- ℹ dist/example.js.map 1.26 kB │ gzip: 0.65 kB
23
- ℹ dist/source.sample.js.map 1.18 kB │ gzip: 0.58 kB
20
+ ℹ dist/example.js.map 1.54 kB │ gzip: 0.75 kB
21
+ ℹ dist/tenant.js.map 1.40 kB │ gzip: 0.69 kB
22
+ ℹ dist/blueprint.js.map 1.31 kB │ gzip: 0.65 kB
23
+ ℹ dist/source.sample.js.map 1.19 kB │ gzip: 0.59 kB
24
24
  ℹ dist/agent.d.ts.map 0.29 kB │ gzip: 0.20 kB
25
- ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
26
25
  ℹ dist/source.sample.d.ts.map 0.14 kB │ gzip: 0.12 kB
27
26
  ℹ dist/blueprint.d.ts.map 0.13 kB │ gzip: 0.12 kB
27
+ ℹ dist/example.d.ts.map 0.12 kB │ gzip: 0.12 kB
28
28
  ℹ dist/tenant.d.ts.map 0.12 kB │ gzip: 0.12 kB
29
- ℹ dist/example.d.ts 1.14 kB │ gzip: 0.48 kB
30
- ℹ dist/agent.d.ts 0.97 kB │ gzip: 0.44 kB
29
+ ℹ dist/agent.d.ts 0.91 kB │ gzip: 0.44 kB
31
30
  ℹ dist/index.d.ts 0.44 kB │ gzip: 0.19 kB
32
31
  ℹ dist/source.sample.d.ts 0.28 kB │ gzip: 0.18 kB
33
32
  ℹ dist/blueprint.d.ts 0.26 kB │ gzip: 0.18 kB
34
33
  ℹ dist/tenant.d.ts 0.26 kB │ gzip: 0.18 kB
34
+ ℹ dist/example.d.ts 0.20 kB │ gzip: 0.16 kB
35
35
  ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
36
36
  ℹ dist/docs/knowledge-canon.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
37
- ℹ 27 files, total: 20.33 kB
38
- ✔ Build complete in 17245ms
37
+ ℹ 27 files, total: 19.78 kB
38
+ ✔ Build complete in 21796ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @contractspec/example.knowledge-canon
2
2
 
3
+ ## 1.45.1
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: improve app config and examples contracts
8
+ - Updated dependencies
9
+ - @contractspec/lib.contracts@1.45.1
10
+ - @contractspec/lib.schema@1.45.1
11
+
12
+ ## 1.45.0
13
+
14
+ ### Minor Changes
15
+
16
+ - e73ca1d: feat: improve app config and examples contracts
17
+ feat: Contract layers support (features, examples, app-configs)
18
+
19
+ ### New CLI Commands
20
+ - `contractspec list layers` - List all contract layers with filtering
21
+
22
+ ### Enhanced Commands
23
+ - `contractspec ci` - New `layers` check category validates features/examples/config
24
+ - `contractspec doctor` - New `layers` health checks
25
+ - `contractspec integrity` - Now shows layer statistics
26
+
27
+ ### New APIs
28
+ - `discoverLayers()` - Scan workspace for all layer files
29
+ - `scanExampleSource()` - Parse ExampleSpec from source code
30
+ - `isExampleFile()` - Check if file is an example spec
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [e73ca1d]
35
+ - @contractspec/lib.contracts@1.45.0
36
+ - @contractspec/lib.schema@1.45.0
37
+
3
38
  ## 1.44.1
4
39
 
5
40
  ### Patch Changes
package/dist/agent.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _contractspec_lib_contracts_app_config_runtime0 from "@contractspec/lib.contracts/app-config/runtime";
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
2
  import { ResolvedAppConfig } from "@contractspec/lib.contracts/app-config/runtime";
3
3
 
4
4
  //#region src/agent.d.ts
@@ -8,7 +8,7 @@ import { ResolvedAppConfig } from "@contractspec/lib.contracts/app-config/runtim
8
8
  declare function selectKnowledgeBindings(resolved: ResolvedAppConfig, options: {
9
9
  workflowId?: string;
10
10
  agentId?: string;
11
- }): _contractspec_lib_contracts_app_config_runtime0.ResolvedKnowledge[];
11
+ }): _contractspec_lib_contracts0.ResolvedKnowledge[];
12
12
  /**
13
13
  * Pseudo implementation of an assistant lookup that routes prompts to the appropriate
14
14
  * knowledge sources. In a real system this would call the ingestion/search services.
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","names":[],"sources":["../src/agent.ts"],"sourcesContent":[],"mappings":";;;;;;;AAKgB,iBAAA,uBAAA,CACJ,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAAA;EAoBP,UAAA,CAAA,EAAA,MAAA;EACV,OAAA,CAAA,EAAA,MAAA;CAER,CAAA,EAvByB,+CAAA,CACuB,iBAAA,EAsBhD;;;;;iBAHkB,mBAAA,WACV;;;;;;IAGT"}
1
+ {"version":3,"file":"agent.d.ts","names":[],"sources":["../src/agent.ts"],"sourcesContent":[],"mappings":";;;;;;;AAKgB,iBAAA,uBAAA,CACJ,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAAA;EAoBP,UAAA,CAAA,EAAA,MAAA;EACV,OAAA,CAAA,EAAA,MAAA;CAER,CAAA,EAvByB,4BAAA,CACuB,iBAAA,EAsBhD;;;;;iBAHkB,mBAAA,WACV;;;;;;IAGT"}
package/dist/blueprint.js CHANGED
@@ -4,7 +4,7 @@ import { OwnersEnum, StabilityEnum, TagsEnum } from "@contractspec/lib.contracts
4
4
  const artisanKnowledgeBlueprint = {
5
5
  meta: {
6
6
  key: "artisan.knowledge.product",
7
- version: 1,
7
+ version: "1.0.0",
8
8
  appId: "artisan",
9
9
  title: "ArtisanOS Knowledge – Product Canon",
10
10
  description: "Blueprint that surfaces canonical product knowledge to agents and workflows.",
@@ -19,7 +19,7 @@ const artisanKnowledgeBlueprint = {
19
19
  },
20
20
  workflows: { answerFaq: {
21
21
  key: "artisan.knowledge.answerFaq",
22
- version: 1
22
+ version: "1.0.0"
23
23
  } },
24
24
  notes: "Workflows and assistants running on this blueprint should bind the Product Canon knowledge space."
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint.js","names":["artisanKnowledgeBlueprint: AppBlueprintSpec"],"sources":["../src/blueprint.ts"],"sourcesContent":["import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@contractspec/lib.contracts/ownership';\n\nexport const artisanKnowledgeBlueprint: AppBlueprintSpec = {\n meta: {\n key: 'artisan.knowledge.product',\n version: 1,\n appId: 'artisan',\n title: 'ArtisanOS Knowledge – Product Canon',\n description:\n 'Blueprint that surfaces canonical product knowledge to agents and workflows.',\n domain: 'knowledge',\n owners: [OwnersEnum.PlatformContent],\n tags: ['knowledge', 'product-canon', TagsEnum.Guide],\n stability: StabilityEnum.Experimental,\n },\n workflows: {\n answerFaq: { key: 'artisan.knowledge.answerFaq', version: 1 },\n },\n notes:\n 'Workflows and assistants running on this blueprint should bind the Product Canon knowledge space.',\n};\n"],"mappings":";;;AAOA,MAAaA,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,WAAW,gBAAgB;EACpC,MAAM;GAAC;GAAa;GAAiB,SAAS;GAAM;EACpD,WAAW,cAAc;EAC1B;CACD,WAAW,EACT,WAAW;EAAE,KAAK;EAA+B,SAAS;EAAG,EAC9D;CACD,OACE;CACH"}
1
+ {"version":3,"file":"blueprint.js","names":["artisanKnowledgeBlueprint: AppBlueprintSpec"],"sources":["../src/blueprint.ts"],"sourcesContent":["import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@contractspec/lib.contracts/ownership';\n\nexport const artisanKnowledgeBlueprint: AppBlueprintSpec = {\n meta: {\n key: 'artisan.knowledge.product',\n version: '1.0.0',\n appId: 'artisan',\n title: 'ArtisanOS Knowledge – Product Canon',\n description:\n 'Blueprint that surfaces canonical product knowledge to agents and workflows.',\n domain: 'knowledge',\n owners: [OwnersEnum.PlatformContent],\n tags: ['knowledge', 'product-canon', TagsEnum.Guide],\n stability: StabilityEnum.Experimental,\n },\n workflows: {\n answerFaq: { key: 'artisan.knowledge.answerFaq', version: '1.0.0' },\n },\n notes:\n 'Workflows and assistants running on this blueprint should bind the Product Canon knowledge space.',\n};\n"],"mappings":";;;AAOA,MAAaA,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,WAAW,gBAAgB;EACpC,MAAM;GAAC;GAAa;GAAiB,SAAS;GAAM;EACpD,WAAW,cAAc;EAC1B;CACD,WAAW,EACT,WAAW;EAAE,KAAK;EAA+B,SAAS;EAAS,EACpE;CACD,OACE;CACH"}
package/dist/example.d.ts CHANGED
@@ -1,34 +1,7 @@
1
+ import { ExampleSpec } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/example.d.ts
2
- declare const example: {
3
- readonly id: "knowledge-canon";
4
- readonly title: "Knowledge Canon (Product Canon space)";
5
- readonly summary: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).";
6
- readonly tags: readonly ["knowledge", "canon", "app-config", "agents", "workflows"];
7
- readonly kind: "knowledge";
8
- readonly visibility: "public";
9
- readonly docs: {
10
- readonly rootDocId: "docs.examples.knowledge-canon";
11
- readonly usageDocId: "docs.examples.knowledge-canon.usage";
12
- };
13
- readonly entrypoints: {
14
- readonly packageName: "@contractspec/example.knowledge-canon";
15
- readonly docs: "./docs";
16
- };
17
- readonly surfaces: {
18
- readonly templates: true;
19
- readonly sandbox: {
20
- readonly enabled: true;
21
- readonly modes: readonly ["markdown", "specs"];
22
- };
23
- readonly studio: {
24
- readonly enabled: true;
25
- readonly installable: true;
26
- };
27
- readonly mcp: {
28
- readonly enabled: true;
29
- };
30
- };
31
- };
4
+ declare const example: ExampleSpec;
32
5
  //#endregion
33
6
  export { example as default };
34
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,EAsBI,EAAA,iBAAA"}
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: "knowledge-canon",
4
- title: "Knowledge Canon (Product Canon space)",
5
- summary: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).",
6
- tags: [
7
- "knowledge",
8
- "canon",
9
- "app-config",
10
- "agents",
11
- "workflows"
12
- ],
13
- kind: "knowledge",
14
- visibility: "public",
3
+ meta: {
4
+ key: "knowledge-canon",
5
+ version: "1.0.0",
6
+ title: "Knowledge Canon (Product Canon space)",
7
+ description: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).",
8
+ kind: "knowledge",
9
+ visibility: "public",
10
+ stability: "experimental",
11
+ owners: ["@platform.core"],
12
+ tags: [
13
+ "knowledge",
14
+ "canon",
15
+ "app-config",
16
+ "agents",
17
+ "workflows"
18
+ ]
19
+ },
15
20
  docs: {
16
21
  rootDocId: "docs.examples.knowledge-canon",
17
22
  usageDocId: "docs.examples.knowledge-canon.usage"
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'knowledge-canon',\n title: 'Knowledge Canon (Product Canon space)',\n summary:\n 'Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).',\n tags: ['knowledge', 'canon', 'app-config', 'agents', 'workflows'],\n kind: 'knowledge',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.knowledge-canon',\n usageDocId: 'docs.examples.knowledge-canon.usage',\n },\n entrypoints: {\n packageName: '@contractspec/example.knowledge-canon',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\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;EAAS;EAAc;EAAU;EAAY;CACjE,MAAM;CACN,YAAY;CACZ,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,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: 'knowledge-canon',\n version: '1.0.0',\n title: 'Knowledge Canon (Product Canon space)',\n description:\n 'Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).',\n kind: 'knowledge',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['knowledge', 'canon', 'app-config', 'agents', 'workflows'],\n },\n docs: {\n rootDocId: 'docs.examples.knowledge-canon',\n usageDocId: 'docs.examples.knowledge-canon.usage',\n },\n entrypoints: {\n packageName: '@contractspec/example.knowledge-canon',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\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;GAAS;GAAc;GAAU;GAAY;EAClE;CACD,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
@@ -4,7 +4,7 @@ const productCanonNotionSource = {
4
4
  id: "source-canon-notion",
5
5
  tenantId: "artisan-co",
6
6
  spaceKey: "knowledge.product-canon",
7
- spaceVersion: 1,
7
+ spaceVersion: "1.0.0",
8
8
  label: "Product Canon (Notion)",
9
9
  sourceType: "notion",
10
10
  createdAt: "2026-01-01T00:00:00.000Z",
@@ -1 +1 @@
1
- {"version":3,"file":"source.sample.js","names":["productCanonNotionSource: KnowledgeSourceConfig"],"sources":["../src/source.sample.ts"],"sourcesContent":["import type { KnowledgeSourceConfig } from '@contractspec/lib.contracts/knowledge/source';\n\nexport const productCanonNotionSource: KnowledgeSourceConfig = {\n meta: {\n id: 'source-canon-notion',\n tenantId: 'artisan-co',\n spaceKey: 'knowledge.product-canon',\n spaceVersion: 1,\n label: 'Product Canon (Notion)',\n sourceType: 'notion',\n createdAt: '2026-01-01T00:00:00.000Z',\n updatedAt: '2026-01-01T00:00:00.000Z',\n },\n config: {\n notionDatabaseId: 'xxxxxxxxxxxxxxxx',\n apiKey: 'secret_notion_token',\n },\n syncSchedule: {\n enabled: true,\n cron: '0 * * * *',\n },\n lastSync: {\n timestamp: new Date('2026-01-01T00:00:00.000Z'),\n success: true,\n itemsProcessed: 128,\n },\n};\n"],"mappings":";AAEA,MAAaA,2BAAkD;CAC7D,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,UAAU;EACV,cAAc;EACd,OAAO;EACP,YAAY;EACZ,WAAW;EACX,WAAW;EACZ;CACD,QAAQ;EACN,kBAAkB;EAClB,QAAQ;EACT;CACD,cAAc;EACZ,SAAS;EACT,MAAM;EACP;CACD,UAAU;EACR,2BAAW,IAAI,KAAK,2BAA2B;EAC/C,SAAS;EACT,gBAAgB;EACjB;CACF"}
1
+ {"version":3,"file":"source.sample.js","names":["productCanonNotionSource: KnowledgeSourceConfig"],"sources":["../src/source.sample.ts"],"sourcesContent":["import type { KnowledgeSourceConfig } from '@contractspec/lib.contracts/knowledge/source';\n\nexport const productCanonNotionSource: KnowledgeSourceConfig = {\n meta: {\n id: 'source-canon-notion',\n tenantId: 'artisan-co',\n spaceKey: 'knowledge.product-canon',\n spaceVersion: '1.0.0',\n label: 'Product Canon (Notion)',\n sourceType: 'notion',\n createdAt: '2026-01-01T00:00:00.000Z',\n updatedAt: '2026-01-01T00:00:00.000Z',\n },\n config: {\n notionDatabaseId: 'xxxxxxxxxxxxxxxx',\n apiKey: 'secret_notion_token',\n },\n syncSchedule: {\n enabled: true,\n cron: '0 * * * *',\n },\n lastSync: {\n timestamp: new Date('2026-01-01T00:00:00.000Z'),\n success: true,\n itemsProcessed: 128,\n },\n};\n"],"mappings":";AAEA,MAAaA,2BAAkD;CAC7D,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,UAAU;EACV,cAAc;EACd,OAAO;EACP,YAAY;EACZ,WAAW;EACX,WAAW;EACZ;CACD,QAAQ;EACN,kBAAkB;EAClB,QAAQ;EACT;CACD,cAAc;EACZ,SAAS;EACT,MAAM;EACP;CACD,UAAU;EACR,2BAAW,IAAI,KAAK,2BAA2B;EAC/C,SAAS;EACT,gBAAgB;EACjB;CACF"}
package/dist/tenant.js CHANGED
@@ -5,16 +5,16 @@ const artisanKnowledgeTenantConfig = {
5
5
  tenantId: "artisan-co",
6
6
  appId: "artisan",
7
7
  blueprintName: "artisan.knowledge.product",
8
- blueprintVersion: 1,
8
+ blueprintVersion: "1.0.0",
9
9
  environment: "production",
10
- version: 1,
10
+ version: "1.0.0",
11
11
  status: "published",
12
12
  createdAt: "2026-01-01T00:00:00.000Z",
13
13
  updatedAt: "2026-01-01T00:00:00.000Z"
14
14
  },
15
15
  knowledge: [{
16
16
  spaceKey: "knowledge.product-canon",
17
- spaceVersion: 1,
17
+ spaceVersion: "1.0.0",
18
18
  scope: {
19
19
  workflows: ["answerFaq"],
20
20
  agents: ["productSupportAssistant"]
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.js","names":["artisanKnowledgeTenantConfig: TenantAppConfig"],"sources":["../src/tenant.ts"],"sourcesContent":["import type { TenantAppConfig } from '@contractspec/lib.contracts/app-config/spec';\n\nexport const artisanKnowledgeTenantConfig: TenantAppConfig = {\n meta: {\n id: 'tenant-config-artisan-knowledge',\n tenantId: 'artisan-co',\n appId: 'artisan',\n blueprintName: 'artisan.knowledge.product',\n blueprintVersion: 1,\n environment: 'production',\n version: 1,\n status: 'published',\n createdAt: '2026-01-01T00:00:00.000Z',\n updatedAt: '2026-01-01T00:00:00.000Z',\n },\n knowledge: [\n {\n spaceKey: 'knowledge.product-canon',\n spaceVersion: 1,\n scope: {\n workflows: ['answerFaq'],\n agents: ['productSupportAssistant'],\n },\n constraints: {\n maxTokensPerQuery: 4096,\n maxQueriesPerMinute: 30,\n },\n },\n ],\n integrations: [],\n notes: 'Product Canon knowledge space bound for production assistants.',\n};\n"],"mappings":";AAEA,MAAaA,+BAAgD;CAC3D,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,OAAO;EACP,eAAe;EACf,kBAAkB;EAClB,aAAa;EACb,SAAS;EACT,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD,WAAW,CACT;EACE,UAAU;EACV,cAAc;EACd,OAAO;GACL,WAAW,CAAC,YAAY;GACxB,QAAQ,CAAC,0BAA0B;GACpC;EACD,aAAa;GACX,mBAAmB;GACnB,qBAAqB;GACtB;EACF,CACF;CACD,cAAc,EAAE;CAChB,OAAO;CACR"}
1
+ {"version":3,"file":"tenant.js","names":["artisanKnowledgeTenantConfig: TenantAppConfig"],"sources":["../src/tenant.ts"],"sourcesContent":["import type { TenantAppConfig } from '@contractspec/lib.contracts/app-config/spec';\n\nexport const artisanKnowledgeTenantConfig: TenantAppConfig = {\n meta: {\n id: 'tenant-config-artisan-knowledge',\n tenantId: 'artisan-co',\n appId: 'artisan',\n blueprintName: 'artisan.knowledge.product',\n blueprintVersion: '1.0.0',\n environment: 'production',\n version: '1.0.0',\n status: 'published',\n createdAt: '2026-01-01T00:00:00.000Z',\n updatedAt: '2026-01-01T00:00:00.000Z',\n },\n knowledge: [\n {\n spaceKey: 'knowledge.product-canon',\n spaceVersion: '1.0.0',\n scope: {\n workflows: ['answerFaq'],\n agents: ['productSupportAssistant'],\n },\n constraints: {\n maxTokensPerQuery: 4096,\n maxQueriesPerMinute: 30,\n },\n },\n ],\n integrations: [],\n notes: 'Product Canon knowledge space bound for production assistants.',\n};\n"],"mappings":";AAEA,MAAaA,+BAAgD;CAC3D,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,OAAO;EACP,eAAe;EACf,kBAAkB;EAClB,aAAa;EACb,SAAS;EACT,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD,WAAW,CACT;EACE,UAAU;EACV,cAAc;EACd,OAAO;GACL,WAAW,CAAC,YAAY;GACxB,QAAQ,CAAC,0BAA0B;GACpC;EACD,aAAa;GACX,mBAAmB;GACnB,qBAAqB;GACtB;EACF,CACF;CACD,cAAc,EAAE;CAChB,OAAO;CACR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.knowledge-canon",
3
- "version": "1.44.1",
3
+ "version": "1.45.1",
4
4
  "description": "Knowledge example – Product Canon space (blueprint + tenant config + source sample + runtime helper).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,12 +30,12 @@
30
30
  "test": "bun test"
31
31
  },
32
32
  "dependencies": {
33
- "@contractspec/lib.schema": "1.44.1",
34
- "@contractspec/lib.contracts": "1.44.1"
33
+ "@contractspec/lib.schema": "1.45.1",
34
+ "@contractspec/lib.contracts": "1.45.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@contractspec/tool.tsdown": "1.44.1",
38
- "@contractspec/tool.typescript": "1.44.1",
37
+ "@contractspec/tool.tsdown": "1.45.1",
38
+ "@contractspec/tool.typescript": "1.45.1",
39
39
  "tsdown": "^0.18.3",
40
40
  "typescript": "^5.9.3"
41
41
  },
package/src/blueprint.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  export const artisanKnowledgeBlueprint: AppBlueprintSpec = {
9
9
  meta: {
10
10
  key: 'artisan.knowledge.product',
11
- version: 1,
11
+ version: '1.0.0',
12
12
  appId: 'artisan',
13
13
  title: 'ArtisanOS Knowledge – Product Canon',
14
14
  description:
@@ -19,7 +19,7 @@ export const artisanKnowledgeBlueprint: AppBlueprintSpec = {
19
19
  stability: StabilityEnum.Experimental,
20
20
  },
21
21
  workflows: {
22
- answerFaq: { key: 'artisan.knowledge.answerFaq', version: 1 },
22
+ answerFaq: { key: 'artisan.knowledge.answerFaq', version: '1.0.0' },
23
23
  },
24
24
  notes:
25
25
  'Workflows and assistants running on this blueprint should bind the Product Canon knowledge space.',
package/src/example.ts CHANGED
@@ -1,11 +1,18 @@
1
- const example = {
2
- id: 'knowledge-canon',
3
- title: 'Knowledge Canon (Product Canon space)',
4
- summary:
5
- 'Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).',
6
- tags: ['knowledge', 'canon', 'app-config', 'agents', 'workflows'],
7
- kind: 'knowledge',
8
- visibility: 'public',
1
+ import type { ExampleSpec } from '@contractspec/lib.contracts';
2
+
3
+ const example: ExampleSpec = {
4
+ meta: {
5
+ key: 'knowledge-canon',
6
+ version: '1.0.0',
7
+ title: 'Knowledge Canon (Product Canon space)',
8
+ description:
9
+ 'Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).',
10
+ kind: 'knowledge',
11
+ visibility: 'public',
12
+ stability: 'experimental',
13
+ owners: ['@platform.core'],
14
+ tags: ['knowledge', 'canon', 'app-config', 'agents', 'workflows'],
15
+ },
9
16
  docs: {
10
17
  rootDocId: 'docs.examples.knowledge-canon',
11
18
  usageDocId: 'docs.examples.knowledge-canon.usage',
@@ -20,6 +27,6 @@ const example = {
20
27
  studio: { enabled: true, installable: true },
21
28
  mcp: { enabled: true },
22
29
  },
23
- } as const;
30
+ };
24
31
 
25
32
  export default example;
@@ -5,7 +5,7 @@ export const productCanonNotionSource: KnowledgeSourceConfig = {
5
5
  id: 'source-canon-notion',
6
6
  tenantId: 'artisan-co',
7
7
  spaceKey: 'knowledge.product-canon',
8
- spaceVersion: 1,
8
+ spaceVersion: '1.0.0',
9
9
  label: 'Product Canon (Notion)',
10
10
  sourceType: 'notion',
11
11
  createdAt: '2026-01-01T00:00:00.000Z',
package/src/tenant.ts CHANGED
@@ -6,9 +6,9 @@ export const artisanKnowledgeTenantConfig: TenantAppConfig = {
6
6
  tenantId: 'artisan-co',
7
7
  appId: 'artisan',
8
8
  blueprintName: 'artisan.knowledge.product',
9
- blueprintVersion: 1,
9
+ blueprintVersion: '1.0.0',
10
10
  environment: 'production',
11
- version: 1,
11
+ version: '1.0.0',
12
12
  status: 'published',
13
13
  createdAt: '2026-01-01T00:00:00.000Z',
14
14
  updatedAt: '2026-01-01T00:00:00.000Z',
@@ -16,7 +16,7 @@ export const artisanKnowledgeTenantConfig: TenantAppConfig = {
16
16
  knowledge: [
17
17
  {
18
18
  spaceKey: 'knowledge.product-canon',
19
- spaceVersion: 1,
19
+ spaceVersion: '1.0.0',
20
20
  scope: {
21
21
  workflows: ['answerFaq'],
22
22
  agents: ['productSupportAssistant'],