glimmervoid 0.52.3-next.796 → 0.52.3-next.797
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/bin/glimmervoid.js +10 -10
- package/dist/chunks/{adapters-D8CjVBOd.js → adapters-B_XVQIJK.js} +9 -1
- package/dist/chunks/{adapters-BM1vKzFE.js → adapters-CBkS5mZI.js} +1 -1
- package/dist/chunks/agent-api-cli-DYOQ8L-l.js +1 -0
- package/dist/chunks/{agent-api-cli-CSQrXFV8.js → agent-api-cli-DYkvDUbz.js} +1 -1
- package/dist/chunks/{agent-api-core-DRIparbO.js → agent-api-core-BYD75SqQ.js} +8 -4
- package/dist/chunks/{host-cli-B7PnSltG.js → host-cli-Bp0FnXzj.js} +1 -1
- package/dist/chunks/{main-CZQ_0_7o.js → main-CMPtfCNQ.js} +142 -78
- package/dist/chunks/{packs-cli-BlDRl_DI.js → packs-cli--VV7Q8t7.js} +1 -1
- package/dist/chunks/{pr-flows-cli-e1pBc0Y_.js → pr-flows-cli-ZzJODtFF.js} +2 -2
- package/dist/chunks/{settings-cli-DlCLA4TL.js → settings-cli-Btsc_9cB.js} +1 -1
- package/dist/chunks/settings-cli-vrhReIp6.js +1 -0
- package/dist/chunks/{ssh-sign-cli-C2VZA613.js → ssh-sign-cli-DxoA8nck.js} +1 -1
- package/dist/client/assets/{action-status-BuNMVnRh.js → action-status-BrScMH_c.js} +1 -1
- package/dist/client/assets/action-status-BrScMH_c.js.br +0 -0
- package/dist/client/assets/{agent-mark-Cl3V4zSh.js → agent-mark-BLJ3-wBy.js} +1 -1
- package/dist/client/assets/agent-mark-BLJ3-wBy.js.br +0 -0
- package/dist/client/assets/{arena-panel-Du478NKD.js → arena-panel-D8hYuCwJ.js} +2 -2
- package/dist/client/assets/arena-panel-D8hYuCwJ.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-DlkCcgSm.js → benchmark-panel-Ci9s_KVC.js} +1 -1
- package/dist/client/assets/benchmark-panel-Ci9s_KVC.js.br +0 -0
- package/dist/client/assets/{boards-view-DoZWTHcX.js → boards-view-DQfa5eLa.js} +1 -1
- package/dist/client/assets/boards-view-DQfa5eLa.js.br +0 -0
- package/dist/client/assets/{button-BZKKRkAO.js → button-D7G4xGjv.js} +1 -1
- package/dist/client/assets/button-D7G4xGjv.js.br +0 -0
- package/dist/client/assets/{card-actions-wUzC48xn.js → card-actions-BsNOIhdE.js} +1 -1
- package/dist/client/assets/{card-registry-DeJCxQOx.js → card-registry-BmDvwmXx.js} +1 -1
- package/dist/client/assets/card-registry-BmDvwmXx.js.br +0 -0
- package/dist/client/assets/{celebration-player-B6AZVXkR.js → celebration-player-DkNqEQs0.js} +1 -1
- package/dist/client/assets/celebration-player-DkNqEQs0.js.br +0 -0
- package/dist/client/assets/{chart-readout-CHpiGTMc.js → chart-readout-1rFuHzft.js} +1 -1
- package/dist/client/assets/{community-panel-COZep0z8.js → community-panel-D-fRUQXd.js} +1 -1
- package/dist/client/assets/community-panel-D-fRUQXd.js.br +0 -0
- package/dist/client/assets/{control-ws-DzxzsvLv.js → control-ws-CWs6L8WY.js} +1 -1
- package/dist/client/assets/control-ws-CWs6L8WY.js.br +0 -0
- package/dist/client/assets/{dialogs-BYL72xde.js → dialogs-DgzW_Jf-.js} +1 -1
- package/dist/client/assets/dialogs-DgzW_Jf-.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-CAj5bmnv.js → doc-editor-ui-CBSShPeC.js} +1 -1
- package/dist/client/assets/doc-editor-ui-CBSShPeC.js.br +0 -0
- package/dist/client/assets/{dom-helpers-DGbgEgul.js → dom-helpers-n8_Z2cD6.js} +1 -1
- package/dist/client/assets/dom-helpers-n8_Z2cD6.js.br +0 -0
- package/dist/client/assets/{feature-hint-BhETSIWY.js → feature-hint-DQPhZKwZ.js} +1 -1
- package/dist/client/assets/feature-hint-DQPhZKwZ.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-BsQA5LVE.js → first-run-checklist-BkSa0K1Z.js} +1 -1
- package/dist/client/assets/first-run-checklist-BkSa0K1Z.js.br +0 -0
- package/dist/client/assets/{flying-animal-preview-BdBQlwXk.js → flying-animal-preview-2JUBGLhu.js} +1 -1
- package/dist/client/assets/{hooks-panel-DI6rmg-Q.js → hooks-panel-D4RTjAzn.js} +1 -1
- package/dist/client/assets/hooks-panel-D4RTjAzn.js.br +0 -0
- package/dist/client/assets/index-CZVxnIQy.js +75 -0
- package/dist/client/assets/index-CZVxnIQy.js.br +0 -0
- package/dist/client/assets/{issues-panel-_wCMOQfE.js → issues-panel-C94GuqS1.js} +1 -1
- package/dist/client/assets/issues-panel-C94GuqS1.js.br +0 -0
- package/dist/client/assets/{lane-read-token-step-DnczTywZ.js → lane-read-token-step-CTWApqnN.js} +1 -1
- package/dist/client/assets/lane-read-token-step-CTWApqnN.js.br +0 -0
- package/dist/client/assets/{menu-DKkGG1mD.js → menu-B5bEvFHu.js} +1 -1
- package/dist/client/assets/menu-B5bEvFHu.js.br +0 -0
- package/dist/client/assets/{modal-B-ac519L.js → modal-DA6-ZSaG.js} +1 -1
- package/dist/client/assets/modal-DA6-ZSaG.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-Dh2TDGVu.js → my-prs-panel-DeSizB9c.js} +1 -1
- package/dist/client/assets/my-prs-panel-DeSizB9c.js.br +0 -0
- package/dist/client/assets/{nyan-cat-DwCbD37j.js → nyan-cat-BKOzYmfs.js} +1 -1
- package/dist/client/assets/nyan-cat-BKOzYmfs.js.br +0 -0
- package/dist/client/assets/{phone-shell-B4yIe2La.js → phone-shell-CYeffORS.js} +1 -1
- package/dist/client/assets/phone-shell-CYeffORS.js.br +0 -0
- package/dist/client/assets/{plan-face-DA60w7il.js → plan-face-WiBGXzD9.js} +1 -1
- package/dist/client/assets/plan-face-WiBGXzD9.js.br +0 -0
- package/dist/client/assets/{plan-render-4hu9U0By.js → plan-render-ormCE8dC.js} +1 -1
- package/dist/client/assets/plan-render-ormCE8dC.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-DJDnf_z_.js → pr-queue-columns-rs97KEjC.js} +1 -1
- package/dist/client/assets/pr-queue-columns-rs97KEjC.js.br +0 -0
- package/dist/client/assets/{pr-status-icon-CgEk5wpC.js → pr-status-icon-BQIa60V9.js} +1 -1
- package/dist/client/assets/pr-status-icon-BQIa60V9.js.br +0 -0
- package/dist/client/assets/{radar-panel-g-kvcQyJ.js → radar-panel-PKw_Tl2c.js} +1 -1
- package/dist/client/assets/radar-panel-PKw_Tl2c.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-CZcozy8k.js → repo-roots-adder-De3ymgOn.js} +1 -1
- package/dist/client/assets/repo-roots-adder-De3ymgOn.js.br +0 -0
- package/dist/client/assets/{resume-dialog-D3OlL8Gu.js → resume-dialog-CwXFll7F.js} +1 -1
- package/dist/client/assets/resume-dialog-CwXFll7F.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-BEZZ5L5P.js → review-queue-panel-BJmOpJf5.js} +1 -1
- package/dist/client/assets/review-queue-panel-BJmOpJf5.js.br +0 -0
- package/dist/client/assets/{session-actions-QVKyPetQ.js → session-actions-BVpTX6xB.js} +2 -2
- package/dist/client/assets/session-actions-BVpTX6xB.js.br +0 -0
- package/dist/client/assets/{session-row-BRvZTznX.js → session-row-DL6lv4ZP.js} +1 -1
- package/dist/client/assets/session-row-DL6lv4ZP.js.br +0 -0
- package/dist/client/assets/{session-tick-Bi93hGkg.js → session-tick-8iC67EJq.js} +1 -1
- package/dist/client/assets/session-tick-8iC67EJq.js.br +0 -0
- package/dist/client/assets/{settings-panel-COSfSGET.js → settings-panel-CjXHBHaC.js} +2 -2
- package/dist/client/assets/settings-panel-CjXHBHaC.js.br +0 -0
- package/dist/client/assets/{setup-step-BBseKWiY.js → setup-step-DWkRknLn.js} +1 -1
- package/dist/client/assets/setup-step-DWkRknLn.js.br +0 -0
- package/dist/client/assets/{trace-panel-BaUvjJiY.js → trace-panel-cAlOrXQP.js} +1 -1
- package/dist/client/assets/trace-panel-cAlOrXQP.js.br +0 -0
- package/dist/client/assets/{ui-prefs-ZaJh9NjT.js → ui-prefs-CvA86s8z.js} +1 -1
- package/dist/client/assets/ui-prefs-CvA86s8z.js.br +0 -0
- package/dist/client/assets/{usage-panel-CAHQQ4z7.js → usage-panel-nNEpBTmH.js} +1 -1
- package/dist/client/assets/usage-panel-nNEpBTmH.js.br +0 -0
- package/dist/client/assets/{your-day-tip-AlMatjnT.js → your-day-tip-DcRzPMSF.js} +1 -1
- package/dist/client/assets/your-day-tip-DcRzPMSF.js.br +0 -0
- package/dist/client/index.html +15 -15
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/agent-api-cli-IiFozv5s.js +0 -1
- package/dist/chunks/settings-cli-CJcQVWnd.js +0 -1
- package/dist/client/assets/action-status-BuNMVnRh.js.br +0 -0
- package/dist/client/assets/agent-mark-Cl3V4zSh.js.br +0 -0
- package/dist/client/assets/arena-panel-Du478NKD.js.br +0 -0
- package/dist/client/assets/benchmark-panel-DlkCcgSm.js.br +0 -0
- package/dist/client/assets/boards-view-DoZWTHcX.js.br +0 -0
- package/dist/client/assets/button-BZKKRkAO.js.br +0 -0
- package/dist/client/assets/card-registry-DeJCxQOx.js.br +0 -0
- package/dist/client/assets/celebration-player-B6AZVXkR.js.br +0 -0
- package/dist/client/assets/community-panel-COZep0z8.js.br +0 -0
- package/dist/client/assets/control-ws-DzxzsvLv.js.br +0 -0
- package/dist/client/assets/dialogs-BYL72xde.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-CAj5bmnv.js.br +0 -0
- package/dist/client/assets/dom-helpers-DGbgEgul.js.br +0 -0
- package/dist/client/assets/feature-hint-BhETSIWY.js.br +0 -0
- package/dist/client/assets/first-run-checklist-BsQA5LVE.js.br +0 -0
- package/dist/client/assets/hooks-panel-DI6rmg-Q.js.br +0 -0
- package/dist/client/assets/index-DDClR54l.js +0 -75
- package/dist/client/assets/index-DDClR54l.js.br +0 -0
- package/dist/client/assets/issues-panel-_wCMOQfE.js.br +0 -0
- package/dist/client/assets/lane-read-token-step-DnczTywZ.js.br +0 -0
- package/dist/client/assets/menu-DKkGG1mD.js.br +0 -0
- package/dist/client/assets/modal-B-ac519L.js.br +0 -0
- package/dist/client/assets/my-prs-panel-Dh2TDGVu.js.br +0 -0
- package/dist/client/assets/nyan-cat-DwCbD37j.js.br +0 -0
- package/dist/client/assets/phone-shell-B4yIe2La.js.br +0 -0
- package/dist/client/assets/plan-face-DA60w7il.js.br +0 -0
- package/dist/client/assets/plan-render-4hu9U0By.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-DJDnf_z_.js.br +0 -0
- package/dist/client/assets/pr-status-icon-CgEk5wpC.js.br +0 -0
- package/dist/client/assets/radar-panel-g-kvcQyJ.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-CZcozy8k.js.br +0 -0
- package/dist/client/assets/resume-dialog-D3OlL8Gu.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BEZZ5L5P.js.br +0 -0
- package/dist/client/assets/session-actions-QVKyPetQ.js.br +0 -0
- package/dist/client/assets/session-row-BRvZTznX.js.br +0 -0
- package/dist/client/assets/session-tick-Bi93hGkg.js.br +0 -0
- package/dist/client/assets/settings-panel-COSfSGET.js.br +0 -0
- package/dist/client/assets/setup-step-BBseKWiY.js.br +0 -0
- package/dist/client/assets/trace-panel-BaUvjJiY.js.br +0 -0
- package/dist/client/assets/ui-prefs-ZaJh9NjT.js.br +0 -0
- package/dist/client/assets/usage-panel-CAHQQ4z7.js.br +0 -0
- package/dist/client/assets/your-day-tip-AlMatjnT.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as AGENT_API_VERBS } from "../chunks/session-D35zeesj.js";
|
|
3
3
|
import { a as execSync } from "../chunks/child-process-safe-NR7PjPcL.js";
|
|
4
|
-
import { at as parseCommand, it as isOwnedCommandName, r as agentCommandHelpLines, rt as OWNED_COMMAND_SPECS } from "../chunks/agent-api-core-
|
|
4
|
+
import { at as parseCommand, it as isOwnedCommandName, r as agentCommandHelpLines, rt as OWNED_COMMAND_SPECS } from "../chunks/agent-api-core-BYD75SqQ.js";
|
|
5
5
|
import { t as renderTable } from "../chunks/ascii-figure-core-BegIbndz.js";
|
|
6
6
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "../chunks/config-path-core-qUZH9-0F.js";
|
|
7
7
|
import { i as parseCommandLine, r as gitDoctorRows, t as probeGitVersion } from "../chunks/git-version-Bs9G8R8w.js";
|
|
@@ -78,23 +78,23 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
78
78
|
return runAgentSetupCli();
|
|
79
79
|
},
|
|
80
80
|
settings: async (parsed) => {
|
|
81
|
-
const { runParsedSettingsCli } = await import("../chunks/settings-cli-
|
|
81
|
+
const { runParsedSettingsCli } = await import("../chunks/settings-cli-vrhReIp6.js");
|
|
82
82
|
return runParsedSettingsCli(parsed);
|
|
83
83
|
},
|
|
84
84
|
host: async (parsed) => {
|
|
85
|
-
const { runHostCli } = await import("../chunks/host-cli-
|
|
85
|
+
const { runHostCli } = await import("../chunks/host-cli-Bp0FnXzj.js");
|
|
86
86
|
return runHostCli(parsed);
|
|
87
87
|
},
|
|
88
88
|
"pr-flows": async (parsed) => {
|
|
89
|
-
const { runPrFlowsCheckCli } = await import("../chunks/pr-flows-cli-
|
|
89
|
+
const { runPrFlowsCheckCli } = await import("../chunks/pr-flows-cli-ZzJODtFF.js");
|
|
90
90
|
return runPrFlowsCheckCli(parsed);
|
|
91
91
|
},
|
|
92
92
|
packs: async (parsed) => {
|
|
93
|
-
const { runPacksCli } = await import("../chunks/packs-cli
|
|
93
|
+
const { runPacksCli } = await import("../chunks/packs-cli--VV7Q8t7.js");
|
|
94
94
|
return runPacksCli(parsed);
|
|
95
95
|
},
|
|
96
96
|
"pr-action": async (parsed) => {
|
|
97
|
-
const { runPrActionReportCli } = await import("../chunks/pr-flows-cli-
|
|
97
|
+
const { runPrActionReportCli } = await import("../chunks/pr-flows-cli-ZzJODtFF.js");
|
|
98
98
|
return runPrActionReportCli(parsed);
|
|
99
99
|
},
|
|
100
100
|
watch: async ({ values }) => {
|
|
@@ -105,7 +105,7 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
107
|
"ssh-sign": async ({ rawArgs }) => {
|
|
108
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
108
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-DxoA8nck.js");
|
|
109
109
|
return runSshSignCli(rawArgs);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
@@ -127,7 +127,7 @@ async function runOwnedCommand(name, subcommandArgs) {
|
|
|
127
127
|
return OWNED_COMMAND_RUNNERS[name](parsed);
|
|
128
128
|
}
|
|
129
129
|
var SUBCOMMAND_RUNNERS = new Map([...Object.keys(OWNED_COMMAND_SPECS).filter(isOwnedCommandName).map((name) => [name, (subcommandArgs) => runOwnedCommand(name, subcommandArgs)]), ...AGENT_API_VERBS.filter((verb) => !isOwnedCommandName(verb)).map((verb) => [verb, async (subcommandArgs, subcommandName) => {
|
|
130
|
-
const { runAgentApiCli } = await import("../chunks/agent-api-cli-
|
|
130
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-DYOQ8L-l.js");
|
|
131
131
|
return runAgentApiCli([subcommandName, ...subcommandArgs]);
|
|
132
132
|
}])]);
|
|
133
133
|
var AGENT_INSTALL_COMMAND_BY_ID = {
|
|
@@ -141,7 +141,7 @@ function missingAgentText(agentId) {
|
|
|
141
141
|
}
|
|
142
142
|
async function printSessionLimits() {
|
|
143
143
|
if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
|
|
144
|
-
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-
|
|
144
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-DYOQ8L-l.js");
|
|
145
145
|
const limitsLines = await sessionLimitsHelpLines();
|
|
146
146
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
147
147
|
}
|
|
@@ -274,7 +274,7 @@ async function runDoctor() {
|
|
|
274
274
|
}
|
|
275
275
|
switchSection("Agents");
|
|
276
276
|
try {
|
|
277
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
277
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-CBkS5mZI.js");
|
|
278
278
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
279
279
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
280
280
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -619,7 +619,15 @@ var BUILTIN_PURPOSE_BY_EVENT = Object.freeze({
|
|
|
619
619
|
PostToolUseFailure: "Command hints: name glimmervoid push once, when a git push fails",
|
|
620
620
|
BeforeAgent: "Status detection: a turn started",
|
|
621
621
|
AfterAgent: "Status detection: the turn finished",
|
|
622
|
-
AfterTool: "Status detection: a tool finished, so the turn is working again"
|
|
622
|
+
AfterTool: "Status detection: a tool finished, so the turn is working again",
|
|
623
|
+
sessionStart: "Status detection: the agent started",
|
|
624
|
+
sessionEnd: "Status detection: the agent ended",
|
|
625
|
+
userPromptSubmitted: "Status detection: a turn started",
|
|
626
|
+
agentStop: "Status detection: the turn finished",
|
|
627
|
+
errorOccurred: "Status detection: the turn ended with an error the agent cannot recover from",
|
|
628
|
+
permissionRequest: "Status detection: a permission prompt is open",
|
|
629
|
+
postToolUse: "Status detection: a tool finished, so the turn is working again",
|
|
630
|
+
notification: "Status detection: the agent is waiting on a permission or a question, or went idle"
|
|
623
631
|
});
|
|
624
632
|
function builtinHookPurpose({ event, route }) {
|
|
625
633
|
if (route !== null && isHookToolId(route)) return HOOK_TOOLS[route].purpose;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as describeAgentResolvability, f as listAgentIds, g as setCustomAgents } from "./adapters-
|
|
1
|
+
export { o as describeAgentResolvability, f as listAgentIds, g as setCustomAgents } from "./adapters-B_XVQIJK.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as askAgentApi, n as postToAgentIngress, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-DYkvDUbz.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveHookTarget } from "./hook-relay-core-ne0rkTgG.js";
|
|
2
|
-
import { X as formatSessionLimits, at as parseCommand, i as agentCommandSpec, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-
|
|
2
|
+
import { X as formatSessionLimits, at as parseCommand, i as agentCommandSpec, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-BYD75SqQ.js";
|
|
3
3
|
import { it as STEP_STATUSES, nt as Op, r as AGENT_URL_ENV, st as WhiteboardAgentReply, u as AgentLimitsReply } from "./session-D35zeesj.js";
|
|
4
4
|
import { c as planSteps, l as stepBoxesOf, o as dependencyWireId, r as layoutBoard, s as dependencyWireIdsInto, t as boardSvgDocument } from "./whiteboard-svg-core-CxtsKCj7.js";
|
|
5
5
|
import { t as parseJsonOrNull } from "./json-core-B1ov-SNz.js";
|
|
@@ -1020,8 +1020,11 @@ function resumePromptFor(project) {
|
|
|
1020
1020
|
return project?.wasWorking === true ? AUTO_CONTINUE_PROMPT : null;
|
|
1021
1021
|
}
|
|
1022
1022
|
// session/core/task-title-core.ts
|
|
1023
|
+
function firstCodePoints(text, maxCodePoints) {
|
|
1024
|
+
return Array.from(text).slice(0, maxCodePoints).join("");
|
|
1025
|
+
}
|
|
1023
1026
|
function normalizeTaskTitle(title) {
|
|
1024
|
-
return title.replace(new RegExp(TASK_TITLE_CONTROL_CHARACTERS.source, "g"), " ").replace(/\s+/g, " ").trim()
|
|
1027
|
+
return firstCodePoints(title.replace(new RegExp(TASK_TITLE_CONTROL_CHARACTERS.source, "g"), " ").replace(/\s+/g, " ").trim(), 120).trimEnd() || null;
|
|
1025
1028
|
}
|
|
1026
1029
|
function extractAiTitle(tail, hasPartialFirstLine = false) {
|
|
1027
1030
|
const lines = tail.split("\n");
|
|
@@ -1062,9 +1065,10 @@ function extractPromptTaskTitle(prompt) {
|
|
|
1062
1065
|
if (typeof prompt !== "string") return null;
|
|
1063
1066
|
const collapsed = cleanTaskPrompt(prompt);
|
|
1064
1067
|
if (!collapsed || collapsed.startsWith("/")) return null;
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
+
const promptCodePoints = Array.from(collapsed);
|
|
1069
|
+
if (promptCodePoints.length <= 60) return normalizeTaskTitle(collapsed);
|
|
1070
|
+
const prefix = promptCodePoints.slice(0, 57).join("");
|
|
1071
|
+
const wordBoundary = promptCodePoints[57] === " " ? prefix.length : prefix.lastIndexOf(" ");
|
|
1068
1072
|
return `${prefix.slice(0, wordBoundary > 0 ? wordBoundary : prefix.length).trimEnd()}...`;
|
|
1069
1073
|
}
|
|
1070
1074
|
function resolveTaskTitle(sources) {
|
|
@@ -2,7 +2,7 @@ import { i as HostEntries } from "./control-messages-ZpaRVTaU.js";
|
|
|
2
2
|
import { r as errorMessage } from "./text-B-FVrk4J.js";
|
|
3
3
|
import { t as renderTable } from "./ascii-figure-core-BegIbndz.js";
|
|
4
4
|
import { r as removeHostFrom, t as addHostTo } from "./host-registry-core-Dz2PDbWA.js";
|
|
5
|
-
import { i as saveValidatedConfig, n as requireView, t as processIo } from "./settings-cli-
|
|
5
|
+
import { i as saveValidatedConfig, n as requireView, t as processIo } from "./settings-cli-Btsc_9cB.js";
|
|
6
6
|
// server/hosts/host-cli.ts
|
|
7
7
|
var DEFAULT_DASHBOARD_PORT = 3e3;
|
|
8
8
|
function registeredHosts() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as codexSessionIdFromPath, $t as removalsJournalPath, A as pickNewestPublished, At as vendorUsageEntry, B as planUploadRetention, Bt as agentHookGroupOf, C as decideUpdateStatus, Ct as identityFromRelPath, D as parseRegistryDeprecation, Dt as parseUsageLine, E as normalizeUpdateChannel, Et as parseJsonLine, F as decideUploadType, Ft as generateToken, G as containmentRefusalReason, Gt as readStoredHooks, H as TRACE_TAIL_SCAN_BYTES, Ht as hooksForProject, I as exceedsUploadCap, It as sweepOrphans, J as resumeOffsetFrom, Jt as makeHostScratchDirectory, K as isOversizedPartialLine, Kt as removeHook, L as framePathPaste, Lt as writeSessionSettings, M as openContainedFile, Mt as HOOK_EVENTS, N as MAX_UPLOAD_BYTES, Nt as PLAN_HOLD_RELEASE_MS, O as parseRegistryLatest, Ot as shouldReplace, P as buildUploadFilename, Pt as buildHookSettings, Q as codexRootCandidates, Qt as recordSweptPath, R as imageMimeForUploadFilename, Rt as HOOK_EVENT_CATALOG, S as decideInstallFlavor, St as foldReplacementIntoGenerationRollup, T as normalizeSha, Tt as mergeGenerationRollups, U as committedOffsetFromTraceTailOrNull, Ut as normalizeHook, V as MAX_TRANSCRIPT_READ_BYTES, Vt as appendUserHooks, W as completeLineBytes, Wt as rawStoredHooks, X as codexFallbackRoots, Xt as appendRemovalRecord, Y as withCommittedOffset, Yt as sweepOrphanedHostScratch, Z as codexHomes, Zt as appendRemovalRecordSync, _ as folderTrustRoot, _t as addEntryToTotals, a as customAgentFingerprint, at as isUsageFile, b as requestCodexAppServer, bt as expandAdvisorIterations, c as hookProfileOf, ct as projectDirCandidates, d as isKnownAgentId, dt as sessionsRootCandidates, en as listClaudeGlobalConfigPathCandidates, et as continuationDelayMs, f as listAgentIds, ft as shouldEvaluateDespiteIoFailures, g as setCustomAgents, gt as parseKimiUsageLine, h as resolveAdapter, ht as kimiDedupIdentity, i as commandFor, it as grokHomes, j as shortSha, jt as claudeCode, k as parseResolvedSha, kt as totalTokensOf$1, l as isBuiltInAgentId, lt as resolveProjectsDirs, m as resetCommandCache, mt as splitLines, n as DEFAULT_AGENT_ID$1, nt as dedupeCodexFiles, o as describeAgentResolvability, ot as kimiHomes, p as projectHookConfigRelPaths, pt as shouldPersistWarehouse, q as planContiguousRead, qt as upsertHook, r as cachedAgentResolvability, rt as expandTilde, s as getAdapter, st as passOutcome, tt as decideFileRead, u as isFirstClassAgent, ut as scopedClaudeRoots, v as codex, vt as dedupKeys, w as isCheckFresh, wt as isWithinGenerationRecencyWindow, x as NODE_PTY_INSTALL_SCRIPT_FLAG, xt as foldEntryIntoGenerationRollup, y as readHostCodexVersion, yt as emptyTotals, z as isSafePathSegment, zt as ID_RE } from "./adapters-
|
|
1
|
+
import { $ as codexSessionIdFromPath, $t as removalsJournalPath, A as pickNewestPublished, At as vendorUsageEntry, B as planUploadRetention, Bt as agentHookGroupOf, C as decideUpdateStatus, Ct as identityFromRelPath, D as parseRegistryDeprecation, Dt as parseUsageLine, E as normalizeUpdateChannel, Et as parseJsonLine, F as decideUploadType, Ft as generateToken, G as containmentRefusalReason, Gt as readStoredHooks, H as TRACE_TAIL_SCAN_BYTES, Ht as hooksForProject, I as exceedsUploadCap, It as sweepOrphans, J as resumeOffsetFrom, Jt as makeHostScratchDirectory, K as isOversizedPartialLine, Kt as removeHook, L as framePathPaste, Lt as writeSessionSettings, M as openContainedFile, Mt as HOOK_EVENTS, N as MAX_UPLOAD_BYTES, Nt as PLAN_HOLD_RELEASE_MS, O as parseRegistryLatest, Ot as shouldReplace, P as buildUploadFilename, Pt as buildHookSettings, Q as codexRootCandidates, Qt as recordSweptPath, R as imageMimeForUploadFilename, Rt as HOOK_EVENT_CATALOG, S as decideInstallFlavor, St as foldReplacementIntoGenerationRollup, T as normalizeSha, Tt as mergeGenerationRollups, U as committedOffsetFromTraceTailOrNull, Ut as normalizeHook, V as MAX_TRANSCRIPT_READ_BYTES, Vt as appendUserHooks, W as completeLineBytes, Wt as rawStoredHooks, X as codexFallbackRoots, Xt as appendRemovalRecord, Y as withCommittedOffset, Yt as sweepOrphanedHostScratch, Z as codexHomes, Zt as appendRemovalRecordSync, _ as folderTrustRoot, _t as addEntryToTotals, a as customAgentFingerprint, at as isUsageFile, b as requestCodexAppServer, bt as expandAdvisorIterations, c as hookProfileOf, ct as projectDirCandidates, d as isKnownAgentId, dt as sessionsRootCandidates, en as listClaudeGlobalConfigPathCandidates, et as continuationDelayMs, f as listAgentIds, ft as shouldEvaluateDespiteIoFailures, g as setCustomAgents, gt as parseKimiUsageLine, h as resolveAdapter, ht as kimiDedupIdentity, i as commandFor, it as grokHomes, j as shortSha, jt as claudeCode, k as parseResolvedSha, kt as totalTokensOf$1, l as isBuiltInAgentId, lt as resolveProjectsDirs, m as resetCommandCache, mt as splitLines, n as DEFAULT_AGENT_ID$1, nt as dedupeCodexFiles, o as describeAgentResolvability, ot as kimiHomes, p as projectHookConfigRelPaths, pt as shouldPersistWarehouse, q as planContiguousRead, qt as upsertHook, r as cachedAgentResolvability, rt as expandTilde, s as getAdapter, st as passOutcome, tt as decideFileRead, u as isFirstClassAgent, ut as scopedClaudeRoots, v as codex, vt as dedupKeys, w as isCheckFresh, wt as isWithinGenerationRecencyWindow, x as NODE_PTY_INSTALL_SCRIPT_FLAG, xt as foldEntryIntoGenerationRollup, y as readHostCodexVersion, yt as emptyTotals, z as isSafePathSegment, zt as ID_RE } from "./adapters-B_XVQIJK.js";
|
|
2
2
|
import { $ as buildExceptionProperties, B as isExperimentalSetting, D as SETTINGS_INDEX, E as validateSettingsBlock, G as parseDataAttach, J as TELEMETRY_BATCH_URL, K as parseDataClientMessage, L as valueAtPath, Q as buildBrowserExceptionProperties, T as settingsBlockSpecFor, U as LOGGED_FAST_CLOSE_COUNTS, V as DEEP_HISTORY_SCROLLBACK_LINES, W as describeDataAttach, X as adapterBucket, Y as TELEMETRY_FLAGS_URL, Z as buildAiGenerationEvents, _ as sessionIdFromBranch, _t as stableConfigKey, a as generateProjectId, at as decideRemoteTelemetryState, ct as nodeMajorVersion, d as DEFAULT_CONFIG, dt as DashboardTelemetryReport, et as buildPersonProperties, f as DEFAULT_BRANCH_GC_PREFIXES, ft as PendingCrashReport, g as planWorktreeGc, h as planBranchGc, i as ensureProjectIds, it as decideIsDevInstall, lt as parsePosthogReleaseId, m as matchedPrefix, mt as TelemetryState, n as createConfigStore, nt as claudeAccountUuidOf, o as glimmervoidHomeDir, ot as decideTelemetryConsent, p as isGcCandidateWorktree, pt as TELEMETRY_EVENT_SCHEMAS, q as FIRST_RUN_NOTICE, r as ABORT_CONFIG_SAVE, rt as codexUserIdOf, st as exceptionFingerprint, tt as classifySessionExit, ut as resolveProjectToken, v as usablePrefixes, w as mergeSettingsBlock, y as worktreeIntegrationTips } from "./config-store-oSltTiSd.js";
|
|
3
3
|
import { C as parseCgroupBytes, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, g as createSerialQueue, h as createMemoryAdmission, i as createJsonStateWriter, m as createKeyedSerialQueue, n as appendJsonLines, o as loadJsonStateFile, p as writeTextAtomicSync, r as createJsonStateStore, s as loadJsonStateFileSync, t as appendJsonLine, u as writeJsonAtomic, v as isQueueAdmissionTimeout, w as parseCgroupV2Path, x as headroomFromReadings, y as cgroupAncestorPaths } from "./json-file-DZEFaNmG.js";
|
|
4
4
|
import { a as sanitizeWorktreeName, i as safePathSegment, n as equalsIgnoringCaseOnWindows, r as isPathInside, t as caseFoldedPathKey } from "./paths-C2u2R_6l.js";
|
|
@@ -10,7 +10,7 @@ import { Bt as HookEnvelope, C as BenchmarkId, D as BenchmarkSuite, E as Benchma
|
|
|
10
10
|
import { An as PrFlowRule, At as MyPrsSnapshot, B as SshSignRequest, C as CONVERSATION_TOOL_RESULT_HOOK_EVENT, Cn as PrFlowDisposeRequest, E as REQUEST_USER_INPUT_TOOL_NAME, En as PrFlowItemRequest, F as SSH_SIGN_BODY_CAP_BYTES, Fn as PrFlowsState, Gn as HEX_SHA_RE, H as TaskTitle, It as CommitSha$1, K as Board, Kn as shortSha$1, M as SESSION_NAME_RULE_TEXT, N as SHOWN_FILE_CAP_BYTES, P as SIGN_URL_ENV, Pn as PrFlowsSettings, S as CONVERSATION_PERMISSION_HOOK_EVENT, T as ConversationQuestion, Vn as prActionReportPath, W as BOARD_MEDIA_MAX_EDGE_PX, X as Box, Xn as repoParts, Yt as ReviewDraft, _ as AgentSettingsRequest, _t as MyPrKeepMergeableRequest, an as TeamReviewStatus, ar as STATES, at as WHITEBOARD_ASSET_ROUTE, b as COHERENCE_HOOKS_INACTIVE, bn as PrActionRunRequest, c as AgentCloseRequest, d as AgentPacksRequest, dt as sparseBoardReply, en as TeamReviewActionRequest, et as Frame, f as AgentPullRequestRequest, fn as hasStandingViewerApproval, ft as LinkedPr, gn as PR_ACTION_TOKEN_ENV, hn as PR_ACTION_REPORT_URL_ENV, i as ASK_USER_QUESTION_TOOL_NAME, in as TeamReviewStateEntry, ir as RESTARTABLE_STATES, j as SESSION_NAME_PATTERN, jn as PrFlowSaveRuleRequest, k as SESSION_DOC_BODY_CAP_BYTES, l as AgentEditRequest, lt as Wire, mn as PR_ACTION_REPORT_ROUTE, nr as KILLABLE_STATES, nt as Op, o as AgentAttentionRequest, ot as WHITEBOARD_LIMITS, pn as PR_ACTION_REPORT_BODY_CAP_BYTES, q as BoardRecord, qn as GH_SEGMENT, r as AGENT_URL_ENV, rr as MERGEABLE_LIVE_STATES, rt as Panel, tr as BADGE_LABELS, tt as Note, ut as sparseBoardRecord, v as AgentSpawnRequest, wt as MyPrMergeWhenReadyRequest, x as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, xn as PrFlowApproveRequest, xt as MyPrMergeRequest, y as AgentWhyRequest, yn as PrActionReportBody } from "./session-D35zeesj.js";
|
|
11
11
|
import { a as QUESTION_ANSWERED_NOTIFY_CATEGORY, c as QuestionManagerSettings, i as ManagerLaneResult, n as MANAGER_DECISION_EVENT, r as ManagerDecision, t as MANAGER_DECISION_AUDIT_KIND } from "./question-manager-C_RzS1Ot.js";
|
|
12
12
|
import { n as promptContextReplyOf, o as toolHookContextReplyOf, r as refocusReplyFor, t as REFOCUS_NOTE } from "./refocus-core-DlEDNY3E.js";
|
|
13
|
-
import { $ as promptHintFor, A as isSelfWakePrompt, B as pickAutoResume, C as cleanTaskPrompt, D as extractNotifiedTaskIds, E as extractHookTaskTitle, F as resolveTaskTitle, G as listRepoConversations, H as resumePromptFor, I as seedTaskTitleSources, J as nextSuggestedName, K as listRepoWorktreePaths, L as AUTO_CONTINUE_PROMPT, M as parseRefinedSessionName, N as parseRefinedTaskTitle, O as extractOscTaskTitle, P as resolveRefocusTaskTitle, Q as permitsHelpCommand, R as RESUME_ID_RE, S as chooseRefinedSessionName, T as extractAiTitle, U as shouldAdoptReportedResumeId, V as resolveResumeTarget, W as claudeProjectsDir, Y as describeSessionLimits, Z as hintFor, _ as projectReviewDetail, a as checkAgentReply, b as buildPersistedTaskTitle, c as deriveChildSessionName, d as describePushLanding, et as routeAgentNotes, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as isSubstantivePrompt, k as extractPromptTaskTitle, l as describeChildEndNote, n as REFUSAL_REASON, nt as toolHookFactsOf, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as isAutoNameOf, s as decideSpawnAllowance, tt as supervisionLine, u as describeKeptChildAttention, v as projectReviews, w as decideTaskTitleRefinement, x as buildTaskTitleRefinementPrompt, y as tokensMatch, z as isConversationReplacedAtStartup } from "./agent-api-core-
|
|
13
|
+
import { $ as promptHintFor, A as isSelfWakePrompt, B as pickAutoResume, C as cleanTaskPrompt, D as extractNotifiedTaskIds, E as extractHookTaskTitle, F as resolveTaskTitle, G as listRepoConversations, H as resumePromptFor, I as seedTaskTitleSources, J as nextSuggestedName, K as listRepoWorktreePaths, L as AUTO_CONTINUE_PROMPT, M as parseRefinedSessionName, N as parseRefinedTaskTitle, O as extractOscTaskTitle, P as resolveRefocusTaskTitle, Q as permitsHelpCommand, R as RESUME_ID_RE, S as chooseRefinedSessionName, T as extractAiTitle, U as shouldAdoptReportedResumeId, V as resolveResumeTarget, W as claudeProjectsDir, Y as describeSessionLimits, Z as hintFor, _ as projectReviewDetail, a as checkAgentReply, b as buildPersistedTaskTitle, c as deriveChildSessionName, d as describePushLanding, et as routeAgentNotes, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as isSubstantivePrompt, k as extractPromptTaskTitle, l as describeChildEndNote, n as REFUSAL_REASON, nt as toolHookFactsOf, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as isAutoNameOf, s as decideSpawnAllowance, tt as supervisionLine, u as describeKeptChildAttention, v as projectReviews, w as decideTaskTitleRefinement, x as buildTaskTitleRefinementPrompt, y as tokensMatch, z as isConversationReplacedAtStartup } from "./agent-api-core-BYD75SqQ.js";
|
|
14
14
|
import { a as mcpLaunchFor, o as parsePresentedCredential } from "./agent-config-BJVJpVzX.js";
|
|
15
15
|
import { a as cappedWarnings, c as planSteps$1, i as layoutBoardWithMemory, l as stepBoxesOf, n as escapeMarkup, o as dependencyWireId, r as layoutBoard, t as boardSvgDocument } from "./whiteboard-svg-core-CxtsKCj7.js";
|
|
16
16
|
import { a as ConfigUpdate, c as SHELL_AGENT_ID, f as USAGE_COST_MODES, n as BUILTIN_AGENT_IDS, p as USAGE_VENDOR_KEYS, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, u as configIssueMessage } from "./config-BEqUQAa4.js";
|
|
@@ -7954,10 +7954,10 @@ var REPLAYABLE_EXACT = /* @__PURE__ */ new Set(["notify", "session-error"]);
|
|
|
7954
7954
|
function isReplayable(type) {
|
|
7955
7955
|
return typeof type === "string" && REPLAYABLE_EXACT.has(type);
|
|
7956
7956
|
}
|
|
7957
|
-
function createReplayLog({ maxEntries = 500, maxAgeMs = 3e5 } = {}) {
|
|
7957
|
+
function createReplayLog({ maxEntries = 500, maxAgeMs = 3e5, firstSeq = Date.now() } = {}) {
|
|
7958
7958
|
const ring = [];
|
|
7959
|
-
let seq =
|
|
7960
|
-
let evictedUpTo =
|
|
7959
|
+
let seq = firstSeq;
|
|
7960
|
+
let evictedUpTo = firstSeq;
|
|
7961
7961
|
function evictStale(now) {
|
|
7962
7962
|
while (ring.length && now - ring[0].ts > maxAgeMs) {
|
|
7963
7963
|
evictedUpTo = ring[0].seq;
|
|
@@ -14238,16 +14238,24 @@ function createSessionOutput(options) {
|
|
|
14238
14238
|
const keeperFactory = options.screenKeeperFactory || createScreenKeeper;
|
|
14239
14239
|
let keeper = null;
|
|
14240
14240
|
let keeperBaseOffset = 0;
|
|
14241
|
-
|
|
14241
|
+
const queuedPastes = [];
|
|
14242
|
+
let isWatchingForReady = false;
|
|
14243
|
+
let isDrainingQueue = false;
|
|
14244
|
+
let drainTimer = null;
|
|
14242
14245
|
let lastCols = null;
|
|
14243
14246
|
let lastRows = null;
|
|
14247
|
+
function stopWatchingForReady() {
|
|
14248
|
+
if (!isWatchingForReady) return;
|
|
14249
|
+
isWatchingForReady = false;
|
|
14250
|
+
options.off("state-change", onStateChangeWhilePasteQueued);
|
|
14251
|
+
}
|
|
14244
14252
|
function clearPendingPaste() {
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14253
|
+
for (const queued of queuedPastes) clearTimeout(queued.expiryTimer);
|
|
14254
|
+
queuedPastes.length = 0;
|
|
14255
|
+
if (drainTimer) clearTimeout(drainTimer);
|
|
14256
|
+
drainTimer = null;
|
|
14257
|
+
isDrainingQueue = false;
|
|
14258
|
+
stopWatchingForReady();
|
|
14251
14259
|
}
|
|
14252
14260
|
function pasteText(text) {
|
|
14253
14261
|
if (!options.hasLivePty()) return {
|
|
@@ -14265,19 +14273,57 @@ function createSessionOutput(options) {
|
|
|
14265
14273
|
}, submitDelayMs).unref();
|
|
14266
14274
|
return pasted;
|
|
14267
14275
|
}
|
|
14268
|
-
function
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
const settleTimer = setTimeout(() => {
|
|
14276
|
+
function pasteNextQueued() {
|
|
14277
|
+
drainTimer = null;
|
|
14278
|
+
const next = queuedPastes.shift();
|
|
14279
|
+
if (!next || options.isDestroyed()) {
|
|
14273
14280
|
clearPendingPaste();
|
|
14274
|
-
|
|
14275
|
-
}
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
}
|
|
14281
|
+
return;
|
|
14282
|
+
}
|
|
14283
|
+
clearTimeout(next.expiryTimer);
|
|
14284
|
+
if (!pasteText(next.text).ok) {
|
|
14285
|
+
clearPendingPaste();
|
|
14286
|
+
return;
|
|
14287
|
+
}
|
|
14288
|
+
if (next.submitDelayMs === null) {
|
|
14289
|
+
pasteNextQueued();
|
|
14290
|
+
return;
|
|
14291
|
+
}
|
|
14292
|
+
drainTimer = setTimeout(() => {
|
|
14293
|
+
if (options.hasLivePty()) options.write("\r");
|
|
14294
|
+
pasteNextQueued();
|
|
14295
|
+
}, next.submitDelayMs);
|
|
14296
|
+
drainTimer.unref();
|
|
14297
|
+
}
|
|
14298
|
+
function startDrainingQueue() {
|
|
14299
|
+
const head = queuedPastes[0];
|
|
14300
|
+
if (!head) return;
|
|
14301
|
+
isDrainingQueue = true;
|
|
14302
|
+
if (head.settleMs <= 0) {
|
|
14303
|
+
pasteNextQueued();
|
|
14304
|
+
return;
|
|
14305
|
+
}
|
|
14306
|
+
drainTimer = setTimeout(pasteNextQueued, head.settleMs);
|
|
14307
|
+
drainTimer.unref();
|
|
14308
|
+
}
|
|
14309
|
+
function onStateChangeWhilePasteQueued({ to }) {
|
|
14310
|
+
if (!PASTE_READY_STATES.has(to)) return;
|
|
14311
|
+
stopWatchingForReady();
|
|
14312
|
+
startDrainingQueue();
|
|
14313
|
+
}
|
|
14314
|
+
function dropExpiredPaste(expired) {
|
|
14315
|
+
const expiredIndex = queuedPastes.indexOf(expired);
|
|
14316
|
+
if (expiredIndex === -1) return;
|
|
14317
|
+
queuedPastes.splice(expiredIndex, 1);
|
|
14318
|
+
if (queuedPastes.length === 0 && !isDrainingQueue) stopWatchingForReady();
|
|
14319
|
+
}
|
|
14320
|
+
function enqueueAheadOfUnsubmittedPastes(queued) {
|
|
14321
|
+
const firstUnsubmittedIndex = queued.submitDelayMs === null ? -1 : queuedPastes.findIndex((waiting) => waiting.submitDelayMs === null);
|
|
14322
|
+
if (firstUnsubmittedIndex === -1) {
|
|
14323
|
+
queuedPastes.push(queued);
|
|
14324
|
+
return;
|
|
14325
|
+
}
|
|
14326
|
+
queuedPastes.splice(firstUnsubmittedIndex, 0, queued);
|
|
14281
14327
|
}
|
|
14282
14328
|
function pasteTextWhenReady(text, { timeoutMs = 12e4, settleMs = 0, submitDelayMs = null } = {}) {
|
|
14283
14329
|
if (options.isDestroyed()) return {
|
|
@@ -14285,27 +14331,19 @@ function createSessionOutput(options) {
|
|
|
14285
14331
|
reason: "destroyed"
|
|
14286
14332
|
};
|
|
14287
14333
|
const stateBeforeWaiting = options.getState();
|
|
14288
|
-
if (options.hasLivePty() && PASTE_READY_STATES.has(stateBeforeWaiting)) return pasteAndSubmit(text, submitDelayMs);
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
return;
|
|
14295
|
-
}
|
|
14296
|
-
clearPendingPaste();
|
|
14297
|
-
pasteAndSubmit(text, submitDelayMs);
|
|
14298
|
-
};
|
|
14299
|
-
const onExit = () => clearPendingPaste();
|
|
14300
|
-
const timer = setTimeout(() => clearPendingPaste(), timeoutMs);
|
|
14301
|
-
timer.unref();
|
|
14302
|
-
pendingPaste = {
|
|
14303
|
-
timer,
|
|
14304
|
-
onStateChange,
|
|
14305
|
-
onExit
|
|
14334
|
+
if (!(queuedPastes.length > 0 || isDrainingQueue) && options.hasLivePty() && PASTE_READY_STATES.has(stateBeforeWaiting)) return pasteAndSubmit(text, submitDelayMs);
|
|
14335
|
+
const queued = {
|
|
14336
|
+
text,
|
|
14337
|
+
settleMs,
|
|
14338
|
+
submitDelayMs,
|
|
14339
|
+
expiryTimer: setTimeout(() => dropExpiredPaste(queued), timeoutMs)
|
|
14306
14340
|
};
|
|
14307
|
-
|
|
14308
|
-
|
|
14341
|
+
queued.expiryTimer.unref();
|
|
14342
|
+
enqueueAheadOfUnsubmittedPastes(queued);
|
|
14343
|
+
if (!isDrainingQueue && !isWatchingForReady) {
|
|
14344
|
+
isWatchingForReady = true;
|
|
14345
|
+
options.on("state-change", onStateChangeWhilePasteQueued);
|
|
14346
|
+
}
|
|
14309
14347
|
if (stateBeforeWaiting === STATES.DORMANT) options.start();
|
|
14310
14348
|
if (RESTARTABLE_STATES.includes(stateBeforeWaiting)) options.restart();
|
|
14311
14349
|
return {
|
|
@@ -14373,6 +14411,7 @@ function createSessionOutput(options) {
|
|
|
14373
14411
|
};
|
|
14374
14412
|
}
|
|
14375
14413
|
options.on("exit", disposeScreenKeeper);
|
|
14414
|
+
options.on("exit", clearPendingPaste);
|
|
14376
14415
|
return {
|
|
14377
14416
|
push,
|
|
14378
14417
|
since: (offset) => ring.since(offset),
|
|
@@ -14384,7 +14423,7 @@ function createSessionOutput(options) {
|
|
|
14384
14423
|
pasteText,
|
|
14385
14424
|
pasteTextWhenReady,
|
|
14386
14425
|
clearPendingPaste,
|
|
14387
|
-
hasPendingPaste: () =>
|
|
14426
|
+
hasPendingPaste: () => queuedPastes.length > 0,
|
|
14388
14427
|
rememberSize,
|
|
14389
14428
|
ptySize,
|
|
14390
14429
|
disposeScreenKeeper
|
|
@@ -15170,20 +15209,28 @@ function parseRemoteFromUpstream(upstream) {
|
|
|
15170
15209
|
if (idx === -1) return "origin";
|
|
15171
15210
|
return String(upstream).slice(0, idx);
|
|
15172
15211
|
}
|
|
15173
|
-
var BRANCH_UPSTREAM_FORMAT = "%(refname)%09%(upstream:short)%09%(upstream:track,nobracket)";
|
|
15212
|
+
var BRANCH_UPSTREAM_FORMAT = "%(refname)%09%(upstream:short)%09%(upstream:track,nobracket)%09%(upstream:remotename)%09%(upstream:remoteref)";
|
|
15213
|
+
var LOCAL_REMOTE = ".";
|
|
15174
15214
|
function parseBranchUpstream(forEachRefOutput, branch) {
|
|
15175
15215
|
const fieldsOfBranch = forEachRefOutput.split("\n").map((line) => line.split(" ")).find(([refName]) => refName === `refs/heads/${branch}`);
|
|
15176
15216
|
if (!fieldsOfBranch) return null;
|
|
15177
|
-
const [, upstream, tracking] = fieldsOfBranch;
|
|
15217
|
+
const [, upstream, tracking, remoteName, remoteRef] = fieldsOfBranch;
|
|
15178
15218
|
if (!upstream || tracking === "gone") return null;
|
|
15179
|
-
return
|
|
15219
|
+
return {
|
|
15220
|
+
upstream,
|
|
15221
|
+
remote: remoteName?.trim() || parseRemoteFromUpstream(upstream),
|
|
15222
|
+
remoteBranch: remoteRef?.trim().replace(/^refs\/heads\//, "") || branch
|
|
15223
|
+
};
|
|
15224
|
+
}
|
|
15225
|
+
function isLocalRemote(remote) {
|
|
15226
|
+
return remote === LOCAL_REMOTE;
|
|
15180
15227
|
}
|
|
15181
15228
|
function decideResyncAction(state, isCheckedOut) {
|
|
15182
15229
|
if (state === "behind") return isCheckedOut ? "ff-merge" : "ff-fetch";
|
|
15183
15230
|
if (state === "ahead") return "push";
|
|
15184
15231
|
return "none";
|
|
15185
15232
|
}
|
|
15186
|
-
function buildResyncCommand(decision, { upstream, branch, remote }) {
|
|
15233
|
+
function buildResyncCommand(decision, { upstream, branch, remote, remoteBranch = branch }) {
|
|
15187
15234
|
if (decision === "ff-merge") return {
|
|
15188
15235
|
args: [
|
|
15189
15236
|
"merge",
|
|
@@ -15193,12 +15240,13 @@ function buildResyncCommand(decision, { upstream, branch, remote }) {
|
|
|
15193
15240
|
timeoutMs: void 0,
|
|
15194
15241
|
successAction: "fast-forwarded"
|
|
15195
15242
|
};
|
|
15243
|
+
if (isLocalRemote(remote)) return null;
|
|
15196
15244
|
if (decision === "ff-fetch") return {
|
|
15197
15245
|
args: [
|
|
15198
15246
|
"fetch",
|
|
15199
15247
|
"--quiet",
|
|
15200
15248
|
remote,
|
|
15201
|
-
`${
|
|
15249
|
+
`${remoteBranch}:${branch}`
|
|
15202
15250
|
],
|
|
15203
15251
|
timeoutMs: GIT_FETCH_TIMEOUT_MS,
|
|
15204
15252
|
successAction: "fast-forwarded"
|
|
@@ -15207,7 +15255,7 @@ function buildResyncCommand(decision, { upstream, branch, remote }) {
|
|
|
15207
15255
|
args: [
|
|
15208
15256
|
"push",
|
|
15209
15257
|
remote,
|
|
15210
|
-
branch
|
|
15258
|
+
remoteBranch === branch ? branch : `${branch}:${remoteBranch}`
|
|
15211
15259
|
],
|
|
15212
15260
|
timeoutMs: 15e3,
|
|
15213
15261
|
successAction: "pushed"
|
|
@@ -16368,7 +16416,7 @@ function createWorktreeDiffScopes(context) {
|
|
|
16368
16416
|
}
|
|
16369
16417
|
// session/worktree/worktree-branch-sync.ts
|
|
16370
16418
|
function createWorktreeBranchSync(context) {
|
|
16371
|
-
const { id, lifecycleState, currentProjectPath, gitOut,
|
|
16419
|
+
const { id, lifecycleState, currentProjectPath, gitOut, readBranchUpstreamOf, effectiveIntegrationBranch, setMergeStatus } = context;
|
|
16372
16420
|
function noUpstream(branch) {
|
|
16373
16421
|
return {
|
|
16374
16422
|
branch: branch || null,
|
|
@@ -16379,13 +16427,14 @@ function createWorktreeBranchSync(context) {
|
|
|
16379
16427
|
fetched: null
|
|
16380
16428
|
};
|
|
16381
16429
|
}
|
|
16382
|
-
async function
|
|
16430
|
+
async function fetchUpstream({ remote, remoteBranch }, opts) {
|
|
16431
|
+
if (isLocalRemote(remote)) return null;
|
|
16383
16432
|
try {
|
|
16384
16433
|
await gitOut([
|
|
16385
16434
|
"fetch",
|
|
16386
16435
|
"--quiet",
|
|
16387
16436
|
remote,
|
|
16388
|
-
|
|
16437
|
+
remoteBranch
|
|
16389
16438
|
], {
|
|
16390
16439
|
...opts,
|
|
16391
16440
|
timeoutMs: GIT_FETCH_TIMEOUT_MS,
|
|
@@ -16396,7 +16445,7 @@ function createWorktreeBranchSync(context) {
|
|
|
16396
16445
|
});
|
|
16397
16446
|
return true;
|
|
16398
16447
|
} catch (error) {
|
|
16399
|
-
console.warn(`[session ${id}] fetch of ${remote}/${
|
|
16448
|
+
console.warn(`[session ${id}] fetch of ${remote}/${remoteBranch} failed: ${errorMessage(error)}`);
|
|
16400
16449
|
return false;
|
|
16401
16450
|
}
|
|
16402
16451
|
}
|
|
@@ -16455,12 +16504,13 @@ function createWorktreeBranchSync(context) {
|
|
|
16455
16504
|
timeoutMs: 1e4
|
|
16456
16505
|
};
|
|
16457
16506
|
if (!await isGitRepository(opts)) return noUpstream(branch);
|
|
16458
|
-
const
|
|
16459
|
-
if (!
|
|
16507
|
+
const branchUpstream = await readBranchUpstreamOf(branch, opts);
|
|
16508
|
+
if (!branchUpstream) return noUpstream(branch);
|
|
16509
|
+
const { upstream } = branchUpstream;
|
|
16460
16510
|
return applyBaseSyncDemotion({
|
|
16461
16511
|
branch,
|
|
16462
16512
|
upstream,
|
|
16463
|
-
fetched: await
|
|
16513
|
+
fetched: await fetchUpstream(branchUpstream, opts),
|
|
16464
16514
|
...await branchCounts(upstream, branch, opts)
|
|
16465
16515
|
});
|
|
16466
16516
|
}
|
|
@@ -16486,14 +16536,14 @@ function createWorktreeBranchSync(context) {
|
|
|
16486
16536
|
action: "none",
|
|
16487
16537
|
error: null
|
|
16488
16538
|
};
|
|
16489
|
-
const
|
|
16490
|
-
if (!
|
|
16539
|
+
const branchUpstream = await readBranchUpstreamOf(branch, opts);
|
|
16540
|
+
if (!branchUpstream) return {
|
|
16491
16541
|
...noUpstream(branch),
|
|
16492
16542
|
action: "none",
|
|
16493
16543
|
error: null
|
|
16494
16544
|
};
|
|
16495
|
-
const remote =
|
|
16496
|
-
const fetched = await
|
|
16545
|
+
const { upstream, remote, remoteBranch } = branchUpstream;
|
|
16546
|
+
const fetched = await fetchUpstream(branchUpstream, opts);
|
|
16497
16547
|
const before = await branchCounts(upstream, branch, opts);
|
|
16498
16548
|
const checkedOut = (await gitOut([
|
|
16499
16549
|
"rev-parse",
|
|
@@ -16506,7 +16556,8 @@ function createWorktreeBranchSync(context) {
|
|
|
16506
16556
|
const command = buildResyncCommand(decision, {
|
|
16507
16557
|
upstream,
|
|
16508
16558
|
branch,
|
|
16509
|
-
remote
|
|
16559
|
+
remote,
|
|
16560
|
+
remoteBranch
|
|
16510
16561
|
});
|
|
16511
16562
|
if (command) try {
|
|
16512
16563
|
await gitOut(command.args, {
|
|
@@ -16607,13 +16658,16 @@ function createSessionWorktreeLifecycle({ id, projectPath, integrationBranch = n
|
|
|
16607
16658
|
throw error;
|
|
16608
16659
|
});
|
|
16609
16660
|
}
|
|
16610
|
-
async function
|
|
16661
|
+
async function readBranchUpstreamOf(branch, options) {
|
|
16611
16662
|
return parseBranchUpstream(await gitOut([
|
|
16612
16663
|
"for-each-ref",
|
|
16613
16664
|
`--format=${BRANCH_UPSTREAM_FORMAT}`,
|
|
16614
16665
|
`refs/heads/${branch}`
|
|
16615
16666
|
], options), branch);
|
|
16616
16667
|
}
|
|
16668
|
+
async function readUpstreamOf(branch, options) {
|
|
16669
|
+
return (await readBranchUpstreamOf(branch, options))?.upstream ?? null;
|
|
16670
|
+
}
|
|
16617
16671
|
const workspaceMembers = workspaceRepos ? setUpWorkspaceMembers({
|
|
16618
16672
|
folder: currentProjectPath(),
|
|
16619
16673
|
sessionId: id,
|
|
@@ -16813,6 +16867,7 @@ function createSessionWorktreeLifecycle({ id, projectPath, integrationBranch = n
|
|
|
16813
16867
|
gitOut,
|
|
16814
16868
|
gitLookup,
|
|
16815
16869
|
readUpstreamOf,
|
|
16870
|
+
readBranchUpstreamOf,
|
|
16816
16871
|
effectiveIntegrationBranch,
|
|
16817
16872
|
setMergeStatus
|
|
16818
16873
|
};
|
|
@@ -18588,9 +18643,6 @@ var Session = class extends EventEmitter {
|
|
|
18588
18643
|
on: (event, listener) => {
|
|
18589
18644
|
this.on(event, listener);
|
|
18590
18645
|
},
|
|
18591
|
-
once: (event, listener) => {
|
|
18592
|
-
this.once(event, listener);
|
|
18593
|
-
},
|
|
18594
18646
|
off: (event, listener) => {
|
|
18595
18647
|
this.off(event, listener);
|
|
18596
18648
|
},
|
|
@@ -40391,24 +40443,32 @@ function sharpestHoursInsight(samples) {
|
|
|
40391
40443
|
deviation: quickness
|
|
40392
40444
|
};
|
|
40393
40445
|
}
|
|
40394
|
-
function
|
|
40446
|
+
function recapDayLabel(recapDay, now) {
|
|
40447
|
+
if (recapDay === localDayKey(startOfLocalDay(now, 1))) return "Yesterday";
|
|
40448
|
+
const [year, month, day] = recapDay.split("-").map(Number);
|
|
40449
|
+
return `On ${new Date(year, month - 1, day).toLocaleDateString("en-US", {
|
|
40450
|
+
month: "short",
|
|
40451
|
+
day: "numeric"
|
|
40452
|
+
})}`;
|
|
40453
|
+
}
|
|
40454
|
+
function longestStretchInsight(yesterday, dayLabel, usualStretchMs) {
|
|
40395
40455
|
if (yesterday.longestStretchMs < MIN_LONG_STRETCH_MS) return null;
|
|
40396
40456
|
const deviation = yesterday.longestStretchMs / Math.max(usualStretchMs, MINUTE_MS);
|
|
40397
40457
|
if (deviation < MIN_DEVIATION) return null;
|
|
40398
40458
|
const comparedToUsual = usualStretchMs >= MINUTE_MS ? `, ${ratioText(deviation)} your usual` : "";
|
|
40399
40459
|
return {
|
|
40400
40460
|
kind: "longestStretch",
|
|
40401
|
-
text:
|
|
40461
|
+
text: `${dayLabel} you went ${durationText(yesterday.longestStretchMs)} without a break${comparedToUsual}.`,
|
|
40402
40462
|
deviation
|
|
40403
40463
|
};
|
|
40404
40464
|
}
|
|
40405
|
-
function jugglingInsight(yesterday, usualJuggling) {
|
|
40465
|
+
function jugglingInsight(yesterday, dayLabel, usualJuggling) {
|
|
40406
40466
|
if (yesterday.peakJuggling < MIN_JUGGLING_SESSIONS) return null;
|
|
40407
40467
|
const deviation = yesterday.peakJuggling / Math.max(usualJuggling, 1);
|
|
40408
40468
|
if (deviation < MIN_DEVIATION) return null;
|
|
40409
40469
|
return {
|
|
40410
40470
|
kind: "juggling",
|
|
40411
|
-
text:
|
|
40471
|
+
text: `${dayLabel} at ${hourText(new Date(yesterday.peakJugglingAt).getHours())} you switched between ${yesterday.peakJuggling} sessions within ${JUGGLING_WINDOW_MS / MINUTE_MS}m.`,
|
|
40412
40472
|
deviation
|
|
40413
40473
|
};
|
|
40414
40474
|
}
|
|
@@ -40430,13 +40490,14 @@ function buildYourDay(events, { now, laneByKey = null }) {
|
|
|
40430
40490
|
if (!yesterday || activeDayCount < MIN_ACTIVE_DAYS) return null;
|
|
40431
40491
|
const baselineDays = pastDays.length > 1 ? pastDays.slice(0, -1) : pastDays;
|
|
40432
40492
|
const usualStretchMs = Math.round(median(baselineDays.map((day) => day.longestStretchMs)));
|
|
40493
|
+
const dayLabel = recapDayLabel(yesterday.day, now);
|
|
40433
40494
|
const allStretches = splitStretches(counted.filter((event) => event.kind === "prompt").map((event) => event.ts));
|
|
40434
40495
|
const replySamples = collectReplySamples(counted.filter((event) => event.ts < todayStart), allStretches);
|
|
40435
40496
|
const insights = [
|
|
40436
40497
|
waitingThresholdInsight(replySamples),
|
|
40437
40498
|
sharpestHoursInsight(replySamples),
|
|
40438
|
-
longestStretchInsight(yesterday, usualStretchMs),
|
|
40439
|
-
jugglingInsight(yesterday, median(baselineDays.map((day) => day.peakJuggling)))
|
|
40499
|
+
longestStretchInsight(yesterday, dayLabel, usualStretchMs),
|
|
40500
|
+
jugglingInsight(yesterday, dayLabel, median(baselineDays.map((day) => day.peakJuggling)))
|
|
40440
40501
|
].filter((insight) => insight !== null).sort((left, right) => right.deviation - left.deviation).slice(0, MAX_INSIGHTS);
|
|
40441
40502
|
const latestStretch = allStretches.at(-1);
|
|
40442
40503
|
const isStretchOngoing = latestStretch !== void 0 && now - latestStretch.end <= BREAK_MS;
|
|
@@ -49168,11 +49229,15 @@ function parseSinceParam(url) {
|
|
|
49168
49229
|
return Number.isFinite(n) ? n : null;
|
|
49169
49230
|
}
|
|
49170
49231
|
function registerControlHandlers(controlWss, deps) {
|
|
49171
|
-
const { serverBuild = () => null, controlReplayLog = null } = deps;
|
|
49232
|
+
const { serverBuild = () => null, controlReplayLog = null, hostLinks = null } = deps;
|
|
49172
49233
|
const context = createControlContext(deps);
|
|
49173
49234
|
const session = createSessionHandlers(context, deps);
|
|
49174
49235
|
const github = createGithubHandlers(context, deps);
|
|
49175
49236
|
const merged = mergeHandlerGroups([
|
|
49237
|
+
{
|
|
49238
|
+
handlers: {},
|
|
49239
|
+
connectFrames: () => hostLinks ? [hostLinks.statusFrame()] : []
|
|
49240
|
+
},
|
|
49176
49241
|
createServerHandlers(context, deps),
|
|
49177
49242
|
createRadarHandlers(context, deps),
|
|
49178
49243
|
github,
|
|
@@ -49323,7 +49388,8 @@ function createBackendControl(dependencies) {
|
|
|
49323
49388
|
coderEnv: laneAssembly.coderEnv,
|
|
49324
49389
|
remoteRepoGit: laneAssembly.gitWorkspace,
|
|
49325
49390
|
agentConnect: dependencies.agentConnect,
|
|
49326
|
-
remoteSetup: dependencies.remoteSetup
|
|
49391
|
+
remoteSetup: dependencies.remoteSetup,
|
|
49392
|
+
hostLinks: dependencies.hostLinks
|
|
49327
49393
|
});
|
|
49328
49394
|
const sendLaneSnapshotOnConnect = (laneName, readLane) => {
|
|
49329
49395
|
controlWss.on("connection", (socket) => {
|
|
@@ -55449,9 +55515,6 @@ function createBackend(httpServer, options = {}) {
|
|
|
55449
55515
|
relayPhoneAlert: (hostName, text) => notifications.relayHostPhoneAlert(hostName, text),
|
|
55450
55516
|
spawnHostTunnel: options.spawnHostTunnel
|
|
55451
55517
|
});
|
|
55452
|
-
controlWss.on("connection", (socket) => {
|
|
55453
|
-
if (socket.readyState === 1) socket.send(JSON.stringify(hostLinks.statusFrame()));
|
|
55454
|
-
});
|
|
55455
55518
|
const sessionDocs = createSessionDocsWiring({ broadcastControl: broadcastControlFromWebSockets });
|
|
55456
55519
|
const whiteboards = createWhiteboardWiring({
|
|
55457
55520
|
boardsRoot: configSiblingPath(configStore.configPath, WHITEBOARDS_FOLDER_NAME),
|
|
@@ -55802,6 +55865,7 @@ function createBackend(httpServer, options = {}) {
|
|
|
55802
55865
|
configStore,
|
|
55803
55866
|
broadcastControl,
|
|
55804
55867
|
controlReplayLog,
|
|
55868
|
+
hostLinks,
|
|
55805
55869
|
agentConnect,
|
|
55806
55870
|
remoteSetup,
|
|
55807
55871
|
telegramDelivery: notifications.telegramDelivery,
|
|
@@ -559,7 +559,7 @@ async function runList() {
|
|
|
559
559
|
process.stderr.write("glimmervoid packs list reads the running Glimmervoid, so it works inside a Glimmervoid session; the operator sees the same list in Settings, Packs\n");
|
|
560
560
|
return 1;
|
|
561
561
|
}
|
|
562
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
562
|
+
const { askAgentApi } = await import("./agent-api-cli-DYOQ8L-l.js");
|
|
563
563
|
const reply = AGENT_REPLY_SCHEMAS.packs.safeParse(await askAgentApi("packs", { command: "list" }));
|
|
564
564
|
if (!reply.success) {
|
|
565
565
|
process.stderr.write("glimmervoid packs list: Glimmervoid did not answer with a pack list\n");
|
|
@@ -122,7 +122,7 @@ async function readServerConfig(askSetting) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
async function readConfigFromServer() {
|
|
125
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
125
|
+
const { askAgentApi } = await import("./agent-api-cli-DYOQ8L-l.js");
|
|
126
126
|
return readServerConfig((settingPath) => askAgentApi("settings", {
|
|
127
127
|
command: "get",
|
|
128
128
|
path: settingPath
|
|
@@ -268,7 +268,7 @@ async function runPrActionReport({ outcome, message, env }, io) {
|
|
|
268
268
|
io.writeError("--outcome must be started, done, failed or refused, and --message at most 500 characters\n");
|
|
269
269
|
return 1;
|
|
270
270
|
}
|
|
271
|
-
const { postToAgentIngress } = await import("./agent-api-cli-
|
|
271
|
+
const { postToAgentIngress } = await import("./agent-api-cli-DYOQ8L-l.js");
|
|
272
272
|
const reply = await postToAgentIngress({
|
|
273
273
|
endpoint: new URL(reportUrl),
|
|
274
274
|
token,
|