@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.
- package/.turbo/turbo-build.log +41 -38
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +28 -0
- package/dist/agent.d.ts +8 -16
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +28 -31
- package/dist/blueprint.d.ts +2 -6
- package/dist/blueprint.d.ts.map +1 -1
- package/dist/blueprint.js +26 -28
- package/dist/browser/agent.js +31 -0
- package/dist/browser/blueprint.js +26 -0
- package/dist/browser/docs/index.js +42 -0
- package/dist/browser/docs/knowledge-canon.docblock.js +42 -0
- package/dist/browser/example.js +33 -0
- package/dist/browser/index.js +191 -0
- package/dist/browser/source.sample.js +29 -0
- package/dist/browser/tenant.js +34 -0
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +43 -1
- package/dist/docs/knowledge-canon.docblock.d.ts +2 -1
- package/dist/docs/knowledge-canon.docblock.d.ts.map +1 -0
- package/dist/docs/knowledge-canon.docblock.js +40 -26
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +31 -44
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +192 -8
- package/dist/node/agent.js +31 -0
- package/dist/node/blueprint.js +26 -0
- package/dist/node/docs/index.js +42 -0
- package/dist/node/docs/knowledge-canon.docblock.js +42 -0
- package/dist/node/example.js +33 -0
- package/dist/node/index.js +191 -0
- package/dist/node/source.sample.js +29 -0
- package/dist/node/tenant.js +34 -0
- package/dist/source.sample.d.ts +2 -6
- package/dist/source.sample.d.ts.map +1 -1
- package/dist/source.sample.js +29 -29
- package/dist/tenant.d.ts +2 -6
- package/dist/tenant.d.ts.map +1 -1
- package/dist/tenant.js +34 -32
- package/package.json +84 -29
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -37
- package/dist/agent.js.map +0 -1
- package/dist/blueprint.js.map +0 -1
- package/dist/docs/knowledge-canon.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/source.sample.js.map +0 -1
- package/dist/tenant.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/dist/source.sample.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/source.sample.ts
|
|
3
|
+
var productCanonNotionSource = {
|
|
4
|
+
meta: {
|
|
5
|
+
id: "source-canon-notion",
|
|
6
|
+
tenantId: "artisan-co",
|
|
7
|
+
spaceKey: "knowledge.product-canon",
|
|
8
|
+
spaceVersion: "1.0.0",
|
|
9
|
+
label: "Product Canon (Notion)",
|
|
10
|
+
sourceType: "notion",
|
|
11
|
+
createdAt: "2026-01-01T00:00:00.000Z",
|
|
12
|
+
updatedAt: "2026-01-01T00:00:00.000Z"
|
|
13
|
+
},
|
|
14
|
+
config: {
|
|
15
|
+
notionDatabaseId: "xxxxxxxxxxxxxxxx",
|
|
16
|
+
apiKey: "secret_notion_token"
|
|
17
|
+
},
|
|
18
|
+
syncSchedule: {
|
|
19
|
+
enabled: true,
|
|
20
|
+
cron: "0 * * * *"
|
|
21
|
+
},
|
|
22
|
+
lastSync: {
|
|
23
|
+
timestamp: new Date("2026-01-01T00:00:00.000Z"),
|
|
24
|
+
success: true,
|
|
25
|
+
itemsProcessed: 128
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
productCanonNotionSource
|
|
26
30
|
};
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { productCanonNotionSource };
|
|
30
|
-
//# sourceMappingURL=source.sample.js.map
|
package/dist/tenant.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { TenantAppConfig } from
|
|
2
|
-
|
|
3
|
-
//#region src/tenant.d.ts
|
|
4
|
-
declare const artisanKnowledgeTenantConfig: TenantAppConfig;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { artisanKnowledgeTenantConfig };
|
|
1
|
+
import type { TenantAppConfig } from '@contractspec/lib.contracts/app-config/spec';
|
|
2
|
+
export declare const artisanKnowledgeTenantConfig: TenantAppConfig;
|
|
7
3
|
//# sourceMappingURL=tenant.d.ts.map
|
package/dist/tenant.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.d.ts","
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../src/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF,eAAO,MAAM,4BAA4B,EAAE,eA6B1C,CAAC"}
|
package/dist/tenant.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/tenant.ts
|
|
3
|
+
var artisanKnowledgeTenantConfig = {
|
|
4
|
+
meta: {
|
|
5
|
+
id: "tenant-config-artisan-knowledge",
|
|
6
|
+
tenantId: "artisan-co",
|
|
7
|
+
appId: "artisan",
|
|
8
|
+
blueprintName: "artisan.knowledge.product",
|
|
9
|
+
blueprintVersion: "1.0.0",
|
|
10
|
+
environment: "production",
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
status: "published",
|
|
13
|
+
createdAt: "2026-01-01T00:00:00.000Z",
|
|
14
|
+
updatedAt: "2026-01-01T00:00:00.000Z"
|
|
15
|
+
},
|
|
16
|
+
knowledge: [
|
|
17
|
+
{
|
|
18
|
+
spaceKey: "knowledge.product-canon",
|
|
19
|
+
spaceVersion: "1.0.0",
|
|
20
|
+
scope: {
|
|
21
|
+
workflows: ["answerFaq"],
|
|
22
|
+
agents: ["productSupportAssistant"]
|
|
23
|
+
},
|
|
24
|
+
constraints: {
|
|
25
|
+
maxTokensPerQuery: 4096,
|
|
26
|
+
maxQueriesPerMinute: 30
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
integrations: [],
|
|
31
|
+
notes: "Product Canon knowledge space bound for production assistants."
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
artisanKnowledgeTenantConfig
|
|
29
35
|
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { artisanKnowledgeTenantConfig };
|
|
33
|
-
//# sourceMappingURL=tenant.js.map
|
package/package.json
CHANGED
|
@@ -1,54 +1,109 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.knowledge-canon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Knowledge example – Product Canon space (blueprint + tenant config + source sample + runtime helper).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./
|
|
9
|
-
"./agent": "./
|
|
10
|
-
"./blueprint": "./
|
|
11
|
-
"./docs": "./
|
|
12
|
-
"./docs/
|
|
13
|
-
"./
|
|
14
|
-
"./
|
|
15
|
-
"./
|
|
16
|
-
"
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./agent": "./src/agent.ts",
|
|
10
|
+
"./blueprint": "./src/blueprint.ts",
|
|
11
|
+
"./docs": "./src/docs/index.ts",
|
|
12
|
+
"./docs/index": "./src/docs/index.ts",
|
|
13
|
+
"./docs/knowledge-canon.docblock": "./src/docs/knowledge-canon.docblock.ts",
|
|
14
|
+
"./example": "./src/example.ts",
|
|
15
|
+
"./source.sample": "./src/source.sample.ts",
|
|
16
|
+
"./tenant": "./src/tenant.ts"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
20
20
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
21
|
-
"build": "bun build:
|
|
22
|
-
"build:bundle": "
|
|
23
|
-
"build:types": "
|
|
24
|
-
"dev": "bun
|
|
21
|
+
"build": "bun run prebuild && bun run build:bundle && bun run build:types",
|
|
22
|
+
"build:bundle": "contractspec-bun-build transpile",
|
|
23
|
+
"build:types": "contractspec-bun-build types",
|
|
24
|
+
"dev": "contractspec-bun-build dev",
|
|
25
25
|
"clean": "rimraf dist .turbo",
|
|
26
26
|
"lint": "bun lint:fix",
|
|
27
27
|
"lint:fix": "eslint src --fix",
|
|
28
28
|
"lint:check": "eslint src",
|
|
29
|
-
"test": "bun test"
|
|
29
|
+
"test": "bun test",
|
|
30
|
+
"prebuild": "contractspec-bun-build prebuild",
|
|
31
|
+
"typecheck": "tsc --noEmit"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@contractspec/lib.contracts": "1.
|
|
34
|
+
"@contractspec/lib.contracts": "1.58.0"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
|
-
"@contractspec/tool.
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"typescript": "^5.9.3"
|
|
37
|
+
"@contractspec/tool.typescript": "1.58.0",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"@contractspec/tool.bun": "1.57.0"
|
|
39
40
|
},
|
|
40
41
|
"publishConfig": {
|
|
41
42
|
"access": "public",
|
|
42
43
|
"exports": {
|
|
43
|
-
".":
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"./
|
|
51
|
-
|
|
44
|
+
".": {
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"bun": "./dist/index.js",
|
|
47
|
+
"node": "./dist/node/index.mjs",
|
|
48
|
+
"browser": "./dist/browser/index.js",
|
|
49
|
+
"default": "./dist/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./agent": {
|
|
52
|
+
"types": "./dist/agent.d.ts",
|
|
53
|
+
"bun": "./dist/agent.js",
|
|
54
|
+
"node": "./dist/node/agent.mjs",
|
|
55
|
+
"browser": "./dist/browser/agent.js",
|
|
56
|
+
"default": "./dist/agent.js"
|
|
57
|
+
},
|
|
58
|
+
"./blueprint": {
|
|
59
|
+
"types": "./dist/blueprint.d.ts",
|
|
60
|
+
"bun": "./dist/blueprint.js",
|
|
61
|
+
"node": "./dist/node/blueprint.mjs",
|
|
62
|
+
"browser": "./dist/browser/blueprint.js",
|
|
63
|
+
"default": "./dist/blueprint.js"
|
|
64
|
+
},
|
|
65
|
+
"./docs": {
|
|
66
|
+
"types": "./dist/docs/index.d.ts",
|
|
67
|
+
"bun": "./dist/docs/index.js",
|
|
68
|
+
"node": "./dist/node/docs/index.mjs",
|
|
69
|
+
"browser": "./dist/browser/docs/index.js",
|
|
70
|
+
"default": "./dist/docs/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./docs/index": {
|
|
73
|
+
"types": "./dist/docs/index.d.ts",
|
|
74
|
+
"bun": "./dist/docs/index.js",
|
|
75
|
+
"node": "./dist/node/docs/index.mjs",
|
|
76
|
+
"browser": "./dist/browser/docs/index.js",
|
|
77
|
+
"default": "./dist/docs/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./docs/knowledge-canon.docblock": {
|
|
80
|
+
"types": "./dist/docs/knowledge-canon.docblock.d.ts",
|
|
81
|
+
"bun": "./dist/docs/knowledge-canon.docblock.js",
|
|
82
|
+
"node": "./dist/node/docs/knowledge-canon.docblock.mjs",
|
|
83
|
+
"browser": "./dist/browser/docs/knowledge-canon.docblock.js",
|
|
84
|
+
"default": "./dist/docs/knowledge-canon.docblock.js"
|
|
85
|
+
},
|
|
86
|
+
"./example": {
|
|
87
|
+
"types": "./dist/example.d.ts",
|
|
88
|
+
"bun": "./dist/example.js",
|
|
89
|
+
"node": "./dist/node/example.mjs",
|
|
90
|
+
"browser": "./dist/browser/example.js",
|
|
91
|
+
"default": "./dist/example.js"
|
|
92
|
+
},
|
|
93
|
+
"./source.sample": {
|
|
94
|
+
"types": "./dist/source.sample.d.ts",
|
|
95
|
+
"bun": "./dist/source.sample.js",
|
|
96
|
+
"node": "./dist/node/source.sample.mjs",
|
|
97
|
+
"browser": "./dist/browser/source.sample.js",
|
|
98
|
+
"default": "./dist/source.sample.js"
|
|
99
|
+
},
|
|
100
|
+
"./tenant": {
|
|
101
|
+
"types": "./dist/tenant.d.ts",
|
|
102
|
+
"bun": "./dist/tenant.js",
|
|
103
|
+
"node": "./dist/node/tenant.mjs",
|
|
104
|
+
"browser": "./dist/browser/tenant.js",
|
|
105
|
+
"default": "./dist/tenant.js"
|
|
106
|
+
}
|
|
52
107
|
},
|
|
53
108
|
"registry": "https://registry.npmjs.org/"
|
|
54
109
|
},
|
package/tsdown.config.js
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
$ tsdown
|
|
2
|
-
[34mℹ[39m tsdown [2mv0.19.0[22m powered by rolldown [2mv1.0.0-beta.59[22m
|
|
3
|
-
[34mℹ[39m config file: [4m/home/runner/work/contractspec/contractspec/packages/examples/knowledge-canon/tsdown.config.js[24m
|
|
4
|
-
[34mℹ[39m entry: [34msrc/agent.ts, src/blueprint.ts, src/example.ts, src/index.ts, src/source.sample.ts, src/tenant.ts, src/docs/index.ts, src/docs/knowledge-canon.docblock.ts[39m
|
|
5
|
-
[34mℹ[39m target: [34mesnext[39m
|
|
6
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
7
|
-
[34mℹ[39m Build start
|
|
8
|
-
[34mℹ[39m Cleaning 28 files
|
|
9
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/knowledge-canon.docblock.js[22m [2m1.68 kB[22m [2m│ gzip: 0.79 kB[22m
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1magent.js[22m [2m1.25 kB[22m [2m│ gzip: 0.62 kB[22m
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m1.09 kB[22m [2m│ gzip: 0.56 kB[22m
|
|
12
|
-
[34mℹ[39m [2mdist/[22m[1mblueprint.js[22m [2m0.85 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[1mtenant.js[22m [2m0.82 kB[22m [2m│ gzip: 0.45 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[1msource.sample.js[22m [2m0.70 kB[22m [2m│ gzip: 0.41 kB[22m
|
|
15
|
-
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.50 kB[22m [2m│ gzip: 0.21 kB[22m
|
|
16
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.04 kB[22m [2m│ gzip: 0.06 kB[22m
|
|
17
|
-
[34mℹ[39m [2mdist/[22mdocs/knowledge-canon.docblock.js.map [2m2.18 kB[22m [2m│ gzip: 0.97 kB[22m
|
|
18
|
-
[34mℹ[39m [2mdist/[22magent.js.map [2m2.13 kB[22m [2m│ gzip: 1.00 kB[22m
|
|
19
|
-
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.53 kB[22m [2m│ gzip: 0.75 kB[22m
|
|
20
|
-
[34mℹ[39m [2mdist/[22mtenant.js.map [2m1.35 kB[22m [2m│ gzip: 0.68 kB[22m
|
|
21
|
-
[34mℹ[39m [2mdist/[22mblueprint.js.map [2m1.26 kB[22m [2m│ gzip: 0.64 kB[22m
|
|
22
|
-
[34mℹ[39m [2mdist/[22msource.sample.js.map [2m1.14 kB[22m [2m│ gzip: 0.58 kB[22m
|
|
23
|
-
[34mℹ[39m [2mdist/[22magent.d.ts.map [2m0.29 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
24
|
-
[34mℹ[39m [2mdist/[22msource.sample.d.ts.map [2m0.14 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
25
|
-
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.14 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
26
|
-
[34mℹ[39m [2mdist/[22mblueprint.d.ts.map [2m0.13 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
27
|
-
[34mℹ[39m [2mdist/[22mtenant.d.ts.map [2m0.12 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
28
|
-
[34mℹ[39m [2mdist/[22m[32m[1magent.d.ts[22m[39m [2m0.91 kB[22m [2m│ gzip: 0.44 kB[22m
|
|
29
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.44 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
30
|
-
[34mℹ[39m [2mdist/[22m[32m[1msource.sample.d.ts[22m[39m [2m0.28 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
31
|
-
[34mℹ[39m [2mdist/[22m[32m[1mblueprint.d.ts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
32
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtenant.d.ts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
33
|
-
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
34
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
35
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/knowledge-canon.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
36
|
-
[34mℹ[39m 27 files, total: 19.76 kB
|
|
37
|
-
[32m✔[39m Build complete in [32m20236ms[39m
|
package/dist/agent.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","names":[],"sources":["../src/agent.ts"],"sourcesContent":["import type { ResolvedAppConfig } from '@contractspec/lib.contracts/app-config/runtime';\n\n/**\n * Selects knowledge bindings that apply to a workflow or agent identifier.\n */\nexport function selectKnowledgeBindings(\n resolved: ResolvedAppConfig,\n options: { workflowId?: string; agentId?: string }\n) {\n return resolved.knowledge.filter(({ binding }) => {\n if (!binding.scope) return true;\n if (\n options.workflowId &&\n binding.scope.workflows?.includes(options.workflowId)\n )\n return true;\n if (options.agentId && binding.scope.agents?.includes(options.agentId))\n return true;\n return false;\n });\n}\n\n/**\n * Pseudo implementation of an assistant lookup that routes prompts to the appropriate\n * knowledge sources. In a real system this would call the ingestion/search services.\n */\nexport async function answerWithKnowledge(\n resolved: ResolvedAppConfig,\n question: string,\n { workflowId, agentId }: { workflowId?: string; agentId?: string }\n): Promise<string> {\n const bindings = selectKnowledgeBindings(resolved, { workflowId, agentId });\n if (bindings.length === 0) {\n return 'No knowledge space available for this request.';\n }\n\n const summaries = bindings.map(\n ({ space }) => `• ${space.meta.title || space.meta.description}`\n );\n return [\n `Q: ${question}`,\n 'Routed to knowledge spaces:',\n ...summaries,\n '',\n 'TODO: invoke knowledge search service and synthesize response.',\n ].join('\\n');\n}\n"],"mappings":";;;;AAKA,SAAgB,wBACd,UACA,SACA;AACA,QAAO,SAAS,UAAU,QAAQ,EAAE,cAAc;AAChD,MAAI,CAAC,QAAQ,MAAO,QAAO;AAC3B,MACE,QAAQ,cACR,QAAQ,MAAM,WAAW,SAAS,QAAQ,WAAW,CAErD,QAAO;AACT,MAAI,QAAQ,WAAW,QAAQ,MAAM,QAAQ,SAAS,QAAQ,QAAQ,CACpE,QAAO;AACT,SAAO;GACP;;;;;;AAOJ,eAAsB,oBACpB,UACA,UACA,EAAE,YAAY,WACG;CACjB,MAAM,WAAW,wBAAwB,UAAU;EAAE;EAAY;EAAS,CAAC;AAC3E,KAAI,SAAS,WAAW,EACtB,QAAO;CAGT,MAAM,YAAY,SAAS,KACxB,EAAE,YAAY,KAAK,MAAM,KAAK,SAAS,MAAM,KAAK,cACpD;AACD,QAAO;EACL,MAAM;EACN;EACA,GAAG;EACH;EACA;EACD,CAAC,KAAK,KAAK"}
|
package/dist/blueprint.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.js","names":[],"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,MAAa,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-canon.docblock.js","names":[],"sources":["../../src/docs/knowledge-canon.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst blocks: DocBlock[] = [\n {\n id: 'docs.examples.knowledge-canon',\n title: 'Knowledge Example — Product Canon Space',\n summary:\n 'Bind the Product Canon KnowledgeSpaceSpec to a tenant and expose it to agents/workflows via ResolvedAppConfig.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/knowledge-canon',\n tags: ['knowledge', 'canon', 'example'],\n body: `## Included assets\\n- Blueprint referencing a workflow depending on the Product Canon space.\\n- Tenant app config binding the space to a workflow and agent scope.\\n- Sample knowledge source configuration.\\n- Helper to pick knowledge bindings from ResolvedAppConfig.\\n\\n## Guardrails\\n- Keep sources scoped per tenant.\\n- Keep secret fields out of config (use secret providers).\\n- Enforce scope restrictions before answering.`,\n },\n {\n id: 'docs.examples.knowledge-canon.usage',\n title: 'Knowledge Canon — Usage',\n summary:\n 'How to register the space, configure sources, and route requests.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/knowledge-canon/usage',\n tags: ['knowledge', 'usage'],\n body: `## Usage\\n1) Register the knowledge space spec in your KnowledgeSpaceRegistry.\\n2) Persist the source config through knowledge CRUD operations.\\n3) Compose ResolvedAppConfig and pass it to your workflow/agent runtime.\\n4) Use helpers like \\`selectKnowledgeBindings\\` before dispatching to search/embedding.\\n\\n## Notes\\n- Avoid logging PII.\\n- Keep search results auditable and cite sources.`,\n },\n];\n\nregisterDocBlocks(blocks);\n"],"mappings":";;;AA4BA,kBAzB2B,CACzB;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAa;EAAS;EAAU;CACvC,MAAM;CACP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,aAAa,QAAQ;CAC5B,MAAM;CACP,CACF,CAEwB"}
|
package/dist/example.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\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,MAAM,UAAU,cAAc;CAC5B,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,CAAC;AAEF,sBAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source.sample.js","names":[],"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,MAAa,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.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.js","names":[],"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,MAAa,+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"}
|