@vicary/pi-subagents 0.89.1 → 0.89.2
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/CHANGELOG.md +20 -0
- package/bundle/child-tool-plan.js +1 -1
- package/bundle/{chunk-C22YEYFZ.js → chunk-464OJSDP.js} +2 -2
- package/bundle/{chunk-YLU5JFW2.js → chunk-4KQW5R6U.js} +1 -1
- package/bundle/{chunk-WMGQNIP7.js → chunk-4X3T5CPK.js} +6 -6
- package/bundle/{chunk-UNLGCAC4.js → chunk-62OHSCQ6.js} +62 -10
- package/bundle/{chunk-7J4ZXMY7.js → chunk-72334PEI.js} +6 -4
- package/bundle/{chunk-R3NH5XAL.js → chunk-AHGJSJYY.js} +3 -2
- package/bundle/{chunk-TRN65L4F.js → chunk-DGLXVN3F.js} +1 -1
- package/bundle/{chunk-KCDPTXHT.js → chunk-DHY5TY2Y.js} +235 -197
- package/bundle/{chunk-JLZFSOEL.js → chunk-DNDNLHTL.js} +7 -7
- package/bundle/{chunk-MIX3MCIF.js → chunk-FF5K5HQU.js} +8 -3
- package/bundle/{chunk-URKQZHVH.js → chunk-FO2GIU5F.js} +23 -14
- package/bundle/{chunk-OUM6SEVD.js → chunk-JEYG7CNC.js} +6 -2
- package/bundle/{chunk-R5XS4CVE.js → chunk-LODNNILA.js} +15 -15
- package/bundle/{chunk-BERAWSQQ.js → chunk-RHKIP45B.js} +4 -4
- package/bundle/{chunk-4FFKVLBG.js → chunk-SRCMJY4F.js} +3 -3
- package/bundle/{chunk-SG3NCWZW.js → chunk-U753SUBC.js} +1 -1
- package/bundle/{chunk-NLDROUCR.js → chunk-V4543APA.js} +24 -15
- package/bundle/{chunk-DVOXHOTY.js → chunk-W7NDPDDJ.js} +3 -3
- package/bundle/index.js +1 -1
- package/bundle/preflight.js +7 -5
- package/bundle/project-panes.js +2 -2
- package/docs/observability.md +3 -1
- package/docs/watchdog.md +3 -2
- package/package.json +2 -2
- package/src/api/preflight.d.ts +1 -0
- package/src/api/preflight.js +2 -1
- package/src/inspectors/herdr/project-panes.d.ts +2 -0
- package/src/inspectors/herdr/project-panes.js +7 -1
- package/src/inspectors/shell-command.d.ts +2 -1
- package/src/inspectors/shell-command.js +7 -5
- package/src/runs/background/active-async-capacity.js +2 -1
- package/src/runs/background/active-run-index.d.ts +1 -0
- package/src/runs/background/active-run-index.js +3 -0
- package/src/runs/background/async-execution.d.ts +2 -0
- package/src/runs/background/async-execution.js +3 -2
- package/src/runs/background/process-terminal.d.ts +6 -0
- package/src/runs/background/process-terminal.js +34 -2
- package/src/runs/background/run-status.js +2 -1
- package/src/runs/background/stale-run-reconciler.d.ts +8 -0
- package/src/runs/background/stale-run-reconciler.js +38 -8
- package/src/runs/background/workflow-terminal-proof.d.ts +0 -1
- package/src/runs/background/workflow-terminal-proof.js +4 -4
- package/src/runs/foreground/execution.js +2 -2
- package/src/runs/foreground/subagent-executor.d.ts +2 -0
- package/src/runs/foreground/subagent-executor.js +10 -1
- package/src/runs/shared/herdr-pane-host.js +10 -2
- package/src/runs/shared/mcp-config-sources.d.ts +1 -0
- package/src/runs/shared/mcp-config-sources.js +1 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.js +1 -0
- package/src/shared/types.d.ts +2 -0
- package/src/tui/fleet-transcript.js +21 -9
- package/src/watchdog/runtime.d.ts +4 -0
- package/src/watchdog/runtime.js +50 -12
- package/src/watchdog/turn-delta.d.ts +2 -0
- package/src/watchdog/turn-delta.js +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.89.2] - 2026-11-20
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- Subagents in a Herdr pane (`machine: "local"`) no longer fail to start, and Herdr project panes on Windows now work in Git Bash.
|
|
10
|
+
- In `/subagents-fleet`, expanded tool details show a `bash` call's whole command, including multiline scripts.
|
|
11
|
+
- A workflow child with a `label` is named by that label in its session name, terminal title and Fleet row.
|
|
12
|
+
- The child watchdog no longer tells you to undo work the supervisor approved.
|
|
13
|
+
- Subagents can use MCP servers configured with `"openUi": false`.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- A subagent placed in a Herdr pane (`machine: "local"`) no longer fails to start with `is not an active named agent`. Herdr holds a newly started agent as pending until something asks for its state, so retrying the first prompt alone never got through. pi-subagents now waits for the agent to be ready before it prompts again. Thanks to [@TheEdgeOfRage](https://github.com/TheEdgeOfRage) for #3312.
|
|
18
|
+
- On Windows, a Herdr project pane now starts Pi when the pane runs Git Bash or another POSIX shell. The launch command was always written for PowerShell, so a Git Bash pane failed with `syntax error near unexpected token '&'` and never started. Thanks to [@mystery4f](https://github.com/mystery4f) for #3306.
|
|
19
|
+
- In `/subagents-fleet`, expanding tool details (`x` or `Ctrl+O`) now shows a `bash` call's whole command, every line wrapped to the pane, while it runs and after it finishes. Before, a multiline script such as a heredoc was cut to one line. When the saved arguments were too large to keep in full, the expanded view shows what was saved and says it was truncated. Thanks to [@power22c](https://github.com/power22c) for the report (#3308).
|
|
20
|
+
- A subagent started from a workflow script with a short `label` (for example `runs.run("tests", { label: "Validate sanitizer tests", agent: "worker", task: "…" })`) is now named by that label: its session name and Pi terminal title read `worker: Validate sanitizer tests`, and its Fleet row reads `Validate sanitizer tests (worker)`. Before, only the workflow's own row used the label, and the subagent was named after the first words of its task, so several children of the same agent were hard to tell apart. Thanks to [@power22c](https://github.com/power22c) for the report (#3309).
|
|
21
|
+
- The child watchdog no longer warns that a change the supervisor approved was unauthorised. When a subagent asks its supervisor a question and follows the answer, the watchdog now always sees that question and answer, even in a long run whose earlier turns no longer fit in its review. Before, the answer could drop out, and the watchdog reported the instruction as missing and suggested undoing correct work. The watchdog is also told when earlier turns were left out, so it doesn't treat missing evidence as proof. Thanks to [@mannainsect](https://github.com/mannainsect) for the report (#3307).
|
|
22
|
+
- A subagent that lists `mcp:<server>` in its `tools` now starts when that server's MCP config sets `"openUi": false`. Before, it failed with `Unresolved MCP direct-tool selectors` even though the server was connected, because pi-mcp-adapter 7 counts that setting when it checks its cached tool list and pi-subagents did not (#3310). Thanks to [@carlesba](https://github.com/carlesba) for #3311.
|
|
23
|
+
- A workflow no longer waits forever when one of its background subagents finishes after the Pi that started it has exited, for example because Pi was restarted. Once the subagent's process is confirmed gone, the workflow treats it as finished. Thanks to [@tdslot](https://github.com/tdslot) for the report (#3304).
|
|
24
|
+
|
|
5
25
|
## [0.89.1] - 2026-11-18
|
|
6
26
|
|
|
7
27
|
### Highlights
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
summarizeContextModes,
|
|
13
13
|
utf8Tail,
|
|
14
14
|
workflowPreflightLaneForRuntimeKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U753SUBC.js";
|
|
16
16
|
import {
|
|
17
17
|
ownsRun
|
|
18
18
|
} from "./chunk-HXRB42AF.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
updateActiveRunIndex,
|
|
35
35
|
validateModelResponseAliases,
|
|
36
36
|
writeAsyncResultFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
38
38
|
import {
|
|
39
39
|
deliverStopRequest,
|
|
40
40
|
stopInboxClosedPath
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rewriteSubagentPrompt
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W7NDPDDJ.js";
|
|
4
4
|
import {
|
|
5
5
|
package_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DGLXVN3F.js";
|
|
7
7
|
import {
|
|
8
8
|
WATCHDOG_DIFF_TOOL_NAME,
|
|
9
9
|
captureWatchdogDiffBaseline,
|
|
10
10
|
createWatchdogDiffTool
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-62OHSCQ6.js";
|
|
12
|
+
import "./chunk-U753SUBC.js";
|
|
13
13
|
import "./chunk-VEEUXJDO.js";
|
|
14
14
|
import {
|
|
15
15
|
MODEL_ONLY_TOOL
|
|
@@ -18,13 +18,13 @@ import "./chunk-W2BZS6UC.js";
|
|
|
18
18
|
import {
|
|
19
19
|
appendAgentRefinementOverlay
|
|
20
20
|
} from "./chunk-Q4VH72JI.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-DHY5TY2Y.js";
|
|
22
22
|
import "./chunk-NIXWDZZV.js";
|
|
23
23
|
import "./chunk-YJIU5WF4.js";
|
|
24
24
|
import "./chunk-7F6RKT6W.js";
|
|
25
25
|
import {
|
|
26
26
|
assertNoToolModifierEntries
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AHGJSJYY.js";
|
|
28
28
|
import "./chunk-YARY7JWU.js";
|
|
29
29
|
import "./chunk-77VQEATI.js";
|
|
30
30
|
import {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
projectTimeoutRecovery,
|
|
9
9
|
readAsyncRecoveryDescriptor,
|
|
10
10
|
utf8Tail
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U753SUBC.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_ARGS_BYTES,
|
|
14
14
|
MAX_ARGS_DEPTH,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
resultFilePath,
|
|
22
22
|
resultPayloadMatchesSessionRun,
|
|
23
23
|
resultPayloadPathForSessionRun
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
25
25
|
import {
|
|
26
26
|
PROJECT_SUBAGENTS_RELATIVE_DIR
|
|
27
27
|
} from "./chunk-77VQEATI.js";
|
|
@@ -3364,12 +3364,30 @@ function formatWatchdogOrchestrationActivity(event) {
|
|
|
3364
3364
|
}
|
|
3365
3365
|
return sections.join("\n\n");
|
|
3366
3366
|
}
|
|
3367
|
+
function formatWatchdogSupervisorReplies(event) {
|
|
3368
|
+
const turn = event;
|
|
3369
|
+
if (turn?.type !== "turn_end" || !Array.isArray(turn.message?.content) || !Array.isArray(turn.toolResults)) return [];
|
|
3370
|
+
const entries = [];
|
|
3371
|
+
for (const call of turn.message.content) {
|
|
3372
|
+
if (call?.type !== "toolCall" || call.name !== "contact_supervisor" || typeof call.id !== "string") continue;
|
|
3373
|
+
const args2 = call.arguments;
|
|
3374
|
+
if (!args2 || typeof args2 !== "object" || !["need_decision", "interview_request"].includes(args2.reason)) continue;
|
|
3375
|
+
const result2 = turn.toolResults.find((value) => {
|
|
3376
|
+
const result3 = value;
|
|
3377
|
+
return result3?.role === "toolResult" && result3.toolCallId === call.id && result3.toolName === call.name && result3.isError !== true && !result3.error;
|
|
3378
|
+
});
|
|
3379
|
+
if (result2) entries.push([formatToolCall(call.name, args2), formatWatchdogReviewMessage(result2) ?? ""].join("\n\n"));
|
|
3380
|
+
}
|
|
3381
|
+
return entries;
|
|
3382
|
+
}
|
|
3367
3383
|
|
|
3368
3384
|
// src/watchdog/runtime.ts
|
|
3369
3385
|
var DEFAULT_REVIEW = () => ({ warnings: [] });
|
|
3370
3386
|
var MAX_REVIEW_INPUT_CHARS = 24e3;
|
|
3371
3387
|
var REVIEW_INPUT_HEAD_CHARS = 6e3;
|
|
3372
3388
|
var REVIEW_DELTA_SEPARATOR = "\n\n---\n\n";
|
|
3389
|
+
var MAX_SUPERVISOR_REPLY_CHARS = 3e3;
|
|
3390
|
+
var MAX_SUPERVISOR_REPLIES_CHARS = 6e3;
|
|
3373
3391
|
function boundWatchdogReviewText(text, cap = MAX_REVIEW_INPUT_CHARS) {
|
|
3374
3392
|
if (text.length <= cap) return text;
|
|
3375
3393
|
const head = Math.min(REVIEW_INPUT_HEAD_CHARS, Math.floor(cap / 4));
|
|
@@ -3380,6 +3398,11 @@ function boundWatchdogReviewText(text, cap = MAX_REVIEW_INPUT_CHARS) {
|
|
|
3380
3398
|
`;
|
|
3381
3399
|
return `${text.slice(0, head)}${marker}${text.slice(text.length - (cap - head - marker.length))}`;
|
|
3382
3400
|
}
|
|
3401
|
+
function omittedDeltaNote(chars) {
|
|
3402
|
+
return `[Parts of this run's turn delta omitted: about ${chars} characters are not shown, to fit the review input limit. Do not report an instruction, authorization, or action as absent unless the supplied evidence shows it; it may be in an omitted part.]`;
|
|
3403
|
+
}
|
|
3404
|
+
var OMITTED_NOTE_RESERVE = omittedDeltaNote(Number.MAX_SAFE_INTEGER).length + 2;
|
|
3405
|
+
var MAX_RETAINED_DELTA_CHARS = MAX_REVIEW_INPUT_CHARS - OMITTED_NOTE_RESERVE;
|
|
3383
3406
|
function errorMessage2(error) {
|
|
3384
3407
|
return error instanceof Error ? error.message : String(error);
|
|
3385
3408
|
}
|
|
@@ -3411,6 +3434,7 @@ var MainWatchdogRuntime = class {
|
|
|
3411
3434
|
status = "idle";
|
|
3412
3435
|
pendingDeltas = [];
|
|
3413
3436
|
pendingDeltaChars = 0;
|
|
3437
|
+
omittedDeltaChars = 0;
|
|
3414
3438
|
guard = new WatchdogEmissionGuard();
|
|
3415
3439
|
guardMaxWarnings = null;
|
|
3416
3440
|
epoch = 0;
|
|
@@ -3449,6 +3473,7 @@ var MainWatchdogRuntime = class {
|
|
|
3449
3473
|
activityTail = "";
|
|
3450
3474
|
activityPending = false;
|
|
3451
3475
|
activityReviewUsed = false;
|
|
3476
|
+
supervisorReplies = [];
|
|
3452
3477
|
constructor(options = {}) {
|
|
3453
3478
|
this.cwd = options.cwd ?? process.cwd();
|
|
3454
3479
|
this.resolveConfig = options.resolveConfig ?? resolveWatchdogConfig;
|
|
@@ -3551,7 +3576,10 @@ var MainWatchdogRuntime = class {
|
|
|
3551
3576
|
this.lspLedger.reset();
|
|
3552
3577
|
this.lastLspSnapshot = void 0;
|
|
3553
3578
|
}
|
|
3554
|
-
if (options.clearScope)
|
|
3579
|
+
if (options.clearScope) {
|
|
3580
|
+
this.scope.reset();
|
|
3581
|
+
this.supervisorReplies = [];
|
|
3582
|
+
}
|
|
3555
3583
|
if (options.clearScope || options.clearActivity) this.clearActivity();
|
|
3556
3584
|
if (options.clearReviewInputSignature) this.lastReviewInputSignature = void 0;
|
|
3557
3585
|
if (options.resetChangeSignature) this.resetRepoChangeBaseline({ reviewed: true });
|
|
@@ -3575,6 +3603,7 @@ var MainWatchdogRuntime = class {
|
|
|
3575
3603
|
this.lastLspSnapshot = void 0;
|
|
3576
3604
|
this.lspLedger.reset();
|
|
3577
3605
|
this.scope.reset();
|
|
3606
|
+
this.supervisorReplies = [];
|
|
3578
3607
|
this.observedRepoEditThisTurn = false;
|
|
3579
3608
|
this.toolResultsThisRun = 0;
|
|
3580
3609
|
this.midRunReviewing = false;
|
|
@@ -3609,6 +3638,7 @@ var MainWatchdogRuntime = class {
|
|
|
3609
3638
|
this.activityPending = true;
|
|
3610
3639
|
}
|
|
3611
3640
|
}
|
|
3641
|
+
this.retainSupervisorReplies(event);
|
|
3612
3642
|
this.observedRepoEditThisTurn ||= eventIndicatesRepoEdit(event);
|
|
3613
3643
|
const delta = formatWatchdogTurnDelta({
|
|
3614
3644
|
includeUserPrompt: this.includeUserPromptInNextDelta,
|
|
@@ -4056,37 +4086,59 @@ var MainWatchdogRuntime = class {
|
|
|
4056
4086
|
appendBoundedDelta(delta) {
|
|
4057
4087
|
let entry = delta.trim();
|
|
4058
4088
|
if (!entry) return;
|
|
4059
|
-
if (entry.length >
|
|
4089
|
+
if (entry.length > MAX_RETAINED_DELTA_CHARS) {
|
|
4090
|
+
this.omittedDeltaChars += entry.length - MAX_RETAINED_DELTA_CHARS;
|
|
4091
|
+
entry = boundWatchdogReviewText(entry, MAX_RETAINED_DELTA_CHARS);
|
|
4092
|
+
}
|
|
4060
4093
|
this.pendingDeltas.push(entry);
|
|
4061
4094
|
this.pendingDeltaChars += entry.length;
|
|
4062
|
-
while (this.pendingDeltas.length > 1 && this.pendingDeltaChars + (this.pendingDeltas.length - 1) * REVIEW_DELTA_SEPARATOR.length >
|
|
4095
|
+
while (this.pendingDeltas.length > 1 && this.pendingDeltaChars + (this.pendingDeltas.length - 1) * REVIEW_DELTA_SEPARATOR.length > MAX_RETAINED_DELTA_CHARS) {
|
|
4063
4096
|
const removed = this.pendingDeltas.shift();
|
|
4064
|
-
if (removed)
|
|
4097
|
+
if (removed) {
|
|
4098
|
+
this.pendingDeltaChars -= removed.length;
|
|
4099
|
+
this.omittedDeltaChars += removed.length;
|
|
4100
|
+
}
|
|
4065
4101
|
}
|
|
4066
4102
|
}
|
|
4103
|
+
// Kept outside the rolling delta so a long run cannot push the supervisor's instruction out of the review input.
|
|
4104
|
+
retainSupervisorReplies(event) {
|
|
4105
|
+
for (const reply of formatWatchdogSupervisorReplies(event)) this.supervisorReplies.push(boundWatchdogReviewText(reply, MAX_SUPERVISOR_REPLY_CHARS));
|
|
4106
|
+
let total = this.supervisorReplies.reduce((sum, reply) => sum + reply.length, 0);
|
|
4107
|
+
while (this.supervisorReplies.length > 1 && total > MAX_SUPERVISOR_REPLIES_CHARS) total -= this.supervisorReplies.shift().length;
|
|
4108
|
+
}
|
|
4067
4109
|
buildReviewInput(changeSignature, lspBlock = "") {
|
|
4068
4110
|
const input = this.pendingDeltas.join(REVIEW_DELTA_SEPARATOR);
|
|
4069
4111
|
const scopeBlock = this.scopeBlock();
|
|
4070
4112
|
const changes = changeSignature?.changedPaths.length ? ["Changed repo paths: every dirty path in the working tree. Authorship is not verified; a path may predate this session or come from another session.", ...changeSignature.changedPaths.slice(0, 200).map((file) => `- ${file}`)].join("\n") : "";
|
|
4071
4113
|
const activity = this.activityTail ? `Recent delivered orchestration activity (oldest first; bounded observations, not a task board; waits/holds are not evidence of neglect):
|
|
4072
4114
|
${this.activityTail}` : "";
|
|
4115
|
+
const supervisor = this.configResult.config.scope.enabled && this.supervisorReplies.length ? `Supervisor replies this agent received through contact_supervisor (oldest first; the orchestrator's answers to this agent's questions, which can authorize or redirect its work):
|
|
4116
|
+
${this.supervisorReplies.join(REVIEW_DELTA_SEPARATOR)}` : "";
|
|
4073
4117
|
const contextPieces = [scopeBlock, changes, lspBlock, activity].filter(Boolean);
|
|
4074
|
-
if (!contextPieces.length) return
|
|
4118
|
+
if (!contextPieces.length && !supervisor) return this.boundDeltaInput(input, MAX_REVIEW_INPUT_CHARS);
|
|
4075
4119
|
const maxContextLength = Math.floor(MAX_REVIEW_INPUT_CHARS / 2);
|
|
4076
4120
|
const maxPieceLength = Math.max(1e3, Math.floor(maxContextLength / contextPieces.length));
|
|
4077
|
-
const boundedContext = contextPieces.map((piece) => piece.length > maxPieceLength ? piece === activity ? boundWatchdogReviewText(piece, maxPieceLength) : `${piece.slice(0, maxPieceLength - 6)}
|
|
4078
|
-
- ...` : piece).join(REVIEW_DELTA_SEPARATOR);
|
|
4121
|
+
const boundedContext = [...contextPieces.map((piece) => piece.length > maxPieceLength ? piece === activity ? boundWatchdogReviewText(piece, maxPieceLength) : `${piece.slice(0, maxPieceLength - 6)}
|
|
4122
|
+
- ...` : piece), supervisor].filter(Boolean).join(REVIEW_DELTA_SEPARATOR);
|
|
4079
4123
|
const separatorLength = input ? REVIEW_DELTA_SEPARATOR.length : 0;
|
|
4080
4124
|
const inputBudget = MAX_REVIEW_INPUT_CHARS - boundedContext.length - separatorLength;
|
|
4081
|
-
const boundedInput = inputBudget <= 0 ? "" :
|
|
4125
|
+
const boundedInput = inputBudget <= 0 ? "" : this.boundDeltaInput(input, inputBudget);
|
|
4082
4126
|
return [boundedContext, boundedInput].filter(Boolean).join(REVIEW_DELTA_SEPARATOR);
|
|
4083
4127
|
}
|
|
4128
|
+
boundDeltaInput(input, cap) {
|
|
4129
|
+
if (!input || this.omittedDeltaChars === 0 && input.length <= cap) return input;
|
|
4130
|
+
const bodyCap = cap - OMITTED_NOTE_RESERVE;
|
|
4131
|
+
return `${omittedDeltaNote(this.omittedDeltaChars + Math.max(0, input.length - bodyCap))}
|
|
4132
|
+
|
|
4133
|
+
${boundWatchdogReviewText(input, bodyCap)}`;
|
|
4134
|
+
}
|
|
4084
4135
|
scopeBlock() {
|
|
4085
4136
|
return this.configResult.config.scope.enabled ? this.scope.render() : "";
|
|
4086
4137
|
}
|
|
4087
4138
|
clearPendingDeltas() {
|
|
4088
4139
|
this.pendingDeltas = [];
|
|
4089
4140
|
this.pendingDeltaChars = 0;
|
|
4141
|
+
this.omittedDeltaChars = 0;
|
|
4090
4142
|
}
|
|
4091
4143
|
clearActivity() {
|
|
4092
4144
|
if (!this.activityTail) return;
|
|
@@ -6,10 +6,12 @@ function shellQuote(value, platform) {
|
|
|
6
6
|
function isBareExecutable(value) {
|
|
7
7
|
return /^[\w./@:-]+$/.test(value);
|
|
8
8
|
}
|
|
9
|
-
function formatShellCommand(exe, args, platform = process.platform) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
9
|
+
function formatShellCommand(exe, args, platform = process.platform, flavor = "auto") {
|
|
10
|
+
const posix = flavor === "posix" || flavor === "auto" && platform !== "win32";
|
|
11
|
+
const quotePlatform = posix ? "linux" : platform;
|
|
12
|
+
const quotedArgs = args.map((arg) => shellQuote(arg, quotePlatform));
|
|
13
|
+
if (!posix) return `& ${[shellQuote(exe, quotePlatform), ...quotedArgs].join(" ")}`;
|
|
14
|
+
const invocation = isBareExecutable(exe) ? exe : `sh -c 'exec "$0" "$@"' ${shellQuote(exe, quotePlatform)}`;
|
|
13
15
|
return [invocation, ...quotedArgs].join(" ");
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -51,7 +51,7 @@ function isMcpServerDefinition(value) {
|
|
|
51
51
|
for (const field of ["env", "headers"]) {
|
|
52
52
|
if (value[field] !== void 0 && !isStringRecord(value[field])) return false;
|
|
53
53
|
}
|
|
54
|
-
for (const field of ["exposeResources", "literalEnv", "inheritEnv"]) {
|
|
54
|
+
for (const field of ["exposeResources", "literalEnv", "inheritEnv", "openUi"]) {
|
|
55
55
|
if (value[field] !== void 0 && typeof value[field] !== "boolean") return false;
|
|
56
56
|
}
|
|
57
57
|
if (value.requestHeadersCommand !== void 0 && !isRequestHeadersCommand(value.requestHeadersCommand)) return false;
|
|
@@ -802,7 +802,8 @@ function computeMcpServerHash(definition) {
|
|
|
802
802
|
exposeResources: definition.exposeResources,
|
|
803
803
|
includeTools: definition.includeTools,
|
|
804
804
|
excludeTools: definition.excludeTools,
|
|
805
|
-
protocolVersion: definition.protocolVersion
|
|
805
|
+
protocolVersion: definition.protocolVersion,
|
|
806
|
+
...definition.openUi === false ? { openUi: false } : {}
|
|
806
807
|
};
|
|
807
808
|
return createHash("sha256").update(stableStringify(identity)).digest("hex");
|
|
808
809
|
}
|