glimmervoid 0.37.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/bin/glimmervoid.js +16 -14
  2. package/dist/chunks/{adapters-BmfVPxlH.js → adapters-B0EJp_oE.js} +19 -4
  3. package/dist/chunks/{adapters-CqFFmM2R.js → adapters-BIbF8RJB.js} +1 -1
  4. package/dist/chunks/{agent-api-cli-CBgOKXoO.js → agent-api-cli-B5Tm0wXO.js} +27 -8
  5. package/dist/chunks/{agent-api-cli-BTHEyJKS.js → agent-api-cli-BDu1CxZf.js} +1 -1
  6. package/dist/chunks/{agent-api-core-DzKhakCv.js → agent-api-core-B_mUSenR.js} +30 -7
  7. package/dist/chunks/{agent-setup-cli-C8DGxlA-.js → agent-setup-cli-C9MMiask.js} +2 -2
  8. package/dist/chunks/{config-BYc2z1Oc.js → browser-config-BrBT8269.js} +9 -223
  9. package/dist/chunks/config-CjawSOBk.js +219 -0
  10. package/dist/chunks/config-store-B6mX2phK.js +1 -0
  11. package/dist/chunks/{config-store-B7MpiYxG.js → config-store-CKcDJebD.js} +42 -64
  12. package/dist/chunks/{contracts-C6ipN_zw.js → contracts-HVCEJfxs.js} +23 -250
  13. package/dist/chunks/factory-D7ryES9n.js +240 -0
  14. package/dist/chunks/{git-version-6QFnKbWa.js → git-version-rWZjF2Px.js} +1 -1
  15. package/dist/chunks/{grok-CZ6kP_vD.js → grok-y65HOvlU.js} +1 -1
  16. package/dist/chunks/{json-file-BaxGcB2R.js → json-file-CIJf0Cel.js} +190 -9
  17. package/dist/chunks/{knowledge-graph-cli-DApeMzA8.js → knowledge-graph-cli-ByUJoKw_.js} +1 -1
  18. package/dist/chunks/{loopback-post-DJ6iYWuL.js → loopback-post-DZK7YibD.js} +1 -1
  19. package/dist/chunks/{main-BUfjroXE.js → main-DeiiNNI7.js} +1186 -475
  20. package/dist/chunks/{pair-cli-GZ9t1mIO.js → pair-cli-B9hHUHLl.js} +2 -2
  21. package/dist/chunks/{remote-config-D2Is89Kj.js → remote-config-DlquYoVe.js} +2 -2
  22. package/dist/chunks/{session-BZbariv5.js → session-BlT68ppa.js} +6 -3
  23. package/dist/chunks/{session-routes-C4t8O8yg.js → session-routes-CT1JrjoT.js} +1 -1
  24. package/dist/chunks/{settings-cli-DQOjmjev.js → settings-cli-C5i9v59a.js} +3 -3
  25. package/dist/chunks/{ssh-sign-cli-LIBP8ppO.js → ssh-sign-cli-C74BGTQS.js} +2 -2
  26. package/dist/client/assets/index-ChXRDbjt.js +275 -0
  27. package/dist/client/assets/index-DA251uL1.css +1 -0
  28. package/dist/client/index.html +11 -3
  29. package/dist/server/index.js +1 -1
  30. package/dist/session/command-hook-relay.js +1 -1
  31. package/dist/session/hook-relay.js +1 -1
  32. package/dist/session/statusline-relay.js +1 -1
  33. package/dist/session/visions-relay.js +7 -7
  34. package/package.json +3 -2
  35. package/scripts/recover-handoff.mjs +1 -1
  36. package/dist/chunks/config-store-CsUoy88Q.js +0 -1
  37. package/dist/client/assets/index-B_Qt7fbZ.css +0 -1
  38. package/dist/client/assets/index-D-upBor0.js +0 -265
