@agentproto/adapter-mastracode 0.2.0
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/LICENSE +21 -0
- package/MASTRACODE.md +32 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.mjs +138 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 agentproto contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/MASTRACODE.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastracode
|
|
3
|
+
id: mastracode
|
|
4
|
+
description: Mastra Code terminal coding agent via its documented headless CLI.
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
bin: npx
|
|
7
|
+
bin_args: ["-y", "mastracode"]
|
|
8
|
+
install:
|
|
9
|
+
- method: npm
|
|
10
|
+
package: mastracode
|
|
11
|
+
global: true
|
|
12
|
+
version_check:
|
|
13
|
+
cmd: npm view mastracode version
|
|
14
|
+
parse: '(\d+\.\d+\.\d+)'
|
|
15
|
+
range: ">=0.26.0"
|
|
16
|
+
timeout_ms: 15000
|
|
17
|
+
sandbox: ./SANDBOX.md
|
|
18
|
+
protocol: print
|
|
19
|
+
tags: ["mastracode", "mastra", "print", "agent-runtime", "coding"]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Mastra Code adapter
|
|
23
|
+
|
|
24
|
+
This adapter wraps Mastra Code as an AIP-45 agent CLI using the currently
|
|
25
|
+
documented headless command surface:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx -y mastracode --prompt "Fix the bug" --output jsonl
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
As of 2026-06-30, `mastracode acp --help` prints the top-level CLI help rather
|
|
32
|
+
than ACP-specific usage, so this adapter is intentionally not marked as ACP.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentCliHandle, AgentCliRuntime } from '@agentproto/driver-agent-cli';
|
|
2
|
+
export { AgentCliHandle, AgentCliRuntime } from '@agentproto/driver-agent-cli';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @agentproto/adapter-mastracode — AIP-45 adapter for Mastra Code.
|
|
6
|
+
*
|
|
7
|
+
* Mastra Code does not currently expose a discoverable ACP subcommand
|
|
8
|
+
* (`mastracode acp --help` prints the top-level CLI help). We spawn
|
|
9
|
+
* its documented headless CLI via `npx -y mastracode` and mark this
|
|
10
|
+
* adapter as a print/headless protocol arm rather than claiming ACP.
|
|
11
|
+
*
|
|
12
|
+
* import { mastracode, mastracodeRuntime } from "@agentproto/adapter-mastracode"
|
|
13
|
+
* const session = await mastracodeRuntime().start()
|
|
14
|
+
* for await (const evt of session.send({ role: "user", content: "..." })) {
|
|
15
|
+
* console.log(evt)
|
|
16
|
+
* }
|
|
17
|
+
* await session.close()
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
declare const mastracode: AgentCliHandle;
|
|
21
|
+
declare function mastracodeRuntime(): AgentCliRuntime;
|
|
22
|
+
|
|
23
|
+
export { mastracode, mastracodeRuntime };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { defineAgentCli, createAgentCliRuntime } from '@agentproto/driver-agent-cli';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @agentproto/adapter-mastracode v0.1.0-alpha
|
|
5
|
+
* AIP-45 adapter for Mastra Code via its headless CLI mode.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
var mastracode = defineAgentCli({
|
|
9
|
+
name: "mastracode",
|
|
10
|
+
id: "mastracode",
|
|
11
|
+
description: "Mastra Code \u2014 terminal-based AI coding agent with persistent threads, tools, modes, and multi-provider model support. Current CLI exposes TUI/headless operation, not ACP; spawned via `npx -y mastracode`.",
|
|
12
|
+
version: "0.1.0",
|
|
13
|
+
bin: "npx",
|
|
14
|
+
bin_args: ["-y", "mastracode"],
|
|
15
|
+
install: [{ method: "npm", package: "mastracode", global: true }],
|
|
16
|
+
version_check: {
|
|
17
|
+
cmd: "npm view mastracode version",
|
|
18
|
+
parse: "(\\d+\\.\\d+\\.\\d+)",
|
|
19
|
+
range: ">=0.26.0",
|
|
20
|
+
timeout_ms: 15e3
|
|
21
|
+
},
|
|
22
|
+
auth: {
|
|
23
|
+
ref: "./SECRETS.md",
|
|
24
|
+
state: {
|
|
25
|
+
env: [
|
|
26
|
+
"ANTHROPIC_API_KEY",
|
|
27
|
+
"OPENAI_API_KEY",
|
|
28
|
+
"OPENROUTER_API_KEY",
|
|
29
|
+
"GOOGLE_GENERATIVE_AI_API_KEY"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
sandbox: "./SANDBOX.md",
|
|
34
|
+
protocol: "print",
|
|
35
|
+
print: {
|
|
36
|
+
prompt_flag: "--prompt",
|
|
37
|
+
output_format: ["--output", "jsonl"],
|
|
38
|
+
pre_prompt: [],
|
|
39
|
+
resume: { flag: "--thread", kind: "value" },
|
|
40
|
+
event_schema: "mastra-jsonl"
|
|
41
|
+
},
|
|
42
|
+
session: {
|
|
43
|
+
mode: "ephemeral",
|
|
44
|
+
idle_timeout_ms: 18e5,
|
|
45
|
+
context_carryover: false
|
|
46
|
+
},
|
|
47
|
+
models: {
|
|
48
|
+
default: "anthropic/claude-sonnet-4-5",
|
|
49
|
+
allowed: [
|
|
50
|
+
"anthropic/claude-sonnet-4-5",
|
|
51
|
+
"anthropic/claude-sonnet-4-6",
|
|
52
|
+
"openai/gpt-5.1",
|
|
53
|
+
"openai/gpt-5.1-mini",
|
|
54
|
+
"google/gemini-2.5-flash",
|
|
55
|
+
"openrouter/anthropic/claude-sonnet-4-6"
|
|
56
|
+
],
|
|
57
|
+
env: {
|
|
58
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
59
|
+
openai: "OPENAI_API_KEY",
|
|
60
|
+
openrouter: "OPENROUTER_API_KEY",
|
|
61
|
+
google: "GOOGLE_GENERATIVE_AI_API_KEY"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
capabilities: {
|
|
65
|
+
streaming: true,
|
|
66
|
+
tool_calls: true,
|
|
67
|
+
sub_agents: true,
|
|
68
|
+
file_io: true,
|
|
69
|
+
multimodal: false,
|
|
70
|
+
// `mastracode --thread <id>` reattaches to a prior thread with real
|
|
71
|
+
// persisted memory (confirmed cross-process: separate spawn, same
|
|
72
|
+
// thread id, correct continuity). `print.resume` below drives this.
|
|
73
|
+
resumable: true,
|
|
74
|
+
bidirectional: false
|
|
75
|
+
},
|
|
76
|
+
modes: [
|
|
77
|
+
{
|
|
78
|
+
id: "default",
|
|
79
|
+
description: "Default headless mode. Mastra Code defaults to build mode when omitted."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "plan",
|
|
83
|
+
description: "Plan-only mode \u2014 analyze architecture and propose implementation plans before writing code.",
|
|
84
|
+
bin_args_append: ["--mode", "plan"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "build",
|
|
88
|
+
description: "Build mode \u2014 file edits and shell commands use Mastra Code's configured permissions.",
|
|
89
|
+
bin_args_append: ["--mode", "build"]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "fast",
|
|
93
|
+
description: "Fast mode \u2014 lower-latency answers and small edits.",
|
|
94
|
+
bin_args_append: ["--mode", "fast"]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
options: [
|
|
98
|
+
{
|
|
99
|
+
id: "model",
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Provider/model override for this operator binding (e.g. `anthropic/claude-sonnet-4-5`).",
|
|
102
|
+
bin_args_template: ["--model", "{value}"]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "thinking_level",
|
|
106
|
+
type: "enum",
|
|
107
|
+
enum: ["off", "low", "medium", "high", "xhigh"],
|
|
108
|
+
description: "Thinking level passed to Mastra Code.",
|
|
109
|
+
bin_args_template: ["--thinking-level", "{value}"]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "timeout",
|
|
113
|
+
type: "integer",
|
|
114
|
+
min: 1,
|
|
115
|
+
max: 86400,
|
|
116
|
+
description: "Maximum headless run duration in seconds.",
|
|
117
|
+
bin_args_template: ["--timeout", "{value}"]
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
continuation: {
|
|
121
|
+
default: "none",
|
|
122
|
+
supported: ["none", "transcript", "native-resume"]
|
|
123
|
+
},
|
|
124
|
+
metadata: {
|
|
125
|
+
acp: {
|
|
126
|
+
checked: "2026-06-30",
|
|
127
|
+
result: "`mastracode acp --help` prints top-level Mastra Code help; no ACP subcommand is currently discoverable."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
tags: ["mastracode", "mastra", "print", "agent-runtime", "coding"]
|
|
131
|
+
});
|
|
132
|
+
function mastracodeRuntime() {
|
|
133
|
+
return createAgentCliRuntime(mastracode);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { mastracode, mastracodeRuntime };
|
|
137
|
+
//# sourceMappingURL=index.mjs.map
|
|
138
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAuBO,IAAM,aAA6B,cAAA,CAAe;AAAA,EACvD,IAAA,EAAM,YAAA;AAAA,EACN,EAAA,EAAI,YAAA;AAAA,EACJ,WAAA,EACE,kNAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAAA,EACT,GAAA,EAAK,KAAA;AAAA,EACL,QAAA,EAAU,CAAC,IAAA,EAAM,YAAY,CAAA;AAAA,EAC7B,OAAA,EAAS,CAAC,EAAE,MAAA,EAAQ,OAAO,OAAA,EAAS,YAAA,EAAc,MAAA,EAAQ,IAAA,EAAM,CAAA;AAAA,EAChE,aAAA,EAAe;AAAA,IACb,GAAA,EAAK,6BAAA;AAAA,IACL,KAAA,EAAO,sBAAA;AAAA,IACP,KAAA,EAAO,UAAA;AAAA,IACP,UAAA,EAAY;AAAA,GACd;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,GAAA,EAAK,cAAA;AAAA,IACL,KAAA,EAAO;AAAA,MACL,GAAA,EAAK;AAAA,QACH,mBAAA;AAAA,QACA,gBAAA;AAAA,QACA,oBAAA;AAAA,QACA;AAAA;AACF;AACF,GACF;AAAA,EACA,OAAA,EAAS,cAAA;AAAA,EACT,QAAA,EAAU,OAAA;AAAA,EACV,KAAA,EAAO;AAAA,IACL,WAAA,EAAa,UAAA;AAAA,IACb,aA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@agentproto/adapter-mastracode — AIP-45 adapter for Mastra Code.\n *\n * Mastra Code does not currently expose a discoverable ACP subcommand\n * (`mastracode acp --help` prints the top-level CLI help). We spawn\n * its documented headless CLI via `npx -y mastracode` and mark this\n * adapter as a print/headless protocol arm rather than claiming ACP.\n *\n * import { mastracode, mastracodeRuntime } from \"@agentproto/adapter-mastracode\"\n * const session = await mastracodeRuntime().start()\n * for await (const evt of session.send({ role: \"user\", content: \"...\" })) {\n * console.log(evt)\n * }\n * await session.close()\n */\n\nimport {\n createAgentCliRuntime,\n defineAgentCli,\n type AgentCliHandle,\n type AgentCliRuntime,\n} from \"@agentproto/driver-agent-cli\"\n\nexport const mastracode: AgentCliHandle = defineAgentCli({\n name: \"mastracode\",\n id: \"mastracode\",\n description:\n \"Mastra Code — terminal-based AI coding agent with persistent threads, tools, modes, and multi-provider model support. Current CLI exposes TUI/headless operation, not ACP; spawned via `npx -y mastracode`.\",\n version: \"0.1.0\",\n bin: \"npx\",\n bin_args: [\"-y\", \"mastracode\"],\n install: [{ method: \"npm\", package: \"mastracode\", global: true }],\n version_check: {\n cmd: \"npm view mastracode version\",\n parse: \"(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\",\n range: \">=0.26.0\",\n timeout_ms: 15_000,\n },\n auth: {\n ref: \"./SECRETS.md\",\n state: {\n env: [\n \"ANTHROPIC_API_KEY\",\n \"OPENAI_API_KEY\",\n \"OPENROUTER_API_KEY\",\n \"GOOGLE_GENERATIVE_AI_API_KEY\",\n ],\n },\n },\n sandbox: \"./SANDBOX.md\",\n protocol: \"print\",\n print: {\n prompt_flag: \"--prompt\",\n output_format: [\"--output\", \"jsonl\"],\n pre_prompt: [],\n resume: { flag: \"--thread\", kind: \"value\" },\n event_schema: \"mastra-jsonl\",\n },\n session: {\n mode: \"ephemeral\",\n idle_timeout_ms: 1_800_000,\n context_carryover: false,\n },\n models: {\n default: \"anthropic/claude-sonnet-4-5\",\n allowed: [\n \"anthropic/claude-sonnet-4-5\",\n \"anthropic/claude-sonnet-4-6\",\n \"openai/gpt-5.1\",\n \"openai/gpt-5.1-mini\",\n \"google/gemini-2.5-flash\",\n \"openrouter/anthropic/claude-sonnet-4-6\",\n ],\n env: {\n anthropic: \"ANTHROPIC_API_KEY\",\n openai: \"OPENAI_API_KEY\",\n openrouter: \"OPENROUTER_API_KEY\",\n google: \"GOOGLE_GENERATIVE_AI_API_KEY\",\n },\n },\n capabilities: {\n streaming: true,\n tool_calls: true,\n sub_agents: true,\n file_io: true,\n multimodal: false,\n // `mastracode --thread <id>` reattaches to a prior thread with real\n // persisted memory (confirmed cross-process: separate spawn, same\n // thread id, correct continuity). `print.resume` below drives this.\n resumable: true,\n bidirectional: false,\n },\n modes: [\n {\n id: \"default\",\n description:\n \"Default headless mode. Mastra Code defaults to build mode when omitted.\",\n },\n {\n id: \"plan\",\n description:\n \"Plan-only mode — analyze architecture and propose implementation plans before writing code.\",\n bin_args_append: [\"--mode\", \"plan\"],\n },\n {\n id: \"build\",\n description:\n \"Build mode — file edits and shell commands use Mastra Code's configured permissions.\",\n bin_args_append: [\"--mode\", \"build\"],\n },\n {\n id: \"fast\",\n description: \"Fast mode — lower-latency answers and small edits.\",\n bin_args_append: [\"--mode\", \"fast\"],\n },\n ],\n options: [\n {\n id: \"model\",\n type: \"string\",\n description:\n \"Provider/model override for this operator binding (e.g. `anthropic/claude-sonnet-4-5`).\",\n bin_args_template: [\"--model\", \"{value}\"],\n },\n {\n id: \"thinking_level\",\n type: \"enum\",\n enum: [\"off\", \"low\", \"medium\", \"high\", \"xhigh\"],\n description: \"Thinking level passed to Mastra Code.\",\n bin_args_template: [\"--thinking-level\", \"{value}\"],\n },\n {\n id: \"timeout\",\n type: \"integer\",\n min: 1,\n max: 86_400,\n description: \"Maximum headless run duration in seconds.\",\n bin_args_template: [\"--timeout\", \"{value}\"],\n },\n ],\n continuation: {\n default: \"none\",\n supported: [\"none\", \"transcript\", \"native-resume\"],\n },\n metadata: {\n acp: {\n checked: \"2026-06-30\",\n result:\n \"`mastracode acp --help` prints top-level Mastra Code help; no ACP subcommand is currently discoverable.\",\n },\n },\n tags: [\"mastracode\", \"mastra\", \"print\", \"agent-runtime\", \"coding\"],\n})\n\nexport function mastracodeRuntime(): AgentCliRuntime {\n return createAgentCliRuntime(mastracode)\n}\n\nexport type { AgentCliHandle, AgentCliRuntime }\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentproto/adapter-mastracode",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "@agentproto/adapter-mastracode — AIP-45 AGENT-CLI adapter for Mastra Code. Spawns the documented headless CLI via `npx -y mastracode`; current Mastra Code does not expose a discoverable ACP subcommand.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agentproto",
|
|
7
|
+
"aip-45",
|
|
8
|
+
"mastracode",
|
|
9
|
+
"mastra",
|
|
10
|
+
"print",
|
|
11
|
+
"agent-cli",
|
|
12
|
+
"adapter"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://agentproto.sh/docs/aip-45",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/agentproto/ts",
|
|
18
|
+
"directory": "adapters/mastracode"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "dist/index.mjs",
|
|
23
|
+
"module": "dist/index.mjs",
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.mjs",
|
|
29
|
+
"default": "./dist/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./MASTRACODE.md": "./MASTRACODE.md",
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"MASTRACODE.md",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@agentproto/driver-agent-cli": "0.3.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.6.2",
|
|
48
|
+
"tsup": "^8.5.1",
|
|
49
|
+
"typescript": "^5.9.3",
|
|
50
|
+
"vitest": "^3.2.4",
|
|
51
|
+
"@agentproto/tooling": "0.1.0-alpha.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"dev": "tsup --watch",
|
|
55
|
+
"build": "tsup",
|
|
56
|
+
"clean": "rm -rf dist",
|
|
57
|
+
"check-types": "tsc --noEmit",
|
|
58
|
+
"test": "vitest run --passWithNoTests",
|
|
59
|
+
"test:watch": "vitest"
|
|
60
|
+
}
|
|
61
|
+
}
|