@anthropic-ai/sdk 0.103.0 → 0.104.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/CHANGELOG.md +16 -0
- package/package.json +23 -1
- package/resources/beta/beta.d.mts +10 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +10 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +8 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +8 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +306 -0
- package/resources/beta/deployment-runs.d.mts.map +1 -0
- package/resources/beta/deployment-runs.d.ts +306 -0
- package/resources/beta/deployment-runs.d.ts.map +1 -0
- package/resources/beta/deployment-runs.js +55 -0
- package/resources/beta/deployment-runs.js.map +1 -0
- package/resources/beta/deployment-runs.mjs +51 -0
- package/resources/beta/deployment-runs.mjs.map +1 -0
- package/resources/beta/deployments.d.mts +671 -0
- package/resources/beta/deployments.d.mts.map +1 -0
- package/resources/beta/deployments.d.ts +671 -0
- package/resources/beta/deployments.d.ts.map +1 -0
- package/resources/beta/deployments.js +184 -0
- package/resources/beta/deployments.js.map +1 -0
- package/resources/beta/deployments.mjs +180 -0
- package/resources/beta/deployments.mjs.map +1 -0
- package/resources/beta/index.d.mts +3 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +3 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +5 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +2 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +1 -1
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +1 -1
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/sessions/events.d.mts +44 -6
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +44 -6
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/index.d.mts +2 -2
- package/resources/beta/sessions/index.d.mts.map +1 -1
- package/resources/beta/sessions/index.d.ts +2 -2
- package/resources/beta/sessions/index.d.ts.map +1 -1
- package/resources/beta/sessions/index.js.map +1 -1
- package/resources/beta/sessions/index.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +41 -3
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +41 -3
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.d.mts +1 -1
- package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
- package/resources/beta/sessions/threads/threads.d.ts +1 -1
- package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +97 -4
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +97 -4
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/index.d.mts +1 -1
- package/resources/beta/vaults/index.d.mts.map +1 -1
- package/resources/beta/vaults/index.d.ts +1 -1
- package/resources/beta/vaults/index.d.ts.map +1 -1
- package/resources/beta/vaults/index.js.map +1 -1
- package/resources/beta/vaults/index.mjs.map +1 -1
- package/resources/beta/vaults/vaults.d.mts +2 -2
- package/resources/beta/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/vaults/vaults.d.ts +2 -2
- package/resources/beta/vaults/vaults.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/beta/webhooks.d.mts +12 -0
- package/resources/beta/webhooks.d.mts.map +1 -1
- package/resources/beta/webhooks.d.ts +12 -0
- package/resources/beta/webhooks.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +1 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +156 -0
- package/src/resources/beta/deployment-runs.ts +441 -0
- package/src/resources/beta/deployments.ts +965 -0
- package/src/resources/beta/index.ts +74 -0
- package/src/resources/beta/messages/messages.ts +1 -1
- package/src/resources/beta/sessions/events.ts +59 -4
- package/src/resources/beta/sessions/index.ts +4 -0
- package/src/resources/beta/sessions/sessions.ts +52 -0
- package/src/resources/beta/sessions/threads/threads.ts +2 -1
- package/src/resources/beta/vaults/credentials.ts +134 -3
- package/src/resources/beta/vaults/index.ts +8 -0
- package/src/resources/beta/vaults/vaults.ts +16 -0
- package/src/resources/beta/webhooks.ts +15 -0
- package/src/resources/messages/messages.ts +1 -1
- package/src/tools/agent-toolset/node.browser.ts +90 -0
- package/src/tools/memory/node.browser.ts +64 -0
- package/src/version.ts +1 -1
- package/tools/agent-toolset/node.browser.d.mts +42 -0
- package/tools/agent-toolset/node.browser.d.mts.map +1 -0
- package/tools/agent-toolset/node.browser.d.ts +42 -0
- package/tools/agent-toolset/node.browser.d.ts.map +1 -0
- package/tools/agent-toolset/node.browser.js +81 -0
- package/tools/agent-toolset/node.browser.js.map +1 -0
- package/tools/agent-toolset/node.browser.mjs +66 -0
- package/tools/agent-toolset/node.browser.mjs.map +1 -0
- package/tools/memory/node.browser.d.mts +27 -0
- package/tools/memory/node.browser.d.mts.map +1 -0
- package/tools/memory/node.browser.d.ts +27 -0
- package/tools/memory/node.browser.d.ts.map +1 -0
- package/tools/memory/node.browser.js +49 -0
- package/tools/memory/node.browser.js.map +1 -0
- package/tools/memory/node.browser.mjs +44 -0
- package/tools/memory/node.browser.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/agent-toolset/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module implements the `agent_toolset_20260401` tools on top of Node
|
|
5
|
+
* built-ins (`node:child_process`, `node:fs`, …), which browser bundlers cannot
|
|
6
|
+
* resolve. The `browser` field in `package.json` substitutes this stub in
|
|
7
|
+
* browser builds so the SDK bundles cleanly for web targets; Node runtimes and
|
|
8
|
+
* node-target bundles ignore the mapping and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* Every value export here throws an {@link AnthropicError} when used — the
|
|
11
|
+
* agent toolset only works in Node.js or a Node-compatible runtime. Type
|
|
12
|
+
* exports are re-exported from the real module (erased at build time), so
|
|
13
|
+
* type-level usage is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { AnthropicError } from '../../core/error';
|
|
17
|
+
import type { Anthropic } from '../../client';
|
|
18
|
+
import type { BetaRunnableTool } from '../../lib/tools/BetaRunnableTool';
|
|
19
|
+
import type { AgentToolContext } from './node';
|
|
20
|
+
|
|
21
|
+
export type { AgentToolContext } from './node';
|
|
22
|
+
|
|
23
|
+
function nodeOnly(name: string): never {
|
|
24
|
+
throw new AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function setupSkills(_ctx: AgentToolContext): Promise<() => Promise<void>> {
|
|
28
|
+
return nodeOnly('setupSkills');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function resolveSkillVersion(_client: Anthropic, _skillId: string, _version: string): Promise<string> {
|
|
32
|
+
return nodeOnly('resolveSkillVersion');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function extractSkillArchive(_resp: Response, _dest: string): Promise<void> {
|
|
36
|
+
return nodeOnly('extractSkillArchive');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function betaAgentToolset20260401(_ctx: AgentToolContext): BetaRunnableTool[] {
|
|
40
|
+
return nodeOnly('betaAgentToolset20260401');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function resolvePath(_ctx: AgentToolContext, _p: string): Promise<string> {
|
|
44
|
+
return nodeOnly('resolvePath');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export class BashSession {
|
|
48
|
+
constructor(_dir: string, _env?: NodeJS.ProcessEnv) {
|
|
49
|
+
nodeOnly('BashSession');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get closed(): boolean {
|
|
53
|
+
return nodeOnly('BashSession');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exec(
|
|
57
|
+
_command: string,
|
|
58
|
+
_opts: { timeoutMs?: number; signal?: AbortSignal | null | undefined } = {},
|
|
59
|
+
): Promise<{ output: string; exitCode: number }> {
|
|
60
|
+
return nodeOnly('BashSession');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
close(): void {
|
|
64
|
+
nodeOnly('BashSession');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function betaBashTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
69
|
+
return nodeOnly('betaBashTool');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function betaReadTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
73
|
+
return nodeOnly('betaReadTool');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function betaWriteTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
77
|
+
return nodeOnly('betaWriteTool');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function betaEditTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
81
|
+
return nodeOnly('betaEditTool');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function betaGlobTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
85
|
+
return nodeOnly('betaGlobTool');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function betaGrepTool(_ctx: AgentToolContext): BetaRunnableTool {
|
|
89
|
+
return nodeOnly('betaGrepTool');
|
|
90
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/memory/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
|
|
5
|
+
* of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
|
|
6
|
+
* cannot resolve. The `browser` field in `package.json` substitutes this stub
|
|
7
|
+
* in browser builds; Node runtimes and node-target bundles ignore the mapping
|
|
8
|
+
* and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
|
|
11
|
+
* the filesystem-backed handlers throw.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export { betaMemoryTool } from '../../helpers/beta/memory';
|
|
15
|
+
export type { MemoryToolHandlers } from '../../helpers/beta/memory';
|
|
16
|
+
|
|
17
|
+
import { AnthropicError } from '../../core/error';
|
|
18
|
+
import type { MemoryToolHandlers } from '../../helpers/beta/memory';
|
|
19
|
+
import type {
|
|
20
|
+
BetaMemoryTool20250818CreateCommand,
|
|
21
|
+
BetaMemoryTool20250818DeleteCommand,
|
|
22
|
+
BetaMemoryTool20250818InsertCommand,
|
|
23
|
+
BetaMemoryTool20250818RenameCommand,
|
|
24
|
+
BetaMemoryTool20250818StrReplaceCommand,
|
|
25
|
+
BetaMemoryTool20250818ViewCommand,
|
|
26
|
+
} from '../../resources/beta';
|
|
27
|
+
|
|
28
|
+
function nodeOnly(name: string): never {
|
|
29
|
+
throw new AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class BetaLocalFilesystemMemoryTool implements MemoryToolHandlers {
|
|
33
|
+
constructor(_basePath: string = './memory') {
|
|
34
|
+
nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static init(_basePath: string = './memory'): Promise<BetaLocalFilesystemMemoryTool> {
|
|
38
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool.init');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
view(_command: BetaMemoryTool20250818ViewCommand): Promise<string> {
|
|
42
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
create(_command: BetaMemoryTool20250818CreateCommand): Promise<string> {
|
|
46
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
str_replace(_command: BetaMemoryTool20250818StrReplaceCommand): Promise<string> {
|
|
50
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
insert(_command: BetaMemoryTool20250818InsertCommand): Promise<string> {
|
|
54
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
delete(_command: BetaMemoryTool20250818DeleteCommand): Promise<string> {
|
|
58
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
rename(_command: BetaMemoryTool20250818RenameCommand): Promise<string> {
|
|
62
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
63
|
+
}
|
|
64
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.104.1'; // x-release-please-version
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/agent-toolset/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module implements the `agent_toolset_20260401` tools on top of Node
|
|
5
|
+
* built-ins (`node:child_process`, `node:fs`, …), which browser bundlers cannot
|
|
6
|
+
* resolve. The `browser` field in `package.json` substitutes this stub in
|
|
7
|
+
* browser builds so the SDK bundles cleanly for web targets; Node runtimes and
|
|
8
|
+
* node-target bundles ignore the mapping and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* Every value export here throws an {@link AnthropicError} when used — the
|
|
11
|
+
* agent toolset only works in Node.js or a Node-compatible runtime. Type
|
|
12
|
+
* exports are re-exported from the real module (erased at build time), so
|
|
13
|
+
* type-level usage is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
import type { Anthropic } from "../../client.mjs";
|
|
16
|
+
import type { BetaRunnableTool } from "../../lib/tools/BetaRunnableTool.mjs";
|
|
17
|
+
import type { AgentToolContext } from "./node.mjs";
|
|
18
|
+
export type { AgentToolContext } from "./node.mjs";
|
|
19
|
+
export declare function setupSkills(_ctx: AgentToolContext): Promise<() => Promise<void>>;
|
|
20
|
+
export declare function resolveSkillVersion(_client: Anthropic, _skillId: string, _version: string): Promise<string>;
|
|
21
|
+
export declare function extractSkillArchive(_resp: Response, _dest: string): Promise<void>;
|
|
22
|
+
export declare function betaAgentToolset20260401(_ctx: AgentToolContext): BetaRunnableTool[];
|
|
23
|
+
export declare function resolvePath(_ctx: AgentToolContext, _p: string): Promise<string>;
|
|
24
|
+
export declare class BashSession {
|
|
25
|
+
constructor(_dir: string, _env?: NodeJS.ProcessEnv);
|
|
26
|
+
get closed(): boolean;
|
|
27
|
+
exec(_command: string, _opts?: {
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
signal?: AbortSignal | null | undefined;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
output: string;
|
|
32
|
+
exitCode: number;
|
|
33
|
+
}>;
|
|
34
|
+
close(): void;
|
|
35
|
+
}
|
|
36
|
+
export declare function betaBashTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
37
|
+
export declare function betaReadTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
38
|
+
export declare function betaWriteTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
39
|
+
export declare function betaEditTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
40
|
+
export declare function betaGlobTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
41
|
+
export declare function betaGrepTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
42
|
+
//# sourceMappingURL=node.browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.d.mts","sourceRoot":"","sources":["../../src/tools/agent-toolset/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,6CAAyC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAe;AAE/C,YAAY,EAAE,gBAAgB,EAAE,mBAAe;AAM/C,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE3G;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAEnF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/E;AAED,qBAAa,WAAW;gBACV,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU;IAIlD,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAA;KAAO,GAC1E,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAIhD,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/agent-toolset/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module implements the `agent_toolset_20260401` tools on top of Node
|
|
5
|
+
* built-ins (`node:child_process`, `node:fs`, …), which browser bundlers cannot
|
|
6
|
+
* resolve. The `browser` field in `package.json` substitutes this stub in
|
|
7
|
+
* browser builds so the SDK bundles cleanly for web targets; Node runtimes and
|
|
8
|
+
* node-target bundles ignore the mapping and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* Every value export here throws an {@link AnthropicError} when used — the
|
|
11
|
+
* agent toolset only works in Node.js or a Node-compatible runtime. Type
|
|
12
|
+
* exports are re-exported from the real module (erased at build time), so
|
|
13
|
+
* type-level usage is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
import type { Anthropic } from "../../client.js";
|
|
16
|
+
import type { BetaRunnableTool } from "../../lib/tools/BetaRunnableTool.js";
|
|
17
|
+
import type { AgentToolContext } from "./node.js";
|
|
18
|
+
export type { AgentToolContext } from "./node.js";
|
|
19
|
+
export declare function setupSkills(_ctx: AgentToolContext): Promise<() => Promise<void>>;
|
|
20
|
+
export declare function resolveSkillVersion(_client: Anthropic, _skillId: string, _version: string): Promise<string>;
|
|
21
|
+
export declare function extractSkillArchive(_resp: Response, _dest: string): Promise<void>;
|
|
22
|
+
export declare function betaAgentToolset20260401(_ctx: AgentToolContext): BetaRunnableTool[];
|
|
23
|
+
export declare function resolvePath(_ctx: AgentToolContext, _p: string): Promise<string>;
|
|
24
|
+
export declare class BashSession {
|
|
25
|
+
constructor(_dir: string, _env?: NodeJS.ProcessEnv);
|
|
26
|
+
get closed(): boolean;
|
|
27
|
+
exec(_command: string, _opts?: {
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
signal?: AbortSignal | null | undefined;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
output: string;
|
|
32
|
+
exitCode: number;
|
|
33
|
+
}>;
|
|
34
|
+
close(): void;
|
|
35
|
+
}
|
|
36
|
+
export declare function betaBashTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
37
|
+
export declare function betaReadTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
38
|
+
export declare function betaWriteTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
39
|
+
export declare function betaEditTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
40
|
+
export declare function betaGlobTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
41
|
+
export declare function betaGrepTool(_ctx: AgentToolContext): BetaRunnableTool;
|
|
42
|
+
//# sourceMappingURL=node.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.d.ts","sourceRoot":"","sources":["../../src/tools/agent-toolset/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAqB;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,4CAAyC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAe;AAE/C,YAAY,EAAE,gBAAgB,EAAE,kBAAe;AAM/C,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE3G;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAEnF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE/E;AAED,qBAAa,WAAW;gBACV,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU;IAIlD,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAA;KAAO,GAC1E,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAIhD,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAErE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Browser stub for `tools/agent-toolset/node`.
|
|
4
|
+
*
|
|
5
|
+
* The real module implements the `agent_toolset_20260401` tools on top of Node
|
|
6
|
+
* built-ins (`node:child_process`, `node:fs`, …), which browser bundlers cannot
|
|
7
|
+
* resolve. The `browser` field in `package.json` substitutes this stub in
|
|
8
|
+
* browser builds so the SDK bundles cleanly for web targets; Node runtimes and
|
|
9
|
+
* node-target bundles ignore the mapping and load the real implementation.
|
|
10
|
+
*
|
|
11
|
+
* Every value export here throws an {@link AnthropicError} when used — the
|
|
12
|
+
* agent toolset only works in Node.js or a Node-compatible runtime. Type
|
|
13
|
+
* exports are re-exported from the real module (erased at build time), so
|
|
14
|
+
* type-level usage is unaffected.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.BashSession = void 0;
|
|
18
|
+
exports.setupSkills = setupSkills;
|
|
19
|
+
exports.resolveSkillVersion = resolveSkillVersion;
|
|
20
|
+
exports.extractSkillArchive = extractSkillArchive;
|
|
21
|
+
exports.betaAgentToolset20260401 = betaAgentToolset20260401;
|
|
22
|
+
exports.resolvePath = resolvePath;
|
|
23
|
+
exports.betaBashTool = betaBashTool;
|
|
24
|
+
exports.betaReadTool = betaReadTool;
|
|
25
|
+
exports.betaWriteTool = betaWriteTool;
|
|
26
|
+
exports.betaEditTool = betaEditTool;
|
|
27
|
+
exports.betaGlobTool = betaGlobTool;
|
|
28
|
+
exports.betaGrepTool = betaGrepTool;
|
|
29
|
+
const error_1 = require("../../core/error.js");
|
|
30
|
+
function nodeOnly(name) {
|
|
31
|
+
throw new error_1.AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
32
|
+
}
|
|
33
|
+
function setupSkills(_ctx) {
|
|
34
|
+
return nodeOnly('setupSkills');
|
|
35
|
+
}
|
|
36
|
+
function resolveSkillVersion(_client, _skillId, _version) {
|
|
37
|
+
return nodeOnly('resolveSkillVersion');
|
|
38
|
+
}
|
|
39
|
+
function extractSkillArchive(_resp, _dest) {
|
|
40
|
+
return nodeOnly('extractSkillArchive');
|
|
41
|
+
}
|
|
42
|
+
function betaAgentToolset20260401(_ctx) {
|
|
43
|
+
return nodeOnly('betaAgentToolset20260401');
|
|
44
|
+
}
|
|
45
|
+
function resolvePath(_ctx, _p) {
|
|
46
|
+
return nodeOnly('resolvePath');
|
|
47
|
+
}
|
|
48
|
+
class BashSession {
|
|
49
|
+
constructor(_dir, _env) {
|
|
50
|
+
nodeOnly('BashSession');
|
|
51
|
+
}
|
|
52
|
+
get closed() {
|
|
53
|
+
return nodeOnly('BashSession');
|
|
54
|
+
}
|
|
55
|
+
exec(_command, _opts = {}) {
|
|
56
|
+
return nodeOnly('BashSession');
|
|
57
|
+
}
|
|
58
|
+
close() {
|
|
59
|
+
nodeOnly('BashSession');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.BashSession = BashSession;
|
|
63
|
+
function betaBashTool(_ctx) {
|
|
64
|
+
return nodeOnly('betaBashTool');
|
|
65
|
+
}
|
|
66
|
+
function betaReadTool(_ctx) {
|
|
67
|
+
return nodeOnly('betaReadTool');
|
|
68
|
+
}
|
|
69
|
+
function betaWriteTool(_ctx) {
|
|
70
|
+
return nodeOnly('betaWriteTool');
|
|
71
|
+
}
|
|
72
|
+
function betaEditTool(_ctx) {
|
|
73
|
+
return nodeOnly('betaEditTool');
|
|
74
|
+
}
|
|
75
|
+
function betaGlobTool(_ctx) {
|
|
76
|
+
return nodeOnly('betaGlobTool');
|
|
77
|
+
}
|
|
78
|
+
function betaGrepTool(_ctx) {
|
|
79
|
+
return nodeOnly('betaGrepTool');
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=node.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.js","sourceRoot":"","sources":["../../src/tools/agent-toolset/node.browser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAaH,kCAEC;AAED,kDAEC;AAED,kDAEC;AAED,4DAEC;AAED,kCAEC;AAuBD,oCAEC;AAED,oCAEC;AAED,sCAEC;AAED,oCAEC;AAED,oCAEC;AAED,oCAEC;AA1ED,+CAAkD;AAOlD,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,sBAAc,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;AACpF,CAAC;AAED,SAAgB,WAAW,CAAC,IAAsB;IAChD,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAkB,EAAE,QAAgB,EAAE,QAAgB;IACxF,OAAO,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED,SAAgB,mBAAmB,CAAC,KAAe,EAAE,KAAa;IAChE,OAAO,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED,SAAgB,wBAAwB,CAAC,IAAsB;IAC7D,OAAO,QAAQ,CAAC,0BAA0B,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,WAAW,CAAC,IAAsB,EAAE,EAAU;IAC5D,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAED,MAAa,WAAW;IACtB,YAAY,IAAY,EAAE,IAAwB;QAChD,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,CACF,QAAgB,EAChB,QAAyE,EAAE;QAE3E,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,KAAK;QACH,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1B,CAAC;CACF;AAnBD,kCAmBC;AAED,SAAgB,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,aAAa,CAAC,IAAsB;IAClD,OAAO,QAAQ,CAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/agent-toolset/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module implements the `agent_toolset_20260401` tools on top of Node
|
|
5
|
+
* built-ins (`node:child_process`, `node:fs`, …), which browser bundlers cannot
|
|
6
|
+
* resolve. The `browser` field in `package.json` substitutes this stub in
|
|
7
|
+
* browser builds so the SDK bundles cleanly for web targets; Node runtimes and
|
|
8
|
+
* node-target bundles ignore the mapping and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* Every value export here throws an {@link AnthropicError} when used — the
|
|
11
|
+
* agent toolset only works in Node.js or a Node-compatible runtime. Type
|
|
12
|
+
* exports are re-exported from the real module (erased at build time), so
|
|
13
|
+
* type-level usage is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
import { AnthropicError } from "../../core/error.mjs";
|
|
16
|
+
function nodeOnly(name) {
|
|
17
|
+
throw new AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
18
|
+
}
|
|
19
|
+
export function setupSkills(_ctx) {
|
|
20
|
+
return nodeOnly('setupSkills');
|
|
21
|
+
}
|
|
22
|
+
export function resolveSkillVersion(_client, _skillId, _version) {
|
|
23
|
+
return nodeOnly('resolveSkillVersion');
|
|
24
|
+
}
|
|
25
|
+
export function extractSkillArchive(_resp, _dest) {
|
|
26
|
+
return nodeOnly('extractSkillArchive');
|
|
27
|
+
}
|
|
28
|
+
export function betaAgentToolset20260401(_ctx) {
|
|
29
|
+
return nodeOnly('betaAgentToolset20260401');
|
|
30
|
+
}
|
|
31
|
+
export function resolvePath(_ctx, _p) {
|
|
32
|
+
return nodeOnly('resolvePath');
|
|
33
|
+
}
|
|
34
|
+
export class BashSession {
|
|
35
|
+
constructor(_dir, _env) {
|
|
36
|
+
nodeOnly('BashSession');
|
|
37
|
+
}
|
|
38
|
+
get closed() {
|
|
39
|
+
return nodeOnly('BashSession');
|
|
40
|
+
}
|
|
41
|
+
exec(_command, _opts = {}) {
|
|
42
|
+
return nodeOnly('BashSession');
|
|
43
|
+
}
|
|
44
|
+
close() {
|
|
45
|
+
nodeOnly('BashSession');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function betaBashTool(_ctx) {
|
|
49
|
+
return nodeOnly('betaBashTool');
|
|
50
|
+
}
|
|
51
|
+
export function betaReadTool(_ctx) {
|
|
52
|
+
return nodeOnly('betaReadTool');
|
|
53
|
+
}
|
|
54
|
+
export function betaWriteTool(_ctx) {
|
|
55
|
+
return nodeOnly('betaWriteTool');
|
|
56
|
+
}
|
|
57
|
+
export function betaEditTool(_ctx) {
|
|
58
|
+
return nodeOnly('betaEditTool');
|
|
59
|
+
}
|
|
60
|
+
export function betaGlobTool(_ctx) {
|
|
61
|
+
return nodeOnly('betaGlobTool');
|
|
62
|
+
}
|
|
63
|
+
export function betaGrepTool(_ctx) {
|
|
64
|
+
return nodeOnly('betaGrepTool');
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=node.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.mjs","sourceRoot":"","sources":["../../src/tools/agent-toolset/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAOlD,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAsB;IAChD,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAkB,EAAE,QAAgB,EAAE,QAAgB;IACxF,OAAO,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAe,EAAE,KAAa;IAChE,OAAO,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAsB;IAC7D,OAAO,QAAQ,CAAC,0BAA0B,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAsB,EAAE,EAAU;IAC5D,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,OAAO,WAAW;IACtB,YAAY,IAAY,EAAE,IAAwB;QAChD,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,CACF,QAAgB,EAChB,QAAyE,EAAE;QAE3E,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,KAAK;QACH,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,UAAU,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAsB;IAClD,OAAO,QAAQ,CAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAsB;IACjD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/memory/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
|
|
5
|
+
* of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
|
|
6
|
+
* cannot resolve. The `browser` field in `package.json` substitutes this stub
|
|
7
|
+
* in browser builds; Node runtimes and node-target bundles ignore the mapping
|
|
8
|
+
* and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
|
|
11
|
+
* the filesystem-backed handlers throw.
|
|
12
|
+
*/
|
|
13
|
+
export { betaMemoryTool } from "../../helpers/beta/memory.mjs";
|
|
14
|
+
export type { MemoryToolHandlers } from "../../helpers/beta/memory.mjs";
|
|
15
|
+
import type { MemoryToolHandlers } from "../../helpers/beta/memory.mjs";
|
|
16
|
+
import type { BetaMemoryTool20250818CreateCommand, BetaMemoryTool20250818DeleteCommand, BetaMemoryTool20250818InsertCommand, BetaMemoryTool20250818RenameCommand, BetaMemoryTool20250818StrReplaceCommand, BetaMemoryTool20250818ViewCommand } from "../../resources/beta.mjs";
|
|
17
|
+
export declare class BetaLocalFilesystemMemoryTool implements MemoryToolHandlers {
|
|
18
|
+
constructor(_basePath?: string);
|
|
19
|
+
static init(_basePath?: string): Promise<BetaLocalFilesystemMemoryTool>;
|
|
20
|
+
view(_command: BetaMemoryTool20250818ViewCommand): Promise<string>;
|
|
21
|
+
create(_command: BetaMemoryTool20250818CreateCommand): Promise<string>;
|
|
22
|
+
str_replace(_command: BetaMemoryTool20250818StrReplaceCommand): Promise<string>;
|
|
23
|
+
insert(_command: BetaMemoryTool20250818InsertCommand): Promise<string>;
|
|
24
|
+
delete(_command: BetaMemoryTool20250818DeleteCommand): Promise<string>;
|
|
25
|
+
rename(_command: BetaMemoryTool20250818RenameCommand): Promise<string>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=node.browser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.d.mts","sourceRoot":"","sources":["../../src/tools/memory/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,sCAAkC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,sCAAkC;AAGpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,sCAAkC;AACpE,OAAO,KAAK,EACV,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,uCAAuC,EACvC,iCAAiC,EAClC,iCAA6B;AAM9B,qBAAa,6BAA8B,YAAW,kBAAkB;gBAC1D,SAAS,GAAE,MAAmB;IAI1C,MAAM,CAAC,IAAI,CAAC,SAAS,GAAE,MAAmB,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAInF,IAAI,CAAC,QAAQ,EAAE,iCAAiC,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,WAAW,CAAC,QAAQ,EAAE,uCAAuC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/E,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;CAGvE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/memory/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
|
|
5
|
+
* of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
|
|
6
|
+
* cannot resolve. The `browser` field in `package.json` substitutes this stub
|
|
7
|
+
* in browser builds; Node runtimes and node-target bundles ignore the mapping
|
|
8
|
+
* and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
|
|
11
|
+
* the filesystem-backed handlers throw.
|
|
12
|
+
*/
|
|
13
|
+
export { betaMemoryTool } from "../../helpers/beta/memory.js";
|
|
14
|
+
export type { MemoryToolHandlers } from "../../helpers/beta/memory.js";
|
|
15
|
+
import type { MemoryToolHandlers } from "../../helpers/beta/memory.js";
|
|
16
|
+
import type { BetaMemoryTool20250818CreateCommand, BetaMemoryTool20250818DeleteCommand, BetaMemoryTool20250818InsertCommand, BetaMemoryTool20250818RenameCommand, BetaMemoryTool20250818StrReplaceCommand, BetaMemoryTool20250818ViewCommand } from "../../resources/beta.js";
|
|
17
|
+
export declare class BetaLocalFilesystemMemoryTool implements MemoryToolHandlers {
|
|
18
|
+
constructor(_basePath?: string);
|
|
19
|
+
static init(_basePath?: string): Promise<BetaLocalFilesystemMemoryTool>;
|
|
20
|
+
view(_command: BetaMemoryTool20250818ViewCommand): Promise<string>;
|
|
21
|
+
create(_command: BetaMemoryTool20250818CreateCommand): Promise<string>;
|
|
22
|
+
str_replace(_command: BetaMemoryTool20250818StrReplaceCommand): Promise<string>;
|
|
23
|
+
insert(_command: BetaMemoryTool20250818InsertCommand): Promise<string>;
|
|
24
|
+
delete(_command: BetaMemoryTool20250818DeleteCommand): Promise<string>;
|
|
25
|
+
rename(_command: BetaMemoryTool20250818RenameCommand): Promise<string>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=node.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.d.ts","sourceRoot":"","sources":["../../src/tools/memory/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,qCAAkC;AAGpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,qCAAkC;AACpE,OAAO,KAAK,EACV,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,uCAAuC,EACvC,iCAAiC,EAClC,gCAA6B;AAM9B,qBAAa,6BAA8B,YAAW,kBAAkB;gBAC1D,SAAS,GAAE,MAAmB;IAI1C,MAAM,CAAC,IAAI,CAAC,SAAS,GAAE,MAAmB,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAInF,IAAI,CAAC,QAAQ,EAAE,iCAAiC,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,WAAW,CAAC,QAAQ,EAAE,uCAAuC,GAAG,OAAO,CAAC,MAAM,CAAC;IAI/E,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;IAItE,MAAM,CAAC,QAAQ,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;CAGvE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Browser stub for `tools/memory/node`.
|
|
4
|
+
*
|
|
5
|
+
* The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
|
|
6
|
+
* of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
|
|
7
|
+
* cannot resolve. The `browser` field in `package.json` substitutes this stub
|
|
8
|
+
* in browser builds; Node runtimes and node-target bundles ignore the mapping
|
|
9
|
+
* and load the real implementation.
|
|
10
|
+
*
|
|
11
|
+
* `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
|
|
12
|
+
* the filesystem-backed handlers throw.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BetaLocalFilesystemMemoryTool = exports.betaMemoryTool = void 0;
|
|
16
|
+
var memory_1 = require("../../helpers/beta/memory.js");
|
|
17
|
+
Object.defineProperty(exports, "betaMemoryTool", { enumerable: true, get: function () { return memory_1.betaMemoryTool; } });
|
|
18
|
+
const error_1 = require("../../core/error.js");
|
|
19
|
+
function nodeOnly(name) {
|
|
20
|
+
throw new error_1.AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
21
|
+
}
|
|
22
|
+
class BetaLocalFilesystemMemoryTool {
|
|
23
|
+
constructor(_basePath = './memory') {
|
|
24
|
+
nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
25
|
+
}
|
|
26
|
+
static init(_basePath = './memory') {
|
|
27
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool.init');
|
|
28
|
+
}
|
|
29
|
+
view(_command) {
|
|
30
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
31
|
+
}
|
|
32
|
+
create(_command) {
|
|
33
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
34
|
+
}
|
|
35
|
+
str_replace(_command) {
|
|
36
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
37
|
+
}
|
|
38
|
+
insert(_command) {
|
|
39
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
40
|
+
}
|
|
41
|
+
delete(_command) {
|
|
42
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
43
|
+
}
|
|
44
|
+
rename(_command) {
|
|
45
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.BetaLocalFilesystemMemoryTool = BetaLocalFilesystemMemoryTool;
|
|
49
|
+
//# sourceMappingURL=node.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.js","sourceRoot":"","sources":["../../src/tools/memory/node.browser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,uDAA2D;AAAlD,wGAAA,cAAc,OAAA;AAGvB,+CAAkD;AAWlD,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,sBAAc,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;AACpF,CAAC;AAED,MAAa,6BAA6B;IACxC,YAAY,YAAoB,UAAU;QACxC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,YAAoB,UAAU;QACxC,OAAO,QAAQ,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,QAA2C;QAC9C,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,QAAiD;QAC3D,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;CACF;AAhCD,sEAgCC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for `tools/memory/node`.
|
|
3
|
+
*
|
|
4
|
+
* The real module's {@link BetaLocalFilesystemMemoryTool} is implemented on top
|
|
5
|
+
* of Node built-ins (`fs/promises`, `path`, `crypto`), which browser bundlers
|
|
6
|
+
* cannot resolve. The `browser` field in `package.json` substitutes this stub
|
|
7
|
+
* in browser builds; Node runtimes and node-target bundles ignore the mapping
|
|
8
|
+
* and load the real implementation.
|
|
9
|
+
*
|
|
10
|
+
* `betaMemoryTool` is runtime-agnostic and is re-exported for real here; only
|
|
11
|
+
* the filesystem-backed handlers throw.
|
|
12
|
+
*/
|
|
13
|
+
export { betaMemoryTool } from "../../helpers/beta/memory.mjs";
|
|
14
|
+
import { AnthropicError } from "../../core/error.mjs";
|
|
15
|
+
function nodeOnly(name) {
|
|
16
|
+
throw new AnthropicError(`${name} requires Node.js or a Node-compatible runtime`);
|
|
17
|
+
}
|
|
18
|
+
export class BetaLocalFilesystemMemoryTool {
|
|
19
|
+
constructor(_basePath = './memory') {
|
|
20
|
+
nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
21
|
+
}
|
|
22
|
+
static init(_basePath = './memory') {
|
|
23
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool.init');
|
|
24
|
+
}
|
|
25
|
+
view(_command) {
|
|
26
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
27
|
+
}
|
|
28
|
+
create(_command) {
|
|
29
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
30
|
+
}
|
|
31
|
+
str_replace(_command) {
|
|
32
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
33
|
+
}
|
|
34
|
+
insert(_command) {
|
|
35
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
36
|
+
}
|
|
37
|
+
delete(_command) {
|
|
38
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
39
|
+
}
|
|
40
|
+
rename(_command) {
|
|
41
|
+
return nodeOnly('BetaLocalFilesystemMemoryTool');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=node.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.mjs","sourceRoot":"","sources":["../../src/tools/memory/node.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,sCAAkC;AAG3D,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAWlD,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,gDAAgD,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,OAAO,6BAA6B;IACxC,YAAY,YAAoB,UAAU;QACxC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,YAAoB,UAAU;QACxC,OAAO,QAAQ,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,QAA2C;QAC9C,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,QAAiD;QAC3D,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,QAA6C;QAClD,OAAO,QAAQ,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;CACF"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.104.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.104.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.104.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|