@anuma/sdk 3.3.0 → 3.4.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/client/index.cjs +793 -1420
- package/dist/client/index.d.mts +406 -402
- package/dist/client/index.d.ts +406 -402
- package/dist/client/index.mjs +793 -1420
- package/dist/expo/{chunk-NMZMXIUM.mjs → chunk-C7PGRFBG.mjs} +82 -9
- package/dist/expo/index.cjs +234 -168
- package/dist/expo/index.d.mts +70 -1
- package/dist/expo/index.d.ts +70 -1
- package/dist/expo/index.mjs +144 -156
- package/dist/expo/{recall-7FUJRHOI.mjs → recall-7ZX6T2VD.mjs} +1 -1
- package/dist/index.cjs +453 -783
- package/dist/index.d.mts +491 -487
- package/dist/index.d.ts +491 -487
- package/dist/index.mjs +453 -783
- package/dist/react/{chunk-GZRK43CA.mjs → chunk-CGC3UJHM.mjs} +82 -9
- package/dist/react/index.cjs +305 -290
- package/dist/react/index.d.mts +453 -380
- package/dist/react/index.d.ts +453 -380
- package/dist/react/index.mjs +215 -278
- package/dist/react/{recall-YZGWZC5W.mjs → recall-OTUNGQHQ.mjs} +1 -1
- package/dist/server/{chunk-NVTMJWFA.mjs → chunk-LUDHA4X4.mjs} +82 -9
- package/dist/server/index.cjs +124 -30
- package/dist/server/index.d.mts +70 -1
- package/dist/server/index.d.ts +70 -1
- package/dist/server/index.mjs +34 -18
- package/dist/server/{recall-76WPPKLR.mjs → recall-GWRWPGE4.mjs} +1 -1
- package/dist/tools/selection/index.cjs +3 -0
- package/dist/tools/selection/index.mjs +3 -0
- package/package.json +2 -2
package/dist/react/index.mjs
CHANGED
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
NODE_BUDGET,
|
|
13
13
|
RerankerUnavailableError,
|
|
14
14
|
TOPICS_EXTRACTION_VERSION,
|
|
15
|
+
TREND_RECENT_WINDOW_DAYS,
|
|
16
|
+
TREND_STALE_WINDOW_DAYS,
|
|
15
17
|
VAULT_SIZE_HOP_CAP,
|
|
16
18
|
archiveVaultMemoryOp,
|
|
17
19
|
assertVaultScopeForSweep,
|
|
@@ -20,6 +22,7 @@ import {
|
|
|
20
22
|
chunkAndEmbedAllMessages,
|
|
21
23
|
chunkAndEmbedMessage,
|
|
22
24
|
chunkText,
|
|
25
|
+
classifyObservationTrend,
|
|
23
26
|
clearAllEncryptionKeys,
|
|
24
27
|
clearAllEncryptionState,
|
|
25
28
|
clearAllKeyPairs,
|
|
@@ -111,6 +114,7 @@ import {
|
|
|
111
114
|
shouldChunkMessage,
|
|
112
115
|
stampTopicsExtractedAtOp,
|
|
113
116
|
stripToolCalls,
|
|
117
|
+
summarizeObservationTrends,
|
|
114
118
|
supersedeVaultMemoryOp,
|
|
115
119
|
traverseGraphLane,
|
|
116
120
|
updateConversationPinnedOp,
|
|
@@ -125,7 +129,7 @@ import {
|
|
|
125
129
|
updateVaultMemoryOp,
|
|
126
130
|
useEncryption,
|
|
127
131
|
vaultMemoryToStored
|
|
128
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-CGC3UJHM.mjs";
|
|
129
133
|
import {
|
|
130
134
|
PiiRedactor,
|
|
131
135
|
createStreamingDeAnonymizer,
|
|
@@ -150,7 +154,7 @@ import {
|
|
|
150
154
|
} from "./chunk-GYKJOWEO.mjs";
|
|
151
155
|
|
|
152
156
|
// src/client/core/serverSentEvents.gen.ts
|
|
153
|
-
|
|
157
|
+
function createSseClient({
|
|
154
158
|
onRequest,
|
|
155
159
|
onSseError,
|
|
156
160
|
onSseEvent,
|
|
@@ -162,7 +166,7 @@ var createSseClient = ({
|
|
|
162
166
|
sseSleepFn,
|
|
163
167
|
url,
|
|
164
168
|
...options
|
|
165
|
-
})
|
|
169
|
+
}) {
|
|
166
170
|
let lastEventId;
|
|
167
171
|
const sleep3 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
168
172
|
const createStream = async function* () {
|
|
@@ -190,10 +194,7 @@ var createSseClient = ({
|
|
|
190
194
|
}
|
|
191
195
|
const _fetch = options.fetch ?? globalThis.fetch;
|
|
192
196
|
const response = await _fetch(request);
|
|
193
|
-
if (!response.ok)
|
|
194
|
-
throw new Error(
|
|
195
|
-
`SSE failed: ${response.status} ${response.statusText}`
|
|
196
|
-
);
|
|
197
|
+
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
197
198
|
if (!response.body) throw new Error("No body in SSE response");
|
|
198
199
|
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
199
200
|
let buffer = "";
|
|
@@ -209,6 +210,7 @@ var createSseClient = ({
|
|
|
209
210
|
const { done, value } = await reader.read();
|
|
210
211
|
if (done) break;
|
|
211
212
|
buffer += value;
|
|
213
|
+
buffer = buffer.replace(/\r\n?/g, "\n");
|
|
212
214
|
const chunks = buffer.split("\n\n");
|
|
213
215
|
buffer = chunks.pop() ?? "";
|
|
214
216
|
for (const chunk of chunks) {
|
|
@@ -223,10 +225,7 @@ var createSseClient = ({
|
|
|
223
225
|
} else if (line.startsWith("id:")) {
|
|
224
226
|
lastEventId = line.replace(/^id:\s*/, "");
|
|
225
227
|
} else if (line.startsWith("retry:")) {
|
|
226
|
-
const parsed = Number.parseInt(
|
|
227
|
-
line.replace(/^retry:\s*/, ""),
|
|
228
|
-
10
|
|
229
|
-
);
|
|
228
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
230
229
|
if (!Number.isNaN(parsed)) {
|
|
231
230
|
retryDelay = parsed;
|
|
232
231
|
}
|
|
@@ -272,17 +271,14 @@ var createSseClient = ({
|
|
|
272
271
|
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
|
|
273
272
|
break;
|
|
274
273
|
}
|
|
275
|
-
const backoff = Math.min(
|
|
276
|
-
retryDelay * 2 ** (attempt - 1),
|
|
277
|
-
sseMaxRetryDelay ?? 3e4
|
|
278
|
-
);
|
|
274
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
|
|
279
275
|
await sleep3(backoff);
|
|
280
276
|
}
|
|
281
277
|
}
|
|
282
278
|
};
|
|
283
279
|
const stream = createStream();
|
|
284
280
|
return { stream };
|
|
285
|
-
}
|
|
281
|
+
}
|
|
286
282
|
|
|
287
283
|
// src/lib/chat/runHooks.ts
|
|
288
284
|
function composeHooks(hooks) {
|
|
@@ -8742,6 +8738,13 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
8742
8738
|
includeSuperseded: true
|
|
8743
8739
|
});
|
|
8744
8740
|
const watermark = computeVaultWatermark(memories);
|
|
8741
|
+
const observationTrends = summarizeObservationTrends(
|
|
8742
|
+
memories.filter((m) => !m.isDeleted && m.supersededBy === null).map((m) => ({
|
|
8743
|
+
createdAt: m.createdAt,
|
|
8744
|
+
lastObservedAt: m.lastObservedAt,
|
|
8745
|
+
proofCount: m.proofCount
|
|
8746
|
+
}))
|
|
8747
|
+
);
|
|
8745
8748
|
const presentIds = new Set(memories.map((m) => m.uniqueId));
|
|
8746
8749
|
const hasStaleSections = previous?.sections.some((s) => s.stale);
|
|
8747
8750
|
const citesMissingFact = previous?.sections.some(
|
|
@@ -8749,10 +8752,14 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
8749
8752
|
);
|
|
8750
8753
|
if (previous && previous.vaultWatermark === watermark && !hasStaleSections && !citesMissingFact) {
|
|
8751
8754
|
const sameOrder = previous.sections.length === facets.length && facets.every((f, i) => previous.sections[i]?.key === f.key);
|
|
8752
|
-
if (sameOrder)
|
|
8755
|
+
if (sameOrder) {
|
|
8756
|
+
if (trendsEqual(previous.observationTrends, observationTrends)) return previous;
|
|
8757
|
+
return { ...previous, observationTrends };
|
|
8758
|
+
}
|
|
8753
8759
|
return {
|
|
8754
8760
|
...previous,
|
|
8755
|
-
sections: facets.map((f) => previous.sections.find((s) => s.key === f.key))
|
|
8761
|
+
sections: facets.map((f) => previous.sections.find((s) => s.key === f.key)),
|
|
8762
|
+
observationTrends
|
|
8756
8763
|
};
|
|
8757
8764
|
}
|
|
8758
8765
|
const staleKeys = await computeStaleFacetKeys(ctx, memories, facets, previous, watermark);
|
|
@@ -8785,6 +8792,7 @@ async function synthesizeProfile(ctx, options = {}) {
|
|
|
8785
8792
|
sections,
|
|
8786
8793
|
vaultWatermark: watermark,
|
|
8787
8794
|
config,
|
|
8795
|
+
observationTrends,
|
|
8788
8796
|
generatedAt: Date.now()
|
|
8789
8797
|
};
|
|
8790
8798
|
}
|
|
@@ -8795,6 +8803,10 @@ function configMatches(a, b) {
|
|
|
8795
8803
|
function facetsSignature(facets) {
|
|
8796
8804
|
return facets.map((f) => JSON.stringify([f.key, f.label, f.query, f.guidance])).sort().join("\n");
|
|
8797
8805
|
}
|
|
8806
|
+
function trendsEqual(a, b) {
|
|
8807
|
+
if (!a) return false;
|
|
8808
|
+
return a.new === b.new && a.strengthening === b.strengthening && a.stable === b.stable && a.weakening === b.weakening && a.stale === b.stale;
|
|
8809
|
+
}
|
|
8798
8810
|
function changeTime(m) {
|
|
8799
8811
|
return Math.max(m.updatedAt.getTime(), m.supersededAt ?? 0, m.lastObservedAt ?? 0);
|
|
8800
8812
|
}
|
|
@@ -17337,10 +17349,7 @@ import { useCallback as useCallback12, useEffect as useEffect6, useRef as useRef
|
|
|
17337
17349
|
|
|
17338
17350
|
// src/client/core/bodySerializer.gen.ts
|
|
17339
17351
|
var jsonBodySerializer = {
|
|
17340
|
-
bodySerializer: (body) => JSON.stringify(
|
|
17341
|
-
body,
|
|
17342
|
-
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
17343
|
-
)
|
|
17352
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
17344
17353
|
};
|
|
17345
17354
|
|
|
17346
17355
|
// src/client/core/pathSerializer.gen.ts
|
|
@@ -17442,11 +17451,7 @@ var serializeObjectParam = ({
|
|
|
17442
17451
|
if (style !== "deepObject" && !explode) {
|
|
17443
17452
|
let values = [];
|
|
17444
17453
|
Object.entries(value).forEach(([key, v]) => {
|
|
17445
|
-
values = [
|
|
17446
|
-
...values,
|
|
17447
|
-
key,
|
|
17448
|
-
allowReserved ? v : encodeURIComponent(v)
|
|
17449
|
-
];
|
|
17454
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
17450
17455
|
});
|
|
17451
17456
|
const joinedValues2 = values.join(",");
|
|
17452
17457
|
switch (style) {
|
|
@@ -17529,10 +17534,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
|
|
|
17529
17534
|
continue;
|
|
17530
17535
|
}
|
|
17531
17536
|
if (Array.isArray(value)) {
|
|
17532
|
-
url = url.replace(
|
|
17533
|
-
match,
|
|
17534
|
-
serializeArrayParam({ explode, name, style, value })
|
|
17535
|
-
);
|
|
17537
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
17536
17538
|
continue;
|
|
17537
17539
|
}
|
|
17538
17540
|
if (typeof value === "object") {
|
|
@@ -17627,9 +17629,7 @@ var getParseAs = (contentType) => {
|
|
|
17627
17629
|
if (cleanContent === "multipart/form-data") {
|
|
17628
17630
|
return "formData";
|
|
17629
17631
|
}
|
|
17630
|
-
if (["application/", "audio/", "image/", "video/"].some(
|
|
17631
|
-
(type) => cleanContent.startsWith(type)
|
|
17632
|
-
)) {
|
|
17632
|
+
if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
|
|
17633
17633
|
return "blob";
|
|
17634
17634
|
}
|
|
17635
17635
|
if (cleanContent.startsWith("text/")) {
|
|
@@ -17646,11 +17646,8 @@ var checkForExistence = (options, name) => {
|
|
|
17646
17646
|
}
|
|
17647
17647
|
return false;
|
|
17648
17648
|
};
|
|
17649
|
-
|
|
17650
|
-
security
|
|
17651
|
-
...options
|
|
17652
|
-
}) => {
|
|
17653
|
-
for (const auth of security) {
|
|
17649
|
+
async function setAuthParams(options) {
|
|
17650
|
+
for (const auth of options.security ?? []) {
|
|
17654
17651
|
if (checkForExistence(options, auth.name)) {
|
|
17655
17652
|
continue;
|
|
17656
17653
|
}
|
|
@@ -17675,7 +17672,7 @@ var setAuthParams = async ({
|
|
|
17675
17672
|
break;
|
|
17676
17673
|
}
|
|
17677
17674
|
}
|
|
17678
|
-
}
|
|
17675
|
+
}
|
|
17679
17676
|
var buildUrl = (options) => {
|
|
17680
17677
|
const url = getUrl({
|
|
17681
17678
|
baseUrl: options.baseUrl,
|
|
@@ -17827,10 +17824,7 @@ var createClient = (config = {}) => {
|
|
|
17827
17824
|
serializedBody: void 0
|
|
17828
17825
|
};
|
|
17829
17826
|
if (opts.security) {
|
|
17830
|
-
await setAuthParams(
|
|
17831
|
-
...opts,
|
|
17832
|
-
security: opts.security
|
|
17833
|
-
});
|
|
17827
|
+
await setAuthParams(opts);
|
|
17834
17828
|
}
|
|
17835
17829
|
if (opts.requestValidator) {
|
|
17836
17830
|
await opts.requestValidator(opts);
|
|
@@ -17841,105 +17835,115 @@ var createClient = (config = {}) => {
|
|
|
17841
17835
|
if (opts.body === void 0 || opts.serializedBody === "") {
|
|
17842
17836
|
opts.headers.delete("Content-Type");
|
|
17843
17837
|
}
|
|
17844
|
-
const
|
|
17845
|
-
|
|
17838
|
+
const resolvedOpts = opts;
|
|
17839
|
+
const url = buildUrl(resolvedOpts);
|
|
17840
|
+
return { opts: resolvedOpts, url };
|
|
17846
17841
|
};
|
|
17847
17842
|
const request = async (options) => {
|
|
17848
|
-
const
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17843
|
+
const throwOnError = options.throwOnError ?? _config.throwOnError;
|
|
17844
|
+
let response;
|
|
17845
|
+
try {
|
|
17846
|
+
const { opts, url } = await beforeRequest(options);
|
|
17847
|
+
for (const fn of interceptors.request.fns) {
|
|
17848
|
+
if (fn) {
|
|
17849
|
+
await fn(opts);
|
|
17850
|
+
}
|
|
17852
17851
|
}
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17852
|
+
const _fetch = opts.fetch;
|
|
17853
|
+
const requestInit = {
|
|
17854
|
+
...opts,
|
|
17855
|
+
body: getValidRequestBody(opts)
|
|
17856
|
+
};
|
|
17857
|
+
response = await _fetch(url, requestInit);
|
|
17858
|
+
for (const fn of interceptors.response.fns) {
|
|
17859
|
+
if (fn) {
|
|
17860
|
+
response = await fn(response, opts);
|
|
17861
|
+
}
|
|
17863
17862
|
}
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
|
|
17863
|
+
const result = {
|
|
17864
|
+
response
|
|
17865
|
+
};
|
|
17866
|
+
if (response.ok) {
|
|
17867
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
17868
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
17869
|
+
let emptyData;
|
|
17870
|
+
switch (parseAs) {
|
|
17871
|
+
case "arrayBuffer":
|
|
17872
|
+
case "blob":
|
|
17873
|
+
case "text":
|
|
17874
|
+
emptyData = await response[parseAs]();
|
|
17875
|
+
break;
|
|
17876
|
+
case "formData":
|
|
17877
|
+
emptyData = new FormData();
|
|
17878
|
+
break;
|
|
17879
|
+
case "stream":
|
|
17880
|
+
emptyData = response.body;
|
|
17881
|
+
break;
|
|
17882
|
+
case "json":
|
|
17883
|
+
default:
|
|
17884
|
+
emptyData = {};
|
|
17885
|
+
break;
|
|
17886
|
+
}
|
|
17887
|
+
return {
|
|
17888
|
+
data: emptyData,
|
|
17889
|
+
...result
|
|
17890
|
+
};
|
|
17891
|
+
}
|
|
17892
|
+
let data;
|
|
17872
17893
|
switch (parseAs) {
|
|
17873
17894
|
case "arrayBuffer":
|
|
17874
17895
|
case "blob":
|
|
17896
|
+
case "formData":
|
|
17875
17897
|
case "text":
|
|
17876
|
-
|
|
17898
|
+
data = await response[parseAs]();
|
|
17877
17899
|
break;
|
|
17878
|
-
case "
|
|
17879
|
-
|
|
17900
|
+
case "json": {
|
|
17901
|
+
const text12 = await response.text();
|
|
17902
|
+
data = text12 ? JSON.parse(text12) : {};
|
|
17880
17903
|
break;
|
|
17904
|
+
}
|
|
17881
17905
|
case "stream":
|
|
17882
|
-
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
|
|
17886
|
-
|
|
17887
|
-
|
|
17906
|
+
return {
|
|
17907
|
+
data: response.body,
|
|
17908
|
+
...result
|
|
17909
|
+
};
|
|
17910
|
+
}
|
|
17911
|
+
if (parseAs === "json") {
|
|
17912
|
+
if (opts.responseValidator) {
|
|
17913
|
+
await opts.responseValidator(data);
|
|
17914
|
+
}
|
|
17915
|
+
if (opts.responseTransformer) {
|
|
17916
|
+
data = await opts.responseTransformer(data);
|
|
17917
|
+
}
|
|
17888
17918
|
}
|
|
17889
17919
|
return {
|
|
17890
|
-
data
|
|
17920
|
+
data,
|
|
17891
17921
|
...result
|
|
17892
17922
|
};
|
|
17893
17923
|
}
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17899
|
-
case "json":
|
|
17900
|
-
case "text":
|
|
17901
|
-
data = await response[parseAs]();
|
|
17902
|
-
break;
|
|
17903
|
-
case "stream":
|
|
17904
|
-
return {
|
|
17905
|
-
data: response.body,
|
|
17906
|
-
...result
|
|
17907
|
-
};
|
|
17924
|
+
const textError = await response.text();
|
|
17925
|
+
let jsonError;
|
|
17926
|
+
try {
|
|
17927
|
+
jsonError = JSON.parse(textError);
|
|
17928
|
+
} catch {
|
|
17908
17929
|
}
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17913
|
-
if (
|
|
17914
|
-
|
|
17930
|
+
throw jsonError ?? textError;
|
|
17931
|
+
} catch (error) {
|
|
17932
|
+
let finalError = error;
|
|
17933
|
+
for (const fn of interceptors.error.fns) {
|
|
17934
|
+
if (fn) {
|
|
17935
|
+
finalError = await fn(finalError, response, options);
|
|
17915
17936
|
}
|
|
17916
17937
|
}
|
|
17938
|
+
finalError = finalError || {};
|
|
17939
|
+
if (throwOnError) {
|
|
17940
|
+
throw finalError;
|
|
17941
|
+
}
|
|
17917
17942
|
return {
|
|
17918
|
-
|
|
17919
|
-
|
|
17943
|
+
error: finalError,
|
|
17944
|
+
response
|
|
17920
17945
|
};
|
|
17921
17946
|
}
|
|
17922
|
-
const textError = await response.text();
|
|
17923
|
-
let jsonError;
|
|
17924
|
-
try {
|
|
17925
|
-
jsonError = JSON.parse(textError);
|
|
17926
|
-
} catch {
|
|
17927
|
-
}
|
|
17928
|
-
const error = jsonError ?? textError;
|
|
17929
|
-
let finalError = error;
|
|
17930
|
-
for (const fn of interceptors.error.fns) {
|
|
17931
|
-
if (fn) {
|
|
17932
|
-
finalError = await fn(error, response, opts);
|
|
17933
|
-
}
|
|
17934
|
-
}
|
|
17935
|
-
finalError = finalError || {};
|
|
17936
|
-
if (opts.throwOnError) {
|
|
17937
|
-
throw finalError;
|
|
17938
|
-
}
|
|
17939
|
-
return {
|
|
17940
|
-
error: finalError,
|
|
17941
|
-
...result
|
|
17942
|
-
};
|
|
17943
17947
|
};
|
|
17944
17948
|
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
17945
17949
|
const makeSseFn = (method) => async (options) => {
|
|
@@ -17947,15 +17951,10 @@ var createClient = (config = {}) => {
|
|
|
17947
17951
|
return createSseClient({
|
|
17948
17952
|
...opts,
|
|
17949
17953
|
body: opts.body,
|
|
17950
|
-
headers: opts.headers,
|
|
17951
17954
|
method,
|
|
17952
17955
|
onRequest: async (url2, init) => {
|
|
17953
17956
|
let request2 = new Request(url2, init);
|
|
17954
|
-
const requestInit = {
|
|
17955
|
-
...init,
|
|
17956
|
-
method: init.method,
|
|
17957
|
-
url: url2
|
|
17958
|
-
};
|
|
17957
|
+
const requestInit = { ...init, url: url2 };
|
|
17959
17958
|
for (const fn of interceptors.request.fns) {
|
|
17960
17959
|
if (fn) {
|
|
17961
17960
|
await fn(requestInit);
|
|
@@ -17964,11 +17963,13 @@ var createClient = (config = {}) => {
|
|
|
17964
17963
|
}
|
|
17965
17964
|
return request2;
|
|
17966
17965
|
},
|
|
17966
|
+
serializedBody: getValidRequestBody(opts),
|
|
17967
17967
|
url
|
|
17968
17968
|
});
|
|
17969
17969
|
};
|
|
17970
|
+
const _buildUrl = (options) => buildUrl({ ..._config, ...options });
|
|
17970
17971
|
return {
|
|
17971
|
-
buildUrl,
|
|
17972
|
+
buildUrl: _buildUrl,
|
|
17972
17973
|
connect: makeMethodFn("CONNECT"),
|
|
17973
17974
|
delete: makeMethodFn("DELETE"),
|
|
17974
17975
|
get: makeMethodFn("GET"),
|
|
@@ -18000,156 +18001,88 @@ var createClient = (config = {}) => {
|
|
|
18000
18001
|
var client = createClient(createClientConfig(createConfig()));
|
|
18001
18002
|
|
|
18002
18003
|
// src/client/sdk.gen.ts
|
|
18003
|
-
var getApiV1Config = (options) => {
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
};
|
|
18015
|
-
var
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
}
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
}
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
...options
|
|
18057
|
-
|
|
18058
|
-
|
|
18059
|
-
|
|
18060
|
-
|
|
18061
|
-
|
|
18062
|
-
}
|
|
18063
|
-
|
|
18064
|
-
|
|
18065
|
-
|
|
18066
|
-
...options
|
|
18067
|
-
|
|
18068
|
-
|
|
18069
|
-
|
|
18070
|
-
|
|
18071
|
-
|
|
18072
|
-
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
|
|
18076
|
-
|
|
18077
|
-
|
|
18078
|
-
|
|
18079
|
-
|
|
18080
|
-
|
|
18081
|
-
|
|
18082
|
-
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
url: "/api/v1/subscriptions/renew",
|
|
18086
|
-
...options
|
|
18087
|
-
});
|
|
18088
|
-
};
|
|
18089
|
-
var getApiV1SubscriptionsStatus = (options) => {
|
|
18090
|
-
return (options?.client ?? client).get({
|
|
18091
|
-
url: "/api/v1/subscriptions/status",
|
|
18092
|
-
...options
|
|
18093
|
-
});
|
|
18094
|
-
};
|
|
18095
|
-
var getApiV1WalletsBinding = (options) => {
|
|
18096
|
-
return (options?.client ?? client).get({
|
|
18097
|
-
url: "/api/v1/wallets/binding",
|
|
18098
|
-
...options
|
|
18099
|
-
});
|
|
18100
|
-
};
|
|
18101
|
-
var postApiV1WalletsBinding = (options) => {
|
|
18102
|
-
return (options.client ?? client).post({
|
|
18103
|
-
url: "/api/v1/wallets/binding",
|
|
18104
|
-
...options,
|
|
18105
|
-
headers: {
|
|
18106
|
-
"Content-Type": "application/json",
|
|
18107
|
-
...options.headers
|
|
18108
|
-
}
|
|
18109
|
-
});
|
|
18110
|
-
};
|
|
18111
|
-
var postApiV1WalletsBindingNonce = (options) => {
|
|
18112
|
-
return (options?.client ?? client).post({
|
|
18113
|
-
url: "/api/v1/wallets/binding/nonce",
|
|
18114
|
-
...options
|
|
18115
|
-
});
|
|
18116
|
-
};
|
|
18117
|
-
var deleteApiV1WalletsBindingByAddress = (options) => {
|
|
18118
|
-
return (options.client ?? client).delete({
|
|
18119
|
-
url: "/api/v1/wallets/binding/{address}",
|
|
18120
|
-
...options
|
|
18121
|
-
});
|
|
18122
|
-
};
|
|
18123
|
-
var postAuthOauthByProviderExchange = (options) => {
|
|
18124
|
-
return (options.client ?? client).post({
|
|
18125
|
-
url: "/auth/oauth/{provider}/exchange",
|
|
18126
|
-
...options,
|
|
18127
|
-
headers: {
|
|
18128
|
-
"Content-Type": "application/json",
|
|
18129
|
-
...options.headers
|
|
18130
|
-
}
|
|
18131
|
-
});
|
|
18132
|
-
};
|
|
18133
|
-
var postAuthOauthByProviderRefresh = (options) => {
|
|
18134
|
-
return (options.client ?? client).post({
|
|
18135
|
-
url: "/auth/oauth/{provider}/refresh",
|
|
18136
|
-
...options,
|
|
18137
|
-
headers: {
|
|
18138
|
-
"Content-Type": "application/json",
|
|
18139
|
-
...options.headers
|
|
18140
|
-
}
|
|
18141
|
-
});
|
|
18142
|
-
};
|
|
18143
|
-
var postAuthOauthByProviderRevoke = (options) => {
|
|
18144
|
-
return (options.client ?? client).post({
|
|
18145
|
-
url: "/auth/oauth/{provider}/revoke",
|
|
18146
|
-
...options,
|
|
18147
|
-
headers: {
|
|
18148
|
-
"Content-Type": "application/json",
|
|
18149
|
-
...options.headers
|
|
18150
|
-
}
|
|
18151
|
-
});
|
|
18152
|
-
};
|
|
18004
|
+
var getApiV1Config = (options) => (options?.client ?? client).get({ url: "/api/v1/config", ...options });
|
|
18005
|
+
var getApiV1CreditsBalance = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/balance", ...options });
|
|
18006
|
+
var getApiV1CreditsPacks = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/packs", ...options });
|
|
18007
|
+
var postApiV1CreditsPurchase = (options) => (options.client ?? client).post({
|
|
18008
|
+
url: "/api/v1/credits/purchase",
|
|
18009
|
+
...options,
|
|
18010
|
+
headers: {
|
|
18011
|
+
"Content-Type": "application/json",
|
|
18012
|
+
...options.headers
|
|
18013
|
+
}
|
|
18014
|
+
});
|
|
18015
|
+
var getApiV1Models = (options) => (options?.client ?? client).get({ url: "/api/v1/models", ...options });
|
|
18016
|
+
var postApiV1PhoneCalls = (options) => (options.client ?? client).post({
|
|
18017
|
+
url: "/api/v1/phone-calls",
|
|
18018
|
+
...options,
|
|
18019
|
+
headers: {
|
|
18020
|
+
"Content-Type": "application/json",
|
|
18021
|
+
...options.headers
|
|
18022
|
+
}
|
|
18023
|
+
});
|
|
18024
|
+
var getApiV1PhoneCallsByCallId = (options) => (options.client ?? client).get({ url: "/api/v1/phone-calls/{call_id}", ...options });
|
|
18025
|
+
var postApiV1SubscriptionsCancel = (options) => (options?.client ?? client).post({
|
|
18026
|
+
url: "/api/v1/subscriptions/cancel",
|
|
18027
|
+
...options,
|
|
18028
|
+
headers: {
|
|
18029
|
+
"Content-Type": "application/json",
|
|
18030
|
+
...options?.headers
|
|
18031
|
+
}
|
|
18032
|
+
});
|
|
18033
|
+
var postApiV1SubscriptionsCreateCheckoutSession = (options) => (options.client ?? client).post({
|
|
18034
|
+
url: "/api/v1/subscriptions/create-checkout-session",
|
|
18035
|
+
...options,
|
|
18036
|
+
headers: {
|
|
18037
|
+
"Content-Type": "application/json",
|
|
18038
|
+
...options.headers
|
|
18039
|
+
}
|
|
18040
|
+
});
|
|
18041
|
+
var postApiV1SubscriptionsCustomerPortal = (options) => (options.client ?? client).post({
|
|
18042
|
+
url: "/api/v1/subscriptions/customer-portal",
|
|
18043
|
+
...options,
|
|
18044
|
+
headers: {
|
|
18045
|
+
"Content-Type": "application/json",
|
|
18046
|
+
...options.headers
|
|
18047
|
+
}
|
|
18048
|
+
});
|
|
18049
|
+
var postApiV1SubscriptionsRenew = (options) => (options?.client ?? client).post({ url: "/api/v1/subscriptions/renew", ...options });
|
|
18050
|
+
var getApiV1SubscriptionsStatus = (options) => (options?.client ?? client).get({ url: "/api/v1/subscriptions/status", ...options });
|
|
18051
|
+
var getApiV1WalletsBinding = (options) => (options?.client ?? client).get({ url: "/api/v1/wallets/binding", ...options });
|
|
18052
|
+
var postApiV1WalletsBinding = (options) => (options.client ?? client).post({
|
|
18053
|
+
url: "/api/v1/wallets/binding",
|
|
18054
|
+
...options,
|
|
18055
|
+
headers: {
|
|
18056
|
+
"Content-Type": "application/json",
|
|
18057
|
+
...options.headers
|
|
18058
|
+
}
|
|
18059
|
+
});
|
|
18060
|
+
var postApiV1WalletsBindingNonce = (options) => (options?.client ?? client).post({ url: "/api/v1/wallets/binding/nonce", ...options });
|
|
18061
|
+
var deleteApiV1WalletsBindingByAddress = (options) => (options.client ?? client).delete({ url: "/api/v1/wallets/binding/{address}", ...options });
|
|
18062
|
+
var postAuthOauthByProviderExchange = (options) => (options.client ?? client).post({
|
|
18063
|
+
url: "/auth/oauth/{provider}/exchange",
|
|
18064
|
+
...options,
|
|
18065
|
+
headers: {
|
|
18066
|
+
"Content-Type": "application/json",
|
|
18067
|
+
...options.headers
|
|
18068
|
+
}
|
|
18069
|
+
});
|
|
18070
|
+
var postAuthOauthByProviderRefresh = (options) => (options.client ?? client).post({
|
|
18071
|
+
url: "/auth/oauth/{provider}/refresh",
|
|
18072
|
+
...options,
|
|
18073
|
+
headers: {
|
|
18074
|
+
"Content-Type": "application/json",
|
|
18075
|
+
...options.headers
|
|
18076
|
+
}
|
|
18077
|
+
});
|
|
18078
|
+
var postAuthOauthByProviderRevoke = (options) => (options.client ?? client).post({
|
|
18079
|
+
url: "/auth/oauth/{provider}/revoke",
|
|
18080
|
+
...options,
|
|
18081
|
+
headers: {
|
|
18082
|
+
"Content-Type": "application/json",
|
|
18083
|
+
...options.headers
|
|
18084
|
+
}
|
|
18085
|
+
});
|
|
18153
18086
|
|
|
18154
18087
|
// src/react/useCredits.ts
|
|
18155
18088
|
function useCredits(options = {}) {
|
|
@@ -24881,6 +24814,8 @@ export {
|
|
|
24881
24814
|
THEME_ATTRS,
|
|
24882
24815
|
TOPICS_EXTRACTION_VERSION,
|
|
24883
24816
|
TOPIC_EXTRACTION_BATCH_SIZE,
|
|
24817
|
+
TREND_RECENT_WINDOW_DAYS,
|
|
24818
|
+
TREND_STALE_WINDOW_DAYS,
|
|
24884
24819
|
TextProcessor,
|
|
24885
24820
|
UIInteractionProvider,
|
|
24886
24821
|
VAULT_SIZE_HOP_CAP,
|
|
@@ -24902,6 +24837,7 @@ export {
|
|
|
24902
24837
|
classifyCryptoPriceBatch,
|
|
24903
24838
|
classifyDecay,
|
|
24904
24839
|
classifyInjectionCandidates,
|
|
24840
|
+
classifyObservationTrend,
|
|
24905
24841
|
classifyStockPrice,
|
|
24906
24842
|
classifyStockPriceBatch,
|
|
24907
24843
|
classifyWeather,
|
|
@@ -25171,6 +25107,7 @@ export {
|
|
|
25171
25107
|
storeNotionReturnUrl,
|
|
25172
25108
|
streamCancelPath,
|
|
25173
25109
|
streamReplayPath,
|
|
25110
|
+
summarizeObservationTrends,
|
|
25174
25111
|
supersedeVaultMemoryOp,
|
|
25175
25112
|
synthesizeProfile,
|
|
25176
25113
|
traverseGraphLane,
|