@termhub/agent 0.7.0 → 0.7.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/cli.js +7 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1337,7 +1337,8 @@ async function uninstall(params, home = os3.homedir()) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
|
|
1339
1339
|
// ../../packages/claude-cli/dist/index.js
|
|
1340
|
-
var
|
|
1340
|
+
var CONCIERGE_TOOLS = "Agent";
|
|
1341
|
+
var DISALLOWED_TOOLS = "Bash,PowerShell,Monitor,Read,Write,Edit,NotebookEdit,Glob,Grep,EnterWorktree,WebFetch,WebSearch,RemoteTrigger";
|
|
1341
1342
|
var BACKGROUND_AGENT_HOOK = `input=$(cat); case "$input" in *'"agent_id"'*) exit 0;; esac; printf '%s' "$input" | grep -Eq '"run_in_background"[[:space:]]*:[[:space:]]*true' && exit 0; echo 'No chat do termhub todo subagente roda em segundo plano: repita esta chamada do Agent com run_in_background: true.' >&2; exit 2`;
|
|
1342
1343
|
var CONCIERGE_SETTINGS = JSON.stringify({
|
|
1343
1344
|
hooks: { PreToolUse: [{ matcher: "Agent|Task", hooks: [{ type: "command", command: BACKGROUND_AGENT_HOOK }] }] }
|
|
@@ -1364,6 +1365,8 @@ function buildClaudeArgs(spec) {
|
|
|
1364
1365
|
"mcp__termhub__*",
|
|
1365
1366
|
"--disallowed-tools",
|
|
1366
1367
|
DISALLOWED_TOOLS,
|
|
1368
|
+
"--tools",
|
|
1369
|
+
CONCIERGE_TOOLS,
|
|
1367
1370
|
...spec.stream_input ? ["--input-format", "stream-json", "--replay-user-messages", "--settings", CONCIERGE_SETTINGS] : [],
|
|
1368
1371
|
...spec.model ? ["--model", spec.model] : [],
|
|
1369
1372
|
// Last, and only when set: the account-wide chat's argv stays exactly what it was. It is our own
|
|
@@ -1380,6 +1383,8 @@ function classifyFailure(stderr) {
|
|
|
1380
1383
|
return "missing_session";
|
|
1381
1384
|
if (/^Error: --/m.test(stderr))
|
|
1382
1385
|
return "cli_rejected";
|
|
1386
|
+
if (/^error: unknown option/m.test(stderr))
|
|
1387
|
+
return "cli_rejected";
|
|
1383
1388
|
return "run_failed";
|
|
1384
1389
|
}
|
|
1385
1390
|
|
|
@@ -2431,7 +2436,7 @@ async function status3() {
|
|
|
2431
2436
|
}
|
|
2432
2437
|
|
|
2433
2438
|
// src/version.ts
|
|
2434
|
-
var AGENT_VERSION = "0.7.
|
|
2439
|
+
var AGENT_VERSION = "0.7.1";
|
|
2435
2440
|
|
|
2436
2441
|
// src/rpc/update.ts
|
|
2437
2442
|
var PACKAGE = "@termhub/agent";
|
package/package.json
CHANGED