mirror of https://github.com/buster-so/buster.git
Update dependencies to stable versions and refactor analyst agent context. Replace beta versions with specific stable versions in pnpm-lock and package.json. Adjust context handling in various files to improve clarity and maintainability. Remove unused DocsAgentContext and related schemas.
This commit is contained in:
parent
11c071ffe6
commit
6b72213992
|
@ -33,9 +33,9 @@
|
|||
"braintrust:push:staged": "npx braintrust push evals/agents/analyst-agent/metrics/staged_scorers.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/anthropic": "beta",
|
||||
"@ai-sdk/google-vertex": "beta",
|
||||
"@ai-sdk/provider": "beta",
|
||||
"@ai-sdk/anthropic": "^2.0.0",
|
||||
"@ai-sdk/google-vertex": "^3.0.0",
|
||||
"@ai-sdk/provider": "^2.0.0",
|
||||
"@buster/access-controls": "workspace:*",
|
||||
"@buster/data-source": "workspace:*",
|
||||
"@buster/database": "workspace:*",
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
import { type ModelMessage, hasToolCall, stepCountIs, streamText } from 'ai';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import z from 'zod';
|
||||
import {
|
||||
createDashboards,
|
||||
createMetrics,
|
||||
doneTool,
|
||||
modifyDashboards,
|
||||
modifyMetrics,
|
||||
} from '../../tools';
|
||||
import { createAnalystTools } from '../../tools/tool-factories';
|
||||
import { Sonnet4 } from '../../utils/models/sonnet-4';
|
||||
import { injectAgentContext } from '../helpers/context/agent-context-injection';
|
||||
import { getAnalystAgentSystemPrompt } from './get-analyst-agent-system-prompt';
|
||||
|
||||
const DEFAULT_CACHE_OPTIONS = {
|
||||
anthropic: { cacheControl: { type: 'ephemeral', ttl: '1h' } },
|
||||
};
|
||||
|
||||
const STOP_CONDITIONS = [stepCountIs(18), hasToolCall('doneTool')];
|
||||
const STOP_CONDITIONS = [stepCountIs(25), hasToolCall('doneTool')];
|
||||
|
||||
const AnalystAgentOptionsSchema = z.object({
|
||||
sql_dialect_guidance: z.string().describe('The SQL dialect guidance for the analyst agent.'),
|
||||
userId: z.string(),
|
||||
chatId: z.string(),
|
||||
dataSourceId: z.string(),
|
||||
dataSourceSyntax: z.string(),
|
||||
organizationId: z.string(),
|
||||
messageId: z.string().optional(),
|
||||
});
|
||||
|
||||
const AnalystStreamOptionsSchema = z.object({
|
||||
|
@ -27,35 +27,33 @@ const AnalystStreamOptionsSchema = z.object({
|
|||
.describe('The messages to send to the analyst agent.'),
|
||||
});
|
||||
|
||||
export type AnalystAgentOptionsSchema = z.infer<typeof AnalystAgentOptionsSchema>;
|
||||
export type AnalystAgentOptions = z.infer<typeof AnalystAgentOptionsSchema>;
|
||||
export type AnalystStreamOptions = z.infer<typeof AnalystStreamOptionsSchema>;
|
||||
|
||||
export function createAnalystAgent(analystAgentSchema: AnalystAgentOptionsSchema) {
|
||||
export function createAnalystAgent(analystAgentOptions: AnalystAgentOptions) {
|
||||
const steps: never[] = [];
|
||||
|
||||
const systemMessage = {
|
||||
role: 'system',
|
||||
content: getAnalystAgentSystemPrompt(analystAgentSchema.sql_dialect_guidance),
|
||||
content: getAnalystAgentSystemPrompt(analystAgentOptions.dataSourceSyntax),
|
||||
providerOptions: DEFAULT_CACHE_OPTIONS,
|
||||
} as ModelMessage;
|
||||
|
||||
// Create tools with session context baked in
|
||||
const tools = createAnalystTools(analystAgentOptions);
|
||||
|
||||
async function stream({ messages }: AnalystStreamOptions) {
|
||||
return wrapTraced(
|
||||
() =>
|
||||
streamText({
|
||||
model: Sonnet4,
|
||||
tools: {
|
||||
createMetrics,
|
||||
modifyMetrics,
|
||||
createDashboards,
|
||||
modifyDashboards,
|
||||
doneTool,
|
||||
},
|
||||
tools,
|
||||
messages: [systemMessage, ...messages],
|
||||
stopWhen: STOP_CONDITIONS,
|
||||
toolChoice: 'required',
|
||||
maxOutputTokens: 10000,
|
||||
temperature: 0,
|
||||
// No longer need experimental_context since it's baked into tools
|
||||
}),
|
||||
{
|
||||
name: 'Analyst Agent',
|
||||
|
|
|
@ -5,7 +5,7 @@ import * as path from 'node:path';
|
|||
* Template parameters for the analyst agent prompt
|
||||
*/
|
||||
export interface AnalystTemplateParams {
|
||||
sqlDialectGuidance: string;
|
||||
dataSourceSyntax: string;
|
||||
date: string;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ function loadAndProcessPrompt(params: AnalystTemplateParams): string {
|
|||
const content = fs.readFileSync(promptPath, 'utf-8');
|
||||
|
||||
return content
|
||||
.replace(/\{\{sql_dialect_guidance\}\}/g, params.sqlDialectGuidance)
|
||||
.replace(/\{\{sql_dialect_guidance\}\}/g, params.dataSourceSyntax)
|
||||
.replace(/\{\{date\}\}/g, params.date);
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to load prompt template: ${String(error)}`);
|
||||
|
@ -29,15 +29,15 @@ function loadAndProcessPrompt(params: AnalystTemplateParams): string {
|
|||
/**
|
||||
* Export the template function for use in step files
|
||||
*/
|
||||
export const getAnalystAgentSystemPrompt = (sqlDialectGuidance: string): string => {
|
||||
if (!sqlDialectGuidance.trim()) {
|
||||
export const getAnalystAgentSystemPrompt = (dataSourceSyntax: string): string => {
|
||||
if (!dataSourceSyntax.trim()) {
|
||||
throw new Error('SQL dialect guidance is required');
|
||||
}
|
||||
|
||||
const currentDate = new Date().toISOString();
|
||||
|
||||
return loadAndProcessPrompt({
|
||||
sqlDialectGuidance,
|
||||
dataSourceSyntax,
|
||||
date: currentDate,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Creates a context injection function for any agent prepareStep.
|
||||
* This function returns the agent options as context that can be accessed by tools.
|
||||
*/
|
||||
export function injectAgentContext<T>(agentOptions: T) {
|
||||
return async () => {
|
||||
return {
|
||||
context: agentOptions,
|
||||
};
|
||||
};
|
||||
}
|
|
@ -16,7 +16,7 @@ const DEFAULT_CACHE_OPTIONS = {
|
|||
};
|
||||
|
||||
const STOP_CONDITIONS = [
|
||||
stepCountIs(18),
|
||||
stepCountIs(25),
|
||||
hasToolCall('submitThoughts'),
|
||||
hasToolCall('respondWithoutAssetCreation'),
|
||||
hasToolCall('messageUserClarifyingQuestion'),
|
||||
|
|
|
@ -5,7 +5,7 @@ export { createThinkAndPrepAgent } from './agents/think-and-prep-agent/think-and
|
|||
// Export workflows
|
||||
export {
|
||||
default as analystWorkflow,
|
||||
type AnalystRuntimeContext,
|
||||
type AnalystAgentContext,
|
||||
} from './workflows/analyst-workflow';
|
||||
|
||||
// Export schemas
|
||||
|
|
|
@ -17,16 +17,3 @@ export const thinkAndPrepWorkflowInputSchema = z.object({
|
|||
conversationHistory: MessageHistorySchema.optional(),
|
||||
dashboardFiles: z.array(DashboardFileContextSchema).optional(),
|
||||
});
|
||||
|
||||
// Runtime context schema for type safety
|
||||
export const AnalystRuntimeContextSchema = z.object({
|
||||
userId: z.string(),
|
||||
chatId: z.string(),
|
||||
dataSourceId: z.string(),
|
||||
dataSourceSyntax: z.string(),
|
||||
organizationId: z.string(),
|
||||
messageId: z.string().optional(), // Optional for testing scenarios
|
||||
workflowStartTime: z.number().optional(), // Track workflow start time in milliseconds - optional for backward compatibility
|
||||
});
|
||||
|
||||
export type AnalystRuntimeContext = z.infer<typeof AnalystRuntimeContextSchema>;
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { Sandbox } from '@buster/sandbox';
|
|||
import { Agent, createStep } from '@mastra/core';
|
||||
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { z } from 'zod';
|
||||
import { DocsAgentContextKeys, DocsAgentContextSchema } from '../../context/docs-agent-context';
|
||||
import {
|
||||
DocsAgentContextKeys,
|
||||
DocsAgentContextSchema,
|
||||
} from '../../agents/docs-agent/docs-agent-context';
|
||||
import { createTodoList } from '../../tools/planning-thinking-tools/create-todo-item-tool';
|
||||
import { Sonnet4 } from '../../utils/models/sonnet-4';
|
||||
import { standardizeMessages } from '../../utils/standardizeMessages';
|
||||
|
|
|
@ -3,8 +3,11 @@ import { type CoreMessage, createStep } from '@mastra/core';
|
|||
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { z } from 'zod';
|
||||
import { createDocsAgent } from '../../agents/docs-agent/docs-agent';
|
||||
import { DocsAgentContextKeys, DocsAgentContextSchema } from '../../context/docs-agent-context';
|
||||
import type { MessageUserClarifyingQuestion } from '../../context/docs-agent-context';
|
||||
import {
|
||||
DocsAgentContextKeys,
|
||||
DocsAgentContextSchema,
|
||||
} from '../../agents/docs-agent/docs-agent-context';
|
||||
import type { MessageUserClarifyingQuestion } from '../../agents/docs-agent/docs-agent-context';
|
||||
import { standardizeMessages } from '../../utils/standardizeMessages';
|
||||
|
||||
const docsAgentStepInputSchema = z.object({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { Sandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../agents/docs-agent/docs-agent-context';
|
||||
import { getRepositoryTreeStep } from './get-repository-tree-step';
|
||||
|
||||
// Mock the tree helper
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { Sandbox } from '@buster/sandbox';
|
|||
import { createStep } from '@mastra/core';
|
||||
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { z } from 'zod';
|
||||
import { DocsAgentContextKeys, DocsAgentContextSchema } from '../../context/docs-agent-context';
|
||||
import {
|
||||
DocsAgentContextKeys,
|
||||
DocsAgentContextSchema,
|
||||
} from '../../agents/docs-agent/docs-agent-context';
|
||||
import { getRepositoryTree } from '../../workflows/docs-agent/helpers/tree-helper';
|
||||
|
||||
// Input schema - receives data from initialize-context step
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { Sandbox } from '@buster/sandbox';
|
|||
import { createStep } from '@mastra/core';
|
||||
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { z } from 'zod';
|
||||
import { DocsAgentContextKeys, DocsAgentContextSchema } from '../../context/docs-agent-context';
|
||||
import {
|
||||
DocsAgentContextKeys,
|
||||
DocsAgentContextSchema,
|
||||
} from '../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
// Input schema matches the workflow input schema
|
||||
const initializeContextStepInputSchema = z.object({
|
||||
|
|
|
@ -3,7 +3,7 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import type { DocsAgentContext } from '../../context/docs-agent-context';
|
||||
import type { DocsAgentContext } from '../../agents/docs-agent/docs-agent-context';
|
||||
import { getWorkflowDataSourceManager } from '../../utils/data-source-manager';
|
||||
import { checkQueryIsReadOnly } from '../../utils/sql-permissions/sql-parser-helpers';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { executeBash } from './bash-execute-tool';
|
||||
|
||||
describe.sequential('bash-execute-tool integration test', () => {
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const bashCommandSchema = z.object({
|
||||
command: z.string().describe('The bash command to execute'),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { createFiles } from './create-file-tool';
|
||||
|
||||
describe.sequential('create-file-tool integration test', () => {
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { createFiles } from './create-file-tool';
|
||||
|
||||
vi.mock('@buster/sandbox', () => ({
|
||||
|
|
|
@ -5,7 +5,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const fileCreateParamsSchema = z.object({
|
||||
path: z.string().describe('The relative or absolute path to create the file at'),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { deleteFiles } from './delete-files-tool';
|
||||
|
||||
describe.sequential('delete-files-tool integration test', () => {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { deleteFiles } from './delete-files-tool';
|
||||
|
||||
describe('delete-files-tool', () => {
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const deleteFilesInputSchema = z.object({
|
||||
paths: z
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { editFiles } from './edit-files-tool';
|
||||
|
||||
describe.sequential('edit-files-tool integration test', () => {
|
||||
|
|
|
@ -5,7 +5,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const editFileParamsSchema = z.object({
|
||||
filePath: z.string().describe('Relative or absolute path to the file'),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { grepSearch } from './grep-search-tool';
|
||||
|
||||
describe.sequential('grep-search-tool integration test', () => {
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const rgSearchInputSchema = z.object({
|
||||
commands: z.array(z.string()).min(1).describe('Array of ripgrep (rg) commands to execute'),
|
||||
|
|
|
@ -2,7 +2,7 @@ import { createSandbox } from '@buster/sandbox';
|
|||
import { addFiles } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { listFiles } from './list-files-tool';
|
||||
|
||||
describe.sequential('list-files-tool integration test', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { listFiles } from './list-files-tool';
|
||||
|
||||
describe('list-files-tool', () => {
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const listFilesOptionsSchema = z.object({
|
||||
depth: z
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { readFiles } from './read-files-tool';
|
||||
|
||||
describe.sequential('read-files-tool integration test', () => {
|
||||
|
|
|
@ -5,7 +5,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const readFilesInputSchema = z.object({
|
||||
files: z
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
import type { DocsAgentContext } from '../../../context/docs-agent-context';
|
||||
import type { DocsAgentContext } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { checkOffTodoList } from './check-off-todo-list-tool';
|
||||
|
||||
describe('checkOffTodoList', () => {
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
|
|||
import { createTool } from '@mastra/core/tools';
|
||||
import { wrapTraced } from 'braintrust';
|
||||
import { z } from 'zod';
|
||||
import { type DocsAgentContext, DocsAgentContextKey } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKey,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const checkOffTodoListInputSchema = z.object({
|
||||
todoItems: z.array(z.string()).describe('An array of todo item texts to check off in the list'),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
import type { DocsAgentContext } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import type { DocsAgentContext } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { updateClarificationsFile } from './update-clarifications-file-tool';
|
||||
|
||||
describe('updateClarificationsFile', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
ClarifyingQuestionSchema,
|
||||
type DocsAgentContext,
|
||||
type MessageUserClarifyingQuestion,
|
||||
} from '../../../context/docs-agent-context';
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const updateClarificationsInputSchema = z.object({
|
||||
clarifications: z
|
||||
|
|
|
@ -7,6 +7,7 @@ import { wrapTraced } from 'braintrust';
|
|||
import { inArray } from 'drizzle-orm';
|
||||
import * as yaml from 'yaml';
|
||||
import { z } from 'zod';
|
||||
import type { AnalystAgentOptions } from '../../agents/analyst-agent/analyst-agent';
|
||||
import { getWorkflowDataSourceManager } from '../../utils/data-source-manager';
|
||||
import { createPermissionErrorMessage, validateSqlPermissions } from '../../utils/sql-permissions';
|
||||
import type { AnalystRuntimeContext } from '../../workflows/analyst-workflow';
|
||||
|
@ -958,10 +959,10 @@ definitions:
|
|||
})
|
||||
),
|
||||
}),
|
||||
execute: async ({ context, runtimeContext }) => {
|
||||
execute: async (input, { context: AnalystAgentOptions }) => {
|
||||
return await createMetricFiles(
|
||||
context as CreateMetricFilesParams,
|
||||
runtimeContext as RuntimeContext<AnalystRuntimeContext>
|
||||
input as CreateMetricFilesParams,
|
||||
context as AnalystAgentOptions
|
||||
);
|
||||
},
|
||||
});
|
||||
|
@ -1490,108 +1491,3 @@ function generateResultMessage(
|
|||
|
||||
return `${successMsg}Failed to create ${failures.length} metric files:\n${failures.join('\n')}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Optimistic parsing function for streaming create-metrics-file tool arguments
|
||||
* Extracts the files array as it's being built incrementally
|
||||
*/
|
||||
export function parseStreamingArgs(
|
||||
accumulatedText: string
|
||||
): Partial<{ files: Array<{ name: string; yml_content: string }> }> | null {
|
||||
// Validate input type
|
||||
if (typeof accumulatedText !== 'string') {
|
||||
throw new Error(`parseStreamingArgs expects string input, got ${typeof accumulatedText}`);
|
||||
}
|
||||
|
||||
try {
|
||||
// First try to parse as complete JSON
|
||||
const parsed = JSON.parse(accumulatedText);
|
||||
return {
|
||||
files: parsed.files || undefined,
|
||||
};
|
||||
} catch (error) {
|
||||
// Only catch JSON parse errors - let other errors bubble up
|
||||
if (error instanceof SyntaxError) {
|
||||
// If JSON is incomplete, try to extract and reconstruct the files array
|
||||
const filesMatch = accumulatedText.match(/"files"\s*:\s*\[(.*)/s);
|
||||
if (filesMatch && filesMatch[1] !== undefined) {
|
||||
const arrayContent = filesMatch[1];
|
||||
|
||||
try {
|
||||
// Try to parse the array content by adding closing bracket
|
||||
const testArray = `[${arrayContent}]`;
|
||||
const parsed = JSON.parse(testArray);
|
||||
return { files: parsed };
|
||||
} catch {
|
||||
// If that fails, try to extract file objects (both complete and incomplete)
|
||||
const files: Array<{ name: string; yml_content: string }> = [];
|
||||
|
||||
// First, try to match complete file objects
|
||||
const completeFileMatches = arrayContent.matchAll(
|
||||
/\{\s*"name"\s*:\s*"([^"]*?)"\s*,\s*"yml_content"\s*:\s*"((?:[^"\\]|\\.)*)"\s*\}/g
|
||||
);
|
||||
|
||||
for (const match of completeFileMatches) {
|
||||
if (match[1] !== undefined && match[2] !== undefined) {
|
||||
let ymlContent = match[2]
|
||||
.replace(/\\"/g, '"')
|
||||
.replace(/\\n/g, '\n')
|
||||
.replace(/\\\\/g, '\\');
|
||||
|
||||
// Ensure timeFrame is properly quoted
|
||||
ymlContent = ensureTimeFrameQuoted(ymlContent);
|
||||
|
||||
files.push({
|
||||
name: match[1],
|
||||
yml_content: ymlContent,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// If no complete files found, try to extract partial file objects
|
||||
if (files.length === 0) {
|
||||
// Try to match incomplete file objects that have at least name and partial yml_content
|
||||
const incompleteFileMatch = arrayContent.match(
|
||||
/\{\s*"name"\s*:\s*"([^"]*?)"\s*,\s*"yml_content"\s*:\s*"((?:[^"\\]|\\.)*)/
|
||||
);
|
||||
|
||||
if (
|
||||
incompleteFileMatch &&
|
||||
incompleteFileMatch[1] !== undefined &&
|
||||
incompleteFileMatch[2] !== undefined
|
||||
) {
|
||||
const name = incompleteFileMatch[1];
|
||||
let ymlContent = incompleteFileMatch[2]
|
||||
.replace(/\\"/g, '"')
|
||||
.replace(/\\n/g, '\n')
|
||||
.replace(/\\\\/g, '\\');
|
||||
|
||||
// Ensure timeFrame is properly quoted
|
||||
ymlContent = ensureTimeFrameQuoted(ymlContent);
|
||||
|
||||
files.push({
|
||||
name,
|
||||
yml_content: ymlContent,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return { files };
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we at least have the start of the files field
|
||||
const partialMatch = accumulatedText.match(/"files"\s*:\s*\[/);
|
||||
if (partialMatch) {
|
||||
return { files: [] };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Unexpected error - re-throw with context
|
||||
throw new Error(
|
||||
`Unexpected error in parseStreamingArgs: ${error instanceof Error ? error.message : 'Unknown error'}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
import { createWorkflow } from '@mastra/core';
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
type AnalystRuntimeContext,
|
||||
AnalystRuntimeContextSchema,
|
||||
thinkAndPrepWorkflowInputSchema,
|
||||
} from '../schemas/workflow-schemas';
|
||||
type AnalystAgentContext,
|
||||
AnalystAgentContextSchema,
|
||||
} from '../agents/analyst-agent/analyst-agent-context';
|
||||
import { thinkAndPrepWorkflowInputSchema } from '../schemas/workflow-schemas';
|
||||
|
||||
// Re-export for backward compatibility
|
||||
export { thinkAndPrepWorkflowInputSchema, AnalystRuntimeContextSchema, type AnalystRuntimeContext };
|
||||
export { thinkAndPrepWorkflowInputSchema, AnalystAgentContextSchema, type AnalystAgentContext };
|
||||
// Legacy exports - deprecated, use AnalystAgentContext instead
|
||||
export {
|
||||
AnalystAgentContextSchema as AnalystRuntimeContextSchema,
|
||||
type AnalystAgentContext as AnalystRuntimeContext,
|
||||
};
|
||||
import { analystStep } from '../steps/analyst-step';
|
||||
import { createTodosStep } from '../steps/create-todos-step';
|
||||
import { extractValuesSearchStep } from '../steps/extract-values-search-step';
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { Sandbox } from '@buster/sandbox';
|
|||
import { currentSpan, initLogger, wrapTraced } from 'braintrust';
|
||||
import type { Logger as BraintrustLogger } from 'braintrust';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import type { DocsAgentContext } from '../../context/docs-agent-context';
|
||||
import type { DocsAgentContext } from '../../agents/docs-agent/docs-agent-context';
|
||||
import docsAgentWorkflow from './docs-agent-workflow';
|
||||
import {
|
||||
TEST_MESSAGES,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { createWorkflow } from '@mastra/core';
|
||||
import { z } from 'zod';
|
||||
import { DocsAgentContextSchema } from '../../context/docs-agent-context';
|
||||
import { DocsAgentContextSchema } from '../../agents/docs-agent/docs-agent-context';
|
||||
import { createDocsTodosStep } from '../../steps/docs-agent/create-docs-todos-step';
|
||||
import { docsAgentStep } from '../../steps/docs-agent/docs-agent-step';
|
||||
import { getRepositoryTreeStep } from '../../steps/docs-agent/get-repository-tree-step';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { type Sandbox, addFiles, createSandbox } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { getRepositoryTree, getRepositoryTreeFromContext } from './tree-helper';
|
||||
|
||||
describe('tree-helper integration', () => {
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as fs from 'node:fs/promises';
|
|||
import { runTypescript } from '@buster/sandbox';
|
||||
import { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import { DocsAgentContextKeys } from '../../../agents/docs-agent/docs-agent-context';
|
||||
import { getRepositoryTree, getRepositoryTreeFromContext } from './tree-helper';
|
||||
|
||||
vi.mock('node:fs/promises');
|
||||
|
|
|
@ -4,7 +4,10 @@ import { fileURLToPath } from 'node:url';
|
|||
import { runTypescript } from '@buster/sandbox';
|
||||
import type { Sandbox } from '@buster/sandbox';
|
||||
import type { RuntimeContext } from '@mastra/core/runtime-context';
|
||||
import { type DocsAgentContext, DocsAgentContextKeys } from '../../../context/docs-agent-context';
|
||||
import {
|
||||
type DocsAgentContext,
|
||||
DocsAgentContextKeys,
|
||||
} from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { Sandbox } from '@buster/sandbox';
|
||||
import type { DocsAgentContext } from '../../../context/docs-agent-context';
|
||||
import type { DocsAgentContext } from '../../../agents/docs-agent/docs-agent-context';
|
||||
|
||||
export interface CreateTestContextOptions {
|
||||
sandbox: Sandbox;
|
||||
|
|
113
pnpm-lock.yaml
113
pnpm-lock.yaml
|
@ -19,8 +19,8 @@ catalogs:
|
|||
specifier: ^4.0.0-v4-beta.25
|
||||
version: 4.0.0-v4-beta.25
|
||||
ai:
|
||||
specifier: beta
|
||||
version: 5.0.0-beta.32
|
||||
specifier: ^5.0.5
|
||||
version: 5.0.5
|
||||
axios:
|
||||
specifier: ^1.10.0
|
||||
version: 1.10.0
|
||||
|
@ -150,10 +150,10 @@ importers:
|
|||
version: 2.50.2
|
||||
'@trigger.dev/sdk':
|
||||
specifier: 'catalog:'
|
||||
version: 4.0.0-v4-beta.25(ai@5.0.0-beta.32(zod@3.25.1))(zod@3.25.1)
|
||||
version: 4.0.0-v4-beta.25(ai@5.0.5(zod@3.25.1))(zod@3.25.1)
|
||||
ai:
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.0-beta.32(zod@3.25.1)
|
||||
version: 5.0.5(zod@3.25.1)
|
||||
drizzle-orm:
|
||||
specifier: 'catalog:'
|
||||
version: 0.44.2(@opentelemetry/api@1.9.0)(@types/pg@8.15.4)(mysql2@3.14.1)(pg@8.16.3)(postgres@3.4.7)
|
||||
|
@ -216,10 +216,10 @@ importers:
|
|||
version: 0.10.8(openapi-types@12.1.3)(react@18.3.1)(zod@3.25.1)
|
||||
'@trigger.dev/sdk':
|
||||
specifier: 'catalog:'
|
||||
version: 4.0.0-v4-beta.25(ai@5.0.0-beta.32(zod@3.25.1))(zod@3.25.1)
|
||||
version: 4.0.0-v4-beta.25(ai@5.0.5(zod@3.25.1))(zod@3.25.1)
|
||||
ai:
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.0-beta.32(zod@3.25.1)
|
||||
version: 5.0.5(zod@3.25.1)
|
||||
braintrust:
|
||||
specifier: 'catalog:'
|
||||
version: 0.0.209(@aws-sdk/credential-provider-web-identity@3.840.0)(openai@4.104.0(ws@8.18.3)(zod@3.25.1))(react@18.3.1)(sswr@2.2.0(svelte@5.34.9))(svelte@5.34.9)(vue@3.5.17(typescript@5.8.3))(zod@3.25.1)
|
||||
|
@ -676,14 +676,14 @@ importers:
|
|||
packages/ai:
|
||||
dependencies:
|
||||
'@ai-sdk/anthropic':
|
||||
specifier: beta
|
||||
version: 2.0.0-beta.11(zod@3.25.1)
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.1(zod@3.25.1)
|
||||
'@ai-sdk/google-vertex':
|
||||
specifier: beta
|
||||
version: 3.0.0-beta.19(zod@3.25.1)
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.3(zod@3.25.1)
|
||||
'@ai-sdk/provider':
|
||||
specifier: beta
|
||||
version: 2.0.0-beta.1
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
'@buster/access-controls':
|
||||
specifier: workspace:*
|
||||
version: link:../access-controls
|
||||
|
@ -725,7 +725,7 @@ importers:
|
|||
version: 0.10.3(@mastra/core@0.10.8(openapi-types@12.1.3)(react@18.3.1)(zod@3.25.1))
|
||||
ai:
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.0-beta.32(zod@3.25.1)
|
||||
version: 5.0.5(zod@3.25.1)
|
||||
autoevals:
|
||||
specifier: ^0.0.130
|
||||
version: 0.0.130(ws@8.18.3)
|
||||
|
@ -807,7 +807,7 @@ importers:
|
|||
version: link:../vitest-config
|
||||
ai:
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.0-beta.32(zod@3.25.1)
|
||||
version: 5.0.5(zod@3.25.1)
|
||||
drizzle-kit:
|
||||
specifier: ^0.31.4
|
||||
version: 0.31.4
|
||||
|
@ -932,7 +932,7 @@ importers:
|
|||
version: link:../vitest-config
|
||||
ai:
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.0-beta.32(zod@3.25.1)
|
||||
version: 5.0.5(zod@3.25.1)
|
||||
zod:
|
||||
specifier: ^3.0.0
|
||||
version: 3.25.1
|
||||
|
@ -1006,26 +1006,26 @@ packages:
|
|||
'@adobe/css-tools@4.4.3':
|
||||
resolution: {integrity: sha512-VQKMkwriZbaOgVCby1UDY/LDk5fIjhQicCvVPFqfe+69fWaPWydbWJ3wRt59/YzIwda1I81loas3oCoHxnqvdA==}
|
||||
|
||||
'@ai-sdk/anthropic@2.0.0-beta.11':
|
||||
resolution: {integrity: sha512-aRoSgvbaO7CmawoBRhSkdReap3BYFh9oHuzirnTC9teFziLbQTyN5SFqROt9VoCTalkxR+HptNl/58/1MKcs6w==}
|
||||
'@ai-sdk/anthropic@2.0.1':
|
||||
resolution: {integrity: sha512-HtNbpNV9qXQosHu00+CBMEcdTerwZY+kpVMNak0xP/P5TF6XkPf7IyizhLuc7y5zcXMjZCMA7jDGkcEdZCEdkw==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
'@ai-sdk/gateway@1.0.0-beta.17':
|
||||
resolution: {integrity: sha512-ikM6U0LHc2K4GLJNVK8diC1H16ewkaXumr3rMbYOaL1zOy8TmuxMSZk8Tj7rqiJTJPjRPmB70bTCMXrmUy30pw==}
|
||||
'@ai-sdk/gateway@1.0.3':
|
||||
resolution: {integrity: sha512-QRGz2vH1WR9NvCv8gWocoebAKiXcuqj22mug6i8COeVsp33x5K5cK2DT4TwiQx5SfYbqJbVoBT+UqnHF7A3PHA==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
'@ai-sdk/google-vertex@3.0.0-beta.19':
|
||||
resolution: {integrity: sha512-Ys6RqRgDR6NtSS/zno+rd9KdEZU/e0d6MFyFFdQTL40uw70MmnhBjKB8cLE/yN9L2qdn7EL6bWPTtXSPXOR0tg==}
|
||||
'@ai-sdk/google-vertex@3.0.3':
|
||||
resolution: {integrity: sha512-FVKoDm/VmDO9b8MBUVwgVhChKjkkA6UhZQG1bVtT0Pykg96XtZlHHtRr3iK3WeEy4fP1b2H/v9y/G0dEcoYv/g==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
'@ai-sdk/google@2.0.0-beta.17':
|
||||
resolution: {integrity: sha512-BewWJviru/ef+0Kuwrzy0UHo+Ic89V26g8gmZayoroO+8hUBxRc2xbpWZBMbZ6suO2UxPFHb2J1VCqyF25I8Cg==}
|
||||
'@ai-sdk/google@2.0.2':
|
||||
resolution: {integrity: sha512-ZTETUnuXPBErzRiXSFvPjRUJQ6kAZLueFi3qCtpxPe7xgmQAqY+0z4pR+v4zOBgrCtgpuB6nayXXXG/8zUaCjA==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
@ -1057,6 +1057,12 @@ packages:
|
|||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
'@ai-sdk/provider-utils@3.0.1':
|
||||
resolution: {integrity: sha512-/iP1sKc6UdJgGH98OCly7sWJKv+J9G47PnTjIj40IJMUQKwDrUMyf7zOOfRtPwSuNifYhSoJQ4s1WltI65gJ/g==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
'@ai-sdk/provider@0.0.26':
|
||||
resolution: {integrity: sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg==}
|
||||
engines: {node: '>=18'}
|
||||
|
@ -1065,6 +1071,10 @@ packages:
|
|||
resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@ai-sdk/provider@2.0.0':
|
||||
resolution: {integrity: sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@ai-sdk/provider@2.0.0-beta.1':
|
||||
resolution: {integrity: sha512-Z8SPncMtS3RsoXITmT7NVwrAq6M44dmw0DoUOYJqNNtCu8iMWuxB8Nxsoqpa0uEEy9R1V1ZThJAXTYgjTUxl3w==}
|
||||
engines: {node: '>=18'}
|
||||
|
@ -5757,10 +5767,9 @@ packages:
|
|||
react:
|
||||
optional: true
|
||||
|
||||
ai@5.0.0-beta.32:
|
||||
resolution: {integrity: sha512-bi2ptrTwQ7N9yRLZWGdY5nc9l4wWFGTN2Oo0fR0bhw/dtVKZ9y75UrqILyLC4Xs4xDrtRdfjBIioLBSW36eyAQ==}
|
||||
ai@5.0.5:
|
||||
resolution: {integrity: sha512-NPQ8Yv4lR7o/1rM+HQ0JT18zKxVFy/DrFDpvxlBQqmemSwsf3FlLNTK0asWXo9YtDAc0BOFL/y4kB56Hffi4yg==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
|
||||
|
@ -11646,34 +11655,34 @@ snapshots:
|
|||
|
||||
'@adobe/css-tools@4.4.3': {}
|
||||
|
||||
'@ai-sdk/anthropic@2.0.0-beta.11(zod@3.25.1)':
|
||||
'@ai-sdk/anthropic@2.0.1(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 2.0.0-beta.1
|
||||
'@ai-sdk/provider-utils': 3.0.0-beta.8(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@ai-sdk/provider-utils': 3.0.1(zod@3.25.1)
|
||||
zod: 3.25.1
|
||||
|
||||
'@ai-sdk/gateway@1.0.0-beta.17(zod@3.25.1)':
|
||||
'@ai-sdk/gateway@1.0.3(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 2.0.0-beta.1
|
||||
'@ai-sdk/provider-utils': 3.0.0-beta.8(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@ai-sdk/provider-utils': 3.0.1(zod@3.25.1)
|
||||
zod: 3.25.1
|
||||
|
||||
'@ai-sdk/google-vertex@3.0.0-beta.19(zod@3.25.1)':
|
||||
'@ai-sdk/google-vertex@3.0.3(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@ai-sdk/anthropic': 2.0.0-beta.11(zod@3.25.1)
|
||||
'@ai-sdk/google': 2.0.0-beta.17(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0-beta.1
|
||||
'@ai-sdk/provider-utils': 3.0.0-beta.8(zod@3.25.1)
|
||||
'@ai-sdk/anthropic': 2.0.1(zod@3.25.1)
|
||||
'@ai-sdk/google': 2.0.2(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@ai-sdk/provider-utils': 3.0.1(zod@3.25.1)
|
||||
google-auth-library: 9.15.1
|
||||
zod: 3.25.1
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- supports-color
|
||||
|
||||
'@ai-sdk/google@2.0.0-beta.17(zod@3.25.1)':
|
||||
'@ai-sdk/google@2.0.2(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 2.0.0-beta.1
|
||||
'@ai-sdk/provider-utils': 3.0.0-beta.8(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@ai-sdk/provider-utils': 3.0.1(zod@3.25.1)
|
||||
zod: 3.25.1
|
||||
|
||||
'@ai-sdk/openai@2.0.0-beta.14(zod@3.25.1)':
|
||||
|
@ -11706,6 +11715,14 @@ snapshots:
|
|||
zod: 3.25.1
|
||||
zod-to-json-schema: 3.24.6(zod@3.25.1)
|
||||
|
||||
'@ai-sdk/provider-utils@3.0.1(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@standard-schema/spec': 1.0.0
|
||||
eventsource-parser: 3.0.3
|
||||
zod: 3.25.1
|
||||
zod-to-json-schema: 3.24.6(zod@3.25.1)
|
||||
|
||||
'@ai-sdk/provider@0.0.26':
|
||||
dependencies:
|
||||
json-schema: 0.4.0
|
||||
|
@ -11714,6 +11731,10 @@ snapshots:
|
|||
dependencies:
|
||||
json-schema: 0.4.0
|
||||
|
||||
'@ai-sdk/provider@2.0.0':
|
||||
dependencies:
|
||||
json-schema: 0.4.0
|
||||
|
||||
'@ai-sdk/provider@2.0.0-beta.1':
|
||||
dependencies:
|
||||
json-schema: 0.4.0
|
||||
|
@ -17003,7 +17024,7 @@ snapshots:
|
|||
- supports-color
|
||||
- utf-8-validate
|
||||
|
||||
'@trigger.dev/sdk@4.0.0-v4-beta.25(ai@5.0.0-beta.32(zod@3.25.1))(zod@3.25.1)':
|
||||
'@trigger.dev/sdk@4.0.0-v4-beta.25(ai@5.0.5(zod@3.25.1))(zod@3.25.1)':
|
||||
dependencies:
|
||||
'@opentelemetry/api': 1.9.0
|
||||
'@opentelemetry/api-logs': 0.52.1
|
||||
|
@ -17020,7 +17041,7 @@ snapshots:
|
|||
ws: 8.18.3
|
||||
zod: 3.25.1
|
||||
optionalDependencies:
|
||||
ai: 5.0.0-beta.32(zod@3.25.1)
|
||||
ai: 5.0.5(zod@3.25.1)
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- supports-color
|
||||
|
@ -17806,11 +17827,11 @@ snapshots:
|
|||
optionalDependencies:
|
||||
react: 18.3.1
|
||||
|
||||
ai@5.0.0-beta.32(zod@3.25.1):
|
||||
ai@5.0.5(zod@3.25.1):
|
||||
dependencies:
|
||||
'@ai-sdk/gateway': 1.0.0-beta.17(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0-beta.1
|
||||
'@ai-sdk/provider-utils': 3.0.0-beta.8(zod@3.25.1)
|
||||
'@ai-sdk/gateway': 1.0.3(zod@3.25.1)
|
||||
'@ai-sdk/provider': 2.0.0
|
||||
'@ai-sdk/provider-utils': 3.0.1(zod@3.25.1)
|
||||
'@opentelemetry/api': 1.9.0
|
||||
zod: 3.25.1
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ catalog:
|
|||
"@supabase/supabase-js": "^2.50.0"
|
||||
"@trigger.dev/build": "^4.0.0-v4-beta.25"
|
||||
"@trigger.dev/sdk": "^4.0.0-v4-beta.25"
|
||||
ai: "beta"
|
||||
ai: "^5.0.5"
|
||||
axios: "^1.10.0"
|
||||
"braintrust": "^0.0.209"
|
||||
dotenv: "^17.2.0"
|
||||
|
|
Loading…
Reference in New Issue