@quantiya/codevibe-core 2.0.51 → 2.0.53
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/credential-broker/broker-config.d.ts +4 -4
- package/dist/credential-broker/canonical.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +464 -459
- package/dist/orchestration-shell/cli.js +402 -185
- package/dist/orchestration-shell/components/wizard-select.d.ts +8 -0
- package/dist/orchestration-shell/index.d.ts +1 -1
- package/dist/orchestration-shell/mode-selection.d.ts +11 -0
- package/dist/orchestration-shell/theme.d.ts +37 -0
- package/package.json +1 -1
|
@@ -8169,21 +8169,31 @@ function defaultDeps() {
|
|
|
8169
8169
|
promptUserForMode: defaultPromptUserForMode
|
|
8170
8170
|
};
|
|
8171
8171
|
}
|
|
8172
|
+
function shouldRenderPlain() {
|
|
8173
|
+
let noColor = process.env.NO_COLOR;
|
|
8174
|
+
return noColor !== void 0 && noColor !== "" || process.env.TERM === "dumb" || process.env.FORCE_COLOR === "0" || process.env.CODEVIBE_NO_TUI === "1" || !process.stdout?.isTTY;
|
|
8175
|
+
}
|
|
8172
8176
|
async function defaultPromptUserForMode(tier) {
|
|
8173
|
-
let rl = require("readline").createInterface({ input: process.stdin, output: process.stdout });
|
|
8177
|
+
let rl = require("readline").createInterface({ input: process.stdin, output: process.stdout }), plain = shouldRenderPlain();
|
|
8174
8178
|
try {
|
|
8175
|
-
for (process.stdout.write(`
|
|
8179
|
+
for (plain ? (process.stdout.write(`
|
|
8176
8180
|
CodeVibe \u2014 choose mode (${tier} tier):
|
|
8177
8181
|
`), process.stdout.write(` [1] Companion (route to local agent wrapper)
|
|
8178
8182
|
`), process.stdout.write(` [2] Orchestration (CodeVibe-owned shell)
|
|
8179
|
-
`)
|
|
8180
|
-
|
|
8181
|
-
|
|
8183
|
+
`)) : (process.stdout.write(`
|
|
8184
|
+
\x1B[1;35mCodeVibe\x1B[0m \x1B[2m\u2014 choose mode (\x1B[0m\x1B[36m${tier}\x1B[0m\x1B[2m tier):\x1B[0m
|
|
8185
|
+
`), process.stdout.write(` \x1B[36m[1]\x1B[0m \x1B[1mCompanion\x1B[0m \x1B[2m(route to local agent wrapper)\x1B[0m
|
|
8186
|
+
`), process.stdout.write(` \x1B[35m[2]\x1B[0m \x1B[1mOrchestration\x1B[0m \x1B[2m(CodeVibe-owned shell)\x1B[0m
|
|
8187
|
+
`)); ; ) {
|
|
8188
|
+
let promptStr = plain ? "Mode [1/2]: " : "\x1B[36mMode [1/2]: \x1B[0m", trimmed = (await new Promise((resolve23) => {
|
|
8189
|
+
rl.question(promptStr, resolve23);
|
|
8182
8190
|
})).trim();
|
|
8183
8191
|
if (trimmed === "1" || trimmed.toLowerCase() === "companion") return "companion";
|
|
8184
8192
|
if (trimmed === "2" || trimmed.toLowerCase() === "orchestration") return "orchestration";
|
|
8185
|
-
|
|
8186
|
-
`
|
|
8193
|
+
let retryStr = plain ? `Please type 1 or 2.
|
|
8194
|
+
` : `\x1B[33mPlease type 1 or 2.\x1B[0m
|
|
8195
|
+
`;
|
|
8196
|
+
process.stdout.write(retryStr);
|
|
8187
8197
|
}
|
|
8188
8198
|
} finally {
|
|
8189
8199
|
rl.close();
|
|
@@ -8191,7 +8201,7 @@ CodeVibe \u2014 choose mode (${tier} tier):
|
|
|
8191
8201
|
}
|
|
8192
8202
|
|
|
8193
8203
|
// src/orchestration-shell/index.ts
|
|
8194
|
-
var
|
|
8204
|
+
var React22 = __toESM(require("react")), path67 = __toESM(require("path")), os38 = __toESM(require("os")), import_promises = require("node:fs/promises"), import_node_fs27 = require("node:fs"), import_node_async_hooks = require("node:async_hooks"), import_uuid11 = require("uuid");
|
|
8195
8205
|
init_logger2();
|
|
8196
8206
|
|
|
8197
8207
|
// src/track-presentation.ts
|
|
@@ -10057,14 +10067,86 @@ function createOrchestrationStore(args) {
|
|
|
10057
10067
|
}
|
|
10058
10068
|
|
|
10059
10069
|
// src/orchestration-shell/components/OrchestrationApp.tsx
|
|
10060
|
-
var
|
|
10070
|
+
var React20 = __toESM(require("react"));
|
|
10061
10071
|
|
|
10062
10072
|
// src/orchestration-shell/components/CodeVibeLogo.tsx
|
|
10063
10073
|
var React = __toESM(require("react"));
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10074
|
+
|
|
10075
|
+
// src/orchestration-shell/theme.ts
|
|
10076
|
+
var THEME = {
|
|
10077
|
+
// Brand Accents
|
|
10078
|
+
brand: "#C026D3",
|
|
10079
|
+
// Magenta / Fuchsia (CodeVibe brand)
|
|
10080
|
+
brandLight: "#E879F9",
|
|
10081
|
+
// Light Fuchsia
|
|
10082
|
+
brandGlow: "#A855F7",
|
|
10083
|
+
// Violet Glow
|
|
10084
|
+
conductor: "#818CF8",
|
|
10085
|
+
// Indigo / Violet (Dual-Brain Conductor)
|
|
10086
|
+
conductorTag: "#A78BFA",
|
|
10087
|
+
// Violet Accent
|
|
10088
|
+
// Rival Model Family Brand Colors (matching 2.0 landing page)
|
|
10089
|
+
claude: "#E07A3D",
|
|
10090
|
+
// Anthropic Coral / Orange
|
|
10091
|
+
codex: "#22C55E",
|
|
10092
|
+
// OpenAI Emerald Green
|
|
10093
|
+
antigravity: "#5891F0",
|
|
10094
|
+
// Google DeepMind Blue
|
|
10095
|
+
gemini: "#4285F4",
|
|
10096
|
+
// Google Blue (legacy/fallback)
|
|
10097
|
+
// Status & Verdict Colors (ANSI named colors for automatic dark/light terminal adaptation)
|
|
10098
|
+
pass: "green",
|
|
10099
|
+
// Adaptive green
|
|
10100
|
+
revise: "yellow",
|
|
10101
|
+
// Adaptive amber / yellow
|
|
10102
|
+
block: "red",
|
|
10103
|
+
// Adaptive red
|
|
10104
|
+
pending: "cyan",
|
|
10105
|
+
// Adaptive cyan / sky blue
|
|
10106
|
+
running: "yellow",
|
|
10107
|
+
// Adaptive yellow
|
|
10108
|
+
// Semantic Action Accents (for Gate Prompts)
|
|
10109
|
+
actionApprove: "green",
|
|
10110
|
+
// Adaptive green
|
|
10111
|
+
actionInspect: "cyan",
|
|
10112
|
+
// Adaptive cyan
|
|
10113
|
+
actionReject: "red",
|
|
10114
|
+
// Adaptive red
|
|
10115
|
+
actionRestart: "yellow",
|
|
10116
|
+
// Adaptive yellow
|
|
10117
|
+
actionAbort: "red",
|
|
10118
|
+
// Adaptive red
|
|
10119
|
+
// Text & Neutral Tones
|
|
10120
|
+
textPrimary: void 0,
|
|
10121
|
+
textSecondary: void 0,
|
|
10122
|
+
textMuted: void 0,
|
|
10123
|
+
// Inherit terminal foreground
|
|
10124
|
+
textDim: void 0,
|
|
10125
|
+
// Rely on dimColor: true
|
|
10126
|
+
borderSubtle: "gray",
|
|
10127
|
+
// Adaptive slate
|
|
10128
|
+
borderAccent: "#C026D3"
|
|
10129
|
+
// CodeVibe Brand Magenta Border
|
|
10130
|
+
};
|
|
10131
|
+
function colorOrPlain(color) {
|
|
10132
|
+
if (!shouldRenderPlain())
|
|
10133
|
+
return color;
|
|
10134
|
+
}
|
|
10135
|
+
function getAgentBrandColor(agentKind) {
|
|
10136
|
+
if (shouldRenderPlain()) return;
|
|
10137
|
+
if (!agentKind) return THEME.conductor;
|
|
10138
|
+
let lower = agentKind.toLowerCase();
|
|
10139
|
+
return lower.includes("claude") ? THEME.claude : lower.includes("codex") ? THEME.codex : lower.includes("agy") || lower.includes("antigravity") ? THEME.antigravity : lower.includes("gemini") ? THEME.gemini : THEME.conductor;
|
|
10140
|
+
}
|
|
10141
|
+
function getVerdictStatusColor(status) {
|
|
10142
|
+
if (shouldRenderPlain()) return;
|
|
10143
|
+
if (!status) return "gray";
|
|
10144
|
+
let upper = status.toUpperCase();
|
|
10145
|
+
return upper === "PASS" || upper === "PASSED" || upper === "COMPLETE" || upper === "RESOLVED" ? THEME.pass : upper === "REVISE" || upper === "REVISING" || upper === "IN_REVIEW" || upper === "MERGE_GATE_PENDING" ? THEME.revise : upper === "BLOCK" || upper === "BLOCKED" || upper === "FAILED" || upper === "HALTED" ? THEME.block : upper === "RUNNING" || upper === "INFLIGHT" || upper === "PENDING" || upper === "QUEUED" ? THEME.running : "gray";
|
|
10067
10146
|
}
|
|
10147
|
+
|
|
10148
|
+
// src/orchestration-shell/components/CodeVibeLogo.tsx
|
|
10149
|
+
var TAGLINE = "multi-agent orchestration";
|
|
10068
10150
|
function CodeVibeLogo() {
|
|
10069
10151
|
let { ink } = getInkRuntime(), { Box, Text } = ink;
|
|
10070
10152
|
return shouldRenderPlain() ? React.createElement(
|
|
@@ -10077,10 +10159,14 @@ function CodeVibeLogo() {
|
|
|
10077
10159
|
{ flexDirection: "column", marginBottom: 1 },
|
|
10078
10160
|
React.createElement(
|
|
10079
10161
|
Text,
|
|
10080
|
-
{ color:
|
|
10162
|
+
{ color: colorOrPlain(THEME.brand), bold: !0 },
|
|
10081
10163
|
"CodeVibe"
|
|
10082
10164
|
),
|
|
10083
|
-
React.createElement(
|
|
10165
|
+
React.createElement(
|
|
10166
|
+
Text,
|
|
10167
|
+
{ dimColor: !0 },
|
|
10168
|
+
TAGLINE
|
|
10169
|
+
)
|
|
10084
10170
|
);
|
|
10085
10171
|
}
|
|
10086
10172
|
|
|
@@ -10090,37 +10176,49 @@ var React12 = __toESM(require("react"));
|
|
|
10090
10176
|
// src/orchestration-shell/components/nodes/UserMessageEntry.tsx
|
|
10091
10177
|
var React2 = __toESM(require("react"));
|
|
10092
10178
|
function UserMessageEntry(props) {
|
|
10093
|
-
let { ink } = getInkRuntime(), { Box, Text } = ink;
|
|
10179
|
+
let { ink } = getInkRuntime(), { Box, Text } = ink, isCommand = props.entry.text.startsWith("/") || props.entry.text.startsWith("@");
|
|
10094
10180
|
return React2.createElement(
|
|
10095
10181
|
Box,
|
|
10096
10182
|
{ flexDirection: "row" },
|
|
10097
|
-
React2.createElement(Text, { color: "
|
|
10098
|
-
React2.createElement(
|
|
10183
|
+
React2.createElement(Text, { color: colorOrPlain("magenta"), bold: !0 }, "> "),
|
|
10184
|
+
React2.createElement(
|
|
10185
|
+
Text,
|
|
10186
|
+
{ color: colorOrPlain(isCommand ? "cyan" : void 0), bold: !0 },
|
|
10187
|
+
props.entry.text
|
|
10188
|
+
)
|
|
10099
10189
|
);
|
|
10100
10190
|
}
|
|
10101
10191
|
|
|
10102
10192
|
// src/orchestration-shell/components/nodes/PlannerDecisionEntry.tsx
|
|
10103
10193
|
var React3 = __toESM(require("react"));
|
|
10104
10194
|
function PlannerDecisionEntry(props) {
|
|
10105
|
-
let { ink } = getInkRuntime(), { Box, Text } = ink
|
|
10195
|
+
let { ink } = getInkRuntime(), { Box, Text } = ink, rawRationale = typeof props.entry.rationale == "string" ? props.entry.rationale : JSON.stringify(props.entry.rationale), cleanRationale = rawRationale ? sanitizeForTerminal(rawRationale).trim() : "", actionLabel = props.entry.action === "team_decompose" ? "Decomposing task into parallel tracks" : props.entry.action === "start_task" ? "Direct task implementation" : props.entry.action === "brainstorm" ? "Architectural brainstorm" : `Classified: ${props.entry.action}`;
|
|
10106
10196
|
return React3.createElement(
|
|
10107
10197
|
Box,
|
|
10108
10198
|
{ flexDirection: "column" },
|
|
10109
10199
|
React3.createElement(
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
React3.createElement(
|
|
10113
|
-
|
|
10200
|
+
Box,
|
|
10201
|
+
{ flexDirection: "row" },
|
|
10202
|
+
React3.createElement(
|
|
10203
|
+
Text,
|
|
10204
|
+
{ color: colorOrPlain("cyan"), bold: !0 },
|
|
10205
|
+
"[Conductor \xB7 Gemma] "
|
|
10206
|
+
),
|
|
10207
|
+
React3.createElement(
|
|
10208
|
+
Text,
|
|
10209
|
+
{ bold: !0 },
|
|
10210
|
+
actionLabel
|
|
10211
|
+
)
|
|
10114
10212
|
),
|
|
10115
|
-
React3.createElement(
|
|
10213
|
+
cleanRationale ? React3.createElement(
|
|
10116
10214
|
Box,
|
|
10117
10215
|
{ marginLeft: 2 },
|
|
10118
10216
|
React3.createElement(
|
|
10119
10217
|
Text,
|
|
10120
|
-
{ dimColor: !0 },
|
|
10121
|
-
|
|
10218
|
+
{ dimColor: !0, italic: !0 },
|
|
10219
|
+
cleanRationale
|
|
10122
10220
|
)
|
|
10123
|
-
)
|
|
10221
|
+
) : null
|
|
10124
10222
|
);
|
|
10125
10223
|
}
|
|
10126
10224
|
|
|
@@ -10195,6 +10293,26 @@ function parseInteractivePrompt(payload) {
|
|
|
10195
10293
|
...typeof payload.instructions == "string" && payload.instructions.length > 0 ? { instructions: payload.instructions } : {}
|
|
10196
10294
|
}];
|
|
10197
10295
|
}
|
|
10296
|
+
function getEventVisual(kind) {
|
|
10297
|
+
switch (kind) {
|
|
10298
|
+
case "TOOL_USE":
|
|
10299
|
+
return { glyph: "\u26A1", color: "cyan" };
|
|
10300
|
+
case "FILE_CHANGE":
|
|
10301
|
+
return { glyph: "\u270E", color: "green" };
|
|
10302
|
+
case "VERIFICATION_RUN":
|
|
10303
|
+
return { glyph: "\u25B6", color: "cyan" };
|
|
10304
|
+
case "PROCESS_SPAWNED":
|
|
10305
|
+
return { glyph: "\u25B8", color: "gray" };
|
|
10306
|
+
case "PROCESS_EXITED":
|
|
10307
|
+
return { glyph: "\u25A0", color: "gray" };
|
|
10308
|
+
case "EXECUTOR_REFUSAL":
|
|
10309
|
+
return { glyph: "\u26A0", color: "red" };
|
|
10310
|
+
case "TASK_BYPASS":
|
|
10311
|
+
return { glyph: "\u21B7", color: "yellow" };
|
|
10312
|
+
default:
|
|
10313
|
+
return { glyph: "" };
|
|
10314
|
+
}
|
|
10315
|
+
}
|
|
10198
10316
|
function SubagentEventEntry(props) {
|
|
10199
10317
|
let { ink } = getInkRuntime(), { Box, Text } = ink, event = props.entry.event;
|
|
10200
10318
|
if (event.kind === "INTERACTIVE_PROMPT" && "payload" in event && event.payload && typeof event.payload == "object") {
|
|
@@ -10203,7 +10321,11 @@ function SubagentEventEntry(props) {
|
|
|
10203
10321
|
return React4.createElement(
|
|
10204
10322
|
Box,
|
|
10205
10323
|
{ marginLeft: 2, flexDirection: "column" },
|
|
10206
|
-
React4.createElement(
|
|
10324
|
+
React4.createElement(
|
|
10325
|
+
Text,
|
|
10326
|
+
{ color: colorOrPlain("cyan"), bold: !0 },
|
|
10327
|
+
"\u23BF interactive prompt"
|
|
10328
|
+
),
|
|
10207
10329
|
...questions.flatMap((question, questionIndex) => [
|
|
10208
10330
|
React4.createElement(
|
|
10209
10331
|
Text,
|
|
@@ -10227,11 +10349,12 @@ function SubagentEventEntry(props) {
|
|
|
10227
10349
|
])
|
|
10228
10350
|
);
|
|
10229
10351
|
}
|
|
10230
|
-
let summary = summarizeEvent(props.entry.event);
|
|
10352
|
+
let summary = summarizeEvent(props.entry.event), visual = getEventVisual(props.entry.event.kind);
|
|
10231
10353
|
return React4.createElement(
|
|
10232
10354
|
Box,
|
|
10233
|
-
{ marginLeft: 2 },
|
|
10355
|
+
{ marginLeft: 2, flexDirection: "row" },
|
|
10234
10356
|
React4.createElement(Text, { dimColor: !0 }, "\u23BF "),
|
|
10357
|
+
visual.glyph ? React4.createElement(Text, { color: colorOrPlain(visual.color) }, `${visual.glyph} `) : null,
|
|
10235
10358
|
React4.createElement(Text, null, summary)
|
|
10236
10359
|
);
|
|
10237
10360
|
}
|
|
@@ -10261,38 +10384,62 @@ function ReviewerQuorumStatusNode(props) {
|
|
|
10261
10384
|
React5.createElement(
|
|
10262
10385
|
Text,
|
|
10263
10386
|
null,
|
|
10264
|
-
React5.createElement(Text, { color: "magenta" }, "\u25CF "),
|
|
10265
|
-
|
|
10387
|
+
React5.createElement(Text, { color: colorOrPlain("magenta"), bold: !0 }, "\u25CF "),
|
|
10388
|
+
React5.createElement(
|
|
10389
|
+
Text,
|
|
10390
|
+
{ bold: !0 },
|
|
10391
|
+
`Reviewer quorum (${doneCount}/${total} done): `
|
|
10392
|
+
),
|
|
10393
|
+
React5.createElement(
|
|
10394
|
+
Text,
|
|
10395
|
+
{ color: getVerdictStatusColor(props.entry.quorumStatus), bold: !0 },
|
|
10396
|
+
props.entry.quorumStatus
|
|
10397
|
+
)
|
|
10266
10398
|
),
|
|
10267
|
-
...props.entry.seats.map(
|
|
10268
|
-
(seat)
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10399
|
+
...props.entry.seats.map((seat) => {
|
|
10400
|
+
let brandColor = colorOrPlain(getAgentBrandColor(seat.reviewerKind));
|
|
10401
|
+
return React5.createElement(
|
|
10402
|
+
Text,
|
|
10403
|
+
{ key: seat.seatId },
|
|
10404
|
+
React5.createElement(Text, { dimColor: !0 }, " \u23BF "),
|
|
10272
10405
|
React5.createElement(
|
|
10273
10406
|
Text,
|
|
10274
|
-
|
|
10275
|
-
`${displaySeatNumber(seat.seatId)}
|
|
10407
|
+
{ bold: !0 },
|
|
10408
|
+
`${displaySeatNumber(seat.seatId)} `
|
|
10276
10409
|
),
|
|
10277
|
-
React5.createElement(Text, { color:
|
|
10278
|
-
React5.createElement(
|
|
10279
|
-
|
|
10280
|
-
|
|
10410
|
+
brandColor ? React5.createElement(Text, { key: "dot", color: brandColor }, "\u25CF ") : null,
|
|
10411
|
+
React5.createElement(
|
|
10412
|
+
Text,
|
|
10413
|
+
{ bold: !0 },
|
|
10414
|
+
`${seat.reviewerKind.padEnd(7)} `
|
|
10415
|
+
),
|
|
10416
|
+
React5.createElement(
|
|
10417
|
+
Text,
|
|
10418
|
+
{ color: colorOrPlain(STATUS_COLOR[seat.status]), bold: !0 },
|
|
10419
|
+
`${STATUS_GLYPH[seat.status]} ${seat.status}`
|
|
10420
|
+
)
|
|
10421
|
+
);
|
|
10422
|
+
})
|
|
10281
10423
|
);
|
|
10282
10424
|
}
|
|
10283
10425
|
|
|
10284
10426
|
// src/orchestration-shell/components/nodes/GateStatusNode.tsx
|
|
10285
10427
|
var React6 = __toESM(require("react"));
|
|
10286
10428
|
function GateStatusNode(props) {
|
|
10287
|
-
let { ink } = getInkRuntime(), { Text } = ink, g = props.entry.gate;
|
|
10429
|
+
let { ink } = getInkRuntime(), { Text } = ink, g = props.entry.gate, statusColor = getVerdictStatusColor(g.status);
|
|
10288
10430
|
return React6.createElement(
|
|
10289
10431
|
Text,
|
|
10290
10432
|
null,
|
|
10291
|
-
React6.createElement(Text, { color: "magenta" }, "\u25CF "),
|
|
10433
|
+
React6.createElement(Text, { color: colorOrPlain("magenta"), bold: !0 }, "\u25CF "),
|
|
10434
|
+
React6.createElement(Text, { dimColor: !0 }, "Gate: "),
|
|
10435
|
+
React6.createElement(Text, { bold: !0 }, `${g.gateKind} `),
|
|
10436
|
+
React6.createElement(Text, { dimColor: !0 }, "Status: "),
|
|
10437
|
+
React6.createElement(Text, { color: statusColor, bold: !0 }, `${g.status} `),
|
|
10438
|
+
React6.createElement(Text, { dimColor: !0 }, "Auto-revise: "),
|
|
10292
10439
|
React6.createElement(
|
|
10293
10440
|
Text,
|
|
10294
|
-
|
|
10295
|
-
|
|
10441
|
+
{ color: colorOrPlain(g.autoReviseRound > 0 ? "yellow" : void 0), bold: !0 },
|
|
10442
|
+
`${g.autoReviseRound}/${g.autoReviseCap}`
|
|
10296
10443
|
)
|
|
10297
10444
|
);
|
|
10298
10445
|
}
|
|
@@ -10304,7 +10451,7 @@ function SlashOutputEntry(props) {
|
|
|
10304
10451
|
return React7.createElement(
|
|
10305
10452
|
Box,
|
|
10306
10453
|
{ flexDirection: "column" },
|
|
10307
|
-
React7.createElement(Text, { color: "cyan" }, props.entry.command),
|
|
10454
|
+
React7.createElement(Text, { color: colorOrPlain("cyan") }, props.entry.command),
|
|
10308
10455
|
React7.createElement(
|
|
10309
10456
|
Box,
|
|
10310
10457
|
{ marginLeft: 2 },
|
|
@@ -10316,7 +10463,7 @@ function SlashOutputEntry(props) {
|
|
|
10316
10463
|
// src/orchestration-shell/components/nodes/AdvisoryEntry.tsx
|
|
10317
10464
|
var React8 = __toESM(require("react"));
|
|
10318
10465
|
function AdvisoryEntry(props) {
|
|
10319
|
-
let { ink } = getInkRuntime(), { Text } = ink, color = props.entry.source === "planner" ? "magenta" : "yellow";
|
|
10466
|
+
let { ink } = getInkRuntime(), { Text } = ink, color = colorOrPlain(props.entry.source === "planner" ? "magenta" : "yellow");
|
|
10320
10467
|
return React8.createElement(
|
|
10321
10468
|
Text,
|
|
10322
10469
|
null,
|
|
@@ -10806,6 +10953,10 @@ function formatHaltReason2(reason) {
|
|
|
10806
10953
|
function formatPromptKind(promptKind) {
|
|
10807
10954
|
return promptKind === ORCHESTRATION_ESCALATED_GATE_PROMPT_KIND ? "Escalated review" : promptKind === ORCHESTRATION_FINAL_APPROVAL_PROMPT_KIND ? "Final approval" : promptKind === CONTINUATION_OFFER_HANDOFF_PROMPT_KIND ? "Continue with which agent?" : promptKind;
|
|
10808
10955
|
}
|
|
10956
|
+
function getOptionColor(label) {
|
|
10957
|
+
let lower = label.toLowerCase();
|
|
10958
|
+
return lower.startsWith("accept with") || lower.startsWith("approve with") ? "cyan" : lower.startsWith("accept") || lower.startsWith("approve") ? "green" : lower.startsWith("reject with") || lower.includes("revise") ? "yellow" : lower.startsWith("reject") || lower.startsWith("restart") || lower.startsWith("abort") || lower.startsWith("cancel") ? "red" : "cyan";
|
|
10959
|
+
}
|
|
10809
10960
|
function formatStatusLine(uiState) {
|
|
10810
10961
|
switch (uiState.phase) {
|
|
10811
10962
|
case "awaiting-number":
|
|
@@ -10828,7 +10979,7 @@ function formatStatusLine(uiState) {
|
|
|
10828
10979
|
};
|
|
10829
10980
|
default: {
|
|
10830
10981
|
let _exhaustive = uiState;
|
|
10831
|
-
return { text: ""
|
|
10982
|
+
return { text: "" };
|
|
10832
10983
|
}
|
|
10833
10984
|
}
|
|
10834
10985
|
}
|
|
@@ -10840,7 +10991,7 @@ function GatePromptEntry(props) {
|
|
|
10840
10991
|
let { ink } = getInkRuntime(), { Box, Text } = ink, { entry, trackLabel } = props, { envelope, uiState, queue } = entry, stdout = ink.useStdout().stdout, cols = stdout && typeof stdout.columns == "number" && stdout.columns || 80, haltReasonText = envelope.promptKind === ORCHESTRATION_ESCALATED_GATE_PROMPT_KIND ? formatHaltReason2(envelope.reason) : null, kindLabel = formatPromptKind(envelope.promptKind), status = props.gateActionRecoveryBlocked && uiState.phase !== "claimed" && uiState.phase !== "resolved" ? { text: "Gate actions unavailable while history reconnects", color: "yellow" } : formatStatusLine(uiState), isResolved = uiState.phase === "resolved", actionsRetired = props.gateActionRecoveryBlocked === !0 || uiState.phase === "claimed" || isResolved, headerChildren = [
|
|
10841
10992
|
React9.createElement(
|
|
10842
10993
|
Text,
|
|
10843
|
-
{ key: "badge", color: "
|
|
10994
|
+
{ key: "badge", color: colorOrPlain("cyan"), bold: !0 },
|
|
10844
10995
|
"[GATE] "
|
|
10845
10996
|
),
|
|
10846
10997
|
React9.createElement(Text, { key: "kind", bold: !0 }, kindLabel)
|
|
@@ -10856,7 +11007,7 @@ function GatePromptEntry(props) {
|
|
|
10856
11007
|
reason.length > 0 && headerChildren.push(
|
|
10857
11008
|
React9.createElement(
|
|
10858
11009
|
Text,
|
|
10859
|
-
{ key: "reason", color: "
|
|
11010
|
+
{ key: "reason", color: colorOrPlain("yellow"), bold: !0 },
|
|
10860
11011
|
` \u2014 ${reason}`
|
|
10861
11012
|
)
|
|
10862
11013
|
);
|
|
@@ -10874,15 +11025,15 @@ function GatePromptEntry(props) {
|
|
|
10874
11025
|
{ key: "status", marginLeft: 2, marginTop: 0 },
|
|
10875
11026
|
React9.createElement(
|
|
10876
11027
|
Text,
|
|
10877
|
-
{ color: status.color },
|
|
11028
|
+
{ color: colorOrPlain(status.color), bold: !0 },
|
|
10878
11029
|
status.text
|
|
10879
11030
|
)
|
|
10880
11031
|
)
|
|
10881
11032
|
), actionsRetired || envelope.options.forEach((option, idx) => {
|
|
10882
|
-
let lineNumber = idx + 1, prefixCols = `${lineNumber}. ${option.label} \u2014 `.length, desc = truncateEnd(option.description, cols - GATE_CARD_GUTTER - prefixCols), optionChildren = [
|
|
11033
|
+
let lineNumber = idx + 1, prefixCols = `${lineNumber}. ${option.label} \u2014 `.length, desc = truncateEnd(option.description, cols - GATE_CARD_GUTTER - prefixCols), optColor = getOptionColor(option.label), optionChildren = [
|
|
10883
11034
|
React9.createElement(
|
|
10884
11035
|
Text,
|
|
10885
|
-
{ key: "num", color:
|
|
11036
|
+
{ key: "num", color: colorOrPlain(optColor), bold: !0 },
|
|
10886
11037
|
`${lineNumber}. `
|
|
10887
11038
|
),
|
|
10888
11039
|
React9.createElement(Text, { key: "label", bold: !0 }, option.label)
|
|
@@ -10921,7 +11072,7 @@ function GatePromptEntry(props) {
|
|
|
10921
11072
|
{
|
|
10922
11073
|
flexDirection: "column",
|
|
10923
11074
|
borderStyle: "round",
|
|
10924
|
-
borderColor: isResolved ? "green" : "yellow",
|
|
11075
|
+
borderColor: colorOrPlain(isResolved ? "green" : "yellow"),
|
|
10925
11076
|
paddingX: 1
|
|
10926
11077
|
},
|
|
10927
11078
|
...children
|
|
@@ -10965,7 +11116,7 @@ function GateContextPanel(props) {
|
|
|
10965
11116
|
{ key: "headline", flexDirection: "row" },
|
|
10966
11117
|
React10.createElement(
|
|
10967
11118
|
Text,
|
|
10968
|
-
{ color: "cyan", bold: !0 },
|
|
11119
|
+
{ color: colorOrPlain("cyan"), bold: !0 },
|
|
10969
11120
|
"\u256D "
|
|
10970
11121
|
),
|
|
10971
11122
|
React10.createElement(Text, { bold: !0 }, model.headline)
|
|
@@ -10974,7 +11125,7 @@ function GateContextPanel(props) {
|
|
|
10974
11125
|
let reasonChildren = [
|
|
10975
11126
|
React10.createElement(
|
|
10976
11127
|
Text,
|
|
10977
|
-
{ key: "reason-label", color: "yellow" },
|
|
11128
|
+
{ key: "reason-label", color: colorOrPlain("yellow") },
|
|
10978
11129
|
model.reasonLabel
|
|
10979
11130
|
)
|
|
10980
11131
|
];
|
|
@@ -11057,7 +11208,7 @@ function GateContextPanel(props) {
|
|
|
11057
11208
|
{ key: "reviewers-header", marginLeft: 2 },
|
|
11058
11209
|
React10.createElement(
|
|
11059
11210
|
Text,
|
|
11060
|
-
{ bold: !0, color: "magenta" },
|
|
11211
|
+
{ bold: !0, color: colorOrPlain("magenta") },
|
|
11061
11212
|
"Reviewers:"
|
|
11062
11213
|
)
|
|
11063
11214
|
)
|
|
@@ -11125,7 +11276,7 @@ function renderReviewSummarySection(reviewSummary) {
|
|
|
11125
11276
|
{ key: "review-summary-header", marginLeft: 2, marginTop: 1 },
|
|
11126
11277
|
React10.createElement(
|
|
11127
11278
|
Text,
|
|
11128
|
-
{ bold: !0, color: "cyan" },
|
|
11279
|
+
{ bold: !0, color: colorOrPlain("cyan") },
|
|
11129
11280
|
"Review summary"
|
|
11130
11281
|
)
|
|
11131
11282
|
)
|
|
@@ -11357,7 +11508,7 @@ function renderReviewSummarySection(reviewSummary) {
|
|
|
11357
11508
|
{ key: `rs-round-${ridx}-revise`, marginLeft: 4 },
|
|
11358
11509
|
React10.createElement(
|
|
11359
11510
|
Text,
|
|
11360
|
-
{ color: "yellow" },
|
|
11511
|
+
{ color: colorOrPlain("yellow") },
|
|
11361
11512
|
`Revise notes: ${round.reviseNotes}`
|
|
11362
11513
|
)
|
|
11363
11514
|
)
|
|
@@ -11390,7 +11541,7 @@ function renderPromptVariant(envelope, taskLabel2) {
|
|
|
11390
11541
|
let headerChildren = [
|
|
11391
11542
|
React11.createElement(
|
|
11392
11543
|
Text,
|
|
11393
|
-
{ key: "badge", color: "magenta", bold: !0 },
|
|
11544
|
+
{ key: "badge", color: colorOrPlain("magenta"), bold: !0 },
|
|
11394
11545
|
"[GATE] "
|
|
11395
11546
|
),
|
|
11396
11547
|
React11.createElement(Text, { key: "kind" }, kindLabel)
|
|
@@ -11398,7 +11549,7 @@ function renderPromptVariant(envelope, taskLabel2) {
|
|
|
11398
11549
|
if (haltReasonText && headerChildren.push(
|
|
11399
11550
|
React11.createElement(
|
|
11400
11551
|
Text,
|
|
11401
|
-
{ key: "reason", color: "red" },
|
|
11552
|
+
{ key: "reason", color: colorOrPlain("red") },
|
|
11402
11553
|
` \u2014 ${haltReasonText}`
|
|
11403
11554
|
)
|
|
11404
11555
|
), children.push(
|
|
@@ -11522,7 +11673,7 @@ function StatusBar(props) {
|
|
|
11522
11673
|
React13.createElement(Text, { dimColor: !0 }, left),
|
|
11523
11674
|
badge && badgeText ? React13.createElement(
|
|
11524
11675
|
Text,
|
|
11525
|
-
badge.color ? { color: badge.color } : { dimColor: !0 },
|
|
11676
|
+
badge.color ? { color: colorOrPlain(badge.color) } : { dimColor: !0 },
|
|
11526
11677
|
badgeText
|
|
11527
11678
|
) : React13.createElement(Text, null, "")
|
|
11528
11679
|
);
|
|
@@ -11949,20 +12100,30 @@ function MultiTrackStatusNode(props) {
|
|
|
11949
12100
|
isNaN(parsed) || (mergeElapsed = formatElapsed(Date.now() - parsed));
|
|
11950
12101
|
} else team.mergeGateElapsedMs != null && (mergeElapsed = formatElapsed(team.mergeGateElapsedMs));
|
|
11951
12102
|
let trackIndices = [...team.tracks.keys()].sort((a, b) => a - b), trackLines = trackIndices.map((idx) => {
|
|
11952
|
-
let entry = team.tracks.get(idx),
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
12103
|
+
let entry = team.tracks.get(idx), stateLabel = entry.state === "Revising" && typeof entry.round == "number" && entry.round > 0 ? `Revising (Round ${entry.round})` : entry.state, taskSuffix = entry.taskId ? `, ${truncate(entry.taskId, 12)}` : "", detailsElements = [];
|
|
12104
|
+
if (entry.agent) {
|
|
12105
|
+
let agentBrandColor = colorOrPlain(getAgentBrandColor(entry.agent));
|
|
12106
|
+
detailsElements.push(
|
|
12107
|
+
React14.createElement(Text, { key: "open", dimColor: !0 }, " (")
|
|
12108
|
+
), agentBrandColor && detailsElements.push(
|
|
12109
|
+
React14.createElement(Text, { key: "dot", color: agentBrandColor }, "\u25CF ")
|
|
12110
|
+
), detailsElements.push(
|
|
12111
|
+
React14.createElement(Text, { key: "agent", bold: !0 }, entry.agent),
|
|
12112
|
+
React14.createElement(Text, { key: "close", dimColor: !0 }, `${taskSuffix})`)
|
|
12113
|
+
);
|
|
12114
|
+
} else entry.taskId && detailsElements.push(
|
|
12115
|
+
React14.createElement(Text, { key: "task", dimColor: !0 }, ` (${truncate(entry.taskId, 12)})`)
|
|
12116
|
+
);
|
|
11956
12117
|
return React14.createElement(
|
|
11957
|
-
|
|
11958
|
-
{ key: `track-${idx}
|
|
12118
|
+
Text,
|
|
12119
|
+
{ key: `track-${idx}` },
|
|
11959
12120
|
React14.createElement(Text, { bold: !0 }, ` Track ${displayTrackNumber(idx)} `),
|
|
11960
12121
|
React14.createElement(
|
|
11961
12122
|
Text,
|
|
11962
|
-
{ color: TRACK_STATE_COLOR[entry.state] },
|
|
12123
|
+
{ color: colorOrPlain(TRACK_STATE_COLOR[entry.state]), bold: !0 },
|
|
11963
12124
|
stateLabel
|
|
11964
12125
|
),
|
|
11965
|
-
|
|
12126
|
+
...detailsElements
|
|
11966
12127
|
);
|
|
11967
12128
|
}), innerWidth = Math.max(0, columns - BOX_CHROME_W), gateLabel = MERGE_GATE_STATUS_LABEL[team.mergeGate], mid = " MergeGate: ", clock = mergeElapsed ? ` \xB7 ${mergeElapsed}` : "", prefixFull = `Agent Teams (${trackIndices.length} track${trackIndices.length === 1 ? "" : "s"})`, prefixBudget = innerWidth - (mid.length + gateLabel.length + clock.length), header;
|
|
11968
12129
|
prefixBudget > 0 ? header = React14.createElement(
|
|
@@ -11970,7 +12131,7 @@ function MultiTrackStatusNode(props) {
|
|
|
11970
12131
|
{ key: "__header__" },
|
|
11971
12132
|
React14.createElement(Text, { bold: !0 }, truncate(prefixFull, prefixBudget)),
|
|
11972
12133
|
React14.createElement(Text, { dimColor: !0 }, mid),
|
|
11973
|
-
React14.createElement(Text, { color: MERGE_GATE_COLOR[team.mergeGate] }, gateLabel),
|
|
12134
|
+
React14.createElement(Text, { color: colorOrPlain(MERGE_GATE_COLOR[team.mergeGate]), bold: !0 }, gateLabel),
|
|
11974
12135
|
clock ? React14.createElement(Text, { dimColor: !0 }, clock) : null
|
|
11975
12136
|
) : header = React14.createElement(
|
|
11976
12137
|
Text,
|
|
@@ -11981,7 +12142,7 @@ function MultiTrackStatusNode(props) {
|
|
|
11981
12142
|
if (team.haltReason && children.push(
|
|
11982
12143
|
React14.createElement(
|
|
11983
12144
|
Text,
|
|
11984
|
-
{ key: "__halt__", color: "red" },
|
|
12145
|
+
{ key: "__halt__", color: colorOrPlain("red"), bold: !0 },
|
|
11985
12146
|
` Halted: ${team.haltReason}`
|
|
11986
12147
|
)
|
|
11987
12148
|
), team.groupResolved) {
|
|
@@ -11989,14 +12150,19 @@ function MultiTrackStatusNode(props) {
|
|
|
11989
12150
|
children.push(
|
|
11990
12151
|
React14.createElement(
|
|
11991
12152
|
Text,
|
|
11992
|
-
{ key: "__resolved__", color: complete ? "green" : "red" },
|
|
12153
|
+
{ key: "__resolved__", color: colorOrPlain(complete ? "green" : "red"), bold: !0 },
|
|
11993
12154
|
complete ? " Team complete" : ` Team halted \u2014 ${team.outcome ?? "unknown"}`
|
|
11994
12155
|
)
|
|
11995
12156
|
);
|
|
11996
12157
|
}
|
|
11997
12158
|
return React14.createElement(
|
|
11998
12159
|
Box,
|
|
11999
|
-
{
|
|
12160
|
+
{
|
|
12161
|
+
flexDirection: "column",
|
|
12162
|
+
borderStyle: "round",
|
|
12163
|
+
borderColor: colorOrPlain("magenta"),
|
|
12164
|
+
paddingX: 1
|
|
12165
|
+
},
|
|
12000
12166
|
...children
|
|
12001
12167
|
);
|
|
12002
12168
|
}
|
|
@@ -12020,7 +12186,7 @@ function LiveProgressLine(props) {
|
|
|
12020
12186
|
null,
|
|
12021
12187
|
React15.createElement(
|
|
12022
12188
|
Text,
|
|
12023
|
-
lit ? { color: "cyan" } : { dimColor: !0 },
|
|
12189
|
+
lit ? { color: colorOrPlain("cyan") } : { dimColor: !0 },
|
|
12024
12190
|
"\u25CF "
|
|
12025
12191
|
),
|
|
12026
12192
|
React15.createElement(Text, { dimColor: !0 }, rest)
|
|
@@ -17572,7 +17738,7 @@ function disableBracketedPaste(explicit) {
|
|
|
17572
17738
|
}
|
|
17573
17739
|
|
|
17574
17740
|
// src/orchestration-shell/components/InputBar.tsx
|
|
17575
|
-
var
|
|
17741
|
+
var getAccent = () => colorOrPlain("cyan"), MAX_SUGGESTIONS = 6, DROPDOWN_MAX_ROWS = MAX_SUGGESTIONS + 2, NAME_PAD = 20, CHIP_SENTINEL = "\uE000", PASTE_CHIP_RE = /\uE000Pasted text #(\d+) \+\d+ lines?\]/g;
|
|
17576
17742
|
function pasteChip(n, lineCount) {
|
|
17577
17743
|
return `${CHIP_SENTINEL}Pasted text #${n} +${lineCount} line${lineCount === 1 ? "" : "s"}]`;
|
|
17578
17744
|
}
|
|
@@ -17835,10 +18001,10 @@ function InputBar(props) {
|
|
|
17835
18001
|
{
|
|
17836
18002
|
flexDirection: "row",
|
|
17837
18003
|
borderStyle: "round",
|
|
17838
|
-
borderColor:
|
|
18004
|
+
borderColor: getAccent(),
|
|
17839
18005
|
paddingX: 1
|
|
17840
18006
|
},
|
|
17841
|
-
React16.createElement(Text, { color:
|
|
18007
|
+
React16.createElement(Text, { color: getAccent() }, "\u276F "),
|
|
17842
18008
|
React16.createElement(
|
|
17843
18009
|
Text,
|
|
17844
18010
|
{ dimColor: !0, italic: !0 },
|
|
@@ -17852,7 +18018,7 @@ function InputBar(props) {
|
|
|
17852
18018
|
let origin = rowOrigin ?? { left: 0, top: 0 };
|
|
17853
18019
|
setCursorPosition(caretPosition(origin.left, origin.top, win.visibleCol));
|
|
17854
18020
|
let rowChildren = [
|
|
17855
|
-
React16.createElement(Text, { key: "prompt", color:
|
|
18021
|
+
React16.createElement(Text, { key: "prompt", color: getAccent() }, "\u276F "),
|
|
17856
18022
|
// wrap:'truncate' — the value is PRE-WINDOWED to fit; truncate is a belt-and-
|
|
17857
18023
|
// suspenders guard so it can NEVER wrap even if the width math is off by a cell.
|
|
17858
18024
|
React16.createElement(Text, { key: "value", wrap: "truncate" }, win.text)
|
|
@@ -17876,7 +18042,7 @@ function InputBar(props) {
|
|
|
17876
18042
|
ref: rowRef,
|
|
17877
18043
|
flexDirection: "row",
|
|
17878
18044
|
borderStyle: "round",
|
|
17879
|
-
borderColor:
|
|
18045
|
+
borderColor: getAccent(),
|
|
17880
18046
|
paddingX: 1
|
|
17881
18047
|
},
|
|
17882
18048
|
...rowChildren
|
|
@@ -17895,7 +18061,7 @@ function InputBar(props) {
|
|
|
17895
18061
|
rows.push(
|
|
17896
18062
|
React16.createElement(
|
|
17897
18063
|
Text,
|
|
17898
|
-
isHi ? { key: sug.name, color:
|
|
18064
|
+
isHi ? { key: sug.name, color: getAccent(), bold: !0 } : { key: sug.name, dimColor: !0 },
|
|
17899
18065
|
formatSuggestionRow({
|
|
17900
18066
|
name: sug.name,
|
|
17901
18067
|
blurb: sug.blurb,
|
|
@@ -17925,7 +18091,7 @@ function InputBar(props) {
|
|
|
17925
18091
|
{ key: "hint", marginLeft: 2 },
|
|
17926
18092
|
React16.createElement(
|
|
17927
18093
|
Text,
|
|
17928
|
-
{ color: "red", wrap: "truncate" },
|
|
18094
|
+
{ color: colorOrPlain("red"), wrap: "truncate" },
|
|
17929
18095
|
errorHint
|
|
17930
18096
|
)
|
|
17931
18097
|
)
|
|
@@ -17937,8 +18103,35 @@ function InputBar(props) {
|
|
|
17937
18103
|
}
|
|
17938
18104
|
|
|
17939
18105
|
// src/orchestration-shell/components/ReviewerSetupWizard.tsx
|
|
18106
|
+
var React18 = __toESM(require("react"));
|
|
18107
|
+
|
|
18108
|
+
// src/orchestration-shell/components/wizard-select.tsx
|
|
17940
18109
|
var React17 = __toESM(require("react"));
|
|
17941
|
-
var
|
|
18110
|
+
var POINTER = "\u276F";
|
|
18111
|
+
function WizardSelectItem({
|
|
18112
|
+
isSelected = !1,
|
|
18113
|
+
label
|
|
18114
|
+
}) {
|
|
18115
|
+
let { ink } = getInkRuntime();
|
|
18116
|
+
return React17.createElement(
|
|
18117
|
+
ink.Text,
|
|
18118
|
+
{ color: isSelected ? colorOrPlain("blue") : void 0 },
|
|
18119
|
+
label
|
|
18120
|
+
);
|
|
18121
|
+
}
|
|
18122
|
+
function WizardSelectIndicator({
|
|
18123
|
+
isSelected = !1
|
|
18124
|
+
}) {
|
|
18125
|
+
let { ink } = getInkRuntime();
|
|
18126
|
+
return React17.createElement(
|
|
18127
|
+
ink.Box,
|
|
18128
|
+
{ marginRight: 1 },
|
|
18129
|
+
isSelected ? React17.createElement(ink.Text, { color: colorOrPlain("blue") }, POINTER) : React17.createElement(ink.Text, null, " ")
|
|
18130
|
+
);
|
|
18131
|
+
}
|
|
18132
|
+
|
|
18133
|
+
// src/orchestration-shell/components/ReviewerSetupWizard.tsx
|
|
18134
|
+
var getAccent2 = () => colorOrPlain("cyan"), ROLE_LIST_LIMIT = 6, WIZARD_MAX_ROWS = 6 + ROLE_LIST_LIMIT, ROLE_OPTIONS = [
|
|
17942
18135
|
"ARCHITECTURE" /* ARCHITECTURE */,
|
|
17943
18136
|
"CORRECTNESS" /* CORRECTNESS */,
|
|
17944
18137
|
"SECURITY" /* SECURITY */,
|
|
@@ -17959,12 +18152,12 @@ function currentSummary(wizard) {
|
|
|
17959
18152
|
return `Current panel: ${wizard.currentSeats && wizard.currentSeats.length > 0 ? wizard.currentSeats.map((s) => `${roleLabel(s.role)}\u2192${s.agent.toLowerCase()}`).join(", ") : "tier defaults"}`;
|
|
17960
18153
|
}
|
|
17961
18154
|
function ReviewerSetupWizard(props) {
|
|
17962
|
-
let { ink, inkSelectInput } = getInkRuntime(), { Box, Text, useInput } = ink, SelectInput = inkSelectInput.default, budget = SEAT_BUDGET[props.wizard.tier] ?? 0, [step, setStep] =
|
|
18155
|
+
let { ink, inkSelectInput } = getInkRuntime(), { Box, Text, useInput } = ink, SelectInput = inkSelectInput.default, budget = SEAT_BUDGET[props.wizard.tier] ?? 0, [step, setStep] = React18.useState({ kind: "panel-choice" }), [seats, setSeats] = React18.useState([]), handledRef = React18.useRef(!1), submitOnce = React18.useCallback(
|
|
17963
18156
|
(input) => {
|
|
17964
18157
|
handledRef.current || (handledRef.current = !0, setStep({ kind: "saving" }), props.onSubmit(input));
|
|
17965
18158
|
},
|
|
17966
18159
|
[props]
|
|
17967
|
-
), cancelOnce =
|
|
18160
|
+
), cancelOnce = React18.useCallback(() => {
|
|
17968
18161
|
handledRef.current || (handledRef.current = !0, props.onCancel());
|
|
17969
18162
|
}, [props]);
|
|
17970
18163
|
useInput(
|
|
@@ -17973,7 +18166,7 @@ function ReviewerSetupWizard(props) {
|
|
|
17973
18166
|
},
|
|
17974
18167
|
{ isActive: step.kind !== "saving" }
|
|
17975
18168
|
);
|
|
17976
|
-
let onCustomizeSelect =
|
|
18169
|
+
let onCustomizeSelect = React18.useCallback(
|
|
17977
18170
|
(item) => {
|
|
17978
18171
|
if (item.value === "defaults") {
|
|
17979
18172
|
submitOnce({ reviewerSeats: [] });
|
|
@@ -17982,12 +18175,12 @@ function ReviewerSetupWizard(props) {
|
|
|
17982
18175
|
setSeats([]), setStep({ kind: "seat-role", seatIndex: 0 });
|
|
17983
18176
|
},
|
|
17984
18177
|
[submitOnce]
|
|
17985
|
-
), onRoleSelect =
|
|
18178
|
+
), onRoleSelect = React18.useCallback(
|
|
17986
18179
|
(seatIndex, item) => {
|
|
17987
18180
|
setStep({ kind: "seat-agent", seatIndex, role: item.value });
|
|
17988
18181
|
},
|
|
17989
18182
|
[]
|
|
17990
|
-
), onAgentSelect =
|
|
18183
|
+
), onAgentSelect = React18.useCallback(
|
|
17991
18184
|
(seatIndex, role, item) => {
|
|
17992
18185
|
let nextSeats = [
|
|
17993
18186
|
...seats,
|
|
@@ -17996,7 +18189,7 @@ function ReviewerSetupWizard(props) {
|
|
|
17996
18189
|
setSeats(nextSeats), seatIndex + 1 < budget ? setStep({ kind: "seat-role", seatIndex: seatIndex + 1 }) : setStep({ kind: "confirm" });
|
|
17997
18190
|
},
|
|
17998
18191
|
[seats, budget]
|
|
17999
|
-
), onConfirmSelect =
|
|
18192
|
+
), onConfirmSelect = React18.useCallback(
|
|
18000
18193
|
(item) => {
|
|
18001
18194
|
if (item.value === "cancel") {
|
|
18002
18195
|
cancelOnce();
|
|
@@ -18005,15 +18198,15 @@ function ReviewerSetupWizard(props) {
|
|
|
18005
18198
|
submitOnce({ reviewerSeats: seats });
|
|
18006
18199
|
},
|
|
18007
18200
|
[submitOnce, cancelOnce, seats]
|
|
18008
|
-
), header =
|
|
18201
|
+
), header = React18.createElement(
|
|
18009
18202
|
Text,
|
|
18010
|
-
{ key: "title", color:
|
|
18203
|
+
{ key: "title", color: getAccent2(), bold: !0 },
|
|
18011
18204
|
"Reviewer setup"
|
|
18012
|
-
), currentLine =
|
|
18205
|
+
), currentLine = React18.createElement(
|
|
18013
18206
|
Text,
|
|
18014
18207
|
{ key: "current", dimColor: !0 },
|
|
18015
18208
|
currentSummary(props.wizard)
|
|
18016
|
-
), hint =
|
|
18209
|
+
), hint = React18.createElement(
|
|
18017
18210
|
Text,
|
|
18018
18211
|
{ key: "hint", dimColor: !0 },
|
|
18019
18212
|
step.kind === "saving" ? "Saving\u2026" : "\u2191/\u2193 move \xB7 Enter select \xB7 Esc cancel"
|
|
@@ -18028,13 +18221,15 @@ function ReviewerSetupWizard(props) {
|
|
|
18028
18221
|
},
|
|
18029
18222
|
{ label: "Customize my reviewer panel", value: "custom", key: "custom" }
|
|
18030
18223
|
];
|
|
18031
|
-
body =
|
|
18224
|
+
body = React18.createElement(
|
|
18032
18225
|
Box,
|
|
18033
18226
|
{ key: "body", flexDirection: "column" },
|
|
18034
|
-
|
|
18035
|
-
|
|
18227
|
+
React18.createElement(Text, { key: "q" }, "How should reviewers be chosen?"),
|
|
18228
|
+
React18.createElement(SelectInput, {
|
|
18036
18229
|
key: "sel",
|
|
18037
18230
|
items,
|
|
18231
|
+
itemComponent: WizardSelectItem,
|
|
18232
|
+
indicatorComponent: WizardSelectIndicator,
|
|
18038
18233
|
onSelect: onCustomizeSelect
|
|
18039
18234
|
})
|
|
18040
18235
|
);
|
|
@@ -18046,17 +18241,19 @@ function ReviewerSetupWizard(props) {
|
|
|
18046
18241
|
value: r,
|
|
18047
18242
|
key: r
|
|
18048
18243
|
})), seatIndex = step.seatIndex;
|
|
18049
|
-
body =
|
|
18244
|
+
body = React18.createElement(
|
|
18050
18245
|
Box,
|
|
18051
18246
|
{ key: "body", flexDirection: "column" },
|
|
18052
|
-
|
|
18247
|
+
React18.createElement(
|
|
18053
18248
|
Text,
|
|
18054
18249
|
{ key: "q" },
|
|
18055
18250
|
`Seat ${seatIndex + 1} of ${budget} \u2014 which review lens?`
|
|
18056
18251
|
),
|
|
18057
|
-
|
|
18252
|
+
React18.createElement(SelectInput, {
|
|
18058
18253
|
key: `role-${seatIndex}`,
|
|
18059
18254
|
items,
|
|
18255
|
+
itemComponent: WizardSelectItem,
|
|
18256
|
+
indicatorComponent: WizardSelectIndicator,
|
|
18060
18257
|
// Bound the role list (up to 9 lenses) to a scrolling window so the
|
|
18061
18258
|
// wizard's total height stays within the live-region reserve
|
|
18062
18259
|
// OrchestrationApp makes for it (#469 — Stage-1 LOW).
|
|
@@ -18072,17 +18269,19 @@ function ReviewerSetupWizard(props) {
|
|
|
18072
18269
|
value: a,
|
|
18073
18270
|
key: a
|
|
18074
18271
|
})), { seatIndex, role } = step;
|
|
18075
|
-
body =
|
|
18272
|
+
body = React18.createElement(
|
|
18076
18273
|
Box,
|
|
18077
18274
|
{ key: "body", flexDirection: "column" },
|
|
18078
|
-
|
|
18275
|
+
React18.createElement(
|
|
18079
18276
|
Text,
|
|
18080
18277
|
{ key: "q" },
|
|
18081
18278
|
`Seat ${seatIndex + 1} (${roleLabel(role)}) \u2014 which agent reviews?`
|
|
18082
18279
|
),
|
|
18083
|
-
|
|
18280
|
+
React18.createElement(SelectInput, {
|
|
18084
18281
|
key: `agent-${seatIndex}`,
|
|
18085
18282
|
items,
|
|
18283
|
+
itemComponent: WizardSelectItem,
|
|
18284
|
+
indicatorComponent: WizardSelectIndicator,
|
|
18086
18285
|
onSelect: (it) => onAgentSelect(seatIndex, role, it)
|
|
18087
18286
|
})
|
|
18088
18287
|
);
|
|
@@ -18090,7 +18289,7 @@ function ReviewerSetupWizard(props) {
|
|
|
18090
18289
|
}
|
|
18091
18290
|
case "confirm": {
|
|
18092
18291
|
let summaryRows = seats.map(
|
|
18093
|
-
(s) =>
|
|
18292
|
+
(s) => React18.createElement(
|
|
18094
18293
|
Text,
|
|
18095
18294
|
{ key: `sum-${s.seatId}`, dimColor: !0 },
|
|
18096
18295
|
// 1-indexed to match the "Seat N of M" prompts (the persisted seatId
|
|
@@ -18101,24 +18300,26 @@ function ReviewerSetupWizard(props) {
|
|
|
18101
18300
|
{ label: "Save this panel", value: "save", key: "save" },
|
|
18102
18301
|
{ label: "Cancel (no change)", value: "cancel", key: "cancel" }
|
|
18103
18302
|
];
|
|
18104
|
-
body =
|
|
18303
|
+
body = React18.createElement(
|
|
18105
18304
|
Box,
|
|
18106
18305
|
{ key: "body", flexDirection: "column" },
|
|
18107
|
-
|
|
18306
|
+
React18.createElement(Text, { key: "q" }, "Save your custom reviewer panel?"),
|
|
18108
18307
|
...summaryRows,
|
|
18109
|
-
|
|
18308
|
+
React18.createElement(SelectInput, {
|
|
18110
18309
|
key: "sel",
|
|
18111
18310
|
items,
|
|
18311
|
+
itemComponent: WizardSelectItem,
|
|
18312
|
+
indicatorComponent: WizardSelectIndicator,
|
|
18112
18313
|
onSelect: onConfirmSelect
|
|
18113
18314
|
})
|
|
18114
18315
|
);
|
|
18115
18316
|
break;
|
|
18116
18317
|
}
|
|
18117
18318
|
default: {
|
|
18118
|
-
body =
|
|
18319
|
+
body = React18.createElement(
|
|
18119
18320
|
Box,
|
|
18120
18321
|
{ key: "body", flexDirection: "column" },
|
|
18121
|
-
|
|
18322
|
+
React18.createElement(
|
|
18122
18323
|
Text,
|
|
18123
18324
|
{ key: "q", dimColor: !0, italic: !0 },
|
|
18124
18325
|
"Saving your reviewer panel\u2026"
|
|
@@ -18127,12 +18328,12 @@ function ReviewerSetupWizard(props) {
|
|
|
18127
18328
|
break;
|
|
18128
18329
|
}
|
|
18129
18330
|
}
|
|
18130
|
-
return
|
|
18331
|
+
return React18.createElement(
|
|
18131
18332
|
Box,
|
|
18132
18333
|
{
|
|
18133
18334
|
flexDirection: "column",
|
|
18134
18335
|
borderStyle: "round",
|
|
18135
|
-
borderColor:
|
|
18336
|
+
borderColor: getAccent2(),
|
|
18136
18337
|
paddingX: 1
|
|
18137
18338
|
},
|
|
18138
18339
|
header,
|
|
@@ -18302,7 +18503,7 @@ function notesHint(prompt) {
|
|
|
18302
18503
|
}
|
|
18303
18504
|
|
|
18304
18505
|
// src/orchestration-shell/components/ImplementorSetupWizard.tsx
|
|
18305
|
-
var
|
|
18506
|
+
var React19 = __toESM(require("react"));
|
|
18306
18507
|
|
|
18307
18508
|
// src/orchestration-shell/implementor-preference.ts
|
|
18308
18509
|
var fs10 = __toESM(require("fs")), path11 = __toESM(require("path")), os11 = __toESM(require("os")), import_zod = require("zod");
|
|
@@ -61955,18 +62156,18 @@ async function runImplementorSetupCli(args, detectFn = detectInstalledAgents) {
|
|
|
61955
62156
|
}
|
|
61956
62157
|
|
|
61957
62158
|
// src/orchestration-shell/components/ImplementorSetupWizard.tsx
|
|
61958
|
-
var
|
|
62159
|
+
var getAccent3 = () => colorOrPlain("cyan"), IMPLEMENTOR_WIZARD_MAX_ROWS = 12;
|
|
61959
62160
|
function currentSummary2(pref) {
|
|
61960
62161
|
let order = pref.priorityOrder.map(displayAgentName).join(" \u2192 "), confirm = pref.confirmBeforeStart ? "on" : "off";
|
|
61961
62162
|
return `Current order: ${order} \xB7 Confirmation: ${confirm}`;
|
|
61962
62163
|
}
|
|
61963
62164
|
function ImplementorSetupWizard(props) {
|
|
61964
|
-
let { ink, inkSelectInput } = getInkRuntime(), { Box, Text, useInput } = ink, SelectInput = inkSelectInput.default, [step, setStep] =
|
|
62165
|
+
let { ink, inkSelectInput } = getInkRuntime(), { Box, Text, useInput } = ink, SelectInput = inkSelectInput.default, [step, setStep] = React19.useState({ kind: "main-choice" }), handledRef = React19.useRef(!1), submitOnce = React19.useCallback(
|
|
61965
62166
|
(pref) => {
|
|
61966
62167
|
handledRef.current || (handledRef.current = !0, setStep({ kind: "saving" }), props.onSubmit(pref));
|
|
61967
62168
|
},
|
|
61968
62169
|
[props]
|
|
61969
|
-
), cancelOnce =
|
|
62170
|
+
), cancelOnce = React19.useCallback(() => {
|
|
61970
62171
|
handledRef.current || (handledRef.current = !0, props.onCancel());
|
|
61971
62172
|
}, [props]);
|
|
61972
62173
|
useInput(
|
|
@@ -61979,7 +62180,7 @@ function ImplementorSetupWizard(props) {
|
|
|
61979
62180
|
"CLAUDE",
|
|
61980
62181
|
"CODEX",
|
|
61981
62182
|
"ANTIGRAVITY"
|
|
61982
|
-
], onMainSelect =
|
|
62183
|
+
], onMainSelect = React19.useCallback(
|
|
61983
62184
|
(item) => {
|
|
61984
62185
|
if (item.value === "cancel") {
|
|
61985
62186
|
cancelOnce();
|
|
@@ -62002,18 +62203,18 @@ function ImplementorSetupWizard(props) {
|
|
|
62002
62203
|
setStep({ kind: "pick-first" });
|
|
62003
62204
|
},
|
|
62004
62205
|
[cancelOnce, submitOnce, props.wizard.currentPreference]
|
|
62005
|
-
), onFirstSelect =
|
|
62206
|
+
), onFirstSelect = React19.useCallback(
|
|
62006
62207
|
(item) => {
|
|
62007
62208
|
setStep({ kind: "pick-second", first: item.value });
|
|
62008
62209
|
},
|
|
62009
62210
|
[]
|
|
62010
|
-
), onSecondSelect =
|
|
62211
|
+
), onSecondSelect = React19.useCallback(
|
|
62011
62212
|
(first, item) => {
|
|
62012
62213
|
let second = item.value, third = activeCandidates.find((a) => a !== first && a !== second);
|
|
62013
62214
|
setStep({ kind: "confirm-prompt", order: [first, second, third] });
|
|
62014
62215
|
},
|
|
62015
62216
|
[activeCandidates]
|
|
62016
|
-
), onConfirmPromptSelect =
|
|
62217
|
+
), onConfirmPromptSelect = React19.useCallback(
|
|
62017
62218
|
(order, item) => {
|
|
62018
62219
|
let confirmBeforeStart = item.value === "on";
|
|
62019
62220
|
setStep({
|
|
@@ -62023,7 +62224,7 @@ function ImplementorSetupWizard(props) {
|
|
|
62023
62224
|
});
|
|
62024
62225
|
},
|
|
62025
62226
|
[]
|
|
62026
|
-
), onReviewSaveSelect =
|
|
62227
|
+
), onReviewSaveSelect = React19.useCallback(
|
|
62027
62228
|
(order, confirmBeforeStart, item) => {
|
|
62028
62229
|
if (item.value === "cancel") {
|
|
62029
62230
|
cancelOnce();
|
|
@@ -62037,15 +62238,15 @@ function ImplementorSetupWizard(props) {
|
|
|
62037
62238
|
});
|
|
62038
62239
|
},
|
|
62039
62240
|
[cancelOnce, submitOnce]
|
|
62040
|
-
), header =
|
|
62241
|
+
), header = React19.createElement(
|
|
62041
62242
|
Text,
|
|
62042
|
-
{ key: "title", color:
|
|
62243
|
+
{ key: "title", color: getAccent3(), bold: !0 },
|
|
62043
62244
|
"Implementor setup"
|
|
62044
|
-
), currentLine =
|
|
62245
|
+
), currentLine = React19.createElement(
|
|
62045
62246
|
Text,
|
|
62046
62247
|
{ key: "current", dimColor: !0 },
|
|
62047
62248
|
currentSummary2(props.wizard.currentPreference)
|
|
62048
|
-
), hint =
|
|
62249
|
+
), hint = React19.createElement(
|
|
62049
62250
|
Text,
|
|
62050
62251
|
{ key: "hint", dimColor: !0 },
|
|
62051
62252
|
step.kind === "saving" ? "Saving\u2026" : "\u2191/\u2193 move \xB7 Enter select \xB7 Esc cancel"
|
|
@@ -62074,13 +62275,15 @@ function ImplementorSetupWizard(props) {
|
|
|
62074
62275
|
key: "cancel"
|
|
62075
62276
|
}
|
|
62076
62277
|
];
|
|
62077
|
-
body =
|
|
62278
|
+
body = React19.createElement(
|
|
62078
62279
|
Box,
|
|
62079
62280
|
{ key: "body", flexDirection: "column" },
|
|
62080
|
-
|
|
62081
|
-
|
|
62281
|
+
React19.createElement(Text, { key: "q" }, "How would you like to configure implementors?"),
|
|
62282
|
+
React19.createElement(SelectInput, {
|
|
62082
62283
|
key: "sel",
|
|
62083
62284
|
items,
|
|
62285
|
+
itemComponent: WizardSelectItem,
|
|
62286
|
+
indicatorComponent: WizardSelectIndicator,
|
|
62084
62287
|
onSelect: onMainSelect
|
|
62085
62288
|
})
|
|
62086
62289
|
);
|
|
@@ -62092,17 +62295,19 @@ function ImplementorSetupWizard(props) {
|
|
|
62092
62295
|
value: agent,
|
|
62093
62296
|
key: agent
|
|
62094
62297
|
}));
|
|
62095
|
-
body =
|
|
62298
|
+
body = React19.createElement(
|
|
62096
62299
|
Box,
|
|
62097
62300
|
{ key: "body", flexDirection: "column" },
|
|
62098
|
-
|
|
62301
|
+
React19.createElement(
|
|
62099
62302
|
Text,
|
|
62100
62303
|
{ key: "q" },
|
|
62101
62304
|
"Select #1 priority implementor agent (Track 1 default):"
|
|
62102
62305
|
),
|
|
62103
|
-
|
|
62306
|
+
React19.createElement(SelectInput, {
|
|
62104
62307
|
key: "first-sel",
|
|
62105
62308
|
items,
|
|
62309
|
+
itemComponent: WizardSelectItem,
|
|
62310
|
+
indicatorComponent: WizardSelectIndicator,
|
|
62106
62311
|
onSelect: onFirstSelect
|
|
62107
62312
|
})
|
|
62108
62313
|
);
|
|
@@ -62114,17 +62319,19 @@ function ImplementorSetupWizard(props) {
|
|
|
62114
62319
|
value: agent,
|
|
62115
62320
|
key: agent
|
|
62116
62321
|
}));
|
|
62117
|
-
body =
|
|
62322
|
+
body = React19.createElement(
|
|
62118
62323
|
Box,
|
|
62119
62324
|
{ key: "body", flexDirection: "column" },
|
|
62120
|
-
|
|
62325
|
+
React19.createElement(
|
|
62121
62326
|
Text,
|
|
62122
62327
|
{ key: "q" },
|
|
62123
62328
|
`#1 priority is ${displayAgentName(first)}. Select #2 priority implementor agent:`
|
|
62124
62329
|
),
|
|
62125
|
-
|
|
62330
|
+
React19.createElement(SelectInput, {
|
|
62126
62331
|
key: "second-sel",
|
|
62127
62332
|
items,
|
|
62333
|
+
itemComponent: WizardSelectItem,
|
|
62334
|
+
indicatorComponent: WizardSelectIndicator,
|
|
62128
62335
|
onSelect: (item) => onSecondSelect(first, item)
|
|
62129
62336
|
})
|
|
62130
62337
|
);
|
|
@@ -62143,17 +62350,19 @@ function ImplementorSetupWizard(props) {
|
|
|
62143
62350
|
key: "on"
|
|
62144
62351
|
}
|
|
62145
62352
|
];
|
|
62146
|
-
body =
|
|
62353
|
+
body = React19.createElement(
|
|
62147
62354
|
Box,
|
|
62148
62355
|
{ key: "body", flexDirection: "column" },
|
|
62149
|
-
|
|
62356
|
+
React19.createElement(
|
|
62150
62357
|
Text,
|
|
62151
62358
|
{ key: "q" },
|
|
62152
62359
|
`Priority order: ${order.map(displayAgentName).join(" \u2192 ")}. Require confirmation before start_task?`
|
|
62153
62360
|
),
|
|
62154
|
-
|
|
62361
|
+
React19.createElement(SelectInput, {
|
|
62155
62362
|
key: "confirm-sel",
|
|
62156
62363
|
items,
|
|
62364
|
+
itemComponent: WizardSelectItem,
|
|
62365
|
+
indicatorComponent: WizardSelectIndicator,
|
|
62157
62366
|
onSelect: (item) => onConfirmPromptSelect(order, item)
|
|
62158
62367
|
})
|
|
62159
62368
|
);
|
|
@@ -62164,33 +62373,35 @@ function ImplementorSetupWizard(props) {
|
|
|
62164
62373
|
{ label: "Save these preferences", value: "save", key: "save" },
|
|
62165
62374
|
{ label: "Cancel (no changes)", value: "cancel", key: "cancel" }
|
|
62166
62375
|
];
|
|
62167
|
-
body =
|
|
62376
|
+
body = React19.createElement(
|
|
62168
62377
|
Box,
|
|
62169
62378
|
{ key: "body", flexDirection: "column" },
|
|
62170
|
-
|
|
62171
|
-
|
|
62379
|
+
React19.createElement(Text, { key: "q" }, "Save implementor preferences?"),
|
|
62380
|
+
React19.createElement(
|
|
62172
62381
|
Text,
|
|
62173
62382
|
{ key: "s1", dimColor: !0 },
|
|
62174
62383
|
` Priority order: ${order.map(displayAgentName).join(" \u2192 ")}`
|
|
62175
62384
|
),
|
|
62176
|
-
|
|
62385
|
+
React19.createElement(
|
|
62177
62386
|
Text,
|
|
62178
62387
|
{ key: "s2", dimColor: !0 },
|
|
62179
62388
|
` Confirmation prompt: ${confirmBeforeStart ? "on" : "off"}`
|
|
62180
62389
|
),
|
|
62181
|
-
|
|
62390
|
+
React19.createElement(SelectInput, {
|
|
62182
62391
|
key: "review-sel",
|
|
62183
62392
|
items,
|
|
62393
|
+
itemComponent: WizardSelectItem,
|
|
62394
|
+
indicatorComponent: WizardSelectIndicator,
|
|
62184
62395
|
onSelect: (item) => onReviewSaveSelect(order, confirmBeforeStart, item)
|
|
62185
62396
|
})
|
|
62186
62397
|
);
|
|
62187
62398
|
break;
|
|
62188
62399
|
}
|
|
62189
62400
|
default: {
|
|
62190
|
-
body =
|
|
62401
|
+
body = React19.createElement(
|
|
62191
62402
|
Box,
|
|
62192
62403
|
{ key: "body", flexDirection: "column" },
|
|
62193
|
-
|
|
62404
|
+
React19.createElement(
|
|
62194
62405
|
Text,
|
|
62195
62406
|
{ key: "q", dimColor: !0, italic: !0 },
|
|
62196
62407
|
"Saving implementor preferences\u2026"
|
|
@@ -62199,12 +62410,12 @@ function ImplementorSetupWizard(props) {
|
|
|
62199
62410
|
break;
|
|
62200
62411
|
}
|
|
62201
62412
|
}
|
|
62202
|
-
return
|
|
62413
|
+
return React19.createElement(
|
|
62203
62414
|
Box,
|
|
62204
62415
|
{
|
|
62205
62416
|
flexDirection: "column",
|
|
62206
62417
|
borderStyle: "round",
|
|
62207
|
-
borderColor:
|
|
62418
|
+
borderColor: getAccent3(),
|
|
62208
62419
|
paddingX: 1
|
|
62209
62420
|
},
|
|
62210
62421
|
header,
|
|
@@ -63037,14 +63248,14 @@ function deriveGatePromptMode(active, gateActionRecoveryBlocked = !1, labelByTas
|
|
|
63037
63248
|
}
|
|
63038
63249
|
}
|
|
63039
63250
|
function OrchestrationApp(props) {
|
|
63040
|
-
let { ink } = getInkRuntime(), { Box, Static, Text } = ink, [state, setState] =
|
|
63041
|
-
|
|
63042
|
-
let [liveRuntimeKind, setLiveRuntimeKind] =
|
|
63251
|
+
let { ink } = getInkRuntime(), { Box, Static, Text } = ink, [state, setState] = React20.useState(() => props.store.getState());
|
|
63252
|
+
React20.useEffect(() => props.store.subscribe(setState), [props.store]);
|
|
63253
|
+
let [liveRuntimeKind, setLiveRuntimeKind] = React20.useState(
|
|
63043
63254
|
props.plannerRuntimeKind ?? "hosted"
|
|
63044
|
-
), [liveRuntimeLabel, setLiveRuntimeLabel] =
|
|
63255
|
+
), [liveRuntimeLabel, setLiveRuntimeLabel] = React20.useState(
|
|
63045
63256
|
props.plannerLabel ?? ""
|
|
63046
63257
|
);
|
|
63047
|
-
|
|
63258
|
+
React20.useEffect(() => {
|
|
63048
63259
|
let adapter = props.plannerAdapter;
|
|
63049
63260
|
if (!(!adapter || typeof adapter.onSourceChange != "function"))
|
|
63050
63261
|
return adapter.onSourceChange((source) => {
|
|
@@ -63052,18 +63263,18 @@ function OrchestrationApp(props) {
|
|
|
63052
63263
|
});
|
|
63053
63264
|
}, [props.plannerAdapter]);
|
|
63054
63265
|
let { setRawMode, isRawModeSupported } = ink.useStdin(), renderStdout2 = ink.useStdout().stdout;
|
|
63055
|
-
|
|
63266
|
+
React20.useEffect(() => {
|
|
63056
63267
|
if (isRawModeSupported)
|
|
63057
63268
|
return setRawMode(!0), () => setRawMode(!1);
|
|
63058
|
-
}, [isRawModeSupported, setRawMode]),
|
|
63269
|
+
}, [isRawModeSupported, setRawMode]), React20.useEffect(() => (setRenderStdout(renderStdout2), () => {
|
|
63059
63270
|
disableBracketedPaste(), setRenderStdout(null);
|
|
63060
63271
|
}), [renderStdout2]);
|
|
63061
63272
|
let wizardOpen = state.reviewerWizard !== null || state.implementorWizard !== null;
|
|
63062
|
-
|
|
63273
|
+
React20.useEffect(() => {
|
|
63063
63274
|
if (isRawModeSupported)
|
|
63064
63275
|
return wizardOpen ? disableBracketedPaste() : enableBracketedPaste(), () => disableBracketedPaste();
|
|
63065
63276
|
}, [wizardOpen, isRawModeSupported]);
|
|
63066
|
-
let staticOrderRef =
|
|
63277
|
+
let staticOrderRef = React20.useRef(null);
|
|
63067
63278
|
staticOrderRef.current || (staticOrderRef.current = makeStaticOrderAccum());
|
|
63068
63279
|
let trackLabelByTaskId = buildGateLabelByTaskId(state), staticConversation = plannerDecisionRenderEnabled() ? state.conversation : state.conversation.filter((e) => e.kind !== "planner-decision");
|
|
63069
63280
|
appendNewlyFinal(staticOrderRef.current, staticConversation, (entry) => ({
|
|
@@ -63072,7 +63283,7 @@ function OrchestrationApp(props) {
|
|
|
63072
63283
|
turnStart: isTurnStart(entry)
|
|
63073
63284
|
}));
|
|
63074
63285
|
let staticItems = [
|
|
63075
|
-
{ key: "__logo__", element:
|
|
63286
|
+
{ key: "__logo__", element: React20.createElement(CodeVibeLogo), turnStart: !1 },
|
|
63076
63287
|
...staticOrderRef.current.items
|
|
63077
63288
|
], nonFinal = state.conversation.filter(
|
|
63078
63289
|
(e) => !e.final
|
|
@@ -63084,7 +63295,7 @@ function OrchestrationApp(props) {
|
|
|
63084
63295
|
nonFinal,
|
|
63085
63296
|
terminalRows,
|
|
63086
63297
|
FIXED_CHROME_ROWS + teamReserveRows + progressReserveRows + dropdownReserveRows + wizardReserveRows
|
|
63087
|
-
), handleInputBarSubmit =
|
|
63298
|
+
), handleInputBarSubmit = React20.useCallback(
|
|
63088
63299
|
(text2, images) => {
|
|
63089
63300
|
if (parsePromptReference(text2) !== null && listOpenPrompts(props.store.getState(), "keyboard").length > 0) {
|
|
63090
63301
|
props.onUserInput(text2);
|
|
@@ -63130,13 +63341,13 @@ function OrchestrationApp(props) {
|
|
|
63130
63341
|
props.captureShadow,
|
|
63131
63342
|
props.groupDecision
|
|
63132
63343
|
]
|
|
63133
|
-
), slashCommands =
|
|
63344
|
+
), slashCommands = React20.useMemo(
|
|
63134
63345
|
() => listSlashCommands(props.tier),
|
|
63135
63346
|
[props.tier]
|
|
63136
|
-
), mentionSuggestions =
|
|
63347
|
+
), mentionSuggestions = React20.useMemo(
|
|
63137
63348
|
() => buildMentionSuggestions(props.detectedAgents ?? []),
|
|
63138
63349
|
[props.detectedAgents]
|
|
63139
|
-
), handleWizardSubmit =
|
|
63350
|
+
), handleWizardSubmit = React20.useCallback(
|
|
63140
63351
|
(input) => {
|
|
63141
63352
|
let client = props.reviewerPolicyClient;
|
|
63142
63353
|
if (!client) {
|
|
@@ -63165,13 +63376,13 @@ ${formatReviewerPolicy(snapshot)}`
|
|
|
63165
63376
|
});
|
|
63166
63377
|
},
|
|
63167
63378
|
[props.reviewerPolicyClient, props.store]
|
|
63168
|
-
), handleWizardCancel =
|
|
63379
|
+
), handleWizardCancel = React20.useCallback(() => {
|
|
63169
63380
|
props.store.dispatch({
|
|
63170
63381
|
type: "SHELL_ADVISORY",
|
|
63171
63382
|
source: "shell",
|
|
63172
63383
|
text: "Reviewer setup cancelled \u2014 no change."
|
|
63173
63384
|
}), props.store.dispatch({ type: "REVIEWER_WIZARD_CLOSE" });
|
|
63174
|
-
}, [props.store]), handleImplementorWizardSubmit =
|
|
63385
|
+
}, [props.store]), handleImplementorWizardSubmit = React20.useCallback(
|
|
63175
63386
|
(pref) => {
|
|
63176
63387
|
saveImplementorPreference(pref).then((updated) => {
|
|
63177
63388
|
let detected = state.implementorWizard?.installedAgents ?? [];
|
|
@@ -63192,20 +63403,20 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63192
63403
|
});
|
|
63193
63404
|
},
|
|
63194
63405
|
[props.store, props.tier, state.implementorWizard]
|
|
63195
|
-
), handleImplementorWizardCancel =
|
|
63406
|
+
), handleImplementorWizardCancel = React20.useCallback(() => {
|
|
63196
63407
|
props.store.dispatch({
|
|
63197
63408
|
type: "SHELL_ADVISORY",
|
|
63198
63409
|
source: "shell",
|
|
63199
63410
|
text: "Implementor setup cancelled \u2014 no change."
|
|
63200
63411
|
}), props.store.dispatch({ type: "IMPLEMENTOR_WIZARD_CLOSE" });
|
|
63201
63412
|
}, [props.store]);
|
|
63202
|
-
return
|
|
63413
|
+
return React20.createElement(
|
|
63203
63414
|
Box,
|
|
63204
63415
|
{ flexDirection: "column" },
|
|
63205
63416
|
// Ink's <Static> takes a function-as-child via the prop pattern, NOT
|
|
63206
63417
|
// as a regular child. We pass it as `children` to satisfy React's
|
|
63207
63418
|
// typing while preserving the runtime expectation.
|
|
63208
|
-
|
|
63419
|
+
React20.createElement(Static, {
|
|
63209
63420
|
items: staticItems,
|
|
63210
63421
|
// Turn-boundary spacing (Hendry dogfood 2026-06-29): open a blank line
|
|
63211
63422
|
// BEFORE each turn-starting entry via `marginTop`. `index` is the absolute
|
|
@@ -63216,7 +63427,7 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63216
63427
|
// Static scrollback, unlike the prior horizontal `gap` gutter). These
|
|
63217
63428
|
// entries are always `final` → Static-only, so this never touches the #469
|
|
63218
63429
|
// live-region cap.
|
|
63219
|
-
children: (item, index) =>
|
|
63430
|
+
children: (item, index) => React20.createElement(
|
|
63220
63431
|
Box,
|
|
63221
63432
|
{
|
|
63222
63433
|
key: item.key,
|
|
@@ -63231,22 +63442,22 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63231
63442
|
// nodes, surface a single dim marker so the user knows live updates are
|
|
63232
63443
|
// hidden (they will reappear in scrollback once they finalize). The active
|
|
63233
63444
|
// gate control is NEVER among the hidden entries.
|
|
63234
|
-
hiddenCount > 0 ?
|
|
63445
|
+
hiddenCount > 0 ? React20.createElement(
|
|
63235
63446
|
Box,
|
|
63236
63447
|
{ key: "__live-hidden__", flexDirection: "row" },
|
|
63237
|
-
|
|
63448
|
+
React20.createElement(
|
|
63238
63449
|
Text,
|
|
63239
63450
|
{ dimColor: !0 },
|
|
63240
63451
|
`\u22EE ${hiddenCount} earlier live update${hiddenCount === 1 ? "" : "s"} hidden (terminal too short)`
|
|
63241
63452
|
)
|
|
63242
63453
|
) : null,
|
|
63243
|
-
|
|
63454
|
+
React20.createElement(ConversationPane, {
|
|
63244
63455
|
entries: cappedNonFinal,
|
|
63245
63456
|
trackLabelByTaskId,
|
|
63246
63457
|
gateActionRecoveryBlocked: state.gateActionRecoveryBlocked
|
|
63247
63458
|
}),
|
|
63248
63459
|
...shownTaskProgress.length > 0 ? shownTaskProgress.map(
|
|
63249
|
-
([taskId, line], index) =>
|
|
63460
|
+
([taskId, line], index) => React20.createElement(LiveProgressLine, {
|
|
63250
63461
|
key: `progress-${taskId}`,
|
|
63251
63462
|
progress: line,
|
|
63252
63463
|
label: (() => {
|
|
@@ -63256,19 +63467,19 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63256
63467
|
...index === shownTaskProgress.length - 1 && hiddenTaskProgress > 0 ? { moreCount: hiddenTaskProgress } : {}
|
|
63257
63468
|
})
|
|
63258
63469
|
) : [],
|
|
63259
|
-
|
|
63470
|
+
React20.createElement(LiveProgressLine, { key: "progress-untasked", progress: untaskedProgress }),
|
|
63260
63471
|
// `/reviewer-setup` wizard (2026-06-29) — while open it REPLACES the InputBar
|
|
63261
63472
|
// at the same layout slot and owns keyboard focus (arrow-key ink-select); on
|
|
63262
63473
|
// save/cancel it dispatches REVIEWER_WIZARD_CLOSE and the InputBar returns.
|
|
63263
|
-
state.reviewerWizard ?
|
|
63474
|
+
state.reviewerWizard ? React20.createElement(ReviewerSetupWizard, {
|
|
63264
63475
|
wizard: state.reviewerWizard,
|
|
63265
63476
|
onSubmit: handleWizardSubmit,
|
|
63266
63477
|
onCancel: handleWizardCancel
|
|
63267
|
-
}) : state.implementorWizard ?
|
|
63478
|
+
}) : state.implementorWizard ? React20.createElement(ImplementorSetupWizard, {
|
|
63268
63479
|
wizard: state.implementorWizard,
|
|
63269
63480
|
onSubmit: handleImplementorWizardSubmit,
|
|
63270
63481
|
onCancel: handleImplementorWizardCancel
|
|
63271
|
-
}) :
|
|
63482
|
+
}) : React20.createElement(InputBar, {
|
|
63272
63483
|
onSubmit: handleInputBarSubmit,
|
|
63273
63484
|
onCancel: props.onCancel,
|
|
63274
63485
|
placeholder: "Ask CodeVibe to build, or /help",
|
|
@@ -63295,7 +63506,7 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63295
63506
|
// taller (and Claude Code's input-at-the-fold model is mirrored).
|
|
63296
63507
|
// TUI redesign (2026-06-29): cwd · tier + planner badge (the hosted
|
|
63297
63508
|
// connection-health dot is retired — see StatusBar.tsx).
|
|
63298
|
-
|
|
63509
|
+
React20.createElement(StatusBar, {
|
|
63299
63510
|
// Plaintext cwd (Stage-1 HIGH) — NOT state.session.projectPath, which is
|
|
63300
63511
|
// AES-GCM-encrypted at rest and never decrypted. Falls back to the live
|
|
63301
63512
|
// process.cwd() when the entry didn't thread it (tests / CP-1.a callers).
|
|
@@ -63307,7 +63518,7 @@ ${formatImplementorPolicy(detected, updated, props.tier)}`
|
|
|
63307
63518
|
// CP-12 W3 §3.5 — minimal multi-track status node, mounted ONLY when a team
|
|
63308
63519
|
// is active. Single-track / Companion sessions leave `state.team`
|
|
63309
63520
|
// null → the node is never mounted. Rich UX is [DEFERRED → CP-8 #469].
|
|
63310
|
-
state.team ?
|
|
63521
|
+
state.team ? React20.createElement(MultiTrackStatusNode, { team: state.team }) : null
|
|
63311
63522
|
);
|
|
63312
63523
|
}
|
|
63313
63524
|
|
|
@@ -68909,7 +69120,7 @@ var LastModeFileSchema = import_zod4.z.object({
|
|
|
68909
69120
|
});
|
|
68910
69121
|
|
|
68911
69122
|
// src/orchestration-shell/components/AuditLogPanel.tsx
|
|
68912
|
-
var
|
|
69123
|
+
var React21 = __toESM(require("react"));
|
|
68913
69124
|
|
|
68914
69125
|
// src/orchestration-shell/index.ts
|
|
68915
69126
|
function resolveBrowseUrls(modelUrls, prompt) {
|
|
@@ -70481,7 +70692,7 @@ async function runOrchestrationShell(args) {
|
|
|
70481
70692
|
if (sessionRetiredExitRequested)
|
|
70482
70693
|
return;
|
|
70483
70694
|
let { ink } = getInkRuntime(), { waitUntilExit, unmount } = ink.render(
|
|
70484
|
-
|
|
70695
|
+
React22.createElement(OrchestrationApp, {
|
|
70485
70696
|
store,
|
|
70486
70697
|
tier: args.tier,
|
|
70487
70698
|
// TUI redesign (2026-06-29) — status-bar planner badge inputs + the
|
|
@@ -78040,13 +78251,8 @@ var StubStrictAuditSink = class {
|
|
|
78040
78251
|
|
|
78041
78252
|
// src/credential-broker/broker-config.ts
|
|
78042
78253
|
var ANTHROPIC_VERSION = "2023-06-01", ANTHROPIC_BETA_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
78043
|
-
// Reviewed 2026-07-03 (host path-A dogfood): the
|
|
78044
|
-
// live Claude Code CLI (2.1.x)
|
|
78045
|
-
// token diagnostic. All are STATIC vendor-published feature-flag constants
|
|
78046
|
-
// (no agent-controlled data can ride in an exact-match token). Several gate
|
|
78047
|
-
// BODY fields the CLI always emits (`context_management`, thinking, caching,
|
|
78048
|
-
// effort) — dropping a flag while its body field survives makes the upstream
|
|
78049
|
-
// 400 the whole request ("Extra inputs are not permitted").
|
|
78254
|
+
// Reviewed 2026-07-03 (host path-A dogfood): the initial flag set the
|
|
78255
|
+
// live Claude Code CLI (2.1.x) sent.
|
|
78050
78256
|
"oauth-2025-04-20",
|
|
78051
78257
|
"claude-code-20250219",
|
|
78052
78258
|
"context-1m-2025-08-07",
|
|
@@ -78054,7 +78260,18 @@ var ANTHROPIC_VERSION = "2023-06-01", ANTHROPIC_BETA_ALLOWLIST = /* @__PURE__ */
|
|
|
78054
78260
|
"context-management-2025-06-27",
|
|
78055
78261
|
"prompt-caching-scope-2026-01-05",
|
|
78056
78262
|
"mid-conversation-system-2026-04-07",
|
|
78057
|
-
"effort-2025-11-24"
|
|
78263
|
+
"effort-2025-11-24",
|
|
78264
|
+
// Reviewed 2026-09-24 (BB-D-01 / Stage-2 R3): Empirically captured from live
|
|
78265
|
+
// Claude Code CLI 2.1.282 requests on /v1/messages?beta=true. Baseline broker at
|
|
78266
|
+
// f0369c2 dropped these tokens, causing upstream Anthropic to return HTTP 400.
|
|
78267
|
+
// Documented Anthropic beta features:
|
|
78268
|
+
// - thinking-token-count-2026-05-13: token usage reporting for thinking blocks.
|
|
78269
|
+
// - per-turn-control-2026-07-01: per-turn effort / output_config directives.
|
|
78270
|
+
// - mid-conversation-tool-changes-2026-07-01: dynamic tool updates preserving prompt cache.
|
|
78271
|
+
// Note: advisor-tool-2026-03-01 is deliberately EXCLUDED (unneeded and prevents account-billed advisor tool invocation).
|
|
78272
|
+
"thinking-token-count-2026-05-13",
|
|
78273
|
+
"per-turn-control-2026-07-01",
|
|
78274
|
+
"mid-conversation-tool-changes-2026-07-01"
|
|
78058
78275
|
]), PROVIDER_CONFIGS = {
|
|
78059
78276
|
anthropic: {
|
|
78060
78277
|
upstreamBaseUrl: "https://api.anthropic.com",
|