@mastra/core 0.1.8 → 0.1.10
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/agents/agent-apis.d.ts +1 -1
- package/dist/agents/agent-apis.d.ts.map +1 -1
- package/dist/agents/file-logger.d.ts +13 -1
- package/dist/agents/file-logger.d.ts.map +1 -1
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/openai/assistant.d.ts +9 -6
- package/dist/agents/openai/assistant.d.ts.map +1 -1
- package/dist/agents/utils.d.ts +1 -1
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/vector-sync.d.ts +23 -24
- package/dist/agents/vector-sync.d.ts.map +1 -1
- package/dist/core.cjs.development.js +1920 -1011
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +1920 -1012
- package/dist/core.esm.js.map +1 -1
- package/dist/data-access/index.d.ts.map +1 -1
- package/dist/framework.d.ts +71 -0
- package/dist/framework.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +10 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vector-access/index.d.ts +12 -1
- package/dist/vector-access/index.d.ts.map +1 -1
- package/dist/vector-access/types.d.ts +7 -0
- package/dist/vector-access/types.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-apis.d.ts","sourceRoot":"","sources":["../../src/agents/agent-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agent-apis.d.ts","sourceRoot":"","sources":["../../src/agents/agent-apis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;8BAuB3B,GAAG;;;IAgCxC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
export declare function createFileLogger(
|
|
1
|
+
export declare function createFileLogger(): (log: {
|
|
2
|
+
message: string;
|
|
3
|
+
statusCode: number;
|
|
2
4
|
destinationPath: string;
|
|
5
|
+
}) => void;
|
|
6
|
+
export declare function getUpstashLogs({ id, url, token, }: {
|
|
7
|
+
id: string;
|
|
8
|
+
url: string;
|
|
9
|
+
token: string;
|
|
10
|
+
}): Promise<string[]>;
|
|
11
|
+
export declare function createUpstashLogger({ url, token, }: {
|
|
12
|
+
url: string;
|
|
13
|
+
token: string;
|
|
3
14
|
}): (log: {
|
|
4
15
|
message: string;
|
|
5
16
|
statusCode: number;
|
|
17
|
+
destinationPath: string;
|
|
6
18
|
}) => void;
|
|
7
19
|
//# sourceMappingURL=file-logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-logger.d.ts","sourceRoot":"","sources":["../../src/agents/file-logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-logger.d.ts","sourceRoot":"","sources":["../../src/agents/file-logger.ts"],"names":[],"mappings":"AAOA,wBAAgB,gBAAgB,UACjB;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,UAmBF;AAED,wBAAsB,cAAc,CAAC,EACnC,EAAE,EACF,GAAG,EACH,KAAK,GACN,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,qBAOA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,KAAK,GACN,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,SAKc;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,UAMF"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IntegrationApi } from '../types';
|
|
2
|
-
export declare function getAgent({ connectionId, agent, apis, }: {
|
|
2
|
+
export declare function getAgent({ connectionId, agent, apis, logger, }: {
|
|
3
3
|
connectionId: string;
|
|
4
4
|
agent: Record<string, any>;
|
|
5
5
|
apis: Record<string, IntegrationApi>;
|
|
6
|
+
logger: any;
|
|
6
7
|
}): Promise<{
|
|
7
8
|
agent: import("openai/resources/beta/assistants").Assistant & {
|
|
8
9
|
_request_id?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,QAAQ,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,QAAQ,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACrC,MAAM,EAAE,GAAG,CAAC;CACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAsH0mM,CAAC;;;;;;;iEAN3mM;AAED,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import OpenAI from 'openai';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function createAssistantAgentHandler(logger: any): ({ name, instructions, model, tools, response_format, }: {
|
|
3
3
|
name: string;
|
|
4
4
|
tools: OpenAI.Beta.AssistantTool[];
|
|
5
5
|
model: string;
|
|
6
6
|
instructions: string;
|
|
7
7
|
response_format?: OpenAI.Beta.Threads.AssistantResponseFormatOption;
|
|
8
|
-
})
|
|
9
|
-
|
|
8
|
+
}) => Promise<OpenAI.Beta.Assistants.Assistant & {
|
|
9
|
+
_request_id?: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function updateAssistantAgentHandler(logger: any): ({ assistantId, name, instructions, model, tools, response_format, }: {
|
|
10
12
|
assistantId: string;
|
|
11
13
|
name: string;
|
|
12
14
|
tools: OpenAI.Beta.AssistantTool[];
|
|
13
15
|
model: string;
|
|
14
16
|
instructions: string;
|
|
15
17
|
response_format?: OpenAI.Beta.Threads.AssistantResponseFormatOption;
|
|
16
|
-
})
|
|
17
|
-
export declare function
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
export declare function getAssistantAgentHandler(logger: any): ({ id, toolMap, tool_choice, }: {
|
|
18
20
|
id: string;
|
|
19
21
|
toolMap: Record<string, any>;
|
|
20
|
-
|
|
22
|
+
tool_choice?: "auto" | "required";
|
|
23
|
+
}) => Promise<{
|
|
21
24
|
agent: OpenAI.Beta.Assistants.Assistant & {
|
|
22
25
|
_request_id?: string | null;
|
|
23
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAQ5B,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,GAAG,4DAOlD;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC;CACrE;;GA6BF;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,GAAG,yEAQlD;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC;CACrE,mBA4BF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,mCAK/C;IACD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC;;;;kCAgPe,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;;;iCAOjB;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;mCAlBtD;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf;;;0CAlOE;QACD,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAG,OAAO,CAAC,GAAG,CAAC;+CA8Bb;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;KACnC,KAAG,OAAO,CAAC,GAAG,CAAC;gDA0NX;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB;;;qCAUE;QACD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB;GAiCN"}
|
package/dist/agents/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare function getAgentDir({ agentDir }: {
|
|
|
3
3
|
}): string;
|
|
4
4
|
export declare function listAgentsJson({ agentDir }: {
|
|
5
5
|
agentDir: string;
|
|
6
|
-
}): string[];
|
|
6
|
+
}): string[] | undefined;
|
|
7
7
|
export declare function getAgentFile(agentFilePath: string): any;
|
|
8
8
|
export declare function getAgentBlueprint({ agentId, agentDir, }: {
|
|
9
9
|
agentId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agents/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,UAG7D;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agents/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,UAG7D;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,wBAShE;AAED,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,OAUjD;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,OAIA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Mastra } from '../framework';
|
|
2
|
-
import {
|
|
2
|
+
import { IntegrationApi } from '../types';
|
|
3
|
+
export declare function executeIndexSync({ event, mastra }: any): Promise<void>;
|
|
3
4
|
export declare function executeGenericVectorSync({ event, mastra }: any): Promise<void>;
|
|
4
5
|
export declare function executeVectorSync({ event, mastra }: any): Promise<void>;
|
|
5
6
|
export declare function vectorQueryEngine({ vector_provider, topK, indexName, content, entityType, }: {
|
|
@@ -9,30 +10,23 @@ export declare function vectorQueryEngine({ vector_provider, topK, indexName, co
|
|
|
9
10
|
entityType: string;
|
|
10
11
|
topK?: number;
|
|
11
12
|
}): Promise<import("@pinecone-database/pinecone").QueryResponse<import("@pinecone-database/pinecone").RecordMetadata> | undefined>;
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
content: string;
|
|
24
|
-
topResult: number;
|
|
25
|
-
}, {
|
|
26
|
-
content: string;
|
|
27
|
-
topResult: number;
|
|
13
|
+
export interface VectorIndex {
|
|
14
|
+
name: string;
|
|
15
|
+
host: string;
|
|
16
|
+
metric: string;
|
|
17
|
+
dimension: number;
|
|
18
|
+
namespaces?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface VectorStats {
|
|
21
|
+
namespaces: Record<string, {
|
|
22
|
+
vectorCount: number;
|
|
28
23
|
}>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}[];
|
|
24
|
+
}
|
|
25
|
+
export declare const fetchPineconeIndexes: () => Promise<VectorIndex[] | undefined>;
|
|
26
|
+
export declare const fetchPineconeIndexStats: (host: string) => Promise<VectorStats | undefined>;
|
|
27
|
+
export declare function getVectorQueryApis({ mastra, }: {
|
|
28
|
+
mastra: Mastra;
|
|
29
|
+
}): Promise<IntegrationApi[]>;
|
|
36
30
|
export declare function agentVectorSyncEvent(): {
|
|
37
31
|
id: string;
|
|
38
32
|
event: string;
|
|
@@ -43,4 +37,9 @@ export declare function genericVectorySyncEvent(): {
|
|
|
43
37
|
event: string;
|
|
44
38
|
executor: typeof executeGenericVectorSync;
|
|
45
39
|
};
|
|
40
|
+
export declare function vectorIndexSync(): {
|
|
41
|
+
id: string;
|
|
42
|
+
event: string;
|
|
43
|
+
executor: typeof executeIndexSync;
|
|
44
|
+
};
|
|
46
45
|
//# sourceMappingURL=vector-sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-sync.d.ts","sourceRoot":"","sources":["../../src/agents/vector-sync.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"vector-sync.d.ts","sourceRoot":"","sources":["../../src/agents/vector-sync.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAW1C,wBAAsB,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,iBA8I5D;AAGD,wBAAsB,wBAAwB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,iBAuJpE;AAGD,wBAAsB,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,iBA6J7D;AAgBD,wBAAsB,iBAAiB,CAAC,EACtC,eAAe,EACf,IAAQ,EACR,SAAS,EACT,OAAO,EACP,UAAU,GACX,EAAE;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,kIAwBA;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,oBAAoB,0CAiBhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,SAAgB,MAAM,qCAiBzD,CAAC;AAIF,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAyE5B;AAED,wBAAgB,oBAAoB;;;;EAOnC;AAED,wBAAgB,uBAAuB;;;;EAOtC;AAED,wBAAgB,eAAe;;;;EAM9B"}
|