@maximem/synap-js-sdk 0.6.1 → 0.6.5

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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/dist/anticipation-cache-Q7IYC3ID.cjs +26 -0
  3. package/dist/anticipation-cache-Q7IYC3ID.cjs.map +1 -0
  4. package/dist/{anticipation-cache-RWKF55J4.js → anticipation-cache-VL5WHTJB.js} +8 -2
  5. package/dist/{chunk-N55UBGER.js → chunk-4HD6KU3D.js} +46 -3
  6. package/dist/chunk-4HD6KU3D.js.map +1 -0
  7. package/dist/chunk-7IZHVYO2.cjs.map +1 -1
  8. package/dist/{chunk-ICUFS3B5.cjs → chunk-BYUGILQI.cjs} +136 -142
  9. package/dist/chunk-BYUGILQI.cjs.map +1 -0
  10. package/dist/{chunk-R72YL6Q4.js → chunk-CSG3N5E3.js} +136 -142
  11. package/dist/chunk-CSG3N5E3.js.map +1 -0
  12. package/dist/{chunk-2VJV4HCF.cjs → chunk-IZUIPREP.cjs} +59 -16
  13. package/dist/chunk-IZUIPREP.cjs.map +1 -0
  14. package/dist/chunk-ZKOJDUN4.cjs.map +1 -1
  15. package/dist/env-55ULHNJZ.cjs.map +1 -1
  16. package/dist/{errors-DWjdpExq.d.cts → errors-x5bpgxmC.d.cts} +18 -3
  17. package/dist/{errors-DWjdpExq.d.ts → errors-x5bpgxmC.d.ts} +18 -3
  18. package/dist/grpc/index.cjs +4 -4
  19. package/dist/grpc/index.cjs.map +1 -1
  20. package/dist/grpc/index.d.cts +11 -3
  21. package/dist/grpc/index.d.ts +11 -3
  22. package/dist/grpc/index.js +3 -3
  23. package/dist/index.cjs +283 -56
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +85 -17
  26. package/dist/index.d.ts +85 -17
  27. package/dist/index.js +252 -25
  28. package/dist/index.js.map +1 -1
  29. package/dist/onnx-encoder-4RSL6ID4.cjs.map +1 -1
  30. package/dist/{stream-client-GRDVRBFA.js → stream-client-7YONF2GD.js} +2 -2
  31. package/dist/stream-client-IPHDTXQO.cjs +22 -0
  32. package/dist/stream-client-IPHDTXQO.cjs.map +1 -0
  33. package/package.json +1 -1
  34. package/dist/anticipation-cache-LPNKMRBH.cjs +0 -20
  35. package/dist/anticipation-cache-LPNKMRBH.cjs.map +0 -1
  36. package/dist/chunk-2VJV4HCF.cjs.map +0 -1
  37. package/dist/chunk-ICUFS3B5.cjs.map +0 -1
  38. package/dist/chunk-N55UBGER.js.map +0 -1
  39. package/dist/chunk-R72YL6Q4.js.map +0 -1
  40. package/dist/stream-client-SZIYGVVJ.cjs +0 -22
  41. package/dist/stream-client-SZIYGVVJ.cjs.map +0 -1
  42. /package/dist/{anticipation-cache-RWKF55J4.js.map → anticipation-cache-VL5WHTJB.js.map} +0 -0
  43. /package/dist/{stream-client-GRDVRBFA.js.map → stream-client-7YONF2GD.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as Encoder, a as AnticipationCacheSnapshot } from './errors-DWjdpExq.cjs';
