@memnexus-ai/typescript-sdk 1.80.2 → 1.81.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/dist/index.cjs +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -12
- package/dist/index.d.ts +26 -12
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2164,9 +2164,12 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2164
2164
|
distillCompletedAt?: string | null | undefined;
|
|
2165
2165
|
};
|
|
2166
2166
|
}>>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400.
|
|
2169
|
+
*/
|
|
2167
2170
|
declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
2168
|
-
/** New content for the named memory version */
|
|
2169
|
-
content: z.ZodString
|
|
2171
|
+
/** New content for the named memory version. When present, a new version is created. When omitted, the request is a metadata-only update: at least one of codeContext, topics, memoryType or context must be set, and those fields are written on the CURRENT head in place (same id and version, no new version, no re-embedding, no extraction, no quota use). conversationId and supersedes require content. */
|
|
2172
|
+
content: z.ZodOptional<z.ZodString>;
|
|
2170
2173
|
/** Optimistic concurrency (compare-and-swap): if provided, the update only succeeds when the current head version's id matches this value. On mismatch the server returns 409 Conflict with the current head id, so the caller can re-read, re-merge, and retry. When omitted, the update is an unconditional replace (backward compatible). */
|
|
2171
2174
|
expectedHeadId: z.ZodOptional<z.ZodString>;
|
|
2172
2175
|
/** Type of memory (defaults to previous version's type) */
|
|
@@ -2212,7 +2215,7 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
|
2212
2215
|
/** Additional memory ID that this version supersedes (beyond the implicit version chain) */
|
|
2213
2216
|
supersedes: z.ZodOptional<z.ZodString>;
|
|
2214
2217
|
}, "strip", z.ZodTypeAny, {
|
|
2215
|
-
content
|
|
2218
|
+
content?: string | undefined;
|
|
2216
2219
|
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
2217
2220
|
context?: string | undefined;
|
|
2218
2221
|
topics?: string[] | undefined;
|
|
@@ -2229,7 +2232,7 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
|
2229
2232
|
expectedHeadId?: string | undefined;
|
|
2230
2233
|
supersedes?: string | undefined;
|
|
2231
2234
|
}, {
|
|
2232
|
-
content
|
|
2235
|
+
content?: string | undefined;
|
|
2233
2236
|
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
2234
2237
|
context?: string | undefined;
|
|
2235
2238
|
topics?: string[] | undefined;
|
|
@@ -9578,6 +9581,9 @@ type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
|
9578
9581
|
* Response from getting a memory by ID
|
|
9579
9582
|
*/
|
|
9580
9583
|
type GetMemoryResponse = z.infer<typeof getMemoryResponse>;
|
|
9584
|
+
/**
|
|
9585
|
+
* Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400.
|
|
9586
|
+
*/
|
|
9581
9587
|
type UpdateNamedMemoryRequest = z.infer<typeof updateNamedMemoryRequest>;
|
|
9582
9588
|
type AppendNamedMemoryRequest = z.infer<typeof appendNamedMemoryRequest>;
|
|
9583
9589
|
type NamedMemoryHistoryResponse = z.infer<typeof namedMemoryHistoryResponse>;
|
|
@@ -11035,16 +11041,24 @@ declare class MemoriesService extends BaseService {
|
|
|
11035
11041
|
data: Memory;
|
|
11036
11042
|
}>>;
|
|
11037
11043
|
/**
|
|
11038
|
-
* Update a named memory (
|
|
11039
|
-
*
|
|
11040
|
-
and a SUPERSEDES relationship links the new version to the old one.
|
|
11041
|
-
The old version's effectiveState becomes 'superseded'.
|
|
11044
|
+
* Update a named memory (new version, or metadata in place)
|
|
11045
|
+
* With `content`: creates a new version of a named memory. The name pointer moves to
|
|
11046
|
+
the new version, and a SUPERSEDES relationship links the new version to the old one.
|
|
11047
|
+
The old version's effectiveState becomes 'superseded'. Returns 201.
|
|
11048
|
+
|
|
11049
|
+
Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
|
|
11050
|
+
`memoryType` or `context` is required, and they are set on the CURRENT head in place.
|
|
11051
|
+
The head keeps its id and version; no new version or SUPERSEDES edge is created, the
|
|
11052
|
+
content is not changed or re-embedded, extraction does not re-run, and no memory quota
|
|
11053
|
+
is used. Omitted metadata fields keep their stored values. `conversationId` and
|
|
11054
|
+
`supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
|
|
11055
|
+
content path (409 on mismatch). Returns 200.
|
|
11042
11056
|
|
|
11043
11057
|
* @param name - Memory name (kebab-case, 2-64 chars)
|
|
11044
11058
|
* @param body - Request body
|
|
11045
11059
|
*/
|
|
11046
11060
|
updateNamedMemory(name: string, body: {
|
|
11047
|
-
content
|
|
11061
|
+
content?: string;
|
|
11048
11062
|
expectedHeadId?: string;
|
|
11049
11063
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
11050
11064
|
context?: string;
|
|
@@ -11061,10 +11075,10 @@ declare class MemoriesService extends BaseService {
|
|
|
11061
11075
|
};
|
|
11062
11076
|
supersedes?: string;
|
|
11063
11077
|
}): Promise<HttpResponse<{
|
|
11064
|
-
data
|
|
11065
|
-
meta
|
|
11078
|
+
data: Memory;
|
|
11079
|
+
meta: {
|
|
11066
11080
|
previousVersionId?: string;
|
|
11067
|
-
version
|
|
11081
|
+
version: number;
|
|
11068
11082
|
};
|
|
11069
11083
|
}>>;
|
|
11070
11084
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2164,9 +2164,12 @@ declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2164
2164
|
distillCompletedAt?: string | null | undefined;
|
|
2165
2165
|
};
|
|
2166
2166
|
}>>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400.
|
|
2169
|
+
*/
|
|
2167
2170
|
declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
2168
|
-
/** New content for the named memory version */
|
|
2169
|
-
content: z.ZodString
|
|
2171
|
+
/** New content for the named memory version. When present, a new version is created. When omitted, the request is a metadata-only update: at least one of codeContext, topics, memoryType or context must be set, and those fields are written on the CURRENT head in place (same id and version, no new version, no re-embedding, no extraction, no quota use). conversationId and supersedes require content. */
|
|
2172
|
+
content: z.ZodOptional<z.ZodString>;
|
|
2170
2173
|
/** Optimistic concurrency (compare-and-swap): if provided, the update only succeeds when the current head version's id matches this value. On mismatch the server returns 409 Conflict with the current head id, so the caller can re-read, re-merge, and retry. When omitted, the update is an unconditional replace (backward compatible). */
|
|
2171
2174
|
expectedHeadId: z.ZodOptional<z.ZodString>;
|
|
2172
2175
|
/** Type of memory (defaults to previous version's type) */
|
|
@@ -2212,7 +2215,7 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
|
2212
2215
|
/** Additional memory ID that this version supersedes (beyond the implicit version chain) */
|
|
2213
2216
|
supersedes: z.ZodOptional<z.ZodString>;
|
|
2214
2217
|
}, "strip", z.ZodTypeAny, {
|
|
2215
|
-
content
|
|
2218
|
+
content?: string | undefined;
|
|
2216
2219
|
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
2217
2220
|
context?: string | undefined;
|
|
2218
2221
|
topics?: string[] | undefined;
|
|
@@ -2229,7 +2232,7 @@ declare const updateNamedMemoryRequest: z.ZodObject<{
|
|
|
2229
2232
|
expectedHeadId?: string | undefined;
|
|
2230
2233
|
supersedes?: string | undefined;
|
|
2231
2234
|
}, {
|
|
2232
|
-
content
|
|
2235
|
+
content?: string | undefined;
|
|
2233
2236
|
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
2234
2237
|
context?: string | undefined;
|
|
2235
2238
|
topics?: string[] | undefined;
|
|
@@ -9578,6 +9581,9 @@ type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
|
9578
9581
|
* Response from getting a memory by ID
|
|
9579
9582
|
*/
|
|
9580
9583
|
type GetMemoryResponse = z.infer<typeof getMemoryResponse>;
|
|
9584
|
+
/**
|
|
9585
|
+
* Update a named memory. Send content to create a new version (201). Without content, at least one of codeContext, topics, memoryType, context is required, and the request updates the current head in place (200). conversationId and supersedes require content. A body with neither content nor any of those fields is rejected with 400.
|
|
9586
|
+
*/
|
|
9581
9587
|
type UpdateNamedMemoryRequest = z.infer<typeof updateNamedMemoryRequest>;
|
|
9582
9588
|
type AppendNamedMemoryRequest = z.infer<typeof appendNamedMemoryRequest>;
|
|
9583
9589
|
type NamedMemoryHistoryResponse = z.infer<typeof namedMemoryHistoryResponse>;
|
|
@@ -11035,16 +11041,24 @@ declare class MemoriesService extends BaseService {
|
|
|
11035
11041
|
data: Memory;
|
|
11036
11042
|
}>>;
|
|
11037
11043
|
/**
|
|
11038
|
-
* Update a named memory (
|
|
11039
|
-
*
|
|
11040
|
-
and a SUPERSEDES relationship links the new version to the old one.
|
|
11041
|
-
The old version's effectiveState becomes 'superseded'.
|
|
11044
|
+
* Update a named memory (new version, or metadata in place)
|
|
11045
|
+
* With `content`: creates a new version of a named memory. The name pointer moves to
|
|
11046
|
+
the new version, and a SUPERSEDES relationship links the new version to the old one.
|
|
11047
|
+
The old version's effectiveState becomes 'superseded'. Returns 201.
|
|
11048
|
+
|
|
11049
|
+
Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
|
|
11050
|
+
`memoryType` or `context` is required, and they are set on the CURRENT head in place.
|
|
11051
|
+
The head keeps its id and version; no new version or SUPERSEDES edge is created, the
|
|
11052
|
+
content is not changed or re-embedded, extraction does not re-run, and no memory quota
|
|
11053
|
+
is used. Omitted metadata fields keep their stored values. `conversationId` and
|
|
11054
|
+
`supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
|
|
11055
|
+
content path (409 on mismatch). Returns 200.
|
|
11042
11056
|
|
|
11043
11057
|
* @param name - Memory name (kebab-case, 2-64 chars)
|
|
11044
11058
|
* @param body - Request body
|
|
11045
11059
|
*/
|
|
11046
11060
|
updateNamedMemory(name: string, body: {
|
|
11047
|
-
content
|
|
11061
|
+
content?: string;
|
|
11048
11062
|
expectedHeadId?: string;
|
|
11049
11063
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
11050
11064
|
context?: string;
|
|
@@ -11061,10 +11075,10 @@ declare class MemoriesService extends BaseService {
|
|
|
11061
11075
|
};
|
|
11062
11076
|
supersedes?: string;
|
|
11063
11077
|
}): Promise<HttpResponse<{
|
|
11064
|
-
data
|
|
11065
|
-
meta
|
|
11078
|
+
data: Memory;
|
|
11079
|
+
meta: {
|
|
11066
11080
|
previousVersionId?: string;
|
|
11067
|
-
version
|
|
11081
|
+
version: number;
|
|
11068
11082
|
};
|
|
11069
11083
|
}>>;
|
|
11070
11084
|
/**
|
package/dist/index.js
CHANGED
|
@@ -3349,10 +3349,18 @@ var MemoriesService = class extends BaseService {
|
|
|
3349
3349
|
return this.client.call(request);
|
|
3350
3350
|
}
|
|
3351
3351
|
/**
|
|
3352
|
-
* Update a named memory (
|
|
3353
|
-
*
|
|
3354
|
-
and a SUPERSEDES relationship links the new version to the old one.
|
|
3355
|
-
The old version's effectiveState becomes 'superseded'.
|
|
3352
|
+
* Update a named memory (new version, or metadata in place)
|
|
3353
|
+
* With `content`: creates a new version of a named memory. The name pointer moves to
|
|
3354
|
+
the new version, and a SUPERSEDES relationship links the new version to the old one.
|
|
3355
|
+
The old version's effectiveState becomes 'superseded'. Returns 201.
|
|
3356
|
+
|
|
3357
|
+
Without `content` (metadata-only update): at least one of `codeContext`, `topics`,
|
|
3358
|
+
`memoryType` or `context` is required, and they are set on the CURRENT head in place.
|
|
3359
|
+
The head keeps its id and version; no new version or SUPERSEDES edge is created, the
|
|
3360
|
+
content is not changed or re-embedded, extraction does not re-run, and no memory quota
|
|
3361
|
+
is used. Omitted metadata fields keep their stored values. `conversationId` and
|
|
3362
|
+
`supersedes` require `content` (400 otherwise). `expectedHeadId` applies as on the
|
|
3363
|
+
content path (409 on mismatch). Returns 200.
|
|
3356
3364
|
|
|
3357
3365
|
* @param name - Memory name (kebab-case, 2-64 chars)
|
|
3358
3366
|
* @param body - Request body
|
|
@@ -6477,8 +6485,8 @@ var getMemoryResponse = z.lazy(() => z.object({
|
|
|
6477
6485
|
data: memory
|
|
6478
6486
|
}));
|
|
6479
6487
|
var updateNamedMemoryRequest = z.object({
|
|
6480
|
-
/** New content for the named memory version */
|
|
6481
|
-
content: z.string().min(1).max(5e4),
|
|
6488
|
+
/** New content for the named memory version. When present, a new version is created. When omitted, the request is a metadata-only update: at least one of codeContext, topics, memoryType or context must be set, and those fields are written on the CURRENT head in place (same id and version, no new version, no re-embedding, no extraction, no quota use). conversationId and supersedes require content. */
|
|
6489
|
+
content: z.string().min(1).max(5e4).optional(),
|
|
6482
6490
|
/** Optimistic concurrency (compare-and-swap): if provided, the update only succeeds when the current head version's id matches this value. On mismatch the server returns 409 Conflict with the current head id, so the caller can re-read, re-merge, and retry. When omitted, the update is an unconditional replace (backward compatible). */
|
|
6483
6491
|
expectedHeadId: z.string().uuid().optional(),
|
|
6484
6492
|
/** Type of memory (defaults to previous version's type) */
|