glimmervoid 0.43.3 → 0.43.5
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 +13 -13
- package/dist/chunks/{adapters-CxM7iyI_.js → adapters-43NBaf3J.js} +1 -1
- package/dist/chunks/{adapters-BrJVO21n.js → adapters-DCXbfZ2V.js} +5 -5
- package/dist/chunks/{agent-api-cli-DQDeXBP_.js → agent-api-cli-6W5lx3AO.js} +17 -3
- package/dist/chunks/{agent-api-cli-DbipciSb.js → agent-api-cli-CgQTmmLd.js} +1 -1
- package/dist/chunks/{agent-api-core-Da2UAN7U.js → agent-api-core-DniJGdf6.js} +10 -4
- package/dist/chunks/{agent-setup-cli-DAPHGpRA.js → agent-setup-cli-B5vnfQXA.js} +1 -1
- package/dist/chunks/{config-DkjpKAoc.js → config-bGil1wqg.js} +2 -1
- package/dist/chunks/config-store-C2CaymPs.js +1 -0
- package/dist/chunks/{config-store-DJ_imLTg.js → config-store-GsSGMu08.js} +22 -2
- package/dist/chunks/{contracts-D5KEXrcX.js → contracts-s0s0gCZJ.js} +5 -3
- package/dist/chunks/{git-version-ByOV7a_h.js → git-version-BwJ-H5Gl.js} +1 -1
- package/dist/chunks/{grok-2z-LqPHN.js → grok-BYvOJJMV.js} +1 -1
- package/dist/chunks/{main-BPyE0fvz.js → main-uV_6B2Am.js} +193 -34
- package/dist/chunks/{pair-cli-CKBA5XVU.js → pair-cli-BFg0PF9X.js} +2 -2
- package/dist/chunks/{remote-config-C-Rc55Vf.js → remote-config-yLvSEm11.js} +1 -1
- package/dist/chunks/{session-BUcx9uJa.js → session-GoNLV4AT.js} +13 -2
- package/dist/chunks/{session-routes-BQPy81dm.js → session-routes-BBWZ5xmv.js} +2 -1
- package/dist/chunks/{settings-cli-bDyDiLRy.js → settings-cli-Do404URB.js} +5 -5
- package/dist/chunks/{settings-readout-core-BKSVNO7q.js → settings-readout-core-x331h4CR.js} +2 -2
- package/dist/chunks/{ssh-sign-cli-COMPYoNe.js → ssh-sign-cli-BG0t2-3v.js} +2 -2
- package/dist/client/assets/{index-CFJ6Pl08.css → index-BhMm8IuJ.css} +1 -1
- package/dist/client/assets/index-DRT1ZGFh.js +177 -0
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/config-store-Wbcvb0f3.js +0 -1
- package/dist/client/assets/index-BA0smAG8.js +0 -177
|
@@ -2,14 +2,14 @@ import { i as sanitizeOneLine, n as requireExecutableSpawnHelper, r as firstLine
|
|
|
2
2
|
import { a as isMissingFileError, i as errorText$1, r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
3
3
|
import { a as sanitizeWorktreeName, i as safePathSegment, n as equalsIgnoringCaseOnWindows, r as isPathInside, t as caseFoldedPathKey } from "./paths-Bu4eH1Yd.js";
|
|
4
4
|
import { c as resolvePackageBin, i as clientDir, n as bundled, o as packageRoot, r as cliPath, s as relayPath, t as assetRoot } from "./runtime-paths-ghcH9CeW.js";
|
|
5
|
-
import { $t as
|
|
5
|
+
import { $ as MyPrMergeWhenReadyRequest, $t as RESTARTABLE_STATES, A as SESSION_NAME_RULE_TEXT, At as TeamReviewStateEntry, Bt as HEX_SHA_RE, C as ConversationQuestion, Ct as ReviewResult, D as SESSION_DOC_BODY_CAP_BYTES, Et as TeamReviewActionRequest, Ft as canApproveAfterComment, G as MyPrCheckContextsResponse, Gt as repoParts, H as MyPr, Ht as GH_SEGMENT, It as decisionAsIfApprovalRequired, J as MyPrLaneEntry, K as MyPrKeepMergeableRequest, L as SshSignRequest, M as SSH_SIGN_BODY_CAP_BYTES, Mt as TeamReviewThreadCommentsResponse, Nt as TeamReviewThreadResult, Ot as TeamReviewCompareFiles, Pt as TeamReviewThreadsRepository, Q as MyPrMergeStateResponse, Qt as MERGEABLE_LIVE_STATES, Rt as hasStandingViewerApproval, St as ReviewFinding, Tt as ReviewVerdict, U as MyPrAutoRebase, Ut as NODE_ID_RE, V as LinkedPr, Vt as shortSha, W as MyPrCheckContext, Wt as REPO_SLUG_RE, X as MyPrMergeRequest, Xt as BADGE_LABELS, Y as MyPrMergeMethod, Zt as KILLABLE_STATES, _ as CONVERSATION_PERMISSION_HOOK_EVENT, _t as PrDetail, at as MyPrsState, bt as ReviewComment, dt as DECIDING_REVIEW_STATES, en as STATES, ft as EarlierReview, g as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, gt as PostingPlan, h as COHERENCE_HOOKS_INACTIVE, ht as GithubReviewState, it as MyPrsSnapshot, j as SIGN_URL_ENV, jt as TeamReviewStatus, k as SESSION_NAME_PATTERN, kt as TeamReviewResolveResponse, n as AGENT_URL_ENV, nt as MyPrThreadNode, pt as FindingSeverity, r as ASK_USER_QUESTION_TOOL_NAME, rt as MyPrThreadsResponse, ut as CommitSha, v as CONVERSATION_TOOL_RESULT_HOOK_EVENT, vt as QueuedReview, wt as ReviewThreadId, xt as ReviewDraft, z as TaskTitle } from "./session-GoNLV4AT.js";
|
|
6
6
|
import { n as execFileAsync, o as spawn, r as execFileSync, t as execFile } from "./child-process-safe-D4hyVIXj.js";
|
|
7
|
-
import { A as CommitComparison, At as IssueUpdate, B as WorkflowLabelName, C as BenchmarkActionRequest, Ct as PlanDecision, D as BenchmarkRun, Dt as GithubIssuePullRequestsRepository, E as BenchmarkJudgement, Et as planTitle, F as GithubPrKey, H as WorkflowsState, I as GithubPrLightSearchNode, L as GithubPrsFrame, M as MinedPrReviewData, Mt as IssuesState, N as PrCheckoutCaseInput, Nt as IssuesStatus, O as BenchmarkStatus, Ot as GithubIssueResponse, P as GithubPrDetailNode, Pt as issuePullRequestStateFromGithub, R as comparablePrKey, S as pullRequestKeyFromReference, St as PLAN_TOOL_NAME, T as BenchmarkId, Tt as parseExitPlanModeHookPayload, V as WorkflowsSettings, _ as ClientMessage, _t as changeMapFactId, a as ConfigUpdate, at as USAGE_INTEGER_RANGES, bt as PLAN_HOOK_OUTPUT_MAX_CHARS, dt as SessionSetup, ft as MAX_RAW_LINE_CHARS, g as CONTROL_FRAME_MAX_BYTES, gt as ChangeMap, ht as CoherenceJournalOutput, j as MergedPrListing, jt as IssuesSearchResponse, k as BenchmarkSuite, kt as IssueKey, l as configIssueMessage, m as USAGE_VENDOR_KEYS, mt as TraceRecord, p as USAGE_COST_MODES, pt as TraceCheckpoint, q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, ut as UpdateJournal, vt as PLAN_BODY_CAP_BYTES, w as BenchmarkCase, wt as PlanRevision, xt as PLAN_RESULT_HOOK_EVENT, yt as PLAN_HOOK_EVENT, z as WorkflowCommentBody } from "./config-
|
|
8
|
-
import { a as permitsHelpCommand, r as describeSessionLimits } from "./session-routes-
|
|
9
|
-
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, I as shouldAdoptReportedResumeId, L as claudeProjectsDir, M as RESUME_ID_RE, N as pickAutoResume, O as resolveRefocusTaskTitle, P as resolveResumeTarget, R as encodeProjectDir, S as extractOscTaskTitle, T as isSubstantivePrompt, V as isAutoNameOf, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as AUTO_CONTINUE_PROMPT, k as resolveTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as isSelfWakePrompt, x as extractAiTitle, y as cleanTaskPrompt, z as listRepoConversations } from "./agent-api-core-
|
|
7
|
+
import { A as CommitComparison, At as IssueUpdate, B as WorkflowLabelName, C as BenchmarkActionRequest, Ct as PlanDecision, D as BenchmarkRun, Dt as GithubIssuePullRequestsRepository, E as BenchmarkJudgement, Et as planTitle, F as GithubPrKey, H as WorkflowsState, I as GithubPrLightSearchNode, L as GithubPrsFrame, M as MinedPrReviewData, Mt as IssuesState, N as PrCheckoutCaseInput, Nt as IssuesStatus, O as BenchmarkStatus, Ot as GithubIssueResponse, P as GithubPrDetailNode, Pt as issuePullRequestStateFromGithub, R as comparablePrKey, S as pullRequestKeyFromReference, St as PLAN_TOOL_NAME, T as BenchmarkId, Tt as parseExitPlanModeHookPayload, V as WorkflowsSettings, _ as ClientMessage, _t as changeMapFactId, a as ConfigUpdate, at as USAGE_INTEGER_RANGES, bt as PLAN_HOOK_OUTPUT_MAX_CHARS, dt as SessionSetup, ft as MAX_RAW_LINE_CHARS, g as CONTROL_FRAME_MAX_BYTES, gt as ChangeMap, ht as CoherenceJournalOutput, j as MergedPrListing, jt as IssuesSearchResponse, k as BenchmarkSuite, kt as IssueKey, l as configIssueMessage, m as USAGE_VENDOR_KEYS, mt as TraceRecord, p as USAGE_COST_MODES, pt as TraceCheckpoint, q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, ut as UpdateJournal, vt as PLAN_BODY_CAP_BYTES, w as BenchmarkCase, wt as PlanRevision, xt as PLAN_RESULT_HOOK_EVENT, yt as PLAN_HOOK_EVENT, z as WorkflowCommentBody } from "./config-bGil1wqg.js";
|
|
8
|
+
import { a as permitsHelpCommand, r as describeSessionLimits } from "./session-routes-BBWZ5xmv.js";
|
|
9
|
+
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, I as shouldAdoptReportedResumeId, L as claudeProjectsDir, M as RESUME_ID_RE, N as pickAutoResume, O as resolveRefocusTaskTitle, P as resolveResumeTarget, R as encodeProjectDir, S as extractOscTaskTitle, T as isSubstantivePrompt, V as isAutoNameOf, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as AUTO_CONTINUE_PROMPT, k as resolveTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as isSelfWakePrompt, x as extractAiTitle, y as cleanTaskPrompt, z as listRepoConversations } from "./agent-api-core-DniJGdf6.js";
|
|
10
10
|
import { a as positiveIntOr, c as textOr, i as numberOr, n as isRecord, o as positiveNumberOr, r as nonNegativeIntOr, s as rawTextOr, t as coercedNumberOr } from "./coerce-NSst8oRP.js";
|
|
11
11
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
|
|
12
|
-
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-
|
|
12
|
+
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-BwJ-H5Gl.js";
|
|
13
13
|
import { n as checkGuardrailsDependencies, t as allowGuardedSpawn } from "./guardrails-deps-BjPzk1rE.js";
|
|
14
14
|
import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
|
|
15
15
|
import { t as HOOK_VIA_GUARDRAILS_PROXY_ENV } from "./guardrails-proxy-core-BI3rdY-m.js";
|
|
@@ -21,13 +21,13 @@ import { n as DEFAULT_MAX_MS, r as nextBackoffMs, t as DEFAULT_BASE_MS } from ".
|
|
|
21
21
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
22
22
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
23
23
|
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-DFCTvPjj.js";
|
|
24
|
-
import { $ as DEFAULT_BRANCH_GC_PREFIXES, B as buildExceptionProperties, F as TELEMETRY_BATCH_URL, G as exceptionFingerprint, H as decideIsDevInstall, I as TELEMETRY_FLAGS_URL, J as resolveProjectToken, K as nodeMajorVersion, L as adapterBucket, P as FIRST_RUN_NOTICE, R as buildAiGenerationEvents, U as decideRemoteTelemetryState, V as classifySessionExit, W as decideTelemetryConsent, Z as stableConfigKey, a as generateProjectId, at as worktreeIntegrationTips, b as validateSettingsBlock, ct as isSameDirectoryPath, d as assetForPlatform, et as matchedPrefix, f as decideRtkInstall, g as verifyDigest, h as isRtkBinaryName, i as ensureProjectIds, it as usablePrefixes, m as installTargetPath, n as DEFAULT_CONFIG, nt as planWorktreeGc, o as glimmervoidHomeDir$1, ot as canonicalizePath, p as findEscapingArchiveMember, q as parsePosthogReleaseId, r as createConfigStore, rt as sessionIdFromBranch, st as comparableDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planBranchGc, v as mergeSettingsBlock, y as settingsBlockSpecFor, z as buildBrowserExceptionProperties } from "./config-store-
|
|
25
|
-
import { a as parseDataClientMessage, c as PendingCrashReport, d as TelemetryState, i as parseDataAttachHistory, l as TELEMETRY_EVENT_SCHEMAS, n as HookEnvelope, o as DashboardTelemetryReport, r as DEEP_HISTORY_SCROLLBACK_LINES, t as HTTP_URL_RE } from "./contracts-
|
|
26
|
-
import { A as dedupeCodexFiles, B as shouldPersistWarehouse, C as shortSha$1, D as codexSessionIdFromPath, E as codexRootCandidates, F as passOutcome, H as claudeCode, I as projectDirCandidates, L as resolveProjectsDirs, M as grokHomes, N as grokRootCandidates, O as continuationDelayMs, P as isUsageFile, R as scopedClaudeRoots, S as parseResolvedSha, T as codexHomes, V as splitLines$1, _ as isCheckFresh, a as describeAgentResolvability, b as parseRegistryDeprecation, c as isKnownAgentId, d as resolveAdapter, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, j as expandTilde, k as decideFileRead, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, o as getAdapter, p as codex, r as commandFor, s as hookProfileOf, t as DEFAULT_AGENT_ID, u as resetCommandCache, v as normalizeSha, w as codexFallbackRoots, x as parseRegistryLatest, y as normalizeUpdateChannel, z as shouldEvaluateDespiteIoFailures } from "./adapters-
|
|
24
|
+
import { $ as DEFAULT_BRANCH_GC_PREFIXES, B as buildExceptionProperties, F as TELEMETRY_BATCH_URL, G as exceptionFingerprint, H as decideIsDevInstall, I as TELEMETRY_FLAGS_URL, J as resolveProjectToken, K as nodeMajorVersion, L as adapterBucket, P as FIRST_RUN_NOTICE, R as buildAiGenerationEvents, U as decideRemoteTelemetryState, V as classifySessionExit, W as decideTelemetryConsent, Z as stableConfigKey, a as generateProjectId, at as worktreeIntegrationTips, b as validateSettingsBlock, ct as isSameDirectoryPath, d as assetForPlatform, et as matchedPrefix, f as decideRtkInstall, g as verifyDigest, h as isRtkBinaryName, i as ensureProjectIds, it as usablePrefixes, m as installTargetPath, n as DEFAULT_CONFIG, nt as planWorktreeGc, o as glimmervoidHomeDir$1, ot as canonicalizePath, p as findEscapingArchiveMember, q as parsePosthogReleaseId, r as createConfigStore, rt as sessionIdFromBranch, st as comparableDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planBranchGc, v as mergeSettingsBlock, y as settingsBlockSpecFor, z as buildBrowserExceptionProperties } from "./config-store-GsSGMu08.js";
|
|
25
|
+
import { a as parseDataClientMessage, c as PendingCrashReport, d as TelemetryState, i as parseDataAttachHistory, l as TELEMETRY_EVENT_SCHEMAS, n as HookEnvelope, o as DashboardTelemetryReport, r as DEEP_HISTORY_SCROLLBACK_LINES, t as HTTP_URL_RE } from "./contracts-s0s0gCZJ.js";
|
|
26
|
+
import { A as dedupeCodexFiles, B as shouldPersistWarehouse, C as shortSha$1, D as codexSessionIdFromPath, E as codexRootCandidates, F as passOutcome, H as claudeCode, I as projectDirCandidates, L as resolveProjectsDirs, M as grokHomes, N as grokRootCandidates, O as continuationDelayMs, P as isUsageFile, R as scopedClaudeRoots, S as parseResolvedSha, T as codexHomes, V as splitLines$1, _ as isCheckFresh, a as describeAgentResolvability, b as parseRegistryDeprecation, c as isKnownAgentId, d as resolveAdapter, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, j as expandTilde, k as decideFileRead, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, o as getAdapter, p as codex, r as commandFor, s as hookProfileOf, t as DEFAULT_AGENT_ID, u as resetCommandCache, v as normalizeSha, w as codexFallbackRoots, x as parseRegistryLatest, y as normalizeUpdateChannel, z as shouldEvaluateDespiteIoFailures } from "./adapters-DCXbfZ2V.js";
|
|
27
27
|
import { t as HOOK_TOOLS } from "./hook-tools-Dl7-r2Eb.js";
|
|
28
28
|
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";
|
|
29
|
-
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-
|
|
30
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
29
|
+
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-yLvSEm11.js";
|
|
30
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-x331h4CR.js";
|
|
31
31
|
import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
|
|
32
32
|
import { t as getRtkPath } from "./rtk-resolver-BDHi6RMv.js";
|
|
33
33
|
import { createRequire } from "node:module";
|
|
@@ -889,7 +889,7 @@ function buildCommandHookCommand({ relayPath = COMMAND_HOOK_RELAY_PATH, postUrl
|
|
|
889
889
|
function buildRemoteCommandHookCommand({ nodePath, postUrl }) {
|
|
890
890
|
return `${shellQuote(nodePath)} -e ${shellQuote("let body=\"\";process.stdin.setEncoding(\"utf8\").on(\"data\",(chunk)=>{body+=chunk}).on(\"end\",()=>{fetch(process.argv[1],{method:\"POST\",headers:{\"content-type\":\"application/json\"},body,signal:AbortSignal.timeout(4000)}).then((response)=>response.ok?response.text():\"\").then((text)=>{if(text)process.stdout.write(text)}).catch(()=>{})})")} ${shellQuote(postUrl)}`;
|
|
891
891
|
}
|
|
892
|
-
function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permissions = null, guardrails = null, detectScheduledWakeups = true, observeToolCalls = false, enableProjectMcp = false, hookTools = [], planLimits = false, planReview = false, conversationApprovals = false, userSettingsPath = null, relayPath = RELAY_PATH, commandHookRelayPath = COMMAND_HOOK_RELAY_PATH, hookToolRelayPath = HOOK_TOOL_RELAY_PATH, userHooks = [], remoteNodePath = null }) {
|
|
892
|
+
function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permissions = null, guardrails = null, detectScheduledWakeups = true, observeToolCalls = false, enableProjectMcp = false, hookTools = [], planLimits = false, planReview = false, conversationApprovals = false, holdsQuestionsForParent = false, userSettingsPath = null, relayPath = RELAY_PATH, commandHookRelayPath = COMMAND_HOOK_RELAY_PATH, hookToolRelayPath = HOOK_TOOL_RELAY_PATH, userHooks = [], remoteNodePath = null }) {
|
|
893
893
|
if (!port || !glimmervoidId || !token) throw new Error("buildHookSettings requires port, glimmervoidId, token");
|
|
894
894
|
const base = `http://127.0.0.1:${port}/hook/${encodeURIComponent(glimmervoidId)}`;
|
|
895
895
|
const hookUrl = (event) => `${base}/${event.toLowerCase()}?t=${encodeURIComponent(token)}`;
|
|
@@ -921,11 +921,14 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
921
921
|
timeout: PLAN_HOOK_TIMEOUT_SEC
|
|
922
922
|
}]
|
|
923
923
|
});
|
|
924
|
-
if (conversationApprovals && permissionRequestEntries) permissionRequestEntries.push({
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
924
|
+
if ((conversationApprovals || holdsQuestionsForParent) && permissionRequestEntries) permissionRequestEntries.push({
|
|
925
|
+
...conversationApprovals ? {} : { matcher: ASK_USER_QUESTION_TOOL_NAME },
|
|
926
|
+
hooks: [{
|
|
927
|
+
type: "http",
|
|
928
|
+
url: hookUrl(CONVERSATION_PERMISSION_HOOK_EVENT),
|
|
929
|
+
timeout: PLAN_HOOK_TIMEOUT_SEC
|
|
930
|
+
}]
|
|
931
|
+
});
|
|
929
932
|
const sharedPostToolUseMatchers = [];
|
|
930
933
|
if (detectScheduledWakeups) sharedPostToolUseMatchers.push(WAKEUP_TOOL_MATCHER);
|
|
931
934
|
sharedPostToolUseMatchers.push(PR_LINK_TOOL_MATCHER);
|
|
@@ -946,11 +949,14 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
946
949
|
timeout: timeoutSec
|
|
947
950
|
}]
|
|
948
951
|
});
|
|
949
|
-
if (conversationApprovals) postToolUse.push({
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
952
|
+
if (conversationApprovals || holdsQuestionsForParent) postToolUse.push({
|
|
953
|
+
...conversationApprovals ? {} : { matcher: ASK_USER_QUESTION_TOOL_NAME },
|
|
954
|
+
hooks: [{
|
|
955
|
+
type: "http",
|
|
956
|
+
url: hookUrl(CONVERSATION_TOOL_RESULT_HOOK_EVENT),
|
|
957
|
+
timeout: timeoutSec
|
|
958
|
+
}]
|
|
959
|
+
});
|
|
954
960
|
if (postToolUse.length > 0) hooks.PostToolUse = postToolUse;
|
|
955
961
|
const preToolUse = [];
|
|
956
962
|
if (observeToolCalls) preToolUse.push({ hooks: [{
|
|
@@ -985,7 +991,7 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
985
991
|
};
|
|
986
992
|
return settings;
|
|
987
993
|
}
|
|
988
|
-
function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls = false, hookTools = [], planReview = false, conversationApprovals = false } = {}) {
|
|
994
|
+
function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls = false, hookTools = [], planReview = false, conversationApprovals = false, holdsQuestionsForParent = false } = {}) {
|
|
989
995
|
const rows = HOOK_EVENTS.map((event) => ({
|
|
990
996
|
event,
|
|
991
997
|
matcher: null,
|
|
@@ -1023,6 +1029,18 @@ function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls
|
|
|
1023
1029
|
purpose: "Conversation view: release a held prompt the terminal answered"
|
|
1024
1030
|
});
|
|
1025
1031
|
}
|
|
1032
|
+
if (holdsQuestionsForParent && !conversationApprovals) {
|
|
1033
|
+
rows.push({
|
|
1034
|
+
event: "PermissionRequest",
|
|
1035
|
+
matcher: ASK_USER_QUESTION_TOOL_NAME,
|
|
1036
|
+
purpose: "Spawned session: hold a question so the parent can answer it"
|
|
1037
|
+
});
|
|
1038
|
+
rows.push({
|
|
1039
|
+
event: "PostToolUse",
|
|
1040
|
+
matcher: ASK_USER_QUESTION_TOOL_NAME,
|
|
1041
|
+
purpose: "Spawned session: release a held question the terminal answered"
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1026
1044
|
if (observeToolCalls) rows.push({
|
|
1027
1045
|
event: "PreToolUse",
|
|
1028
1046
|
matcher: null,
|
|
@@ -2388,6 +2406,16 @@ function postToChannel(channel, side, entry) {
|
|
|
2388
2406
|
[side]: postToMailbox(channel[side], entry)
|
|
2389
2407
|
};
|
|
2390
2408
|
}
|
|
2409
|
+
function withdrawUnreadNote(channel, side, text) {
|
|
2410
|
+
const unread = channel[side].unread.filter((entry) => entry.author !== "glimmervoid" || entry.text !== text);
|
|
2411
|
+
return {
|
|
2412
|
+
...channel,
|
|
2413
|
+
[side]: {
|
|
2414
|
+
...channel[side],
|
|
2415
|
+
unread
|
|
2416
|
+
}
|
|
2417
|
+
};
|
|
2418
|
+
}
|
|
2391
2419
|
function drainChannel(channel, side) {
|
|
2392
2420
|
const { unread, droppedCount } = channel[side];
|
|
2393
2421
|
return {
|
|
@@ -2445,6 +2473,27 @@ function describeStopNote({ childName, state, lastMessage }) {
|
|
|
2445
2473
|
if (lastMessage === null) return summary;
|
|
2446
2474
|
return `${summary}. Its last message:\n${lastMessage.length <= MAX_STOP_NOTE_MESSAGE_CHARS ? lastMessage : `${lastMessage.slice(0, MAX_STOP_NOTE_MESSAGE_CHARS)} [truncated ${lastMessage.length - MAX_STOP_NOTE_MESSAGE_CHARS} characters]`}`;
|
|
2447
2475
|
}
|
|
2476
|
+
function describeQuestionNote(childName, childRef, approval) {
|
|
2477
|
+
const answerCommand = `glimmervoid answer ${childRef}`;
|
|
2478
|
+
const operatorLine = `Or pass it to the operator: ${answerCommand} --operator`;
|
|
2479
|
+
const questions = approval.questions ?? [];
|
|
2480
|
+
if (approval.isSummaryTruncated || questions.length === 0) return [`${childName} asks a question too large to answer here. Pass it to the operator: ${answerCommand} --operator`, approval.summary].join("\n");
|
|
2481
|
+
const questionLines = questions.map((question, index) => `${index + 1}. ${question.question} [${question.options.map((option) => option.label).join(" | ")}]`);
|
|
2482
|
+
const exampleAnswers = Object.fromEntries(questions.map((question) => [question.question, question.options[0].label]));
|
|
2483
|
+
const fullNote = [
|
|
2484
|
+
`${childName} asks:`,
|
|
2485
|
+
...questionLines,
|
|
2486
|
+
`Answer: ${answerCommand} ${shellQuote(JSON.stringify(exampleAnswers))}`,
|
|
2487
|
+
operatorLine
|
|
2488
|
+
].join("\n");
|
|
2489
|
+
if (fullNote.length <= MAX_ENTRY_CHARS) return fullNote;
|
|
2490
|
+
return [
|
|
2491
|
+
`${childName} asks the questions below.`,
|
|
2492
|
+
`Answer: ${answerCommand} '{"<question text>":"<option label>"}' with one entry per question, each keyed by its full text`,
|
|
2493
|
+
operatorLine,
|
|
2494
|
+
...questionLines
|
|
2495
|
+
].join("\n");
|
|
2496
|
+
}
|
|
2448
2497
|
function describeWakeLine(channel, side) {
|
|
2449
2498
|
if (side === "toParent") return `Glimmervoid: ${channel.childName}, the session you spawned, has news. Run glimmervoid read ${channel.childId} and act on it.`;
|
|
2450
2499
|
return "Glimmervoid: the session that spawned you sent a message. Run glimmervoid read and act on it.";
|
|
@@ -2816,24 +2865,44 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
2816
2865
|
}
|
|
2817
2866
|
});
|
|
2818
2867
|
}
|
|
2868
|
+
function withdrawWaitingStopNote(childId, link) {
|
|
2869
|
+
const channel = channelsByChildId.get(childId);
|
|
2870
|
+
if (!channel || link.waitingStopNoteText === null) return;
|
|
2871
|
+
channelsByChildId.set(childId, withdrawUnreadNote(channel, "toParent", link.waitingStopNoteText));
|
|
2872
|
+
link.waitingStopNoteText = null;
|
|
2873
|
+
}
|
|
2819
2874
|
function watchChild(link, childId) {
|
|
2875
|
+
let lastRelayedQuestionId = null;
|
|
2876
|
+
link.child.on("conversation-change", ({ conversationApproval }) => {
|
|
2877
|
+
if (conversationApproval?.kind !== "question" || conversationApproval.requestId === lastRelayedQuestionId) return;
|
|
2878
|
+
lastRelayedQuestionId = conversationApproval.requestId;
|
|
2879
|
+
withdrawWaitingStopNote(childId, link);
|
|
2880
|
+
post(childId, "toParent", {
|
|
2881
|
+
author: "glimmervoid",
|
|
2882
|
+
text: describeQuestionNote(link.child.name, childId, conversationApproval),
|
|
2883
|
+
at: now(),
|
|
2884
|
+
wakes: true
|
|
2885
|
+
});
|
|
2886
|
+
});
|
|
2820
2887
|
link.child.on("hook-event", ({ event, payload }) => {
|
|
2821
2888
|
if (event.toLowerCase() !== "stop") return;
|
|
2822
2889
|
link.lastChildMessage = readLastAssistantMessage(payload);
|
|
2823
2890
|
});
|
|
2824
2891
|
link.child.on("state-change", ({ from, to }) => {
|
|
2825
|
-
if (shouldPostStopNote(from, to)) {
|
|
2892
|
+
if (!(to === STATES.WAITING && link.child._conversationApproval?.kind === "question") && shouldPostStopNote(from, to)) {
|
|
2893
|
+
const text = describeStopNote({
|
|
2894
|
+
childName: link.child.name,
|
|
2895
|
+
state: to,
|
|
2896
|
+
lastMessage: link.lastChildMessage
|
|
2897
|
+
});
|
|
2826
2898
|
post(childId, "toParent", {
|
|
2827
2899
|
author: "glimmervoid",
|
|
2828
|
-
text
|
|
2829
|
-
childName: link.child.name,
|
|
2830
|
-
state: to,
|
|
2831
|
-
lastMessage: link.lastChildMessage
|
|
2832
|
-
}),
|
|
2900
|
+
text,
|
|
2833
2901
|
at: now(),
|
|
2834
2902
|
wakes: shouldStopNoteWake(to, link.hasParentRead)
|
|
2835
2903
|
});
|
|
2836
2904
|
link.lastChildMessage = null;
|
|
2905
|
+
link.waitingStopNoteText = to === STATES.WAITING ? text : null;
|
|
2837
2906
|
}
|
|
2838
2907
|
wakeRecipient(childId, "toParent");
|
|
2839
2908
|
wakeRecipient(childId, "toChild");
|
|
@@ -2849,6 +2918,7 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
2849
2918
|
parent,
|
|
2850
2919
|
child,
|
|
2851
2920
|
lastChildMessage: null,
|
|
2921
|
+
waitingStopNoteText: null,
|
|
2852
2922
|
hasParentRead: false,
|
|
2853
2923
|
wakesSinceOperatorInput: 0,
|
|
2854
2924
|
isOperatorFlagged: false,
|
|
@@ -3062,6 +3132,7 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
3062
3132
|
agent: agentId,
|
|
3063
3133
|
agentDepth: budget.depth + 1,
|
|
3064
3134
|
ownerId: parent.id,
|
|
3135
|
+
holdsQuestionsForParent: true,
|
|
3065
3136
|
ephemeral: true,
|
|
3066
3137
|
initialPrompt: request.prompt
|
|
3067
3138
|
});
|
|
@@ -3296,6 +3367,30 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
3296
3367
|
}
|
|
3297
3368
|
};
|
|
3298
3369
|
}
|
|
3370
|
+
function answer(session, request) {
|
|
3371
|
+
const owned = findChildOf(session, request.child);
|
|
3372
|
+
if (!owned.ok) return refusal(404, owned.error);
|
|
3373
|
+
const child = agentSessions.get(owned.channel.childId);
|
|
3374
|
+
if (!child) return refusal(409, `${owned.channel.childName} has already ended`);
|
|
3375
|
+
const approval = child._conversationApproval;
|
|
3376
|
+
if (approval?.kind !== "question") return refusal(409, `${owned.channel.childName} has no held question`);
|
|
3377
|
+
if ("toOperator" in request) {
|
|
3378
|
+
if (typeof approval.requestId !== "string" || !child.releaseQuestionHold(approval.requestId)) return refusal(409, "the question is no longer held");
|
|
3379
|
+
return {
|
|
3380
|
+
status: 200,
|
|
3381
|
+
body: { ok: true }
|
|
3382
|
+
};
|
|
3383
|
+
}
|
|
3384
|
+
if (approval.isSummaryTruncated) return refusal(409, `${owned.channel.childName}'s question is too large to answer here; pass it to the operator with glimmervoid answer ${request.child} --operator`);
|
|
3385
|
+
if (!child.answerConversationApproval(approval.requestId, "accept", request.answers)) {
|
|
3386
|
+
const expectedQuestions = (approval.questions ?? []).map((question) => question.question);
|
|
3387
|
+
return refusal(409, `answers must match the expected question texts: ${JSON.stringify(expectedQuestions)}`);
|
|
3388
|
+
}
|
|
3389
|
+
return {
|
|
3390
|
+
status: 200,
|
|
3391
|
+
body: { ok: true }
|
|
3392
|
+
};
|
|
3393
|
+
}
|
|
3299
3394
|
async function close(session, { child, discard = false }) {
|
|
3300
3395
|
const owned = findChildOf(session, child);
|
|
3301
3396
|
if (!owned.ok) return refusal(404, owned.error);
|
|
@@ -3324,6 +3419,7 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
3324
3419
|
send,
|
|
3325
3420
|
read,
|
|
3326
3421
|
close,
|
|
3422
|
+
answer,
|
|
3327
3423
|
attention,
|
|
3328
3424
|
board: () => ({
|
|
3329
3425
|
status: 200,
|
|
@@ -3709,6 +3805,7 @@ function createWsSender(ws, opts = {}) {
|
|
|
3709
3805
|
let sentOffset = initialOffset;
|
|
3710
3806
|
let desynced = false;
|
|
3711
3807
|
let refusedOutOfBand = null;
|
|
3808
|
+
let isOutputPaused = false;
|
|
3712
3809
|
const bufferedAmount = () => ws.bufferedAmount || 0;
|
|
3713
3810
|
const isOpen = () => ws.readyState === OPEN;
|
|
3714
3811
|
const overHighWater = () => bufferedAmount() > cfg.highWaterMark;
|
|
@@ -3739,7 +3836,7 @@ function createWsSender(ws, opts = {}) {
|
|
|
3739
3836
|
ws.send(payload);
|
|
3740
3837
|
}
|
|
3741
3838
|
function maybeBackfill() {
|
|
3742
|
-
if (!desynced || !source || destroyed || !isOpen()) return;
|
|
3839
|
+
if (!desynced || !source || destroyed || isOutputPaused || !isOpen()) return;
|
|
3743
3840
|
if (overHighWater()) return;
|
|
3744
3841
|
const { data, end, evicted } = source.getBufferSince(sentOffset);
|
|
3745
3842
|
if (evicted) ws.send(SCREEN_RESET + data);
|
|
@@ -3773,7 +3870,7 @@ function createWsSender(ws, opts = {}) {
|
|
|
3773
3870
|
scheduleImmediate(flushSend);
|
|
3774
3871
|
}
|
|
3775
3872
|
function onData(data) {
|
|
3776
|
-
if (destroyed || !isOpen()) return;
|
|
3873
|
+
if (destroyed || isOutputPaused || !isOpen()) return;
|
|
3777
3874
|
if (desynced && !overHighWater()) {
|
|
3778
3875
|
maybeBackfill();
|
|
3779
3876
|
return;
|
|
@@ -3820,6 +3917,37 @@ function createWsSender(ws, opts = {}) {
|
|
|
3820
3917
|
ws.send(payload);
|
|
3821
3918
|
return true;
|
|
3822
3919
|
}
|
|
3920
|
+
function pauseOutput() {
|
|
3921
|
+
if (destroyed || isOutputPaused) return;
|
|
3922
|
+
flushSend();
|
|
3923
|
+
isOutputPaused = true;
|
|
3924
|
+
}
|
|
3925
|
+
function resetToScreenSnapshot(snapshot) {
|
|
3926
|
+
sendBuffer = "";
|
|
3927
|
+
if (overHighWater()) {
|
|
3928
|
+
if (source) desynced = true;
|
|
3929
|
+
armStallClose();
|
|
3930
|
+
return;
|
|
3931
|
+
}
|
|
3932
|
+
desynced = false;
|
|
3933
|
+
clearStall();
|
|
3934
|
+
ws.send(snapshot.data);
|
|
3935
|
+
sentOffset = snapshot.offset;
|
|
3936
|
+
flushRefusedOutOfBand();
|
|
3937
|
+
}
|
|
3938
|
+
function resumeOutput({ outputOffset, hasResizedWhilePaused, readScreenSnapshot }) {
|
|
3939
|
+
if (destroyed || !isOutputPaused) return;
|
|
3940
|
+
isOutputPaused = false;
|
|
3941
|
+
if (!source || !isOpen()) return;
|
|
3942
|
+
const missedByteCount = outputOffset - sentOffset;
|
|
3943
|
+
if (missedByteCount <= 0 && !desynced) return;
|
|
3944
|
+
if (!hasResizedWhilePaused && missedByteCount <= cfg.maxSendBuffer) {
|
|
3945
|
+
desynced = true;
|
|
3946
|
+
maybeBackfill();
|
|
3947
|
+
return;
|
|
3948
|
+
}
|
|
3949
|
+
resetToScreenSnapshot(readScreenSnapshot());
|
|
3950
|
+
}
|
|
3823
3951
|
function destroy() {
|
|
3824
3952
|
destroyed = true;
|
|
3825
3953
|
clearStall();
|
|
@@ -3830,6 +3958,8 @@ function createWsSender(ws, opts = {}) {
|
|
|
3830
3958
|
}
|
|
3831
3959
|
return {
|
|
3832
3960
|
onData,
|
|
3961
|
+
pauseOutput,
|
|
3962
|
+
resumeOutput,
|
|
3833
3963
|
markInputFlush,
|
|
3834
3964
|
sendImmediate,
|
|
3835
3965
|
sendOutOfBand,
|
|
@@ -3989,6 +4119,7 @@ function createBackendWebSockets(dependencies) {
|
|
|
3989
4119
|
session.on("data", dataListener);
|
|
3990
4120
|
const resizeListener = (size) => sendPtySizeFrame(sender, size);
|
|
3991
4121
|
session.on("resize", resizeListener);
|
|
4122
|
+
let resizeSeqAtPause = null;
|
|
3992
4123
|
socket.on("message", (raw) => {
|
|
3993
4124
|
const message = parseDataClientMessage(String(raw));
|
|
3994
4125
|
if (!message) return;
|
|
@@ -4019,7 +4150,23 @@ function createBackendWebSockets(dependencies) {
|
|
|
4019
4150
|
applyResolvedSize(false);
|
|
4020
4151
|
return;
|
|
4021
4152
|
}
|
|
4022
|
-
if (message.type === "unview")
|
|
4153
|
+
if (message.type === "unview") {
|
|
4154
|
+
releaseViewerSize();
|
|
4155
|
+
return;
|
|
4156
|
+
}
|
|
4157
|
+
if (message.type === "pause-output") {
|
|
4158
|
+
resizeSeqAtPause ??= session.ptySize().seq;
|
|
4159
|
+
sender.pauseOutput();
|
|
4160
|
+
return;
|
|
4161
|
+
}
|
|
4162
|
+
if (message.type !== "resume-output" || resizeSeqAtPause === null) return;
|
|
4163
|
+
const hasResizedWhilePaused = session.ptySize().seq !== resizeSeqAtPause;
|
|
4164
|
+
resizeSeqAtPause = null;
|
|
4165
|
+
sender.resumeOutput({
|
|
4166
|
+
outputOffset: session.getOutputOffset(),
|
|
4167
|
+
hasResizedWhilePaused,
|
|
4168
|
+
readScreenSnapshot: () => session.getScreenSnapshot()
|
|
4169
|
+
});
|
|
4023
4170
|
});
|
|
4024
4171
|
socket.on("close", () => {
|
|
4025
4172
|
session.removeListener("data", dataListener);
|
|
@@ -16513,6 +16660,7 @@ function createSessionHookLifecycle(options) {
|
|
|
16513
16660
|
planLimits: options.planLimits,
|
|
16514
16661
|
planReview: options.planReview,
|
|
16515
16662
|
conversationApprovals: options.conversationApprovals(),
|
|
16663
|
+
holdsQuestionsForParent: options.holdsQuestionsForParent,
|
|
16516
16664
|
userHooks: [...typeof options.getUserHooks === "function" ? options.getUserHooks() : [], ...glimmervoidSuppliedHooks()]
|
|
16517
16665
|
});
|
|
16518
16666
|
settingsHandle = nextSettingsHandle;
|
|
@@ -18981,6 +19129,7 @@ var Session = class extends EventEmitter {
|
|
|
18981
19129
|
isMarkedUnguarded;
|
|
18982
19130
|
isGuardrailsReleased;
|
|
18983
19131
|
_isConversationViewEnabled;
|
|
19132
|
+
_holdsQuestionsForParent;
|
|
18984
19133
|
_startCodexBridge;
|
|
18985
19134
|
_codexBridge;
|
|
18986
19135
|
_conversationApproval;
|
|
@@ -19055,7 +19204,7 @@ var Session = class extends EventEmitter {
|
|
|
19055
19204
|
_resizeSeq;
|
|
19056
19205
|
_titleSource;
|
|
19057
19206
|
_statusSource;
|
|
19058
|
-
constructor({ customTitle, id, name, path: projectPath, dangerouslySkipPermissions = false, replayBufferKB = 512, hookRouter = null, getHookPort = null, hooksBaseDir = void 0, titleStabilizationMs = 1500, statusConflictMs = void 0, statusDedupMs = void 0, detectBackgroundAgents = true, agentTtlMs = DEFAULT_AGENT_TTL_MS, shellTaskTtlMs = DEFAULT_SHELL_TASK_TTL_MS, teammateTaskTtlMs = DEFAULT_TEAMMATE_TASK_TTL_MS, gateReleaseSettleMs = DEFAULT_GATE_RELEASE_SETTLE_MS, detectScheduledWakeups = true, observeToolCalls = false, agent = DEFAULT_AGENT_ID, adapter = null, bypassHookTrust = false, isMarkedUnguarded = false, isGuardrailsReleased = false, isConversationViewEnabled = null, isConversationViewSettingOn = null, startCodexBridge = startCodexAppServerBridge, titleQuietFallbackMs = 3e4, spawnCommand = null, initialPrompt = null, extraClaudeArgs = [], ephemeral = false, resumeSessionId = null, taskTitleState = void 0, prLinks = void 0, settingsPermissions = null, settingsGuardrails = null, prepareGuardrails = null, getRemoteLaunch = null, spawnEnv = null, prependPathDirs = [], enableProjectMcp = false, hookTools = [], getHookTools = null, planReviewPort = null, planLimits = false, getUserHooks = null, extraUserHooks = [], prepareCoherence = null, ptySpawn = null, requireWorktree = false, screenKeeperFactory = null, killProc = null, signalProc = null, platform = process.platform, gitWorkspace = null, integrationBranch = null, autoRebase = true, syncOnStart = true, liveWorktreeReview = true, worktreeRoot = null, worktreeShare = null, workspaceRepos = void 0, agentDepth = 0, ownerId = null, commitSigningProgram = null }) {
|
|
19207
|
+
constructor({ customTitle, id, name, path: projectPath, dangerouslySkipPermissions = false, replayBufferKB = 512, hookRouter = null, getHookPort = null, hooksBaseDir = void 0, titleStabilizationMs = 1500, statusConflictMs = void 0, statusDedupMs = void 0, detectBackgroundAgents = true, agentTtlMs = DEFAULT_AGENT_TTL_MS, shellTaskTtlMs = DEFAULT_SHELL_TASK_TTL_MS, teammateTaskTtlMs = DEFAULT_TEAMMATE_TASK_TTL_MS, gateReleaseSettleMs = DEFAULT_GATE_RELEASE_SETTLE_MS, detectScheduledWakeups = true, observeToolCalls = false, agent = DEFAULT_AGENT_ID, adapter = null, bypassHookTrust = false, isMarkedUnguarded = false, isGuardrailsReleased = false, isConversationViewEnabled = null, isConversationViewSettingOn = null, holdsQuestionsForParent = false, startCodexBridge = startCodexAppServerBridge, titleQuietFallbackMs = 3e4, spawnCommand = null, initialPrompt = null, extraClaudeArgs = [], ephemeral = false, resumeSessionId = null, taskTitleState = void 0, prLinks = void 0, settingsPermissions = null, settingsGuardrails = null, prepareGuardrails = null, getRemoteLaunch = null, spawnEnv = null, prependPathDirs = [], enableProjectMcp = false, hookTools = [], getHookTools = null, planReviewPort = null, planLimits = false, getUserHooks = null, extraUserHooks = [], prepareCoherence = null, ptySpawn = null, requireWorktree = false, screenKeeperFactory = null, killProc = null, signalProc = null, platform = process.platform, gitWorkspace = null, integrationBranch = null, autoRebase = true, syncOnStart = true, liveWorktreeReview = true, worktreeRoot = null, worktreeShare = null, workspaceRepos = void 0, agentDepth = 0, ownerId = null, commitSigningProgram = null }) {
|
|
19059
19208
|
super();
|
|
19060
19209
|
this.id = id;
|
|
19061
19210
|
this.ownerId = ownerId;
|
|
@@ -19130,6 +19279,7 @@ var Session = class extends EventEmitter {
|
|
|
19130
19279
|
this.isGuardrailsReleased = isGuardrailsReleased === true;
|
|
19131
19280
|
const isConversationViewConfigured = isConversationViewEnabled ?? (() => false);
|
|
19132
19281
|
this._isConversationViewEnabled = () => isConversationViewConfigured() && !this.isConversationBridgeRefused();
|
|
19282
|
+
this._holdsQuestionsForParent = holdsQuestionsForParent;
|
|
19133
19283
|
this._startCodexBridge = startCodexBridge;
|
|
19134
19284
|
this._codexBridge = null;
|
|
19135
19285
|
this._conversationApproval = null;
|
|
@@ -19200,6 +19350,7 @@ var Session = class extends EventEmitter {
|
|
|
19200
19350
|
planLimits: this._planLimits,
|
|
19201
19351
|
planReview: planReviewPort !== null,
|
|
19202
19352
|
conversationApprovals: () => this.agentId === "claude-code" && (isConversationViewSettingOn ?? isConversationViewConfigured)(),
|
|
19353
|
+
holdsQuestionsForParent: this._holdsQuestionsForParent,
|
|
19203
19354
|
getUserHooks,
|
|
19204
19355
|
extraUserHooks,
|
|
19205
19356
|
bypassHookTrust: this.bypassHookTrust,
|
|
@@ -20253,9 +20404,10 @@ var Session = class extends EventEmitter {
|
|
|
20253
20404
|
this._emitConversationChange();
|
|
20254
20405
|
}
|
|
20255
20406
|
holdClaudePermission(payload, abandoned) {
|
|
20256
|
-
if (this.agentId !== "claude-code"
|
|
20407
|
+
if (this.agentId !== "claude-code") return null;
|
|
20257
20408
|
const request = parseClaudePermissionRequest(payload);
|
|
20258
20409
|
if (!request) return null;
|
|
20410
|
+
if (!this._isConversationViewEnabled() && !(this._holdsQuestionsForParent && request.toolName === "AskUserQuestion")) return null;
|
|
20259
20411
|
this._releaseClaudeHolds((hold) => hold.request.agentKey === request.agentKey);
|
|
20260
20412
|
const requestId = `claude-${this._nextClaudeApprovalNumber}`;
|
|
20261
20413
|
this._nextClaudeApprovalNumber += 1;
|
|
@@ -20294,6 +20446,12 @@ var Session = class extends EventEmitter {
|
|
|
20294
20446
|
this._showFirstClaudeApproval();
|
|
20295
20447
|
return true;
|
|
20296
20448
|
}
|
|
20449
|
+
releaseQuestionHold(requestId) {
|
|
20450
|
+
const hold = this._claudeApprovalHolds.find((candidate) => candidate.approval.requestId === requestId && candidate.approval.kind === "question");
|
|
20451
|
+
if (!hold) return false;
|
|
20452
|
+
this._releaseClaudeHolds((candidate) => candidate === hold);
|
|
20453
|
+
return true;
|
|
20454
|
+
}
|
|
20297
20455
|
answerConversationApproval(requestId, decision, answers) {
|
|
20298
20456
|
if (this.agentId === "claude-code") return this._answerClaudeApproval(requestId, decision, answers);
|
|
20299
20457
|
const bridge = this._codexBridge;
|
|
@@ -52249,7 +52407,8 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
52249
52407
|
detectScheduledWakeups: config.detectScheduledWakeups !== false,
|
|
52250
52408
|
hookTools,
|
|
52251
52409
|
planReview: config.planReview?.enabled !== false,
|
|
52252
|
-
conversationApprovals: config.conversationView === true
|
|
52410
|
+
conversationApprovals: config.conversationView === true,
|
|
52411
|
+
holdsQuestionsForParent: true
|
|
52253
52412
|
});
|
|
52254
52413
|
}
|
|
52255
52414
|
function hooksReportProjects() {
|
|
@@ -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-GsSGMu08.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-yLvSEm11.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
//#region server/text-format.ts
|
|
6
6
|
function trimIso(iso) {
|
|
@@ -3,7 +3,7 @@ import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
|
|
|
3
3
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
4
4
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
5
5
|
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-DFCTvPjj.js";
|
|
6
|
-
import { o as glimmervoidHomeDir, ot as canonicalizePath } from "./config-store-
|
|
6
|
+
import { o as glimmervoidHomeDir, ot as canonicalizePath } from "./config-store-GsSGMu08.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -992,7 +992,11 @@ var SESSION_COMMANDS = [
|
|
|
992
992
|
"link-pr",
|
|
993
993
|
"settings"
|
|
994
994
|
];
|
|
995
|
-
var AGENT_API_VERBS = [
|
|
995
|
+
var AGENT_API_VERBS = [
|
|
996
|
+
...SESSION_COMMANDS,
|
|
997
|
+
"limits",
|
|
998
|
+
"answer"
|
|
999
|
+
];
|
|
996
1000
|
var AgentSpawnRequest = z.object({
|
|
997
1001
|
prompt: z.string({ error: "prompt must be a string" }).min(1, { error: "prompt must not be empty" }).max(2e4, { error: "prompt must be at most 20000 characters" }).refine((prompt) => !prompt.trimStart().startsWith("-"), { message: "prompt must not start with a dash, which the agent CLI would read as an option" }),
|
|
998
1002
|
name: z.string({ error: "name must be a string" }).min(1, { error: "name must not be empty" }).max(200, { error: "name must be at most 200 characters" }).optional(),
|
|
@@ -1005,6 +1009,13 @@ var AgentCloseRequest = z.object({
|
|
|
1005
1009
|
child: SessionTarget,
|
|
1006
1010
|
discard: z.boolean().optional()
|
|
1007
1011
|
}).strict();
|
|
1012
|
+
var AgentAnswerRequest = z.union([z.object({
|
|
1013
|
+
child: SessionTarget,
|
|
1014
|
+
answers: z.record(z.string(), z.string().min(1))
|
|
1015
|
+
}).strict(), z.object({
|
|
1016
|
+
child: SessionTarget,
|
|
1017
|
+
toOperator: z.literal(true)
|
|
1018
|
+
}).strict()]);
|
|
1008
1019
|
var AgentChannelEntry = z.object({
|
|
1009
1020
|
from: z.enum([
|
|
1010
1021
|
"parent",
|
|
@@ -1124,4 +1135,4 @@ var AgentLimitsReply = z.object({
|
|
|
1124
1135
|
}).strict())
|
|
1125
1136
|
}).strict().extend({ ok: z.literal(true) }).strict();
|
|
1126
1137
|
//#endregion
|
|
1127
|
-
export {
|
|
1138
|
+
export { MyPrMergeWhenReadyRequest as $, RESTARTABLE_STATES as $t, SESSION_NAME_RULE_TEXT as A, TeamReviewStateEntry as At, UnseenOutcome as B, HEX_SHA_RE as Bt, ConversationQuestion as C, ReviewResult as Ct, SESSION_DOC_BODY_CAP_BYTES as D, TeamReviewActionResult as Dt, SESSION_COMMANDS as E, TeamReviewActionRequest as Et, SessionState as F, canApproveAfterComment as Ft, MyPrCheckContextsResponse as G, repoParts as Gt, MyPr as H, GH_SEGMENT as Ht, SshSignReply as I, decisionAsIfApprovalRequired as It, MyPrLaneEntry as J, GithubPrsFreshness as Jt, MyPrKeepMergeableRequest as K, GithubPollingRefreshRequest as Kt, SshSignRequest as L, hasRequiredActionHead as Lt, SSH_SIGN_BODY_CAP_BYTES as M, TeamReviewThreadCommentsResponse as Mt, SessionDoc as N, TeamReviewThreadResult as Nt, SESSION_DOC_PATH_MAX_CHARS as O, TeamReviewCompareFiles as Ot, SessionSnapshot as P, TeamReviewThreadsRepository as Pt, MyPrMergeStateResponse as Q, MERGEABLE_LIVE_STATES as Qt, TASK_TITLE_CONTROL_CHARACTERS as R, hasStandingViewerApproval as Rt, ConversationApprovalDecision as S, ReviewFinding as St, RefinedTaskTitle as T, ReviewVerdict as Tt, MyPrAutoRebase as U, NODE_ID_RE as Ut, LinkedPr as V, shortSha as Vt, MyPrCheckContext as W, REPO_SLUG_RE as Wt, MyPrMergeRequest as X, BADGE_LABELS as Xt, MyPrMergeMethod as Y, githubPollingShape as Yt, MyPrMergeResult as Z, KILLABLE_STATES as Zt, CONVERSATION_PERMISSION_HOOK_EVENT as _, PrDetail as _t, AgentAttentionRequest as a, MyPrsState as at, ConversationAnswers as b, ReviewComment as bt, AgentLimitsReply as c, pullRequestKeyFormat as ct, AgentSendRequest as d, DECIDING_REVIEW_STATES as dt, STATES as en, MyPrMergeWhenReadyResult as et, AgentSettingsReply as f, EarlierReview as ft, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS as g, PostingPlan as gt, COHERENCE_HOOKS_INACTIVE as h, GithubReviewState as ht, AgentAnswerRequest as i, MyPrsSnapshot as it, SIGN_URL_ENV as j, TeamReviewStatus as jt, SESSION_NAME_PATTERN as k, TeamReviewResolveResponse as kt, AgentPullRequestRequest as l, repositoryName as lt, AgentSpawnRequest as m, GithubReviewDecision as mt, AGENT_URL_ENV as n, MyPrThreadNode as nt, AgentCloseRequest as o, MyPrsStatus as ot, AgentSettingsRequest as p, FindingSeverity as pt, MyPrKeepMergeableResult as q, GithubPollingRefreshResult as qt, ASK_USER_QUESTION_TOOL_NAME as r, MyPrThreadsResponse as rt, AgentEditRequest as s, SessionPrLinks as st, AGENT_API_VERBS as t, MyPrSearchNode as tt, AgentReadRequest as u, CommitSha as ut, CONVERSATION_TOOL_RESULT_HOOK_EVENT as v, QueuedReview as vt, PendingWakeup as w, ReviewThreadId as wt, ConversationApproval as x, ReviewDraft as xt, CoherenceHooksState as y, ReviewChecksState as yt, TaskTitle as z, FULL_SHA_RE as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as SESSION_COMMANDS } from "./session-GoNLV4AT.js";
|
|
2
2
|
//#region session/core/session-routes.ts
|
|
3
3
|
var SUPERVISION_LINE = "Glimmervoid supervises this session. Run glimmervoid --help for the commands it gives you and this session's limits.";
|
|
4
4
|
var SPAWN_LINE = "To delegate work that edits files or runs long, use glimmervoid spawn rather than an in-process subagent: the spawned session gets its own dashboard card the operator can watch. An in-process subagent stays fine for a quick read-only lookup.";
|
|
@@ -111,6 +111,7 @@ var COMMAND_ROUTES = Object.freeze({
|
|
|
111
111
|
send: channelRoute,
|
|
112
112
|
read: channelRoute,
|
|
113
113
|
close: closeRoute,
|
|
114
|
+
answer: closeRoute,
|
|
114
115
|
attention: attentionRoute,
|
|
115
116
|
board: () => ANSWERS,
|
|
116
117
|
edit: editRoute,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { r as BrowserConfig } from "./config-
|
|
2
|
+
import { f as AgentSettingsReply } from "./session-GoNLV4AT.js";
|
|
3
|
+
import { r as BrowserConfig } from "./config-bGil1wqg.js";
|
|
4
4
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
5
5
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
6
6
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
|
|
7
|
-
import { C as deleteValueAtPath, D as scoreSettingsSearch, E as parsePosthogProjectSelection, N as SETTINGS_REGISTRY, O as setValueAtPath, Q as withEnvSecrets, S as cloneValue, X as readEnvSecrets, Y as ENV_SECRET_BINDINGS, j as valueAtPath, l as saveConfigFileOnce, s as loadConfigFile, u as validateConfig } from "./config-store-
|
|
8
|
-
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as ALL_SETTINGS } from "./settings-readout-core-
|
|
7
|
+
import { C as deleteValueAtPath, D as scoreSettingsSearch, E as parsePosthogProjectSelection, N as SETTINGS_REGISTRY, O as setValueAtPath, Q as withEnvSecrets, S as cloneValue, X as readEnvSecrets, Y as ENV_SECRET_BINDINGS, j as valueAtPath, l as saveConfigFileOnce, s as loadConfigFile, u as validateConfig } from "./config-store-GsSGMu08.js";
|
|
8
|
+
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as ALL_SETTINGS } from "./settings-readout-core-x331h4CR.js";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
@@ -329,7 +329,7 @@ function processIo() {
|
|
|
329
329
|
async function runSettingsCli(commandArguments, io = processIo()) {
|
|
330
330
|
const serverRequest = settingsRequestForServer(commandArguments, process.env);
|
|
331
331
|
if (!serverRequest) return runSettingsCommand(commandArguments, io);
|
|
332
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
332
|
+
const { askAgentApi } = await import("./agent-api-cli-CgQTmmLd.js");
|
|
333
333
|
const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
|
|
334
334
|
ok: false,
|
|
335
335
|
error: errorMessage(error)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as AgentSettingsRequest } from "./session-GoNLV4AT.js";
|
|
2
2
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
3
|
-
import { A as settingsOf, M as FILE_ONLY_GROUPS, N as SETTINGS_REGISTRY, S as cloneValue, T as hasScaledUnit, X as readEnvSecrets, j as valueAtPath, k as settingsGroupOf, w as displayText, x as SETTINGS_INDEX } from "./config-store-
|
|
3
|
+
import { A as settingsOf, M as FILE_ONLY_GROUPS, N as SETTINGS_REGISTRY, S as cloneValue, T as hasScaledUnit, X as readEnvSecrets, j as valueAtPath, k as settingsGroupOf, w as displayText, x as SETTINGS_INDEX } from "./config-store-GsSGMu08.js";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
//#region server/core/settings-readout-core.ts
|
|
6
6
|
var VALUE_COLUMN_WIDTH = 40;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import {
|
|
2
|
+
import { I as SshSignReply, j as SIGN_URL_ENV } from "./session-GoNLV4AT.js";
|
|
3
3
|
import { n as execFileAsync, o as spawn } from "./child-process-safe-D4hyVIXj.js";
|
|
4
4
|
import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
|
|
5
|
-
import { n as postToAgentIngress } from "./agent-api-cli-
|
|
5
|
+
import { n as postToAgentIngress } from "./agent-api-cli-6W5lx3AO.js";
|
|
6
6
|
import { l as parseSshPublicKey } from "./ssh-signing-core-CRhVVWNW.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|