lody 0.111.0 → 0.111.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-interaction-owner-U5gmgHzv.js → acp-interaction-owner-C-E7Jj_j.js} +63 -63
- package/dist/{agent-execution-DND1xdse.js → agent-execution-DKXM8hy_.js} +2 -2
- package/dist/baguette-worker.js +3 -3
- package/dist/chunks/{vendor-@effect-platform-node-shared-C3vEQ-7m.js → vendor-@effect-platform-node-shared-GTij4Yj3.js} +2 -2
- package/dist/chunks/{vendor-@loro-dev-streams-client-B5HWGDv7.js → vendor-@loro-dev-streams-client-WbHLrl2m.js} +2 -2
- package/dist/chunks/{vendor-@loro-dev-streams-crdt-e4yhr5Ky.js → vendor-@loro-dev-streams-crdt-BsFOZws4.js} +7 -8
- package/dist/chunks/{vendor-@opencode-codemode-Bo8uQG1T.js → vendor-@opencode-codemode-DS2pDojq.js} +2 -2
- package/dist/chunks/{vendor-effect-BcqAZ7RD.js → vendor-effect-Bggm7QMO.js} +25 -25
- package/dist/chunks/{vendor-loro-repo-Bn7ZyXGt.js → vendor-loro-repo-FH5_Ccs5.js} +2 -2
- package/dist/chunks/{vendor-ws-DPfDb9HP.js → vendor-ws-DSn-BAa0.js} +6 -6
- package/dist/{client-CEfn-YWo.js → client-CCvHoqKn.js} +63 -63
- package/dist/{cloudflared-native-CDEjYrz5.js → cloudflared-native-C6cs44SH.js} +3 -3
- package/dist/cloudflared-worker.js +5 -5
- package/dist/{daemon-session-tools-DWqlzwmI.js → daemon-session-tools-5WXyyVe4.js} +63 -63
- package/dist/{diff-line-counts-7tSV8pEZ.js → diff-line-counts-CJrMXY2d.js} +2 -2
- package/dist/{diff-worker-task-BOwESZtp.js → diff-worker-task-CVilVhwP.js} +2 -2
- package/dist/diff-worker.js +5 -5
- package/dist/{directory-handle-rZKgRLvJ.js → directory-handle-C9cpH0Mn.js} +3 -3
- package/dist/{dsh-plugins-CU5NOgp8.js → dsh-plugins-DON2RlNE.js} +23 -23
- package/dist/file-index-scan-worker.js +5 -5
- package/dist/{file-lock-BDk2nHD1.js → file-lock-CnN7gNjb.js} +64 -64
- package/dist/{index-CxVpJe-t.js → index-9-5T7zY8.js} +4 -4
- package/dist/{index-CxSGZcPV.js → index-Dpq04zN3.js} +64 -64
- package/dist/{index-2FWwoHbP.js → index-DqAVXjKE.js} +221 -258
- package/dist/{index-DIx0_Tmf.js → index-p6riVneO.js} +72 -72
- package/dist/{index-CHejLb12.js → index-yZ5Xv7WP.js} +64 -64
- package/dist/index.js +69 -69
- package/dist/{machine-identity-restore-DQGAyQGr.js → machine-identity-restore-A8uLX7VW.js} +39 -39
- package/dist/{process-DJHRUC0C.js → process-CJFimK5a.js} +3 -3
- package/dist/{process-options-CwB784qP.js → process-options-D8DB-_Kg.js} +9 -9
- package/dist/{register-Ckv3mOhI.js → register-BNMQne-3.js} +431 -171
- package/dist/{remote-pairing-Betw2bE6.js → remote-pairing-BT-Kw_k3.js} +36 -36
- package/dist/{reset-identity-D_5lqUCh.js → reset-identity-7bUkXE3v.js} +67 -67
- package/dist/{review-viewer-BxgCMlmh.js → review-viewer-COX5NAkB.js} +6 -6
- package/dist/{schedule-command-client-BYBOGR_C.js → schedule-command-client-D_Ti-1Rl.js} +5 -5
- package/dist/{telemetry-3aPi8ATd.js → telemetry-DKZfKfJp.js} +18398 -18109
- package/dist/{workspace-legacy-DYv8EYIc.js → workspace-legacy-C_cxzMuh.js} +545 -322
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cy as getLoroMachineRpcRequestStreamId, bi as LORO_STREAMS_RPC_RETENTION_SECONDS, dQ as LoroStreamsTokenAuthError, ca as LoroStreamsGatewayError, cf as LoroStreamsRpcRequestSchema, bj as LORO_STREAMS_RPC_VERSION, bh as LORO_STREAMS_RPC_ERROR_CODES, b7 as LocalMachineRpcRequestSchema, b4 as isE2eeReadQuery, b5 as isOwnerScopedEncryptedRpcMethod, b9 as encryptCodeCollabV2RpcPayload, b8 as LocalMachineRpcResponseSchema, b6 as decryptCodeCollabV2RpcPayload, ch as LoroStreamsRpcResponseSchema, cd as LoroStreamsRpcHandlerError, cu as encryptRpcSecret, cv as getAndroidEmulatorViewerSecretContext, dR as AndroidEmulatorRemoteResponseSchema, cx as getIosSimulatorViewerSecretContext, dS as FilePreviewV3RequestSchema, dT as filePreviewV3Error, dU as FileDownloadRequestSchema, ba as CodeCollabV2LspRpcParamsSchema, dV as CodeCollabReadBlobRequestSchema, dW as CodeCollabOpenDiffManifestRequestSchema, cj as SessionHistoryWriteRpcPayloadSchema, ci as SessionHistoryReadRpcPayloadSchema, dB as normalizeSessionTurnInputConfig, cl as createRpcSecretRecipient, cC as getMachineAcpAuthorizationCodeSecretContext, cB as getMachineAcpAuthenticationInputSecretContext, bS as LoroSessionAutomationControlPayloadSchema, cw as getAutomationResponseSecretContext, K as remoteAutomationSecretEnvelopeSchema, dX as FilePreviewV3ErrorCodeSchema, dY as FileLockCleanupFailed, dZ as LockReleaseFailed, d_ as LockOwnershipLost, d$ as LocalProjectControlRequestSchema, A as AUTOMATION_CONTROL_PATH, g as automationControlRequestSchema, e0 as LOCAL_E2EE_RESET_PATH, e1 as LocalE2eeResetRequestSchema, e2 as LocalE2eeResetResponseSchema, e3 as LOCAL_E2EE_PAIRING_PATH, e4 as LocalE2eePairingRequestSchema, e5 as LocalE2eePrepareReplySchema, e6 as LocalE2eeActivateResponseSchema, e7 as LocalE2eeRecoveryFailureSchema, e8 as LocalE2eePairingFailureSchema, e9 as LOCAL_SCHEDULE_CONTROL_PATH, ea as ScheduleControlRequestSchema, eb as LOCAL_SESSION_CONTROL_PATH, ec as LOCAL_MACHINE_RPC_PATH, ed as LOCAL_PROJECT_CONTROL_PATH, ee as safeParseLocalSessionControlRequest, ef as LocalSessionControlResponseSchema, eg as safeParseLocalMachineRpcRequest, eh as safeParseLocalProjectControlRequest, ei as LocalProjectControlResponseSchema, ej as LOCAL_CONTROL_HEADER, ek as LOCAL_SESSION_CONTROL_STREAM_MEDIA_TYPE, el as getLocalProbeSocketPath, em as getLocalControlSocketPath, en as getLocalDaemonRunFilePath, eo as getLocalDaemonLockFilePath, ep as ensureLocalDaemonRunDir, d7 as getServerNow, eq as writeLocalDaemonRunFile, er as removeLocalDaemonRunFile, es as getLocalLoroDataPlaneSocketPath, et as createJsonLineSplitter, eu as LOCAL_LORO_DATA_PLANE_MAX_FRAME_BYTES, ev as LOCAL_LORO_DATA_PLANE_PROTOCOL_VERSION, ew as makeNodeLocalLoroWriterConnection, ex as LocalLoroDataPlaneClientMessageSchema, ey as localProjectsLegacy, ez as getLocalProjectNameFromRootPath, eA as applyProjectSkillsResultBudget, eB as isBinaryImagePath, eC as deriveRepoIdFromGitHubRepo, eD as getWorktreeHostPathFromDotlodyPath, eE as ALL_KNOWN_GLOBAL_SKILL_DIRS, eF as ALL_KNOWN_SYSTEM_SKILL_DIRS, eG as buildProjectSkill, eH as LODY_SUBAGENT_EVENT_METHOD, eI as isLodySubagentEvent, eJ as isLodyPromptSuggestion, eK as normalizePersistedRateLimit, eL as isAskUserQuestionPermissionRequest, eM as SorbetProviderIdSchema, eN as SORBET_CREDENTIALS_MAX_COUNT, eO as SorbetCustomProviderProtocolSchema, eP as SORBET_CUSTOM_PROVIDER_MODELS_MAX_COUNT, eQ as SorbetCredentialTypeSchema, cE as isNodeApiVersionSupported, cG as isNodeSecurityVersionSupported, eR as MCP_HTTP_PREFERRED_PORT_ENV, eS as MCP_HTTP_TOKEN_ENV, eT as McpHttpHostHandshakeSchema, eU as captureCli, eV as readAcpModelCapabilitiesMeta, eW as deriveModelReasoningEffortsFromLegacyModelIds, eX as parseSessionNotification, eY as buildLodyMcpHttpHeaders, aP as LODY_AUTH_URL, aT as LODY_AUTH_SITE_URL, eZ as LODY_SERVER_URL, e_ as WorkspaceSyncUnavailableError, e$ as formatMcpResolutionProblem, f0 as parseAskUserQuestionElicitationRequest, f1 as buildAskUserQuestionElicitationResponse, f2 as parseDevinSubagentTaskMeta, f3 as getDevinSubagentContextId, f4 as hasOtherDevinSubagentMeta, f5 as sanitizeGoalObjective, f6 as trustsUntaggedAcpSessionTitle, f7 as ACP_INIT_TIMEOUT_MS, f8 as ACP_NEW_SESSION_TIMEOUT_MS, f9 as startTraceSpan, fa as withSlowOperationWarning, fb as MODEL_THOUGHT_LEVEL_META_KEY, c$ as reportError, fc as normalizeMagpieGateway, fd as MAGPIE_TOKEN, fe as getRegistryAcpLaunchKind, cP as getCliHttpFetch, ff as resolveProxyUrl, fg as resolveCliHttpTransportConfig, fh as getManagedBuiltinRuntimeByRuntimeName, fi as CURRENT_MACHINE_PROTOCOL_CAPABILITIES, fj as MACHINE_PROTOCOL_CAPABILITIES, fk as PI_EXTENSIONS_PROTOCOL_VERSION, fl as githubCredentialRuntime, fm as DEEPSEEK_HARNESS_PERMISSION_PRESETS, fn as DEEPSEEK_HARNESS_DEFAULT_PERMISSION_PRESET, fo as DEEPSEEK_HARNESS_OFFICIAL_BASE_URL_PATTERN, fp as DEEPSEEK_HARNESS_OFFICIAL_BASE_URL, fq as getDeepSeekHarnessProviderHome, f as fileLocksLegacy, fr as isManagedBuiltinAgentType, fs as getManagedBuiltinRuntimeByAgentType, ft as isBuiltinAgentType, fu as REGISTRY_ACP_AGENTS, fv as getBuiltinRuntimeOverrideSourceVersionSuffix, fw as serializeCustomAcpLaunchSpec, fx as DEEPSEEK_HARNESS_BASE_URL_ENV, fy as ACP_NPX_STARTUP_MAX_ATTEMPTS, fz as ACP_COLD_NPX_INIT_TIMEOUT_MS, fA as assertManagedCodexProfileConfig, fB as CodexAuthProfileSchema, fC as normalizeCodexEndpoint, fD as getLoginShellEnvLegacy, fE as ACP_STARTUP_QUEUE_WAIT_TIMEOUT_MS, fF as isSensitiveAcpConfigOptionId, fG as getLocalProjectHistoryProviderKey, fH as getExternalAcpHistoryImportKey, a_ as getSessionRoomId, a$ as isLoroRepoDocDeleted, fI as isActiveSessionStatus, dd as createSessionBackend, a3 as areStringArraysEqual, aL as storedBaselineHashes, ai as hashHistoryForStoredVersion, aa as decideHistoryConflictResolution, df as SYNC_CONFIRMATION_TIMEOUT_MS, fJ as matchesHistoryProviderBinding, di as getMachineRoomId, fK as withMachineCatalogWriteLock, fL as NEW_SESSION_HISTORY_BACKEND, fM as SessionStatusFactory, fN as readMachineLocalProjects, fO as upsertMachineLocalProject, fP as getLocalProjectHistoryCatalogKey, fQ as buildHistoryReplayImport, ah as hashHistoryEntryV2, P as HASH_VERSION, aj as hashText, fR as isSessionHistoryPendingForDispatch, aD as resolveImportHashVersion, aE as resolveImportedTurnHashes, dO as isSessionDocRoomId, fS as sanitizeLodyInternalInstructions, F as FileLocks, fT as squashFileLockFailure, fU as LockIoError, fV as LockReentrant, fW as LockTimeout, fX as redactUrlAuth, fY as getLocalDaemonSocketPath, fZ as createUtf8StreamDecoder, f_ as TerminalClientMessageSchema, f$ as FILE_DOWNLOAD_MAX_BYTES, g0 as FILE_DOWNLOAD_CHUNK_BYTES, g1 as SessionLocalAttachmentSchema, g2 as buildManagedPreviewViewerUrl, g3 as setPreviewQueryParamInUrl, g4 as classifyBrowserHostname, g5 as removePreviewQueryParamFromSearch, g6 as VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT, g7 as PREVIEW_ACCESS_TOKEN_QUERY_PARAM, g8 as sanitizePreviewProxyResponseHeaders, g9 as applyPreviewEmbeddingHeaders, ga as DEFAULT_PREVIEW_RESOURCE_LIMITS, gb as PREVIEW_ACCESS_TOKEN_COOKIE, gc as DEFAULT_PREVIEW_IDLE_TIMEOUT_MS, gd as DevicePreviewControlRequestSchema, ge as simulatorRtcChunks, gf as SimulatorOfferSchema, gg as SimulatorIceServersSchema, d9 as ScheduleRepository, dG as scheduleDefinitionFingerprint, gh as hasPendingUserTurnActivation, gi as readSessionOperationTargets, gj as buildSessionArchiveMetaPatch, gk as buildGitHubCloneUrl, gl as reconcileProjectMemberLink, gm as projectRunMetaPatch, gn as removeProjectMemberLinks, go as MemoryProviderRequestSchema, gp as MemoryBindingSchema, Z as addSessionTurnTokenUsage, am as isEmptySessionTurnTokenUsage, cX as version$d, gq as isMissingEmail, gr as getCachedLoginShellEnvSyncLegacy, gs as supportsBuiltinProviderSetup, gt as hasBuiltinRuntimeOverrideValues, gu as hasEmptyModelSelectOption, dk as getMachineFlockDocId, gv as getMachineFlockProviderSetups, dm as readMachineFlockRowsFromFlock, gw as getMachineFlockProviderSetupCancellations, gx as applyProviderSetupCancellationToFlock, gy as getMachineFlockAgentConfigs, gz as machineFlockKeys, gA as writeMachineFlockRowToFlock, gB as deleteMachineFlockRowFromFlock, gC as encodeCodexProfileConfig, gD as findBuiltinAgentOptOutToRetract, gE as streamsRoomBinding, gF as isRecoverableStreamsRoomStatus, gG as computeLoroReconnectDelayMs, aV as normalizeBaseUrl$1, aU as deriveConvexSiteUrl, gH as isLodySubagentOutput, gI as MessageContentSchema, gJ as parseHistoryWrite, gK as ToolCallContentSchema, gL as HistoryWriteError, gM as captureMessage, gN as deriveLocationsFromToolCallContent, gO as parseLodyTaskMeta, gP as buildMessageContentFromNotification, gQ as truncateTerminalOutputForHistory, gR as hasBuiltinEnvAuthentication, gS as ACP_AUTH_ID_MAX_LENGTH, gT as ACP_AUTH_TEXT_MAX_LENGTH, gU as ACP_AUTHENTICATION_FORM_MAX_BYTES, gV as ACP_AUTHORIZATION_URL_MAX_LENGTH, gW as ACP_AUTH_FORM_FIELD_MAX_COUNT, gX as ACP_AUTH_LABEL_MAX_LENGTH, gY as getLodyElicitationMeta, gZ as ACP_AUTH_SELECT_OPTION_MAX_COUNT, g_ as isAcpAuthenticationFormWithinByteLimit, g$ as parseLodyMessagePhase, h0 as computeTitleGenerationDefaults, h1 as DEFAULT_TITLE_GENERATION_PROMPT, h2 as LODY_PRESENCE_HEARTBEAT_MS, h3 as isErrorReportingEnabled, h4 as hashAnalyticsId, h5 as getWorktreeSetupScriptForShell, h6 as resolveWorktreeSetupShellForPlatform, h7 as DEFAULT_WORKTREE_SETUP_TIMEOUT_MS, h8 as DEFAULT_WORKTREE_CLEANUP_TIMEOUT_MS, h9 as LODY_HELP_INSTRUCTIONS, ha as PiExtensionDiscoverySchema, hb as resolveSessionHistoryStatus, hc as resolveSessionAcpTargetId, hd as isSessionCancelRequestMarker, he as getSessionCancelRequestMarker, hf as historyItemsToInputBlocks, hg as normalizeSessionInputBlocks, hh as extractPromptPreviewFromInputBlocks, hi as getPendingUserTurnActivationId, hj as getSessionLaunchConfigLegacyFields, hk as buildSessionLaunchConfig, hl as mergeSessionLaunchConfig, hm as getMachineFlockSessionLaunchConfig, hn as withTimeout$2, ho as ConcurrentQueue, hp as isSubscriptionQuotaEligible, hq as traceAsync, hr as getSteerOperationId, hs as resolveSessionExecutionInputBlocks, ht as createLocalProjectBranchSelector, hu as resolveWorkspaceLocalProjectRootPathWithRetry, hv as readLocalProjectRootResolveSyncTimeoutMs, hw as resolveProjectGitHubRepo, hx as isSessionCollaborationStopped, hy as batchHistoryMembers, ac as findProgressMessageId, hz as batchPreview, hA as createReplayPromptBuilder, hB as isReplayEntryExcluded, hC as resolveBaseBranchPreference, hD as resolveResumableAcpSessionId, hE as hasRecentResumeNotice, hF as acpOwnsSessionTitleGeneration, hG as resolveSessionAuthoredText, hH as resolveProjectFileRoots, hI as resolveActiveAssistantTurnId, hJ as decideAcpCapabilityRefreshCache, hK as usesAcpProtocolAuthentication, hL as subscribeSessionChanges, hM as SESSION_DOC_PREFIX, hN as buildPendingUserHistoryEntry, hO as listAliveRoomIds, hP as mapWithConcurrency, hQ as turnNotificationAudience, hR as verifyMachineAccessWithRetry, hS as buildMissingEmail, hT as buildSessionTurnInputConfig, hU as normalizeMcpServerIdSelection, hV as sameDispatchEntry, hW as AgentConfigCliTypeSchema, hX as ProjectRefSchema, hY as sessionForkFailure, hZ as LEGACY_SESSION_HISTORY_BACKEND, aA as readSessionHistoryMetadata, h_ as resolveSessionMcpSelection, h$ as resolveSessionConversationConfig, i0 as resolveSessionAcpRuntimeConfig, i1 as sessionEditAndResendFailure, aC as resolveEditableTail, i2 as isSessionGoalActive, ad as getOperationProgressTargetKey, i3 as readChatFailureNotice, i4 as describeChatFailure, i5 as makeLodyError, ae as getOperationProgressTurnId, i6 as inboxScopeKey, i7 as InboxAdmissionRejected, i8 as inboxFailureDiagnostic, i9 as INBOX_INLINE_MEMBERS, ia as OrchestrationDatabase, ib as LodyOperationStore, ic as getLodyOperationStorePath, id as LodyOperationStoreError, ie as isMemberAccessSnapshotFresh, ig as resolveSessionPullRequests, ih as isAcpFastModeConfigId, ii as ACP_REASONING_EFFORT_CONFIG_ID, ij as isAcpPlanModeConfigOption, ik as isAcpThoughtLevelConfigOption, il as ACP_PLAN_PERMISSION_MODE_ID, im as readPullRequestLifecycle, io as resolveProjectFileTarget, ip as readTimeoutEnv, iq as CODE_COLLAB_DIFF_BLOB_LIMITS, ir as FILE_PREVIEW_V3_LIMITS, is as FILE_PREVIEW_PROTOCOL_VERSION, it as getImageMimeTypeForPath, iu as sanitizeAttachmentFileName, iv as SESSION_FILE_MAX_SIZE_BYTES, iw as SESSION_FILE_PREVIEW_SNIFF_BYTES, ix as isTextPreviewable, iy as SESSION_IMAGE_MAX_SIZE_BYTES, iz as SESSION_IMAGE_ALLOWED_MIME_TYPES, iA as PreviewControlProofSchema, iB as PREVIEW_CREATE_RATE_LIMIT_MAX, iC as DEFAULT_PREVIEW_MAX_ACTIVE_TUNNELS_PER_MACHINE, iD as PREVIEW_CREATE_RATE_LIMIT_WINDOW_MS, iE as assertEncryptedImageReference, iF as readEncryptedAttachment, iG as buildSessionImageApiUrl, iH as getSessionImageDownloadApiPath, iI as encryptedAttachmentPath, iJ as getSessionFileDownloadApiPath, iK as listWorkspaceGitHubRepositoriesForCliToken, aS as makeLocalWorkspaceCatalog, iL as getCodeCollabFileIndexSignalFlockDocId, iM as getCodeCollabFileIndexFlockDocId, ck as createLoroStreamsJsonStreamClient, cM as LORO_STREAMS_BUCKET_ID, iN as getProjectRefBranch, iO as readMessageAuthor, iP as resolveSessionMessageAuthor, iQ as SessionAttachmentTransfer, iR as ATTACHMENTS_DIR_RELATIVE, iS as ensureAttachmentsGitExcluded, iT as buildAttachmentFileName$1, iU as buildAttachmentPromptText, iV as getSessionFileBlobPath, iW as buildSessionFileApiUrl, iX as buildUnavailableAttachmentPromptText, iY as formatAgentSenderHeader, iZ as formatCommentReferenceForPrompt, i_ as formatVisualAnnotationReferenceForPrompt, i$ as readLocalSessionImage, j0 as resolveWorkspaceLocalProjectRootPath, aZ as getSessionCommandEnvironment, aR as resolveWorkspaceOrThrow, j1 as hasAgentRunConfigSelection, j2 as shouldBypassSessionQuota, j3 as createSessionResult, j4 as sendSessionChatResult, j5 as getDeviceTimeZone, j6 as SORBET_PROVIDERS_REMOTE_PROTOCOL_VERSION, j7 as SORBET_CREDENTIALS_REMOTE_PROTOCOL_VERSION, j8 as SORBET_PROVIDERS_PROTOCOL_VERSION, j9 as SORBET_CREDENTIALS_PROTOCOL_VERSION, ja as E2EE_ACP_INTERACTION_PROTOCOL_VERSION, jb as getSessionIdFromRoomId, jc as parseMachineFlockKey, jd as listAliveSessionMetas, je as isSessionInLocalProjectRemovalScope, jf as resolveWorkspaceLocalProject, jg as shouldApplyMachineDeleteLocalProjectCommand, jh as getWorkspaceFlockDocId, ji as listWorkspaceProjects, jj as readWorkspaceFlockRowsFromFlock, jk as isLocalProjectReferenced, jl as removeMachineLocalProject, jm as truncateToolTitleForHistory, aM as summarizeHistoryQuery, jn as deriveRepoIdFromGitHubRepo$1, jo as runWithDaemonWorkspace, jp as runWithSessionCommandEnvironment, jq as createLocalSessionCommandEnvironment, jr as storeLocalSessionImage, js as HistoryEntryWriteSchema, jt as PermissionOutcomeSchema, ju as SESSION_IMAGE_MAX_COUNT, d5 as inputBlocksToHistoryItems, jv as SESSION_FILE_MAX_COUNT, jw as copyIntoSessionFileBlobStore, jx as readHistoryEntry, jy as readLocalSessionImageReceipt, jz as sessionFileBlobExists, jA as readSessionFileBlobBackfillReceipt, jB as markSessionFileBlobBackfilled, jC as getSessionFileBlobAgeMs, jD as getDraftSessionFileBlobMaxAgeMs, jE as removeSessionFileBlob, jF as writeSessionFileBlobBackfillMarker, jG as listLocalSessionImages, jH as listPendingLocalSessionFiles, jI as parseAskUserQuestionPermissionMeta, jJ as PERMISSION_REQUEST_TIMEOUT_MS, jK as getAskUserQuestionPermissionDisplayTitle, ay as readLatestUserId, jL as prepareCliStreamsGatewayBaseUrl, jM as resolveWorkspaceLocalProjectWithSyncOnMiss, jN as resolveNotificationPresentation, jO as notificationReplyPreview, jP as buildLiveActivityConversationItems, jQ as countLiveActivityConversationStatuses, jR as countLiveActivityConversationCandidates, jS as buildLodyConversationsLiveActivityId, jT as writeLocalSessionImageReceipt, jU as getMachineFlockDeleteLocalProjectEntries, jV as LODY_CONVERSATIONS_LIVE_ACTIVITY_SCHEMA_VERSION, jW as GitHubTokenFetchError, jX as canReadProcNetTcp, jY as McpLocalAuthenticationSchema, jZ as lookupLoopbackPeerUid, j_ as publicMcpServer, j$ as resolveSessionMcpServers, cV as makeApplicationRuntime, k0 as assertPublicMcpServer, k1 as getWorkspaceMcpCatalog, k2 as waitForMcpCatalogBaseline, X as SessionHistoryContentPatchSchema, V as SESSION_DIRECTORY_INPUT_CONFIG_KEYS, aw as projectRoostSegments, k3 as isDispatchCandidate, k4 as dispatchEntry, k5 as selectDispatchHistory, ar as pickDirectoryInputConfig, al as historyQueryRow, as as pickDirectoryScalars, k6 as resolveLatestSessionGoalFromHistory, k7 as registerSessionBackendFactory, k8 as createRoostSessionBackendFactory, k9 as captureStoredHistory, av as planHistoryImport, ag as hashHistoryEntryForVersion, a6 as createImportCursor, at as planEditableTailReplacement, ka as matchesRollbackReceipt, U as ROOST_CLEAR_FIELDS_KEY, kb as prepareReplacement, kc as isSessionHistoryStatusAwaitingStart, ao as markTurnSeenBlocked, $ as applyMarkTurnSeen, a8 as createRoostDirectoryRow, kd as inheritHistoryStreamText, ke as latestSessionModel, au as planHistoryAction, ak as historyActionTarget, aH as selectHistoryActionRows, kf as prepareStoredHistoryCopy, kg as targetLocalHistoryTargets, aG as selectAgentHistoryRows, kh as planAgentHistoryMutation, a5 as createAssistantTurn, a0 as applyOpenAssistantTurn, aI as selectTranscriptHistoryPositions, aJ as selectTurnOutput, ki as pkg, kj as workspaceSupports, kk as routeRemoteOwnedSessionHistory, kl as createCommandSessionHistoryFactory, km as LoroDocumentManager, dp as getScheduleRoomId, kn as planPullRequestLifecycle, ko as collectViewedSessionIdsFromPresence, kp as TERMINAL_MAX_PER_SESSION, kq as LODY_MACHINE_MONITOR_WINDOWS_SAMPLE_MS, kr as LODY_MACHINE_MONITOR_MACOS_SAMPLE_MS, ks as LODY_MACHINE_MONITOR_UNIX_SAMPLE_MS, kt as quotaReservationIdentity, ku as evaluateSchedule, kv as scheduleRunKey, kw as scheduleRunIds, kx as manualScheduleRunKey, ky as SCHEDULE_RETRY_DELAYS_MS, da as getScheduleRegistryFlockDocId, kz as scheduleRegistryKeys, dg as ScheduleRuntimeRowSchema, kA as canonicalScheduleJson, kB as commitPreparedSessionDispatch, kC as isPreparedSessionDispatched, kD as materializePreparedSessionInput, kE as ScheduledMessageSchema, kF as notificationLabel, de as readMergedAgentConfigById, dl as getMachineFlockLocalProjects, kG as OrchestrationConnection, u as automationRegistrationSchema, v as automationResultSchema, x as automationRuleDraftSchema, k as automationEventSchema, e as automationContinuationSchema, n as automationInvocationSchema, s as automationReadRequestSchema, i as automationEmptyReadParametersSchema, j as automationEventReadParametersSchema, t as automationReadResponseSchema, o as automationOriginSchema, kH as resolveTurnDispatchDefaultsFromHistory, kI as resolveAgentRoleCreateFromCatalog, kJ as applyAgentRoleCreateTarget, kK as prepareSessionInput, c as automationCommandSchema, H as remoteAutomationOperationSchema, I as remoteAutomationProofSchema, G as remoteAutomationIntentSchema, kL as startTimeSyncLegacy, kM as initCliAnalytics, kN as ensureImplicitLocalWorkspace, kO as localCatalogWorkspaceToWorkspaceListItem, kP as closeProcessLocalLoroWriterLegacy, kQ as reconcileMachineLocalProjectRootPaths, kR as listMergedAgentConfigs, kS as findWorkspacesBySelector, kT as formatWorkspaceCandidate, dx as isCloudE2eeMemberRemoved, dy as isCloudE2eeDeviceRevoked, kU as SUPPORTED_CLI_TYPES, kV as CLI_STORAGE_WRITE_FAILED_ISSUE_CODE, kW as formatLocalLogDate, kX as pickDailyLogAppendName, kY as formatDailyLogLine, kZ as registerProcessExitTrace, k_ as getCliPlatformKind, k$ as applyLocalPlatformEnv, l0 as AuthClient, l1 as captureAgentServiceEvent, l2 as getOrCreateStableMachineIdAsync, l3 as loadOrCreateLocalIdentity, l4 as performLoginWithAuthCredential, l5 as isMachinePairingCredential, l6 as performLogin, l7 as flushTelemetry, l8 as createLocalCloudPort, l9 as createCloudCliPort, la as captureCliActiveUser, lb as captureCliActivePing, lc as ACTIVE_PING_MIN_INTERVAL_MS$1, ld as SITE_URL, c_ as closeLoginShellApplicationLegacy, le as registerProcessCleanup, lf as unregisterProcessCleanup, lg as runOneShotCommand, lh as printJson, li as ensureDaemonReachable, lj as DAEMON_NOT_RUNNING_MESSAGE, aN as makeLocalControlClientAuto, aQ as getAuthContextOrThrow, lk as openBrowser, ll as captureAuthEvent, lm as isRetryableTokenValidationFailure, ln as isTokenValidationUnavailable, lo as addDiscoveryOptions, lp as runDiscoveryList, lq as renderTerminalTable, d8 as ScheduleCommandSchema, lr as collectScheduleIds, ls as resolveStructuredOutputMode, lt as listWorkspacesForToken, dq as withWorkspaceManager, lu as listAliveDocMetas, lv as isMachineDocRoomId, lw as classifyMachinePresence, lx as ACP_CAPABILITY_ROW_FAMILIES, ly as getMachineFlockAcpCapabilities, lz as getMachineFlockRateLimits, lA as parseRateLimitEntryKey, lB as buildSessionLink, lC as normalizeSessionLinksForExport, lD as api, lE as listWorkspaceCandidates, lF as syncWorkspaceMetaForRead, lG as syncDocForRead, lH as createSessionMirror, dw as ScheduleDefinitionSchema, lI as buildScheduleRegistryRow, lJ as WorkspaceStreamsConfigurationError, lK as requirePlaintextWorkspaceStreamsContent, lL as getLoroStreamIdForDocId, lM as streamsSnapshotCodec, lN as getLoroStreamsShardUrls, cO as getLoroMetaStreamId, cL as createLoroStreamUrl, lO as selectWorkspaceSummary, lP as createCloudStreamsTokenPort, lQ as registerMachineAccessForCliToken, lR as createLoroStreamsTokenProviderLegacy, lS as makeLocalProbeClientAuto, lT as captureDaemonEvent, lU as captureSupervisorEvent, lV as submitAgentFeedback, lW as discoveryListCommand, lX as syncMcpCatalog, lY as listWorkspaceMcpCatalog, lZ as normalizeCliValue, l_ as upsertWorkspaceMcpCatalogEntry, l$ as deleteWorkspaceMcpCatalogEntry, m0 as parseEnvAssignments, m1 as ENV_VAR_NAME_PATTERN, m2 as OperationListQuerySchema, m3 as runWithOperationStoreBusyRetry, m4 as sessionCommand, m5 as agentConfigCommand, m6 as agentRoleCommand, cY as internalCommand } from "./telemetry-3aPi8ATd.js";
|
|
1
|
+
import { cy as getLoroMachineRpcRequestStreamId, bi as LORO_STREAMS_RPC_RETENTION_SECONDS, dQ as LoroStreamsTokenAuthError, ca as LoroStreamsGatewayError, cf as LoroStreamsRpcRequestSchema, bj as LORO_STREAMS_RPC_VERSION, bh as LORO_STREAMS_RPC_ERROR_CODES, b7 as LocalMachineRpcRequestSchema, b4 as isE2eeReadQuery, b5 as isOwnerScopedEncryptedRpcMethod, b9 as encryptCodeCollabV2RpcPayload, b8 as LocalMachineRpcResponseSchema, b6 as decryptCodeCollabV2RpcPayload, ch as LoroStreamsRpcResponseSchema, cd as LoroStreamsRpcHandlerError, cu as encryptRpcSecret, cv as getAndroidEmulatorViewerSecretContext, dR as AndroidEmulatorRemoteResponseSchema, cx as getIosSimulatorViewerSecretContext, dS as FilePreviewV3RequestSchema, dT as filePreviewV3Error, dU as FileDownloadRequestSchema, ba as CodeCollabV2LspRpcParamsSchema, dV as CodeCollabReadBlobRequestSchema, dW as CodeCollabOpenDiffManifestRequestSchema, cj as SessionHistoryWriteRpcPayloadSchema, ci as SessionHistoryReadRpcPayloadSchema, dB as normalizeSessionTurnInputConfig, cl as createRpcSecretRecipient, cC as getMachineAcpAuthorizationCodeSecretContext, cB as getMachineAcpAuthenticationInputSecretContext, bS as LoroSessionAutomationControlPayloadSchema, cw as getAutomationResponseSecretContext, K as remoteAutomationSecretEnvelopeSchema, dX as FilePreviewV3ErrorCodeSchema, dY as FileLockCleanupFailed, dZ as LockReleaseFailed, d_ as LockOwnershipLost, d$ as LocalProjectControlRequestSchema, A as AUTOMATION_CONTROL_PATH, g as automationControlRequestSchema, e0 as LOCAL_E2EE_RESET_PATH, e1 as LocalE2eeResetRequestSchema, e2 as LocalE2eeResetResponseSchema, e3 as LOCAL_E2EE_PAIRING_PATH, e4 as LocalE2eePairingRequestSchema, e5 as LocalE2eePrepareReplySchema, e6 as LocalE2eeActivateResponseSchema, e7 as LocalE2eeRecoveryFailureSchema, e8 as LocalE2eePairingFailureSchema, e9 as LOCAL_SCHEDULE_CONTROL_PATH, ea as ScheduleControlRequestSchema, eb as LOCAL_SESSION_CONTROL_PATH, ec as LOCAL_MACHINE_RPC_PATH, ed as LOCAL_PROJECT_CONTROL_PATH, ee as safeParseLocalSessionControlRequest, ef as LocalSessionControlResponseSchema, eg as safeParseLocalMachineRpcRequest, eh as safeParseLocalProjectControlRequest, ei as LocalProjectControlResponseSchema, ej as LOCAL_CONTROL_HEADER, ek as LOCAL_SESSION_CONTROL_STREAM_MEDIA_TYPE, el as getLocalProbeSocketPath, em as getLocalControlSocketPath, en as getLocalDaemonRunFilePath, eo as getLocalDaemonLockFilePath, ep as ensureLocalDaemonRunDir, d7 as getServerNow, eq as writeLocalDaemonRunFile, er as removeLocalDaemonRunFile, es as getLocalLoroDataPlaneSocketPath, et as createJsonLineSplitter, eu as LOCAL_LORO_DATA_PLANE_MAX_FRAME_BYTES, ev as LOCAL_LORO_DATA_PLANE_PROTOCOL_VERSION, ew as makeNodeLocalLoroWriterConnection, ex as LocalLoroDataPlaneClientMessageSchema, ey as localProjectsLegacy, ez as getLocalProjectNameFromRootPath, eA as applyProjectSkillsResultBudget, eB as isBinaryImagePath, eC as deriveRepoIdFromGitHubRepo, eD as getWorktreeHostPathFromDotlodyPath, eE as ALL_KNOWN_GLOBAL_SKILL_DIRS, eF as ALL_KNOWN_SYSTEM_SKILL_DIRS, eG as buildProjectSkill, eH as LODY_SUBAGENT_EVENT_METHOD, eI as isLodySubagentEvent, eJ as isLodyPromptSuggestion, eK as normalizePersistedRateLimit, eL as isAskUserQuestionPermissionRequest, eM as SorbetProviderIdSchema, eN as SORBET_CREDENTIALS_MAX_COUNT, eO as SorbetCustomProviderProtocolSchema, eP as SORBET_CUSTOM_PROVIDER_MODELS_MAX_COUNT, eQ as SorbetCredentialTypeSchema, cE as isNodeApiVersionSupported, cG as isNodeSecurityVersionSupported, eR as MCP_HTTP_PREFERRED_PORT_ENV, eS as MCP_HTTP_TOKEN_ENV, eT as McpHttpHostHandshakeSchema, eU as captureCli, eV as readAcpModelCapabilitiesMeta, eW as deriveModelReasoningEffortsFromLegacyModelIds, eX as parseSessionNotification, eY as buildLodyMcpHttpHeaders, aP as LODY_AUTH_URL, aT as LODY_AUTH_SITE_URL, eZ as LODY_SERVER_URL, e_ as WorkspaceSyncUnavailableError, e$ as formatMcpResolutionProblem, f0 as parseAskUserQuestionElicitationRequest, f1 as buildAskUserQuestionElicitationResponse, f2 as parseDevinSubagentTaskMeta, f3 as getDevinSubagentContextId, f4 as hasOtherDevinSubagentMeta, f5 as sanitizeGoalObjective, f6 as trustsUntaggedAcpSessionTitle, f7 as ACP_INIT_TIMEOUT_MS, f8 as ACP_NEW_SESSION_TIMEOUT_MS, f9 as startTraceSpan, fa as withSlowOperationWarning, fb as MODEL_THOUGHT_LEVEL_META_KEY, c$ as reportError, fc as normalizeMagpieGateway, fd as MAGPIE_TOKEN, fe as getRegistryAcpLaunchKind, cP as getCliHttpFetch, ff as resolveProxyUrl, fg as resolveCliHttpTransportConfig, fh as getManagedBuiltinRuntimeByRuntimeName, fi as CURRENT_MACHINE_PROTOCOL_CAPABILITIES, fj as MACHINE_PROTOCOL_CAPABILITIES, fk as PI_EXTENSIONS_PROTOCOL_VERSION, fl as githubCredentialRuntime, fm as DEEPSEEK_HARNESS_PERMISSION_PRESETS, fn as DEEPSEEK_HARNESS_DEFAULT_PERMISSION_PRESET, fo as DEEPSEEK_HARNESS_OFFICIAL_BASE_URL_PATTERN, fp as DEEPSEEK_HARNESS_OFFICIAL_BASE_URL, fq as getDeepSeekHarnessProviderHome, f as fileLocksLegacy, fr as isManagedBuiltinAgentType, fs as getManagedBuiltinRuntimeByAgentType, ft as isBuiltinAgentType, fu as REGISTRY_ACP_AGENTS, fv as getBuiltinRuntimeOverrideSourceVersionSuffix, fw as serializeCustomAcpLaunchSpec, fx as DEEPSEEK_HARNESS_BASE_URL_ENV, fy as ACP_NPX_STARTUP_MAX_ATTEMPTS, fz as ACP_COLD_NPX_INIT_TIMEOUT_MS, fA as assertManagedCodexProfileConfig, fB as CodexAuthProfileSchema, fC as normalizeCodexEndpoint, fD as getLoginShellEnvLegacy, fE as ACP_STARTUP_QUEUE_WAIT_TIMEOUT_MS, fF as isSensitiveAcpConfigOptionId, fG as getLocalProjectHistoryProviderKey, fH as getExternalAcpHistoryImportKey, a_ as getSessionRoomId, a$ as isLoroRepoDocDeleted, fI as isActiveSessionStatus, dd as createSessionBackend, a3 as areStringArraysEqual, aL as storedBaselineHashes, ai as hashHistoryForStoredVersion, aa as decideHistoryConflictResolution, df as SYNC_CONFIRMATION_TIMEOUT_MS, fJ as matchesHistoryProviderBinding, di as getMachineRoomId, fK as withMachineCatalogWriteLock, fL as NEW_SESSION_HISTORY_BACKEND, fM as SessionStatusFactory, fN as readMachineLocalProjects, fO as upsertMachineLocalProject, fP as getLocalProjectHistoryCatalogKey, fQ as buildHistoryReplayImport, ah as hashHistoryEntryV2, P as HASH_VERSION, aj as hashText, fR as isSessionHistoryPendingForDispatch, aD as resolveImportHashVersion, aE as resolveImportedTurnHashes, dO as isSessionDocRoomId, fS as sanitizeLodyInternalInstructions, F as FileLocks, fT as squashFileLockFailure, fU as LockIoError, fV as LockReentrant, fW as LockTimeout, fX as redactUrlAuth, fY as getLocalDaemonSocketPath, fZ as createUtf8StreamDecoder, f_ as TerminalClientMessageSchema, f$ as FILE_DOWNLOAD_MAX_BYTES, g0 as FILE_DOWNLOAD_CHUNK_BYTES, g1 as SessionLocalAttachmentSchema, g2 as buildManagedPreviewViewerUrl, g3 as setPreviewQueryParamInUrl, g4 as classifyBrowserHostname, g5 as removePreviewQueryParamFromSearch, g6 as VISUAL_ANNOTATION_INSPECTOR_BROWSER_SCRIPT, g7 as PREVIEW_ACCESS_TOKEN_QUERY_PARAM, g8 as sanitizePreviewProxyResponseHeaders, g9 as applyPreviewEmbeddingHeaders, ga as DEFAULT_PREVIEW_RESOURCE_LIMITS, gb as PREVIEW_ACCESS_TOKEN_COOKIE, gc as DEFAULT_PREVIEW_IDLE_TIMEOUT_MS, gd as DevicePreviewControlRequestSchema, ge as simulatorRtcChunks, gf as SimulatorOfferSchema, gg as SimulatorIceServersSchema, d9 as ScheduleRepository, dG as scheduleDefinitionFingerprint, gh as hasPendingUserTurnActivation, gi as readSessionOperationTargets, gj as buildSessionArchiveMetaPatch, gk as buildGitHubCloneUrl, gl as reconcileProjectMemberLink, gm as projectRunMetaPatch, gn as removeProjectMemberLinks, go as MemoryProviderRequestSchema, gp as MemoryBindingSchema, Z as addSessionTurnTokenUsage, am as isEmptySessionTurnTokenUsage, cX as version$d, gq as isMissingEmail, gr as getCachedLoginShellEnvSyncLegacy, gs as supportsBuiltinProviderSetup, gt as hasBuiltinRuntimeOverrideValues, gu as hasEmptyModelSelectOption, dk as getMachineFlockDocId, gv as getMachineFlockProviderSetups, dm as readMachineFlockRowsFromFlock, gw as getMachineFlockProviderSetupCancellations, gx as applyProviderSetupCancellationToFlock, gy as getMachineFlockAgentConfigs, gz as machineFlockKeys, gA as writeMachineFlockRowToFlock, gB as deleteMachineFlockRowFromFlock, gC as encodeCodexProfileConfig, gD as findBuiltinAgentOptOutToRetract, gE as streamsRoomBinding, gF as isRecoverableStreamsRoomStatus, gG as computeLoroReconnectDelayMs, aV as normalizeBaseUrl$1, aU as deriveConvexSiteUrl, gH as isLodySubagentOutput, gI as MessageContentSchema, gJ as parseHistoryWrite, gK as ToolCallContentSchema, gL as HistoryWriteError, gM as captureMessage, gN as deriveLocationsFromToolCallContent, gO as parseLodyTaskMeta, gP as buildMessageContentFromNotification, gQ as truncateTerminalOutputForHistory, gR as hasBuiltinEnvAuthentication, gS as ACP_AUTH_ID_MAX_LENGTH, gT as ACP_AUTH_TEXT_MAX_LENGTH, gU as ACP_AUTHENTICATION_FORM_MAX_BYTES, gV as ACP_AUTHORIZATION_URL_MAX_LENGTH, gW as ACP_AUTH_FORM_FIELD_MAX_COUNT, gX as ACP_AUTH_LABEL_MAX_LENGTH, gY as getLodyElicitationMeta, gZ as ACP_AUTH_SELECT_OPTION_MAX_COUNT, g_ as isAcpAuthenticationFormWithinByteLimit, g$ as parseLodyMessagePhase, h0 as computeTitleGenerationDefaults, h1 as DEFAULT_TITLE_GENERATION_PROMPT, h2 as LODY_PRESENCE_HEARTBEAT_MS, h3 as isErrorReportingEnabled, h4 as hashAnalyticsId, h5 as getWorktreeSetupScriptForShell, h6 as resolveWorktreeSetupShellForPlatform, h7 as DEFAULT_WORKTREE_SETUP_TIMEOUT_MS, h8 as DEFAULT_WORKTREE_CLEANUP_TIMEOUT_MS, h9 as LODY_HELP_INSTRUCTIONS, ha as PiExtensionDiscoverySchema, hb as resolveSessionHistoryStatus, hc as resolveSessionAcpTargetId, hd as isSessionCancelRequestMarker, he as getSessionCancelRequestMarker, hf as historyItemsToInputBlocks, hg as normalizeSessionInputBlocks, hh as extractPromptPreviewFromInputBlocks, hi as isMissingHistoryUserTurn, hj as getPendingUserTurnActivationId, hk as getSessionLaunchConfigLegacyFields, hl as buildSessionLaunchConfig, hm as mergeSessionLaunchConfig, hn as getMachineFlockSessionLaunchConfig, ho as withTimeout$2, hp as ConcurrentQueue, hq as isSubscriptionQuotaEligible, hr as traceAsync, hs as getSteerOperationId, ht as resolveSessionExecutionInputBlocks, hu as createLocalProjectBranchSelector, hv as resolveWorkspaceLocalProjectRootPathWithRetry, hw as readLocalProjectRootResolveSyncTimeoutMs, hx as resolveProjectGitHubRepo, hy as isSessionCollaborationStopped, hz as batchHistoryMembers, ac as findProgressMessageId, hA as batchPreview, hB as createReplayPromptBuilder, hC as isReplayEntryExcluded, hD as resolveBaseBranchPreference, hE as resolveResumableAcpSessionId, hF as hasRecentResumeNotice, hG as acpOwnsSessionTitleGeneration, hH as resolveSessionAuthoredText, hI as resolveProjectFileRoots, hJ as resolveActiveAssistantTurnId, hK as decideAcpCapabilityRefreshCache, hL as usesAcpProtocolAuthentication, hM as subscribeSessionChanges, hN as SESSION_DOC_PREFIX, hO as buildPendingUserHistoryEntry, hP as listAliveRoomIds, hQ as mapWithConcurrency, hR as turnNotificationAudience, hS as verifyMachineAccessWithRetry, hT as buildMissingEmail, hU as buildSessionTurnInputConfig, hV as normalizeMcpServerIdSelection, hW as sameDispatchEntry, hX as AgentConfigCliTypeSchema, hY as ProjectRefSchema, hZ as sessionForkFailure, h_ as LEGACY_SESSION_HISTORY_BACKEND, aA as readSessionHistoryMetadata, h$ as resolveSessionMcpSelection, i0 as resolveSessionConversationConfig, i1 as resolveSessionAcpRuntimeConfig, i2 as sessionEditAndResendFailure, aC as resolveEditableTail, i3 as isSessionGoalActive, ad as getOperationProgressTargetKey, i4 as readChatFailureNotice, i5 as describeChatFailure, i6 as makeLodyError, ae as getOperationProgressTurnId, i7 as inboxScopeKey, i8 as InboxAdmissionRejected, i9 as inboxFailureDiagnostic, ia as INBOX_INLINE_MEMBERS, ib as OrchestrationDatabase, ic as LodyOperationStore, id as getLodyOperationStorePath, ie as LodyOperationStoreError, ig as isMemberAccessSnapshotFresh, ih as resolveSessionPullRequests, ii as isAcpFastModeConfigId, ij as ACP_REASONING_EFFORT_CONFIG_ID, ik as isAcpPlanModeConfigOption, il as isAcpThoughtLevelConfigOption, im as ACP_PLAN_PERMISSION_MODE_ID, io as readPullRequestLifecycle, ip as resolveProjectFileTarget, iq as readTimeoutEnv, ir as CODE_COLLAB_DIFF_BLOB_LIMITS, is as FILE_PREVIEW_V3_LIMITS, it as FILE_PREVIEW_PROTOCOL_VERSION, iu as getImageMimeTypeForPath, iv as sanitizeAttachmentFileName, iw as SESSION_FILE_MAX_SIZE_BYTES, ix as SESSION_FILE_PREVIEW_SNIFF_BYTES, iy as isTextPreviewable, iz as SESSION_IMAGE_MAX_SIZE_BYTES, iA as SESSION_IMAGE_ALLOWED_MIME_TYPES, iB as PreviewControlProofSchema, iC as PREVIEW_CREATE_RATE_LIMIT_MAX, iD as DEFAULT_PREVIEW_MAX_ACTIVE_TUNNELS_PER_MACHINE, iE as PREVIEW_CREATE_RATE_LIMIT_WINDOW_MS, iF as assertEncryptedImageReference, iG as readEncryptedAttachment, iH as buildSessionImageApiUrl, iI as getSessionImageDownloadApiPath, iJ as encryptedAttachmentPath, iK as getSessionFileDownloadApiPath, iL as listWorkspaceGitHubRepositoriesForCliToken, aS as makeLocalWorkspaceCatalog, iM as getCodeCollabFileIndexSignalFlockDocId, iN as getCodeCollabFileIndexFlockDocId, ck as createLoroStreamsJsonStreamClient, cM as LORO_STREAMS_BUCKET_ID, iO as sessionHistoryWriteIntentDigest, iP as getProjectRefBranch, iQ as readMessageAuthor, iR as resolveSessionMessageAuthor, iS as SessionAttachmentTransfer, iT as ATTACHMENTS_DIR_RELATIVE, iU as ensureAttachmentsGitExcluded, iV as buildAttachmentFileName$1, iW as buildAttachmentPromptText, iX as getSessionFileBlobPath, iY as buildSessionFileApiUrl, iZ as buildUnavailableAttachmentPromptText, i_ as formatAgentSenderHeader, i$ as formatCommentReferenceForPrompt, j0 as formatVisualAnnotationReferenceForPrompt, j1 as readLocalSessionImage, j2 as resolveWorkspaceLocalProjectRootPath, aZ as getSessionCommandEnvironment, aR as resolveWorkspaceOrThrow, j3 as hasAgentRunConfigSelection, j4 as shouldBypassSessionQuota, j5 as createSessionResult, j6 as sendSessionChatResult, j7 as getDeviceTimeZone, j8 as SORBET_PROVIDERS_REMOTE_PROTOCOL_VERSION, j9 as SORBET_CREDENTIALS_REMOTE_PROTOCOL_VERSION, ja as SORBET_PROVIDERS_PROTOCOL_VERSION, jb as SORBET_CREDENTIALS_PROTOCOL_VERSION, jc as E2EE_ACP_INTERACTION_PROTOCOL_VERSION, jd as getSessionIdFromRoomId, je as parseMachineFlockKey, jf as listAliveSessionMetas, jg as isSessionInLocalProjectRemovalScope, jh as resolveWorkspaceLocalProject, ji as shouldApplyMachineDeleteLocalProjectCommand, jj as getWorkspaceFlockDocId, jk as listWorkspaceProjects, jl as readWorkspaceFlockRowsFromFlock, jm as isLocalProjectReferenced, jn as removeMachineLocalProject, jo as truncateToolTitleForHistory, aM as summarizeHistoryQuery, jp as deriveRepoIdFromGitHubRepo$1, jq as runWithDaemonWorkspace, jr as runWithSessionCommandEnvironment, js as createLocalSessionCommandEnvironment, jt as SessionHistoryReadResponseSchema, ju as storeLocalSessionImage, jv as isContainedSession, jw as HistoryEntryWriteSchema, jx as PermissionOutcomeSchema, jy as SESSION_IMAGE_MAX_COUNT, d5 as inputBlocksToHistoryItems, jz as SESSION_FILE_MAX_COUNT, jA as copyIntoSessionFileBlobStore, jB as readHistoryEntry, jC as readLocalSessionImageReceipt, jD as sessionFileBlobExists, jE as readSessionFileBlobBackfillReceipt, jF as markSessionFileBlobBackfilled, jG as getSessionFileBlobAgeMs, jH as getDraftSessionFileBlobMaxAgeMs, jI as removeSessionFileBlob, jJ as writeSessionFileBlobBackfillMarker, jK as listLocalSessionImages, jL as listPendingLocalSessionFiles, jM as parseAskUserQuestionPermissionMeta, jN as PERMISSION_REQUEST_TIMEOUT_MS, jO as getAskUserQuestionPermissionDisplayTitle, ay as readLatestUserId, jP as prepareCliStreamsGatewayBaseUrl, jQ as resolveWorkspaceLocalProjectWithSyncOnMiss, jR as resolveNotificationPresentation, jS as notificationReplyPreview, jT as buildLiveActivityConversationItems, jU as countLiveActivityConversationStatuses, jV as countLiveActivityConversationCandidates, jW as buildLodyConversationsLiveActivityId, jX as writeLocalSessionImageReceipt, jY as getMachineFlockDeleteLocalProjectEntries, jZ as LODY_CONVERSATIONS_LIVE_ACTIVITY_SCHEMA_VERSION, j_ as GitHubTokenFetchError, j$ as canReadProcNetTcp, k0 as McpLocalAuthenticationSchema, k1 as lookupLoopbackPeerUid, k2 as publicMcpServer, k3 as resolveSessionMcpServers, cV as makeApplicationRuntime, k4 as assertPublicMcpServer, k5 as getWorkspaceMcpCatalog, k6 as waitForMcpCatalogBaseline, X as SessionHistoryContentPatchSchema, V as SESSION_DIRECTORY_INPUT_CONFIG_KEYS, aw as projectRoostSegments, k7 as isDispatchCandidate, k8 as dispatchEntry, k9 as selectDispatchHistory, ar as pickDirectoryInputConfig, al as historyQueryRow, as as pickDirectoryScalars, ka as resolveLatestSessionGoalFromHistory, kb as registerSessionBackendFactory, kc as createRoostSessionBackendFactory, kd as captureStoredHistory, av as planHistoryImport, ag as hashHistoryEntryForVersion, a6 as createImportCursor, at as planEditableTailReplacement, ke as matchesRollbackReceipt, U as ROOST_CLEAR_FIELDS_KEY, kf as prepareReplacement, kg as isSessionHistoryStatusAwaitingStart, ao as markTurnSeenBlocked, $ as applyMarkTurnSeen, a8 as createRoostDirectoryRow, kh as inheritHistoryStreamText, ki as latestSessionModel, au as planHistoryAction, ak as historyActionTarget, aH as selectHistoryActionRows, kj as prepareStoredHistoryCopy, kk as targetLocalHistoryTargets, aG as selectAgentHistoryRows, kl as planAgentHistoryMutation, a5 as createAssistantTurn, a0 as applyOpenAssistantTurn, aI as selectTranscriptHistoryPositions, aJ as selectTurnOutput, km as pkg, kn as workspaceSupports, ko as routeRemoteOwnedSessionHistory, kp as createCommandSessionHistoryFactory, kq as LoroDocumentManager, dp as getScheduleRoomId, kr as planPullRequestLifecycle, ks as collectViewedSessionIdsFromPresence, kt as TERMINAL_MAX_PER_SESSION, ku as LODY_MACHINE_MONITOR_WINDOWS_SAMPLE_MS, kv as LODY_MACHINE_MONITOR_MACOS_SAMPLE_MS, kw as LODY_MACHINE_MONITOR_UNIX_SAMPLE_MS, kx as quotaReservationIdentity, ky as evaluateSchedule, kz as scheduleRunKey, kA as scheduleRunIds, kB as manualScheduleRunKey, kC as SCHEDULE_RETRY_DELAYS_MS, da as getScheduleRegistryFlockDocId, kD as scheduleRegistryKeys, dg as ScheduleRuntimeRowSchema, kE as canonicalScheduleJson, kF as commitPreparedSessionDispatch, kG as isPreparedSessionDispatched, kH as materializePreparedSessionInput, kI as ScheduledMessageSchema, kJ as notificationLabel, de as readMergedAgentConfigById, dl as getMachineFlockLocalProjects, kK as OrchestrationConnection, u as automationRegistrationSchema, v as automationResultSchema, x as automationRuleDraftSchema, k as automationEventSchema, e as automationContinuationSchema, n as automationInvocationSchema, s as automationReadRequestSchema, i as automationEmptyReadParametersSchema, j as automationEventReadParametersSchema, t as automationReadResponseSchema, o as automationOriginSchema, kL as resolveTurnDispatchDefaultsFromHistory, kM as resolveAgentRoleCreateFromCatalog, kN as applyAgentRoleCreateTarget, kO as prepareSessionInput, c as automationCommandSchema, H as remoteAutomationOperationSchema, I as remoteAutomationProofSchema, G as remoteAutomationIntentSchema, kP as startTimeSyncLegacy, kQ as initCliAnalytics, kR as ensureImplicitLocalWorkspace, kS as localCatalogWorkspaceToWorkspaceListItem, kT as closeProcessLocalLoroWriterLegacy, kU as reconcileMachineLocalProjectRootPaths, kV as listMergedAgentConfigs, kW as findWorkspacesBySelector, kX as formatWorkspaceCandidate, dx as isCloudE2eeMemberRemoved, dy as isCloudE2eeDeviceRevoked, kY as SUPPORTED_CLI_TYPES, kZ as CLI_STORAGE_WRITE_FAILED_ISSUE_CODE, k_ as formatLocalLogDate, k$ as pickDailyLogAppendName, l0 as formatDailyLogLine, l1 as registerProcessExitTrace, l2 as getCliPlatformKind, l3 as applyLocalPlatformEnv, l4 as AuthClient, l5 as captureAgentServiceEvent, l6 as getOrCreateStableMachineIdAsync, l7 as loadOrCreateLocalIdentity, l8 as performLoginWithAuthCredential, l9 as isMachinePairingCredential, la as performLogin, lb as flushTelemetry, lc as createLocalCloudPort, ld as createCloudCliPort, le as captureCliActiveUser, lf as captureCliActivePing, lg as ACTIVE_PING_MIN_INTERVAL_MS$1, lh as SITE_URL, c_ as closeLoginShellApplicationLegacy, li as registerProcessCleanup, lj as unregisterProcessCleanup, lk as runOneShotCommand, ll as printJson, lm as ensureDaemonReachable, ln as DAEMON_NOT_RUNNING_MESSAGE, aN as makeLocalControlClientAuto, aQ as getAuthContextOrThrow, lo as openBrowser, lp as captureAuthEvent, lq as isRetryableTokenValidationFailure, lr as isTokenValidationUnavailable, ls as addDiscoveryOptions, lt as runDiscoveryList, lu as renderTerminalTable, d8 as ScheduleCommandSchema, lv as collectScheduleIds, lw as resolveStructuredOutputMode, lx as listWorkspacesForToken, dq as withWorkspaceManager, ly as listAliveDocMetas, lz as isMachineDocRoomId, lA as classifyMachinePresence, lB as ACP_CAPABILITY_ROW_FAMILIES, lC as getMachineFlockAcpCapabilities, lD as getMachineFlockRateLimits, lE as parseRateLimitEntryKey, lF as buildSessionLink, lG as normalizeSessionLinksForExport, lH as api, lI as listWorkspaceCandidates, lJ as syncWorkspaceMetaForRead, lK as syncDocForRead, lL as createSessionMirror, dw as ScheduleDefinitionSchema, lM as buildScheduleRegistryRow, lN as WorkspaceStreamsConfigurationError, lO as requirePlaintextWorkspaceStreamsContent, lP as getLoroStreamIdForDocId, lQ as streamsSnapshotCodec, lR as getLoroStreamsShardUrls, cO as getLoroMetaStreamId, cL as createLoroStreamUrl, lS as selectWorkspaceSummary, lT as createCloudStreamsTokenPort, lU as registerMachineAccessForCliToken, lV as createLoroStreamsTokenProviderLegacy, lW as makeLocalProbeClientAuto, lX as captureDaemonEvent, lY as captureSupervisorEvent, lZ as submitAgentFeedback, l_ as discoveryListCommand, l$ as syncMcpCatalog, m0 as listWorkspaceMcpCatalog, m1 as normalizeCliValue, m2 as upsertWorkspaceMcpCatalogEntry, m3 as deleteWorkspaceMcpCatalogEntry, m4 as parseEnvAssignments, m5 as ENV_VAR_NAME_PATTERN, m6 as OperationListQuerySchema, m7 as runWithOperationStoreBusyRetry, m8 as sessionCommand, m9 as agentConfigCommand, ma as agentRoleCommand, cY as internalCommand } from "./telemetry-DKZfKfJp.js";
|
|
2
2
|
import { C as Command } from "./chunks/vendor-commander-B86VeeRa.js";
|
|
3
3
|
import { c as chalk } from "./chunks/vendor-chalk-MVIUzg44.js";
|
|
4
4
|
import * as os from "os";
|
|
5
5
|
import os__default$1 from "os";
|
|
6
6
|
import nc__default, { createHash, randomBytes, randomUUID as randomUUID$1, timingSafeEqual } from "node:crypto";
|
|
7
|
-
import { p as platformLayer,
|
|
7
|
+
import { p as platformLayer, b as formatErrorMessage, t as toShared, g as getLodyDataDir, k as formatErrorWithCauses, a as getLogger, o as truncateLogText, w as withSpawn, q as LodyDataDirUnavailableError, s as ensureLodyDataDir, h as getInstallationProfile, u as formatReportedError, v as createHybridLogger, d as LODY_LOG_DIR, j as rootLogger, x as readLatestLogTail } from "./process-options-D8DB-_Kg.js";
|
|
8
8
|
import * as path$2 from "node:path";
|
|
9
9
|
import path__default$1, { resolve, relative, isAbsolute, join, dirname, sep, basename, delimiter, normalize } from "node:path";
|
|
10
|
-
import { b as runCommand$1, f as errnoCode, C as CommandTimedOut, h as runPromiseSquashedLegacy, i as ProcessCleanupFailed, P as ProcessReleaseFailed, s as startProcessLegacy, j as isPidAliveSyncLegacy, a as runCommandTextLegacy, c as runCommandOk, R as READ_ONLY_ABANDON_POLICY, t as terminateChildTreeLegacy, p as processLayer, k as terminateTree, N as NodeProcess, S as SpawnFailed, l as spawnProcess, T as TerminationFailed, m as makeProcessRunnerLegacy, n as nodeProcessLive, u as unwrapSpawnFailure, r as runCommandTextSyncLegacy, o as CommandOutputTooLarge, q as posixGroupTree, w as waitUntilGone, v as childProcessTree, x as hasExited } from "./process-
|
|
11
|
-
import { a4 as Service, bS as provideMerge, dn as mergeAll, a0 as succeed, M as sync, a3 as TaggedError, aj as effect, h as gen, aC as FileSystem, bV as ChildProcessSpawner, t as provideService, U as catchCause, B as failCause, cv as map, a2 as map$1, ae as logDebug, G as findErrorOption, dq as isNone, u as mapError, b as fail, dd as fn, da as catchTag, a1 as succeed$1, cn as isSome, av as as, K as flatMap, ak as provide, w as try_, f as fnUntraced, L as void_, cu as scoped, H as currentTimeMillis, aH as acquireRelease, aa as uninterruptible, d as die, P as interruptible, df as timeout, j as exit, E as isSuccess, aS as callback, ed as tap, ee as map$2,
|
|
12
|
-
import { l as layer } from "./chunks/vendor-@effect-platform-node-shared-
|
|
10
|
+
import { b as runCommand$1, f as errnoCode, C as CommandTimedOut, h as runPromiseSquashedLegacy, i as ProcessCleanupFailed, P as ProcessReleaseFailed, s as startProcessLegacy, j as isPidAliveSyncLegacy, a as runCommandTextLegacy, c as runCommandOk, R as READ_ONLY_ABANDON_POLICY, t as terminateChildTreeLegacy, p as processLayer, k as terminateTree, N as NodeProcess, S as SpawnFailed, l as spawnProcess, T as TerminationFailed, m as makeProcessRunnerLegacy, n as nodeProcessLive, u as unwrapSpawnFailure, r as runCommandTextSyncLegacy, o as CommandOutputTooLarge, q as posixGroupTree, w as waitUntilGone, v as childProcessTree, x as hasExited } from "./process-CJFimK5a.js";
|
|
11
|
+
import { a4 as Service, bS as provideMerge, dn as mergeAll, a0 as succeed, M as sync, a3 as TaggedError, aj as effect, h as gen, aC as FileSystem, bV as ChildProcessSpawner, t as provideService, U as catchCause, B as failCause, cv as map, a2 as map$1, ae as logDebug, G as findErrorOption, dq as isNone, u as mapError, b as fail, dd as fn, da as catchTag, a1 as succeed$1, cn as isSome, av as as, K as flatMap, ak as provide, w as try_, f as fnUntraced, L as void_, cu as scoped, H as currentTimeMillis, aH as acquireRelease, aa as uninterruptible, d as die, P as interruptible, df as timeout, j as exit, E as isSuccess, aS as callback, ed as tap, ee as map$2, e2 as filter, ef as runHead, eg as getOrThrow, y as timeoutOrElse, Z as tap$1, dm as tapError, aV as offerUnsafe, bc as acquireUseRelease, cz as runPromise, bi as String$1, d6 as isPattern, bP as decodeUnknownOption, bt as Struct, bN as Literal, ab as orDie, bU as runPromiseExit, k as isFailure, bs as squash, cs as runSyncExit, p as provide$1, dC as runSync, N as close, ac as makeUnsafe, S as void_$1, c9 as scope, dO as make, cd as get, b6 as forEach, b1 as andThen, cf as result$1, ci as isFailure$1, d3 as keys, a$ as make$1, dV as update, c$ as set, b2 as succeed$2, g as forkIn, _ as _await, Q as asVoid, eh as exists$1, cR as get$1, d1 as remove, a8 as catch_, ct as logWarning, J as sleep, $ as suspend, cr as seconds, cX as empty, ce as set$1, b9 as all, ca as fork, V as addFinalizer, aG as tryPromise, aP as none, aN as some, m as make$2, C as Clock, dv as Scope, z as makeUnsafe$1, aw as addFinalizer$1, b0 as cached, ei as repeat, dk as spaced, dF as delay$2, dG as die$1, I as doneUnsafe, v as promise, dj as retry, c as combine, a9 as empty$1, a7 as await_, di as hasInterrupts, dK as pretty, cq as interrupt, ad as ensuring, A as raceFirst, aW as runFork, ej as next, dJ as isCause, dU as unbounded, aY as offer, ap as forever, dh as take, ek as takeBetween, n as done, bE as succeed$3, c7 as forkScoped, el as unwrap$1, dg as dropping, dE as tapCause, dw as fromReasons, bI as isInterruptReason, cA as isFailReason, dz as makeUnsafe$2, b8 as make$3, bT as merge, ai as make$4, cB as provide$2, a6 as isTimeoutError, l as fail$1, bf as onInterrupt, em as bounded, dA as onError, en as take$1, eo as release, ep as withPermits, d8 as decodeUnknownResult, cg as isSuccess$1, bK as Number$1, bM as Boolean$1, bv as ArraySchema, bu as NullOr, d9 as optional, eq as Record, bR as Unknown, ao as callback$1, d_ as Effect } from "./chunks/vendor-effect-Bggm7QMO.js";
|
|
12
|
+
import { l as layer } from "./chunks/vendor-@effect-platform-node-shared-GTij4Yj3.js";
|
|
13
13
|
import { C as CodeCollabV2RpcContentEnvelopeSchema, D as CodeCollabV2InitDirectoryRequestSchema, B as CodeCollabV2OpenTurnDiffRequestSchema, A as CodeCollabV2OpenAllChangesDiffRequestSchema, z as CodeCollabV2OpenCurrentDiffRequestSchema, y as CodeCollabV2SaveTextRequestSchema, x as CodeCollabV2RefreshTextRequestSchema, w as CodeCollabV2OpenTextRequestSchema, a6 as CodeCollabV2ErrorCodeSchema, b0 as getProjectRepositoryFullName, r as resolveSessionFilePath, i as isSafeProjectPath, bc as projectRepositoryUrlIdentity, S as SessionProjectRunSchema, ba as pickProjectRepositoryLocalCopy, aH as deduplicateProjectMembers, aO as encodeProjectPreparationProgress, ag as PROJECT_SUBMODULE_BASE, bf as readCodeCollabFileIndexSignalFromFlock, bm as writeCodeCollabFileIndexSignalToFlock, be as readCodeCollabFileIndexFromFlock, bd as readCodeCollabFileGenerations, F as CODE_COLLAB_FILE_GENERATION_MAX_BYTES, aD as codeCollabFileIndexValuesEqual, bb as planCodeCollabFileIndexFlockWrite, aq as applyCodeCollabFileIndexFlockWriteBatch, aP as encodeSessionFilePath, at as buildCodeCollabFileIndexState, d as decodeSessionFilePath, L as CODE_COLLAB_V2_TEXT_LIMITS, H as CODE_COLLAB_V2_ALL_CHANGES_DIFF_LIMITS, b as buildBoundedCodeCollabFileIndexState, az as codeCollabFileIndexStatesEqual, a as CODE_COLLAB_FILE_INDEX_LIMITS, p as parseGitHubPullRequestUrl, aZ as getCurrentPullRequestsByRepository } from "./code-collab-COUEig0Z.js";
|
|
14
14
|
import fs__default$1, { existsSync, statSync, rmSync, readdirSync, readFileSync, createWriteStream, createReadStream, lstatSync, unlinkSync, symlinkSync, linkSync, copyFileSync, accessSync, constants, realpathSync as realpathSync$1, writeFileSync as writeFileSync$1, mkdirSync as mkdirSync$1, openSync, fchmodSync, closeSync, mkdtempSync, watch, chmodSync, promises as promises$1 } from "node:fs";
|
|
15
15
|
import * as fs$2 from "node:fs/promises";
|
|
@@ -42,10 +42,10 @@ import { c as claudeSdkManifestJson, a as claudeSdkPackageJson } from "./chunks/
|
|
|
42
42
|
import { execFileSync } from "node:child_process";
|
|
43
43
|
import { v as v4, a as validate, b as v5 } from "./chunks/vendor-uuid-B-b1kXnZ.js";
|
|
44
44
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
45
|
-
import { C as CloudflaredError } from "./cloudflared-native-
|
|
45
|
+
import { C as CloudflaredError } from "./cloudflared-native-C6cs44SH.js";
|
|
46
46
|
import http$1 from "http";
|
|
47
47
|
import { Buffer as Buffer$2 } from "buffer";
|
|
48
|
-
import { a as WebSocketServer, W as WebSocket } from "./chunks/vendor-ws-
|
|
48
|
+
import { a as WebSocketServer, W as WebSocket } from "./chunks/vendor-ws-DSn-BAa0.js";
|
|
49
49
|
import { Resolver } from "node:dns/promises";
|
|
50
50
|
import { u as undiciExports } from "./chunks/vendor-undici-BBneXIsH.js";
|
|
51
51
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -53,7 +53,7 @@ import { R as ReadableStream$1, M as MaybeConsumableWritableStream } from "./chu
|
|
|
53
53
|
import { R as RTCPeerConnection } from "./chunks/vendor-werift-CzTQBJFa.js";
|
|
54
54
|
import { a as AdbServerClient } from "./chunks/vendor-@yume-chan-adb-Dm1Ebig-.js";
|
|
55
55
|
import { A as AdbScrcpyClient, a as AdbScrcpyOptions3_3_3 } from "./chunks/vendor-@yume-chan-adb-scrcpy-DlC3e29n.js";
|
|
56
|
-
import { g as gitDiffBaseRefCandidates, d as computeAllChanges, r as resolveProjectGitDirectory, f as resolveAllChangesDiffBase, h as computeProjectAllChangesSnapshot, l as listGitIgnoredPaths, s as scanGitDirectoryEntries, c as createGitIgnoreScanFilter, a as relativeScanDirectory, e as closeDirectoryQuietly } from "./directory-handle-
|
|
56
|
+
import { g as gitDiffBaseRefCandidates, d as computeAllChanges, r as resolveProjectGitDirectory, f as resolveAllChangesDiffBase, h as computeProjectAllChangesSnapshot, l as listGitIgnoredPaths, s as scanGitDirectoryEntries, c as createGitIgnoreScanFilter, a as relativeScanDirectory, e as closeDirectoryQuietly } from "./directory-handle-C9cpH0Mn.js";
|
|
57
57
|
import Database from "better-sqlite3";
|
|
58
58
|
import { l as IosSimulatorRemoteResponseSchema, k as IosSimulatorExteriorSchema, r as isIosSimulatorBezelPng, g as IOS_SIMULATOR_BEZEL_MAX_BYTES, I as IosSimulatorDeviceControlSchema } from "./ios-simulator-BJjtVdO8.js";
|
|
59
59
|
import { fileURLToPath as fileURLToPath$1, pathToFileURL as pathToFileURL$1 } from "url";
|
|
@@ -64,8 +64,8 @@ import { Transform as Transform$1 } from "stream";
|
|
|
64
64
|
import { stripVTControlCharacters, promisify, isDeepStrictEqual } from "node:util";
|
|
65
65
|
import { c as createTwoFilesPatch } from "./chunks/vendor-diff-CPHd5agL.js";
|
|
66
66
|
import { gzip, gunzip, gunzipSync, brotliDecompressSync } from "node:zlib";
|
|
67
|
-
import { c as computeLineCounts, a as countTextLines } from "./diff-line-counts-
|
|
68
|
-
import { r as runDiffWorkerTask } from "./diff-worker-task-
|
|
67
|
+
import { c as computeLineCounts, a as countTextLines } from "./diff-line-counts-CJrMXY2d.js";
|
|
68
|
+
import { r as runDiffWorkerTask } from "./diff-worker-task-CVilVhwP.js";
|
|
69
69
|
import { MessageChannel, Worker } from "node:worker_threads";
|
|
70
70
|
import { C as CODE_COLLAB_IGNORED_DIRECTORY_NAMES } from "./workspace-watch-path-policy-CxHey7qg.js";
|
|
71
71
|
import require$$0 from "net";
|
|
@@ -73,16 +73,16 @@ import { f as LoroDoc } from "./chunks/vendor-loro-crdt-CcUjyH5H.js";
|
|
|
73
73
|
import { AsyncEntry } from "@napi-rs/keyring";
|
|
74
74
|
import { a as auth, d as discoverOAuthServerInfo, c as checkResourceAllowed, r as resourceUrlFromServerUrl, e as extractWWWAuthenticateParams, S as StreamableHTTPClientTransport, b as StdioClientTransport, C as Client } from "./chunks/vendor-@modelcontextprotocol-client-bw7HkPGf.js";
|
|
75
75
|
import { createRequire } from "node:module";
|
|
76
|
-
import { r as resolveScheduleAgentRunConfig, b as buildScheduleSessionCreateOptions, w as withScheduledMessageInput, s as scheduleRequiredLocalProjectId, a as scheduleDestinationSessionId, d as destinationSessionProblem, c as buildScheduleRunTarget, e as sendScheduleCommand } from "./schedule-command-client-
|
|
77
|
-
import { m as make$5, a as make$6 } from "./chunks/vendor-@opencode-codemode-
|
|
76
|
+
import { r as resolveScheduleAgentRunConfig, b as buildScheduleSessionCreateOptions, w as withScheduledMessageInput, s as scheduleRequiredLocalProjectId, a as scheduleDestinationSessionId, d as destinationSessionProblem, c as buildScheduleRunTarget, e as sendScheduleCommand } from "./schedule-command-client-D_Ti-1Rl.js";
|
|
77
|
+
import { m as make$5, a as make$6 } from "./chunks/vendor-@opencode-codemode-DS2pDojq.js";
|
|
78
78
|
import { p as parse } from "./chunks/vendor-acorn-FBr7vWTA.js";
|
|
79
79
|
import v8 from "node:v8";
|
|
80
80
|
import inquirer from "./chunks/vendor-inquirer-DW05GzYy.js";
|
|
81
|
-
import { sendAutomationCommand } from "./client-
|
|
81
|
+
import { sendAutomationCommand } from "./client-CCvHoqKn.js";
|
|
82
82
|
import { C as ConvexHttpClient } from "./chunks/vendor-convex-wRAQitRr.js";
|
|
83
|
-
import { S as SqliteRepoStore, L as LoroRepo } from "./chunks/vendor-loro-repo-
|
|
84
|
-
import { c as createLoroDocAdapter, a as createFlockAdapter, S as StreamsCrdt } from "./chunks/vendor-@loro-dev-streams-crdt-
|
|
85
|
-
import { S as StreamsClient } from "./chunks/vendor-@loro-dev-streams-client-
|
|
83
|
+
import { S as SqliteRepoStore, L as LoroRepo } from "./chunks/vendor-loro-repo-FH5_Ccs5.js";
|
|
84
|
+
import { c as createLoroDocAdapter, a as createFlockAdapter, S as StreamsCrdt } from "./chunks/vendor-@loro-dev-streams-crdt-BsFOZws4.js";
|
|
85
|
+
import { S as StreamsClient } from "./chunks/vendor-@loro-dev-streams-client-WbHLrl2m.js";
|
|
86
86
|
import { F as Flock } from "./chunks/vendor-@loro-dev-flock-wasm-s93aGRSx.js";
|
|
87
87
|
import process$1 from "node:process";
|
|
88
88
|
const LODY_EXTENSION_METHODS = {
|
|
@@ -203,7 +203,8 @@ const SESSION_HISTORY_PRECONDITION_CODES = [
|
|
|
203
203
|
"session_owner_mismatch",
|
|
204
204
|
"session_unavailable",
|
|
205
205
|
"session_identity_mismatch",
|
|
206
|
-
"session_backend_mismatch"
|
|
206
|
+
"session_backend_mismatch",
|
|
207
|
+
"session_history_write_already_claimed"
|
|
207
208
|
];
|
|
208
209
|
const isHistoryRequest = (request) => request.method === "session/history-read" || request.method === "session/history-watch" || request.method === "session/history-write";
|
|
209
210
|
const redactRpcRequestForLog = (raw) => {
|
|
@@ -621,14 +622,19 @@ class LoroStreamsMachineRpcServer {
|
|
|
621
622
|
if (isOwnerScopedEncryptedRpcMethod(input.method)) {
|
|
622
623
|
if (!("sessionId" in input.params) || typeof input.params.sessionId !== "string")
|
|
623
624
|
throw new Error("e2ee_query_owner");
|
|
624
|
-
owner = input.ownerSessionId ?? await this.deps.
|
|
625
|
+
owner = input.ownerSessionId ?? (input.method === "session/history-read" ? await this.deps.resolveSessionHistoryOwnerSessionId?.(
|
|
626
|
+
input.params.sessionId,
|
|
627
|
+
{ signal: context.signal }
|
|
628
|
+
) : await this.deps.resolveCodeCollabOwnerSessionId?.(input.params.sessionId));
|
|
625
629
|
if (!owner) throw new Error("e2ee_query_owner");
|
|
626
630
|
params = await encryptCodeCollabV2RpcPayload(owner, params);
|
|
627
631
|
}
|
|
628
632
|
const outcome = await this.readQuery(
|
|
629
633
|
{ queryId: context.requestId, method: input.method, params },
|
|
630
634
|
context.expiresAt,
|
|
631
|
-
context.signal
|
|
635
|
+
input.method === "session/history-read" && context.authority ? AbortSignal.any([context.signal, context.authority.signal]) : context.signal,
|
|
636
|
+
input.method === "session/history-read" && input.params.query.kind === "watchChanges",
|
|
637
|
+
context.authority
|
|
632
638
|
);
|
|
633
639
|
if (outcome.error)
|
|
634
640
|
return LocalMachineRpcResponseSchema.parse({
|
|
@@ -651,7 +657,7 @@ class LoroStreamsMachineRpcServer {
|
|
|
651
657
|
});
|
|
652
658
|
}
|
|
653
659
|
/** Authenticated native read entry; it cannot start the ordinary network listener. */
|
|
654
|
-
async readQuery(input, expiresAt, signal) {
|
|
660
|
+
async readQuery(input, expiresAt, signal, historyWatch = false, historyAuthority) {
|
|
655
661
|
if (!isE2eeReadQuery(input.method, input.params)) throw new Error("e2ee_query_method");
|
|
656
662
|
const request = LoroStreamsRpcRequestSchema.parse({
|
|
657
663
|
jsonrpc: "2.0",
|
|
@@ -662,7 +668,7 @@ class LoroStreamsMachineRpcServer {
|
|
|
662
668
|
replyTo: "native-query",
|
|
663
669
|
sentAt: 0,
|
|
664
670
|
expiresAt,
|
|
665
|
-
method: input.method,
|
|
671
|
+
method: historyWatch && input.method === "session/history-read" ? "session/history-watch" : input.method,
|
|
666
672
|
params: input.params
|
|
667
673
|
});
|
|
668
674
|
let result2;
|
|
@@ -678,7 +684,9 @@ class LoroStreamsMachineRpcServer {
|
|
|
678
684
|
}
|
|
679
685
|
} : { result: response2.result };
|
|
680
686
|
},
|
|
681
|
-
signal
|
|
687
|
+
signal,
|
|
688
|
+
true,
|
|
689
|
+
historyAuthority
|
|
682
690
|
);
|
|
683
691
|
return result2 ?? {
|
|
684
692
|
error: { code: "e2ee_query_expired", message: "Query expired or was cancelled." }
|
|
@@ -688,7 +696,7 @@ class LoroStreamsMachineRpcServer {
|
|
|
688
696
|
if (!this.deps.streamClient) throw new Error("Network RPC unavailable");
|
|
689
697
|
return this.deps.streamClient;
|
|
690
698
|
}
|
|
691
|
-
async handleRequest(request, reply, signal = this.stopController.signal) {
|
|
699
|
+
async handleRequest(request, reply, signal = this.stopController.signal, authenticatedNativeRead = false, historyAuthority) {
|
|
692
700
|
const appendResultResponse = (replyTo, requestId, method, result2, options) => this.appendResultResponse(replyTo, requestId, method, result2, options, reply);
|
|
693
701
|
const appendErrorResponse = (replyTo, requestId, method, error, options) => this.appendErrorResponse(replyTo, requestId, method, error, options, reply);
|
|
694
702
|
let codeCollabOwnerSessionId;
|
|
@@ -1301,6 +1309,25 @@ class LoroStreamsMachineRpcServer {
|
|
|
1301
1309
|
);
|
|
1302
1310
|
return;
|
|
1303
1311
|
}
|
|
1312
|
+
const admit = async () => {
|
|
1313
|
+
if (authenticatedNativeRead) {
|
|
1314
|
+
if (!historyAuthority || historyAuthority.signal.aborted || !historyAuthority.isCurrent())
|
|
1315
|
+
throw new LoroStreamsRpcHandlerError(
|
|
1316
|
+
"session_history_read_denied",
|
|
1317
|
+
"Session history read access was withdrawn."
|
|
1318
|
+
);
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
if (!await this.deps.authorizeSessionHistoryRead?.({
|
|
1322
|
+
sessionId: params.sessionId,
|
|
1323
|
+
readProof: params.readProof
|
|
1324
|
+
}))
|
|
1325
|
+
throw new LoroStreamsRpcHandlerError(
|
|
1326
|
+
"session_history_read_denied",
|
|
1327
|
+
"Session history read access was refused."
|
|
1328
|
+
);
|
|
1329
|
+
};
|
|
1330
|
+
await admit();
|
|
1304
1331
|
historyOperationStarted = true;
|
|
1305
1332
|
let query = params.query;
|
|
1306
1333
|
let readPermit = false;
|
|
@@ -1317,6 +1344,7 @@ class LoroStreamsMachineRpcServer {
|
|
|
1317
1344
|
signal
|
|
1318
1345
|
});
|
|
1319
1346
|
if (this.stopped || request.expiresAt <= this.now()) return;
|
|
1347
|
+
await admit();
|
|
1320
1348
|
query = {
|
|
1321
1349
|
kind: "readChanges",
|
|
1322
1350
|
checkpoint: query.checkpoint,
|
|
@@ -1328,7 +1356,8 @@ class LoroStreamsMachineRpcServer {
|
|
|
1328
1356
|
}
|
|
1329
1357
|
let response2;
|
|
1330
1358
|
try {
|
|
1331
|
-
if (this.stopped || request.expiresAt <= this.now()) return;
|
|
1359
|
+
if (this.stopped || signal.aborted || request.expiresAt <= this.now()) return;
|
|
1360
|
+
await admit();
|
|
1332
1361
|
response2 = await this.deps.readSessionHistory({
|
|
1333
1362
|
sessionId: params.sessionId,
|
|
1334
1363
|
query,
|
|
@@ -1337,8 +1366,14 @@ class LoroStreamsMachineRpcServer {
|
|
|
1337
1366
|
} finally {
|
|
1338
1367
|
if (readPermit) this.requestConcurrency.release();
|
|
1339
1368
|
}
|
|
1369
|
+
await admit();
|
|
1340
1370
|
await appendResultResponse(request.replyTo, request.id, request.method, response2, {
|
|
1341
|
-
codeCollabOwnerSessionId
|
|
1371
|
+
codeCollabOwnerSessionId,
|
|
1372
|
+
beforeSend: async () => {
|
|
1373
|
+
if (signal.aborted || request.expiresAt <= this.now())
|
|
1374
|
+
throw new Error("history_read_expired");
|
|
1375
|
+
await admit();
|
|
1376
|
+
}
|
|
1342
1377
|
});
|
|
1343
1378
|
return;
|
|
1344
1379
|
}
|
|
@@ -1361,6 +1396,29 @@ class LoroStreamsMachineRpcServer {
|
|
|
1361
1396
|
);
|
|
1362
1397
|
return;
|
|
1363
1398
|
}
|
|
1399
|
+
const proof = await this.deps.authorizeSessionHistoryWrite?.({
|
|
1400
|
+
sessionId: params.sessionId,
|
|
1401
|
+
writeProof: params.writeProof,
|
|
1402
|
+
requestId: request.id,
|
|
1403
|
+
operation: params.operation,
|
|
1404
|
+
payload: params.payload
|
|
1405
|
+
});
|
|
1406
|
+
if (!proof || !Number.isSafeInteger(proof.expiresAt) || proof.expiresAt <= this.now())
|
|
1407
|
+
throw new LoroStreamsRpcHandlerError(
|
|
1408
|
+
"session_history_write_denied",
|
|
1409
|
+
"Session history editing was refused."
|
|
1410
|
+
);
|
|
1411
|
+
if (this.stopped || signal.aborted || request.expiresAt <= this.now()) return;
|
|
1412
|
+
await this.deps.historyRequestRejections.put(
|
|
1413
|
+
request,
|
|
1414
|
+
{
|
|
1415
|
+
code: "session_history_write_already_claimed",
|
|
1416
|
+
message: "This history write was already admitted; its outcome may be unknown. Do not replay it."
|
|
1417
|
+
},
|
|
1418
|
+
Math.max(request.expiresAt, proof.expiresAt)
|
|
1419
|
+
);
|
|
1420
|
+
if (this.stopped || signal.aborted || request.expiresAt <= this.now() || proof.expiresAt <= this.now())
|
|
1421
|
+
return;
|
|
1364
1422
|
historyOperationStarted = true;
|
|
1365
1423
|
const response2 = await this.deps.writeSessionHistory({
|
|
1366
1424
|
sessionId: params.sessionId,
|
|
@@ -1918,7 +1976,8 @@ class LoroStreamsMachineRpcServer {
|
|
|
1918
1976
|
}
|
|
1919
1977
|
async appendResultResponse(replyTo, requestId, method, result2, options = {}, response2) {
|
|
1920
1978
|
const wireResult = options.codeCollabOwnerSessionId === void 0 ? result2 : await encryptCodeCollabV2RpcPayload(options.codeCollabOwnerSessionId, result2);
|
|
1921
|
-
await
|
|
1979
|
+
await options.beforeSend?.();
|
|
1980
|
+
await (response2 ?? ((payload) => this.appendResponse(replyTo, payload, options.beforeSend)))({
|
|
1922
1981
|
jsonrpc: JSON_RPC_VERSION,
|
|
1923
1982
|
id: requestId,
|
|
1924
1983
|
method,
|
|
@@ -1941,10 +2000,11 @@ class LoroStreamsMachineRpcServer {
|
|
|
1941
2000
|
error: wireError
|
|
1942
2001
|
});
|
|
1943
2002
|
}
|
|
1944
|
-
async appendResponse(replyTo, payload) {
|
|
2003
|
+
async appendResponse(replyTo, payload, beforeSend) {
|
|
1945
2004
|
const maxAttempts = 3;
|
|
1946
2005
|
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
1947
2006
|
try {
|
|
2007
|
+
await beforeSend?.();
|
|
1948
2008
|
await this.streamClient.appendJson(replyTo, payload);
|
|
1949
2009
|
return;
|
|
1950
2010
|
} catch (error) {
|
|
@@ -1953,6 +2013,7 @@ class LoroStreamsMachineRpcServer {
|
|
|
1953
2013
|
replyTo,
|
|
1954
2014
|
this.deps.retentionSeconds ?? LORO_STREAMS_RPC_RETENTION_SECONDS
|
|
1955
2015
|
);
|
|
2016
|
+
await beforeSend?.();
|
|
1956
2017
|
await this.streamClient.appendJson(replyTo, payload);
|
|
1957
2018
|
return;
|
|
1958
2019
|
}
|
|
@@ -25677,7 +25738,7 @@ const getSessionHistoryRpcRejection = fn("getSessionHistoryRpcRejection")(
|
|
|
25677
25738
|
(filename, request, now) => withDatabase(filename, (db) => read(db, request, now))
|
|
25678
25739
|
);
|
|
25679
25740
|
const putSessionHistoryRpcRejection = fn("putSessionHistoryRpcRejection")(
|
|
25680
|
-
(filename, request, rejection, now) => withDatabase(
|
|
25741
|
+
(filename, request, rejection, now, retainUntil = request.expiresAt) => withDatabase(
|
|
25681
25742
|
filename,
|
|
25682
25743
|
(db) => db.transaction(() => {
|
|
25683
25744
|
db.prepare("DELETE FROM history_rpc_rejections WHERE expires_at <= ?").run(now);
|
|
@@ -25694,7 +25755,7 @@ const putSessionHistoryRpcRejection = fn("putSessionHistoryRpcRejection")(
|
|
|
25694
25755
|
request.machineId,
|
|
25695
25756
|
request.id,
|
|
25696
25757
|
validated.fingerprint,
|
|
25697
|
-
request.expiresAt,
|
|
25758
|
+
Math.max(request.expiresAt, retainUntil),
|
|
25698
25759
|
validated.code,
|
|
25699
25760
|
validated.message
|
|
25700
25761
|
);
|
|
@@ -41601,7 +41662,7 @@ function findNextDispatchableUserTurn(history, meta) {
|
|
|
41601
41662
|
continue;
|
|
41602
41663
|
}
|
|
41603
41664
|
if (entry.inputConfig?._lodyDeliveryKind === "steer") continue;
|
|
41604
|
-
if (entry.id
|
|
41665
|
+
if (isMissingHistoryUserTurn(meta, entry.id)) {
|
|
41605
41666
|
continue;
|
|
41606
41667
|
}
|
|
41607
41668
|
if (typeof entry.status === "string") {
|
|
@@ -42102,7 +42163,7 @@ class SessionExecutionService {
|
|
|
42102
42163
|
const doc = await this.deps.workspaceDocument.getOrCreateSessionDoc(args.sessionId);
|
|
42103
42164
|
const meta = await doc.getMetaState();
|
|
42104
42165
|
const read2 = await (await createSessionBackend(doc)).readTurn(args.inputId);
|
|
42105
|
-
if (meta?.lastHandledUserMsgId === args.inputId || meta
|
|
42166
|
+
if (meta?.lastHandledUserMsgId === args.inputId || isMissingHistoryUserTurn(meta, args.inputId) || read2.state === "ready" && (read2.turn.role !== "user" || ["handled", "failed", "canceled", "delivery_unknown"].includes(read2.turn.status ?? ""))) {
|
|
42106
42167
|
await this.abandonInboxInput(args.sessionId, args.inputId);
|
|
42107
42168
|
return;
|
|
42108
42169
|
}
|
|
@@ -48769,7 +48830,7 @@ class TurnHistoryGate {
|
|
|
48769
48830
|
constructor(args) {
|
|
48770
48831
|
this.args = args;
|
|
48771
48832
|
if (!args) {
|
|
48772
|
-
this.
|
|
48833
|
+
this.phase = "open";
|
|
48773
48834
|
this.opened = Promise.resolve();
|
|
48774
48835
|
return;
|
|
48775
48836
|
}
|
|
@@ -48782,15 +48843,18 @@ class TurnHistoryGate {
|
|
|
48782
48843
|
void this.openGate("timeout");
|
|
48783
48844
|
}, timeoutMs);
|
|
48784
48845
|
this.timer.unref?.();
|
|
48785
|
-
|
|
48846
|
+
try {
|
|
48847
|
+
this.unsubscribe = args.subscribeHistory(() => this.scheduleCheck());
|
|
48848
|
+
} catch (error) {
|
|
48849
|
+
this.log("debug", `Turn history subscription failed: ${formatErrorMessage(error)}`);
|
|
48850
|
+
}
|
|
48786
48851
|
if (!this.unsubscribe) {
|
|
48787
|
-
|
|
48788
|
-
`[${args.sessionId}] Turn history gate has no doc subscription; relying on timeout`
|
|
48789
|
-
);
|
|
48852
|
+
this.log("debug", "Turn history gate has no doc subscription; relying on timeout");
|
|
48790
48853
|
}
|
|
48791
48854
|
this.scheduleCheck();
|
|
48792
48855
|
}
|
|
48793
|
-
|
|
48856
|
+
beforeOpenAbort = new AbortController();
|
|
48857
|
+
phase = "waiting";
|
|
48794
48858
|
opened;
|
|
48795
48859
|
releaseWaiters = () => {
|
|
48796
48860
|
};
|
|
@@ -48808,7 +48872,7 @@ class TurnHistoryGate {
|
|
|
48808
48872
|
return new TurnHistoryGate(args);
|
|
48809
48873
|
}
|
|
48810
48874
|
get isOpen() {
|
|
48811
|
-
return this.open;
|
|
48875
|
+
return this.phase === "open";
|
|
48812
48876
|
}
|
|
48813
48877
|
/** Resolves when turn-scoped history writes may proceed. Never rejects. */
|
|
48814
48878
|
waitUntilOpen() {
|
|
@@ -48819,12 +48883,13 @@ class TurnHistoryGate {
|
|
|
48819
48883
|
* eviction). Late flushes self-create the assistant entry when needed.
|
|
48820
48884
|
*/
|
|
48821
48885
|
dispose() {
|
|
48886
|
+
this.beforeOpenAbort.abort();
|
|
48822
48887
|
void this.openGate("disposed");
|
|
48823
48888
|
}
|
|
48824
48889
|
/** Serialized, coalescing presence check — one read at a time per gate. */
|
|
48825
48890
|
scheduleCheck() {
|
|
48826
48891
|
const args = this.args;
|
|
48827
|
-
if (this.
|
|
48892
|
+
if (this.phase !== "waiting" || !args) {
|
|
48828
48893
|
return;
|
|
48829
48894
|
}
|
|
48830
48895
|
if (this.checking) {
|
|
@@ -48836,7 +48901,7 @@ class TurnHistoryGate {
|
|
|
48836
48901
|
try {
|
|
48837
48902
|
do {
|
|
48838
48903
|
this.recheckRequested = false;
|
|
48839
|
-
if (this.
|
|
48904
|
+
if (this.phase !== "waiting") {
|
|
48840
48905
|
return;
|
|
48841
48906
|
}
|
|
48842
48907
|
const present = args.hasUserTurn ? await args.hasUserTurn(args.userTurnId) : (await args.readHistory()).some(
|
|
@@ -48848,48 +48913,64 @@ class TurnHistoryGate {
|
|
|
48848
48913
|
}
|
|
48849
48914
|
} while (this.recheckRequested);
|
|
48850
48915
|
} catch (error) {
|
|
48851
|
-
|
|
48852
|
-
`[${args.sessionId}] Turn history gate check failed: ${formatErrorMessage(error)}`
|
|
48853
|
-
);
|
|
48916
|
+
this.log("debug", `Turn history gate check failed: ${formatErrorMessage(error)}`);
|
|
48854
48917
|
} finally {
|
|
48855
48918
|
this.checking = false;
|
|
48856
48919
|
}
|
|
48857
48920
|
})();
|
|
48858
48921
|
}
|
|
48922
|
+
/** Diagnostics are best effort; a broken sink cannot hold a conversation. */
|
|
48923
|
+
log(level, message) {
|
|
48924
|
+
try {
|
|
48925
|
+
this.args?.logger[level](`[${this.args.sessionId}] ${message}`);
|
|
48926
|
+
} catch {
|
|
48927
|
+
}
|
|
48928
|
+
}
|
|
48929
|
+
detachHistory() {
|
|
48930
|
+
const unsubscribe = this.unsubscribe;
|
|
48931
|
+
this.unsubscribe = void 0;
|
|
48932
|
+
try {
|
|
48933
|
+
unsubscribe?.();
|
|
48934
|
+
} catch (error) {
|
|
48935
|
+
this.log("debug", `Turn history unsubscribe failed: ${formatErrorMessage(error)}`);
|
|
48936
|
+
}
|
|
48937
|
+
}
|
|
48938
|
+
release() {
|
|
48939
|
+
if (this.phase === "open") return;
|
|
48940
|
+
this.phase = "open";
|
|
48941
|
+
if (this.timer) clearTimeout(this.timer);
|
|
48942
|
+
this.timer = null;
|
|
48943
|
+
this.detachHistory();
|
|
48944
|
+
this.releaseWaiters();
|
|
48945
|
+
}
|
|
48859
48946
|
async openGate(reason) {
|
|
48860
|
-
if (this.open)
|
|
48947
|
+
if (this.phase === "open") return;
|
|
48948
|
+
if (reason === "disposed") {
|
|
48949
|
+
this.release();
|
|
48861
48950
|
return;
|
|
48862
48951
|
}
|
|
48863
|
-
|
|
48864
|
-
|
|
48865
|
-
|
|
48866
|
-
|
|
48952
|
+
if (reason === "timeout") {
|
|
48953
|
+
this.log(
|
|
48954
|
+
"warn",
|
|
48955
|
+
`Turn history deadline reached after ${Date.now() - this.createdAtMs}ms; releasing writes even if the user entry or its assistant-entry write is still pending`
|
|
48956
|
+
);
|
|
48867
48957
|
}
|
|
48868
|
-
this.
|
|
48869
|
-
|
|
48870
|
-
|
|
48871
|
-
|
|
48872
|
-
|
|
48873
|
-
|
|
48874
|
-
|
|
48875
|
-
|
|
48876
|
-
|
|
48877
|
-
|
|
48878
|
-
|
|
48879
|
-
|
|
48880
|
-
|
|
48881
|
-
|
|
48882
|
-
|
|
48883
|
-
try {
|
|
48884
|
-
await args.onBeforeOpen(reason);
|
|
48885
|
-
} catch (error) {
|
|
48886
|
-
args.logger.error(
|
|
48887
|
-
`[${args.sessionId}] Turn history gate onBeforeOpen failed: ${formatErrorMessage(error)}`
|
|
48888
|
-
);
|
|
48889
|
-
}
|
|
48890
|
-
}
|
|
48958
|
+
if (this.phase === "opening") {
|
|
48959
|
+
if (reason === "timeout") this.release();
|
|
48960
|
+
return;
|
|
48961
|
+
}
|
|
48962
|
+
this.phase = "opening";
|
|
48963
|
+
this.detachHistory();
|
|
48964
|
+
try {
|
|
48965
|
+
this.log("debug", `Turn history gate opening (${reason})`);
|
|
48966
|
+
const beforeOpen = this.args?.onBeforeOpen?.(reason, this.beforeOpenAbort.signal);
|
|
48967
|
+
if (reason === "timeout") this.release();
|
|
48968
|
+
await beforeOpen;
|
|
48969
|
+
} catch (error) {
|
|
48970
|
+
this.log("error", `Turn history gate onBeforeOpen failed: ${formatErrorMessage(error)}`);
|
|
48971
|
+
} finally {
|
|
48972
|
+
this.release();
|
|
48891
48973
|
}
|
|
48892
|
-
this.releaseWaiters();
|
|
48893
48974
|
}
|
|
48894
48975
|
}
|
|
48895
48976
|
const SESSION_RECONCILE_CONCURRENCY = 4;
|
|
@@ -49287,9 +49368,9 @@ class SessionDispatchWatcher {
|
|
|
49287
49368
|
* e.g. the renderer superseding an undelivered turn to `canceled` when its
|
|
49288
49369
|
* content is resent as a new message.
|
|
49289
49370
|
*
|
|
49290
|
-
* An entry
|
|
49371
|
+
* An entry with a retained missing-history acknowledgement stays stashed but
|
|
49291
49372
|
* is never returned: the negative acknowledgement is PERMANENT for that
|
|
49292
|
-
* exact turn
|
|
49373
|
+
* exact turn, including after another timeout, so no turn source may dispatch it — a
|
|
49293
49374
|
* duplicate RPC offer must not resurrect the turn. Recovery is a fresh send
|
|
49294
49375
|
* with a new turn id (the conversation's resend entry), never a revival.
|
|
49295
49376
|
*/
|
|
@@ -49308,7 +49389,7 @@ class SessionDispatchWatcher {
|
|
|
49308
49389
|
stash.delete(userTurnId);
|
|
49309
49390
|
continue;
|
|
49310
49391
|
}
|
|
49311
|
-
if (userTurnId
|
|
49392
|
+
if (isMissingHistoryUserTurn(meta, userTurnId)) {
|
|
49312
49393
|
continue;
|
|
49313
49394
|
}
|
|
49314
49395
|
this.turnSourceHints.set(`${sessionId}:${userTurnId}`, "rpc");
|
|
@@ -50686,7 +50767,7 @@ class SessionDispatchWatcher {
|
|
|
50686
50767
|
}
|
|
50687
50768
|
/** Durable evidence that this turn ran or must never run again. */
|
|
50688
50769
|
hasQueuedTurnSettled(meta, turnId, history) {
|
|
50689
|
-
return meta.lastHandledUserMsgId === turnId || meta.settledActivationUserMsgId === turnId || meta
|
|
50770
|
+
return meta.lastHandledUserMsgId === turnId || meta.settledActivationUserMsgId === turnId || isMissingHistoryUserTurn(meta, turnId) || this.deps.executionService.getTerminalUserTurnStatusWithoutEntry?.(meta.id, turnId) !== void 0 || history.some((entry) => {
|
|
50690
50771
|
if (entry.role !== "user" || entry.id !== turnId) return false;
|
|
50691
50772
|
const status = resolveSessionHistoryStatus(entry);
|
|
50692
50773
|
return status === "handled" || status === "failed" || status === "canceled";
|
|
@@ -50773,7 +50854,7 @@ class SessionDispatchWatcher {
|
|
|
50773
50854
|
* activation entirely, going unwatched and silently unrun. `settledActivationUserMsgId`
|
|
50774
50855
|
* suppresses only a matching pointer, and the turn it names is already
|
|
50775
50856
|
* terminal, so a later settlement may replace it freely — unlike
|
|
50776
|
-
*
|
|
50857
|
+
* missing-history acknowledgement IDs, whose eviction would revive pending turns.
|
|
50777
50858
|
*
|
|
50778
50859
|
* `processingUserMsgId` is different: it is execution-owned, dispatch is
|
|
50779
50860
|
* serialized per session, and we only reach here with no active turn, so
|
|
@@ -51063,7 +51144,7 @@ class SessionDispatchWatcher {
|
|
|
51063
51144
|
)}`
|
|
51064
51145
|
);
|
|
51065
51146
|
}
|
|
51066
|
-
if (meta.machineId !== this.deps.machineId || meta.isArchived || !hasPendingUserTurnActivation(meta)) {
|
|
51147
|
+
if (meta.machineId !== this.deps.machineId || meta.isArchived || !hasPendingUserTurnActivation(meta) || getPendingUserTurnActivationId(meta) !== getPendingUserTurnActivationId(previousMeta)) {
|
|
51067
51148
|
return;
|
|
51068
51149
|
}
|
|
51069
51150
|
const pendingUserMsgId = getPendingUserTurnActivationId(meta);
|
|
@@ -51072,6 +51153,11 @@ class SessionDispatchWatcher {
|
|
|
51072
51153
|
};
|
|
51073
51154
|
if (pendingUserMsgId) {
|
|
51074
51155
|
recoveryPatch.lastMissingHistoryUserMsgId = pendingUserMsgId;
|
|
51156
|
+
recoveryPatch.missingHistoryUserMsgIds = {
|
|
51157
|
+
...meta.missingHistoryUserMsgIds,
|
|
51158
|
+
...meta.lastMissingHistoryUserMsgId ? { [meta.lastMissingHistoryUserMsgId]: true } : {},
|
|
51159
|
+
[pendingUserMsgId]: true
|
|
51160
|
+
};
|
|
51075
51161
|
}
|
|
51076
51162
|
this.deps.logger.warn(
|
|
51077
51163
|
`[${sessionId}] Marking missing-history recovery for user turn ${pendingUserMsgId ?? "unknown"} (message_delivery_failed)`
|
|
@@ -51158,7 +51244,7 @@ class SessionDispatchWatcher {
|
|
|
51158
51244
|
}
|
|
51159
51245
|
const observedPreferred = preferred;
|
|
51160
51246
|
preferred = this.deps.executionService.getPreferredInboxHumanInput?.(meta.id);
|
|
51161
|
-
if (preferred && (meta
|
|
51247
|
+
if (preferred && (isMissingHistoryUserTurn(meta, preferred) || meta.lastHandledUserMsgId === preferred || history.some(
|
|
51162
51248
|
(e) => e.id === preferred && ["handled", "failed", "canceled", "delivery_unknown"].includes(e.status ?? "")
|
|
51163
51249
|
))) {
|
|
51164
51250
|
await this.deps.executionService.abandonInboxInput?.(meta.id, preferred);
|
|
@@ -52671,7 +52757,6 @@ class SessionEditAndResendService {
|
|
|
52671
52757
|
lastHandledUserMsgId: previousUserId,
|
|
52672
52758
|
processingUserMsgId: void 0,
|
|
52673
52759
|
lastCanceledTurn: void 0,
|
|
52674
|
-
lastMissingHistoryUserMsgId: void 0,
|
|
52675
52760
|
lastMessageAt: getServerNow()
|
|
52676
52761
|
});
|
|
52677
52762
|
await this.deps.workspaceDocument.persistPendingChanges("session-edit-and-resend-commit");
|
|
@@ -52690,7 +52775,6 @@ class SessionEditAndResendService {
|
|
|
52690
52775
|
lastHandledUserMsgId: commitMeta.lastHandledUserMsgId,
|
|
52691
52776
|
processingUserMsgId: commitMeta.processingUserMsgId,
|
|
52692
52777
|
lastCanceledTurn: commitMeta.lastCanceledTurn,
|
|
52693
|
-
lastMissingHistoryUserMsgId: commitMeta.lastMissingHistoryUserMsgId,
|
|
52694
52778
|
lastMessageAt: commitMeta.lastMessageAt
|
|
52695
52779
|
}).catch((rollbackError) => {
|
|
52696
52780
|
this.deps.logger.error(
|
|
@@ -53512,6 +53596,16 @@ class CoordinatorScope extends Service()("lody/orchestration/Coordinator") {
|
|
|
53512
53596
|
);
|
|
53513
53597
|
}
|
|
53514
53598
|
}
|
|
53599
|
+
class OrchestrationStorageFailure extends Error {
|
|
53600
|
+
_tag = "OrchestrationStorageFailure";
|
|
53601
|
+
kind;
|
|
53602
|
+
code;
|
|
53603
|
+
constructor(cause) {
|
|
53604
|
+
super(cause instanceof Error ? cause.message : String(cause), { cause });
|
|
53605
|
+
this.code = cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string" ? cause.code : void 0;
|
|
53606
|
+
this.kind = this.code === "SQLITE_BUSY" || this.code === "SQLITE_BUSY_SNAPSHOT" ? "busy" : this.code?.startsWith("SQLITE_CONSTRAINT") || this.code === "OPERATION_ID_REUSED" ? "invariant" : "storage";
|
|
53607
|
+
}
|
|
53608
|
+
}
|
|
53515
53609
|
class InboxRepository extends Service()(
|
|
53516
53610
|
"lody/orchestration/InboxRepository"
|
|
53517
53611
|
) {
|
|
@@ -53525,6 +53619,17 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53525
53619
|
gen(function* () {
|
|
53526
53620
|
const repo2 = yield* InboxRepository;
|
|
53527
53621
|
const execution = yield* InboxExecution;
|
|
53622
|
+
const report = (cause) => suspend(() => execution.report(cause)).pipe(
|
|
53623
|
+
catchCause(
|
|
53624
|
+
(failure) => hasInterrupts(failure) ? failCause(
|
|
53625
|
+
fromReasons(failure.reasons.filter(isInterruptReason))
|
|
53626
|
+
) : void_
|
|
53627
|
+
)
|
|
53628
|
+
);
|
|
53629
|
+
const storageBusy = (cause) => cause.reasons.some(
|
|
53630
|
+
(reason) => isFailReason(reason) && reason.error instanceof OrchestrationStorageFailure && reason.error.kind === "busy"
|
|
53631
|
+
);
|
|
53632
|
+
const reportIndependentFailure = (cause) => hasInterrupts(cause) || storageBusy(cause) ? failCause(cause) : report(cause);
|
|
53528
53633
|
const scope$1 = yield* scope;
|
|
53529
53634
|
const submissionGate = makeUnsafe$2(1);
|
|
53530
53635
|
let quiesced = false;
|
|
@@ -53536,21 +53641,52 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53536
53641
|
const pauses = /* @__PURE__ */ new Map();
|
|
53537
53642
|
const settlements = /* @__PURE__ */ new Map();
|
|
53538
53643
|
const retrySettlements = fn("OperationInbox.retrySettlements")(function* (settle = repo2.settle, release2 = repo2.release, pause = repo2.pause) {
|
|
53644
|
+
let failures = empty$1;
|
|
53645
|
+
const attempt = (effect2) => suspend(effect2).pipe(
|
|
53646
|
+
catchCause((cause) => {
|
|
53647
|
+
if (hasInterrupts(cause)) return failCause(cause);
|
|
53648
|
+
failures = combine(failures, cause);
|
|
53649
|
+
if (storageBusy(cause)) return failCause(failures);
|
|
53650
|
+
return void_;
|
|
53651
|
+
})
|
|
53652
|
+
);
|
|
53539
53653
|
for (const [key2, receipt] of pauses) {
|
|
53540
|
-
yield*
|
|
53541
|
-
|
|
53542
|
-
|
|
53654
|
+
yield* attempt(
|
|
53655
|
+
() => withGate(
|
|
53656
|
+
receipt.scope,
|
|
53657
|
+
pause(receipt.scope, receipt.id, receipt.ids, receipt.cancelId)
|
|
53658
|
+
).pipe(
|
|
53659
|
+
tap$1(
|
|
53660
|
+
() => sync(() => {
|
|
53661
|
+
if (pauses.get(key2) === receipt) pauses.delete(key2);
|
|
53662
|
+
})
|
|
53663
|
+
)
|
|
53664
|
+
)
|
|
53543
53665
|
);
|
|
53544
|
-
if (pauses.get(key2) === receipt) pauses.delete(key2);
|
|
53545
53666
|
}
|
|
53546
53667
|
for (const [id, receipt] of releases) {
|
|
53547
|
-
yield*
|
|
53548
|
-
|
|
53668
|
+
yield* attempt(
|
|
53669
|
+
() => release2(receipt).pipe(
|
|
53670
|
+
tap$1(
|
|
53671
|
+
() => sync(() => {
|
|
53672
|
+
if (releases.get(id) === receipt) releases.delete(id);
|
|
53673
|
+
})
|
|
53674
|
+
)
|
|
53675
|
+
)
|
|
53676
|
+
);
|
|
53549
53677
|
}
|
|
53550
53678
|
for (const [id, receipt] of settlements) {
|
|
53551
|
-
yield*
|
|
53552
|
-
|
|
53679
|
+
yield* attempt(
|
|
53680
|
+
() => settle(receipt.batch, receipt.outcome, receipt.cause).pipe(
|
|
53681
|
+
tap$1(
|
|
53682
|
+
() => sync(() => {
|
|
53683
|
+
if (settlements.get(id) === receipt) settlements.delete(id);
|
|
53684
|
+
})
|
|
53685
|
+
)
|
|
53686
|
+
)
|
|
53687
|
+
);
|
|
53553
53688
|
}
|
|
53689
|
+
if (failures.reasons.length) return yield* failCause(failures);
|
|
53554
53690
|
});
|
|
53555
53691
|
yield* addFinalizer(() => retrySettlements().pipe(orDie));
|
|
53556
53692
|
const withGate = (s, effect2) => acquireUseRelease(
|
|
@@ -53571,6 +53707,29 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53571
53707
|
})
|
|
53572
53708
|
);
|
|
53573
53709
|
const wake = offer(signal, void 0).pipe(asVoid);
|
|
53710
|
+
let busyRetryScheduled = false;
|
|
53711
|
+
let busyRetryAttempt = 0;
|
|
53712
|
+
const deferBusyScan = fn("OperationInbox.deferBusyScan")(
|
|
53713
|
+
function* () {
|
|
53714
|
+
if (quiesced || busyRetryScheduled) return;
|
|
53715
|
+
busyRetryScheduled = true;
|
|
53716
|
+
const delay2 = 250 * 2 ** busyRetryAttempt;
|
|
53717
|
+
busyRetryAttempt = Math.min(busyRetryAttempt + 1, 3);
|
|
53718
|
+
yield* sleep(delay2).pipe(
|
|
53719
|
+
// Clear before waking: an old retry must not clear a newer retry.
|
|
53720
|
+
ensuring(
|
|
53721
|
+
sync(() => {
|
|
53722
|
+
busyRetryScheduled = false;
|
|
53723
|
+
})
|
|
53724
|
+
),
|
|
53725
|
+
andThen(suspend(() => quiesced ? void_ : wake)),
|
|
53726
|
+
interruptible,
|
|
53727
|
+
forkIn(scope$1)
|
|
53728
|
+
);
|
|
53729
|
+
},
|
|
53730
|
+
// Publish the flag and its owned fiber together, even if a caller stops.
|
|
53731
|
+
uninterruptible
|
|
53732
|
+
);
|
|
53574
53733
|
const prepare = fn("OperationInbox.prepare")(function* (input) {
|
|
53575
53734
|
return yield* withGate(input, repo2.prepare(input, owner));
|
|
53576
53735
|
});
|
|
@@ -53590,39 +53749,47 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53590
53749
|
)
|
|
53591
53750
|
);
|
|
53592
53751
|
const scan = fn("OperationInbox.scan")(function* () {
|
|
53593
|
-
|
|
53752
|
+
if (busyRetryScheduled) return;
|
|
53753
|
+
yield* retrySettlements().pipe(catchCause(reportIndependentFailure));
|
|
53594
53754
|
if (quiesced) return;
|
|
53595
53755
|
const pending = yield* repo2.pending(workspaceId);
|
|
53596
53756
|
for (const item of pending) {
|
|
53597
|
-
|
|
53598
|
-
|
|
53599
|
-
|
|
53600
|
-
|
|
53601
|
-
|
|
53602
|
-
|
|
53603
|
-
|
|
53604
|
-
|
|
53605
|
-
|
|
53606
|
-
|
|
53607
|
-
|
|
53608
|
-
|
|
53609
|
-
|
|
53610
|
-
|
|
53611
|
-
(
|
|
53612
|
-
(
|
|
53613
|
-
|
|
53614
|
-
|
|
53615
|
-
|
|
53616
|
-
|
|
53617
|
-
|
|
53618
|
-
|
|
53619
|
-
|
|
53757
|
+
yield* gen(function* () {
|
|
53758
|
+
const key2 = inboxScopeKey(item.input);
|
|
53759
|
+
if (running.has(key2)) return;
|
|
53760
|
+
const batch = yield* withGate(
|
|
53761
|
+
item.input,
|
|
53762
|
+
repo2.prepare(item.input, owner, item.intentId)
|
|
53763
|
+
);
|
|
53764
|
+
if (!batch || !execution.ready(batch)) return;
|
|
53765
|
+
running.add(key2);
|
|
53766
|
+
yield* suspend(() => execution.launch(batch)).pipe(
|
|
53767
|
+
catchCause(report),
|
|
53768
|
+
ensuring(
|
|
53769
|
+
sync(() => running.delete(key2)).pipe(
|
|
53770
|
+
andThen(repo2.pending(workspaceId)),
|
|
53771
|
+
flatMap(
|
|
53772
|
+
(items) => items.some(
|
|
53773
|
+
(candidate) => inboxScopeKey(candidate.input) === key2 && candidate.input.inputId !== batch.inputId
|
|
53774
|
+
) ? wake : void_
|
|
53775
|
+
),
|
|
53776
|
+
catchCause(report)
|
|
53777
|
+
)
|
|
53778
|
+
),
|
|
53779
|
+
forkIn(scope$1)
|
|
53780
|
+
);
|
|
53781
|
+
}).pipe(catchCause(reportIndependentFailure));
|
|
53620
53782
|
}
|
|
53783
|
+
busyRetryAttempt = 0;
|
|
53621
53784
|
});
|
|
53622
53785
|
yield* forever(
|
|
53623
53786
|
take(signal).pipe(
|
|
53624
53787
|
flatMap(() => scan()),
|
|
53625
|
-
catchCause(
|
|
53788
|
+
catchCause(
|
|
53789
|
+
(cause) => hasInterrupts(cause) ? failCause(cause) : report(cause).pipe(
|
|
53790
|
+
andThen(storageBusy(cause) ? deferBusyScan() : void_)
|
|
53791
|
+
)
|
|
53792
|
+
)
|
|
53626
53793
|
)
|
|
53627
53794
|
).pipe(forkScoped);
|
|
53628
53795
|
yield* wake;
|
|
@@ -53698,7 +53865,9 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53698
53865
|
const key2 = JSON.stringify([inboxScopeKey(s), cancelId ?? `legacy:${id}`]);
|
|
53699
53866
|
const receipt = { scope: s, id, ids, cancelId };
|
|
53700
53867
|
pauses.set(key2, receipt);
|
|
53701
|
-
const paused = yield* repo2.pause(s, id, ids, cancelId).pipe(
|
|
53868
|
+
const paused = yield* suspend(() => repo2.pause(s, id, ids, cancelId)).pipe(
|
|
53869
|
+
tapCause(() => sync(() => vetoed.add(inboxScopeKey(s))))
|
|
53870
|
+
);
|
|
53702
53871
|
if (pauses.get(key2) === receipt) pauses.delete(key2);
|
|
53703
53872
|
return paused;
|
|
53704
53873
|
}).pipe(uninterruptible)
|
|
@@ -53710,13 +53879,13 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53710
53879
|
releases.set(key2, e);
|
|
53711
53880
|
yield* withGate(
|
|
53712
53881
|
e,
|
|
53713
|
-
repo2.release(e).pipe(
|
|
53882
|
+
suspend(() => repo2.release(e)).pipe(
|
|
53714
53883
|
tap$1(
|
|
53715
53884
|
() => sync(() => {
|
|
53716
53885
|
if (releases.get(key2) === e) releases.delete(key2);
|
|
53717
53886
|
})
|
|
53718
53887
|
),
|
|
53719
|
-
|
|
53888
|
+
tapCause(
|
|
53720
53889
|
() => sync(() => {
|
|
53721
53890
|
if (e.releaseWatermark === void 0) e.outcome = "failed";
|
|
53722
53891
|
})
|
|
@@ -53729,13 +53898,15 @@ class OperationInbox extends Service()("lody/orchestration/OperationInbox") {
|
|
|
53729
53898
|
settle: fn("OperationInbox.settle")(function* (batch, outcome, cause) {
|
|
53730
53899
|
const receipt = { batch, outcome, cause };
|
|
53731
53900
|
settlements.set(batch.batchId, receipt);
|
|
53732
|
-
yield* repo2.settle(batch, outcome, cause).pipe(
|
|
53901
|
+
yield* suspend(() => repo2.settle(batch, outcome, cause)).pipe(
|
|
53733
53902
|
tap$1(
|
|
53734
53903
|
() => sync(() => {
|
|
53735
53904
|
if (settlements.get(batch.batchId) === receipt) settlements.delete(batch.batchId);
|
|
53736
53905
|
})
|
|
53737
53906
|
),
|
|
53738
|
-
catchCause(
|
|
53907
|
+
catchCause(
|
|
53908
|
+
(failure) => report(failure).pipe(andThen(storageBusy(failure) ? deferBusyScan() : wake))
|
|
53909
|
+
)
|
|
53739
53910
|
);
|
|
53740
53911
|
})
|
|
53741
53912
|
});
|
|
@@ -53872,16 +54043,6 @@ const makeInboxQueries = (sql) => {
|
|
|
53872
54043
|
pauseTarget: (w, s, id) => io(() => sql.pauseTarget(w, s, id))
|
|
53873
54044
|
};
|
|
53874
54045
|
};
|
|
53875
|
-
class OrchestrationStorageFailure extends Error {
|
|
53876
|
-
_tag = "OrchestrationStorageFailure";
|
|
53877
|
-
kind;
|
|
53878
|
-
code;
|
|
53879
|
-
constructor(cause) {
|
|
53880
|
-
super(cause instanceof Error ? cause.message : String(cause), { cause });
|
|
53881
|
-
this.code = cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string" ? cause.code : void 0;
|
|
53882
|
-
this.kind = this.code === "SQLITE_BUSY" || this.code === "SQLITE_BUSY_SNAPSHOT" ? "busy" : this.code?.startsWith("SQLITE_CONSTRAINT") || this.code === "OPERATION_ID_REUSED" ? "invariant" : "storage";
|
|
53883
|
-
}
|
|
53884
|
-
}
|
|
53885
54046
|
const inboxRepositoryLayer = (sql, ownedConnection = false) => {
|
|
53886
54047
|
const io = (f) => try_({ try: f, catch: (cause) => new OrchestrationStorageFailure(cause) });
|
|
53887
54048
|
const repository = {
|
|
@@ -63298,12 +63459,13 @@ class MessageHandler {
|
|
|
63298
63459
|
getServerNow()
|
|
63299
63460
|
)
|
|
63300
63461
|
),
|
|
63301
|
-
put: (request, rejection) => runPromise(
|
|
63462
|
+
put: (request, rejection, retainUntil) => runPromise(
|
|
63302
63463
|
putSessionHistoryRpcRejection(
|
|
63303
63464
|
path__default.join(getLodyDataDir(), "session-history-rpc-rejections.sqlite3"),
|
|
63304
63465
|
request,
|
|
63305
63466
|
rejection,
|
|
63306
|
-
getServerNow()
|
|
63467
|
+
getServerNow(),
|
|
63468
|
+
retainUntil
|
|
63307
63469
|
)
|
|
63308
63470
|
)
|
|
63309
63471
|
},
|
|
@@ -63502,6 +63664,36 @@ class MessageHandler {
|
|
|
63502
63664
|
prepareSession: async (spec) => this.declineSessionPreparation(spec),
|
|
63503
63665
|
cancelSessionPreparation: async (args) => this.declineSessionPreparationCancel(args),
|
|
63504
63666
|
resolveSessionHistoryOwnerSessionId: this.resolveSessionHistoryOwnerSessionId,
|
|
63667
|
+
authorizeSessionHistoryRead: async ({ sessionId, readProof: readProof2 }) => {
|
|
63668
|
+
if (!readProof2 || !this.cloudPort.access.verifySessionHistoryRead) return false;
|
|
63669
|
+
const target = await this.resolveSessionHistoryAccessTarget(sessionId);
|
|
63670
|
+
return await this.cloudPort.access.verifySessionHistoryRead({
|
|
63671
|
+
workspaceId: this.workspaceId,
|
|
63672
|
+
machineId: this.machineId,
|
|
63673
|
+
sessionId,
|
|
63674
|
+
...target,
|
|
63675
|
+
requestToken: readProof2
|
|
63676
|
+
});
|
|
63677
|
+
},
|
|
63678
|
+
authorizeSessionHistoryWrite: async ({
|
|
63679
|
+
sessionId,
|
|
63680
|
+
writeProof,
|
|
63681
|
+
requestId,
|
|
63682
|
+
operation,
|
|
63683
|
+
payload
|
|
63684
|
+
}) => {
|
|
63685
|
+
if (!writeProof || !this.cloudPort.access.verifySessionHistoryWrite) return null;
|
|
63686
|
+
const target = await this.resolveSessionHistoryAccessTarget(sessionId);
|
|
63687
|
+
return await this.cloudPort.access.verifySessionHistoryWrite({
|
|
63688
|
+
workspaceId: this.workspaceId,
|
|
63689
|
+
machineId: this.machineId,
|
|
63690
|
+
sessionId,
|
|
63691
|
+
...target,
|
|
63692
|
+
requestToken: writeProof,
|
|
63693
|
+
requestId,
|
|
63694
|
+
intentDigest: await sessionHistoryWriteIntentDigest(requestId, operation, payload)
|
|
63695
|
+
});
|
|
63696
|
+
},
|
|
63505
63697
|
readSessionHistory: async ({ sessionId, query, signal }) => await this.readSessionHistoryForRpc(sessionId, query, signal),
|
|
63506
63698
|
waitForSessionHistoryChanges: async (args) => await this.waitForSessionHistoryChanges(args),
|
|
63507
63699
|
writeSessionHistory: async ({ sessionId, operation, payload }) => await this.writeSessionHistoryForRpc(sessionId, operation, payload),
|
|
@@ -63844,6 +64036,7 @@ class MessageHandler {
|
|
|
63844
64036
|
machineRpcServer = null;
|
|
63845
64037
|
encryptedQueryServer = null;
|
|
63846
64038
|
async readEncryptedQuery(input, expiresAt, signal) {
|
|
64039
|
+
if (input.method === "session/history-read") throw new Error("e2ee_query_method");
|
|
63847
64040
|
if (!this.encryptedQueryServer) throw new Error("e2ee_rpc_unavailable");
|
|
63848
64041
|
return this.encryptedQueryServer.readQuery(input, expiresAt, signal);
|
|
63849
64042
|
}
|
|
@@ -63959,7 +64152,8 @@ class MessageHandler {
|
|
|
63959
64152
|
}
|
|
63960
64153
|
await this.writeAssistantEntryForTurn(sessionId, sessionDoc, turnId, modelInfo, userTurnId);
|
|
63961
64154
|
}
|
|
63962
|
-
async writeAssistantEntryForTurn(sessionId, sessionDoc, turnId, modelInfo, userTurnId) {
|
|
64155
|
+
async writeAssistantEntryForTurn(sessionId, sessionDoc, turnId, modelInfo, userTurnId, signal) {
|
|
64156
|
+
if (signal?.aborted) return;
|
|
63963
64157
|
const span = startTraceSpan(this.logger, "history.write_assistant_entry", {
|
|
63964
64158
|
sessionId,
|
|
63965
64159
|
turnId,
|
|
@@ -63972,6 +64166,10 @@ class MessageHandler {
|
|
|
63972
64166
|
let author = existing.state === "ready" ? readMessageAuthor(existing.turn.author) : void 0;
|
|
63973
64167
|
if (!author && userTurnId) {
|
|
63974
64168
|
const input = await backend.history.readTurn(userTurnId);
|
|
64169
|
+
if (signal?.aborted) {
|
|
64170
|
+
span.end();
|
|
64171
|
+
return;
|
|
64172
|
+
}
|
|
63975
64173
|
if (input.state === "ready" && input.turn.role === "user") {
|
|
63976
64174
|
this.executionService.setTurnNotificationAudience(
|
|
63977
64175
|
sessionId,
|
|
@@ -63990,6 +64188,10 @@ class MessageHandler {
|
|
|
63990
64188
|
this.workspaceId
|
|
63991
64189
|
);
|
|
63992
64190
|
}
|
|
64191
|
+
if (signal?.aborted) {
|
|
64192
|
+
span.end();
|
|
64193
|
+
return;
|
|
64194
|
+
}
|
|
63993
64195
|
await backend.openAssistantTurn({
|
|
63994
64196
|
turnId,
|
|
63995
64197
|
...author ? { author } : {},
|
|
@@ -67414,7 +67616,9 @@ class MessageHandler {
|
|
|
67414
67616
|
}
|
|
67415
67617
|
}
|
|
67416
67618
|
async finalizeACPState(sessionId, turnId) {
|
|
67417
|
-
|
|
67619
|
+
const finalizesCurrentTurn = !turnId || this.store.getTurnId(sessionId) === turnId;
|
|
67620
|
+
const gateToFinalize = finalizesCurrentTurn && this.store.has(sessionId) ? this.store.get(sessionId).turnHistoryGate : null;
|
|
67621
|
+
if (finalizesCurrentTurn) {
|
|
67418
67622
|
await this.awaitTurnHistoryGate(sessionId);
|
|
67419
67623
|
}
|
|
67420
67624
|
const endedAt = Date.now();
|
|
@@ -67430,6 +67634,7 @@ class MessageHandler {
|
|
|
67430
67634
|
await this.flushCodexGeneratedImageUploads(sessionId, turnId);
|
|
67431
67635
|
const sessionDoc = await this.workspaceDocument.getOrCreateSessionDoc(sessionId);
|
|
67432
67636
|
const backend = await this.getSessionBackend(sessionDoc);
|
|
67637
|
+
gateToFinalize?.dispose();
|
|
67433
67638
|
await backend.applyHistoryAction({
|
|
67434
67639
|
kind: "finish-assistant",
|
|
67435
67640
|
turnId,
|
|
@@ -67569,13 +67774,14 @@ class MessageHandler {
|
|
|
67569
67774
|
);
|
|
67570
67775
|
},
|
|
67571
67776
|
subscribeHistory: (listener2) => subscribeSessionChanges(sessionDoc, listener2),
|
|
67572
|
-
onBeforeOpen: async () => {
|
|
67777
|
+
onBeforeOpen: async (_reason, signal) => {
|
|
67573
67778
|
await this.writeAssistantEntryForTurn(
|
|
67574
67779
|
sessionId,
|
|
67575
67780
|
sessionDoc,
|
|
67576
67781
|
turnId,
|
|
67577
67782
|
this.sessionManager.getSession(sessionId)?.agentClient?.currentModel,
|
|
67578
|
-
userTurnId
|
|
67783
|
+
userTurnId,
|
|
67784
|
+
signal
|
|
67579
67785
|
);
|
|
67580
67786
|
}
|
|
67581
67787
|
});
|
|
@@ -68304,9 +68510,9 @@ class MessageHandler {
|
|
|
68304
68510
|
throw new Error("e2ee_feature_unavailable");
|
|
68305
68511
|
if (!this.acpInteractionOwner) {
|
|
68306
68512
|
this.acpInteractionOwner = Promise.all([
|
|
68307
|
-
import("./acp-interaction-owner-
|
|
68308
|
-
import("./index-
|
|
68309
|
-
import("./telemetry-
|
|
68513
|
+
import("./acp-interaction-owner-C-E7Jj_j.js"),
|
|
68514
|
+
import("./index-p6riVneO.js"),
|
|
68515
|
+
import("./telemetry-DKZfKfJp.js").then((n) => n.mc)
|
|
68310
68516
|
]).then(
|
|
68311
68517
|
([{ createAcpInteractionOwner }, { createRpcSecretRecipient: createRpcSecretRecipient2, encryptRpcSecret: encryptRpcSecret2 }, shared]) => createAcpInteractionOwner({
|
|
68312
68518
|
workspaceId: this.workspaceId,
|
|
@@ -68475,6 +68681,14 @@ class MessageHandler {
|
|
|
68475
68681
|
}
|
|
68476
68682
|
};
|
|
68477
68683
|
switch (request.method) {
|
|
68684
|
+
case "session/history-read":
|
|
68685
|
+
return SessionHistoryReadResponseSchema.parse(
|
|
68686
|
+
await this.readSessionHistoryForRpc(
|
|
68687
|
+
request.params.sessionId,
|
|
68688
|
+
request.params.query,
|
|
68689
|
+
signal
|
|
68690
|
+
)
|
|
68691
|
+
);
|
|
68478
68692
|
case "machine/acp-interaction":
|
|
68479
68693
|
throw new Error("e2ee_feature_unavailable");
|
|
68480
68694
|
case "machine/status":
|
|
@@ -68527,7 +68741,7 @@ class MessageHandler {
|
|
|
68527
68741
|
throw new Error("Sorbet credentials configuration unavailable");
|
|
68528
68742
|
if (!this.sorbetCredentials) throw new Error("Sorbet credentials unsupported");
|
|
68529
68743
|
try {
|
|
68530
|
-
const { SorbetCredentialsResultSchema, SorbetProvidersResultSchema } = await import("./telemetry-
|
|
68744
|
+
const { SorbetCredentialsResultSchema, SorbetProvidersResultSchema } = await import("./telemetry-DKZfKfJp.js").then((n) => n.mb);
|
|
68531
68745
|
if (request.method === "sorbet/credentials-list") {
|
|
68532
68746
|
return SorbetCredentialsResultSchema.parse({
|
|
68533
68747
|
type: "sorbet/credentials-list",
|
|
@@ -68573,7 +68787,7 @@ class MessageHandler {
|
|
|
68573
68787
|
const { sessionId, name: name2, arguments: args } = request.params;
|
|
68574
68788
|
if (request.workspaceId !== this.workspaceId || request.machineId !== this.machineId || request.ownerSessionId !== sessionId)
|
|
68575
68789
|
throw new Error("Session tool scope mismatch");
|
|
68576
|
-
const { executeDaemonSessionTool } = await import("./daemon-session-tools-
|
|
68790
|
+
const { executeDaemonSessionTool } = await import("./daemon-session-tools-5WXyyVe4.js");
|
|
68577
68791
|
const sourceWorkdir = this.resolveSessionWorkspaceRoot(sessionId);
|
|
68578
68792
|
if (!sourceWorkdir && args && typeof args === "object" && "attachments" in args)
|
|
68579
68793
|
throw new Error("Requester Session workspace is unavailable");
|
|
@@ -69011,6 +69225,23 @@ class MessageHandler {
|
|
|
69011
69225
|
break;
|
|
69012
69226
|
}
|
|
69013
69227
|
}
|
|
69228
|
+
/** Synced ownership/containment is the accepted UI trust boundary, not a registry. */
|
|
69229
|
+
async resolveSessionHistoryAccessTarget(sessionId) {
|
|
69230
|
+
await this.resolveSessionHistoryOwnerSessionId(sessionId);
|
|
69231
|
+
const entry = await this.workspaceDocument.repo.getDocMeta(getSessionRoomId(sessionId));
|
|
69232
|
+
if (!entry || entry.meta.machineId !== this.machineId)
|
|
69233
|
+
throw new Error("session_history_read_denied");
|
|
69234
|
+
const child2 = { ...entry.meta, id: sessionId };
|
|
69235
|
+
const parentId = typeof child2.parentSessionId === "string" ? child2.parentSessionId : void 0;
|
|
69236
|
+
const parent = parentId ? await this.workspaceDocument.repo.getDocMeta(getSessionRoomId(parentId)) : void 0;
|
|
69237
|
+
const root = parent && !parent.deleted && isContainedSession(child2, { ...parent.meta, id: parentId }) ? { ...parent.meta, id: parentId } : child2;
|
|
69238
|
+
const project = child2.project;
|
|
69239
|
+
return {
|
|
69240
|
+
rootSessionId: root.id,
|
|
69241
|
+
sessionOwnerUserId: typeof root.userId === "string" ? root.userId : void 0,
|
|
69242
|
+
localProjectId: project?.kind === "local" ? project.localProjectId : void 0
|
|
69243
|
+
};
|
|
69244
|
+
}
|
|
69014
69245
|
resolveSessionHistoryOwnerSessionId = async (sessionId, options) => {
|
|
69015
69246
|
const signal = options?.signal ? AbortSignal.any([options.signal, this.historyOwnerAbort.signal]) : this.historyOwnerAbort.signal;
|
|
69016
69247
|
return await runPromise(
|
|
@@ -70402,7 +70633,7 @@ class MessageHandler {
|
|
|
70402
70633
|
"Stop all tasks on this daemon before restoring its identity."
|
|
70403
70634
|
);
|
|
70404
70635
|
}
|
|
70405
|
-
const { prepareMachineIdentityRestore, cancelPreparedMachineIdentityRestore } = await import("./machine-identity-restore-
|
|
70636
|
+
const { prepareMachineIdentityRestore, cancelPreparedMachineIdentityRestore } = await import("./machine-identity-restore-A8uLX7VW.js");
|
|
70406
70637
|
const prepared = await prepareMachineIdentityRestore({
|
|
70407
70638
|
workspaceId: this.workspaceId,
|
|
70408
70639
|
sourceMachineId: this.machineId,
|
|
@@ -72992,6 +73223,9 @@ class MachineRuntime {
|
|
|
72992
73223
|
}
|
|
72993
73224
|
return this.dispatchLocalMachineRpc(request, context?.signal);
|
|
72994
73225
|
}
|
|
73226
|
+
resolveSessionHistoryAccessTarget(sessionId) {
|
|
73227
|
+
return this.requireHandler().resolveSessionHistoryAccessTarget(sessionId);
|
|
73228
|
+
}
|
|
72995
73229
|
handler = null;
|
|
72996
73230
|
clientLossHandler = null;
|
|
72997
73231
|
inspectClientLoss() {
|
|
@@ -80198,7 +80432,7 @@ const createNodeServicesForLease = async (sessionDoc, lease) => {
|
|
|
80198
80432
|
if (!await dispatchIndex().checkpoint(cursor, 0))
|
|
80199
80433
|
await rebuildDispatchIndex(dispatchIndex(), cursor);
|
|
80200
80434
|
}
|
|
80201
|
-
const { createRoostSessionData } = await import("./index-
|
|
80435
|
+
const { createRoostSessionData } = await import("./index-yZ5Xv7WP.js");
|
|
80202
80436
|
syncModelSummary = async () => {
|
|
80203
80437
|
const position = latestModelTurnId ? positionById.get(latestModelTurnId) : void 0;
|
|
80204
80438
|
const cached2 = position === void 0 ? void 0 : entries[position];
|
|
@@ -81587,7 +81821,7 @@ const createNodeServicesForLease = async (sessionDoc, lease) => {
|
|
|
81587
81821
|
return void 0;
|
|
81588
81822
|
});
|
|
81589
81823
|
const meta = await sessionDoc.getMetaState();
|
|
81590
|
-
if (meta && !meta.isArchived && meta
|
|
81824
|
+
if (meta && !meta.isArchived && !isMissingHistoryUserTurn(meta, entry.id) && meta.lastHandledUserMsgId !== entry.id) {
|
|
81591
81825
|
if (latest?.id === entry.id && meta.latestUserMsgId !== entry.id)
|
|
81592
81826
|
await sessionDoc.publishUserTurnActivation(entry.id);
|
|
81593
81827
|
}
|
|
@@ -81890,7 +82124,7 @@ class Lody {
|
|
|
81890
82124
|
if (!workspaceSupports({ mode: encrypted ? "protected" : "plaintext" }, "rpc")) {
|
|
81891
82125
|
if (!options.genesisHash || !options.cloudPort.e2ee)
|
|
81892
82126
|
throw new Error("e2ee_workspace_unavailable");
|
|
81893
|
-
const { openCliE2eeWorkspaceLegacy } = await import("./workspace-legacy-
|
|
82127
|
+
const { openCliE2eeWorkspaceLegacy } = await import("./workspace-legacy-C_cxzMuh.js").then((n) => n.bO);
|
|
81894
82128
|
e2ee = await openCliE2eeWorkspaceLegacy({
|
|
81895
82129
|
accountId: options.userId,
|
|
81896
82130
|
workspaceId: options.workspaceId,
|
|
@@ -81936,8 +82170,8 @@ class Lody {
|
|
|
81936
82170
|
if (e2ee) {
|
|
81937
82171
|
if (!options.genesisHash) throw new Error("e2ee_workspace_unavailable");
|
|
81938
82172
|
const { join: join2 } = await import("node:path");
|
|
81939
|
-
const { Effect: Effect2 } = await import("./chunks/vendor-effect-
|
|
81940
|
-
const { makeEncryptedAgentExecution, lazyExecutionJournal } = await import("./agent-execution-
|
|
82173
|
+
const { Effect: Effect2 } = await import("./chunks/vendor-effect-Bggm7QMO.js").then((n) => n.er);
|
|
82174
|
+
const { makeEncryptedAgentExecution, lazyExecutionJournal } = await import("./agent-execution-DKXM8hy_.js");
|
|
81941
82175
|
encryptedExecution = makeEncryptedAgentExecution({
|
|
81942
82176
|
genesis: options.genesisHash,
|
|
81943
82177
|
workspaceId: options.workspaceId,
|
|
@@ -82065,7 +82299,8 @@ class Lody {
|
|
|
82065
82299
|
this.machineId,
|
|
82066
82300
|
(input) => this.runtime.offerEncryptedRpcTurn(input),
|
|
82067
82301
|
(event) => this.logger.debug("[e2ee-rpc-timing]", event),
|
|
82068
|
-
(request, context) => this.runtime.handleEncryptedFeatureRpc(request, context)
|
|
82302
|
+
(request, context) => this.runtime.handleEncryptedFeatureRpc(request, context),
|
|
82303
|
+
(sessionId) => this.runtime.resolveSessionHistoryAccessTarget(sessionId)
|
|
82069
82304
|
);
|
|
82070
82305
|
this.documentManager.ensureMachineFlockDocJoined(this.machineId, { reason: "lody-start" });
|
|
82071
82306
|
}
|
|
@@ -86291,7 +86526,7 @@ async function createScheduleWorkspace(args) {
|
|
|
86291
86526
|
await resolveTarget(run2);
|
|
86292
86527
|
},
|
|
86293
86528
|
prepare: async (run2) => {
|
|
86294
|
-
const { prepareSessionInput: prepareSessionInput2, resolveTurnDispatchConfig } = await import("./telemetry-
|
|
86529
|
+
const { prepareSessionInput: prepareSessionInput2, resolveTurnDispatchConfig } = await import("./telemetry-DKZfKfJp.js").then((n) => n.mg);
|
|
86295
86530
|
const target = await resolveTarget(run2);
|
|
86296
86531
|
const agent = await resolveScheduleAgentRunConfig(
|
|
86297
86532
|
manager,
|
|
@@ -88946,8 +89181,7 @@ async function dispatchQuotaSchedule(options) {
|
|
|
88946
89181
|
if (!meta.latestUserMsgId || !matchesQuotaReservation(run2, meta.latestUserMsgId))
|
|
88947
89182
|
return "discarded";
|
|
88948
89183
|
await manager.repo.upsertDocMeta(getSessionRoomId(sessionId), {
|
|
88949
|
-
latestUserMsgId: prepared.userTurn.id
|
|
88950
|
-
lastMissingHistoryUserMsgId: void 0
|
|
89184
|
+
latestUserMsgId: prepared.userTurn.id
|
|
88951
89185
|
});
|
|
88952
89186
|
return "dispatched";
|
|
88953
89187
|
});
|
|
@@ -89617,7 +89851,7 @@ class LodyFleet {
|
|
|
89617
89851
|
dispatchE2eePairing: (message) => this.dispatchLocalE2eePairing(message),
|
|
89618
89852
|
dispatchSchedule: async (message) => {
|
|
89619
89853
|
const runtime = await this.resolveWorkspaceRuntime(message.workspaceId);
|
|
89620
|
-
const { executeScheduleCommand } = await import("./schedule-command-client-
|
|
89854
|
+
const { executeScheduleCommand } = await import("./schedule-command-client-D_Ti-1Rl.js").then((n) => n.f);
|
|
89621
89855
|
try {
|
|
89622
89856
|
const result2 = await executeScheduleCommand(
|
|
89623
89857
|
{
|
|
@@ -90154,8 +90388,12 @@ class LodyFleet {
|
|
|
90154
90388
|
lody = await Lody.create({
|
|
90155
90389
|
logger: workspaceLogger,
|
|
90156
90390
|
onEncryptedAuthorityConfirmed: (startedAt) => this.confirmEncryptedAuthority(workspace.id, startedAt),
|
|
90157
|
-
onEncryptedWindowNotice: (active) => {
|
|
90391
|
+
onEncryptedWindowNotice: (active, window) => {
|
|
90158
90392
|
const code = `e2ee_access_unconfirmed:${workspace.id}`;
|
|
90393
|
+
this.runtimeStateReporter.setE2eeAccessWindow(
|
|
90394
|
+
workspace.id,
|
|
90395
|
+
active ? window : void 0
|
|
90396
|
+
);
|
|
90159
90397
|
if (active)
|
|
90160
90398
|
this.runtimeStateReporter.upsertIssue({
|
|
90161
90399
|
code,
|
|
@@ -90210,7 +90448,7 @@ class LodyFleet {
|
|
|
90210
90448
|
const automation = this.runtimes.get(workspace.id)?.automations;
|
|
90211
90449
|
if (!automation) throw new Error("AUTOMATION_OWNER_UNAVAILABLE");
|
|
90212
90450
|
const result2 = await automation.remoteControl(input);
|
|
90213
|
-
const { remoteAutomationResultSchema } = await import("./index-
|
|
90451
|
+
const { remoteAutomationResultSchema } = await import("./index-Dpq04zN3.js");
|
|
90214
90452
|
return {
|
|
90215
90453
|
type: "session/automation-control_response",
|
|
90216
90454
|
sessionId: input.sessionId,
|
|
@@ -90450,6 +90688,8 @@ class LodyFleet {
|
|
|
90450
90688
|
this.retryTimers.delete(workspaceId);
|
|
90451
90689
|
this.encryptedAuthorityConfirmedAt.delete(workspaceId);
|
|
90452
90690
|
this.suspendedEncryptedWorkspaces.delete(workspaceId);
|
|
90691
|
+
this.runtimeStateReporter.setE2eeAccessWindow(workspaceId, void 0);
|
|
90692
|
+
this.runtimeStateReporter.clearIssue(`e2ee_access_unconfirmed:${workspaceId}`);
|
|
90453
90693
|
const state = this.runtimes.get(workspaceId);
|
|
90454
90694
|
if (!state) return;
|
|
90455
90695
|
await this.cleanupWorkspaceRuntime(state);
|
|
@@ -91162,7 +91402,7 @@ class LodyFleet {
|
|
|
91162
91402
|
throw new Error("e2ee_account_unavailable");
|
|
91163
91403
|
if (this.e2eeResets.has(workspace.id)) throw new Error("e2ee_identity_busy");
|
|
91164
91404
|
const completion = (async () => {
|
|
91165
|
-
const { resetCliE2eeIdentity, completedCliE2eeIdentityReset } = await import("./reset-identity-
|
|
91405
|
+
const { resetCliE2eeIdentity, completedCliE2eeIdentityReset } = await import("./reset-identity-7bUkXE3v.js");
|
|
91166
91406
|
const previous = await runPromise(completedCliE2eeIdentityReset(message));
|
|
91167
91407
|
if (previous)
|
|
91168
91408
|
return { ok: true, resetId: message.resetId, archive: previous.archive };
|
|
@@ -91204,7 +91444,7 @@ class LodyFleet {
|
|
|
91204
91444
|
activateCliE2eeWorkspaceLegacy,
|
|
91205
91445
|
prepareCliE2eeMachineLegacy,
|
|
91206
91446
|
validateCliE2eePairingIntentLegacy
|
|
91207
|
-
} = await import("./workspace-legacy-
|
|
91447
|
+
} = await import("./workspace-legacy-C_cxzMuh.js").then((n) => n.bO);
|
|
91208
91448
|
if (this.e2eeResets.has(message.workspaceId)) throw new Error("e2ee_identity_busy");
|
|
91209
91449
|
if (message.type === "prepare") {
|
|
91210
91450
|
const material = await prepareCliE2eeMachineLegacy({ ...message, cloud: e2eeCloud });
|
|
@@ -91706,6 +91946,7 @@ class CliRuntimeStateReporter {
|
|
|
91706
91946
|
connectedRoomCount = 0;
|
|
91707
91947
|
updatedAtMs;
|
|
91708
91948
|
issuesByCode = /* @__PURE__ */ new Map();
|
|
91949
|
+
e2eeAccessWindows = /* @__PURE__ */ new Map();
|
|
91709
91950
|
trackBackendConnectionAge;
|
|
91710
91951
|
now;
|
|
91711
91952
|
constructor(options = {}) {
|
|
@@ -91829,6 +92070,24 @@ class CliRuntimeStateReporter {
|
|
|
91829
92070
|
this.trimIssues();
|
|
91830
92071
|
this.touch();
|
|
91831
92072
|
}
|
|
92073
|
+
/** An encrypted workspace relying on the backend-outage window, or `undefined` once its
|
|
92074
|
+
* access is confirmed or refused again. Display only: the window's wall-clock ends. */
|
|
92075
|
+
setE2eeAccessWindow(workspaceId, window) {
|
|
92076
|
+
const previous = this.e2eeAccessWindows.get(workspaceId);
|
|
92077
|
+
if (!window) {
|
|
92078
|
+
if (!this.e2eeAccessWindows.delete(workspaceId)) return;
|
|
92079
|
+
this.touch();
|
|
92080
|
+
return;
|
|
92081
|
+
}
|
|
92082
|
+
const next2 = {
|
|
92083
|
+
executionUntilMs: Math.max(0, Math.trunc(window.executionUntilMs)),
|
|
92084
|
+
readUntilMs: Math.max(0, Math.trunc(window.readUntilMs))
|
|
92085
|
+
};
|
|
92086
|
+
if (previous?.executionUntilMs === next2.executionUntilMs && previous.readUntilMs === next2.readUntilMs)
|
|
92087
|
+
return;
|
|
92088
|
+
this.e2eeAccessWindows.set(workspaceId, next2);
|
|
92089
|
+
this.touch();
|
|
92090
|
+
}
|
|
91832
92091
|
/** Local-only runtime state; never include storage paths or document contents. */
|
|
91833
92092
|
reportStorageWriteFailure() {
|
|
91834
92093
|
this.upsertIssue({
|
|
@@ -91881,6 +92140,7 @@ class CliRuntimeStateReporter {
|
|
|
91881
92140
|
)
|
|
91882
92141
|
}
|
|
91883
92142
|
} : void 0,
|
|
92143
|
+
...this.e2eeAccessWindows.size === 0 ? {} : { e2eeAccessWindows: Object.fromEntries(this.e2eeAccessWindows) },
|
|
91884
92144
|
machineId: this.machineId,
|
|
91885
92145
|
pid: this.pid,
|
|
91886
92146
|
updatedAtMs: this.updatedAtMs,
|
|
@@ -92900,7 +93160,7 @@ const startCommand = new Command("start").description("Start agent service in na
|
|
|
92900
93160
|
}
|
|
92901
93161
|
const supervisorIdentity = identityResolution.status === "supervised" ? identityResolution.identity : null;
|
|
92902
93162
|
if (supervisorIdentity?.launchMode === "daemon" && getCliPlatformKind() === "cloud") {
|
|
92903
|
-
const { applyPendingMachineIdentityRestore, machineIdentityRestoreStartupExitCode } = await import("./machine-identity-restore-
|
|
93163
|
+
const { applyPendingMachineIdentityRestore, machineIdentityRestoreStartupExitCode } = await import("./machine-identity-restore-A8uLX7VW.js");
|
|
92904
93164
|
try {
|
|
92905
93165
|
await applyPendingMachineIdentityRestore();
|
|
92906
93166
|
} catch (error) {
|
|
@@ -93087,7 +93347,7 @@ const startCommand = new Command("start").description("Start agent service in na
|
|
|
93087
93347
|
process.exit(1);
|
|
93088
93348
|
}
|
|
93089
93349
|
if (options.pairedWorkspace) {
|
|
93090
|
-
const { loadCliE2eeMachineBootstrapLegacy } = await import("./workspace-legacy-
|
|
93350
|
+
const { loadCliE2eeMachineBootstrapLegacy } = await import("./workspace-legacy-C_cxzMuh.js").then((n) => n.bO);
|
|
93091
93351
|
machineId = await getOrCreateStableMachineIdAsync();
|
|
93092
93352
|
const paired = await loadCliE2eeMachineBootstrapLegacy(options.pairedWorkspace, machineId);
|
|
93093
93353
|
token = "";
|
|
@@ -93265,9 +93525,9 @@ async function startAgentService(options, token, userId, machineName, machineId,
|
|
|
93265
93525
|
if (!LODY_SERVER_URL) {
|
|
93266
93526
|
throw new Error("Cloud platform startup requires LODY_SERVER_URL");
|
|
93267
93527
|
}
|
|
93268
|
-
const { loadCliE2eeMachineBootstrapLegacy } = await import("./workspace-legacy-
|
|
93528
|
+
const { loadCliE2eeMachineBootstrapLegacy } = await import("./workspace-legacy-C_cxzMuh.js").then((n) => n.bO);
|
|
93269
93529
|
const paired = await loadCliE2eeMachineBootstrapLegacy(options.pairedWorkspace, machineId);
|
|
93270
|
-
const { createCloudE2eeMachinePort } = await import("./telemetry-
|
|
93530
|
+
const { createCloudE2eeMachinePort } = await import("./telemetry-DKZfKfJp.js").then((n) => n.md);
|
|
93271
93531
|
cloudPort = createCloudE2eeMachinePort({
|
|
93272
93532
|
accountId: userId,
|
|
93273
93533
|
workspaceId: paired.bootstrap.workspaceId,
|
|
@@ -94658,10 +94918,10 @@ function createDshCommand(run2 = runPluginCommand) {
|
|
|
94658
94918
|
);
|
|
94659
94919
|
}
|
|
94660
94920
|
async function runPluginCommand(args, configId) {
|
|
94661
|
-
const { runOneShotCommand: runOneShotCommand2 } = await import("./telemetry-
|
|
94921
|
+
const { runOneShotCommand: runOneShotCommand2 } = await import("./telemetry-DKZfKfJp.js").then((n) => n.mf);
|
|
94662
94922
|
await runOneShotCommand2("dsh", {}, async () => {
|
|
94663
|
-
const { Effect: Effect2 } = await import("./chunks/vendor-effect-
|
|
94664
|
-
const { makeLocalControlClientAuto: makeLocalControlClientAuto2, makeLocalProbeClientAuto: makeLocalProbeClientAuto2 } = await import("./telemetry-
|
|
94923
|
+
const { Effect: Effect2 } = await import("./chunks/vendor-effect-Bggm7QMO.js").then((n) => n.er);
|
|
94924
|
+
const { makeLocalControlClientAuto: makeLocalControlClientAuto2, makeLocalProbeClientAuto: makeLocalProbeClientAuto2 } = await import("./telemetry-DKZfKfJp.js").then((n) => n.me);
|
|
94665
94925
|
const health = await Effect2.runPromise(makeLocalProbeClientAuto2().health());
|
|
94666
94926
|
const responses = await Effect2.runPromise(
|
|
94667
94927
|
makeLocalControlClientAuto2().sessionControl({
|
|
@@ -94694,9 +94954,9 @@ async function runPluginCommand(args, configId) {
|
|
|
94694
94954
|
);
|
|
94695
94955
|
const { resolveCliAdapterEntry: resolveCliAdapterEntry2 } = await Promise.resolve().then(() => setting);
|
|
94696
94956
|
const { resolveDeepSeekHarnessProcessLaunch: resolveDeepSeekHarnessProcessLaunch2 } = await Promise.resolve().then(() => deepseekHarnessRuntime);
|
|
94697
|
-
const { runDshPlugin } = await import("./dsh-plugins-
|
|
94698
|
-
const { fileLocksLegacy: fileLocksLegacy2 } = await import("./file-lock-
|
|
94699
|
-
const { platformLayer: platformLayer2 } = await import("./process-options-
|
|
94957
|
+
const { runDshPlugin } = await import("./dsh-plugins-DON2RlNE.js");
|
|
94958
|
+
const { fileLocksLegacy: fileLocksLegacy2 } = await import("./file-lock-CnN7gNjb.js");
|
|
94959
|
+
const { platformLayer: platformLayer2 } = await import("./process-options-D8DB-_Kg.js").then((n) => n.y);
|
|
94700
94960
|
const [adapterPath] = resolveCliAdapterEntry2("deepseek-acp");
|
|
94701
94961
|
const launch = await resolveDeepSeekHarnessProcessLaunch2({
|
|
94702
94962
|
adapterPath,
|
|
@@ -94730,9 +94990,9 @@ const machinePairCommand = new Command("pair").description("Pair this machine wi
|
|
|
94730
94990
|
const abort = () => controller.abort();
|
|
94731
94991
|
process.once("SIGINT", abort);
|
|
94732
94992
|
try {
|
|
94733
|
-
const { pairRemoteMachineLegacy, decodeRemoteMachineOffer } = await import("./remote-pairing-
|
|
94993
|
+
const { pairRemoteMachineLegacy, decodeRemoteMachineOffer } = await import("./remote-pairing-BT-Kw_k3.js");
|
|
94734
94994
|
const offer2 = decodeRemoteMachineOffer(args.offer);
|
|
94735
|
-
const { createCloudE2eePort, createCloudRemoteMachinePairingClaim } = await import("./telemetry-
|
|
94995
|
+
const { createCloudE2eePort, createCloudRemoteMachinePairingClaim } = await import("./telemetry-DKZfKfJp.js").then((n) => n.md);
|
|
94736
94996
|
const logger = getLogger("e2ee-machine-pairing");
|
|
94737
94997
|
let displayed = "";
|
|
94738
94998
|
const result2 = await pairRemoteMachineLegacy({
|
|
@@ -96898,7 +97158,7 @@ async function runRender(file, options) {
|
|
|
96898
97158
|
}
|
|
96899
97159
|
data = parsed;
|
|
96900
97160
|
} else {
|
|
96901
|
-
const { resolveReviewBundle } = await import("./index-
|
|
97161
|
+
const { resolveReviewBundle } = await import("./index-9-5T7zY8.js");
|
|
96902
97162
|
const { collectBundleDiagnostics, hasErrorDiagnostics, createReviewBundleSnapshot } = await import("./index-DG2Ikd5A.js");
|
|
96903
97163
|
const bundle = await resolveReviewBundle({
|
|
96904
97164
|
reviewFilePath: inputPath,
|
|
@@ -96917,7 +97177,7 @@ async function runRender(file, options) {
|
|
|
96917
97177
|
data = createReviewBundleSnapshot(bundle);
|
|
96918
97178
|
}
|
|
96919
97179
|
const { injectReviewSnapshot } = await import("./index-BeRTvYK1.js");
|
|
96920
|
-
const { resolveReviewViewerTemplate } = await import("./review-viewer-
|
|
97180
|
+
const { resolveReviewViewerTemplate } = await import("./review-viewer-COX5NAkB.js");
|
|
96921
97181
|
const template = await resolveReviewViewerTemplate();
|
|
96922
97182
|
const html = injectReviewSnapshot(template, data);
|
|
96923
97183
|
const outputPath = options.output ? path__default$1.resolve(options.output) : defaultHtmlOutputPath(inputPath);
|
|
@@ -99267,7 +99527,7 @@ const e2eeCommand = new Command("e2ee").description("Local encrypted-workspace m
|
|
|
99267
99527
|
"--file <path>",
|
|
99268
99528
|
"Exact execution journal path for this account and machine"
|
|
99269
99529
|
).option("--json", "Print JSON output").action(async (options) => {
|
|
99270
|
-
const { runOneShotCommand: runOneShotCommand2, printJson: printJson2 } = await import("./telemetry-
|
|
99530
|
+
const { runOneShotCommand: runOneShotCommand2, printJson: printJson2 } = await import("./telemetry-DKZfKfJp.js").then((n) => n.mf);
|
|
99271
99531
|
await runOneShotCommand2(
|
|
99272
99532
|
"e2ee-journal",
|
|
99273
99533
|
options,
|
|
@@ -99661,4 +99921,4 @@ export {
|
|
|
99661
99921
|
prepareDeepSeekNodeEnvironment as p,
|
|
99662
99922
|
resolveDeepSeekHarnessSpawn as r
|
|
99663
99923
|
};
|
|
99664
|
-
//# sourceMappingURL=register-
|
|
99924
|
+
//# sourceMappingURL=register-BNMQne-3.js.map
|