@memnexus-ai/typescript-sdk 1.68.8 → 1.70.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 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,
@@ -6967,6 +6969,14 @@ var searchResult = import_zod.z.lazy(() => import_zod.z.object({
6967
6969
  contributingFactors: import_zod.z.array(import_zod.z.string()).optional()
6968
6970
  }).optional()
6969
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
+ });
6970
6980
  var temporalMetadata = import_zod.z.object({
6971
6981
  /** Temporal query mode used */
6972
6982
  temporalMode: import_zod.z.string(),
@@ -7000,6 +7010,10 @@ var searchMeta = import_zod.z.lazy(() => import_zod.z.object({
7000
7010
  searchTime: import_zod.z.number(),
7001
7011
  /** Search method used for this query */
7002
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(),
7003
7017
  /** Temporal query metadata (present when temporal filters are used) */
7004
7018
  temporalMetadata: temporalMetadata.optional()
7005
7019
  }));
@@ -7065,6 +7079,20 @@ var searchResponse = import_zod.z.lazy(() => import_zod.z.object({
7065
7079
  /** Clusters of related claims that may conflict. Only present when relevant groups exist. Claims within each group are sorted newest-first. */
7066
7080
  claim_groups: import_zod.z.array(claimGroup).optional()
7067
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
+ }));
7068
7096
  var fact = import_zod.z.object({
7069
7097
  /** Unique identifier for the fact */
7070
7098
  id: import_zod.z.string(),
@@ -8110,6 +8138,7 @@ var index_default = Memnexus;
8110
8138
  batchGetMemoriesRequest,
8111
8139
  batchGetMemoriesResponse,
8112
8140
  billingOverview,
8141
+ branchFailure,
8113
8142
  buildContextActiveWork,
8114
8143
  buildContextActivity,
8115
8144
  buildContextFact,
@@ -8185,6 +8214,7 @@ var index_default = Memnexus;
8185
8214
  precomputedMemoryFields,
8186
8215
  recommendation,
8187
8216
  relatedMemoryResult,
8217
+ searchFailureResponse,
8188
8218
  searchMeta,
8189
8219
  searchRequest,
8190
8220
  searchResponse,