@contractspec/example.integration-supabase 1.57.0 → 1.59.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 +40 -39
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +27 -0
  4. package/dist/blueprint.d.ts +2 -6
  5. package/dist/blueprint.d.ts.map +1 -1
  6. package/dist/blueprint.js +67 -74
  7. package/dist/browser/blueprint.js +67 -0
  8. package/dist/browser/connection.sample.js +54 -0
  9. package/dist/browser/docs/index.js +54 -0
  10. package/dist/browser/docs/integration-supabase.docblock.js +54 -0
  11. package/dist/browser/example.js +33 -0
  12. package/dist/browser/index.js +278 -0
  13. package/dist/browser/runtime.sample.js +32 -0
  14. package/dist/browser/tenant.js +42 -0
  15. package/dist/connection.sample.d.ts +4 -8
  16. package/dist/connection.sample.d.ts.map +1 -1
  17. package/dist/connection.sample.js +53 -48
  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 +55 -1
  21. package/dist/docs/integration-supabase.docblock.d.ts +2 -1
  22. package/dist/docs/integration-supabase.docblock.d.ts.map +1 -0
  23. package/dist/docs/integration-supabase.docblock.js +25 -30
  24. package/dist/example.d.ts +2 -6
  25. package/dist/example.d.ts.map +1 -1
  26. package/dist/example.js +32 -44
  27. package/dist/index.d.ts +7 -6
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +279 -8
  30. package/dist/node/blueprint.js +67 -0
  31. package/dist/node/connection.sample.js +54 -0
  32. package/dist/node/docs/index.js +54 -0
  33. package/dist/node/docs/integration-supabase.docblock.js +54 -0
  34. package/dist/node/example.js +33 -0
  35. package/dist/node/index.js +278 -0
  36. package/dist/node/runtime.sample.js +32 -0
  37. package/dist/node/tenant.js +42 -0
  38. package/dist/runtime.sample.d.ts +9 -13
  39. package/dist/runtime.sample.d.ts.map +1 -1
  40. package/dist/runtime.sample.js +30 -40
  41. package/dist/tenant.d.ts +2 -6
  42. package/dist/tenant.d.ts.map +1 -1
  43. package/dist/tenant.js +42 -39
  44. package/package.json +86 -31
  45. package/tsdown.config.js +1 -2
  46. package/.turbo/turbo-build$colon$bundle.log +0 -42
  47. package/dist/blueprint.js.map +0 -1
  48. package/dist/connection.sample.js.map +0 -1
  49. package/dist/docs/integration-supabase.docblock.js.map +0 -1
  50. package/dist/example.js.map +0 -1
  51. package/dist/runtime.sample.js.map +0 -1
  52. package/dist/tenant.js.map +0 -1
  53. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,278 @@
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
+
66
+ // src/connection.sample.ts
67
+ var supabaseVectorConnection = {
68
+ meta: {
69
+ id: "conn-supabase-vector",
70
+ tenantId: "acme-knowledge",
71
+ integrationKey: "vectordb.supabase",
72
+ integrationVersion: "1.0.0",
73
+ label: "Supabase Vector Store",
74
+ environment: "production",
75
+ createdAt: "2026-02-06T00:00:00.000Z",
76
+ updatedAt: "2026-02-06T00:00:00.000Z"
77
+ },
78
+ ownershipMode: "managed",
79
+ config: {
80
+ schema: "public",
81
+ table: "contractspec_vectors",
82
+ createTableIfMissing: true,
83
+ distanceMetric: "cosine",
84
+ maxConnections: 5,
85
+ sslMode: "require"
86
+ },
87
+ secretProvider: "vault",
88
+ secretRef: "vault://integrations/acme-knowledge/conn-supabase-vector",
89
+ status: "connected"
90
+ };
91
+ var supabaseDatabaseConnection = {
92
+ meta: {
93
+ id: "conn-supabase-db",
94
+ tenantId: "acme-knowledge",
95
+ integrationKey: "database.supabase",
96
+ integrationVersion: "1.0.0",
97
+ label: "Supabase Postgres",
98
+ environment: "production",
99
+ createdAt: "2026-02-06T00:00:00.000Z",
100
+ updatedAt: "2026-02-06T00:00:00.000Z"
101
+ },
102
+ ownershipMode: "managed",
103
+ config: {
104
+ maxConnections: 10,
105
+ sslMode: "require"
106
+ },
107
+ secretProvider: "vault",
108
+ secretRef: "vault://integrations/acme-knowledge/conn-supabase-db",
109
+ status: "connected"
110
+ };
111
+ var supabaseConnectionSamples = [
112
+ supabaseVectorConnection,
113
+ supabaseDatabaseConnection
114
+ ];
115
+
116
+ // src/docs/integration-supabase.docblock.ts
117
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
118
+ var blocks = [
119
+ {
120
+ id: "docs.examples.integration-supabase",
121
+ title: "Integration Example - Supabase Vector + Postgres",
122
+ summary: "Reference example wiring Supabase vector and SQL integrations in one tenant configuration.",
123
+ kind: "reference",
124
+ visibility: "public",
125
+ route: "/docs/examples/integration-supabase",
126
+ tags: ["supabase", "vector-db", "database", "integration", "example"],
127
+ body: `## What this example includes
128
+ - A blueprint declaring two required integration slots:
129
+ - \`primary-vector-db\` bound to \`vectordb.supabase\`
130
+ - \`primary-database\` bound to \`database.supabase\`
131
+ - A tenant config binding both slots.
132
+ - Connection samples with clear \`config\` vs \`secretRef\` separation.
133
+ - A runtime sample that upserts/searches vectors and executes SQL queries.
134
+
135
+ ## Why this pattern
136
+ - Keeps integration concerns explicit and auditable in app-config.
137
+ - Enables shared Supabase infrastructure for retrieval + analytics.
138
+ - Preserves secret management boundaries (no credentials in config/spec).`
139
+ },
140
+ {
141
+ id: "docs.examples.integration-supabase.usage",
142
+ title: "Supabase Integration Example - Usage",
143
+ summary: "Step-by-step usage of the Supabase dual-store integration example.",
144
+ kind: "usage",
145
+ visibility: "public",
146
+ route: "/docs/examples/integration-supabase/usage",
147
+ tags: ["supabase", "usage"],
148
+ body: `## Usage
149
+ 1) Register integration specs from \`createDefaultIntegrationSpecRegistry()\`.
150
+ 2) Persist both sample connections from \`connection.sample.ts\`.
151
+ 3) Publish the tenant config from \`tenant.ts\` with matching \`connectionId\` values.
152
+ 4) Use \`runSupabaseKnowledgeRuntime(...)\` to execute vector and SQL calls through \`IntegrationProviderFactory\`.
153
+
154
+ ## Secret payload
155
+ Store the following payload in your secret provider target for each connection:
156
+
157
+ \`\`\`json
158
+ {
159
+ "databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
160
+ }
161
+ \`\`\`
162
+
163
+ ## Guardrails
164
+ - Never place credentials in \`config\` or source control.
165
+ - Keep operational SQL behind explicit workflows/operations.
166
+ - Restrict DB credentials to least-privilege roles whenever possible.`
167
+ }
168
+ ];
169
+ registerDocBlocks(blocks);
170
+ // src/example.ts
171
+ import { defineExample } from "@contractspec/lib.contracts";
172
+ var example = defineExample({
173
+ meta: {
174
+ key: "integration-supabase",
175
+ version: "1.0.0",
176
+ title: "Integration - Supabase Vector + Postgres",
177
+ description: "Wire AppBlueprint and TenantAppConfig to use Supabase for both vector retrieval and SQL workloads.",
178
+ kind: "integration",
179
+ visibility: "public",
180
+ stability: "experimental",
181
+ owners: ["@platform.core"],
182
+ tags: ["supabase", "pgvector", "postgres", "integration", "knowledge"]
183
+ },
184
+ docs: {
185
+ rootDocId: "docs.examples.integration-supabase",
186
+ usageDocId: "docs.examples.integration-supabase.usage"
187
+ },
188
+ entrypoints: {
189
+ packageName: "@contractspec/example.integration-supabase",
190
+ docs: "./docs"
191
+ },
192
+ surfaces: {
193
+ templates: true,
194
+ sandbox: { enabled: true, modes: ["markdown", "specs"] },
195
+ studio: { enabled: true, installable: true },
196
+ mcp: { enabled: true }
197
+ }
198
+ });
199
+ var example_default = example;
200
+
201
+ // src/tenant.ts
202
+ var supabaseKnowledgeTenantConfig = {
203
+ meta: {
204
+ id: "tenant-config-knowledge-supabase",
205
+ tenantId: "acme-knowledge",
206
+ appId: "knowledge-assistant",
207
+ blueprintName: "knowledge.supabase.dual-store",
208
+ blueprintVersion: "1.0.0",
209
+ environment: "production",
210
+ version: "1.0.0",
211
+ status: "published",
212
+ createdAt: new Date().toISOString(),
213
+ updatedAt: new Date().toISOString()
214
+ },
215
+ integrations: [
216
+ {
217
+ slotId: "primary-vector-db",
218
+ connectionId: "conn-supabase-vector",
219
+ scope: {
220
+ workflows: ["ingestKnowledge"],
221
+ operations: ["knowledge.indexChunks", "knowledge.semanticSearch"]
222
+ }
223
+ },
224
+ {
225
+ slotId: "primary-database",
226
+ connectionId: "conn-supabase-db",
227
+ scope: {
228
+ workflows: ["refreshMetrics"],
229
+ operations: ["knowledge.metrics.refresh", "knowledge.metrics.query"]
230
+ }
231
+ }
232
+ ],
233
+ knowledge: [],
234
+ locales: {
235
+ defaultLocale: "en",
236
+ enabledLocales: ["en"]
237
+ },
238
+ notes: "Supabase vector + SQL connections bound for production knowledge flows."
239
+ };
240
+
241
+ // src/runtime.sample.ts
242
+ import { IntegrationProviderFactory } from "@contractspec/integration.providers-impls/impls/provider-factory";
243
+ async function runSupabaseKnowledgeRuntime(params) {
244
+ const factory = new IntegrationProviderFactory;
245
+ const vectorStore = await factory.createVectorStoreProvider(params.vectorContext);
246
+ const database = await factory.createDatabaseProvider(params.databaseContext);
247
+ await vectorStore.upsert({
248
+ collection: "knowledge_chunks",
249
+ documents: [
250
+ {
251
+ id: "chunk-1",
252
+ vector: [0.11, 0.23, 0.45],
253
+ payload: { source: "faq", locale: "en" }
254
+ }
255
+ ]
256
+ });
257
+ const matches = await vectorStore.search({
258
+ collection: "knowledge_chunks",
259
+ vector: [0.12, 0.22, 0.44],
260
+ topK: 5,
261
+ filter: { source: "faq" }
262
+ });
263
+ const count = await database.query("SELECT COUNT(*)::int AS total FROM knowledge_chunks;");
264
+ await database.close();
265
+ return {
266
+ matches,
267
+ indexedDocumentCount: count.rows[0]?.total ?? 0
268
+ };
269
+ }
270
+ export {
271
+ supabaseVectorConnection,
272
+ supabaseKnowledgeTenantConfig,
273
+ supabaseKnowledgeBlueprint,
274
+ supabaseDatabaseConnection,
275
+ supabaseConnectionSamples,
276
+ runSupabaseKnowledgeRuntime,
277
+ example_default as example
278
+ };
@@ -0,0 +1,32 @@
1
+ // src/runtime.sample.ts
2
+ import { IntegrationProviderFactory } from "@contractspec/integration.providers-impls/impls/provider-factory";
3
+ async function runSupabaseKnowledgeRuntime(params) {
4
+ const factory = new IntegrationProviderFactory;
5
+ const vectorStore = await factory.createVectorStoreProvider(params.vectorContext);
6
+ const database = await factory.createDatabaseProvider(params.databaseContext);
7
+ await vectorStore.upsert({
8
+ collection: "knowledge_chunks",
9
+ documents: [
10
+ {
11
+ id: "chunk-1",
12
+ vector: [0.11, 0.23, 0.45],
13
+ payload: { source: "faq", locale: "en" }
14
+ }
15
+ ]
16
+ });
17
+ const matches = await vectorStore.search({
18
+ collection: "knowledge_chunks",
19
+ vector: [0.12, 0.22, 0.44],
20
+ topK: 5,
21
+ filter: { source: "faq" }
22
+ });
23
+ const count = await database.query("SELECT COUNT(*)::int AS total FROM knowledge_chunks;");
24
+ await database.close();
25
+ return {
26
+ matches,
27
+ indexedDocumentCount: count.rows[0]?.total ?? 0
28
+ };
29
+ }
30
+ export {
31
+ runSupabaseKnowledgeRuntime
32
+ };
@@ -0,0 +1,42 @@
1
+ // src/tenant.ts
2
+ var supabaseKnowledgeTenantConfig = {
3
+ meta: {
4
+ id: "tenant-config-knowledge-supabase",
5
+ tenantId: "acme-knowledge",
6
+ appId: "knowledge-assistant",
7
+ blueprintName: "knowledge.supabase.dual-store",
8
+ blueprintVersion: "1.0.0",
9
+ environment: "production",
10
+ version: "1.0.0",
11
+ status: "published",
12
+ createdAt: new Date().toISOString(),
13
+ updatedAt: new Date().toISOString()
14
+ },
15
+ integrations: [
16
+ {
17
+ slotId: "primary-vector-db",
18
+ connectionId: "conn-supabase-vector",
19
+ scope: {
20
+ workflows: ["ingestKnowledge"],
21
+ operations: ["knowledge.indexChunks", "knowledge.semanticSearch"]
22
+ }
23
+ },
24
+ {
25
+ slotId: "primary-database",
26
+ connectionId: "conn-supabase-db",
27
+ scope: {
28
+ workflows: ["refreshMetrics"],
29
+ operations: ["knowledge.metrics.refresh", "knowledge.metrics.query"]
30
+ }
31
+ }
32
+ ],
33
+ knowledge: [],
34
+ locales: {
35
+ defaultLocale: "en",
36
+ enabledLocales: ["en"]
37
+ },
38
+ notes: "Supabase vector + SQL connections bound for production knowledge flows."
39
+ };
40
+ export {
41
+ supabaseKnowledgeTenantConfig
42
+ };
@@ -1,9 +1,5 @@
1
- import { IntegrationConnection } from "@contractspec/lib.contracts/integrations/connection";
2
-
3
- //#region src/connection.sample.d.ts
4
- declare const supabaseVectorConnection: IntegrationConnection;
5
- declare const supabaseDatabaseConnection: IntegrationConnection;
6
- declare const supabaseConnectionSamples: IntegrationConnection[];
7
- //#endregion
8
- export { supabaseConnectionSamples, supabaseDatabaseConnection, supabaseVectorConnection };
1
+ import type { IntegrationConnection } from '@contractspec/lib.contracts/integrations/connection';
2
+ export declare const supabaseVectorConnection: IntegrationConnection;
3
+ export declare const supabaseDatabaseConnection: IntegrationConnection;
4
+ export declare const supabaseConnectionSamples: IntegrationConnection[];
9
5
  //# sourceMappingURL=connection.sample.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.sample.d.ts","names":[],"sources":["../src/connection.sample.ts"],"mappings":";;;cAEa,wBAAA,EAA0B,qBAAA;AAAA,cAyB1B,0BAAA,EAA4B,qBAAA;AAAA,cAqB5B,yBAAA,EAA2B,qBAAA"}
