@anuma/sdk 6.33.0 → 6.33.1
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/index.cjs +7 -1
- package/dist/expo/index.d.mts +1 -1
- package/dist/expo/index.d.ts +1 -1
- package/dist/expo/index.mjs +7 -1
- package/dist/react/index.cjs +7 -1
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.mjs +7 -1
- package/dist/server/index.cjs +7 -1
- package/dist/server/index.d.mts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.mjs +7 -1
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -9151,7 +9151,13 @@ async function runToolLoop(options) {
|
|
|
9151
9151
|
);
|
|
9152
9152
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
9153
9153
|
if (extra.length > 0) {
|
|
9154
|
-
|
|
9154
|
+
let userIndex = messages.length - 1;
|
|
9155
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
9156
|
+
messages = [
|
|
9157
|
+
...messages.slice(0, userIndex),
|
|
9158
|
+
...await redactBatch(extra),
|
|
9159
|
+
...messages.slice(userIndex)
|
|
9160
|
+
];
|
|
9155
9161
|
}
|
|
9156
9162
|
}
|
|
9157
9163
|
} catch (err) {
|
package/dist/expo/index.d.mts
CHANGED
|
@@ -1401,7 +1401,7 @@ type PromptPreProcessorContext = {
|
|
|
1401
1401
|
signal?: AbortSignal;
|
|
1402
1402
|
};
|
|
1403
1403
|
/**
|
|
1404
|
-
* Returns messages to
|
|
1404
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
1405
1405
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
1406
1406
|
* so a failing pre-processor does not abort the LLM request.
|
|
1407
1407
|
*/
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -1401,7 +1401,7 @@ type PromptPreProcessorContext = {
|
|
|
1401
1401
|
signal?: AbortSignal;
|
|
1402
1402
|
};
|
|
1403
1403
|
/**
|
|
1404
|
-
* Returns messages to
|
|
1404
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
1405
1405
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
1406
1406
|
* so a failing pre-processor does not abort the LLM request.
|
|
1407
1407
|
*/
|
package/dist/expo/index.mjs
CHANGED
|
@@ -7500,7 +7500,13 @@ async function runToolLoop(options) {
|
|
|
7500
7500
|
);
|
|
7501
7501
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
7502
7502
|
if (extra.length > 0) {
|
|
7503
|
-
|
|
7503
|
+
let userIndex = messages.length - 1;
|
|
7504
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
7505
|
+
messages = [
|
|
7506
|
+
...messages.slice(0, userIndex),
|
|
7507
|
+
...await redactBatch(extra),
|
|
7508
|
+
...messages.slice(userIndex)
|
|
7509
|
+
];
|
|
7504
7510
|
}
|
|
7505
7511
|
}
|
|
7506
7512
|
} catch (err) {
|
package/dist/react/index.cjs
CHANGED
|
@@ -9589,7 +9589,13 @@ async function runToolLoop(options) {
|
|
|
9589
9589
|
);
|
|
9590
9590
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
9591
9591
|
if (extra.length > 0) {
|
|
9592
|
-
|
|
9592
|
+
let userIndex = messages.length - 1;
|
|
9593
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
9594
|
+
messages = [
|
|
9595
|
+
...messages.slice(0, userIndex),
|
|
9596
|
+
...await redactBatch(extra),
|
|
9597
|
+
...messages.slice(userIndex)
|
|
9598
|
+
];
|
|
9593
9599
|
}
|
|
9594
9600
|
}
|
|
9595
9601
|
} catch (err) {
|
package/dist/react/index.d.mts
CHANGED
|
@@ -2062,7 +2062,7 @@ type PromptPreProcessorContext = {
|
|
|
2062
2062
|
signal?: AbortSignal;
|
|
2063
2063
|
};
|
|
2064
2064
|
/**
|
|
2065
|
-
* Returns messages to
|
|
2065
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
2066
2066
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
2067
2067
|
* so a failing pre-processor does not abort the LLM request.
|
|
2068
2068
|
*/
|
package/dist/react/index.d.ts
CHANGED
|
@@ -2062,7 +2062,7 @@ type PromptPreProcessorContext = {
|
|
|
2062
2062
|
signal?: AbortSignal;
|
|
2063
2063
|
};
|
|
2064
2064
|
/**
|
|
2065
|
-
* Returns messages to
|
|
2065
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
2066
2066
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
2067
2067
|
* so a failing pre-processor does not abort the LLM request.
|
|
2068
2068
|
*/
|
package/dist/react/index.mjs
CHANGED
|
@@ -7677,7 +7677,13 @@ async function runToolLoop(options) {
|
|
|
7677
7677
|
);
|
|
7678
7678
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
7679
7679
|
if (extra.length > 0) {
|
|
7680
|
-
|
|
7680
|
+
let userIndex = messages.length - 1;
|
|
7681
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
7682
|
+
messages = [
|
|
7683
|
+
...messages.slice(0, userIndex),
|
|
7684
|
+
...await redactBatch(extra),
|
|
7685
|
+
...messages.slice(userIndex)
|
|
7686
|
+
];
|
|
7681
7687
|
}
|
|
7682
7688
|
}
|
|
7683
7689
|
} catch (err) {
|
package/dist/server/index.cjs
CHANGED
|
@@ -38007,7 +38007,13 @@ async function runToolLoop(options) {
|
|
|
38007
38007
|
);
|
|
38008
38008
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
38009
38009
|
if (extra.length > 0) {
|
|
38010
|
-
|
|
38010
|
+
let userIndex = messages.length - 1;
|
|
38011
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
38012
|
+
messages = [
|
|
38013
|
+
...messages.slice(0, userIndex),
|
|
38014
|
+
...await redactBatch(extra),
|
|
38015
|
+
...messages.slice(userIndex)
|
|
38016
|
+
];
|
|
38011
38017
|
}
|
|
38012
38018
|
}
|
|
38013
38019
|
} catch (err) {
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1697,7 +1697,7 @@ type PromptPreProcessorContext = {
|
|
|
1697
1697
|
signal?: AbortSignal;
|
|
1698
1698
|
};
|
|
1699
1699
|
/**
|
|
1700
|
-
* Returns messages to
|
|
1700
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
1701
1701
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
1702
1702
|
* so a failing pre-processor does not abort the LLM request.
|
|
1703
1703
|
*/
|
|
@@ -2458,7 +2458,7 @@ type RunToolLoopOptions = {
|
|
|
2458
2458
|
* the first LLM request. Each pre-processor receives the prompt text
|
|
2459
2459
|
* and a shared embedding (computed once per request) and may return
|
|
2460
2460
|
* additional messages to enrich the conversation. Messages returned by
|
|
2461
|
-
* each pre-processor are
|
|
2461
|
+
* each pre-processor are inserted in array order before the latest user message for the
|
|
2462
2462
|
* initial LLM call and all subsequent tool-loop rounds.
|
|
2463
2463
|
*
|
|
2464
2464
|
* Pre-processors run in parallel; a failure in one is logged and does
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1697,7 +1697,7 @@ type PromptPreProcessorContext = {
|
|
|
1697
1697
|
signal?: AbortSignal;
|
|
1698
1698
|
};
|
|
1699
1699
|
/**
|
|
1700
|
-
* Returns messages to
|
|
1700
|
+
* Returns context messages to insert before the latest user message, or nothing to leave
|
|
1701
1701
|
* the conversation unchanged. Thrown errors are caught by the tool loop
|
|
1702
1702
|
* so a failing pre-processor does not abort the LLM request.
|
|
1703
1703
|
*/
|
|
@@ -2458,7 +2458,7 @@ type RunToolLoopOptions = {
|
|
|
2458
2458
|
* the first LLM request. Each pre-processor receives the prompt text
|
|
2459
2459
|
* and a shared embedding (computed once per request) and may return
|
|
2460
2460
|
* additional messages to enrich the conversation. Messages returned by
|
|
2461
|
-
* each pre-processor are
|
|
2461
|
+
* each pre-processor are inserted in array order before the latest user message for the
|
|
2462
2462
|
* initial LLM call and all subsequent tool-loop rounds.
|
|
2463
2463
|
*
|
|
2464
2464
|
* Pre-processors run in parallel; a failure in one is logged and does
|
package/dist/server/index.mjs
CHANGED
|
@@ -36207,7 +36207,13 @@ async function runToolLoop(options) {
|
|
|
36207
36207
|
);
|
|
36208
36208
|
const extra = results.flatMap((r) => Array.isArray(r) ? r : []);
|
|
36209
36209
|
if (extra.length > 0) {
|
|
36210
|
-
|
|
36210
|
+
let userIndex = messages.length - 1;
|
|
36211
|
+
while (userIndex > 0 && messages[userIndex].role !== "user") userIndex--;
|
|
36212
|
+
messages = [
|
|
36213
|
+
...messages.slice(0, userIndex),
|
|
36214
|
+
...await redactBatch(extra),
|
|
36215
|
+
...messages.slice(userIndex)
|
|
36216
|
+
];
|
|
36211
36217
|
}
|
|
36212
36218
|
}
|
|
36213
36219
|
} catch (err) {
|