agentfootprint 11.4.0 → 12.0.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/CAPABILITIES.md +3 -1
- package/dist/adapters/code/agentcore.js +295 -214
- package/dist/adapters/code/agentcore.js.map +1 -1
- package/dist/adapters/code/agentcoreClient.js +178 -0
- package/dist/adapters/code/agentcoreClient.js.map +1 -0
- package/dist/adapters/code/agentcoreWire.js +348 -0
- package/dist/adapters/code/agentcoreWire.js.map +1 -0
- package/dist/adapters/code/fileName.js +100 -0
- package/dist/adapters/code/fileName.js.map +1 -0
- package/dist/adapters/code/local.js +529 -183
- package/dist/adapters/code/local.js.map +1 -1
- package/dist/adapters/code/output.js +140 -0
- package/dist/adapters/code/output.js.map +1 -0
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js +7 -6
- package/dist/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
- package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js +36 -2
- package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -1
- package/dist/adapters/mcp/agentcoreRuntime/transport.js +3 -1
- package/dist/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
- package/dist/core/codeRunnerTool.js +52 -7
- package/dist/core/codeRunnerTool.js.map +1 -1
- package/dist/doors/providers.js.map +1 -1
- package/dist/esm/adapters/code/agentcore.d.ts +65 -68
- package/dist/esm/adapters/code/agentcore.js +293 -212
- package/dist/esm/adapters/code/agentcore.js.map +1 -1
- package/dist/esm/adapters/code/agentcoreClient.d.ts +193 -0
- package/dist/esm/adapters/code/agentcoreClient.js +173 -0
- package/dist/esm/adapters/code/agentcoreClient.js.map +1 -0
- package/dist/esm/adapters/code/agentcoreWire.d.ts +119 -0
- package/dist/esm/adapters/code/agentcoreWire.js +334 -0
- package/dist/esm/adapters/code/agentcoreWire.js.map +1 -0
- package/dist/esm/adapters/code/fileName.d.ts +43 -0
- package/dist/esm/adapters/code/fileName.js +96 -0
- package/dist/esm/adapters/code/fileName.js.map +1 -0
- package/dist/esm/adapters/code/local.d.ts +91 -12
- package/dist/esm/adapters/code/local.js +528 -182
- package/dist/esm/adapters/code/local.js.map +1 -1
- package/dist/esm/adapters/code/output.d.ts +70 -0
- package/dist/esm/adapters/code/output.js +129 -0
- package/dist/esm/adapters/code/output.js.map +1 -0
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.d.ts +7 -6
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js +7 -6
- package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +32 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js +35 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -1
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js +4 -2
- package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
- package/dist/esm/core/codeRunnerTool.d.ts +15 -3
- package/dist/esm/core/codeRunnerTool.js +52 -7
- package/dist/esm/core/codeRunnerTool.js.map +1 -1
- package/dist/esm/doors/providers.d.ts +1 -1
- package/dist/esm/doors/providers.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +144 -29
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mcp/callLifetime.d.ts +57 -14
- package/dist/esm/mcp/callLifetime.js +67 -19
- package/dist/esm/mcp/callLifetime.js.map +1 -1
- package/dist/esm/mcp/callMarker.d.ts +43 -0
- package/dist/esm/mcp/callMarker.js +69 -0
- package/dist/esm/mcp/callMarker.js.map +1 -0
- package/dist/esm/mcp/connectionRefusals.js +7 -0
- package/dist/esm/mcp/connectionRefusals.js.map +1 -1
- package/dist/esm/mcp/index.d.ts +2 -0
- package/dist/esm/mcp/index.js +3 -0
- package/dist/esm/mcp/index.js.map +1 -1
- package/dist/esm/mcp/mcpClient.js +93 -26
- package/dist/esm/mcp/mcpClient.js.map +1 -1
- package/dist/esm/mcp/replay.d.ts +291 -0
- package/dist/esm/mcp/replay.js +405 -0
- package/dist/esm/mcp/replay.js.map +1 -0
- package/dist/esm/mcp/replayUnavailable.d.ts +68 -0
- package/dist/esm/mcp/replayUnavailable.js +87 -0
- package/dist/esm/mcp/replayUnavailable.js.map +1 -0
- package/dist/esm/mcp/requestLedger.d.ts +115 -32
- package/dist/esm/mcp/requestLedger.js +193 -52
- package/dist/esm/mcp/requestLedger.js.map +1 -1
- package/dist/esm/mcp/seriesEvidence.d.ts +73 -15
- package/dist/esm/mcp/seriesEvidence.js +114 -21
- package/dist/esm/mcp/seriesEvidence.js.map +1 -1
- package/dist/esm/mcp/throttleRetry.d.ts +86 -42
- package/dist/esm/mcp/throttleRetry.js +158 -50
- package/dist/esm/mcp/throttleRetry.js.map +1 -1
- package/dist/esm/mcp/toolResult.d.ts +6 -0
- package/dist/esm/mcp/toolResult.js +15 -0
- package/dist/esm/mcp/toolResult.js.map +1 -1
- package/dist/esm/mcp/types.d.ts +73 -8
- package/dist/esm/provider-contract/codeSandbox.d.ts +89 -0
- package/dist/esm/provider-contract/codeSandbox.js +119 -0
- package/dist/esm/provider-contract/codeSandbox.js.map +1 -0
- package/dist/esm/provider-contract/sessionExpired.d.ts +31 -0
- package/dist/esm/provider-contract/sessionExpired.js +40 -0
- package/dist/esm/provider-contract/sessionExpired.js.map +1 -0
- package/dist/esm/provider-contract/types.d.ts +166 -17
- package/dist/esm/provider-contract/types.js +9 -0
- package/dist/esm/provider-contract/types.js.map +1 -1
- package/dist/esm/redaction/knownStrings.js +16 -0
- package/dist/esm/redaction/knownStrings.js.map +1 -1
- package/dist/esm/tool-providers/index.d.ts +2 -2
- package/dist/esm/tool-providers/index.js +4 -0
- package/dist/esm/tool-providers/index.js.map +1 -1
- package/dist/esm/tools/requestEvidence.js +60 -0
- package/dist/esm/tools/requestEvidence.js.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp/callLifetime.js +66 -18
- package/dist/mcp/callLifetime.js.map +1 -1
- package/dist/mcp/callMarker.js +74 -0
- package/dist/mcp/callMarker.js.map +1 -0
- package/dist/mcp/connectionRefusals.js +7 -0
- package/dist/mcp/connectionRefusals.js.map +1 -1
- package/dist/mcp/index.js +5 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mcpClient.js +91 -24
- package/dist/mcp/mcpClient.js.map +1 -1
- package/dist/mcp/replay.js +415 -0
- package/dist/mcp/replay.js.map +1 -0
- package/dist/mcp/replayUnavailable.js +92 -0
- package/dist/mcp/replayUnavailable.js.map +1 -0
- package/dist/mcp/requestLedger.js +193 -52
- package/dist/mcp/requestLedger.js.map +1 -1
- package/dist/mcp/seriesEvidence.js +116 -22
- package/dist/mcp/seriesEvidence.js.map +1 -1
- package/dist/mcp/throttleRetry.js +160 -51
- package/dist/mcp/throttleRetry.js.map +1 -1
- package/dist/mcp/toolResult.js +17 -1
- package/dist/mcp/toolResult.js.map +1 -1
- package/dist/provider-contract/codeSandbox.js +125 -0
- package/dist/provider-contract/codeSandbox.js.map +1 -0
- package/dist/provider-contract/sessionExpired.js +44 -0
- package/dist/provider-contract/sessionExpired.js.map +1 -0
- package/dist/provider-contract/types.js +12 -1
- package/dist/provider-contract/types.js.map +1 -1
- package/dist/redaction/knownStrings.js +16 -0
- package/dist/redaction/knownStrings.js.map +1 -1
- package/dist/tool-providers/index.js +5 -1
- package/dist/tool-providers/index.js.map +1 -1
- package/dist/tools/requestEvidence.js +60 -0
- package/dist/tools/requestEvidence.js.map +1 -1
- package/dist/types/adapters/code/agentcore.d.ts +65 -68
- package/dist/types/adapters/code/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/code/agentcoreClient.d.ts +194 -0
- package/dist/types/adapters/code/agentcoreClient.d.ts.map +1 -0
- package/dist/types/adapters/code/agentcoreWire.d.ts +120 -0
- package/dist/types/adapters/code/agentcoreWire.d.ts.map +1 -0
- package/dist/types/adapters/code/fileName.d.ts +44 -0
- package/dist/types/adapters/code/fileName.d.ts.map +1 -0
- package/dist/types/adapters/code/local.d.ts +91 -12
- package/dist/types/adapters/code/local.d.ts.map +1 -1
- package/dist/types/adapters/code/output.d.ts +71 -0
- package/dist/types/adapters/code/output.d.ts.map +1 -0
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts +7 -6
- package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +32 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts.map +1 -1
- package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts.map +1 -1
- package/dist/types/core/codeRunnerTool.d.ts +15 -3
- package/dist/types/core/codeRunnerTool.d.ts.map +1 -1
- package/dist/types/doors/providers.d.ts +1 -1
- package/dist/types/doors/providers.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +144 -29
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/mcp/callLifetime.d.ts +57 -14
- package/dist/types/mcp/callLifetime.d.ts.map +1 -1
- package/dist/types/mcp/callMarker.d.ts +44 -0
- package/dist/types/mcp/callMarker.d.ts.map +1 -0
- package/dist/types/mcp/index.d.ts +2 -0
- package/dist/types/mcp/index.d.ts.map +1 -1
- package/dist/types/mcp/mcpClient.d.ts.map +1 -1
- package/dist/types/mcp/replay.d.ts +292 -0
- package/dist/types/mcp/replay.d.ts.map +1 -0
- package/dist/types/mcp/replayUnavailable.d.ts +69 -0
- package/dist/types/mcp/replayUnavailable.d.ts.map +1 -0
- package/dist/types/mcp/requestLedger.d.ts +115 -32
- package/dist/types/mcp/requestLedger.d.ts.map +1 -1
- package/dist/types/mcp/seriesEvidence.d.ts +73 -15
- package/dist/types/mcp/seriesEvidence.d.ts.map +1 -1
- package/dist/types/mcp/throttleRetry.d.ts +86 -42
- package/dist/types/mcp/throttleRetry.d.ts.map +1 -1
- package/dist/types/mcp/toolResult.d.ts +6 -0
- package/dist/types/mcp/toolResult.d.ts.map +1 -1
- package/dist/types/mcp/types.d.ts +73 -8
- package/dist/types/mcp/types.d.ts.map +1 -1
- package/dist/types/provider-contract/codeSandbox.d.ts +90 -0
- package/dist/types/provider-contract/codeSandbox.d.ts.map +1 -0
- package/dist/types/provider-contract/sessionExpired.d.ts +32 -0
- package/dist/types/provider-contract/sessionExpired.d.ts.map +1 -0
- package/dist/types/provider-contract/types.d.ts +166 -17
- package/dist/types/provider-contract/types.d.ts.map +1 -1
- package/dist/types/redaction/knownStrings.d.ts.map +1 -1
- package/dist/types/tool-providers/index.d.ts +2 -2
- package/dist/types/tool-providers/index.d.ts.map +1 -1
- package/dist/types/tools/requestEvidence.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,43 +10,70 @@
|
|
|
10
10
|
* network-and-filesystem-isolated environment, and the tool code is identical
|
|
11
11
|
* across the swap.
|
|
12
12
|
*
|
|
13
|
-
* ── The
|
|
14
|
-
* Pinned in `test/adapters/aws/awsCommandPin.ts
|
|
15
|
-
* install of `@aws-sdk/client-bedrock-agentcore`
|
|
13
|
+
* ── The operations, verified against the SDK ────────────────────────────────
|
|
14
|
+
* Pinned in `test/adapters/aws/awsCommandPin.ts`. The three commands were
|
|
15
|
+
* verified against a real install of `@aws-sdk/client-bedrock-agentcore`
|
|
16
|
+
* 3.1108.0, and the four `InvokeCodeInterpreter` tool shapes below against
|
|
17
|
+
* 3.1159.0:
|
|
16
18
|
*
|
|
17
19
|
* • `StartCodeInterpreterSessionCommand`
|
|
18
20
|
* in `{ codeInterpreterIdentifier, name?, sessionTimeoutSeconds? }`
|
|
19
21
|
* out `{ codeInterpreterIdentifier, sessionId, createdAt }`
|
|
20
|
-
* • `InvokeCodeInterpreterCommand`
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* • `InvokeCodeInterpreterCommand` — `{ codeInterpreterIdentifier, sessionId,
|
|
23
|
+
* name, arguments }`, one service tool per call:
|
|
24
|
+
* `executeCode` `{ code, language? }` → `execute`
|
|
25
|
+
* `writeFiles` `{ content: [{ path, text } | { path, blob }] }` → `stageInputs`
|
|
26
|
+
* `readFiles` `{ paths: [path] }` → `readFile`
|
|
27
|
+
* `executeCommand` `{ command }` → `runCommand`
|
|
28
|
+
* out `{ sessionId, stream }` — an **event stream**, not a body
|
|
24
29
|
* • `StopCodeInterpreterSessionCommand`
|
|
25
30
|
* in `{ codeInterpreterIdentifier, sessionId }` ← the session ID, not a URI
|
|
26
|
-
* out `{ codeInterpreterIdentifier, sessionId, lastUpdatedAt }`
|
|
27
31
|
*
|
|
28
|
-
* **`Invoke` answers with an `AsyncIterable
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* four more. An adapter that read a `body` field would find `undefined` and
|
|
33
|
-
* report an empty success on every call, and one that iterated only for
|
|
34
|
-
* `result` would treat an AccessDenied as "the code printed nothing." So this
|
|
35
|
-
* drains the stream, raises the exception members BY NAME, and folds the
|
|
36
|
-
* result members into one `CodeResult`.
|
|
32
|
+
* **`Invoke` answers with an `AsyncIterable`** whose members are `{ result }`
|
|
33
|
+
* or a modelled EXCEPTION, and `./agentcoreClient.ts` drains it: exception
|
|
34
|
+
* members raise BY NAME, result members fold into one answer — and nothing
|
|
35
|
+
* the stream did not carry is filled in.
|
|
37
36
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
37
|
+
* ── Results say only what the service reported ──────────────────────────────
|
|
38
|
+
* `CodeResult.ok` is `true` or `false` only when the service said which: an
|
|
39
|
+
* exit status, or its own `isError` verdict. When it reported neither, `ok`
|
|
40
|
+
* is ABSENT — unknown. (It used to be `true`: success from silence.) A
|
|
41
|
+
* command's `exitCode` is the reported one or absent, never read off `isError`.
|
|
42
|
+
*
|
|
43
|
+
* ── Files in and out, exactly and bounded ───────────────────────────────────
|
|
44
|
+
* `stageInputs` writes TEXT as text and BYTES as a blob — never base64 inside
|
|
45
|
+
* text with a decode step — in ONE `writeFiles` call, refused before it is
|
|
46
|
+
* sent when its body would pass AgentCore's 100 MB per-call limit. AgentCore
|
|
47
|
+
* takes no environment, so `AF_STAGED_INPUTS` reaches code by a setup
|
|
48
|
+
* execution before EVERY run (confirmed by the line it prints; the runtime is
|
|
49
|
+
* mutable by the code it runs, so an earlier setup proves nothing now) and
|
|
50
|
+
* reaches a command as an `export` line ahead of it. `readFile` reads ONE path
|
|
51
|
+
* and pairs the file to it by the URI the service returned — one `file:///`
|
|
52
|
+
* form, read one way, a raw query or fragment refused — failing closed on a
|
|
53
|
+
* missing or different one; text or bytes is whichever field the service
|
|
54
|
+
* filled, and a file over `maxBytes` is refused, never cut.
|
|
55
|
+
*
|
|
56
|
+
* ── Commands are opt-in ─────────────────────────────────────────────────────
|
|
57
|
+
* `runCommand` runs arbitrary shell, so a session has it only when the runner
|
|
58
|
+
* is built with `commands: true`. The sandbox's network is whatever the code
|
|
59
|
+
* interpreter resource was created with — the built-in `aws.codeinterpreter.v1`
|
|
60
|
+
* runs with AWS's most restrictive defaults (Sandbox mode: limited network
|
|
61
|
+
* access, Amazon S3 included); a custom interpreter may be Public (internet)
|
|
62
|
+
* or VPC. This adapter can neither see nor change that.
|
|
63
|
+
*
|
|
64
|
+
* ── A session that is gone says so, once ────────────────────────────────────
|
|
65
|
+
* A service error naming the session as "not active" becomes
|
|
66
|
+
* {@link SessionExpiredError} on every verb, and so does a
|
|
67
|
+
* `ResourceNotFoundException` on a verb that addresses nothing but the session
|
|
68
|
+
* (code, a command, a write). On a READ, "not found" may mean the file, so it
|
|
69
|
+
* is `CodeSandboxError` (`'file-not-returned'`), naming both possibilities —
|
|
70
|
+
* never offered as proof the session is gone.
|
|
42
71
|
*
|
|
43
72
|
* ── How this talks to the SDK (the 9.4.0 law) ───────────────────────────────
|
|
44
73
|
* Through `client.send(new SomeCommand(input))`, never a method on the client.
|
|
45
74
|
* A bare `@aws-sdk/client-*` **Client is command-based**: its prototype carries
|
|
46
|
-
* `send` and `destroy` and nothing else
|
|
47
|
-
*
|
|
48
|
-
* `undefined`; the shortcut exists only on the aggregated `BedrockAgentCore`).
|
|
49
|
-
* Three adapters have shipped that bug in this package.
|
|
75
|
+
* `send` and `destroy` and nothing else. Three adapters have shipped that bug
|
|
76
|
+
* in this package.
|
|
50
77
|
*
|
|
51
78
|
* ── Credentials ─────────────────────────────────────────────────────────────
|
|
52
79
|
* Standard AWS credential resolution (the SDK's own chain). A tool holding a
|
|
@@ -58,11 +85,14 @@
|
|
|
58
85
|
* `start()` first runs (or never, if you inject `_client` / `_sdk`).
|
|
59
86
|
*/
|
|
60
87
|
import type { CodeRunner } from '../../provider-contract/types.js';
|
|
88
|
+
import { type AgentCoreCodeClientLike, type BedrockAgentCoreCodeSdkModule } from './agentcoreClient.js';
|
|
89
|
+
export type { AgentCoreCodeClientLike, AgentCoreFileContent, AgentCoreInvokeAnswer, AgentCoreInvokeInput, AgentCoreInvokeTarget, AgentCoreResource, BedrockAgentCoreCodeSdkModule, } from './agentcoreClient.js';
|
|
61
90
|
export interface AgentCoreCodeRunnerOptions {
|
|
62
91
|
readonly region?: string;
|
|
63
92
|
/**
|
|
64
93
|
* The code-interpreter resource to run in — AWS's built-in
|
|
65
94
|
* (`'aws.codeinterpreter.v1'`) or your own custom interpreter's identifier.
|
|
95
|
+
* Its network mode (Sandbox, Public or VPC) is set on the resource, not here.
|
|
66
96
|
*/
|
|
67
97
|
readonly identifier: string;
|
|
68
98
|
/**
|
|
@@ -71,7 +101,8 @@ export interface AgentCoreCodeRunnerOptions {
|
|
|
71
101
|
*
|
|
72
102
|
* **This is why "already gone" is a normal outcome, not an incident**: the
|
|
73
103
|
* far side reaps on its own schedule, so a `Stop` may arrive after AWS has
|
|
74
|
-
* already collected the session. `stop()` treats that as done
|
|
104
|
+
* already collected the session. `stop()` treats that as done, and every
|
|
105
|
+
* other verb raises `SessionExpiredError`.
|
|
75
106
|
*/
|
|
76
107
|
readonly sessionTimeoutSeconds?: number;
|
|
77
108
|
/** Default language when a call does not name one. `'python'` (the service
|
|
@@ -80,54 +111,20 @@ export interface AgentCoreCodeRunnerOptions {
|
|
|
80
111
|
/** Per-stream output ceiling, in characters. Default 8000; anything cut is
|
|
81
112
|
* REPORTED on `CodeResult.truncated`, never dropped quietly. */
|
|
82
113
|
readonly maxOutputChars?: number;
|
|
114
|
+
/**
|
|
115
|
+
* Give each session `runCommand` — one shell command through AgentCore's
|
|
116
|
+
* `executeCommand`. Default `false`, and then the member is ABSENT
|
|
117
|
+
* (`canRunCodeCommands` says no): it runs arbitrary shell, so a runner offers
|
|
118
|
+
* it only when built to. Build one runner per agent that should have it.
|
|
119
|
+
*/
|
|
120
|
+
readonly commands?: boolean;
|
|
83
121
|
/** Stable id (default `'agentcore-code-runner'`). Rides the session events. */
|
|
84
122
|
readonly id?: string;
|
|
85
123
|
/** Test seam — inject a client implementing {@link AgentCoreCodeClientLike}.
|
|
86
|
-
* Bypasses the SDK entirely; the field mapping
|
|
124
|
+
* Bypasses the SDK entirely; the field mapping is then yours. */
|
|
87
125
|
readonly _client?: AgentCoreCodeClientLike;
|
|
88
126
|
/** @internal Test injection — the AWS SDK module, to exercise the real shim
|
|
89
127
|
* (`send(new Command(...))`) with a fake SDK. */
|
|
90
128
|
readonly _sdk?: BedrockAgentCoreCodeSdkModule;
|
|
91
129
|
}
|
|
92
|
-
/** The operation-semantic surface this adapter calls. */
|
|
93
|
-
export interface AgentCoreCodeClientLike {
|
|
94
|
-
startSession(input: {
|
|
95
|
-
readonly codeInterpreterIdentifier: string;
|
|
96
|
-
readonly name?: string;
|
|
97
|
-
readonly sessionTimeoutSeconds?: number;
|
|
98
|
-
}): Promise<{
|
|
99
|
-
readonly sessionId?: string;
|
|
100
|
-
}>;
|
|
101
|
-
invoke(input: {
|
|
102
|
-
readonly codeInterpreterIdentifier: string;
|
|
103
|
-
readonly sessionId: string;
|
|
104
|
-
readonly name: string;
|
|
105
|
-
readonly arguments: {
|
|
106
|
-
readonly code: string;
|
|
107
|
-
readonly language?: string;
|
|
108
|
-
};
|
|
109
|
-
}): Promise<AgentCoreInvokeAnswer>;
|
|
110
|
-
stopSession(input: {
|
|
111
|
-
readonly codeInterpreterIdentifier: string;
|
|
112
|
-
readonly sessionId: string;
|
|
113
|
-
}): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
/** What `invoke` reports back, already drained of its event stream. */
|
|
116
|
-
export interface AgentCoreInvokeAnswer {
|
|
117
|
-
readonly stdout: string;
|
|
118
|
-
readonly stderr: string;
|
|
119
|
-
readonly exitCode?: number;
|
|
120
|
-
readonly isError?: boolean;
|
|
121
|
-
}
|
|
122
|
-
/** The slice of `@aws-sdk/client-bedrock-agentcore` this shim touches. */
|
|
123
|
-
export interface BedrockAgentCoreCodeSdkModule {
|
|
124
|
-
readonly BedrockAgentCoreClient?: new (config: {
|
|
125
|
-
region?: string;
|
|
126
|
-
}) => {
|
|
127
|
-
send(cmd: unknown): Promise<unknown>;
|
|
128
|
-
};
|
|
129
|
-
readonly StartCodeInterpreterSessionCommand?: new (input: unknown) => unknown;
|
|
130
|
-
readonly InvokeCodeInterpreterCommand?: new (input: unknown) => unknown;
|
|
131
|
-
readonly StopCodeInterpreterSessionCommand?: new (input: unknown) => unknown;
|
|
132
|
-
}
|
|
133
130
|
export declare function agentCoreCodeRunner(options: AgentCoreCodeRunnerOptions): CodeRunner;
|