@contractspec/example.knowledge-canon 1.56.1 → 1.58.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.
Files changed (53) hide show
  1. package/.turbo/turbo-build.log +41 -38
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +28 -0
  4. package/dist/agent.d.ts +8 -16
  5. package/dist/agent.d.ts.map +1 -1
  6. package/dist/agent.js +28 -31
  7. package/dist/blueprint.d.ts +2 -6
  8. package/dist/blueprint.d.ts.map +1 -1
  9. package/dist/blueprint.js +26 -28
  10. package/dist/browser/agent.js +31 -0
  11. package/dist/browser/blueprint.js +26 -0
  12. package/dist/browser/docs/index.js +42 -0
  13. package/dist/browser/docs/knowledge-canon.docblock.js +42 -0
  14. package/dist/browser/example.js +33 -0
  15. package/dist/browser/index.js +191 -0
  16. package/dist/browser/source.sample.js +29 -0
  17. package/dist/browser/tenant.js +34 -0
  18. package/dist/docs/index.d.ts +2 -1
  19. package/dist/docs/index.d.ts.map +1 -0
  20. package/dist/docs/index.js +43 -1
  21. package/dist/docs/knowledge-canon.docblock.d.ts +2 -1
  22. package/dist/docs/knowledge-canon.docblock.d.ts.map +1 -0
  23. package/dist/docs/knowledge-canon.docblock.js +40 -26
  24. package/dist/example.d.ts +2 -6
  25. package/dist/example.d.ts.map +1 -1
  26. package/dist/example.js +31 -44
  27. package/dist/index.d.ts +7 -6
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +192 -8
  30. package/dist/node/agent.js +31 -0
  31. package/dist/node/blueprint.js +26 -0
  32. package/dist/node/docs/index.js +42 -0
  33. package/dist/node/docs/knowledge-canon.docblock.js +42 -0
  34. package/dist/node/example.js +33 -0
  35. package/dist/node/index.js +191 -0
  36. package/dist/node/source.sample.js +29 -0
  37. package/dist/node/tenant.js +34 -0
  38. package/dist/source.sample.d.ts +2 -6
  39. package/dist/source.sample.d.ts.map +1 -1
  40. package/dist/source.sample.js +29 -29
  41. package/dist/tenant.d.ts +2 -6
  42. package/dist/tenant.d.ts.map +1 -1
  43. package/dist/tenant.js +34 -32
  44. package/package.json +84 -29
  45. package/tsdown.config.js +1 -2
  46. package/.turbo/turbo-build$colon$bundle.log +0 -37
  47. package/dist/agent.js.map +0 -1
  48. package/dist/blueprint.js.map +0 -1
  49. package/dist/docs/knowledge-canon.docblock.js.map +0 -1
  50. package/dist/example.js.map +0 -1
  51. package/dist/source.sample.js.map +0 -1
  52. package/dist/tenant.js.map +0 -1
  53. package/tsconfig.tsbuildinfo +0 -1
