@anuma/sdk 6.4.2 → 6.6.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/expo/{chunk-WYARTNEN.mjs → chunk-4M6W7QLZ.mjs} +233 -8
- package/dist/{react/chunk-ILAWDQDE.mjs → expo/chunk-B5UPJRCU.mjs} +16 -1
- package/dist/expo/{chunk-DT6QNRZL.mjs → chunk-VOMDHMKH.mjs} +1 -1
- package/dist/{react/consolidate-AMPKH6YJ.mjs → expo/consolidate-TWE6OSSZ.mjs} +2 -2
- package/dist/expo/index.cjs +306 -156
- package/dist/expo/index.d.mts +163 -7
- package/dist/expo/index.d.ts +163 -7
- package/dist/expo/index.mjs +33 -154
- package/dist/expo/{recall-7FOWWX5T.mjs → recall-EZIHN5VU.mjs} +2 -2
- package/dist/index.cjs +71 -0
- package/dist/index.d.mts +121 -1
- package/dist/index.d.ts +121 -1
- package/dist/index.mjs +67 -0
- package/dist/react/{chunk-VMI74IUX.mjs → chunk-2ARMO2NN.mjs} +1 -1
- package/dist/{expo/chunk-ILAWDQDE.mjs → react/chunk-B5UPJRCU.mjs} +16 -1
- package/dist/react/{chunk-IO4ZCPK2.mjs → chunk-S6WPXD5N.mjs} +254 -8
- package/dist/{expo/consolidate-3MEWQNM3.mjs → react/consolidate-ZCGS7QUA.mjs} +2 -2
- package/dist/react/index.cjs +331 -206
- package/dist/react/index.d.mts +163 -7
- package/dist/react/index.d.ts +163 -7
- package/dist/react/index.mjs +36 -202
- package/dist/react/{recall-2J2755WC.mjs → recall-ROEK55FJ.mjs} +2 -2
- package/dist/server/{chunk-KF4HV3QE.mjs → chunk-CR5P3YIK.mjs} +1 -1
- package/dist/server/{chunk-EKYGWD5N.mjs → chunk-TD7SMY7C.mjs} +98 -8
- package/dist/server/{chunk-OBDRKQQI.mjs → chunk-VHWLLYKO.mjs} +16 -1
- package/dist/server/{consolidate-I6TOH7CB.mjs → consolidate-FWYK5KXB.mjs} +2 -2
- package/dist/server/index.cjs +158 -48
- package/dist/server/index.d.mts +54 -6
- package/dist/server/index.d.ts +54 -6
- package/dist/server/index.mjs +24 -43
- package/dist/server/{recall-IVV6EILK.mjs → recall-CGDEW2LQ.mjs} +2 -2
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
createVaultEmbeddingCache,
|
|
44
44
|
createVaultMemoriesBatchOp,
|
|
45
45
|
createVaultMemoryOp,
|
|
46
|
+
dataUrlToArrayBuffer,
|
|
46
47
|
decomposeQuery,
|
|
47
48
|
decryptData,
|
|
48
49
|
decryptDataBatch,
|
|
@@ -129,6 +130,7 @@ import {
|
|
|
129
130
|
summarizeObservationTrends,
|
|
130
131
|
supersedeVaultMemoryOp,
|
|
131
132
|
traverseGraphLane,
|
|
133
|
+
uint8ArrayToBase64,
|
|
132
134
|
updateConversationProjectOp,
|
|
133
135
|
updateConversationTitleOp,
|
|
134
136
|
updateMessageChunksOp,
|
|
@@ -139,20 +141,22 @@ import {
|
|
|
139
141
|
updateVaultMemoryOp,
|
|
140
142
|
upsertMessageOp,
|
|
141
143
|
vaultMemoryToStored
|
|
142
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-TD7SMY7C.mjs";
|
|
143
145
|
import {
|
|
144
146
|
createStreamingDeAnonymizer,
|
|
145
147
|
notifyConsolidationFallback,
|
|
146
148
|
resolvePiiRedactor
|
|
147
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-CR5P3YIK.mjs";
|
|
148
150
|
import {
|
|
151
|
+
INTERNAL_FLOW_MARKER,
|
|
149
152
|
callPortalJsonCompletion,
|
|
150
153
|
extractJsonCandidate,
|
|
151
154
|
getLogger,
|
|
152
155
|
resolvePortalAuthHeaders,
|
|
153
156
|
supportsResponseFormat,
|
|
154
|
-
validateEndpointOverride
|
|
155
|
-
|
|
157
|
+
validateEndpointOverride,
|
|
158
|
+
withInternalFlowMarker
|
|
159
|
+
} from "./chunk-VHWLLYKO.mjs";
|
|
156
160
|
import {
|
|
157
161
|
BASE_URL,
|
|
158
162
|
__commonJS,
|
|
@@ -3409,7 +3413,17 @@ async function callSummarizationLlm(prompt, model, token, baseUrl) {
|
|
|
3409
3413
|
body: JSON.stringify({
|
|
3410
3414
|
model,
|
|
3411
3415
|
stream: false,
|
|
3412
|
-
|
|
3416
|
+
// The marker rides a system message because this call has no other
|
|
3417
|
+
// provenance: it posts to the MAIN chat endpoint (not /utility/*), carries no
|
|
3418
|
+
// conversationId, and its prompt is neither the app's chat base prompt nor any
|
|
3419
|
+
// registered flow fingerprint — so without this it reads as markerless, i.e.
|
|
3420
|
+
// as a scripted abuser. Progressive summarization runs for every free-tier
|
|
3421
|
+
// long conversation, so at the PORTAL_DETECTION_REJECT_MARKERLESS flip it
|
|
3422
|
+
// would 403 and silently fall back to verbatim history (context bloat + cost).
|
|
3423
|
+
messages: [
|
|
3424
|
+
{ role: "system", content: INTERNAL_FLOW_MARKER },
|
|
3425
|
+
{ role: "user", content: prompt }
|
|
3426
|
+
]
|
|
3413
3427
|
}),
|
|
3414
3428
|
signal: controller.signal
|
|
3415
3429
|
});
|
|
@@ -5679,7 +5693,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
5679
5693
|
content: m.content,
|
|
5680
5694
|
similarity: m.similarity
|
|
5681
5695
|
}));
|
|
5682
|
-
const { consolidateMemory: doConsolidate } = await import("./consolidate-
|
|
5696
|
+
const { consolidateMemory: doConsolidate } = await import("./consolidate-FWYK5KXB.mjs");
|
|
5683
5697
|
const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
|
|
5684
5698
|
if (decision.action === "create") return null;
|
|
5685
5699
|
if (decision.action === "supersede" && decision.content) {
|
|
@@ -7381,7 +7395,10 @@ async function synthesizeFacet(facet, ctx, options, prior) {
|
|
|
7381
7395
|
limit,
|
|
7382
7396
|
types: ["fact"],
|
|
7383
7397
|
maxTokens: DEFAULT_FACET_MAX_TOKENS,
|
|
7384
|
-
|
|
7398
|
+
// Profile-facet synthesis is a background op, so it marks its own prompt.
|
|
7399
|
+
// reflect() itself must NOT mark — it also serves the user's own questions,
|
|
7400
|
+
// and that traffic is chat, not an internal flow. See ../internalFlowMarker.
|
|
7401
|
+
systemPrompt: withInternalFlowMarker(buildFacetSystemPrompt(facet)),
|
|
7385
7402
|
responseSchema: facetResponseSchema(facet.key),
|
|
7386
7403
|
memories
|
|
7387
7404
|
});
|
|
@@ -9125,42 +9142,6 @@ var WalletPoller = class {
|
|
|
9125
9142
|
}
|
|
9126
9143
|
};
|
|
9127
9144
|
|
|
9128
|
-
// src/lib/processors/encoding.ts
|
|
9129
|
-
var B64_ENCODE_CHUNK = 32768 * 3;
|
|
9130
|
-
async function dataUrlToArrayBuffer(dataUrl) {
|
|
9131
|
-
if (dataUrl.startsWith("blob:") || dataUrl.startsWith("http://") || dataUrl.startsWith("https://")) {
|
|
9132
|
-
const response = await fetch(dataUrl);
|
|
9133
|
-
return response.arrayBuffer();
|
|
9134
|
-
}
|
|
9135
|
-
const base64 = dataUrl.split(",")[1];
|
|
9136
|
-
if (typeof Buffer !== "undefined") {
|
|
9137
|
-
const buf = Buffer.from(base64, "base64");
|
|
9138
|
-
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
|
|
9139
|
-
}
|
|
9140
|
-
const binary = atob(base64);
|
|
9141
|
-
const buffer = new ArrayBuffer(binary.length);
|
|
9142
|
-
const view = new Uint8Array(buffer);
|
|
9143
|
-
for (let i = 0; i < binary.length; i++) {
|
|
9144
|
-
view[i] = binary.charCodeAt(i);
|
|
9145
|
-
}
|
|
9146
|
-
return buffer;
|
|
9147
|
-
}
|
|
9148
|
-
function uint8ArrayToBase64(data) {
|
|
9149
|
-
if (typeof Buffer !== "undefined") {
|
|
9150
|
-
return Buffer.from(data).toString("base64");
|
|
9151
|
-
}
|
|
9152
|
-
let base64 = "";
|
|
9153
|
-
for (let i = 0; i < data.length; i += B64_ENCODE_CHUNK) {
|
|
9154
|
-
const slice = data.subarray(i, i + B64_ENCODE_CHUNK);
|
|
9155
|
-
let binary = "";
|
|
9156
|
-
for (let j = 0; j < slice.length; j++) {
|
|
9157
|
-
binary += String.fromCharCode(slice[j]);
|
|
9158
|
-
}
|
|
9159
|
-
base64 += btoa(binary);
|
|
9160
|
-
}
|
|
9161
|
-
return base64;
|
|
9162
|
-
}
|
|
9163
|
-
|
|
9164
9145
|
// src/lib/processors/ExcelProcessor.ts
|
|
9165
9146
|
if (typeof process !== "undefined" && typeof process.umask !== "function") {
|
|
9166
9147
|
process.umask = (_mask) => 18;
|