glimmervoid 0.46.2-next.129 → 0.46.2-next.131
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-D8F894HY.js → adapters-Czb4h3s-.js} +1 -1
- package/dist/chunks/{adapters-Debso6Nj.js → adapters-DVtQx5Fs.js} +5 -5
- package/dist/chunks/{agent-api-cli-DioYG2u4.js → agent-api-cli-CSG83t2c.js} +4 -4
- package/dist/chunks/{agent-api-cli-CVYoNWsl.js → agent-api-cli-DRzGGM_n.js} +1 -1
- package/dist/chunks/{agent-api-core-DygWYNDI.js → agent-api-core-BIitz3NO.js} +3 -3
- package/dist/chunks/{agent-setup-cli-BLrIrWTb.js → agent-setup-cli-DpYpnB6s.js} +1 -1
- package/dist/chunks/{build-channel-BOrLvUIj.js → build-channel-CwCQx6A3.js} +2 -2
- package/dist/chunks/{config-BhD7tb4P.js → config-DCY3jSvU.js} +1 -19
- package/dist/chunks/{config-store-DRj0wUWV.js → config-store-4G4l-YqH.js} +2 -21
- package/dist/chunks/config-store-BfQmvWFI.js +1 -0
- package/dist/chunks/{git-version-C-IkI4sr.js → git-version-WyrLHANY.js} +1 -1
- package/dist/chunks/{grok-B8DOqRB-.js → grok-B0SXkBAj.js} +1 -1
- package/dist/chunks/{main-CwIQbb0t.js → main-Dktf7LHr.js} +49 -422
- package/dist/chunks/{pair-cli-pSxxCt7v.js → pair-cli-D6nQSpfp.js} +2 -2
- package/dist/chunks/{remote-config-CKCDKWYU.js → remote-config-CboQE2_Q.js} +1 -1
- package/dist/chunks/{session-BF6eF7dw.js → session-B2Wieg0a.js} +5 -21
- package/dist/chunks/{session-routes-gzOQJb1W.js → session-routes-Cr9S--Nf.js} +1 -1
- package/dist/chunks/{settings-cli-BP-uyH8u.js → settings-cli-BZ-gcH89.js} +5 -5
- package/dist/chunks/{settings-readout-core-Cvy3rJLz.js → settings-readout-core-DSYFlRYP.js} +2 -2
- package/dist/chunks/{shown-files-core-Bkuessu6.js → shown-files-core-C7ER2sw2.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-BpiODQx0.js → ssh-sign-cli-BoYkp3n2.js} +2 -2
- package/dist/client/assets/{alert-sound-Deu-O2kQ.js → alert-sound-Cwoduxbr.js} +1 -1
- package/dist/client/assets/alert-sound-Cwoduxbr.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-B6pAjrlO.js → benchmark-panel-XUkHULmZ.js} +1 -1
- package/dist/client/assets/benchmark-panel-XUkHULmZ.js.br +0 -0
- package/dist/client/assets/{card-registry-DTBOn8Bd.js → card-registry-AE_x7GR7.js} +1 -1
- package/dist/client/assets/card-registry-AE_x7GR7.js.br +0 -0
- package/dist/client/assets/{celebration-player-Cf5DwFjN.js → celebration-player-b4i3G8j4.js} +1 -1
- package/dist/client/assets/celebration-player-b4i3G8j4.js.br +0 -0
- package/dist/client/assets/{control-ws-BGxkawWT.js → control-ws-CklsyQBG.js} +1 -1
- package/dist/client/assets/control-ws-CklsyQBG.js.br +0 -0
- package/dist/client/assets/{dialogs-ThZLhht_.js → dialogs-DMs0ev1f.js} +2 -2
- package/dist/client/assets/dialogs-DMs0ev1f.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-Bh-mXxw1.js +1 -0
- package/dist/client/assets/doc-editor-ui-Bh-mXxw1.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-DQ69ORji.js → first-run-checklist-kvboN5w7.js} +1 -1
- package/dist/client/assets/first-run-checklist-kvboN5w7.js.br +0 -0
- package/dist/client/assets/{hooks-panel-tXOqrUHw.js → hooks-panel-uI-g8Hll.js} +1 -1
- package/dist/client/assets/hooks-panel-uI-g8Hll.js.br +0 -0
- package/dist/client/assets/index-C2Guihrw.js +78 -0
- package/dist/client/assets/index-C2Guihrw.js.br +0 -0
- package/dist/client/assets/index-CVB9CG5c.css +2 -0
- package/dist/client/assets/index-CVB9CG5c.css.br +0 -0
- package/dist/client/assets/{issues-panel-DzX5iyjG.js → issues-panel-BxJIYK8c.js} +1 -1
- package/dist/client/assets/issues-panel-BxJIYK8c.js.br +0 -0
- package/dist/client/assets/{nyan-cat-D8iLr_Fu.js → nyan-cat-CQ-zwFYs.js} +1 -1
- package/dist/client/assets/nyan-cat-CQ-zwFYs.js.br +0 -0
- package/dist/client/assets/phone-shell-Cdgm_Kv7.js +1 -0
- package/dist/client/assets/phone-shell-Cdgm_Kv7.js.br +0 -0
- package/dist/client/assets/{plan-face-CFPT9PGb.js → plan-face-BPNb61TJ.js} +2 -2
- package/dist/client/assets/plan-face-BPNb61TJ.js.br +0 -0
- package/dist/client/assets/plan-render-C75HSfzz.js +4 -0
- package/dist/client/assets/plan-render-C75HSfzz.js.br +0 -0
- package/dist/client/assets/{pr-scope-tabs-CfkDxERy.js → pr-scope-tabs-DH_ARE7O.js} +1 -1
- package/dist/client/assets/pr-scope-tabs-DH_ARE7O.js.br +0 -0
- package/dist/client/assets/radar-panel-BzkXKeC0.js +1 -0
- package/dist/client/assets/radar-panel-BzkXKeC0.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-BuUJoPeG.js → repo-roots-adder-CfQRgYuh.js} +1 -1
- package/dist/client/assets/repo-roots-adder-CfQRgYuh.js.br +0 -0
- package/dist/client/assets/{resume-dialog-jWY_EzSD.js → resume-dialog-5NPB-zCH.js} +1 -1
- package/dist/client/assets/resume-dialog-5NPB-zCH.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BWV_EgOI.js +10 -0
- package/dist/client/assets/review-queue-panel-BWV_EgOI.js.br +0 -0
- package/dist/client/assets/{session-tick-Pvo63zK2.js → session-tick-BVBhKkDl.js} +1 -1
- package/dist/client/assets/session-tick-BVBhKkDl.js.br +0 -0
- package/dist/client/assets/settings-panel-CFW1ehSN.js +4 -0
- package/dist/client/assets/settings-panel-CFW1ehSN.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-YlHonAJa.js → shown-lightbox-jWWR8tM3.js} +1 -1
- package/dist/client/assets/shown-lightbox-jWWR8tM3.js.br +0 -0
- package/dist/client/assets/trace-panel-Du2GCPzg.js +2 -0
- package/dist/client/assets/trace-panel-Du2GCPzg.js.br +0 -0
- package/dist/client/assets/updates-view-core-Z-HI1v-s.js +1 -0
- package/dist/client/assets/updates-view-core-Z-HI1v-s.js.br +0 -0
- package/dist/client/assets/usage-panel-xBlHTKId.js +1 -0
- package/dist/client/assets/usage-panel-xBlHTKId.js.br +0 -0
- package/dist/client/assets/{visions-panel-SBNiN9Os.js → visions-panel-Dkgi70cT.js} +1 -1
- package/dist/client/assets/visions-panel-Dkgi70cT.js.br +0 -0
- package/dist/client/index.html +6 -6
- 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-CC7iuAI1.js +0 -1
- package/dist/client/assets/alert-sound-Deu-O2kQ.js.br +0 -0
- package/dist/client/assets/benchmark-panel-B6pAjrlO.js.br +0 -0
- package/dist/client/assets/card-registry-DTBOn8Bd.js.br +0 -0
- package/dist/client/assets/celebration-player-Cf5DwFjN.js.br +0 -0
- package/dist/client/assets/control-ws-BGxkawWT.js.br +0 -0
- package/dist/client/assets/dialogs-ThZLhht_.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-2H4K5ZBp.js +0 -1
- package/dist/client/assets/doc-editor-ui-2H4K5ZBp.js.br +0 -0
- package/dist/client/assets/first-run-checklist-DQ69ORji.js.br +0 -0
- package/dist/client/assets/hooks-panel-tXOqrUHw.js.br +0 -0
- package/dist/client/assets/index-BNOD_DwY.css +0 -2
- package/dist/client/assets/index-BNOD_DwY.css.br +0 -0
- package/dist/client/assets/index-nxt6LMXr.js +0 -84
- package/dist/client/assets/index-nxt6LMXr.js.br +0 -0
- package/dist/client/assets/issues-panel-DzX5iyjG.js.br +0 -0
- package/dist/client/assets/nyan-cat-D8iLr_Fu.js.br +0 -0
- package/dist/client/assets/phone-shell-BDURyW87.js +0 -1
- package/dist/client/assets/phone-shell-BDURyW87.js.br +0 -0
- package/dist/client/assets/plan-face-CFPT9PGb.js.br +0 -0
- package/dist/client/assets/pr-scope-tabs-CfkDxERy.js.br +0 -0
- package/dist/client/assets/radar-panel-BgGOypoL.js +0 -1
- package/dist/client/assets/radar-panel-BgGOypoL.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-BuUJoPeG.js.br +0 -0
- package/dist/client/assets/resume-dialog-jWY_EzSD.js.br +0 -0
- package/dist/client/assets/review-queue-panel-ubZpHxn9.js +0 -10
- package/dist/client/assets/review-queue-panel-ubZpHxn9.js.br +0 -0
- package/dist/client/assets/session-tick-Pvo63zK2.js.br +0 -0
- package/dist/client/assets/settings-panel-BQ7bYcI0.js +0 -4
- package/dist/client/assets/settings-panel-BQ7bYcI0.js.br +0 -0
- package/dist/client/assets/shown-lightbox-YlHonAJa.js.br +0 -0
- package/dist/client/assets/trace-panel-G-7MhhOz.js +0 -2
- package/dist/client/assets/trace-panel-G-7MhhOz.js.br +0 -0
- package/dist/client/assets/updates-view-core-D49Cb8qb.js +0 -1
- package/dist/client/assets/updates-view-core-D49Cb8qb.js.br +0 -0
- package/dist/client/assets/usage-panel-21GwQKME.js +0 -1
- package/dist/client/assets/usage-panel-21GwQKME.js.br +0 -0
- package/dist/client/assets/visions-panel-SBNiN9Os.js.br +0 -0
|
@@ -3,13 +3,13 @@ import { a as isMissingFileError, i as errorText$1, r as errorMessage, t as erro
|
|
|
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
5
|
import { n as glimmervoidHomeDir, r as isOperatorHomeUnderTest, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
6
|
-
import {
|
|
6
|
+
import { At as TeamReviewThreadCommentsResponse, B as MyPr, Bt as GH_SEGMENT, C as SESSION_DOC_BODY_CAP_BYTES, Ct as ReviewVerdict, D as SHOWN_FILE_CAP_BYTES, Dt as TeamReviewResolveResponse, E as SESSION_NAME_RULE_TEXT, Et as TeamReviewCompareFiles, F as SshSignRequest, H as MyPrCheckContext, Ht as REPO_SLUG_RE, It as hasStandingViewerApproval, J as MyPrMergeRequest, Jt as BADGE_LABELS, K as MyPrLaneEntry, L as TaskTitle, Mt as TeamReviewThreadsRepository, N as ShownFile, Nt as canApproveAfterComment, O as SIGN_URL_ENV, Ot as TeamReviewStateEntry, Pt as decisionAsIfApprovalRequired, Qt as STATES, Rt as HEX_SHA_RE, St as ReviewThreadId, T as SESSION_NAME_PATTERN, U as MyPrCheckContextsResponse, Ut as repoParts, V as MyPrAutoRebase, Vt as NODE_ID_RE, W as MyPrKeepMergeableRequest, X as MyPrMergeStateResponse, Xt as MERGEABLE_LIVE_STATES, Yt as KILLABLE_STATES, Z as MyPrMergeWhenReadyRequest, Zt as RESTARTABLE_STATES, _ as CONVERSATION_PERMISSION_HOOK_EVENT, b as ConversationQuestion, bt as ReviewFinding, ct as CommitSha, dt as FindingSeverity, et as MyPrThreadNode, g as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, gt as PrDetail, h as COHERENCE_HOOKS_INACTIVE, ht as PostingPlan, jt as TeamReviewThreadResult, k as SSH_SIGN_BODY_CAP_BYTES, kt as TeamReviewStatus, lt as DECIDING_REVIEW_STATES, mt as PostedReviewEvent, n as AGENT_URL_ENV, nt as MyPrsSnapshot, pt as GithubReviewState, q as MyPrMergeMethod, r as ASK_USER_QUESTION_TOOL_NAME, rt as MyPrsState, tt as MyPrThreadsResponse, ut as EarlierReview, v as CONVERSATION_TOOL_RESULT_HOOK_EVENT, vt as ReviewComment, wt as TeamReviewActionRequest, xt as ReviewResult, yt as ReviewDraft, z as LinkedPr, zt as shortSha } from "./session-B2Wieg0a.js";
|
|
7
7
|
import { n as execFileAsync, o as spawn, r as execFileSync, t as execFile } from "./child-process-safe-D4hyVIXj.js";
|
|
8
|
-
import { A as BenchmarkRun, At as parseExitPlanModeHookPayload, B as GithubPrsFrame, Ct as PLAN_BODY_CAP_BYTES, D as BenchmarkCase, Dt as PLAN_TOOL_NAME, E as BenchmarkActionRequest, Et as PLAN_RESULT_HOOK_EVENT, F as MinedPrReviewData, Ft as IssueUpdate, G as WorkflowsState, H as WorkflowCommentBody, I as PrCheckoutCaseInput, It as IssuesSearchResponse, L as GithubPrDetailNode, Lt as IssuesState, M as BenchmarkSuite, Mt as GithubIssuePullRequestsRepository, N as CommitComparison, Nt as GithubIssueResponse, O as BenchmarkId, Ot as PlanDecision, P as MergedPrListing, Pt as IssueKey, R as GithubPrKey, Rt as IssuesStatus, St as changeMapFactId, T as pullRequestKeyFromReference, Tt as PLAN_HOOK_OUTPUT_MAX_CHARS, U as WorkflowLabelName, V as comparablePrKey, W as WorkflowsSettings, X as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, _ as CONTROL_FRAME_MAX_BYTES, _t as MAX_RAW_LINE_CHARS, a as ConfigUpdate, bt as CoherenceJournalOutput, ct as USAGE_INTEGER_RANGES, d as USAGE_COST_MODES, f as USAGE_VENDOR_KEYS, g as CLIENT_LOG_TEXT_MAX_CHARS, gt as SessionSetup, ht as UpdateJournal, j as BenchmarkStatus, jt as planTitle, k as BenchmarkJudgement, kt as PlanRevision, l as configIssueMessage, m as CHANGES_POLL_INTERVAL_MS, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, v as ClientMessage, vt as TraceCheckpoint, wt as PLAN_HOOK_EVENT, xt as ChangeMap, yt as TraceRecord, z as GithubPrLightSearchNode, zt as issuePullRequestStateFromGithub } from "./config-
|
|
9
|
-
import { a as permitsHelpCommand, r as describeSessionLimits } from "./session-routes-
|
|
10
|
-
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, H as nextSuggestedName, 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-
|
|
8
|
+
import { A as BenchmarkRun, At as parseExitPlanModeHookPayload, B as GithubPrsFrame, Ct as PLAN_BODY_CAP_BYTES, D as BenchmarkCase, Dt as PLAN_TOOL_NAME, E as BenchmarkActionRequest, Et as PLAN_RESULT_HOOK_EVENT, F as MinedPrReviewData, Ft as IssueUpdate, G as WorkflowsState, H as WorkflowCommentBody, I as PrCheckoutCaseInput, It as IssuesSearchResponse, L as GithubPrDetailNode, Lt as IssuesState, M as BenchmarkSuite, Mt as GithubIssuePullRequestsRepository, N as CommitComparison, Nt as GithubIssueResponse, O as BenchmarkId, Ot as PlanDecision, P as MergedPrListing, Pt as IssueKey, R as GithubPrKey, Rt as IssuesStatus, St as changeMapFactId, T as pullRequestKeyFromReference, Tt as PLAN_HOOK_OUTPUT_MAX_CHARS, U as WorkflowLabelName, V as comparablePrKey, W as WorkflowsSettings, X as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, _ as CONTROL_FRAME_MAX_BYTES, _t as MAX_RAW_LINE_CHARS, a as ConfigUpdate, bt as CoherenceJournalOutput, ct as USAGE_INTEGER_RANGES, d as USAGE_COST_MODES, f as USAGE_VENDOR_KEYS, g as CLIENT_LOG_TEXT_MAX_CHARS, gt as SessionSetup, ht as UpdateJournal, j as BenchmarkStatus, jt as planTitle, k as BenchmarkJudgement, kt as PlanRevision, l as configIssueMessage, m as CHANGES_POLL_INTERVAL_MS, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, v as ClientMessage, vt as TraceCheckpoint, wt as PLAN_HOOK_EVENT, xt as ChangeMap, yt as TraceRecord, z as GithubPrLightSearchNode, zt as issuePullRequestStateFromGithub } from "./config-DCY3jSvU.js";
|
|
9
|
+
import { a as permitsHelpCommand, r as describeSessionLimits } from "./session-routes-Cr9S--Nf.js";
|
|
10
|
+
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, H as nextSuggestedName, 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-BIitz3NO.js";
|
|
11
11
|
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";
|
|
12
|
-
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-
|
|
12
|
+
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-WyrLHANY.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";
|
|
@@ -19,16 +19,16 @@ import { s as saneYoloFiles } from "./rtk-hook-core-B-MpzPin.js";
|
|
|
19
19
|
import { _ as lineStartOffsets, a as projectForUri, b as replacedSpanOfWholeTextChange, c as visionsLaneReloadSignature, d as applyDidOpen, f as createDocStore, g as lineOfOffset, h as getDoc, i as isUriInProjects, l as applyDidChange, m as formatRange, n as applyEditorNotification, o as resolveVisionsScopeProjects, p as detectBlankLineBoundary, r as createEditorState, s as scopePathsOf, t as ACTIVITY_METHOD, u as applyDidClose, v as listDocs, x as uriOfParams, y as offsetOfPosition } from "./ingest-editor-core-B2tycW_m.js";
|
|
20
20
|
import { n as DEFAULT_MAX_MS, r as nextBackoffMs, t as DEFAULT_BASE_MS } from "./backoff-DjVpfHk7.js";
|
|
21
21
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
22
|
-
import { a as readPageTitle, i as filesAfterRetention, n as decideShownKind, o as shownMimeForFilename, r as describeOverCap, t as SHOWN_SNIFF_BYTES } from "./shown-files-core-
|
|
22
|
+
import { a as readPageTitle, i as filesAfterRetention, n as decideShownKind, o as shownMimeForFilename, r as describeOverCap, t as SHOWN_SNIFF_BYTES } from "./shown-files-core-C7ER2sw2.js";
|
|
23
23
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
24
24
|
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-BjFK_eSH.js";
|
|
25
|
-
import { $ as resolveProjectToken, B as buildAiGenerationEvents, G as claudeAccountUuidOf, H as buildExceptionProperties, I as FIRST_RUN_NOTICE, J as decideRemoteTelemetryState, K as codexUserIdOf, L as TELEMETRY_BATCH_URL, Q as parsePosthogReleaseId, R as TELEMETRY_FLAGS_URL, S as validateSettingsBlock, U as buildPersonProperties, V as buildBrowserExceptionProperties, W as classifySessionExit, X as exceptionFingerprint, Y as decideTelemetryConsent, Z as nodeMajorVersion, _ as isRtkBinaryName, a as ensureProjectIds, at as matchedPrefix, b as mergeSettingsBlock, ct as sessionIdFromBranch, dt as canonicalizePath, ft as comparableDirectoryPath, g as installTargetPath, h as findEscapingArchiveMember, i as createConfigStore, it as DEFAULT_BRANCH_GC_PREFIXES, lt as usablePrefixes, m as decideRtkInstall, n as DEFAULT_CONFIG, nt as stableConfigKey, o as generateProjectId, ot as planBranchGc, p as assetForPlatform, pt as isSameDirectoryPath, q as decideIsDevInstall, s as glimmervoidHomeDir$1, st as planWorktreeGc, t as ABORT_CONFIG_SAVE, ut as worktreeIntegrationTips, v as verifyDigest, x as settingsBlockSpecFor, z as adapterBucket } from "./config-store-
|
|
26
|
-
import { a as DEEP_HISTORY_SCROLLBACK_LINES, c as DashboardTelemetryReport, d as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, o as parseDataAttach, p as TelemetryState, r as HTTP_URL_RE, s as parseDataClientMessage, u as PendingCrashReport } from "./build-channel-
|
|
27
|
-
import { A as decideFileRead, B as shouldEvaluateDespiteIoFailures, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as isUsageFile, H as splitLines$1, I as passOutcome, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as grokRootCandidates, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as claudeCode, V as shouldPersistWarehouse, _ 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 dedupeCodexFiles, k as continuationDelayMs, 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 shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-
|
|
25
|
+
import { $ as resolveProjectToken, B as buildAiGenerationEvents, G as claudeAccountUuidOf, H as buildExceptionProperties, I as FIRST_RUN_NOTICE, J as decideRemoteTelemetryState, K as codexUserIdOf, L as TELEMETRY_BATCH_URL, Q as parsePosthogReleaseId, R as TELEMETRY_FLAGS_URL, S as validateSettingsBlock, U as buildPersonProperties, V as buildBrowserExceptionProperties, W as classifySessionExit, X as exceptionFingerprint, Y as decideTelemetryConsent, Z as nodeMajorVersion, _ as isRtkBinaryName, a as ensureProjectIds, at as matchedPrefix, b as mergeSettingsBlock, ct as sessionIdFromBranch, dt as canonicalizePath, ft as comparableDirectoryPath, g as installTargetPath, h as findEscapingArchiveMember, i as createConfigStore, it as DEFAULT_BRANCH_GC_PREFIXES, lt as usablePrefixes, m as decideRtkInstall, n as DEFAULT_CONFIG, nt as stableConfigKey, o as generateProjectId, ot as planBranchGc, p as assetForPlatform, pt as isSameDirectoryPath, q as decideIsDevInstall, s as glimmervoidHomeDir$1, st as planWorktreeGc, t as ABORT_CONFIG_SAVE, ut as worktreeIntegrationTips, v as verifyDigest, x as settingsBlockSpecFor, z as adapterBucket } from "./config-store-4G4l-YqH.js";
|
|
26
|
+
import { a as DEEP_HISTORY_SCROLLBACK_LINES, c as DashboardTelemetryReport, d as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, o as parseDataAttach, p as TelemetryState, r as HTTP_URL_RE, s as parseDataClientMessage, u as PendingCrashReport } from "./build-channel-CwCQx6A3.js";
|
|
27
|
+
import { A as decideFileRead, B as shouldEvaluateDespiteIoFailures, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as isUsageFile, H as splitLines$1, I as passOutcome, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as grokRootCandidates, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as claudeCode, V as shouldPersistWarehouse, _ 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 dedupeCodexFiles, k as continuationDelayMs, 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 shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-DVtQx5Fs.js";
|
|
28
28
|
import { t as HOOK_TOOLS } from "./hook-tools-Dl7-r2Eb.js";
|
|
29
29
|
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";
|
|
30
|
-
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-
|
|
31
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
30
|
+
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-CboQE2_Q.js";
|
|
31
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-DSYFlRYP.js";
|
|
32
32
|
import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
|
|
33
33
|
import { t as getRtkPath } from "./rtk-resolver-C_IReILP.js";
|
|
34
34
|
import { createRequire } from "node:module";
|
|
@@ -1005,7 +1005,7 @@ function buildCommandHookCommand({ relayPath = COMMAND_HOOK_RELAY_PATH, postUrl
|
|
|
1005
1005
|
function buildRemoteCommandHookCommand({ nodePath, postUrl }) {
|
|
1006
1006
|
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)}`;
|
|
1007
1007
|
}
|
|
1008
|
-
function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permissions = null, guardrails = null, detectScheduledWakeups = true, observeToolCalls = false, enableProjectMcp = false, hookTools = [], planLimits = false, planReview = false,
|
|
1008
|
+
function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permissions = null, guardrails = null, detectScheduledWakeups = true, observeToolCalls = false, enableProjectMcp = false, hookTools = [], planLimits = false, planReview = false, holdsQuestionsForParent = false, userSettingsPath = null, relayPath = RELAY_PATH, commandHookRelayPath = COMMAND_HOOK_RELAY_PATH, hookToolRelayPath = HOOK_TOOL_RELAY_PATH, userHooks = [], remoteNodePath = null }) {
|
|
1009
1009
|
if (!port || !glimmervoidId || !token) throw new Error("buildHookSettings requires port, glimmervoidId, token");
|
|
1010
1010
|
const base = `http://127.0.0.1:${port}/hook/${encodeURIComponent(glimmervoidId)}`;
|
|
1011
1011
|
const hookUrl = (event) => `${base}/${event.toLowerCase()}?t=${encodeURIComponent(token)}`;
|
|
@@ -1037,8 +1037,8 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
1037
1037
|
timeout: PLAN_HOOK_TIMEOUT_SEC
|
|
1038
1038
|
}]
|
|
1039
1039
|
});
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1040
|
+
if (holdsQuestionsForParent && permissionRequestEntries) permissionRequestEntries.push({
|
|
1041
|
+
matcher: ASK_USER_QUESTION_TOOL_NAME,
|
|
1042
1042
|
hooks: [{
|
|
1043
1043
|
type: "http",
|
|
1044
1044
|
url: hookUrl(CONVERSATION_PERMISSION_HOOK_EVENT),
|
|
@@ -1065,8 +1065,8 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
1065
1065
|
timeout: timeoutSec
|
|
1066
1066
|
}]
|
|
1067
1067
|
});
|
|
1068
|
-
if (
|
|
1069
|
-
|
|
1068
|
+
if (holdsQuestionsForParent) postToolUse.push({
|
|
1069
|
+
matcher: ASK_USER_QUESTION_TOOL_NAME,
|
|
1070
1070
|
hooks: [{
|
|
1071
1071
|
type: "http",
|
|
1072
1072
|
url: hookUrl(CONVERSATION_TOOL_RESULT_HOOK_EVENT),
|
|
@@ -1107,7 +1107,7 @@ function buildHookSettings({ port, glimmervoidId, token, timeoutSec = 5, permiss
|
|
|
1107
1107
|
};
|
|
1108
1108
|
return settings;
|
|
1109
1109
|
}
|
|
1110
|
-
function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls = false, hookTools = [], planReview = false,
|
|
1110
|
+
function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls = false, hookTools = [], planReview = false, holdsQuestionsForParent = false } = {}) {
|
|
1111
1111
|
const rows = HOOK_EVENTS.map((event) => ({
|
|
1112
1112
|
event,
|
|
1113
1113
|
matcher: null,
|
|
@@ -1133,19 +1133,7 @@ function describeBuiltinHooks({ detectScheduledWakeups = true, observeToolCalls
|
|
|
1133
1133
|
matcher: PLAN_TOOL_MATCHER,
|
|
1134
1134
|
purpose: "Plan review: record the approved plan"
|
|
1135
1135
|
});
|
|
1136
|
-
if (
|
|
1137
|
-
rows.push({
|
|
1138
|
-
event: "PermissionRequest",
|
|
1139
|
-
matcher: null,
|
|
1140
|
-
purpose: "Conversation view: hold a permission prompt so the dashboard can answer it"
|
|
1141
|
-
});
|
|
1142
|
-
rows.push({
|
|
1143
|
-
event: "PostToolUse",
|
|
1144
|
-
matcher: null,
|
|
1145
|
-
purpose: "Conversation view: release a held prompt the terminal answered"
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
if (holdsQuestionsForParent && !conversationApprovals) {
|
|
1136
|
+
if (holdsQuestionsForParent) {
|
|
1149
1137
|
rows.push({
|
|
1150
1138
|
event: "PermissionRequest",
|
|
1151
1139
|
matcher: ASK_USER_QUESTION_TOOL_NAME,
|
|
@@ -2611,9 +2599,6 @@ function projectSessionSnapshots(source) {
|
|
|
2611
2599
|
activeAgents: source.activeAgents,
|
|
2612
2600
|
awaitingBackgroundTasks: source.awaitingBackgroundTasks,
|
|
2613
2601
|
pendingPromptKind: source.pendingPromptKind,
|
|
2614
|
-
conversationApproval: source.conversationApproval ?? null,
|
|
2615
|
-
hasConversationBridge: source.hasConversationBridge === true,
|
|
2616
|
-
isConversationViewOn: source.isConversationViewOn === true,
|
|
2617
2602
|
hasPlan: source.hasPlan,
|
|
2618
2603
|
mergeStatus: source.mergeStatus,
|
|
2619
2604
|
mergeReason: source.mergeReason,
|
|
@@ -4988,7 +4973,7 @@ function createAgentApiWiring({ config, agentSessions, listAllSessions, listBoar
|
|
|
4988
4973
|
};
|
|
4989
4974
|
}
|
|
4990
4975
|
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`);
|
|
4991
|
-
if (!child.answerConversationApproval(approval.requestId,
|
|
4976
|
+
if (!child.answerConversationApproval(approval.requestId, request.answers)) {
|
|
4992
4977
|
const expectedQuestions = (approval.questions ?? []).map((question) => question.question);
|
|
4993
4978
|
return refusal(409, `answers must match the expected question texts: ${JSON.stringify(expectedQuestions)}`);
|
|
4994
4979
|
}
|
|
@@ -6338,8 +6323,6 @@ function decideExitClose(facts) {
|
|
|
6338
6323
|
//#endregion
|
|
6339
6324
|
//#region session/core/claude-approval-core.ts
|
|
6340
6325
|
var MAIN_AGENT_KEY$1 = "";
|
|
6341
|
-
var SESSION_DESTINATION = "session";
|
|
6342
|
-
var DECLINE_MESSAGE = "The operator declined this from the Glimmervoid dashboard.";
|
|
6343
6326
|
var HOLD_KEEPING_HOOK_EVENTS = /* @__PURE__ */ new Set([
|
|
6344
6327
|
"notification",
|
|
6345
6328
|
"permissionrequest",
|
|
@@ -6352,99 +6335,30 @@ var TOOL_RESULT_HOOK_EVENTS = /* @__PURE__ */ new Set([
|
|
|
6352
6335
|
"posttoolusefailure",
|
|
6353
6336
|
CONVERSATION_TOOL_RESULT_HOOK_EVENT
|
|
6354
6337
|
]);
|
|
6355
|
-
var PRIMARY_INPUT_KEYS_BY_TOOL = {
|
|
6356
|
-
Bash: ["command"],
|
|
6357
|
-
Edit: [
|
|
6358
|
-
"file_path",
|
|
6359
|
-
"old_string",
|
|
6360
|
-
"new_string"
|
|
6361
|
-
],
|
|
6362
|
-
Write: ["file_path", "content"],
|
|
6363
|
-
Read: ["file_path"],
|
|
6364
|
-
WebFetch: ["url", "prompt"],
|
|
6365
|
-
WebSearch: ["query"]
|
|
6366
|
-
};
|
|
6367
|
-
var COSMETIC_INPUT_KEYS_BY_TOOL = {
|
|
6368
|
-
Bash: ["description"],
|
|
6369
|
-
Task: ["description"],
|
|
6370
|
-
Agent: ["description"]
|
|
6371
|
-
};
|
|
6372
6338
|
var PermissionRequestPayload = z.object({
|
|
6373
6339
|
tool_name: z.string().min(1).max(200),
|
|
6374
6340
|
tool_input: z.record(z.string(), z.unknown()),
|
|
6375
|
-
permission_suggestions: z.array(z.unknown()).nullish(),
|
|
6376
6341
|
agent_id: z.string().min(1).nullish()
|
|
6377
6342
|
}).passthrough();
|
|
6378
|
-
var AllowRuleSuggestion = z.object({
|
|
6379
|
-
type: z.literal("addRules"),
|
|
6380
|
-
behavior: z.literal("allow"),
|
|
6381
|
-
rules: z.array(z.object({
|
|
6382
|
-
toolName: z.string().min(1),
|
|
6383
|
-
ruleContent: z.string().optional()
|
|
6384
|
-
}).strict()).min(1)
|
|
6385
|
-
}).passthrough();
|
|
6386
|
-
var AddDirectoriesSuggestion = z.object({
|
|
6387
|
-
type: z.literal("addDirectories"),
|
|
6388
|
-
directories: z.array(z.string().min(1)).min(1)
|
|
6389
|
-
}).passthrough();
|
|
6390
6343
|
function agentKeyOf(payload) {
|
|
6391
6344
|
const agentId = payload.agent_id;
|
|
6392
6345
|
return typeof agentId === "string" && agentId.length > 0 ? agentId : MAIN_AGENT_KEY$1;
|
|
6393
6346
|
}
|
|
6394
|
-
function sessionPermissionUpdatesFrom(suggestions) {
|
|
6395
|
-
const updates = [];
|
|
6396
|
-
for (const suggestion of suggestions) {
|
|
6397
|
-
const allowRule = AllowRuleSuggestion.safeParse(suggestion);
|
|
6398
|
-
if (allowRule.success) {
|
|
6399
|
-
updates.push({
|
|
6400
|
-
type: "addRules",
|
|
6401
|
-
behavior: "allow",
|
|
6402
|
-
rules: allowRule.data.rules,
|
|
6403
|
-
destination: SESSION_DESTINATION
|
|
6404
|
-
});
|
|
6405
|
-
continue;
|
|
6406
|
-
}
|
|
6407
|
-
const addDirectories = AddDirectoriesSuggestion.safeParse(suggestion);
|
|
6408
|
-
if (addDirectories.success) updates.push({
|
|
6409
|
-
type: "addDirectories",
|
|
6410
|
-
directories: addDirectories.data.directories,
|
|
6411
|
-
destination: SESSION_DESTINATION
|
|
6412
|
-
});
|
|
6413
|
-
}
|
|
6414
|
-
return updates;
|
|
6415
|
-
}
|
|
6416
6347
|
function parseClaudePermissionRequest(payload) {
|
|
6417
6348
|
const parsed = PermissionRequestPayload.safeParse(payload);
|
|
6418
6349
|
if (!parsed.success) return null;
|
|
6419
|
-
if (parsed.data.tool_name === "ExitPlanMode") return null;
|
|
6420
6350
|
return {
|
|
6421
6351
|
toolName: parsed.data.tool_name,
|
|
6422
6352
|
toolInput: parsed.data.tool_input,
|
|
6423
|
-
agentKey: agentKeyOf(parsed.data)
|
|
6424
|
-
sessionPermissionUpdates: sessionPermissionUpdatesFrom(parsed.data.permission_suggestions ?? [])
|
|
6353
|
+
agentKey: agentKeyOf(parsed.data)
|
|
6425
6354
|
};
|
|
6426
6355
|
}
|
|
6427
6356
|
function inputValueText(value) {
|
|
6428
6357
|
if (typeof value === "string") return value;
|
|
6429
6358
|
return JSON.stringify(value);
|
|
6430
6359
|
}
|
|
6431
|
-
function describeToolInput(
|
|
6432
|
-
|
|
6433
|
-
const cosmeticKeys = COSMETIC_INPUT_KEYS_BY_TOOL[toolName] ?? [];
|
|
6434
|
-
const primaryLines = primaryKeys.filter((key) => toolInput[key] !== void 0).map((key) => primaryKeys.length === 1 ? inputValueText(toolInput[key]) : `${key}:\n${inputValueText(toolInput[key])}`);
|
|
6435
|
-
const otherLines = Object.entries(toolInput).filter(([key]) => !primaryKeys.includes(key) && !cosmeticKeys.includes(key)).map(([key, value]) => `${key}: ${inputValueText(value)}`);
|
|
6436
|
-
return [...primaryLines, ...otherLines].join("\n");
|
|
6437
|
-
}
|
|
6438
|
-
function describeSessionPermissionUpdates(updates) {
|
|
6439
|
-
return updates.map((update) => {
|
|
6440
|
-
if (update.type === "addDirectories") return `Access to ${update.directories.join(", ")}`;
|
|
6441
|
-
return update.rules.map((rule) => rule.ruleContent ? `${rule.toolName}(${rule.ruleContent})` : rule.toolName).join(", ");
|
|
6442
|
-
}).join("; ");
|
|
6443
|
-
}
|
|
6444
|
-
function fullAlwaysAllowSummary(request) {
|
|
6445
|
-
const summary = describeSessionPermissionUpdates(request.sessionPermissionUpdates);
|
|
6446
|
-
if (summary.length === 0 || summary.length > 4e3) return null;
|
|
6447
|
-
return summary;
|
|
6360
|
+
function describeToolInput(toolInput) {
|
|
6361
|
+
return Object.entries(toolInput).map(([key, value]) => `${key}: ${inputValueText(value)}`).join("\n");
|
|
6448
6362
|
}
|
|
6449
6363
|
function boundedSummary(summary) {
|
|
6450
6364
|
const trimmed = summary.trim();
|
|
@@ -6453,35 +6367,22 @@ function boundedSummary(summary) {
|
|
|
6453
6367
|
isSummaryTruncated: trimmed.length > CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS
|
|
6454
6368
|
};
|
|
6455
6369
|
}
|
|
6456
|
-
function
|
|
6370
|
+
function claudeApprovalFor(request, requestId) {
|
|
6457
6371
|
const questions = z.array(ConversationQuestion).min(1).max(4).safeParse(request.toolInput.questions);
|
|
6458
6372
|
if (!questions.success) return {
|
|
6459
6373
|
requestId,
|
|
6460
6374
|
kind: "question",
|
|
6461
|
-
|
|
6462
|
-
...boundedSummary(describeToolInput(request.toolName, request.toolInput)),
|
|
6375
|
+
...boundedSummary(describeToolInput(request.toolInput)),
|
|
6463
6376
|
isSummaryTruncated: true
|
|
6464
6377
|
};
|
|
6465
6378
|
return {
|
|
6466
6379
|
requestId,
|
|
6467
6380
|
kind: "question",
|
|
6468
|
-
toolName: request.toolName,
|
|
6469
6381
|
summary: questions.data[0].question,
|
|
6470
6382
|
isSummaryTruncated: false,
|
|
6471
6383
|
questions: questions.data
|
|
6472
6384
|
};
|
|
6473
6385
|
}
|
|
6474
|
-
function claudeApprovalFor(request, requestId) {
|
|
6475
|
-
if (request.toolName === "AskUserQuestion") return questionApproval(request, requestId);
|
|
6476
|
-
const alwaysAllowSummary = fullAlwaysAllowSummary(request);
|
|
6477
|
-
return {
|
|
6478
|
-
requestId,
|
|
6479
|
-
kind: "tool",
|
|
6480
|
-
toolName: request.toolName,
|
|
6481
|
-
...boundedSummary(describeToolInput(request.toolName, request.toolInput)),
|
|
6482
|
-
...alwaysAllowSummary ? { alwaysAllowSummary } : {}
|
|
6483
|
-
};
|
|
6484
|
-
}
|
|
6485
6386
|
function hookReply(decision) {
|
|
6486
6387
|
return { hookSpecificOutput: {
|
|
6487
6388
|
hookEventName: "PermissionRequest",
|
|
@@ -6494,27 +6395,14 @@ function areAnswersComplete(approval, answers) {
|
|
|
6494
6395
|
if (Object.keys(answers).length !== questionTexts.length) return false;
|
|
6495
6396
|
return questionTexts.every((text) => typeof answers[text] === "string" && answers[text].trim().length > 0);
|
|
6496
6397
|
}
|
|
6497
|
-
function
|
|
6498
|
-
if (
|
|
6499
|
-
behavior: "deny",
|
|
6500
|
-
message: DECLINE_MESSAGE
|
|
6501
|
-
});
|
|
6502
|
-
if (approval.isSummaryTruncated) return null;
|
|
6503
|
-
if (approval.kind === "question") {
|
|
6504
|
-
if (decision !== "accept" || !answers || !areAnswersComplete(approval, answers)) return null;
|
|
6505
|
-
return hookReply({
|
|
6506
|
-
behavior: "allow",
|
|
6507
|
-
updatedInput: {
|
|
6508
|
-
...request.toolInput,
|
|
6509
|
-
answers
|
|
6510
|
-
}
|
|
6511
|
-
});
|
|
6512
|
-
}
|
|
6513
|
-
if (decision === "accept") return hookReply({ behavior: "allow" });
|
|
6514
|
-
if (fullAlwaysAllowSummary(request) === null) return null;
|
|
6398
|
+
function claudeAnswerReply(request, approval, answers) {
|
|
6399
|
+
if (approval.isSummaryTruncated || !areAnswersComplete(approval, answers)) return null;
|
|
6515
6400
|
return hookReply({
|
|
6516
6401
|
behavior: "allow",
|
|
6517
|
-
|
|
6402
|
+
updatedInput: {
|
|
6403
|
+
...request.toolInput,
|
|
6404
|
+
answers
|
|
6405
|
+
}
|
|
6518
6406
|
});
|
|
6519
6407
|
}
|
|
6520
6408
|
function isSameToolCall(request, payload) {
|
|
@@ -6953,13 +6841,6 @@ function createSessionEventWiring(dependencies) {
|
|
|
6953
6841
|
pendingPromptKind = nextKind;
|
|
6954
6842
|
isCompacting = isNowCompacting;
|
|
6955
6843
|
});
|
|
6956
|
-
const relay = (event, type) => session.on(event, (payload) => dependencies.broadcastControl({
|
|
6957
|
-
...payload,
|
|
6958
|
-
type,
|
|
6959
|
-
id: session.id,
|
|
6960
|
-
session: session.name,
|
|
6961
|
-
timestamp: Date.now()
|
|
6962
|
-
}));
|
|
6963
6844
|
session.on("agents-change", (payload) => {
|
|
6964
6845
|
persistWasWorking();
|
|
6965
6846
|
dependencies.telegramChannel.recheck(session.id);
|
|
@@ -6971,7 +6852,6 @@ function createSessionEventWiring(dependencies) {
|
|
|
6971
6852
|
session.on("wakeup-change", persistWasWorking);
|
|
6972
6853
|
session.on("prompt-kind-change", ({ pendingPromptKind: nextKind }) => noteStatus({ pendingPromptKind: nextKind }));
|
|
6973
6854
|
session.on("unseen-outcome-change", ({ unseenOutcome }) => noteStatus({ unseenOutcome }));
|
|
6974
|
-
relay("conversation-change", "session-conversation");
|
|
6975
6855
|
session.on("merge-status", ({ mergeStatus, reason, parked }) => {
|
|
6976
6856
|
dependencies.broadcastControl({
|
|
6977
6857
|
type: "session-merge-status",
|
|
@@ -14531,78 +14411,6 @@ function traceRecordsForItemEvent(event) {
|
|
|
14531
14411
|
startedItemIds
|
|
14532
14412
|
};
|
|
14533
14413
|
}
|
|
14534
|
-
var requestedPermissionScope = z.object({
|
|
14535
|
-
network: z.object({ enabled: z.boolean().nullable() }).strict().nullable(),
|
|
14536
|
-
fileSystem: z.record(z.string(), z.union([z.string(), z.array(z.string())]).nullable()).nullable()
|
|
14537
|
-
}).passthrough();
|
|
14538
|
-
var approvalParams = z.object({
|
|
14539
|
-
threadId: z.string().min(1),
|
|
14540
|
-
command: z.string().nullish(),
|
|
14541
|
-
reason: z.string().nullish(),
|
|
14542
|
-
grantRoot: z.string().nullish(),
|
|
14543
|
-
changes: z.array(z.object({ path: z.string() }).passthrough()).optional(),
|
|
14544
|
-
permissions: z.unknown().optional()
|
|
14545
|
-
}).passthrough();
|
|
14546
|
-
function describeFileChangeApproval(approval) {
|
|
14547
|
-
const changedPaths = approval.changes?.map((change) => change.path).join(", ");
|
|
14548
|
-
return {
|
|
14549
|
-
summary: [approval.grantRoot ? `Write access to ${approval.grantRoot}` : "", changedPaths || approval.reason || ""].filter((part) => part.length > 0).join(". ") || "File change approval",
|
|
14550
|
-
isScopeUnrenderable: false
|
|
14551
|
-
};
|
|
14552
|
-
}
|
|
14553
|
-
function describePermissionsApproval(approval) {
|
|
14554
|
-
const reason = approval.reason ?? "Permissions approval";
|
|
14555
|
-
const parsedScope = requestedPermissionScope.safeParse(approval.permissions);
|
|
14556
|
-
if (!parsedScope.success) return {
|
|
14557
|
-
summary: reason,
|
|
14558
|
-
isScopeUnrenderable: true
|
|
14559
|
-
};
|
|
14560
|
-
const { network, fileSystem } = parsedScope.data;
|
|
14561
|
-
const scopeParts = [];
|
|
14562
|
-
if (network?.enabled === true) scopeParts.push("Network access");
|
|
14563
|
-
for (const [accessKind, paths] of Object.entries(fileSystem ?? {})) {
|
|
14564
|
-
if (paths === null) continue;
|
|
14565
|
-
const pathList = typeof paths === "string" ? paths : paths.join(", ");
|
|
14566
|
-
if (pathList.length > 0) scopeParts.push(`File system ${accessKind}: ${pathList}`);
|
|
14567
|
-
}
|
|
14568
|
-
return {
|
|
14569
|
-
summary: [...scopeParts, reason].join(". "),
|
|
14570
|
-
isScopeUnrenderable: false
|
|
14571
|
-
};
|
|
14572
|
-
}
|
|
14573
|
-
function describeApproval(method, approval) {
|
|
14574
|
-
switch (method) {
|
|
14575
|
-
case "item/commandExecution/requestApproval": return {
|
|
14576
|
-
kind: "command",
|
|
14577
|
-
summary: approval.command ?? approval.reason ?? "Command approval",
|
|
14578
|
-
isScopeUnrenderable: false
|
|
14579
|
-
};
|
|
14580
|
-
case "item/fileChange/requestApproval": return {
|
|
14581
|
-
kind: "fileChange",
|
|
14582
|
-
...describeFileChangeApproval(approval)
|
|
14583
|
-
};
|
|
14584
|
-
case "item/permissions/requestApproval": return {
|
|
14585
|
-
kind: "permissions",
|
|
14586
|
-
...describePermissionsApproval(approval)
|
|
14587
|
-
};
|
|
14588
|
-
default: return null;
|
|
14589
|
-
}
|
|
14590
|
-
}
|
|
14591
|
-
function pendingApprovalFromServerRequest(method, params, requestId) {
|
|
14592
|
-
const parsedParams = approvalParams.safeParse(params);
|
|
14593
|
-
if (!parsedParams.success) return null;
|
|
14594
|
-
const approval = parsedParams.data;
|
|
14595
|
-
const description = describeApproval(method, approval);
|
|
14596
|
-
if (!description) return null;
|
|
14597
|
-
const fullSummary = description.summary.trim();
|
|
14598
|
-
return {
|
|
14599
|
-
requestId,
|
|
14600
|
-
kind: description.kind,
|
|
14601
|
-
summary: fullSummary.slice(0, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS),
|
|
14602
|
-
isSummaryTruncated: description.isScopeUnrenderable || fullSummary.length > 4e3,
|
|
14603
|
-
threadId: approval.threadId
|
|
14604
|
-
};
|
|
14605
|
-
}
|
|
14606
14414
|
function isFollowableThread(thread) {
|
|
14607
14415
|
return z.object({
|
|
14608
14416
|
id: z.string().trim().min(1),
|
|
@@ -14667,10 +14475,6 @@ var itemIdentity = z.object({
|
|
|
14667
14475
|
id: z.string().min(1),
|
|
14668
14476
|
status: z.string().optional()
|
|
14669
14477
|
}).passthrough();
|
|
14670
|
-
var requestedPermissions = z.object({ permissions: z.object({
|
|
14671
|
-
network: z.object({ enabled: z.boolean().nullable() }).passthrough().nullable(),
|
|
14672
|
-
fileSystem: z.record(z.string(), z.unknown()).nullable()
|
|
14673
|
-
}).passthrough() }).passthrough();
|
|
14674
14478
|
var JOIN_RETRY_WINDOW_MS = 15e3;
|
|
14675
14479
|
function toError(failure) {
|
|
14676
14480
|
if (failure instanceof Error) return failure;
|
|
@@ -14728,8 +14532,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14728
14532
|
let isStopped = false;
|
|
14729
14533
|
let hasExited = false;
|
|
14730
14534
|
let stopPromise = null;
|
|
14731
|
-
let activeApproval = null;
|
|
14732
|
-
let approvalPermissions = null;
|
|
14733
14535
|
let nextRequestId = 1;
|
|
14734
14536
|
let followedThreadId = null;
|
|
14735
14537
|
let hasJoined = false;
|
|
@@ -14748,8 +14550,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14748
14550
|
const bridge = Object.assign(new EventEmitter(), {
|
|
14749
14551
|
url: "",
|
|
14750
14552
|
token,
|
|
14751
|
-
answerApproval,
|
|
14752
|
-
pendingApproval: () => activeApproval,
|
|
14753
14553
|
stop
|
|
14754
14554
|
});
|
|
14755
14555
|
bridge.on("error", (failure) => logger.warn("Codex app-server bridge:", failure.message));
|
|
@@ -14769,12 +14569,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14769
14569
|
reportError(failure);
|
|
14770
14570
|
}
|
|
14771
14571
|
}
|
|
14772
|
-
function clearApproval() {
|
|
14773
|
-
if (!activeApproval) return;
|
|
14774
|
-
activeApproval = null;
|
|
14775
|
-
approvalPermissions = null;
|
|
14776
|
-
bridge.emit("approval", null);
|
|
14777
|
-
}
|
|
14778
14572
|
function failStartup(error) {
|
|
14779
14573
|
if (!isStarting) return;
|
|
14780
14574
|
isStarting = false;
|
|
@@ -14798,7 +14592,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14798
14592
|
cancelRequests();
|
|
14799
14593
|
stopPromise = Promise.resolve().then(async () => {
|
|
14800
14594
|
try {
|
|
14801
|
-
guard(clearApproval);
|
|
14802
14595
|
if (socket) guard(() => socket?.close());
|
|
14803
14596
|
if (hasExited) return;
|
|
14804
14597
|
child.kill("SIGTERM");
|
|
@@ -14851,37 +14644,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14851
14644
|
}
|
|
14852
14645
|
});
|
|
14853
14646
|
}
|
|
14854
|
-
function answerApproval(requestId, decision) {
|
|
14855
|
-
if (!activeApproval || activeApproval.requestId !== requestId || isStopped || socket?.readyState !== WebSocket$1.OPEN) return false;
|
|
14856
|
-
try {
|
|
14857
|
-
if (activeApproval.kind === "permissions") {
|
|
14858
|
-
if (!approvalPermissions) return false;
|
|
14859
|
-
send({
|
|
14860
|
-
jsonrpc: "2.0",
|
|
14861
|
-
id: requestId,
|
|
14862
|
-
result: {
|
|
14863
|
-
permissions: decision === "decline" ? {} : {
|
|
14864
|
-
...approvalPermissions.network ? { network: approvalPermissions.network } : {},
|
|
14865
|
-
...approvalPermissions.fileSystem ? { fileSystem: approvalPermissions.fileSystem } : {}
|
|
14866
|
-
},
|
|
14867
|
-
scope: decision === "acceptForSession" ? "session" : "turn"
|
|
14868
|
-
}
|
|
14869
|
-
});
|
|
14870
|
-
clearApproval();
|
|
14871
|
-
return true;
|
|
14872
|
-
}
|
|
14873
|
-
send({
|
|
14874
|
-
jsonrpc: "2.0",
|
|
14875
|
-
id: requestId,
|
|
14876
|
-
result: { decision }
|
|
14877
|
-
});
|
|
14878
|
-
clearApproval();
|
|
14879
|
-
return true;
|
|
14880
|
-
} catch (failure) {
|
|
14881
|
-
reportError(failure);
|
|
14882
|
-
return false;
|
|
14883
|
-
}
|
|
14884
|
-
}
|
|
14885
14647
|
function recordsForItem(phase, item, threadId, turnId) {
|
|
14886
14648
|
const parsedIdentity = itemIdentity.safeParse(item);
|
|
14887
14649
|
if (!parsedIdentity.success) return [];
|
|
@@ -14951,7 +14713,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14951
14713
|
if (!parsedThread.success || !isFollowableThread(thread) || followedThreadId === parsedThread.data.id) return;
|
|
14952
14714
|
clearTimeout(retryTimer);
|
|
14953
14715
|
retryTimer = void 0;
|
|
14954
|
-
clearApproval();
|
|
14955
14716
|
followedThreadId = parsedThread.data.id;
|
|
14956
14717
|
joinGeneration++;
|
|
14957
14718
|
hasJoined = false;
|
|
@@ -14993,11 +14754,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
14993
14754
|
joinDeadlineMs = Math.max(joinDeadlineMs, now() + JOIN_RETRY_WINDOW_MS);
|
|
14994
14755
|
scheduleJoin();
|
|
14995
14756
|
}
|
|
14996
|
-
if (method === "turn/completed") clearApproval();
|
|
14997
|
-
if (method === "serverRequest/resolved") {
|
|
14998
|
-
const resolvedRequest = notificationParams.extend({ requestId: requestIdSchema }).safeParse(params);
|
|
14999
|
-
if (resolvedRequest.success && resolvedRequest.data.requestId === activeApproval?.requestId) clearApproval();
|
|
15000
|
-
}
|
|
15001
14757
|
if (method !== "item/started" && method !== "item/completed") return;
|
|
15002
14758
|
const parsedItem = itemNotification.safeParse(params);
|
|
15003
14759
|
if (!parsedItem.success) return;
|
|
@@ -15014,16 +14770,7 @@ async function startCodexAppServerBridge(options) {
|
|
|
15014
14770
|
answerTokenRefresh(message.id);
|
|
15015
14771
|
return;
|
|
15016
14772
|
}
|
|
15017
|
-
if (message.method && message.id !== void 0)
|
|
15018
|
-
const approval = pendingApprovalFromServerRequest(message.method, message.params, message.id);
|
|
15019
|
-
if (!approval || approval.threadId !== followedThreadId) return;
|
|
15020
|
-
const permissions = requestedPermissions.safeParse(message.params);
|
|
15021
|
-
if (approval.kind === "permissions" && !permissions.success) return;
|
|
15022
|
-
activeApproval = approval;
|
|
15023
|
-
approvalPermissions = permissions.success ? permissions.data.permissions : null;
|
|
15024
|
-
bridge.emit("approval", approval);
|
|
15025
|
-
return;
|
|
15026
|
-
}
|
|
14773
|
+
if (message.method && message.id !== void 0) return;
|
|
15027
14774
|
if (message.method) {
|
|
15028
14775
|
handleNotification(message.method, message.params);
|
|
15029
14776
|
return;
|
|
@@ -15097,7 +14844,6 @@ async function startCodexAppServerBridge(options) {
|
|
|
15097
14844
|
socket.on("error", (failure) => guard(() => reportError(failure)));
|
|
15098
14845
|
socket.on("message", (frame, isBinary) => guard(() => handleMessage(frame, isBinary)));
|
|
15099
14846
|
socket.on("close", () => guard(() => {
|
|
15100
|
-
clearApproval();
|
|
15101
14847
|
cancelRequests();
|
|
15102
14848
|
if (isStarting) failStartup(/* @__PURE__ */ new Error("Codex app-server socket closed during startup"));
|
|
15103
14849
|
stop().catch(reportError);
|
|
@@ -15230,13 +14976,9 @@ async function startCoderPortForward({ workspace, remotePort, readyTimeoutMs = 3
|
|
|
15230
14976
|
var CODEX_REMOTE_TOKEN_ENV = "GLIMMERVOID_CODEX_REMOTE_TOKEN";
|
|
15231
14977
|
var CONFIG_FLAG = "-c";
|
|
15232
14978
|
var APP_SERVER_REFUSED_FLAGS = /* @__PURE__ */ new Set(["--dangerously-bypass-hook-trust"]);
|
|
15233
|
-
function
|
|
15234
|
-
return [...settingsArgs, ...agentArgs].some((launchArg) => APP_SERVER_REFUSED_FLAGS.has(launchArg));
|
|
15235
|
-
}
|
|
15236
|
-
function splitCodexRemoteLaunch(settingsArgs, agentArgs) {
|
|
14979
|
+
function splitCodexRemoteLaunch(launchArgs) {
|
|
15237
14980
|
const appServerConfigArgs = [];
|
|
15238
14981
|
const tuiArgs = [];
|
|
15239
|
-
const launchArgs = [...settingsArgs, ...agentArgs];
|
|
15240
14982
|
for (let index = 0; index < launchArgs.length; index += 1) {
|
|
15241
14983
|
const launchArg = launchArgs[index];
|
|
15242
14984
|
if (APP_SERVER_REFUSED_FLAGS.has(launchArg)) continue;
|
|
@@ -16864,7 +16606,6 @@ function createSessionHookLifecycle(options) {
|
|
|
16864
16606
|
hookTools: options.hookTools,
|
|
16865
16607
|
planLimits: options.planLimits,
|
|
16866
16608
|
planReview: options.planReview,
|
|
16867
|
-
conversationApprovals: options.conversationApprovals(),
|
|
16868
16609
|
holdsQuestionsForParent: options.holdsQuestionsForParent,
|
|
16869
16610
|
userHooks: [...typeof options.getUserHooks === "function" ? options.getUserHooks() : [], ...glimmervoidSuppliedHooks()]
|
|
16870
16611
|
});
|
|
@@ -19438,7 +19179,6 @@ var Session = class extends EventEmitter {
|
|
|
19438
19179
|
bypassHookTrust;
|
|
19439
19180
|
isMarkedUnguarded;
|
|
19440
19181
|
isGuardrailsReleased;
|
|
19441
|
-
_isConversationViewEnabled;
|
|
19442
19182
|
_holdsQuestionsForParent;
|
|
19443
19183
|
_startCodexBridge;
|
|
19444
19184
|
_codexBridge;
|
|
@@ -19513,7 +19253,7 @@ var Session = class extends EventEmitter {
|
|
|
19513
19253
|
_resizeSeq;
|
|
19514
19254
|
_titleSource;
|
|
19515
19255
|
_statusSource;
|
|
19516
|
-
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,
|
|
19256
|
+
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, 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 }) {
|
|
19517
19257
|
super();
|
|
19518
19258
|
this.id = id;
|
|
19519
19259
|
this.ownerId = ownerId;
|
|
@@ -19586,8 +19326,6 @@ var Session = class extends EventEmitter {
|
|
|
19586
19326
|
this.bypassHookTrust = bypassHookTrust === true;
|
|
19587
19327
|
this.isMarkedUnguarded = isMarkedUnguarded === true;
|
|
19588
19328
|
this.isGuardrailsReleased = isGuardrailsReleased === true;
|
|
19589
|
-
const isConversationViewConfigured = isConversationViewEnabled ?? (() => false);
|
|
19590
|
-
this._isConversationViewEnabled = () => isConversationViewConfigured() && !this.isConversationBridgeRefused();
|
|
19591
19329
|
this._holdsQuestionsForParent = holdsQuestionsForParent;
|
|
19592
19330
|
this._startCodexBridge = startCodexBridge;
|
|
19593
19331
|
this._codexBridge = null;
|
|
@@ -19657,7 +19395,6 @@ var Session = class extends EventEmitter {
|
|
|
19657
19395
|
hookTools: this._hookTools,
|
|
19658
19396
|
planLimits: this._planLimits,
|
|
19659
19397
|
planReview: planReviewPort !== null,
|
|
19660
|
-
conversationApprovals: () => this.agentId === "claude-code" && (isConversationViewSettingOn ?? isConversationViewConfigured)(),
|
|
19661
19398
|
holdsQuestionsForParent: this._holdsQuestionsForParent,
|
|
19662
19399
|
getUserHooks,
|
|
19663
19400
|
extraUserHooks,
|
|
@@ -20373,9 +20110,6 @@ var Session = class extends EventEmitter {
|
|
|
20373
20110
|
activeAgents: active,
|
|
20374
20111
|
awaitingBackgroundTasks: this.backgroundTracking.awaitingBackgroundTasks(),
|
|
20375
20112
|
pendingPromptKind: this._pendingPromptKind,
|
|
20376
|
-
conversationApproval: this._conversationApproval,
|
|
20377
|
-
hasConversationBridge: this._codexBridge !== null,
|
|
20378
|
-
isConversationViewOn: this._isConversationViewEnabled(),
|
|
20379
20113
|
hasPlan: this._planReviewPort?.hasPlan(this.id) === true,
|
|
20380
20114
|
mergeStatus: this.mergeStatus,
|
|
20381
20115
|
mergeReason: this.mergeReason,
|
|
@@ -20581,11 +20315,11 @@ var Session = class extends EventEmitter {
|
|
|
20581
20315
|
canRunHelpCommand: this._canRunHelpCommand,
|
|
20582
20316
|
canSpawn: !this.ephemeral
|
|
20583
20317
|
});
|
|
20584
|
-
const bridgedLaunch = isRemoteCodex && remoteLaunch !== null ? await this._startRemoteCodexBridge(remoteLaunch, agentArgs, env) :
|
|
20318
|
+
const bridgedLaunch = isRemoteCodex && remoteLaunch !== null ? await this._startRemoteCodexBridge(remoteLaunch, agentArgs, env) : null;
|
|
20585
20319
|
if (isRemoteCodex && !bridgedLaunch) return;
|
|
20586
20320
|
if (isStartSuperseded()) {
|
|
20587
20321
|
this._hooks.cleanup();
|
|
20588
|
-
await this.
|
|
20322
|
+
await this._stopCodexBridge();
|
|
20589
20323
|
return;
|
|
20590
20324
|
}
|
|
20591
20325
|
const spawnCommand = await this._spawnCommandFor({
|
|
@@ -20597,13 +20331,13 @@ var Session = class extends EventEmitter {
|
|
|
20597
20331
|
agentSessionId: launchSession?.agentSessionId ?? null
|
|
20598
20332
|
});
|
|
20599
20333
|
if (!spawnCommand) {
|
|
20600
|
-
await this.
|
|
20334
|
+
await this._stopCodexBridge();
|
|
20601
20335
|
return;
|
|
20602
20336
|
}
|
|
20603
20337
|
if (isStartSuperseded()) {
|
|
20604
20338
|
this._hooks.cleanup();
|
|
20605
20339
|
this._disposeGuardrailsLaunch(this._guardrailsLaunch);
|
|
20606
|
-
await this.
|
|
20340
|
+
await this._stopCodexBridge();
|
|
20607
20341
|
return;
|
|
20608
20342
|
}
|
|
20609
20343
|
if (bridgedLaunch) env[CODEX_REMOTE_TOKEN_ENV] = bridgedLaunch.token;
|
|
@@ -20652,47 +20386,10 @@ var Session = class extends EventEmitter {
|
|
|
20652
20386
|
get isGuarded() {
|
|
20653
20387
|
return this._prepareGuardrails !== null && this._getRemoteLaunch() === null;
|
|
20654
20388
|
}
|
|
20655
|
-
|
|
20656
|
-
if (this.agentId !== "codex") return false;
|
|
20657
|
-
return this._prepareGuardrails !== null || this.bypassHookTrust || needsAppServerRefusedFlag(settingsArgs, agentArgs);
|
|
20658
|
-
}
|
|
20659
|
-
async _startConversationBridge(settingsArgs, agentArgs, env) {
|
|
20660
|
-
await this._stopConversationBridge();
|
|
20661
|
-
if (this.agentId !== "codex" || !this._isConversationViewEnabled()) return null;
|
|
20662
|
-
if (this.isConversationBridgeRefused(settingsArgs, agentArgs)) return null;
|
|
20663
|
-
const launch = splitCodexRemoteLaunch(settingsArgs, agentArgs);
|
|
20664
|
-
const prefix = this._adapter.buildSpawnCommand({
|
|
20665
|
-
platform: this._platform,
|
|
20666
|
-
resolved: this._spawnCommand || commandFor(this._adapter),
|
|
20667
|
-
settingsArgs: [],
|
|
20668
|
-
agentArgs: []
|
|
20669
|
-
});
|
|
20670
|
-
try {
|
|
20671
|
-
const bridge = await this._startCodexBridge({
|
|
20672
|
-
command: {
|
|
20673
|
-
file: prefix.file,
|
|
20674
|
-
argsBeforeAppServer: prefix.args
|
|
20675
|
-
},
|
|
20676
|
-
configArgs: launch.appServerConfigArgs,
|
|
20677
|
-
cwd: this.effectiveCwd(),
|
|
20678
|
-
env: { ...env },
|
|
20679
|
-
tokenParentDirectory: os.tmpdir()
|
|
20680
|
-
});
|
|
20681
|
-
this._attachCodexBridge(bridge);
|
|
20682
|
-
return {
|
|
20683
|
-
tuiArgs: remoteTuiArgs(bridge.url, launch.tuiArgs),
|
|
20684
|
-
token: bridge.token
|
|
20685
|
-
};
|
|
20686
|
-
} catch (error) {
|
|
20687
|
-
console.warn(`[session:${this.name}] codex app-server bridge unavailable, using the plain terminal: ${errorMessage(error)}`);
|
|
20688
|
-
return null;
|
|
20689
|
-
}
|
|
20690
|
-
}
|
|
20691
|
-
async _stopConversationBridge() {
|
|
20389
|
+
async _stopCodexBridge() {
|
|
20692
20390
|
const bridge = this._codexBridge;
|
|
20693
20391
|
if (!bridge) return;
|
|
20694
20392
|
this._codexBridge = null;
|
|
20695
|
-
this._setConversationApproval(null);
|
|
20696
20393
|
await bridge.stop().catch((error) => console.warn(`[session:${this.name}] codex app-server stop failed: ${errorMessage(error)}`));
|
|
20697
20394
|
}
|
|
20698
20395
|
_setConversationApproval(approval) {
|
|
@@ -20700,20 +20397,13 @@ var Session = class extends EventEmitter {
|
|
|
20700
20397
|
this._emitConversationChange();
|
|
20701
20398
|
}
|
|
20702
20399
|
_emitConversationChange() {
|
|
20703
|
-
this.emit("conversation-change", {
|
|
20704
|
-
hasConversationBridge: this._codexBridge !== null,
|
|
20705
|
-
isConversationViewOn: this._isConversationViewEnabled(),
|
|
20706
|
-
conversationApproval: this._conversationApproval
|
|
20707
|
-
});
|
|
20708
|
-
}
|
|
20709
|
-
announceConversationView() {
|
|
20710
|
-
this._emitConversationChange();
|
|
20400
|
+
this.emit("conversation-change", { conversationApproval: this._conversationApproval });
|
|
20711
20401
|
}
|
|
20712
20402
|
holdClaudePermission(payload, abandoned) {
|
|
20713
20403
|
if (this.agentId !== "claude-code") return null;
|
|
20714
20404
|
const request = parseClaudePermissionRequest(payload);
|
|
20715
20405
|
if (!request) return null;
|
|
20716
|
-
if (!this.
|
|
20406
|
+
if (!this._holdsQuestionsForParent || request.toolName !== "AskUserQuestion") return null;
|
|
20717
20407
|
this._releaseClaudeHolds((hold) => hold.request.agentKey === request.agentKey);
|
|
20718
20408
|
const requestId = `claude-${this._nextClaudeApprovalNumber}`;
|
|
20719
20409
|
this._nextClaudeApprovalNumber += 1;
|
|
@@ -20742,10 +20432,10 @@ var Session = class extends EventEmitter {
|
|
|
20742
20432
|
_showFirstClaudeApproval() {
|
|
20743
20433
|
this._setConversationApproval(this._claudeApprovalHolds[0]?.approval ?? null);
|
|
20744
20434
|
}
|
|
20745
|
-
|
|
20435
|
+
answerConversationApproval(requestId, answers) {
|
|
20746
20436
|
const hold = this._claudeApprovalHolds.find((candidate) => candidate.approval.requestId === requestId);
|
|
20747
20437
|
if (!hold) return false;
|
|
20748
|
-
const reply =
|
|
20438
|
+
const reply = claudeAnswerReply(hold.request, hold.approval, answers);
|
|
20749
20439
|
if (!reply) return false;
|
|
20750
20440
|
this._claudeApprovalHolds = this._claudeApprovalHolds.filter((candidate) => candidate !== hold);
|
|
20751
20441
|
hold.resolve(reply);
|
|
@@ -20753,23 +20443,16 @@ var Session = class extends EventEmitter {
|
|
|
20753
20443
|
return true;
|
|
20754
20444
|
}
|
|
20755
20445
|
releaseQuestionHold(requestId) {
|
|
20756
|
-
const hold = this._claudeApprovalHolds.find((candidate) => candidate.approval.requestId === requestId
|
|
20446
|
+
const hold = this._claudeApprovalHolds.find((candidate) => candidate.approval.requestId === requestId);
|
|
20757
20447
|
if (!hold) return false;
|
|
20758
20448
|
this._releaseClaudeHolds((candidate) => candidate === hold);
|
|
20759
20449
|
return true;
|
|
20760
20450
|
}
|
|
20761
|
-
answerConversationApproval(requestId, decision, answers) {
|
|
20762
|
-
if (this.agentId === "claude-code") return this._answerClaudeApproval(requestId, decision, answers);
|
|
20763
|
-
const bridge = this._codexBridge;
|
|
20764
|
-
if (!bridge || this._conversationApproval?.requestId !== requestId) return false;
|
|
20765
|
-
if (this._conversationApproval.isSummaryTruncated && decision !== "decline") return false;
|
|
20766
|
-
return bridge.answerApproval(requestId, decision);
|
|
20767
|
-
}
|
|
20768
20451
|
_abandonSpawn(cause) {
|
|
20769
20452
|
this._isSaneYoloActive = false;
|
|
20770
20453
|
this._hooks.cleanup();
|
|
20771
20454
|
this._disposeGuardrailsLaunch(this._guardrailsLaunch);
|
|
20772
|
-
this.
|
|
20455
|
+
this._stopCodexBridge();
|
|
20773
20456
|
this._releaseClaudeHolds(() => true);
|
|
20774
20457
|
this.transition("spawn_fail", { error: errorMessage(cause) });
|
|
20775
20458
|
this.emit("error", cause);
|
|
@@ -20799,14 +20482,14 @@ var Session = class extends EventEmitter {
|
|
|
20799
20482
|
return this._guardedSpawnCommand(command, agentSessionId);
|
|
20800
20483
|
}
|
|
20801
20484
|
async _startRemoteCodexBridge(remote, agentArgs, env) {
|
|
20802
|
-
await this.
|
|
20485
|
+
await this._stopCodexBridge();
|
|
20803
20486
|
const prepared = await this._prepareRemoteCodexBridge(remote, agentArgs, env).catch((error) => ({
|
|
20804
20487
|
ok: false,
|
|
20805
20488
|
reason: errorMessage(error)
|
|
20806
20489
|
}));
|
|
20807
20490
|
if (this._destroyed) {
|
|
20808
20491
|
this._hooks.cleanup();
|
|
20809
|
-
await this.
|
|
20492
|
+
await this._stopCodexBridge();
|
|
20810
20493
|
return null;
|
|
20811
20494
|
}
|
|
20812
20495
|
if (!prepared.ok) {
|
|
@@ -20823,7 +20506,7 @@ var Session = class extends EventEmitter {
|
|
|
20823
20506
|
ok: false,
|
|
20824
20507
|
reason: "the host codex version could not be read, so the workspace cannot install a matching codex"
|
|
20825
20508
|
};
|
|
20826
|
-
const launch = splitCodexRemoteLaunch(
|
|
20509
|
+
const launch = splitCodexRemoteLaunch(agentArgs);
|
|
20827
20510
|
const bridge = await this._startCodexBridge({
|
|
20828
20511
|
command: {
|
|
20829
20512
|
file: "coder",
|
|
@@ -20871,21 +20554,11 @@ var Session = class extends EventEmitter {
|
|
|
20871
20554
|
_attachCodexBridge(bridge) {
|
|
20872
20555
|
this._codexBridge = bridge;
|
|
20873
20556
|
bridge.on("records", (records) => this.emit("conversation-records", { records }));
|
|
20874
|
-
bridge.on("approval", (approval) => {
|
|
20875
|
-
this._setConversationApproval(approval ? {
|
|
20876
|
-
requestId: approval.requestId,
|
|
20877
|
-
kind: approval.kind,
|
|
20878
|
-
summary: approval.summary,
|
|
20879
|
-
isSummaryTruncated: approval.isSummaryTruncated
|
|
20880
|
-
} : null);
|
|
20881
|
-
});
|
|
20882
20557
|
bridge.on("error", (error) => console.warn(`[session:${this.name}] codex app-server bridge: ${errorMessage(error)}`));
|
|
20883
20558
|
bridge.on("exit", () => {
|
|
20884
20559
|
if (this._codexBridge !== bridge) return;
|
|
20885
20560
|
this._codexBridge = null;
|
|
20886
|
-
this._setConversationApproval(null);
|
|
20887
20561
|
});
|
|
20888
|
-
this._emitConversationChange();
|
|
20889
20562
|
}
|
|
20890
20563
|
async _remoteSpawnCommand(remote, agentArgs) {
|
|
20891
20564
|
const prepared = await this._prepareRemoteSpawn(remote, agentArgs).catch((error) => ({
|
|
@@ -21089,7 +20762,7 @@ var Session = class extends EventEmitter {
|
|
|
21089
20762
|
}
|
|
21090
20763
|
_handleSpawnedPtyExit(guardrailsLaunch, exitCode, signal) {
|
|
21091
20764
|
this._disposeGuardrailsLaunch(guardrailsLaunch);
|
|
21092
|
-
this.
|
|
20765
|
+
this._stopCodexBridge();
|
|
21093
20766
|
this._releaseClaudeHolds(() => true);
|
|
21094
20767
|
return this._handlePtyExit(exitCode, signal);
|
|
21095
20768
|
}
|
|
@@ -21399,7 +21072,7 @@ var Session = class extends EventEmitter {
|
|
|
21399
21072
|
this._clearPendingPaste();
|
|
21400
21073
|
this._hooks.cleanup();
|
|
21401
21074
|
this._disposeGuardrailsLaunch(this._guardrailsLaunch);
|
|
21402
|
-
this.
|
|
21075
|
+
this._stopCodexBridge();
|
|
21403
21076
|
this._releaseClaudeHolds(() => true);
|
|
21404
21077
|
this.kill();
|
|
21405
21078
|
this._clearTimer("_killPollTimer");
|
|
@@ -49991,10 +49664,6 @@ function createRecorder(sessionName, captureConfig, recordSignals = true) {
|
|
|
49991
49664
|
}
|
|
49992
49665
|
//#endregion
|
|
49993
49666
|
//#region server/session/session-factory.ts
|
|
49994
|
-
function isConversationViewOnFor(config, projectId) {
|
|
49995
|
-
if (config.conversationView !== true) return false;
|
|
49996
|
-
return config.projects.some((project) => project.id === projectId && project.conversationView === true);
|
|
49997
|
-
}
|
|
49998
49667
|
function willSessionRunGuarded(project, config, homeDir) {
|
|
49999
49668
|
const unguardedRepos = (config.guardrails?.unguardedRepos ?? []).map((repo) => expandTilde(repo, process.env, homeDir));
|
|
50000
49669
|
return isSessionGuarded({
|
|
@@ -50101,8 +49770,6 @@ function createSessionFactory(dependencies) {
|
|
|
50101
49770
|
bypassHookTrust: project.codexBypassHookTrust === true,
|
|
50102
49771
|
isMarkedUnguarded: project.unguarded === true,
|
|
50103
49772
|
isGuardrailsReleased: isReleasedOnlyByMark(project, config, overrides),
|
|
50104
|
-
isConversationViewEnabled: () => isConversationViewOnFor(dependencies.getConfig?.() ?? config, project.id),
|
|
50105
|
-
isConversationViewSettingOn: () => (dependencies.getConfig?.() ?? config).conversationView === true,
|
|
50106
49773
|
replayBufferKB: config.replayBufferKB,
|
|
50107
49774
|
hookRouter: dependencies.hookRouter,
|
|
50108
49775
|
getHookPort: dependencies.getHookPort,
|
|
@@ -50175,7 +49842,6 @@ function deriveIssueSessionName(issue) {
|
|
|
50175
49842
|
var COPIED_RUN_SETTINGS = [
|
|
50176
49843
|
"baseBranch",
|
|
50177
49844
|
"codexBypassHookTrust",
|
|
50178
|
-
"conversationView",
|
|
50179
49845
|
"saneYolo"
|
|
50180
49846
|
];
|
|
50181
49847
|
var AUTO_NAME_SUFFIX = / \(\d+\)$/;
|
|
@@ -53285,7 +52951,6 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
53285
52951
|
detectScheduledWakeups: config.detectScheduledWakeups !== false,
|
|
53286
52952
|
hookTools,
|
|
53287
52953
|
planReview: config.planReview?.enabled !== false,
|
|
53288
|
-
conversationApprovals: config.conversationView === true,
|
|
53289
52954
|
holdsQuestionsForParent: true
|
|
53290
52955
|
});
|
|
53291
52956
|
}
|
|
@@ -53612,44 +53277,6 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
53612
53277
|
});
|
|
53613
53278
|
}
|
|
53614
53279
|
},
|
|
53615
|
-
"conversation-approval": (message, ws) => {
|
|
53616
|
-
const session = findSession(message);
|
|
53617
|
-
if (!session) return sendError(ws, "Session not found", {
|
|
53618
|
-
id: message.id,
|
|
53619
|
-
scope: "conversation-approval"
|
|
53620
|
-
});
|
|
53621
|
-
if (session.answerConversationApproval(message.requestId, message.decision, message.answers)) return;
|
|
53622
|
-
sendError(ws, "That approval is no longer pending", {
|
|
53623
|
-
id: session.id,
|
|
53624
|
-
scope: "conversation-approval"
|
|
53625
|
-
});
|
|
53626
|
-
},
|
|
53627
|
-
"set-session-conversation-view": (message, ws) => {
|
|
53628
|
-
const session = findSession(message);
|
|
53629
|
-
if (!session) return sendError(ws, "Session not found", {
|
|
53630
|
-
id: message.id,
|
|
53631
|
-
scope: "conversation-view"
|
|
53632
|
-
});
|
|
53633
|
-
if (session.ephemeral) return sendError(ws, "This session cannot use the conversation view", {
|
|
53634
|
-
id: session.id,
|
|
53635
|
-
scope: "conversation-view"
|
|
53636
|
-
});
|
|
53637
|
-
if (message.isOn && session.isConversationBridgeRefused()) return sendError(ws, "This Codex session is guarded or bypasses hook trust, so it can only use the terminal.", {
|
|
53638
|
-
id: session.id,
|
|
53639
|
-
scope: "conversation-view"
|
|
53640
|
-
});
|
|
53641
|
-
const freshConfig = configStore.save((config) => {
|
|
53642
|
-
const project = config.projects.find((candidate) => candidate.id === session.id);
|
|
53643
|
-
if (!project) return;
|
|
53644
|
-
if (!message.isOn) {
|
|
53645
|
-
delete project.conversationView;
|
|
53646
|
-
return;
|
|
53647
|
-
}
|
|
53648
|
-
project.conversationView = true;
|
|
53649
|
-
});
|
|
53650
|
-
if (freshConfig) applyConfigReload(freshConfig);
|
|
53651
|
-
session.announceConversationView();
|
|
53652
|
-
},
|
|
53653
53280
|
"set-session-guardrails": (message, ws) => {
|
|
53654
53281
|
const session = findSession(message);
|
|
53655
53282
|
if (!session) return sendError(ws, "Session not found", {
|