glimmervoid 0.50.1-next.620 → 0.50.1-next.622
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 +8 -8
- package/dist/chunks/{adapters-1DsQQMMe.js → adapters-BkjRaOCV.js} +1 -1
- package/dist/chunks/{adapters-C0-L1MGW.js → adapters-DD09SXvJ.js} +2 -2
- package/dist/chunks/{agent-api-cli-HDWGxoVZ.js → agent-api-cli-CCJCb3O7.js} +1 -1
- package/dist/chunks/{agent-api-cli-DA1nDCmk.js → agent-api-cli-CJw2UnFu.js} +1 -1
- package/dist/chunks/{agent-api-core-BYnQrjg-.js → agent-api-core-CvjDCKlo.js} +1 -1
- package/dist/chunks/{config-ByXj-QkK.js → config-DkgPnYvd.js} +1 -0
- package/dist/chunks/{config-store-xCMR-2l4.js → config-store-DOLKpIyb.js} +1 -1
- package/dist/chunks/config-store-nb_3QOjH.js +1 -0
- package/dist/chunks/{main-CqNhbBfr.js → main-lTVkc00e.js} +185 -43
- package/dist/chunks/{pair-cli-CkkEJLhu.js → pair-cli-CxCWGgCm.js} +2 -2
- package/dist/chunks/{remote-config-DQNBX1ss.js → remote-config-Bw6x8YR1.js} +1 -1
- package/dist/chunks/{settings-cli-CTKSuDdT.js → settings-cli-CvcwwyCX.js} +4 -4
- package/dist/chunks/{settings-readout-core-CZSfDQAV.js → settings-readout-core-CSpR71kR.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-CN_YMTbR.js → ssh-sign-cli-BhPeGZdU.js} +1 -1
- package/dist/client/assets/{action-status-wCVARbuq.js → action-status-DLRXfvCS.js} +1 -1
- package/dist/client/assets/action-status-DLRXfvCS.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-CKA0ZF75.js → benchmark-panel-DJ0HD0BH.js} +1 -1
- package/dist/client/assets/benchmark-panel-DJ0HD0BH.js.br +0 -0
- package/dist/client/assets/{boards-view-CV9d12Xa.js → boards-view-C-Ve_727.js} +1 -1
- package/dist/client/assets/boards-view-C-Ve_727.js.br +0 -0
- package/dist/client/assets/{button-IDK-KLMG.js → button-DMRAYm5k.js} +1 -1
- package/dist/client/assets/button-DMRAYm5k.js.br +0 -0
- package/dist/client/assets/{card-registry-DhfSIXRi.js → card-registry-CPmiO4ky.js} +1 -1
- package/dist/client/assets/card-registry-CPmiO4ky.js.br +0 -0
- package/dist/client/assets/{community-panel--dMcHYKU.js → community-panel-DtGJhxcT.js} +1 -1
- package/dist/client/assets/community-panel-DtGJhxcT.js.br +0 -0
- package/dist/client/assets/{control-ws-DXVmgpX3.js → control-ws-CaJzgrlG.js} +1 -1
- package/dist/client/assets/control-ws-CaJzgrlG.js.br +0 -0
- package/dist/client/assets/{dialogs-CbNYhLi0.js → dialogs-CEiHonjh.js} +1 -1
- package/dist/client/assets/dialogs-CEiHonjh.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-DXQ_RL_p.js → doc-editor-ui-DK_xhrUF.js} +1 -1
- package/dist/client/assets/doc-editor-ui-DK_xhrUF.js.br +0 -0
- package/dist/client/assets/{feature-hint-nDRUt77d.js → feature-hint-WEMCJV42.js} +1 -1
- package/dist/client/assets/feature-hint-WEMCJV42.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-Do9X5MGP.js → first-run-checklist-B_93Rf5S.js} +1 -1
- package/dist/client/assets/first-run-checklist-B_93Rf5S.js.br +0 -0
- package/dist/client/assets/{hooks-panel-Cme-d2Py.js → hooks-panel-CiAWdoqW.js} +1 -1
- package/dist/client/assets/hooks-panel-CiAWdoqW.js.br +0 -0
- package/dist/client/assets/{index-DHD0GweI.js → index-brVt_zgc.js} +6 -6
- package/dist/client/assets/index-brVt_zgc.js.br +0 -0
- package/dist/client/assets/{issues-panel-DCLhyT3q.js → issues-panel-nZ6UdA14.js} +1 -1
- package/dist/client/assets/issues-panel-nZ6UdA14.js.br +0 -0
- package/dist/client/assets/{lane-read-token-step-ChFOIsKY.js → lane-read-token-step-KoROcNyl.js} +1 -1
- package/dist/client/assets/lane-read-token-step-KoROcNyl.js.br +0 -0
- package/dist/client/assets/{modal-CyFAwi4P.js → modal-DgWSLi-3.js} +1 -1
- package/dist/client/assets/modal-DgWSLi-3.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-BqdSATjK.js → my-prs-panel-DjbdCxR-.js} +1 -1
- package/dist/client/assets/my-prs-panel-DjbdCxR-.js.br +0 -0
- package/dist/client/assets/{nyan-cat-CqInTYN3.js → nyan-cat-riLb0nZs.js} +1 -1
- package/dist/client/assets/nyan-cat-riLb0nZs.js.br +0 -0
- package/dist/client/assets/{phone-shell-BSC4z6Gp.js → phone-shell-CgSI0skc.js} +1 -1
- package/dist/client/assets/phone-shell-CgSI0skc.js.br +0 -0
- package/dist/client/assets/{plan-face-DKAPHXdY.js → plan-face-CxBFnJKp.js} +1 -1
- package/dist/client/assets/plan-face-CxBFnJKp.js.br +0 -0
- package/dist/client/assets/{plan-render-CBt4wAAc.js → plan-render-caDkkVZ6.js} +1 -1
- package/dist/client/assets/plan-render-caDkkVZ6.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-BX9E0Jbu.js → pr-queue-columns-DksgnOys.js} +1 -1
- package/dist/client/assets/pr-queue-columns-DksgnOys.js.br +0 -0
- package/dist/client/assets/{radar-panel-Cvsv0UyR.js → radar-panel-DFIwZG2p.js} +1 -1
- package/dist/client/assets/radar-panel-DFIwZG2p.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-CEp2XEma.js → repo-roots-adder-D77nwOoa.js} +1 -1
- package/dist/client/assets/repo-roots-adder-D77nwOoa.js.br +0 -0
- package/dist/client/assets/{resume-dialog-Cm56qnHY.js → resume-dialog-BNg4LnPa.js} +1 -1
- package/dist/client/assets/resume-dialog-BNg4LnPa.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-BQwTRRCM.js → review-queue-panel-DCiVlQu7.js} +1 -1
- package/dist/client/assets/review-queue-panel-DCiVlQu7.js.br +0 -0
- package/dist/client/assets/{session-tick-C4ZI3zEC.js → session-tick-CJ2sUOzx.js} +1 -1
- package/dist/client/assets/session-tick-CJ2sUOzx.js.br +0 -0
- package/dist/client/assets/{settings-panel-CNaoAz2P.js → settings-panel-BuCwkx0C.js} +2 -2
- package/dist/client/assets/settings-panel-BuCwkx0C.js.br +0 -0
- package/dist/client/assets/{setup-step-Che7ePAT.js → setup-step-Zf_GOlaN.js} +1 -1
- package/dist/client/assets/setup-step-Zf_GOlaN.js.br +0 -0
- package/dist/client/assets/{shown-face-DAp8_Z7G.js → shown-face-CIkqJeYJ.js} +1 -1
- package/dist/client/assets/shown-face-CIkqJeYJ.js.br +0 -0
- package/dist/client/assets/{trace-panel-BPozdcX2.js → trace-panel-B1uzBE_7.js} +1 -1
- package/dist/client/assets/trace-panel-B1uzBE_7.js.br +0 -0
- package/dist/client/assets/{usage-panel-dENmrXBy.js → usage-panel-D9DyqFJ9.js} +1 -1
- package/dist/client/assets/usage-panel-D9DyqFJ9.js.br +0 -0
- package/dist/client/assets/{your-day-tip-BMB2rwmR.js → your-day-tip-KZp1YD9-.js} +1 -1
- package/dist/client/assets/your-day-tip-KZp1YD9-.js.br +0 -0
- package/dist/client/index.html +7 -7
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/config-store-B1Q9GScL.js +0 -1
- package/dist/client/assets/action-status-wCVARbuq.js.br +0 -0
- package/dist/client/assets/benchmark-panel-CKA0ZF75.js.br +0 -0
- package/dist/client/assets/boards-view-CV9d12Xa.js.br +0 -0
- package/dist/client/assets/button-IDK-KLMG.js.br +0 -0
- package/dist/client/assets/card-registry-DhfSIXRi.js.br +0 -0
- package/dist/client/assets/community-panel--dMcHYKU.js.br +0 -0
- package/dist/client/assets/control-ws-DXVmgpX3.js.br +0 -0
- package/dist/client/assets/dialogs-CbNYhLi0.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-DXQ_RL_p.js.br +0 -0
- package/dist/client/assets/feature-hint-nDRUt77d.js.br +0 -0
- package/dist/client/assets/first-run-checklist-Do9X5MGP.js.br +0 -0
- package/dist/client/assets/hooks-panel-Cme-d2Py.js.br +0 -0
- package/dist/client/assets/index-DHD0GweI.js.br +0 -0
- package/dist/client/assets/issues-panel-DCLhyT3q.js.br +0 -0
- package/dist/client/assets/lane-read-token-step-ChFOIsKY.js.br +0 -0
- package/dist/client/assets/modal-CyFAwi4P.js.br +0 -0
- package/dist/client/assets/my-prs-panel-BqdSATjK.js.br +0 -0
- package/dist/client/assets/nyan-cat-CqInTYN3.js.br +0 -0
- package/dist/client/assets/phone-shell-BSC4z6Gp.js.br +0 -0
- package/dist/client/assets/plan-face-DKAPHXdY.js.br +0 -0
- package/dist/client/assets/plan-render-CBt4wAAc.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-BX9E0Jbu.js.br +0 -0
- package/dist/client/assets/radar-panel-Cvsv0UyR.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-CEp2XEma.js.br +0 -0
- package/dist/client/assets/resume-dialog-Cm56qnHY.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BQwTRRCM.js.br +0 -0
- package/dist/client/assets/session-tick-C4ZI3zEC.js.br +0 -0
- package/dist/client/assets/settings-panel-CNaoAz2P.js.br +0 -0
- package/dist/client/assets/setup-step-Che7ePAT.js.br +0 -0
- package/dist/client/assets/shown-face-DAp8_Z7G.js.br +0 -0
- package/dist/client/assets/trace-panel-BPozdcX2.js.br +0 -0
- package/dist/client/assets/usage-panel-dENmrXBy.js.br +0 -0
- package/dist/client/assets/your-day-tip-BMB2rwmR.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -5,7 +5,7 @@ import { a as packageRoot } from "../chunks/runtime-paths-CYwF658V.js";
|
|
|
5
5
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "../chunks/config-path-core-DUWk0Lui.js";
|
|
6
6
|
import { t as AGENT_API_VERBS } from "../chunks/session-EEl_da0y.js";
|
|
7
7
|
import { a as execSync } from "../chunks/child-process-safe-BCOoKfxG.js";
|
|
8
|
-
import { nt as isOwnedCommandName, r as agentCommandHelpLines, rt as parseCommand, tt as OWNED_COMMAND_SPECS } from "../chunks/agent-api-core-
|
|
8
|
+
import { nt as isOwnedCommandName, r as agentCommandHelpLines, rt as parseCommand, tt as OWNED_COMMAND_SPECS } from "../chunks/agent-api-core-CvjDCKlo.js";
|
|
9
9
|
import { t as renderTable } from "../chunks/ascii-figure-core-pDAwtlKO.js";
|
|
10
10
|
import { i as parseCommandLine, r as gitDoctorRows, t as probeGitVersion } from "../chunks/git-version-xS1GFU8P.js";
|
|
11
11
|
import { i as pnpmGlobalBinDir, n as npmGlobalBinDir, r as onPath, t as formatPathNotice } from "../chunks/path-doctor-C23VAqeu.js";
|
|
@@ -61,7 +61,7 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
61
61
|
return await runDoctor() ? 0 : 1;
|
|
62
62
|
},
|
|
63
63
|
pair: async ({ values }) => {
|
|
64
|
-
const { runPairCli } = await import("../chunks/pair-cli-
|
|
64
|
+
const { runPairCli } = await import("../chunks/pair-cli-CxCWGgCm.js");
|
|
65
65
|
return runPairCli({
|
|
66
66
|
isListing: values.list === true,
|
|
67
67
|
revokeDeviceId: typeof values.revoke === "string" ? values.revoke : null,
|
|
@@ -73,11 +73,11 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
73
73
|
return runAgentSetupCli();
|
|
74
74
|
},
|
|
75
75
|
settings: async (parsed) => {
|
|
76
|
-
const { runParsedSettingsCli } = await import("../chunks/settings-cli-
|
|
76
|
+
const { runParsedSettingsCli } = await import("../chunks/settings-cli-CvcwwyCX.js");
|
|
77
77
|
return runParsedSettingsCli(parsed);
|
|
78
78
|
},
|
|
79
79
|
"ssh-sign": async ({ rawArgs }) => {
|
|
80
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
80
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-BhPeGZdU.js");
|
|
81
81
|
return runSshSignCli(rawArgs);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
@@ -99,7 +99,7 @@ async function runOwnedCommand(name, subcommandArgs) {
|
|
|
99
99
|
return OWNED_COMMAND_RUNNERS[name](parsed);
|
|
100
100
|
}
|
|
101
101
|
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) => {
|
|
102
|
-
const { runAgentApiCli } = await import("../chunks/agent-api-cli-
|
|
102
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-CCJCb3O7.js");
|
|
103
103
|
return runAgentApiCli([subcommandName, ...subcommandArgs]);
|
|
104
104
|
}])]);
|
|
105
105
|
var AGENT_INSTALL_COMMAND_BY_ID = {
|
|
@@ -113,7 +113,7 @@ function missingAgentText(agentId) {
|
|
|
113
113
|
}
|
|
114
114
|
async function printSessionLimits() {
|
|
115
115
|
if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
|
|
116
|
-
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-
|
|
116
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-CCJCb3O7.js");
|
|
117
117
|
const limitsLines = await sessionLimitsHelpLines();
|
|
118
118
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
119
119
|
}
|
|
@@ -170,7 +170,7 @@ async function readDeclaredCustomAgents() {
|
|
|
170
170
|
declared: [],
|
|
171
171
|
error: null
|
|
172
172
|
};
|
|
173
|
-
const { loadConfigFile } = await import("../chunks/config-store-
|
|
173
|
+
const { loadConfigFile } = await import("../chunks/config-store-nb_3QOjH.js");
|
|
174
174
|
try {
|
|
175
175
|
const loaded = loadConfigFile(decided.path, { exitOnError: false });
|
|
176
176
|
if (!loaded.config) return {
|
|
@@ -246,7 +246,7 @@ async function runDoctor() {
|
|
|
246
246
|
}
|
|
247
247
|
switchSection("Agents");
|
|
248
248
|
try {
|
|
249
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
249
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-BkjRaOCV.js");
|
|
250
250
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
251
251
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
252
252
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-
|
|
1
|
+
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-DD09SXvJ.js";
|
|
@@ -2,7 +2,7 @@ import { a as isMissingFileError, r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { d as isPathInside, f as safePathSegment, o as relayPath } from "./runtime-paths-CYwF658V.js";
|
|
3
3
|
import { b as CONVERSATION_PERMISSION_HOOK_EVENT, i as ASK_USER_QUESTION_TOOL_NAME, in as FULL_SHA_RE, on as shortSha$1, x as CONVERSATION_TOOL_RESULT_HOOK_EVENT } from "./session-EEl_da0y.js";
|
|
4
4
|
import { c as spawn, i as execFileSync, r as execFileAsync } from "./child-process-safe-BCOoKfxG.js";
|
|
5
|
-
import { Kt as UpdateChannel, Qt as PLAN_TOOL_NAME, Yt as PLAN_HOOK_EVENT, Zt as PLAN_RESULT_HOOK_EVENT, c as SHELL_AGENT_ID, wt as HTTP_URL_RE, zt as InstallFlavor } from "./config-
|
|
5
|
+
import { Kt as UpdateChannel, Qt as PLAN_TOOL_NAME, Yt as PLAN_HOOK_EVENT, Zt as PLAN_RESULT_HOOK_EVENT, c as SHELL_AGENT_ID, wt as HTTP_URL_RE, zt as InstallFlavor } from "./config-DkgPnYvd.js";
|
|
6
6
|
import { a as rawTextOr, n as isRecord, o as textOr, r as numberOr } from "./coerce-oz_Z_6E7.js";
|
|
7
7
|
import { n as parseJsonRecord } from "./json-core-If8h-Qgy.js";
|
|
8
8
|
import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV, t as CODEX_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
|
|
@@ -10,7 +10,7 @@ import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-5G0D
|
|
|
10
10
|
import { t as buildAgentEnv } from "./spawn-env-BV9neKS3.js";
|
|
11
11
|
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-CACspAtQ.js";
|
|
12
12
|
import { O as nextBackoffMs, c as loadedJsonValue, d as writeJsonAtomicSync, s as loadJsonStateFileSync, t as appendJsonLine } from "./json-file-AKRVPqG1.js";
|
|
13
|
-
import { S as isExperimentalBuild, o as glimmervoidHomeDir, x as compareReleaseVersions } from "./config-store-
|
|
13
|
+
import { S as isExperimentalBuild, o as glimmervoidHomeDir, x as compareReleaseVersions } from "./config-store-DOLKpIyb.js";
|
|
14
14
|
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-BTYvnUmc.js";
|
|
15
15
|
import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-8U0YNRUx.js";
|
|
16
16
|
import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-DGjtaaCS.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-
|
|
1
|
+
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-CJw2UnFu.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Q as UNIT_STATUSES, l as AgentLimitsReply, r as AGENT_URL_ENV, tt as WhiteboardAgentReply } from "./session-EEl_da0y.js";
|
|
2
|
-
import { J as formatSessionLimits, i as agentCommandSpec, m as isAgentApiVerb, rt as parseCommand, t as AGENT_COMMAND_HELP } from "./agent-api-core-
|
|
2
|
+
import { J as formatSessionLimits, i as agentCommandSpec, m as isAgentApiVerb, rt as parseCommand, t as AGENT_COMMAND_HELP } from "./agent-api-core-CvjDCKlo.js";
|
|
3
3
|
import { i as resolveHookTarget } from "./hook-relay-core-DA_bz2KA.js";
|
|
4
4
|
import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
|
|
5
5
|
import { h as layoutBoard, i as describeOverCap, p as boardSvgDocument, v as planSteps } from "./shown-files-core-BofEvARh.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as SESSION_COMMANDS, _ as AgentWhyRequest, a as AgentAnswerRequest, c as AgentEditRequest, d as AgentReadRequest, f as AgentReviewsRequest, g as AgentSpawnRequest, h as AgentSettingsRequest, n as AGENT_REPLY_SCHEMAS, nt as WhiteboardAgentRequest, o as AgentAttentionRequest, p as AgentSendRequest, s as AgentCloseRequest, t as AGENT_API_VERBS, u as AgentPullRequestRequest, w as RefinedTaskTitle, z as TASK_TITLE_CONTROL_CHARACTERS } from "./session-EEl_da0y.js";
|
|
2
|
-
import { Wt as pullRequestKeyFromReference, l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-
|
|
2
|
+
import { Wt as pullRequestKeyFromReference, l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-DkgPnYvd.js";
|
|
3
3
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
@@ -2091,6 +2091,7 @@ var CommunityStateEntry = z.strictObject({
|
|
|
2091
2091
|
draft: CommunityDraft.nullable(),
|
|
2092
2092
|
error: z.string().optional(),
|
|
2093
2093
|
attempts: z.number().int().nonnegative(),
|
|
2094
|
+
retriedAfterTimeout: z.boolean().optional(),
|
|
2094
2095
|
seenAt: z.string(),
|
|
2095
2096
|
finishedAt: z.string().nullable()
|
|
2096
2097
|
});
|
|
@@ -2,7 +2,7 @@ import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { a as packageRoot, u as equalsIgnoringCaseOnWindows } from "./runtime-paths-CYwF658V.js";
|
|
3
3
|
import { n as glimmervoidHomeDir$1, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
4
4
|
import { T as SESSION_COMMANDS } from "./session-EEl_da0y.js";
|
|
5
|
-
import { $ as MEMORY_RESERVE_MB_RANGE, Bt as ONBOARDING_STEPS, Gt as UPDATE_CHANNELS, Ht as OPERATOR_ACTIONS_BY_SURFACE, J as FLYING_ANIMALS_DEFAULTS, Lt as DASHBOARD_VIEWS, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, Ut as OPERATOR_SURFACES, Vt as ONBOARDING_STEP_STATES, X as FLYING_ANIMALS_GAP_RANGE, Y as FLYING_ANIMALS_DURATION_RANGE, Z as FLYING_ANIMALS_SCALE_RANGE, at as POSTHOG_TRAFFIC_BASELINE_RANGE, ct as REPLAY_BUFFER_KB_RANGE, d as BranchGcFileSettings, dt as USAGE_INTEGER_RANGES, et as NON_NEGATIVE_NUMBER_RANGE, f as USAGE_COST_MODES, ft as USAGE_RETAIN_DAYS_RANGE, ht as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, i as Config, it as POSTHOG_PROJECT_ID_RANGE, lt as TASK_TITLE_TIMEOUT_RANGE, m as normalizeLegacyConfigNumbers, mt as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE, n as BUILTIN_AGENT_IDS, nt as POSITIVE_NUMBER_RANGE, ot as POSTHOG_TRAFFIC_MIN_USERS_RANGE, pt as USAGE_SCAN_INTERVAL_RANGE, q as COMMUNITY_INTERVAL_MINUTES_RANGE, rt as POSTHOG_FIX_TIMEOUT_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, st as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, t as AGENT_ID_SHAPE_MESSAGE, tt as PORT_RANGE, u as configIssueMessage, ut as USAGE_BUDGET_RANGE, y as HintFeature } from "./config-
|
|
5
|
+
import { $ as MEMORY_RESERVE_MB_RANGE, Bt as ONBOARDING_STEPS, Gt as UPDATE_CHANNELS, Ht as OPERATOR_ACTIONS_BY_SURFACE, J as FLYING_ANIMALS_DEFAULTS, Lt as DASHBOARD_VIEWS, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, Ut as OPERATOR_SURFACES, Vt as ONBOARDING_STEP_STATES, X as FLYING_ANIMALS_GAP_RANGE, Y as FLYING_ANIMALS_DURATION_RANGE, Z as FLYING_ANIMALS_SCALE_RANGE, at as POSTHOG_TRAFFIC_BASELINE_RANGE, ct as REPLAY_BUFFER_KB_RANGE, d as BranchGcFileSettings, dt as USAGE_INTEGER_RANGES, et as NON_NEGATIVE_NUMBER_RANGE, f as USAGE_COST_MODES, ft as USAGE_RETAIN_DAYS_RANGE, ht as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, i as Config, it as POSTHOG_PROJECT_ID_RANGE, lt as TASK_TITLE_TIMEOUT_RANGE, m as normalizeLegacyConfigNumbers, mt as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE, n as BUILTIN_AGENT_IDS, nt as POSITIVE_NUMBER_RANGE, ot as POSTHOG_TRAFFIC_MIN_USERS_RANGE, pt as USAGE_SCAN_INTERVAL_RANGE, q as COMMUNITY_INTERVAL_MINUTES_RANGE, rt as POSTHOG_FIX_TIMEOUT_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, st as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, t as AGENT_ID_SHAPE_MESSAGE, tt as PORT_RANGE, u as configIssueMessage, ut as USAGE_BUDGET_RANGE, y as HintFeature } from "./config-DkgPnYvd.js";
|
|
6
6
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
7
7
|
import { d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
|
|
8
8
|
import fs from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { s as loadConfigFile } from "./config-store-DOLKpIyb.js";
|
|
@@ -4,8 +4,8 @@ import { a as packageRoot, c as resolvePackageBin, d as isPathInside, f as safeP
|
|
|
4
4
|
import { n as glimmervoidHomeDir, r as isOperatorHomeUnderTest, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
5
5
|
import { $ as Unit, $t as TeamReviewThreadsRepository, A as SHOWN_FILE_CAP_BYTES, At as DECIDING_REVIEW_STATES, B as TaskTitle, Bt as ReviewDraft, C as ConversationQuestion, Ct as MyPrsSnapshot, E as SESSION_DOC_BODY_CAP_BYTES, Ft as PostedReviewEvent, Gt as TeamReviewActionRequest, Ht as ReviewResult, I as ShownFile, It as PostingPlan, J as Frame, Jt as TeamReviewResolveResponse, Lt as PrDetail, M as SSH_SIGN_BODY_CAP_BYTES, Mt as FindingSeverity, O as SESSION_NAME_PATTERN, Pt as GithubReviewState, Qt as TeamReviewThreadResult, R as SshSignRequest, St as MyPrThreadsResponse, U as Board, Ut as ReviewThreadId, Vt as ReviewFinding, W as BoardRecord, Wt as ReviewVerdict, X as Op, Xt as TeamReviewStatus, Y as Note, Yt as TeamReviewStateEntry, Z as Panel, Zt as TeamReviewThreadCommentsResponse, _ as AgentWhyRequest, _n as MERGEABLE_LIVE_STATES, _t as MyPrMergeStateResponse, an as HEX_SHA_RE, at as sparseBoardReply, b as CONVERSATION_PERMISSION_HOOK_EVENT, c as AgentEditRequest, cn as NODE_ID_RE, ct as MyPrAutoRebase, dt as MyPrKeepMergeableRequest, en as canApproveAfterComment, et as WHITEBOARD_LIMITS, g as AgentSpawnRequest, gn as KILLABLE_STATES, h as AgentSettingsRequest, hn as BADGE_LABELS, ht as MyPrMergeRequest, i as ASK_USER_QUESTION_TOOL_NAME, it as sparseBoardRecord, j as SIGN_URL_ENV, jt as EarlierReview, k as SESSION_NAME_RULE_TEXT, kt as CommitSha$1, ln as REPO_SLUG_RE, lt as MyPrCheckContext, mt as MyPrMergeMethod, o as AgentAttentionRequest, on as shortSha, ot as LinkedPr, pt as MyPrLaneEntry, q as Box, qt as TeamReviewCompareFiles, r as AGENT_URL_ENV, rn as hasStandingViewerApproval, rt as Wire, s as AgentCloseRequest, sn as GH_SEGMENT, st as MyPr, tn as decisionAsIfApprovalRequired, u as AgentPullRequestRequest, un as repoParts, ut as MyPrCheckContextsResponse, v as COHERENCE_HOOKS_INACTIVE, vn as RESTARTABLE_STATES, vt as MyPrMergeWhenReadyRequest, wt as MyPrsState, x as CONVERSATION_TOOL_RESULT_HOOK_EVENT, xt as MyPrThreadNode, y as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, yn as STATES, zt as ReviewComment } from "./session-EEl_da0y.js";
|
|
6
6
|
import { c as spawn, i as execFileSync, n as execFile, r as execFileAsync, s as refuseLaunchesOf, t as assertLaunchable } from "./child-process-safe-BCOoKfxG.js";
|
|
7
|
-
import { $t as PlanDecision, A as PrCheckoutCaseInput, At as CoherenceJournalOutput, B as GithubPrLightSearchNode, C as BenchmarkJudgement, Ct as issuePullRequestStateFromGithub, D as CommitComparison, Dt as MAX_RAW_LINE_CHARS, E as BenchmarkSuite, Et as SessionSetup, F as CommunityVerdict, Ft as CLIENT_LOG_TEXT_MAX_CHARS, G as WorkflowsSettings, H as comparablePrKey, I as DISCORD_CHANNEL_NAME_RE, It as CONTROL_FRAME_MAX_BYTES, Jt as PLAN_BODY_CAP_BYTES, K as WorkflowsState, L as SKILL_NAME_RE, M as CommunityDraft, Mt as changeMapFactId, N as CommunityItem, Nt as CHANGES_POLL_INTERVAL_MS, O as MergedPrListing, Ot as TraceCheckpoint, P as CommunityState, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, Qt as PLAN_TOOL_NAME, R as GithubPrDetailNode, Rt as GithubTeam, S as BenchmarkId, St as IssuesStatus, T as BenchmarkStatus, Tt as HookEnvelope, U as WorkflowCommentBody, V as GithubPrsFrame, W as WorkflowLabelName, Wt as pullRequestKeyFromReference, Xt as PLAN_HOOK_OUTPUT_MAX_CHARS, Yt as PLAN_HOOK_EVENT, Zt as PLAN_RESULT_HOOK_EVENT, _ as HINT_FEATURES, _t as GithubIssueResponse, a as ConfigUpdate, b as BenchmarkActionRequest, bt as IssuesSearchResponse, c as SHELL_AGENT_ID, dt as USAGE_INTEGER_RANGES, en as PlanRevision, f as USAGE_COST_MODES, g as FeatureHintState, gt as GithubIssuePullRequestsRepository, h as ClientMessage, j as CommunityActionRequest, jt as ChangeMap, k as MinedPrReviewData, kt as TraceRecord, n as BUILTIN_AGENT_IDS, nn as planTitle, p as USAGE_VENDOR_KEYS, qt as UpdateJournal, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, tn as parseExitPlanModeHookPayload, u as configIssueMessage, v as HINT_VIEW_BY_FEATURE, vt as IssueKey, w as BenchmarkRun, x as BenchmarkCase, xt as IssuesState, yt as IssueUpdate, z as GithubPrKey } from "./config-
|
|
8
|
-
import { $ as supervisionLine, A as parseRefinedSessionName, B as resumePromptFor, C as decideTaskTitleRefinement, D as extractPromptTaskTitle, E as extractOscTaskTitle, F as AUTO_CONTINUE_PROMPT, G as isAutoNameOf, H as claudeProjectsDir, I as RESUME_ID_RE, K as nextSuggestedName, L as isConversationReplacedAtStartup, M as resolveRefocusTaskTitle, N as resolveTaskTitle, O as isSelfWakePrompt, P as seedTaskTitleSources, Q as routeAgentNotes, R as pickAutoResume, S as cleanTaskPrompt, T as extractHookTaskTitle, U as listRepoConversations, V as shouldAdoptReportedResumeId, W as listRepoWorktreePaths, X as permitsHelpCommand, Y as hintFor, Z as promptHintFor, _ as projectReviewDetail, a as checkAgentReply, b as buildTaskTitleRefinementPrompt, c as deriveChildSessionName, d as describePushLanding, et as toolHookFactsOf, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as parseRefinedTaskTitle, k as isSubstantivePrompt, l as describeChildEndNote, n as REFUSAL_REASON, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as describeSessionLimits, s as decideSpawnAllowance, u as describeKeptChildAttention, v as projectReviews, w as extractAiTitle, x as chooseRefinedSessionName, y as buildPersistedTaskTitle, z as resolveResumeTarget } from "./agent-api-core-
|
|
7
|
+
import { $t as PlanDecision, A as PrCheckoutCaseInput, At as CoherenceJournalOutput, B as GithubPrLightSearchNode, C as BenchmarkJudgement, Ct as issuePullRequestStateFromGithub, D as CommitComparison, Dt as MAX_RAW_LINE_CHARS, E as BenchmarkSuite, Et as SessionSetup, F as CommunityVerdict, Ft as CLIENT_LOG_TEXT_MAX_CHARS, G as WorkflowsSettings, H as comparablePrKey, I as DISCORD_CHANNEL_NAME_RE, It as CONTROL_FRAME_MAX_BYTES, Jt as PLAN_BODY_CAP_BYTES, K as WorkflowsState, L as SKILL_NAME_RE, M as CommunityDraft, Mt as changeMapFactId, N as CommunityItem, Nt as CHANGES_POLL_INTERVAL_MS, O as MergedPrListing, Ot as TraceCheckpoint, P as CommunityState, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, Qt as PLAN_TOOL_NAME, R as GithubPrDetailNode, Rt as GithubTeam, S as BenchmarkId, St as IssuesStatus, T as BenchmarkStatus, Tt as HookEnvelope, U as WorkflowCommentBody, V as GithubPrsFrame, W as WorkflowLabelName, Wt as pullRequestKeyFromReference, Xt as PLAN_HOOK_OUTPUT_MAX_CHARS, Yt as PLAN_HOOK_EVENT, Zt as PLAN_RESULT_HOOK_EVENT, _ as HINT_FEATURES, _t as GithubIssueResponse, a as ConfigUpdate, b as BenchmarkActionRequest, bt as IssuesSearchResponse, c as SHELL_AGENT_ID, dt as USAGE_INTEGER_RANGES, en as PlanRevision, f as USAGE_COST_MODES, g as FeatureHintState, gt as GithubIssuePullRequestsRepository, h as ClientMessage, j as CommunityActionRequest, jt as ChangeMap, k as MinedPrReviewData, kt as TraceRecord, n as BUILTIN_AGENT_IDS, nn as planTitle, p as USAGE_VENDOR_KEYS, qt as UpdateJournal, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, tn as parseExitPlanModeHookPayload, u as configIssueMessage, v as HINT_VIEW_BY_FEATURE, vt as IssueKey, w as BenchmarkRun, x as BenchmarkCase, xt as IssuesState, yt as IssueUpdate, z as GithubPrKey } from "./config-DkgPnYvd.js";
|
|
8
|
+
import { $ as supervisionLine, A as parseRefinedSessionName, B as resumePromptFor, C as decideTaskTitleRefinement, D as extractPromptTaskTitle, E as extractOscTaskTitle, F as AUTO_CONTINUE_PROMPT, G as isAutoNameOf, H as claudeProjectsDir, I as RESUME_ID_RE, K as nextSuggestedName, L as isConversationReplacedAtStartup, M as resolveRefocusTaskTitle, N as resolveTaskTitle, O as isSelfWakePrompt, P as seedTaskTitleSources, Q as routeAgentNotes, R as pickAutoResume, S as cleanTaskPrompt, T as extractHookTaskTitle, U as listRepoConversations, V as shouldAdoptReportedResumeId, W as listRepoWorktreePaths, X as permitsHelpCommand, Y as hintFor, Z as promptHintFor, _ as projectReviewDetail, a as checkAgentReply, b as buildTaskTitleRefinementPrompt, c as deriveChildSessionName, d as describePushLanding, et as toolHookFactsOf, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as parseRefinedTaskTitle, k as isSubstantivePrompt, l as describeChildEndNote, n as REFUSAL_REASON, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as describeSessionLimits, s as decideSpawnAllowance, u as describeKeptChildAttention, v as projectReviews, w as extractAiTitle, x as chooseRefinedSessionName, y as buildPersistedTaskTitle, z as resolveResumeTarget } from "./agent-api-core-CvjDCKlo.js";
|
|
9
9
|
import { a as rawTextOr, i as positiveNumberOr, n as isRecord$1, o as textOr, r as numberOr, t as coercedNumberOr } from "./coerce-oz_Z_6E7.js";
|
|
10
10
|
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-xS1GFU8P.js";
|
|
11
11
|
import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
|
|
@@ -16,14 +16,14 @@ import { r as knownWriteHookInput } from "./posthog-read-gate-core-CeSY56AB.js";
|
|
|
16
16
|
import { _ as findDependencyCycle, a as filesAfterRetention, c as readPageTitle, d as thumbnailOwnerIdOf, f as thumbnailRecipeFor, g as cappedWarnings, h as layoutBoard, i as describeOverCap, l as shownMimeForFilename, m as escapeMarkup, n as SHOWN_SNIFF_BYTES, o as isShownPageMime, p as boardSvgDocument, r as decideShownKind, s as leavesVisibleRawTextOpen, t as SHOWN_PAGE_ZOOM_BRIDGE, u as thumbnailFilenameOf, v as planSteps$1, y as unitsOf } from "./shown-files-core-BofEvARh.js";
|
|
17
17
|
import { c as parsePresentedCredential, n as shellQuote, s as mcpLaunchFor } from "./hook-command-core-5G0De2KV.js";
|
|
18
18
|
import { C as parseCgroupBytes, D as DEFAULT_MAX_MS, E as DEFAULT_BASE_MS, O as nextBackoffMs, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, 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-AKRVPqG1.js";
|
|
19
|
-
import { $ as buildBrowserExceptionProperties, D as validateSettingsBlock, E as settingsBlockSpecFor, G as describeDataAttach, H as DEEP_HISTORY_SCROLLBACK_LINES, J as FIRST_RUN_NOTICE, K as parseDataAttach, O as SETTINGS_INDEX, Q as buildAiGenerationEvents, R as valueAtPath, St as isSameDirectoryPath, T as mergeSettingsBlock, V as isExperimentalSetting, W as LOGGED_FAST_CLOSE_COUNTS, X as TELEMETRY_FLAGS_URL, Y as TELEMETRY_BATCH_URL, Z as adapterBucket, _ as usablePrefixes, a as generateProjectId, at as decideIsDevInstall, b as unrefTimer, bt as canonicalizePath, ct as exceptionFingerprint, d as DEFAULT_CONFIG, dt as resolveProjectToken, et as buildExceptionProperties, f as DEFAULT_BRANCH_GC_PREFIXES, ft as DashboardTelemetryReport, g as sessionIdFromBranch, h as planWorktreeGc, ht as TelemetryState, i as ensureProjectIds, it as codexUserIdOf, lt as nodeMajorVersion, m as planBranchGc, mt as TELEMETRY_EVENT_SCHEMAS, n as createConfigStore, nt as classifySessionExit, o as glimmervoidHomeDir$1, ot as decideRemoteTelemetryState, p as matchedPrefix, pt as PendingCrashReport, q as parseDataClientMessage, r as ABORT_CONFIG_SAVE, rt as claudeAccountUuidOf, st as decideTelemetryConsent, tt as buildPersonProperties, ut as parsePosthogReleaseId, v as worktreeIntegrationTips, vt as stableConfigKey, xt as comparableDirectoryPath, y as DEFAULT_TIMER_FNS } from "./config-store-
|
|
19
|
+
import { $ as buildBrowserExceptionProperties, D as validateSettingsBlock, E as settingsBlockSpecFor, G as describeDataAttach, H as DEEP_HISTORY_SCROLLBACK_LINES, J as FIRST_RUN_NOTICE, K as parseDataAttach, O as SETTINGS_INDEX, Q as buildAiGenerationEvents, R as valueAtPath, St as isSameDirectoryPath, T as mergeSettingsBlock, V as isExperimentalSetting, W as LOGGED_FAST_CLOSE_COUNTS, X as TELEMETRY_FLAGS_URL, Y as TELEMETRY_BATCH_URL, Z as adapterBucket, _ as usablePrefixes, a as generateProjectId, at as decideIsDevInstall, b as unrefTimer, bt as canonicalizePath, ct as exceptionFingerprint, d as DEFAULT_CONFIG, dt as resolveProjectToken, et as buildExceptionProperties, f as DEFAULT_BRANCH_GC_PREFIXES, ft as DashboardTelemetryReport, g as sessionIdFromBranch, h as planWorktreeGc, ht as TelemetryState, i as ensureProjectIds, it as codexUserIdOf, lt as nodeMajorVersion, m as planBranchGc, mt as TELEMETRY_EVENT_SCHEMAS, n as createConfigStore, nt as classifySessionExit, o as glimmervoidHomeDir$1, ot as decideRemoteTelemetryState, p as matchedPrefix, pt as PendingCrashReport, q as parseDataClientMessage, r as ABORT_CONFIG_SAVE, rt as claudeAccountUuidOf, st as decideTelemetryConsent, tt as buildPersonProperties, ut as parsePosthogReleaseId, v as worktreeIntegrationTips, vt as stableConfigKey, xt as comparableDirectoryPath, y as DEFAULT_TIMER_FNS } from "./config-store-DOLKpIyb.js";
|
|
20
20
|
import { i as resolveArgvCommandMatches } from "./kimi-BTYvnUmc.js";
|
|
21
|
-
import { $ as grokHomes, A as decideUploadType, At as generateToken, B as containmentRefusalReason, Bt as readStoredHooks, C as parseRegistryLatest, Ct as shouldReplace, D as openContainedFile, Dt as HOOK_EVENTS, E as shortSha$1, Et as claudeCode, F as planUploadRetention, Ft as agentHookGroupOf, G as codexFallbackRoots, Gt as sweepOrphanedHostScratch, H as planContiguousRead, Ht as upsertHook, I as MAX_TRANSCRIPT_READ_BYTES, It as appendUserHooks, J as codexSessionIdFromPath, Jt as recordSweptPath, K as codexHomes, Kt as appendRemovalRecord, L as TRACE_TAIL_SCAN_BYTES, Lt as hooksForProject, M as framePathPaste, Mt as writeSessionSettings, N as imageMimeForUploadFilename, Nt as HOOK_EVENT_CATALOG, O as MAX_UPLOAD_BYTES, Ot as PLAN_HOLD_RELEASE_MS, P as isSafePathSegment, Pt as ID_RE, Q as expandTilde, R as committedOffsetFromTraceTailOrNull, Rt as normalizeHook, S as parseRegistryDeprecation, St as parseUsageLine, T as pickNewestPublished, Tt as vendorUsageEntry, U as resumeOffsetFrom, Ut as HOOK_TOOLS, V as isOversizedPartialLine, Vt as removeHook, W as withCommittedOffset, Wt as makeHostScratchDirectory, X as decideFileRead, Y as continuationDelayMs, Yt as removalsJournalPath, Z as dedupeCodexFiles, _ as decideInstallFlavor, _t as foldReplacementIntoGenerationRollup, a as describeAgentResolvability, at as scopedClaudeRoots, b as normalizeSha, bt as mergeGenerationRollups, c as isKnownAgentId, ct as shouldPersistWarehouse, d as resolveAdapter, dt as parseKimiUsageLine, et as isUsageFile, f as setCustomAgents, ft as addEntryToTotals, g as NODE_PTY_INSTALL_SCRIPT_FLAG, gt as foldEntryIntoGenerationRollup, h as requestCodexAppServer, ht as expandAdvisorIterations, i as customAgentFingerprint, it as resolveProjectsDirs, j as exceedsUploadCap, jt as sweepOrphans, k as buildUploadFilename, kt as buildHookSettings, l as listAgentIds, lt as splitLines, m as readHostCodexVersion, mt as emptyTotals, n as cachedAgentResolvability, nt as passOutcome, o as getAdapter, ot as sessionsRootCandidates, p as codex, pt as dedupKeys, q as codexRootCandidates, qt as appendRemovalRecordSync, r as commandFor, rt as projectDirCandidates, s as hookProfileOf, st as shouldEvaluateDespiteIoFailures, t as DEFAULT_AGENT_ID$1, tt as kimiHomes, u as resetCommandCache, ut as kimiDedupIdentity, v as decideUpdateStatus, vt as identityFromRelPath, w as parseResolvedSha, wt as totalTokensOf$1, x as normalizeUpdateChannel, xt as parseJsonLine, y as isCheckFresh, yt as isWithinGenerationRecencyWindow, z as completeLineBytes, zt as rawStoredHooks } from "./adapters-
|
|
21
|
+
import { $ as grokHomes, A as decideUploadType, At as generateToken, B as containmentRefusalReason, Bt as readStoredHooks, C as parseRegistryLatest, Ct as shouldReplace, D as openContainedFile, Dt as HOOK_EVENTS, E as shortSha$1, Et as claudeCode, F as planUploadRetention, Ft as agentHookGroupOf, G as codexFallbackRoots, Gt as sweepOrphanedHostScratch, H as planContiguousRead, Ht as upsertHook, I as MAX_TRANSCRIPT_READ_BYTES, It as appendUserHooks, J as codexSessionIdFromPath, Jt as recordSweptPath, K as codexHomes, Kt as appendRemovalRecord, L as TRACE_TAIL_SCAN_BYTES, Lt as hooksForProject, M as framePathPaste, Mt as writeSessionSettings, N as imageMimeForUploadFilename, Nt as HOOK_EVENT_CATALOG, O as MAX_UPLOAD_BYTES, Ot as PLAN_HOLD_RELEASE_MS, P as isSafePathSegment, Pt as ID_RE, Q as expandTilde, R as committedOffsetFromTraceTailOrNull, Rt as normalizeHook, S as parseRegistryDeprecation, St as parseUsageLine, T as pickNewestPublished, Tt as vendorUsageEntry, U as resumeOffsetFrom, Ut as HOOK_TOOLS, V as isOversizedPartialLine, Vt as removeHook, W as withCommittedOffset, Wt as makeHostScratchDirectory, X as decideFileRead, Y as continuationDelayMs, Yt as removalsJournalPath, Z as dedupeCodexFiles, _ as decideInstallFlavor, _t as foldReplacementIntoGenerationRollup, a as describeAgentResolvability, at as scopedClaudeRoots, b as normalizeSha, bt as mergeGenerationRollups, c as isKnownAgentId, ct as shouldPersistWarehouse, d as resolveAdapter, dt as parseKimiUsageLine, et as isUsageFile, f as setCustomAgents, ft as addEntryToTotals, g as NODE_PTY_INSTALL_SCRIPT_FLAG, gt as foldEntryIntoGenerationRollup, h as requestCodexAppServer, ht as expandAdvisorIterations, i as customAgentFingerprint, it as resolveProjectsDirs, j as exceedsUploadCap, jt as sweepOrphans, k as buildUploadFilename, kt as buildHookSettings, l as listAgentIds, lt as splitLines, m as readHostCodexVersion, mt as emptyTotals, n as cachedAgentResolvability, nt as passOutcome, o as getAdapter, ot as sessionsRootCandidates, p as codex, pt as dedupKeys, q as codexRootCandidates, qt as appendRemovalRecordSync, r as commandFor, rt as projectDirCandidates, s as hookProfileOf, st as shouldEvaluateDespiteIoFailures, t as DEFAULT_AGENT_ID$1, tt as kimiHomes, u as resetCommandCache, ut as kimiDedupIdentity, v as decideUpdateStatus, vt as identityFromRelPath, w as parseResolvedSha, wt as totalTokensOf$1, x as normalizeUpdateChannel, xt as parseJsonLine, y as isCheckFresh, yt as isWithinGenerationRecencyWindow, z as completeLineBytes, zt as rawStoredHooks } from "./adapters-DD09SXvJ.js";
|
|
22
22
|
import { c as CODEX_HOME_PROFILE, l as KIMI_HOME_PROFILE } from "./agent-home-core-8U0YNRUx.js";
|
|
23
23
|
import { d as releaseSessionLock, f as sessionIdOfLockFile, l as releaseUnheldAgentHomeSecrets, n as generatedAgentHomePath, p as trashSessionTempFolderOnceUnheld, s as realAgentHome, u as createHeldSessionTempFolder } from "./agent-home-DGjtaaCS.js";
|
|
24
24
|
import { a as formatSshPublicKey, c as orderAgentSockets, i as commitSigningShimText, l as parseSshPublicKey, n as NO_AGENT_HOLDS_KEY, o as isForwardedAgentDirName, r as agentListsKey, s as isSignableGitObject, t as COMMIT_SIGNING_SHIM_NAME } from "./ssh-signing-core-CRhVVWNW.js";
|
|
25
|
-
import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-
|
|
26
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
25
|
+
import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-Bw6x8YR1.js";
|
|
26
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-CSpR71kR.js";
|
|
27
27
|
import { createRequire } from "node:module";
|
|
28
28
|
import fs, { readFileSync } from "node:fs";
|
|
29
29
|
import path, { join, resolve } from "node:path";
|
|
@@ -22638,7 +22638,7 @@ async function listOperatorCodexServers() {
|
|
|
22638
22638
|
});
|
|
22639
22639
|
return JSON.parse(stdout);
|
|
22640
22640
|
}
|
|
22641
|
-
async function
|
|
22641
|
+
async function gateSelfTestFailure(gateTool) {
|
|
22642
22642
|
const hookCommand = HOOK_TOOLS.posthogReadGate.claudeEntry(gateTool, "").hooks[0]?.command ?? "";
|
|
22643
22643
|
try {
|
|
22644
22644
|
await execFileAsync(HOOK_SHELL, ["-c", hookCommand], {
|
|
@@ -22646,12 +22646,22 @@ async function gateDeniesKnownWrite(gateTool) {
|
|
|
22646
22646
|
encoding: "utf8",
|
|
22647
22647
|
timeout: GATE_SELF_TEST_TIMEOUT_MS
|
|
22648
22648
|
});
|
|
22649
|
-
return
|
|
22649
|
+
return "it allowed a known write";
|
|
22650
22650
|
} catch (error) {
|
|
22651
|
-
|
|
22651
|
+
if (!(error instanceof Error)) return "it failed to run";
|
|
22652
|
+
if ("code" in error && error.code === BLOCKING_EXIT_CODE) return null;
|
|
22653
|
+
if ("killed" in error && error.killed) return `it gave no answer within ${GATE_SELF_TEST_TIMEOUT_MS} ms`;
|
|
22654
|
+
if ("code" in error && error.code !== void 0) return `it exited with ${String(error.code)}`;
|
|
22655
|
+
return "it failed to run";
|
|
22652
22656
|
}
|
|
22653
22657
|
}
|
|
22654
|
-
async function
|
|
22658
|
+
async function gateRefusesWrites(gateTool, warn) {
|
|
22659
|
+
const failure = await gateSelfTestFailure(gateTool);
|
|
22660
|
+
if (failure === null) return true;
|
|
22661
|
+
warn(`PostHog is configured, but the PostHog read gate self-test failed (${failure}), so this lane runs without PostHog`);
|
|
22662
|
+
return false;
|
|
22663
|
+
}
|
|
22664
|
+
async function prepareCodexLaneMcp(listCodexServers, gatePath, warn) {
|
|
22655
22665
|
const servers = codexMcpServers(await listCodexServers().catch(() => null));
|
|
22656
22666
|
const server = findPosthogServer(servers);
|
|
22657
22667
|
if (!server) return null;
|
|
@@ -22661,13 +22671,13 @@ async function prepareCodexLaneMcp(listCodexServers, gatePath) {
|
|
|
22661
22671
|
gatePath,
|
|
22662
22672
|
interpreterPath: process.execPath
|
|
22663
22673
|
});
|
|
22664
|
-
if (!posture || !await
|
|
22674
|
+
if (!posture || !await gateRefusesWrites(posture.hookTool, warn)) return null;
|
|
22665
22675
|
return {
|
|
22666
22676
|
posture,
|
|
22667
22677
|
cleanup: async () => {}
|
|
22668
22678
|
};
|
|
22669
22679
|
}
|
|
22670
|
-
async function prepareKimiLaneMcp(kimiHome, gatePath) {
|
|
22680
|
+
async function prepareKimiLaneMcp(kimiHome, gatePath, warn) {
|
|
22671
22681
|
const kimiMcpConfig = await fs$1.readFile(path.join(kimiHome, "mcp.json"), "utf8").then(JSON.parse, () => null);
|
|
22672
22682
|
const server = findPosthogServer(isRecord$1(kimiMcpConfig) ? kimiMcpConfig.mcpServers : null);
|
|
22673
22683
|
if (!server) return null;
|
|
@@ -22676,7 +22686,7 @@ async function prepareKimiLaneMcp(kimiHome, gatePath) {
|
|
|
22676
22686
|
gatePath,
|
|
22677
22687
|
interpreterPath: process.execPath
|
|
22678
22688
|
});
|
|
22679
|
-
if (!posture?.laneHome || !await
|
|
22689
|
+
if (!posture?.laneHome || !await gateRefusesWrites(posture.hookTool, warn)) return null;
|
|
22680
22690
|
const homeParent = await makeHostScratchDirectory(LANE_MCP_DIR_PREFIX);
|
|
22681
22691
|
return {
|
|
22682
22692
|
posture,
|
|
@@ -22690,9 +22700,9 @@ async function prepareKimiLaneMcp(kimiHome, gatePath) {
|
|
|
22690
22700
|
}).catch(() => {})
|
|
22691
22701
|
};
|
|
22692
22702
|
}
|
|
22693
|
-
async function prepareLaneMcp({ laneArgs, agent }, { readClaudeConfig = readOperatorClaudeConfig, listCodexServers = listOperatorCodexServers, kimiHome = realAgentHome(KIMI_HOME_PROFILE), gatePath = relayPath("posthog-read-gate") } = {}) {
|
|
22694
|
-
if (agent === CODEX_AGENT_ID) return prepareCodexLaneMcp(listCodexServers, gatePath);
|
|
22695
|
-
if (agent === KIMI_AGENT_ID$2) return prepareKimiLaneMcp(kimiHome, gatePath);
|
|
22703
|
+
async function prepareLaneMcp({ laneArgs, agent }, { readClaudeConfig = readOperatorClaudeConfig, listCodexServers = listOperatorCodexServers, kimiHome = realAgentHome(KIMI_HOME_PROFILE), gatePath = relayPath("posthog-read-gate"), warn = (message) => console.warn(`[lane-mcp] ${message}`) } = {}) {
|
|
22704
|
+
if (agent === CODEX_AGENT_ID) return prepareCodexLaneMcp(listCodexServers, gatePath, warn);
|
|
22705
|
+
if (agent === KIMI_AGENT_ID$2) return prepareKimiLaneMcp(kimiHome, gatePath, warn);
|
|
22696
22706
|
if (agent !== void 0 && agent !== DEFAULT_AGENT_ID) return null;
|
|
22697
22707
|
const claudeConfig = await readClaudeConfig().catch(() => null);
|
|
22698
22708
|
const server = findPosthogServer(isRecord$1(claudeConfig) ? claudeConfig.mcpServers : null);
|
|
@@ -22716,7 +22726,7 @@ async function prepareLaneMcp({ laneArgs, agent }, { readClaudeConfig = readOper
|
|
|
22716
22726
|
interpreterPath: process.execPath,
|
|
22717
22727
|
laneArgs
|
|
22718
22728
|
});
|
|
22719
|
-
if (!posture || !await
|
|
22729
|
+
if (!posture || !await gateRefusesWrites(posture.hookTool, warn)) {
|
|
22720
22730
|
await removeConfigDirectory();
|
|
22721
22731
|
return null;
|
|
22722
22732
|
}
|
|
@@ -32611,6 +32621,22 @@ function forumTags(relation) {
|
|
|
32611
32621
|
if (!Array.isArray(tagRelations)) return [];
|
|
32612
32622
|
return tagRelations.map(forumLabel).filter((label) => label !== null).slice(0, MAX_FORUM_TAGS);
|
|
32613
32623
|
}
|
|
32624
|
+
function isForumPost(attributes) {
|
|
32625
|
+
const topic = recordOf(attributes.forumTopic).data;
|
|
32626
|
+
return Boolean(topic) && typeof topic === "object" && !Array.isArray(topic);
|
|
32627
|
+
}
|
|
32628
|
+
function forumRowCreatedAt(row) {
|
|
32629
|
+
const createdAt = parsedAttributes(row.attributes).createdAt;
|
|
32630
|
+
if (typeof createdAt !== "string" || Number.isNaN(Date.parse(createdAt))) return null;
|
|
32631
|
+
return new Date(createdAt).toISOString();
|
|
32632
|
+
}
|
|
32633
|
+
function lastForumRowCreatedAt(rows) {
|
|
32634
|
+
for (let index = rows.length - 1; index >= 0; index -= 1) {
|
|
32635
|
+
const createdAt = forumRowCreatedAt(rows[index] ?? {});
|
|
32636
|
+
if (createdAt) return createdAt;
|
|
32637
|
+
}
|
|
32638
|
+
return null;
|
|
32639
|
+
}
|
|
32614
32640
|
function forumItemFromRow(row) {
|
|
32615
32641
|
const attributes = parsedAttributes(row.attributes);
|
|
32616
32642
|
const permalink = typeof attributes.permalink === "string" ? attributes.permalink : "";
|
|
@@ -32630,10 +32656,13 @@ function forumItemFromRow(row) {
|
|
|
32630
32656
|
return parsed.success ? parsed.data : null;
|
|
32631
32657
|
}
|
|
32632
32658
|
function forumItemsFromRows(rows) {
|
|
32633
|
-
const
|
|
32659
|
+
const isPageCommentThread = (row) => forumRowCreatedAt(row) !== null && !isForumPost(parsedAttributes(row.attributes));
|
|
32660
|
+
const postRows = rows.filter((row) => !isPageCommentThread(row));
|
|
32661
|
+
const items = postRows.map(forumItemFromRow).filter((item) => item !== null);
|
|
32634
32662
|
return {
|
|
32635
32663
|
items,
|
|
32636
|
-
droppedRows:
|
|
32664
|
+
droppedRows: postRows.length - items.length,
|
|
32665
|
+
newestRowAt: lastForumRowCreatedAt(rows)
|
|
32637
32666
|
};
|
|
32638
32667
|
}
|
|
32639
32668
|
function queuedEntry(item, nowIso) {
|
|
@@ -32690,7 +32719,8 @@ function discordQuery() {
|
|
|
32690
32719
|
return [
|
|
32691
32720
|
"SELECT uuid, event, timestamp, properties.channel_id AS channel_id, properties.guild_id AS guild_id,",
|
|
32692
32721
|
`${DISCORD_CHANNEL_NAME_EXPRESSION} AS channel_name, properties.message_content AS message_content,`,
|
|
32693
|
-
"properties.thread_id AS thread_id, properties.thread_name AS thread_name",
|
|
32722
|
+
"properties.thread_id AS thread_id, properties.thread_name AS thread_name,",
|
|
32723
|
+
"distinct_id AS author_ref, properties.is_reply AS is_reply, properties.mention_count AS mention_count",
|
|
32694
32724
|
"FROM events WHERE event IN ('message_sent', 'thread_created') AND timestamp > parseDateTimeBestEffort({since})",
|
|
32695
32725
|
`AND has({channels}, ${DISCORD_CHANNEL_NAME_EXPRESSION})`,
|
|
32696
32726
|
"ORDER BY timestamp ASC",
|
|
@@ -32709,26 +32739,97 @@ function discordTimestamp(row) {
|
|
|
32709
32739
|
function discordTitle(content) {
|
|
32710
32740
|
return (content.split(/\r?\n/).find((line) => line.trim())?.trim() ?? "").slice(0, DISCORD_TITLE_CHARS) || "Discord message";
|
|
32711
32741
|
}
|
|
32742
|
+
var DISCORD_GROUP_GAP_MS = 9e5;
|
|
32743
|
+
var DISCORD_DROP_REASON_LABELS = {
|
|
32744
|
+
channel: "outside the allowlisted channels",
|
|
32745
|
+
ids: "without a guild or channel id",
|
|
32746
|
+
time: "without a timestamp",
|
|
32747
|
+
empty: "with no text",
|
|
32748
|
+
shape: "that did not make a valid item"
|
|
32749
|
+
};
|
|
32750
|
+
function discordChannelId(row) {
|
|
32751
|
+
return stringField(row, "event") === "thread_created" ? stringField(row, "thread_id") : stringField(row, "channel_id");
|
|
32752
|
+
}
|
|
32753
|
+
function discordChannelUrl(row) {
|
|
32754
|
+
return `${DISCORD_CHANNEL_URL}${stringField(row, "guild_id")}/${discordChannelId(row)}`;
|
|
32755
|
+
}
|
|
32712
32756
|
function discordItemFromRow(row, allowlist, threadNames) {
|
|
32713
32757
|
const channelName = stringField(row, "channel_name");
|
|
32714
32758
|
const guildId = stringField(row, "guild_id");
|
|
32715
32759
|
const isThread = stringField(row, "event") === "thread_created";
|
|
32716
|
-
const channelId =
|
|
32760
|
+
const channelId = discordChannelId(row);
|
|
32717
32761
|
const createdAt = discordTimestamp(row);
|
|
32718
|
-
if (!allowlist.has(channelName)
|
|
32762
|
+
if (!allowlist.has(channelName)) return "channel";
|
|
32763
|
+
if (!DISCORD_SNOWFLAKE_RE.test(guildId) || !DISCORD_SNOWFLAKE_RE.test(channelId)) return "ids";
|
|
32764
|
+
if (createdAt === null) return "time";
|
|
32719
32765
|
const content = isThread ? stringField(row, "thread_name") : stringField(row, "message_content");
|
|
32720
|
-
if (!content.trim()) return
|
|
32766
|
+
if (!content.trim()) return "empty";
|
|
32721
32767
|
const parsed = CommunityItem.safeParse({
|
|
32722
32768
|
key: `discord:${stringField(row, "uuid")}`,
|
|
32723
32769
|
source: "discord",
|
|
32724
32770
|
title: (threadNames.get(channelId) ?? discordTitle(content)).slice(0, MAX_TITLE_CHARS),
|
|
32725
32771
|
body: content.slice(0, MAX_BODY_CHARS),
|
|
32726
|
-
url:
|
|
32772
|
+
url: discordChannelUrl(row),
|
|
32727
32773
|
author: DISCORD_AUTHOR,
|
|
32728
32774
|
channel: channelName,
|
|
32729
32775
|
createdAt
|
|
32730
32776
|
});
|
|
32731
|
-
return parsed.success ? parsed.data :
|
|
32777
|
+
return parsed.success ? parsed.data : "shape";
|
|
32778
|
+
}
|
|
32779
|
+
function discordReplyFacts(row) {
|
|
32780
|
+
const mentionCount = Number(row.mention_count);
|
|
32781
|
+
return {
|
|
32782
|
+
isReply: row.is_reply === true || row.is_reply === "true",
|
|
32783
|
+
mentionCount: Number.isInteger(mentionCount) && mentionCount > 0 ? mentionCount : 0
|
|
32784
|
+
};
|
|
32785
|
+
}
|
|
32786
|
+
function groupedDiscordItems(itemRows) {
|
|
32787
|
+
const items = [];
|
|
32788
|
+
const replyFacts = /* @__PURE__ */ new Map();
|
|
32789
|
+
const openRunsByChannel = /* @__PURE__ */ new Map();
|
|
32790
|
+
for (const { row, item } of itemRows) {
|
|
32791
|
+
if (item === null) {
|
|
32792
|
+
openRunsByChannel.delete(discordChannelUrl(row));
|
|
32793
|
+
continue;
|
|
32794
|
+
}
|
|
32795
|
+
const facts = discordReplyFacts(row);
|
|
32796
|
+
const authorRef = stringField(row, "author_ref");
|
|
32797
|
+
const canJoinRun = authorRef !== "" && stringField(row, "event") === "message_sent" && !facts.isReply;
|
|
32798
|
+
const messageMs = Date.parse(item.createdAt);
|
|
32799
|
+
const openRun = openRunsByChannel.get(item.url);
|
|
32800
|
+
const runStart = openRun ? items[openRun.index] : void 0;
|
|
32801
|
+
const runStartFacts = runStart ? replyFacts.get(runStart.key) : void 0;
|
|
32802
|
+
const joinedBody = runStart ? `${runStart.body}\n\n${item.body}` : "";
|
|
32803
|
+
if (canJoinRun && openRun?.authorRef === authorRef && messageMs - openRun.lastMessageMs <= DISCORD_GROUP_GAP_MS && joinedBody.length <= 2e3 && openRun && runStart && runStartFacts) {
|
|
32804
|
+
items[openRun.index] = {
|
|
32805
|
+
...runStart,
|
|
32806
|
+
body: joinedBody
|
|
32807
|
+
};
|
|
32808
|
+
replyFacts.set(runStart.key, {
|
|
32809
|
+
...runStartFacts,
|
|
32810
|
+
mentionCount: runStartFacts.mentionCount + facts.mentionCount
|
|
32811
|
+
});
|
|
32812
|
+
openRun.lastMessageMs = messageMs;
|
|
32813
|
+
continue;
|
|
32814
|
+
}
|
|
32815
|
+
items.push(item);
|
|
32816
|
+
replyFacts.set(item.key, facts);
|
|
32817
|
+
openRunsByChannel.delete(item.url);
|
|
32818
|
+
if (canJoinRun) openRunsByChannel.set(item.url, {
|
|
32819
|
+
authorRef,
|
|
32820
|
+
index: items.length - 1,
|
|
32821
|
+
lastMessageMs: messageMs
|
|
32822
|
+
});
|
|
32823
|
+
}
|
|
32824
|
+
return {
|
|
32825
|
+
items,
|
|
32826
|
+
replyFacts
|
|
32827
|
+
};
|
|
32828
|
+
}
|
|
32829
|
+
function discordDropSummary(dropReasons) {
|
|
32830
|
+
const counted = [...dropReasons];
|
|
32831
|
+
if (counted.length === 0) return null;
|
|
32832
|
+
return `skipped ${counted.reduce((sum, [, count]) => sum + count, 0)} Discord event(s): ${counted.map(([reason, count]) => `${count} ${DISCORD_DROP_REASON_LABELS[reason]}`).join(", ")}`;
|
|
32732
32833
|
}
|
|
32733
32834
|
function newestRowTimestamp(rows) {
|
|
32734
32835
|
return rows.map(discordTimestamp).reduce((newest, timestamp) => timestamp && (!newest || Date.parse(timestamp) > Date.parse(newest)) ? timestamp : newest, null);
|
|
@@ -32750,24 +32851,46 @@ function discordItemsFromRows(rows, allowlist) {
|
|
|
32750
32851
|
const threadNames = new Map(threadRows.map((row) => [stringField(row, "thread_id"), stringField(row, "thread_name")]).filter(([, name]) => name.trim()));
|
|
32751
32852
|
const threadsWithStarter = new Set(rows.filter((row) => stringField(row, "event") === "message_sent").map((row) => stringField(row, "channel_id")).filter((id) => threadNames.has(id)));
|
|
32752
32853
|
const candidateRows = rows.filter((row) => stringField(row, "event") !== "thread_created" || !threadsWithStarter.has(stringField(row, "thread_id")));
|
|
32753
|
-
const
|
|
32854
|
+
const itemRows = [];
|
|
32855
|
+
const dropReasons = /* @__PURE__ */ new Map();
|
|
32856
|
+
for (const row of candidateRows) {
|
|
32857
|
+
const itemOrReason = discordItemFromRow(row, allowed, threadNames);
|
|
32858
|
+
if (typeof itemOrReason === "string") {
|
|
32859
|
+
dropReasons.set(itemOrReason, (dropReasons.get(itemOrReason) ?? 0) + 1);
|
|
32860
|
+
itemRows.push({
|
|
32861
|
+
row,
|
|
32862
|
+
item: null
|
|
32863
|
+
});
|
|
32864
|
+
continue;
|
|
32865
|
+
}
|
|
32866
|
+
itemRows.push({
|
|
32867
|
+
row,
|
|
32868
|
+
item: itemOrReason
|
|
32869
|
+
});
|
|
32870
|
+
}
|
|
32754
32871
|
return {
|
|
32755
|
-
|
|
32756
|
-
|
|
32872
|
+
...groupedDiscordItems(itemRows),
|
|
32873
|
+
dropReasons,
|
|
32757
32874
|
newestRowAt: newestRowTimestamp(rows)
|
|
32758
32875
|
};
|
|
32759
32876
|
}
|
|
32760
|
-
function
|
|
32877
|
+
function judgeKeyLine(item, facts) {
|
|
32878
|
+
const replyNote = facts?.isReply ? ", reply" : "";
|
|
32879
|
+
const mentionNote = facts && facts.mentionCount > 0 ? `, mentions ${facts.mentionCount}` : "";
|
|
32880
|
+
return `- ${item.key} in #${item.channel ?? "unknown"}${replyNote}${mentionNote}`;
|
|
32881
|
+
}
|
|
32882
|
+
function buildJudgeRequest(candidates, resultPath, replyFacts = /* @__PURE__ */ new Map()) {
|
|
32761
32883
|
return {
|
|
32762
32884
|
prompt: [
|
|
32763
32885
|
`Decide which of the Discord messages in ${UNTRUSTED_PAYLOAD_FILENAME} ask a question about PostHog that a helpful reply could answer:`,
|
|
32764
32886
|
"a how-to, a bug report or a request for help. Greetings, thanks, announcements, chatter and answers to someone else are not questions.",
|
|
32765
|
-
"
|
|
32887
|
+
"A message addressed to another member or asking them something is not a question either, whether or not it is a reply.",
|
|
32888
|
+
"Each item is one message, or several one member sent in a row, joined by blank lines; its ref is the first message key.",
|
|
32766
32889
|
"",
|
|
32767
32890
|
UNTRUSTED_PREAMBLE,
|
|
32768
32891
|
"",
|
|
32769
|
-
"Message keys and
|
|
32770
|
-
...candidates.map((item) =>
|
|
32892
|
+
"Message keys, channels, whether the message replies to another, and how many members it mentions (fetched by Glimmervoid):",
|
|
32893
|
+
...candidates.map((item) => judgeKeyLine(item, replyFacts.get(item.key))),
|
|
32771
32894
|
"",
|
|
32772
32895
|
`Use the Write tool to write ${resultPath} as JSON and nothing else:`,
|
|
32773
32896
|
"{\"questions\": [\"<the key of each message that is a question>\"]}",
|
|
@@ -32823,6 +32946,10 @@ function withoutError(entry) {
|
|
|
32823
32946
|
const { error: _clearedError, ...rest } = entry;
|
|
32824
32947
|
return rest;
|
|
32825
32948
|
}
|
|
32949
|
+
function settled(entry) {
|
|
32950
|
+
const { error: _clearedError, retriedAfterTimeout: _clearedRetry, ...rest } = entry;
|
|
32951
|
+
return rest;
|
|
32952
|
+
}
|
|
32826
32953
|
function markRunning(entry) {
|
|
32827
32954
|
return {
|
|
32828
32955
|
...withoutError(entry),
|
|
@@ -32833,7 +32960,7 @@ function markRunning(entry) {
|
|
|
32833
32960
|
}
|
|
32834
32961
|
function queuedForRerun(entry) {
|
|
32835
32962
|
return {
|
|
32836
|
-
...
|
|
32963
|
+
...settled(entry),
|
|
32837
32964
|
status: "queued",
|
|
32838
32965
|
verdict: null,
|
|
32839
32966
|
summary: "",
|
|
@@ -32905,13 +33032,22 @@ function parseCommunityReport(report) {
|
|
|
32905
33032
|
}
|
|
32906
33033
|
function failedEntry(entry, error, nowIso) {
|
|
32907
33034
|
return {
|
|
32908
|
-
...entry,
|
|
33035
|
+
...settled(entry),
|
|
32909
33036
|
status: "error",
|
|
32910
33037
|
error: error.slice(0, MAX_REPORT_BULLET_CHARS),
|
|
32911
33038
|
finishedAt: nowIso
|
|
32912
33039
|
};
|
|
32913
33040
|
}
|
|
32914
33041
|
function entryFromRun(entry, run, nowIso) {
|
|
33042
|
+
if (run.timedOut && !entry.retriedAfterTimeout) return {
|
|
33043
|
+
entry: {
|
|
33044
|
+
...withoutError(entry),
|
|
33045
|
+
status: "queued",
|
|
33046
|
+
retriedAfterTimeout: true,
|
|
33047
|
+
finishedAt: null
|
|
33048
|
+
},
|
|
33049
|
+
warning: `${entry.item.key}: ${run.error ?? "the research run timed out"}, queued to run once more`
|
|
33050
|
+
};
|
|
32915
33051
|
if (run.error !== null) return {
|
|
32916
33052
|
entry: failedEntry(entry, run.error, nowIso),
|
|
32917
33053
|
warning: null
|
|
@@ -32928,7 +33064,7 @@ function entryFromRun(entry, run, nowIso) {
|
|
|
32928
33064
|
const posting = run.posting === null ? null : parsePostingFile(run.posting, CommunityDraft, "reply draft");
|
|
32929
33065
|
return {
|
|
32930
33066
|
entry: {
|
|
32931
|
-
...
|
|
33067
|
+
...settled(entry),
|
|
32932
33068
|
...parsed.report,
|
|
32933
33069
|
status: "ready",
|
|
32934
33070
|
draft: posting?.ok ? posting.plan : null,
|
|
@@ -32978,6 +33114,8 @@ function buildCommunityRequest({ item, skill, reportPath, postingPath }) {
|
|
|
32978
33114
|
"- first line: VERDICT: <HIGH, MEDIUM, LOW or FAILED>",
|
|
32979
33115
|
" HIGH: the draft answers the question and every claim in it was checked against a source.",
|
|
32980
33116
|
" MEDIUM: the draft answers part of it, or some claims are unchecked. LOW: no answer worth sending.",
|
|
33117
|
+
" A missing project id, customer data or internal access lowers the verdict only when the answer depends on them;",
|
|
33118
|
+
" a how-to question answered from docs and code can be HIGH without them.",
|
|
32981
33119
|
" FAILED: the research could not be done at all.",
|
|
32982
33120
|
"- then one line: GOAL: followed by one sentence on what the asker is trying to achieve",
|
|
32983
33121
|
"- then one line: CHECKED: followed by one bullet per source you checked and what it showed",
|
|
@@ -33084,9 +33222,9 @@ function createCommunityPoller({ intervalMinutes, queryForum, discord = null, re
|
|
|
33084
33222
|
}
|
|
33085
33223
|
const fetched = await queryForum(watermark);
|
|
33086
33224
|
if (!fetched.ok) return fetched.error;
|
|
33087
|
-
const { items, droppedRows } = forumItemsFromRows(fetched.rows);
|
|
33225
|
+
const { items, droppedRows, newestRowAt } = forumItemsFromRows(fetched.rows);
|
|
33088
33226
|
if (droppedRows > 0) log.warn(`[${COMMUNITY_LANE_ID}] dropped ${droppedRows} malformed forum row(s)`);
|
|
33089
|
-
state = admitSourceItems(state, "forum", items, nowIso).state;
|
|
33227
|
+
state = withWatermarkAtLeast(admitSourceItems(state, "forum", items, nowIso).state, "forum", newestRowAt);
|
|
33090
33228
|
return null;
|
|
33091
33229
|
}
|
|
33092
33230
|
async function pollDiscord(source) {
|
|
@@ -33098,10 +33236,11 @@ function createCommunityPoller({ intervalMinutes, queryForum, discord = null, re
|
|
|
33098
33236
|
}
|
|
33099
33237
|
const fetched = await source.query(watermark);
|
|
33100
33238
|
if (!fetched.ok) return fetched.error;
|
|
33101
|
-
const { items,
|
|
33102
|
-
|
|
33239
|
+
const { items, replyFacts, dropReasons, newestRowAt } = discordItemsFromRows(fetched.rows, source.channels);
|
|
33240
|
+
const dropSummary = discordDropSummary(dropReasons);
|
|
33241
|
+
if (dropSummary) log.warn(`[${COMMUNITY_LANE_ID}] ${dropSummary}`);
|
|
33103
33242
|
const candidates = freshItems(state, "discord", items);
|
|
33104
|
-
const questionKeys = candidates.length > 0 ? await source.judgeQuestions(candidates).catch(() => null) : /* @__PURE__ */ new Set();
|
|
33243
|
+
const questionKeys = candidates.length > 0 ? await source.judgeQuestions(candidates, replyFacts).catch(() => null) : /* @__PURE__ */ new Set();
|
|
33105
33244
|
if (questionKeys === null) return "The Discord question judge gave no usable answer; these messages are checked again next poll";
|
|
33106
33245
|
const admitted = admitSourceItems(state, "discord", items, nowIso, (key) => questionKeys.has(key)).state;
|
|
33107
33246
|
state = withWatermarkAtLeast(admitted, "discord", newestRowAt);
|
|
@@ -33214,14 +33353,14 @@ function createCommunityPoller({ intervalMinutes, queryForum, discord = null, re
|
|
|
33214
33353
|
//#region server/community/community-judge.ts
|
|
33215
33354
|
var COMMUNITY_JUDGE_TOOLS = Object.freeze(["Read", "Write"]);
|
|
33216
33355
|
function createCommunityJudge(spawn, shutdownSignal) {
|
|
33217
|
-
return async (candidates) => {
|
|
33356
|
+
return async (candidates, replyFacts) => {
|
|
33218
33357
|
const workDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "glimmervoid-community-judge-"));
|
|
33219
33358
|
const controller = new AbortController();
|
|
33220
33359
|
const timeout = setTimeout(() => controller.abort(), JUDGE_TIMEOUT_MS);
|
|
33221
33360
|
timeout.unref();
|
|
33222
33361
|
try {
|
|
33223
33362
|
const resultPath = path.join(workDir, JUDGE_RESULT_FILENAME);
|
|
33224
|
-
const { prompt, untrustedItems } = buildJudgeRequest(candidates, resultPath);
|
|
33363
|
+
const { prompt, untrustedItems } = buildJudgeRequest(candidates, resultPath, replyFacts);
|
|
33225
33364
|
await writeUntrustedPayload(workDir, {
|
|
33226
33365
|
trust: "untrusted",
|
|
33227
33366
|
source: JUDGE_UNTRUSTED_SOURCE,
|
|
@@ -33433,7 +33572,10 @@ function createCommunityRunner({ spawnDependencies, homeDir, getSettings, hookTo
|
|
|
33433
33572
|
await fs$1.writeFile(path.join(workDir, COMMUNITY_PROMPT_FILENAME), prompt);
|
|
33434
33573
|
return await raceWithAbort({
|
|
33435
33574
|
timeoutMs: RUN_TIMEOUT_SECONDS * 1e3,
|
|
33436
|
-
onTimeout: () =>
|
|
33575
|
+
onTimeout: () => ({
|
|
33576
|
+
...failed(`the research run timed out after ${RUN_TIMEOUT_SECONDS}s`),
|
|
33577
|
+
timedOut: true
|
|
33578
|
+
}),
|
|
33437
33579
|
onEmpty: () => failed("the research run ended without a result"),
|
|
33438
33580
|
start: async (timeoutSignal) => {
|
|
33439
33581
|
await spawnSession({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { c as resolveConfigPath } from "./config-store-
|
|
3
|
-
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-
|
|
2
|
+
import { c as resolveConfigPath } from "./config-store-DOLKpIyb.js";
|
|
3
|
+
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-Bw6x8YR1.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
//#region server/text-format.ts
|
|
6
6
|
function trimIso(iso) {
|
|
@@ -2,7 +2,7 @@ import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { u as equalsIgnoringCaseOnWindows } from "./runtime-paths-CYwF658V.js";
|
|
3
3
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
4
4
|
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-AKRVPqG1.js";
|
|
5
|
-
import { b as unrefTimer, bt as canonicalizePath, o as glimmervoidHomeDir, y as DEFAULT_TIMER_FNS } from "./config-store-
|
|
5
|
+
import { b as unrefTimer, bt as canonicalizePath, o as glimmervoidHomeDir, y as DEFAULT_TIMER_FNS } from "./config-store-DOLKpIyb.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import crypto from "node:crypto";
|