@agent-harness-experimental/adapter-mastra 0.0.0 → 0.0.3
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 +1 -0
- package/README.md +97 -2
- package/dist/adapter.d.ts +15 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +282 -0
- package/dist/adapter.js.map +1 -0
- package/dist/bridge-continuation.mts +1 -0
- package/dist/bridge-delegation.mts +1 -0
- package/dist/bridge-parse.mts +5 -0
- package/dist/bridge-prompt-blocks.mts +1 -0
- package/dist/bridge-tool-policy.mts +1 -0
- package/dist/bridge-ws-server.mts +1 -0
- package/dist/bridge.mts +705 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/pnpm-lock.yaml +2062 -0
- package/dist/setup.d.ts +5 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +45 -0
- package/dist/setup.js.map +1 -0
- package/package.json +53 -3
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AdapterSandboxFileContext, AdapterSandboxSetup, AdapterSupportMatrixRow } from 'agent-harness-experimental';
|
|
2
|
+
export declare const MASTRA_SANDBOX_SETUP: import("@agent-harness-experimental/bridge").DefinedBridgeSandboxSetup<AdapterSandboxFileContext>;
|
|
3
|
+
export declare const MASTRA_SUPPORT_MATRIX_ROW: AdapterSupportMatrixRow;
|
|
4
|
+
export declare function getMastraSandboxSetup(): AdapterSandboxSetup;
|
|
5
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG1H,eAAO,MAAM,oBAAoB,mGAQD,CAAC;AAEjC,eAAO,MAAM,yBAAyB,EAAE,uBA8BvC,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,mBAAmB,CAE3D"}
|
package/dist/setup.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineBridgeSandboxSetup } from '@agent-harness-experimental/bridge';
|
|
2
|
+
export const MASTRA_SANDBOX_SETUP = defineBridgeSandboxSetup(import.meta.url, {
|
|
3
|
+
deps: ['@mastra/core', 'zod', 'ws'],
|
|
4
|
+
lockfile: 'pnpm-lock.yaml',
|
|
5
|
+
bridge: 'bridge.mts',
|
|
6
|
+
localBridgeFiles: ['bridge-parse.mts'],
|
|
7
|
+
getSandboxFiles(_ctx) {
|
|
8
|
+
return [];
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
export const MASTRA_SUPPORT_MATRIX_ROW = {
|
|
12
|
+
key: 'mastra',
|
|
13
|
+
readmeName: 'Mastra',
|
|
14
|
+
skills: 'Rendered directly into agent instructions',
|
|
15
|
+
subagents: 'Bridge-local `delegate_task` tool, prompt, model, maxTurns, and tool filtering',
|
|
16
|
+
prepareStep: '`step`',
|
|
17
|
+
mcp: 'AI SDK tools via `@ai-sdk/mcp`',
|
|
18
|
+
capabilities: {
|
|
19
|
+
customTools: { status: 'supported' },
|
|
20
|
+
toolFiltering: { status: 'supported' },
|
|
21
|
+
postToolUseHooks: { status: 'supported' },
|
|
22
|
+
toolInterception: { status: 'unsupported' },
|
|
23
|
+
usage: { status: 'unsupported' },
|
|
24
|
+
cost: { status: 'unsupported' },
|
|
25
|
+
httpMocking: { status: 'supported' },
|
|
26
|
+
prepareStep: { status: 'supported', normalized: true, note: 'Normalized at step boundaries.' },
|
|
27
|
+
subagents: { status: 'supported', normalized: true, note: 'Bridge-local subagents emit normalized start/finish events.' },
|
|
28
|
+
toolApprovals: { status: 'supported', normalized: true },
|
|
29
|
+
streamingApprovals: { status: 'unsupported', note: 'Approval continuation is not normalized for stream mode yet.' },
|
|
30
|
+
sameAgentResume: { status: 'supported' },
|
|
31
|
+
conversationResume: {
|
|
32
|
+
status: 'partial',
|
|
33
|
+
note: 'Same-agent resume preserves conversation context; core-history import/export is not a separate contract yet.',
|
|
34
|
+
},
|
|
35
|
+
hostNetworkApproval: { status: 'supported', normalized: true },
|
|
36
|
+
persistence: { status: 'supported' },
|
|
37
|
+
streaming: { status: 'supported' },
|
|
38
|
+
tokenStreaming: { status: 'partial', note: 'Bridge output is step/message-level; token-level deltas are adapter-dependent.' },
|
|
39
|
+
interactiveTerminal: { status: 'partial', note: 'Shell execution is available, but PTY semantics are not a stable contract.' },
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export function getMastraSandboxSetup() {
|
|
43
|
+
return MASTRA_SANDBOX_SETUP;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAA4B,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;IACvG,IAAI,EAAE,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC;IACnC,QAAQ,EAAE,gBAAgB;IAC1B,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,CAAC,kBAAkB,CAAC;IACtC,eAAe,CAAC,IAA+B;QAC7C,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAA+B,CAAC;AAEjC,MAAM,CAAC,MAAM,yBAAyB,GAA4B;IAChE,GAAG,EAAE,QAAQ;IACb,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,2CAA2C;IACnD,SAAS,EAAE,gFAAgF;IAC3F,WAAW,EAAE,QAAQ;IACrB,GAAG,EAAE,gCAAgC;IACrC,YAAY,EAAE;QACZ,WAAW,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|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-harness-experimental/adapter-mastra",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Experimental Mastra adapter for agent-harness-experimental.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vercel-labs/agent-harness-sdk.git",
|
|
9
|
+
"directory": "packages/adapter-mastra"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/vercel-labs/agent-harness-sdk/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/vercel-labs/agent-harness-sdk#readme",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"agent",
|
|
17
|
+
"harness",
|
|
18
|
+
"experimental",
|
|
19
|
+
"ai-sdk",
|
|
20
|
+
"sandbox"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"agent-harness-experimental": "0.0.3",
|
|
34
|
+
"@agent-harness-experimental/bridge": "0.0.3",
|
|
35
|
+
"@agent-harness-experimental/sandbox-vercel": "0.0.3",
|
|
36
|
+
"@agent-harness-experimental/protocol": "0.0.3"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@mastra/core": "1.32.1",
|
|
40
|
+
"typescript": "^5.8.3",
|
|
41
|
+
"zod": "^4.3.6"
|
|
42
|
+
},
|
|
43
|
+
"main": "./dist/index.js",
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"files": [
|
|
47
|
+
"dist"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"lint": "biome check src package.json tsconfig.json tsconfig.build.json",
|
|
51
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
52
|
+
"test": "vitest run --config ../../vitest.package.config.ts src/adapter.test.ts",
|
|
53
|
+
"build": "tsc -p tsconfig.build.json && tsx ../../scripts/copy-package-assets.ts packages/adapter-mastra"
|
|
54
|
+
}
|
|
55
|
+
}
|