@mastra/editor 0.16.4 → 0.16.5-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/index.d.cts CHANGED
@@ -32,7 +32,7 @@ interface StorageAdapter<TCreateInput extends {
32
32
  * Base class for all editor namespaces.
33
33
  * Provides shared infrastructure: mastra/logger access and registration check.
34
34
  */
35
- declare abstract class EditorNamespace {
35
+ export declare abstract class EditorNamespace {
36
36
  protected editor: MastraEditor;
37
37
  constructor(editor: MastraEditor);
38
38
  protected get mastra(): Mastra | undefined;
@@ -54,7 +54,7 @@ declare abstract class EditorNamespace {
54
54
  * Includes a built-in cache for getById results. Mutations (create/update/delete)
55
55
  * automatically invalidate the cache for the affected entity.
56
56
  */
57
- declare abstract class CrudEditorNamespace<TCreateInput extends {
57
+ export declare abstract class CrudEditorNamespace<TCreateInput extends {
58
58
  id: string;
59
59
  }, TUpdateInput extends {
60
60
  id: string;
@@ -90,7 +90,7 @@ declare abstract class CrudEditorNamespace<TCreateInput extends {
90
90
  }
91
91
  //#endregion
92
92
  //#region src/namespaces/agent.d.ts
93
- declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType, Agent> {
93
+ export declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType, Agent> {
94
94
  /** IDs of stored agents this namespace registered with Mastra. */
95
95
  private _registeredStoredAgentIds;
96
96
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType>>;
@@ -104,6 +104,10 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
104
104
  * Also ensures the referenced workspace (if any) is persisted as a stored workspace.
105
105
  */
106
106
  create(input: StorageCreateAgentInput): Promise<Agent>;
107
+ /**
108
+ * Returns the registered agent when it is defined by the project, either in code (`'code'`) or in an
109
+ * `agents/<name>/` folder (`'fs'`). Stored records for these agents are overrides layered on top.
110
+ */
107
111
  private getCodeDefinedAgent;
108
112
  private ensureStoredWorkspaceRefs;
109
113
  /**
@@ -274,7 +278,7 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
274
278
  }
275
279
  //#endregion
276
280
  //#region src/namespaces/mcp.d.ts
277
- declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType> {
281
+ export declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType> {
278
282
  protected onCacheEvict(_id: string): void;
279
283
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType>>;
280
284
  /**
@@ -297,7 +301,7 @@ declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPCli
297
301
  }
298
302
  //#endregion
299
303
  //#region src/namespaces/mcp-server.d.ts
300
- declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreateMCPServerInput, StorageUpdateMCPServerInput, StorageListMCPServersInput, StorageListMCPServersOutput, StorageListMCPServersResolvedOutput, StorageResolvedMCPServerType, MCPServerBase> {
304
+ export declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreateMCPServerInput, StorageUpdateMCPServerInput, StorageListMCPServersInput, StorageListMCPServersOutput, StorageListMCPServersResolvedOutput, StorageResolvedMCPServerType, MCPServerBase> {
301
305
  private mcpServerCtor;
302
306
  protected onCacheEvict(_id: string): void;
303
307
  protected hydrate(resolved: StorageResolvedMCPServerType): Promise<MCPServerBase>;
@@ -308,7 +312,7 @@ declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreate
308
312
  }
309
313
  //#endregion
310
314
  //#region src/namespaces/prompt.d.ts
311
- declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType> {
315
+ export declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType> {
312
316
  protected onCacheEvict(id: string): void;
313
317
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType>>;
314
318
  update(input: StorageUpdatePromptBlockInput): Promise<StorageResolvedPromptBlockType>;
@@ -316,7 +320,7 @@ declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePro
316
320
  }
317
321
  //#endregion
318
322
  //#region src/namespaces/scorer.d.ts
319
- declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateScorerDefinitionInput, StorageUpdateScorerDefinitionInput, StorageListScorerDefinitionsInput, StorageListScorerDefinitionsOutput, StorageListScorerDefinitionsResolvedOutput, StorageResolvedScorerDefinitionType> {
323
+ export declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateScorerDefinitionInput, StorageUpdateScorerDefinitionInput, StorageListScorerDefinitionsInput, StorageListScorerDefinitionsOutput, StorageListScorerDefinitionsResolvedOutput, StorageResolvedScorerDefinitionType> {
320
324
  /**
321
325
  * IDs this namespace registered on Mastra. Version-specific reads hydrate and
322
326
  * register without populating the value cache, so clear-all needs this set.
@@ -341,7 +345,7 @@ declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateSco
341
345
  }
342
346
  //#endregion
343
347
  //#region src/namespaces/workspace.d.ts
344
- declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreateWorkspaceInput, StorageUpdateWorkspaceInput, StorageListWorkspacesInput, StorageListWorkspacesOutput, StorageListWorkspacesResolvedOutput, StorageResolvedWorkspaceType, StorageResolvedWorkspaceType> {
348
+ export declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreateWorkspaceInput, StorageUpdateWorkspaceInput, StorageListWorkspacesInput, StorageListWorkspacesOutput, StorageListWorkspacesResolvedOutput, StorageResolvedWorkspaceType, StorageResolvedWorkspaceType> {
345
349
  protected onCacheEvict(_id: string): void;
346
350
  /**
347
351
  * Hydrate a stored workspace snapshot config into a runtime Workspace instance.
@@ -383,7 +387,7 @@ declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreate
383
387
  }
384
388
  //#endregion
385
389
  //#region src/namespaces/skill.d.ts
386
- declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType> {
390
+ export declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType> {
387
391
  protected onCacheEvict(_id: string): void;
388
392
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType>>;
389
393
  /**
@@ -403,7 +407,7 @@ declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkil
403
407
  * route handler in `@mastra/server`. Direct callers of this namespace must
404
408
  * perform their own access check before invoking these methods.
405
409
  */
406
- declare class EditorFavoritesNamespace extends EditorNamespace implements IEditorFavoritesNamespace {
410
+ export declare class EditorFavoritesNamespace extends EditorNamespace implements IEditorFavoritesNamespace {
407
411
  favorite(input: EditorFavoriteTargetInput): Promise<EditorFavoriteToggleResult>;
408
412
  unfavorite(input: EditorFavoriteTargetInput): Promise<EditorFavoriteToggleResult>;
409
413
  isFavorited(input: EditorFavoriteTargetInput): Promise<boolean>;
@@ -430,7 +434,7 @@ declare class EditorFavoritesNamespace extends EditorNamespace implements IEdito
430
434
  * @param context - A key-value context object for variable resolution
431
435
  * @returns The rendered string with variables replaced
432
436
  */
433
- declare function renderTemplate(template: string, context: Record<string, unknown>): string;
437
+ export declare function renderTemplate(template: string, context: Record<string, unknown>): string;
434
438
  //#endregion
435
439
  //#region src/rule-evaluator.d.ts
436
440
  /**
@@ -440,7 +444,7 @@ declare function renderTemplate(template: string, context: Record<string, unknow
440
444
  * @param context - The context object to evaluate against
441
445
  * @returns true if the rule group passes, false otherwise
442
446
  */
443
- declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string, unknown>): boolean;
447
+ export declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string, unknown>): boolean;
444
448
  //#endregion
445
449
  //#region src/instruction-builder.d.ts
446
450
  interface InstructionBuilderDeps {
@@ -456,15 +460,15 @@ interface InstructionBuilderDeps {
456
460
  * @param deps - Dependencies (storage)
457
461
  * @returns The resolved instruction string
458
462
  */
459
- declare function resolveInstructionBlocks(blocks: AgentInstructionBlock[], context: Record<string, unknown>, deps: InstructionBuilderDeps): Promise<string>;
463
+ export declare function resolveInstructionBlocks(blocks: AgentInstructionBlock[], context: Record<string, unknown>, deps: InstructionBuilderDeps): Promise<string>;
460
464
  //#endregion
461
465
  //#region src/providers.d.ts
462
- declare const localFilesystemProvider: FilesystemProvider<{
466
+ export declare const localFilesystemProvider: FilesystemProvider<{
463
467
  basePath: string;
464
468
  contained?: boolean;
465
469
  readOnly?: boolean;
466
470
  }>;
467
- declare const localSandboxProvider: SandboxProvider<{
471
+ export declare const localSandboxProvider: SandboxProvider<{
468
472
  workingDirectory?: string;
469
473
  timeout?: number;
470
474
  isolation?: 'none' | 'seatbelt' | 'bwrap';
@@ -472,7 +476,7 @@ declare const localSandboxProvider: SandboxProvider<{
472
476
  }>;
473
477
  //#endregion
474
478
  //#region src/index.d.ts
475
- declare class MastraEditor implements IMastraEditor {
479
+ export declare class MastraEditor implements IMastraEditor {
476
480
  /** @internal — exposed for namespace classes, not part of public API */
477
481
  __mastra?: Mastra;
478
482
  /** @internal — exposed for namespace classes, not part of public API */
@@ -610,5 +614,5 @@ declare class MastraEditor implements IMastraEditor {
610
614
  resolveBlobStore(providerId?: string, providerConfig?: Record<string, unknown>): Promise<BlobStore>;
611
615
  }
612
616
  //#endregion
613
- export { type BrowserProvider, CrudEditorNamespace, EditorAgentNamespace, EditorFavoritesNamespace, EditorMCPNamespace, EditorMCPServerNamespace, EditorNamespace, EditorPromptNamespace, EditorScorerNamespace, EditorSkillNamespace, EditorWorkspaceNamespace, MastraEditor, type MastraEditorConfig, type StorageAdapter, evaluateRuleGroup, localFilesystemProvider, localSandboxProvider, renderTemplate, resolveInstructionBlocks };
617
+ export type { BrowserProvider, MastraEditorConfig, StorageAdapter };
614
618
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":["Logger","Logger","BrowserProvider"],"sources":["../src/namespaces/base.ts","../src/namespaces/agent.ts","../src/namespaces/mcp.ts","../src/namespaces/mcp-server.ts","../src/namespaces/prompt.ts","../src/namespaces/scorer.ts","../src/namespaces/workspace.ts","../src/namespaces/skill.ts","../src/namespaces/favorites.ts","../src/template-engine.ts","../src/rule-evaluator.ts","../src/instruction-builder.ts","../src/providers.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAYiB,eACf;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA;EAEA,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,QAAQ;;;;;;;;;;;;UAkEb;;;;;;;;UAoDA;;EA6Cd;;EAMM,0BAA0B,QAAQ;;;;;EAmBxC;;;;;EASM,kBAAkB,QAAQ;;;;;;;UA6ClB;;EAuBd;;EAKA,4BAA4B;;EAK5B,gBAAgB,aAAa;;;;;EAQ7B,uBAAuB,aAAa;;EASpC,oBAAoB,eAAe;;EAKnC,qBAAqB,aAAa;;EAKlC,yBAAyB,eAAe;;EAIxC,0BAA0B;;EAK1B,uBAAuB;;EAKvB,yBAAyB;;;;;;;;;;;EAcnB,iBAAiB,qBAAqB,iBAAiB,0BAA0B,QAAQ"}
1
+ {"version":3,"file":"index.d.cts","names":["Logger","Logger","BrowserProvider"],"sources":["../src/namespaces/base.ts","../src/namespaces/agent.ts","../src/namespaces/mcp.ts","../src/namespaces/mcp-server.ts","../src/namespaces/prompt.ts","../src/namespaces/scorer.ts","../src/namespaces/workspace.ts","../src/namespaces/skill.ts","../src/namespaces/favorites.ts","../src/template-engine.ts","../src/rule-evaluator.ts","../src/instruction-builder.ts","../src/providers.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAYiB,eACf;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA;EAEA,OAAO,OAAO,eAAe;EAC7B,gBAAgB,YAAY,UAAU,iBAAiB,QAAQ;EAC/D,OAAO,OAAO,eAAe;EAC7B,OAAO,aAAa;EACpB,KAAK,OAAO,aAAa,QAAQ;EACjC,aAAa,OAAO,aAAa,QAAQ;;;;;;8BAOrB;YACE,QAAQ;EAA9B,YAAsB,QAAQ;gBAEhB,UAAU;gBAIV,UAAUA;YAId;;;;;;;;;;;;;;;;;8BAsBU,oBACpB;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA,WACA,YAAY,mBACJ;YACE,QAAM,YAAA;;;;;qBAMG,qBAAqB,QACtC,eAAe,cAAc,cAAc,YAAY,aAAa,qBAAqB;;;;;;YAQ3E,QAAQ,UAAU,YAAY,QAAQ;;;;;YA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base class for all editor namespaces.
33
33
  * Provides shared infrastructure: mastra/logger access and registration check.
34
34
  */
35
- declare abstract class EditorNamespace {
35
+ export declare abstract class EditorNamespace {
36
36
  protected editor: MastraEditor;
37
37
  constructor(editor: MastraEditor);
38
38
  protected get mastra(): Mastra | undefined;
@@ -54,7 +54,7 @@ declare abstract class EditorNamespace {
54
54
  * Includes a built-in cache for getById results. Mutations (create/update/delete)
55
55
  * automatically invalidate the cache for the affected entity.
56
56
  */
57
- declare abstract class CrudEditorNamespace<TCreateInput extends {
57
+ export declare abstract class CrudEditorNamespace<TCreateInput extends {
58
58
  id: string;
59
59
  }, TUpdateInput extends {
60
60
  id: string;
@@ -90,7 +90,7 @@ declare abstract class CrudEditorNamespace<TCreateInput extends {
90
90
  }
91
91
  //#endregion
92
92
  //#region src/namespaces/agent.d.ts
93
- declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType, Agent> {
93
+ export declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType, Agent> {
94
94
  /** IDs of stored agents this namespace registered with Mastra. */
95
95
  private _registeredStoredAgentIds;
96
96
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateAgentInput, StorageUpdateAgentInput, StorageListAgentsInput, StorageListAgentsOutput, StorageListAgentsResolvedOutput, StorageResolvedAgentType>>;
@@ -104,6 +104,10 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
104
104
  * Also ensures the referenced workspace (if any) is persisted as a stored workspace.
105
105
  */
106
106
  create(input: StorageCreateAgentInput): Promise<Agent>;
107
+ /**
108
+ * Returns the registered agent when it is defined by the project, either in code (`'code'`) or in an
109
+ * `agents/<name>/` folder (`'fs'`). Stored records for these agents are overrides layered on top.
110
+ */
107
111
  private getCodeDefinedAgent;
108
112
  private ensureStoredWorkspaceRefs;
109
113
  /**
@@ -274,7 +278,7 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
274
278
  }
275
279
  //#endregion
276
280
  //#region src/namespaces/mcp.d.ts
277
- declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType> {
281
+ export declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType> {
278
282
  protected onCacheEvict(_id: string): void;
279
283
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateMCPClientInput, StorageUpdateMCPClientInput, StorageListMCPClientsInput, StorageListMCPClientsOutput, StorageListMCPClientsResolvedOutput, StorageResolvedMCPClientType>>;
280
284
  /**
@@ -297,7 +301,7 @@ declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPCli
297
301
  }
298
302
  //#endregion
299
303
  //#region src/namespaces/mcp-server.d.ts
300
- declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreateMCPServerInput, StorageUpdateMCPServerInput, StorageListMCPServersInput, StorageListMCPServersOutput, StorageListMCPServersResolvedOutput, StorageResolvedMCPServerType, MCPServerBase> {
304
+ export declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreateMCPServerInput, StorageUpdateMCPServerInput, StorageListMCPServersInput, StorageListMCPServersOutput, StorageListMCPServersResolvedOutput, StorageResolvedMCPServerType, MCPServerBase> {
301
305
  private mcpServerCtor;
302
306
  protected onCacheEvict(_id: string): void;
303
307
  protected hydrate(resolved: StorageResolvedMCPServerType): Promise<MCPServerBase>;
@@ -308,7 +312,7 @@ declare class EditorMCPServerNamespace extends CrudEditorNamespace<StorageCreate
308
312
  }
309
313
  //#endregion
310
314
  //#region src/namespaces/prompt.d.ts
311
- declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType> {
315
+ export declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType> {
312
316
  protected onCacheEvict(id: string): void;
313
317
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreatePromptBlockInput, StorageUpdatePromptBlockInput, StorageListPromptBlocksInput, StorageListPromptBlocksOutput, StorageListPromptBlocksResolvedOutput, StorageResolvedPromptBlockType>>;
314
318
  update(input: StorageUpdatePromptBlockInput): Promise<StorageResolvedPromptBlockType>;
@@ -316,7 +320,7 @@ declare class EditorPromptNamespace extends CrudEditorNamespace<StorageCreatePro
316
320
  }
317
321
  //#endregion
318
322
  //#region src/namespaces/scorer.d.ts
319
- declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateScorerDefinitionInput, StorageUpdateScorerDefinitionInput, StorageListScorerDefinitionsInput, StorageListScorerDefinitionsOutput, StorageListScorerDefinitionsResolvedOutput, StorageResolvedScorerDefinitionType> {
323
+ export declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateScorerDefinitionInput, StorageUpdateScorerDefinitionInput, StorageListScorerDefinitionsInput, StorageListScorerDefinitionsOutput, StorageListScorerDefinitionsResolvedOutput, StorageResolvedScorerDefinitionType> {
320
324
  /**
321
325
  * IDs this namespace registered on Mastra. Version-specific reads hydrate and
322
326
  * register without populating the value cache, so clear-all needs this set.
@@ -341,7 +345,7 @@ declare class EditorScorerNamespace extends CrudEditorNamespace<StorageCreateSco
341
345
  }
342
346
  //#endregion
343
347
  //#region src/namespaces/workspace.d.ts
344
- declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreateWorkspaceInput, StorageUpdateWorkspaceInput, StorageListWorkspacesInput, StorageListWorkspacesOutput, StorageListWorkspacesResolvedOutput, StorageResolvedWorkspaceType, StorageResolvedWorkspaceType> {
348
+ export declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreateWorkspaceInput, StorageUpdateWorkspaceInput, StorageListWorkspacesInput, StorageListWorkspacesOutput, StorageListWorkspacesResolvedOutput, StorageResolvedWorkspaceType, StorageResolvedWorkspaceType> {
345
349
  protected onCacheEvict(_id: string): void;
346
350
  /**
347
351
  * Hydrate a stored workspace snapshot config into a runtime Workspace instance.
@@ -383,7 +387,7 @@ declare class EditorWorkspaceNamespace extends CrudEditorNamespace<StorageCreate
383
387
  }
384
388
  //#endregion
385
389
  //#region src/namespaces/skill.d.ts
386
- declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType> {
390
+ export declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType> {
387
391
  protected onCacheEvict(_id: string): void;
388
392
  protected getStorageAdapter(): Promise<StorageAdapter<StorageCreateSkillInput, StorageUpdateSkillInput, StorageListSkillsInput, StorageListSkillsOutput, StorageListSkillsResolvedOutput, StorageResolvedSkillType>>;
389
393
  /**
@@ -403,7 +407,7 @@ declare class EditorSkillNamespace extends CrudEditorNamespace<StorageCreateSkil
403
407
  * route handler in `@mastra/server`. Direct callers of this namespace must
404
408
  * perform their own access check before invoking these methods.
405
409
  */
406
- declare class EditorFavoritesNamespace extends EditorNamespace implements IEditorFavoritesNamespace {
410
+ export declare class EditorFavoritesNamespace extends EditorNamespace implements IEditorFavoritesNamespace {
407
411
  favorite(input: EditorFavoriteTargetInput): Promise<EditorFavoriteToggleResult>;
408
412
  unfavorite(input: EditorFavoriteTargetInput): Promise<EditorFavoriteToggleResult>;
409
413
  isFavorited(input: EditorFavoriteTargetInput): Promise<boolean>;
@@ -430,7 +434,7 @@ declare class EditorFavoritesNamespace extends EditorNamespace implements IEdito
430
434
  * @param context - A key-value context object for variable resolution
431
435
  * @returns The rendered string with variables replaced
432
436
  */
433
- declare function renderTemplate(template: string, context: Record<string, unknown>): string;
437
+ export declare function renderTemplate(template: string, context: Record<string, unknown>): string;
434
438
  //#endregion
435
439
  //#region src/rule-evaluator.d.ts
436
440
  /**
@@ -440,7 +444,7 @@ declare function renderTemplate(template: string, context: Record<string, unknow
440
444
  * @param context - The context object to evaluate against
441
445
  * @returns true if the rule group passes, false otherwise
442
446
  */
443
- declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string, unknown>): boolean;
447
+ export declare function evaluateRuleGroup(ruleGroup: RuleGroup, context: Record<string, unknown>): boolean;
444
448
  //#endregion
445
449
  //#region src/instruction-builder.d.ts
446
450
  interface InstructionBuilderDeps {
@@ -456,15 +460,15 @@ interface InstructionBuilderDeps {
456
460
  * @param deps - Dependencies (storage)
457
461
  * @returns The resolved instruction string
458
462
  */
459
- declare function resolveInstructionBlocks(blocks: AgentInstructionBlock[], context: Record<string, unknown>, deps: InstructionBuilderDeps): Promise<string>;
463
+ export declare function resolveInstructionBlocks(blocks: AgentInstructionBlock[], context: Record<string, unknown>, deps: InstructionBuilderDeps): Promise<string>;
460
464
  //#endregion
461
465
  //#region src/providers.d.ts
462
- declare const localFilesystemProvider: FilesystemProvider<{
466
+ export declare const localFilesystemProvider: FilesystemProvider<{
463
467
  basePath: string;
464
468
  contained?: boolean;
465
469
  readOnly?: boolean;
466
470
  }>;
467
- declare const localSandboxProvider: SandboxProvider<{
471
+ export declare const localSandboxProvider: SandboxProvider<{
468
472
  workingDirectory?: string;
469
473
  timeout?: number;
470
474
  isolation?: 'none' | 'seatbelt' | 'bwrap';
@@ -472,7 +476,7 @@ declare const localSandboxProvider: SandboxProvider<{
472
476
  }>;
473
477
  //#endregion
474
478
  //#region src/index.d.ts
475
- declare class MastraEditor implements IMastraEditor {
479
+ export declare class MastraEditor implements IMastraEditor {
476
480
  /** @internal — exposed for namespace classes, not part of public API */
477
481
  __mastra?: Mastra;
478
482
  /** @internal — exposed for namespace classes, not part of public API */
@@ -610,5 +614,5 @@ declare class MastraEditor implements IMastraEditor {
610
614
  resolveBlobStore(providerId?: string, providerConfig?: Record<string, unknown>): Promise<BlobStore>;
611
615
  }
612
616
  //#endregion
613
- export { type BrowserProvider, CrudEditorNamespace, EditorAgentNamespace, EditorFavoritesNamespace, EditorMCPNamespace, EditorMCPServerNamespace, EditorNamespace, EditorPromptNamespace, EditorScorerNamespace, EditorSkillNamespace, EditorWorkspaceNamespace, MastraEditor, type MastraEditorConfig, type StorageAdapter, evaluateRuleGroup, localFilesystemProvider, localSandboxProvider, renderTemplate, resolveInstructionBlocks };
617
+ export type { BrowserProvider, MastraEditorConfig, StorageAdapter };
614
618
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["Logger","Logger","BrowserProvider"],"sources":["../src/namespaces/base.ts","../src/namespaces/agent.ts","../src/namespaces/mcp.ts","../src/namespaces/mcp-server.ts","../src/namespaces/prompt.ts","../src/namespaces/scorer.ts","../src/namespaces/workspace.ts","../src/namespaces/skill.ts","../src/namespaces/favorites.ts","../src/template-engine.ts","../src/rule-evaluator.ts","../src/instruction-builder.ts","../src/providers.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAYiB,eACf;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA;EAEA,OAAO,OAAO,eAAe;EAC7B,gBAAgB,YAAY,UAAU,iBAAiB,QAAQ;EAC/D,OAAO,OAAO,eAAe;EAC7B,OAAO,aAAa;EACpB,KAAK,OAAO,aAAa,QAAQ;EACjC,aAAa,OAAO,aAAa,QAAQ;;;;;;uBAOrB;YACE,Q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B,uBAAuB,aAAa;;EASpC,oBAAoB,eAAe;;EAKnC,qBAAqB,aAAa;;EAKlC,yBAAyB,eAAe;;EAIxC,0BAA0B;;EAK1B,uBAAuB;;EAKvB,yBAAyB;;;;;;;;;;;EAcnB,iBAAiB,qBAAqB,iBAAiB,0BAA0B,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":["Logger","Logger","BrowserProvider"],"sources":["../src/namespaces/base.ts","../src/namespaces/agent.ts","../src/namespaces/mcp.ts","../src/namespaces/mcp-server.ts","../src/namespaces/prompt.ts","../src/namespaces/scorer.ts","../src/namespaces/workspace.ts","../src/namespaces/skill.ts","../src/namespaces/favorites.ts","../src/template-engine.ts","../src/rule-evaluator.ts","../src/instruction-builder.ts","../src/providers.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAYiB,eACf;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA;EAEA,OAAO,OAAO,eAAe;EAC7B,gBAAgB,YAAY,UAAU,iBAAiB,QAAQ;EAC/D,OAAO,OAAO,eAAe;EAC7B,OAAO,aAAa;EACpB,KAAK,OAAO,aAAa,QAAQ;EACjC,aAAa,OAAO,aAAa,QAAQ;;;;;;8BAOrB;YACE,QAAQ;EAA9B,YAAsB,QAAQ;gBAEhB,UAAU;gBAIV,UAAUA;YAId;;;;;;;;;;;;;;;;;8BAsBU,oBACpB;EAAuB;GACvB;EAAuB;GACvB,YACA,aACA,qBACA,WACA,YAAY,mBACJ;YACE,QAAM,YAAA;;;;;qBAMG,qBAAqB,QACtC,eAAe,cAAc,cAAc,YAAY,aAAa,qBAAqB;;;;;;YAQ3E,QAAQ,UAAU,YAAY,QAAQ;;;;;YAQ5C,aAAa;EAIjB,OAAO,OAAO,eAAe,QAAQ;EAarC,QAAQ,YAAY,UAAU,iBAAiB,QAAQ;EAgCvD,OAAO,OAAO,eAAe,QAAQ;EAerC,OAAO,aAAa;EAQpB,KAAK,OAAO,aAAa,QAAQ;EAMjC,aAAa,OAAO,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;;;;;;;;;wBC8C1C,kBAAkB,WAAW,WAAW,SAAS;;;UChFhD;EACf,qBAAqB;;EAErB;;;;;;;;;;wBAWoB,yBACpB,QAAQ,yBACR,SAAS,yBACT,MAAM,yBACL;;;qBC3BU,yBAAyB;EACpC;EACA;EACA;;qBAyBW,sBAAsB;EACjC;EACA;EACA;EACA,MAAM;;;;qBCmBK,wBAAwB;;EAEnC,WAAW;;EAEX,WAAWC;UAEH;UACA;UACA;UACA;UACA;mBACS;UACT;UACA;mBACS;UACT;UACA;;;;;;WAOC,eAAe,YAAY;;;;;;WAO3B,aAAa,YAAY;;;;;;;WAQzB,cAAc,YAAY;;;;;;WAO1B,YAAY,YAAYC;;;;;;WAOxB,cAAc,YAAY;WAEnB,OAAO;WACP,KAAK;WACL,WAAW;WACX,QAAQ;WACR,QAAQ;WACR,WAAW;WACX,OAAO;WACP,WAAW;EAE3B,YAAY,SAAS;;;;;EA4DrB,mBAAmB,QAAQ;;;;;;;;;;;;UAkEb;;;;;;;;UAoDA;;EA6Cd;;EAMM,0BAA0B,QAAQ;;;;;EAmBxC;;;;;EASM,kBAAkB,QAAQ;;;;;;;UA6ClB;;EAuBd;;EAKA,4BAA4B;;EAK5B,gBAAgB,aAAa;;;;;EAQ7B,uBAAuB,aAAa;;EASpC,oBAAoB,eAAe;;EAKnC,qBAAqB,aAAa;;EAKlC,yBAAyB,eAAe;;EAIxC,0BAA0B;;EAK1B,uBAAuB;;EAKvB,yBAAyB;;;;;;;;;;;EAcnB,iBAAiB,qBAAqB,iBAAiB,0BAA0B,QAAQ"}
package/dist/index.js CHANGED
@@ -831,6 +831,10 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
831
831
  }
832
832
  return super.create(finalInput);
833
833
  }
834
+ /**
835
+ * Returns the registered agent when it is defined by the project, either in code (`'code'`) or in an
836
+ * `agents/<name>/` folder (`'fs'`). Stored records for these agents are overrides layered on top.
837
+ */
834
838
  getCodeDefinedAgent(id) {
835
839
  let agent;
836
840
  try {
@@ -838,7 +842,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
838
842
  } catch {
839
843
  return;
840
844
  }
841
- return agent?.source === "code" ? agent : void 0;
845
+ return agent?.source === "code" || agent?.source === "fs" ? agent : void 0;
842
846
  }
843
847
  async ensureStoredWorkspaceRefs(workspace) {
844
848
  if (!workspace) return;