@mastra/code-sdk 1.16.0-alpha.8 → 1.16.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/dist/acp/agent.d.ts.map +1 -1
- package/dist/agent-connections/messaging-processor.d.ts.map +1 -1
- package/dist/agent-connections/registry.d.ts.map +1 -1
- package/dist/agent-connections/signal-provider.d.ts +21 -21
- package/dist/agent-connections/signal-provider.d.ts.map +1 -1
- package/dist/agent-connections/state-processor.d.ts.map +1 -1
- package/dist/agent-connections/tools.d.ts +21 -21
- package/dist/agent-connections/tools.d.ts.map +1 -1
- package/dist/agents/credential-resolver.d.ts.map +1 -1
- package/dist/agents/mastracode-gateway.d.ts.map +1 -1
- package/dist/agents/memory.d.ts.map +1 -1
- package/dist/agents/memory.js +4 -3
- package/dist/agents/memory.js.map +1 -1
- package/dist/agents/prompts/model.d.ts.map +1 -1
- package/dist/agents/sandbox-filesystem.d.ts.map +1 -1
- package/dist/agents/tools.d.ts.map +1 -1
- package/dist/auth/account-rotation-processor.d.ts +4 -4
- package/dist/auth/account-rotation-processor.d.ts.map +1 -1
- package/dist/auth/provider-auth-error.d.ts.map +1 -1
- package/dist/auth/providers/github-copilot.d.ts +3 -3
- package/dist/auth/providers/github-copilot.d.ts.map +1 -1
- package/dist/auth/storage.d.ts.map +1 -1
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +18 -1
- package/dist/constants.js.map +1 -1
- package/dist/factory/remote-controller.d.ts.map +1 -1
- package/dist/factory/remote-session.d.ts +2 -2
- package/dist/factory/remote-session.d.ts.map +1 -1
- package/dist/goal-manager.d.ts.map +1 -1
- package/dist/goal-signal.d.ts +1 -1
- package/dist/goal-signal.d.ts.map +1 -1
- package/dist/headless/flags.d.ts +2 -2
- package/dist/headless/flags.d.ts.map +1 -1
- package/dist/headless/types.d.ts +3 -3
- package/dist/headless/types.d.ts.map +1 -1
- package/dist/hooks/manager.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/ipc/ipc-reporter.d.ts.map +1 -1
- package/dist/knowledge-inspector.d.ts.map +1 -1
- package/dist/lsp/client.d.ts.map +1 -1
- package/dist/lsp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +10 -11
- package/dist/mcp/manager.js.map +1 -1
- package/dist/onboarding/settings.d.ts.map +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/plugins/signal-lane.d.ts.map +1 -1
- package/dist/process-memory-diagnostics.d.ts.map +1 -1
- package/dist/processors/plan-rejection-abort.d.ts +1 -1
- package/dist/processors/plan-rejection-abort.d.ts.map +1 -1
- package/dist/providers/amazon-bedrock-gateway.d.ts.map +1 -1
- package/dist/providers/anthropic-prompt-cache.d.ts +1 -1
- package/dist/providers/claude-max.d.ts.map +1 -1
- package/dist/providers/github-copilot-gateway.d.ts.map +1 -1
- package/dist/providers/provider-thinking.d.ts.map +1 -1
- package/dist/schedules/scheduler.d.ts.map +1 -1
- package/dist/schedules/tools.d.ts +6 -6
- package/dist/schedules/tools.d.ts.map +1 -1
- package/dist/schema.d.ts +87 -87
- package/dist/theme-palette.d.ts +7 -7
- package/dist/theme-palette.d.ts.map +1 -1
- package/dist/thinking.d.ts.map +1 -1
- package/dist/tool-names.d.ts +18 -18
- package/dist/tool-names.d.ts.map +1 -1
- package/dist/tools/request-sandbox-access.d.ts.map +1 -1
- package/dist/tools/request-sandbox-access.js +2 -1
- package/dist/tools/request-sandbox-access.js.map +1 -1
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/workflows/get-workflow.d.ts +1 -1
- package/dist/tools/workflows/list-available-agents.d.ts +1 -1
- package/dist/tools/workflows/list-available-classifiers.d.ts +7 -7
- package/dist/tools/workflows/list-workflows.d.ts +1 -1
- package/dist/tools/workflows/save-workflow.d.ts +328 -328
- package/dist/tools/workflows/tool-ids.d.ts +11 -11
- package/dist/tools/workflows/tool-ids.d.ts.map +1 -1
- package/dist/utils/discarding-scores-storage.d.ts.map +1 -1
- package/dist/utils/local-observability.js +1 -1
- package/dist/utils/local-observability.js.map +1 -1
- package/dist/utils/maintenance-lock.d.ts.map +1 -1
- package/dist/utils/signals-pubsub.d.ts.map +1 -1
- package/dist/utils/storage-factory.d.ts.map +1 -1
- package/dist/utils/thread-lock.d.ts.map +1 -1
- package/package.json +19 -19
package/dist/acp/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/acp/agent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,KAAK,EACL,mBAAmB,EACnB,mBAAmB,EAEnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,YAAY,EAEZ,6BAA6B,EAC7B,8BAA8B,EAE/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAInG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAO3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,oBAAoB,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,MAAM,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MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQjF;IAEK,wBAAwB,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB5F;CACF;AASD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAiB3E;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GACrD,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,mBAAmB,GAAG,SAAS,CAW3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging-processor.d.ts","sourceRoot":"","sources":["../../src/agent-connections/messaging-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,iCAAiC,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAUrE,KAAK,gBAAgB,GAAG,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAMxF,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AASF,qBAAa,yCAAyC;IACpD,QAAQ,CAAC,EAAE,0CAA0C;IACrD,QAAQ,CAAC,IAAI,mDAAmD;IAE1D,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"messaging-processor.d.ts","sourceRoot":"","sources":["../../src/agent-connections/messaging-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EA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
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/agent-connections/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AASvF,eAAO,MAAM,uCAAuC,oCAAoC,CAAC;AAEzF,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;AAEnH,MAAM,WAAW,8BAA8B;IAC7C,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,qBAAa,uBAAuB;;IAIlC,YAAY,OAAO,GAAE,8BAAmC,EAGvD;IAEK,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAM7E;IAEK,SAAS,CAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAsB5G;IAEK,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAEjH;CA4BF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE1F"}
|
|
@@ -19,13 +19,13 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
19
19
|
agentId: string;
|
|
20
20
|
resourceId: string;
|
|
21
21
|
threadId: string;
|
|
22
|
-
relationship: "none" | "saved";
|
|
23
|
-
presence: "advertised" | "absent";
|
|
24
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
25
|
-
canAttemptSend: boolean;
|
|
26
22
|
label?: string | undefined;
|
|
27
23
|
title?: string | undefined;
|
|
28
24
|
mode?: string | undefined;
|
|
25
|
+
relationship: "none" | "saved";
|
|
26
|
+
presence: "absent" | "advertised";
|
|
27
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
28
|
+
canAttemptSend: boolean;
|
|
29
29
|
pid?: number | undefined;
|
|
30
30
|
connectedAt?: number | undefined;
|
|
31
31
|
lastSeenAt?: number | undefined;
|
|
@@ -39,15 +39,15 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
39
39
|
content: string;
|
|
40
40
|
connected: {
|
|
41
41
|
id: string;
|
|
42
|
+
agentId?: string | undefined;
|
|
42
43
|
resourceId: string;
|
|
43
44
|
threadId: string;
|
|
44
|
-
connectedAt: number;
|
|
45
|
-
lastSeenAt: number;
|
|
46
|
-
agentId?: string | undefined;
|
|
47
45
|
label?: string | undefined;
|
|
48
46
|
title?: string | undefined;
|
|
49
47
|
mode?: string | undefined;
|
|
50
48
|
pid?: number | undefined;
|
|
49
|
+
connectedAt: number;
|
|
50
|
+
lastSeenAt: number;
|
|
51
51
|
}[];
|
|
52
52
|
changed: {
|
|
53
53
|
op: string;
|
|
@@ -57,13 +57,13 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
57
57
|
agentId: string;
|
|
58
58
|
resourceId: string;
|
|
59
59
|
threadId: string;
|
|
60
|
-
relationship: "none" | "saved";
|
|
61
|
-
presence: "advertised" | "absent";
|
|
62
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
63
|
-
canAttemptSend: boolean;
|
|
64
60
|
label?: string | undefined;
|
|
65
61
|
title?: string | undefined;
|
|
66
62
|
mode?: string | undefined;
|
|
63
|
+
relationship: "none" | "saved";
|
|
64
|
+
presence: "absent" | "advertised";
|
|
65
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
66
|
+
canAttemptSend: boolean;
|
|
67
67
|
pid?: number | undefined;
|
|
68
68
|
connectedAt?: number | undefined;
|
|
69
69
|
lastSeenAt?: number | undefined;
|
|
@@ -79,15 +79,15 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
79
79
|
content: string;
|
|
80
80
|
connected: {
|
|
81
81
|
id: string;
|
|
82
|
+
agentId?: string | undefined;
|
|
82
83
|
resourceId: string;
|
|
83
84
|
threadId: string;
|
|
84
|
-
connectedAt: number;
|
|
85
|
-
lastSeenAt: number;
|
|
86
|
-
agentId?: string | undefined;
|
|
87
85
|
label?: string | undefined;
|
|
88
86
|
title?: string | undefined;
|
|
89
87
|
mode?: string | undefined;
|
|
90
88
|
pid?: number | undefined;
|
|
89
|
+
connectedAt: number;
|
|
90
|
+
lastSeenAt: number;
|
|
91
91
|
}[];
|
|
92
92
|
disconnectedIds: string[];
|
|
93
93
|
alreadyDisconnectedIds: string[];
|
|
@@ -100,7 +100,7 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
100
100
|
agent_signal_send: import("@mastra/core/tools").Tool<{
|
|
101
101
|
targetId: string;
|
|
102
102
|
message: string;
|
|
103
|
-
priority: "
|
|
103
|
+
priority: "high" | "low" | "medium" | "urgent";
|
|
104
104
|
expectsReply: boolean;
|
|
105
105
|
messageId?: string | undefined;
|
|
106
106
|
replyTo?: string | undefined;
|
|
@@ -111,23 +111,23 @@ export declare class CrossAgentMessagingSignalProvider extends SignalProvider<'c
|
|
|
111
111
|
agentId: string;
|
|
112
112
|
resourceId: string;
|
|
113
113
|
threadId: string;
|
|
114
|
-
relationship: "none" | "saved";
|
|
115
|
-
presence: "advertised" | "absent";
|
|
116
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
117
|
-
canAttemptSend: boolean;
|
|
118
114
|
label?: string | undefined;
|
|
119
115
|
title?: string | undefined;
|
|
120
116
|
mode?: string | undefined;
|
|
117
|
+
relationship: "none" | "saved";
|
|
118
|
+
presence: "absent" | "advertised";
|
|
119
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
120
|
+
canAttemptSend: boolean;
|
|
121
121
|
pid?: number | undefined;
|
|
122
122
|
connectedAt?: number | undefined;
|
|
123
123
|
lastSeenAt?: number | undefined;
|
|
124
124
|
} | undefined;
|
|
125
|
-
priority?: "
|
|
125
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
126
126
|
expectsReply?: boolean | undefined;
|
|
127
127
|
messageId?: string | undefined;
|
|
128
128
|
replyTo?: string | undefined;
|
|
129
129
|
returnPeerId?: string | undefined;
|
|
130
|
-
routingAction?: "
|
|
130
|
+
routingAction?: "blocked" | "deliver" | "discard" | "persist" | "wake" | undefined;
|
|
131
131
|
replyOutcome?: "peer-unavailable" | undefined;
|
|
132
132
|
runId?: string | undefined;
|
|
133
133
|
notification?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal-provider.d.ts","sourceRoot":"","sources":["../../src/agent-connections/signal-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAIpE,MAAM,WAAW,wCAAyC,SAAQ,8BAA8B;CAAG;AACnG,MAAM,WAAW,qCAAsC,SAAQ,wCAAwC;CAAG;AAE1G,qBAAa,iCAAkC,SAAQ,cAAc,CAAC,uBAAuB,CAAC;;IAC5F,QAAQ,CAAC,EAAE,2BAA2B;
|
|
1
|
+
{"version":3,"file":"signal-provider.d.ts","sourceRoot":"","sources":["../../src/agent-connections/signal-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIt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AE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAEvF;IAED,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,kBAAkB,CAYvD;IAEK,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA4ExF;CAMF;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CAqBxE"}
|
|
@@ -14,13 +14,13 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
14
14
|
agentId: string;
|
|
15
15
|
resourceId: string;
|
|
16
16
|
threadId: string;
|
|
17
|
-
relationship: "none" | "saved";
|
|
18
|
-
presence: "advertised" | "absent";
|
|
19
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
20
|
-
canAttemptSend: boolean;
|
|
21
17
|
label?: string | undefined;
|
|
22
18
|
title?: string | undefined;
|
|
23
19
|
mode?: string | undefined;
|
|
20
|
+
relationship: "none" | "saved";
|
|
21
|
+
presence: "absent" | "advertised";
|
|
22
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
23
|
+
canAttemptSend: boolean;
|
|
24
24
|
pid?: number | undefined;
|
|
25
25
|
connectedAt?: number | undefined;
|
|
26
26
|
lastSeenAt?: number | undefined;
|
|
@@ -34,15 +34,15 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
34
34
|
content: string;
|
|
35
35
|
connected: {
|
|
36
36
|
id: string;
|
|
37
|
+
agentId?: string | undefined;
|
|
37
38
|
resourceId: string;
|
|
38
39
|
threadId: string;
|
|
39
|
-
connectedAt: number;
|
|
40
|
-
lastSeenAt: number;
|
|
41
|
-
agentId?: string | undefined;
|
|
42
40
|
label?: string | undefined;
|
|
43
41
|
title?: string | undefined;
|
|
44
42
|
mode?: string | undefined;
|
|
45
43
|
pid?: number | undefined;
|
|
44
|
+
connectedAt: number;
|
|
45
|
+
lastSeenAt: number;
|
|
46
46
|
}[];
|
|
47
47
|
changed: {
|
|
48
48
|
op: string;
|
|
@@ -52,13 +52,13 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
52
52
|
agentId: string;
|
|
53
53
|
resourceId: string;
|
|
54
54
|
threadId: string;
|
|
55
|
-
relationship: "none" | "saved";
|
|
56
|
-
presence: "advertised" | "absent";
|
|
57
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
58
|
-
canAttemptSend: boolean;
|
|
59
55
|
label?: string | undefined;
|
|
60
56
|
title?: string | undefined;
|
|
61
57
|
mode?: string | undefined;
|
|
58
|
+
relationship: "none" | "saved";
|
|
59
|
+
presence: "absent" | "advertised";
|
|
60
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
61
|
+
canAttemptSend: boolean;
|
|
62
62
|
pid?: number | undefined;
|
|
63
63
|
connectedAt?: number | undefined;
|
|
64
64
|
lastSeenAt?: number | undefined;
|
|
@@ -74,15 +74,15 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
74
74
|
content: string;
|
|
75
75
|
connected: {
|
|
76
76
|
id: string;
|
|
77
|
+
agentId?: string | undefined;
|
|
77
78
|
resourceId: string;
|
|
78
79
|
threadId: string;
|
|
79
|
-
connectedAt: number;
|
|
80
|
-
lastSeenAt: number;
|
|
81
|
-
agentId?: string | undefined;
|
|
82
80
|
label?: string | undefined;
|
|
83
81
|
title?: string | undefined;
|
|
84
82
|
mode?: string | undefined;
|
|
85
83
|
pid?: number | undefined;
|
|
84
|
+
connectedAt: number;
|
|
85
|
+
lastSeenAt: number;
|
|
86
86
|
}[];
|
|
87
87
|
disconnectedIds: string[];
|
|
88
88
|
alreadyDisconnectedIds: string[];
|
|
@@ -95,7 +95,7 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
95
95
|
agent_signal_send: import("@mastra/core/tools").Tool<{
|
|
96
96
|
targetId: string;
|
|
97
97
|
message: string;
|
|
98
|
-
priority: "
|
|
98
|
+
priority: "high" | "low" | "medium" | "urgent";
|
|
99
99
|
expectsReply: boolean;
|
|
100
100
|
messageId?: string | undefined;
|
|
101
101
|
replyTo?: string | undefined;
|
|
@@ -106,23 +106,23 @@ export declare function createAgentConnectionTools(options?: AgentConnectionTool
|
|
|
106
106
|
agentId: string;
|
|
107
107
|
resourceId: string;
|
|
108
108
|
threadId: string;
|
|
109
|
-
relationship: "none" | "saved";
|
|
110
|
-
presence: "advertised" | "absent";
|
|
111
|
-
displayStatus: "saved" | "discovered" | "connected";
|
|
112
|
-
canAttemptSend: boolean;
|
|
113
109
|
label?: string | undefined;
|
|
114
110
|
title?: string | undefined;
|
|
115
111
|
mode?: string | undefined;
|
|
112
|
+
relationship: "none" | "saved";
|
|
113
|
+
presence: "absent" | "advertised";
|
|
114
|
+
displayStatus: "connected" | "discovered" | "saved";
|
|
115
|
+
canAttemptSend: boolean;
|
|
116
116
|
pid?: number | undefined;
|
|
117
117
|
connectedAt?: number | undefined;
|
|
118
118
|
lastSeenAt?: number | undefined;
|
|
119
119
|
} | undefined;
|
|
120
|
-
priority?: "
|
|
120
|
+
priority?: "high" | "low" | "medium" | "urgent" | undefined;
|
|
121
121
|
expectsReply?: boolean | undefined;
|
|
122
122
|
messageId?: string | undefined;
|
|
123
123
|
replyTo?: string | undefined;
|
|
124
124
|
returnPeerId?: string | undefined;
|
|
125
|
-
routingAction?: "
|
|
125
|
+
routingAction?: "blocked" | "deliver" | "discard" | "persist" | "wake" | undefined;
|
|
126
126
|
replyOutcome?: "peer-unavailable" | undefined;
|
|
127
127
|
runId?: string | undefined;
|
|
128
128
|
notification?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agent-connections/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAgB,MAAM,eAAe,CAAC;AA8GtE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,QAAQ,CAAC,EAAE,MACP;QACE,sBAAsB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9D,mBAAmB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KAC5D,GACD,SAAS,CAAC;CACf;AAED,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,2BAAgC
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agent-connections/tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAgB,MAAM,eAAe,CAAC;AA8GtE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,QAAQ,CAAC,EAAE,MACP;QACE,sBAAsB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9D,mBAAmB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KAC5D,GACD,SAAS,CAAC;CACf;AAED,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,2BAAgC;IAoahF,sBAAsB;;;;;;;;;;;;;;;;;;;;;IACtB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACb,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;IAChB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-resolver.d.ts","sourceRoot":"","sources":["../../src/agents/credential-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CA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;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE;IAgK3E;;;OAGG;eACc,OAAO,CAAC,IAAI,CAAC;EAKjC"}
|
package/dist/agents/memory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../constants.js";
|
|
1
|
+
import { MIN_OBSERVATION_THRESHOLD } from "../constants.js";
|
|
2
2
|
import { getOmScope } from "../utils/project.js";
|
|
3
3
|
import { MASTRACODE_AUTO_OM_MODELS, resolveAutoOMModelId } from "../onboarding/packs.js";
|
|
4
4
|
import { loadSettings } from "../onboarding/settings.js";
|
|
@@ -196,16 +196,17 @@ function getDynamicMemory(storage, vector, settingsPath, options, knowledge) {
|
|
|
196
196
|
}
|
|
197
197
|
const subconsciousAvailable = subconsciousEnabled && !orgUnresolvedRefusal;
|
|
198
198
|
const omScope = isFactory ? "thread" : state?.omScope ?? getOmScope(state?.projectPath);
|
|
199
|
+
const isResourceScope = omScope === "resource";
|
|
199
200
|
const factorySettingsContext = getFactoryMemorySettingsContext(requestContext);
|
|
200
201
|
const factorySettings = isFactoryMemorySettingsUnavailable(factorySettingsContext) || factorySettingsContext === void 0 && isFactory ? null : factorySettingsContext;
|
|
201
|
-
const
|
|
202
|
+
const storedObsThreshold = factorySettings !== void 0 ? factorySettings?.observationThreshold ?? 3e4 : state?.observationThreshold ?? 3e4;
|
|
203
|
+
const obsThreshold = isResourceScope ? storedObsThreshold : Math.max(storedObsThreshold, MIN_OBSERVATION_THRESHOLD);
|
|
202
204
|
const refThreshold = factorySettings !== void 0 ? factorySettings?.reflectionThreshold ?? 4e4 : state?.reflectionThreshold ?? 4e4;
|
|
203
205
|
const caveman = state?.cavemanObservations ?? false;
|
|
204
206
|
const observerPreviousObservationTokens = 1e3;
|
|
205
207
|
const observeAttachments = factorySettings !== void 0 ? factorySettings?.observeAttachments ?? "auto" : state?.observeAttachments;
|
|
206
208
|
const cacheKey = `${obsThreshold}:${refThreshold}:${omScope}:${observerPreviousObservationTokens}:${caveman ? 1 : 0}:${observeAttachments}:${isFactory ? 1 : 0}:${subconsciousAvailable ? 1 : 0}`;
|
|
207
209
|
if (cachedMemory && cachedMemoryKey === cacheKey) return cachedMemory;
|
|
208
|
-
const isResourceScope = omScope === "resource";
|
|
209
210
|
const observerInstruction = caveman ? `${DYNAMIC_AGENTS_MD_INSTRUCTION}\n\n${CAVEMAN_OM_INSTRUCTION}` : DYNAMIC_AGENTS_MD_INSTRUCTION;
|
|
210
211
|
const reflectionInstruction = caveman ? CAVEMAN_OM_INSTRUCTION : void 0;
|
|
211
212
|
if (cachedMemory) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","names":[],"sources":["../../src/agents/memory.ts"],"sourcesContent":["import type { AgentControllerRequestContext } from '@mastra/core/agent-controller';\nimport type { Knowledge } from '@mastra/core/knowledge';\nimport type { RequestContext } from '@mastra/core/request-context';\nimport type { MastraCompositeStore } from '@mastra/core/storage';\nimport type { MastraVector } from '@mastra/core/vector';\nimport type { fastembed } from '@mastra/fastembed';\nimport { Memory, Subconscious } from '@mastra/memory';\nimport { DEFAULT_OBS_THRESHOLD, DEFAULT_REF_THRESHOLD } from '../constants.js';\nimport { LOCAL_KNOWLEDGE_ORG_ID, resolveKnowledgeScopeIdentity } from '../knowledge-scope.js';\nimport { MASTRACODE_AUTO_OM_MODELS, resolveAutoOMModelId } from '../onboarding/packs.js';\nimport { loadSettings } from '../onboarding/settings.js';\nimport { ANTHROPIC_PROMPT_CACHE_TTL } from '../providers/anthropic-prompt-cache.js';\nimport type { MastraCodeState } from '../schema.js';\nimport { getOmScope } from '../utils/project.js';\nimport { canUseProvider, getActiveMemoryRoute, resolveModel } from './model.js';\n\n/**\n * `fastembed.small`, loaded on the first embedding. Importing `@mastra/fastembed` up front loads ONNX\n * Runtime and a native tokenizer (~11 MB) into every session, including ones that never embed.\n */\nconst lazyFastembedSmall: typeof fastembed.small = {\n specificationVersion: 'v3',\n provider: 'fastembed',\n modelId: 'bge-small-en-v1.5',\n maxEmbeddingsPerCall: 256,\n supportsParallelCalls: true,\n async doEmbed(options) {\n const { fastembed } = await import('@mastra/fastembed');\n return fastembed.small.doEmbed(options);\n },\n};\n\n/** Route-backed OM fallback entry. */\ntype MemoryModelRouteEntry = { id: string; model: ReturnType<typeof resolveModel> };\n\n/**\n * Resolve the active model route's memory models, starting at a same-thread\n * pending fallback hop. Returns `'auto'` when the route's first memory model is\n * Auto, and `undefined` when the route sets no memory model.\n */\nfunction resolveRouteMemoryModels(\n state: MastraCodeState | undefined,\n threadId: string | null | undefined,\n resolve: (modelId: string) => ReturnType<typeof resolveModel>,\n): MemoryModelRouteEntry[] | 'auto' | undefined {\n const memoryRoute = getActiveMemoryRoute(state, threadId);\n if (memoryRoute[0]?.memoryModelId === 'auto') return 'auto';\n const seenModelIds = new Set<string>();\n const appearances = new Map<string, number>();\n const entries: MemoryModelRouteEntry[] = [];\n for (const entry of memoryRoute) {\n if (!entry.memoryModelId || entry.memoryModelId === 'auto' || seenModelIds.has(entry.memoryModelId)) continue;\n seenModelIds.add(entry.memoryModelId);\n const occurrence = (appearances.get(entry.id) ?? 0) + 1;\n appearances.set(entry.id, occurrence);\n try {\n entries.push({\n id: `${entry.id}:memory${occurrence === 1 ? '' : `#${occurrence}`}`,\n model: resolve(entry.memoryModelId),\n });\n } catch {\n break;\n }\n }\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * The authoritative per-caller Factory memory-settings row, placed on the request\n * context before Factory's model-dependent processors run. `null` means the row\n * exists but is empty (every role auto). An unavailable sentinel or a missing\n * value on a Factory-owned session falls back to Auto roles and default\n * thresholds/attachments, so memory keeps working while Factory reports the error.\n */\ninterface FactoryMemorySettings {\n observerModelId: string | null;\n reflectorModelId: string | null;\n observationThreshold: number | null;\n reflectionThreshold: number | null;\n observeAttachments: 'auto' | boolean | null;\n}\n\ntype FactoryMemorySettingsContext =\n | FactoryMemorySettings\n | null\n | { status: 'unavailable'; reason: string }\n | undefined;\n\nfunction getFactoryMemorySettingsContext(requestContext: RequestContext): FactoryMemorySettingsContext {\n return requestContext.get('mastra__factoryMemorySettings') as FactoryMemorySettingsContext;\n}\n\nfunction isFactoryMemorySettingsUnavailable(\n settings: FactoryMemorySettingsContext,\n): settings is { status: 'unavailable'; reason: string } {\n return settings !== null && typeof settings === 'object' && 'status' in settings && settings.status === 'unavailable';\n}\n\nfunction getMainModelId(requestContext: RequestContext): string | undefined {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n return controller?.session.modelId || (controller?.getState()?.currentModelId as string | undefined);\n}\n\n/**\n * Resolve one OM role's model for this invocation. Returns `'auto'` for Memory's\n * auto policy, or a concrete model. Factory's DB row is authoritative for\n * Factory sessions (an unreadable row falls back to auto). Otherwise the active\n * model route's memory models win, then the per-role selection, then legacy\n * concrete settings.\n */\nfunction resolveOmRoleModelForRequest(\n role: 'observer' | 'reflector',\n requestContext: RequestContext,\n settingsPath?: string,\n options?: { disableSettingsOmSeed?: boolean },\n): 'auto' | ReturnType<typeof resolveModel> | MemoryModelRouteEntry[] {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n const state = controller?.getState() as MastraCodeState | undefined;\n const resolveOptions = { remapForCodexOAuth: true, requestContext, anthropicPromptCacheScope: 'system' } as const;\n const factorySettingsContext = getFactoryMemorySettingsContext(requestContext);\n const isFactory = typeof state?.factoryProjectId === 'string';\n\n const useModel = (modelId: string) => {\n requestContext.set(`om.${role}.selectionMode`, 'model');\n requestContext.set(`om.${role}.effectiveModelId`, modelId);\n return resolveModel(modelId, resolveOptions);\n };\n const useAuto = () => {\n requestContext.set(`om.${role}.selectionMode`, 'auto');\n // These two keys are declared in the span-context allowlist\n // (`mastracode/sdk/src/index.ts`), so traces can report intent separately from\n // the effective concrete model without either being mistaken for a model ID.\n requestContext.set(\n `om.${role}.effectiveModelId`,\n resolveAutoOMModelId(getMainModelId(requestContext), providerId =>\n canUseProvider(providerId, { requestContext }),\n ),\n );\n return 'auto' as const;\n };\n\n if (\n isFactoryMemorySettingsUnavailable(factorySettingsContext) ||\n (factorySettingsContext === undefined && isFactory)\n ) {\n return useAuto();\n }\n if (factorySettingsContext !== undefined) {\n const factoryModelId = factorySettingsContext?.[`${role}ModelId`];\n return factoryModelId ? useModel(factoryModelId) : useAuto();\n }\n\n // The configured settings file, not the default one: a caller that points the\n // agent at another settings path must get the same override resolution for\n // observational memory as it does for the main model. Hosts that disable the\n // settings seed never read it.\n const settings = options?.disableSettingsOmSeed ? undefined : loadSettings(settingsPath);\n const routeMemory = resolveRouteMemoryModels(state, controller?.threadId, modelId =>\n resolveModel(modelId, resolveOptions),\n );\n if (routeMemory === 'auto') return useAuto();\n if (routeMemory) {\n requestContext.set(`om.${role}.selectionMode`, 'model');\n requestContext.set(`om.${role}.effectiveModelId`, routeMemory[0]?.model.modelId);\n return routeMemory.length === 1 ? routeMemory[0]!.model : routeMemory;\n }\n\n const selection: unknown = state?.[`${role}ModelSelection`];\n if (selection === 'auto') return useAuto();\n if (typeof selection === 'string' && selection) return useModel(selection);\n if (\n selection &&\n typeof selection === 'object' &&\n 'modelId' in selection &&\n typeof selection.modelId === 'string' &&\n selection.modelId\n ) {\n return useModel(selection.modelId);\n }\n\n const roleOverride =\n role === 'observer' ? settings?.models?.observerModelOverride : settings?.models?.reflectorModelOverride;\n if (roleOverride) return useModel(roleOverride);\n const legacyModelId = state?.[`${role}ModelId`];\n if (typeof legacyModelId === 'string' && legacyModelId) return useModel(legacyModelId);\n return useAuto();\n}\n\nconst DYNAMIC_AGENTS_MD_INSTRUCTION =\n 'Messages wrapped in <system-reminder type=\"dynamic-agents-md\" ...>...</system-reminder> are ephemeral project-context instructions injected from files on disk. Do NOT observe or extract information from these messages — they are reloaded automatically when needed and should not be stored in memory.';\n\n// Derived from https://github.com/JuliusBrussee/caveman and adapted for OM use with fixed full-level compression.\nconst CAVEMAN_OM_INSTRUCTION = `Respond terse like smart caveman. All technical substance stay. Only fluff die.\n\nUse full caveman compression style.\n\nDrop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not \"implement a solution for\"). Technical terms exact. Code blocks unchanged. Errors quoted exact. Leave out the words \"agent\" and \"assistant\" at the start of each observation line, it is assumed each line is referring to the assistant unless it specifically says it was about the user. Leave out parenthesis and other text characters like * that would not contribute to understanding the observations.\n\nPattern: \\`[thing] [action] [reason]. [next step]\\`\n\nNot: \"Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by...\"\nYes: \"Bug in auth middleware. Token expiry check use < not <=. Fix:\"\n\nExample 1\n🔴 14:31 user asks why React component rerenders\n🟡 14:32 saw inline object prop create new ref each render, cause rerender\n✅ 14:34 fixed render issue by wrap object in useMemo\n\nExample 2\n🟡 15:10 explained pool reuse DB connections, skip repeat handshake overhead\n\nDon't say \"Agent did x\", say \"did x\". It will be assumed the agent did what was observed. The who should only be specified for the user or other third parties: \"user asked x\"\n\nDrop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question, and anything that requires remembering verbatim content. Resume caveman after clear part done`;\n\nexport { LOCAL_KNOWLEDGE_ORG_ID };\n\n// One error per session, not per memory resolution. Keyed on the session id\n// rather than the controller object: the controller is read off the request\n// context on every resolution, so it is a fresh object per request and would\n// dedupe nothing. Bounded so a long-running Factory process cannot grow this\n// without limit — refusing sessions are rare, and losing the oldest ids only\n// costs one extra log line.\nconst REPORTED_ORG_UNRESOLVED_LIMIT = 500;\nconst reportedOrgUnresolved = new Set<string>();\n\nfunction reportOrgUnresolved(\n controller: AgentControllerRequestContext<MastraCodeState> | undefined,\n factoryProjectId: string | undefined,\n reason?: string,\n) {\n const sessionId = controller?.session?.id;\n if (sessionId) {\n if (reportedOrgUnresolved.has(sessionId)) return;\n if (reportedOrgUnresolved.size >= REPORTED_ORG_UNRESOLVED_LIMIT) {\n reportedOrgUnresolved.delete(reportedOrgUnresolved.values().next().value as string);\n }\n reportedOrgUnresolved.add(sessionId);\n }\n const session = controller?.session;\n console.error(\n `[Subconscious] Knowledge curation disabled: no organization resolved for session ${session?.id ?? 'unknown'} (project ${factoryProjectId ?? 'none'})${reason ? `: ${reason}` : ''}. Knowledge is not written rather than written where it cannot be read.`,\n );\n}\n\n/**\n * Whether the experimental subconscious (knowledge graph + reminder sidekick)\n * is switched on for this process: it needs a vector store and the opt-in flag.\n */\nexport function isSubconsciousEnabled(vector: MastraVector | undefined): boolean {\n return Boolean(vector) && process.env.MASTRACODE_EXPERIMENTAL_SUBCONSCIOUS === '1';\n}\n\n/**\n * Whether the subconscious tools (`knowledge_*`, `ask_memory`) are registered\n * for a given session. Beyond the process-level switch, a Factory-owned\n * session that cannot resolve its org refuses the subconscious entirely (see\n * `getDynamicMemory`, which applies the same two checks inline because it also\n * needs the resolved identity). The system prompt's tool guidance calls here so\n * it never advertises tools that `getDynamicMemory` did not register.\n */\nexport function hasSubconsciousTools(vector: MastraVector | undefined, state: MastraCodeState | undefined): boolean {\n return isSubconsciousEnabled(vector) && resolveKnowledgeScopeIdentity(state).resolved;\n}\n\n/**\n * Dynamic memory factory function.\n * Reads OM thresholds from controller state via requestContext.\n * Model functions also read from requestContext (no mutable bridge needed).\n */\nexport function getDynamicMemory(\n storage: MastraCompositeStore,\n vector?: MastraVector,\n settingsPath?: string,\n options?: { disableSettingsOmSeed?: boolean },\n knowledge?: Knowledge,\n) {\n // Cache is scoped per storage instance (per getDynamicMemory call) so a\n // Memory bound to one storage is never reused after storage changes.\n let cachedMemory: Memory | null = null;\n let cachedMemoryKey: string | null = null;\n // Instances replaced by a config change may still have background work in flight.\n const retiredMemories = new Set<Memory>();\n\n // Observer/reflector model functions — read the current model ID from\n // controller state via requestContext (propagated by OM's agent.generate).\n // Bound here so the configured settings path reaches role overrides and pack\n // memory-model resolution.\n const getObserverModel = ({ requestContext }: { requestContext: RequestContext }) =>\n resolveOmRoleModelForRequest('observer', requestContext, settingsPath, options);\n const getReflectorModel = ({ requestContext }: { requestContext: RequestContext }) =>\n resolveOmRoleModelForRequest('reflector', requestContext, settingsPath, options);\n // Routes the concrete model Memory's `'auto'` picks through Mastra Code's\n // credential-aware resolver, like every other Mastra Code model.\n const resolveMemoryModel = (modelId: string, { requestContext }: { requestContext?: RequestContext }) =>\n resolveModel(modelId, { remapForCodexOAuth: true, requestContext, anthropicPromptCacheScope: 'system' });\n\n const resolveMemory = ({ requestContext }: { requestContext: RequestContext }) => {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n const state = controller?.getState() as MastraCodeState | undefined;\n const subconsciousEnabled = isSubconsciousEnabled(vector);\n const factoryProjectId = state?.factoryProjectId;\n const isFactory = typeof factoryProjectId === 'string' && factoryProjectId.trim().length > 0;\n\n // A Factory-owned session that could not resolve its org refuses to curate:\n // writing under a substituted identity produces knowledge the fail-closed\n // read path can never see.\n let orgUnresolvedRefusal = false;\n\n if (subconsciousEnabled) {\n const identity = resolveKnowledgeScopeIdentity(state);\n if (identity.resolved) {\n requestContext.set('organizationId', identity.organizationId);\n } else {\n orgUnresolvedRefusal = true;\n reportOrgUnresolved(controller, identity.knowledgeResourceId, identity.reason);\n }\n if (identity.knowledgeResourceId) {\n requestContext.set('knowledgeResourceId', identity.knowledgeResourceId);\n }\n }\n\n const subconsciousAvailable = subconsciousEnabled && !orgUnresolvedRefusal;\n\n // Factory sessions share a memory resource across a Factory's runs and a\n // user's sessions, so their scope is fixed to thread: one shared record would\n // hand every run the others' work and invalidate their prompt caches. Recall\n // search still reaches the whole resource. Neither session state, the env\n // var, nor a repository's database.json can switch it.\n const omScope = isFactory ? 'thread' : (state?.omScope ?? getOmScope(state?.projectPath));\n\n // The Factory row is authoritative and read per invocation, so a stored\n // threshold/attachment change reaches the running Memory without a session.\n const factorySettingsContext = getFactoryMemorySettingsContext(requestContext);\n const factorySettingsUnavailable =\n isFactoryMemorySettingsUnavailable(factorySettingsContext) || (factorySettingsContext === undefined && isFactory);\n const factorySettings = factorySettingsUnavailable ? null : factorySettingsContext;\n const obsThreshold =\n factorySettings !== undefined\n ? (factorySettings?.observationThreshold ?? DEFAULT_OBS_THRESHOLD)\n : (state?.observationThreshold ?? DEFAULT_OBS_THRESHOLD);\n const refThreshold =\n factorySettings !== undefined\n ? (factorySettings?.reflectionThreshold ?? DEFAULT_REF_THRESHOLD)\n : (state?.reflectionThreshold ?? DEFAULT_REF_THRESHOLD);\n const caveman = state?.cavemanObservations ?? false;\n\n const observerPreviousObservationTokens = 1000;\n // The row is authoritative: an absent value means the user left it on Auto,\n // which the config API reports as 'auto' and Memory resolves by model\n // capability.\n const observeAttachments =\n factorySettings !== undefined ? (factorySettings?.observeAttachments ?? 'auto') : state?.observeAttachments;\n // Factory sessions get a factory-only Subconscious config, so the cache key\n // carries Factory presence and settings availability to keep those configs\n // from cross-serving.\n const cacheKey = `${obsThreshold}:${refThreshold}:${omScope}:${observerPreviousObservationTokens}:${caveman ? 1 : 0}:${observeAttachments}:${isFactory ? 1 : 0}:${subconsciousAvailable ? 1 : 0}`;\n if (cachedMemory && cachedMemoryKey === cacheKey) {\n return cachedMemory;\n }\n\n // Async buffering is not supported with resource scope — disable it\n const isResourceScope = omScope === 'resource';\n\n const observerInstruction = caveman\n ? `${DYNAMIC_AGENTS_MD_INSTRUCTION}\\n\\n${CAVEMAN_OM_INSTRUCTION}`\n : DYNAMIC_AGENTS_MD_INSTRUCTION;\n const reflectionInstruction = caveman ? CAVEMAN_OM_INSTRUCTION : undefined;\n\n if (cachedMemory) {\n const retired = cachedMemory;\n retiredMemories.add(retired);\n // settled() rejects if the instance's OM engine failed to start; that must not surface as\n // an unhandled rejection from a background retirement.\n void retired\n .settled()\n .catch(() => {})\n .finally(() => retiredMemories.delete(retired));\n }\n\n cachedMemory = new Memory({\n storage,\n ...(knowledge ? { knowledge } : {}),\n vector: vector || false,\n embedder: vector ? lazyFastembedSmall : undefined,\n options: {\n // Generate a durable title from the first user message. Every client uses\n // the same title in its thread list and active-session chrome. Title\n // generation takes the primary OM model only — its model field does not\n // accept fallback arrays.\n generateTitle:\n process.env.MASTRACODE_DISABLE_TITLE_GENERATION === '1'\n ? false\n : {\n model: ({ requestContext }) => {\n const resolved = getObserverModel({ requestContext });\n if (resolved === 'auto') {\n return resolveMemoryModel(\n resolveAutoOMModelId(getMainModelId(requestContext), providerId =>\n canUseProvider(providerId, { requestContext }),\n ),\n { requestContext },\n );\n }\n return Array.isArray(resolved) ? resolved[0]!.model : resolved;\n },\n },\n observationalMemory:\n process.env.MASTRACODE_DISABLE_OBSERVATIONAL_MEMORY === '1'\n ? false\n : {\n enabled: true,\n autoModels: MASTRACODE_AUTO_OM_MODELS,\n canUseProvider,\n resolveModel: resolveMemoryModel,\n temporalMarkers: true,\n retrieval: vector ? { vector: true } : true,\n experimental_subconscious: subconsciousAvailable\n ? new Subconscious({\n defaultScope: 'resource',\n pins: true,\n ...(isFactory ? { maxSteps: 25 } : {}),\n })\n : undefined,\n scope: omScope,\n // The main agent writes Anthropic cache entries with this TTL; 'auto' can't see it.\n activateAfterIdle: { default: 'auto', anthropic: ANTHROPIC_PROMPT_CACHE_TTL },\n activateOnProviderChange: true,\n observation: {\n bufferTokens: isResourceScope ? false : 1 / 5,\n bufferActivation: isResourceScope ? undefined : 2000,\n model: getObserverModel,\n messageTokens: obsThreshold,\n blockAfter: 2,\n previousObserverTokens: observerPreviousObservationTokens,\n threadTitle: true,\n instruction: observerInstruction,\n observeAttachments,\n },\n reflection: {\n bufferActivation: isResourceScope ? undefined : 1 / 2,\n blockAfter: 1.1,\n model: getReflectorModel,\n observationTokens: refThreshold,\n instruction: reflectionInstruction,\n },\n },\n },\n });\n cachedMemoryKey = cacheKey;\n\n return cachedMemory;\n };\n\n return Object.assign(resolveMemory, {\n /**\n * Wait for background memory work (buffered observations, reflections, indexing) in every\n * instance this factory created. Await before closing storage.\n */\n async settled(): Promise<void> {\n // Drain every instance even if one rejects, so teardown can still close storage.\n await Promise.allSettled([cachedMemory?.settled(), ...[...retiredMemories].map(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AC1B,aAAa;MACX,cAAc,kBAAkB,QAAQ,IAAI;MAC5C,kBAAkB,kBAAkB,KAAA,IAAY;MAChD,OAAO;MACP,eAAe;MACf,YAAY;MACZ,wBAAwB;MACxB,aAAa;MACb,aAAa;MACb;KACF;KACA,YAAY;MACV,kBAAkB,kBAAkB,KAAA,IAAY,IAAI;MACpD,YAAY;MACZ,OAAO;MACP,mBAAmB;MACnB,aAAa;KACf;IACF;GACR;EACF,CAAC;EACD,kBAAkB;EAElB,OAAO;CACT;CAEA,OAAO,OAAO,OAAO,eAAe;;;;;AAKlC,MAAM,UAAyB;EAE7B,MAAM,QAAQ,WAAW,CAAC,cAAc,QAAQ,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,KAAI,WAAU,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC7G,EACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"memory.js","names":[],"sources":["../../src/agents/memory.ts"],"sourcesContent":["import type { AgentControllerRequestContext } from '@mastra/core/agent-controller';\nimport type { Knowledge } from '@mastra/core/knowledge';\nimport type { RequestContext } from '@mastra/core/request-context';\nimport type { MastraCompositeStore } from '@mastra/core/storage';\nimport type { MastraVector } from '@mastra/core/vector';\nimport type { fastembed } from '@mastra/fastembed';\nimport { Memory, Subconscious } from '@mastra/memory';\nimport { DEFAULT_OBS_THRESHOLD, DEFAULT_REF_THRESHOLD, MIN_OBSERVATION_THRESHOLD } from '../constants.js';\nimport { LOCAL_KNOWLEDGE_ORG_ID, resolveKnowledgeScopeIdentity } from '../knowledge-scope.js';\nimport { MASTRACODE_AUTO_OM_MODELS, resolveAutoOMModelId } from '../onboarding/packs.js';\nimport { loadSettings } from '../onboarding/settings.js';\nimport { ANTHROPIC_PROMPT_CACHE_TTL } from '../providers/anthropic-prompt-cache.js';\nimport type { MastraCodeState } from '../schema.js';\nimport { getOmScope } from '../utils/project.js';\nimport { canUseProvider, getActiveMemoryRoute, resolveModel } from './model.js';\n\n/**\n * `fastembed.small`, loaded on the first embedding. Importing `@mastra/fastembed` up front loads ONNX\n * Runtime and a native tokenizer (~11 MB) into every session, including ones that never embed.\n */\nconst lazyFastembedSmall: typeof fastembed.small = {\n specificationVersion: 'v3',\n provider: 'fastembed',\n modelId: 'bge-small-en-v1.5',\n maxEmbeddingsPerCall: 256,\n supportsParallelCalls: true,\n async doEmbed(options) {\n const { fastembed } = await import('@mastra/fastembed');\n return fastembed.small.doEmbed(options);\n },\n};\n\n/** Route-backed OM fallback entry. */\ntype MemoryModelRouteEntry = { id: string; model: ReturnType<typeof resolveModel> };\n\n/**\n * Resolve the active model route's memory models, starting at a same-thread\n * pending fallback hop. Returns `'auto'` when the route's first memory model is\n * Auto, and `undefined` when the route sets no memory model.\n */\nfunction resolveRouteMemoryModels(\n state: MastraCodeState | undefined,\n threadId: string | null | undefined,\n resolve: (modelId: string) => ReturnType<typeof resolveModel>,\n): MemoryModelRouteEntry[] | 'auto' | undefined {\n const memoryRoute = getActiveMemoryRoute(state, threadId);\n if (memoryRoute[0]?.memoryModelId === 'auto') return 'auto';\n const seenModelIds = new Set<string>();\n const appearances = new Map<string, number>();\n const entries: MemoryModelRouteEntry[] = [];\n for (const entry of memoryRoute) {\n if (!entry.memoryModelId || entry.memoryModelId === 'auto' || seenModelIds.has(entry.memoryModelId)) continue;\n seenModelIds.add(entry.memoryModelId);\n const occurrence = (appearances.get(entry.id) ?? 0) + 1;\n appearances.set(entry.id, occurrence);\n try {\n entries.push({\n id: `${entry.id}:memory${occurrence === 1 ? '' : `#${occurrence}`}`,\n model: resolve(entry.memoryModelId),\n });\n } catch {\n break;\n }\n }\n return entries.length > 0 ? entries : undefined;\n}\n\n/**\n * The authoritative per-caller Factory memory-settings row, placed on the request\n * context before Factory's model-dependent processors run. `null` means the row\n * exists but is empty (every role auto). An unavailable sentinel or a missing\n * value on a Factory-owned session falls back to Auto roles and default\n * thresholds/attachments, so memory keeps working while Factory reports the error.\n */\ninterface FactoryMemorySettings {\n observerModelId: string | null;\n reflectorModelId: string | null;\n observationThreshold: number | null;\n reflectionThreshold: number | null;\n observeAttachments: 'auto' | boolean | null;\n}\n\ntype FactoryMemorySettingsContext =\n | FactoryMemorySettings\n | null\n | { status: 'unavailable'; reason: string }\n | undefined;\n\nfunction getFactoryMemorySettingsContext(requestContext: RequestContext): FactoryMemorySettingsContext {\n return requestContext.get('mastra__factoryMemorySettings') as FactoryMemorySettingsContext;\n}\n\nfunction isFactoryMemorySettingsUnavailable(\n settings: FactoryMemorySettingsContext,\n): settings is { status: 'unavailable'; reason: string } {\n return settings !== null && typeof settings === 'object' && 'status' in settings && settings.status === 'unavailable';\n}\n\nfunction getMainModelId(requestContext: RequestContext): string | undefined {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n return controller?.session.modelId || (controller?.getState()?.currentModelId as string | undefined);\n}\n\n/**\n * Resolve one OM role's model for this invocation. Returns `'auto'` for Memory's\n * auto policy, or a concrete model. Factory's DB row is authoritative for\n * Factory sessions (an unreadable row falls back to auto). Otherwise the active\n * model route's memory models win, then the per-role selection, then legacy\n * concrete settings.\n */\nfunction resolveOmRoleModelForRequest(\n role: 'observer' | 'reflector',\n requestContext: RequestContext,\n settingsPath?: string,\n options?: { disableSettingsOmSeed?: boolean },\n): 'auto' | ReturnType<typeof resolveModel> | MemoryModelRouteEntry[] {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n const state = controller?.getState() as MastraCodeState | undefined;\n const resolveOptions = { remapForCodexOAuth: true, requestContext, anthropicPromptCacheScope: 'system' } as const;\n const factorySettingsContext = getFactoryMemorySettingsContext(requestContext);\n const isFactory = typeof state?.factoryProjectId === 'string';\n\n const useModel = (modelId: string) => {\n requestContext.set(`om.${role}.selectionMode`, 'model');\n requestContext.set(`om.${role}.effectiveModelId`, modelId);\n return resolveModel(modelId, resolveOptions);\n };\n const useAuto = () => {\n requestContext.set(`om.${role}.selectionMode`, 'auto');\n // These two keys are declared in the span-context allowlist\n // (`mastracode/sdk/src/index.ts`), so traces can report intent separately from\n // the effective concrete model without either being mistaken for a model ID.\n requestContext.set(\n `om.${role}.effectiveModelId`,\n resolveAutoOMModelId(getMainModelId(requestContext), providerId =>\n canUseProvider(providerId, { requestContext }),\n ),\n );\n return 'auto' as const;\n };\n\n if (\n isFactoryMemorySettingsUnavailable(factorySettingsContext) ||\n (factorySettingsContext === undefined && isFactory)\n ) {\n return useAuto();\n }\n if (factorySettingsContext !== undefined) {\n const factoryModelId = factorySettingsContext?.[`${role}ModelId`];\n return factoryModelId ? useModel(factoryModelId) : useAuto();\n }\n\n // The configured settings file, not the default one: a caller that points the\n // agent at another settings path must get the same override resolution for\n // observational memory as it does for the main model. Hosts that disable the\n // settings seed never read it.\n const settings = options?.disableSettingsOmSeed ? undefined : loadSettings(settingsPath);\n const routeMemory = resolveRouteMemoryModels(state, controller?.threadId, modelId =>\n resolveModel(modelId, resolveOptions),\n );\n if (routeMemory === 'auto') return useAuto();\n if (routeMemory) {\n requestContext.set(`om.${role}.selectionMode`, 'model');\n requestContext.set(`om.${role}.effectiveModelId`, routeMemory[0]?.model.modelId);\n return routeMemory.length === 1 ? routeMemory[0]!.model : routeMemory;\n }\n\n const selection: unknown = state?.[`${role}ModelSelection`];\n if (selection === 'auto') return useAuto();\n if (typeof selection === 'string' && selection) return useModel(selection);\n if (\n selection &&\n typeof selection === 'object' &&\n 'modelId' in selection &&\n typeof selection.modelId === 'string' &&\n selection.modelId\n ) {\n return useModel(selection.modelId);\n }\n\n const roleOverride =\n role === 'observer' ? settings?.models?.observerModelOverride : settings?.models?.reflectorModelOverride;\n if (roleOverride) return useModel(roleOverride);\n const legacyModelId = state?.[`${role}ModelId`];\n if (typeof legacyModelId === 'string' && legacyModelId) return useModel(legacyModelId);\n return useAuto();\n}\n\nconst DYNAMIC_AGENTS_MD_INSTRUCTION =\n 'Messages wrapped in <system-reminder type=\"dynamic-agents-md\" ...>...</system-reminder> are ephemeral project-context instructions injected from files on disk. Do NOT observe or extract information from these messages — they are reloaded automatically when needed and should not be stored in memory.';\n\n// Derived from https://github.com/JuliusBrussee/caveman and adapted for OM use with fixed full-level compression.\nconst CAVEMAN_OM_INSTRUCTION = `Respond terse like smart caveman. All technical substance stay. Only fluff die.\n\nUse full caveman compression style.\n\nDrop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not \"implement a solution for\"). Technical terms exact. Code blocks unchanged. Errors quoted exact. Leave out the words \"agent\" and \"assistant\" at the start of each observation line, it is assumed each line is referring to the assistant unless it specifically says it was about the user. Leave out parenthesis and other text characters like * that would not contribute to understanding the observations.\n\nPattern: \\`[thing] [action] [reason]. [next step]\\`\n\nNot: \"Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by...\"\nYes: \"Bug in auth middleware. Token expiry check use < not <=. Fix:\"\n\nExample 1\n🔴 14:31 user asks why React component rerenders\n🟡 14:32 saw inline object prop create new ref each render, cause rerender\n✅ 14:34 fixed render issue by wrap object in useMemo\n\nExample 2\n🟡 15:10 explained pool reuse DB connections, skip repeat handshake overhead\n\nDon't say \"Agent did x\", say \"did x\". It will be assumed the agent did what was observed. The who should only be specified for the user or other third parties: \"user asked x\"\n\nDrop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question, and anything that requires remembering verbatim content. Resume caveman after clear part done`;\n\nexport { LOCAL_KNOWLEDGE_ORG_ID };\n\n// One error per session, not per memory resolution. Keyed on the session id\n// rather than the controller object: the controller is read off the request\n// context on every resolution, so it is a fresh object per request and would\n// dedupe nothing. Bounded so a long-running Factory process cannot grow this\n// without limit — refusing sessions are rare, and losing the oldest ids only\n// costs one extra log line.\nconst REPORTED_ORG_UNRESOLVED_LIMIT = 500;\nconst reportedOrgUnresolved = new Set<string>();\n\nfunction reportOrgUnresolved(\n controller: AgentControllerRequestContext<MastraCodeState> | undefined,\n factoryProjectId: string | undefined,\n reason?: string,\n) {\n const sessionId = controller?.session?.id;\n if (sessionId) {\n if (reportedOrgUnresolved.has(sessionId)) return;\n if (reportedOrgUnresolved.size >= REPORTED_ORG_UNRESOLVED_LIMIT) {\n reportedOrgUnresolved.delete(reportedOrgUnresolved.values().next().value as string);\n }\n reportedOrgUnresolved.add(sessionId);\n }\n const session = controller?.session;\n console.error(\n `[Subconscious] Knowledge curation disabled: no organization resolved for session ${session?.id ?? 'unknown'} (project ${factoryProjectId ?? 'none'})${reason ? `: ${reason}` : ''}. Knowledge is not written rather than written where it cannot be read.`,\n );\n}\n\n/**\n * Whether the experimental subconscious (knowledge graph + reminder sidekick)\n * is switched on for this process: it needs a vector store and the opt-in flag.\n */\nexport function isSubconsciousEnabled(vector: MastraVector | undefined): boolean {\n return Boolean(vector) && process.env.MASTRACODE_EXPERIMENTAL_SUBCONSCIOUS === '1';\n}\n\n/**\n * Whether the subconscious tools (`knowledge_*`, `ask_memory`) are registered\n * for a given session. Beyond the process-level switch, a Factory-owned\n * session that cannot resolve its org refuses the subconscious entirely (see\n * `getDynamicMemory`, which applies the same two checks inline because it also\n * needs the resolved identity). The system prompt's tool guidance calls here so\n * it never advertises tools that `getDynamicMemory` did not register.\n */\nexport function hasSubconsciousTools(vector: MastraVector | undefined, state: MastraCodeState | undefined): boolean {\n return isSubconsciousEnabled(vector) && resolveKnowledgeScopeIdentity(state).resolved;\n}\n\n/**\n * Dynamic memory factory function.\n * Reads OM thresholds from controller state via requestContext.\n * Model functions also read from requestContext (no mutable bridge needed).\n */\nexport function getDynamicMemory(\n storage: MastraCompositeStore,\n vector?: MastraVector,\n settingsPath?: string,\n options?: { disableSettingsOmSeed?: boolean },\n knowledge?: Knowledge,\n) {\n // Cache is scoped per storage instance (per getDynamicMemory call) so a\n // Memory bound to one storage is never reused after storage changes.\n let cachedMemory: Memory | null = null;\n let cachedMemoryKey: string | null = null;\n // Instances replaced by a config change may still have background work in flight.\n const retiredMemories = new Set<Memory>();\n\n // Observer/reflector model functions — read the current model ID from\n // controller state via requestContext (propagated by OM's agent.generate).\n // Bound here so the configured settings path reaches role overrides and pack\n // memory-model resolution.\n const getObserverModel = ({ requestContext }: { requestContext: RequestContext }) =>\n resolveOmRoleModelForRequest('observer', requestContext, settingsPath, options);\n const getReflectorModel = ({ requestContext }: { requestContext: RequestContext }) =>\n resolveOmRoleModelForRequest('reflector', requestContext, settingsPath, options);\n // Routes the concrete model Memory's `'auto'` picks through Mastra Code's\n // credential-aware resolver, like every other Mastra Code model.\n const resolveMemoryModel = (modelId: string, { requestContext }: { requestContext?: RequestContext }) =>\n resolveModel(modelId, { remapForCodexOAuth: true, requestContext, anthropicPromptCacheScope: 'system' });\n\n const resolveMemory = ({ requestContext }: { requestContext: RequestContext }) => {\n const controller = requestContext.get('controller') as AgentControllerRequestContext<MastraCodeState> | undefined;\n const state = controller?.getState() as MastraCodeState | undefined;\n const subconsciousEnabled = isSubconsciousEnabled(vector);\n const factoryProjectId = state?.factoryProjectId;\n const isFactory = typeof factoryProjectId === 'string' && factoryProjectId.trim().length > 0;\n\n // A Factory-owned session that could not resolve its org refuses to curate:\n // writing under a substituted identity produces knowledge the fail-closed\n // read path can never see.\n let orgUnresolvedRefusal = false;\n\n if (subconsciousEnabled) {\n const identity = resolveKnowledgeScopeIdentity(state);\n if (identity.resolved) {\n requestContext.set('organizationId', identity.organizationId);\n } else {\n orgUnresolvedRefusal = true;\n reportOrgUnresolved(controller, identity.knowledgeResourceId, identity.reason);\n }\n if (identity.knowledgeResourceId) {\n requestContext.set('knowledgeResourceId', identity.knowledgeResourceId);\n }\n }\n\n const subconsciousAvailable = subconsciousEnabled && !orgUnresolvedRefusal;\n\n // Factory sessions share a memory resource across a Factory's runs and a\n // user's sessions, so their scope is fixed to thread: one shared record would\n // hand every run the others' work and invalidate their prompt caches. Recall\n // search still reaches the whole resource. Neither session state, the env\n // var, nor a repository's database.json can switch it.\n const omScope = isFactory ? 'thread' : (state?.omScope ?? getOmScope(state?.projectPath));\n const isResourceScope = omScope === 'resource';\n\n // The Factory row is authoritative and read per invocation, so a stored\n // threshold/attachment change reaches the running Memory without a session.\n const factorySettingsContext = getFactoryMemorySettingsContext(requestContext);\n const factorySettingsUnavailable =\n isFactoryMemorySettingsUnavailable(factorySettingsContext) || (factorySettingsContext === undefined && isFactory);\n const factorySettings = factorySettingsUnavailable ? null : factorySettingsContext;\n // Rows saved before validation can still hold a thread-scope threshold that\n // @mastra/memory refuses because it does not exceed the activation buffer.\n // Resource scope has no activation buffer and keeps its saved value.\n const storedObsThreshold =\n factorySettings !== undefined\n ? (factorySettings?.observationThreshold ?? DEFAULT_OBS_THRESHOLD)\n : (state?.observationThreshold ?? DEFAULT_OBS_THRESHOLD);\n const obsThreshold = isResourceScope ? storedObsThreshold : Math.max(storedObsThreshold, MIN_OBSERVATION_THRESHOLD);\n const refThreshold =\n factorySettings !== undefined\n ? (factorySettings?.reflectionThreshold ?? DEFAULT_REF_THRESHOLD)\n : (state?.reflectionThreshold ?? DEFAULT_REF_THRESHOLD);\n const caveman = state?.cavemanObservations ?? false;\n\n const observerPreviousObservationTokens = 1000;\n // The row is authoritative: an absent value means the user left it on Auto,\n // which the config API reports as 'auto' and Memory resolves by model\n // capability.\n const observeAttachments =\n factorySettings !== undefined ? (factorySettings?.observeAttachments ?? 'auto') : state?.observeAttachments;\n // Factory sessions get a factory-only Subconscious config, so the cache key\n // carries Factory presence and settings availability to keep those configs\n // from cross-serving.\n const cacheKey = `${obsThreshold}:${refThreshold}:${omScope}:${observerPreviousObservationTokens}:${caveman ? 1 : 0}:${observeAttachments}:${isFactory ? 1 : 0}:${subconsciousAvailable ? 1 : 0}`;\n if (cachedMemory && cachedMemoryKey === cacheKey) {\n return cachedMemory;\n }\n\n const observerInstruction = caveman\n ? `${DYNAMIC_AGENTS_MD_INSTRUCTION}\\n\\n${CAVEMAN_OM_INSTRUCTION}`\n : DYNAMIC_AGENTS_MD_INSTRUCTION;\n const reflectionInstruction = caveman ? CAVEMAN_OM_INSTRUCTION : undefined;\n\n if (cachedMemory) {\n const retired = cachedMemory;\n retiredMemories.add(retired);\n // settled() rejects if the instance's OM engine failed to start; that must not surface as\n // an unhandled rejection from a background retirement.\n void retired\n .settled()\n .catch(() => {})\n .finally(() => retiredMemories.delete(retired));\n }\n\n cachedMemory = new Memory({\n storage,\n ...(knowledge ? { knowledge } : {}),\n vector: vector || false,\n embedder: vector ? lazyFastembedSmall : undefined,\n options: {\n // Generate a durable title from the first user message. Every client uses\n // the same title in its thread list and active-session chrome. Title\n // generation takes the primary OM model only — its model field does not\n // accept fallback arrays.\n generateTitle:\n process.env.MASTRACODE_DISABLE_TITLE_GENERATION === '1'\n ? false\n : {\n model: ({ requestContext }) => {\n const resolved = getObserverModel({ requestContext });\n if (resolved === 'auto') {\n return resolveMemoryModel(\n resolveAutoOMModelId(getMainModelId(requestContext), providerId =>\n canUseProvider(providerId, { requestContext }),\n ),\n { requestContext },\n );\n }\n return Array.isArray(resolved) ? resolved[0]!.model : resolved;\n },\n },\n observationalMemory:\n process.env.MASTRACODE_DISABLE_OBSERVATIONAL_MEMORY === '1'\n ? false\n : {\n enabled: true,\n autoModels: MASTRACODE_AUTO_OM_MODELS,\n canUseProvider,\n resolveModel: resolveMemoryModel,\n temporalMarkers: true,\n retrieval: vector ? { vector: true } : true,\n experimental_subconscious: subconsciousAvailable\n ? new Subconscious({\n defaultScope: 'resource',\n pins: true,\n ...(isFactory ? { maxSteps: 25 } : {}),\n })\n : undefined,\n scope: omScope,\n // The main agent writes Anthropic cache entries with this TTL; 'auto' can't see it.\n activateAfterIdle: { default: 'auto', anthropic: ANTHROPIC_PROMPT_CACHE_TTL },\n activateOnProviderChange: true,\n observation: {\n bufferTokens: isResourceScope ? false : 1 / 5,\n bufferActivation: isResourceScope ? undefined : 2000,\n model: getObserverModel,\n messageTokens: obsThreshold,\n blockAfter: 2,\n previousObserverTokens: observerPreviousObservationTokens,\n threadTitle: true,\n instruction: observerInstruction,\n observeAttachments,\n },\n reflection: {\n bufferActivation: isResourceScope ? undefined : 1 / 2,\n blockAfter: 1.1,\n model: getReflectorModel,\n observationTokens: refThreshold,\n instruction: reflectionInstruction,\n },\n },\n },\n });\n cachedMemoryKey = cacheKey;\n\n return cachedMemory;\n };\n\n return Object.assign(resolveMemory, {\n /**\n * Wait for background memory work (buffered observations, reflections, indexing) in every\n * instance this factory created. Await before closing storage.\n */\n async settled(): Promise<void> {\n // Drain every instance even if one rejects, so teardown can still close storage.\n await Promise.allSettled([cachedMemory?.settled(), ...[...retiredMemories].map(memory => memory.settled())]);\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAM,qBAA6C;CACjD,sBAAsB;CACtB,UAAU;CACV,SAAS;CACT,sBAAsB;CACtB,uBAAuB;CACvB,MAAM,QAAQ,SAAS;EACrB,MAAM,EAAE,cAAc,MAAM,OAAO;EACnC,OAAO,UAAU,MAAM,QAAQ,OAAO;CACxC;AACF;;;;;;AAUA,SAAS,yBACP,OACA,UACA,SAC8C;CAC9C,MAAM,cAAc,qBAAqB,OAAO,QAAQ;CACxD,IAAI,YAAY,EAAE,EAAE,kBAAkB,QAAQ,OAAO;CACrD,MAAM,+BAAe,IAAI,IAAY;CACrC,MAAM,8BAAc,IAAI,IAAoB;CAC5C,MAAM,UAAmC,CAAC;CAC1C,KAAK,MAAM,SAAS,aAAa;EAC/B,IAAI,CAAC,MAAM,iBAAiB,MAAM,kBAAkB,UAAU,aAAa,IAAI,MAAM,aAAa,GAAG;EACrG,aAAa,IAAI,MAAM,aAAa;EACpC,MAAM,cAAc,YAAY,IAAI,MAAM,EAAE,KAAK,KAAK;EACtD,YAAY,IAAI,MAAM,IAAI,UAAU;EACpC,IAAI;GACF,QAAQ,KAAK;IACX,IAAI,GAAG,MAAM,GAAG,SAAS,eAAe,IAAI,KAAK,IAAI;IACrD,OAAO,QAAQ,MAAM,aAAa;GACpC,CAAC;EACH,QAAQ;GACN;EACF;CACF;CACA,OAAO,QAAQ,SAAS,IAAI,UAAU,KAAA;AACxC;AAuB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I,SAAS,EAAE,CAAE,QAAQ;IACxD,EACF;IACN,qBACE,QAAQ,IAAI,4CAA4C,MACpD,QACA;KACE,SAAS;KACT,YAAY;KACZ;KACA,cAAc;KACd,iBAAiB;KACjB,WAAW,SAAS,EAAE,QAAQ,KAAK,IAAI;KACvC,2BAA2B,wBACvB,IAAI,aAAa;MACf,cAAc;MACd,MAAM;MACN,GAAI,YAAY,EAAE,UAAU,GAAG,IAAI,CAAC;KACtC,CAAC,IACD,KAAA;KACJ,OAAO;KAEP,mBAAmB;MAAE,SAAS;MAAQ,WAAA;KAAsC;KAC5E,0BAA0B;KAC1B,aAAa;MACX,cAAc,kBAAkB,QAAQ,IAAI;MAC5C,kBAAkB,kBAAkB,KAAA,IAAY;MAChD,OAAO;MACP,eAAe;MACf,YAAY;MACZ,wBAAwB;MACxB,aAAa;MACb,aAAa;MACb;KACF;KACA,YAAY;MACV,kBAAkB,kBAAkB,KAAA,IAAY,IAAI;MACpD,YAAY;MACZ,OAAO;MACP,mBAAmB;MACnB,aAAa;KACf;IACF;GACR;EACF,CAAC;EACD,kBAAkB;EAElB,OAAO;CACT;CAEA,OAAO,OAAO,OAAO,eAAe;;;;;AAKlC,MAAM,UAAyB;EAE7B,MAAM,QAAQ,WAAW,CAAC,cAAc,QAAQ,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,KAAI,WAAU,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC7G,EACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;IAC/B,gBAAgB;IAMhB,gBAAgB;CAUjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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E,QAAQ,CAAC,EACtC,sBAAsB,UAAQ,EAC9B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,yBAIpC;IACD,cAAc,EAAE,cAAc,CAAC;CAChC,KAAG,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CA0GrC"}
|
|
@@ -36,7 +36,7 @@ export type RotationCredentialStore = CredentialStore & {
|
|
|
36
36
|
forceRefreshActiveAccount?(providerId: string, accountInstanceId?: string): Promise<string | undefined>;
|
|
37
37
|
};
|
|
38
38
|
/** Persisted data-part type for a model-route hop. */
|
|
39
|
-
export declare const MODEL_FALLBACK_PART_TYPE:
|
|
39
|
+
export declare const MODEL_FALLBACK_PART_TYPE: 'data-mastracode-model-fallback';
|
|
40
40
|
/** Non-secret transcript payload for a model-route hop. */
|
|
41
41
|
export interface ModelFallbackPartData {
|
|
42
42
|
from: {
|
|
@@ -51,7 +51,7 @@ export interface ModelFallbackPartData {
|
|
|
51
51
|
at: string;
|
|
52
52
|
}
|
|
53
53
|
/** Session-state key set when account rotation advances the model route. */
|
|
54
|
-
export declare const MODEL_FALLBACK_STATE_KEY:
|
|
54
|
+
export declare const MODEL_FALLBACK_STATE_KEY: 'mastracodePendingModelFallback';
|
|
55
55
|
/** Payload written to session state under MODEL_FALLBACK_STATE_KEY. */
|
|
56
56
|
export interface PendingModelFallback {
|
|
57
57
|
fromEntryId: string;
|
|
@@ -124,7 +124,7 @@ export type RoutingControllerContext = {
|
|
|
124
124
|
};
|
|
125
125
|
export declare class AccountRotationProcessor implements Processor {
|
|
126
126
|
private readonly options;
|
|
127
|
-
readonly id:
|
|
127
|
+
readonly id: 'mastracode-account-rotation';
|
|
128
128
|
constructor(options: {
|
|
129
129
|
credentialStore: RotationCredentialStore;
|
|
130
130
|
maxProcessorRetries: number;
|
|
@@ -179,7 +179,7 @@ export declare class AccountRotationProcessor implements Processor {
|
|
|
179
179
|
*/
|
|
180
180
|
export declare class AccountStartNoticeProcessor implements Processor {
|
|
181
181
|
private readonly options;
|
|
182
|
-
readonly id:
|
|
182
|
+
readonly id: 'mastracode-account-start-notice';
|
|
183
183
|
constructor(options: {
|
|
184
184
|
credentialStore: CredentialStore;
|
|
185
185
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-rotation-processor.d.ts","sourceRoot":"","sources":["../../src/auth/account-rotation-processor.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAS3D,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,YAAY,CAAC;AAEtE,eAAO,MAAM,wBAAwB,mCAAmC,CAAC;AAEzE,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzC,MAAM,EACF,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD;;;;;;OAMG;IACH,yBAAyB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;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"version":3,"file":"account-rotation-processor.d.ts","sourceRoot":"","sources":["../../src/auth/account-rotation-processor.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAS3D,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,YAAY,CAAC;AAEtE,eAAO,MAAM,wBAAwB,mCAAmC,CAAC;AAEzE,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzC,MAAM,EACF,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD;;;;;;OAMG;IACH,yBAAyB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACzG,CAAC;AAgCF,sDAAsD;AACtD,eAAO,MAAM,wBAAwB,EAAG,gCAAyC,CAAC;AAElF,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,K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AA8F;QAC9F,2BAA2B,CAAC,EAAE,CAAC,GAAG,EAAE;YAClC,cAAc,EAAE,cAAc,CAAC;SAChC,KAAK,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;KAC5D,EACC;IAEE,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAoI5E;IAED;;;;OAIG;YACW,oBAAoB;IA4ElC;;;;;;;;;OASG;YACW,YAAY;IAQ1B,0EAA0E;YAC5D,qBAAqB;IAqDnC;;;;;;OAMG;YACW,sBAAsB;CAiCrC;AAED;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,YAAW,SAAS;IAG/C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,QAAQ,CAAC,EAAE,EAAG,iCAAiC,CAAU;IAEzD,YAA6B,OAAO,EAAE;QAAE,eAAe,EAAE,eAAe,CAAA;KAAE,EAAI;IAExE,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0BtE;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-auth-error.d.ts","sourceRoot":"","sources":["../../src/auth/provider-auth-error.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAExE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,+BAAgC;IAE7C,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB;
|
|
1
|
+
{"version":3,"file":"provider-auth-error.d.ts","sourceRoot":"","sources":["../../src/auth/provider-auth-error.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAExE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,+BAAgC;IAE7C,MAAM,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB,CAElE;IAED,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,yBAAyB,CAEpE;CACF;AAiBD;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,QAAQ,EAClB,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzE,OAAO,CAAC,QAAQ,CAAC,CAKnB"}
|
|
@@ -19,9 +19,9 @@ export declare const COPILOT_USER_AGENT = "GitHubCopilotChat/0.35.0";
|
|
|
19
19
|
/** Headers that Copilot endpoints expect from a VS Code-like client. */
|
|
20
20
|
export declare const COPILOT_HEADERS: {
|
|
21
21
|
readonly 'User-Agent': "GitHubCopilotChat/0.35.0";
|
|
22
|
-
readonly 'Editor-Version':
|
|
23
|
-
readonly 'Editor-Plugin-Version':
|
|
24
|
-
readonly 'Copilot-Integration-Id':
|
|
22
|
+
readonly 'Editor-Version': 'vscode/1.107.0';
|
|
23
|
+
readonly 'Editor-Plugin-Version': 'copilot-chat/0.35.0';
|
|
24
|
+
readonly 'Copilot-Integration-Id': 'vscode-chat';
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Normalize a user-entered Enterprise URL/domain into a hostname (e.g. `company.ghe.com`).
|