1
+ {"version":3,"file":"connection.sample.d.ts","sourceRoot":"","sources":["../src/connection.sample.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAEjG,eAAO,MAAM,wBAAwB,EAAE,qBAuBtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,qBAmBxC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,qBAAqB,EAG5D,CAAC"}
@@ -1,50 +1,55 @@
1
- //#region src/connection.sample.ts
2
- const 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"
1
+ // @bun
2
+ // src/connection.sample.ts
3
+ var supabaseVectorConnection = {
4
+ meta: {
5
+ id: "conn-supabase-vector",
6
+ tenantId: "acme-knowledge",
7
+ integrationKey: "vectordb.supabase",
8
+ integrationVersion: "1.0.0",
9
+ label: "Supabase Vector Store",
10
+ environment: "production",
11
+ createdAt: "2026-02-06T00:00:00.000Z",
12
+ updatedAt: "2026-02-06T00:00:00.000Z"
13
+ },
14
+ ownershipMode: "managed",
15
+ config: {
16
+ schema: "public",
17
+ table: "contractspec_vectors",
18
+ createTableIfMissing: true,
19
+ distanceMetric: "cosine",
20
+ maxConnections: 5,
21
+ sslMode: "require"
22
+ },
23
+ secretProvider: "vault",
24
+ secretRef: "vault://integrations/acme-knowledge/conn-supabase-vector",
25
+ status: "connected"
25
26
  };
26
- const 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"
27
+ var supabaseDatabaseConnection = {
28
+ meta: {
29
+ id: "conn-supabase-db",
30
+ tenantId: "acme-knowledge",
31
+ integrationKey: "database.supabase",
32
+ integrationVersion: "1.0.0",
33
+ label: "Supabase Postgres",
34
+ environment: "production",
35
+ createdAt: "2026-02-06T00:00:00.000Z",
36
+ updatedAt: "2026-02-06T00:00:00.000Z"
37
+ },
38
+ ownershipMode: "managed",
39
+ config: {
40
+ maxConnections: 10,
41
+ sslMode: "require"
42
+ },
43
+ secretProvider: "vault",
44
+ secretRef: "vault://integrations/acme-knowledge/conn-supabase-db",
45
+ status: "connected"
46
+ };
47
+ var supabaseConnectionSamples = [
48
+ supabaseVectorConnection,
49
+ supabaseDatabaseConnection
50
+ ];
51
+ export {
52
+ supabaseVectorConnection,
53
+ supabaseDatabaseConnection,
54
+ supabaseConnectionSamples
45
55
  };
46
- const supabaseConnectionSamples = [supabaseVectorConnection, supabaseDatabaseConnection];
47
-
48
- //#endregion
49
- export { supabaseConnectionSamples, supabaseDatabaseConnection, supabaseVectorConnection };
50
- //# sourceMappingURL=connection.sample.js.map
@@ -1 +1,2 @@
1
- export { };
1
+ import './integration-supabase.docblock';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
@@ -1 +1,55 @@
1
- import "./integration-supabase.docblock.js";
1
+ // @bun
2
+ // src/docs/integration-supabase.docblock.ts
3
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
4
+ var blocks = [
5
+ {
6
+ id: "docs.examples.integration-supabase",
7
+ title: "Integration Example - Supabase Vector + Postgres",
8
+ summary: "Reference example wiring Supabase vector and SQL integrations in one tenant configuration.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/examples/integration-supabase",
12
+ tags: ["supabase", "vector-db", "database", "integration", "example"],
13
+ body: `## What this example includes
14
+ - A blueprint declaring two required integration slots:
15
+ - \`primary-vector-db\` bound to \`vectordb.supabase\`
16
+ - \`primary-database\` bound to \`database.supabase\`
17
+ - A tenant config binding both slots.
18
+ - Connection samples with clear \`config\` vs \`secretRef\` separation.
19
+ - A runtime sample that upserts/searches vectors and executes SQL queries.
20
+
21
+ ## Why this pattern
22
+ - Keeps integration concerns explicit and auditable in app-config.
23
+ - Enables shared Supabase infrastructure for retrieval + analytics.
24
+ - Preserves secret management boundaries (no credentials in config/spec).`
25
+ },
26
+ {
27
+ id: "docs.examples.integration-supabase.usage",
28
+ title: "Supabase Integration Example - Usage",
29
+ summary: "Step-by-step usage of the Supabase dual-store integration example.",
30
+ kind: "usage",
31
+ visibility: "public",
32
+ route: "/docs/examples/integration-supabase/usage",
33
+ tags: ["supabase", "usage"],
34
+ body: `## Usage
35
+ 1) Register integration specs from \`createDefaultIntegrationSpecRegistry()\`.
36
+ 2) Persist both sample connections from \`connection.sample.ts\`.
37
+ 3) Publish the tenant config from \`tenant.ts\` with matching \`connectionId\` values.
38
+ 4) Use \`runSupabaseKnowledgeRuntime(...)\` to execute vector and SQL calls through \`IntegrationProviderFactory\`.
39
+
40
+ ## Secret payload
41
+ Store the following payload in your secret provider target for each connection:
42
+
43
+ \`\`\`json
44
+ {
45
+ "databaseUrl": "postgresql://postgres.<project-ref>:<password>@aws-0-<region>.pooler.supabase.com:6543/postgres"
46
+ }
47
+ \`\`\`
48
+
49
+ ## Guardrails
50
+ - Never place credentials in \`config\` or source control.
51
+ - Keep operational SQL behind explicit workflows/operations.
52
+ - Restrict DB credentials to least-privilege roles whenever possible.`
53
+ }
54
+ ];
55
+ registerDocBlocks(blocks);
@@ -1 +1,2 @@
1
- export { };
1
+ export {};
2
+ //# sourceMappingURL=integration-supabase.docblock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-supabase.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/integration-supabase.docblock.ts"],"names":[],"mappings":""}
@@ -1,21 +1,16 @@
1
+ // @bun
2
+ // src/docs/integration-supabase.docblock.ts
1
3
  import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
2
-
3
- //#region src/docs/integration-supabase.docblock.ts
4
- registerDocBlocks([{
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: [
12
- "supabase",
13
- "vector-db",
14
- "database",
15
- "integration",
16
- "example"
17
- ],
18
- body: `## What this example includes
4
+ var blocks = [
5
+ {
6
+ id: "docs.examples.integration-supabase",
7
+ title: "Integration Example - Supabase Vector + Postgres",
8
+ summary: "Reference example wiring Supabase vector and SQL integrations in one tenant configuration.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/examples/integration-supabase",
12
+ tags: ["supabase", "vector-db", "database", "integration", "example"],
13
+ body: `## What this example includes
19
14
  - A blueprint declaring two required integration slots:
20
15
  - \`primary-vector-db\` bound to \`vectordb.supabase\`
21
16
  - \`primary-database\` bound to \`database.supabase\`
@@ -27,15 +22,16 @@ registerDocBlocks([{
27
22
  - Keeps integration concerns explicit and auditable in app-config.
28
23
  - Enables shared Supabase infrastructure for retrieval + analytics.
29
24
  - Preserves secret management boundaries (no credentials in config/spec).`
30
- }, {
31
- id: "docs.examples.integration-supabase.usage",
32
- title: "Supabase Integration Example - Usage",
33
- summary: "Step-by-step usage of the Supabase dual-store integration example.",
34
- kind: "usage",
35
- visibility: "public",
36
- route: "/docs/examples/integration-supabase/usage",
37
- tags: ["supabase", "usage"],
38
- body: `## Usage
25
+ },
26
+ {
27
+ id: "docs.examples.integration-supabase.usage",
28
+ title: "Supabase Integration Example - Usage",
29
+ summary: "Step-by-step usage of the Supabase dual-store integration example.",
30
+ kind: "usage",
31
+ visibility: "public",
32
+ route: "/docs/examples/integration-supabase/usage",
33
+ tags: ["supabase", "usage"],
34
+ body: `## Usage
39
35
  1) Register integration specs from \`createDefaultIntegrationSpecRegistry()\`.
40
36
  2) Persist both sample connections from \`connection.sample.ts\`.
41
37
  3) Publish the tenant config from \`tenant.ts\` with matching \`connectionId\` values.
@@ -54,7 +50,6 @@ Store the following payload in your secret provider target for each connection:
54
50
  - Never place credentials in \`config\` or source control.
55
51
  - Keep operational SQL behind explicit workflows/operations.
56
52
  - Restrict DB credentials to least-privilege roles whenever possible.`
57
- }]);
58
-
59
- //#endregion
60
- //# sourceMappingURL=integration-supabase.docblock.js.map
53
+ }
54
+ ];
55
+ registerDocBlocks(blocks);
package/dist/example.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/example.d.ts
4
- declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
- //#endregion
6
- export { example as default };
1
+ declare const example: import("@contractspec/lib.contracts").ExampleSpec;
2
+ export default example;
7
3
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"mappings":";;;cAEM,OAAA,EA2BJ,4BAAA,CA3BW,WAAA"}
1
+ {"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,mDA2BX,CAAC;AAEH,eAAe,OAAO,CAAC"}