alibabacloud-agentcore-sdk 0.1.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/LICENSE +202 -0
- package/README.md +189 -0
- package/dist/access-key-CkoHq3S8.d.cts +30 -0
- package/dist/access-key-CkoHq3S8.d.ts +30 -0
- package/dist/agent-sa-token-DD1Sb8P1.d.cts +14 -0
- package/dist/agent-sa-token-DD1Sb8P1.d.ts +14 -0
- package/dist/auth/index.cjs +36 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +34 -0
- package/dist/auth/index.d.ts +34 -0
- package/dist/auth/index.js +36 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/bound-credentials-C1fM0thh.d.cts +39 -0
- package/dist/bound-credentials-DqT64Q2s.d.ts +39 -0
- package/dist/chunk-2E5EWEDG.cjs +142 -0
- package/dist/chunk-2E5EWEDG.cjs.map +1 -0
- package/dist/chunk-55XZZRKO.js +220 -0
- package/dist/chunk-55XZZRKO.js.map +1 -0
- package/dist/chunk-5JXA7JPS.js +29 -0
- package/dist/chunk-5JXA7JPS.js.map +1 -0
- package/dist/chunk-5RKN46UU.cjs +139 -0
- package/dist/chunk-5RKN46UU.cjs.map +1 -0
- package/dist/chunk-5ZOLHQXO.js +296 -0
- package/dist/chunk-5ZOLHQXO.js.map +1 -0
- package/dist/chunk-7Y263YIW.js +298 -0
- package/dist/chunk-7Y263YIW.js.map +1 -0
- package/dist/chunk-A3PF2SPD.cjs +141 -0
- package/dist/chunk-A3PF2SPD.cjs.map +1 -0
- package/dist/chunk-A3WMLVJC.cjs +141 -0
- package/dist/chunk-A3WMLVJC.cjs.map +1 -0
- package/dist/chunk-BVZ7H2F5.cjs +582 -0
- package/dist/chunk-BVZ7H2F5.cjs.map +1 -0
- package/dist/chunk-EGUKJE3Z.cjs +24 -0
- package/dist/chunk-EGUKJE3Z.cjs.map +1 -0
- package/dist/chunk-EKXZKKJJ.js +24 -0
- package/dist/chunk-EKXZKKJJ.js.map +1 -0
- package/dist/chunk-GYLT23D3.js +110 -0
- package/dist/chunk-GYLT23D3.js.map +1 -0
- package/dist/chunk-IF7LMBXC.js +306 -0
- package/dist/chunk-IF7LMBXC.js.map +1 -0
- package/dist/chunk-IUCLCPVV.js +113 -0
- package/dist/chunk-IUCLCPVV.js.map +1 -0
- package/dist/chunk-JSP7ZROS.cjs +95 -0
- package/dist/chunk-JSP7ZROS.cjs.map +1 -0
- package/dist/chunk-JW62DVIC.js +238 -0
- package/dist/chunk-JW62DVIC.js.map +1 -0
- package/dist/chunk-K3TE7625.js +139 -0
- package/dist/chunk-K3TE7625.js.map +1 -0
- package/dist/chunk-LE5P3SJW.cjs +16 -0
- package/dist/chunk-LE5P3SJW.cjs.map +1 -0
- package/dist/chunk-LXHW6OT4.cjs +77 -0
- package/dist/chunk-LXHW6OT4.cjs.map +1 -0
- package/dist/chunk-MICRSJ6R.js +48 -0
- package/dist/chunk-MICRSJ6R.js.map +1 -0
- package/dist/chunk-MWAHO47B.cjs +220 -0
- package/dist/chunk-MWAHO47B.cjs.map +1 -0
- package/dist/chunk-MZ5UWGXS.js +95 -0
- package/dist/chunk-MZ5UWGXS.js.map +1 -0
- package/dist/chunk-NZL3VPJ2.js +16 -0
- package/dist/chunk-NZL3VPJ2.js.map +1 -0
- package/dist/chunk-PC4FM2RP.cjs +180 -0
- package/dist/chunk-PC4FM2RP.cjs.map +1 -0
- package/dist/chunk-PKYET77D.cjs +296 -0
- package/dist/chunk-PKYET77D.cjs.map +1 -0
- package/dist/chunk-PTJPB27L.js +31 -0
- package/dist/chunk-PTJPB27L.js.map +1 -0
- package/dist/chunk-QIZO3A4Y.cjs +306 -0
- package/dist/chunk-QIZO3A4Y.cjs.map +1 -0
- package/dist/chunk-RBAY4MO2.js +202 -0
- package/dist/chunk-RBAY4MO2.js.map +1 -0
- package/dist/chunk-RHY7Y43E.js +582 -0
- package/dist/chunk-RHY7Y43E.js.map +1 -0
- package/dist/chunk-RQRI6RCG.cjs +238 -0
- package/dist/chunk-RQRI6RCG.cjs.map +1 -0
- package/dist/chunk-RYXL25AI.js +141 -0
- package/dist/chunk-RYXL25AI.js.map +1 -0
- package/dist/chunk-RZNQGEGJ.cjs +113 -0
- package/dist/chunk-RZNQGEGJ.cjs.map +1 -0
- package/dist/chunk-S7PWSJNP.cjs +48 -0
- package/dist/chunk-S7PWSJNP.cjs.map +1 -0
- package/dist/chunk-TWEO5XVM.cjs +298 -0
- package/dist/chunk-TWEO5XVM.cjs.map +1 -0
- package/dist/chunk-UBP5CHU7.js +142 -0
- package/dist/chunk-UBP5CHU7.js.map +1 -0
- package/dist/chunk-ULJTQSLE.cjs +35 -0
- package/dist/chunk-ULJTQSLE.cjs.map +1 -0
- package/dist/chunk-UWPKFJYM.js +77 -0
- package/dist/chunk-UWPKFJYM.js.map +1 -0
- package/dist/chunk-WKZUYPDS.js +180 -0
- package/dist/chunk-WKZUYPDS.js.map +1 -0
- package/dist/chunk-YZP55W7S.cjs +29 -0
- package/dist/chunk-YZP55W7S.cjs.map +1 -0
- package/dist/chunk-ZELRQU4J.cjs +31 -0
- package/dist/chunk-ZELRQU4J.cjs.map +1 -0
- package/dist/chunk-ZLKYXRNM.js +141 -0
- package/dist/chunk-ZLKYXRNM.js.map +1 -0
- package/dist/chunk-ZLQ2IBTC.cjs +110 -0
- package/dist/chunk-ZLQ2IBTC.cjs.map +1 -0
- package/dist/chunk-ZTWLCHCO.cjs +202 -0
- package/dist/chunk-ZTWLCHCO.cjs.map +1 -0
- package/dist/chunk-ZWQBAJ5O.js +35 -0
- package/dist/chunk-ZWQBAJ5O.js.map +1 -0
- package/dist/client-DDU4-ygJ.d.cts +72 -0
- package/dist/client-pDzS7EZR.d.ts +72 -0
- package/dist/collaboration/index.cjs +44 -0
- package/dist/collaboration/index.cjs.map +1 -0
- package/dist/collaboration/index.d.cts +73 -0
- package/dist/collaboration/index.d.ts +73 -0
- package/dist/collaboration/index.js +44 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/common-BSXkQfxI.d.cts +25 -0
- package/dist/common-BSXkQfxI.d.ts +25 -0
- package/dist/common-DRdI-75k.d.ts +8 -0
- package/dist/common-_vxreiEW.d.cts +8 -0
- package/dist/config-CMkmMtx1.d.cts +20 -0
- package/dist/config-CMkmMtx1.d.ts +20 -0
- package/dist/context-M9rOTifU.d.cts +12 -0
- package/dist/context-M9rOTifU.d.ts +12 -0
- package/dist/controller-DWs3Sy04.d.cts +9 -0
- package/dist/controller-DmI4L4sP.d.ts +9 -0
- package/dist/controlplane/index.cjs +13 -0
- package/dist/controlplane/index.cjs.map +1 -0
- package/dist/controlplane/index.d.cts +66 -0
- package/dist/controlplane/index.d.ts +66 -0
- package/dist/controlplane/index.js +13 -0
- package/dist/controlplane/index.js.map +1 -0
- package/dist/errors-BjGO6N10.d.ts +93 -0
- package/dist/errors-D9OtcR-o.d.cts +93 -0
- package/dist/event-converters-BIn8odqo.d.ts +38 -0
- package/dist/event-converters-Cn_NeGyQ.d.cts +38 -0
- package/dist/google-adk-model-N47R7GB2.js +208 -0
- package/dist/google-adk-model-N47R7GB2.js.map +1 -0
- package/dist/google-adk-model-PDBKY5YZ.cjs +208 -0
- package/dist/google-adk-model-PDBKY5YZ.cjs.map +1 -0
- package/dist/index.cjs +322 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +78 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +322 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/ai-sdk.cjs +15 -0
- package/dist/integrations/ai-sdk.cjs.map +1 -0
- package/dist/integrations/ai-sdk.d.cts +21 -0
- package/dist/integrations/ai-sdk.d.ts +21 -0
- package/dist/integrations/ai-sdk.js +15 -0
- package/dist/integrations/ai-sdk.js.map +1 -0
- package/dist/integrations/google-adk.cjs +90 -0
- package/dist/integrations/google-adk.cjs.map +1 -0
- package/dist/integrations/google-adk.d.cts +46 -0
- package/dist/integrations/google-adk.d.ts +46 -0
- package/dist/integrations/google-adk.js +90 -0
- package/dist/integrations/google-adk.js.map +1 -0
- package/dist/integrations/langchain.cjs +95 -0
- package/dist/integrations/langchain.cjs.map +1 -0
- package/dist/integrations/langchain.d.cts +52 -0
- package/dist/integrations/langchain.d.ts +52 -0
- package/dist/integrations/langchain.js +95 -0
- package/dist/integrations/langchain.js.map +1 -0
- package/dist/integrations/langgraph.cjs +30 -0
- package/dist/integrations/langgraph.cjs.map +1 -0
- package/dist/integrations/langgraph.d.cts +53 -0
- package/dist/integrations/langgraph.d.ts +53 -0
- package/dist/integrations/langgraph.js +30 -0
- package/dist/integrations/langgraph.js.map +1 -0
- package/dist/integrations/mastra.cjs +108 -0
- package/dist/integrations/mastra.cjs.map +1 -0
- package/dist/integrations/mastra.d.cts +47 -0
- package/dist/integrations/mastra.d.ts +47 -0
- package/dist/integrations/mastra.js +108 -0
- package/dist/integrations/mastra.js.map +1 -0
- package/dist/langchain-adapter-DFJdEX04.d.cts +47 -0
- package/dist/langchain-adapter-DJsyjm5V.d.ts +47 -0
- package/dist/langchain-provider-NF5GIDQV.cjs +227 -0
- package/dist/langchain-provider-NF5GIDQV.cjs.map +1 -0
- package/dist/langchain-provider-PHL4UWNF.js +227 -0
- package/dist/langchain-provider-PHL4UWNF.js.map +1 -0
- package/dist/loader-DrIQ37nm.d.ts +38 -0
- package/dist/loader-eWuJ2GSL.d.cts +38 -0
- package/dist/logging-C8GLLg1f.d.cts +9 -0
- package/dist/logging-C8GLLg1f.d.ts +9 -0
- package/dist/managed-CwLx9h4C.d.cts +32 -0
- package/dist/managed-D9eQK1ut.d.ts +32 -0
- package/dist/mcp/index.cjs +12 -0
- package/dist/mcp/index.cjs.map +1 -0
- package/dist/mcp/index.d.cts +62 -0
- package/dist/mcp/index.d.ts +62 -0
- package/dist/mcp/index.js +12 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/memory/index.cjs +12 -0
- package/dist/memory/index.cjs.map +1 -0
- package/dist/memory/index.d.cts +113 -0
- package/dist/memory/index.d.ts +113 -0
- package/dist/memory/index.js +12 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/model/index.cjs +16 -0
- package/dist/model/index.cjs.map +1 -0
- package/dist/model/index.d.cts +129 -0
- package/dist/model/index.d.ts +129 -0
- package/dist/model/index.js +16 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model-CkYHzHPk.d.cts +50 -0
- package/dist/model-CkYHzHPk.d.ts +50 -0
- package/dist/runtime/index.cjs +49 -0
- package/dist/runtime/index.cjs.map +1 -0
- package/dist/runtime/index.d.cts +73 -0
- package/dist/runtime/index.d.ts +73 -0
- package/dist/runtime/index.js +49 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/server/index.cjs +604 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +69 -0
- package/dist/server/index.d.ts +69 -0
- package/dist/server/index.js +604 -0
- package/dist/server/index.js.map +1 -0
- package/dist/skill/index.cjs +14 -0
- package/dist/skill/index.cjs.map +1 -0
- package/dist/skill/index.d.cts +16 -0
- package/dist/skill/index.d.ts +16 -0
- package/dist/skill/index.js +14 -0
- package/dist/skill/index.js.map +1 -0
- package/package.json +292 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { A as AgentSATokenSource } from './agent-sa-token-DD1Sb8P1.cjs';
|
|
2
|
+
import { L as Logger } from './logging-C8GLLg1f.cjs';
|
|
3
|
+
import { A as AgentConfig } from './config-CMkmMtx1.cjs';
|
|
4
|
+
|
|
5
|
+
interface RuntimeBindings {
|
|
6
|
+
config: AgentConfig;
|
|
7
|
+
controllerEndpoint?: string;
|
|
8
|
+
controlPlaneEndpoint?: string;
|
|
9
|
+
agentSATokens?: AgentSATokenSource;
|
|
10
|
+
}
|
|
11
|
+
interface RuntimeSource {
|
|
12
|
+
resolve(): Promise<RuntimeBindings>;
|
|
13
|
+
close(): void | Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
interface ManagedRuntimeOptions {
|
|
16
|
+
configPath?: string;
|
|
17
|
+
envPath?: string;
|
|
18
|
+
controlPlaneEndpoint?: string;
|
|
19
|
+
logger?: Logger;
|
|
20
|
+
}
|
|
21
|
+
declare class ManagedRuntimeSource implements RuntimeSource {
|
|
22
|
+
private readonly options;
|
|
23
|
+
private bindings?;
|
|
24
|
+
private pending?;
|
|
25
|
+
private readonly lifetime;
|
|
26
|
+
constructor(options?: ManagedRuntimeOptions);
|
|
27
|
+
resolve(): Promise<RuntimeBindings>;
|
|
28
|
+
close(): void;
|
|
29
|
+
private load;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { type ManagedRuntimeOptions as M, type RuntimeSource as R, type RuntimeBindings as a, ManagedRuntimeSource as b };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { A as AgentSATokenSource } from './agent-sa-token-DD1Sb8P1.js';
|
|
2
|
+
import { L as Logger } from './logging-C8GLLg1f.js';
|
|
3
|
+
import { A as AgentConfig } from './config-CMkmMtx1.js';
|
|
4
|
+
|
|
5
|
+
interface RuntimeBindings {
|
|
6
|
+
config: AgentConfig;
|
|
7
|
+
controllerEndpoint?: string;
|
|
8
|
+
controlPlaneEndpoint?: string;
|
|
9
|
+
agentSATokens?: AgentSATokenSource;
|
|
10
|
+
}
|
|
11
|
+
interface RuntimeSource {
|
|
12
|
+
resolve(): Promise<RuntimeBindings>;
|
|
13
|
+
close(): void | Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
interface ManagedRuntimeOptions {
|
|
16
|
+
configPath?: string;
|
|
17
|
+
envPath?: string;
|
|
18
|
+
controlPlaneEndpoint?: string;
|
|
19
|
+
logger?: Logger;
|
|
20
|
+
}
|
|
21
|
+
declare class ManagedRuntimeSource implements RuntimeSource {
|
|
22
|
+
private readonly options;
|
|
23
|
+
private bindings?;
|
|
24
|
+
private pending?;
|
|
25
|
+
private readonly lifetime;
|
|
26
|
+
constructor(options?: ManagedRuntimeOptions);
|
|
27
|
+
resolve(): Promise<RuntimeBindings>;
|
|
28
|
+
close(): void;
|
|
29
|
+
private load;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { type ManagedRuntimeOptions as M, type RuntimeSource as R, type RuntimeBindings as a, ManagedRuntimeSource as b };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkRQRI6RCGcjs = require('../chunk-RQRI6RCG.cjs');
|
|
5
|
+
require('../chunk-EGUKJE3Z.cjs');
|
|
6
|
+
require('../chunk-LE5P3SJW.cjs');
|
|
7
|
+
require('../chunk-JSP7ZROS.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.MCPClient = _chunkRQRI6RCGcjs.MCPClient; exports.mcpServerURL = _chunkRQRI6RCGcjs.mcpServerURL;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/mcp/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,uGAAC","file":"/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/mcp/index.cjs"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
2
|
+
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { inspect } from 'node:util';
|
|
4
|
+
import { L as Logger } from '../logging-C8GLLg1f.cjs';
|
|
5
|
+
import { MCPDescriptor } from '../controlplane/index.cjs';
|
|
6
|
+
import { A as AgentConfig } from '../config-CMkmMtx1.cjs';
|
|
7
|
+
import { H as HeadersProvider } from '../client-DDU4-ygJ.cjs';
|
|
8
|
+
import { T as Tool, a as ToolArguments } from '../common-BSXkQfxI.cjs';
|
|
9
|
+
import '../access-key-CkoHq3S8.cjs';
|
|
10
|
+
|
|
11
|
+
interface MCPTimeouts {
|
|
12
|
+
sessionMs?: number;
|
|
13
|
+
metadataMs?: number;
|
|
14
|
+
toolMs?: number;
|
|
15
|
+
}
|
|
16
|
+
interface ManagedMCPOptions extends MCPTimeouts {
|
|
17
|
+
headers?: Readonly<Record<string, string>>;
|
|
18
|
+
credentialName?: string;
|
|
19
|
+
}
|
|
20
|
+
type DirectMCPOptions = ({
|
|
21
|
+
url: string;
|
|
22
|
+
transport?: 'streamable-http' | 'sse';
|
|
23
|
+
headersProvider?: HeadersProvider;
|
|
24
|
+
} | {
|
|
25
|
+
transport: 'stdio';
|
|
26
|
+
server: StdioServerParameters;
|
|
27
|
+
}) & MCPTimeouts & {
|
|
28
|
+
logger?: Logger;
|
|
29
|
+
};
|
|
30
|
+
interface MCPCallOptions {
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
}
|
|
33
|
+
declare function mcpServerURL(gatewayURL: string, id: string): string;
|
|
34
|
+
declare class MCPClient {
|
|
35
|
+
private readonly options;
|
|
36
|
+
readonly descriptor?: MCPDescriptor;
|
|
37
|
+
private readonly logger;
|
|
38
|
+
private state?;
|
|
39
|
+
private opening?;
|
|
40
|
+
private closed;
|
|
41
|
+
private closing?;
|
|
42
|
+
private readonly timeouts;
|
|
43
|
+
private constructor();
|
|
44
|
+
static platform(config: AgentConfig, descriptor: MCPDescriptor, options?: Omit<ManagedMCPOptions, 'credentialName'> & {
|
|
45
|
+
logger?: Logger;
|
|
46
|
+
credentialHeadersProvider?: () => Promise<Record<string, string>>;
|
|
47
|
+
}): MCPClient;
|
|
48
|
+
static direct(options: DirectMCPOptions): MCPClient;
|
|
49
|
+
listTools(options?: MCPCallOptions): Promise<Tool[]>;
|
|
50
|
+
tools(options?: MCPCallOptions): Promise<Tool[]>;
|
|
51
|
+
callTool(name: string, arguments_: ToolArguments, options?: MCPCallOptions): Promise<CallToolResult>;
|
|
52
|
+
close(): Promise<void>;
|
|
53
|
+
[inspect.custom](): string;
|
|
54
|
+
toJSON(): string;
|
|
55
|
+
private get safeURL();
|
|
56
|
+
private acquire;
|
|
57
|
+
private open;
|
|
58
|
+
private withSession;
|
|
59
|
+
private retire;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { type DirectMCPOptions, type MCPCallOptions, MCPClient, type MCPTimeouts, type ManagedMCPOptions, mcpServerURL };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
2
|
+
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { inspect } from 'node:util';
|
|
4
|
+
import { L as Logger } from '../logging-C8GLLg1f.js';
|
|
5
|
+
import { MCPDescriptor } from '../controlplane/index.js';
|
|
6
|
+
import { A as AgentConfig } from '../config-CMkmMtx1.js';
|
|
7
|
+
import { H as HeadersProvider } from '../client-pDzS7EZR.js';
|
|
8
|
+
import { T as Tool, a as ToolArguments } from '../common-BSXkQfxI.js';
|
|
9
|
+
import '../access-key-CkoHq3S8.js';
|
|
10
|
+
|
|
11
|
+
interface MCPTimeouts {
|
|
12
|
+
sessionMs?: number;
|
|
13
|
+
metadataMs?: number;
|
|
14
|
+
toolMs?: number;
|
|
15
|
+
}
|
|
16
|
+
interface ManagedMCPOptions extends MCPTimeouts {
|
|
17
|
+
headers?: Readonly<Record<string, string>>;
|
|
18
|
+
credentialName?: string;
|
|
19
|
+
}
|
|
20
|
+
type DirectMCPOptions = ({
|
|
21
|
+
url: string;
|
|
22
|
+
transport?: 'streamable-http' | 'sse';
|
|
23
|
+
headersProvider?: HeadersProvider;
|
|
24
|
+
} | {
|
|
25
|
+
transport: 'stdio';
|
|
26
|
+
server: StdioServerParameters;
|
|
27
|
+
}) & MCPTimeouts & {
|
|
28
|
+
logger?: Logger;
|
|
29
|
+
};
|
|
30
|
+
interface MCPCallOptions {
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
}
|
|
33
|
+
declare function mcpServerURL(gatewayURL: string, id: string): string;
|
|
34
|
+
declare class MCPClient {
|
|
35
|
+
private readonly options;
|
|
36
|
+
readonly descriptor?: MCPDescriptor;
|
|
37
|
+
private readonly logger;
|
|
38
|
+
private state?;
|
|
39
|
+
private opening?;
|
|
40
|
+
private closed;
|
|
41
|
+
private closing?;
|
|
42
|
+
private readonly timeouts;
|
|
43
|
+
private constructor();
|
|
44
|
+
static platform(config: AgentConfig, descriptor: MCPDescriptor, options?: Omit<ManagedMCPOptions, 'credentialName'> & {
|
|
45
|
+
logger?: Logger;
|
|
46
|
+
credentialHeadersProvider?: () => Promise<Record<string, string>>;
|
|
47
|
+
}): MCPClient;
|
|
48
|
+
static direct(options: DirectMCPOptions): MCPClient;
|
|
49
|
+
listTools(options?: MCPCallOptions): Promise<Tool[]>;
|
|
50
|
+
tools(options?: MCPCallOptions): Promise<Tool[]>;
|
|
51
|
+
callTool(name: string, arguments_: ToolArguments, options?: MCPCallOptions): Promise<CallToolResult>;
|
|
52
|
+
close(): Promise<void>;
|
|
53
|
+
[inspect.custom](): string;
|
|
54
|
+
toJSON(): string;
|
|
55
|
+
private get safeURL();
|
|
56
|
+
private acquire;
|
|
57
|
+
private open;
|
|
58
|
+
private withSession;
|
|
59
|
+
private retire;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { type DirectMCPOptions, type MCPCallOptions, MCPClient, type MCPTimeouts, type ManagedMCPOptions, mcpServerURL };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkQIZO3A4Ycjs = require('../chunk-QIZO3A4Y.cjs');
|
|
4
|
+
require('../chunk-RZNQGEGJ.cjs');
|
|
5
|
+
require('../chunk-2E5EWEDG.cjs');
|
|
6
|
+
require('../chunk-5RKN46UU.cjs');
|
|
7
|
+
require('../chunk-LE5P3SJW.cjs');
|
|
8
|
+
require('../chunk-JSP7ZROS.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.MemoryStore = _chunkQIZO3A4Ycjs.MemoryStore;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/memory/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,oDAAC","file":"/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/memory/index.cjs"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { L as Logger } from '../logging-C8GLLg1f.cjs';
|
|
2
|
+
import { A as AccessKeyCredential, C as CredentialProvider } from '../access-key-CkoHq3S8.cjs';
|
|
3
|
+
import 'node:util';
|
|
4
|
+
|
|
5
|
+
interface MemoryRuntime {
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
regionId: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
accessKeyCredential?: AccessKeyCredential;
|
|
10
|
+
resourceSTS?: CredentialProvider;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface MemoryScope {
|
|
14
|
+
readonly agentId?: string;
|
|
15
|
+
readonly sessionId?: string;
|
|
16
|
+
readonly userId?: string;
|
|
17
|
+
}
|
|
18
|
+
interface MemoryMessage {
|
|
19
|
+
readonly role: string;
|
|
20
|
+
readonly content: string;
|
|
21
|
+
}
|
|
22
|
+
interface MemoryContent {
|
|
23
|
+
readonly text: string;
|
|
24
|
+
}
|
|
25
|
+
interface Memory {
|
|
26
|
+
readonly memoryId: string;
|
|
27
|
+
readonly content: MemoryContent;
|
|
28
|
+
readonly scope: MemoryScope;
|
|
29
|
+
readonly metadata?: Readonly<Record<string, string>>;
|
|
30
|
+
readonly createdAt?: string;
|
|
31
|
+
readonly updatedAt?: string;
|
|
32
|
+
}
|
|
33
|
+
interface MemorySearchHit {
|
|
34
|
+
readonly memory: Memory;
|
|
35
|
+
readonly score: number;
|
|
36
|
+
readonly similarity: number;
|
|
37
|
+
}
|
|
38
|
+
interface AddMemoriesResult {
|
|
39
|
+
readonly memoryIds: readonly string[];
|
|
40
|
+
}
|
|
41
|
+
interface SearchMemoriesResult {
|
|
42
|
+
readonly memories: readonly MemorySearchHit[];
|
|
43
|
+
}
|
|
44
|
+
interface MemorySession {
|
|
45
|
+
readonly agentId?: string;
|
|
46
|
+
readonly sessionId?: string;
|
|
47
|
+
readonly userId?: string;
|
|
48
|
+
}
|
|
49
|
+
interface Page<T> {
|
|
50
|
+
readonly items: readonly T[];
|
|
51
|
+
readonly maxResults?: number;
|
|
52
|
+
readonly nextToken?: string;
|
|
53
|
+
readonly totalCount?: number;
|
|
54
|
+
}
|
|
55
|
+
type AddMemoriesOptions = {
|
|
56
|
+
scope?: MemoryScope;
|
|
57
|
+
metadata?: Readonly<Record<string, string>>;
|
|
58
|
+
} & ({
|
|
59
|
+
text: string;
|
|
60
|
+
messages?: never;
|
|
61
|
+
} | {
|
|
62
|
+
text?: never;
|
|
63
|
+
messages: readonly MemoryMessage[];
|
|
64
|
+
});
|
|
65
|
+
interface SearchMemoriesOptions {
|
|
66
|
+
scope?: MemoryScope;
|
|
67
|
+
topK?: number;
|
|
68
|
+
metadata?: Readonly<Record<string, string>>;
|
|
69
|
+
enableRerank?: boolean;
|
|
70
|
+
minSimilarity?: number;
|
|
71
|
+
minScore?: number;
|
|
72
|
+
}
|
|
73
|
+
interface PageOptions {
|
|
74
|
+
maxResults?: number;
|
|
75
|
+
nextToken?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ListMemoriesOptions extends PageOptions {
|
|
78
|
+
agentId?: string;
|
|
79
|
+
sessionId?: string;
|
|
80
|
+
userId?: string;
|
|
81
|
+
}
|
|
82
|
+
interface ListMemorySessionsOptions extends PageOptions {
|
|
83
|
+
agentId?: string;
|
|
84
|
+
userId?: string;
|
|
85
|
+
}
|
|
86
|
+
interface ListMemorySessionMessagesOptions extends PageOptions {
|
|
87
|
+
agentId?: string;
|
|
88
|
+
userId?: string;
|
|
89
|
+
}
|
|
90
|
+
interface UpdateMemoryOptions {
|
|
91
|
+
text?: string;
|
|
92
|
+
metadata?: Readonly<Record<string, string>>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** A local binding to an existing MemoryStore. No lookup or creation at construction. */
|
|
96
|
+
declare class MemoryStore {
|
|
97
|
+
readonly memoryStoreName: string;
|
|
98
|
+
private readonly transport;
|
|
99
|
+
constructor(name: string, options: {
|
|
100
|
+
runtime: () => Promise<MemoryRuntime>;
|
|
101
|
+
logger?: Logger;
|
|
102
|
+
});
|
|
103
|
+
addMemories(options: AddMemoriesOptions): Promise<AddMemoriesResult>;
|
|
104
|
+
searchMemories(query: string, options?: SearchMemoriesOptions): Promise<SearchMemoriesResult>;
|
|
105
|
+
listMemories(options?: ListMemoriesOptions): Promise<Page<Memory>>;
|
|
106
|
+
getMemory(memoryId: string): Promise<Memory>;
|
|
107
|
+
updateMemory(memoryId: string, options: UpdateMemoryOptions): Promise<Memory>;
|
|
108
|
+
deleteMemory(memoryId: string): Promise<void>;
|
|
109
|
+
listMemorySessions(options?: ListMemorySessionsOptions): Promise<Page<MemorySession>>;
|
|
110
|
+
listMemorySessionMessages(sessionId: string, options?: ListMemorySessionMessagesOptions): Promise<Page<MemoryMessage>>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { type AddMemoriesOptions, type AddMemoriesResult, type ListMemoriesOptions, type ListMemorySessionMessagesOptions, type ListMemorySessionsOptions, type Memory, type MemoryContent, type MemoryMessage, type MemoryScope, type MemorySearchHit, type MemorySession, MemoryStore, type Page, type PageOptions, type SearchMemoriesOptions, type SearchMemoriesResult, type UpdateMemoryOptions };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { L as Logger } from '../logging-C8GLLg1f.js';
|
|
2
|
+
import { A as AccessKeyCredential, C as CredentialProvider } from '../access-key-CkoHq3S8.js';
|
|
3
|
+
import 'node:util';
|
|
4
|
+
|
|
5
|
+
interface MemoryRuntime {
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
regionId: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
accessKeyCredential?: AccessKeyCredential;
|
|
10
|
+
resourceSTS?: CredentialProvider;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface MemoryScope {
|
|
14
|
+
readonly agentId?: string;
|
|
15
|
+
readonly sessionId?: string;
|
|
16
|
+
readonly userId?: string;
|
|
17
|
+
}
|
|
18
|
+
interface MemoryMessage {
|
|
19
|
+
readonly role: string;
|
|
20
|
+
readonly content: string;
|
|
21
|
+
}
|
|
22
|
+
interface MemoryContent {
|
|
23
|
+
readonly text: string;
|
|
24
|
+
}
|
|
25
|
+
interface Memory {
|
|
26
|
+
readonly memoryId: string;
|
|
27
|
+
readonly content: MemoryContent;
|
|
28
|
+
readonly scope: MemoryScope;
|
|
29
|
+
readonly metadata?: Readonly<Record<string, string>>;
|
|
30
|
+
readonly createdAt?: string;
|
|
31
|
+
readonly updatedAt?: string;
|
|
32
|
+
}
|
|
33
|
+
interface MemorySearchHit {
|
|
34
|
+
readonly memory: Memory;
|
|
35
|
+
readonly score: number;
|
|
36
|
+
readonly similarity: number;
|
|
37
|
+
}
|
|
38
|
+
interface AddMemoriesResult {
|
|
39
|
+
readonly memoryIds: readonly string[];
|
|
40
|
+
}
|
|
41
|
+
interface SearchMemoriesResult {
|
|
42
|
+
readonly memories: readonly MemorySearchHit[];
|
|
43
|
+
}
|
|
44
|
+
interface MemorySession {
|
|
45
|
+
readonly agentId?: string;
|
|
46
|
+
readonly sessionId?: string;
|
|
47
|
+
readonly userId?: string;
|
|
48
|
+
}
|
|
49
|
+
interface Page<T> {
|
|
50
|
+
readonly items: readonly T[];
|
|
51
|
+
readonly maxResults?: number;
|
|
52
|
+
readonly nextToken?: string;
|
|
53
|
+
readonly totalCount?: number;
|
|
54
|
+
}
|
|
55
|
+
type AddMemoriesOptions = {
|
|
56
|
+
scope?: MemoryScope;
|
|
57
|
+
metadata?: Readonly<Record<string, string>>;
|
|
58
|
+
} & ({
|
|
59
|
+
text: string;
|
|
60
|
+
messages?: never;
|
|
61
|
+
} | {
|
|
62
|
+
text?: never;
|
|
63
|
+
messages: readonly MemoryMessage[];
|
|
64
|
+
});
|
|
65
|
+
interface SearchMemoriesOptions {
|
|
66
|
+
scope?: MemoryScope;
|
|
67
|
+
topK?: number;
|
|
68
|
+
metadata?: Readonly<Record<string, string>>;
|
|
69
|
+
enableRerank?: boolean;
|
|
70
|
+
minSimilarity?: number;
|
|
71
|
+
minScore?: number;
|
|
72
|
+
}
|
|
73
|
+
interface PageOptions {
|
|
74
|
+
maxResults?: number;
|
|
75
|
+
nextToken?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ListMemoriesOptions extends PageOptions {
|
|
78
|
+
agentId?: string;
|
|
79
|
+
sessionId?: string;
|
|
80
|
+
userId?: string;
|
|
81
|
+
}
|
|
82
|
+
interface ListMemorySessionsOptions extends PageOptions {
|
|
83
|
+
agentId?: string;
|
|
84
|
+
userId?: string;
|
|
85
|
+
}
|
|
86
|
+
interface ListMemorySessionMessagesOptions extends PageOptions {
|
|
87
|
+
agentId?: string;
|
|
88
|
+
userId?: string;
|
|
89
|
+
}
|
|
90
|
+
interface UpdateMemoryOptions {
|
|
91
|
+
text?: string;
|
|
92
|
+
metadata?: Readonly<Record<string, string>>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** A local binding to an existing MemoryStore. No lookup or creation at construction. */
|
|
96
|
+
declare class MemoryStore {
|
|
97
|
+
readonly memoryStoreName: string;
|
|
98
|
+
private readonly transport;
|
|
99
|
+
constructor(name: string, options: {
|
|
100
|
+
runtime: () => Promise<MemoryRuntime>;
|
|
101
|
+
logger?: Logger;
|
|
102
|
+
});
|
|
103
|
+
addMemories(options: AddMemoriesOptions): Promise<AddMemoriesResult>;
|
|
104
|
+
searchMemories(query: string, options?: SearchMemoriesOptions): Promise<SearchMemoriesResult>;
|
|
105
|
+
listMemories(options?: ListMemoriesOptions): Promise<Page<Memory>>;
|
|
106
|
+
getMemory(memoryId: string): Promise<Memory>;
|
|
107
|
+
updateMemory(memoryId: string, options: UpdateMemoryOptions): Promise<Memory>;
|
|
108
|
+
deleteMemory(memoryId: string): Promise<void>;
|
|
109
|
+
listMemorySessions(options?: ListMemorySessionsOptions): Promise<Page<MemorySession>>;
|
|
110
|
+
listMemorySessionMessages(sessionId: string, options?: ListMemorySessionMessagesOptions): Promise<Page<MemoryMessage>>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { type AddMemoriesOptions, type AddMemoriesResult, type ListMemoriesOptions, type ListMemorySessionMessagesOptions, type ListMemorySessionsOptions, type Memory, type MemoryContent, type MemoryMessage, type MemoryScope, type MemorySearchHit, type MemorySession, MemoryStore, type Page, type PageOptions, type SearchMemoriesOptions, type SearchMemoriesResult, type UpdateMemoryOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MemoryStore
|
|
3
|
+
} from "../chunk-IF7LMBXC.js";
|
|
4
|
+
import "../chunk-IUCLCPVV.js";
|
|
5
|
+
import "../chunk-UBP5CHU7.js";
|
|
6
|
+
import "../chunk-K3TE7625.js";
|
|
7
|
+
import "../chunk-NZL3VPJ2.js";
|
|
8
|
+
import "../chunk-MZ5UWGXS.js";
|
|
9
|
+
export {
|
|
10
|
+
MemoryStore
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkTWEO5XVMcjs = require('../chunk-TWEO5XVM.cjs');
|
|
7
|
+
require('../chunk-5RKN46UU.cjs');
|
|
8
|
+
require('../chunk-LE5P3SJW.cjs');
|
|
9
|
+
require('../chunk-JSP7ZROS.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.ModelClient = _chunkTWEO5XVMcjs.ModelClient; exports.ProviderModelClient = _chunkTWEO5XVMcjs.ProviderModelClient; exports.managedModelProtocol = _chunkTWEO5XVMcjs.managedModelProtocol; exports.modelBaseURL = _chunkTWEO5XVMcjs.modelBaseURL;
|
|
16
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/model/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,uPAAC","file":"/Users/zhuoguang/Documents/Code/collaborate/hiclaw/agentcore-sdk-nodejs/dist/model/index.cjs"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { a as ModelCallOptions } from '../client-DDU4-ygJ.cjs';
|
|
2
|
+
export { D as DirectModelOptions, H as HeadersProvider, M as ModelClient, b as ModelMessage, c as ModelParameters, d as ModelProtocol, e as ModelResponse, f as ModelSettings, m as managedModelProtocol, g as modelBaseURL } from '../client-DDU4-ygJ.cjs';
|
|
3
|
+
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
4
|
+
import { LanguageModelV3, EmbeddingModelV3 } from '@ai-sdk/provider';
|
|
5
|
+
import * as ai from 'ai';
|
|
6
|
+
import { ToolSet, ModelMessage, generateText, streamText, embedMany } from 'ai';
|
|
7
|
+
import { inspect } from 'node:util';
|
|
8
|
+
import { L as Logger } from '../logging-C8GLLg1f.cjs';
|
|
9
|
+
import '../config-CMkmMtx1.cjs';
|
|
10
|
+
import '../controlplane/index.cjs';
|
|
11
|
+
import '../access-key-CkoHq3S8.cjs';
|
|
12
|
+
|
|
13
|
+
interface DirectProviderOptions {
|
|
14
|
+
/** A configured AI SDK provider model. The provider owns its endpoint and auth. */
|
|
15
|
+
languageModel: LanguageModelV3;
|
|
16
|
+
embeddingModel?: EmbeddingModelV3;
|
|
17
|
+
timeoutMs?: number;
|
|
18
|
+
logger?: Logger;
|
|
19
|
+
}
|
|
20
|
+
type ProviderGenerateOptions<T extends ToolSet = ToolSet> = Omit<Parameters<typeof generateText<T>>[0], 'model' | 'messages' | 'prompt' | 'abortSignal'>;
|
|
21
|
+
type ProviderStreamOptions<T extends ToolSet = ToolSet> = Omit<Parameters<typeof streamText<T>>[0], 'model' | 'messages' | 'prompt' | 'abortSignal'>;
|
|
22
|
+
type ProviderEmbeddingOptions = Omit<Parameters<typeof embedMany>[0], 'model' | 'values' | 'abortSignal'>;
|
|
23
|
+
/** Multi-provider Direct models use AI SDK messages/results, not a simulated OpenAI protocol. */
|
|
24
|
+
declare class ProviderModelClient {
|
|
25
|
+
readonly settings: Readonly<{
|
|
26
|
+
model: string;
|
|
27
|
+
provider: string;
|
|
28
|
+
}>;
|
|
29
|
+
readonly languageModel: LanguageModelV3;
|
|
30
|
+
private readonly lifetime;
|
|
31
|
+
private readonly logger;
|
|
32
|
+
private readonly timeoutMs;
|
|
33
|
+
private readonly embeddingModel?;
|
|
34
|
+
constructor(options: DirectProviderOptions);
|
|
35
|
+
completion<T extends ToolSet = ToolSet>(messages: readonly ModelMessage[], parameters?: ProviderGenerateOptions<T>, options?: ModelCallOptions): Promise<ai.GenerateTextResult<T, ai.OutputInterface<string, string, any>>>;
|
|
36
|
+
invoke<T extends ToolSet = ToolSet>(messages: readonly ModelMessage[], parameters?: ProviderGenerateOptions<T>, options?: ModelCallOptions): Promise<ai.GenerateTextResult<T, ai.OutputInterface<string, string, any>>>;
|
|
37
|
+
stream<T extends ToolSet = ToolSet>(messages: readonly ModelMessage[], parameters?: ProviderStreamOptions<T>, options?: ModelCallOptions): AsyncGenerator<{
|
|
38
|
+
type: "text-start";
|
|
39
|
+
id: string;
|
|
40
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
41
|
+
} | {
|
|
42
|
+
type: "text-end";
|
|
43
|
+
id: string;
|
|
44
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
45
|
+
} | {
|
|
46
|
+
type: "text-delta";
|
|
47
|
+
id: string;
|
|
48
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
49
|
+
text: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: "reasoning-start";
|
|
52
|
+
id: string;
|
|
53
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
54
|
+
} | {
|
|
55
|
+
type: "reasoning-end";
|
|
56
|
+
id: string;
|
|
57
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
58
|
+
} | {
|
|
59
|
+
type: "reasoning-delta";
|
|
60
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
61
|
+
id: string;
|
|
62
|
+
text: string;
|
|
63
|
+
} | {
|
|
64
|
+
type: "tool-input-start";
|
|
65
|
+
id: string;
|
|
66
|
+
toolName: string;
|
|
67
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
68
|
+
toolMetadata?: _ai_sdk_provider.JSONObject;
|
|
69
|
+
providerExecuted?: boolean;
|
|
70
|
+
dynamic?: boolean;
|
|
71
|
+
title?: string;
|
|
72
|
+
} | {
|
|
73
|
+
type: "tool-input-end";
|
|
74
|
+
id: string;
|
|
75
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
76
|
+
} | {
|
|
77
|
+
type: "tool-input-delta";
|
|
78
|
+
id: string;
|
|
79
|
+
delta: string;
|
|
80
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
81
|
+
} | ({
|
|
82
|
+
type: "source";
|
|
83
|
+
} & _ai_sdk_provider.LanguageModelV3Source) | {
|
|
84
|
+
type: "file";
|
|
85
|
+
file: ai.Experimental_GeneratedImage;
|
|
86
|
+
providerMetadata?: ai.ProviderMetadata;
|
|
87
|
+
} | {
|
|
88
|
+
type: "start-step";
|
|
89
|
+
request: ai.LanguageModelRequestMetadata;
|
|
90
|
+
warnings: ai.CallWarning[];
|
|
91
|
+
} | {
|
|
92
|
+
type: "finish-step";
|
|
93
|
+
response: ai.LanguageModelResponseMetadata;
|
|
94
|
+
usage: ai.LanguageModelUsage;
|
|
95
|
+
finishReason: ai.FinishReason;
|
|
96
|
+
rawFinishReason: string | undefined;
|
|
97
|
+
providerMetadata: ai.ProviderMetadata | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
type: "start";
|
|
100
|
+
} | {
|
|
101
|
+
type: "finish";
|
|
102
|
+
finishReason: ai.FinishReason;
|
|
103
|
+
rawFinishReason: string | undefined;
|
|
104
|
+
totalUsage: ai.LanguageModelUsage;
|
|
105
|
+
} | {
|
|
106
|
+
type: "abort";
|
|
107
|
+
reason?: string;
|
|
108
|
+
} | {
|
|
109
|
+
type: "raw";
|
|
110
|
+
rawValue: unknown;
|
|
111
|
+
} | ({
|
|
112
|
+
type: "tool-call";
|
|
113
|
+
} & ai.TypedToolCall<T>) | ({
|
|
114
|
+
type: "tool-result";
|
|
115
|
+
} & ai.TypedToolResult<T>) | ({
|
|
116
|
+
type: "tool-error";
|
|
117
|
+
} & ai.TypedToolError<T>) | ({
|
|
118
|
+
type: "tool-output-denied";
|
|
119
|
+
} & ai.StaticToolOutputDenied<T>) | ai.ToolApprovalRequestOutput<T>, void, unknown>;
|
|
120
|
+
embedding(input: string | readonly string[], parameters?: ProviderEmbeddingOptions, options?: ModelCallOptions): Promise<ai.EmbedManyResult>;
|
|
121
|
+
close(): void;
|
|
122
|
+
[inspect.custom](): string;
|
|
123
|
+
toJSON(): string;
|
|
124
|
+
private signal;
|
|
125
|
+
private request;
|
|
126
|
+
private failed;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { type DirectProviderOptions, ModelCallOptions, type ProviderEmbeddingOptions, type ProviderGenerateOptions, ProviderModelClient, type ProviderStreamOptions };
|