Skip to content
Open
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
3,090 changes: 1,635 additions & 1,455 deletions genkit-tools/pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions js/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,21 @@
"@types/node": "^20.11.19",
"colorette": "^2.0.20",
"dotprompt": "^1.1.1",
"handlebars": "^4.7.8",
"json5": "^2.2.3",
"node-fetch": "^3.3.2",
"partial-json": "^0.1.7",
"uri-templates": "^0.2.0",
"uuid": "^10.0.0"
},
"devDependencies": {
"@types/uuid": "^9.0.6",
"@types/uri-templates": "^0.1.34",
"@types/uuid": "^9.0.6",
"npm-run-all": "^4.1.5",
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0",
"typescript": "^5.9.3",
"yaml": "^2.7.0"
},
"types": "lib/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions js/ai/src/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { toJsonSchema } from '@genkit-ai/core/schema';
import { SPAN_TYPE_ATTR, runInNewSpan } from '@genkit-ai/core/tracing';
import { Message as DpMessage, PromptFunction } from 'dotprompt';
import { existsSync, readFileSync, readdirSync } from 'fs';
import type Handlebars from 'handlebars';
import { basename, join, resolve } from 'path';
import type { DocumentData } from './document.js';
import {
Expand Down
3 changes: 1 addition & 2 deletions js/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-async-hooks": "~1.25.0",
"@opentelemetry/core": "~1.25.0",
"@opentelemetry/exporter-jaeger": "^1.25.0",
"@opentelemetry/sdk-metrics": "~1.25.0",
"@opentelemetry/sdk-node": "^0.52.0",
"@opentelemetry/sdk-trace-base": "~1.25.0",
Expand All @@ -53,7 +52,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"optionalDependencies": {
"@cfworker/json-schema": "^4.1.1",
Expand Down
2 changes: 1 addition & 1 deletion js/doc-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"@types/data-urls": "^3.0.4",
"npm-run-all": "^4.1.5",
"rimraf": "^6.0.1",
"typescript": "^5.6.3"
"typescript": "^5.9.3"
}
}
2 changes: 1 addition & 1 deletion js/genkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"files": [
"genkit-ui",
Expand Down
10 changes: 5 additions & 5 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"npm-run-all": "^4.1.5",
"only-allow": "^1.2.1",
"tsx": "^4.20.3",
"typedoc": "^0.27.9",
"typedoc-github-theme": "^0.2.1",
"typedoc-plugin-markdown": "^4.6.4",
"typedoc-plugin-zod": "^1.4.2",
"typescript": "^4.9.5"
"typedoc": "^0.28.17",
"typedoc-github-theme": "^0.4.0",
"typedoc-plugin-markdown": "^4.10.0",
"typedoc-plugin-zod": "^1.4.3",
"typescript": "^5.9.3"
},
"pnpm": {
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/anthropic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/checks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.0.2",
"tsx": "^4.7.0",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/chroma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
3 changes: 1 addition & 2 deletions js/plugins/cloud-sql-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/dotenv": "^8.2.3",
"@types/node": "^20.11.16",
"@types/uuid": "^10.0.0",
"dotenv": "^16.4.5",
Expand All @@ -53,7 +52,7 @@
"ts-jest": "^29.1.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/compat-oai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"npm-run-all": "^4.1.5",
"ts-jest": "^29.1.2",
"tsup": "^8.0.2",
"typescript": "^5.4.5"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/dev-local-vectorstore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/evaluators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ts-jest": "^29.1.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/google-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ts-jest": "^29.1.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/google-genai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"sinon": "^21.0.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
10 changes: 7 additions & 3 deletions js/plugins/google-genai/src/common/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ function toGeminiSchemaProperty(property?: ToolDefinition['inputSchema']) {
}
if (propertyType === 'object') {
const nestedProperties = {};
Object.keys(property.properties).forEach((key) => {
nestedProperties[key] = toGeminiSchemaProperty(property.properties[key]);
});
if (property.properties) {
Object.keys(property.properties).forEach((key) => {
nestedProperties[key] = toGeminiSchemaProperty(
property.properties[key]
);
});
}
return {
...baseSchema,
type: SchemaType.OBJECT,
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/googleai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^4.9.0"
"typescript": "^5.9.3"
},
"types": "./lib/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"ts-jest": "^29.1.2",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.3.0"
"typescript": "^5.9.3"
}
}
2 changes: 1 addition & 1 deletion js/plugins/mcp/src/util/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function fromMcpPart(part: PromptMessage['content']): Part {
case 'resource':
return {
resource: {
uri: part.uri as string,
uri: part.resource.uri,
},
};
default:
Expand Down
6 changes: 3 additions & 3 deletions js/plugins/mcp/src/util/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ type ArrayElement<ArrayType extends readonly unknown[]> =
function fromMcpResourcePart(
part: ArrayElement<ReadResourceResult['contents']>
): Part {
if (part.text) {
if ('text' in part && part.text) {
return { text: part.text as string, metadata: part._meta };
}
if (part.blob) {
if ('blob' in part && part.blob) {
return {
media: {
contentType: part.mimeType,
Expand All @@ -104,7 +104,7 @@ function fromMcpResourcePart(
}
throw new GenkitError({
status: 'UNIMPLEMENTED',
message: `Part type ${part.type} is not currently supported.`,
message: `Part type ${'type' in part ? part.type : 'unknown'} is not currently supported.`,
});
}

Expand Down
4 changes: 2 additions & 2 deletions js/plugins/mcp/src/util/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import { JSONSchema7, z, type Genkit, type ToolAction } from 'genkit';
import { logger } from 'genkit/logging';

const toText = (c: CallToolResult['content']) =>
c.map((p) => p.text || '').join('');
c.map((p) => (p.type === 'text' ? p.text : '')).join('');

function processResult(result: CallToolResult) {
if (result.isError) return { error: toText(result.content) };
if (result.content.every((c) => !!c.text)) {
if (result.content.every((c) => c.type === 'text' && !!c.text)) {
const text = toText(result.content);
if (text.trim().startsWith('{') || text.trim().startsWith('[')) {
try {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"ts-jest": "^29.1.2",
"tsup": "^8.0.2",
"tsx": "^4.7.0",
"typescript": "^4.9.0",
"typescript": "^5.9.3",
"zod": "^3.24.1"
},
"types": "./lib/index.d.ts",
Expand Down
Loading
Loading