@mastra/cursor 0.3.1-alpha.0 → 0.3.1

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.
package/README.md CHANGED
@@ -1,25 +1,21 @@
1
1
  # @mastra/cursor
2
2
 
3
- `@mastra/cursor` connects Mastra to the Cursor SDK. Use it when you want to register a Cursor SDK agent with Mastra and call it through Mastra-compatible `generate()` and `stream()` methods.
3
+ `@mastra/cursor` connects Mastra to the Cursor Agent SDK. Use it when you want Cursor's coding-agent runtime and repository tools while exposing the agent through Mastra-compatible `generate()` and `stream()` methods.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @mastra/cursor @cursor/sdk
8
+ npm install @mastra/cursor
9
+ npm install @cursor/sdk
9
10
  ```
10
11
 
11
- ## Overview
12
+ ## Usage
12
13
 
13
- The package exports `CursorSDKAgent`, a Mastra `Agent` wrapper around a Cursor SDK agent.
14
-
15
- `CursorSDKAgent` keeps the Cursor SDK run loop in charge. Mastra receives compatible outputs, usage data, and tracing data for the run.
16
-
17
- ## Create a Cursor SDK agent
18
-
19
- Pass Cursor SDK configuration through `sdkOptions`. `CursorSDKAgent` creates the Cursor SDK agent on first use.
14
+ Set `CURSOR_API_KEY` before creating the agent.
20
15
 
21
16
  ```typescript
22
17
  import { CursorSDKAgent } from '@mastra/cursor';
18
+ import { Mastra } from '@mastra/core/mastra';
23
19
 
24
20
  export const cursorAgent = new CursorSDKAgent({
25
21
  id: 'cursor-sdk-agent',
@@ -33,61 +29,20 @@ export const cursorAgent = new CursorSDKAgent({
33
29
  },
34
30
  },
35
31
  });
36
- ```
37
-
38
- You can also pass an existing Cursor SDK agent when your app already creates or owns it.
39
-
40
- ```typescript
41
- import { Agent as CursorAgent } from '@cursor/sdk';
42
- import { CursorSDKAgent } from '@mastra/cursor';
43
-
44
- export const cursorAgent = new CursorSDKAgent({
45
- id: 'cursor-sdk-agent',
46
- description: 'Use Cursor Agent SDK through Mastra.',
47
- agent: CursorAgent.create({
48
- apiKey: process.env.CURSOR_API_KEY,
49
- model: { id: process.env.CURSOR_MODEL_ID! },
50
- local: {
51
- cwd: process.cwd(),
52
- },
53
- }),
54
- });
55
- ```
56
-
57
- You can register the wrapper anywhere Mastra accepts an `Agent`.
58
-
59
- ```typescript
60
- import { Mastra } from '@mastra/core/mastra';
61
32
 
62
33
  export const mastra = new Mastra({
63
- agents: {
64
- cursorAgent,
65
- },
34
+ agents: { cursorAgent },
66
35
  });
67
36
  ```
68
37
 
69
- ## Run the agent
70
-
71
- ```typescript
72
- const result = await cursorAgent.generate('Find and explain the failing test.', {
73
- runId: 'cursor-run',
74
- });
75
-
76
- console.log(result.text);
77
- ```
38
+ ## Documentation
78
39
 
79
- ```typescript
80
- const stream = await cursorAgent.stream('Inspect this repository and suggest the smallest fix.');
40
+ - [Cursor Agent SDK integration](https://mastra.ai/docs/connections/sdk-agents#cursor-agent-sdk)
81
41
 
82
- for await (const chunk of stream.fullStream) {
83
- if (chunk.type === 'text-delta') {
84
- process.stdout.write(chunk.payload.text);
85
- }
86
- }
87
- ```
42
+ ## Changelog
88
43
 
89
- ## Configure Cursor
44
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/agent-sdks/cursor/CHANGELOG.md) for version history and release notes.
90
45
 
91
- `CursorSDKAgent` forwards `sdkOptions` to `CursorAgent.create()` when `agent` is not provided or when `agent` is a factory. These include `apiKey`, `model`, `local`, `cloud`, `mcpServers`, `agents`, `agentId`, `idempotencyKey`, and `platform`.
46
+ ## Support
92
47
 
93
- `apiKey` defaults to `process.env.CURSOR_API_KEY` when it is not provided.
48
+ We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
@@ -3,7 +3,7 @@ name: mastra-cursor
3
3
  description: Documentation for @mastra/cursor. Use when working with @mastra/cursor APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/cursor"
6
- version: "0.3.1-alpha.0"
6
+ version: "0.3.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.1-alpha.0",
2
+ "version": "0.3.1",
3
3
  "package": "@mastra/cursor",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/cursor",
3
- "version": "0.3.1-alpha.0",
3
+ "version": "0.3.1",
4
4
  "description": "Cursor SDK package for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -34,9 +34,9 @@
34
34
  "tsx": "^4.23.1",
35
35
  "typescript": "^7.0.2",
36
36
  "vitest": "4.1.10",
37
- "@internal/types-builder": "0.0.104",
38
- "@internal/lint": "0.0.129",
39
- "@mastra/core": "1.64.0-alpha.2"
37
+ "@internal/lint": "0.0.130",
38
+ "@internal/types-builder": "0.0.105",
39
+ "@mastra/core": "1.64.0"
40
40
  },
41
41
  "homepage": "https://mastra.ai",
42
42
  "repository": {