2
- export { b as ANY_SCOPE, c as AgentUnavailableError, A as AnticipationCache, d as AnticipationCacheOptions, e as AuthenticationError, B as BundleItem, C as ConflictError, f as ConnectionError, g as ContextBundle, h as ContextNotFoundError, i as CustomerIdNotAcceptedError, j as ExitReason, I as InstanceBuildFailedError, k as InstanceNotReadyError, l as InsufficientCreditsError, m as InvalidConversationIdError, n as InvalidInputError, o as InvalidInstanceIdError, L as ListeningAlreadyActiveError, p as ListeningNotActiveError, q as LookupParams, r as LookupResult, s as LookupTelemetry, N as NetworkTimeoutError, P as PermanentError, R as RateLimitError, t as SDKError, u as ServiceUnavailableError, v as SessionExpiredError, w as SnapshotBundle, x as SnapshotItemPreview, y as SnapshotItemRecord, S as SynapError, z as SynapErrorCode, D as SynapErrorOptions, F as SynapPermanentError, G as SynapTransientError, T as TranscriptConflictError, H as TransientError, J as isSynapError } from './errors-DWjdpExq.cjs';
1
+ import { E as Encoder, a as AnticipationCacheSnapshot } from './errors-x5bpgxmC.cjs';
2
+ export { b as ANY_SCOPE, c as AgentUnavailableError, A as AnticipationCache, d as AnticipationCacheOptions, e as AuthenticationError, B as BundleItem, C as ConflictError, f as ConnectionError, g as ContextBundle, h as ContextNotFoundError, i as CustomerIdNotAcceptedError, j as ExitReason, I as InstanceBuildFailedError, k as InstanceNotReadyError, l as InsufficientCreditsError, m as InvalidConversationIdError, n as InvalidInputError, o as InvalidInstanceIdError, L as ListeningAlreadyActiveError, p as ListeningNotActiveError, q as LookupParams, r as LookupResult, s as LookupTelemetry, N as NetworkTimeoutError, P as PermanentError, R as RateLimitError, t as SDKError, u as ServiceUnavailableError, v as SessionExpiredError, w as SnapshotBundle, x as SnapshotItemPreview, y as SnapshotItemRecord, S as SynapError, z as SynapErrorCode, D as SynapErrorOptions, F as SynapPermanentError, G as SynapTransientError, T as TranscriptConflictError, H as TransientError, J as isSynapError } from './errors-x5bpgxmC.cjs';
3
3
 
4
4
  /**
5
5
  * AUTOGENERATED FROM synap/sdk/CONTRACT/endpoints.yaml -- DO NOT EDIT.
@@ -65,6 +65,16 @@ declare const ENDPOINTS: {
65
65
  readonly path: "/api/v1/memories/forget";
66
66
  readonly idempotent: false;
67
67
  };
68
+ readonly data_delete: {
69
+ readonly method: "POST";
70
+ readonly path: "/v1/data/delete";
71
+ readonly idempotent: true;
72
+ };
73
+ readonly data_delete_status: {
74
+ readonly method: "GET";
75
+ readonly path: "/v1/data/delete/{deletion_id}";
76
+ readonly idempotent: true;
77
+ };
68
78
  readonly context_fetch_user: {
69
79
  readonly method: "POST";
70
80
  readonly path: "/v1/context/user/fetch";
@@ -1134,6 +1144,76 @@ type WriteInvalidator = (ids: {
1134
1144
  customerId?: string | undefined;
1135
1145
  }) => void;
1136
1146
 
1147
+ /**
1148
+ * Data namespace. Mirrors `maximem_synap.data.interface.DataInterface`.
1149
+ *
1150
+ * Delete personal data by scope (user, conversation, customer). Validation
1151
+ * messages are identical to Python's, and the body has the same keys in the
1152
+ * same order, nulls included.
1153
+ */
1154
+
1155
+ declare const DATA_SCOPES: readonly ["user", "conversation", "customer"];
1156
+ type DataScope = (typeof DATA_SCOPES)[number];
1157
+ interface DeleteDataOptions {
1158
+ /** `"user"`, `"conversation"` or `"customer"`. Client-wide delete is not supported. */
1159
+ scope: DataScope | string;
1160
+ user_id?: string | null;
1161
+ userId?: string | null;
1162
+ customer_id?: string | null;
1163
+ customerId?: string | null;
1164
+ conversation_id?: string | null;
1165
+ conversationId?: string | null;
1166
+ /** Count what would be removed and change nothing. No `confirm` needed. */
1167
+ dry_run?: boolean;
1168
+ dryRun?: boolean;
1169
+ /** Required unless `dryRun`. Must equal the id of the scope being deleted. */
1170
+ confirm?: string | null;
1171
+ /** Repeat the call while the server says `continue` (default true, max 50 calls). */
1172
+ wait?: boolean;
1173
+ }
1174
+ /** Result of `data.delete` / `data.status`. Mirrors Python's `DeleteDataResult`. */
1175
+ interface DeleteDataResult {
1176
+ deletion_id: string | null;
1177
+ /** `complete`, `partial`, `in_progress` or `dry_run`. */
1178
+ status: string;
1179
+ scope: string | null;
1180
+ dry_run: boolean;
1181
+ found: boolean;
1182
+ counts: Record<string, unknown>;
1183
+ stores: Record<string, unknown>;
1184
+ still_present_in: string[];
1185
+ fully_removed: boolean;
1186
+ /** True when the server's size cap stopped the call. */
1187
+ continue: boolean;
1188
+ kept: string[];
1189
+ note: string | null;
1190
+ memories_kept: boolean;
1191
+ audit: string | null;
1192
+ /** What the SDK cleared on this machine after the server finished. */
1193
+ local_cleared: string[];
1194
+ [key: string]: unknown;
1195
+ }
1196
+ interface DataInterface {
1197
+ /**
1198
+ * Delete data for one user, one conversation or one customer. Permanent.
1199
+ * scope 'conversation' removes turns, summaries, telemetry and the turn buffer ONLY;
1200
+ * memories learned from it are kept (use scope 'user' or memories.delete). Data in
1201
+ * another instance is never touched; stores that cannot be scoped by instance are
1202
+ * skipped and named in still_present_in.
1203
+ *
1204
+ * scope 'customer' needs a management key (management:* or *); a runtime key gets 403.
1205
+ * LLM call traces are not removed (llm_call_bodies up to 14 days, llm_calls up to 180 days).
1206
+ *
1207
+ * A store that could not be cleared is in `still_present_in` and
1208
+ * `fully_removed` is false; it is a result, not an exception. Errors:
1209
+ * `InvalidInputError` (bad arguments, caught before any request, or 400),
1210
+ * `AuthenticationError` (401/403), `ConflictError` (409), `RateLimitError`.
1211
+ */
1212
+ delete(options: DeleteDataOptions): Promise<DeleteDataResult>;
1213
+ /** The audit record of a delete (status, counts, still_present_in). */
1214
+ status(deletionId: string): Promise<DeleteDataResult>;
1215
+ }
1216
+
1137
1217
  /** User namespace. Mirrors `UserInterface` in the Python SDK. */
