@memnexus-ai/sdk 1.55.14 → 1.56.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 +38 -5
- package/dist/index.d.cts +77 -6
- package/dist/index.d.ts +77 -6
- package/dist/index.js +38 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1460,6 +1460,32 @@ var Memories = class {
|
|
|
1460
1460
|
body
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Atomically append a block to a named memory
|
|
1465
|
+
*
|
|
1466
|
+
* Atomically appends a text block to a named memory, eliminating the
|
|
1467
|
+
* read-modify-write clobber that concurrent full-content updates cause on
|
|
1468
|
+
* shared named memories. The server reads the current head, concatenates
|
|
1469
|
+
* `existing + separator + block`, and writes a new version under the
|
|
1470
|
+
* NameLock with an internal compare-and-swap + bounded retry — so
|
|
1471
|
+
* simultaneous appends all survive and the client needs no retry logic.
|
|
1472
|
+
* Content is decrypted, assembled, size-checked, and re-encrypted
|
|
1473
|
+
* server-side; plaintext is never returned to other callers.
|
|
1474
|
+
*
|
|
1475
|
+
* @param name — Memory name (kebab-case, 2-64 chars)
|
|
1476
|
+
* @param body — Request body
|
|
1477
|
+
*/
|
|
1478
|
+
async appendNamedMemory(name, body) {
|
|
1479
|
+
const pathParams = {
|
|
1480
|
+
"name": name
|
|
1481
|
+
};
|
|
1482
|
+
return this._http.request({
|
|
1483
|
+
method: "POST",
|
|
1484
|
+
path: "/api/memories/named/{name}/append",
|
|
1485
|
+
pathParams,
|
|
1486
|
+
body
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1463
1489
|
/**
|
|
1464
1490
|
* Bulk delete multiple memories
|
|
1465
1491
|
*
|
|
@@ -1857,12 +1883,19 @@ var Health = class {
|
|
|
1857
1883
|
});
|
|
1858
1884
|
}
|
|
1859
1885
|
/**
|
|
1860
|
-
* API
|
|
1886
|
+
* API readiness check endpoint
|
|
1861
1887
|
*
|
|
1862
|
-
* Returns the
|
|
1863
|
-
* This endpoint is public and requires no authentication.
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1888
|
+
* Returns the readiness status of the API service, based on database
|
|
1889
|
+
* connectivity. This endpoint is public and requires no authentication.
|
|
1890
|
+
* Returns 200 when the database is reachable, 503 when it is not.
|
|
1891
|
+
*
|
|
1892
|
+
* v2.35: the database status is served from a CACHE refreshed by a
|
|
1893
|
+
* background loop every HEALTH_DB_CHECK_INTERVAL_MS — this endpoint does
|
|
1894
|
+
* NOT query the database per request, so probe latency is decoupled from
|
|
1895
|
+
* query latency (the 07-03 dual-pod ejection fix). If the cache is older
|
|
1896
|
+
* than HEALTH_DB_STALENESS_CEILING_MS (the background checker is wedged,
|
|
1897
|
+
* e.g. a hung query), readiness reports NOT-READY (503) — a genuinely
|
|
1898
|
+
* dead/hung database is never masked by a stale "ok".
|
|
1866
1899
|
*
|
|
1867
1900
|
*/
|
|
1868
1901
|
async healthCheck() {
|
package/dist/index.d.cts
CHANGED
|
@@ -345,6 +345,8 @@ interface GetMemoryResponse {
|
|
|
345
345
|
interface UpdateNamedMemoryRequest {
|
|
346
346
|
/** New content for the named memory version */
|
|
347
347
|
content: string;
|
|
348
|
+
/** 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). */
|
|
349
|
+
expectedHeadId?: string;
|
|
348
350
|
/** Type of memory (defaults to previous version's type) */
|
|
349
351
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
350
352
|
/** Context or domain */
|
|
@@ -365,6 +367,29 @@ interface UpdateNamedMemoryRequest {
|
|
|
365
367
|
/** Additional memory ID that this version supersedes (beyond the implicit version chain) */
|
|
366
368
|
supersedes?: string;
|
|
367
369
|
}
|
|
370
|
+
interface AppendNamedMemoryRequest {
|
|
371
|
+
/** Text block to append to the named memory's current content. The total (existing + separator + block) must not exceed the maximum content length or the request is rejected with 413. */
|
|
372
|
+
block: string;
|
|
373
|
+
/** Separator inserted between the existing content and the appended block. Defaults to a blank line ("\n\n"). */
|
|
374
|
+
separator?: string;
|
|
375
|
+
/** Type of memory (defaults to previous version's type) */
|
|
376
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
377
|
+
/** Context or domain */
|
|
378
|
+
context?: string;
|
|
379
|
+
/** Associated topics */
|
|
380
|
+
topics?: string[];
|
|
381
|
+
/** Conversation to group this version with (overrides previous version's conversation) */
|
|
382
|
+
conversationId?: string;
|
|
383
|
+
codeContext?: {
|
|
384
|
+
product?: string;
|
|
385
|
+
repo?: string;
|
|
386
|
+
service?: string;
|
|
387
|
+
component?: string;
|
|
388
|
+
team?: string;
|
|
389
|
+
role?: string;
|
|
390
|
+
extra?: Record<string, unknown>;
|
|
391
|
+
};
|
|
392
|
+
}
|
|
368
393
|
interface NamedMemoryHistoryResponse {
|
|
369
394
|
/** Human-readable name for deterministic retrieval (kebab-case, 2-64 chars) */
|
|
370
395
|
name: string;
|
|
@@ -2835,6 +2860,7 @@ declare class Memories {
|
|
|
2835
2860
|
*/
|
|
2836
2861
|
updateNamedMemory(name: string, body: {
|
|
2837
2862
|
content: string;
|
|
2863
|
+
expectedHeadId?: string;
|
|
2838
2864
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
2839
2865
|
context?: string;
|
|
2840
2866
|
topics?: string[];
|
|
@@ -2856,6 +2882,44 @@ declare class Memories {
|
|
|
2856
2882
|
version?: number;
|
|
2857
2883
|
};
|
|
2858
2884
|
}>>;
|
|
2885
|
+
/**
|
|
2886
|
+
* Atomically append a block to a named memory
|
|
2887
|
+
*
|
|
2888
|
+
* Atomically appends a text block to a named memory, eliminating the
|
|
2889
|
+
* read-modify-write clobber that concurrent full-content updates cause on
|
|
2890
|
+
* shared named memories. The server reads the current head, concatenates
|
|
2891
|
+
* `existing + separator + block`, and writes a new version under the
|
|
2892
|
+
* NameLock with an internal compare-and-swap + bounded retry — so
|
|
2893
|
+
* simultaneous appends all survive and the client needs no retry logic.
|
|
2894
|
+
* Content is decrypted, assembled, size-checked, and re-encrypted
|
|
2895
|
+
* server-side; plaintext is never returned to other callers.
|
|
2896
|
+
*
|
|
2897
|
+
* @param name — Memory name (kebab-case, 2-64 chars)
|
|
2898
|
+
* @param body — Request body
|
|
2899
|
+
*/
|
|
2900
|
+
appendNamedMemory(name: string, body: {
|
|
2901
|
+
block: string;
|
|
2902
|
+
separator?: string;
|
|
2903
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
2904
|
+
context?: string;
|
|
2905
|
+
topics?: string[];
|
|
2906
|
+
conversationId?: string;
|
|
2907
|
+
codeContext?: {
|
|
2908
|
+
product?: string;
|
|
2909
|
+
repo?: string;
|
|
2910
|
+
service?: string;
|
|
2911
|
+
component?: string;
|
|
2912
|
+
team?: string;
|
|
2913
|
+
role?: string;
|
|
2914
|
+
extra?: Record<string, unknown>;
|
|
2915
|
+
};
|
|
2916
|
+
}): Promise<HttpResponse<{
|
|
2917
|
+
data?: Memory;
|
|
2918
|
+
meta?: {
|
|
2919
|
+
previousVersionId?: string;
|
|
2920
|
+
version?: number;
|
|
2921
|
+
};
|
|
2922
|
+
}>>;
|
|
2859
2923
|
/**
|
|
2860
2924
|
* Bulk delete multiple memories
|
|
2861
2925
|
*
|
|
@@ -3266,12 +3330,19 @@ declare class Health {
|
|
|
3266
3330
|
uptime?: number;
|
|
3267
3331
|
}>>;
|
|
3268
3332
|
/**
|
|
3269
|
-
* API
|
|
3333
|
+
* API readiness check endpoint
|
|
3270
3334
|
*
|
|
3271
|
-
* Returns the
|
|
3272
|
-
* This endpoint is public and requires no authentication.
|
|
3273
|
-
*
|
|
3274
|
-
*
|
|
3335
|
+
* Returns the readiness status of the API service, based on database
|
|
3336
|
+
* connectivity. This endpoint is public and requires no authentication.
|
|
3337
|
+
* Returns 200 when the database is reachable, 503 when it is not.
|
|
3338
|
+
*
|
|
3339
|
+
* v2.35: the database status is served from a CACHE refreshed by a
|
|
3340
|
+
* background loop every HEALTH_DB_CHECK_INTERVAL_MS — this endpoint does
|
|
3341
|
+
* NOT query the database per request, so probe latency is decoupled from
|
|
3342
|
+
* query latency (the 07-03 dual-pod ejection fix). If the cache is older
|
|
3343
|
+
* than HEALTH_DB_STALENESS_CEILING_MS (the background checker is wedged,
|
|
3344
|
+
* e.g. a hung query), readiness reports NOT-READY (503) — a genuinely
|
|
3345
|
+
* dead/hung database is never masked by a stale "ok".
|
|
3275
3346
|
*
|
|
3276
3347
|
*/
|
|
3277
3348
|
healthCheck(): Promise<HttpResponse<{
|
|
@@ -4288,4 +4359,4 @@ declare class MemNexus {
|
|
|
4288
4359
|
forget(memoryId: string): Promise<HttpResponse<unknown>>;
|
|
4289
4360
|
}
|
|
4290
4361
|
|
|
4291
|
-
export { type AddMemoryToNarrativeRequest, type ApiKey, type Artifact, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, type BillingOverview, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type BulkDeleteRequest, type BulkDeleteResponse, type BulkTagRequest, type BulkTagResponse, type BulkUpdateRequest, type BulkUpdateResponse, type CheckoutSessionResponse, type ClaimGroup, type ClaimGroupClaim, type ClaimGroupSignals, type CodeContext, type Community, type CompileInstructionsRequest, type CompileInstructionsResponse, type Conversation, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type CreateRecommendationRequest, type CreateSystemAlertRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, type Entity, type EntityNode, type Error$1 as Error, type ExportRequest, type FacetEntry, type Facets, type Fact, type FactSearchRequest, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, type HealthCheck, type HttpClientOptions, type HttpResponse, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, type MatchRecommendationsRequest, MemNexus, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, type Pagination, type Pattern, type PaymentMethod, type PortalSessionResponse, type PrecomputedMemoryFields, type Recommendation, type RelatedMemoryResult, SdkError, type SearchMeta, type SearchRequest, type SearchResponse, type SearchResult, type ServiceCheck, type Subscription, type SystemAlert, type TemporalMetadata, type Topic, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type UpdateSystemAlertRequest, type User, type UserUsage };
|
|
4362
|
+
export { type AddMemoryToNarrativeRequest, type ApiKey, type AppendNamedMemoryRequest, type Artifact, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, type BillingOverview, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type BulkDeleteRequest, type BulkDeleteResponse, type BulkTagRequest, type BulkTagResponse, type BulkUpdateRequest, type BulkUpdateResponse, type CheckoutSessionResponse, type ClaimGroup, type ClaimGroupClaim, type ClaimGroupSignals, type CodeContext, type Community, type CompileInstructionsRequest, type CompileInstructionsResponse, type Conversation, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type CreateRecommendationRequest, type CreateSystemAlertRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, type Entity, type EntityNode, type Error$1 as Error, type ExportRequest, type FacetEntry, type Facets, type Fact, type FactSearchRequest, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, type HealthCheck, type HttpClientOptions, type HttpResponse, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, type MatchRecommendationsRequest, MemNexus, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, type Pagination, type Pattern, type PaymentMethod, type PortalSessionResponse, type PrecomputedMemoryFields, type Recommendation, type RelatedMemoryResult, SdkError, type SearchMeta, type SearchRequest, type SearchResponse, type SearchResult, type ServiceCheck, type Subscription, type SystemAlert, type TemporalMetadata, type Topic, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type UpdateSystemAlertRequest, type User, type UserUsage };
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,8 @@ interface GetMemoryResponse {
|
|
|
345
345
|
interface UpdateNamedMemoryRequest {
|
|
346
346
|
/** New content for the named memory version */
|
|
347
347
|
content: string;
|
|
348
|
+
/** 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). */
|
|
349
|
+
expectedHeadId?: string;
|
|
348
350
|
/** Type of memory (defaults to previous version's type) */
|
|
349
351
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
350
352
|
/** Context or domain */
|
|
@@ -365,6 +367,29 @@ interface UpdateNamedMemoryRequest {
|
|
|
365
367
|
/** Additional memory ID that this version supersedes (beyond the implicit version chain) */
|
|
366
368
|
supersedes?: string;
|
|
367
369
|
}
|
|
370
|
+
interface AppendNamedMemoryRequest {
|
|
371
|
+
/** Text block to append to the named memory's current content. The total (existing + separator + block) must not exceed the maximum content length or the request is rejected with 413. */
|
|
372
|
+
block: string;
|
|
373
|
+
/** Separator inserted between the existing content and the appended block. Defaults to a blank line ("\n\n"). */
|
|
374
|
+
separator?: string;
|
|
375
|
+
/** Type of memory (defaults to previous version's type) */
|
|
376
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
377
|
+
/** Context or domain */
|
|
378
|
+
context?: string;
|
|
379
|
+
/** Associated topics */
|
|
380
|
+
topics?: string[];
|
|
381
|
+
/** Conversation to group this version with (overrides previous version's conversation) */
|
|
382
|
+
conversationId?: string;
|
|
383
|
+
codeContext?: {
|
|
384
|
+
product?: string;
|
|
385
|
+
repo?: string;
|
|
386
|
+
service?: string;
|
|
387
|
+
component?: string;
|
|
388
|
+
team?: string;
|
|
389
|
+
role?: string;
|
|
390
|
+
extra?: Record<string, unknown>;
|
|
391
|
+
};
|
|
392
|
+
}
|
|
368
393
|
interface NamedMemoryHistoryResponse {
|
|
369
394
|
/** Human-readable name for deterministic retrieval (kebab-case, 2-64 chars) */
|
|
370
395
|
name: string;
|
|
@@ -2835,6 +2860,7 @@ declare class Memories {
|
|
|
2835
2860
|
*/
|
|
2836
2861
|
updateNamedMemory(name: string, body: {
|
|
2837
2862
|
content: string;
|
|
2863
|
+
expectedHeadId?: string;
|
|
2838
2864
|
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
2839
2865
|
context?: string;
|
|
2840
2866
|
topics?: string[];
|
|
@@ -2856,6 +2882,44 @@ declare class Memories {
|
|
|
2856
2882
|
version?: number;
|
|
2857
2883
|
};
|
|
2858
2884
|
}>>;
|
|
2885
|
+
/**
|
|
2886
|
+
* Atomically append a block to a named memory
|
|
2887
|
+
*
|
|
2888
|
+
* Atomically appends a text block to a named memory, eliminating the
|
|
2889
|
+
* read-modify-write clobber that concurrent full-content updates cause on
|
|
2890
|
+
* shared named memories. The server reads the current head, concatenates
|
|
2891
|
+
* `existing + separator + block`, and writes a new version under the
|
|
2892
|
+
* NameLock with an internal compare-and-swap + bounded retry — so
|
|
2893
|
+
* simultaneous appends all survive and the client needs no retry logic.
|
|
2894
|
+
* Content is decrypted, assembled, size-checked, and re-encrypted
|
|
2895
|
+
* server-side; plaintext is never returned to other callers.
|
|
2896
|
+
*
|
|
2897
|
+
* @param name — Memory name (kebab-case, 2-64 chars)
|
|
2898
|
+
* @param body — Request body
|
|
2899
|
+
*/
|
|
2900
|
+
appendNamedMemory(name: string, body: {
|
|
2901
|
+
block: string;
|
|
2902
|
+
separator?: string;
|
|
2903
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
2904
|
+
context?: string;
|
|
2905
|
+
topics?: string[];
|
|
2906
|
+
conversationId?: string;
|
|
2907
|
+
codeContext?: {
|
|
2908
|
+
product?: string;
|
|
2909
|
+
repo?: string;
|
|
2910
|
+
service?: string;
|
|
2911
|
+
component?: string;
|
|
2912
|
+
team?: string;
|
|
2913
|
+
role?: string;
|
|
2914
|
+
extra?: Record<string, unknown>;
|
|
2915
|
+
};
|
|
2916
|
+
}): Promise<HttpResponse<{
|
|
2917
|
+
data?: Memory;
|
|
2918
|
+
meta?: {
|
|
2919
|
+
previousVersionId?: string;
|
|
2920
|
+
version?: number;
|
|
2921
|
+
};
|
|
2922
|
+
}>>;
|
|
2859
2923
|
/**
|
|
2860
2924
|
* Bulk delete multiple memories
|
|
2861
2925
|
*
|
|
@@ -3266,12 +3330,19 @@ declare class Health {
|
|
|
3266
3330
|
uptime?: number;
|
|
3267
3331
|
}>>;
|
|
3268
3332
|
/**
|
|
3269
|
-
* API
|
|
3333
|
+
* API readiness check endpoint
|
|
3270
3334
|
*
|
|
3271
|
-
* Returns the
|
|
3272
|
-
* This endpoint is public and requires no authentication.
|
|
3273
|
-
*
|
|
3274
|
-
*
|
|
3335
|
+
* Returns the readiness status of the API service, based on database
|
|
3336
|
+
* connectivity. This endpoint is public and requires no authentication.
|
|
3337
|
+
* Returns 200 when the database is reachable, 503 when it is not.
|
|
3338
|
+
*
|
|
3339
|
+
* v2.35: the database status is served from a CACHE refreshed by a
|
|
3340
|
+
* background loop every HEALTH_DB_CHECK_INTERVAL_MS — this endpoint does
|
|
3341
|
+
* NOT query the database per request, so probe latency is decoupled from
|
|
3342
|
+
* query latency (the 07-03 dual-pod ejection fix). If the cache is older
|
|
3343
|
+
* than HEALTH_DB_STALENESS_CEILING_MS (the background checker is wedged,
|
|
3344
|
+
* e.g. a hung query), readiness reports NOT-READY (503) — a genuinely
|
|
3345
|
+
* dead/hung database is never masked by a stale "ok".
|
|
3275
3346
|
*
|
|
3276
3347
|
*/
|
|
3277
3348
|
healthCheck(): Promise<HttpResponse<{
|
|
@@ -4288,4 +4359,4 @@ declare class MemNexus {
|
|
|
4288
4359
|
forget(memoryId: string): Promise<HttpResponse<unknown>>;
|
|
4289
4360
|
}
|
|
4290
4361
|
|
|
4291
|
-
export { type AddMemoryToNarrativeRequest, type ApiKey, type Artifact, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, type BillingOverview, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type BulkDeleteRequest, type BulkDeleteResponse, type BulkTagRequest, type BulkTagResponse, type BulkUpdateRequest, type BulkUpdateResponse, type CheckoutSessionResponse, type ClaimGroup, type ClaimGroupClaim, type ClaimGroupSignals, type CodeContext, type Community, type CompileInstructionsRequest, type CompileInstructionsResponse, type Conversation, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type CreateRecommendationRequest, type CreateSystemAlertRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, type Entity, type EntityNode, type Error$1 as Error, type ExportRequest, type FacetEntry, type Facets, type Fact, type FactSearchRequest, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, type HealthCheck, type HttpClientOptions, type HttpResponse, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, type MatchRecommendationsRequest, MemNexus, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, type Pagination, type Pattern, type PaymentMethod, type PortalSessionResponse, type PrecomputedMemoryFields, type Recommendation, type RelatedMemoryResult, SdkError, type SearchMeta, type SearchRequest, type SearchResponse, type SearchResult, type ServiceCheck, type Subscription, type SystemAlert, type TemporalMetadata, type Topic, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type UpdateSystemAlertRequest, type User, type UserUsage };
|
|
4362
|
+
export { type AddMemoryToNarrativeRequest, type ApiKey, type AppendNamedMemoryRequest, type Artifact, type BatchGetMemoriesMeta, type BatchGetMemoriesRequest, type BatchGetMemoriesResponse, type BillingOverview, type BuildContextActiveWork, type BuildContextActivity, type BuildContextFact, type BuildContextGotcha, type BuildContextMeta, type BuildContextPattern, type BuildContextRequest, type BuildContextResponse, type BulkDeleteRequest, type BulkDeleteResponse, type BulkTagRequest, type BulkTagResponse, type BulkUpdateRequest, type BulkUpdateResponse, type CheckoutSessionResponse, type ClaimGroup, type ClaimGroupClaim, type ClaimGroupSignals, type CodeContext, type Community, type CompileInstructionsRequest, type CompileInstructionsResponse, type Conversation, type CreateArtifactRequest, type CreateCheckoutSessionRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type CreatePortalSessionRequest, type CreateRecommendationRequest, type CreateSystemAlertRequest, type DigestEntity, type DigestKeyFact, type DigestMetadata, type DigestRequest, type DigestResponse, type DigestSource, type DigestTimeRange, type EffectiveStateBreakdown, type Entity, type EntityNode, type Error$1 as Error, type ExportRequest, type FacetEntry, type Facets, type Fact, type FactSearchRequest, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, type HealthCheck, type HttpClientOptions, type HttpResponse, type Invoice, type ListInvoicesResponse, type ListNarrativesResponse, type ListPaymentMethodsResponse, type MatchRecommendationsRequest, MemNexus, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type NamedMemoryHistoryResponse, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, type Pagination, type Pattern, type PaymentMethod, type PortalSessionResponse, type PrecomputedMemoryFields, type Recommendation, type RelatedMemoryResult, SdkError, type SearchMeta, type SearchRequest, type SearchResponse, type SearchResult, type ServiceCheck, type Subscription, type SystemAlert, type TemporalMetadata, type Topic, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNamedMemoryRequest, type UpdateNarrativeRequest, type UpdateSystemAlertRequest, type User, type UserUsage };
|
package/dist/index.js
CHANGED
|
@@ -1433,6 +1433,32 @@ var Memories = class {
|
|
|
1433
1433
|
body
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Atomically append a block to a named memory
|
|
1438
|
+
*
|
|
1439
|
+
* Atomically appends a text block to a named memory, eliminating the
|
|
1440
|
+
* read-modify-write clobber that concurrent full-content updates cause on
|
|
1441
|
+
* shared named memories. The server reads the current head, concatenates
|
|
1442
|
+
* `existing + separator + block`, and writes a new version under the
|
|
1443
|
+
* NameLock with an internal compare-and-swap + bounded retry — so
|
|
1444
|
+
* simultaneous appends all survive and the client needs no retry logic.
|
|
1445
|
+
* Content is decrypted, assembled, size-checked, and re-encrypted
|
|
1446
|
+
* server-side; plaintext is never returned to other callers.
|
|
1447
|
+
*
|
|
1448
|
+
* @param name — Memory name (kebab-case, 2-64 chars)
|
|
1449
|
+
* @param body — Request body
|
|
1450
|
+
*/
|
|
1451
|
+
async appendNamedMemory(name, body) {
|
|
1452
|
+
const pathParams = {
|
|
1453
|
+
"name": name
|
|
1454
|
+
};
|
|
1455
|
+
return this._http.request({
|
|
1456
|
+
method: "POST",
|
|
1457
|
+
path: "/api/memories/named/{name}/append",
|
|
1458
|
+
pathParams,
|
|
1459
|
+
body
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1436
1462
|
/**
|
|
1437
1463
|
* Bulk delete multiple memories
|
|
1438
1464
|
*
|
|
@@ -1830,12 +1856,19 @@ var Health = class {
|
|
|
1830
1856
|
});
|
|
1831
1857
|
}
|
|
1832
1858
|
/**
|
|
1833
|
-
* API
|
|
1859
|
+
* API readiness check endpoint
|
|
1834
1860
|
*
|
|
1835
|
-
* Returns the
|
|
1836
|
-
* This endpoint is public and requires no authentication.
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1861
|
+
* Returns the readiness status of the API service, based on database
|
|
1862
|
+
* connectivity. This endpoint is public and requires no authentication.
|
|
1863
|
+
* Returns 200 when the database is reachable, 503 when it is not.
|
|
1864
|
+
*
|
|
1865
|
+
* v2.35: the database status is served from a CACHE refreshed by a
|
|
1866
|
+
* background loop every HEALTH_DB_CHECK_INTERVAL_MS — this endpoint does
|
|
1867
|
+
* NOT query the database per request, so probe latency is decoupled from
|
|
1868
|
+
* query latency (the 07-03 dual-pod ejection fix). If the cache is older
|
|
1869
|
+
* than HEALTH_DB_STALENESS_CEILING_MS (the background checker is wedged,
|
|
1870
|
+
* e.g. a hung query), readiness reports NOT-READY (503) — a genuinely
|
|
1871
|
+
* dead/hung database is never masked by a stale "ok".
|
|
1839
1872
|
*
|
|
1840
1873
|
*/
|
|
1841
1874
|
async healthCheck() {
|