@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 +30 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +150 -7
- package/dist/index.d.ts +150 -7
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6814,6 +6814,14 @@ var searchResult = z.lazy(() => z.object({
|
|
|
6814
6814
|
contributingFactors: z.array(z.string()).optional()
|
|
6815
6815
|
}).optional()
|
|
6816
6816
|
}));
|
|
6817
|
+
var branchFailure = z.object({
|
|
6818
|
+
/** Search branch name (fulltext, semantic, topic, digest, …) */
|
|
6819
|
+
name: z.string(),
|
|
6820
|
+
/** How the branch failed */
|
|
6821
|
+
status: z.enum(["timeout", "error"]),
|
|
6822
|
+
/** Closed-vocabulary cause. Never free text — a raw message could leak internal hostnames, ports, or query text. */
|
|
6823
|
+
reason: z.enum(["timeout", "connection", "query_error", "provider_error", "unknown"])
|
|
6824
|
+
});
|
|
6817
6825
|
var temporalMetadata = z.object({
|
|
6818
6826
|
/** Temporal query mode used */
|
|
6819
6827
|
temporalMode: z.string(),
|
|
@@ -6847,6 +6855,10 @@ var searchMeta = z.lazy(() => z.object({
|
|
|
6847
6855
|
searchTime: z.number(),
|
|
6848
6856
|
/** Search method used for this query */
|
|
6849
6857
|
searchMethod: z.string(),
|
|
6858
|
+
/** 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. */
|
|
6859
|
+
degraded: z.boolean().optional(),
|
|
6860
|
+
/** 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. */
|
|
6861
|
+
branchFailures: z.array(branchFailure).optional(),
|
|
6850
6862
|
/** Temporal query metadata (present when temporal filters are used) */
|
|
6851
6863
|
temporalMetadata: temporalMetadata.optional()
|
|
6852
6864
|
}));
|
|
@@ -6912,6 +6924,20 @@ var searchResponse = z.lazy(() => z.object({
|
|
|
6912
6924
|
/** Clusters of related claims that may conflict. Only present when relevant groups exist. Claims within each group are sorted newest-first. */
|
|
6913
6925
|
claim_groups: z.array(claimGroup).optional()
|
|
6914
6926
|
}));
|
|
6927
|
+
var searchFailureResponse = z.lazy(() => z.object({
|
|
6928
|
+
/** Human-readable message. Worded so it never reads as 'no results exist'. */
|
|
6929
|
+
error: z.string(),
|
|
6930
|
+
/** 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). */
|
|
6931
|
+
reason: z.enum(["all_branches_failed", "deadline_exceeded", "service_at_capacity"]).optional(),
|
|
6932
|
+
/** Explicit signal that retrying is worthwhile. True for all typed honest-failure reasons. */
|
|
6933
|
+
retryable: z.boolean().optional(),
|
|
6934
|
+
/** 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. */
|
|
6935
|
+
retry_after_ms: z.number().min(0).optional(),
|
|
6936
|
+
/** True when the gather was incomplete — at least one search branch timed out or errored. */
|
|
6937
|
+
degraded: z.boolean().optional(),
|
|
6938
|
+
/** The branches that did NOT complete. Healthy branches are omitted. */
|
|
6939
|
+
branchFailures: z.array(branchFailure).optional()
|
|
6940
|
+
}));
|
|
6915
6941
|
var fact = z.object({
|
|
6916
6942
|
/** Unique identifier for the fact */
|
|
6917
6943
|
id: z.string(),
|
|
@@ -7956,6 +7982,7 @@ export {
|
|
|
7956
7982
|
batchGetMemoriesRequest,
|
|
7957
7983
|
batchGetMemoriesResponse,
|
|
7958
7984
|
billingOverview,
|
|
7985
|
+
branchFailure,
|
|
7959
7986
|
buildContextActiveWork,
|
|
7960
7987
|
buildContextActivity,
|
|
7961
7988
|
buildContextFact,
|
|
@@ -8032,6 +8059,7 @@ export {
|
|
|
8032
8059
|
precomputedMemoryFields,
|
|
8033
8060
|
recommendation,
|
|
8034
8061
|
relatedMemoryResult,
|
|
8062
|
+
searchFailureResponse,
|
|
8035
8063
|
searchMeta,
|
|
8036
8064
|
searchRequest,
|
|
8037
8065
|
searchResponse,
|