1138
1218
 
1139
1219
  interface UserNamespace {
@@ -1734,6 +1814,7 @@ declare class SynapClient {
1734
1814
  readonly client: ScopedContext;
1735
1815
  readonly conversation: ConversationNamespace;
1736
1816
  readonly memories: MemoriesInterface;
1817
+ readonly data: DataInterface;
1737
1818
  readonly credits: CreditsNamespace;
1738
1819
  readonly cache: CacheNamespace;
1739
1820
  readonly instance: InstanceNamespace;
@@ -1907,7 +1988,7 @@ declare class SynapClient {
1907
1988
  * build when the two disagree, which is the only thing that makes a manual
1908
1989
  * publish safe.
1909
1990
  */
1910
- declare const SDK_VERSION = "0.6.1";
1991
+ declare const SDK_VERSION = "0.6.5";
1911
1992
 
1912
1993
  /**
1913
1994
  * `response_shape: "ranked"`: one list in the order the server ranked it.
@@ -1999,19 +2080,8 @@ declare class BM25 {
1999
2080
  * survive. It is the same failure mode as `@grpc/proto-loader` reading a
2000
2081
  * `.proto` off disk (gotcha G-P).
2001
2082
  */
2002
- interface RecallPattern {
2003
- pattern: string;
2004
- flags: string;
2005
- note: string;
2006
- }
2007
2083
  interface BehaviorContract {
2008
2084
  version: number;
2009
- recall_bypass: {
2010
- note: string;
2011
- env_flag: string;
2012
- default: boolean;
2013
- patterns: RecallPattern[];
2014
- };
2015
2085
  thresholds: {
2016
2086
  bm25: {
2017
2087
  value: number;
@@ -2121,8 +2191,6 @@ declare const THRESHOLDS: {
2121
2191
  /** Points of score allowed per query token when deriving the threshold. */
2122
2192
  readonly queryTokenScale: number;
2123
2193
  };
2124
- /** True when any query string looks like an explicit memory-recall ask. */
2125
- declare function isRecallQuery(searchQuery: readonly (string | null | undefined)[] | null | undefined): boolean;
2126
2194
 
2127
2195
  /**
2128
2196
  * @maximem/synap-js-sdk
@@ -2161,4 +2229,4 @@ interface SynapSdkLike {
2161
2229
  };
2162
2230
  }
2163
2231
 
2164
- export { type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, BM25, type BatchCreateResult, COMPACTION_LEVELS, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type CompactionLevel, type ConfigureOptions, type ContextMetadata, type ConversationContext, type ConversationNamespace, type CreateFromFileOptions, type CreateMemoryOptions, type CreateMemoryResult, type Credentials, type CreditBalance, type CreditBucket, type CreditEstimate, type CreditLedgerEntry, type CreditLedgerPage, type CreditsNamespace, DEFAULT_BASE_URL, DEFAULT_DOCUMENT_TYPE, DEFAULT_INGEST_MODE, DEFAULT_RETRY_POLICY, DEFAULT_TIMEOUTS, DOCUMENT_TYPES, type DocumentType, ENDPOINTS, EXCERPT_CATEGORY, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, FORGET_MODES, type Fact, type FetchOptions, type FlatMemory, type ForgetCandidate, type ForgetMode, type ForgetOptions, type ForgetResult, type ForgetStatus, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, type ItemCollection, type Json, type LedgerOptions, type ListenOptions, MEMORY_TYPES, type MemoriesInterface, type NormalisedContext, type OpenAiToolDefinition, type Preference, RESPONSE_SHAPES, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RedeemResult, type RequestOptions, type ResponseShape, type RetryPolicy, SDK_VERSION, type Scope, type SendMessageOptions, SynapClient, type SynapClientOptions, type SynapLogLevel, type SynapLogger, type SynapSdkLike, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, type TranscriptIngestResult, type TranscriptTurn, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, applyResponseShape, flattenContextItems, formatForPrompt, isOutcomeUnknown, isRecallQuery, mergeScopeResults, rankItems, resolvePath, shouldRetry, stem, tokenize, wireRankScore };
2232
+ export { type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, BM25, type BatchCreateResult, COMPACTION_LEVELS, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type CompactionLevel, type ConfigureOptions, type ContextMetadata, type ConversationContext, type ConversationNamespace, type CreateFromFileOptions, type CreateMemoryOptions, type CreateMemoryResult, type Credentials, type CreditBalance, type CreditBucket, type CreditEstimate, type CreditLedgerEntry, type CreditLedgerPage, type CreditsNamespace, DATA_SCOPES, DEFAULT_BASE_URL, DEFAULT_DOCUMENT_TYPE, DEFAULT_INGEST_MODE, DEFAULT_RETRY_POLICY, DEFAULT_TIMEOUTS, DOCUMENT_TYPES, type DataInterface, type DataScope, type DeleteDataOptions, type DeleteDataResult, type DocumentType, ENDPOINTS, EXCERPT_CATEGORY, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, FORGET_MODES, type Fact, type FetchOptions, type FlatMemory, type ForgetCandidate, type ForgetMode, type ForgetOptions, type ForgetResult, type ForgetStatus, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, type ItemCollection, type Json, type LedgerOptions, type ListenOptions, MEMORY_TYPES, type MemoriesInterface, type NormalisedContext, type OpenAiToolDefinition, type Preference, RESPONSE_SHAPES, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RedeemResult, type RequestOptions, type ResponseShape, type RetryPolicy, SDK_VERSION, type Scope, type SendMessageOptions, SynapClient, type SynapClientOptions, type SynapLogLevel, type SynapLogger, type SynapSdkLike, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, type TranscriptIngestResult, type TranscriptTurn, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, applyResponseShape, flattenContextItems, formatForPrompt, isOutcomeUnknown, mergeScopeResults, rankItems, resolvePath, shouldRetry, stem, tokenize, wireRankScore };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as Encoder, a as AnticipationCacheSnapshot } from './errors-DWjdpExq.js';
2
- export { b as ANY_SCOPE, c as AgentUnavailableError, A as AnticipationCache, d as AnticipationCacheOptions, e as AuthenticationError, B as BundleItem, C as ConflictError, f as ConnectionError, g as ContextBundle, h as ContextNotFoundError, i as CustomerIdNotAcceptedError, j as ExitReason, I as InstanceBuildFailedError, k as InstanceNotReadyError, l as InsufficientCreditsError, m as InvalidConversationIdError, n as InvalidInputError, o as InvalidInstanceIdError, L as ListeningAlreadyActiveError, p as ListeningNotActiveError, q as LookupParams, r as LookupResult, s as LookupTelemetry, N as NetworkTimeoutError, P as PermanentError, R as RateLimitError, t as SDKError, u as ServiceUnavailableError, v as SessionExpiredError, w as SnapshotBundle, x as SnapshotItemPreview, y as SnapshotItemRecord, S as SynapError, z as SynapErrorCode, D as SynapErrorOptions, F as SynapPermanentError, G as SynapTransientError, T as TranscriptConflictError, H as TransientError, J as isSynapError } from './errors-DWjdpExq.js';
1
+ import { E as Encoder, a as AnticipationCacheSnapshot } from './errors-x5bpgxmC.js';
2
+ export { b as ANY_SCOPE, c as AgentUnavailableError, A as AnticipationCache, d as AnticipationCacheOptions, e as AuthenticationError, B as BundleItem, C as ConflictError, f as ConnectionError, g as ContextBundle, h as ContextNotFoundError, i as CustomerIdNotAcceptedError, j as ExitReason, I as InstanceBuildFailedError, k as InstanceNotReadyError, l as InsufficientCreditsError, m as InvalidConversationIdError, n as InvalidInputError, o as InvalidInstanceIdError, L as ListeningAlreadyActiveError, p as ListeningNotActiveError, q as LookupParams, r as LookupResult, s as LookupTelemetry, N as NetworkTimeoutError, P as PermanentError, R as RateLimitError, t as SDKError, u as ServiceUnavailableError, v as SessionExpiredError, w as SnapshotBundle, x as SnapshotItemPreview, y as SnapshotItemRecord, S as SynapError, z as SynapErrorCode, D as SynapErrorOptions, F as SynapPermanentError, G as SynapTransientError, T as TranscriptConflictError, H as TransientError, J as isSynapError } from './errors-x5bpgxmC.js';
3
3
 
4
4
  /**
5
5
  * AUTOGENERATED FROM synap/sdk/CONTRACT/endpoints.yaml -- DO NOT EDIT.
@@ -65,6 +65,16 @@ declare const ENDPOINTS: {
65
65
  readonly path: "/api/v1/memories/forget";
66
66
  readonly idempotent: false;
67
67
  };
68
+ readonly data_delete: {
69
+ readonly method: "POST";
70
+ readonly path: "/v1/data/delete";
71
+ readonly idempotent: true;
72
+ };
73
+ readonly data_delete_status: {
74
+ readonly method: "GET";
75
+ readonly path: "/v1/data/delete/{deletion_id}";
76
+ readonly idempotent: true;
77
+ };
68
78
  readonly context_fetch_user: {
69
79
  readonly method: "POST";
70
80
  readonly path: "/v1/context/user/fetch";
@@ -1134,6 +1144,76 @@ type WriteInvalidator = (ids: {
1134
1144
  customerId?: string | undefined;
1135
1145
  }) => void;
1136
1146
 
1147
+ /**
1148
+ * Data namespace. Mirrors `maximem_synap.data.interface.DataInterface`.
1149
+ *
1150
+ * Delete personal data by scope (user, conversation, customer). Validation
1151
+ * messages are identical to Python's, and the body has the same keys in the
1152
+ * same order, nulls included.
1153
+ */
1154
+
1155
+ declare const DATA_SCOPES: readonly ["user", "conversation", "customer"];
1156
+ type DataScope = (typeof DATA_SCOPES)[number];
1157
+ interface DeleteDataOptions {
1158
+ /** `"user"`, `"conversation"` or `"customer"`. Client-wide delete is not supported. */
1159
+ scope: DataScope | string;
1160
+ user_id?: string | null;
1161
+ userId?: string | null;
1162
+ customer_id?: string | null;
1163
+ customerId?: string | null;
1164
+ conversation_id?: string | null;
1165
+ conversationId?: string | null;
1166
+ /** Count what would be removed and change nothing. No `confirm` needed. */
1167
+ dry_run?: boolean;
1168
+ dryRun?: boolean;
1169
+ /** Required unless `dryRun`. Must equal the id of the scope being deleted. */
1170
+ confirm?: string | null;
1171
+ /** Repeat the call while the server says `continue` (default true, max 50 calls). */
1172
+ wait?: boolean;
1173
+ }
1174
+ /** Result of `data.delete` / `data.status`. Mirrors Python's `DeleteDataResult`. */
1175
+ interface DeleteDataResult {
1176
+ deletion_id: string | null;
1177
+ /** `complete`, `partial`, `in_progress` or `dry_run`. */
1178
+ status: string;
1179
+ scope: string | null;
1180
+ dry_run: boolean;
1181
+ found: boolean;
1182
+ counts: Record<string, unknown>;
1183
+ stores: Record<string, unknown>;
1184
+ still_present_in: string[];
1185
+ fully_removed: boolean;
1186
+ /** True when the server's size cap stopped the call. */
1187
+ continue: boolean;
1188
+ kept: string[];
1189
+ note: string | null;
1190
+ memories_kept: boolean;
1191
+ audit: string | null;
1192
+ /** What the SDK cleared on this machine after the server finished. */
1193
+ local_cleared: string[];
1194
+ [key: string]: unknown;
1195
+ }
1196
+ interface DataInterface {
1197
+ /**
1198
+ * Delete data for one user, one conversation or one customer. Permanent.
1199
+ * scope 'conversation' removes turns, summaries, telemetry and the turn buffer ONLY;
1200
+ * memories learned from it are kept (use scope 'user' or memories.delete). Data in
1201
+ * another instance is never touched; stores that cannot be scoped by instance are
1202
+ * skipped and named in still_present_in.
1203
+ *
1204
+ * scope 'customer' needs a management key (management:* or *); a runtime key gets 403.
1205
+ * LLM call traces are not removed (llm_call_bodies up to 14 days, llm_calls up to 180 days).
1206
+ *
1207
+ * A store that could not be cleared is in `still_present_in` and
1208
+ * `fully_removed` is false; it is a result, not an exception. Errors:
1209
+ * `InvalidInputError` (bad arguments, caught before any request, or 400),
1210
+ * `AuthenticationError` (401/403), `ConflictError` (409), `RateLimitError`.
1211
+ */
1212
+ delete(options: DeleteDataOptions): Promise<DeleteDataResult>;
1213
+ /** The audit record of a delete (status, counts, still_present_in). */
1214
+ status(deletionId: string): Promise<DeleteDataResult>;
1215
+ }
1216
+
1137
1217
  /** User namespace. Mirrors `UserInterface` in the Python SDK. */
1138
1218
 
1139
1219
  interface UserNamespace {
@@ -1734,6 +1814,7 @@ declare class SynapClient {
1734
1814
  readonly client: ScopedContext;
1735
1815
  readonly conversation: ConversationNamespace;
1736
1816
  readonly memories: MemoriesInterface;
1817
+ readonly data: DataInterface;
1737
1818
  readonly credits: CreditsNamespace;
1738
1819
  readonly cache: CacheNamespace;
1739
1820
  readonly instance: InstanceNamespace;
@@ -1907,7 +1988,7 @@ declare class SynapClient {
1907
1988
  * build when the two disagree, which is the only thing that makes a manual
1908
1989
  * publish safe.
1909
1990
  */
1910
- declare const SDK_VERSION = "0.6.1";
1991
+ declare const SDK_VERSION = "0.6.5";
1911
1992
 
1912
1993
  /**
1913
1994
  * `response_shape: "ranked"`: one list in the order the server ranked it.
@@ -1999,19 +2080,8 @@ declare class BM25 {
1999
2080
  * survive. It is the same failure mode as `@grpc/proto-loader` reading a
2000
2081
  * `.proto` off disk (gotcha G-P).
2001
2082
  */
2002
- interface RecallPattern {
2003
- pattern: string;
2004
- flags: string;
2005
- note: string;
2006
- }
2007
2083
  interface BehaviorContract {
2008
2084
  version: number;
2009
- recall_bypass: {
2010
- note: string;
2011
- env_flag: string;
2012
- default: boolean;
2013
- patterns: RecallPattern[];
2014
- };
2015
2085
  thresholds: {
2016
2086
  bm25: {
2017
2087
  value: number;
@@ -2121,8 +2191,6 @@ declare const THRESHOLDS: {
2121
2191
  /** Points of score allowed per query token when deriving the threshold. */
2122
2192
  readonly queryTokenScale: number;
2123
2193
  };
2124
- /** True when any query string looks like an explicit memory-recall ask. */
2125
- declare function isRecallQuery(searchQuery: readonly (string | null | undefined)[] | null | undefined): boolean;
2126
2194
 
2127
2195
  /**
2128
2196
  * @maximem/synap-js-sdk
@@ -2161,4 +2229,4 @@ interface SynapSdkLike {
2161
2229
  };
2162
2230
  }
2163
2231
 
2164
- export { type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, BM25, type BatchCreateResult, COMPACTION_LEVELS, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type CompactionLevel, type ConfigureOptions, type ContextMetadata, type ConversationContext, type ConversationNamespace, type CreateFromFileOptions, type CreateMemoryOptions, type CreateMemoryResult, type Credentials, type CreditBalance, type CreditBucket, type CreditEstimate, type CreditLedgerEntry, type CreditLedgerPage, type CreditsNamespace, DEFAULT_BASE_URL, DEFAULT_DOCUMENT_TYPE, DEFAULT_INGEST_MODE, DEFAULT_RETRY_POLICY, DEFAULT_TIMEOUTS, DOCUMENT_TYPES, type DocumentType, ENDPOINTS, EXCERPT_CATEGORY, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, FORGET_MODES, type Fact, type FetchOptions, type FlatMemory, type ForgetCandidate, type ForgetMode, type ForgetOptions, type ForgetResult, type ForgetStatus, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, type ItemCollection, type Json, type LedgerOptions, type ListenOptions, MEMORY_TYPES, type MemoriesInterface, type NormalisedContext, type OpenAiToolDefinition, type Preference, RESPONSE_SHAPES, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RedeemResult, type RequestOptions, type ResponseShape, type RetryPolicy, SDK_VERSION, type Scope, type SendMessageOptions, SynapClient, type SynapClientOptions, type SynapLogLevel, type SynapLogger, type SynapSdkLike, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, type TranscriptIngestResult, type TranscriptTurn, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, applyResponseShape, flattenContextItems, formatForPrompt, isOutcomeUnknown, isRecallQuery, mergeScopeResults, rankItems, resolvePath, shouldRetry, stem, tokenize, wireRankScore };
2232
+ export { type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, BM25, type BatchCreateResult, COMPACTION_LEVELS, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type CompactionLevel, type ConfigureOptions, type ContextMetadata, type ConversationContext, type ConversationNamespace, type CreateFromFileOptions, type CreateMemoryOptions, type CreateMemoryResult, type Credentials, type CreditBalance, type CreditBucket, type CreditEstimate, type CreditLedgerEntry, type CreditLedgerPage, type CreditsNamespace, DATA_SCOPES, DEFAULT_BASE_URL, DEFAULT_DOCUMENT_TYPE, DEFAULT_INGEST_MODE, DEFAULT_RETRY_POLICY, DEFAULT_TIMEOUTS, DOCUMENT_TYPES, type DataInterface, type DataScope, type DeleteDataOptions, type DeleteDataResult, type DocumentType, ENDPOINTS, EXCERPT_CATEGORY, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, FORGET_MODES, type Fact, type FetchOptions, type FlatMemory, type ForgetCandidate, type ForgetMode, type ForgetOptions, type ForgetResult, type ForgetStatus, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, type ItemCollection, type Json, type LedgerOptions, type ListenOptions, MEMORY_TYPES, type MemoriesInterface, type NormalisedContext, type OpenAiToolDefinition, type Preference, RESPONSE_SHAPES, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RedeemResult, type RequestOptions, type ResponseShape, type RetryPolicy, SDK_VERSION, type Scope, type SendMessageOptions, SynapClient, type SynapClientOptions, type SynapLogLevel, type SynapLogger, type SynapSdkLike, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, type TranscriptIngestResult, type TranscriptTurn, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, applyResponseShape, flattenContextItems, formatForPrompt, isOutcomeUnknown, mergeScopeResults, rankItems, resolvePath, shouldRetry, stem, tokenize, wireRankScore };