Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@
"overrides": {
"graphql": "16.13.0",
"grafast": "1.0.0-rc.9",
"graphile-build": "5.0.0-rc.6",
"graphile-build-pg": "5.0.0-rc.8",
"graphile-config": "1.0.0-rc.6",
"graphile-utils": "5.0.0-rc.8",
"postgraphile": "5.0.0-rc.10",
"graphile-build": "5.0.0",
"graphile-build-pg": "5.0.1",
"graphile-config": "1.0.1",
"graphile-utils": "5.0.1",
"postgraphile": "5.0.1",
"@dataplan/json": "1.0.0-rc.6",
"@dataplan/pg": "1.0.0-rc.8",
"pg-sql2": "5.0.0-rc.5",
"tamedevil": "0.1.0-rc.6"
}
},
"devDependencies": {
"@constructive-io/graphql-codegen": "4.30.0",
"@constructive-io/graphql-codegen": "4.30.1",
"@types/jest": "^30.0.0",
"@types/node": "^25.0.3",
"@typescript-eslint/eslint-plugin": "^8.58.0",
Expand All @@ -53,12 +53,12 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.3.0",
"graphile-test": "^4.7.6",
"graphile-test": "^4.9.0",
"graphql": "16.13.0",
"jest": "^30.2.0",
"lerna": "^9.0.3",
"makage": "0.3.0",
"pgsql-test": "^4.7.6",
"pgsql-test": "^4.9.0",
"prettier": "^3.7.4",
"ts-jest": "^29.4.6",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/agentic-db-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@pgpm/services": "^0.20.2"
},
"devDependencies": {
"pgsql-test": "^4.7.6"
"pgsql-test": "^4.9.0"
},
"gitHead": "6ee5d4d10a79a33b26fb3091bc60c51bac0ee78d"
}
6 changes: 3 additions & 3 deletions packages/agentic-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"devDependencies": {
"@agentic-db/sdk": "workspace:*",
"@agentic-kit/ollama": "^1.0.3",
"@constructive-io/graphql-test": "^4.9.10",
"graphile-settings": "4.21.0",
"pgsql-test": "^4.7.6"
"@constructive-io/graphql-test": "^4.11.1",
"graphile-settings": "4.21.1",
"pgsql-test": "^4.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/cli-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@agentic-db/sdk": "workspace:*",
"graphql-server-test": "^2.10.6",
"pgsql-test": "^4.7.6"
"pgsql-test": "^4.9.0"
}
}
12 changes: 6 additions & 6 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"devDependencies": {
"@0no-co/graphql.web": "^1.2.0",
"@agentic-kit/ollama": "^1.0.3",
"@constructive-io/graphql-codegen": "4.30.0",
"@constructive-io/graphql-query": "3.12.11",
"@constructive-io/graphql-types": "3.4.3",
"@constructive-io/graphql-codegen": "4.30.1",
"@constructive-io/graphql-query": "3.14.1",
"@constructive-io/graphql-types": "3.5.0",
"@types/pg": "^8.16.0",
"gql-ast": "3.4.2",
"graphile-settings": "4.18.5",
"graphile-test": "^4.7.6",
"graphile-settings": "4.21.1",
"graphile-test": "^4.9.0",
"graphql": "16.13.0",
"pgsql-test": "^4.7.6",
"pgsql-test": "^4.9.0",
"typescript": "^5.9.3"
}
}
2 changes: 1 addition & 1 deletion packages/provision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"provision": "tsx src/provision.ts"
},
"dependencies": {
"@constructive-io/node": "^0.10.1",
"@constructive-io/node": "^0.10.2",
"dotenv": "^16.4.5",
"node-type-registry": "^0.16.0",
"pg": "^8.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/rag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@agentic-db/sdk": "workspace:*",
"@agentic-kit/anthropic": "^1.0.3",
"@agentic-kit/ollama": "^1.0.3",
"@constructive-io/node": "^0.10.0",
"@constructive-io/node": "^0.10.2",
"agentic-kit": "^1.0.3",
"dotenv": "^16.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@agentic-db/sdk": "workspace:*",
"@agentic-kit/ollama": "^1.0.3",
"@constructive-io/node": "^0.10.1",
"@constructive-io/node": "^0.10.2",
"agentic-kit": "^1.0.3",
"dotenv": "^17.3.1",
"graphile-worker": "^0.16.6"
Expand Down
18,017 changes: 6,129 additions & 11,888 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions sdk/cli/generated/cli/embedder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ function buildEmbedder(config: EmbedderConfig): EmbedderFunction | null {
* @param embedder - The resolved embedder function
* @returns The modified where clause
*/
export async function autoEmbedWhere(
where: Record<string, unknown>,
export async function autoEmbedWhere<T extends object>(
where: T,
vectorFieldNames: string[],
embedder: EmbedderFunction
): Promise<Record<string, unknown>> {
): Promise<T> {
const rec = where as unknown as Record<string, unknown>;
for (const fieldName of vectorFieldNames) {
const fieldValue = where[fieldName];
const fieldValue = rec[fieldName];
if (fieldValue && typeof fieldValue === 'object') {
const input = fieldValue as Record<string, unknown>;
// If 'vector' is a string, embed it
Expand All @@ -116,7 +117,7 @@ export async function autoEmbedWhere(
// Shorthand: --where.vectorEmbedding "text" with --auto-embed
// becomes { vector: [embedded], metric: 'COSINE' }
const embedding = await embedder(fieldValue);
where[fieldName] = { vector: embedding };
rec[fieldName] = { vector: embedding };
}
}
return where;
Expand All @@ -141,17 +142,18 @@ export async function autoEmbedWhere(
* @param embedder - The resolved embedder function
* @returns The modified data object with text values replaced by vectors
*/
export async function autoEmbedInput(
data: Record<string, unknown>,
export async function autoEmbedInput<T extends object>(
data: T,
vectorFieldNames: string[],
embedder: EmbedderFunction
): Promise<Record<string, unknown>> {
): Promise<T> {
const rec = data as unknown as Record<string, unknown>;
for (const fieldName of vectorFieldNames) {
const fieldValue = data[fieldName];
const fieldValue = rec[fieldName];
if (typeof fieldValue === 'string') {
// Text string → embed to vector array
const embedding = await embedder(fieldValue);
data[fieldName] = embedding;
rec[fieldName] = embedding;
}
// If it's already an array (pre-computed vector), leave it as-is
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@0no-co/graphql.web": "^1.2.0",
"@agentic-kit/ollama": "^1.0.3",
"@constructive-io/graphql-types": "^3.4.3",
"@constructive-io/graphql-types": "^3.5.0",
"appstash": "^0.7.0",
"gql-ast": "^3.4.2",
"graphql": "16.13.0",
Expand All @@ -33,7 +33,7 @@
},
"devDependencies": {
"@agentic-db/schemas": "workspace:*",
"@constructive-io/graphql-codegen": "^4.30.0",
"@constructive-io/graphql-codegen": "^4.30.1",
"@types/node": "^22.0.0",
"dotenv": "^16.4.5",
"makage": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"export": "tsx scripts/export.ts"
},
"devDependencies": {
"@constructive-io/graphql-codegen": "^4.30.0",
"@constructive-io/graphql-codegen": "^4.30.1",
"dotenv": "^16.4.5",
"tsx": "^4.19.0"
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"dependencies": {
"@0no-co/graphql.web": "^1.2.0",
"@constructive-io/graphql-types": "3.4.3",
"@constructive-io/graphql-types": "3.5.0",
"gql-ast": "^3.4.2",
"graphql": "16.13.0"
},
"devDependencies": {
"@agentic-db/schemas": "workspace:*",
"@constructive-io/graphql-codegen": "^4.30.0",
"@constructive-io/graphql-codegen": "^4.30.1",
"@types/node": "^22.0.0",
"dotenv": "^16.4.5",
"makage": "0.3.0",
Expand Down
Loading