@t2000/engine 0.46.14 → 0.46.16
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/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4436,7 +4436,7 @@ function resolvePermissionTier(operation, amountUsd, config, sessionSpendUsd, se
|
|
|
4436
4436
|
if (tier === "auto" && typeof sessionSpendUsd === "number" && sessionSpendUsd + amountUsd > config.autonomousDailyLimit) {
|
|
4437
4437
|
tier = "confirm";
|
|
4438
4438
|
}
|
|
4439
|
-
if (tier === "auto" && operation === "send" && sendContext?.to && !isKnownContactAddress(sendContext.to, sendContext.contacts ?? [])) {
|
|
4439
|
+
if (tier === "auto" && operation === "send" && sendContext?.to && sendContext.to.startsWith("0x") && !isKnownContactAddress(sendContext.to, sendContext.contacts ?? [])) {
|
|
4440
4440
|
tier = "confirm";
|
|
4441
4441
|
}
|
|
4442
4442
|
return tier;
|
|
@@ -4869,6 +4869,16 @@ var QueryEngine = class {
|
|
|
4869
4869
|
permissionConfig: this.permissionConfig,
|
|
4870
4870
|
sessionSpendUsd: this.sessionSpendUsd
|
|
4871
4871
|
};
|
|
4872
|
+
if (!signal.aborted) {
|
|
4873
|
+
await new Promise((resolve) => {
|
|
4874
|
+
const t = setTimeout(resolve, 1500);
|
|
4875
|
+
signal.addEventListener("abort", () => {
|
|
4876
|
+
clearTimeout(t);
|
|
4877
|
+
resolve();
|
|
4878
|
+
}, { once: true });
|
|
4879
|
+
});
|
|
4880
|
+
}
|
|
4881
|
+
if (signal.aborted) return;
|
|
4872
4882
|
const idStem = `pwr_${action.toolUseId.slice(-6)}`;
|
|
4873
4883
|
const refreshes = await Promise.all(
|
|
4874
4884
|
refreshTools.map(async (tool, idx) => {
|
|
@@ -5261,6 +5271,9 @@ ${recipeCtx}`;
|
|
|
5261
5271
|
const needsConfirmation = (() => {
|
|
5262
5272
|
if (!tool || tool.isReadOnly) return false;
|
|
5263
5273
|
if (tool.permissionLevel === "explicit") return true;
|
|
5274
|
+
if (tool.permissionLevel === "auto" && !toolNameToOperation(call.name)) {
|
|
5275
|
+
return false;
|
|
5276
|
+
}
|
|
5264
5277
|
if (!context.agent && !tool.isReadOnly) return true;
|
|
5265
5278
|
if (context.permissionConfig && context.priceCache) {
|
|
5266
5279
|
const operation = toolNameToOperation(call.name);
|