@maximem/synap-js-sdk 0.4.3 → 0.4.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.
- package/dist/anticipation-cache-ARYEEKMU.cjs.map +1 -1
- package/dist/{chunk-HR5Y3KXS.cjs → chunk-2TVL5IPQ.cjs} +7 -1
- package/dist/chunk-2TVL5IPQ.cjs.map +1 -0
- package/dist/{chunk-VXRCBMCY.cjs → chunk-3JSE64GW.cjs} +1 -1
- package/dist/chunk-3JSE64GW.cjs.map +1 -0
- package/dist/{chunk-T3NZBIV2.js → chunk-OCMM2Z5P.js} +7 -1
- package/dist/chunk-OCMM2Z5P.js.map +1 -0
- package/dist/chunk-RB57I2IQ.cjs.map +1 -1
- package/dist/chunk-ZKOJDUN4.cjs.map +1 -1
- package/dist/{chunk-5SC3ELNK.js → chunk-ZU6ZC4SU.js} +1 -1
- package/dist/chunk-ZU6ZC4SU.js.map +1 -0
- package/dist/env-55ULHNJZ.cjs.map +1 -1
- package/dist/grpc/index.cjs +7 -7
- package/dist/grpc/index.cjs.map +1 -1
- package/dist/grpc/index.d.cts +4 -0
- package/dist/grpc/index.d.ts +4 -0
- package/dist/grpc/index.js +3 -3
- package/dist/index.cjs +402 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +234 -27
- package/dist/index.d.ts +234 -27
- package/dist/index.js +317 -30
- package/dist/index.js.map +1 -1
- package/dist/stream-client-6V4FGKZ3.js +7 -0
- package/dist/stream-client-PRTOH62B.cjs +7 -0
- package/dist/stream-client-PRTOH62B.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-5SC3ELNK.js.map +0 -1
- package/dist/chunk-HR5Y3KXS.cjs.map +0 -1
- package/dist/chunk-T3NZBIV2.js.map +0 -1
- package/dist/chunk-VXRCBMCY.cjs.map +0 -1
- package/dist/stream-client-ME5N5NK4.js +0 -7
- package/dist/stream-client-ZN6ADZBR.cjs +0 -7
- package/dist/stream-client-ZN6ADZBR.cjs.map +0 -1
- /package/dist/{stream-client-ME5N5NK4.js.map → stream-client-6V4FGKZ3.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -234,6 +234,12 @@ interface TimeoutConfig {
|
|
|
234
234
|
connect: number;
|
|
235
235
|
read: number;
|
|
236
236
|
write: number;
|
|
237
|
+
/**
|
|
238
|
+
* gRPC stream idle timeout. Not used by the HTTP transport; the stream
|
|
239
|
+
* client reads it. Present so a config object round-trips between the two
|
|
240
|
+
* SDKs, and because Python's TimeoutConfig has it.
|
|
241
|
+
*/
|
|
242
|
+
streamIdle: number;
|
|
237
243
|
}
|
|
238
244
|
declare const DEFAULT_TIMEOUTS: TimeoutConfig;
|
|
239
245
|
interface Credentials {
|
|
@@ -245,7 +251,8 @@ interface HttpTransportOptions {
|
|
|
245
251
|
credentials: Credentials;
|
|
246
252
|
baseUrl?: string;
|
|
247
253
|
timeouts?: Partial<TimeoutConfig>;
|
|
248
|
-
|
|
254
|
+
/** `null` disables retries entirely, as Python's `retry_policy=None` does. */
|
|
255
|
+
retryPolicy?: Partial<RetryPolicy> | null;
|
|
249
256
|
keepAlive?: KeepAliveOptions & {
|
|
250
257
|
heartbeatIntervalMs?: number;
|
|
251
258
|
};
|
|
@@ -312,7 +319,14 @@ declare class HttpTransport {
|
|
|
312
319
|
/** Refuse a customer_id on a B2C instance, at the call site. */
|
|
313
320
|
checkCustomerId(customerId: unknown, where: string): void;
|
|
314
321
|
setTimeouts(timeouts: Partial<TimeoutConfig>): void;
|
|
315
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* `null` DISABLES retries, matching Python.
|
|
324
|
+
*
|
|
325
|
+
* Python's `SDKConfig(retry_policy=None)` leaves `self.retry_policy` unset and
|
|
326
|
+
* `max_attempts` falls to 1 (http_client.py:180). We restored the default
|
|
327
|
+
* policy instead, so a caller following the "Disabling Retries" documentation
|
|
328
|
+
* got three attempts and no way to turn them off.
|
|
329
|
+
*/
|
|
316
330
|
setRetryPolicy(policy: Partial<RetryPolicy> | null): void;
|
|
317
331
|
close(): void;
|
|
318
332
|
request<T = unknown>(name: EndpointName, options?: RequestOptions): Promise<T>;
|
|
@@ -489,6 +503,23 @@ interface FetchOptions {
|
|
|
489
503
|
precisionLevel?: string;
|
|
490
504
|
/** Sent only when explicitly false, matching the Python controllers. */
|
|
491
505
|
include_conversation_context?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* `"in-conversation"` (default) or `"conversation-summary"`.
|
|
508
|
+
*
|
|
509
|
+
* Summary mode returns a caller profile plus previous-conversation
|
|
510
|
+
* summaries. USER SCOPE ONLY: the other three routes reject it with 422.
|
|
511
|
+
*/
|
|
512
|
+
context_mode?: string;
|
|
513
|
+
contextMode?: string;
|
|
514
|
+
/** Summary mode only. Include the caller profile. */
|
|
515
|
+
include_profile?: boolean;
|
|
516
|
+
includeProfile?: boolean;
|
|
517
|
+
/** Summary mode only. Previous conversations to summarise, 0 to 20. */
|
|
518
|
+
last_n_conversations?: number;
|
|
519
|
+
lastNConversations?: number;
|
|
520
|
+
/** Explicit scope ladder. Sent as `scope` when supplied. */
|
|
521
|
+
scope_path?: Record<string, string>;
|
|
522
|
+
scopePath?: Record<string, string>;
|
|
492
523
|
}
|
|
493
524
|
|
|
494
525
|
/**
|
|
@@ -567,12 +598,37 @@ interface CreateMemoryOptions {
|
|
|
567
598
|
mode?: IngestMode | string;
|
|
568
599
|
metadata?: Json;
|
|
569
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Mirrors Python's `CreateMemoryResponse`.
|
|
603
|
+
*
|
|
604
|
+
* The first four fields are required there (Pydantic would raise if the server
|
|
605
|
+
* omitted one), so they are required here too. Declaring `ingestion_id` optional
|
|
606
|
+
* made the commonest two-line pattern in the docs fail to compile under strict
|
|
607
|
+
* TypeScript: `wait_for_completion(result.ingestion_id)` cannot take
|
|
608
|
+
* `string | undefined`.
|
|
609
|
+
*/
|
|
570
610
|
interface CreateMemoryResult {
|
|
571
|
-
ingestion_id
|
|
572
|
-
|
|
611
|
+
ingestion_id: string;
|
|
612
|
+
document_id: string;
|
|
613
|
+
status: string;
|
|
614
|
+
/** ISO-8601. Python types this as a datetime. */
|
|
615
|
+
queued_at: string;
|
|
616
|
+
error_message?: string | null;
|
|
573
617
|
memories_created?: number;
|
|
574
618
|
[key: string]: unknown;
|
|
575
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* Result of `memories.batch_create`, mirroring Python's `BatchCreateResponse`.
|
|
622
|
+
* It was `Json`, so `results` came back as `unknown` and could not be iterated.
|
|
623
|
+
*/
|
|
624
|
+
interface BatchCreateResult {
|
|
625
|
+
batch_id: string;
|
|
626
|
+
total: number;
|
|
627
|
+
succeeded: number;
|
|
628
|
+
failed: number;
|
|
629
|
+
results: CreateMemoryResult[];
|
|
630
|
+
[key: string]: unknown;
|
|
631
|
+
}
|
|
576
632
|
interface BatchCreateOptions {
|
|
577
633
|
documents: CreateMemoryOptions[];
|
|
578
634
|
fail_fast?: boolean;
|
|
@@ -580,7 +636,7 @@ interface BatchCreateOptions {
|
|
|
580
636
|
}
|
|
581
637
|
interface MemoriesInterface {
|
|
582
638
|
create(options: CreateMemoryOptions): Promise<CreateMemoryResult>;
|
|
583
|
-
batch_create(options: BatchCreateOptions): Promise<
|
|
639
|
+
batch_create(options: BatchCreateOptions): Promise<BatchCreateResult>;
|
|
584
640
|
create_from_file(options: CreateFromFileOptions): Promise<CreateMemoryResult>;
|
|
585
641
|
get(memoryId: string): Promise<Json>;
|
|
586
642
|
update(options: UpdateMemoryOptions): Promise<Json>;
|
|
@@ -676,20 +732,45 @@ interface IngestTranscriptOptions {
|
|
|
676
732
|
ended_at?: string | Date;
|
|
677
733
|
endedAt?: string | Date;
|
|
678
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* Compaction levels, mirroring Python's `CompactionLevel` enum. The JS SDK
|
|
737
|
+
* exported no equivalent, so `compaction_level` was an untyped `string` and a
|
|
738
|
+
* typo reached the server instead of the compiler.
|
|
739
|
+
*/
|
|
740
|
+
declare const COMPACTION_LEVELS: readonly ["low", "medium", "high", "adaptive", "aggressive", "balanced", "conservative"];
|
|
741
|
+
type CompactionLevel = (typeof COMPACTION_LEVELS)[number];
|
|
679
742
|
interface CompactOptions {
|
|
680
743
|
conversation_id?: string;
|
|
681
744
|
conversationId?: string;
|
|
682
745
|
strategy?: string;
|
|
683
|
-
compaction_level?: string;
|
|
684
|
-
compactionLevel?: string;
|
|
746
|
+
compaction_level?: CompactionLevel | string;
|
|
747
|
+
compactionLevel?: CompactionLevel | string;
|
|
685
748
|
target_tokens?: number;
|
|
686
749
|
targetTokens?: number;
|
|
687
750
|
force?: boolean;
|
|
688
751
|
}
|
|
752
|
+
/**
|
|
753
|
+
* Result of `conversation.ingest_transcript`, mirroring Python's
|
|
754
|
+
* `TranscriptIngestResponse`. It was `Json` here, so `ingestion_id` came back
|
|
755
|
+
* as `unknown` and could not be handed to `wait_for_completion` without a cast.
|
|
756
|
+
*/
|
|
757
|
+
interface TranscriptIngestResult {
|
|
758
|
+
conversation_id: string;
|
|
759
|
+
/** The raw client-supplied id, echoed back. */
|
|
760
|
+
external_conversation_id: string;
|
|
761
|
+
/** Always set on a 2xx, including the `duplicate` branch. */
|
|
762
|
+
ingestion_id: string;
|
|
763
|
+
status: 'queued' | 'duplicate';
|
|
764
|
+
turns_recorded: number;
|
|
765
|
+
summary_status: 'in_progress' | 'already_compacted' | 'skipped';
|
|
766
|
+
/** ISO-8601. */
|
|
767
|
+
queued_at: string;
|
|
768
|
+
[key: string]: unknown;
|
|
769
|
+
}
|
|
689
770
|
interface ConversationNamespace {
|
|
690
771
|
record_message(options: RecordMessageOptions): Promise<Json>;
|
|
691
772
|
record_messages_batch(messages: RecordMessageOptions[]): Promise<Json>;
|
|
692
|
-
ingest_transcript(options: IngestTranscriptOptions): Promise<
|
|
773
|
+
ingest_transcript(options: IngestTranscriptOptions): Promise<TranscriptIngestResult>;
|
|
693
774
|
context: {
|
|
694
775
|
fetch(options?: FetchOptions): Promise<RawContext>;
|
|
695
776
|
get_context_for_prompt(options?: {
|
|
@@ -762,13 +843,71 @@ interface EstimateOptions {
|
|
|
762
843
|
mode?: string;
|
|
763
844
|
}
|
|
764
845
|
interface CreditsNamespace {
|
|
765
|
-
get_balance(): Promise<
|
|
766
|
-
get_ledger(options?:
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
846
|
+
get_balance(): Promise<CreditBalance>;
|
|
847
|
+
get_ledger(options?: LedgerOptions): Promise<CreditLedgerPage>;
|
|
848
|
+
estimate(options: EstimateOptions): Promise<CreditEstimate>;
|
|
849
|
+
redeem(code: string): Promise<RedeemResult>;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Return types for the credits namespace, mirroring Python's dataclasses in
|
|
853
|
+
* `maximem_synap/credits.py`. These were all `Json` (`Record<string, unknown>`)
|
|
854
|
+
* before, so every field read was `unknown` and no documented example compiled.
|
|
855
|
+
*/
|
|
856
|
+
interface CreditBucket {
|
|
857
|
+
source_type: string;
|
|
858
|
+
balance: number;
|
|
859
|
+
/** ISO-8601, or null when the bucket does not expire. */
|
|
860
|
+
expires_at: string | null;
|
|
861
|
+
}
|
|
862
|
+
interface CreditBalance {
|
|
863
|
+
client_id: string;
|
|
864
|
+
balance_credits: number;
|
|
865
|
+
warning_low: boolean;
|
|
866
|
+
buckets: CreditBucket[];
|
|
867
|
+
[key: string]: unknown;
|
|
868
|
+
}
|
|
869
|
+
interface CreditLedgerEntry {
|
|
870
|
+
ledger_id: string;
|
|
871
|
+
entry_type: string;
|
|
872
|
+
delta: number;
|
|
873
|
+
metric_type: string | null;
|
|
874
|
+
category: string | null;
|
|
875
|
+
/** ISO-8601. */
|
|
876
|
+
created_at: string;
|
|
877
|
+
}
|
|
878
|
+
interface CreditLedgerPage {
|
|
879
|
+
entries: CreditLedgerEntry[];
|
|
880
|
+
total: number;
|
|
881
|
+
limit: number;
|
|
882
|
+
offset: number;
|
|
883
|
+
[key: string]: unknown;
|
|
884
|
+
}
|
|
885
|
+
interface CreditEstimate {
|
|
886
|
+
credits_estimate: number;
|
|
887
|
+
[key: string]: unknown;
|
|
888
|
+
}
|
|
889
|
+
interface RedeemResult {
|
|
890
|
+
redemption_id: string;
|
|
891
|
+
credits_granted: number;
|
|
892
|
+
new_balance_credits: number;
|
|
893
|
+
/** ISO-8601, or null when the granted credits do not expire. */
|
|
894
|
+
expires_at: string | null;
|
|
895
|
+
[key: string]: unknown;
|
|
896
|
+
}
|
|
897
|
+
/** Options for `credits.get_ledger`. Mirrors Python's keyword arguments. */
|
|
898
|
+
interface LedgerOptions {
|
|
899
|
+
/** Filter to one ledger entry type. */
|
|
900
|
+
entry_type?: string;
|
|
901
|
+
entryType?: string;
|
|
902
|
+
/** Inclusive lower bound. ISO-8601 string or Date. Sent as `from`. */
|
|
903
|
+
from_time?: string | Date;
|
|
904
|
+
fromTime?: string | Date;
|
|
905
|
+
/** Inclusive upper bound. ISO-8601 string or Date. Sent as `to`. */
|
|
906
|
+
to_time?: string | Date;
|
|
907
|
+
toTime?: string | Date;
|
|
908
|
+
/** Defaults to 100, as in Python. */
|
|
909
|
+
limit?: number;
|
|
910
|
+
offset?: number;
|
|
772
911
|
}
|
|
773
912
|
|
|
774
913
|
/**
|
|
@@ -838,6 +977,15 @@ interface SendMessageOptions {
|
|
|
838
977
|
event_type?: string;
|
|
839
978
|
eventType?: string;
|
|
840
979
|
metadata?: Record<string, string>;
|
|
980
|
+
/**
|
|
981
|
+
* Report a tool call on the stream. Python's `send_message` takes both, and
|
|
982
|
+
* the proto has `tool_name` / `tool_args_json`; the JS surface simply never
|
|
983
|
+
* exposed them, so a tool call could not be reported from JavaScript.
|
|
984
|
+
*/
|
|
985
|
+
tool_name?: string;
|
|
986
|
+
toolName?: string;
|
|
987
|
+
tool_args?: Record<string, unknown>;
|
|
988
|
+
toolArgs?: Record<string, unknown>;
|
|
841
989
|
search_queries?: string[];
|
|
842
990
|
searchQueries?: string[];
|
|
843
991
|
context_types?: string[];
|
|
@@ -845,6 +993,16 @@ interface SendMessageOptions {
|
|
|
845
993
|
}
|
|
846
994
|
interface RecordThinkingOptions {
|
|
847
995
|
content: string;
|
|
996
|
+
/**
|
|
997
|
+
* Ordinal of this thought within the current turn. Sent as a `step_index`
|
|
998
|
+
* metadata key, which is how Python's `record_thinking` transmits it: the
|
|
999
|
+
* proto has no dedicated field.
|
|
1000
|
+
*/
|
|
1001
|
+
step_index?: number;
|
|
1002
|
+
stepIndex?: number;
|
|
1003
|
+
/** Free-form label for the kind of reasoning. Sent as `thought_type`. */
|
|
1004
|
+
thought_type?: string;
|
|
1005
|
+
thoughtType?: string;
|
|
848
1006
|
conversation_id?: string;
|
|
849
1007
|
conversationId?: string;
|
|
850
1008
|
user_id?: string;
|
|
@@ -991,11 +1149,30 @@ type ToolDefinition = OpenAiToolDefinition | AnthropicToolDefinition;
|
|
|
991
1149
|
* They return different shapes on purpose. See gotcha G-B.
|
|
992
1150
|
*/
|
|
993
1151
|
|
|
1152
|
+
/** Levels the SDK emits. Mirrors the subset of Python's logging it uses. */
|
|
1153
|
+
type SynapLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
1154
|
+
/**
|
|
1155
|
+
* Receives every diagnostic the SDK would otherwise write to the console.
|
|
1156
|
+
*
|
|
1157
|
+
* Python routes these through the stdlib `logging` module, which is why it
|
|
1158
|
+
* takes `log_level` and `logger`. There is no global logger in JavaScript, so
|
|
1159
|
+
* the SDK takes the sink directly instead of a level plus a framework.
|
|
1160
|
+
*/
|
|
1161
|
+
type SynapLogger = (level: SynapLogLevel, message: string) => void;
|
|
994
1162
|
interface SynapClientOptions {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1163
|
+
/**
|
|
1164
|
+
* The four identity fields are `| undefined` rather than plain optional so a
|
|
1165
|
+
* consumer with `exactOptionalPropertyTypes` can pass `process.env.X`
|
|
1166
|
+
* directly, which is what every example does. Undefined already means "fall
|
|
1167
|
+
* back to the environment" at runtime; this makes the type say so.
|
|
1168
|
+
*/
|
|
1169
|
+
apiKey?: string | undefined;
|
|
1170
|
+
clientId?: string | undefined;
|
|
1171
|
+
instanceId?: string | undefined;
|
|
1172
|
+
baseUrl?: string | undefined;
|
|
1173
|
+
/** Python spells this `api_base_url`; both are accepted so one config
|
|
1174
|
+
* object works against either SDK. */
|
|
1175
|
+
api_base_url?: string | undefined;
|
|
999
1176
|
timeouts?: HttpTransportOptions['timeouts'];
|
|
1000
1177
|
retryPolicy?: HttpTransportOptions['retryPolicy'];
|
|
1001
1178
|
keepAlive?: HttpTransportOptions['keepAlive'];
|
|
@@ -1007,6 +1184,29 @@ interface SynapClientOptions {
|
|
|
1007
1184
|
*/
|
|
1008
1185
|
heartbeat?: boolean;
|
|
1009
1186
|
fetchImpl?: typeof fetch;
|
|
1187
|
+
/**
|
|
1188
|
+
* Splice locally-recorded turns into the next conversation-scope fetch, so a
|
|
1189
|
+
* just-written turn is visible before the server compacts. Defaults to true,
|
|
1190
|
+
* matching Python's `st_verbatim_overlay`. `SYNAP_ST_VERBATIM_OVERLAY`
|
|
1191
|
+
* overrides this either way.
|
|
1192
|
+
*/
|
|
1193
|
+
st_verbatim_overlay?: boolean;
|
|
1194
|
+
stVerbatimOverlay?: boolean;
|
|
1195
|
+
/**
|
|
1196
|
+
* Let the SDK answer `get_context_for_prompt` and `get_compacted` from its
|
|
1197
|
+
* own short-term store when the conversation is warm, skipping the cloud
|
|
1198
|
+
* round trip. Off by default. `SYNAP_SDK_ST_AUTHORITATIVE` also enables it.
|
|
1199
|
+
*
|
|
1200
|
+
* This is the COST switch. `st_verbatim_overlay` is the correctness one and
|
|
1201
|
+
* is independent of it.
|
|
1202
|
+
*/
|
|
1203
|
+
sdk_st_authoritative?: boolean;
|
|
1204
|
+
sdkStAuthoritative?: boolean;
|
|
1205
|
+
/**
|
|
1206
|
+
* Where the SDK's diagnostics go. Defaults to `console.warn` prefixed with
|
|
1207
|
+
* `[synap]`. Pass a no-op to silence them, or your own logger to route them.
|
|
1208
|
+
*/
|
|
1209
|
+
logger?: SynapLogger;
|
|
1010
1210
|
/**
|
|
1011
1211
|
* Bypass the process registry and build a genuinely separate client.
|
|
1012
1212
|
*
|
|
@@ -1040,8 +1240,8 @@ interface ConfigureOptions {
|
|
|
1040
1240
|
session_timeout_minutes?: number;
|
|
1041
1241
|
/** Accepted and ignored. Python-only. */
|
|
1042
1242
|
log_level?: string;
|
|
1043
|
-
/**
|
|
1044
|
-
logger?:
|
|
1243
|
+
/** Replaces the diagnostic sink, same as the constructor option. */
|
|
1244
|
+
logger?: SynapLogger;
|
|
1045
1245
|
}
|
|
1046
1246
|
/** Options for the cross-scope `fetch()`. Snake_case, matching Python's kwargs. */
|
|
1047
1247
|
interface UnifiedFetchOptions {
|
|
@@ -1167,11 +1367,12 @@ declare class SynapClient {
|
|
|
1167
1367
|
* initialization: the transport and cache are already built by then and a
|
|
1168
1368
|
* half-applied config is worse than a rejected one.
|
|
1169
1369
|
*
|
|
1170
|
-
*
|
|
1171
|
-
* `
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1370
|
+
* `logger` is honoured here as well as on the constructor. The remaining
|
|
1371
|
+
* Python-only keys (`storage_path`, `cache_backend`,
|
|
1372
|
+
* `session_timeout_minutes`, `log_level`) are accepted and ignored rather
|
|
1373
|
+
* than rejected, because this SDK has no SQLite cache backend and no global
|
|
1374
|
+
* logging framework whose level there would be to set. Ignoring them keeps
|
|
1375
|
+
* a shared config object portable between the two SDKs.
|
|
1175
1376
|
*/
|
|
1176
1377
|
configure(options?: ConfigureOptions): void;
|
|
1177
1378
|
/**
|
|
@@ -1301,9 +1502,15 @@ declare class InsufficientCreditsError extends SynapPermanentError {
|
|
|
1301
1502
|
static readonly errorCode: SynapErrorCode;
|
|
1302
1503
|
readonly balanceCredits: number | null;
|
|
1303
1504
|
readonly requiredCredits: number | null;
|
|
1505
|
+
/** Where the balance can be viewed. Python calls this `recovery_url`. */
|
|
1506
|
+
readonly recoveryUrl: string | null;
|
|
1507
|
+
/** Where a redeem code can be entered. Python calls this `redeem_url`. */
|
|
1508
|
+
readonly redeemUrl: string | null;
|
|
1304
1509
|
constructor(message: string, options?: SynapErrorOptions & {
|
|
1305
1510
|
balanceCredits?: number | null;
|
|
1306
1511
|
requiredCredits?: number | null;
|
|
1512
|
+
recoveryUrl?: string | null;
|
|
1513
|
+
redeemUrl?: string | null;
|
|
1307
1514
|
});
|
|
1308
1515
|
}
|
|
1309
1516
|
declare class InvalidInputError extends SynapPermanentError {
|
|
@@ -1500,4 +1707,4 @@ interface SynapSdkLike {
|
|
|
1500
1707
|
};
|
|
1501
1708
|
}
|
|
1502
1709
|
|
|
1503
|
-
export { AgentUnavailableError, type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, AuthenticationError, BM25, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type ConfigureOptions, ConflictError, ConnectionError, type ContextMetadata, ContextNotFoundError, type ConversationContext, type ConversationNamespace, type CreateFromFileOptions, type CreateMemoryOptions, type CreateMemoryResult, type Credentials, type CreditsNamespace, DEFAULT_BASE_URL, DEFAULT_DOCUMENT_TYPE, DEFAULT_INGEST_MODE, DEFAULT_RETRY_POLICY, DEFAULT_TIMEOUTS, DOCUMENT_TYPES, type DocumentType, ENDPOINTS, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, type Fact, type FetchOptions, type FlatMemory, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, InsufficientCreditsError, InvalidConversationIdError, InvalidInputError, InvalidInstanceIdError, type ItemCollection, type Json, type ListenOptions, ListeningAlreadyActiveError, ListeningNotActiveError, type MemoriesInterface, NetworkTimeoutError, type NormalisedContext, type OpenAiToolDefinition, PermanentError, type Preference, RateLimitError, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RequestOptions, type RetryPolicy, SDKError, SDK_VERSION, type Scope, type SendMessageOptions, ServiceUnavailableError, SessionExpiredError, SynapClient, type SynapClientOptions, SynapError, type SynapErrorCode, type SynapErrorOptions, SynapPermanentError, type SynapSdkLike, SynapTransientError, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, TranscriptConflictError, type TranscriptTurn, TransientError, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, flattenContextItems, formatForPrompt, isOutcomeUnknown, isRecallQuery, isSynapError, mergeScopeResults, resolvePath, shouldRetry, stem, tokenize };
|
|
1710
|
+
export { AgentUnavailableError, type AnthropicToolDefinition, AnticipationCacheSnapshot, type AsToolOptions, AuthenticationError, BM25, type BatchCreateResult, COMPACTION_LEVELS, CONTRACT, type CacheNamespace, type CacheStats, type CompactOptions, type CompactionCallback, type CompactionLevel, type ConfigureOptions, ConflictError, ConnectionError, type ContextMetadata, ContextNotFoundError, 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, type Emotion, type EndpointName, type EndpointSpec, type Episode, type EstimateOptions, type Fact, type FetchOptions, type FlatMemory, type FormatOptions, HttpTransport, type HttpTransportOptions, INGEST_MODES, ITEM_COLLECTIONS, type IngestMode, type IngestTranscriptOptions, type InstanceNamespace, InsufficientCreditsError, InvalidConversationIdError, InvalidInputError, InvalidInstanceIdError, type ItemCollection, type Json, type LedgerOptions, type ListenOptions, ListeningAlreadyActiveError, ListeningNotActiveError, type MemoriesInterface, NetworkTimeoutError, type NormalisedContext, type OpenAiToolDefinition, PermanentError, type Preference, RateLimitError, type RawContext, type RawContextItem, type RawConversationContext, type RecordMessageOptions, type RecordThinkingOptions, type RedeemResult, type RequestOptions, type RetryPolicy, SDKError, SDK_VERSION, type Scope, type SendMessageOptions, ServiceUnavailableError, SessionExpiredError, SynapClient, type SynapClientOptions, SynapError, type SynapErrorCode, type SynapErrorOptions, type SynapLogLevel, type SynapLogger, SynapPermanentError, type SynapSdkLike, SynapTransientError, THRESHOLDS, type TemporalEvent, type TemporalFields, type TimeoutConfig, type ToolDefinition, type ToolHandler, type ToolScope, type ToolStyle, TranscriptConflictError, type TranscriptIngestResult, type TranscriptTurn, TransientError, type UnifiedContext, type UnifiedFetchOptions, type UpdateMemoryOptions, type UserNamespace, type WaitOptions, type WriteInvalidator, flattenContextItems, formatForPrompt, isOutcomeUnknown, isRecallQuery, isSynapError, mergeScopeResults, resolvePath, shouldRetry, stem, tokenize };
|