package/dist/index.js CHANGED
@@ -1,8 +1,192 @@
1
- import { answerWithKnowledge, selectKnowledgeBindings } from "./agent.js";
2
- import { artisanKnowledgeBlueprint } from "./blueprint.js";
3
- import example_default from "./example.js";
4
- import { artisanKnowledgeTenantConfig } from "./tenant.js";
5
- import { productCanonNotionSource } from "./source.sample.js";
6
- import "./docs/index.js";
7
-
8
- export { answerWithKnowledge, artisanKnowledgeBlueprint, artisanKnowledgeTenantConfig, example_default as example, productCanonNotionSource, selectKnowledgeBindings };
1
+ // @bun
2
+ // src/agent.ts
3
+ function selectKnowledgeBindings(resolved, options) {
4
+ return resolved.knowledge.filter(({ binding }) => {
5
+ if (!binding.scope)
6
+ return true;
7
+ if (options.workflowId && binding.scope.workflows?.includes(options.workflowId))
8
+ return true;
9
+ if (options.agentId && binding.scope.agents?.includes(options.agentId))
10
+ return true;
11
+ return false;
12
+ });
13
+ }
14
+ async function answerWithKnowledge(resolved, question, { workflowId, agentId }) {
15
+ const bindings = selectKnowledgeBindings(resolved, { workflowId, agentId });
16
+ if (bindings.length === 0) {
17
+ return "No knowledge space available for this request.";
18
+ }
19
+ const summaries = bindings.map(({ space }) => `\u2022 ${space.meta.title || space.meta.description}`);
20
+ return [
21
+ `Q: ${question}`,
22
+ "Routed to knowledge spaces:",
23
+ ...summaries,
24
+ "",
25
+ "TODO: invoke knowledge search service and synthesize response."
26
+ ].join(`
27
+ `);
28
+ }
29
+
30
+ // src/blueprint.ts
31
+ import {
32
+ OwnersEnum,
33
+ StabilityEnum,
34
+ TagsEnum
35
+ } from "@contractspec/lib.contracts/ownership";
36
+ var artisanKnowledgeBlueprint = {
37
+ meta: {
38
+ key: "artisan.knowledge.product",
39
+ version: "1.0.0",
40
+ appId: "artisan",
41
+ title: "ArtisanOS Knowledge \u2013 Product Canon",
42
+ description: "Blueprint that surfaces canonical product knowledge to agents and workflows.",
43
+ domain: "knowledge",
44
+ owners: [OwnersEnum.PlatformContent],
45
+ tags: ["knowledge", "product-canon", TagsEnum.Guide],
46
+ stability: StabilityEnum.Experimental
47
+ },
48
+ workflows: {
49
+ answerFaq: { key: "artisan.knowledge.answerFaq", version: "1.0.0" }
50
+ },
51
+ notes: "Workflows and assistants running on this blueprint should bind the Product Canon knowledge space."
52
+ };
53
+
54
+ // src/docs/knowledge-canon.docblock.ts
55
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
56
+ var blocks = [
57
+ {
58
+ id: "docs.examples.knowledge-canon",
59
+ title: "Knowledge Example \u2014 Product Canon Space",
60
+ summary: "Bind the Product Canon KnowledgeSpaceSpec to a tenant and expose it to agents/workflows via ResolvedAppConfig.",
61
+ kind: "reference",
62
+ visibility: "public",
63
+ route: "/docs/examples/knowledge-canon",
64
+ tags: ["knowledge", "canon", "example"],
65
+ body: `## Included assets
66
+ - Blueprint referencing a workflow depending on the Product Canon space.
67
+ - Tenant app config binding the space to a workflow and agent scope.
68
+ - Sample knowledge source configuration.
69
+ - Helper to pick knowledge bindings from ResolvedAppConfig.
70
+
71
+ ## Guardrails
72
+ - Keep sources scoped per tenant.
73
+ - Keep secret fields out of config (use secret providers).
74
+ - Enforce scope restrictions before answering.`
75
+ },
76
+ {
77
+ id: "docs.examples.knowledge-canon.usage",
78
+ title: "Knowledge Canon \u2014 Usage",
79
+ summary: "How to register the space, configure sources, and route requests.",
80
+ kind: "usage",
81
+ visibility: "public",
82
+ route: "/docs/examples/knowledge-canon/usage",
83
+ tags: ["knowledge", "usage"],
84
+ body: `## Usage
85
+ 1) Register the knowledge space spec in your KnowledgeSpaceRegistry.
86
+ 2) Persist the source config through knowledge CRUD operations.
87
+ 3) Compose ResolvedAppConfig and pass it to your workflow/agent runtime.
88
+ 4) Use helpers like \`selectKnowledgeBindings\` before dispatching to search/embedding.
89
+
90
+ ## Notes
91
+ - Avoid logging PII.
92
+ - Keep search results auditable and cite sources.`
93
+ }
94
+ ];
95
+ registerDocBlocks(blocks);
96
+ // src/example.ts
97
+ import { defineExample } from "@contractspec/lib.contracts";
98
+ var example = defineExample({
99
+ meta: {
100
+ key: "knowledge-canon",
101
+ version: "1.0.0",
102
+ title: "Knowledge Canon (Product Canon space)",
103
+ description: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).",
104
+ kind: "knowledge",
105
+ visibility: "public",
106
+ stability: "experimental",
107
+ owners: ["@platform.core"],
108
+ tags: ["knowledge", "canon", "app-config", "agents", "workflows"]
109
+ },
110
+ docs: {
111
+ rootDocId: "docs.examples.knowledge-canon",
112
+ usageDocId: "docs.examples.knowledge-canon.usage"
113
+ },
114
+ entrypoints: {
115
+ packageName: "@contractspec/example.knowledge-canon",
116
+ docs: "./docs"
117
+ },
118
+ surfaces: {
119
+ templates: true,
120
+ sandbox: { enabled: true, modes: ["markdown", "specs"] },
121
+ studio: { enabled: true, installable: true },
122
+ mcp: { enabled: true }
123
+ }
124
+ });
125
+ var example_default = example;
126
+
127
+ // src/tenant.ts
128
+ var artisanKnowledgeTenantConfig = {
129
+ meta: {
130
+ id: "tenant-config-artisan-knowledge",
131
+ tenantId: "artisan-co",
132
+ appId: "artisan",
133
+ blueprintName: "artisan.knowledge.product",
134
+ blueprintVersion: "1.0.0",
135
+ environment: "production",
136
+ version: "1.0.0",
137
+ status: "published",
138
+ createdAt: "2026-01-01T00:00:00.000Z",
139
+ updatedAt: "2026-01-01T00:00:00.000Z"
140
+ },
141
+ knowledge: [
142
+ {
143
+ spaceKey: "knowledge.product-canon",
144
+ spaceVersion: "1.0.0",
145
+ scope: {
146
+ workflows: ["answerFaq"],
147
+ agents: ["productSupportAssistant"]
148
+ },
149
+ constraints: {
150
+ maxTokensPerQuery: 4096,
151
+ maxQueriesPerMinute: 30
152
+ }
153
+ }
154
+ ],
155
+ integrations: [],
156
+ notes: "Product Canon knowledge space bound for production assistants."
157
+ };
158
+
159
+ // src/source.sample.ts
160
+ var productCanonNotionSource = {
161
+ meta: {
162
+ id: "source-canon-notion",
163
+ tenantId: "artisan-co",
164
+ spaceKey: "knowledge.product-canon",
165
+ spaceVersion: "1.0.0",
166
+ label: "Product Canon (Notion)",
167
+ sourceType: "notion",
168
+ createdAt: "2026-01-01T00:00:00.000Z",
169
+ updatedAt: "2026-01-01T00:00:00.000Z"
170
+ },
171
+ config: {
172
+ notionDatabaseId: "xxxxxxxxxxxxxxxx",
173
+ apiKey: "secret_notion_token"
174
+ },
175
+ syncSchedule: {
176
+ enabled: true,
177
+ cron: "0 * * * *"
178
+ },
179
+ lastSync: {
180
+ timestamp: new Date("2026-01-01T00:00:00.000Z"),
181
+ success: true,
182
+ itemsProcessed: 128
183
+ }
184
+ };
185
+ export {
186
+ selectKnowledgeBindings,
187
+ productCanonNotionSource,
188
+ example_default as example,
189
+ artisanKnowledgeTenantConfig,
190
+ artisanKnowledgeBlueprint,
191
+ answerWithKnowledge
192
+ };
@@ -0,0 +1,31 @@
1
+ // src/agent.ts
2
+ function selectKnowledgeBindings(resolved, options) {
3
+ return resolved.knowledge.filter(({ binding }) => {
4
+ if (!binding.scope)
5
+ return true;
6
+ if (options.workflowId && binding.scope.workflows?.includes(options.workflowId))
7
+ return true;
8
+ if (options.agentId && binding.scope.agents?.includes(options.agentId))
9
+ return true;
10
+ return false;
11
+ });
12
+ }
13
+ async function answerWithKnowledge(resolved, question, { workflowId, agentId }) {
14
+ const bindings = selectKnowledgeBindings(resolved, { workflowId, agentId });
15
+ if (bindings.length === 0) {
16
+ return "No knowledge space available for this request.";
17
+ }
18
+ const summaries = bindings.map(({ space }) => `• ${space.meta.title || space.meta.description}`);
19
+ return [
20
+ `Q: ${question}`,
21
+ "Routed to knowledge spaces:",
22
+ ...summaries,
23
+ "",
24
+ "TODO: invoke knowledge search service and synthesize response."
25
+ ].join(`
26
+ `);
27
+ }
28
+ export {
29
+ selectKnowledgeBindings,
30
+ answerWithKnowledge
31
+ };
@@ -0,0 +1,26 @@
1
+ // src/blueprint.ts
2
+ import {
3
+ OwnersEnum,
4
+ StabilityEnum,
5
+ TagsEnum
6
+ } from "@contractspec/lib.contracts/ownership";
7
+ var artisanKnowledgeBlueprint = {
8
+ meta: {
9
+ key: "artisan.knowledge.product",
10
+ version: "1.0.0",
11
+ appId: "artisan",
12
+ title: "ArtisanOS Knowledge – Product Canon",
13
+ description: "Blueprint that surfaces canonical product knowledge to agents and workflows.",
14
+ domain: "knowledge",
15
+ owners: [OwnersEnum.PlatformContent],
16
+ tags: ["knowledge", "product-canon", TagsEnum.Guide],
17
+ stability: StabilityEnum.Experimental
18
+ },
19
+ workflows: {
20
+ answerFaq: { key: "artisan.knowledge.answerFaq", version: "1.0.0" }
21
+ },
22
+ notes: "Workflows and assistants running on this blueprint should bind the Product Canon knowledge space."
23
+ };
24
+ export {
25
+ artisanKnowledgeBlueprint
26
+ };
@@ -0,0 +1,42 @@
1
+ // src/docs/knowledge-canon.docblock.ts
2
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
3
+ var blocks = [
4
+ {
5
+ id: "docs.examples.knowledge-canon",
6
+ title: "Knowledge Example — Product Canon Space",
7
+ summary: "Bind the Product Canon KnowledgeSpaceSpec to a tenant and expose it to agents/workflows via ResolvedAppConfig.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/knowledge-canon",
11
+ tags: ["knowledge", "canon", "example"],
12
+ body: `## Included assets
13
+ - Blueprint referencing a workflow depending on the Product Canon space.
14
+ - Tenant app config binding the space to a workflow and agent scope.
15
+ - Sample knowledge source configuration.
16
+ - Helper to pick knowledge bindings from ResolvedAppConfig.
17
+
18
+ ## Guardrails
19
+ - Keep sources scoped per tenant.
20
+ - Keep secret fields out of config (use secret providers).
21
+ - Enforce scope restrictions before answering.`
22
+ },
23
+ {
24
+ id: "docs.examples.knowledge-canon.usage",
25
+ title: "Knowledge Canon — Usage",
26
+ summary: "How to register the space, configure sources, and route requests.",
27
+ kind: "usage",
28
+ visibility: "public",
29
+ route: "/docs/examples/knowledge-canon/usage",
30
+ tags: ["knowledge", "usage"],
31
+ body: `## Usage
32
+ 1) Register the knowledge space spec in your KnowledgeSpaceRegistry.
33
+ 2) Persist the source config through knowledge CRUD operations.
34
+ 3) Compose ResolvedAppConfig and pass it to your workflow/agent runtime.
35
+ 4) Use helpers like \`selectKnowledgeBindings\` before dispatching to search/embedding.
36
+
37
+ ## Notes
38
+ - Avoid logging PII.
39
+ - Keep search results auditable and cite sources.`
40
+ }
41
+ ];
42
+ registerDocBlocks(blocks);
@@ -0,0 +1,42 @@
1
+ // src/docs/knowledge-canon.docblock.ts
2
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
3
+ var blocks = [
4
+ {
5
+ id: "docs.examples.knowledge-canon",
6
+ title: "Knowledge Example — Product Canon Space",
7
+ summary: "Bind the Product Canon KnowledgeSpaceSpec to a tenant and expose it to agents/workflows via ResolvedAppConfig.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/knowledge-canon",
11
+ tags: ["knowledge", "canon", "example"],
12
+ body: `## Included assets
13
+ - Blueprint referencing a workflow depending on the Product Canon space.
14
+ - Tenant app config binding the space to a workflow and agent scope.
15
+ - Sample knowledge source configuration.
16
+ - Helper to pick knowledge bindings from ResolvedAppConfig.
17
+
18
+ ## Guardrails
19
+ - Keep sources scoped per tenant.
20
+ - Keep secret fields out of config (use secret providers).
21
+ - Enforce scope restrictions before answering.`
22
+ },
23
+ {
24
+ id: "docs.examples.knowledge-canon.usage",
25
+ title: "Knowledge Canon — Usage",
26
+ summary: "How to register the space, configure sources, and route requests.",
27
+ kind: "usage",
28
+ visibility: "public",
29
+ route: "/docs/examples/knowledge-canon/usage",
30
+ tags: ["knowledge", "usage"],
31
+ body: `## Usage
32
+ 1) Register the knowledge space spec in your KnowledgeSpaceRegistry.
33
+ 2) Persist the source config through knowledge CRUD operations.
34
+ 3) Compose ResolvedAppConfig and pass it to your workflow/agent runtime.
35
+ 4) Use helpers like \`selectKnowledgeBindings\` before dispatching to search/embedding.
36
+
37
+ ## Notes
38
+ - Avoid logging PII.
39
+ - Keep search results auditable and cite sources.`
40
+ }
41
+ ];
42
+ registerDocBlocks(blocks);
@@ -0,0 +1,33 @@
1
+ // src/example.ts
2
+ import { defineExample } from "@contractspec/lib.contracts";
3
+ var example = defineExample({
4
+ meta: {
5
+ key: "knowledge-canon",
6
+ version: "1.0.0",
7
+ title: "Knowledge Canon (Product Canon space)",
8
+ description: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).",
9
+ kind: "knowledge",
10
+ visibility: "public",
11
+ stability: "experimental",
12
+ owners: ["@platform.core"],
13
+ tags: ["knowledge", "canon", "app-config", "agents", "workflows"]
14
+ },
15
+ docs: {
16
+ rootDocId: "docs.examples.knowledge-canon",
17
+ usageDocId: "docs.examples.knowledge-canon.usage"
18
+ },
19
+ entrypoints: {
20
+ packageName: "@contractspec/example.knowledge-canon",
21
+ docs: "./docs"
22
+ },
23
+ surfaces: {
24
+ templates: true,
25
+ sandbox: { enabled: true, modes: ["markdown", "specs"] },
26
+ studio: { enabled: true, installable: true },
27
+ mcp: { enabled: true }
28
+ }
29
+ });
30
+ var example_default = example;
31
+ export {
32
+ example_default as default
33
+ };
@@ -0,0 +1,191 @@
1
+ // src/agent.ts
2
+ function selectKnowledgeBindings(resolved, options) {
3
+ return resolved.knowledge.filter(({ binding }) => {
4
+ if (!binding.scope)
5
+ return true;
6
+ if (options.workflowId && binding.scope.workflows?.includes(options.workflowId))
7
+ return true;
8
+ if (options.agentId && binding.scope.agents?.includes(options.agentId))
9
+ return true;
10
+ return false;
11
+ });
12
+ }
13
+ async function answerWithKnowledge(resolved, question, { workflowId, agentId }) {
14
+ const bindings = selectKnowledgeBindings(resolved, { workflowId, agentId });
15
+ if (bindings.length === 0) {
16
+ return "No knowledge space available for this request.";
17
+ }
18
+ const summaries = bindings.map(({ space }) => `• ${space.meta.title || space.meta.description}`);
19
+ return [
20
+ `Q: ${question}`,
21
+ "Routed to knowledge spaces:",
22
+ ...summaries,
23
+ "",
24
+ "TODO: invoke knowledge search service and synthesize response."
25
+ ].join(`
26
+ `);
27
+ }
28
+
29
+ // src/blueprint.ts
30
+ import {
31
+ OwnersEnum,
32
+ StabilityEnum,
33
+ TagsEnum
34
+ } from "@contractspec/lib.contracts/ownership";
35
+ var artisanKnowledgeBlueprint = {
36
+ meta: {
37
+ key: "artisan.knowledge.product",
38
+ version: "1.0.0",
39
+ appId: "artisan",
40
+ title: "ArtisanOS Knowledge – Product Canon",
41
+ description: "Blueprint that surfaces canonical product knowledge to agents and workflows.",
42
+ domain: "knowledge",
43
+ owners: [OwnersEnum.PlatformContent],
44
+ tags: ["knowledge", "product-canon", TagsEnum.Guide],
45
+ stability: StabilityEnum.Experimental
46
+ },
47
+ workflows: {
48
+ answerFaq: { key: "artisan.knowledge.answerFaq", version: "1.0.0" }
49
+ },
50
+ notes: "Workflows and assistants running on this blueprint should bind the Product Canon knowledge space."
51
+ };
52
+
53
+ // src/docs/knowledge-canon.docblock.ts
54
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
55
+ var blocks = [
56
+ {
57
+ id: "docs.examples.knowledge-canon",
58
+ title: "Knowledge Example — Product Canon Space",
59
+ summary: "Bind the Product Canon KnowledgeSpaceSpec to a tenant and expose it to agents/workflows via ResolvedAppConfig.",
60
+ kind: "reference",
61
+ visibility: "public",
62
+ route: "/docs/examples/knowledge-canon",
63
+ tags: ["knowledge", "canon", "example"],
64
+ body: `## Included assets
65
+ - Blueprint referencing a workflow depending on the Product Canon space.
66
+ - Tenant app config binding the space to a workflow and agent scope.
67
+ - Sample knowledge source configuration.
68
+ - Helper to pick knowledge bindings from ResolvedAppConfig.
69
+
70
+ ## Guardrails
71
+ - Keep sources scoped per tenant.
72
+ - Keep secret fields out of config (use secret providers).
73
+ - Enforce scope restrictions before answering.`
74
+ },
75
+ {
76
+ id: "docs.examples.knowledge-canon.usage",
77
+ title: "Knowledge Canon — Usage",
78
+ summary: "How to register the space, configure sources, and route requests.",
79
+ kind: "usage",
80
+ visibility: "public",
81
+ route: "/docs/examples/knowledge-canon/usage",
82
+ tags: ["knowledge", "usage"],
83
+ body: `## Usage
84
+ 1) Register the knowledge space spec in your KnowledgeSpaceRegistry.
85
+ 2) Persist the source config through knowledge CRUD operations.
86
+ 3) Compose ResolvedAppConfig and pass it to your workflow/agent runtime.
87
+ 4) Use helpers like \`selectKnowledgeBindings\` before dispatching to search/embedding.
88
+
89
+ ## Notes
90
+ - Avoid logging PII.
91
+ - Keep search results auditable and cite sources.`
92
+ }
93
+ ];
94
+ registerDocBlocks(blocks);
95
+ // src/example.ts
96
+ import { defineExample } from "@contractspec/lib.contracts";
97
+ var example = defineExample({
98
+ meta: {
99
+ key: "knowledge-canon",
100
+ version: "1.0.0",
101
+ title: "Knowledge Canon (Product Canon space)",
102
+ description: "Bind a canonical knowledge space to a tenant and route assistant/workflow requests to the right sources (blueprint + app config pattern).",
103
+ kind: "knowledge",
104
+ visibility: "public",
105
+ stability: "experimental",
106
+ owners: ["@platform.core"],
107
+ tags: ["knowledge", "canon", "app-config", "agents", "workflows"]
108
+ },
109
+ docs: {
110
+ rootDocId: "docs.examples.knowledge-canon",
111
+ usageDocId: "docs.examples.knowledge-canon.usage"
112
+ },
113
+ entrypoints: {
114
+ packageName: "@contractspec/example.knowledge-canon",
115
+ docs: "./docs"
116
+ },
117
+ surfaces: {
118
+ templates: true,
119
+ sandbox: { enabled: true, modes: ["markdown", "specs"] },
120
+ studio: { enabled: true, installable: true },
121
+ mcp: { enabled: true }
122
+ }
123
+ });
124
+ var example_default = example;
125
+
126
+ // src/tenant.ts
127
+ var artisanKnowledgeTenantConfig = {
128
+ meta: {
129
+ id: "tenant-config-artisan-knowledge",
130
+ tenantId: "artisan-co",
131
+ appId: "artisan",
132
+ blueprintName: "artisan.knowledge.product",
133
+ blueprintVersion: "1.0.0",
134
+ environment: "production",
135
+ version: "1.0.0",
136
+ status: "published",
137
+ createdAt: "2026-01-01T00:00:00.000Z",
138
+ updatedAt: "2026-01-01T00:00:00.000Z"
139
+ },
140
+ knowledge: [
141
+ {
142
+ spaceKey: "knowledge.product-canon",
143
+ spaceVersion: "1.0.0",
144
+ scope: {
145
+ workflows: ["answerFaq"],
146
+ agents: ["productSupportAssistant"]
147
+ },
148
+ constraints: {
149
+ maxTokensPerQuery: 4096,
150
+ maxQueriesPerMinute: 30
151
+ }
152
+ }
153
+ ],
154
+ integrations: [],
155
+ notes: "Product Canon knowledge space bound for production assistants."
156
+ };
157
+
158
+ // src/source.sample.ts
159
+ var productCanonNotionSource = {
160
+ meta: {
161
+ id: "source-canon-notion",
162
+ tenantId: "artisan-co",
163
+ spaceKey: "knowledge.product-canon",
164
+ spaceVersion: "1.0.0",
165
+ label: "Product Canon (Notion)",
166
+ sourceType: "notion",
167
+ createdAt: "2026-01-01T00:00:00.000Z",
168
+ updatedAt: "2026-01-01T00:00:00.000Z"
169
+ },
170
+ config: {
171
+ notionDatabaseId: "xxxxxxxxxxxxxxxx",
172
+ apiKey: "secret_notion_token"
173
+ },
174
+ syncSchedule: {
175
+ enabled: true,
176
+ cron: "0 * * * *"
177
+ },
178
+ lastSync: {
179
+ timestamp: new Date("2026-01-01T00:00:00.000Z"),
180
+ success: true,
181
+ itemsProcessed: 128
182
+ }
183
+ };
184
+ export {
185
+ selectKnowledgeBindings,
186
+ productCanonNotionSource,
187
+ example_default as example,
188
+ artisanKnowledgeTenantConfig,
189
+ artisanKnowledgeBlueprint,
190
+ answerWithKnowledge
191
+ };
@@ -0,0 +1,29 @@
1
+ // src/source.sample.ts
2
+ var productCanonNotionSource = {
3
+ meta: {
4
+ id: "source-canon-notion",
5
+ tenantId: "artisan-co",
6
+ spaceKey: "knowledge.product-canon",
7
+ spaceVersion: "1.0.0",
8
+ label: "Product Canon (Notion)",
9
+ sourceType: "notion",
10
+ createdAt: "2026-01-01T00:00:00.000Z",
11
+ updatedAt: "2026-01-01T00:00:00.000Z"
12
+ },
13
+ config: {
14
+ notionDatabaseId: "xxxxxxxxxxxxxxxx",
15
+ apiKey: "secret_notion_token"
16
+ },
17
+ syncSchedule: {
18
+ enabled: true,
19
+ cron: "0 * * * *"
20
+ },
21
+ lastSync: {
22
+ timestamp: new Date("2026-01-01T00:00:00.000Z"),
23
+ success: true,
24
+ itemsProcessed: 128
25
+ }
26
+ };
27
+ export {
28
+ productCanonNotionSource
29
+ };
@@ -0,0 +1,34 @@
1
+ // src/tenant.ts
2
+ var artisanKnowledgeTenantConfig = {
3
+ meta: {
4
+ id: "tenant-config-artisan-knowledge",
5
+ tenantId: "artisan-co",
6
+ appId: "artisan",
7
+ blueprintName: "artisan.knowledge.product",
8
+ blueprintVersion: "1.0.0",
9
+ environment: "production",
10
+ version: "1.0.0",
11
+ status: "published",
12
+ createdAt: "2026-01-01T00:00:00.000Z",
13
+ updatedAt: "2026-01-01T00:00:00.000Z"
14
+ },
15
+ knowledge: [
16
+ {
17
+ spaceKey: "knowledge.product-canon",
18
+ spaceVersion: "1.0.0",
19
+ scope: {
20
+ workflows: ["answerFaq"],
21
+ agents: ["productSupportAssistant"]
22
+ },
23
+ constraints: {
24
+ maxTokensPerQuery: 4096,
25
+ maxQueriesPerMinute: 30
26
+ }
27
+ }
28
+ ],
29
+ integrations: [],
30
+ notes: "Product Canon knowledge space bound for production assistants."
31
+ };
32
+ export {
33
+ artisanKnowledgeTenantConfig
34
+ };
@@ -1,7 +1,3 @@
1
- import { KnowledgeSourceConfig } from "@contractspec/lib.contracts/knowledge/source";
2
-
3
- //#region src/source.sample.d.ts
4
- declare const productCanonNotionSource: KnowledgeSourceConfig;
5
- //#endregion
6
- export { productCanonNotionSource };
1
+ import type { KnowledgeSourceConfig } from '@contractspec/lib.contracts/knowledge/source';
2
+ export declare const productCanonNotionSource: KnowledgeSourceConfig;
7
3
  //# sourceMappingURL=source.sample.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.sample.d.ts","names":[],"sources":["../src/source.sample.ts"],"sourcesContent":[],"mappings":";;;cAEa,0BAA0B"}
1
+ {"version":3,"file":"source.sample.d.ts","sourceRoot":"","sources":["../src/source.sample.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAE1F,eAAO,MAAM,wBAAwB,EAAE,qBAwBtC,CAAC"}