@mastra/core 0.1.26 → 0.1.27-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/agents/agent-apis.d.ts +0 -31
- package/dist/agents/agent-apis.d.ts.map +1 -1
- package/dist/agents/file-logger.d.ts +0 -5
- package/dist/agents/file-logger.d.ts.map +1 -1
- package/dist/agents/index.d.ts +0 -49
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/openai/assistant.d.ts +0 -76
- package/dist/agents/openai/assistant.d.ts.map +1 -1
- package/dist/agents/utils.d.ts +0 -21
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/vector-sync.d.ts +0 -46
- package/dist/agents/vector-sync.d.ts.map +1 -1
- package/dist/agents/vercel/index.d.ts +0 -43
- package/dist/agents/vercel/index.d.ts.map +1 -1
- package/dist/authenticator.d.ts +0 -62
- package/dist/authenticator.d.ts.map +1 -1
- package/dist/core.cjs.development.js +956 -7459
- 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 +949 -7409
- package/dist/core.esm.js.map +1 -1
- package/dist/framework.d.ts +0 -254
- package/dist/framework.d.ts.map +1 -1
- package/dist/index.d.ts +1 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/integration.d.ts +0 -98
- package/dist/integration.d.ts.map +1 -1
- package/dist/lib/index.d.ts +0 -5
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/utils/object.d.ts +0 -42
- package/dist/lib/utils/object.d.ts.map +1 -1
- package/dist/next/callback.d.ts +0 -3
- package/dist/next/callback.d.ts.map +1 -1
- package/dist/next/connect.d.ts +0 -3
- package/dist/next/connect.d.ts.map +1 -1
- package/dist/next/cron.d.ts +0 -12
- package/dist/next/cron.d.ts.map +1 -1
- package/dist/next/index.d.ts +0 -15
- package/dist/next/index.d.ts.map +1 -1
- package/dist/next/inngest.d.ts +0 -3
- package/dist/next/inngest.d.ts.map +1 -1
- package/dist/next/utils.d.ts +0 -9
- package/dist/next/utils.d.ts.map +1 -1
- package/dist/next/webhook.d.ts +0 -9
- package/dist/next/webhook.d.ts.map +1 -1
- package/dist/next-src/agent/index.d.ts +63 -0
- package/dist/next-src/agent/index.d.ts.map +1 -0
- package/dist/next-src/engine/index.d.ts +147 -0
- package/dist/next-src/engine/index.d.ts.map +1 -0
- package/dist/next-src/engine/schema.d.ts.map +1 -0
- package/dist/next-src/engine/types.d.ts +116 -0
- package/dist/next-src/engine/types.d.ts.map +1 -0
- package/dist/{lib/query-builder → next-src/engine}/utils.d.ts +2 -1
- package/dist/next-src/engine/utils.d.ts.map +1 -0
- package/dist/next-src/index.d.ts +54 -0
- package/dist/next-src/index.d.ts.map +1 -0
- package/dist/next-src/integration/index.d.ts +30 -0
- package/dist/next-src/integration/index.d.ts.map +1 -0
- package/dist/next-src/logger/index.d.ts +61 -0
- package/dist/next-src/logger/index.d.ts.map +1 -0
- package/dist/next-src/tools/index.d.ts +4 -0
- package/dist/next-src/tools/index.d.ts.map +1 -0
- package/dist/next-src/tools/types.d.ts +27 -0
- package/dist/next-src/tools/types.d.ts.map +1 -0
- package/dist/next-src/vector/index.d.ts +11 -0
- package/dist/next-src/vector/index.d.ts.map +1 -0
- package/dist/sync-factory.d.ts +0 -13
- package/dist/sync-factory.d.ts.map +1 -1
- package/dist/sync-fixtures/github.d.ts +6 -6
- package/dist/types.d.ts +0 -400
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/errors.d.ts +0 -3
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -14
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/inngest.d.ts +0 -6
- package/dist/utils/inngest.d.ts.map +1 -1
- package/dist/utils/text.d.ts +0 -1
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/vector-access/index.d.ts +0 -21
- package/dist/vector-access/index.d.ts.map +1 -1
- package/dist/vector-access/types.d.ts +0 -6
- package/dist/vector-access/types.d.ts.map +1 -1
- package/dist/workflows/apis.d.ts +0 -8
- package/dist/workflows/apis.d.ts.map +1 -1
- package/dist/workflows/conditions/constants.d.ts +0 -16
- package/dist/workflows/conditions/constants.d.ts.map +1 -1
- package/dist/workflows/conditions/types.d.ts +0 -2
- package/dist/workflows/conditions/types.d.ts.map +1 -1
- package/dist/workflows/handler.d.ts +0 -63
- package/dist/workflows/handler.d.ts.map +1 -1
- package/dist/workflows/runner.d.ts +0 -51
- package/dist/workflows/runner.d.ts.map +1 -1
- package/dist/workflows/schemas.d.ts +0 -1043
- package/dist/workflows/schemas.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +0 -96
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +0 -111
- package/dist/workflows/utils.d.ts.map +1 -1
- package/package.json +15 -17
- package/dist/data-access/index.d.ts +0 -351
- package/dist/data-access/index.d.ts.map +0 -1
- package/dist/generated-types/index.d.ts +0 -5
- package/dist/generated-types/index.d.ts.map +0 -1
- package/dist/lib/logger-utils/logger.d.ts +0 -118
- package/dist/lib/logger-utils/logger.d.ts.map +0 -1
- package/dist/lib/query-builder/constants.d.ts +0 -17
- package/dist/lib/query-builder/constants.d.ts.map +0 -1
- package/dist/lib/query-builder/filters/sql.d.ts +0 -9
- package/dist/lib/query-builder/filters/sql.d.ts.map +0 -1
- package/dist/lib/query-builder/schema.d.ts.map +0 -1
- package/dist/lib/query-builder/sorts/sql.d.ts +0 -8
- package/dist/lib/query-builder/sorts/sql.d.ts.map +0 -1
- package/dist/lib/query-builder/types.d.ts +0 -31
- package/dist/lib/query-builder/types.d.ts.map +0 -1
- package/dist/lib/query-builder/utils.d.ts.map +0 -1
- package/dist/prisma/client.d.ts +0 -3
- package/dist/prisma/client.d.ts.map +0 -1
- package/dist/prisma/client.ts +0 -31
- package/dist/prisma/gen.js +0 -140
- package/dist/prisma/schema.prisma +0 -130
- package/dist/service/service.property.d.ts +0 -25
- package/dist/service/service.property.d.ts.map +0 -1
- package/dist/service/service.record.d.ts +0 -25
- package/dist/service/service.record.d.ts.map +0 -1
- /package/dist/{lib/query-builder → next-src/engine}/schema.d.ts +0 -0
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import { Mastra } from '../framework';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export declare function getAgentSystemApis({ mastra }: {
|
|
4
|
-
mastra: Mastra;
|
|
5
|
-
}): {
|
|
6
|
-
integrationName: string;
|
|
7
|
-
type: string;
|
|
8
|
-
label: string;
|
|
9
|
-
description: string;
|
|
10
|
-
schema: z.ZodObject<{
|
|
11
|
-
agentId: z.ZodEnum<[string, ...string[]]>;
|
|
12
|
-
message: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
agentId: string;
|
|
15
|
-
message: string;
|
|
16
|
-
}, {
|
|
17
|
-
agentId: string;
|
|
18
|
-
message: string;
|
|
19
|
-
}>;
|
|
20
|
-
outputSchema: z.ZodObject<{
|
|
21
|
-
message: z.ZodString;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
message: string;
|
|
24
|
-
}, {
|
|
25
|
-
message: string;
|
|
26
|
-
}>;
|
|
27
|
-
executor: ({ data, ctx }: any) => Promise<{
|
|
28
|
-
message: any;
|
|
29
|
-
answer: any;
|
|
30
|
-
}>;
|
|
31
|
-
}[];
|
|
32
1
|
//# sourceMappingURL=agent-apis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-apis.d.ts","sourceRoot":"","sources":["../../src/agents/agent-apis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-apis.d.ts","sourceRoot":"","sources":["../../src/agents/agent-apis.ts"],"names":[],"mappings":""}
|
|
@@ -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":""}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import { IntegrationApi } from '../types';
|
|
2
|
-
export declare function getAgent({ connectionId, agent, apis, logger, }: {
|
|
3
|
-
connectionId: string;
|
|
4
|
-
agent: Record<string, any>;
|
|
5
|
-
apis: Record<string, IntegrationApi>;
|
|
6
|
-
logger: any;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
agent: import("openai/resources/beta/assistants").Assistant & {
|
|
9
|
-
_request_id?: string | null;
|
|
10
|
-
};
|
|
11
|
-
initializeThread: (messages?: import("openai/resources/beta/threads/threads").ThreadCreateParams.Message[]) => Promise<import("openai/resources/beta/threads/threads").Thread & {
|
|
12
|
-
_request_id?: string | null;
|
|
13
|
-
}>;
|
|
14
|
-
listMessages: ({ threadId }: {
|
|
15
|
-
threadId: string;
|
|
16
|
-
}) => Promise<import("openai/resources/beta/threads/messages").MessagesPage>;
|
|
17
|
-
getRun: ({ threadId, runId, }: {
|
|
18
|
-
threadId: string;
|
|
19
|
-
runId: string;
|
|
20
|
-
}) => Promise<import("openai/resources/beta/threads/runs/runs").Run & {
|
|
21
|
-
_request_id?: string | null;
|
|
22
|
-
}>;
|
|
23
|
-
handleRunStatus: ({ threadId, run, }: {
|
|
24
|
-
run: import("openai/resources/beta/threads/runs/runs").Run;
|
|
25
|
-
threadId: string;
|
|
26
|
-
}) => Promise<any>;
|
|
27
|
-
handleRequiresAction: ({ threadId, run, }: {
|
|
28
|
-
threadId: string;
|
|
29
|
-
run: import("openai/resources/beta/threads/runs/runs").Run;
|
|
30
|
-
}) => Promise<any>;
|
|
31
|
-
createUserMessage: ({ threadId, content, }: {
|
|
32
|
-
threadId: string;
|
|
33
|
-
content: string;
|
|
34
|
-
}) => Promise<import("openai/resources/beta/threads/messages").Message & {
|
|
35
|
-
_request_id?: string | null;
|
|
36
|
-
}>;
|
|
37
|
-
watchRun: ({ runId, threadId, }: {
|
|
38
|
-
runId?: string;
|
|
39
|
-
threadId: string;
|
|
40
|
-
}) => Promise<any>;
|
|
41
|
-
} | (({ prompt }: {
|
|
42
|
-
prompt: string;
|
|
43
|
-
}) => Promise<import("ai").StreamTextResult<{}>>) | (({ prompt }: {
|
|
44
|
-
prompt: string;
|
|
45
|
-
}) => Promise<import("ai").GenerateTextResult<{}>>) | undefined>;
|
|
46
|
-
export * from './utils';
|
|
47
|
-
export * from './vector-sync';
|
|
48
|
-
export * from './openai/assistant';
|
|
49
|
-
export * from './vercel';
|
|
50
1
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,77 +1 @@
|
|
|
1
|
-
import OpenAI from 'openai';
|
|
2
|
-
import { Logger, RegisteredLogger } from '../../lib';
|
|
3
|
-
export declare function createAssistantAgentHandler(logger?: Logger<{
|
|
4
|
-
type: RegisteredLogger;
|
|
5
|
-
destinationPath: string;
|
|
6
|
-
statusCode: number;
|
|
7
|
-
message: string;
|
|
8
|
-
}>): ({ name, instructions, model, tools, response_format, }: {
|
|
9
|
-
name: string;
|
|
10
|
-
tools: OpenAI.Beta.AssistantTool[];
|
|
11
|
-
model: string;
|
|
12
|
-
instructions: string;
|
|
13
|
-
response_format?: OpenAI.Beta.Threads.AssistantResponseFormatOption;
|
|
14
|
-
}) => Promise<OpenAI.Beta.Assistants.Assistant & {
|
|
15
|
-
_request_id?: string | null;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function updateAssistantAgentHandler(logger?: Logger<{
|
|
18
|
-
type: RegisteredLogger;
|
|
19
|
-
destinationPath: string;
|
|
20
|
-
statusCode: number;
|
|
21
|
-
message: string;
|
|
22
|
-
}>): ({ assistantId, name, instructions, model, tools, response_format, }: {
|
|
23
|
-
assistantId: string;
|
|
24
|
-
name: string;
|
|
25
|
-
tools: OpenAI.Beta.AssistantTool[];
|
|
26
|
-
model: string;
|
|
27
|
-
instructions: string;
|
|
28
|
-
response_format?: OpenAI.Beta.Threads.AssistantResponseFormatOption;
|
|
29
|
-
}) => Promise<void>;
|
|
30
|
-
export declare function getAssistantAgentHandler(logger?: Logger<{
|
|
31
|
-
type: RegisteredLogger;
|
|
32
|
-
destinationPath: string;
|
|
33
|
-
statusCode: number;
|
|
34
|
-
message: string;
|
|
35
|
-
}>): ({ id, toolMap, tool_choice, }: {
|
|
36
|
-
id: string;
|
|
37
|
-
toolMap: Record<string, any>;
|
|
38
|
-
tool_choice?: "auto" | "required";
|
|
39
|
-
}) => Promise<{
|
|
40
|
-
agent: OpenAI.Beta.Assistants.Assistant & {
|
|
41
|
-
_request_id?: string | null;
|
|
42
|
-
};
|
|
43
|
-
initializeThread: (messages?: OpenAI.Beta.ThreadCreateParams.Message[]) => Promise<OpenAI.Beta.Threads.Thread & {
|
|
44
|
-
_request_id?: string | null;
|
|
45
|
-
}>;
|
|
46
|
-
listMessages: ({ threadId }: {
|
|
47
|
-
threadId: string;
|
|
48
|
-
}) => Promise<OpenAI.Beta.Threads.Messages.MessagesPage>;
|
|
49
|
-
getRun: ({ threadId, runId, }: {
|
|
50
|
-
threadId: string;
|
|
51
|
-
runId: string;
|
|
52
|
-
}) => Promise<OpenAI.Beta.Threads.Runs.Run & {
|
|
53
|
-
_request_id?: string | null;
|
|
54
|
-
}>;
|
|
55
|
-
handleRunStatus: ({ threadId, run, callback, }: {
|
|
56
|
-
run: OpenAI.Beta.Threads.Runs.Run;
|
|
57
|
-
threadId: string;
|
|
58
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
59
|
-
}) => Promise<any>;
|
|
60
|
-
handleRequiresAction: ({ threadId, run, callback, }: {
|
|
61
|
-
threadId: string;
|
|
62
|
-
run: OpenAI.Beta.Threads.Runs.Run;
|
|
63
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
64
|
-
}) => Promise<any>;
|
|
65
|
-
createUserMessage: ({ threadId, content, }: {
|
|
66
|
-
threadId: string;
|
|
67
|
-
content: string;
|
|
68
|
-
}) => Promise<OpenAI.Beta.Threads.Messages.Message & {
|
|
69
|
-
_request_id?: string | null;
|
|
70
|
-
}>;
|
|
71
|
-
watchRun: ({ runId, threadId, callback, }: {
|
|
72
|
-
runId?: string;
|
|
73
|
-
threadId: string;
|
|
74
|
-
callback?: (run: OpenAI.Beta.Threads.Run) => void;
|
|
75
|
-
}) => Promise<any>;
|
|
76
|
-
}>;
|
|
77
1
|
//# sourceMappingURL=assistant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assistant.d.ts","sourceRoot":"","sources":["../../../src/agents/openai/assistant.ts"],"names":[],"mappings":""}
|
package/dist/agents/utils.d.ts
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
export declare function getProjectDir({ dir }: {
|
|
2
|
-
dir: string;
|
|
3
|
-
}): string;
|
|
4
|
-
export declare function listAgentsJson({ agentDir }: {
|
|
5
|
-
agentDir: string;
|
|
6
|
-
}): string[] | undefined;
|
|
7
|
-
export declare function getAgentFile(agentFilePath: string): any;
|
|
8
|
-
export declare function getAgentBlueprint({ agentId, agentDir, }: {
|
|
9
|
-
agentId: string;
|
|
10
|
-
agentDir: string;
|
|
11
|
-
}): any;
|
|
12
|
-
export declare function getPineconeConfig({ dir }: {
|
|
13
|
-
dir: string;
|
|
14
|
-
}): any;
|
|
15
|
-
export declare const retryFn: <T>(operation: () => Promise<T>, { maxAttempts, initialDelay, maxDelay, factor, jitter, }?: {
|
|
16
|
-
maxAttempts?: number | undefined;
|
|
17
|
-
initialDelay?: number | undefined;
|
|
18
|
-
maxDelay?: number | undefined;
|
|
19
|
-
factor?: number | undefined;
|
|
20
|
-
jitter?: boolean | undefined;
|
|
21
|
-
}) => Promise<T | undefined>;
|
|
22
1
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agents/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/agents/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
import { Mastra } from '../framework';
|
|
2
|
-
import { IntegrationApi } from '../types';
|
|
3
|
-
export declare function executeIndexSync({ event, mastra }: any): Promise<void>;
|
|
4
|
-
export declare function executeGenericVectorSync({ event, mastra }: any): Promise<void>;
|
|
5
|
-
export declare function executeVectorSync({ event, mastra }: any): Promise<void>;
|
|
6
|
-
export declare function vectorQueryEngine({ vector_provider, topK, indexName, content, entityType, }: {
|
|
7
|
-
vector_provider: string;
|
|
8
|
-
indexName: string;
|
|
9
|
-
content: string;
|
|
10
|
-
entityType: string;
|
|
11
|
-
topK?: number;
|
|
12
|
-
}): Promise<import("@pinecone-database/pinecone").QueryResponse<import("@pinecone-database/pinecone").RecordMetadata> | undefined>;
|
|
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;
|
|
23
|
-
}>;
|
|
24
|
-
}
|
|
25
|
-
export declare const getPineconeIndices: () => Promise<VectorIndex[]>;
|
|
26
|
-
export declare function getVectorQueryApis({ mastra, }: {
|
|
27
|
-
mastra: Mastra;
|
|
28
|
-
}): IntegrationApi[];
|
|
29
|
-
export declare function agentVectorSyncEvent(): {
|
|
30
|
-
id: string;
|
|
31
|
-
event: string;
|
|
32
|
-
executor: typeof executeVectorSync;
|
|
33
|
-
};
|
|
34
|
-
export declare function genericVectorySyncEvent(): {
|
|
35
|
-
id: string;
|
|
36
|
-
event: string;
|
|
37
|
-
executor: typeof executeGenericVectorSync;
|
|
38
|
-
};
|
|
39
|
-
export declare function vectorIndexSync(): {
|
|
40
|
-
id: string;
|
|
41
|
-
event: string;
|
|
42
|
-
executor: typeof executeIndexSync;
|
|
43
|
-
};
|
|
44
|
-
export declare function syncAndWriteVectorProviderIndexesToLocal({ mastra, }: {
|
|
45
|
-
mastra: Mastra;
|
|
46
|
-
}): Promise<void>;
|
|
47
1
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"vector-sync.d.ts","sourceRoot":"","sources":["../../src/agents/vector-sync.ts"],"names":[],"mappings":""}
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import { CoreMessage } from 'ai';
|
|
2
|
-
export declare function createStreamAgent({ agent_instructions, maxSteps, tools, resultTool, context, model, }: {
|
|
3
|
-
model: {
|
|
4
|
-
type: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
toolChoice?: any;
|
|
7
|
-
};
|
|
8
|
-
tools: Record<string, {
|
|
9
|
-
description: string;
|
|
10
|
-
parameters: any;
|
|
11
|
-
execute: any;
|
|
12
|
-
}>;
|
|
13
|
-
resultTool?: {
|
|
14
|
-
description: string;
|
|
15
|
-
parameters: any;
|
|
16
|
-
};
|
|
17
|
-
maxSteps?: number;
|
|
18
|
-
agent_instructions: string;
|
|
19
|
-
context?: CoreMessage[];
|
|
20
|
-
}): ({ prompt }: {
|
|
21
|
-
prompt: string;
|
|
22
|
-
}) => Promise<import("ai").StreamTextResult<{}>>;
|
|
23
|
-
export declare function createAgent({ agent_instructions, maxSteps, tools, resultTool, context, model, }: {
|
|
24
|
-
model: {
|
|
25
|
-
type: string;
|
|
26
|
-
name?: string;
|
|
27
|
-
toolChoice?: any;
|
|
28
|
-
};
|
|
29
|
-
tools: Record<string, {
|
|
30
|
-
description: string;
|
|
31
|
-
parameters: any;
|
|
32
|
-
execute: any;
|
|
33
|
-
}>;
|
|
34
|
-
resultTool?: {
|
|
35
|
-
description: string;
|
|
36
|
-
parameters: any;
|
|
37
|
-
};
|
|
38
|
-
maxSteps?: number;
|
|
39
|
-
agent_instructions: string;
|
|
40
|
-
context?: CoreMessage[];
|
|
41
|
-
}): ({ prompt }: {
|
|
42
|
-
prompt: string;
|
|
43
|
-
}) => Promise<import("ai").GenerateTextResult<{}>>;
|
|
44
1
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/vercel/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/vercel/index.ts"],"names":[],"mappings":""}
|
package/dist/authenticator.d.ts
CHANGED
|
@@ -1,63 +1 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { OAuth2Client } from '@badgateway/oauth2-client';
|
|
3
|
-
import { Connection } from '@prisma-app/client';
|
|
4
|
-
import { DataLayer } from './data-access';
|
|
5
|
-
import { oauthState } from './schemas';
|
|
6
|
-
import { IntegrationCredentialType, AuthToken } from './types';
|
|
7
|
-
type OAuthState = z.infer<typeof oauthState>;
|
|
8
|
-
type OAuthConfig = {
|
|
9
|
-
SERVER: string;
|
|
10
|
-
CLIENT_ID: string;
|
|
11
|
-
CLIENT_SECRET: string;
|
|
12
|
-
DISCOVERY_ENDPOINT?: string;
|
|
13
|
-
REDIRECT_URI: string;
|
|
14
|
-
SCOPES: string[];
|
|
15
|
-
INTEGRATION_NAME: string;
|
|
16
|
-
AUTH_TYPE: IntegrationCredentialType;
|
|
17
|
-
AUTHORIZATION_ENDPOINT?: string;
|
|
18
|
-
TOKEN_ENDPOINT?: string;
|
|
19
|
-
REVOCATION_ENDPOINT?: string;
|
|
20
|
-
AUTHENTICATION_METHOD?: string;
|
|
21
|
-
EXTRA_AUTH_PARAMS?: {
|
|
22
|
-
prompt?: string;
|
|
23
|
-
access_type?: string;
|
|
24
|
-
code_challenge?: string;
|
|
25
|
-
code_challenge_method?: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type APIKeyAuthConfig = {
|
|
29
|
-
INTEGRATION_NAME: string;
|
|
30
|
-
AUTH_TYPE: IntegrationCredentialType.API_KEY;
|
|
31
|
-
};
|
|
32
|
-
type AuthConfig = OAuthConfig | APIKeyAuthConfig;
|
|
33
|
-
export declare class IntegrationAuth {
|
|
34
|
-
config: AuthConfig;
|
|
35
|
-
client?: OAuth2Client;
|
|
36
|
-
dataAccess: DataLayer;
|
|
37
|
-
onConnectionCreated?: (connection: Connection, token: AuthToken) => Promise<any>;
|
|
38
|
-
constructor({ config, dataAccess, onConnectionCreated, }: {
|
|
39
|
-
config: AuthConfig;
|
|
40
|
-
dataAccess: DataLayer;
|
|
41
|
-
onConnectionCreated: (integration: Connection) => Promise<any>;
|
|
42
|
-
});
|
|
43
|
-
getClient(): OAuth2Client;
|
|
44
|
-
getScopes(): string[];
|
|
45
|
-
getRedirectUri(state: Pick<OAuthState, 'connectionId' | 'clientRedirectPath'>): Promise<string>;
|
|
46
|
-
getTokenFromCodeRedirect(url: string): Promise<import("@badgateway/oauth2-client").OAuth2Token>;
|
|
47
|
-
getStateFromRedirect(url: string): Promise<{
|
|
48
|
-
name: string;
|
|
49
|
-
connectionId: string;
|
|
50
|
-
clientRedirectPath: string;
|
|
51
|
-
previewRedirect?: string | undefined;
|
|
52
|
-
}>;
|
|
53
|
-
processCallback(url: string): Promise<void>;
|
|
54
|
-
getAuthToken({ k_id }: {
|
|
55
|
-
k_id: string;
|
|
56
|
-
}): Promise<AuthToken>;
|
|
57
|
-
private _refreshAuth;
|
|
58
|
-
revokeAuth({ k_id }: {
|
|
59
|
-
k_id: string;
|
|
60
|
-
}): Promise<void>;
|
|
61
|
-
}
|
|
62
|
-
export {};
|
|
63
1
|
//# sourceMappingURL=authenticator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator.d.ts","sourceRoot":"","sources":["../src/authenticator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authenticator.d.ts","sourceRoot":"","sources":["../src/authenticator.ts"],"names":[],"mappings":""}
|