@cadenya/cadenya 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +27 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +27 -0
- package/client.d.ts.map +1 -1
- package/client.js +27 -0
- package/client.js.map +1 -1
- package/client.mjs +27 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/memory-layers/entries.d.mts +241 -0
- package/resources/memory-layers/entries.d.mts.map +1 -0
- package/resources/memory-layers/entries.d.ts +241 -0
- package/resources/memory-layers/entries.d.ts.map +1 -0
- package/resources/memory-layers/entries.js +63 -0
- package/resources/memory-layers/entries.js.map +1 -0
- package/resources/memory-layers/entries.mjs +59 -0
- package/resources/memory-layers/entries.mjs.map +1 -0
- package/resources/memory-layers/index.d.mts +3 -0
- package/resources/memory-layers/index.d.mts.map +1 -0
- package/resources/memory-layers/index.d.ts +3 -0
- package/resources/memory-layers/index.d.ts.map +1 -0
- package/resources/memory-layers/index.js +9 -0
- package/resources/memory-layers/index.js.map +1 -0
- package/resources/memory-layers/index.mjs +4 -0
- package/resources/memory-layers/index.mjs.map +1 -0
- package/resources/memory-layers/memory-layers.d.mts +140 -0
- package/resources/memory-layers/memory-layers.d.mts.map +1 -0
- package/resources/memory-layers/memory-layers.d.ts +140 -0
- package/resources/memory-layers/memory-layers.d.ts.map +1 -0
- package/resources/memory-layers/memory-layers.js +65 -0
- package/resources/memory-layers/memory-layers.js.map +1 -0
- package/resources/memory-layers/memory-layers.mjs +60 -0
- package/resources/memory-layers/memory-layers.mjs.map +1 -0
- package/resources/memory-layers.d.mts +2 -0
- package/resources/memory-layers.d.mts.map +1 -0
- package/resources/memory-layers.d.ts +2 -0
- package/resources/memory-layers.d.ts.map +1 -0
- package/resources/memory-layers.js +6 -0
- package/resources/memory-layers.js.map +1 -0
- package/resources/memory-layers.mjs +3 -0
- package/resources/memory-layers.mjs.map +1 -0
- package/resources/objectives/tasks.d.mts +1 -1
- package/resources/objectives/tasks.d.ts +1 -1
- package/resources/objectives/tool-calls.d.mts +3 -2
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +3 -2
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/uploads.d.mts +97 -0
- package/resources/uploads.d.mts.map +1 -0
- package/resources/uploads.d.ts +97 -0
- package/resources/uploads.d.ts.map +1 -0
- package/resources/uploads.js +33 -0
- package/resources/uploads.js.map +1 -0
- package/resources/uploads.mjs +29 -0
- package/resources/uploads.mjs.map +1 -0
- package/src/client.ts +61 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/memory-layers/entries.ts +325 -0
- package/src/resources/memory-layers/index.ts +27 -0
- package/src/resources/memory-layers/memory-layers.ts +225 -0
- package/src/resources/memory-layers.ts +3 -0
- package/src/resources/objectives/tasks.ts +1 -1
- package/src/resources/objectives/tool-calls.ts +3 -2
- package/src/resources/uploads.ts +128 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ export { APIKeys, type APIKey, type APIKeyInfo, type APIKeySpec, type APIKeyCrea
|
|
|
3
3
|
export { AccountResource, type Account, type AccountSpec, type Profile, type ProfileSpec, type RotateWebhookSigningKeyResponse, } from "./account.js";
|
|
4
4
|
export { AgentVariations, type AgentVariation, type AgentVariationInfo, type AgentVariationSpec, type AgentVariationSpecCompactionConfig, type AgentVariationSpecConstraints, type AgentVariationSpecModelConfig, type AgentVariationSpecToolSelection, type CompactionConfigSummarizationStrategy, type CompactionConfigToolResultClearingStrategy, type ToolSelectionAssignedTools, type ToolSelectionAutoDiscovery, type VariationAssignment, type AgentVariationCreateParams, type AgentVariationRetrieveParams, type AgentVariationUpdateParams, type AgentVariationListParams, type AgentVariationDeleteParams, type AgentVariationAddAssignmentParams, type AgentVariationRemoveAssignmentParams, type AgentVariationsCursorPagination, } from "./agent-variations.js";
|
|
5
5
|
export { Agents, type Agent, type AgentInfo, type AgentSpec, type Page, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, type AgentsCursorPagination, } from "./agents/agents.js";
|
|
6
|
+
export { MemoryLayers, type MemoryLayer, type MemoryLayerInfo, type MemoryLayerSpec, type MemoryLayerCreateParams, type MemoryLayerUpdateParams, type MemoryLayerListParams, type MemoryLayersCursorPagination, } from "./memory-layers/memory-layers.js";
|
|
6
7
|
export { Models, type Model, type ModelSpec, type ModelListParams, type ModelSetStatusParams, type ModelsCursorPagination, } from "./models.js";
|
|
7
8
|
export { Objectives, type AssistantMessage, type AssistantToolCall, type CallableTool, type ContextWindowCompacted, type Objective, type ObjectiveContextWindow, type ObjectiveContextWindowData, type ObjectiveData, type ObjectiveDataSecret, type ObjectiveError, type ObjectiveEventData, type ObjectiveEventInfo, type ObjectiveEventWebhookData, type ObjectiveInfo, type ObjectiveStatus, type SubObjectiveCreated, type ToolApprovalRequested, type ToolApproved, type ToolCalled, type ToolDenied, type ToolError, type ToolResult, type UserMessage, type ObjectiveCompactResponse, type ObjectiveContinueResponse, type ObjectiveListEventsResponse, type ObjectiveCreateParams, type ObjectiveListParams, type ObjectiveCancelParams, type ObjectiveCompactParams, type ObjectiveContinueParams, type ObjectiveListContextWindowsParams, type ObjectiveListEventsParams, type ObjectivesCursorPagination, type ObjectiveContextWindowsCursorPagination, type ObjectiveListEventsResponsesCursorPagination, } from "./objectives/objectives.js";
|
|
8
9
|
export { Search, type SearchSearchToolsOrToolSetsResponse, type SearchSearchToolsOrToolSetsParams, } from "./search.js";
|
|
9
10
|
export { ToolSets, type McpToolFilter, type SyncCompleted, type SyncFailed, type SyncStarted, type ToolSet, type ToolSetAdapter, type ToolSetAdapterHTTP, type ToolSetAdapterMcp, type ToolSetEvent, type ToolSetEventData, type ToolSetInfo, type ToolSetSpec, type ToolSetCreateParams, type ToolSetUpdateParams, type ToolSetListParams, type ToolSetListEventsParams, type ToolSetsCursorPagination, type ToolSetEventsCursorPagination, } from "./tool-sets/tool-sets.js";
|
|
11
|
+
export { Uploads, type Upload, type UploadInfo, type UploadSpec, type UploadCreateParams } from "./uploads.js";
|
|
10
12
|
export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from "./webhooks.js";
|
|
11
13
|
export { WorkspaceSecrets, type WorkspaceSecret, type WorkspaceSecretInfo, type WorkspaceSecretSpec, type WorkspaceSecretCreateParams, type WorkspaceSecretUpdateParams, type WorkspaceSecretListParams, type WorkspaceSecretsCursorPagination, } from "./workspace-secrets.js";
|
|
12
14
|
export { Workspaces, type Workspace, type WorkspaceSpec, type WorkspaceListParams, type WorkspacesCursorPagination, } from "./workspaces.js";
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,+BAA+B,GACrC;OACM,EACL,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kCAAkC,EACvC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,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,EAC/B,KAAK,uCAAuC,EAC5C,KAAK,4CAA4C,GAClD;OACM,EACL,MAAM,EACN,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,GACvC;OACM,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC;OACM,EAAE,QAAQ,EAAE,KAAK,wBAAwB,EAAE,KAAK,kBAAkB,EAAE;OACpE,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,GACtC;OACM,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B;OACM,EACL,eAAe,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,+BAA+B,GACrC;OACM,EACL,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAC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ict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Workspaces = exports.WorkspaceSecrets = exports.Webhooks = exports.ToolSets = exports.Search = exports.Objectives = exports.Models = exports.Agents = exports.AgentVariations = exports.AccountResource = exports.APIKeys = void 0;
|
|
4
|
+
exports.Workspaces = exports.WorkspaceSecrets = exports.Webhooks = exports.Uploads = exports.ToolSets = exports.Search = exports.Objectives = exports.Models = exports.MemoryLayers = exports.Agents = exports.AgentVariations = exports.AccountResource = exports.APIKeys = void 0;
|
|
5
5
|
const tslib_1 = require("../internal/tslib.js");
|
|
6
6
|
tslib_1.__exportStar(require("./shared.js"), exports);
|
|
7
7
|
var api_keys_1 = require("./api-keys.js");
|
|
@@ -12,6 +12,8 @@ var agent_variations_1 = require("./agent-variations.js");
|
|
|
12
12
|
Object.defineProperty(exports, "AgentVariations", { enumerable: true, get: function () { return agent_variations_1.AgentVariations; } });
|
|
13
13
|
var agents_1 = require("./agents/agents.js");
|
|
14
14
|
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
|
|
15
|
+
var memory_layers_1 = require("./memory-layers/memory-layers.js");
|
|
16
|
+
Object.defineProperty(exports, "MemoryLayers", { enumerable: true, get: function () { return memory_layers_1.MemoryLayers; } });
|
|
15
17
|
var models_1 = require("./models.js");
|
|
16
18
|
Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return models_1.Models; } });
|
|
17
19
|
var objectives_1 = require("./objectives/objectives.js");
|
|
@@ -20,6 +22,8 @@ var search_1 = require("./search.js");
|
|
|
20
22
|
Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return search_1.Search; } });
|
|
21
23
|
var tool_sets_1 = require("./tool-sets/tool-sets.js");
|
|
22
24
|
Object.defineProperty(exports, "ToolSets", { enumerable: true, get: function () { return tool_sets_1.ToolSets; } });
|
|
25
|
+
var uploads_1 = require("./uploads.js");
|
|
26
|
+
Object.defineProperty(exports, "Uploads", { enumerable: true, get: function () { return uploads_1.Uploads; } });
|
|
23
27
|
var webhooks_1 = require("./webhooks.js");
|
|
24
28
|
Object.defineProperty(exports, "Webhooks", { enumerable: true, get: function () { return webhooks_1.Webhooks; } });
|
|
25
29
|
var workspace_secrets_1 = require("./workspace-secrets.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,0CASoB;AARlB,mGAAA,OAAO,OAAA;AAST,wCAOmB;AANjB,0GAAA,eAAe,OAAA;AAOjB,0DAsB4B;AArB1B,mHAAA,eAAe,OAAA;AAsBjB,6CAUyB;AATvB,gGAAA,MAAM,OAAA;AAUR,sCAOkB;AANhB,gGAAA,MAAM,OAAA;AAOR,yDAsCiC;AArC/B,wGAAA,UAAU,OAAA;AAsCZ,sCAIkB;AAHhB,gGAAA,MAAM,OAAA;AAIR,sDAoB+B;AAnB7B,qGAAA,QAAQ,OAAA;AAoBV,0CAA8F;AAArF,oGAAA,QAAQ,OAAA;AACjB,4DAS6B;AAR3B,qHAAA,gBAAgB,OAAA;AASlB,8CAMsB;AALpB,wGAAA,UAAU,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,0CASoB;AARlB,mGAAA,OAAO,OAAA;AAST,wCAOmB;AANjB,0GAAA,eAAe,OAAA;AAOjB,0DAsB4B;AArB1B,mHAAA,eAAe,OAAA;AAsBjB,6CAUyB;AATvB,gGAAA,MAAM,OAAA;AAUR,kEASuC;AARrC,6GAAA,YAAY,OAAA;AASd,sCAOkB;AANhB,gGAAA,MAAM,OAAA;AAOR,yDAsCiC;AArC/B,wGAAA,UAAU,OAAA;AAsCZ,sCAIkB;AAHhB,gGAAA,MAAM,OAAA;AAIR,sDAoB+B;AAnB7B,qGAAA,QAAQ,OAAA;AAoBV,wCAA4G;AAAnG,kGAAA,OAAO,OAAA;AAChB,0CAA8F;AAArF,oGAAA,QAAQ,OAAA;AACjB,4DAS6B;AAR3B,qHAAA,gBAAgB,OAAA;AASlB,8CAMsB;AALpB,wGAAA,UAAU,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -4,10 +4,12 @@ export { APIKeys, } from "./api-keys.mjs";
|
|
|
4
4
|
export { AccountResource, } from "./account.mjs";
|
|
5
5
|
export { AgentVariations, } from "./agent-variations.mjs";
|
|
6
6
|
export { Agents, } from "./agents/agents.mjs";
|
|
7
|
+
export { MemoryLayers, } from "./memory-layers/memory-layers.mjs";
|
|
7
8
|
export { Models, } from "./models.mjs";
|
|
8
9
|
export { Objectives, } from "./objectives/objectives.mjs";
|
|
9
10
|
export { Search, } from "./search.mjs";
|
|
10
11
|
export { ToolSets, } from "./tool-sets/tool-sets.mjs";
|
|
12
|
+
export { Uploads } from "./uploads.mjs";
|
|
11
13
|
export { Webhooks } from "./webhooks.mjs";
|
|
12
14
|
export { WorkspaceSecrets, } from "./workspace-secrets.mjs";
|
|
13
15
|
export { Workspaces, } from "./workspaces.mjs";
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAQR;OACM,EACL,eAAe,GAMhB;OACM,EACL,eAAe,GAqBhB;OACM,EACL,MAAM,GASP;OACM,EACL,MAAM,GAMP;OACM,EACL,UAAU,GAqCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAmBT;OACM,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAQjB;OACM,EACL,UAAU,GAKX"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAQR;OACM,EACL,eAAe,GAMhB;OACM,EACL,eAAe,GAqBhB;OACM,EACL,MAAM,GASP;OACM,EACL,YAAY,GAQb;OACM,EACL,MAAM,GAMP;OACM,EACL,UAAU,GAqCX;OACM,EACL,MAAM,GAGP;OACM,EACL,QAAQ,GAmBT;OACM,EAAE,OAAO,EAA0E;OACnF,EAAE,QAAQ,EAA0D;OACpE,EACL,gBAAgB,GAQjB;OACM,EACL,UAAU,GAKX"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as AccountAPI from "../account.mjs";
|
|
3
|
+
import * as Shared from "../shared.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* MemoryService manages memory layers and their entries at the WORKSPACE level.
|
|
9
|
+
* Layers are named containers that can be composed into an objective's memory
|
|
10
|
+
* stack; entries are the keyed values within a layer.
|
|
11
|
+
*
|
|
12
|
+
* All operations are implicitly scoped to the workspace determined by the JWT
|
|
13
|
+
* token. System-managed layers (e.g., episodic layers created by the runtime)
|
|
14
|
+
* cannot be mutated through this API.
|
|
15
|
+
*
|
|
16
|
+
* Authentication: Bearer token (JWT)
|
|
17
|
+
* Scope: Workspace-level operations
|
|
18
|
+
*/
|
|
19
|
+
export declare class Entries extends APIResource {
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new entry in a memory layer. Returns the detail view, including the
|
|
22
|
+
* resolved content body.
|
|
23
|
+
*/
|
|
24
|
+
create(memoryLayerID: string, body: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a memory entry by ID from a memory layer. Returns the detail view,
|
|
27
|
+
* including the content body.
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates a memory entry in a memory layer. Returns the detail view, including the
|
|
32
|
+
* resolved content body.
|
|
33
|
+
*/
|
|
34
|
+
update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
35
|
+
/**
|
|
36
|
+
* Lists all entries in a memory layer
|
|
37
|
+
*/
|
|
38
|
+
list(memoryLayerID: string, query?: EntryListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
|
|
39
|
+
/**
|
|
40
|
+
* Deletes a memory entry from a memory layer
|
|
41
|
+
*/
|
|
42
|
+
delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
43
|
+
}
|
|
44
|
+
export type MemoryEntriesCursorPagination = CursorPagination<MemoryEntry>;
|
|
45
|
+
/**
|
|
46
|
+
* MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
47
|
+
* by their key, which follows the S3 object key safe-character convention (see
|
|
48
|
+
* MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
49
|
+
* the same key may appear in multiple layers, in which case the LIFO stack-walk
|
|
50
|
+
* determines which one wins for a given objective.
|
|
51
|
+
*
|
|
52
|
+
* MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
53
|
+
* carry the entry body — callers that need the body must fetch the entry
|
|
54
|
+
* individually via GetMemoryEntry, which returns a MemoryEntryDetail.
|
|
55
|
+
*/
|
|
56
|
+
export interface MemoryEntry {
|
|
57
|
+
/**
|
|
58
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
59
|
+
*/
|
|
60
|
+
metadata: Shared.ResourceMetadata;
|
|
61
|
+
/**
|
|
62
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
63
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
64
|
+
* and detail (MemoryEntryDetail) views.
|
|
65
|
+
*/
|
|
66
|
+
spec: MemoryEntrySpec;
|
|
67
|
+
info?: MemoryEntryInfo;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
|
|
71
|
+
* either inline content or a reference to a completed Upload; exactly one of the
|
|
72
|
+
* two must be set.
|
|
73
|
+
*/
|
|
74
|
+
export interface MemoryEntryCreateSpec {
|
|
75
|
+
/**
|
|
76
|
+
* See MemoryEntrySpec.key for the full rule set. Same constraints apply here.
|
|
77
|
+
*/
|
|
78
|
+
key: string;
|
|
79
|
+
/**
|
|
80
|
+
* Inline content, written directly into the entry.
|
|
81
|
+
*/
|
|
82
|
+
content?: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
title?: string;
|
|
85
|
+
/**
|
|
86
|
+
* ID of a COMPLETE Upload. The server reads the object from storage, copies its
|
|
87
|
+
* bytes into the entry, and marks the upload consumed.
|
|
88
|
+
*/
|
|
89
|
+
uploadId?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* MemoryEntryDetail is the full representation of an entry, including the resolved
|
|
93
|
+
* content body. Returned by GetMemoryEntry, CreateMemoryEntry, and
|
|
94
|
+
* UpdateMemoryEntry.
|
|
95
|
+
*/
|
|
96
|
+
export interface MemoryEntryDetail {
|
|
97
|
+
/**
|
|
98
|
+
* The resolved body of the entry. For entries created or updated via an upload_id,
|
|
99
|
+
* this is the ingested content, not the original upload handle. May be empty; an
|
|
100
|
+
* entry with only a key, title, and description is valid (e.g., a stub skill being
|
|
101
|
+
* drafted, or an entry where the frontmatter alone is the payload).
|
|
102
|
+
*/
|
|
103
|
+
content: string;
|
|
104
|
+
/**
|
|
105
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
106
|
+
*/
|
|
107
|
+
metadata: Shared.ResourceMetadata;
|
|
108
|
+
/**
|
|
109
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
110
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
111
|
+
* and detail (MemoryEntryDetail) views.
|
|
112
|
+
*/
|
|
113
|
+
spec: MemoryEntrySpec;
|
|
114
|
+
info?: MemoryEntryInfo;
|
|
115
|
+
}
|
|
116
|
+
export interface MemoryEntryInfo {
|
|
117
|
+
/**
|
|
118
|
+
* Profile represents a human user at the account level. Profiles are
|
|
119
|
+
* account-scoped resources that can be associated with multiple workspaces through
|
|
120
|
+
* the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
|
|
121
|
+
*/
|
|
122
|
+
createdBy?: AccountAPI.Profile;
|
|
123
|
+
/**
|
|
124
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
125
|
+
*/
|
|
126
|
+
memoryLayer?: Shared.ResourceMetadata;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
130
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
131
|
+
* and detail (MemoryEntryDetail) views.
|
|
132
|
+
*/
|
|
133
|
+
export interface MemoryEntrySpec {
|
|
134
|
+
/**
|
|
135
|
+
* The lookup key for this entry within its layer. Must conform to the S3 object
|
|
136
|
+
* key safe-characters spec: ASCII alphanumerics and the special characters !, -,
|
|
137
|
+
* \_, ., \*, ', (, ), and /. Forward slashes may be used to suggest hierarchy
|
|
138
|
+
* (e.g., "skills/postmortem/write"), but lookups are flat — the key is a single
|
|
139
|
+
* opaque string, not a path.
|
|
140
|
+
*
|
|
141
|
+
* Additional rules enforced by the service:
|
|
142
|
+
*
|
|
143
|
+
* - May not begin or end with /
|
|
144
|
+
* - May not contain consecutive slashes (//)
|
|
145
|
+
* - May not begin with reserved prefixes (cadenya/, system/)
|
|
146
|
+
* - Case-sensitive
|
|
147
|
+
* - Unique within the parent layer
|
|
148
|
+
*
|
|
149
|
+
* For skills entries, this key is also the id the model passes to
|
|
150
|
+
* memory_load_skill when it decides to load the entry's content.
|
|
151
|
+
*/
|
|
152
|
+
key: string;
|
|
153
|
+
/**
|
|
154
|
+
* One-line "when to use this" hint shown in the frontmatter manifest for skills
|
|
155
|
+
* entries. The model uses this to decide whether to load the body, so it should be
|
|
156
|
+
* written for the model as the audience. Ignored for layer types that do not
|
|
157
|
+
* advertise frontmatter.
|
|
158
|
+
*/
|
|
159
|
+
description?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Short human/LLM-readable title shown in the frontmatter manifest for skills
|
|
162
|
+
* entries. Ignored for layer types that do not advertise frontmatter.
|
|
163
|
+
*/
|
|
164
|
+
title?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields present
|
|
168
|
+
* in the request's update_mask are applied; unset fields are left alone. The
|
|
169
|
+
* source oneof is optional for updates — omit it to leave the body untouched, or
|
|
170
|
+
* set exactly one branch to replace it.
|
|
171
|
+
*/
|
|
172
|
+
export interface MemoryEntryUpdateSpec {
|
|
173
|
+
content?: string;
|
|
174
|
+
description?: string;
|
|
175
|
+
key?: string;
|
|
176
|
+
title?: string;
|
|
177
|
+
uploadId?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface EntryCreateParams {
|
|
180
|
+
/**
|
|
181
|
+
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
182
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
183
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
184
|
+
*/
|
|
185
|
+
metadata: Shared.CreateResourceMetadata;
|
|
186
|
+
/**
|
|
187
|
+
* MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
|
|
188
|
+
* either inline content or a reference to a completed Upload; exactly one of the
|
|
189
|
+
* two must be set.
|
|
190
|
+
*/
|
|
191
|
+
spec: MemoryEntryCreateSpec;
|
|
192
|
+
}
|
|
193
|
+
export interface EntryRetrieveParams {
|
|
194
|
+
memoryLayerId: string;
|
|
195
|
+
}
|
|
196
|
+
export interface EntryUpdateParams {
|
|
197
|
+
/**
|
|
198
|
+
* Path param
|
|
199
|
+
*/
|
|
200
|
+
memoryLayerId: string;
|
|
201
|
+
/**
|
|
202
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
203
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
204
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
205
|
+
* server.
|
|
206
|
+
*/
|
|
207
|
+
metadata?: Shared.UpdateResourceMetadata;
|
|
208
|
+
/**
|
|
209
|
+
* Body param: MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry.
|
|
210
|
+
* Fields present in the request's update_mask are applied; unset fields are left
|
|
211
|
+
* alone. The source oneof is optional for updates — omit it to leave the body
|
|
212
|
+
* untouched, or set exactly one branch to replace it.
|
|
213
|
+
*/
|
|
214
|
+
spec?: MemoryEntryUpdateSpec;
|
|
215
|
+
/**
|
|
216
|
+
* Body param
|
|
217
|
+
*/
|
|
218
|
+
updateMask?: string;
|
|
219
|
+
}
|
|
220
|
+
export interface EntryListParams extends CursorPaginationParams {
|
|
221
|
+
/**
|
|
222
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
223
|
+
*/
|
|
224
|
+
includeInfo?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
|
|
227
|
+
* hierarchy). Matches against the entry's key, not its name.
|
|
228
|
+
*/
|
|
229
|
+
prefix?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Sort order for results (asc or desc by creation time)
|
|
232
|
+
*/
|
|
233
|
+
sortOrder?: string;
|
|
234
|
+
}
|
|
235
|
+
export interface EntryDeleteParams {
|
|
236
|
+
memoryLayerId: string;
|
|
237
|
+
}
|
|
238
|
+
export declare namespace Entries {
|
|
239
|
+
export { type MemoryEntry as MemoryEntry, type MemoryEntryCreateSpec as MemoryEntryCreateSpec, type MemoryEntryDetail as MemoryEntryDetail, type MemoryEntryInfo as MemoryEntryInfo, type MemoryEntrySpec as MemoryEntrySpec, type MemoryEntryUpdateSpec as MemoryEntryUpdateSpec, type MemoryEntriesCursorPagination as MemoryEntriesCursorPagination, type EntryCreateParams as EntryCreateParams, type EntryRetrieveParams as EntryRetrieveParams, type EntryUpdateParams as EntryUpdateParams, type EntryListParams as EntryListParams, type EntryDeleteParams as EntryDeleteParams, };
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=entries.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries.d.mts","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;GAWG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAIhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAK1G;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAKtG;;OAEG;IACH,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,E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,eAAe,IAAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as AccountAPI from "../account.js";
|
|
3
|
+
import * as Shared from "../shared.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* MemoryService manages memory layers and their entries at the WORKSPACE level.
|
|
9
|
+
* Layers are named containers that can be composed into an objective's memory
|
|
10
|
+
* stack; entries are the keyed values within a layer.
|
|
11
|
+
*
|
|
12
|
+
* All operations are implicitly scoped to the workspace determined by the JWT
|
|
13
|
+
* token. System-managed layers (e.g., episodic layers created by the runtime)
|
|
14
|
+
* cannot be mutated through this API.
|
|
15
|
+
*
|
|
16
|
+
* Authentication: Bearer token (JWT)
|
|
17
|
+
* Scope: Workspace-level operations
|
|
18
|
+
*/
|
|
19
|
+
export declare class Entries extends APIResource {
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new entry in a memory layer. Returns the detail view, including the
|
|
22
|
+
* resolved content body.
|
|
23
|
+
*/
|
|
24
|
+
create(memoryLayerID: string, body: EntryCreateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a memory entry by ID from a memory layer. Returns the detail view,
|
|
27
|
+
* including the content body.
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates a memory entry in a memory layer. Returns the detail view, including the
|
|
32
|
+
* resolved content body.
|
|
33
|
+
*/
|
|
34
|
+
update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail>;
|
|
35
|
+
/**
|
|
36
|
+
* Lists all entries in a memory layer
|
|
37
|
+
*/
|
|
38
|
+
list(memoryLayerID: string, query?: EntryListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryEntriesCursorPagination, MemoryEntry>;
|
|
39
|
+
/**
|
|
40
|
+
* Deletes a memory entry from a memory layer
|
|
41
|
+
*/
|
|
42
|
+
delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
43
|
+
}
|
|
44
|
+
export type MemoryEntriesCursorPagination = CursorPagination<MemoryEntry>;
|
|
45
|
+
/**
|
|
46
|
+
* MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
|
|
47
|
+
* by their key, which follows the S3 object key safe-character convention (see
|
|
48
|
+
* MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
|
|
49
|
+
* the same key may appear in multiple layers, in which case the LIFO stack-walk
|
|
50
|
+
* determines which one wins for a given objective.
|
|
51
|
+
*
|
|
52
|
+
* MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
|
|
53
|
+
* carry the entry body — callers that need the body must fetch the entry
|
|
54
|
+
* individually via GetMemoryEntry, which returns a MemoryEntryDetail.
|
|
55
|
+
*/
|
|
56
|
+
export interface MemoryEntry {
|
|
57
|
+
/**
|
|
58
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
59
|
+
*/
|
|
60
|
+
metadata: Shared.ResourceMetadata;
|
|
61
|
+
/**
|
|
62
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
63
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
64
|
+
* and detail (MemoryEntryDetail) views.
|
|
65
|
+
*/
|
|
66
|
+
spec: MemoryEntrySpec;
|
|
67
|
+
info?: MemoryEntryInfo;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
|
|
71
|
+
* either inline content or a reference to a completed Upload; exactly one of the
|
|
72
|
+
* two must be set.
|
|
73
|
+
*/
|
|
74
|
+
export interface MemoryEntryCreateSpec {
|
|
75
|
+
/**
|
|
76
|
+
* See MemoryEntrySpec.key for the full rule set. Same constraints apply here.
|
|
77
|
+
*/
|
|
78
|
+
key: string;
|
|
79
|
+
/**
|
|
80
|
+
* Inline content, written directly into the entry.
|
|
81
|
+
*/
|
|
82
|
+
content?: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
title?: string;
|
|
85
|
+
/**
|
|
86
|
+
* ID of a COMPLETE Upload. The server reads the object from storage, copies its
|
|
87
|
+
* bytes into the entry, and marks the upload consumed.
|
|
88
|
+
*/
|
|
89
|
+
uploadId?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* MemoryEntryDetail is the full representation of an entry, including the resolved
|
|
93
|
+
* content body. Returned by GetMemoryEntry, CreateMemoryEntry, and
|
|
94
|
+
* UpdateMemoryEntry.
|
|
95
|
+
*/
|
|
96
|
+
export interface MemoryEntryDetail {
|
|
97
|
+
/**
|
|
98
|
+
* The resolved body of the entry. For entries created or updated via an upload_id,
|
|
99
|
+
* this is the ingested content, not the original upload handle. May be empty; an
|
|
100
|
+
* entry with only a key, title, and description is valid (e.g., a stub skill being
|
|
101
|
+
* drafted, or an entry where the frontmatter alone is the payload).
|
|
102
|
+
*/
|
|
103
|
+
content: string;
|
|
104
|
+
/**
|
|
105
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
106
|
+
*/
|
|
107
|
+
metadata: Shared.ResourceMetadata;
|
|
108
|
+
/**
|
|
109
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
110
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
111
|
+
* and detail (MemoryEntryDetail) views.
|
|
112
|
+
*/
|
|
113
|
+
spec: MemoryEntrySpec;
|
|
114
|
+
info?: MemoryEntryInfo;
|
|
115
|
+
}
|
|
116
|
+
export interface MemoryEntryInfo {
|
|
117
|
+
/**
|
|
118
|
+
* Profile represents a human user at the account level. Profiles are
|
|
119
|
+
* account-scoped resources that can be associated with multiple workspaces through
|
|
120
|
+
* the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
|
|
121
|
+
*/
|
|
122
|
+
createdBy?: AccountAPI.Profile;
|
|
123
|
+
/**
|
|
124
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
125
|
+
*/
|
|
126
|
+
memoryLayer?: Shared.ResourceMetadata;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* MemoryEntrySpec is the metadata portion of an entry — the fields that identify
|
|
130
|
+
* and describe it, without the body. It appears on both the summary (MemoryEntry)
|
|
131
|
+
* and detail (MemoryEntryDetail) views.
|
|
132
|
+
*/
|
|
133
|
+
export interface MemoryEntrySpec {
|
|
134
|
+
/**
|
|
135
|
+
* The lookup key for this entry within its layer. Must conform to the S3 object
|
|
136
|
+
* key safe-characters spec: ASCII alphanumerics and the special characters !, -,
|
|
137
|
+
* \_, ., \*, ', (, ), and /. Forward slashes may be used to suggest hierarchy
|
|
138
|
+
* (e.g., "skills/postmortem/write"), but lookups are flat — the key is a single
|
|
139
|
+
* opaque string, not a path.
|
|
140
|
+
*
|
|
141
|
+
* Additional rules enforced by the service:
|
|
142
|
+
*
|
|
143
|
+
* - May not begin or end with /
|
|
144
|
+
* - May not contain consecutive slashes (//)
|
|
145
|
+
* - May not begin with reserved prefixes (cadenya/, system/)
|
|
146
|
+
* - Case-sensitive
|
|
147
|
+
* - Unique within the parent layer
|
|
148
|
+
*
|
|
149
|
+
* For skills entries, this key is also the id the model passes to
|
|
150
|
+
* memory_load_skill when it decides to load the entry's content.
|
|
151
|
+
*/
|
|
152
|
+
key: string;
|
|
153
|
+
/**
|
|
154
|
+
* One-line "when to use this" hint shown in the frontmatter manifest for skills
|
|
155
|
+
* entries. The model uses this to decide whether to load the body, so it should be
|
|
156
|
+
* written for the model as the audience. Ignored for layer types that do not
|
|
157
|
+
* advertise frontmatter.
|
|
158
|
+
*/
|
|
159
|
+
description?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Short human/LLM-readable title shown in the frontmatter manifest for skills
|
|
162
|
+
* entries. Ignored for layer types that do not advertise frontmatter.
|
|
163
|
+
*/
|
|
164
|
+
title?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields present
|
|
168
|
+
* in the request's update_mask are applied; unset fields are left alone. The
|
|
169
|
+
* source oneof is optional for updates — omit it to leave the body untouched, or
|
|
170
|
+
* set exactly one branch to replace it.
|
|
171
|
+
*/
|
|
172
|
+
export interface MemoryEntryUpdateSpec {
|
|
173
|
+
content?: string;
|
|
174
|
+
description?: string;
|
|
175
|
+
key?: string;
|
|
176
|
+
title?: string;
|
|
177
|
+
uploadId?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface EntryCreateParams {
|
|
180
|
+
/**
|
|
181
|
+
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
182
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
183
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
184
|
+
*/
|
|
185
|
+
metadata: Shared.CreateResourceMetadata;
|
|
186
|
+
/**
|
|
187
|
+
* MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
|
|
188
|
+
* either inline content or a reference to a completed Upload; exactly one of the
|
|
189
|
+
* two must be set.
|
|
190
|
+
*/
|
|
191
|
+
spec: MemoryEntryCreateSpec;
|
|
192
|
+
}
|
|
193
|
+
export interface EntryRetrieveParams {
|
|
194
|
+
memoryLayerId: string;
|
|
195
|
+
}
|
|
196
|
+
export interface EntryUpdateParams {
|
|
197
|
+
/**
|
|
198
|
+
* Path param
|
|
199
|
+
*/
|
|
200
|
+
memoryLayerId: string;
|
|
201
|
+
/**
|
|
202
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
203
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
204
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
205
|
+
* server.
|
|
206
|
+
*/
|
|
207
|
+
metadata?: Shared.UpdateResourceMetadata;
|
|
208
|
+
/**
|
|
209
|
+
* Body param: MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry.
|
|
210
|
+
* Fields present in the request's update_mask are applied; unset fields are left
|
|
211
|
+
* alone. The source oneof is optional for updates — omit it to leave the body
|
|
212
|
+
* untouched, or set exactly one branch to replace it.
|
|
213
|
+
*/
|
|
214
|
+
spec?: MemoryEntryUpdateSpec;
|
|
215
|
+
/**
|
|
216
|
+
* Body param
|
|
217
|
+
*/
|
|
218
|
+
updateMask?: string;
|
|
219
|
+
}
|
|
220
|
+
export interface EntryListParams extends CursorPaginationParams {
|
|
221
|
+
/**
|
|
222
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
223
|
+
*/
|
|
224
|
+
includeInfo?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
|
|
227
|
+
* hierarchy). Matches against the entry's key, not its name.
|
|
228
|
+
*/
|
|
229
|
+
prefix?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Sort order for results (asc or desc by creation time)
|
|
232
|
+
*/
|
|
233
|
+
sortOrder?: string;
|
|
234
|
+
}
|
|
235
|
+
export interface EntryDeleteParams {
|
|
236
|
+
memoryLayerId: string;
|
|
237
|
+
}
|
|
238
|
+
export declare namespace Entries {
|
|
239
|
+
export { type MemoryEntry as MemoryEntry, type MemoryEntryCreateSpec as MemoryEntryCreateSpec, type MemoryEntryDetail as MemoryEntryDetail, type MemoryEntryInfo as MemoryEntryInfo, type MemoryEntrySpec as MemoryEntrySpec, type MemoryEntryUpdateSpec as MemoryEntryUpdateSpec, type MemoryEntriesCursorPagination as MemoryEntriesCursorPagination, type EntryCreateParams as EntryCreateParams, type EntryRetrieveParams as EntryRetrieveParams, type EntryUpdateParams as EntryUpdateParams, type EntryListParams as EntryListParams, type EntryDeleteParams as EntryDeleteParams, };
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;GAWG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAIhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAK1G;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAKtG;;OAEG;IACH,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,6BAA6B,EAAE,WAAW,CAAC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,IAAI,6BAA6B,EACnE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Entries = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
8
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
+
/**
|
|
10
|
+
* MemoryService manages memory layers and their entries at the WORKSPACE level.
|
|
11
|
+
* Layers are named containers that can be composed into an objective's memory
|
|
12
|
+
* stack; entries are the keyed values within a layer.
|
|
13
|
+
*
|
|
14
|
+
* All operations are implicitly scoped to the workspace determined by the JWT
|
|
15
|
+
* token. System-managed layers (e.g., episodic layers created by the runtime)
|
|
16
|
+
* cannot be mutated through this API.
|
|
17
|
+
*
|
|
18
|
+
* Authentication: Bearer token (JWT)
|
|
19
|
+
* Scope: Workspace-level operations
|
|
20
|
+
*/
|
|
21
|
+
class Entries extends resource_1.APIResource {
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new entry in a memory layer. Returns the detail view, including the
|
|
24
|
+
* resolved content body.
|
|
25
|
+
*/
|
|
26
|
+
create(memoryLayerID, body, options) {
|
|
27
|
+
return this._client.post((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves a memory entry by ID from a memory layer. Returns the detail view,
|
|
31
|
+
* including the content body.
|
|
32
|
+
*/
|
|
33
|
+
retrieve(id, params, options) {
|
|
34
|
+
const { memoryLayerId } = params;
|
|
35
|
+
return this._client.get((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Updates a memory entry in a memory layer. Returns the detail view, including the
|
|
39
|
+
* resolved content body.
|
|
40
|
+
*/
|
|
41
|
+
update(id, params, options) {
|
|
42
|
+
const { memoryLayerId, ...body } = params;
|
|
43
|
+
return this._client.patch((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Lists all entries in a memory layer
|
|
47
|
+
*/
|
|
48
|
+
list(memoryLayerID, query = {}, options) {
|
|
49
|
+
return this._client.getAPIList((0, path_1.path) `/v1/memory_layers/${memoryLayerID}/entries`, (pagination_1.CursorPagination), { query, ...options });
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Deletes a memory entry from a memory layer
|
|
53
|
+
*/
|
|
54
|
+
delete(id, params, options) {
|
|
55
|
+
const { memoryLayerId } = params;
|
|
56
|
+
return this._client.delete((0, path_1.path) `/v1/memory_layers/${memoryLayerId}/entries/${id}`, {
|
|
57
|
+
...options,
|
|
58
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.Entries = Entries;
|
|
63
|
+
//# sourceMappingURL=entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries.js","sourceRoot":"","sources":["../../src/resources/memory-layers/entries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;GAWG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,MAAM,CACJ,aAAqB,EACrB,IAA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