@@ -0,0 +1,219 @@
1
+ import { $ as SessionPrLinks, P as TaskTitle } from "./session-BlT68ppa.js";
2
+ import { S as WorkflowsSettingsUpdate, _ as optionalLooseObject, c as GithubSettings, d as PlanReviewSettings, f as TelemetryFileSettings, g as optionalBoolean, h as createBrowserConfig, i as ChangeMapSettings, l as GuardrailsFileSettings, p as TraceSettings, s as FactorySettings, t as BranchGcControlSettings } from "./browser-config-BrBT8269.js";
3
+ import path from "node:path";
4
+ import { z } from "zod";
5
+ //#region shared/contracts/config.ts
6
+ var BrowserConfig = createBrowserConfig(path.isAbsolute);
7
+ var BROWSER_CONFIG_SHAPE = BrowserConfig.shape;
8
+ var ConfigUpdate = z.object({
9
+ ...BROWSER_CONFIG_SHAPE,
10
+ notifyDebounceMs: z.number({ error: "notifyDebounceMs must be a positive number" }).finite().positive({ error: "notifyDebounceMs must be a positive number" }).optional(),
11
+ phoneEscalationMs: z.number({ error: "phoneEscalationMs must be a positive number" }).finite().positive({ error: "phoneEscalationMs must be a positive number" }).optional(),
12
+ branchGc: BranchGcControlSettings,
13
+ worktreeAutoRebase: optionalBoolean("worktreeAutoRebase"),
14
+ worktreeSyncOnStart: optionalBoolean("worktreeSyncOnStart"),
15
+ worktreeRerere: optionalBoolean("worktreeRerere"),
16
+ workflows: WorkflowsSettingsUpdate.optional()
17
+ }).omit({
18
+ port: true,
19
+ worktreeShare: true
20
+ }).strict();
21
+ var AGENT_ID_RE = /^[a-z][a-z0-9-]{1,31}$/;
22
+ var BUILTIN_AGENT_IDS = Object.freeze([
23
+ "claude-code",
24
+ "codex",
25
+ "grok"
26
+ ]);
27
+ var AGENT_ID_SHAPE_MESSAGE = "an agent id of 2 to 32 characters of lowercase letters, digits and dashes, starting with a letter";
28
+ var AGENT_COMMAND_BASENAME_RE = /^[A-Za-z0-9._+-]+$/;
29
+ var AGENT_COMMAND_ABSOLUTE_RE = /^(?:\/|[A-Za-z]:[\\/])[A-Za-z0-9._+\-\\/]*[A-Za-z0-9._+-]$/;
30
+ var AGENT_COMMAND_SHAPE_MESSAGE = "a bare command name or an absolute path, built only from letters, digits, dot, underscore, plus, dash and path separators";
31
+ function isSpawnableCommand(command) {
32
+ if (AGENT_COMMAND_BASENAME_RE.test(command)) return true;
33
+ return AGENT_COMMAND_ABSOLUTE_RE.test(command);
34
+ }
35
+ var GIT_BRANCH_FORBIDDEN_PUNCTUATION_RE = /[~^:?*[\\]/;
36
+ var GIT_BRANCH_FORBIDDEN_SEQUENCES = [
37
+ "..",
38
+ "@{",
39
+ "//"
40
+ ];
41
+ function isControlOrSpaceCharacter(character) {
42
+ const codePoint = character.charCodeAt(0);
43
+ return codePoint <= 32 || codePoint === 127;
44
+ }
45
+ function isGitBranchName(name) {
46
+ if (name === "" || name === "@" || name === "HEAD") return false;
47
+ if (name.startsWith("-") || name.startsWith("/") || name.endsWith("/") || name.endsWith(".")) return false;
48
+ if (GIT_BRANCH_FORBIDDEN_SEQUENCES.some((sequence) => name.includes(sequence))) return false;
49
+ if (GIT_BRANCH_FORBIDDEN_PUNCTUATION_RE.test(name) || [...name].some(isControlOrSpaceCharacter)) return false;
50
+ return name.split("/").every((component) => !component.startsWith(".") && !component.endsWith(".lock"));
51
+ }
52
+ var CustomAgentDeclaration = z.object({
53
+ id: z.string({ error: "customAgents[].id must be a string" }).regex(AGENT_ID_RE, { error: `customAgents[].id must be ${AGENT_ID_SHAPE_MESSAGE}` }),
54
+ label: z.string({ error: "customAgents[].label must be a string" }).min(1, { error: "customAgents[].label must not be empty" }).max(60, { error: "customAgents[].label must be at most 60 characters" }),
55
+ command: z.string({ error: "customAgents[].command must be a string" }).min(1, { error: "customAgents[].command must not be empty" }).refine((command) => command.trim().length > 0, { error: "customAgents[].command must not be blank" }).refine(isSpawnableCommand, { error: `customAgents[].command must be ${AGENT_COMMAND_SHAPE_MESSAGE}` }),
56
+ args: z.array(z.string({ error: "customAgents[].args must be an array of strings" }), { error: "customAgents[].args must be an array of strings" }).default([]),
57
+ idleTitle: z.string({ error: "customAgents[].idleTitle must be a string" }).optional(),
58
+ busyTitle: z.string({ error: "customAgents[].busyTitle must be a string" }).optional()
59
+ }).strict();
60
+ var CustomAgentDeclarations = z.array(CustomAgentDeclaration, { error: "customAgents must be an array" }).superRefine((declarations, ctx) => {
61
+ const claimedIds = new Set(BUILTIN_AGENT_IDS);
62
+ for (const [index, declaration] of declarations.entries()) {
63
+ if (!claimedIds.has(declaration.id)) {
64
+ claimedIds.add(declaration.id);
65
+ continue;
66
+ }
67
+ const message = BUILTIN_AGENT_IDS.some((builtinAgentId) => builtinAgentId === declaration.id) ? `customAgents[${index}].id "${declaration.id}" collides with the builtin agent of the same id` : `customAgents[${index}].id "${declaration.id}" is declared more than once`;
68
+ ctx.addIssue({
69
+ code: "custom",
70
+ path: [index, "id"],
71
+ message
72
+ });
73
+ }
74
+ });
75
+ var TaskTitleSources = z.object({
76
+ customTitle: TaskTitle.nullable().optional(),
77
+ pendingPromptTitle: TaskTitle.nullable().optional(),
78
+ refinedTitle: TaskTitle.nullable().optional(),
79
+ aiTitle: TaskTitle.nullable().optional(),
80
+ oscTitle: TaskTitle.nullable().optional(),
81
+ promptTitle: TaskTitle.nullable().optional()
82
+ }).strict();
83
+ var TASK_TITLE_SOURCE_PRIORITY = [
84
+ "customTitle",
85
+ "pendingPromptTitle",
86
+ "refinedTitle",
87
+ "aiTitle",
88
+ "oscTitle",
89
+ "promptTitle"
90
+ ];
91
+ var PersistedTaskTitle = z.object({
92
+ taskTitle: TaskTitle.min(1),
93
+ isCustom: z.boolean(),
94
+ sources: TaskTitleSources
95
+ }).strict().refine(({ taskTitle, isCustom, sources }) => {
96
+ const source = TASK_TITLE_SOURCE_PRIORITY.find((candidate) => sources[candidate]?.trim());
97
+ if (!source) return false;
98
+ return sources[source]?.replace(/\s+/g, " ").trim() === taskTitle && isCustom === (source === "customTitle");
99
+ });
100
+ var ProjectConfig = z.object({
101
+ id: z.string().optional(),
102
+ name: z.string().optional(),
103
+ customTitle: TaskTitle.optional(),
104
+ taskTitleState: PersistedTaskTitle.optional().catch(void 0),
105
+ prLinks: SessionPrLinks.optional().catch(void 0),
106
+ path: z.string(),
107
+ repos: z.array(z.string()).min(2).optional(),
108
+ baseBranch: z.string().refine(isGitBranchName, { error: "projects[].baseBranch must be a git branch name" }).optional(),
109
+ agent: z.string({ error: "projects[].agent must be a string" }).regex(AGENT_ID_RE, { error: `projects[].agent must be ${AGENT_ID_SHAPE_MESSAGE}` }).optional(),
110
+ codexBypassHookTrust: z.boolean().optional(),
111
+ conversationView: z.boolean({ error: "projects[].conversationView must be a boolean" }).optional(),
112
+ dangerouslySkipPermissions: z.boolean({ error: "projects[].dangerouslySkipPermissions must be a boolean" }).optional(),
113
+ unguarded: z.boolean({ error: "projects[].unguarded must be a boolean" }).optional(),
114
+ factoryProfile: FactorySettings.unwrap().unwrap().extend({
115
+ focusedTestCommand: z.string().trim().min(1).optional(),
116
+ widenableScopes: z.array(z.string().trim().min(1)).optional()
117
+ }).optional()
118
+ }).passthrough();
119
+ var FILE_CONFIG_SHAPE = {
120
+ ...BROWSER_CONFIG_SHAPE,
121
+ changeMap: ChangeMapSettings,
122
+ branchGc: optionalLooseObject("branchGc"),
123
+ coder: z.object({ appSlug: z.string().optional() }).loose().optional(),
124
+ visions: optionalLooseObject("visions"),
125
+ github: GithubSettings,
126
+ teamReview: optionalLooseObject("teamReview"),
127
+ benchmarks: optionalLooseObject("benchmarks"),
128
+ factory: FactorySettings,
129
+ knowledgeGraph: optionalLooseObject("knowledgeGraph"),
130
+ posthog: optionalLooseObject("posthog"),
131
+ usage: optionalLooseObject("usage"),
132
+ telegram: optionalLooseObject("telegram"),
133
+ ingest: optionalLooseObject("ingest"),
134
+ workflows: optionalLooseObject("workflows"),
135
+ guardrails: GuardrailsFileSettings,
136
+ telemetry: TelemetryFileSettings,
137
+ trace: TraceSettings,
138
+ planReview: PlanReviewSettings,
139
+ customAgents: CustomAgentDeclarations.optional()
140
+ };
141
+ var Config = z.object({
142
+ ...FILE_CONFIG_SHAPE,
143
+ detectScheduledWakeups: optionalBoolean("detectScheduledWakeups"),
144
+ worktreeAutoRebase: optionalBoolean("worktreeAutoRebase"),
145
+ worktreeSyncOnStart: optionalBoolean("worktreeSyncOnStart"),
146
+ worktreeRerere: optionalBoolean("worktreeRerere"),
147
+ postTurnChecks: z.record(z.string(), z.unknown()).optional(),
148
+ hooks: z.unknown().optional(),
149
+ remote: z.object({
150
+ enabled: z.boolean().optional(),
151
+ port: z.number().int().min(1).max(65535).nullable().optional(),
152
+ publicHost: z.string().optional(),
153
+ allowedOrigins: z.array(z.string()).optional(),
154
+ ownerLogin: z.string().optional()
155
+ }).passthrough().optional(),
156
+ projects: z.array(ProjectConfig)
157
+ }).passthrough().superRefine((config, ctx) => {
158
+ if (!Array.isArray(config.projects)) return;
159
+ const declaredAgentIds = new Set(BUILTIN_AGENT_IDS);
160
+ for (const declaration of config.customAgents ?? []) declaredAgentIds.add(declaration.id);
161
+ for (const [index, project] of config.projects.entries()) {
162
+ const agent = project?.agent;
163
+ if (typeof agent !== "string" || !AGENT_ID_RE.test(agent)) continue;
164
+ if (declaredAgentIds.has(agent)) continue;
165
+ ctx.addIssue({
166
+ code: "custom",
167
+ path: [
168
+ "projects",
169
+ index,
170
+ "agent"
171
+ ],
172
+ message: `projects[${index}].agent "${agent}" names no known agent; declare it under customAgents or use one of ${[...declaredAgentIds].join(", ")}`
173
+ });
174
+ }
175
+ });
176
+ var CONFIG_BLOCK_KEYS = Object.freeze([
177
+ "changeMap",
178
+ "taskTitle",
179
+ "branchGc",
180
+ "postTurnChecks",
181
+ "visions",
182
+ "github",
183
+ "teamReview",
184
+ "benchmarks",
185
+ "factory",
186
+ "knowledgeGraph",
187
+ "posthog",
188
+ "usage",
189
+ "telegram",
190
+ "ingest",
191
+ "guardrails",
192
+ "telemetry",
193
+ "workflows",
194
+ "coder"
195
+ ]);
196
+ var CONFIG_SCALAR_KEYS = Object.freeze(Object.keys(BROWSER_CONFIG_SHAPE).filter((key) => {
197
+ if (CONFIG_BLOCK_KEYS.includes(key)) return false;
198
+ return key !== "port" && key !== "repoRoots" && key !== "worktreeShare";
199
+ }));
200
+ var RUNTIME_CONFIG_SCALAR_KEYS = Object.freeze([
201
+ ...CONFIG_SCALAR_KEYS,
202
+ "worktreeAutoRebase",
203
+ "worktreeSyncOnStart",
204
+ "worktreeRerere"
205
+ ]);
206
+ Object.freeze([
207
+ "detectScheduledWakeups",
208
+ "worktreeAutoRebase",
209
+ "worktreeSyncOnStart",
210
+ "worktreeRerere",
211
+ "hooks",
212
+ "remote",
213
+ "projects"
214
+ ]);
215
+ function configIssueMessage(error) {
216
+ return error.issues[0]?.message || "settings are invalid";
217
+ }
218
+ //#endregion
219
+ export { ConfigUpdate as a, RUNTIME_CONFIG_SCALAR_KEYS as c, Config as i, TASK_TITLE_SOURCE_PRIORITY as l, BUILTIN_AGENT_IDS as n, PersistedTaskTitle as o, BrowserConfig as r, ProjectConfig as s, AGENT_ID_SHAPE_MESSAGE as t, configIssueMessage as u };
@@ -0,0 +1 @@
1
+ export { s as loadConfigFile } from "./config-store-CKcDJebD.js";
@@ -2,9 +2,10 @@ import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
3
3
  import { n as glimmervoidHomeDir$1, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
4
4
  import { n as isRecord } from "./coerce-NSst8oRP.js";
5
- import { d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync } from "./json-file-BaxGcB2R.js";
6
- import { A as FLYING_ANIMALS_GAP_RANGE, B as REPLAY_BUFFER_KB_RANGE, C as USAGE_COST_MODES, D as FACTORY_MAX_LIVE_WORKERS_RANGE, E as CHANGE_MAP_NARRATOR_TIMEOUT_RANGE, F as POSITIVE_NUMBER_RANGE, G as USAGE_SCAN_INTERVAL_RANGE, H as USAGE_BUDGET_RANGE, I as POSTHOG_FIX_TIMEOUT_RANGE, K as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE, L as POSTHOG_TRAFFIC_BASELINE_RANGE, M as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, N as NON_NEGATIVE_NUMBER_RANGE, O as FLYING_ANIMALS_DEFAULTS, P as PORT_RANGE, R as POSTHOG_TRAFFIC_MIN_USERS_RANGE, T as normalizeLegacyConfigNumbers, U as USAGE_INTEGER_RANGES, V as TASK_TITLE_TIMEOUT_RANGE, W as USAGE_RETAIN_DAYS_RANGE, _ as UPDATE_CHANNELS, c as RUNTIME_CONFIG_SCALAR_KEYS, d as BranchGcFileSettings, f as CHANGE_MAP_NARRATOR_ENGINES, g as POST_TURN_CHECK_MODES, i as Config, j as FLYING_ANIMALS_SCALE_RANGE, k as FLYING_ANIMALS_DURATION_RANGE, m as DEFAULT_FACTORY_PROTECTED_PATHS, n as BUILTIN_AGENT_IDS, p as DEFAULT_FACTORY_CHECKS, q as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, t as AGENT_ID_SHAPE_MESSAGE, u as configIssueMessage, z as POSTHOG_TRAFFIC_MULTIPLIER_RANGE } from "./config-BYc2z1Oc.js";
7
- import { V as FeatureFlagsResponse, W as TELEMETRY_KILL_SWITCH_FLAG } from "./contracts-C6ipN_zw.js";
5
+ import { A as FLYING_ANIMALS_DURATION_RANGE, B as POSTHOG_TRAFFIC_MIN_USERS_RANGE, D as CHANGE_MAP_NARRATOR_TIMEOUT_RANGE, E as normalizeLegacyConfigNumbers, F as NON_NEGATIVE_NUMBER_RANGE, G as USAGE_INTEGER_RANGES, H as REPLAY_BUFFER_KB_RANGE, I as PORT_RANGE, J as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE, K as USAGE_RETAIN_DAYS_RANGE, L as POSITIVE_NUMBER_RANGE, M as FLYING_ANIMALS_SCALE_RANGE, N as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, O as FACTORY_MAX_LIVE_WORKERS_RANGE, P as MEMORY_RESERVE_MB_RANGE, R as POSTHOG_FIX_TIMEOUT_RANGE, U as TASK_TITLE_TIMEOUT_RANGE, V as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, W as USAGE_BUDGET_RANGE, Y as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, a as DEFAULT_FACTORY_CHECKS, j as FLYING_ANIMALS_GAP_RANGE, k as FLYING_ANIMALS_DEFAULTS, m as UPDATE_CHANNELS, n as BranchGcFileSettings, o as DEFAULT_FACTORY_PROTECTED_PATHS, q as USAGE_SCAN_INTERVAL_RANGE, r as CHANGE_MAP_NARRATOR_ENGINES, u as POST_TURN_CHECK_MODES, w as USAGE_COST_MODES, z as POSTHOG_TRAFFIC_BASELINE_RANGE } from "./browser-config-BrBT8269.js";
6
+ import { b as DEFAULT_CHECK_MEMORY_RESERVE_MB, d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync } from "./json-file-CIJf0Cel.js";
7
+ import { c as RUNTIME_CONFIG_SCALAR_KEYS, i as Config, n as BUILTIN_AGENT_IDS, t as AGENT_ID_SHAPE_MESSAGE, u as configIssueMessage } from "./config-CjawSOBk.js";
8
+ import { K as TELEMETRY_KILL_SWITCH_FLAG, U as FeatureFlagsResponse } from "./contracts-HVCEJfxs.js";
8
9
  import fs from "node:fs";
9
10
  import path from "node:path";
10
11
  import os from "node:os";
@@ -659,10 +660,6 @@ var DAYS = {
659
660
  label: "days",
660
661
  storedPerDisplay: 1
661
662
  };
662
- var MILLISECONDS = {
663
- label: "ms",
664
- storedPerDisplay: 1
665
- };
666
663
  var SECONDS_STORED_AS_MS = {
667
664
  label: "seconds",
668
665
  storedPerDisplay: MS_PER_SECOND,
@@ -2019,6 +2016,42 @@ var FILE_ONLY_SETTINGS = Object.freeze([
2019
2016
  fileOnlyReason: TUNING_KNOB,
2020
2017
  ...FILE_ONLY
2021
2018
  },
2019
+ {
2020
+ id: "file-session-memory-reserve",
2021
+ path: "sessionMemoryReserveMB",
2022
+ title: "Session memory reserve",
2023
+ group: "machine-sessions",
2024
+ description: "Free memory an automatic session start waits for; 0 starts sessions without checking.",
2025
+ control: "number",
2026
+ range: MEMORY_RESERVE_MB_RANGE,
2027
+ unit: {
2028
+ label: "MB",
2029
+ storedPerDisplay: 1
2030
+ },
2031
+ keywords: ["memory", "headroom"],
2032
+ defaultValue: 600,
2033
+ takesEffect: "now",
2034
+ fileOnlyReason: TUNING_KNOB,
2035
+ ...FILE_ONLY
2036
+ },
2037
+ {
2038
+ id: "file-check-memory-reserve",
2039
+ path: "checkMemoryReserveMB",
2040
+ title: "Check run memory reserve",
2041
+ group: "machine-sessions",
2042
+ description: "Free memory a factory check run waits for; 0 runs checks without checking.",
2043
+ control: "number",
2044
+ range: MEMORY_RESERVE_MB_RANGE,
2045
+ unit: {
2046
+ label: "MB",
2047
+ storedPerDisplay: 1
2048
+ },
2049
+ keywords: ["memory", "factory"],
2050
+ defaultValue: 1500,
2051
+ takesEffect: "now",
2052
+ fileOnlyReason: TUNING_KNOB,
2053
+ ...FILE_ONLY
2054
+ },
2022
2055
  {
2023
2056
  id: "file-cursor-blink",
2024
2057
  path: "cursorBlink",
@@ -2190,57 +2223,6 @@ var FILE_ONLY_SETTINGS = Object.freeze([
2190
2223
  fileOnlyReason: BY_RULE,
2191
2224
  ...FILE_ONLY
2192
2225
  },
2193
- {
2194
- id: "file-auto-recover-seconds",
2195
- path: "autoRecoverSeconds",
2196
- title: "Auto-recovery delay",
2197
- group: "machine-detection-sessions",
2198
- description: "Delay before an interrupted state can recover.",
2199
- control: "number",
2200
- integer: false,
2201
- step: "any",
2202
- range: POSITIVE_NUMBER_RANGE,
2203
- unit: SECONDS,
2204
- keywords: ["timer", "recovery"],
2205
- defaultValue: 3,
2206
- takesEffect: "new-sessions",
2207
- fileOnlyReason: TUNING_KNOB,
2208
- ...FILE_ONLY
2209
- },
2210
- {
2211
- id: "file-input-grace-seconds",
2212
- path: "inputGraceSeconds",
2213
- title: "Input grace period",
2214
- group: "machine-detection-sessions",
2215
- description: "Grace window around operator input.",
2216
- control: "number",
2217
- integer: false,
2218
- step: "any",
2219
- range: POSITIVE_NUMBER_RANGE,
2220
- unit: SECONDS,
2221
- keywords: ["timer", "prompt"],
2222
- defaultValue: 5,
2223
- takesEffect: "new-sessions",
2224
- fileOnlyReason: TUNING_KNOB,
2225
- ...FILE_ONLY
2226
- },
2227
- {
2228
- id: "file-prompt-detection-ms",
2229
- path: "promptDetectionMs",
2230
- title: "Prompt detection delay",
2231
- group: "machine-detection-sessions",
2232
- description: "Timing threshold used by prompt detection.",
2233
- control: "number",
2234
- integer: false,
2235
- step: "any",
2236
- range: POSITIVE_NUMBER_RANGE,
2237
- unit: MILLISECONDS,
2238
- keywords: ["timer", "detection"],
2239
- defaultValue: 1500,
2240
- takesEffect: "new-sessions",
2241
- fileOnlyReason: TUNING_KNOB,
2242
- ...FILE_ONLY
2243
- },
2244
2226
  {
2245
2227
  id: "file-notify-debounce-ms",
2246
2228
  path: "notifyDebounceMs",
@@ -3552,9 +3534,6 @@ function findEscapingArchiveMember(listingText) {
3552
3534
  //#region server/config-store.ts
3553
3535
  var DEFAULT_CONFIG = {
3554
3536
  port: 3e3,
3555
- autoRecoverSeconds: 3,
3556
- inputGraceSeconds: 5,
3557
- promptDetectionMs: 1500,
3558
3537
  notifyDebounceMs: 3e3,
3559
3538
  phoneEscalationMs: 3e5,
3560
3539
  cursorBlink: false,
@@ -3564,6 +3543,8 @@ var DEFAULT_CONFIG = {
3564
3543
  detectBackgroundAgents: true,
3565
3544
  detectScheduledWakeups: true,
3566
3545
  replayBufferKB: 512,
3546
+ sessionMemoryReserveMB: 600,
3547
+ checkMemoryReserveMB: DEFAULT_CHECK_MEMORY_RESERVE_MB,
3567
3548
  recordSignals: true,
3568
3549
  trace: { enabled: true },
3569
3550
  planReview: { enabled: true },
@@ -4004,9 +3985,6 @@ function createConfigStore({ settingsDefaults } = {}) {
4004
3985
  function getSettings() {
4005
3986
  return {
4006
3987
  port: config.port,
4007
- autoRecoverSeconds: config.autoRecoverSeconds,
4008
- inputGraceSeconds: config.inputGraceSeconds,
4009
- promptDetectionMs: config.promptDetectionMs,
4010
3988
  notifyDebounceMs: config.notifyDebounceMs,
4011
3989
  phoneEscalationMs: config.phoneEscalationMs ?? DEFAULT_CONFIG.phoneEscalationMs,
4012
3990
  replayBufferKB: config.replayBufferKB,