bedrock-agentcore 0.1.1 → 0.2.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/README.md +94 -114
- package/dist/src/_utils/endpoints.d.ts +28 -0
- package/dist/src/_utils/endpoints.d.ts.map +1 -0
- package/dist/src/_utils/endpoints.js +44 -0
- package/dist/src/_utils/endpoints.js.map +1 -0
- package/dist/src/identity/client.d.ts +40 -0
- package/dist/src/identity/client.d.ts.map +1 -0
- package/dist/src/identity/client.js +109 -0
- package/dist/src/identity/client.js.map +1 -0
- package/dist/src/identity/index.d.ts +22 -0
- package/dist/src/identity/index.d.ts.map +1 -0
- package/dist/src/identity/index.js +24 -0
- package/dist/src/identity/index.js.map +1 -0
- package/dist/src/identity/types.d.ts +82 -0
- package/dist/src/identity/types.d.ts.map +1 -0
- package/dist/src/identity/types.js +5 -0
- package/dist/src/identity/types.js.map +1 -0
- package/dist/src/identity/wrappers.d.ts +54 -0
- package/dist/src/identity/wrappers.d.ts.map +1 -0
- package/dist/src/identity/wrappers.js +95 -0
- package/dist/src/identity/wrappers.js.map +1 -0
- package/dist/src/runtime/app.d.ts +144 -0
- package/dist/src/runtime/app.d.ts.map +1 -0
- package/dist/src/runtime/app.js +485 -0
- package/dist/src/runtime/app.js.map +1 -0
- package/dist/src/runtime/client.d.ts +154 -0
- package/dist/src/runtime/client.d.ts.map +1 -0
- package/dist/src/runtime/client.js +319 -0
- package/dist/src/runtime/client.js.map +1 -0
- package/dist/src/runtime/context.d.ts +33 -0
- package/dist/src/runtime/context.d.ts.map +1 -0
- package/dist/src/runtime/context.js +49 -0
- package/dist/src/runtime/context.js.map +1 -0
- package/dist/src/runtime/index.d.ts +8 -0
- package/dist/src/runtime/index.d.ts.map +1 -0
- package/dist/src/runtime/index.js +7 -0
- package/dist/src/runtime/index.js.map +1 -0
- package/dist/src/runtime/types.d.ts +429 -0
- package/dist/src/runtime/types.d.ts.map +1 -0
- package/dist/src/runtime/types.js +26 -0
- package/dist/src/runtime/types.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/click-tool.d.ts +20 -0
- package/dist/src/tools/browser/integrations/strands/click-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/click-tool.js +33 -0
- package/dist/src/tools/browser/integrations/strands/click-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/evaluate-tool.d.ts +20 -0
- package/dist/src/tools/browser/integrations/strands/evaluate-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/evaluate-tool.js +34 -0
- package/dist/src/tools/browser/integrations/strands/evaluate-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/get-html-tool.d.ts +19 -0
- package/dist/src/tools/browser/integrations/strands/get-html-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/get-html-tool.js +32 -0
- package/dist/src/tools/browser/integrations/strands/get-html-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/get-text-tool.d.ts +19 -0
- package/dist/src/tools/browser/integrations/strands/get-text-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/get-text-tool.js +32 -0
- package/dist/src/tools/browser/integrations/strands/get-text-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/index.d.ts +25 -0
- package/dist/src/tools/browser/integrations/strands/index.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/index.js +25 -0
- package/dist/src/tools/browser/integrations/strands/index.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/navigate-tool.d.ts +21 -0
- package/dist/src/tools/browser/integrations/strands/navigate-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/navigate-tool.js +41 -0
- package/dist/src/tools/browser/integrations/strands/navigate-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/screenshot-tool.d.ts +29 -0
- package/dist/src/tools/browser/integrations/strands/screenshot-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/screenshot-tool.js +52 -0
- package/dist/src/tools/browser/integrations/strands/screenshot-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/tools.d.ts +119 -0
- package/dist/src/tools/browser/integrations/strands/tools.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/tools.js +141 -0
- package/dist/src/tools/browser/integrations/strands/tools.js.map +1 -0
- package/dist/src/tools/browser/integrations/strands/type-tool.d.ts +22 -0
- package/dist/src/tools/browser/integrations/strands/type-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/strands/type-tool.js +37 -0
- package/dist/src/tools/browser/integrations/strands/type-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/tools.d.ts +1 -1
- package/dist/src/tools/browser/integrations/vercel-ai/tools.js +1 -1
- package/dist/src/tools/code-interpreter/client.d.ts +2 -0
- package/dist/src/tools/code-interpreter/client.d.ts.map +1 -1
- package/dist/src/tools/code-interpreter/client.js +31 -25
- package/dist/src/tools/code-interpreter/client.js.map +1 -1
- package/dist/src/tools/code-interpreter/integrations/strands/execute-code-tool.d.ts +28 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-code-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-code-tool.js +47 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-code-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-command-tool.d.ts +27 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-command-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-command-tool.js +42 -0
- package/dist/src/tools/code-interpreter/integrations/strands/execute-command-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/file-operations-tool.d.ts +33 -0
- package/dist/src/tools/code-interpreter/integrations/strands/file-operations-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/file-operations-tool.js +78 -0
- package/dist/src/tools/code-interpreter/integrations/strands/file-operations-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/index.d.ts +32 -0
- package/dist/src/tools/code-interpreter/integrations/strands/index.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/index.js +32 -0
- package/dist/src/tools/code-interpreter/integrations/strands/index.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/tools.d.ts +94 -0
- package/dist/src/tools/code-interpreter/integrations/strands/tools.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/strands/tools.js +112 -0
- package/dist/src/tools/code-interpreter/integrations/strands/tools.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.d.ts +2 -2
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.js +2 -2
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.d.ts +2 -2
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.js +2 -2
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.d.ts +3 -3
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.js +2 -2
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.d.ts +1 -1
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.js +1 -1
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.d.ts +1 -1
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.js +1 -1
- package/package.json +46 -11
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified CodeInterpreter Tools for Strands SDK
|
|
3
|
+
*
|
|
4
|
+
* Provides all three CodeInterpreter tools and session management in one class.
|
|
5
|
+
*/
|
|
6
|
+
import { CodeInterpreter } from '../../client.js';
|
|
7
|
+
import { createExecuteCodeTool } from './execute-code-tool.js';
|
|
8
|
+
import { createFileOperationsTool } from './file-operations-tool.js';
|
|
9
|
+
import { createExecuteCommandTool } from './execute-command-tool.js';
|
|
10
|
+
/**
|
|
11
|
+
* CodeInterpreterTools - All-in-one CodeInterpreter integration for Strands SDK
|
|
12
|
+
*
|
|
13
|
+
* Provides three ready-to-use tools and session management in a single class.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { CodeInterpreterTools } from 'bedrock-agentcore/experimental/code-interpreter/strands'
|
|
18
|
+
* import { Agent, BedrockModel } from '@strands-agents/sdk'
|
|
19
|
+
*
|
|
20
|
+
* // Create tools instance
|
|
21
|
+
* const codeInterpreter = new CodeInterpreterTools({ region: 'us-west-2' })
|
|
22
|
+
*
|
|
23
|
+
* // Start session (optional - automatically started on first use)
|
|
24
|
+
* await codeInterpreter.startSession()
|
|
25
|
+
*
|
|
26
|
+
* // Create agent with all three tools
|
|
27
|
+
* const agent = new Agent({
|
|
28
|
+
* model: new BedrockModel({ modelId: 'anthropic.claude-sonnet-4-20250514-v1:0' }),
|
|
29
|
+
* tools: codeInterpreter.tools,
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* // Clean up when done
|
|
33
|
+
* await codeInterpreter.stopSession()
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export class CodeInterpreterTools {
|
|
37
|
+
interpreter;
|
|
38
|
+
/**
|
|
39
|
+
* Tool for executing Python, JavaScript, or TypeScript code
|
|
40
|
+
*/
|
|
41
|
+
executeCode;
|
|
42
|
+
/**
|
|
43
|
+
* Tool for file operations (read, write, list, remove)
|
|
44
|
+
*/
|
|
45
|
+
fileOperations;
|
|
46
|
+
/**
|
|
47
|
+
* Tool for executing shell commands
|
|
48
|
+
*/
|
|
49
|
+
executeCommand;
|
|
50
|
+
/**
|
|
51
|
+
* All three tools in an array for easy spreading into agent config
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const agent = new Agent({
|
|
56
|
+
* tools: codeInterpreter.tools, // spreads all three tools
|
|
57
|
+
* })
|
|
58
|
+
*
|
|
59
|
+
* // Or combine with other tools
|
|
60
|
+
* const agent = new Agent({
|
|
61
|
+
* tools: [...codeInterpreter.tools, ...browserTools.tools],
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
tools;
|
|
66
|
+
constructor(config = {}) {
|
|
67
|
+
this.interpreter = new CodeInterpreter(config);
|
|
68
|
+
// Create all three tools
|
|
69
|
+
this.executeCode = createExecuteCodeTool(this.interpreter);
|
|
70
|
+
this.fileOperations = createFileOperationsTool(this.interpreter);
|
|
71
|
+
this.executeCommand = createExecuteCommandTool(this.interpreter);
|
|
72
|
+
// Create tools array for Strands SDK (uses arrays, not objects)
|
|
73
|
+
this.tools = [this.executeCode, this.fileOperations, this.executeCommand];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Start a CodeInterpreter session
|
|
77
|
+
*
|
|
78
|
+
* Sessions are automatically started on first tool use, but you can
|
|
79
|
+
* call this explicitly to start the session upfront.
|
|
80
|
+
*
|
|
81
|
+
* @param sessionName - Optional session name for AWS
|
|
82
|
+
* @param timeout - Optional session timeout in seconds (default: 900, max: 28800)
|
|
83
|
+
* @returns Session information
|
|
84
|
+
*/
|
|
85
|
+
async startSession(sessionName, timeout) {
|
|
86
|
+
const params = {};
|
|
87
|
+
if (sessionName !== undefined)
|
|
88
|
+
params.sessionName = sessionName;
|
|
89
|
+
if (timeout !== undefined)
|
|
90
|
+
params.timeout = timeout;
|
|
91
|
+
return this.interpreter.startSession(Object.keys(params).length > 0 ? params : undefined);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Stop the current CodeInterpreter session
|
|
95
|
+
*
|
|
96
|
+
* Call this when you're done using the tools to clean up resources.
|
|
97
|
+
*/
|
|
98
|
+
async stopSession() {
|
|
99
|
+
await this.interpreter.stopSession();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get the underlying CodeInterpreter client
|
|
103
|
+
*
|
|
104
|
+
* Provides direct access to the client for advanced use cases.
|
|
105
|
+
*
|
|
106
|
+
* @returns The CodeInterpreter client instance
|
|
107
|
+
*/
|
|
108
|
+
getClient() {
|
|
109
|
+
return this.interpreter;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../../../src/tools/code-interpreter/integrations/strands/tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,oBAAoB;IACvB,WAAW,CAAiB;IAEpC;;OAEG;IACa,WAAW,CAA0C;IAErE;;OAEG;IACa,cAAc,CAA6C;IAE3E;;OAEG;IACa,cAAc,CAA6C;IAE3E;;;;;;;;;;;;;;OAcG;IACa,KAAK,CAIpB;IAED,YAAY,SAAgC,EAAE;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;QAE9C,yBAAyB;QACzB,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC1D,IAAI,CAAC,cAAc,GAAG,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAChE,IAAI,CAAC,cAAc,GAAG,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAEhE,gEAAgE;QAChE,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,YAAY,CAAC,WAAoB,EAAE,OAAgB;QACvD,MAAM,MAAM,GAAuB,EAAE,CAAA;QACrC,IAAI,WAAW,KAAK,SAAS;YAAE,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;QAC/D,IAAI,OAAO,KAAK,SAAS;YAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;QACnD,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAC3F,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;CACF"}
|
|
@@ -7,8 +7,8 @@ import type { CodeInterpreter } from '../../client.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
-
* import { createExecuteCodeTool } from '
|
|
11
|
-
* import { CodeInterpreter } from '
|
|
10
|
+
* import { createExecuteCodeTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
11
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
12
12
|
*
|
|
13
13
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
14
14
|
* const executeCodeTool = createExecuteCodeTool(interpreter)
|
|
@@ -9,8 +9,8 @@ import { z } from 'zod';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```typescript
|
|
12
|
-
* import { createExecuteCodeTool } from '
|
|
13
|
-
* import { CodeInterpreter } from '
|
|
12
|
+
* import { createExecuteCodeTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
13
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
14
14
|
*
|
|
15
15
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
16
16
|
* const executeCodeTool = createExecuteCodeTool(interpreter)
|
|
@@ -7,8 +7,8 @@ import type { CodeInterpreter } from '../../client.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
-
* import { createExecuteCommandTool } from '
|
|
11
|
-
* import { CodeInterpreter } from '
|
|
10
|
+
* import { createExecuteCommandTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
11
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
12
12
|
*
|
|
13
13
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
14
14
|
* const executeCommandTool = createExecuteCommandTool(interpreter)
|
|
@@ -9,8 +9,8 @@ import { z } from 'zod';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```typescript
|
|
12
|
-
* import { createExecuteCommandTool } from '
|
|
13
|
-
* import { CodeInterpreter } from '
|
|
12
|
+
* import { createExecuteCommandTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
13
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
14
14
|
*
|
|
15
15
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
16
16
|
* const executeCommandTool = createExecuteCommandTool(interpreter)
|
|
@@ -7,8 +7,8 @@ import type { CodeInterpreter } from '../../client.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
|
-
* import { createFileOperationsTool } from '
|
|
11
|
-
* import { CodeInterpreter } from '
|
|
10
|
+
* import { createFileOperationsTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
11
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
12
12
|
*
|
|
13
13
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
14
14
|
* const fileOpsTool = createFileOperationsTool(interpreter)
|
|
@@ -21,7 +21,7 @@ import type { CodeInterpreter } from '../../client.js';
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export declare function createFileOperationsTool(interpreter: CodeInterpreter): import("ai").Tool<{
|
|
24
|
-
operation: "
|
|
24
|
+
operation: "remove" | "write" | "read" | "list";
|
|
25
25
|
path: string;
|
|
26
26
|
files?: {
|
|
27
27
|
path: string;
|
|
@@ -9,8 +9,8 @@ import { z } from 'zod';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```typescript
|
|
12
|
-
* import { createFileOperationsTool } from '
|
|
13
|
-
* import { CodeInterpreter } from '
|
|
12
|
+
* import { createFileOperationsTool } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
13
|
+
* import { CodeInterpreter } from 'bedrock-agentcore/code-interpreter'
|
|
14
14
|
*
|
|
15
15
|
* const interpreter = new CodeInterpreter({ region: 'us-west-2' })
|
|
16
16
|
* const fileOpsTool = createFileOperationsTool(interpreter)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* import { ToolLoopAgent } from 'ai'
|
|
10
10
|
* import { bedrock } from '@ai-sdk/amazon-bedrock'
|
|
11
|
-
* import { CodeInterpreterTools } from '
|
|
11
|
+
* import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
12
12
|
*
|
|
13
13
|
* const codeInterpreter = new CodeInterpreterTools({ region: 'us-west-2' })
|
|
14
14
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* import { ToolLoopAgent } from 'ai'
|
|
10
10
|
* import { bedrock } from '@ai-sdk/amazon-bedrock'
|
|
11
|
-
* import { CodeInterpreterTools } from '
|
|
11
|
+
* import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
12
12
|
*
|
|
13
13
|
* const codeInterpreter = new CodeInterpreterTools({ region: 'us-west-2' })
|
|
14
14
|
*
|
|
@@ -15,7 +15,7 @@ import { createExecuteCommandTool } from './execute-command-tool.js';
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|
|
18
|
-
* import { CodeInterpreterTools } from '
|
|
18
|
+
* import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
19
19
|
* import { ToolLoopAgent } from 'ai'
|
|
20
20
|
* import { bedrock } from '@ai-sdk/amazon-bedrock'
|
|
21
21
|
*
|
|
@@ -14,7 +14,7 @@ import { createExecuteCommandTool } from './execute-command-tool.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```typescript
|
|
17
|
-
* import { CodeInterpreterTools } from '
|
|
17
|
+
* import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
18
18
|
* import { ToolLoopAgent } from 'ai'
|
|
19
19
|
* import { bedrock } from '@ai-sdk/amazon-bedrock'
|
|
20
20
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bedrock-agentcore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "TypeScript SDK for AWS Bedrock AgentCore",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"import": "./dist/src/tools/browser/integrations/vercel-ai/index.js",
|
|
27
27
|
"types": "./dist/src/tools/browser/integrations/vercel-ai/index.d.ts"
|
|
28
28
|
},
|
|
29
|
+
"./experimental/browser/strands": {
|
|
30
|
+
"import": "./dist/src/tools/browser/integrations/strands/index.js",
|
|
31
|
+
"types": "./dist/src/tools/browser/integrations/strands/index.d.ts"
|
|
32
|
+
},
|
|
29
33
|
"./code-interpreter": {
|
|
30
34
|
"import": "./dist/src/tools/code-interpreter/index.js",
|
|
31
35
|
"types": "./dist/src/tools/code-interpreter/index.d.ts"
|
|
@@ -33,22 +37,37 @@
|
|
|
33
37
|
"./code-interpreter/vercel-ai": {
|
|
34
38
|
"import": "./dist/src/tools/code-interpreter/integrations/vercel-ai/index.js",
|
|
35
39
|
"types": "./dist/src/tools/code-interpreter/integrations/vercel-ai/index.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./experimental/code-interpreter/strands": {
|
|
42
|
+
"import": "./dist/src/tools/code-interpreter/integrations/strands/index.js",
|
|
43
|
+
"types": "./dist/src/tools/code-interpreter/integrations/strands/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./runtime": {
|
|
46
|
+
"import": "./dist/src/runtime/index.js",
|
|
47
|
+
"types": "./dist/src/runtime/index.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./identity": {
|
|
50
|
+
"import": "./dist/src/identity/index.js",
|
|
51
|
+
"types": "./dist/src/identity/index.d.ts"
|
|
36
52
|
}
|
|
37
53
|
},
|
|
38
54
|
"scripts": {
|
|
39
55
|
"build": "tsc",
|
|
40
|
-
"check": "npm run lint && npm run format && npm run type-check && npm run test:coverage",
|
|
56
|
+
"check": "npm run lint && npm run format && npm run type-check:all && npm run test:coverage",
|
|
41
57
|
"clean": "rm -rf node_modules dist package-lock.json",
|
|
42
58
|
"test": "vitest run --project unit-node",
|
|
59
|
+
"test:all": "vitest run --project unit-node && vitest run --project integ",
|
|
60
|
+
"ci": "npm run lint && npm run format:check && npm run type-check:all && npm run build && npm run test:all",
|
|
43
61
|
"test:watch": "vitest --project unit-node",
|
|
44
62
|
"test:coverage": "vitest run --coverage --project unit-node",
|
|
45
|
-
"test:types": "vitest run --project types",
|
|
46
63
|
"test:integ": "vitest run --project integ",
|
|
47
|
-
"lint": "eslint src
|
|
48
|
-
"lint:fix": "eslint src
|
|
49
|
-
"format": "prettier --write src
|
|
50
|
-
"format:check": "prettier --check src
|
|
64
|
+
"lint": "eslint src tests_integ",
|
|
65
|
+
"lint:fix": "eslint src tests_integ --fix",
|
|
66
|
+
"format": "prettier --write src tests_integ",
|
|
67
|
+
"format:check": "prettier --check src tests_integ",
|
|
51
68
|
"type-check": "tsc --noEmit",
|
|
69
|
+
"type-check:tests": "tsc --noEmit -p tsconfig.test.json",
|
|
70
|
+
"type-check:all": "npm run type-check && npm run type-check:tests",
|
|
52
71
|
"type-check:watch": "tsc --noEmit --watch",
|
|
53
72
|
"prepare": "npm run build && husky || true"
|
|
54
73
|
},
|
|
@@ -65,7 +84,11 @@
|
|
|
65
84
|
"license": "Apache-2.0",
|
|
66
85
|
"devDependencies": {
|
|
67
86
|
"@ai-sdk/amazon-bedrock": "^4.0.0-beta.67",
|
|
68
|
-
"@
|
|
87
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.957.0",
|
|
88
|
+
"@strands-agents/sdk": "^0.1.4",
|
|
89
|
+
"@types/express": "^4.17.0",
|
|
90
|
+
"@types/node": "^24.10.4",
|
|
91
|
+
"@types/supertest": "^6.0.3",
|
|
69
92
|
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
70
93
|
"@typescript-eslint/parser": "^8.0.0",
|
|
71
94
|
"@vitest/coverage-v8": "^4.0.13",
|
|
@@ -74,8 +97,9 @@
|
|
|
74
97
|
"eslint-plugin-tsdoc": "^0.5.0",
|
|
75
98
|
"husky": "^9.1.7",
|
|
76
99
|
"playwright": "^1.56.1",
|
|
77
|
-
"tsx": "^4.19.4",
|
|
78
100
|
"prettier": "^3.0.0",
|
|
101
|
+
"supertest": "^7.1.4",
|
|
102
|
+
"tsx": "^4.19.4",
|
|
79
103
|
"typescript": "^5.5.0",
|
|
80
104
|
"vitest": "^4.0.8"
|
|
81
105
|
},
|
|
@@ -92,15 +116,23 @@
|
|
|
92
116
|
"homepage": "https://github.com/aws/bedrock-agentcore-sdk-typescript#readme",
|
|
93
117
|
"dependencies": {
|
|
94
118
|
"@aws-crypto/sha256-js": "^5.2.0",
|
|
95
|
-
"@aws-sdk/client-bedrock-
|
|
96
|
-
"@aws-sdk/client-bedrock-agentcore": "^3.
|
|
119
|
+
"@aws-sdk/client-bedrock-agentcore": "^3.948.0",
|
|
120
|
+
"@aws-sdk/client-bedrock-agentcore-control": "^3.948.0",
|
|
97
121
|
"@aws-sdk/credential-providers": "^3.939.0",
|
|
122
|
+
"@aws-sdk/protocol-http": "^3.370.0",
|
|
123
|
+
"@aws-sdk/signature-v4": "^3.370.0",
|
|
124
|
+
"@fastify/sse": "^0.4.0",
|
|
125
|
+
"@fastify/websocket": "^11.0.1",
|
|
98
126
|
"@smithy/protocol-http": "^5.3.5",
|
|
99
127
|
"@smithy/signature-v4": "^5.3.5",
|
|
100
128
|
"@smithy/util-utf8": "^4.2.0",
|
|
129
|
+
"@types/ws": "^8.18.1",
|
|
130
|
+
"fastify": "^5.7.1",
|
|
131
|
+
"ws": "^8.18.3",
|
|
101
132
|
"zod": "^4.1.13"
|
|
102
133
|
},
|
|
103
134
|
"peerDependencies": {
|
|
135
|
+
"@strands-agents/sdk": ">=0.1.0",
|
|
104
136
|
"ai": ">=6.0.0-beta",
|
|
105
137
|
"playwright": ">=1.56.0"
|
|
106
138
|
},
|
|
@@ -110,6 +142,9 @@
|
|
|
110
142
|
},
|
|
111
143
|
"playwright": {
|
|
112
144
|
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"@strands-agents/sdk": {
|
|
147
|
+
"optional": true
|
|
113
148
|
}
|
|
114
149
|
}
|
|
115
150
|
}
|