@hasna/assistants 0.6.46 → 0.6.48
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 +42 -5
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -115085,6 +115085,7 @@ class BashTool {
|
|
|
115085
115085
|
"env",
|
|
115086
115086
|
"printenv",
|
|
115087
115087
|
"echo",
|
|
115088
|
+
"curl",
|
|
115088
115089
|
"git status",
|
|
115089
115090
|
"git log",
|
|
115090
115091
|
"git diff",
|
|
@@ -115251,7 +115252,7 @@ class BashTool {
|
|
|
115251
115252
|
},
|
|
115252
115253
|
sessionId: input.sessionId || "unknown"
|
|
115253
115254
|
});
|
|
115254
|
-
throw new ToolExecutionError("Command not in allowed list. Permitted commands: cat, head, tail, ls, find, grep, wc, file, stat, pwd, which, echo, git status/log/diff/branch/show, connect-*", {
|
|
115255
|
+
throw new ToolExecutionError("Command not in allowed list. Permitted commands: cat, head, tail, ls, find, grep, wc, file, stat, pwd, which, echo, curl, git status/log/diff/branch/show, connect-*", {
|
|
115255
115256
|
toolName: "bash",
|
|
115256
115257
|
toolInput: input,
|
|
115257
115258
|
code: ErrorCodes.TOOL_PERMISSION_DENIED,
|
|
@@ -119993,7 +119994,7 @@ function formatAge(ms) {
|
|
|
119993
119994
|
return `${days}d`;
|
|
119994
119995
|
}
|
|
119995
119996
|
// packages/core/src/commands/builtin.ts
|
|
119996
|
-
var VERSION = "0.6.
|
|
119997
|
+
var VERSION = "0.6.48";
|
|
119997
119998
|
function resolveAuthTimeout(resolve5) {
|
|
119998
119999
|
resolve5({ exitCode: 1, stdout: { toString: () => "{}" } });
|
|
119999
120000
|
}
|
|
@@ -144067,7 +144068,41 @@ function formatStreamEvent(chunk) {
|
|
|
144067
144068
|
|
|
144068
144069
|
// packages/terminal/src/index.tsx
|
|
144069
144070
|
var jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
144070
|
-
var VERSION3 = "0.6.
|
|
144071
|
+
var VERSION3 = "0.6.48";
|
|
144072
|
+
var SYNC_START = "\x1B[?2026h";
|
|
144073
|
+
var SYNC_END = "\x1B[?2026l";
|
|
144074
|
+
function enableSynchronizedOutput() {
|
|
144075
|
+
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
144076
|
+
let buffer = "";
|
|
144077
|
+
let flushTimeout = null;
|
|
144078
|
+
const flush = () => {
|
|
144079
|
+
if (buffer) {
|
|
144080
|
+
originalWrite(SYNC_START + buffer + SYNC_END);
|
|
144081
|
+
buffer = "";
|
|
144082
|
+
}
|
|
144083
|
+
flushTimeout = null;
|
|
144084
|
+
};
|
|
144085
|
+
process.stdout.write = function(chunk, encodingOrCallback, callback) {
|
|
144086
|
+
const str = typeof chunk === "string" ? chunk : chunk.toString();
|
|
144087
|
+
buffer += str;
|
|
144088
|
+
if (flushTimeout) {
|
|
144089
|
+
clearTimeout(flushTimeout);
|
|
144090
|
+
}
|
|
144091
|
+
flushTimeout = setTimeout(flush, 0);
|
|
144092
|
+
const cb2 = typeof encodingOrCallback === "function" ? encodingOrCallback : callback;
|
|
144093
|
+
if (cb2) {
|
|
144094
|
+
setImmediate(() => cb2());
|
|
144095
|
+
}
|
|
144096
|
+
return true;
|
|
144097
|
+
};
|
|
144098
|
+
return () => {
|
|
144099
|
+
if (flushTimeout) {
|
|
144100
|
+
clearTimeout(flushTimeout);
|
|
144101
|
+
}
|
|
144102
|
+
flush();
|
|
144103
|
+
process.stdout.write = originalWrite;
|
|
144104
|
+
};
|
|
144105
|
+
}
|
|
144071
144106
|
function parseArgs(argv) {
|
|
144072
144107
|
const args = argv.slice(2);
|
|
144073
144108
|
const options = {
|
|
@@ -144213,15 +144248,17 @@ if (options.print !== null) {
|
|
|
144213
144248
|
process.exit(1);
|
|
144214
144249
|
});
|
|
144215
144250
|
} else {
|
|
144251
|
+
const disableSyncOutput = enableSynchronizedOutput();
|
|
144216
144252
|
const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(App2, {
|
|
144217
144253
|
cwd: options.cwd,
|
|
144218
144254
|
version: VERSION3
|
|
144219
144255
|
}, undefined, false, undefined, this), {
|
|
144220
|
-
|
|
144256
|
+
patchConsole: true
|
|
144221
144257
|
});
|
|
144222
144258
|
waitUntilExit().then(() => {
|
|
144259
|
+
disableSyncOutput();
|
|
144223
144260
|
process.exit(0);
|
|
144224
144261
|
});
|
|
144225
144262
|
}
|
|
144226
144263
|
|
|
144227
|
-
//# debugId=
|
|
144264
|
+
//# debugId=9A6D7C9FB46821D364756E2164756E21
|