glimmervoid 0.46.2-next.156 → 0.46.2-next.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/glimmervoid.js +8 -8
- package/dist/chunks/{adapters-DsZUuh-H.js → adapters-COeELdKT.js} +341 -5
- package/dist/chunks/{adapters-DNc4Y-vV.js → adapters-CnInGTuC.js} +1 -1
- package/dist/chunks/{agent-api-cli-MZ90f4jg.js → agent-api-cli-DOzlY0Hz.js} +1 -1
- package/dist/chunks/{agent-api-cli-BSDYHgZR.js → agent-api-cli-bNlTz-7w.js} +1 -1
- package/dist/chunks/{agent-api-core-CKgp5EgK.js → agent-api-core-jge0D-nX.js} +1 -1
- package/dist/chunks/{build-channel-Cfr6JMdE.js → build-channel-DJ1dJt9u.js} +1 -1
- package/dist/chunks/{config-BOQu9rsc.js → config-CfYYorC4.js} +5 -1
- package/dist/chunks/{config-store-BhiA04q3.js → config-store-BDnviJpb.js} +15 -2
- package/dist/chunks/config-store-D2i_r1cn.js +1 -0
- package/dist/chunks/{main-DW32Zxu2.js → main-DVqugKl7.js} +89 -316
- package/dist/chunks/{pair-cli-B5oHJtT_.js → pair-cli-06TbsthF.js} +2 -2
- package/dist/chunks/{remote-config-B3EMYIN8.js → remote-config-DCeelB8P.js} +1 -1
- package/dist/chunks/{settings-cli-Df_djhIH.js → settings-cli-iqcvii_8.js} +4 -4
- package/dist/chunks/{settings-readout-core-Cg24xDa1.js → settings-readout-core-DQ07GLzg.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-D1Inrd9W.js → ssh-sign-cli-C0Zm53au.js} +1 -1
- package/dist/client/assets/{alert-sound-BGkAz4t6.js → alert-sound-kQn89uDA.js} +1 -1
- package/dist/client/assets/alert-sound-kQn89uDA.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-B0ozm-Uf.js → benchmark-panel-Bcfl-wED.js} +1 -1
- package/dist/client/assets/benchmark-panel-Bcfl-wED.js.br +0 -0
- package/dist/client/assets/{celebration-player-Cqnk9IBz.js → celebration-player-DS4zCylh.js} +1 -1
- package/dist/client/assets/celebration-player-DS4zCylh.js.br +0 -0
- package/dist/client/assets/{dialogs-CBGMH_ea.js → dialogs-D1jEbe5_.js} +1 -1
- package/dist/client/assets/dialogs-D1jEbe5_.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-DGk6jjFx.js → doc-editor-ui-DN4_Ck4e.js} +1 -1
- package/dist/client/assets/doc-editor-ui-DN4_Ck4e.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-CbJqge87.js → first-run-checklist-DAF4_CNF.js} +1 -1
- package/dist/client/assets/first-run-checklist-DAF4_CNF.js.br +0 -0
- package/dist/client/assets/{hooks-panel-BFqxntjJ.js → hooks-panel-BO0SRLyV.js} +1 -1
- package/dist/client/assets/hooks-panel-BO0SRLyV.js.br +0 -0
- package/dist/client/assets/{index-Bp7_Pu27.js → index-C6tV2GUb.js} +5 -5
- package/dist/client/assets/index-C6tV2GUb.js.br +0 -0
- package/dist/client/assets/{issues-panel-DBsCdDin.js → issues-panel-DlVw1O2m.js} +1 -1
- package/dist/client/assets/issues-panel-DlVw1O2m.js.br +0 -0
- package/dist/client/assets/{nyan-cat-B2F_vZs8.js → nyan-cat-kPngS_rY.js} +1 -1
- package/dist/client/assets/nyan-cat-kPngS_rY.js.br +0 -0
- package/dist/client/assets/{phone-shell-5JYRbGML.js → phone-shell-C-_8HTyj.js} +1 -1
- package/dist/client/assets/phone-shell-C-_8HTyj.js.br +0 -0
- package/dist/client/assets/{plan-face-D_jH7k1g.js → plan-face-BxGvGv8B.js} +1 -1
- package/dist/client/assets/plan-face-BxGvGv8B.js.br +0 -0
- package/dist/client/assets/{plan-render-ZW003yyC.js → plan-render-DGtHH5Hc.js} +1 -1
- package/dist/client/assets/plan-render-DGtHH5Hc.js.br +0 -0
- package/dist/client/assets/{pr-scope-tabs-K46wSLhh.js → pr-scope-tabs-yFzI-kcR.js} +1 -1
- package/dist/client/assets/pr-scope-tabs-yFzI-kcR.js.br +0 -0
- package/dist/client/assets/{radar-panel-XXMoF1g_.js → radar-panel-WLZFruDo.js} +1 -1
- package/dist/client/assets/radar-panel-WLZFruDo.js.br +0 -0
- package/dist/client/assets/{resume-dialog-BQWMGoFW.js → resume-dialog-Bnu1qbub.js} +1 -1
- package/dist/client/assets/resume-dialog-Bnu1qbub.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-BJy7arsj.js → review-queue-panel-DucWygCs.js} +1 -1
- package/dist/client/assets/review-queue-panel-DucWygCs.js.br +0 -0
- package/dist/client/assets/settings-panel-DfMtb0de.js +4 -0
- package/dist/client/assets/settings-panel-DfMtb0de.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-BPwnZ6Zj.js → shown-lightbox-BMHRPF9l.js} +1 -1
- package/dist/client/assets/shown-lightbox-BMHRPF9l.js.br +0 -0
- package/dist/client/assets/{trace-panel-CJdgaYZP.js → trace-panel-BqYtLWF8.js} +1 -1
- package/dist/client/assets/trace-panel-BqYtLWF8.js.br +0 -0
- package/dist/client/assets/{usage-panel-BsdQgZEl.js → usage-panel-BebJiBqc.js} +1 -1
- package/dist/client/assets/usage-panel-BebJiBqc.js.br +0 -0
- package/dist/client/assets/{visions-panel-C0On5erO.js → visions-panel-dXg3UhT0.js} +1 -1
- package/dist/client/assets/visions-panel-dXg3UhT0.js.br +0 -0
- package/dist/client/index.html +1 -1
- 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-BtazOb6G.js +0 -1
- package/dist/client/assets/alert-sound-BGkAz4t6.js.br +0 -0
- package/dist/client/assets/benchmark-panel-B0ozm-Uf.js.br +0 -0
- package/dist/client/assets/celebration-player-Cqnk9IBz.js.br +0 -0
- package/dist/client/assets/dialogs-CBGMH_ea.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-DGk6jjFx.js.br +0 -0
- package/dist/client/assets/first-run-checklist-CbJqge87.js.br +0 -0
- package/dist/client/assets/hooks-panel-BFqxntjJ.js.br +0 -0
- package/dist/client/assets/index-Bp7_Pu27.js.br +0 -0
- package/dist/client/assets/issues-panel-DBsCdDin.js.br +0 -0
- package/dist/client/assets/nyan-cat-B2F_vZs8.js.br +0 -0
- package/dist/client/assets/phone-shell-5JYRbGML.js.br +0 -0
- package/dist/client/assets/plan-face-D_jH7k1g.js.br +0 -0
- package/dist/client/assets/plan-render-ZW003yyC.js.br +0 -0
- package/dist/client/assets/pr-scope-tabs-K46wSLhh.js.br +0 -0
- package/dist/client/assets/radar-panel-XXMoF1g_.js.br +0 -0
- package/dist/client/assets/resume-dialog-BQWMGoFW.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BJy7arsj.js.br +0 -0
- package/dist/client/assets/settings-panel-Blzu_YZ9.js +0 -4
- package/dist/client/assets/settings-panel-Blzu_YZ9.js.br +0 -0
- package/dist/client/assets/shown-lightbox-BPwnZ6Zj.js.br +0 -0
- package/dist/client/assets/trace-panel-CJdgaYZP.js.br +0 -0
- package/dist/client/assets/usage-panel-BsdQgZEl.js.br +0 -0
- package/dist/client/assets/visions-panel-C0On5erO.js.br +0 -0
|
@@ -5,9 +5,9 @@ import { c as resolvePackageBin, i as clientDir, n as bundled, o as packageRoot,
|
|
|
5
5
|
import { n as glimmervoidHomeDir, r as isOperatorHomeUnderTest, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
6
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-
|
|
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-CfYYorC4.js";
|
|
9
9
|
import { a as permitsHelpCommand, o as supervisionLine, 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-
|
|
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-jge0D-nX.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
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";
|
|
@@ -23,13 +23,13 @@ import { a as readPageTitle, i as filesAfterRetention, n as decideShownKind, o a
|
|
|
23
23
|
import { t as kimi } from "./kimi-VBamp5vp.js";
|
|
24
24
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
25
25
|
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";
|
|
26
|
-
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-
|
|
27
|
-
import { _ as TelemetryState, a as DEEP_HISTORY_SCROLLBACK_LINES, c as describeDataAttach, d as DashboardTelemetryReport, h as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, l as parseDataAttach, m as PendingCrashReport, r as HTTP_URL_RE, s as LOGGED_FAST_CLOSE_COUNTS, u as parseDataClientMessage } from "./build-channel-
|
|
28
|
-
import { A as decideFileRead, B as
|
|
26
|
+
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-BDnviJpb.js";
|
|
27
|
+
import { _ as TelemetryState, a as DEEP_HISTORY_SCROLLBACK_LINES, c as describeDataAttach, d as DashboardTelemetryReport, h as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, l as parseDataAttach, m as PendingCrashReport, r as HTTP_URL_RE, s as LOGGED_FAST_CLOSE_COUNTS, u as parseDataClientMessage } from "./build-channel-DJ1dJt9u.js";
|
|
28
|
+
import { $ as identityFromRelPath, A as decideFileRead, B as sessionsRootCandidates, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as kimiHomes, G as kimiSessionIdFromPath, H as shouldPersistWarehouse, I as passOutcome, J as dedupKeys, K as parseKimiUsageLine, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as isUsageFile, Q as foldReplacementIntoGenerationRollup, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as splitLines$1, V as shouldEvaluateDespiteIoFailures, W as kimiDedupIdentity, X as expandAdvisorIterations, Y as emptyTotals, Z as foldEntryIntoGenerationRollup, _ as isCheckFresh, a as describeAgentResolvability, at as totalTokensOf$1, b as parseRegistryDeprecation, c as isKnownAgentId, d as resolveAdapter, et as isWithinGenerationRecencyWindow, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, it as shouldReplace, j as dedupeCodexFiles, k as continuationDelayMs, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, nt as parseJsonLine, o as getAdapter, ot as vendorUsageEntry, p as codex, q as addEntryToTotals, r as commandFor, rt as parseUsageLine, s as hookProfileOf, st as claudeCode, t as DEFAULT_AGENT_ID, tt as mergeGenerationRollups, u as resetCommandCache, v as normalizeSha, w as shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-COeELdKT.js";
|
|
29
29
|
import { t as HOOK_TOOLS } from "./hook-tools-Cr97Vdap.js";
|
|
30
30
|
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";
|
|
31
|
-
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-
|
|
32
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
31
|
+
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-DCeelB8P.js";
|
|
32
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-DQ07GLzg.js";
|
|
33
33
|
import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
|
|
34
34
|
import { t as getRtkPath } from "./rtk-resolver-BifDj_oS.js";
|
|
35
35
|
import { createRequire } from "node:module";
|
|
@@ -6628,7 +6628,7 @@ function laneRollup(entries, laneById) {
|
|
|
6628
6628
|
costUSD: 0,
|
|
6629
6629
|
sessionKeys: /* @__PURE__ */ new Set()
|
|
6630
6630
|
};
|
|
6631
|
-
bucket.tokens += totalTokensOf
|
|
6631
|
+
bucket.tokens += totalTokensOf(entry);
|
|
6632
6632
|
bucket.costUSD += numberOr(entry.costUSD, 0);
|
|
6633
6633
|
if (key) bucket.sessionKeys.add(key);
|
|
6634
6634
|
byLane.set(lane, bucket);
|
|
@@ -6654,7 +6654,7 @@ function planWindowStartsMs(rateLimits, nowMs) {
|
|
|
6654
6654
|
sevenDay: officialWindowStartMs(rateLimits?.sevenDay, SEVEN_DAY_WINDOW_MS, nowMs)
|
|
6655
6655
|
};
|
|
6656
6656
|
}
|
|
6657
|
-
function totalTokensOf
|
|
6657
|
+
function totalTokensOf(entry) {
|
|
6658
6658
|
return numberOr(entry?.input, 0) + numberOr(entry?.output, 0) + numberOr(entry?.cacheCreate, 0) + numberOr(entry?.cacheRead, 0);
|
|
6659
6659
|
}
|
|
6660
6660
|
function compareEntries(a, b) {
|
|
@@ -21538,10 +21538,43 @@ function mapGrokLine(line, ctx) {
|
|
|
21538
21538
|
vendorState: ctx.vendorState
|
|
21539
21539
|
});
|
|
21540
21540
|
}
|
|
21541
|
+
var KIMI_CWD_RECORD = "profile.bind";
|
|
21542
|
+
function kimiRootOf(line) {
|
|
21543
|
+
if (line.type !== KIMI_CWD_RECORD) return null;
|
|
21544
|
+
return textOr(line.environmentDisclosure?.cwd, null);
|
|
21545
|
+
}
|
|
21546
|
+
function kimiToolEvents(toolCalls, base) {
|
|
21547
|
+
if (!Array.isArray(toolCalls)) return [];
|
|
21548
|
+
return toolCalls.map((call) => toolEvent({
|
|
21549
|
+
...base,
|
|
21550
|
+
name: call?.name,
|
|
21551
|
+
target: toolTarget(parseJsonRecord(call?.arguments))
|
|
21552
|
+
}));
|
|
21553
|
+
}
|
|
21554
|
+
function mapKimiLine(line, ctx) {
|
|
21555
|
+
const announcedRoot = kimiRootOf(line);
|
|
21556
|
+
if (announcedRoot) return result([], announcedRoot, ctx.sessionId, ctx.vendorState);
|
|
21557
|
+
if (line.type !== "agent.message.appended") return null;
|
|
21558
|
+
const message = line.message?.message;
|
|
21559
|
+
if (message?.role !== "assistant") return null;
|
|
21560
|
+
const base = {
|
|
21561
|
+
ts: parseTimestamp(line.time) || ctx.now,
|
|
21562
|
+
root: ctx.root,
|
|
21563
|
+
sessionId: ctx.sessionId,
|
|
21564
|
+
vendor: "kimi"
|
|
21565
|
+
};
|
|
21566
|
+
const content = Array.isArray(message.content) ? message.content : [];
|
|
21567
|
+
const turn = turnEvent({
|
|
21568
|
+
...base,
|
|
21569
|
+
text: firstTextBlock(content)
|
|
21570
|
+
});
|
|
21571
|
+
return result([...turn ? [turn] : [], ...kimiToolEvents(message.toolCalls, base)], ctx.root, ctx.sessionId, ctx.vendorState);
|
|
21572
|
+
}
|
|
21541
21573
|
var MAPPERS = Object.freeze({
|
|
21542
21574
|
claude: mapClaudeLine,
|
|
21543
21575
|
codex: mapCodexLine,
|
|
21544
|
-
grok: mapGrokLine
|
|
21576
|
+
grok: mapGrokLine,
|
|
21577
|
+
kimi: mapKimiLine
|
|
21545
21578
|
});
|
|
21546
21579
|
function mapAgentLine({ vendor = "", rawLine = null, ctx = {}, vendorState = null } = {}) {
|
|
21547
21580
|
const root = ctx.root == null ? null : ctx.root;
|
|
@@ -32797,7 +32830,7 @@ var DEFAULT_DISCOVER_MS$1 = 3e4;
|
|
|
32797
32830
|
var DEFAULT_ACTIVE_WITHIN_MS = 6e5;
|
|
32798
32831
|
var WATCH_POLL_DEBOUNCE_MS$1 = 100;
|
|
32799
32832
|
var WATCH_SWEEP_DEBOUNCE_MS$1 = 500;
|
|
32800
|
-
var
|
|
32833
|
+
var TRANSCRIPT_HEAD_BYTES = 131072;
|
|
32801
32834
|
function decodeGrokRoot(name) {
|
|
32802
32835
|
try {
|
|
32803
32836
|
return decodeURIComponent(name);
|
|
@@ -32808,6 +32841,7 @@ function decodeGrokRoot(name) {
|
|
|
32808
32841
|
function sessionIdFromPath(vendor, dir, filePath) {
|
|
32809
32842
|
if (vendor === "claude") return path.basename(filePath, ".jsonl");
|
|
32810
32843
|
if (vendor === "grok") return path.basename(dir);
|
|
32844
|
+
if (vendor === "kimi") return kimiSessionIdFromPath(filePath);
|
|
32811
32845
|
return codexSessionIdFromPath(filePath);
|
|
32812
32846
|
}
|
|
32813
32847
|
function rootFromPath(vendor, dir) {
|
|
@@ -32815,14 +32849,22 @@ function rootFromPath(vendor, dir) {
|
|
|
32815
32849
|
if (vendor === "claude") return dir;
|
|
32816
32850
|
return null;
|
|
32817
32851
|
}
|
|
32818
|
-
|
|
32852
|
+
function codexRootOf(line) {
|
|
32853
|
+
const cwd = line.payload?.cwd;
|
|
32854
|
+
return typeof cwd === "string" && cwd.trim() ? cwd.trim() : null;
|
|
32855
|
+
}
|
|
32856
|
+
var HEAD_ROOT_READERS = Object.freeze({
|
|
32857
|
+
codex: codexRootOf,
|
|
32858
|
+
kimi: kimiRootOf
|
|
32859
|
+
});
|
|
32860
|
+
async function readHeadRoot(filePath, rootOfLine, fsPromises = fs.promises) {
|
|
32819
32861
|
let handle = null;
|
|
32820
32862
|
try {
|
|
32821
32863
|
handle = await fsPromises.open(filePath, "r");
|
|
32822
|
-
const buffer = Buffer.alloc(
|
|
32823
|
-
const { bytesRead } = await handle.read(buffer, 0,
|
|
32864
|
+
const buffer = Buffer.alloc(TRANSCRIPT_HEAD_BYTES);
|
|
32865
|
+
const { bytesRead } = await handle.read(buffer, 0, TRANSCRIPT_HEAD_BYTES, 0);
|
|
32824
32866
|
const lines = buffer.subarray(0, bytesRead).toString("utf8").split(/\r?\n/);
|
|
32825
|
-
if (bytesRead ===
|
|
32867
|
+
if (bytesRead === TRANSCRIPT_HEAD_BYTES) lines.pop();
|
|
32826
32868
|
for (const line of lines) {
|
|
32827
32869
|
if (!line) continue;
|
|
32828
32870
|
let parsed = null;
|
|
@@ -32831,8 +32873,8 @@ async function readCodexRoot(filePath, fsPromises = fs.promises) {
|
|
|
32831
32873
|
} catch {
|
|
32832
32874
|
continue;
|
|
32833
32875
|
}
|
|
32834
|
-
const
|
|
32835
|
-
if (
|
|
32876
|
+
const root = parsed ? rootOfLine(parsed) : null;
|
|
32877
|
+
if (root) return root;
|
|
32836
32878
|
}
|
|
32837
32879
|
return null;
|
|
32838
32880
|
} catch {
|
|
@@ -32857,11 +32899,16 @@ function transcriptRootCandidates(env = process.env, wanted = {}, homeDir = os.h
|
|
|
32857
32899
|
maxDepth: 3
|
|
32858
32900
|
});
|
|
32859
32901
|
}
|
|
32860
|
-
if (wanted.grok !== false) for (const candidate of
|
|
32902
|
+
if (wanted.grok !== false) for (const candidate of sessionsRootCandidates(grokHomes(env, homeDir))) candidates.push({
|
|
32861
32903
|
vendor: "grok",
|
|
32862
32904
|
dir: candidate.dir,
|
|
32863
32905
|
maxDepth: 2
|
|
32864
32906
|
});
|
|
32907
|
+
if (wanted.kimi !== false) for (const candidate of sessionsRootCandidates(kimiHomes(env, homeDir))) candidates.push({
|
|
32908
|
+
vendor: "kimi",
|
|
32909
|
+
dir: candidate.dir,
|
|
32910
|
+
maxDepth: 4
|
|
32911
|
+
});
|
|
32865
32912
|
return candidates;
|
|
32866
32913
|
}
|
|
32867
32914
|
function createAgentLogIngest({ publish, sourceConfig = {}, laneMap = null, logger = console, env = process.env, homeDir = os.homedir(), fsPromises = fs.promises, watchFn = fs.watch, nowFn = Date.now, setIntervalFn = DEFAULT_TIMER_FNS.setIntervalFn, clearIntervalFn = DEFAULT_TIMER_FNS.clearIntervalFn, setTimeoutFn = DEFAULT_TIMER_FNS.setTimeoutFn, clearTimeoutFn = DEFAULT_TIMER_FNS.clearTimeoutFn, pollIntervalMs = DEFAULT_POLL_MS$2, discoverIntervalMs = DEFAULT_DISCOVER_MS$1, activeWithinMs = DEFAULT_ACTIVE_WITHIN_MS, maxActiveFiles = 32, maxTrackedFiles = 256, maxCachedDirs = 4096, maxWatchedDirs = 48, maxScanDirs = 2e3, maxStatsPerSweep = 400, maxLinesPerDrain = 200, maxCatchUpBytes = MAX_CATCH_UP_BYTES, vendors = null }) {
|
|
@@ -33058,8 +33105,8 @@ function createAgentLogIngest({ publish, sourceConfig = {}, laneMap = null, logg
|
|
|
33058
33105
|
async function trackFile(root, dir, filePath, stat, lanes) {
|
|
33059
33106
|
const sessionId = sessionIdFromPath(root.vendor, dir, filePath);
|
|
33060
33107
|
if (isEphemeralLane(lanes, root.vendor, sessionId)) return;
|
|
33061
|
-
|
|
33062
|
-
|
|
33108
|
+
const headRootReader = HEAD_ROOT_READERS[root.vendor];
|
|
33109
|
+
const scopeRoot = headRootReader ? await readHeadRoot(filePath, headRootReader, fsPromises) : rootFromPath(root.vendor, dir);
|
|
33063
33110
|
if (!alive()) return;
|
|
33064
33111
|
if (isDispatchWorkdir(scopeRoot)) return;
|
|
33065
33112
|
tails.set(filePath, createTailState(stat, { path: filePath }));
|
|
@@ -41636,296 +41683,6 @@ function resolvedPrice(key, price, isExact) {
|
|
|
41636
41683
|
};
|
|
41637
41684
|
}
|
|
41638
41685
|
//#endregion
|
|
41639
|
-
//#region server/usage/core/usage-entry-core.ts
|
|
41640
|
-
var NULL_REJECT_FIELDS = Object.freeze([
|
|
41641
|
-
["id"],
|
|
41642
|
-
["cwd"],
|
|
41643
|
-
["version"],
|
|
41644
|
-
["costUSD"],
|
|
41645
|
-
["sessionId"],
|
|
41646
|
-
["requestId"],
|
|
41647
|
-
["isApiErrorMessage"],
|
|
41648
|
-
["message", "id"],
|
|
41649
|
-
["message", "model"],
|
|
41650
|
-
[
|
|
41651
|
-
"message",
|
|
41652
|
-
"usage",
|
|
41653
|
-
"speed"
|
|
41654
|
-
],
|
|
41655
|
-
[
|
|
41656
|
-
"message",
|
|
41657
|
-
"usage",
|
|
41658
|
-
"costUSD"
|
|
41659
|
-
],
|
|
41660
|
-
[
|
|
41661
|
-
"message",
|
|
41662
|
-
"usage",
|
|
41663
|
-
"cache_read_input_tokens"
|
|
41664
|
-
],
|
|
41665
|
-
[
|
|
41666
|
-
"message",
|
|
41667
|
-
"usage",
|
|
41668
|
-
"cache_creation_input_tokens"
|
|
41669
|
-
]
|
|
41670
|
-
]);
|
|
41671
|
-
function parseJsonLine(line, requiredSubstring) {
|
|
41672
|
-
if (typeof line !== "string") return null;
|
|
41673
|
-
if (requiredSubstring && !line.includes(requiredSubstring)) return null;
|
|
41674
|
-
return parseJsonRecord(line, { admitArrays: true });
|
|
41675
|
-
}
|
|
41676
|
-
function parseUsageLine(line, { versionPrefix } = {}) {
|
|
41677
|
-
const raw = parseJsonLine(line, "\"usage\":{");
|
|
41678
|
-
if (!raw) return null;
|
|
41679
|
-
const parsed = raw;
|
|
41680
|
-
if (hasExplicitNull(parsed)) return null;
|
|
41681
|
-
if (!versionIsAccepted(parsed.version, versionPrefix)) return null;
|
|
41682
|
-
if (hasPresentEmptyIdentity(parsed)) return null;
|
|
41683
|
-
const message = parsed.message;
|
|
41684
|
-
if (!message || typeof message !== "object") return null;
|
|
41685
|
-
if (typeof message.model === "string" && message.model.trim() === "") return null;
|
|
41686
|
-
const rawUsage = message.usage;
|
|
41687
|
-
if (!rawUsage || typeof rawUsage !== "object") return null;
|
|
41688
|
-
const usage = rawUsage;
|
|
41689
|
-
const timestampMs = Date.parse(String(parsed.timestamp));
|
|
41690
|
-
if (!Number.isFinite(timestampMs)) return null;
|
|
41691
|
-
const rawModel = message.model === "<synthetic>" ? null : rawTextOr(message.model, null);
|
|
41692
|
-
const speed = rawTextOr(usage.speed, null);
|
|
41693
|
-
return {
|
|
41694
|
-
timestamp: new Date(timestampMs).toISOString(),
|
|
41695
|
-
timestampMs,
|
|
41696
|
-
cwd: rawTextOr(parsed.cwd, null),
|
|
41697
|
-
version: rawTextOr(parsed.version, null),
|
|
41698
|
-
sessionId: rawTextOr(parsed.sessionId, null),
|
|
41699
|
-
requestId: rawTextOr(parsed.requestId, null),
|
|
41700
|
-
messageId: rawTextOr(message.id, null),
|
|
41701
|
-
model: modelWithSpeed(rawModel, speed),
|
|
41702
|
-
rawModel,
|
|
41703
|
-
speed,
|
|
41704
|
-
isSidechain: parsed.isSidechain === true,
|
|
41705
|
-
costUSD: numberOr(parsed.costUSD, null) ?? numberOr(usage.costUSD, null),
|
|
41706
|
-
...tokenCountsFromUsage(usage),
|
|
41707
|
-
iterations: Array.isArray(usage.iterations) ? usage.iterations : []
|
|
41708
|
-
};
|
|
41709
|
-
}
|
|
41710
|
-
function expandAdvisorIterations(entry) {
|
|
41711
|
-
if (!entry || !Array.isArray(entry.iterations)) return [];
|
|
41712
|
-
const advisorEntries = [];
|
|
41713
|
-
for (let iterationIndex = 0; iterationIndex < entry.iterations.length; iterationIndex += 1) {
|
|
41714
|
-
const iteration = entry.iterations[iterationIndex];
|
|
41715
|
-
if (!iteration || iteration.type !== "advisor_message") continue;
|
|
41716
|
-
const rawIterationUsage = iteration.usage || iteration.message?.usage || iteration;
|
|
41717
|
-
if (!rawIterationUsage || typeof rawIterationUsage !== "object") continue;
|
|
41718
|
-
const usage = rawIterationUsage;
|
|
41719
|
-
const rawModel = iteration.message?.model === "<synthetic>" ? null : rawTextOr(iteration.message?.model, null) || entry.rawModel || null;
|
|
41720
|
-
const speed = rawTextOr(usage.speed, null) || entry.speed || null;
|
|
41721
|
-
advisorEntries.push({
|
|
41722
|
-
...entry,
|
|
41723
|
-
messageId: entry.messageId ? `${entry.messageId}:advisor:${iterationIndex}` : null,
|
|
41724
|
-
model: modelWithSpeed(rawModel, speed),
|
|
41725
|
-
rawModel,
|
|
41726
|
-
speed,
|
|
41727
|
-
costUSD: null,
|
|
41728
|
-
...tokenCountsFromUsage(usage),
|
|
41729
|
-
iterations: [],
|
|
41730
|
-
isAdvisor: true
|
|
41731
|
-
});
|
|
41732
|
-
}
|
|
41733
|
-
return advisorEntries;
|
|
41734
|
-
}
|
|
41735
|
-
function identityFromRelPath(relPath) {
|
|
41736
|
-
const parts = String(relPath || "").replace(/\\/g, "/").split("/").filter(Boolean);
|
|
41737
|
-
const jsonlIndex = parts.findIndex((part) => part.endsWith(".jsonl"));
|
|
41738
|
-
const projectPartsEnd = parts[0] === "projects" ? 2 : 1;
|
|
41739
|
-
const project = parts.slice(parts[0] === "projects" ? 1 : 0, projectPartsEnd).join("/") || null;
|
|
41740
|
-
if (jsonlIndex === -1) return {
|
|
41741
|
-
project,
|
|
41742
|
-
sessionId: null
|
|
41743
|
-
};
|
|
41744
|
-
const subagentsIndex = parts.indexOf("subagents");
|
|
41745
|
-
if (subagentsIndex > 0) return {
|
|
41746
|
-
project,
|
|
41747
|
-
sessionId: parts[subagentsIndex - 1] || null
|
|
41748
|
-
};
|
|
41749
|
-
return {
|
|
41750
|
-
project,
|
|
41751
|
-
sessionId: path.basename(parts[jsonlIndex], ".jsonl") || null
|
|
41752
|
-
};
|
|
41753
|
-
}
|
|
41754
|
-
function dedupKeys(entry) {
|
|
41755
|
-
if (!entry || !entry.messageId) return {
|
|
41756
|
-
primary: null,
|
|
41757
|
-
collision: null
|
|
41758
|
-
};
|
|
41759
|
-
return {
|
|
41760
|
-
primary: entry.requestId ? `${entry.messageId}:${entry.requestId}` : entry.messageId,
|
|
41761
|
-
collision: entry.messageId
|
|
41762
|
-
};
|
|
41763
|
-
}
|
|
41764
|
-
function shouldReplace(existing, candidate) {
|
|
41765
|
-
if (!existing) return true;
|
|
41766
|
-
if (!candidate) return false;
|
|
41767
|
-
if (existing.isSidechain && !candidate.isSidechain) return true;
|
|
41768
|
-
if (!existing.isSidechain && candidate.isSidechain) return false;
|
|
41769
|
-
const existingTokens = totalTokensOf(existing);
|
|
41770
|
-
const candidateTokens = totalTokensOf(candidate);
|
|
41771
|
-
if (candidateTokens > existingTokens) return true;
|
|
41772
|
-
if (candidateTokens < existingTokens) return false;
|
|
41773
|
-
return !existing.speed && Boolean(candidate.speed);
|
|
41774
|
-
}
|
|
41775
|
-
function totalTokensOf(entry) {
|
|
41776
|
-
if (!entry) return 0;
|
|
41777
|
-
return numberOr(entry.input, 0) + numberOr(entry.output, 0) + numberOr(entry.cacheCreate, 0) + numberOr(entry.cacheRead, 0);
|
|
41778
|
-
}
|
|
41779
|
-
var UNKNOWN_GENERATION_MODEL = "unknown";
|
|
41780
|
-
var GENERATION_RECENCY_WINDOW_MS = 864e5;
|
|
41781
|
-
function isWithinGenerationRecencyWindow(entry, nowMs) {
|
|
41782
|
-
const { timestampMs } = entry;
|
|
41783
|
-
if (typeof timestampMs !== "number" || !Number.isFinite(timestampMs)) return false;
|
|
41784
|
-
return nowMs - timestampMs <= GENERATION_RECENCY_WINDOW_MS;
|
|
41785
|
-
}
|
|
41786
|
-
function addCountsToGenerationRollup(rowsByKey, entry, pricedModelKey, counts) {
|
|
41787
|
-
const sessionId = entry.sessionId ?? "";
|
|
41788
|
-
const model = pricedModelKey ?? UNKNOWN_GENERATION_MODEL;
|
|
41789
|
-
const key = JSON.stringify([sessionId, model]);
|
|
41790
|
-
const row = rowsByKey.get(key) ?? {
|
|
41791
|
-
sessionId,
|
|
41792
|
-
model,
|
|
41793
|
-
vendor: entry.vendor?.trim() || "claude",
|
|
41794
|
-
input: 0,
|
|
41795
|
-
output: 0,
|
|
41796
|
-
cacheRead: 0,
|
|
41797
|
-
cacheCreate: 0,
|
|
41798
|
-
costUSD: 0,
|
|
41799
|
-
hasKnownCost: false,
|
|
41800
|
-
isModelKnown: pricedModelKey !== null
|
|
41801
|
-
};
|
|
41802
|
-
row.input += counts.input;
|
|
41803
|
-
row.output += counts.output;
|
|
41804
|
-
row.cacheRead += counts.cacheRead;
|
|
41805
|
-
row.cacheCreate += counts.cacheCreate;
|
|
41806
|
-
row.costUSD += counts.costUSD;
|
|
41807
|
-
row.hasKnownCost = row.hasKnownCost || counts.costUSD > 0;
|
|
41808
|
-
rowsByKey.set(key, row);
|
|
41809
|
-
}
|
|
41810
|
-
function foldEntryIntoGenerationRollup(rowsByKey, entry, pricedModelKey) {
|
|
41811
|
-
addCountsToGenerationRollup(rowsByKey, entry, pricedModelKey, {
|
|
41812
|
-
input: numberOr(entry.input, 0),
|
|
41813
|
-
output: numberOr(entry.output, 0),
|
|
41814
|
-
cacheRead: numberOr(entry.cacheRead, 0),
|
|
41815
|
-
cacheCreate: numberOr(entry.cacheCreate, 0),
|
|
41816
|
-
costUSD: numberOr(entry.costUSD, 0)
|
|
41817
|
-
});
|
|
41818
|
-
}
|
|
41819
|
-
function foldReplacementIntoGenerationRollup(rowsByKey, replacedEntry, replacementEntry, pricedModelKey) {
|
|
41820
|
-
const growthOf = (field) => Math.max(0, numberOr(replacementEntry[field], 0) - numberOr(replacedEntry[field], 0));
|
|
41821
|
-
addCountsToGenerationRollup(rowsByKey, replacementEntry, pricedModelKey, {
|
|
41822
|
-
input: growthOf("input"),
|
|
41823
|
-
output: growthOf("output"),
|
|
41824
|
-
cacheRead: growthOf("cacheRead"),
|
|
41825
|
-
cacheCreate: growthOf("cacheCreate"),
|
|
41826
|
-
costUSD: growthOf("costUSD")
|
|
41827
|
-
});
|
|
41828
|
-
}
|
|
41829
|
-
function mergeGenerationRollups(targetRowsByKey, sourceRowsByKey) {
|
|
41830
|
-
for (const [key, sourceRow] of sourceRowsByKey) {
|
|
41831
|
-
const targetRow = targetRowsByKey.get(key);
|
|
41832
|
-
if (!targetRow) {
|
|
41833
|
-
targetRowsByKey.set(key, { ...sourceRow });
|
|
41834
|
-
continue;
|
|
41835
|
-
}
|
|
41836
|
-
targetRow.input += sourceRow.input;
|
|
41837
|
-
targetRow.output += sourceRow.output;
|
|
41838
|
-
targetRow.cacheRead += sourceRow.cacheRead;
|
|
41839
|
-
targetRow.cacheCreate += sourceRow.cacheCreate;
|
|
41840
|
-
targetRow.costUSD += sourceRow.costUSD;
|
|
41841
|
-
targetRow.hasKnownCost = targetRow.hasKnownCost || sourceRow.hasKnownCost;
|
|
41842
|
-
}
|
|
41843
|
-
}
|
|
41844
|
-
function emptyTotals() {
|
|
41845
|
-
return {
|
|
41846
|
-
tokens: 0,
|
|
41847
|
-
costUSD: 0,
|
|
41848
|
-
input: 0,
|
|
41849
|
-
output: 0,
|
|
41850
|
-
cacheCreate: 0,
|
|
41851
|
-
cacheRead: 0
|
|
41852
|
-
};
|
|
41853
|
-
}
|
|
41854
|
-
function addEntryToTotals(totals, entry, tokens = totalTokensOf(entry)) {
|
|
41855
|
-
totals.input += numberOr(entry.input, 0);
|
|
41856
|
-
totals.output += numberOr(entry.output, 0);
|
|
41857
|
-
totals.cacheCreate += numberOr(entry.cacheCreate, 0);
|
|
41858
|
-
totals.cacheRead += numberOr(entry.cacheRead, 0);
|
|
41859
|
-
totals.tokens += tokens;
|
|
41860
|
-
totals.costUSD += numberOr(entry.costUSD, 0);
|
|
41861
|
-
}
|
|
41862
|
-
function vendorUsageEntry({ timestampMs, sessionId, model, input, output, cacheCreate, cacheRead, costUSD, vendor, messageId = null }) {
|
|
41863
|
-
return {
|
|
41864
|
-
timestamp: new Date(timestampMs).toISOString(),
|
|
41865
|
-
timestampMs,
|
|
41866
|
-
sessionId,
|
|
41867
|
-
model,
|
|
41868
|
-
input,
|
|
41869
|
-
output,
|
|
41870
|
-
cacheCreate,
|
|
41871
|
-
cacheCreation5m: 0,
|
|
41872
|
-
cacheCreation1h: 0,
|
|
41873
|
-
cacheRead,
|
|
41874
|
-
costUSD,
|
|
41875
|
-
vendor,
|
|
41876
|
-
messageId,
|
|
41877
|
-
requestId: null,
|
|
41878
|
-
isSidechain: false
|
|
41879
|
-
};
|
|
41880
|
-
}
|
|
41881
|
-
function modelWithSpeed(rawModel, speed) {
|
|
41882
|
-
if (!rawModel || speed !== "fast" || rawModel.endsWith("-fast")) return rawModel;
|
|
41883
|
-
return `${rawModel}-fast`;
|
|
41884
|
-
}
|
|
41885
|
-
function tokenCountsFromUsage(usage) {
|
|
41886
|
-
const input = numberOr(usage.input_tokens, 0);
|
|
41887
|
-
const output = numberOr(usage.output_tokens, 0);
|
|
41888
|
-
const cacheCreation = usage.cache_creation && typeof usage.cache_creation === "object" ? usage.cache_creation : null;
|
|
41889
|
-
const cacheCreation5m = cacheCreation ? numberOr(cacheCreation.ephemeral_5m_input_tokens, 0) : numberOr(usage.cache_creation_input_tokens, 0);
|
|
41890
|
-
const cacheCreation1h = cacheCreation ? numberOr(cacheCreation.ephemeral_1h_input_tokens, 0) : 0;
|
|
41891
|
-
return {
|
|
41892
|
-
input,
|
|
41893
|
-
output,
|
|
41894
|
-
cacheCreate: cacheCreation5m + cacheCreation1h,
|
|
41895
|
-
cacheCreation5m,
|
|
41896
|
-
cacheCreation1h,
|
|
41897
|
-
cacheRead: numberOr(usage.cache_read_input_tokens, 0)
|
|
41898
|
-
};
|
|
41899
|
-
}
|
|
41900
|
-
function hasExplicitNull(parsed) {
|
|
41901
|
-
return NULL_REJECT_FIELDS.some((fieldPath) => hasNullAtPath(parsed, fieldPath));
|
|
41902
|
-
}
|
|
41903
|
-
function hasNullAtPath(value, fieldPath) {
|
|
41904
|
-
let current = value;
|
|
41905
|
-
for (const part of fieldPath) {
|
|
41906
|
-
if (!current || typeof current !== "object") return false;
|
|
41907
|
-
if (!Object.hasOwn(current, part)) return false;
|
|
41908
|
-
current = current[part];
|
|
41909
|
-
}
|
|
41910
|
-
return current === null;
|
|
41911
|
-
}
|
|
41912
|
-
function versionIsAccepted(version, versionPrefix) {
|
|
41913
|
-
if (typeof version !== "string" || version.length === 0) return true;
|
|
41914
|
-
if (!/^\d+\.\d+\.\d+/.test(version)) return false;
|
|
41915
|
-
if (!versionPrefix) return true;
|
|
41916
|
-
return version.startsWith(versionPrefix);
|
|
41917
|
-
}
|
|
41918
|
-
function hasPresentEmptyIdentity(parsed) {
|
|
41919
|
-
if (presentEmpty(parsed.sessionId)) return true;
|
|
41920
|
-
if (presentEmpty(parsed.requestId)) return true;
|
|
41921
|
-
if (presentEmpty(parsed.id)) return true;
|
|
41922
|
-
if (presentEmpty(parsed.message?.id)) return true;
|
|
41923
|
-
return presentEmpty(parsed.message?.model);
|
|
41924
|
-
}
|
|
41925
|
-
function presentEmpty(value) {
|
|
41926
|
-
return typeof value === "string" && value.trim() === "";
|
|
41927
|
-
}
|
|
41928
|
-
//#endregion
|
|
41929
41686
|
//#region server/usage/core/usage-aggregate-core.ts
|
|
41930
41687
|
function buildUsageReport(entries, { now = Date.now(), blockHours = 5, retainDays = 90, sessionsById = /* @__PURE__ */ new Map(), tz = null } = {}) {
|
|
41931
41688
|
const keptEntries = pruneEntries(entries, {
|
|
@@ -41966,7 +41723,7 @@ function addEntryToVendorTotals(map, entry) {
|
|
|
41966
41723
|
tokens: 0,
|
|
41967
41724
|
costUSD: 0
|
|
41968
41725
|
};
|
|
41969
|
-
bucket.tokens += totalTokensOf(entry);
|
|
41726
|
+
bucket.tokens += totalTokensOf$1(entry);
|
|
41970
41727
|
bucket.costUSD += numberOr(entry.costUSD, 0);
|
|
41971
41728
|
map.set(vendor, bucket);
|
|
41972
41729
|
}
|
|
@@ -42840,7 +42597,7 @@ function shouldTrackMissingModel({ entry, resolved, priced, costMode }) {
|
|
|
42840
42597
|
if (resolved) return false;
|
|
42841
42598
|
if (priced.priced) return false;
|
|
42842
42599
|
if (!entry.model) return false;
|
|
42843
|
-
return totalTokensOf(entry) > 0;
|
|
42600
|
+
return totalTokensOf$1(entry) > 0;
|
|
42844
42601
|
}
|
|
42845
42602
|
function isClaudeEntry(entry) {
|
|
42846
42603
|
const vendor = typeof entry?.vendor === "string" ? entry.vendor.trim() : "";
|
|
@@ -42895,6 +42652,10 @@ function keysForEntry(entry, syntheticPrimary = null) {
|
|
|
42895
42652
|
primary: grokDedupIdentity(entry),
|
|
42896
42653
|
collision: null
|
|
42897
42654
|
};
|
|
42655
|
+
if (entry?.vendor === "kimi") return {
|
|
42656
|
+
primary: kimiDedupIdentity(entry),
|
|
42657
|
+
collision: null
|
|
42658
|
+
};
|
|
42898
42659
|
const keys = dedupKeys(entry);
|
|
42899
42660
|
return {
|
|
42900
42661
|
primary: keys.primary || syntheticPrimary || entry?.[SYNTHETIC_PRIMARY] || null,
|
|
@@ -42967,7 +42728,7 @@ async function resolveVendorRootsAsync({ fsPromises, env, homeDir, vendors, lane
|
|
|
42967
42728
|
});
|
|
42968
42729
|
}
|
|
42969
42730
|
if (vendors?.grok !== false) {
|
|
42970
|
-
const surviving = await existingRoots(
|
|
42731
|
+
const surviving = await existingRoots(sessionsRootCandidates(grokHomes(env, homeDir)), fsPromises, laneLog);
|
|
42971
42732
|
ioFailures += surviving.ioFailures;
|
|
42972
42733
|
for (const root of surviving.roots) roots.push({
|
|
42973
42734
|
vendor: "grok",
|
|
@@ -42975,6 +42736,15 @@ async function resolveVendorRootsAsync({ fsPromises, env, homeDir, vendors, lane
|
|
|
42975
42736
|
kind: root.kind
|
|
42976
42737
|
});
|
|
42977
42738
|
}
|
|
42739
|
+
if (vendors?.kimi !== false) {
|
|
42740
|
+
const surviving = await existingRoots(sessionsRootCandidates(kimiHomes(env, homeDir)), fsPromises, laneLog);
|
|
42741
|
+
ioFailures += surviving.ioFailures;
|
|
42742
|
+
for (const root of surviving.roots) roots.push({
|
|
42743
|
+
vendor: "kimi",
|
|
42744
|
+
dir: root.dir,
|
|
42745
|
+
kind: root.kind
|
|
42746
|
+
});
|
|
42747
|
+
}
|
|
42978
42748
|
return {
|
|
42979
42749
|
roots,
|
|
42980
42750
|
ioFailures
|
|
@@ -43026,7 +42796,8 @@ async function walkSourceFiles(roots, fsPromises, laneLog) {
|
|
|
43026
42796
|
function createUsageScanner(deps = {}) {
|
|
43027
42797
|
const { fsPromises = fs$1, env = process.env, homeDir = os.homedir(), nowFn = Date.now, pricingTable, aliases = {}, costMode = "auto", blockHours = 5, retainDays = 90, extraProjectsDirs = [], vendors = {
|
|
43028
42798
|
codex: true,
|
|
43029
|
-
grok: true
|
|
42799
|
+
grok: true,
|
|
42800
|
+
kimi: true
|
|
43030
42801
|
}, warehousePath = null, warehouseRetainDays = 365, budget: budgetDep = null, laneMap = null, logger = noopLogger, byteBudget = DEFAULT_BYTE_BUDGET, chunkSize = DEFAULT_CHUNK_SIZE, yieldNowFn = yieldNow } = deps;
|
|
43031
42802
|
const laneLog = createLaneLog({
|
|
43032
42803
|
prefix: "[usage]",
|
|
@@ -43212,6 +42983,7 @@ function createUsageScanner(deps = {}) {
|
|
|
43212
42983
|
}, file);
|
|
43213
42984
|
}
|
|
43214
42985
|
if (vendor === "grok") return ingestVendorLine(parseGrokUsageLine(line), file);
|
|
42986
|
+
if (vendor === "kimi") return ingestVendorLine(parseKimiUsageLine(line, file), file);
|
|
43215
42987
|
const parsed = parseUsageLine(line);
|
|
43216
42988
|
if (!parsed) return 0;
|
|
43217
42989
|
const relPath = relativeToProjects(file, claudeRoots);
|
|
@@ -43590,7 +43362,7 @@ function createUsageScanner(deps = {}) {
|
|
|
43590
43362
|
costUSD: 0,
|
|
43591
43363
|
lastTs: null
|
|
43592
43364
|
};
|
|
43593
|
-
bucket.tokens += totalTokensOf(entry);
|
|
43365
|
+
bucket.tokens += totalTokensOf$1(entry);
|
|
43594
43366
|
bucket.costUSD += Number.isFinite(entry.costUSD) ? Number(entry.costUSD) : 0;
|
|
43595
43367
|
bucket.lastTs = Math.max(bucket.lastTs || 0, entry.timestampMs);
|
|
43596
43368
|
totalsBySession.set(key, bucket);
|
|
@@ -43790,7 +43562,8 @@ var DEFAULT_USAGE_CONFIG = Object.freeze({
|
|
|
43790
43562
|
},
|
|
43791
43563
|
vendors: {
|
|
43792
43564
|
codex: true,
|
|
43793
|
-
grok: true
|
|
43565
|
+
grok: true,
|
|
43566
|
+
kimi: true
|
|
43794
43567
|
}
|
|
43795
43568
|
});
|
|
43796
43569
|
var OFFICIAL_COST_CAP = 200;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { l 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 { l as resolveConfigPath } from "./config-store-BDnviJpb.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-DCeelB8P.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-BjFK_eSH.js";
|
|
6
|
-
import { dt as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-
|
|
6
|
+
import { dt as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-BDnviJpb.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
2
2
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
3
3
|
import { f as AgentSettingsReply } from "./session-B2Wieg0a.js";
|
|
4
|
-
import { r as BrowserConfig } from "./config-
|
|
4
|
+
import { r as BrowserConfig } from "./config-CfYYorC4.js";
|
|
5
5
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
6
6
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
7
|
-
import { A as setValueAtPath, F as SETTINGS_REGISTRY, N as valueAtPath, O as parsePosthogProjectSelection, T as deleteValueAtPath, c as loadConfigFile, d as validateConfig, et as ENV_SECRET_BINDINGS, f as isSettingAvailable, k as scoreSettingsSearch, r as IS_EXPERIMENTAL_BUILD, rt as withEnvSecrets, tt as readEnvSecrets, u as saveConfigFileOnce, w as cloneValue } 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 availableSettings } from "./settings-readout-core-
|
|
7
|
+
import { A as setValueAtPath, F as SETTINGS_REGISTRY, N as valueAtPath, O as parsePosthogProjectSelection, T as deleteValueAtPath, c as loadConfigFile, d as validateConfig, et as ENV_SECRET_BINDINGS, f as isSettingAvailable, k as scoreSettingsSearch, r as IS_EXPERIMENTAL_BUILD, rt as withEnvSecrets, tt as readEnvSecrets, u as saveConfigFileOnce, w as cloneValue } from "./config-store-BDnviJpb.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 availableSettings } from "./settings-readout-core-DQ07GLzg.js";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
@@ -330,7 +330,7 @@ function processIo() {
|
|
|
330
330
|
async function runSettingsCli(commandArguments, io = processIo()) {
|
|
331
331
|
const serverRequest = settingsRequestForServer(commandArguments, process.env);
|
|
332
332
|
if (!serverRequest) return runSettingsCommand(commandArguments, io);
|
|
333
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
333
|
+
const { askAgentApi } = await import("./agent-api-cli-bNlTz-7w.js");
|
|
334
334
|
const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
|
|
335
335
|
ok: false,
|
|
336
336
|
error: errorMessage(error)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as AgentSettingsRequest } from "./session-B2Wieg0a.js";
|
|
2
2
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
3
|
-
import { C as SETTINGS_INDEX, D as hasScaledUnit, E as displayText, F as SETTINGS_REGISTRY, M as settingsOf, N as valueAtPath, P as FILE_ONLY_GROUPS, f as isSettingAvailable, j as settingsGroupOf, tt as readEnvSecrets, w as cloneValue } from "./config-store-
|
|
3
|
+
import { C as SETTINGS_INDEX, D as hasScaledUnit, E as displayText, F as SETTINGS_REGISTRY, M as settingsOf, N as valueAtPath, P as FILE_ONLY_GROUPS, f as isSettingAvailable, j as settingsGroupOf, tt as readEnvSecrets, w as cloneValue } from "./config-store-BDnviJpb.js";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
//#region server/core/settings-readout-core.ts
|
|
6
6
|
var VALUE_COLUMN_WIDTH = 40;
|
|
@@ -2,7 +2,7 @@ import { r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { O as SIGN_URL_ENV, P as SshSignReply } from "./session-B2Wieg0a.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-DOzlY0Hz.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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bi as e,Gi as t,Hi as n,Ki as r,Ui as i,Vi as a,Wi as o,zi as s}from"./index-
|
|
1
|
+
import{Bi as e,Gi as t,Hi as n,Ki as r,Ui as i,Vi as a,Wi as o,zi as s}from"./index-C6tV2GUb.js";var c=.3,l=null;function u(){return r(l)}function d(e){return t(e,l)}async function f(){try{let e=await fetch(s,{credentials:`same-origin`,cache:`no-store`});e.ok&&(l=o(await e.json()))}catch{}}function p(){let e=new AudioContext;return e.state===`suspended`&&e.resume(),e}function m(e,t){setTimeout(()=>e.close().catch(()=>{}),(t+.1)*1e3)}function h(e){g(a[e]??a.chime)}function g(e){let t=p(),n=t.createGain();n.gain.value=e.peakGain,n.connect(t.destination);let r=t.currentTime,i=0;for(let a of e.tones){let e=r+a.startSeconds,o=e+a.durationSeconds,s=t.createOscillator(),c=t.createGain();s.type=a.waveform,s.frequency.setValueAtTime(a.frequency,e),a.endFrequency&&s.frequency.exponentialRampToValueAtTime(a.endFrequency,o),c.gain.setValueAtTime(.001,e),c.gain.exponentialRampToValueAtTime(a.gain??1,e+.01),c.gain.exponentialRampToValueAtTime(.001,o),s.connect(c),c.connect(n),s.start(e),s.stop(o),i=Math.max(i,a.startSeconds+a.durationSeconds)}m(t,i)}async function _(e){try{let t=await fetch(i(e),{credentials:`same-origin`});return t.ok?await t.arrayBuffer():null}catch{return null}}async function v(e){let t=await _(e);if(!t)return!1;let n=p();try{let e=await n.decodeAudioData(t),r=n.createGain();r.gain.value=c,r.connect(n.destination);let i=n.createBufferSource();return i.buffer=e,i.connect(r),i.start(),m(n,e.duration),!0}catch{return n.close().catch(()=>{}),!1}}var y=[659.25,830.61,987.77,1108.73,987.77,830.61,739.99,659.25,739.99,830.61,987.77,1108.73,987.77,830.61];function b(){try{let e=new AudioContext;if(e.state===`suspended`&&e.resume(),e.state===`suspended`)return;let t=e.createGain();t.gain.value=.05,t.connect(e.destination);let n=.125,r=e.currentTime;for(let i=0;i<y.length;i++){let a=r+i*n,o=e.createOscillator(),s=e.createGain();o.type=`square`,o.frequency.value=y[i],s.gain.setValueAtTime(.001,a),s.gain.exponentialRampToValueAtTime(1,a+.01),s.gain.exponentialRampToValueAtTime(.001,a+n*.9),o.connect(s),s.connect(t),o.start(a),o.stop(a+n)}let i=r+y.length*n;t.gain.setValueAtTime(.05,i-.05),t.gain.exponentialRampToValueAtTime(.001,i),setTimeout(()=>e.close().catch(()=>{}),(i-r+.1)*1e3)}catch{}}function x(){try{h(e)}catch{}}function S(e){try{let t=d(e),r=n(t);if(!r){h(t);return}v(r).then(e=>{e||x()})}catch{}}export{f as loadCustomSounds,S as playAlertSound,b as playNyanJingle,g as playToneSequence,d as resolveSoundId,u as soundOptions};
|