@memnexus-ai/typescript-sdk 1.68.7 → 1.69.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 +66 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +194 -7
- package/dist/index.d.ts +194 -7
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -55,6 +55,7 @@ __export(index_exports, {
|
|
|
55
55
|
batchGetMemoriesRequest: () => batchGetMemoriesRequest,
|
|
56
56
|
batchGetMemoriesResponse: () => batchGetMemoriesResponse,
|
|
57
57
|
billingOverview: () => billingOverview,
|
|
58
|
+
branchFailure: () => branchFailure,
|
|
58
59
|
buildContextActiveWork: () => buildContextActiveWork,
|
|
59
60
|
buildContextActivity: () => buildContextActivity,
|
|
60
61
|
buildContextFact: () => buildContextFact,
|
|
@@ -131,6 +132,7 @@ __export(index_exports, {
|
|
|
131
132
|
precomputedMemoryFields: () => precomputedMemoryFields,
|
|
132
133
|
recommendation: () => recommendation,
|
|
133
134
|
relatedMemoryResult: () => relatedMemoryResult,
|
|
135
|
+
searchFailureResponse: () => searchFailureResponse,
|
|
134
136
|
searchMeta: () => searchMeta,
|
|
135
137
|
searchRequest: () => searchRequest,
|
|
136
138
|
searchResponse: () => searchResponse,
|
|
@@ -5888,6 +5890,42 @@ var AdminService = class extends BaseService {
|
|
|
5888
5890
|
}
|
|
5889
5891
|
return this.client.call(request);
|
|
5890
5892
|
}
|
|
5893
|
+
/**
|
|
5894
|
+
* Re-encrypt existing plaintext-at-rest Memory and Entity rows (dry-run by default)
|
|
5895
|
+
* @param apply - When true, mutate rows. Default false = dry-run (count only, no writes). May also be supplied as `apply: true` in the request body; either the query param or the body field enables apply mode.
|
|
5896
|
+
* @param body - Request body
|
|
5897
|
+
*/
|
|
5898
|
+
async adminMigrateEncryptionBackfill(options) {
|
|
5899
|
+
const request = new Request({
|
|
5900
|
+
baseUrl: this.config.baseUrl || "http://localhost:3000",
|
|
5901
|
+
method: "POST",
|
|
5902
|
+
path: "/api/admin/migrate/encryption-backfill",
|
|
5903
|
+
config: this.config,
|
|
5904
|
+
retry: {
|
|
5905
|
+
attempts: 3,
|
|
5906
|
+
delayMs: 150,
|
|
5907
|
+
maxDelayMs: 5e3,
|
|
5908
|
+
jitterMs: 50,
|
|
5909
|
+
backoffFactor: 2
|
|
5910
|
+
}
|
|
5911
|
+
});
|
|
5912
|
+
if (options?.apply !== void 0) {
|
|
5913
|
+
request.addQueryParam("apply", {
|
|
5914
|
+
key: "apply",
|
|
5915
|
+
value: options.apply,
|
|
5916
|
+
explode: false,
|
|
5917
|
+
encode: true,
|
|
5918
|
+
style: "form",
|
|
5919
|
+
isLimit: false,
|
|
5920
|
+
isOffset: false,
|
|
5921
|
+
isCursor: false
|
|
5922
|
+
});
|
|
5923
|
+
}
|
|
5924
|
+
if (options?.body !== void 0) {
|
|
5925
|
+
request.addBody(options?.body);
|
|
5926
|
+
}
|
|
5927
|
+
return this.client.call(request);
|
|
5928
|
+
}
|
|
5891
5929
|
};
|
|
5892
5930
|
|
|
5893
5931
|
// src/services/admin-alerts-service.ts
|
|
@@ -6931,6 +6969,14 @@ var searchResult = import_zod.z.lazy(() => import_zod.z.object({
|
|
|
6931
6969
|
contributingFactors: import_zod.z.array(import_zod.z.string()).optional()
|
|
6932
6970
|
}).optional()
|
|
6933
6971
|
}));
|
|
6972
|
+
var branchFailure = import_zod.z.object({
|
|
6973
|
+
/** Search branch name (fulltext, semantic, topic, digest, …) */
|
|
6974
|
+
name: import_zod.z.string(),
|
|
6975
|
+
/** How the branch failed */
|
|
6976
|
+
status: import_zod.z.enum(["timeout", "error"]),
|
|
6977
|
+
/** Closed-vocabulary cause. Never free text — a raw message could leak internal hostnames, ports, or query text. */
|
|
6978
|
+
reason: import_zod.z.enum(["timeout", "connection", "query_error", "provider_error", "unknown"])
|
|
6979
|
+
});
|
|
6934
6980
|
var temporalMetadata = import_zod.z.object({
|
|
6935
6981
|
/** Temporal query mode used */
|
|
6936
6982
|
temporalMode: import_zod.z.string(),
|
|
@@ -6964,6 +7010,10 @@ var searchMeta = import_zod.z.lazy(() => import_zod.z.object({
|
|
|
6964
7010
|
searchTime: import_zod.z.number(),
|
|
6965
7011
|
/** Search method used for this query */
|
|
6966
7012
|
searchMethod: import_zod.z.string(),
|
|
7013
|
+
/** True when this result set is INCOMPLETE — at least one search branch timed out or errored, so absence of a memory does not mean it does not exist. ABSENT (not false) on the healthy path: a healthy response gains no new fields. */
|
|
7014
|
+
degraded: import_zod.z.boolean().optional(),
|
|
7015
|
+
/** The branches that did NOT complete, present only when degraded is true. Healthy branches are omitted, and the field is absent entirely on the healthy path. */
|
|
7016
|
+
branchFailures: import_zod.z.array(branchFailure).optional(),
|
|
6967
7017
|
/** Temporal query metadata (present when temporal filters are used) */
|
|
6968
7018
|
temporalMetadata: temporalMetadata.optional()
|
|
6969
7019
|
}));
|
|
@@ -7029,6 +7079,20 @@ var searchResponse = import_zod.z.lazy(() => import_zod.z.object({
|
|
|
7029
7079
|
/** Clusters of related claims that may conflict. Only present when relevant groups exist. Claims within each group are sorted newest-first. */
|
|
7030
7080
|
claim_groups: import_zod.z.array(claimGroup).optional()
|
|
7031
7081
|
}));
|
|
7082
|
+
var searchFailureResponse = import_zod.z.lazy(() => import_zod.z.object({
|
|
7083
|
+
/** Human-readable message. Worded so it never reads as 'no results exist'. */
|
|
7084
|
+
error: import_zod.z.string(),
|
|
7085
|
+
/** Top-level outcome the client switches on. all_branches_failed = every search branch failed, backend degraded (a retry may not help until it recovers); deadline_exceeded = the in-app request deadline was hit before a result could be produced (a retry may land inside budget); service_at_capacity = the request was shed by bounded admission/backpressure (retrying after retry_after_ms succeeds once load drops). */
|
|
7086
|
+
reason: import_zod.z.enum(["all_branches_failed", "deadline_exceeded", "service_at_capacity"]).optional(),
|
|
7087
|
+
/** Explicit signal that retrying is worthwhile. True for all typed honest-failure reasons. */
|
|
7088
|
+
retryable: import_zod.z.boolean().optional(),
|
|
7089
|
+
/** Advisory delay in milliseconds before retrying. Present only when reason is service_at_capacity. Carries server-side jitter (base ±25%) so clients shed together do not retry in lockstep and re-create the spike. */
|
|
7090
|
+
retry_after_ms: import_zod.z.number().min(0).optional(),
|
|
7091
|
+
/** True when the gather was incomplete — at least one search branch timed out or errored. */
|
|
7092
|
+
degraded: import_zod.z.boolean().optional(),
|
|
7093
|
+
/** The branches that did NOT complete. Healthy branches are omitted. */
|
|
7094
|
+
branchFailures: import_zod.z.array(branchFailure).optional()
|
|
7095
|
+
}));
|
|
7032
7096
|
var fact = import_zod.z.object({
|
|
7033
7097
|
/** Unique identifier for the fact */
|
|
7034
7098
|
id: import_zod.z.string(),
|
|
@@ -8074,6 +8138,7 @@ var index_default = Memnexus;
|
|
|
8074
8138
|
batchGetMemoriesRequest,
|
|
8075
8139
|
batchGetMemoriesResponse,
|
|
8076
8140
|
billingOverview,
|
|
8141
|
+
branchFailure,
|
|
8077
8142
|
buildContextActiveWork,
|
|
8078
8143
|
buildContextActivity,
|
|
8079
8144
|
buildContextFact,
|
|
@@ -8149,6 +8214,7 @@ var index_default = Memnexus;
|
|
|
8149
8214
|
precomputedMemoryFields,
|
|
8150
8215
|
recommendation,
|
|
8151
8216
|
relatedMemoryResult,
|
|
8217
|
+
searchFailureResponse,
|
|
8152
8218
|
searchMeta,
|
|
8153
8219
|
searchRequest,
|
|
8154
8220
|
searchResponse,
|