mastracode 0.22.0-alpha.0 → 0.22.1-alpha.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/CHANGELOG.md +28 -0
- package/dist/HarnessCompat.d.ts +2 -21
- package/dist/HarnessCompat.d.ts.map +1 -1
- package/dist/{chunk-DFC5V3P7.cjs → chunk-G2TNUR63.cjs} +30 -93
- package/dist/chunk-G2TNUR63.cjs.map +1 -0
- package/dist/{chunk-Y5AUV6T3.js → chunk-G76EJQC6.js} +30 -93
- package/dist/chunk-G76EJQC6.js.map +1 -0
- package/dist/{chunk-CE2LOWNS.js → chunk-LK44A4U2.js} +27 -4
- package/dist/chunk-LK44A4U2.js.map +1 -0
- package/dist/{chunk-2FZWQ2M4.cjs → chunk-N4S7ZX75.cjs} +27 -4
- package/dist/chunk-N4S7ZX75.cjs.map +1 -0
- package/dist/cli.cjs +8 -8
- package/dist/cli.js +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schema.d.ts +4 -7
- package/dist/schema.d.ts.map +1 -1
- package/dist/tui/commands/github.d.ts +14 -0
- package/dist/tui/commands/github.d.ts.map +1 -1
- package/dist/tui/handlers/agent-lifecycle.d.ts.map +1 -1
- package/dist/tui.cjs +11 -11
- package/dist/tui.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-2FZWQ2M4.cjs.map +0 -1
- package/dist/chunk-CE2LOWNS.js.map +0 -1
- package/dist/chunk-DFC5V3P7.cjs.map +0 -1
- package/dist/chunk-Y5AUV6T3.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.22.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Auto-subscribe to the current branch's PR via GitHub Signals at the end of each agent run. When experimental GitHub Signals are enabled in /settings and the checked-out branch has an open PR, the thread is automatically subscribed (once per thread, fire-and-forget). ([#17538](https://github.com/mastra-ai/mastra/pull/17538))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ae1fa3a`](https://github.com/mastra-ai/mastra/commit/ae1fa3a9c40510f1e068ffc2345cf09f9ee32b26)]:
|
|
10
|
+
- @mastra/core@1.40.0-alpha.0
|
|
11
|
+
|
|
12
|
+
## 0.22.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- Add a /notify command that opens a modal composer, sends agent notifications from MastraCode, dispatches due notification summaries in the background, and exposes the notification inbox tool to inspect summarized notifications. ([#17241](https://github.com/mastra-ai/mastra/pull/17241))
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Added GitHub PR notifications in Mastra Code with subscription management, manual sync, PR status badges, subscription hints, automatic merged PR cleanup, and inbox access. ([#17447](https://github.com/mastra-ai/mastra/pull/17447))
|
|
21
|
+
|
|
22
|
+
- Fixed mode switching crash when no active thread exists. Previously, pressing Shift+Tab to cycle modes before sending a first message would cause a fatal error. ([#17511](https://github.com/mastra-ai/mastra/pull/17511))
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`c973db4`](https://github.com/mastra-ai/mastra/commit/c973db428df1b564ff0c35d4b2a90e8f4f1e13fd), [`552285e`](https://github.com/mastra-ai/mastra/commit/552285e5af43cfc680a0972032cab8de8776c6a0), [`77e686c`](https://github.com/mastra-ai/mastra/commit/77e686c264e493e99ae5024e4dfe3ea5d5a09718), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`ece8dba`](https://github.com/mastra-ai/mastra/commit/ece8dba7ec1a5089eee8c33167cd762bfa91e509), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`be3f1cd`](https://github.com/mastra-ai/mastra/commit/be3f1cd81f0e2a649e8eac15a024d542d814aef8), [`43dd577`](https://github.com/mastra-ai/mastra/commit/43dd577aa2b056b86b92cb903433f4fc13e69687), [`e2a8380`](https://github.com/mastra-ai/mastra/commit/e2a838017a7657850404c1e94c70d79ffdc6f14a), [`be3f1cd`](https://github.com/mastra-ai/mastra/commit/be3f1cd81f0e2a649e8eac15a024d542d814aef8), [`a34d9db`](https://github.com/mastra-ai/mastra/commit/a34d9dbc39fedb722f271318e9355ecee70489ab)]:
|
|
25
|
+
- @mastra/core@1.39.0
|
|
26
|
+
- @mastra/mcp@1.9.1
|
|
27
|
+
- @mastra/libsql@1.12.1
|
|
28
|
+
- @mastra/pg@1.12.1
|
|
29
|
+
- @mastra/memory@1.20.2
|
|
30
|
+
|
|
3
31
|
## 0.22.0-alpha.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/dist/HarnessCompat.d.ts
CHANGED
|
@@ -14,16 +14,7 @@ type CloneSessionOptions = {
|
|
|
14
14
|
export declare function v1ModeToLegacy<TState = {}>(mode: HarnessMode, agent: Agent): HarnessModeLegacy<TState>;
|
|
15
15
|
export declare class HarnessCompat<TState = {}> extends HarnessLegacy<TState> {
|
|
16
16
|
#private;
|
|
17
|
-
constructor(args: HarnessConfig<TState>, harnessV1: Harness<HarnessMode[]
|
|
18
|
-
getState(): Readonly<TState>;
|
|
19
|
-
setState(updates: Partial<TState>): Promise<void>;
|
|
20
|
-
getSubagentModelId({ agentType }?: {
|
|
21
|
-
agentType?: string;
|
|
22
|
-
}): string | null;
|
|
23
|
-
setSubagentModelId({ modelId, agentType }: {
|
|
24
|
-
modelId: string;
|
|
25
|
-
agentType?: string;
|
|
26
|
-
}): Promise<void>;
|
|
17
|
+
constructor(args: HarnessConfig<TState>, harnessV1: Harness<HarnessMode[]>);
|
|
27
18
|
switchThread({ threadId }: {
|
|
28
19
|
threadId: string;
|
|
29
20
|
}): Promise<void>;
|
|
@@ -31,7 +22,7 @@ export declare class HarnessCompat<TState = {}> extends HarnessLegacy<TState> {
|
|
|
31
22
|
allResources?: boolean;
|
|
32
23
|
includeForkedSubagents?: boolean;
|
|
33
24
|
}): Promise<HarnessThread[]>;
|
|
34
|
-
cloneSession(opts?: CloneSessionOptions): Promise<Session
|
|
25
|
+
cloneSession(opts?: CloneSessionOptions): Promise<Session>;
|
|
35
26
|
cloneThread({ sourceThreadId, title, resourceId, }?: {
|
|
36
27
|
sourceThreadId?: string;
|
|
37
28
|
title?: string;
|
|
@@ -45,16 +36,6 @@ export declare class HarnessCompat<TState = {}> extends HarnessLegacy<TState> {
|
|
|
45
36
|
switchMode({ modeId }: {
|
|
46
37
|
modeId: string;
|
|
47
38
|
}): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Activate a skill on the current v1 session.
|
|
50
|
-
*
|
|
51
|
-
* Pass-through to `Session.useSkill` — returns the resolved instructions
|
|
52
|
-
* string, or throws `HarnessSkillNotFoundError` if the skill is missing.
|
|
53
|
-
* Throws if there is no active session.
|
|
54
|
-
*/
|
|
55
|
-
useSkill(name: string, opts?: {
|
|
56
|
-
args?: Record<string, unknown>;
|
|
57
|
-
}): Promise<string>;
|
|
58
39
|
}
|
|
59
40
|
export {};
|
|
60
41
|
//# sourceMappingURL=HarnessCompat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HarnessCompat.d.ts","sourceRoot":"","sources":["../src/HarnessCompat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,IAAI,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAE7E,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"HarnessCompat.d.ts","sourceRoot":"","sources":["../src/HarnessCompat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,IAAI,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAE7E,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,wBAAgB,cAAc,CAAC,MAAM,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAUtG;AAED,qBAAa,aAAa,CAAC,MAAM,GAAG,EAAE,CAAE,SAAQ,aAAa,CAAC,MAAM,CAAC;;gBAIvD,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;IAMpE,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB/D,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA4C7G,YAAY,CAAC,IAAI,GAAE,mBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS9D,WAAW,CAAC,EAChB,cAAc,EACd,KAAK,EACL,UAAU,GACX,GAAE;QACD,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,aAAa,CAAC;IAiC/B,cAAc,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAc3C;;;OAGG;IACG,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAYhE"}
|
|
@@ -603,7 +603,7 @@ function getDynamicWorkspace({ requestContext, mastra: mastra2 }) {
|
|
|
603
603
|
return existing;
|
|
604
604
|
}
|
|
605
605
|
const userLsp = chunkEAUXUMEB_cjs.loadSettings().lsp ?? {};
|
|
606
|
-
const mcModulePath = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
606
|
+
const mcModulePath = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-G2TNUR63.cjs', document.baseURI).href)))), "..");
|
|
607
607
|
const lspConfig = {
|
|
608
608
|
...userLsp,
|
|
609
609
|
packageRunner: userLsp.packageRunner || detectPackageRunner(projectPath),
|
|
@@ -1052,7 +1052,7 @@ ${lines.join("\n")}
|
|
|
1052
1052
|
// src/agents/instructions.ts
|
|
1053
1053
|
async function getDynamicInstructions({ requestContext }) {
|
|
1054
1054
|
const harnessContext = requestContext.get("harness");
|
|
1055
|
-
const state = harnessContext?.
|
|
1055
|
+
const state = harnessContext?.state;
|
|
1056
1056
|
const modeId = harnessContext?.modeId ?? "build";
|
|
1057
1057
|
const projectPath = state?.projectPath ?? process.cwd();
|
|
1058
1058
|
const promptCtx = {
|
|
@@ -1402,7 +1402,7 @@ function wrapToolWithHooks(toolName, tool, hookManager) {
|
|
|
1402
1402
|
function createDynamicTools(mcpManager, extraTools, hookManager, disabledTools, storage) {
|
|
1403
1403
|
return function getDynamicTools({ requestContext }) {
|
|
1404
1404
|
const ctx = requestContext.get("harness");
|
|
1405
|
-
const state = ctx?.getState
|
|
1405
|
+
const state = ctx?.getState();
|
|
1406
1406
|
const modelId = state?.currentModelId;
|
|
1407
1407
|
const isAnthropicModel = modelId?.startsWith("anthropic/");
|
|
1408
1408
|
const isOpenAIModel = modelId?.startsWith("openai/");
|
|
@@ -1983,62 +1983,15 @@ var HarnessCompat = class extends harness.Harness {
|
|
|
1983
1983
|
super(args);
|
|
1984
1984
|
this.#harnessV1 = harnessV1;
|
|
1985
1985
|
}
|
|
1986
|
-
getState() {
|
|
1987
|
-
const state = super.getState();
|
|
1988
|
-
let session;
|
|
1989
|
-
try {
|
|
1990
|
-
session = this.#session;
|
|
1991
|
-
} catch {
|
|
1992
|
-
session = void 0;
|
|
1993
|
-
}
|
|
1994
|
-
if (!session) {
|
|
1995
|
-
return state;
|
|
1996
|
-
}
|
|
1997
|
-
return {
|
|
1998
|
-
...state,
|
|
1999
|
-
...session.getState(),
|
|
2000
|
-
currentModelId: session.getModelId(),
|
|
2001
|
-
modeId: session.getMode().id
|
|
2002
|
-
};
|
|
2003
|
-
}
|
|
2004
|
-
async setState(updates) {
|
|
2005
|
-
const { currentModelId, modeId, ...harnessUpdates } = updates;
|
|
2006
|
-
let session;
|
|
2007
|
-
try {
|
|
2008
|
-
session = this.#session;
|
|
2009
|
-
} catch {
|
|
2010
|
-
session = void 0;
|
|
2011
|
-
}
|
|
2012
|
-
if (session) {
|
|
2013
|
-
if (typeof currentModelId === "string") {
|
|
2014
|
-
session.setModelId(currentModelId);
|
|
2015
|
-
}
|
|
2016
|
-
if (typeof modeId === "string" && modeId !== session.getMode().id) {
|
|
2017
|
-
await this.switchMode({ modeId });
|
|
2018
|
-
}
|
|
2019
|
-
}
|
|
2020
|
-
if (Object.keys(harnessUpdates).length > 0) {
|
|
2021
|
-
if (session) {
|
|
2022
|
-
await session.setState(harnessUpdates);
|
|
2023
|
-
}
|
|
2024
|
-
await super.setState(harnessUpdates);
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
getSubagentModelId({ agentType } = {}) {
|
|
2028
|
-
return super.getSubagentModelId({ agentType });
|
|
2029
|
-
}
|
|
2030
|
-
async setSubagentModelId({ modelId, agentType }) {
|
|
2031
|
-
await super.setSubagentModelId({ modelId, agentType });
|
|
2032
|
-
}
|
|
2033
1986
|
async switchThread({ threadId }) {
|
|
2034
|
-
const
|
|
2035
|
-
|
|
1987
|
+
const modes = this.listModes();
|
|
1988
|
+
this.#session = await this.#harnessV1.session({
|
|
2036
1989
|
threadId,
|
|
2037
1990
|
resourceId: this.getResourceId()
|
|
2038
1991
|
});
|
|
2039
|
-
|
|
2040
|
-
if (
|
|
2041
|
-
session.setModelId(
|
|
1992
|
+
const defaultModelId = modes.find((mode) => mode.id === this.#session.getMode().id)?.defaultModelId;
|
|
1993
|
+
if (defaultModelId) {
|
|
1994
|
+
this.#session.setModelId(defaultModelId);
|
|
2042
1995
|
}
|
|
2043
1996
|
await super.switchThread({ threadId });
|
|
2044
1997
|
}
|
|
@@ -2138,19 +2091,6 @@ var HarnessCompat = class extends harness.Harness {
|
|
|
2138
2091
|
}
|
|
2139
2092
|
await super.switchMode({ modeId });
|
|
2140
2093
|
}
|
|
2141
|
-
/**
|
|
2142
|
-
* Activate a skill on the current v1 session.
|
|
2143
|
-
*
|
|
2144
|
-
* Pass-through to `Session.useSkill` — returns the resolved instructions
|
|
2145
|
-
* string, or throws `HarnessSkillNotFoundError` if the skill is missing.
|
|
2146
|
-
* Throws if there is no active session.
|
|
2147
|
-
*/
|
|
2148
|
-
async useSkill(name, opts) {
|
|
2149
|
-
if (!this.#session) {
|
|
2150
|
-
throw new Error("No active session to use skill");
|
|
2151
|
-
}
|
|
2152
|
-
return this.#session.useSkill(name, opts);
|
|
2153
|
-
}
|
|
2154
2094
|
};
|
|
2155
2095
|
var VALID_EVENTS = [
|
|
2156
2096
|
"PreToolUse",
|
|
@@ -2995,12 +2935,15 @@ function createMcpManager(projectDir, configDirName = chunkJ3ISOP5J_cjs.DEFAULT_
|
|
|
2995
2935
|
};
|
|
2996
2936
|
}
|
|
2997
2937
|
var stateSchema = zod.z.object({
|
|
2998
|
-
subagentModelId: zod.z.string().optional(),
|
|
2999
2938
|
projectPath: zod.z.string().optional(),
|
|
3000
2939
|
projectName: zod.z.string().optional(),
|
|
3001
2940
|
configDir: zod.z.string().default(chunkJ3ISOP5J_cjs.DEFAULT_CONFIG_DIR),
|
|
3002
2941
|
gitBranch: zod.z.string().optional(),
|
|
3003
2942
|
lastCommand: zod.z.string().optional(),
|
|
2943
|
+
currentModelId: zod.z.string().default(""),
|
|
2944
|
+
// Subagent model settings (per-thread/per-mode)
|
|
2945
|
+
subagentModelId: zod.z.string().optional(),
|
|
2946
|
+
// Thread-level default for subagents
|
|
3004
2947
|
// Observational Memory model settings
|
|
3005
2948
|
observerModelId: zod.z.string().default(chunkJ3ISOP5J_cjs.DEFAULT_OM_MODEL_ID),
|
|
3006
2949
|
reflectorModelId: zod.z.string().default(chunkJ3ISOP5J_cjs.DEFAULT_OM_MODEL_ID),
|
|
@@ -3412,7 +3355,7 @@ async function createMastraCode(config) {
|
|
|
3412
3355
|
// Environment & project:
|
|
3413
3356
|
// state.projectName, state.gitBranch
|
|
3414
3357
|
// Model configuration:
|
|
3415
|
-
// state.currentModelId
|
|
3358
|
+
// state.currentModelId, state.subagentModelId
|
|
3416
3359
|
// Agent settings:
|
|
3417
3360
|
// state.yolo, state.thinkingLevel, state.smartEditing
|
|
3418
3361
|
// Observational memory settings:
|
|
@@ -3429,6 +3372,7 @@ async function createMastraCode(config) {
|
|
|
3429
3372
|
"harness.state.gitBranch",
|
|
3430
3373
|
// Model configuration
|
|
3431
3374
|
"harness.state.currentModelId",
|
|
3375
|
+
"harness.state.subagentModelId",
|
|
3432
3376
|
// Agent settings
|
|
3433
3377
|
"harness.state.yolo",
|
|
3434
3378
|
"harness.state.thinkingLevel",
|
|
@@ -3678,32 +3622,15 @@ async function createMastraCode(config) {
|
|
|
3678
3622
|
});
|
|
3679
3623
|
})
|
|
3680
3624
|
);
|
|
3681
|
-
const typedStateSchema = stateSchema;
|
|
3682
|
-
const initialState = {
|
|
3683
|
-
projectPath: project.rootPath,
|
|
3684
|
-
projectName: project.name,
|
|
3685
|
-
gitBranch: project.gitBranch,
|
|
3686
|
-
yolo: true,
|
|
3687
|
-
...globalInitialState,
|
|
3688
|
-
...config?.initialState,
|
|
3689
|
-
// configDir must always win over initialState spreads to stay in sync
|
|
3690
|
-
// with MCP/hooks/storage which were already initialized with this value.
|
|
3691
|
-
configDir
|
|
3692
|
-
};
|
|
3693
|
-
const workspace = config?.workspace ?? getDynamicWorkspace;
|
|
3694
3625
|
const harnessV1 = new v1.Harness({
|
|
3695
3626
|
ownerId,
|
|
3696
3627
|
agents: { [CODE_AGENT_ID]: codeAgent },
|
|
3697
3628
|
memory,
|
|
3698
3629
|
modes: modesV1,
|
|
3699
3630
|
defaultModeId,
|
|
3700
|
-
storage: harnessStorage
|
|
3701
|
-
stateSchema: typedStateSchema,
|
|
3702
|
-
initialState,
|
|
3703
|
-
workspace,
|
|
3704
|
-
resolveModel: (modelId) => chunkEAUXUMEB_cjs.resolveModel(modelId),
|
|
3705
|
-
toolCategoryResolver: (name) => chunkJHYTJMKT_cjs.getToolCategory(name) ?? null
|
|
3631
|
+
storage: harnessStorage
|
|
3706
3632
|
});
|
|
3633
|
+
const typedStateSchema = stateSchema;
|
|
3707
3634
|
const harness = new HarnessCompat(
|
|
3708
3635
|
{
|
|
3709
3636
|
id: "mastra-code",
|
|
@@ -3716,8 +3643,18 @@ async function createMastraCode(config) {
|
|
|
3716
3643
|
subagents,
|
|
3717
3644
|
resolveModel: (modelId) => chunkEAUXUMEB_cjs.resolveModel(modelId),
|
|
3718
3645
|
toolCategoryResolver: chunkJHYTJMKT_cjs.getToolCategory,
|
|
3719
|
-
initialState
|
|
3720
|
-
|
|
3646
|
+
initialState: {
|
|
3647
|
+
projectPath: project.rootPath,
|
|
3648
|
+
projectName: project.name,
|
|
3649
|
+
gitBranch: project.gitBranch,
|
|
3650
|
+
yolo: true,
|
|
3651
|
+
...globalInitialState,
|
|
3652
|
+
...config?.initialState,
|
|
3653
|
+
// configDir must always win over initialState spreads to stay in sync
|
|
3654
|
+
// with MCP/hooks/storage which were already initialized with this value.
|
|
3655
|
+
configDir
|
|
3656
|
+
},
|
|
3657
|
+
workspace: config?.workspace ?? getDynamicWorkspace,
|
|
3721
3658
|
browser: config?.browser,
|
|
3722
3659
|
modes,
|
|
3723
3660
|
heartbeatHandlers,
|
|
@@ -3857,5 +3794,5 @@ async function createMastraCode(config) {
|
|
|
3857
3794
|
|
|
3858
3795
|
exports.createAuthStorage = createAuthStorage;
|
|
3859
3796
|
exports.createMastraCode = createMastraCode;
|
|
3860
|
-
//# sourceMappingURL=chunk-
|
|
3861
|
-
//# sourceMappingURL=chunk-
|
|
3797
|
+
//# sourceMappingURL=chunk-G2TNUR63.cjs.map
|
|
3798
|
+
//# sourceMappingURL=chunk-G2TNUR63.cjs.map
|