Skip to content

Latest commit

 

History

History
176 lines (115 loc) · 20 KB

File metadata and controls

176 lines (115 loc) · 20 KB

@mastra/claude

0.3.0

Minor Changes

Patch Changes

0.3.0-alpha.0

Minor Changes

Patch Changes

0.2.1

Patch Changes

0.2.1-alpha.0

Patch Changes

  • Security remediation for the 2026-06-17 "easy-day-js" supply-chain incident. Patch bump to publish clean versions and move the latest dist-tag forward, superseding the compromised versions that declared the malicious easy-day-js dependency. (#18056)

  • Updated dependencies [77a2351]:

    • @mastra/core@1.43.1-alpha.0

0.2.0

Minor Changes

  • Added structured output support for Claude and OpenAI SDK agents using their provider-native structured output APIs. Cursor SDK agent calls now fail clearly when structuredOutput is requested because the Cursor TypeScript SDK does not expose a schema-constrained output API. SDK agents now implement provider-native resume through Mastra's existing resumeGenerate/resumeStream methods by accepting provider-specific resumeData with a message payload. Cursor SDK agent options now use the same clear source split as OpenAI: pass either a pre-created agent or SDK options for wrapper-created agents. (#17580)

    Example:

    await claudeAgent.resumeGenerate({
      message: 'Continue the task.',
      sessionId: 'claude-session-id',
    });
    
    await openAIAgent.resumeStream({
      message: 'Continue the task.',
      previousResponseId: 'resp_123',
    });
    
    const result = await openAIAgent.generate('Return the answer as JSON.', {
      structuredOutput: {
        schema: z.object({ answer: z.string() }),
      },
    });
    // result.object has shape { answer: string }

    Claude and OpenAI SDK agents support structuredOutput through their native SDK APIs. CursorSDKAgent throws a clear error when structuredOutput is requested because the Cursor TypeScript SDK does not expose schema-constrained output.

Patch Changes

0.2.0-alpha.1

Minor Changes

  • Added structured output support for Claude and OpenAI SDK agents using their provider-native structured output APIs. Cursor SDK agent calls now fail clearly when structuredOutput is requested because the Cursor TypeScript SDK does not expose a schema-constrained output API. SDK agents now implement provider-native resume through Mastra's existing resumeGenerate/resumeStream methods by accepting provider-specific resumeData with a message payload. Cursor SDK agent options now use the same clear source split as OpenAI: pass either a pre-created agent or SDK options for wrapper-created agents. (#17580)

    Example:

    await claudeAgent.resumeGenerate({
      message: 'Continue the task.',
      sessionId: 'claude-session-id',
    });
    
    await openAIAgent.resumeStream({
      message: 'Continue the task.',
      previousResponseId: 'resp_123',
    });
    
    const result = await openAIAgent.generate('Return the answer as JSON.', {
      structuredOutput: {
        schema: z.object({ answer: z.string() }),
      },
    });
    // result.object has shape { answer: string }

    Claude and OpenAI SDK agents support structuredOutput through their native SDK APIs. CursorSDKAgent throws a clear error when structuredOutput is requested because the Cursor TypeScript SDK does not expose schema-constrained output.

Patch Changes

0.1.1-alpha.0

Patch Changes

0.1.0

Minor Changes

  • Added @mastra/claude, a package for running Claude Agent SDK agents through Mastra. (#16906)

    Create a Claude SDK agent, register it with Mastra, and call generate() or stream() with Mastra-compatible outputs. Runs keep Claude SDK usage, cost estimates, and observability data available to Mastra.

    import { ClaudeSDKAgent } from '@mastra/claude';
    
    export const claudeAgent = new ClaudeSDKAgent({
      id: 'claude-sdk-agent',
      description: 'Use Claude Agent SDK through Mastra.',
      sdkOptions: {
        model: process.env.CLAUDE_CODE_MODEL,
        cwd: process.cwd(),
      },
    });

Patch Changes

0.1.0-alpha.1

Minor Changes

  • Added @mastra/claude, a package for running Claude Agent SDK agents through Mastra. (#16906)

    Create a Claude SDK agent, register it with Mastra, and call generate() or stream() with Mastra-compatible outputs. Runs keep Claude SDK usage, cost estimates, and observability data available to Mastra.

    import { ClaudeSDKAgent } from '@mastra/claude';
    
    export const claudeAgent = new ClaudeSDKAgent({
      id: 'claude-sdk-agent',
      description: 'Use Claude Agent SDK through Mastra.',
      sdkOptions: {
        model: process.env.CLAUDE_CODE_MODEL,
        cwd: process.cwd(),
      },
    });

Patch Changes

  • Updated dependencies:
    • @mastra/core@1.38.0-alpha.7

0.1.0-alpha.0

Initial release.