first commit
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s

This commit is contained in:
John
2026-09-23 17:31:02 +05:30
commit 69b4e68baf
51657 changed files with 3864077 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
export * from "./beta/index.mjs";
//# sourceMappingURL=beta.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""}
+2
View File
@@ -0,0 +1,2 @@
export * from "./beta/index.js";
//# sourceMappingURL=beta.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":""}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("../internal/tslib.js");
tslib_1.__exportStar(require("./beta/index.js"), exports);
//# sourceMappingURL=beta.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAA6B"}
+3
View File
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export * from "./beta/index.mjs";
//# sourceMappingURL=beta.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.mjs","sourceRoot":"","sources":["../src/resources/beta.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
+2
View File
@@ -0,0 +1,2 @@
export * from "./agents/index.mjs";
//# sourceMappingURL=agents.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../../src/resources/beta/agents.ts"],"names":[],"mappings":""}
+2
View File
@@ -0,0 +1,2 @@
export * from "./agents/index.js";
//# sourceMappingURL=agents.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/beta/agents.ts"],"names":[],"mappings":""}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("../../internal/tslib.js");
tslib_1.__exportStar(require("./agents/index.js"), exports);
//# sourceMappingURL=agents.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/beta/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
+3
View File
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export * from "./agents/index.mjs";
//# sourceMappingURL=agents.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../../src/resources/beta/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
+648
View File
@@ -0,0 +1,648 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import * as VersionsAPI from "./versions.mjs";
import { VersionListParams, Versions } from "./versions.mjs";
import * as SessionsAPI from "../sessions/sessions.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Agents extends APIResource {
versions: VersionsAPI.Versions;
/**
* Create Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.create({
* model: 'claude-sonnet-4-6',
* name: 'My First Agent',
* });
* ```
*/
create(params: AgentCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* Get Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.retrieve(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
retrieve(agentID: string, params?: AgentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* Update Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.update(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* { version: 1 },
* );
* ```
*/
update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* List Agents
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.list()) {
* // ...
* }
* ```
*/
list(params?: AgentListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsAgentsPageCursor, BetaManagedAgentsAgent>;
/**
* Archive Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.archive(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
archive(agentID: string, params?: AgentArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
}
export type BetaManagedAgentsAgentsPageCursor = PageCursor<BetaManagedAgentsAgent>;
/**
* A Managed Agents `agent`.
*/
export interface BetaManagedAgentsAgent {
id: string;
/**
* A timestamp in RFC 3339 format
*/
archived_at: string | null;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
description: string | null;
mcp_servers: Array<BetaManagedAgentsMCPServerURLDefinition>;
metadata: {
[key: string]: string;
};
/**
* Model identifier and configuration.
*/
model: BetaManagedAgentsModelConfig;
/**
* Resolved coordinator topology with a concrete agent roster.
*/
multiagent: SessionsAPI.BetaManagedAgentsMultiagent | null;
name: string;
skills: Array<BetaManagedAgentsAnthropicSkill | BetaManagedAgentsCustomSkill>;
system: string | null;
tools: Array<BetaManagedAgentsAgentToolset20260401 | BetaManagedAgentsMCPToolset | BetaManagedAgentsCustomTool>;
type: 'agent';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* The agent's current version. Starts at 1 and increments when the agent is
* modified.
*/
version: number;
}
/**
* A resolved agent reference with a concrete version.
*/
export interface BetaManagedAgentsAgentReference {
id: string;
type: 'agent';
version: number;
}
/**
* Configuration for a specific agent tool.
*/
export interface BetaManagedAgentsAgentToolConfig {
enabled: boolean;
/**
* Built-in agent tool identifier.
*/
name: 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search';
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Configuration override for a specific tool within a toolset.
*/
export interface BetaManagedAgentsAgentToolConfigParams {
/**
* Built-in agent tool identifier.
*/
name: 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search';
/**
* Whether this tool is enabled and available to Claude. Overrides the
* default_config setting.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
/**
* Resolved default configuration for agent tools.
*/
export interface BetaManagedAgentsAgentToolsetDefaultConfig {
enabled: boolean;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Default configuration for all tools in a toolset.
*/
export interface BetaManagedAgentsAgentToolsetDefaultConfigParams {
/**
* Whether tools are enabled and available to Claude by default. Defaults to true
* if not specified.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
export interface BetaManagedAgentsAgentToolset20260401 {
configs: Array<BetaManagedAgentsAgentToolConfig>;
/**
* Resolved default configuration for agent tools.
*/
default_config: BetaManagedAgentsAgentToolsetDefaultConfig;
type: 'agent_toolset_20260401';
}
/**
* Configuration for built-in agent tools. Use this to enable or disable groups of
* tools available to the agent.
*/
export interface BetaManagedAgentsAgentToolset20260401Params {
type: 'agent_toolset_20260401';
/**
* Per-tool configuration overrides.
*/
configs?: Array<BetaManagedAgentsAgentToolConfigParams>;
/**
* Default configuration for all tools in a toolset.
*/
default_config?: BetaManagedAgentsAgentToolsetDefaultConfigParams | null;
}
/**
* Tool calls are automatically approved without user confirmation.
*/
export interface BetaManagedAgentsAlwaysAllowPolicy {
type: 'always_allow';
}
/**
* Tool calls require user confirmation before execution.
*/
export interface BetaManagedAgentsAlwaysAskPolicy {
type: 'always_ask';
}
/**
* A resolved Anthropic-managed skill.
*/
export interface BetaManagedAgentsAnthropicSkill {
skill_id: string;
type: 'anthropic';
version: string;
}
/**
* An Anthropic-managed skill.
*/
export interface BetaManagedAgentsAnthropicSkillParams {
/**
* Identifier of the Anthropic skill (e.g., "xlsx").
*/
skill_id: string;
type: 'anthropic';
/**
* Version to pin. Defaults to latest if omitted.
*/
version?: string | null;
}
/**
* A resolved user-created custom skill.
*/
export interface BetaManagedAgentsCustomSkill {
skill_id: string;
type: 'custom';
version: string;
}
/**
* A user-created custom skill.
*/
export interface BetaManagedAgentsCustomSkillParams {
/**
* Tagged ID of the custom skill (e.g., "skill_01XJ5...").
*/
skill_id: string;
type: 'custom';
/**
* Version to pin. Defaults to latest if omitted.
*/
version?: string | null;
}
/**
* A custom tool as returned in API responses.
*/
export interface BetaManagedAgentsCustomTool {
description: string;
/**
* JSON Schema for custom tool input parameters.
*/
input_schema: BetaManagedAgentsCustomToolInputSchema;
name: string;
type: 'custom';
}
/**
* JSON Schema for custom tool input parameters.
*/
export interface BetaManagedAgentsCustomToolInputSchema {
/**
* JSON Schema properties defining the tool's input parameters.
*/
properties?: {
[key: string]: unknown;
} | null;
/**
* List of required property names.
*/
required?: Array<string>;
/**
* Must be 'object' for tool input schemas.
*/
type?: 'object';
}
/**
* A custom tool that is executed by the API client rather than the agent. When the
* agent calls this tool, an `agent.custom_tool_use` event is emitted and the
* session goes idle, waiting for the client to provide the result via a
* `user.custom_tool_result` event.
*/
export interface BetaManagedAgentsCustomToolParams {
/**
* Description of what the tool does, shown to the agent to help it decide when to
* use the tool. 1-1024 characters.
*/
description: string;
/**
* JSON Schema for custom tool input parameters.
*/
input_schema: BetaManagedAgentsCustomToolInputSchema;
/**
* Unique name for the tool. 1-128 characters; letters, digits, underscores, and
* hyphens.
*/
name: string;
type: 'custom';
}
/**
* URL-based MCP server connection as returned in API responses.
*/
export interface BetaManagedAgentsMCPServerURLDefinition {
name: string;
type: 'url';
url: string;
}
/**
* Resolved configuration for a specific MCP tool.
*/
export interface BetaManagedAgentsMCPToolConfig {
enabled: boolean;
name: string;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Configuration override for a specific MCP tool.
*/
export interface BetaManagedAgentsMCPToolConfigParams {
/**
* Name of the MCP tool to configure. 1-128 characters.
*/
name: string;
/**
* Whether this tool is enabled. Overrides the `default_config` setting.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
export interface BetaManagedAgentsMCPToolset {
configs: Array<BetaManagedAgentsMCPToolConfig>;
/**
* Resolved default configuration for all tools from an MCP server.
*/
default_config: BetaManagedAgentsMCPToolsetDefaultConfig;
mcp_server_name: string;
type: 'mcp_toolset';
}
/**
* Resolved default configuration for all tools from an MCP server.
*/
export interface BetaManagedAgentsMCPToolsetDefaultConfig {
enabled: boolean;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Default configuration for all tools from an MCP server.
*/
export interface BetaManagedAgentsMCPToolsetDefaultConfigParams {
/**
* Whether tools are enabled by default. Defaults to true if not specified.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
/**
* Configuration for tools from an MCP server defined in `mcp_servers`.
*/
export interface BetaManagedAgentsMCPToolsetParams {
/**
* Name of the MCP server. Must match a server name from the mcp_servers array.
* 1-255 characters.
*/
mcp_server_name: string;
type: 'mcp_toolset';
/**
* Per-tool configuration overrides.
*/
configs?: Array<BetaManagedAgentsMCPToolConfigParams>;
/**
* Default configuration for all tools from an MCP server.
*/
default_config?: BetaManagedAgentsMCPToolsetDefaultConfigParams | null;
}
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
export type BetaManagedAgentsModel = 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | (string & {});
/**
* Model identifier and configuration.
*/
export interface BetaManagedAgentsModelConfig {
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
id: BetaManagedAgentsModel;
/**
* Inference speed mode. `fast` provides significantly faster output token
* generation at premium pricing. Not all models support `fast`; invalid
* combinations are rejected at create time.
*/
speed?: 'standard' | 'fast';
}
/**
* An object that defines additional configuration control over model use
*/
export interface BetaManagedAgentsModelConfigParams {
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
id: BetaManagedAgentsModel;
/**
* Inference speed mode. `fast` provides significantly faster output token
* generation at premium pricing. Not all models support `fast`; invalid
* combinations are rejected at create time.
*/
speed?: 'standard' | 'fast' | null;
}
/**
* Resolved coordinator topology with a concrete agent roster.
*/
export interface BetaManagedAgentsMultiagentCoordinator {
/**
* Agents the coordinator may spawn as session threads, each resolved to a specific
* version.
*/
agents: Array<BetaManagedAgentsAgentReference>;
type: 'coordinator';
}
/**
* A coordinator topology: the session's primary thread orchestrates work by
* spawning session threads, each running an agent drawn from the `agents` roster.
*/
export interface BetaManagedAgentsMultiagentCoordinatorParams {
/**
* Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is
* an agent ID string, a versioned `{"type":"agent","id","version"}` reference, or
* `{"type":"self"}` to allow recursive self-invocation. Entries must reference
* distinct agents (after resolving `self` and string forms); at most one `self`.
* Referenced agents must exist, must not be archived, and must not themselves have
* `multiagent` set (depth limit 1).
*/
agents: Array<SessionsAPI.BetaManagedAgentsMultiagentRosterEntryParams>;
type: 'coordinator';
}
/**
* Sentinel roster entry meaning "the agent that owns this configuration". Resolved
* server-side to a concrete agent reference.
*/
export interface BetaManagedAgentsMultiagentSelfParams {
type: 'self';
}
/**
* Skill to load in the session container.
*/
export type BetaManagedAgentsSkillParams = BetaManagedAgentsAnthropicSkillParams | BetaManagedAgentsCustomSkillParams;
/**
* URL-based MCP server connection.
*/
export interface BetaManagedAgentsURLMCPServerParams {
/**
* Unique name for this server, referenced by mcp_toolset configurations. 1-255
* characters.
*/
name: string;
type: 'url';
/**
* Endpoint URL for the MCP server.
*/
url: string;
}
export interface AgentCreateParams {
/**
* Body param: Model identifier. Accepts the
* [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),
* e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
* control
*/
model: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;
/**
* Body param: Human-readable name for the agent. 1-256 characters.
*/
name: string;
/**
* Body param: Description of what the agent does. Up to 2048 characters.
*/
description?: string | null;
/**
* Body param: MCP servers this agent connects to. Maximum 20. Names must be unique
* within the array.
*/
mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams>;
/**
* Body param: Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars,
* values up to 512 chars.
*/
metadata?: {
[key: string]: string;
};
/**
* Body param: A coordinator topology: the session's primary thread orchestrates
* work by spawning session threads, each running an agent drawn from the `agents`
* roster.
*/
multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;
/**
* Body param: Skills available to the agent. Maximum 20.
*/
skills?: Array<BetaManagedAgentsSkillParams>;
/**
* Body param: System prompt for the agent. Up to 100,000 characters.
*/
system?: string | null;
/**
* Body param: Tool configurations available to the agent. Maximum of 128 tools
* across all toolsets allowed.
*/
tools?: Array<BetaManagedAgentsAgentToolset20260401Params | BetaManagedAgentsMCPToolsetParams | BetaManagedAgentsCustomToolParams>;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentRetrieveParams {
/**
* Query param: Agent version. Omit for the most recent version. Must be at least 1
* if specified.
*/
version?: number;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentUpdateParams {
/**
* Body param: The agent's current version, used to prevent concurrent overwrites.
* Obtain this value from a create or retrieve response. The request fails if this
* does not match the server's current version.
*/
version: number;
/**
* Body param: Description. Up to 2048 characters. Omit to preserve; send empty
* string or null to clear.
*/
description?: string | null;
/**
* Body param: MCP servers. Full replacement. Omit to preserve; send empty array or
* null to clear. Names must be unique. Maximum 20.
*/
mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams> | null;
/**
* Body param: Metadata patch. Set a key to a string to upsert it, or to null to
* delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up
* to 64 chars each) with values up to 512 chars.
*/
metadata?: {
[key: string]: string | null;
} | null;
/**
* Body param: Model identifier. Accepts the
* [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),
* e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
* control. Omit to preserve. Cannot be cleared.
*/
model?: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;
/**
* Body param: A coordinator topology: the session's primary thread orchestrates
* work by spawning session threads, each running an agent drawn from the `agents`
* roster.
*/
multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;
/**
* Body param: Human-readable name. 1-256 characters. Omit to preserve. Cannot be
* cleared.
*/
name?: string;
/**
* Body param: Skills. Full replacement. Omit to preserve; send empty array or null
* to clear. Maximum 20.
*/
skills?: Array<BetaManagedAgentsSkillParams> | null;
/**
* Body param: System prompt. Up to 100,000 characters. Omit to preserve; send
* empty string or null to clear.
*/
system?: string | null;
/**
* Body param: Tool configurations available to the agent. Full replacement. Omit
* to preserve; send empty array or null to clear. Maximum of 128 tools across all
* toolsets allowed.
*/
tools?: Array<BetaManagedAgentsAgentToolset20260401Params | BetaManagedAgentsMCPToolsetParams | BetaManagedAgentsCustomToolParams> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentListParams extends PageCursorParams {
/**
* Query param: Return agents created at or after this time (inclusive).
*/
'created_at[gte]'?: string;
/**
* Query param: Return agents created at or before this time (inclusive).
*/
'created_at[lte]'?: string;
/**
* Query param: Include archived agents in results. Defaults to false.
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Agents {
export { type BetaManagedAgentsAgent as BetaManagedAgentsAgent, type BetaManagedAgentsAgentReference as BetaManagedAgentsAgentReference, type BetaManagedAgentsAgentToolConfig as BetaManagedAgentsAgentToolConfig, type BetaManagedAgentsAgentToolConfigParams as BetaManagedAgentsAgentToolConfigParams, type BetaManagedAgentsAgentToolsetDefaultConfig as BetaManagedAgentsAgentToolsetDefaultConfig, type BetaManagedAgentsAgentToolsetDefaultConfigParams as BetaManagedAgentsAgentToolsetDefaultConfigParams, type BetaManagedAgentsAgentToolset20260401 as BetaManagedAgentsAgentToolset20260401, type BetaManagedAgentsAgentToolset20260401Params as BetaManagedAgentsAgentToolset20260401Params, type BetaManagedAgentsAlwaysAllowPolicy as BetaManagedAgentsAlwaysAllowPolicy, type BetaManagedAgentsAlwaysAskPolicy as BetaManagedAgentsAlwaysAskPolicy, type BetaManagedAgentsAnthropicSkill as BetaManagedAgentsAnthropicSkill, type BetaManagedAgentsAnthropicSkillParams as BetaManagedAgentsAnthropicSkillParams, type BetaManagedAgentsCustomSkill as BetaManagedAgentsCustomSkill, type BetaManagedAgentsCustomSkillParams as BetaManagedAgentsCustomSkillParams, type BetaManagedAgentsCustomTool as BetaManagedAgentsCustomTool, type BetaManagedAgentsCustomToolInputSchema as BetaManagedAgentsCustomToolInputSchema, type BetaManagedAgentsCustomToolParams as BetaManagedAgentsCustomToolParams, type BetaManagedAgentsMCPServerURLDefinition as BetaManagedAgentsMCPServerURLDefinition, type BetaManagedAgentsMCPToolConfig as BetaManagedAgentsMCPToolConfig, type BetaManagedAgentsMCPToolConfigParams as BetaManagedAgentsMCPToolConfigParams, type BetaManagedAgentsMCPToolset as BetaManagedAgentsMCPToolset, type BetaManagedAgentsMCPToolsetDefaultConfig as BetaManagedAgentsMCPToolsetDefaultConfig, type BetaManagedAgentsMCPToolsetDefaultConfigParams as BetaManagedAgentsMCPToolsetDefaultConfigParams, type BetaManagedAgentsMCPToolsetParams as BetaManagedAgentsMCPToolsetParams, type BetaManagedAgentsModel as BetaManagedAgentsModel, type BetaManagedAgentsModelConfig as BetaManagedAgentsModelConfig, type BetaManagedAgentsModelConfigParams as BetaManagedAgentsModelConfigParams, type BetaManagedAgentsMultiagentCoordinator as BetaManagedAgentsMultiagentCoordinator, type BetaManagedAgentsMultiagentCoordinatorParams as BetaManagedAgentsMultiagentCoordinatorParams, type BetaManagedAgentsMultiagentSelfParams as BetaManagedAgentsMultiagentSelfParams, type BetaManagedAgentsSkillParams as BetaManagedAgentsSkillParams, type BetaManagedAgentsURLMCPServerParams as BetaManagedAgentsURLMCPServerParams, type BetaManagedAgentsAgentsPageCursor as BetaManagedAgentsAgentsPageCursor, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentArchiveParams as AgentArchiveParams, };
export { Versions as Versions, type VersionListParams as VersionListParams };
}
//# sourceMappingURL=agents.d.mts.map
File diff suppressed because one or more lines are too long
+648
View File
@@ -0,0 +1,648 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import * as VersionsAPI from "./versions.js";
import { VersionListParams, Versions } from "./versions.js";
import * as SessionsAPI from "../sessions/sessions.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Agents extends APIResource {
versions: VersionsAPI.Versions;
/**
* Create Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.create({
* model: 'claude-sonnet-4-6',
* name: 'My First Agent',
* });
* ```
*/
create(params: AgentCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* Get Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.retrieve(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
retrieve(agentID: string, params?: AgentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* Update Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.update(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* { version: 1 },
* );
* ```
*/
update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
/**
* List Agents
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.list()) {
* // ...
* }
* ```
*/
list(params?: AgentListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsAgentsPageCursor, BetaManagedAgentsAgent>;
/**
* Archive Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.archive(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
archive(agentID: string, params?: AgentArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent>;
}
export type BetaManagedAgentsAgentsPageCursor = PageCursor<BetaManagedAgentsAgent>;
/**
* A Managed Agents `agent`.
*/
export interface BetaManagedAgentsAgent {
id: string;
/**
* A timestamp in RFC 3339 format
*/
archived_at: string | null;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
description: string | null;
mcp_servers: Array<BetaManagedAgentsMCPServerURLDefinition>;
metadata: {
[key: string]: string;
};
/**
* Model identifier and configuration.
*/
model: BetaManagedAgentsModelConfig;
/**
* Resolved coordinator topology with a concrete agent roster.
*/
multiagent: SessionsAPI.BetaManagedAgentsMultiagent | null;
name: string;
skills: Array<BetaManagedAgentsAnthropicSkill | BetaManagedAgentsCustomSkill>;
system: string | null;
tools: Array<BetaManagedAgentsAgentToolset20260401 | BetaManagedAgentsMCPToolset | BetaManagedAgentsCustomTool>;
type: 'agent';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* The agent's current version. Starts at 1 and increments when the agent is
* modified.
*/
version: number;
}
/**
* A resolved agent reference with a concrete version.
*/
export interface BetaManagedAgentsAgentReference {
id: string;
type: 'agent';
version: number;
}
/**
* Configuration for a specific agent tool.
*/
export interface BetaManagedAgentsAgentToolConfig {
enabled: boolean;
/**
* Built-in agent tool identifier.
*/
name: 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search';
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Configuration override for a specific tool within a toolset.
*/
export interface BetaManagedAgentsAgentToolConfigParams {
/**
* Built-in agent tool identifier.
*/
name: 'bash' | 'edit' | 'read' | 'write' | 'glob' | 'grep' | 'web_fetch' | 'web_search';
/**
* Whether this tool is enabled and available to Claude. Overrides the
* default_config setting.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
/**
* Resolved default configuration for agent tools.
*/
export interface BetaManagedAgentsAgentToolsetDefaultConfig {
enabled: boolean;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Default configuration for all tools in a toolset.
*/
export interface BetaManagedAgentsAgentToolsetDefaultConfigParams {
/**
* Whether tools are enabled and available to Claude by default. Defaults to true
* if not specified.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
export interface BetaManagedAgentsAgentToolset20260401 {
configs: Array<BetaManagedAgentsAgentToolConfig>;
/**
* Resolved default configuration for agent tools.
*/
default_config: BetaManagedAgentsAgentToolsetDefaultConfig;
type: 'agent_toolset_20260401';
}
/**
* Configuration for built-in agent tools. Use this to enable or disable groups of
* tools available to the agent.
*/
export interface BetaManagedAgentsAgentToolset20260401Params {
type: 'agent_toolset_20260401';
/**
* Per-tool configuration overrides.
*/
configs?: Array<BetaManagedAgentsAgentToolConfigParams>;
/**
* Default configuration for all tools in a toolset.
*/
default_config?: BetaManagedAgentsAgentToolsetDefaultConfigParams | null;
}
/**
* Tool calls are automatically approved without user confirmation.
*/
export interface BetaManagedAgentsAlwaysAllowPolicy {
type: 'always_allow';
}
/**
* Tool calls require user confirmation before execution.
*/
export interface BetaManagedAgentsAlwaysAskPolicy {
type: 'always_ask';
}
/**
* A resolved Anthropic-managed skill.
*/
export interface BetaManagedAgentsAnthropicSkill {
skill_id: string;
type: 'anthropic';
version: string;
}
/**
* An Anthropic-managed skill.
*/
export interface BetaManagedAgentsAnthropicSkillParams {
/**
* Identifier of the Anthropic skill (e.g., "xlsx").
*/
skill_id: string;
type: 'anthropic';
/**
* Version to pin. Defaults to latest if omitted.
*/
version?: string | null;
}
/**
* A resolved user-created custom skill.
*/
export interface BetaManagedAgentsCustomSkill {
skill_id: string;
type: 'custom';
version: string;
}
/**
* A user-created custom skill.
*/
export interface BetaManagedAgentsCustomSkillParams {
/**
* Tagged ID of the custom skill (e.g., "skill_01XJ5...").
*/
skill_id: string;
type: 'custom';
/**
* Version to pin. Defaults to latest if omitted.
*/
version?: string | null;
}
/**
* A custom tool as returned in API responses.
*/
export interface BetaManagedAgentsCustomTool {
description: string;
/**
* JSON Schema for custom tool input parameters.
*/
input_schema: BetaManagedAgentsCustomToolInputSchema;
name: string;
type: 'custom';
}
/**
* JSON Schema for custom tool input parameters.
*/
export interface BetaManagedAgentsCustomToolInputSchema {
/**
* JSON Schema properties defining the tool's input parameters.
*/
properties?: {
[key: string]: unknown;
} | null;
/**
* List of required property names.
*/
required?: Array<string>;
/**
* Must be 'object' for tool input schemas.
*/
type?: 'object';
}
/**
* A custom tool that is executed by the API client rather than the agent. When the
* agent calls this tool, an `agent.custom_tool_use` event is emitted and the
* session goes idle, waiting for the client to provide the result via a
* `user.custom_tool_result` event.
*/
export interface BetaManagedAgentsCustomToolParams {
/**
* Description of what the tool does, shown to the agent to help it decide when to
* use the tool. 1-1024 characters.
*/
description: string;
/**
* JSON Schema for custom tool input parameters.
*/
input_schema: BetaManagedAgentsCustomToolInputSchema;
/**
* Unique name for the tool. 1-128 characters; letters, digits, underscores, and
* hyphens.
*/
name: string;
type: 'custom';
}
/**
* URL-based MCP server connection as returned in API responses.
*/
export interface BetaManagedAgentsMCPServerURLDefinition {
name: string;
type: 'url';
url: string;
}
/**
* Resolved configuration for a specific MCP tool.
*/
export interface BetaManagedAgentsMCPToolConfig {
enabled: boolean;
name: string;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Configuration override for a specific MCP tool.
*/
export interface BetaManagedAgentsMCPToolConfigParams {
/**
* Name of the MCP tool to configure. 1-128 characters.
*/
name: string;
/**
* Whether this tool is enabled. Overrides the `default_config` setting.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
export interface BetaManagedAgentsMCPToolset {
configs: Array<BetaManagedAgentsMCPToolConfig>;
/**
* Resolved default configuration for all tools from an MCP server.
*/
default_config: BetaManagedAgentsMCPToolsetDefaultConfig;
mcp_server_name: string;
type: 'mcp_toolset';
}
/**
* Resolved default configuration for all tools from an MCP server.
*/
export interface BetaManagedAgentsMCPToolsetDefaultConfig {
enabled: boolean;
/**
* Permission policy for tool execution.
*/
permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;
}
/**
* Default configuration for all tools from an MCP server.
*/
export interface BetaManagedAgentsMCPToolsetDefaultConfigParams {
/**
* Whether tools are enabled by default. Defaults to true if not specified.
*/
enabled?: boolean | null;
/**
* Permission policy for tool execution.
*/
permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;
}
/**
* Configuration for tools from an MCP server defined in `mcp_servers`.
*/
export interface BetaManagedAgentsMCPToolsetParams {
/**
* Name of the MCP server. Must match a server name from the mcp_servers array.
* 1-255 characters.
*/
mcp_server_name: string;
type: 'mcp_toolset';
/**
* Per-tool configuration overrides.
*/
configs?: Array<BetaManagedAgentsMCPToolConfigParams>;
/**
* Default configuration for all tools from an MCP server.
*/
default_config?: BetaManagedAgentsMCPToolsetDefaultConfigParams | null;
}
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
export type BetaManagedAgentsModel = 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | (string & {});
/**
* Model identifier and configuration.
*/
export interface BetaManagedAgentsModelConfig {
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
id: BetaManagedAgentsModel;
/**
* Inference speed mode. `fast` provides significantly faster output token
* generation at premium pricing. Not all models support `fast`; invalid
* combinations are rejected at create time.
*/
speed?: 'standard' | 'fast';
}
/**
* An object that defines additional configuration control over model use
*/
export interface BetaManagedAgentsModelConfigParams {
/**
* The model that will power your agent.\n\nSee
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
* details and options.
*/
id: BetaManagedAgentsModel;
/**
* Inference speed mode. `fast` provides significantly faster output token
* generation at premium pricing. Not all models support `fast`; invalid
* combinations are rejected at create time.
*/
speed?: 'standard' | 'fast' | null;
}
/**
* Resolved coordinator topology with a concrete agent roster.
*/
export interface BetaManagedAgentsMultiagentCoordinator {
/**
* Agents the coordinator may spawn as session threads, each resolved to a specific
* version.
*/
agents: Array<BetaManagedAgentsAgentReference>;
type: 'coordinator';
}
/**
* A coordinator topology: the session's primary thread orchestrates work by
* spawning session threads, each running an agent drawn from the `agents` roster.
*/
export interface BetaManagedAgentsMultiagentCoordinatorParams {
/**
* Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is
* an agent ID string, a versioned `{"type":"agent","id","version"}` reference, or
* `{"type":"self"}` to allow recursive self-invocation. Entries must reference
* distinct agents (after resolving `self` and string forms); at most one `self`.
* Referenced agents must exist, must not be archived, and must not themselves have
* `multiagent` set (depth limit 1).
*/
agents: Array<SessionsAPI.BetaManagedAgentsMultiagentRosterEntryParams>;
type: 'coordinator';
}
/**
* Sentinel roster entry meaning "the agent that owns this configuration". Resolved
* server-side to a concrete agent reference.
*/
export interface BetaManagedAgentsMultiagentSelfParams {
type: 'self';
}
/**
* Skill to load in the session container.
*/
export type BetaManagedAgentsSkillParams = BetaManagedAgentsAnthropicSkillParams | BetaManagedAgentsCustomSkillParams;
/**
* URL-based MCP server connection.
*/
export interface BetaManagedAgentsURLMCPServerParams {
/**
* Unique name for this server, referenced by mcp_toolset configurations. 1-255
* characters.
*/
name: string;
type: 'url';
/**
* Endpoint URL for the MCP server.
*/
url: string;
}
export interface AgentCreateParams {
/**
* Body param: Model identifier. Accepts the
* [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),
* e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
* control
*/
model: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;
/**
* Body param: Human-readable name for the agent. 1-256 characters.
*/
name: string;
/**
* Body param: Description of what the agent does. Up to 2048 characters.
*/
description?: string | null;
/**
* Body param: MCP servers this agent connects to. Maximum 20. Names must be unique
* within the array.
*/
mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams>;
/**
* Body param: Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars,
* values up to 512 chars.
*/
metadata?: {
[key: string]: string;
};
/**
* Body param: A coordinator topology: the session's primary thread orchestrates
* work by spawning session threads, each running an agent drawn from the `agents`
* roster.
*/
multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;
/**
* Body param: Skills available to the agent. Maximum 20.
*/
skills?: Array<BetaManagedAgentsSkillParams>;
/**
* Body param: System prompt for the agent. Up to 100,000 characters.
*/
system?: string | null;
/**
* Body param: Tool configurations available to the agent. Maximum of 128 tools
* across all toolsets allowed.
*/
tools?: Array<BetaManagedAgentsAgentToolset20260401Params | BetaManagedAgentsMCPToolsetParams | BetaManagedAgentsCustomToolParams>;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentRetrieveParams {
/**
* Query param: Agent version. Omit for the most recent version. Must be at least 1
* if specified.
*/
version?: number;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentUpdateParams {
/**
* Body param: The agent's current version, used to prevent concurrent overwrites.
* Obtain this value from a create or retrieve response. The request fails if this
* does not match the server's current version.
*/
version: number;
/**
* Body param: Description. Up to 2048 characters. Omit to preserve; send empty
* string or null to clear.
*/
description?: string | null;
/**
* Body param: MCP servers. Full replacement. Omit to preserve; send empty array or
* null to clear. Names must be unique. Maximum 20.
*/
mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams> | null;
/**
* Body param: Metadata patch. Set a key to a string to upsert it, or to null to
* delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up
* to 64 chars each) with values up to 512 chars.
*/
metadata?: {
[key: string]: string | null;
} | null;
/**
* Body param: Model identifier. Accepts the
* [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison),
* e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
* control. Omit to preserve. Cannot be cleared.
*/
model?: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;
/**
* Body param: A coordinator topology: the session's primary thread orchestrates
* work by spawning session threads, each running an agent drawn from the `agents`
* roster.
*/
multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;
/**
* Body param: Human-readable name. 1-256 characters. Omit to preserve. Cannot be
* cleared.
*/
name?: string;
/**
* Body param: Skills. Full replacement. Omit to preserve; send empty array or null
* to clear. Maximum 20.
*/
skills?: Array<BetaManagedAgentsSkillParams> | null;
/**
* Body param: System prompt. Up to 100,000 characters. Omit to preserve; send
* empty string or null to clear.
*/
system?: string | null;
/**
* Body param: Tool configurations available to the agent. Full replacement. Omit
* to preserve; send empty array or null to clear. Maximum of 128 tools across all
* toolsets allowed.
*/
tools?: Array<BetaManagedAgentsAgentToolset20260401Params | BetaManagedAgentsMCPToolsetParams | BetaManagedAgentsCustomToolParams> | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentListParams extends PageCursorParams {
/**
* Query param: Return agents created at or after this time (inclusive).
*/
'created_at[gte]'?: string;
/**
* Query param: Return agents created at or before this time (inclusive).
*/
'created_at[lte]'?: string;
/**
* Query param: Include archived agents in results. Defaults to false.
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface AgentArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Agents {
export { type BetaManagedAgentsAgent as BetaManagedAgentsAgent, type BetaManagedAgentsAgentReference as BetaManagedAgentsAgentReference, type BetaManagedAgentsAgentToolConfig as BetaManagedAgentsAgentToolConfig, type BetaManagedAgentsAgentToolConfigParams as BetaManagedAgentsAgentToolConfigParams, type BetaManagedAgentsAgentToolsetDefaultConfig as BetaManagedAgentsAgentToolsetDefaultConfig, type BetaManagedAgentsAgentToolsetDefaultConfigParams as BetaManagedAgentsAgentToolsetDefaultConfigParams, type BetaManagedAgentsAgentToolset20260401 as BetaManagedAgentsAgentToolset20260401, type BetaManagedAgentsAgentToolset20260401Params as BetaManagedAgentsAgentToolset20260401Params, type BetaManagedAgentsAlwaysAllowPolicy as BetaManagedAgentsAlwaysAllowPolicy, type BetaManagedAgentsAlwaysAskPolicy as BetaManagedAgentsAlwaysAskPolicy, type BetaManagedAgentsAnthropicSkill as BetaManagedAgentsAnthropicSkill, type BetaManagedAgentsAnthropicSkillParams as BetaManagedAgentsAnthropicSkillParams, type BetaManagedAgentsCustomSkill as BetaManagedAgentsCustomSkill, type BetaManagedAgentsCustomSkillParams as BetaManagedAgentsCustomSkillParams, type BetaManagedAgentsCustomTool as BetaManagedAgentsCustomTool, type BetaManagedAgentsCustomToolInputSchema as BetaManagedAgentsCustomToolInputSchema, type BetaManagedAgentsCustomToolParams as BetaManagedAgentsCustomToolParams, type BetaManagedAgentsMCPServerURLDefinition as BetaManagedAgentsMCPServerURLDefinition, type BetaManagedAgentsMCPToolConfig as BetaManagedAgentsMCPToolConfig, type BetaManagedAgentsMCPToolConfigParams as BetaManagedAgentsMCPToolConfigParams, type BetaManagedAgentsMCPToolset as BetaManagedAgentsMCPToolset, type BetaManagedAgentsMCPToolsetDefaultConfig as BetaManagedAgentsMCPToolsetDefaultConfig, type BetaManagedAgentsMCPToolsetDefaultConfigParams as BetaManagedAgentsMCPToolsetDefaultConfigParams, type BetaManagedAgentsMCPToolsetParams as BetaManagedAgentsMCPToolsetParams, type BetaManagedAgentsModel as BetaManagedAgentsModel, type BetaManagedAgentsModelConfig as BetaManagedAgentsModelConfig, type BetaManagedAgentsModelConfigParams as BetaManagedAgentsModelConfigParams, type BetaManagedAgentsMultiagentCoordinator as BetaManagedAgentsMultiagentCoordinator, type BetaManagedAgentsMultiagentCoordinatorParams as BetaManagedAgentsMultiagentCoordinatorParams, type BetaManagedAgentsMultiagentSelfParams as BetaManagedAgentsMultiagentSelfParams, type BetaManagedAgentsSkillParams as BetaManagedAgentsSkillParams, type BetaManagedAgentsURLMCPServerParams as BetaManagedAgentsURLMCPServerParams, type BetaManagedAgentsAgentsPageCursor as BetaManagedAgentsAgentsPageCursor, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentArchiveParams as AgentArchiveParams, };
export { Versions as Versions, type VersionListParams as VersionListParams };
}
//# sourceMappingURL=agents.d.ts.map
File diff suppressed because one or more lines are too long
+131
View File
@@ -0,0 +1,131 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Agents = void 0;
const tslib_1 = require("../../../internal/tslib.js");
const resource_1 = require("../../../core/resource.js");
const VersionsAPI = tslib_1.__importStar(require("./versions.js"));
const versions_1 = require("./versions.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const path_1 = require("../../../internal/utils/path.js");
class Agents extends resource_1.APIResource {
constructor() {
super(...arguments);
this.versions = new VersionsAPI.Versions(this._client);
}
/**
* Create Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.create({
* model: 'claude-sonnet-4-6',
* name: 'My First Agent',
* });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/agents?beta=true', {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Get Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.retrieve(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
retrieve(agentID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.get((0, path_1.path) `/v1/agents/${agentID}?beta=true`, {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.update(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* { version: 1 },
* );
* ```
*/
update(agentID, params, options) {
const { betas, ...body } = params;
return this._client.post((0, path_1.path) `/v1/agents/${agentID}?beta=true`, {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List Agents
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/agents?beta=true', (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.archive(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
archive(agentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post((0, path_1.path) `/v1/agents/${agentID}/archive?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.Agents = Agents;
Agents.Versions = versions_1.Versions;
//# sourceMappingURL=agents.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/resources/beta/agents/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,mEAA0C;AAC1C,4CAAyD;AAGzD,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoI1E,CAAC;IAlIC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,YAAY,EAAE;YAC7D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,C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IAAA,WAAI,EAAA,cAAc,OAAO,oBAAoB,EAAE;YACtE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AArID,wBAqIC;AAqsBD,MAAM,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
+126
View File
@@ -0,0 +1,126 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as VersionsAPI from "./versions.mjs";
import { Versions } from "./versions.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Agents extends APIResource {
constructor() {
super(...arguments);
this.versions = new VersionsAPI.Versions(this._client);
}
/**
* Create Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.create({
* model: 'claude-sonnet-4-6',
* name: 'My First Agent',
* });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/agents?beta=true', {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Get Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.retrieve(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
retrieve(agentID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.get(path `/v1/agents/${agentID}?beta=true`, {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.update(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* { version: 1 },
* );
* ```
*/
update(agentID, params, options) {
const { betas, ...body } = params;
return this._client.post(path `/v1/agents/${agentID}?beta=true`, {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List Agents
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/agents?beta=true', (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive Agent
*
* @example
* ```ts
* const betaManagedAgentsAgent =
* await client.beta.agents.archive(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* );
* ```
*/
archive(agentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post(path `/v1/agents/${agentID}/archive?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
Agents.Versions = Versions;
//# sourceMappingURL=agents.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../../../src/resources/beta/agents/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,WAAW;OAChB,EAAqB,QAAQ,EAAE;OAG/B,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoI1E,CAAC;IAlIC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAyB,E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AAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,SAA6C,EAAE,EAC/C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,UAAkC,CAAA,EAAE;YACzF,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,OAAO,CACL,OAAe,EACf,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,cAAc,OAAO,oBAAoB,EAAE;YACtE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAqsBD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
+3
View File
@@ -0,0 +1,3 @@
export { Agents, type BetaManagedAgentsAgent, type BetaManagedAgentsAgentReference, type BetaManagedAgentsAgentToolConfig, type BetaManagedAgentsAgentToolConfigParams, type BetaManagedAgentsAgentToolsetDefaultConfig, type BetaManagedAgentsAgentToolsetDefaultConfigParams, type BetaManagedAgentsAgentToolset20260401, type BetaManagedAgentsAgentToolset20260401Params, type BetaManagedAgentsAlwaysAllowPolicy, type BetaManagedAgentsAlwaysAskPolicy, type BetaManagedAgentsAnthropicSkill, type BetaManagedAgentsAnthropicSkillParams, type BetaManagedAgentsCustomSkill, type BetaManagedAgentsCustomSkillParams, type BetaManagedAgentsCustomTool, type BetaManagedAgentsCustomToolInputSchema, type BetaManagedAgentsCustomToolParams, type BetaManagedAgentsMCPServerURLDefinition, type BetaManagedAgentsMCPToolConfig, type BetaManagedAgentsMCPToolConfigParams, type BetaManagedAgentsMCPToolset, type BetaManagedAgentsMCPToolsetDefaultConfig, type BetaManagedAgentsMCPToolsetDefaultConfigParams, type BetaManagedAgentsMCPToolsetParams, type BetaManagedAgentsModel, type BetaManagedAgentsModelConfig, type BetaManagedAgentsModelConfigParams, type BetaManagedAgentsMultiagentCoordinator, type BetaManagedAgentsMultiagentCoordinatorParams, type BetaManagedAgentsMultiagentSelfParams, type BetaManagedAgentsSkillParams, type BetaManagedAgentsURLMCPServerParams, type AgentCreateParams, type AgentRetrieveParams, type AgentUpdateParams, type AgentListParams, type AgentArchiveParams, type BetaManagedAgentsAgentsPageCursor, } from "./agents.mjs";
export { Versions, type VersionListParams } from "./versions.mjs";
//# sourceMappingURL=index.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/agents/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,sCAAsC,EAC3C,KAAK,0CAA0C,EAC/C,KAAK,gDAAgD,EACrD,KAAK,qCAAqC,EAC1C,KAAK,2CAA2C,EAChD,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,EAC1C,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,sCAAsC,EAC3C,KAAK,iCAAiC,EACtC,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,2BAA2B,EAChC,KAAK,wCAAwC,EAC7C,KAAK,8CAA8C,EACnD,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,qCAAqC,EAC1C,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC;OACM,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE"}
+3
View File
@@ -0,0 +1,3 @@
export { Agents, type BetaManagedAgentsAgent, type BetaManagedAgentsAgentReference, type BetaManagedAgentsAgentToolConfig, type BetaManagedAgentsAgentToolConfigParams, type BetaManagedAgentsAgentToolsetDefaultConfig, type BetaManagedAgentsAgentToolsetDefaultConfigParams, type BetaManagedAgentsAgentToolset20260401, type BetaManagedAgentsAgentToolset20260401Params, type BetaManagedAgentsAlwaysAllowPolicy, type BetaManagedAgentsAlwaysAskPolicy, type BetaManagedAgentsAnthropicSkill, type BetaManagedAgentsAnthropicSkillParams, type BetaManagedAgentsCustomSkill, type BetaManagedAgentsCustomSkillParams, type BetaManagedAgentsCustomTool, type BetaManagedAgentsCustomToolInputSchema, type BetaManagedAgentsCustomToolParams, type BetaManagedAgentsMCPServerURLDefinition, type BetaManagedAgentsMCPToolConfig, type BetaManagedAgentsMCPToolConfigParams, type BetaManagedAgentsMCPToolset, type BetaManagedAgentsMCPToolsetDefaultConfig, type BetaManagedAgentsMCPToolsetDefaultConfigParams, type BetaManagedAgentsMCPToolsetParams, type BetaManagedAgentsModel, type BetaManagedAgentsModelConfig, type BetaManagedAgentsModelConfigParams, type BetaManagedAgentsMultiagentCoordinator, type BetaManagedAgentsMultiagentCoordinatorParams, type BetaManagedAgentsMultiagentSelfParams, type BetaManagedAgentsSkillParams, type BetaManagedAgentsURLMCPServerParams, type AgentCreateParams, type AgentRetrieveParams, type AgentUpdateParams, type AgentListParams, type AgentArchiveParams, type BetaManagedAgentsAgentsPageCursor, } from "./agents.js";
export { Versions, type VersionListParams } from "./versions.js";
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/agents/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,sCAAsC,EAC3C,KAAK,0CAA0C,EAC/C,KAAK,gDAAgD,EACrD,KAAK,qCAAqC,EAC1C,KAAK,2CAA2C,EAChD,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,EAC1C,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,sCAAsC,EAC3C,KAAK,iCAAiC,EACtC,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,2BAA2B,EAChC,KAAK,wCAAwC,EAC7C,KAAK,8CAA8C,EACnD,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,qCAAqC,EAC1C,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC;OACM,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE"}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Versions = exports.Agents = void 0;
var agents_1 = require("./agents.js");
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
var versions_1 = require("./versions.js");
Object.defineProperty(exports, "Versions", { enumerable: true, get: function () { return versions_1.Versions; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/agents/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAwCkB;AAvChB,gGAAA,MAAM,OAAA;AAwCR,0CAA8D;AAArD,oGAAA,QAAQ,OAAA"}
+4
View File
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Agents, } from "./agents.mjs";
export { Versions } from "./versions.mjs";
//# sourceMappingURL=index.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/agents/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAuCP;OACM,EAAE,QAAQ,EAA0B"}
+33
View File
@@ -0,0 +1,33 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import * as AgentsAPI from "./agents.mjs";
import { BetaManagedAgentsAgentsPageCursor } from "./agents.mjs";
import { type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Versions extends APIResource {
/**
* List Agent Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.versions.list(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* )) {
* // ...
* }
* ```
*/
list(agentID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsAgentsPageCursor, AgentsAPI.BetaManagedAgentsAgent>;
}
export interface VersionListParams extends PageCursorParams {
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Versions {
export { type VersionListParams as VersionListParams };
}
export { type BetaManagedAgentsAgentsPageCursor };
//# sourceMappingURL=versions.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/agents/versions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,SAAS;OACd,EAAE,iCAAiC,EAAE;OACrC,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,SAAS,CAAC,sBAAsB,CAAC;CAepF;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,iCAAiC,EAAE,CAAC"}
+33
View File
@@ -0,0 +1,33 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import * as AgentsAPI from "./agents.js";
import { BetaManagedAgentsAgentsPageCursor } from "./agents.js";
import { type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Versions extends APIResource {
/**
* List Agent Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.versions.list(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* )) {
* // ...
* }
* ```
*/
list(agentID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsAgentsPageCursor, AgentsAPI.BetaManagedAgentsAgent>;
}
export interface VersionListParams extends PageCursorParams {
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Versions {
export { type VersionListParams as VersionListParams };
}
export { type BetaManagedAgentsAgentsPageCursor };
//# sourceMappingURL=versions.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/agents/versions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,SAAS;OACd,EAAE,iCAAiC,EAAE;OACrC,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,SAAS,CAAC,sBAAsB,CAAC;CAepF;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,iCAAiC,EAAE,CAAC"}
+36
View File
@@ -0,0 +1,36 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Versions = void 0;
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const path_1 = require("../../../internal/utils/path.js");
class Versions extends resource_1.APIResource {
/**
* List Agent Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.versions.list(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* )) {
* // ...
* }
* ```
*/
list(agentID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList((0, path_1.path) `/v1/agents/${agentID}/versions?beta=true`, (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.Versions = Versions;
//# sourceMappingURL=versions.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../src/resources/beta/agents/versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAe,EACf,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,uBAA4C,CAAA,EAC5C;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;CACF;AAjCD,4BAiCC"}
+32
View File
@@ -0,0 +1,32 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Versions extends APIResource {
/**
* List Agent Versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsAgent of client.beta.agents.versions.list(
* 'agent_011CZkYpogX7uDKUyvBTophP',
* )) {
* // ...
* }
* ```
*/
list(agentID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList(path `/v1/agents/${agentID}/versions?beta=true`, (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
//# sourceMappingURL=versions.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../../src/resources/beta/agents/versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAe,EACf,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,cAAc,OAAO,qBAAqB,EAC9C,CAAA,UAA4C,CAAA,EAC5C;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;CACF"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+57
View File
@@ -0,0 +1,57 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Beta = void 0;
const tslib_1 = require("../../internal/tslib.js");
const resource_1 = require("../../core/resource.js");
const EnvironmentsAPI = tslib_1.__importStar(require("./environments.js"));
const environments_1 = require("./environments.js");
const FilesAPI = tslib_1.__importStar(require("./files.js"));
const files_1 = require("./files.js");
const ModelsAPI = tslib_1.__importStar(require("./models.js"));
const models_1 = require("./models.js");
const UserProfilesAPI = tslib_1.__importStar(require("./user-profiles.js"));
const user_profiles_1 = require("./user-profiles.js");
const WebhooksAPI = tslib_1.__importStar(require("./webhooks.js"));
const webhooks_1 = require("./webhooks.js");
const AgentsAPI = tslib_1.__importStar(require("./agents/agents.js"));
const agents_1 = require("./agents/agents.js");
const MemoryStoresAPI = tslib_1.__importStar(require("./memory-stores/memory-stores.js"));
const memory_stores_1 = require("./memory-stores/memory-stores.js");
const MessagesAPI = tslib_1.__importStar(require("./messages/messages.js"));
const messages_1 = require("./messages/messages.js");
const SessionsAPI = tslib_1.__importStar(require("./sessions/sessions.js"));
const sessions_1 = require("./sessions/sessions.js");
const SkillsAPI = tslib_1.__importStar(require("./skills/skills.js"));
const skills_1 = require("./skills/skills.js");
const VaultsAPI = tslib_1.__importStar(require("./vaults/vaults.js"));
const vaults_1 = require("./vaults/vaults.js");
class Beta extends resource_1.APIResource {
constructor() {
super(...arguments);
this.models = new ModelsAPI.Models(this._client);
this.messages = new MessagesAPI.Messages(this._client);
this.agents = new AgentsAPI.Agents(this._client);
this.environments = new EnvironmentsAPI.Environments(this._client);
this.sessions = new SessionsAPI.Sessions(this._client);
this.vaults = new VaultsAPI.Vaults(this._client);
this.memoryStores = new MemoryStoresAPI.MemoryStores(this._client);
this.files = new FilesAPI.Files(this._client);
this.skills = new SkillsAPI.Skills(this._client);
this.webhooks = new WebhooksAPI.Webhooks(this._client);
this.userProfiles = new UserProfilesAPI.UserProfiles(this._client);
}
}
exports.Beta = Beta;
Beta.Models = models_1.Models;
Beta.Messages = messages_1.Messages;
Beta.Agents = agents_1.Agents;
Beta.Environments = environments_1.Environments;
Beta.Sessions = sessions_1.Sessions;
Beta.Vaults = vaults_1.Vaults;
Beta.MemoryStores = memory_stores_1.MemoryStores;
Beta.Files = files_1.Files;
Beta.Skills = skills_1.Skills;
Beta.Webhooks = webhooks_1.Webhooks;
Beta.UserProfiles = user_profiles_1.UserProfiles;
//# sourceMappingURL=beta.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.js","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2EAAkD;AAClD,oDAkBwB;AACxB,6DAAoC;AACpC,sCAWiB;AACjB,+DAAsC;AACtC,wCAYkB;AAClB,4EAAmD;AACnD,sDAWyB;AACzB,mEAA0C;AAC1C,4CA2BoB;AACpB,sEAA6C;AAC7C,+CAwCyB;AACzB,0FAAiE;AACjE,oEAWuC;AACvC,4EAAmD;AACnD,qDAuN6B;AAC7B,4EAAmD;AACnD,qDA0B6B;AAC7B,sEAA6C;AAC7C,+CAWyB;AACzB,sEAA6C;AAC7C,+CAWyB;AAEzB,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,C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,CAAC,YAAY,GAAG,4BAAY,CAAC"}
+52
View File
@@ -0,0 +1,52 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import * as EnvironmentsAPI from "./environments.mjs";
import { Environments, } from "./environments.mjs";
import * as FilesAPI from "./files.mjs";
import { Files, } from "./files.mjs";
import * as ModelsAPI from "./models.mjs";
import { Models, } from "./models.mjs";
import * as UserProfilesAPI from "./user-profiles.mjs";
import { UserProfiles, } from "./user-profiles.mjs";
import * as WebhooksAPI from "./webhooks.mjs";
import { Webhooks, } from "./webhooks.mjs";
import * as AgentsAPI from "./agents/agents.mjs";
import { Agents, } from "./agents/agents.mjs";
import * as MemoryStoresAPI from "./memory-stores/memory-stores.mjs";
import { MemoryStores, } from "./memory-stores/memory-stores.mjs";
import * as MessagesAPI from "./messages/messages.mjs";
import { Messages, } from "./messages/messages.mjs";
import * as SessionsAPI from "./sessions/sessions.mjs";
import { Sessions, } from "./sessions/sessions.mjs";
import * as SkillsAPI from "./skills/skills.mjs";
import { Skills, } from "./skills/skills.mjs";
import * as VaultsAPI from "./vaults/vaults.mjs";
import { Vaults, } from "./vaults/vaults.mjs";
export class Beta extends APIResource {
constructor() {
super(...arguments);
this.models = new ModelsAPI.Models(this._client);
this.messages = new MessagesAPI.Messages(this._client);
this.agents = new AgentsAPI.Agents(this._client);
this.environments = new EnvironmentsAPI.Environments(this._client);
this.sessions = new SessionsAPI.Sessions(this._client);
this.vaults = new VaultsAPI.Vaults(this._client);
this.memoryStores = new MemoryStoresAPI.MemoryStores(this._client);
this.files = new FilesAPI.Files(this._client);
this.skills = new SkillsAPI.Skills(this._client);
this.webhooks = new WebhooksAPI.Webhooks(this._client);
this.userProfiles = new UserProfilesAPI.UserProfiles(this._client);
}
}
Beta.Models = Models;
Beta.Messages = Messages;
Beta.Agents = Agents;
Beta.Environments = Environments;
Beta.Sessions = Sessions;
Beta.Vaults = Vaults;
Beta.MemoryStores = MemoryStores;
Beta.Files = Files;
Beta.Skills = Skills;
Beta.Webhooks = Webhooks;
Beta.UserProfiles = UserProfiles;
//# sourceMappingURL=beta.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"beta.mjs","sourceRoot":"","sources":["../../src/resources/beta/beta.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAiBL,YAAY,GACb;OACM,KAAK,QAAQ;OACb,EAUL,KAAK,GACN;OACM,KAAK,SAAS;OACd,EAWL,MAAM,GACP;OACM,KAAK,eAAe;OACpB,EAUL,YAAY,GACb;OACM,KAAK,WAAW;OAChB,EA0BL,QAAQ,GACT;OACM,KAAK,SAAS;OACd,EAML,MAAM,GAkCP;OACM,KAAK,eAAe;OACpB,EAUL,YAAY,GACb;OACM,KAAK,WAAW;OAChB,EAoNL,QAAQ,GAGT;OACM,KAAK,WAAW;OAChB,EAyBL,QAAQ,GACT;OACM,KAAK,SAAS;OACd,EAUL,MAAM,GACP;OACM,KAAK,SAAS;OACd,EAUL,MAAM,GACP;AAED,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9F,CAAC;CAAA;AAuGD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;AACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;AACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC"}
+389
View File
@@ -0,0 +1,389 @@
import { APIResource } from "../../core/resource.mjs";
import * as BetaAPI from "./beta.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../core/pagination.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class Environments extends APIResource {
/**
* Create a new environment with the specified configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.create({
* name: 'python-data-analysis',
* });
* ```
*/
create(params: EnvironmentCreateParams, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* Retrieve a specific environment by ID.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.retrieve(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
retrieve(environmentID: string, params?: EnvironmentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* Update an existing environment's configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.update(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
update(environmentID: string, params: EnvironmentUpdateParams, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* List environments with pagination support.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaEnvironment of client.beta.environments.list()) {
* // ...
* }
* ```
*/
list(params?: EnvironmentListParams | null | undefined, options?: RequestOptions): PagePromise<BetaEnvironmentsPageCursor, BetaEnvironment>;
/**
* Delete an environment by ID. Returns a confirmation of the deletion.
*
* @example
* ```ts
* const betaEnvironmentDeleteResponse =
* await client.beta.environments.delete(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
delete(environmentID: string, params?: EnvironmentDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironmentDeleteResponse>;
/**
* Archive an environment by ID. Archived environments cannot be used to create new
* sessions.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.archive(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
archive(environmentID: string, params?: EnvironmentArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironment>;
}
export type BetaEnvironmentsPageCursor = PageCursor<BetaEnvironment>;
/**
* `cloud` environment configuration.
*/
export interface BetaCloudConfig {
/**
* Network configuration policy.
*/
networking: BetaUnrestrictedNetwork | BetaLimitedNetwork;
/**
* Package manager configuration.
*/
packages: BetaPackages;
/**
* Environment type
*/
type: 'cloud';
}
/**
* Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
export interface BetaCloudConfigParams {
/**
* Environment type
*/
type: 'cloud';
/**
* Network configuration policy. Omit on update to preserve the existing value.
*/
networking?: BetaUnrestrictedNetwork | BetaLimitedNetworkParams | null;
/**
* Specify packages (and optionally their versions) available in this environment.
*
* When versioning, use the version semantics relevant for the package manager,
* e.g. for `pip` use `package==1.0.0`. You are responsible for validating the
* package and version exist. Unversioned installs the latest.
*/
packages?: BetaPackagesParams | null;
}
/**
* Unified Environment resource for both cloud and self-hosted environments.
*/
export interface BetaEnvironment {
/**
* Environment identifier (e.g., 'env\_...')
*/
id: string;
/**
* RFC 3339 timestamp when environment was archived, or null if not archived
*/
archived_at: string | null;
/**
* `cloud` environment configuration.
*/
config: BetaCloudConfig;
/**
* RFC 3339 timestamp when environment was created
*/
created_at: string;
/**
* User-provided description for the environment
*/
description: string;
/**
* User-provided metadata key-value pairs
*/
metadata: {
[key: string]: string;
};
/**
* Human-readable name for the environment
*/
name: string;
/**
* The type of object (always 'environment')
*/
type: 'environment';
/**
* RFC 3339 timestamp when environment was last updated
*/
updated_at: string;
}
/**
* Response after deleting an environment.
*/
export interface BetaEnvironmentDeleteResponse {
/**
* Environment identifier
*/
id: string;
/**
* The type of response
*/
type: 'environment_deleted';
}
/**
* Limited network access.
*/
export interface BetaLimitedNetwork {
/**
* Permits outbound access to MCP server endpoints configured on the agent, beyond
* those listed in the `allowed_hosts` array.
*/
allow_mcp_servers: boolean;
/**
* Permits outbound access to public package registries (PyPI, npm, etc.) beyond
* those listed in the `allowed_hosts` array.
*/
allow_package_managers: boolean;
/**
* Specifies domains the container can reach.
*/
allowed_hosts: Array<string>;
/**
* Network policy type
*/
type: 'limited';
}
/**
* Limited network request params.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
export interface BetaLimitedNetworkParams {
/**
* Network policy type
*/
type: 'limited';
/**
* Permits outbound access to MCP server endpoints configured on the agent, beyond
* those listed in the `allowed_hosts` array. Defaults to `false`.
*/
allow_mcp_servers?: boolean | null;
/**
* Permits outbound access to public package registries (PyPI, npm, etc.) beyond
* those listed in the `allowed_hosts` array. Defaults to `false`.
*/
allow_package_managers?: boolean | null;
/**
* Specifies domains the container can reach.
*/
allowed_hosts?: Array<string> | null;
}
/**
* Packages (and their versions) available in this environment.
*/
export interface BetaPackages {
/**
* Ubuntu/Debian packages to install
*/
apt: Array<string>;
/**
* Rust packages to install
*/
cargo: Array<string>;
/**
* Ruby packages to install
*/
gem: Array<string>;
/**
* Go packages to install
*/
go: Array<string>;
/**
* Node.js packages to install
*/
npm: Array<string>;
/**
* Python packages to install
*/
pip: Array<string>;
/**
* Package configuration type
*/
type?: 'packages';
}
/**
* Specify packages (and optionally their versions) available in this environment.
*
* When versioning, use the version semantics relevant for the package manager,
* e.g. for `pip` use `package==1.0.0`. You are responsible for validating the
* package and version exist. Unversioned installs the latest.
*/
export interface BetaPackagesParams {
/**
* Ubuntu/Debian packages to install
*/
apt?: Array<string> | null;
/**
* Rust packages to install
*/
cargo?: Array<string> | null;
/**
* Ruby packages to install
*/
gem?: Array<string> | null;
/**
* Go packages to install
*/
go?: Array<string> | null;
/**
* Node.js packages to install
*/
npm?: Array<string> | null;
/**
* Python packages to install
*/
pip?: Array<string> | null;
/**
* Package configuration type
*/
type?: 'packages';
}
/**
* Unrestricted network access.
*/
export interface BetaUnrestrictedNetwork {
/**
* Network policy type
*/
type: 'unrestricted';
}
export interface EnvironmentCreateParams {
/**
* Body param: Human-readable name for the environment
*/
name: string;
/**
* Body param: Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
config?: BetaCloudConfigParams | null;
/**
* Body param: Optional description of the environment
*/
description?: string | null;
/**
* Body param: User-provided metadata key-value pairs
*/
metadata?: {
[key: string]: string;
};
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentUpdateParams {
/**
* Body param: Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
config?: BetaCloudConfigParams | null;
/**
* Body param: Updated description of the environment
*/
description?: string | null;
/**
* Body param: User-provided metadata key-value pairs. Set a value to null or empty
* string to delete the key.
*/
metadata?: {
[key: string]: string | null;
};
/**
* Body param: Updated name for the environment
*/
name?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentListParams extends PageCursorParams {
/**
* Query param: Include archived environments in the response
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Environments {
export { type BetaCloudConfig as BetaCloudConfig, type BetaCloudConfigParams as BetaCloudConfigParams, type BetaEnvironment as BetaEnvironment, type BetaEnvironmentDeleteResponse as BetaEnvironmentDeleteResponse, type BetaLimitedNetwork as BetaLimitedNetwork, type BetaLimitedNetworkParams as BetaLimitedNetworkParams, type BetaPackages as BetaPackages, type BetaPackagesParams as BetaPackagesParams, type BetaUnrestrictedNetwork as BetaUnrestrictedNetwork, type BetaEnvironmentsPageCursor as BetaEnvironmentsPageCursor, type EnvironmentCreateParams as EnvironmentCreateParams, type EnvironmentRetrieveParams as EnvironmentRetrieveParams, type EnvironmentUpdateParams as EnvironmentUpdateParams, type EnvironmentListParams as EnvironmentListParams, type EnvironmentDeleteParams as EnvironmentDeleteParams, type EnvironmentArchiveParams as EnvironmentArchiveParams, };
}
//# sourceMappingURL=environments.d.mts.map
File diff suppressed because one or more lines are too long
+389
View File
@@ -0,0 +1,389 @@
import { APIResource } from "../../core/resource.js";
import * as BetaAPI from "./beta.js";
import { APIPromise } from "../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../core/pagination.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class Environments extends APIResource {
/**
* Create a new environment with the specified configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.create({
* name: 'python-data-analysis',
* });
* ```
*/
create(params: EnvironmentCreateParams, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* Retrieve a specific environment by ID.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.retrieve(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
retrieve(environmentID: string, params?: EnvironmentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* Update an existing environment's configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.update(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
update(environmentID: string, params: EnvironmentUpdateParams, options?: RequestOptions): APIPromise<BetaEnvironment>;
/**
* List environments with pagination support.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaEnvironment of client.beta.environments.list()) {
* // ...
* }
* ```
*/
list(params?: EnvironmentListParams | null | undefined, options?: RequestOptions): PagePromise<BetaEnvironmentsPageCursor, BetaEnvironment>;
/**
* Delete an environment by ID. Returns a confirmation of the deletion.
*
* @example
* ```ts
* const betaEnvironmentDeleteResponse =
* await client.beta.environments.delete(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
delete(environmentID: string, params?: EnvironmentDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironmentDeleteResponse>;
/**
* Archive an environment by ID. Archived environments cannot be used to create new
* sessions.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.archive(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
archive(environmentID: string, params?: EnvironmentArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaEnvironment>;
}
export type BetaEnvironmentsPageCursor = PageCursor<BetaEnvironment>;
/**
* `cloud` environment configuration.
*/
export interface BetaCloudConfig {
/**
* Network configuration policy.
*/
networking: BetaUnrestrictedNetwork | BetaLimitedNetwork;
/**
* Package manager configuration.
*/
packages: BetaPackages;
/**
* Environment type
*/
type: 'cloud';
}
/**
* Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
export interface BetaCloudConfigParams {
/**
* Environment type
*/
type: 'cloud';
/**
* Network configuration policy. Omit on update to preserve the existing value.
*/
networking?: BetaUnrestrictedNetwork | BetaLimitedNetworkParams | null;
/**
* Specify packages (and optionally their versions) available in this environment.
*
* When versioning, use the version semantics relevant for the package manager,
* e.g. for `pip` use `package==1.0.0`. You are responsible for validating the
* package and version exist. Unversioned installs the latest.
*/
packages?: BetaPackagesParams | null;
}
/**
* Unified Environment resource for both cloud and self-hosted environments.
*/
export interface BetaEnvironment {
/**
* Environment identifier (e.g., 'env\_...')
*/
id: string;
/**
* RFC 3339 timestamp when environment was archived, or null if not archived
*/
archived_at: string | null;
/**
* `cloud` environment configuration.
*/
config: BetaCloudConfig;
/**
* RFC 3339 timestamp when environment was created
*/
created_at: string;
/**
* User-provided description for the environment
*/
description: string;
/**
* User-provided metadata key-value pairs
*/
metadata: {
[key: string]: string;
};
/**
* Human-readable name for the environment
*/
name: string;
/**
* The type of object (always 'environment')
*/
type: 'environment';
/**
* RFC 3339 timestamp when environment was last updated
*/
updated_at: string;
}
/**
* Response after deleting an environment.
*/
export interface BetaEnvironmentDeleteResponse {
/**
* Environment identifier
*/
id: string;
/**
* The type of response
*/
type: 'environment_deleted';
}
/**
* Limited network access.
*/
export interface BetaLimitedNetwork {
/**
* Permits outbound access to MCP server endpoints configured on the agent, beyond
* those listed in the `allowed_hosts` array.
*/
allow_mcp_servers: boolean;
/**
* Permits outbound access to public package registries (PyPI, npm, etc.) beyond
* those listed in the `allowed_hosts` array.
*/
allow_package_managers: boolean;
/**
* Specifies domains the container can reach.
*/
allowed_hosts: Array<string>;
/**
* Network policy type
*/
type: 'limited';
}
/**
* Limited network request params.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
export interface BetaLimitedNetworkParams {
/**
* Network policy type
*/
type: 'limited';
/**
* Permits outbound access to MCP server endpoints configured on the agent, beyond
* those listed in the `allowed_hosts` array. Defaults to `false`.
*/
allow_mcp_servers?: boolean | null;
/**
* Permits outbound access to public package registries (PyPI, npm, etc.) beyond
* those listed in the `allowed_hosts` array. Defaults to `false`.
*/
allow_package_managers?: boolean | null;
/**
* Specifies domains the container can reach.
*/
allowed_hosts?: Array<string> | null;
}
/**
* Packages (and their versions) available in this environment.
*/
export interface BetaPackages {
/**
* Ubuntu/Debian packages to install
*/
apt: Array<string>;
/**
* Rust packages to install
*/
cargo: Array<string>;
/**
* Ruby packages to install
*/
gem: Array<string>;
/**
* Go packages to install
*/
go: Array<string>;
/**
* Node.js packages to install
*/
npm: Array<string>;
/**
* Python packages to install
*/
pip: Array<string>;
/**
* Package configuration type
*/
type?: 'packages';
}
/**
* Specify packages (and optionally their versions) available in this environment.
*
* When versioning, use the version semantics relevant for the package manager,
* e.g. for `pip` use `package==1.0.0`. You are responsible for validating the
* package and version exist. Unversioned installs the latest.
*/
export interface BetaPackagesParams {
/**
* Ubuntu/Debian packages to install
*/
apt?: Array<string> | null;
/**
* Rust packages to install
*/
cargo?: Array<string> | null;
/**
* Ruby packages to install
*/
gem?: Array<string> | null;
/**
* Go packages to install
*/
go?: Array<string> | null;
/**
* Node.js packages to install
*/
npm?: Array<string> | null;
/**
* Python packages to install
*/
pip?: Array<string> | null;
/**
* Package configuration type
*/
type?: 'packages';
}
/**
* Unrestricted network access.
*/
export interface BetaUnrestrictedNetwork {
/**
* Network policy type
*/
type: 'unrestricted';
}
export interface EnvironmentCreateParams {
/**
* Body param: Human-readable name for the environment
*/
name: string;
/**
* Body param: Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
config?: BetaCloudConfigParams | null;
/**
* Body param: Optional description of the environment
*/
description?: string | null;
/**
* Body param: User-provided metadata key-value pairs
*/
metadata?: {
[key: string]: string;
};
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentUpdateParams {
/**
* Body param: Request params for `cloud` environment configuration.
*
* Fields default to null; on update, omitted fields preserve the existing value.
*/
config?: BetaCloudConfigParams | null;
/**
* Body param: Updated description of the environment
*/
description?: string | null;
/**
* Body param: User-provided metadata key-value pairs. Set a value to null or empty
* string to delete the key.
*/
metadata?: {
[key: string]: string | null;
};
/**
* Body param: Updated name for the environment
*/
name?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentListParams extends PageCursorParams {
/**
* Query param: Include archived environments in the response
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface EnvironmentArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Environments {
export { type BetaCloudConfig as BetaCloudConfig, type BetaCloudConfigParams as BetaCloudConfigParams, type BetaEnvironment as BetaEnvironment, type BetaEnvironmentDeleteResponse as BetaEnvironmentDeleteResponse, type BetaLimitedNetwork as BetaLimitedNetwork, type BetaLimitedNetworkParams as BetaLimitedNetworkParams, type BetaPackages as BetaPackages, type BetaPackagesParams as BetaPackagesParams, type BetaUnrestrictedNetwork as BetaUnrestrictedNetwork, type BetaEnvironmentsPageCursor as BetaEnvironmentsPageCursor, type EnvironmentCreateParams as EnvironmentCreateParams, type EnvironmentRetrieveParams as EnvironmentRetrieveParams, type EnvironmentUpdateParams as EnvironmentUpdateParams, type EnvironmentListParams as EnvironmentListParams, type EnvironmentDeleteParams as EnvironmentDeleteParams, type EnvironmentArchiveParams as EnvironmentArchiveParams, };
}
//# sourceMappingURL=environments.d.ts.map
File diff suppressed because one or more lines are too long
+142
View File
@@ -0,0 +1,142 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Environments = void 0;
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const headers_1 = require("../../internal/headers.js");
const path_1 = require("../../internal/utils/path.js");
class Environments extends resource_1.APIResource {
/**
* Create a new environment with the specified configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.create({
* name: 'python-data-analysis',
* });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/environments?beta=true', {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a specific environment by ID.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.retrieve(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
retrieve(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get((0, path_1.path) `/v1/environments/${environmentID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update an existing environment's configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.update(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
update(environmentID, params, options) {
const { betas, ...body } = params;
return this._client.post((0, path_1.path) `/v1/environments/${environmentID}?beta=true`, {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List environments with pagination support.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaEnvironment of client.beta.environments.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/environments?beta=true', (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Delete an environment by ID. Returns a confirmation of the deletion.
*
* @example
* ```ts
* const betaEnvironmentDeleteResponse =
* await client.beta.environments.delete(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
delete(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete((0, path_1.path) `/v1/environments/${environmentID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive an environment by ID. Archived environments cannot be used to create new
* sessions.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.archive(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
archive(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post((0, path_1.path) `/v1/environments/${environmentID}/archive?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.Environments = Environments;
//# sourceMappingURL=environments.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"environments.js","sourceRoot":"","sources":["../../src/resources/beta/environments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAAuF;AACvF,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;OAUG;IACH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,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oBAAoB,aAAa,oBAAoB,EAAE;YAClF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3JD,oCA2JC"}
+138
View File
@@ -0,0 +1,138 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { PageCursor } from "../../core/pagination.mjs";
import { buildHeaders } from "../../internal/headers.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Environments extends APIResource {
/**
* Create a new environment with the specified configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.create({
* name: 'python-data-analysis',
* });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/environments?beta=true', {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a specific environment by ID.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.retrieve(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
retrieve(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get(path `/v1/environments/${environmentID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update an existing environment's configuration.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.update(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
update(environmentID, params, options) {
const { betas, ...body } = params;
return this._client.post(path `/v1/environments/${environmentID}?beta=true`, {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List environments with pagination support.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaEnvironment of client.beta.environments.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/environments?beta=true', (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Delete an environment by ID. Returns a confirmation of the deletion.
*
* @example
* ```ts
* const betaEnvironmentDeleteResponse =
* await client.beta.environments.delete(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
delete(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete(path `/v1/environments/${environmentID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive an environment by ID. Archived environments cannot be used to create new
* sessions.
*
* @example
* ```ts
* const betaEnvironment =
* await client.beta.environments.archive(
* 'env_011CZkZ9X2dpNyB7HsEFoRfW',
* );
* ```
*/
archive(environmentID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post(path `/v1/environments/${environmentID}/archive?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
//# sourceMappingURL=environments.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"environments.mjs","sourceRoot":"","sources":["../../src/resources/beta/environments.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;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oBAAoB,EAAE;YAClF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
+171
View File
@@ -0,0 +1,171 @@
import { APIResource } from "../../core/resource.mjs";
import * as BetaAPI from "./beta.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs";
import { type Uploadable } from "../../core/uploads.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class Files extends APIResource {
/**
* List Files
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const fileMetadata of client.beta.files.list()) {
* // ...
* }
* ```
*/
list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPage, FileMetadata>;
/**
* Delete File
*
* @example
* ```ts
* const deletedFile = await client.beta.files.delete(
* 'file_id',
* );
* ```
*/
delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise<DeletedFile>;
/**
* Download File
*
* @example
* ```ts
* const response = await client.beta.files.download(
* 'file_id',
* );
*
* const content = await response.blob();
* console.log(content);
* ```
*/
download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
/**
* Get File Metadata
*
* @example
* ```ts
* const fileMetadata =
* await client.beta.files.retrieveMetadata('file_id');
* ```
*/
retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise<FileMetadata>;
/**
* Upload File
*
* @example
* ```ts
* const fileMetadata = await client.beta.files.upload({
* file: fs.createReadStream('path/to/file'),
* });
* ```
*/
upload(params: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
}
export type FileMetadataPage = Page<FileMetadata>;
export interface BetaFileScope {
/**
* The ID of the scoping resource (e.g., the session ID).
*/
id: string;
/**
* The type of scope (e.g., `"session"`).
*/
type: 'session';
}
export interface DeletedFile {
/**
* ID of the deleted file.
*/
id: string;
/**
* Deleted object type.
*
* For file deletion, this is always `"file_deleted"`.
*/
type?: 'file_deleted';
}
export interface FileMetadata {
/**
* Unique object identifier.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* RFC 3339 datetime string representing when the file was created.
*/
created_at: string;
/**
* Original filename of the uploaded file.
*/
filename: string;
/**
* MIME type of the file.
*/
mime_type: string;
/**
* Size of the file in bytes.
*/
size_bytes: number;
/**
* Object type.
*
* For files, this is always `"file"`.
*/
type: 'file';
/**
* Whether the file can be downloaded.
*/
downloadable?: boolean;
/**
* The scope of this file, indicating the context in which it was created (e.g., a
* session).
*/
scope?: BetaFileScope | null;
}
export interface FileListParams extends PageParams {
/**
* Query param: Filter by scope ID. Only returns files associated with the
* specified scope (e.g., a session ID).
*/
scope_id?: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileDownloadParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileRetrieveMetadataParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileUploadParams {
/**
* Body param: The file to upload
*/
file: Uploadable;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Files {
export { type BetaFileScope as BetaFileScope, type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, };
}
//# sourceMappingURL=files.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OACtC,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAKzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,MAAM,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gBAAgB,EAAE,YAAY,CAAC;IAY9C;;;;;;;;;OASG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;IAW1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC;IAevB;;;;;;;;OAQG;IACH,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAW3B;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;CAmBrF;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH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AAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
+171
View File
@@ -0,0 +1,171 @@
import { APIResource } from "../../core/resource.js";
import * as BetaAPI from "./beta.js";
import { APIPromise } from "../../core/api-promise.js";
import { Page, type PageParams, PagePromise } from "../../core/pagination.js";
import { type Uploadable } from "../../core/uploads.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class Files extends APIResource {
/**
* List Files
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const fileMetadata of client.beta.files.list()) {
* // ...
* }
* ```
*/
list(params?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileMetadataPage, FileMetadata>;
/**
* Delete File
*
* @example
* ```ts
* const deletedFile = await client.beta.files.delete(
* 'file_id',
* );
* ```
*/
delete(fileID: string, params?: FileDeleteParams | null | undefined, options?: RequestOptions): APIPromise<DeletedFile>;
/**
* Download File
*
* @example
* ```ts
* const response = await client.beta.files.download(
* 'file_id',
* );
*
* const content = await response.blob();
* console.log(content);
* ```
*/
download(fileID: string, params?: FileDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
/**
* Get File Metadata
*
* @example
* ```ts
* const fileMetadata =
* await client.beta.files.retrieveMetadata('file_id');
* ```
*/
retrieveMetadata(fileID: string, params?: FileRetrieveMetadataParams | null | undefined, options?: RequestOptions): APIPromise<FileMetadata>;
/**
* Upload File
*
* @example
* ```ts
* const fileMetadata = await client.beta.files.upload({
* file: fs.createReadStream('path/to/file'),
* });
* ```
*/
upload(params: FileUploadParams, options?: RequestOptions): APIPromise<FileMetadata>;
}
export type FileMetadataPage = Page<FileMetadata>;
export interface BetaFileScope {
/**
* The ID of the scoping resource (e.g., the session ID).
*/
id: string;
/**
* The type of scope (e.g., `"session"`).
*/
type: 'session';
}
export interface DeletedFile {
/**
* ID of the deleted file.
*/
id: string;
/**
* Deleted object type.
*
* For file deletion, this is always `"file_deleted"`.
*/
type?: 'file_deleted';
}
export interface FileMetadata {
/**
* Unique object identifier.
*
* The format and length of IDs may change over time.
*/
id: string;
/**
* RFC 3339 datetime string representing when the file was created.
*/
created_at: string;
/**
* Original filename of the uploaded file.
*/
filename: string;
/**
* MIME type of the file.
*/
mime_type: string;
/**
* Size of the file in bytes.
*/
size_bytes: number;
/**
* Object type.
*
* For files, this is always `"file"`.
*/
type: 'file';
/**
* Whether the file can be downloaded.
*/
downloadable?: boolean;
/**
* The scope of this file, indicating the context in which it was created (e.g., a
* session).
*/
scope?: BetaFileScope | null;
}
export interface FileListParams extends PageParams {
/**
* Query param: Filter by scope ID. Only returns files associated with the
* specified scope (e.g., a session ID).
*/
scope_id?: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileDownloadParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileRetrieveMetadataParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface FileUploadParams {
/**
* Body param: The file to upload
*/
file: Uploadable;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Files {
export { type BetaFileScope as BetaFileScope, type DeletedFile as DeletedFile, type FileMetadata as FileMetadata, type FileMetadataPage as FileMetadataPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileDownloadParams as FileDownloadParams, type FileRetrieveMetadataParams as FileRetrieveMetadataParams, type FileUploadParams as FileUploadParams, };
}
//# sourceMappingURL=files.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE;OACtC,EAAE,KAAK,UAAU,EAAE;OAEnB,EAAE,cAAc,EAAE;AAKzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,MAAM,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gBAAgB,EAAE,YAAY,CAAC;IAY9C;;;;;;;;;OASG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;IAW1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC;IAevB;;;;;;;;OAQG;IACH,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAW3B;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU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AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
+124
View File
@@ -0,0 +1,124 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Files = void 0;
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const headers_1 = require("../../internal/headers.js");
const stainless_helper_header_1 = require("../../lib/stainless-helper-header.js");
const uploads_1 = require("../../internal/uploads.js");
const path_1 = require("../../internal/utils/path.js");
class Files extends resource_1.APIResource {
/**
* List Files
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const fileMetadata of client.beta.files.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/files?beta=true', (pagination_1.Page), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Delete File
*
* @example
* ```ts
* const deletedFile = await client.beta.files.delete(
* 'file_id',
* );
* ```
*/
delete(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete((0, path_1.path) `/v1/files/${fileID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Download File
*
* @example
* ```ts
* const response = await client.beta.files.download(
* 'file_id',
* );
*
* const content = await response.blob();
* console.log(content);
* ```
*/
download(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get((0, path_1.path) `/v1/files/${fileID}/content?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{
'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString(),
Accept: 'application/binary',
},
options?.headers,
]),
__binaryResponse: true,
});
}
/**
* Get File Metadata
*
* @example
* ```ts
* const fileMetadata =
* await client.beta.files.retrieveMetadata('file_id');
* ```
*/
retrieveMetadata(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get((0, path_1.path) `/v1/files/${fileID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Upload File
*
* @example
* ```ts
* const fileMetadata = await client.beta.files.upload({
* file: fs.createReadStream('path/to/file'),
* });
* ```
*/
upload(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/files?beta=true', (0, uploads_1.multipartFormRequestOptions)({
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
(0, stainless_helper_header_1.stainlessHelperHeaderFromFile)(body.file),
options?.headers,
]),
}, this._client));
}
}
exports.Files = Files;
//# sourceMappingURL=files.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA2E;AAE3E,uDAAsD;AAEtD,kFAAkF;AAClF,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;I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AAzID,sBAyIC"}
+120
View File
@@ -0,0 +1,120 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { Page } from "../../core/pagination.mjs";
import { buildHeaders } from "../../internal/headers.mjs";
import { stainlessHelperHeaderFromFile } from "../../lib/stainless-helper-header.mjs";
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Files extends APIResource {
/**
* List Files
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const fileMetadata of client.beta.files.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/files?beta=true', (Page), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Delete File
*
* @example
* ```ts
* const deletedFile = await client.beta.files.delete(
* 'file_id',
* );
* ```
*/
delete(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete(path `/v1/files/${fileID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Download File
*
* @example
* ```ts
* const response = await client.beta.files.download(
* 'file_id',
* );
*
* const content = await response.blob();
* console.log(content);
* ```
*/
download(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get(path `/v1/files/${fileID}/content?beta=true`, {
...options,
headers: buildHeaders([
{
'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString(),
Accept: 'application/binary',
},
options?.headers,
]),
__binaryResponse: true,
});
}
/**
* Get File Metadata
*
* @example
* ```ts
* const fileMetadata =
* await client.beta.files.retrieveMetadata('file_id');
* ```
*/
retrieveMetadata(fileID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get(path `/v1/files/${fileID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
options?.headers,
]),
});
}
/**
* Upload File
*
* @example
* ```ts
* const fileMetadata = await client.beta.files.upload({
* file: fs.createReadStream('path/to/file'),
* });
* ```
*/
upload(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/files?beta=true', multipartFormRequestOptions({
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'files-api-2025-04-14'].toString() },
stainlessHelperHeaderFromFile(body.file),
options?.headers,
]),
}, this._client));
}
}
//# sourceMappingURL=files.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/beta/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAgC;OAEtC,EAAE,YAAY,EAAE;OAEhB,EAAE,6BAA6B,EAAE;OACjC,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,IAAI,CACF,SAA4C,EAAE,EAC9C,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,IAAkB,CAAA,EAAE;YACxE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,MAAc,EACd,SAA8C,EAAE,EAChD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,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AE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAElC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,qBAAqB,EACrB,2BAA2B,CACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAsB,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC3E,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC;gBACxC,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;CACF"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+29
View File
@@ -0,0 +1,29 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Webhooks = exports.Vaults = exports.UserProfiles = exports.Skills = exports.Sessions = exports.Models = exports.Messages = exports.MemoryStores = exports.Files = exports.Environments = exports.Beta = exports.Agents = void 0;
var index_1 = require("./agents/index.js");
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return index_1.Agents; } });
var beta_1 = require("./beta.js");
Object.defineProperty(exports, "Beta", { enumerable: true, get: function () { return beta_1.Beta; } });
var environments_1 = require("./environments.js");
Object.defineProperty(exports, "Environments", { enumerable: true, get: function () { return environments_1.Environments; } });
var files_1 = require("./files.js");
Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } });
var index_2 = require("./memory-stores/index.js");
Object.defineProperty(exports, "MemoryStores", { enumerable: true, get: function () { return index_2.MemoryStores; } });
var index_3 = require("./messages/index.js");
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return index_3.Messages; } });
var models_1 = require("./models.js");
Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } });
var index_4 = require("./sessions/index.js");
Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return index_4.Sessions; } });
var index_5 = require("./skills/index.js");
Object.defineProperty(exports, "Skills", { enumerable: true, get: function () { return index_5.Skills; } });
var user_profiles_1 = require("./user-profiles.js");
Object.defineProperty(exports, "UserProfiles", { enumerable: true, get: function () { return user_profiles_1.UserProfiles; } });
var index_6 = require("./vaults/index.js");
Object.defineProperty(exports, "Vaults", { enumerable: true, get: function () { return index_6.Vaults; } });
var webhooks_1 = require("./webhooks.js");
Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2CAwCwB;AAvCtB,+FAAA,MAAM,OAAA;AAwCR,kCAcgB;AAbd,4FAAA,IAAI,OAAA;AAcN,kDAkBwB;AAjBtB,4GAAA,YAAY,OAAA;AAkBd,oCAWiB;AAVf,8FAAA,KAAK,OAAA;AAWP,kDAW+B;AAV7B,qGAAA,YAAY,OAAA;AAWd,6CAiO0B;AAhOxB,iGAAA,QAAQ,OAAA;AAiOV,sCAYkB;AAXhB,gGAAA,MAAM,OAAA;AAYR,6CA0B0B;AAzBxB,iGAAA,QAAQ,OAAA;AA0BV,2CAWwB;AAVtB,+FAAA,MAAM,OAAA;AAWR,oDAWyB;AAVvB,6GAAA,YAAY,OAAA;AAWd,2CAWwB;AAVtB,+FAAA,MAAM,OAAA;AAWR,0CA2BoB;AA1BlB,oGAAA,QAAQ,OAAA"}
+14
View File
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Agents, } from "./agents/index.mjs";
export { Beta, } from "./beta.mjs";
export { Environments, } from "./environments.mjs";
export { Files, } from "./files.mjs";
export { MemoryStores, } from "./memory-stores/index.mjs";
export { Messages, } from "./messages/index.mjs";
export { Models, } from "./models.mjs";
export { Sessions, } from "./sessions/index.mjs";
export { Skills, } from "./skills/index.mjs";
export { UserProfiles, } from "./user-profiles.mjs";
export { Vaults, } from "./vaults/index.mjs";
export { Webhooks, } from "./webhooks.mjs";
//# sourceMappingURL=index.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/beta/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAuCP;OACM,EACL,IAAI,GAaL;OACM,EACL,YAAY,GAiBb;OACM,EACL,KAAK,GAUN;OACM,EACL,YAAY,GAUb;OACM,EACL,QAAQ,GAgOT;OACM,EACL,MAAM,GAWP;OACM,EACL,QAAQ,GAyBT;OACM,EACL,MAAM,GAUP;OACM,EACL,YAAY,GAUb;OACM,EACL,MAAM,GAUP;OACM,EACL,QAAQ,GA0BT"}
+2
View File
@@ -0,0 +1,2 @@
export * from "./memory-stores/index.mjs";
//# sourceMappingURL=memory-stores.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.d.mts","sourceRoot":"","sources":["../../src/resources/beta/memory-stores.ts"],"names":[],"mappings":""}
+2
View File
@@ -0,0 +1,2 @@
export * from "./memory-stores/index.js";
//# sourceMappingURL=memory-stores.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.d.ts","sourceRoot":"","sources":["../../src/resources/beta/memory-stores.ts"],"names":[],"mappings":""}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("../../internal/tslib.js");
tslib_1.__exportStar(require("./memory-stores/index.js"), exports);
//# sourceMappingURL=memory-stores.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.js","sourceRoot":"","sources":["../../src/resources/beta/memory-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mEAAsC"}
+3
View File
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export * from "./memory-stores/index.mjs";
//# sourceMappingURL=memory-stores.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.mjs","sourceRoot":"","sources":["../../src/resources/beta/memory-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,4 @@
export { Memories, type BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError, type BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition, type MemoryCreateParams, type MemoryRetrieveParams, type MemoryUpdateParams, type MemoryListParams, type MemoryDeleteParams, type BetaManagedAgentsMemoryListItemsPageCursor, } from "./memories.mjs";
export { MemoryStores, type BetaManagedAgentsDeletedMemoryStore, type BetaManagedAgentsMemoryStore, type MemoryStoreCreateParams, type MemoryStoreRetrieveParams, type MemoryStoreUpdateParams, type MemoryStoreListParams, type MemoryStoreDeleteParams, type MemoryStoreArchiveParams, type BetaManagedAgentsMemoryStoresPageCursor, } from "./memory-stores.mjs";
export { MemoryVersions, type BetaManagedAgentsActor, type BetaManagedAgentsAPIActor, type BetaManagedAgentsMemoryVersion, type BetaManagedAgentsMemoryVersionOperation, type BetaManagedAgentsSessionActor, type BetaManagedAgentsUserActor, type MemoryVersionRetrieveParams, type MemoryVersionListParams, type MemoryVersionRedactParams, type BetaManagedAgentsMemoryVersionsPageCursor, } from "./memory-versions.mjs";
//# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,8BAA8B,EACnC,KAAK,0CAA0C,EAC/C,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,8CAA8C,EACnD,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0CAA0C,GAChD;OACM,EACL,YAAY,EACZ,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uCAAuC,GAC7C;OACM,EACL,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,yCAAyC,GAC/C"}
@@ -0,0 +1,4 @@
export { Memories, type BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError, type BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition, type MemoryCreateParams, type MemoryRetrieveParams, type MemoryUpdateParams, type MemoryListParams, type MemoryDeleteParams, type BetaManagedAgentsMemoryListItemsPageCursor, } from "./memories.js";
export { MemoryStores, type BetaManagedAgentsDeletedMemoryStore, type BetaManagedAgentsMemoryStore, type MemoryStoreCreateParams, type MemoryStoreRetrieveParams, type MemoryStoreUpdateParams, type MemoryStoreListParams, type MemoryStoreDeleteParams, type MemoryStoreArchiveParams, type BetaManagedAgentsMemoryStoresPageCursor, } from "./memory-stores.js";
export { MemoryVersions, type BetaManagedAgentsActor, type BetaManagedAgentsAPIActor, type BetaManagedAgentsMemoryVersion, type BetaManagedAgentsMemoryVersionOperation, type BetaManagedAgentsSessionActor, type BetaManagedAgentsUserActor, type MemoryVersionRetrieveParams, type MemoryVersionListParams, type MemoryVersionRedactParams, type BetaManagedAgentsMemoryVersionsPageCursor, } from "./memory-versions.js";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,8BAA8B,EACnC,KAAK,0CAA0C,EAC/C,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,8CAA8C,EACnD,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0CAA0C,GAChD;OACM,EACL,YAAY,EACZ,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uCAAuC,GAC7C;OACM,EACL,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,yCAAyC,GAC/C"}
+11
View File
@@ -0,0 +1,11 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryVersions = exports.MemoryStores = exports.Memories = void 0;
var memories_1 = require("./memories.js");
Object.defineProperty(exports, "Memories", { enumerable: true, get: function () { return memories_1.Memories; } });
var memory_stores_1 = require("./memory-stores.js");
Object.defineProperty(exports, "MemoryStores", { enumerable: true, get: function () { return memory_stores_1.MemoryStores; } });
var memory_versions_1 = require("./memory-versions.js");
Object.defineProperty(exports, "MemoryVersions", { enumerable: true, get: function () { return memory_versions_1.MemoryVersions; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAmBoB;AAlBlB,oGAAA,QAAQ,OAAA;AAmBV,oDAWyB;AAVvB,6GAAA,YAAY,OAAA;AAWd,wDAY2B;AAXzB,iHAAA,cAAc,OAAA"}
@@ -0,0 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Memories, } from "./memories.mjs";
export { MemoryStores, } from "./memory-stores.mjs";
export { MemoryVersions, } from "./memory-versions.mjs";
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAkBT;OACM,EACL,YAAY,GAUb;OACM,EACL,cAAc,GAWf"}
@@ -0,0 +1,347 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Memories extends APIResource {
/**
* Create a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.create(
* 'memory_store_id',
* { content: 'content', path: 'xx' },
* );
* ```
*/
create(memoryStoreID: string, params: MemoryCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* Retrieve a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.retrieve(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryID: string, params: MemoryRetrieveParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* Update a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.update(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
update(memoryID: string, params: MemoryUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* List memories
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryListItem of client.beta.memoryStores.memories.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID: string, params?: MemoryListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryListItemsPageCursor, BetaManagedAgentsMemoryListItem>;
/**
* Delete a memory
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemory =
* await client.beta.memoryStores.memories.delete(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
delete(memoryID: string, params: MemoryDeleteParams, options?: RequestOptions): APIPromise<BetaManagedAgentsDeletedMemory>;
}
export type BetaManagedAgentsMemoryListItemsPageCursor = PageCursor<BetaManagedAgentsMemoryListItem>;
export interface BetaManagedAgentsConflictError {
type: 'conflict_error';
message?: string;
}
/**
* Optimistic-concurrency precondition: the update applies only if the memory's
* stored `content_sha256` equals the supplied value. On mismatch, the request
* returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and
* retry against the fresh state. If the precondition fails but the stored state
* already exactly matches the requested `content` and `path`, the server returns
* 200 instead of 409.
*/
export interface BetaManagedAgentsContentSha256Precondition {
type: 'content_sha256';
/**
* Expected `content_sha256` of the stored memory (64 lowercase hexadecimal
* characters). Typically the `content_sha256` returned by a prior read or list
* call. Because the server applies no content normalization, clients can also
* compute this locally as the SHA-256 of the UTF-8 content bytes.
*/
content_sha256?: string;
}
/**
* Tombstone returned by
* [Delete a memory](/en/api/beta/memory_stores/memories/delete). The memory's
* version history persists and remains listable via
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list) until
* the store itself is deleted.
*/
export interface BetaManagedAgentsDeletedMemory {
/**
* ID of the deleted memory (a `mem_...` value).
*/
id: string;
type: 'memory_deleted';
}
export type BetaManagedAgentsError = BetaAPI.BetaInvalidRequestError | BetaAPI.BetaAuthenticationError | BetaAPI.BetaBillingError | BetaAPI.BetaPermissionError | BetaAPI.BetaNotFoundError | BetaAPI.BetaRateLimitError | BetaAPI.BetaGatewayTimeoutError | BetaAPI.BetaAPIError | BetaAPI.BetaOverloadedError | BetaManagedAgentsMemoryPreconditionFailedError | BetaManagedAgentsMemoryPathConflictError | BetaManagedAgentsConflictError;
/**
* A `memory` object: a single text document at a hierarchical path inside a memory
* store. The `content` field is populated when `view=full` and `null` when
* `view=basic`; the `content_size_bytes` and `content_sha256` fields are always
* populated so sync clients can diff without fetching content. Memories are
* addressed by their `mem_...` ID; the path is the create key and can be changed
* via update.
*/
export interface BetaManagedAgentsMemory {
/**
* Unique identifier for this memory (a `mem_...` value). Stable across renames;
* use this ID, not the path, to read, update, or delete the memory.
*/
id: string;
/**
* Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The
* server applies no normalization, so clients can compute the same hash locally
* for staleness checks and as the value for a `content_sha256` precondition on
* update. Always populated, regardless of `view`.
*/
content_sha256: string;
/**
* Size of `content` in bytes (the UTF-8 plaintext length). Always populated,
* regardless of `view`.
*/
content_size_bytes: number;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* ID of the memory store this memory belongs to (a `memstore_...` value).
*/
memory_store_id: string;
/**
* ID of the `memory_version` representing this memory's current content (a
* `memver_...` value). This is the authoritative head pointer; `memory_version`
* objects do not carry an `is_latest` flag, so compare against this field instead.
* Enumerate the full history via
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list).
*/
memory_version_id: string;
/**
* Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`.
* Always starts with `/`. Paths are case-sensitive and unique within a store.
* Maximum 1,024 bytes.
*/
path: string;
type: 'memory';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* The memory's UTF-8 text content. Populated when `view=full`; `null` when
* `view=basic`. Maximum 100 kB (102,400 bytes).
*/
content?: string | null;
}
/**
* One item in a [List memories](/en/api/beta/memory_stores/memories/list)
* response: either a `memory` object or, when `depth` is set, a `memory_prefix`
* rollup marker.
*/
export type BetaManagedAgentsMemoryListItem = BetaManagedAgentsMemory | BetaManagedAgentsMemoryPrefix;
export interface BetaManagedAgentsMemoryPathConflictError {
type: 'memory_path_conflict_error';
conflicting_memory_id?: string;
conflicting_path?: string;
message?: string;
}
export interface BetaManagedAgentsMemoryPreconditionFailedError {
type: 'memory_precondition_failed_error';
message?: string;
}
/**
* A rolled-up directory marker returned by
* [List memories](/en/api/beta/memory_stores/memories/list) when `depth` is set.
* Indicates that one or more memories exist deeper than the requested depth under
* this prefix. This is a list-time rollup, not a stored resource; it has no ID and
* no lifecycle. Each prefix counts toward the page `limit` and interleaves with
* `memory` items in path order.
*/
export interface BetaManagedAgentsMemoryPrefix {
/**
* The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`).
* Pass this value as `path_prefix` on a subsequent list call to drill into the
* directory.
*/
path: string;
type: 'memory_prefix';
}
/**
* Selects which projection of a `memory` or `memory_version` the server returns.
* `basic` returns the object with `content` set to `null`; `full` populates
* `content`. When omitted, the default is endpoint-specific: retrieve operations
* default to `full`; list, create, and update operations default to `basic`.
* Listing with `view=full` caps `limit` at 20.
*/
export type BetaManagedAgentsMemoryView = 'basic' | 'full';
/**
* Optimistic-concurrency precondition: the update applies only if the memory's
* stored `content_sha256` equals the supplied value. On mismatch, the request
* returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and
* retry against the fresh state. If the precondition fails but the stored state
* already exactly matches the requested `content` and `path`, the server returns
* 200 instead of 409.
*/
export interface BetaManagedAgentsPrecondition {
type: 'content_sha256';
/**
* Expected `content_sha256` of the stored memory (64 lowercase hexadecimal
* characters). Typically the `content_sha256` returned by a prior read or list
* call. Because the server applies no content normalization, clients can also
* compute this locally as the SHA-256 of the UTF-8 content bytes.
*/
content_sha256?: string;
}
export interface MemoryCreateParams {
/**
* Body param: UTF-8 text content for the new memory. Maximum 100 kB (102,400
* bytes). Required; pass `""` explicitly to create an empty memory.
*/
content: string | null;
/**
* Body param: Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`.
* Must start with `/`, contain at least one non-empty segment, and be at most
* 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or
* format characters, and must be NFC-normalized. Paths are case-sensitive.
*/
path: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryRetrieveParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryUpdateParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Body param: New UTF-8 text content for the memory. Maximum 100 kB (102,400
* bytes). Omit to leave the content unchanged (e.g., for a rename-only update).
*/
content?: string | null;
/**
* Body param: New path for the memory (a rename). Must start with `/`, contain at
* least one non-empty segment, and be at most 1,024 bytes. Must not contain empty
* segments, `.` or `..` segments, control or format characters, and must be
* NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across
* renames. Omit to leave the path unchanged.
*/
path?: string | null;
/**
* Body param: Optimistic-concurrency precondition: the update applies only if the
* memory's stored `content_sha256` equals the supplied value. On mismatch, the
* request returns `memory_precondition_failed_error` (HTTP 409); re-read the
* memory and retry against the fresh state. If the precondition fails but the
* stored state already exactly matches the requested `content` and `path`, the
* server returns 200 instead of 409.
*/
precondition?: BetaManagedAgentsPrecondition;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryListParams extends PageCursorParams {
/**
* Query param: Query parameter for depth
*/
depth?: number;
/**
* Query param: Query parameter for order
*/
order?: 'asc' | 'desc';
/**
* Query param: Query parameter for order_by
*/
order_by?: string;
/**
* Query param: Optional path prefix filter (raw string-prefix match; include a
* trailing slash for directory-scoped lists). This value appears in request URLs.
* Do not include secrets or personally identifiable information.
*/
path_prefix?: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryDeleteParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for expected_content_sha256
*/
expected_content_sha256?: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Memories {
export { type BetaManagedAgentsConflictError as BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition as BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory as BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError as BetaManagedAgentsError, type BetaManagedAgentsMemory as BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem as BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError as BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError as BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix as BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView as BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition as BetaManagedAgentsPrecondition, type BetaManagedAgentsMemoryListItemsPageCursor as BetaManagedAgentsMemoryListItemsPageCursor, type MemoryCreateParams as MemoryCreateParams, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryUpdateParams as MemoryUpdateParams, type MemoryListParams as MemoryListParams, type MemoryDeleteParams as MemoryDeleteParams, };
}
//# sourceMappingURL=memories.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"memories.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memories.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAatC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAYtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB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EG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,8CAA8C,IAAI,8CAA8C,EACrG,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,347 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Memories extends APIResource {
/**
* Create a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.create(
* 'memory_store_id',
* { content: 'content', path: 'xx' },
* );
* ```
*/
create(memoryStoreID: string, params: MemoryCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* Retrieve a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.retrieve(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryID: string, params: MemoryRetrieveParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* Update a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.update(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
update(memoryID: string, params: MemoryUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemory>;
/**
* List memories
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryListItem of client.beta.memoryStores.memories.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID: string, params?: MemoryListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryListItemsPageCursor, BetaManagedAgentsMemoryListItem>;
/**
* Delete a memory
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemory =
* await client.beta.memoryStores.memories.delete(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
delete(memoryID: string, params: MemoryDeleteParams, options?: RequestOptions): APIPromise<BetaManagedAgentsDeletedMemory>;
}
export type BetaManagedAgentsMemoryListItemsPageCursor = PageCursor<BetaManagedAgentsMemoryListItem>;
export interface BetaManagedAgentsConflictError {
type: 'conflict_error';
message?: string;
}
/**
* Optimistic-concurrency precondition: the update applies only if the memory's
* stored `content_sha256` equals the supplied value. On mismatch, the request
* returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and
* retry against the fresh state. If the precondition fails but the stored state
* already exactly matches the requested `content` and `path`, the server returns
* 200 instead of 409.
*/
export interface BetaManagedAgentsContentSha256Precondition {
type: 'content_sha256';
/**
* Expected `content_sha256` of the stored memory (64 lowercase hexadecimal
* characters). Typically the `content_sha256` returned by a prior read or list
* call. Because the server applies no content normalization, clients can also
* compute this locally as the SHA-256 of the UTF-8 content bytes.
*/
content_sha256?: string;
}
/**
* Tombstone returned by
* [Delete a memory](/en/api/beta/memory_stores/memories/delete). The memory's
* version history persists and remains listable via
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list) until
* the store itself is deleted.
*/
export interface BetaManagedAgentsDeletedMemory {
/**
* ID of the deleted memory (a `mem_...` value).
*/
id: string;
type: 'memory_deleted';
}
export type BetaManagedAgentsError = BetaAPI.BetaInvalidRequestError | BetaAPI.BetaAuthenticationError | BetaAPI.BetaBillingError | BetaAPI.BetaPermissionError | BetaAPI.BetaNotFoundError | BetaAPI.BetaRateLimitError | BetaAPI.BetaGatewayTimeoutError | BetaAPI.BetaAPIError | BetaAPI.BetaOverloadedError | BetaManagedAgentsMemoryPreconditionFailedError | BetaManagedAgentsMemoryPathConflictError | BetaManagedAgentsConflictError;
/**
* A `memory` object: a single text document at a hierarchical path inside a memory
* store. The `content` field is populated when `view=full` and `null` when
* `view=basic`; the `content_size_bytes` and `content_sha256` fields are always
* populated so sync clients can diff without fetching content. Memories are
* addressed by their `mem_...` ID; the path is the create key and can be changed
* via update.
*/
export interface BetaManagedAgentsMemory {
/**
* Unique identifier for this memory (a `mem_...` value). Stable across renames;
* use this ID, not the path, to read, update, or delete the memory.
*/
id: string;
/**
* Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The
* server applies no normalization, so clients can compute the same hash locally
* for staleness checks and as the value for a `content_sha256` precondition on
* update. Always populated, regardless of `view`.
*/
content_sha256: string;
/**
* Size of `content` in bytes (the UTF-8 plaintext length). Always populated,
* regardless of `view`.
*/
content_size_bytes: number;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* ID of the memory store this memory belongs to (a `memstore_...` value).
*/
memory_store_id: string;
/**
* ID of the `memory_version` representing this memory's current content (a
* `memver_...` value). This is the authoritative head pointer; `memory_version`
* objects do not carry an `is_latest` flag, so compare against this field instead.
* Enumerate the full history via
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list).
*/
memory_version_id: string;
/**
* Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`.
* Always starts with `/`. Paths are case-sensitive and unique within a store.
* Maximum 1,024 bytes.
*/
path: string;
type: 'memory';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* The memory's UTF-8 text content. Populated when `view=full`; `null` when
* `view=basic`. Maximum 100 kB (102,400 bytes).
*/
content?: string | null;
}
/**
* One item in a [List memories](/en/api/beta/memory_stores/memories/list)
* response: either a `memory` object or, when `depth` is set, a `memory_prefix`
* rollup marker.
*/
export type BetaManagedAgentsMemoryListItem = BetaManagedAgentsMemory | BetaManagedAgentsMemoryPrefix;
export interface BetaManagedAgentsMemoryPathConflictError {
type: 'memory_path_conflict_error';
conflicting_memory_id?: string;
conflicting_path?: string;
message?: string;
}
export interface BetaManagedAgentsMemoryPreconditionFailedError {
type: 'memory_precondition_failed_error';
message?: string;
}
/**
* A rolled-up directory marker returned by
* [List memories](/en/api/beta/memory_stores/memories/list) when `depth` is set.
* Indicates that one or more memories exist deeper than the requested depth under
* this prefix. This is a list-time rollup, not a stored resource; it has no ID and
* no lifecycle. Each prefix counts toward the page `limit` and interleaves with
* `memory` items in path order.
*/
export interface BetaManagedAgentsMemoryPrefix {
/**
* The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`).
* Pass this value as `path_prefix` on a subsequent list call to drill into the
* directory.
*/
path: string;
type: 'memory_prefix';
}
/**
* Selects which projection of a `memory` or `memory_version` the server returns.
* `basic` returns the object with `content` set to `null`; `full` populates
* `content`. When omitted, the default is endpoint-specific: retrieve operations
* default to `full`; list, create, and update operations default to `basic`.
* Listing with `view=full` caps `limit` at 20.
*/
export type BetaManagedAgentsMemoryView = 'basic' | 'full';
/**
* Optimistic-concurrency precondition: the update applies only if the memory's
* stored `content_sha256` equals the supplied value. On mismatch, the request
* returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and
* retry against the fresh state. If the precondition fails but the stored state
* already exactly matches the requested `content` and `path`, the server returns
* 200 instead of 409.
*/
export interface BetaManagedAgentsPrecondition {
type: 'content_sha256';
/**
* Expected `content_sha256` of the stored memory (64 lowercase hexadecimal
* characters). Typically the `content_sha256` returned by a prior read or list
* call. Because the server applies no content normalization, clients can also
* compute this locally as the SHA-256 of the UTF-8 content bytes.
*/
content_sha256?: string;
}
export interface MemoryCreateParams {
/**
* Body param: UTF-8 text content for the new memory. Maximum 100 kB (102,400
* bytes). Required; pass `""` explicitly to create an empty memory.
*/
content: string | null;
/**
* Body param: Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`.
* Must start with `/`, contain at least one non-empty segment, and be at most
* 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or
* format characters, and must be NFC-normalized. Paths are case-sensitive.
*/
path: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryRetrieveParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryUpdateParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Body param: New UTF-8 text content for the memory. Maximum 100 kB (102,400
* bytes). Omit to leave the content unchanged (e.g., for a rename-only update).
*/
content?: string | null;
/**
* Body param: New path for the memory (a rename). Must start with `/`, contain at
* least one non-empty segment, and be at most 1,024 bytes. Must not contain empty
* segments, `.` or `..` segments, control or format characters, and must be
* NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across
* renames. Omit to leave the path unchanged.
*/
path?: string | null;
/**
* Body param: Optimistic-concurrency precondition: the update applies only if the
* memory's stored `content_sha256` equals the supplied value. On mismatch, the
* request returns `memory_precondition_failed_error` (HTTP 409); re-read the
* memory and retry against the fresh state. If the precondition fails but the
* stored state already exactly matches the requested `content` and `path`, the
* server returns 200 instead of 409.
*/
precondition?: BetaManagedAgentsPrecondition;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryListParams extends PageCursorParams {
/**
* Query param: Query parameter for depth
*/
depth?: number;
/**
* Query param: Query parameter for order
*/
order?: 'asc' | 'desc';
/**
* Query param: Query parameter for order_by
*/
order_by?: string;
/**
* Query param: Optional path prefix filter (raw string-prefix match; include a
* trailing slash for directory-scoped lists). This value appears in request URLs.
* Do not include secrets or personally identifiable information.
*/
path_prefix?: string;
/**
* Query param: Query parameter for view
*/
view?: BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryDeleteParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for expected_content_sha256
*/
expected_content_sha256?: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace Memories {
export { type BetaManagedAgentsConflictError as BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition as BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory as BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError as BetaManagedAgentsError, type BetaManagedAgentsMemory as BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem as BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError as BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError as BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix as BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView as BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition as BetaManagedAgentsPrecondition, type BetaManagedAgentsMemoryListItemsPageCursor as BetaManagedAgentsMemoryListItemsPageCursor, type MemoryCreateParams as MemoryCreateParams, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryUpdateParams as MemoryUpdateParams, type MemoryListParams as MemoryListParams, type MemoryDeleteParams as MemoryDeleteParams, };
}
//# sourceMappingURL=memories.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"memories.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memories.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAatC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAYtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAatC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0CAA0C,EAAE,+BAA+B,CAAC;IAgB3F;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAW9C;AAED,MAAM,MAAM,0C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8CAA8C,EACrG,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
+130
View File
@@ -0,0 +1,130 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Memories = void 0;
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const path_1 = require("../../../internal/utils/path.js");
class Memories extends resource_1.APIResource {
/**
* Create a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.create(
* 'memory_store_id',
* { content: 'content', path: 'xx' },
* );
* ```
*/
create(memoryStoreID, params, options) {
const { view, betas, ...body } = params;
return this._client.post((0, path_1.path) `/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
query: { view },
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.retrieve(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryID, params, options) {
const { memory_store_id, betas, ...query } = params;
return this._client.get((0, path_1.path) `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.update(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
update(memoryID, params, options) {
const { memory_store_id, view, betas, ...body } = params;
return this._client.post((0, path_1.path) `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query: { view },
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memories
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryListItem of client.beta.memoryStores.memories.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList((0, path_1.path) `/v1/memory_stores/${memoryStoreID}/memories?beta=true`, (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Delete a memory
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemory =
* await client.beta.memoryStores.memories.delete(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
delete(memoryID, params, options) {
const { memory_store_id, expected_content_sha256, betas } = params;
return this._client.delete((0, path_1.path) `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query: { expected_content_sha256 },
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.Memories = Memories;
//# sourceMappingURL=memories.js.map
@@ -0,0 +1 @@
{"version":3,"file":"memories.js","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAA0F;AAC1F,0DAAyD;AA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G,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAChF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAnJD,4BAmJC"}
@@ -0,0 +1,126 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Memories extends APIResource {
/**
* Create a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.create(
* 'memory_store_id',
* { content: 'content', path: 'xx' },
* );
* ```
*/
create(memoryStoreID, params, options) {
const { view, betas, ...body } = params;
return this._client.post(path `/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
query: { view },
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.retrieve(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryID, params, options) {
const { memory_store_id, betas, ...query } = params;
return this._client.get(path `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update a memory
*
* @example
* ```ts
* const betaManagedAgentsMemory =
* await client.beta.memoryStores.memories.update(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
update(memoryID, params, options) {
const { memory_store_id, view, betas, ...body } = params;
return this._client.post(path `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query: { view },
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memories
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryListItem of client.beta.memoryStores.memories.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList(path `/v1/memory_stores/${memoryStoreID}/memories?beta=true`, (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Delete a memory
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemory =
* await client.beta.memoryStores.memories.delete(
* 'memory_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
delete(memoryID, params, options) {
const { memory_store_id, expected_content_sha256, betas } = params;
return this._client.delete(path `/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
query: { expected_content_sha256 },
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
//# sourceMappingURL=memories.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"memories.mjs","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memories.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,aAAqB,EACrB,MAA0B,EAC1B,OAAwB;QAExB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OA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.mjs";
import * as MemoriesAPI from "./memories.mjs";
import { BetaManagedAgentsConflictError, BetaManagedAgentsContentSha256Precondition, BetaManagedAgentsDeletedMemory, BetaManagedAgentsError, BetaManagedAgentsMemory, BetaManagedAgentsMemoryListItem, BetaManagedAgentsMemoryListItemsPageCursor, BetaManagedAgentsMemoryPathConflictError, BetaManagedAgentsMemoryPreconditionFailedError, BetaManagedAgentsMemoryPrefix, BetaManagedAgentsMemoryView, BetaManagedAgentsPrecondition, Memories, MemoryCreateParams, MemoryDeleteParams, MemoryListParams, MemoryRetrieveParams, MemoryUpdateParams } from "./memories.mjs";
import * as MemoryVersionsAPI from "./memory-versions.mjs";
import { BetaManagedAgentsAPIActor, BetaManagedAgentsActor, BetaManagedAgentsMemoryVersion, BetaManagedAgentsMemoryVersionOperation, BetaManagedAgentsMemoryVersionsPageCursor, BetaManagedAgentsSessionActor, BetaManagedAgentsUserActor, MemoryVersionListParams, MemoryVersionRedactParams, MemoryVersionRetrieveParams, MemoryVersions } from "./memory-versions.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class MemoryStores extends APIResource {
memories: MemoriesAPI.Memories;
memoryVersions: MemoryVersionsAPI.MemoryVersions;
/**
* Create a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.create({ name: 'x' });
* ```
*/
create(params: MemoryStoreCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* Retrieve a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.retrieve(
* 'memory_store_id',
* );
* ```
*/
retrieve(memoryStoreID: string, params?: MemoryStoreRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* Update a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.update('memory_store_id');
* ```
*/
update(memoryStoreID: string, params: MemoryStoreUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* List memory stores
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryStore of client.beta.memoryStores.list()) {
* // ...
* }
* ```
*/
list(params?: MemoryStoreListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryStoresPageCursor, BetaManagedAgentsMemoryStore>;
/**
* Delete a memory store
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemoryStore =
* await client.beta.memoryStores.delete('memory_store_id');
* ```
*/
delete(memoryStoreID: string, params?: MemoryStoreDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsDeletedMemoryStore>;
/**
* Archive a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.archive('memory_store_id');
* ```
*/
archive(memoryStoreID: string, params?: MemoryStoreArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
}
export type BetaManagedAgentsMemoryStoresPageCursor = PageCursor<BetaManagedAgentsMemoryStore>;
/**
* Confirmation that a `memory_store` was deleted.
*/
export interface BetaManagedAgentsDeletedMemoryStore {
/**
* ID of the deleted memory store (a `memstore_...` identifier). The store and all
* its memories and versions are no longer retrievable.
*/
id: string;
type: 'memory_store_deleted';
}
/**
* A `memory_store`: a named container for agent memories, scoped to a workspace.
* Attach a store to a session via `resources[]` to mount it as a directory the
* agent can read and write.
*/
export interface BetaManagedAgentsMemoryStore {
/**
* Unique identifier for the memory store (a `memstore_...` tagged ID). Use this
* when attaching the store to a session, or in the `{memory_store_id}` path
* parameter of subsequent calls.
*/
id: string;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* Human-readable name for the store. 1–255 characters. The store's mount-path slug
* under `/mnt/memory/` is derived from this name.
*/
name: string;
type: 'memory_store';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* A timestamp in RFC 3339 format
*/
archived_at?: string | null;
/**
* Free-text description of what the store contains, up to 1024 characters.
* Included in the agent's system prompt when the store is attached, so word it to
* be useful to the agent. Empty string when unset.
*/
description?: string;
/**
* Arbitrary key-value tags for your own bookkeeping (such as the end user a store
* belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.
* Returned on retrieve/list but not filterable.
*/
metadata?: {
[key: string]: string;
};
}
export interface MemoryStoreCreateParams {
/**
* Body param: Human-readable name for the store. Required; 1–255 characters; no
* control characters. The mount-path slug under `/mnt/memory/` is derived from
* this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need
* not be unique within a workspace.
*/
name: string;
/**
* Body param: Free-text description of what the store contains, up to 1024
* characters. Included in the agent's system prompt when the store is attached, so
* word it to be useful to the agent.
*/
description?: string;
/**
* Body param: Arbitrary key-value tags for your own bookkeeping (such as the end
* user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512
* characters. Not visible to the agent.
*/
metadata?: {
[key: string]: string;
};
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreUpdateParams {
/**
* Body param: New description for the store, up to 1024 characters. Pass an empty
* string to clear it.
*/
description?: string | null;
/**
* Body param: Metadata patch. Set a key to a string to upsert it, or to null to
* delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up
* to 64 chars each) with values up to 512 chars.
*/
metadata?: {
[key: string]: string | null;
} | null;
/**
* Body param: New human-readable name for the store. 1–255 characters; no control
* characters. Renaming changes the slug used for the store's `mount_path` in
* sessions created after the update.
*/
name?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreListParams extends PageCursorParams {
/**
* Query param: Return only stores whose `created_at` is at or after this time
* (inclusive). Sent on the wire as `created_at[gte]`.
*/
'created_at[gte]'?: string;
/**
* Query param: Return only stores whose `created_at` is at or before this time
* (inclusive). Sent on the wire as `created_at[lte]`.
*/
'created_at[lte]'?: string;
/**
* Query param: When `true`, archived stores are included in the results. Defaults
* to `false` (archived stores are excluded).
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace MemoryStores {
export { type BetaManagedAgentsDeletedMemoryStore as BetaManagedAgentsDeletedMemoryStore, type BetaManagedAgentsMemoryStore as BetaManagedAgentsMemoryStore, type BetaManagedAgentsMemoryStoresPageCursor as BetaManagedAgentsMemoryStoresPageCursor, type MemoryStoreCreateParams as MemoryStoreCreateParams, type MemoryStoreRetrieveParams as MemoryStoreRetrieveParams, type MemoryStoreUpdateParams as MemoryStoreUpdateParams, type MemoryStoreListParams as MemoryStoreListParams, type MemoryStoreDeleteParams as MemoryStoreDeleteParams, type MemoryStoreArchiveParams as MemoryStoreArchiveParams, };
export { Memories as Memories, type BetaManagedAgentsConflictError as BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition as BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory as BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError as BetaManagedAgentsError, type BetaManagedAgentsMemory as BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem as BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError as BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError as BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix as BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView as BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition as BetaManagedAgentsPrecondition, type BetaManagedAgentsMemoryListItemsPageCursor as BetaManagedAgentsMemoryListItemsPageCursor, type MemoryCreateParams as MemoryCreateParams, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryUpdateParams as MemoryUpdateParams, type MemoryListParams as MemoryListParams, type MemoryDeleteParams as MemoryDeleteParams, };
export { MemoryVersions as MemoryVersions, type BetaManagedAgentsActor as BetaManagedAgentsActor, type BetaManagedAgentsAPIActor as BetaManagedAgentsAPIActor, type BetaManagedAgentsMemoryVersion as BetaManagedAgentsMemoryVersion, type BetaManagedAgentsMemoryVersionOperation as BetaManagedAgentsMemoryVersionOperation, type BetaManagedAgentsSessionActor as BetaManagedAgentsSessionActor, type BetaManagedAgentsUserActor as BetaManagedAgentsUserActor, type BetaManagedAgentsMemoryVersionsPageCursor as BetaManagedAgentsMemoryVersionsPageCursor, type MemoryVersionRetrieveParams as MemoryVersionRetrieveParams, type MemoryVersionListParams as MemoryVersionListParams, type MemoryVersionRedactParams as MemoryVersionRedactParams, };
}
//# sourceMappingURL=memory-stores.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EACL,8BAA8B,EAC9B,0CAA0C,EAC1C,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,EAC/B,0CAA0C,EAC1C,wCAAwC,EACxC,8CAA8C,EAC9C,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EACnB;OACM,KAAK,iBAAiB;OACtB,EACL,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,E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AA0C,IAAI,0CAA0C,EAC7F,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,8CAA8C,IAAI,8CAA8C,EACrG,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,cAAc,IAAI,cAAc,EAChC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,231 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import * as MemoriesAPI from "./memories.js";
import { BetaManagedAgentsConflictError, BetaManagedAgentsContentSha256Precondition, BetaManagedAgentsDeletedMemory, BetaManagedAgentsError, BetaManagedAgentsMemory, BetaManagedAgentsMemoryListItem, BetaManagedAgentsMemoryListItemsPageCursor, BetaManagedAgentsMemoryPathConflictError, BetaManagedAgentsMemoryPreconditionFailedError, BetaManagedAgentsMemoryPrefix, BetaManagedAgentsMemoryView, BetaManagedAgentsPrecondition, Memories, MemoryCreateParams, MemoryDeleteParams, MemoryListParams, MemoryRetrieveParams, MemoryUpdateParams } from "./memories.js";
import * as MemoryVersionsAPI from "./memory-versions.js";
import { BetaManagedAgentsAPIActor, BetaManagedAgentsActor, BetaManagedAgentsMemoryVersion, BetaManagedAgentsMemoryVersionOperation, BetaManagedAgentsMemoryVersionsPageCursor, BetaManagedAgentsSessionActor, BetaManagedAgentsUserActor, MemoryVersionListParams, MemoryVersionRedactParams, MemoryVersionRetrieveParams, MemoryVersions } from "./memory-versions.js";
import { APIPromise } from "../../../core/api-promise.js";
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class MemoryStores extends APIResource {
memories: MemoriesAPI.Memories;
memoryVersions: MemoryVersionsAPI.MemoryVersions;
/**
* Create a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.create({ name: 'x' });
* ```
*/
create(params: MemoryStoreCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* Retrieve a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.retrieve(
* 'memory_store_id',
* );
* ```
*/
retrieve(memoryStoreID: string, params?: MemoryStoreRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* Update a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.update('memory_store_id');
* ```
*/
update(memoryStoreID: string, params: MemoryStoreUpdateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
/**
* List memory stores
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryStore of client.beta.memoryStores.list()) {
* // ...
* }
* ```
*/
list(params?: MemoryStoreListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryStoresPageCursor, BetaManagedAgentsMemoryStore>;
/**
* Delete a memory store
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemoryStore =
* await client.beta.memoryStores.delete('memory_store_id');
* ```
*/
delete(memoryStoreID: string, params?: MemoryStoreDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsDeletedMemoryStore>;
/**
* Archive a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.archive('memory_store_id');
* ```
*/
archive(memoryStoreID: string, params?: MemoryStoreArchiveParams | null | undefined, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryStore>;
}
export type BetaManagedAgentsMemoryStoresPageCursor = PageCursor<BetaManagedAgentsMemoryStore>;
/**
* Confirmation that a `memory_store` was deleted.
*/
export interface BetaManagedAgentsDeletedMemoryStore {
/**
* ID of the deleted memory store (a `memstore_...` identifier). The store and all
* its memories and versions are no longer retrievable.
*/
id: string;
type: 'memory_store_deleted';
}
/**
* A `memory_store`: a named container for agent memories, scoped to a workspace.
* Attach a store to a session via `resources[]` to mount it as a directory the
* agent can read and write.
*/
export interface BetaManagedAgentsMemoryStore {
/**
* Unique identifier for the memory store (a `memstore_...` tagged ID). Use this
* when attaching the store to a session, or in the `{memory_store_id}` path
* parameter of subsequent calls.
*/
id: string;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* Human-readable name for the store. 1–255 characters. The store's mount-path slug
* under `/mnt/memory/` is derived from this name.
*/
name: string;
type: 'memory_store';
/**
* A timestamp in RFC 3339 format
*/
updated_at: string;
/**
* A timestamp in RFC 3339 format
*/
archived_at?: string | null;
/**
* Free-text description of what the store contains, up to 1024 characters.
* Included in the agent's system prompt when the store is attached, so word it to
* be useful to the agent. Empty string when unset.
*/
description?: string;
/**
* Arbitrary key-value tags for your own bookkeeping (such as the end user a store
* belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.
* Returned on retrieve/list but not filterable.
*/
metadata?: {
[key: string]: string;
};
}
export interface MemoryStoreCreateParams {
/**
* Body param: Human-readable name for the store. Required; 1–255 characters; no
* control characters. The mount-path slug under `/mnt/memory/` is derived from
* this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need
* not be unique within a workspace.
*/
name: string;
/**
* Body param: Free-text description of what the store contains, up to 1024
* characters. Included in the agent's system prompt when the store is attached, so
* word it to be useful to the agent.
*/
description?: string;
/**
* Body param: Arbitrary key-value tags for your own bookkeeping (such as the end
* user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512
* characters. Not visible to the agent.
*/
metadata?: {
[key: string]: string;
};
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreRetrieveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreUpdateParams {
/**
* Body param: New description for the store, up to 1024 characters. Pass an empty
* string to clear it.
*/
description?: string | null;
/**
* Body param: Metadata patch. Set a key to a string to upsert it, or to null to
* delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up
* to 64 chars each) with values up to 512 chars.
*/
metadata?: {
[key: string]: string | null;
} | null;
/**
* Body param: New human-readable name for the store. 1–255 characters; no control
* characters. Renaming changes the slug used for the store's `mount_path` in
* sessions created after the update.
*/
name?: string | null;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreListParams extends PageCursorParams {
/**
* Query param: Return only stores whose `created_at` is at or after this time
* (inclusive). Sent on the wire as `created_at[gte]`.
*/
'created_at[gte]'?: string;
/**
* Query param: Return only stores whose `created_at` is at or before this time
* (inclusive). Sent on the wire as `created_at[lte]`.
*/
'created_at[lte]'?: string;
/**
* Query param: When `true`, archived stores are included in the results. Defaults
* to `false` (archived stores are excluded).
*/
include_archived?: boolean;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreDeleteParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryStoreArchiveParams {
/**
* Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace MemoryStores {
export { type BetaManagedAgentsDeletedMemoryStore as BetaManagedAgentsDeletedMemoryStore, type BetaManagedAgentsMemoryStore as BetaManagedAgentsMemoryStore, type BetaManagedAgentsMemoryStoresPageCursor as BetaManagedAgentsMemoryStoresPageCursor, type MemoryStoreCreateParams as MemoryStoreCreateParams, type MemoryStoreRetrieveParams as MemoryStoreRetrieveParams, type MemoryStoreUpdateParams as MemoryStoreUpdateParams, type MemoryStoreListParams as MemoryStoreListParams, type MemoryStoreDeleteParams as MemoryStoreDeleteParams, type MemoryStoreArchiveParams as MemoryStoreArchiveParams, };
export { Memories as Memories, type BetaManagedAgentsConflictError as BetaManagedAgentsConflictError, type BetaManagedAgentsContentSha256Precondition as BetaManagedAgentsContentSha256Precondition, type BetaManagedAgentsDeletedMemory as BetaManagedAgentsDeletedMemory, type BetaManagedAgentsError as BetaManagedAgentsError, type BetaManagedAgentsMemory as BetaManagedAgentsMemory, type BetaManagedAgentsMemoryListItem as BetaManagedAgentsMemoryListItem, type BetaManagedAgentsMemoryPathConflictError as BetaManagedAgentsMemoryPathConflictError, type BetaManagedAgentsMemoryPreconditionFailedError as BetaManagedAgentsMemoryPreconditionFailedError, type BetaManagedAgentsMemoryPrefix as BetaManagedAgentsMemoryPrefix, type BetaManagedAgentsMemoryView as BetaManagedAgentsMemoryView, type BetaManagedAgentsPrecondition as BetaManagedAgentsPrecondition, type BetaManagedAgentsMemoryListItemsPageCursor as BetaManagedAgentsMemoryListItemsPageCursor, type MemoryCreateParams as MemoryCreateParams, type MemoryRetrieveParams as MemoryRetrieveParams, type MemoryUpdateParams as MemoryUpdateParams, type MemoryListParams as MemoryListParams, type MemoryDeleteParams as MemoryDeleteParams, };
export { MemoryVersions as MemoryVersions, type BetaManagedAgentsActor as BetaManagedAgentsActor, type BetaManagedAgentsAPIActor as BetaManagedAgentsAPIActor, type BetaManagedAgentsMemoryVersion as BetaManagedAgentsMemoryVersion, type BetaManagedAgentsMemoryVersionOperation as BetaManagedAgentsMemoryVersionOperation, type BetaManagedAgentsSessionActor as BetaManagedAgentsSessionActor, type BetaManagedAgentsUserActor as BetaManagedAgentsUserActor, type BetaManagedAgentsMemoryVersionsPageCursor as BetaManagedAgentsMemoryVersionsPageCursor, type MemoryVersionRetrieveParams as MemoryVersionRetrieveParams, type MemoryVersionListParams as MemoryVersionListParams, type MemoryVersionRedactParams as MemoryVersionRedactParams, };
}
//# sourceMappingURL=memory-stores.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EACL,8BAA8B,EAC9B,0CAA0C,EAC1C,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,EAC/B,0CAA0C,EAC1C,wCAAwC,EACxC,8CAA8C,EAC9C,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EACnB;OACM,KAAK,iBAAiB;OACtB,EACL,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,uCAAuC,EACvC,yCAAyC,EACzC,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACf;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,E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