@mastra/code-sdk 1.18.0 → 1.19.0-alpha.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/dist/acp/agent.js +2 -2
- package/dist/acp/runtime.js +2 -2
- package/dist/agent-connections/state-processor.js +3 -3
- package/dist/agent-connections/tools.js +2 -2
- package/dist/agents/instructions.d.ts +5 -2
- package/dist/agents/instructions.d.ts.map +1 -1
- package/dist/agents/instructions.js +5 -3
- package/dist/agents/instructions.js.map +1 -1
- package/dist/agents/mastracode-gateway.d.ts +1 -0
- package/dist/agents/mastracode-gateway.d.ts.map +1 -1
- package/dist/agents/mastracode-gateway.js +12 -8
- package/dist/agents/mastracode-gateway.js.map +1 -1
- package/dist/agents/memory.js +2 -2
- package/dist/agents/model.js +5 -5
- package/dist/agents/prompts/index.d.ts +2 -0
- package/dist/agents/prompts/index.d.ts.map +1 -1
- package/dist/agents/prompts/index.js +8 -5
- package/dist/agents/prompts/index.js.map +1 -1
- package/dist/agents/prompts/plan.d.ts +1 -0
- package/dist/agents/prompts/plan.d.ts.map +1 -1
- package/dist/agents/prompts/plan.js +4 -1
- package/dist/agents/prompts/plan.js.map +1 -1
- package/dist/agents/prompts/tool-guidance.d.ts.map +1 -1
- package/dist/agents/prompts/tool-guidance.js +9 -1
- package/dist/agents/prompts/tool-guidance.js.map +1 -1
- package/dist/agents/tool-availability.d.ts +7 -2
- package/dist/agents/tool-availability.d.ts.map +1 -1
- package/dist/agents/tool-availability.js +15 -7
- package/dist/agents/tool-availability.js.map +1 -1
- package/dist/agents/tools.js +2 -2
- package/dist/agents/workflow-builder-agent.js +2 -2
- package/dist/agents/workspace.d.ts +3 -1
- package/dist/agents/workspace.d.ts.map +1 -1
- package/dist/agents/workspace.js +3 -3
- package/dist/agents/workspace.js.map +1 -1
- package/dist/auth/account-rotation-processor.js +4 -4
- package/dist/auth/index.js +3 -3
- package/dist/evals/index.js +1 -1
- package/dist/factory/client.d.ts +4 -1
- package/dist/factory/client.d.ts.map +1 -1
- package/dist/factory/client.js +22 -7
- package/dist/factory/client.js.map +1 -1
- package/dist/headless/cli.js +7 -7
- package/dist/headless/index.js +2 -2
- package/dist/headless/run-mc.js +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -33
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/onboarding/settings.js +2 -2
- package/dist/plugins/install.js +2 -2
- package/dist/plugins/manager.js +3 -3
- package/dist/providers/claude-max.js +5 -5
- package/dist/providers/claude-max.js.map +1 -1
- package/dist/providers/github-copilot.js +2 -2
- package/dist/providers/github-copilot.js.map +1 -1
- package/dist/providers/google-thinking.js +1 -1
- package/dist/providers/google-thinking.js.map +1 -1
- package/dist/providers/kimi-coding.js +1 -1
- package/dist/providers/openai-codex.js +5 -5
- package/dist/providers/openai-codex.js.map +1 -1
- package/dist/providers/provider-thinking.d.ts +1 -1
- package/dist/providers/provider-thinking.d.ts.map +1 -1
- package/dist/providers/provider-thinking.js +2 -2
- package/dist/providers/provider-thinking.js.map +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/schedules/tools.js +1 -1
- package/dist/tools/utils.js +1 -1
- package/dist/tools/workflows/list-available-tools.js +1 -1
- package/dist/utils/plans.d.ts +2 -0
- package/dist/utils/plans.d.ts.map +1 -1
- package/dist/utils/plans.js +6 -0
- package/dist/utils/plans.js.map +1 -1
- package/dist/utils/prune-cli.js +2 -2
- package/dist/voice/stt-registry.d.ts +6 -3
- package/dist/voice/stt-registry.d.ts.map +1 -1
- package/dist/voice/stt-registry.js +13 -10
- package/dist/voice/stt-registry.js.map +1 -1
- package/dist/voice/transcribe.d.ts +10 -0
- package/dist/voice/transcribe.d.ts.map +1 -0
- package/dist/voice/transcribe.js +77 -0
- package/dist/voice/transcribe.js.map +1 -0
- package/dist/workflows/register-primitives.js +2 -2
- package/package.json +19 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":[],"sources":["../../src/factory/client.ts"],"sourcesContent":["import { MastraClient } from '@mastra/client-js';\n\nimport { getPlatformSession } from '../platform/index.js';\nimport type { PlatformSession } from '../platform/index.js';\n\n/** The agent controller every Factory serves its coding sessions under. */\nexport const FACTORY_CONTROLLER_ID = 'code';\n\nconst ORGANIZATION_ID_HEADER = 'X-Mastra-Organization-Id';\n\nexport interface FactoryAddress {\n url: string;\n session: PlatformSession;\n}\n\nexport interface FactoryRepository {\n projectRepositoryId: string;\n slug: string;\n branch?: string;\n}\n\nexport interface FactoryProject {\n id: string;\n name: string;\n repositories: FactoryRepository[];\n}\n\nexport interface FactoryUserSession {\n sessionId: string;\n projectRepositoryId: string;\n title?: string;\n branch: string;\n updatedAt: string;\n}\n\nexport function factoryHeaders({ session }: FactoryAddress): Record<string, string> {\n return { Authorization: `Bearer ${session.token}`, [ORGANIZATION_ID_HEADER]: session.orgId };\n}\n\nasync function factoryFetch<T>(address: FactoryAddress, path: string, init?: { method?: string; body?: unknown }) {\n const res = await refreshingFetch(address)(`${address.url.replace(/\\/$/, '')}${path}`, {\n method: init?.method ?? 'GET',\n headers: {\n Accept: 'application/json',\n ...(init?.body !== undefined ? { 'content-type': 'application/json' } : {}),\n },\n body: init?.body !== undefined ? JSON.stringify(init.body) : undefined,\n });\n if (!res.ok) {\n const body = (await res.json().catch(() => ({}))) as { error?: string; message?: string };\n throw new Error(\n `Factory request ${path} failed (${res.status})${body.message || body.error ? `: ${body.message ?? body.error}` : ''}`,\n );\n }\n return (await res.json()) as T;\n}\n\ninterface ProjectConnectionPayload {\n repositories: Array<{\n id: string;\n branch: string | null;\n repository: { slug: string; defaultBranch: string } | null;\n }>;\n}\n\n
|
|
1
|
+
{"version":3,"file":"client.js","names":[],"sources":["../../src/factory/client.ts"],"sourcesContent":["import { MastraClient } from '@mastra/client-js';\n\nimport { getPlatformSession } from '../platform/index.js';\nimport type { PlatformSession } from '../platform/index.js';\n\n/** The agent controller every Factory serves its coding sessions under. */\nexport const FACTORY_CONTROLLER_ID = 'code';\n\nconst ORGANIZATION_ID_HEADER = 'X-Mastra-Organization-Id';\n\nexport interface FactoryAddress {\n url: string;\n session: PlatformSession;\n}\n\nexport interface FactoryRepository {\n projectRepositoryId: string;\n slug: string;\n branch?: string;\n}\n\nexport interface FactoryProject {\n id: string;\n name: string;\n repositories: FactoryRepository[];\n}\n\nexport interface FactoryUserSession {\n sessionId: string;\n projectRepositoryId: string;\n title?: string;\n branch: string;\n updatedAt: string;\n}\n\nexport function factoryHeaders({ session }: FactoryAddress): Record<string, string> {\n return { Authorization: `Bearer ${session.token}`, [ORGANIZATION_ID_HEADER]: session.orgId };\n}\n\nasync function factoryFetch<T>(address: FactoryAddress, path: string, init?: { method?: string; body?: unknown }) {\n const res = await refreshingFetch(address)(`${address.url.replace(/\\/$/, '')}${path}`, {\n method: init?.method ?? 'GET',\n headers: {\n Accept: 'application/json',\n ...(init?.body !== undefined ? { 'content-type': 'application/json' } : {}),\n },\n body: init?.body !== undefined ? JSON.stringify(init.body) : undefined,\n });\n if (!res.ok) {\n const body = (await res.json().catch(() => ({}))) as { error?: string; message?: string };\n throw new Error(\n `Factory request ${path} failed (${res.status})${body.message || body.error ? `: ${body.message ?? body.error}` : ''}`,\n );\n }\n return (await res.json()) as T;\n}\n\ninterface ProjectConnectionPayload {\n repositories: Array<{\n id: string;\n branch: string | null;\n repository: { slug: string; defaultBranch: string } | null;\n }>;\n}\n\ninterface ProjectListRepositoryPayload {\n projectRepositoryId: string;\n slug: string | null;\n defaultBranch: string | null;\n branch: string | null;\n}\n\ninterface ProjectListPayload {\n projects: Array<{ id: string; name: string; repositories?: ProjectListRepositoryPayload[] }>;\n}\n\nfunction toFactoryRepository(projectName: string, repository: ProjectListRepositoryPayload): FactoryRepository {\n return {\n projectRepositoryId: repository.projectRepositoryId,\n slug: repository.slug ?? projectName,\n branch: repository.branch ?? repository.defaultBranch ?? undefined,\n };\n}\n\n/**\n * List the org's Factory projects with their linked repositories. Current servers return the repositories with the\n * project list; an older server, which does not, is asked once per project.\n */\nexport async function listFactoryProjects(address: FactoryAddress): Promise<FactoryProject[]> {\n const { projects } = await factoryFetch<ProjectListPayload>(address, '/web/factory/projects');\n return Promise.all(\n projects.map(async project => {\n const repositories = project.repositories ?? (await listProjectRepositories(address, project.id));\n return {\n id: project.id,\n name: project.name,\n repositories: repositories.map(repository => toFactoryRepository(project.name, repository)),\n };\n }),\n );\n}\n\nasync function listProjectRepositories(\n address: FactoryAddress,\n projectId: string,\n): Promise<ProjectListRepositoryPayload[]> {\n const { connections } = await factoryFetch<{ connections: ProjectConnectionPayload[] }>(\n address,\n `/web/factory/projects/${encodeURIComponent(projectId)}/source-control-connections`,\n );\n return connections.flatMap(connection =>\n connection.repositories.map(link => ({\n projectRepositoryId: link.id,\n slug: link.repository?.slug ?? null,\n defaultBranch: link.repository?.defaultBranch ?? null,\n branch: link.branch,\n })),\n );\n}\n\n/**\n * Create a Factory user session. Factory assigns the session ID and its\n * `user/session-<id>` branch, cut from the repository's default branch.\n */\nexport async function createFactoryUserSession(\n address: FactoryAddress,\n projectRepositoryId: string,\n title?: string,\n): Promise<FactoryUserSession> {\n const { session } = await factoryFetch<{ session: FactoryUserSession & { title?: string | null } }>(\n address,\n `/web/source-control/projects/${encodeURIComponent(projectRepositoryId)}/sessions`,\n { method: 'POST', body: title ? { title } : {} },\n );\n return { ...session, title: session.title ?? undefined };\n}\n\n/**\n * Platform access tokens expire while a long-lived TUI is open. On a 401,\n * refresh the session and replay the request once with the new token; a\n * rejected request never ran, so the replay cannot duplicate a command.\n */\nexport function refreshingFetch(\n address: FactoryAddress,\n refresh: () => Promise<PlatformSession | null> = getPlatformSession,\n baseFetch: typeof fetch = fetch,\n): typeof fetch {\n const withAuth = (init: RequestInit | undefined) => {\n const headers = new Headers(init?.headers);\n for (const [key, value] of Object.entries(factoryHeaders(address))) headers.set(key, value);\n return { ...init, headers };\n };\n // Concurrent 401s share one refresh so the token is not rotated repeatedly.\n let refreshing: Promise<PlatformSession | null> | undefined;\n return async (input, init) => {\n const sentToken = address.session.token;\n const res = await baseFetch(input, withAuth(init));\n if (res.status !== 401) return res;\n if (address.session.token === sentToken) {\n refreshing ??= refresh().finally(() => {\n refreshing = undefined;\n });\n const session = await refreshing;\n if (!session || session.token === sentToken) return res;\n address.session = session;\n }\n return baseFetch(input, withAuth(init));\n };\n}\n\nexport function createFactoryClient(address: FactoryAddress): MastraClient {\n // Session commands are not idempotent; a silent retry would duplicate messages.\n return new MastraClient({ baseUrl: address.url.replace(/\\/$/, ''), retries: 0, fetch: refreshingFetch(address) });\n}\n"],"mappings":";;;;AAMA,MAAa,wBAAwB;AAErC,MAAM,yBAAyB;AA2B/B,SAAgB,eAAe,EAAE,WAAmD;CAClF,OAAO;EAAE,eAAe,UAAU,QAAQ;GAAU,yBAAyB,QAAQ;CAAM;AAC7F;AAEA,eAAe,aAAgB,SAAyB,MAAc,MAA4C;CAChH,MAAM,MAAM,MAAM,gBAAgB,OAAO,CAAC,CAAC,GAAG,QAAQ,IAAI,QAAQ,OAAO,EAAE,IAAI,QAAQ;EACrF,QAAQ,MAAM,UAAU;EACxB,SAAS;GACP,QAAQ;GACR,GAAI,MAAM,SAAS,KAAA,IAAY,EAAE,gBAAgB,mBAAmB,IAAI,CAAC;EAC3E;EACA,MAAM,MAAM,SAAS,KAAA,IAAY,KAAK,UAAU,KAAK,IAAI,IAAI,KAAA;CAC/D,CAAC;CACD,IAAI,CAAC,IAAI,IAAI;EACX,MAAM,OAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,aAAa,CAAC,EAAE;EAC/C,MAAM,IAAI,MACR,mBAAmB,KAAK,WAAW,IAAI,OAAO,GAAG,KAAK,WAAW,KAAK,QAAQ,KAAK,KAAK,WAAW,KAAK,UAAU,IACpH;CACF;CACA,OAAQ,MAAM,IAAI,KAAK;AACzB;AAqBA,SAAS,oBAAoB,aAAqB,YAA6D;CAC7G,OAAO;EACL,q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E,GAAG;GAAM;EAAQ;CAC5B;CAEA,IAAI;CACJ,OAAO,OAAO,OAAO,SAAS;EAC5B,MAAM,YAAY,QAAQ,QAAQ;EAClC,MAAM,MAAM,MAAM,UAAU,OAAO,SAAS,IAAI,CAAC;EACjD,IAAI,IAAI,WAAW,KAAK,OAAO;EAC/B,IAAI,QAAQ,QAAQ,UAAU,WAAW;GACvC,eAAe,QAAQ,CAAC,CAAC,cAAc;IACrC,aAAa,KAAA;GACf,CAAC;GACD,MAAM,UAAU,MAAM;GACtB,IAAI,CAAC,WAAW,QAAQ,UAAU,WAAW,OAAO;GACpD,QAAQ,UAAU;EACpB;EACA,OAAO,UAAU,OAAO,SAAS,IAAI,CAAC;CACxC;AACF;AAEA,SAAgB,oBAAoB,SAAuC;CAEzE,OAAO,IAAI,aAAa;EAAE,SAAS,QAAQ,IAAI,QAAQ,OAAO,EAAE;EAAG,SAAS;EAAG,OAAO,gBAAgB,OAAO;CAAE,CAAC;AAClH"}
|
package/dist/headless/cli.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { listBuiltinModePacks } from "../onboarding/packs.js";
|
|
2
|
-
import { loadSettings, resolveModelDefaults, saveSettings } from "../onboarding/settings.js";
|
|
3
1
|
import { resolveSubagentsSetting } from "../agents/subagents/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { permissionModeToPolicy } from "./policy.js";
|
|
6
|
-
import { runMC } from "./run-mc.js";
|
|
7
|
-
import { createHumanFormatState, formatHuman, formatJsonl, isJsonlEvent, renderJsonResult } from "./format.js";
|
|
2
|
+
import { createMastraCode } from "../index.js";
|
|
8
3
|
import { activateModePackInSettings, resolveModePackArg, resolvePackSelection } from "../onboarding/pack-activation.js";
|
|
4
|
+
import { listBuiltinModePacks } from "../onboarding/packs.js";
|
|
5
|
+
import { loadSettings, resolveModelDefaults, saveSettings } from "../onboarding/settings.js";
|
|
9
6
|
import { createProcessMemoryDiagnosticsFromEnvironment, startConfiguredProcessMemoryDiagnostics, stopProcessMemoryDiagnosticsWithTimeout } from "../process-memory-diagnostics.js";
|
|
10
7
|
import { setupDebugLogging } from "../utils/debug-log.js";
|
|
8
|
+
import { releaseAllThreadLocks } from "../utils/thread-lock.js";
|
|
11
9
|
import { FLAGS, buildParseArgsOptions, renderFlagUsage } from "./flags.js";
|
|
12
|
-
import {
|
|
10
|
+
import { createHumanFormatState, formatHuman, formatJsonl, isJsonlEvent, renderJsonResult } from "./format.js";
|
|
11
|
+
import { permissionModeToPolicy } from "./policy.js";
|
|
12
|
+
import { runMC } from "./run-mc.js";
|
|
13
13
|
import { existsSync } from "fs";
|
|
14
14
|
import { parseArgs } from "util";
|
|
15
15
|
// src/headless/cli.ts
|
package/dist/headless/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { autoApprovePolicy, denyPolicy, permissionModeToPolicy } from "./policy.js";
|
|
2
1
|
import { runMC } from "./run-mc.js";
|
|
2
|
+
import { autoApprovePolicy, denyPolicy, permissionModeToPolicy } from "./policy.js";
|
|
3
3
|
import { createHumanFormatState, formatHuman, formatJsonl, renderJsonResult, renderTextResult, truncate } from "./format.js";
|
|
4
|
-
import { VALID_MODES, VALID_PERMISSION_MODES, VALID_THINKING_LEVELS } from "./types.js";
|
|
5
4
|
import { hasHeadlessFlag, parseHeadlessArgs, printHeadlessUsage, runMCCli } from "./cli.js";
|
|
5
|
+
import { VALID_MODES, VALID_PERMISSION_MODES, VALID_THINKING_LEVELS } from "./types.js";
|
|
6
6
|
export { VALID_MODES, VALID_PERMISSION_MODES, VALID_THINKING_LEVELS, autoApprovePolicy, createHumanFormatState, denyPolicy, formatHuman, formatJsonl, hasHeadlessFlag, parseHeadlessArgs, permissionModeToPolicy, printHeadlessUsage, renderJsonResult, renderTextResult, runMC, runMCCli, truncate };
|
package/dist/headless/run-mc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MODEL_FALLBACK_STATE_KEY } from "../auth/account-rotation-processor.js";
|
|
2
2
|
import { GoalManager } from "../goal-manager.js";
|
|
3
3
|
import { createGoalReminderSignal } from "../goal-signal.js";
|
|
4
|
-
import {
|
|
4
|
+
import { THREAD_ACTIVE_MODEL_PACK_ID_KEY } from "../onboarding/settings.js";
|
|
5
5
|
import { autoApprovePolicy } from "./policy.js";
|
|
6
6
|
import { isSessionStartupCancelledError } from "@mastra/core/agent-controller";
|
|
7
7
|
// src/headless/run-mc.ts
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { HookManager } from "./manager.js";
|
|
1
2
|
import { VALID_EVENTS, getGlobalHooksPath, getProjectHooksPath, loadHooksConfig } from "./config.js";
|
|
2
|
-
import { isBlockingEvent } from "./types.js";
|
|
3
3
|
import { executeHook, matchesHook, runHooksForEvent } from "./executor.js";
|
|
4
|
-
import {
|
|
4
|
+
import { isBlockingEvent } from "./types.js";
|
|
5
5
|
export { HookManager, VALID_EVENTS, executeHook, getGlobalHooksPath, getProjectHooksPath, isBlockingEvent, loadHooksConfig, matchesHook, runHooksForEvent };
|
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,13 @@ export interface MastraCodeConfig {
|
|
|
71
71
|
* disabled built-in is omitted so the model is never told to call it.
|
|
72
72
|
*/
|
|
73
73
|
disableBuiltinTools?: BuiltinToolId[];
|
|
74
|
+
/**
|
|
75
|
+
* Workspace-relative directory agents write plan files into, overriding the
|
|
76
|
+
* per-session default (`.mastracode/plans`, or `.artifacts/plans` for Factory
|
|
77
|
+
* project sessions). Prompts and the plan-mode write guard of the default
|
|
78
|
+
* workspace use it; a custom `workspace` must apply its own guard.
|
|
79
|
+
*/
|
|
80
|
+
plansDir?: string;
|
|
74
81
|
/**
|
|
75
82
|
* Custom storage config instead of auto-detected default, or a pre-built
|
|
76
83
|
* store instance. An instance is used as-is: no connection test and no
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","s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, DEFAULT_OM_MODEL_ID, validateConfigDirName } from "./constants.js";
|
|
2
|
-
import { detectProject, getObservabilityDatabasePath, getResourceIdOverride, getStorageConfig } from "./utils/project.js";
|
|
3
|
-
import { isKimiCodingDeviceId } from "./auth/providers/kimi-coding.js";
|
|
4
|
-
import { AuthStorage } from "./auth/storage.js";
|
|
5
|
-
import { isThinkingLevelSetting } from "./thinking.js";
|
|
6
|
-
import { setAuthStorage } from "./providers/openai-codex.js";
|
|
7
|
-
import { getAvailableOmPacks, resolveAutoOMModelId } from "./onboarding/packs.js";
|
|
8
|
-
import { MASTRA_GATEWAY_PROVIDER, OBSERVABILITY_AUTH_PREFIX, loadSettings, resolveOmRoleModel, saveSettings } from "./onboarding/settings.js";
|
|
9
|
-
import { resolveExperimentalAgent, validateExperimentalAgent, wrapExperimentalAgent } from "./experimental-agent.js";
|
|
10
1
|
import { createSessionThreadAdvertisement } from "./agent-connections/session-advertisement.js";
|
|
11
2
|
import { AgentConnectionsSignalProvider } from "./agent-connections/signal-provider.js";
|
|
12
3
|
import { createBackgroundCompletionEvents } from "./agents/background-completion-events.js";
|
|
13
4
|
import { createBackgroundCompletionCallbacks } from "./agents/background-completion.js";
|
|
14
5
|
import { hasCredentialStoreProvider, setCredentialLogger, withCredentialTenantPreparation } from "./agents/credential-resolver.js";
|
|
15
|
-
import { createAmazonBedrockGateway } from "./providers/amazon-bedrock-gateway.js";
|
|
16
|
-
import { createGoogleVertexGateway } from "./providers/google-vertex-gateway.js";
|
|
17
|
-
import { setAuthStorage as setAuthStorage$1 } from "./providers/claude-max.js";
|
|
18
|
-
import { setAuthStorage as setAuthStorage$2 } from "./providers/github-copilot.js";
|
|
19
|
-
import { setAuthStorage as setAuthStorage$3 } from "./providers/kimi-coding.js";
|
|
20
|
-
import { setAuthStorage as setAuthStorage$4 } from "./providers/xai.js";
|
|
21
|
-
import { canUseProvider, createMastraCodeGateway, getDynamicModel, getGoalJudgeModel, resolveModel } from "./agents/model.js";
|
|
22
|
-
import { getDynamicWorkspace, getGoalJudgeTools } from "./agents/workspace.js";
|
|
23
|
-
import { createGitRefReminderReader, instructionSourcePaths, loadSessionInstructions, sessionInstructionRoots } from "./agents/prompts/agent-instructions.js";
|
|
24
6
|
import { getDynamicInstructions } from "./agents/instructions.js";
|
|
25
|
-
import { LOCAL_KNOWLEDGE_ORG_ID, knowledgeUnresolvedScopes, resolveKnowledgeSessionScopes } from "./knowledge-scope.js";
|
|
26
7
|
import { getDynamicMemory } from "./agents/memory.js";
|
|
8
|
+
import { canUseProvider, createMastraCodeGateway, getDynamicModel, getGoalJudgeModel, resolveModel } from "./agents/model.js";
|
|
27
9
|
import { buildMode } from "./agents/modes/build.js";
|
|
28
10
|
import { fastMode } from "./agents/modes/explore.js";
|
|
29
11
|
import { createPlanMode } from "./agents/modes/plan.js";
|
|
12
|
+
import { createGitRefReminderReader, instructionSourcePaths, loadSessionInstructions, sessionInstructionRoots } from "./agents/prompts/agent-instructions.js";
|
|
30
13
|
import { builtinSubagents, resolveSubagentsSetting } from "./agents/subagents/index.js";
|
|
31
14
|
import { attachOMThreadStatePersistence, restoreOMThreadStateForCurrentThread } from "./agents/thread-caveman-state.js";
|
|
32
15
|
import { createDynamicTools, createToolHooks } from "./agents/tools.js";
|
|
16
|
+
import { getDynamicWorkspace, getGoalJudgeTools } from "./agents/workspace.js";
|
|
33
17
|
import { AccountRotationProcessor, AccountStartNoticeProcessor, MODEL_FALLBACK_STATE_KEY } from "./auth/account-rotation-processor.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
18
|
+
import { isKimiCodingDeviceId } from "./auth/providers/kimi-coding.js";
|
|
19
|
+
import { AuthStorage } from "./auth/storage.js";
|
|
20
|
+
import { CODE_AGENT_ID, DEFAULT_OM_MODEL_ID, validateConfigDirName } from "./constants.js";
|
|
36
21
|
import "./evals/scorers/index.js";
|
|
37
|
-
import {
|
|
22
|
+
import { resolveExperimentalAgent, validateExperimentalAgent, wrapExperimentalAgent } from "./experimental-agent.js";
|
|
38
23
|
import "./hooks/index.js";
|
|
39
24
|
import { KnowledgeInspectorError, createKnowledgeInspector } from "./knowledge-inspector.js";
|
|
40
|
-
import {
|
|
25
|
+
import { LOCAL_KNOWLEDGE_ORG_ID, knowledgeUnresolvedScopes, resolveKnowledgeSessionScopes } from "./knowledge-scope.js";
|
|
41
26
|
import "./mcp/index.js";
|
|
27
|
+
import { getAvailableOmPacks, resolveAutoOMModelId } from "./onboarding/packs.js";
|
|
28
|
+
import { MASTRA_GATEWAY_PROVIDER, OBSERVABILITY_AUTH_PREFIX, loadSettings, resolveOmRoleModel, saveSettings } from "./onboarding/settings.js";
|
|
42
29
|
import { getToolCategory } from "./permissions.js";
|
|
43
30
|
import { PluginManager } from "./plugins/manager.js";
|
|
44
31
|
import { PluginSignalLane } from "./plugins/signal-lane.js";
|
|
45
32
|
import { PlanRejectionAbortProcessor } from "./processors/plan-rejection-abort.js";
|
|
33
|
+
import { createAmazonBedrockGateway } from "./providers/amazon-bedrock-gateway.js";
|
|
34
|
+
import { createOutcomeScorer } from "./evals/scorers/outcome.js";
|
|
35
|
+
import { createEfficiencyScorer } from "./evals/scorers/efficiency.js";
|
|
36
|
+
import { setAuthStorage } from "./providers/claude-max.js";
|
|
37
|
+
import { HookManager } from "./hooks/manager.js";
|
|
46
38
|
import { createGitHubCopilotGateway } from "./providers/github-copilot-gateway.js";
|
|
39
|
+
import { setAuthStorage as setAuthStorage$1 } from "./providers/github-copilot.js";
|
|
40
|
+
import { createMcpManager } from "./mcp/manager.js";
|
|
41
|
+
import { createGoogleVertexGateway } from "./providers/google-vertex-gateway.js";
|
|
42
|
+
import { setAuthStorage as setAuthStorage$2 } from "./providers/kimi-coding.js";
|
|
43
|
+
import { setAuthStorage as setAuthStorage$3 } from "./providers/openai-codex.js";
|
|
44
|
+
import { setAuthStorage as setAuthStorage$4 } from "./providers/xai.js";
|
|
45
|
+
import "./schedules/index.js";
|
|
46
|
+
import { stateSchema } from "./schema.js";
|
|
47
47
|
import { assembleSchedulePrompt } from "./schedules/prompt.js";
|
|
48
48
|
import { ThreadScheduler, scheduleSignalAttributes, shortScheduleId } from "./schedules/scheduler.js";
|
|
49
49
|
import { runScript } from "./schedules/run-script.js";
|
|
50
50
|
import { createScheduleTools } from "./schedules/tools.js";
|
|
51
|
-
import "./schedules/index.js";
|
|
52
|
-
import { stateSchema } from "./schema.js";
|
|
53
51
|
import { mastraBrand } from "./theme-palette.js";
|
|
52
|
+
import { isThinkingLevelSetting } from "./thinking.js";
|
|
54
53
|
import { DiscardingScoresStorage } from "./utils/discarding-scores-storage.js";
|
|
55
54
|
import { syncGateways } from "./utils/gateway-sync.js";
|
|
56
55
|
import { openLocalObservabilityStore } from "./utils/local-observability.js";
|
|
57
56
|
import { registerSessionAndWaitForMaintenance, unregisterSession } from "./utils/maintenance-lock.js";
|
|
58
|
-
import { createSignalsPubSub } from "./utils/signals-pubsub.js";
|
|
59
57
|
import { createResourceNotificationDispatcher, shouldHoldNotificationDelivery } from "./utils/notification-dispatch.js";
|
|
60
|
-
import {
|
|
58
|
+
import { detectProject, getObservabilityDatabasePath, getResourceIdOverride, getStorageConfig } from "./utils/project.js";
|
|
59
|
+
import { createSignalsPubSub } from "./utils/signals-pubsub.js";
|
|
61
60
|
import { createStorage, createVectorStore } from "./utils/storage-factory.js";
|
|
61
|
+
import { DEFAULT_RETENTION, createStorageMaintenance, resolveLocalDbFiles } from "./utils/storage-maintenance.js";
|
|
62
62
|
import { acquireThreadLock, releaseThreadLock } from "./utils/thread-lock.js";
|
|
63
63
|
import { FOREIGN_THREAD, findWakeSession, sessionLeaseScopes } from "./utils/wake-session.js";
|
|
64
64
|
import { registerWorkflowBuilderPrimitives } from "./workflows/register-primitives.js";
|
|
@@ -162,10 +162,10 @@ function addPluginToolsToModeAllowlists(modes, pluginToolNames) {
|
|
|
162
162
|
}
|
|
163
163
|
function createAuthStorage() {
|
|
164
164
|
const authStorage = new AuthStorage();
|
|
165
|
-
setAuthStorage$1(authStorage);
|
|
166
165
|
setAuthStorage(authStorage);
|
|
167
|
-
setAuthStorage$2(authStorage);
|
|
168
166
|
setAuthStorage$3(authStorage);
|
|
167
|
+
setAuthStorage$1(authStorage);
|
|
168
|
+
setAuthStorage$2(authStorage);
|
|
169
169
|
setAuthStorage$4(authStorage);
|
|
170
170
|
return authStorage;
|
|
171
171
|
}
|
|
@@ -727,6 +727,7 @@ async function createMastraCodeAgentController(config) {
|
|
|
727
727
|
coAuthor: config?.coAuthor,
|
|
728
728
|
hasSubagents: subagents.length > 0,
|
|
729
729
|
disabledBuiltinTools: config?.disableBuiltinTools,
|
|
730
|
+
plansDir: config?.plansDir,
|
|
730
731
|
disabledTools: config?.disabledTools
|
|
731
732
|
});
|
|
732
733
|
},
|
|
@@ -961,6 +962,11 @@ async function createMastraCodeAgentController(config) {
|
|
|
961
962
|
else globalInitialState[`subagentModelId_${key}`] = modelId;
|
|
962
963
|
const typedStateSchema = stateSchema;
|
|
963
964
|
const backgroundCompletionEvents = backgroundToolsEnabled ? createBackgroundCompletionEvents() : void 0;
|
|
965
|
+
const defaultWorkspace = (args) => getDynamicWorkspace({
|
|
966
|
+
...args,
|
|
967
|
+
backgroundToolsEnabled,
|
|
968
|
+
plansDir: config?.plansDir
|
|
969
|
+
});
|
|
964
970
|
let controller;
|
|
965
971
|
controller = new AgentController({
|
|
966
972
|
id: "mastra-code",
|
|
@@ -999,10 +1005,7 @@ async function createMastraCodeAgentController(config) {
|
|
|
999
1005
|
githubCopilotGateway,
|
|
1000
1006
|
mastraCodeGateway
|
|
1001
1007
|
],
|
|
1002
|
-
workspace: config?.workspace ??
|
|
1003
|
-
...args,
|
|
1004
|
-
backgroundToolsEnabled
|
|
1005
|
-
})),
|
|
1008
|
+
workspace: config?.workspace ?? defaultWorkspace,
|
|
1006
1009
|
browser: config?.browser,
|
|
1007
1010
|
idGenerator: config?.idGenerator,
|
|
1008
1011
|
toolCategoryResolver: getToolCategory,
|