@contractspec/example.integration-supabase 1.57.0 → 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 +40 -39
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +14 -0
- package/dist/blueprint.d.ts +2 -6
- package/dist/blueprint.d.ts.map +1 -1
- package/dist/blueprint.js +67 -74
- package/dist/browser/blueprint.js +67 -0
- package/dist/browser/connection.sample.js +54 -0
- package/dist/browser/docs/index.js +54 -0
- package/dist/browser/docs/integration-supabase.docblock.js +54 -0
- package/dist/browser/example.js +33 -0
- package/dist/browser/index.js +278 -0
- package/dist/browser/runtime.sample.js +32 -0
- package/dist/browser/tenant.js +42 -0
- package/dist/connection.sample.d.ts +4 -8
- package/dist/connection.sample.d.ts.map +1 -1
- package/dist/connection.sample.js +53 -48
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +55 -1
- package/dist/docs/integration-supabase.docblock.d.ts +2 -1
- package/dist/docs/integration-supabase.docblock.d.ts.map +1 -0
- package/dist/docs/integration-supabase.docblock.js +25 -30
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +32 -44
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +279 -8
- package/dist/node/blueprint.js +67 -0
- package/dist/node/connection.sample.js +54 -0
- package/dist/node/docs/index.js +54 -0
- package/dist/node/docs/integration-supabase.docblock.js +54 -0
- package/dist/node/example.js +33 -0
- package/dist/node/index.js +278 -0
- package/dist/node/runtime.sample.js +32 -0
- package/dist/node/tenant.js +42 -0
- package/dist/runtime.sample.d.ts +9 -13
- package/dist/runtime.sample.d.ts.map +1 -1
- package/dist/runtime.sample.js +30 -40
- package/dist/tenant.d.ts +2 -6
- package/dist/tenant.d.ts.map +1 -1
- package/dist/tenant.js +42 -39
- package/package.json +86 -31
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -42
- package/dist/blueprint.js.map +0 -1
- package/dist/connection.sample.js.map +0 -1
- package/dist/docs/integration-supabase.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/runtime.sample.js.map +0 -1
- package/dist/tenant.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
$ bun
|
|
2
|
-
$
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[34mℹ[39m target: [34mesnext[39m
|
|
8
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
-
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/integration-supabase.docblock.js[22m [2m2.34 kB[22m [2m│ gzip: 1.09 kB[22m
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mblueprint.js[22m [2m1.84 kB[22m [2m│ gzip: 0.72 kB[22m
|
|
12
|
-
[34mℹ[39m [2mdist/[22m[1mconnection.sample.js[22m [2m1.43 kB[22m [2m│ gzip: 0.50 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[1mtenant.js[22m [2m1.11 kB[22m [2m│ gzip: 0.53 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[1mruntime.sample.js[22m [2m1.07 kB[22m [2m│ gzip: 0.54 kB[22m
|
|
15
|
-
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m1.04 kB[22m [2m│ gzip: 0.54 kB[22m
|
|
16
|
-
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.56 kB[22m [2m│ gzip: 0.20 kB[22m
|
|
17
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.04 kB[22m [2m│ gzip: 0.07 kB[22m
|
|
18
|
-
[34mℹ[39m [2mdist/[22mdocs/integration-supabase.docblock.js.map [2m2.92 kB[22m [2m│ gzip: 1.30 kB[22m
|
|
19
|
-
[34mℹ[39m [2mdist/[22mblueprint.js.map [2m2.90 kB[22m [2m│ gzip: 1.05 kB[22m
|
|
20
|
-
[34mℹ[39m [2mdist/[22mruntime.sample.js.map [2m2.22 kB[22m [2m│ gzip: 0.94 kB[22m
|
|
21
|
-
[34mℹ[39m [2mdist/[22mconnection.sample.js.map [2m2.19 kB[22m [2m│ gzip: 0.72 kB[22m
|
|
22
|
-
[34mℹ[39m [2mdist/[22mtenant.js.map [2m1.80 kB[22m [2m│ gzip: 0.81 kB[22m
|
|
23
|
-
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.51 kB[22m [2m│ gzip: 0.73 kB[22m
|
|
24
|
-
[34mℹ[39m [2mdist/[22mruntime.sample.d.ts.map [2m0.28 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
25
|
-
[34mℹ[39m [2mdist/[22mconnection.sample.d.ts.map [2m0.20 kB[22m [2m│ gzip: 0.15 kB[22m
|
|
26
|
-
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.13 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
27
|
-
[34mℹ[39m [2mdist/[22mblueprint.d.ts.map [2m0.12 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
28
|
-
[34mℹ[39m [2mdist/[22mtenant.d.ts.map [2m0.11 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
29
|
-
[34mℹ[39m [2mdist/[22m[32m[1mruntime.sample.d.ts[22m[39m [2m0.73 kB[22m [2m│ gzip: 0.32 kB[22m
|
|
30
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.66 kB[22m [2m│ gzip: 0.21 kB[22m
|
|
31
|
-
[34mℹ[39m [2mdist/[22m[32m[1mconnection.sample.d.ts[22m[39m [2m0.48 kB[22m [2m│ gzip: 0.21 kB[22m
|
|
32
|
-
[34mℹ[39m [2mdist/[22m[32m[1mblueprint.d.ts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
33
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtenant.d.ts[22m[39m [2m0.26 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
34
|
-
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
35
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
36
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/integration-supabase.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
37
|
-
[34mℹ[39m 27 files, total: 26.47 kB
|
|
38
|
-
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
1
|
+
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run prebuild && bun run build:bundle && bun run build:types
|
|
3
|
+
$ contractspec-bun-build prebuild
|
|
4
|
+
$ contractspec-bun-build transpile
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=8
|
|
6
|
+
Bundled 8 modules in 36ms
|
|
39
7
|
|
|
40
|
-
|
|
8
|
+
./blueprint.js 1.92 KB (entry point)
|
|
9
|
+
./index.js 8.81 KB (entry point)
|
|
10
|
+
./connection.sample.js 1.45 KB (entry point)
|
|
11
|
+
docs/index.js 2.33 KB (entry point)
|
|
12
|
+
docs/integration-supabase.docblock.js 2.33 KB (entry point)
|
|
13
|
+
./example.js 1.0 KB (entry point)
|
|
14
|
+
./runtime.sample.js 1.0 KB (entry point)
|
|
15
|
+
./tenant.js 1.12 KB (entry point)
|
|
16
|
+
|
|
17
|
+
[contractspec-bun-build] transpile target=node root=src entries=8
|
|
18
|
+
Bundled 8 modules in 35ms
|
|
19
|
+
|
|
20
|
+
./blueprint.js 1.91 KB (entry point)
|
|
21
|
+
./index.js 8.80 KB (entry point)
|
|
22
|
+
./connection.sample.js 1.44 KB (entry point)
|
|
23
|
+
docs/index.js 2.32 KB (entry point)
|
|
24
|
+
docs/integration-supabase.docblock.js 2.32 KB (entry point)
|
|
25
|
+
./example.js 1.0 KB (entry point)
|
|
26
|
+
./runtime.sample.js 1.0 KB (entry point)
|
|
27
|
+
./tenant.js 1.12 KB (entry point)
|
|
28
|
+
|
|
29
|
+
[contractspec-bun-build] transpile target=browser root=src entries=8
|
|
30
|
+
Bundled 8 modules in 34ms
|
|
31
|
+
|
|
32
|
+
./blueprint.js 1.91 KB (entry point)
|
|
33
|
+
./index.js 8.80 KB (entry point)
|
|
34
|
+
./connection.sample.js 1.44 KB (entry point)
|
|
35
|
+
docs/index.js 2.32 KB (entry point)
|
|
36
|
+
docs/integration-supabase.docblock.js 2.32 KB (entry point)
|
|
37
|
+
./example.js 1.0 KB (entry point)
|
|
38
|
+
./runtime.sample.js 1.0 KB (entry point)
|
|
39
|
+
./tenant.js 1.12 KB (entry point)
|
|
40
|
+
|
|
41
|
+
$ contractspec-bun-build types
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @contractspec/example.integration-supabase
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d1f0fd0]
|
|
12
|
+
- Updated dependencies [4355a9e]
|
|
13
|
+
- @contractspec/integration.providers-impls@1.58.0
|
|
14
|
+
- @contractspec/integration.runtime@1.58.0
|
|
15
|
+
- @contractspec/lib.contracts@1.58.0
|
|
16
|
+
|
|
3
17
|
## 1.57.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/blueprint.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { AppBlueprintSpec } from
|
|
2
|
-
|
|
3
|
-
//#region src/blueprint.d.ts
|
|
4
|
-
declare const supabaseKnowledgeBlueprint: AppBlueprintSpec;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { supabaseKnowledgeBlueprint };
|
|
1
|
+
import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';
|
|
2
|
+
export declare const supabaseKnowledgeBlueprint: AppBlueprintSpec;
|
|
7
3
|
//# sourceMappingURL=blueprint.d.ts.map
|
package/dist/blueprint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.d.ts","
|
|
1
|
+
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../src/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAOpF,eAAO,MAAM,0BAA0B,EAAE,gBA4DxC,CAAC"}
|
package/dist/blueprint.js
CHANGED
|
@@ -1,75 +1,68 @@
|
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
notes: "Bind both slots to Supabase connections when you want shared infra for embeddings and SQL operations."
|
|
1
|
+
// @bun
|
|
2
|
+
// src/blueprint.ts
|
|
3
|
+
import {
|
|
4
|
+
OwnersEnum,
|
|
5
|
+
StabilityEnum,
|
|
6
|
+
TagsEnum
|
|
7
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
8
|
+
var supabaseKnowledgeBlueprint = {
|
|
9
|
+
meta: {
|
|
10
|
+
key: "knowledge.supabase.dual-store",
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
appId: "knowledge-assistant",
|
|
13
|
+
title: "Knowledge Assistant - Supabase Dual Store",
|
|
14
|
+
description: "Blueprint that uses Supabase for both vector retrieval and SQL-backed analytics.",
|
|
15
|
+
domain: "knowledge",
|
|
16
|
+
owners: [OwnersEnum.PlatformCore],
|
|
17
|
+
tags: [
|
|
18
|
+
TagsEnum.Automation,
|
|
19
|
+
"knowledge",
|
|
20
|
+
"supabase",
|
|
21
|
+
"vector-db",
|
|
22
|
+
"database"
|
|
23
|
+
],
|
|
24
|
+
stability: StabilityEnum.Experimental
|
|
25
|
+
},
|
|
26
|
+
capabilities: {
|
|
27
|
+
enabled: [
|
|
28
|
+
{ key: "vector-db.search", version: "1.0.0" },
|
|
29
|
+
{ key: "vector-db.storage", version: "1.0.0" },
|
|
30
|
+
{ key: "database.sql", version: "1.0.0" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
integrationSlots: [
|
|
34
|
+
{
|
|
35
|
+
slotId: "primary-vector-db",
|
|
36
|
+
requiredCategory: "vector-db",
|
|
37
|
+
allowedModes: ["managed", "byok"],
|
|
38
|
+
requiredCapabilities: [
|
|
39
|
+
{ key: "vector-db.search", version: "1.0.0" },
|
|
40
|
+
{ key: "vector-db.storage", version: "1.0.0" }
|
|
41
|
+
],
|
|
42
|
+
required: true,
|
|
43
|
+
description: "Primary semantic retrieval store for knowledge chunks."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
slotId: "primary-database",
|
|
47
|
+
requiredCategory: "database",
|
|
48
|
+
allowedModes: ["managed", "byok"],
|
|
49
|
+
requiredCapabilities: [{ key: "database.sql", version: "1.0.0" }],
|
|
50
|
+
required: true,
|
|
51
|
+
description: "Primary SQL database for analytics and transactional reads."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
workflows: {
|
|
55
|
+
ingestKnowledge: {
|
|
56
|
+
key: "knowledge.ingest.supabase",
|
|
57
|
+
version: "1.0.0"
|
|
58
|
+
},
|
|
59
|
+
refreshMetrics: {
|
|
60
|
+
key: "knowledge.metrics.supabase",
|
|
61
|
+
version: "1.0.0"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
notes: "Bind both slots to Supabase connections when you want shared infra for embeddings and SQL operations."
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
supabaseKnowledgeBlueprint
|
|
71
68
|
};
|
|
72
|
-
|
|
73
|
-
//#endregion
|
|
74
|
-
export { supabaseKnowledgeBlueprint };
|
|
75
|
-
//# sourceMappingURL=blueprint.js.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// src/blueprint.ts
|
|
2
|
+
import {
|
|
3
|
+
OwnersEnum,
|
|
4
|
+
StabilityEnum,
|
|
5
|
+
TagsEnum
|
|
6
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
7
|
+
var supabaseKnowledgeBlueprint = {
|
|
8
|
+
meta: {
|
|
9
|
+
key: "knowledge.supabase.dual-store",
|
|
10
|
+
version: "1.0.0",
|
|
11
|
+
appId: "knowledge-assistant",
|
|
12
|
+
title: "Knowledge Assistant - Supabase Dual Store",
|
|
13
|
+
description: "Blueprint that uses Supabase for both vector retrieval and SQL-backed analytics.",
|
|
14
|
+
domain: "knowledge",
|
|
15
|
+
owners: [OwnersEnum.PlatformCore],
|
|
16
|
+
tags: [
|
|
17
|
+
TagsEnum.Automation,
|
|
18
|
+
"knowledge",
|
|
19
|
+
"supabase",
|
|
20
|
+
"vector-db",
|
|
21
|
+
"database"
|
|
22
|
+
],
|
|
23
|
+
stability: StabilityEnum.Experimental
|
|
24
|
+
},
|
|
25
|
+
capabilities: {
|
|
26
|
+
enabled: [
|
|
27
|
+
{ key: "vector-db.search", version: "1.0.0" },
|
|
28
|
+
{ key: "vector-db.storage", version: "1.0.0" },
|
|
29
|
+
{ key: "database.sql", version: "1.0.0" }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
integrationSlots: [
|
|
33
|
+
{
|
|
34
|
+
slotId: "primary-vector-db",
|
|
35
|
+
requiredCategory: "vector-db",
|
|
36
|
+
allowedModes: ["managed", "byok"],
|
|
37
|
+
requiredCapabilities: [
|
|
38
|
+
{ key: "vector-db.search", version: "1.0.0" },
|
|
39
|
+
{ key: "vector-db.storage", version: "1.0.0" }
|
|
40
|
+
],
|
|
41
|
+
required: true,
|
|
42
|
+
description: "Primary semantic retrieval store for knowledge chunks."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
slotId: "primary-database",
|
|
46
|
+
requiredCategory: "database",
|
|
47
|
+
allowedModes: ["managed", "byok"],
|
|
48
|
+
requiredCapabilities: [{ key: "database.sql", version: "1.0.0" }],
|
|
49
|
+
required: true,
|
|
50
|
+
description: "Primary SQL database for analytics and transactional reads."
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
workflows: {
|
|
54
|
+
ingestKnowledge: {
|
|
55
|
+
key: "knowledge.ingest.supabase",
|
|
56
|
+
version: "1.0.0"
|
|
57
|
+
},
|
|
58
|
+
refreshMetrics: {
|
|
59
|
+
key: "knowledge.metrics.supabase",
|
|
60
|
+
version: "1.0.0"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
notes: "Bind both slots to Supabase connections when you want shared infra for embeddings and SQL operations."
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
supabaseKnowledgeBlueprint
|
|
67
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/connection.sample.ts
|
|
2
|
+
var supabaseVectorConnection = {
|
|
3
|
+
meta: {
|
|
4
|
+
id: "conn-supabase-vector",
|
|
5
|
+
tenantId: "acme-knowledge",
|
|
6
|
+
integrationKey: "vectordb.supabase",
|
|
7
|
+
integrationVersion: "1.0.0",
|
|
8
|
+
label: "Supabase Vector Store",
|
|
9
|
+
environment: "production",
|
|
10
|
+
createdAt: "2026-02-06T00:00:00.000Z",
|
|
11
|
+
updatedAt: "2026-02-06T00:00:00.000Z"
|
|
12
|
+
},
|
|
13
|
+
ownershipMode: "managed",
|
|
14
|
+
config: {
|
|
15
|
+
schema: "public",
|
|
16
|
+
table: "contractspec_vectors",
|
|
17
|
+
createTableIfMissing: true,
|
|
18
|
+
distanceMetric: "cosine",
|
|
19
|
+
maxConnections: 5,
|
|
20
|
+
sslMode: "require"
|
|
21
|
+
},
|
|
22
|
+
secretProvider: "vault",
|
|
23
|
+
secretRef: "vault://integrations/acme-knowledge/conn-supabase-vector",
|
|
24
|
+
status: "connected"
|
|
25
|
+
};
|
|
26
|
+
var supabaseDatabaseConnection = {
|
|
27
|
+
meta: {
|
|
28
|
+
id: "conn-supabase-db",
|
|
29
|
+
tenantId: "acme-knowledge",
|
|
30
|
+
integrationKey: "database.supabase",
|
|
31
|
+
integrationVersion: "1.0.0",
|
|
32
|
+
label: "Supabase Postgres",
|
|
33
|
+
environment: "production",
|
|
34
|
+
createdAt: "2026-02-06T00:00:00.000Z",
|
|
35
|
+
updatedAt: "2026-02-06T00:00:00.000Z"
|
|
36
|
+
},
|
|
37
|
+
ownershipMode: "managed",
|
|
38
|
+
config: {
|
|
39
|
+
maxConnections: 10,
|
|
40
|
+
sslMode: "require"
|
|
41
|
+
},
|
|
42
|
+
secretProvider: "vault",
|
|
43
|
+
secretRef: "vault://integrations/acme-knowledge/conn-supabase-db",
|
|
44
|
+
status: "connected"
|
|
45
|
+
};
|
|
46
|
+
var supabaseConnectionSamples = [
|
|
47
|
+
supabaseVectorConnection,
|
|
48
|
+
supabaseDatabaseConnection
|
|
49
|
+
];
|
|
50
|
+
export {
|
|
51
|
+
supabaseVectorConnection,
|
|
52
|
+
supabaseDatabaseConnection,
|
|
53
|
+
supabaseConnectionSamples
|
|
54
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/docs/integration-supabase.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var blocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.integration-supabase",
|
|
6
|
+
title: "Integration Example - Supabase Vector + Postgres",
|
|
7
|
+
summary: "Reference example wiring Supabase vector and SQL integrations in one tenant configuration.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/integration-supabase",
|
|
11
|
+
tags: ["supabase", "vector-db", "database", "integration", "example"],
|
|
12
|
+
body: `## What this example includes
|
|
13
|
+
- A blueprint declaring two required integration slots:
|
|
14
|
+
- \`primary-vector-db\` bound to \`vectordb.supabase\`
|
|
15
|
+
- \`primary-database\` bound to \`database.supabase\`
|
|
16
|
+
- A tenant config binding both slots.
|
|
17
|
+
- Connection samples with clear \`config\` vs \`secretRef\` separation.
|
|
18
|
+
- A runtime sample that upserts/searches vectors and executes SQL queries.
|
|
19
|
+
|
|
20
|
+
## Why this pattern
|
|
21
|
+
- Keeps integration concerns explicit and auditable in app-config.
|
|
22
|
+
- Enables shared Supabase infrastructure for retrieval + analytics.
|
|
23
|
+
- Preserves secret management boundaries (no credentials in config/spec).`
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "docs.examples.integration-supabase.usage",
|
|
27
|
+
title: "Supabase Integration Example - Usage",
|
|
28
|
+
summary: "Step-by-step usage of the Supabase dual-store integration example.",
|
|
29
|
+
kind: "usage",
|
|
30
|
+
visibility: "public",
|
|
31
|
+
route: "/docs/examples/integration-supabase/usage",
|
|
32
|
+
tags: ["supabase", "usage"],
|
|
33
|
+
body: `## Usage
|
|
34
|
+
1) Register integration specs from \`createDefaultIntegrationSpecRegistry()\`.
|
|
35
|
+
2) Persist both sample connections from \`connection.sample.ts\`.
|
|
36
|
+
3) Publish the tenant config from \`tenant.ts\` with matching \`connectionId\` values.
|
|
37
|
+
4) Use \`runSupabaseKnowledgeRuntime(...)\` to execute vector and SQL calls through \`IntegrationProviderFactory\`.
|
|
38
|
+
|
|
39
|
+
## Secret payload
|
|
40
|
+
Store the following payload in your secret provider target for each connection:
|
|
41
|
+
|
|
42
|
+
\`\`\`json
|
|
43
|
+
{
|
|
44
|
+
"databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
|
|
45
|
+
}
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
## Guardrails
|
|
49
|
+
- Never place credentials in \`config\` or source control.
|
|
50
|
+
- Keep operational SQL behind explicit workflows/operations.
|
|
51
|
+
- Restrict DB credentials to least-privilege roles whenever possible.`
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
registerDocBlocks(blocks);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/docs/integration-supabase.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var blocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.integration-supabase",
|
|
6
|
+
title: "Integration Example - Supabase Vector + Postgres",
|
|
7
|
+
summary: "Reference example wiring Supabase vector and SQL integrations in one tenant configuration.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/integration-supabase",
|
|
11
|
+
tags: ["supabase", "vector-db", "database", "integration", "example"],
|
|
12
|
+
body: `## What this example includes
|
|
13
|
+
- A blueprint declaring two required integration slots:
|
|
14
|
+
- \`primary-vector-db\` bound to \`vectordb.supabase\`
|
|
15
|
+
- \`primary-database\` bound to \`database.supabase\`
|
|
16
|
+
- A tenant config binding both slots.
|
|
17
|
+
- Connection samples with clear \`config\` vs \`secretRef\` separation.
|
|
18
|
+
- A runtime sample that upserts/searches vectors and executes SQL queries.
|
|
19
|
+
|
|
20
|
+
## Why this pattern
|
|
21
|
+
- Keeps integration concerns explicit and auditable in app-config.
|
|
22
|
+
- Enables shared Supabase infrastructure for retrieval + analytics.
|
|
23
|
+
- Preserves secret management boundaries (no credentials in config/spec).`
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "docs.examples.integration-supabase.usage",
|
|
27
|
+
title: "Supabase Integration Example - Usage",
|
|
28
|
+
summary: "Step-by-step usage of the Supabase dual-store integration example.",
|
|
29
|
+
kind: "usage",
|
|
30
|
+
visibility: "public",
|
|
31
|
+
route: "/docs/examples/integration-supabase/usage",
|
|
32
|
+
tags: ["supabase", "usage"],
|
|
33
|
+
body: `## Usage
|
|
34
|
+
1) Register integration specs from \`createDefaultIntegrationSpecRegistry()\`.
|
|
35
|
+
2) Persist both sample connections from \`connection.sample.ts\`.
|
|
36
|
+
3) Publish the tenant config from \`tenant.ts\` with matching \`connectionId\` values.
|
|
37
|
+
4) Use \`runSupabaseKnowledgeRuntime(...)\` to execute vector and SQL calls through \`IntegrationProviderFactory\`.
|
|
38
|
+
|
|
39
|
+
## Secret payload
|
|
40
|
+
Store the following payload in your secret provider target for each connection:
|
|
41
|
+
|
|
42
|
+
\`\`\`json
|
|
43
|
+
{
|
|
44
|
+
"databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
|
|
45
|
+
}
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
## Guardrails
|
|
49
|
+
- Never place credentials in \`config\` or source control.
|
|
50
|
+
- Keep operational SQL behind explicit workflows/operations.
|
|
51
|
+
- Restrict DB credentials to least-privilege roles whenever possible.`
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
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: "integration-supabase",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Integration - Supabase Vector + Postgres",
|
|
8
|
+
description: "Wire AppBlueprint and TenantAppConfig to use Supabase for both vector retrieval and SQL workloads.",
|
|
9
|
+
kind: "integration",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
stability: "experimental",
|
|
12
|
+
owners: ["@platform.core"],
|
|
13
|
+
tags: ["supabase", "pgvector", "postgres", "integration", "knowledge"]
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
rootDocId: "docs.examples.integration-supabase",
|
|
17
|
+
usageDocId: "docs.examples.integration-supabase.usage"
|
|
18
|
+
},
|
|
19
|
+
entrypoints: {
|
|
20
|
+
packageName: "@contractspec/example.integration-supabase",
|
|
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
|
+
};
|