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
@@ -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,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;I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AI,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,O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AgB,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;AAEzD,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;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,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAq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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,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,aAAa,qBAAqB,EAAE;YACpF,KAAK,EAAE,EAAE,IAAI,EAAE;YACf,IAAI;YACJ,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;g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,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,qBAAqB,aAAa,qBAAqB,EAC3D,CAAA,UAA2C,CAAA,EAC3C;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;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA0B,EAC1B,OAAwB;QAExB,MAAM,EAAE,eAAe,EAAE,uBAAuB,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,eAAe,aAAa,QAAQ,YAAY,EAAE;YACpG,KAAK,EAAE,EAAE,uBAAuB,EAAE;YAClC,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"}
@@ -0,0 +1,231 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.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,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,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,QAAQ,E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AAK,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,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IAEtG;;;;;;;;OAQG;IACH,MAAM,CACJ,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAY3C;;;;;;;;;;O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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,145 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryStores = void 0;
const tslib_1 = require("../../../internal/tslib.js");
const resource_1 = require("../../../core/resource.js");
const MemoriesAPI = tslib_1.__importStar(require("./memories.js"));
const memories_1 = require("./memories.js");
const MemoryVersionsAPI = tslib_1.__importStar(require("./memory-versions.js"));
const memory_versions_1 = require("./memory-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 MemoryStores extends resource_1.APIResource {
constructor() {
super(...arguments);
this.memories = new MemoriesAPI.Memories(this._client);
this.memoryVersions = new MemoryVersionsAPI.MemoryVersions(this._client);
}
/**
* Create a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.create({ name: 'x' });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/memory_stores?beta=true', {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.retrieve(
* 'memory_store_id',
* );
* ```
*/
retrieve(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get((0, path_1.path) `/v1/memory_stores/${memoryStoreID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.update('memory_store_id');
* ```
*/
update(memoryStoreID, params, options) {
const { betas, ...body } = params;
return this._client.post((0, path_1.path) `/v1/memory_stores/${memoryStoreID}?beta=true`, {
body,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memory stores
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryStore of client.beta.memoryStores.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/memory_stores?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 store
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemoryStore =
* await client.beta.memoryStores.delete('memory_store_id');
* ```
*/
delete(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete((0, path_1.path) `/v1/memory_stores/${memoryStoreID}?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.archive('memory_store_id');
* ```
*/
archive(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post((0, path_1.path) `/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.MemoryStores = MemoryStores;
MemoryStores.Memories = memories_1.Memories;
MemoryStores.MemoryVersions = memory_versions_1.MemoryVersions;
//# sourceMappingURL=memory-stores.js.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.js","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,mEAA0C;AAC1C,4CAmBoB;AACpB,gFAAuD;AACvD,0DAY2B;AAE3B,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsJxG,CAAC;IApJC;;;;;;;;OAQG;IACH,MAAM,CACJ,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE;YACtD,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,aAAqB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. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as MemoriesAPI from "./memories.mjs";
import { Memories, } from "./memories.mjs";
import * as MemoryVersionsAPI from "./memory-versions.mjs";
import { MemoryVersions, } from "./memory-versions.mjs";
import { PageCursor } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class MemoryStores extends APIResource {
constructor() {
super(...arguments);
this.memories = new MemoriesAPI.Memories(this._client);
this.memoryVersions = new MemoryVersionsAPI.MemoryVersions(this._client);
}
/**
* Create a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.create({ name: 'x' });
* ```
*/
create(params, options) {
const { betas, ...body } = params;
return this._client.post('/v1/memory_stores?beta=true', {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Retrieve a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.retrieve(
* 'memory_store_id',
* );
* ```
*/
retrieve(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.get(path `/v1/memory_stores/${memoryStoreID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Update a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.update('memory_store_id');
* ```
*/
update(memoryStoreID, params, options) {
const { betas, ...body } = params;
return this._client.post(path `/v1/memory_stores/${memoryStoreID}?beta=true`, {
body,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memory stores
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryStore of client.beta.memoryStores.list()) {
* // ...
* }
* ```
*/
list(params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList('/v1/memory_stores?beta=true', (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Delete a memory store
*
* @example
* ```ts
* const betaManagedAgentsDeletedMemoryStore =
* await client.beta.memoryStores.delete('memory_store_id');
* ```
*/
delete(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.delete(path `/v1/memory_stores/${memoryStoreID}?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Archive a memory store
*
* @example
* ```ts
* const betaManagedAgentsMemoryStore =
* await client.beta.memoryStores.archive('memory_store_id');
* ```
*/
archive(memoryStoreID, params = {}, options) {
const { betas } = params ?? {};
return this._client.post(path `/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
MemoryStores.Memories = Memories;
MemoryStores.MemoryVersions = MemoryVersions;
//# sourceMappingURL=memory-stores.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-stores.mjs","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,WAAW;OAChB,EAaL,QAAQ,GAMT;OACM,KAAK,iBAAiB;OACtB,EAWL,cAAc,GACf;OAEM,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,mBAAc,GAAqC,IAAI,iBAAiB,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QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,aAAa,oBAAoB,EAAE;YACnF,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;AA0KD,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,YAAY,CAAC,cAAc,GAAG,cAAc,CAAC"}
@@ -0,0 +1,235 @@
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import * as MemoriesAPI from "./memories.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 MemoryVersions extends APIResource {
/**
* Retrieve a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.retrieve(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryVersionID: string, params: MemoryVersionRetrieveParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryVersion>;
/**
* List memory versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryVersion of client.beta.memoryStores.memoryVersions.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID: string, params?: MemoryVersionListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryVersionsPageCursor, BetaManagedAgentsMemoryVersion>;
/**
* Redact a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.redact(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
redact(memoryVersionID: string, params: MemoryVersionRedactParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryVersion>;
}
export type BetaManagedAgentsMemoryVersionsPageCursor = PageCursor<BetaManagedAgentsMemoryVersion>;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
export type BetaManagedAgentsActor = BetaManagedAgentsSessionActor | BetaManagedAgentsAPIActor | BetaManagedAgentsUserActor;
/**
* Attribution for a write made directly via the public API (outside of any
* session).
*/
export interface BetaManagedAgentsAPIActor {
/**
* ID of the API key that performed the write. This identifies the key, not the
* secret.
*/
api_key_id: string;
type: 'api_actor';
}
/**
* A `memory_version` object: one immutable, attributed row in a memory's
* append-only history. Every non-no-op mutation to a memory produces a new
* version. Versions belong to the store (not the individual memory) and persist
* after the memory is deleted. Retrieving a redacted version returns 200 with
* `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`;
* branch on `redacted_at`, not HTTP status.
*/
export interface BetaManagedAgentsMemoryVersion {
/**
* Unique identifier for this version (a `memver_...` value).
*/
id: string;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* ID of the memory this version snapshots (a `mem_...` value). Remains valid after
* the memory is deleted; pass it as `memory_id` to
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list) to
* retrieve the full lineage including the `deleted` row.
*/
memory_id: string;
/**
* ID of the memory store this version belongs to (a `memstore_...` value).
*/
memory_store_id: string;
/**
* The kind of mutation a `memory_version` records. Every non-no-op mutation to a
* memory appends exactly one version row with one of these values.
*/
operation: BetaManagedAgentsMemoryVersionOperation;
type: 'memory_version';
/**
* The memory's UTF-8 text content as of this version. `null` when `view=basic`,
* when `operation` is `deleted`, or when `redacted_at` is set.
*/
content?: string | null;
/**
* Lowercase hex SHA-256 digest of `content` as of this version (64 characters).
* `null` when `redacted_at` is set or `operation` is `deleted`. Populated
* regardless of `view` otherwise.
*/
content_sha256?: string | null;
/**
* Size of `content` in bytes as of this version. `null` when `redacted_at` is set
* or `operation` is `deleted`. Populated regardless of `view` otherwise.
*/
content_size_bytes?: number | null;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
created_by?: BetaManagedAgentsActor;
/**
* The memory's path at the time of this write. `null` if and only if `redacted_at`
* is set.
*/
path?: string | null;
/**
* A timestamp in RFC 3339 format
*/
redacted_at?: string | null;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
redacted_by?: BetaManagedAgentsActor;
}
/**
* The kind of mutation a `memory_version` records. Every non-no-op mutation to a
* memory appends exactly one version row with one of these values.
*/
export type BetaManagedAgentsMemoryVersionOperation = 'created' | 'modified' | 'deleted';
/**
* Attribution for a write made by an agent during a session, through the mounted
* filesystem at `/mnt/memory/`.
*/
export interface BetaManagedAgentsSessionActor {
/**
* ID of the session that performed the write (a `sesn_...` value). Look up the
* session via [Retrieve a session](/en/api/sessions-retrieve) for further
* provenance.
*/
session_id: string;
type: 'session_actor';
}
/**
* Attribution for a write made by a human user through the Anthropic Console.
*/
export interface BetaManagedAgentsUserActor {
type: 'user_actor';
/**
* ID of the user who performed the write (a `user_...` value).
*/
user_id: string;
}
export interface MemoryVersionRetrieveParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: MemoriesAPI.BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryVersionListParams extends PageCursorParams {
/**
* Query param: Query parameter for api_key_id
*/
api_key_id?: string;
/**
* Query param: Return versions created at or after this time (inclusive).
*/
'created_at[gte]'?: string;
/**
* Query param: Return versions created at or before this time (inclusive).
*/
'created_at[lte]'?: string;
/**
* Query param: Query parameter for memory_id
*/
memory_id?: string;
/**
* Query param: Query parameter for operation
*/
operation?: BetaManagedAgentsMemoryVersionOperation;
/**
* Query param: Query parameter for session_id
*/
session_id?: string;
/**
* Query param: Query parameter for view
*/
view?: MemoriesAPI.BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryVersionRedactParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace MemoryVersions {
export { 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-versions.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-versions.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-versions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBA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2B,CAAC;IAE/C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,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,235 @@
import { APIResource } from "../../../core/resource.js";
import * as BetaAPI from "../beta.js";
import * as MemoriesAPI from "./memories.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 MemoryVersions extends APIResource {
/**
* Retrieve a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.retrieve(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryVersionID: string, params: MemoryVersionRetrieveParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryVersion>;
/**
* List memory versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryVersion of client.beta.memoryStores.memoryVersions.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID: string, params?: MemoryVersionListParams | null | undefined, options?: RequestOptions): PagePromise<BetaManagedAgentsMemoryVersionsPageCursor, BetaManagedAgentsMemoryVersion>;
/**
* Redact a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.redact(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
redact(memoryVersionID: string, params: MemoryVersionRedactParams, options?: RequestOptions): APIPromise<BetaManagedAgentsMemoryVersion>;
}
export type BetaManagedAgentsMemoryVersionsPageCursor = PageCursor<BetaManagedAgentsMemoryVersion>;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
export type BetaManagedAgentsActor = BetaManagedAgentsSessionActor | BetaManagedAgentsAPIActor | BetaManagedAgentsUserActor;
/**
* Attribution for a write made directly via the public API (outside of any
* session).
*/
export interface BetaManagedAgentsAPIActor {
/**
* ID of the API key that performed the write. This identifies the key, not the
* secret.
*/
api_key_id: string;
type: 'api_actor';
}
/**
* A `memory_version` object: one immutable, attributed row in a memory's
* append-only history. Every non-no-op mutation to a memory produces a new
* version. Versions belong to the store (not the individual memory) and persist
* after the memory is deleted. Retrieving a redacted version returns 200 with
* `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`;
* branch on `redacted_at`, not HTTP status.
*/
export interface BetaManagedAgentsMemoryVersion {
/**
* Unique identifier for this version (a `memver_...` value).
*/
id: string;
/**
* A timestamp in RFC 3339 format
*/
created_at: string;
/**
* ID of the memory this version snapshots (a `mem_...` value). Remains valid after
* the memory is deleted; pass it as `memory_id` to
* [List memory versions](/en/api/beta/memory_stores/memory_versions/list) to
* retrieve the full lineage including the `deleted` row.
*/
memory_id: string;
/**
* ID of the memory store this version belongs to (a `memstore_...` value).
*/
memory_store_id: string;
/**
* The kind of mutation a `memory_version` records. Every non-no-op mutation to a
* memory appends exactly one version row with one of these values.
*/
operation: BetaManagedAgentsMemoryVersionOperation;
type: 'memory_version';
/**
* The memory's UTF-8 text content as of this version. `null` when `view=basic`,
* when `operation` is `deleted`, or when `redacted_at` is set.
*/
content?: string | null;
/**
* Lowercase hex SHA-256 digest of `content` as of this version (64 characters).
* `null` when `redacted_at` is set or `operation` is `deleted`. Populated
* regardless of `view` otherwise.
*/
content_sha256?: string | null;
/**
* Size of `content` in bytes as of this version. `null` when `redacted_at` is set
* or `operation` is `deleted`. Populated regardless of `view` otherwise.
*/
content_size_bytes?: number | null;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
created_by?: BetaManagedAgentsActor;
/**
* The memory's path at the time of this write. `null` if and only if `redacted_at`
* is set.
*/
path?: string | null;
/**
* A timestamp in RFC 3339 format
*/
redacted_at?: string | null;
/**
* Identifies who performed a write or redact operation. Captured at write time on
* the `memory_version` row. The API key that created a session is not recorded on
* agent writes; attribution answers who made the write, not who is ultimately
* responsible. Look up session provenance separately via the
* [Sessions API](/en/api/sessions-retrieve).
*/
redacted_by?: BetaManagedAgentsActor;
}
/**
* The kind of mutation a `memory_version` records. Every non-no-op mutation to a
* memory appends exactly one version row with one of these values.
*/
export type BetaManagedAgentsMemoryVersionOperation = 'created' | 'modified' | 'deleted';
/**
* Attribution for a write made by an agent during a session, through the mounted
* filesystem at `/mnt/memory/`.
*/
export interface BetaManagedAgentsSessionActor {
/**
* ID of the session that performed the write (a `sesn_...` value). Look up the
* session via [Retrieve a session](/en/api/sessions-retrieve) for further
* provenance.
*/
session_id: string;
type: 'session_actor';
}
/**
* Attribution for a write made by a human user through the Anthropic Console.
*/
export interface BetaManagedAgentsUserActor {
type: 'user_actor';
/**
* ID of the user who performed the write (a `user_...` value).
*/
user_id: string;
}
export interface MemoryVersionRetrieveParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Query param: Query parameter for view
*/
view?: MemoriesAPI.BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryVersionListParams extends PageCursorParams {
/**
* Query param: Query parameter for api_key_id
*/
api_key_id?: string;
/**
* Query param: Return versions created at or after this time (inclusive).
*/
'created_at[gte]'?: string;
/**
* Query param: Return versions created at or before this time (inclusive).
*/
'created_at[lte]'?: string;
/**
* Query param: Query parameter for memory_id
*/
memory_id?: string;
/**
* Query param: Query parameter for operation
*/
operation?: BetaManagedAgentsMemoryVersionOperation;
/**
* Query param: Query parameter for session_id
*/
session_id?: string;
/**
* Query param: Query parameter for view
*/
view?: MemoriesAPI.BetaManagedAgentsMemoryView;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export interface MemoryVersionRedactParams {
/**
* Path param: Path parameter memory_store_id
*/
memory_store_id: string;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
}
export declare namespace MemoryVersions {
export { 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-versions.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"memory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EG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,uCAAuC,CAAC;IAEpD;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAC;IAE/C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,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,81 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryVersions = 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 MemoryVersions extends resource_1.APIResource {
/**
* Retrieve a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.retrieve(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryVersionID, params, options) {
const { memory_store_id, betas, ...query } = params;
return this._client.get((0, path_1.path) `/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memory versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryVersion of client.beta.memoryStores.memoryVersions.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList((0, path_1.path) `/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, (pagination_1.PageCursor), {
query,
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Redact a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.redact(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
redact(memoryVersionID, params, options) {
const { memory_store_id, betas } = params;
return this._client.post((0, path_1.path) `/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
...options,
headers: (0, headers_1.buildHeaders)([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
exports.MemoryVersions = MemoryVersions;
//# sourceMappingURL=memory-versions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-versions.js","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD,MAA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ACtB,IAAA,WAAI,EAAA,qBAAqB,eAAe,oBAAoB,eAAe,mBAAmB,EAC9F;YACE,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;AA9FD,wCA8FC"}
@@ -0,0 +1,77 @@
// 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 MemoryVersions extends APIResource {
/**
* Retrieve a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.retrieve(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
retrieve(memoryVersionID, params, options) {
const { memory_store_id, betas, ...query } = params;
return this._client.get(path `/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* List memory versions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const betaManagedAgentsMemoryVersion of client.beta.memoryStores.memoryVersions.list(
* 'memory_store_id',
* )) {
* // ...
* }
* ```
*/
list(memoryStoreID, params = {}, options) {
const { betas, ...query } = params ?? {};
return this._client.getAPIList(path `/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, (PageCursor), {
query,
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
/**
* Redact a memory version
*
* @example
* ```ts
* const betaManagedAgentsMemoryVersion =
* await client.beta.memoryStores.memoryVersions.redact(
* 'memory_version_id',
* { memory_store_id: 'memory_store_id' },
* );
* ```
*/
redact(memoryVersionID, params, options) {
const { memory_store_id, betas } = params;
return this._client.post(path `/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
...options,
headers: buildHeaders([
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
options?.headers,
]),
});
}
}
//# sourceMappingURL=memory-versions.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"memory-versions.mjs","sourceRoot":"","sources":["../../../src/resources/beta/memory-stores/memory-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,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,eAAuB,EACvB,MAAmC,EACnC,OAAwB;QAExB,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAA,qBAAqB,eAAe,oBAAoB,eAAe,YAAY,EACvF;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;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,aAAqB,EACrB,SAAqD,EAAE,EACvD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,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