openmeld 0.3.247 → 0.3.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/{add-me-membership-DUeJA9q4.js → add-me-membership-zSJAa2ET.js} +2 -2
  2. package/dist/{add-me-membership-DUeJA9q4.js.map → add-me-membership-zSJAa2ET.js.map} +1 -1
  3. package/dist/{agents-woAcH0O6.js → agents-DLjDbkLV.js} +10 -10
  4. package/dist/{agents-woAcH0O6.js.map → agents-DLjDbkLV.js.map} +1 -1
  5. package/dist/{api-client-foundation-DMEfIARh.js → api-client-foundation-BZvzqIeX.js} +3 -3
  6. package/dist/{api-client-foundation-DMEfIARh.js.map → api-client-foundation-BZvzqIeX.js.map} +1 -1
  7. package/dist/{api-client-foundation-mqLjUunz.js → api-client-foundation-DE_UqE2s.js} +1 -1
  8. package/dist/auth-session-BOi-tZ2y.js +4 -0
  9. package/dist/{auth-session-D7hlE-47.js → auth-session-DywRZLBr.js} +4 -4
  10. package/dist/{auth-session-D7hlE-47.js.map → auth-session-DywRZLBr.js.map} +1 -1
  11. package/dist/{channel-BeUv2bLR.js → channel-40SR2b5S.js} +3 -3
  12. package/dist/{channel-BeUv2bLR.js.map → channel-40SR2b5S.js.map} +1 -1
  13. package/dist/{cloud-computer-C81_vVOV.js → cloud-computer-BqFhsHhC.js} +4 -4
  14. package/dist/{cloud-computer-C81_vVOV.js.map → cloud-computer-BqFhsHhC.js.map} +1 -1
  15. package/dist/{command-qNknO9gl.js → command-DBfu-GeG.js} +15 -15
  16. package/dist/{command-qNknO9gl.js.map → command-DBfu-GeG.js.map} +1 -1
  17. package/dist/{computer-connection-WpsIQfkh.js → computer-connection-CVyM42a0.js} +2 -2
  18. package/dist/{computer-connection-WpsIQfkh.js.map → computer-connection-CVyM42a0.js.map} +1 -1
  19. package/dist/{computer-connection-review-Df2G8VWY.js → computer-connection-review-B5qKu2C9.js} +5 -5
  20. package/dist/{computer-connection-review-Df2G8VWY.js.map → computer-connection-review-B5qKu2C9.js.map} +1 -1
  21. package/dist/{computer-disconnect-ttAH9WgN.js → computer-disconnect-BxhAjQQx.js} +7 -7
  22. package/dist/{computer-disconnect-ttAH9WgN.js.map → computer-disconnect-BxhAjQQx.js.map} +1 -1
  23. package/dist/{computer-setup-continuation-tbuUZSe5.js → computer-setup-continuation-V40ov5FS.js} +3 -3
  24. package/dist/{computer-setup-continuation-tbuUZSe5.js.map → computer-setup-continuation-V40ov5FS.js.map} +1 -1
  25. package/dist/{context-x0T_qTHp.js → context-BEgBhfbb.js} +4 -4
  26. package/dist/{context-x0T_qTHp.js.map → context-BEgBhfbb.js.map} +1 -1
  27. package/dist/{daemon-device-id-DgwvQllt.js → daemon-device-id-CmykIapy.js} +3 -3
  28. package/dist/{daemon-device-id-DgwvQllt.js.map → daemon-device-id-CmykIapy.js.map} +1 -1
  29. package/dist/{daemon-lifecycle-journal-C32I8p4n.js → daemon-lifecycle-journal-2dzGUSWU.js} +2 -2
  30. package/dist/{daemon-lifecycle-journal-C32I8p4n.js.map → daemon-lifecycle-journal-2dzGUSWU.js.map} +1 -1
  31. package/dist/{daemon-service-runtime-DVqzJKke.js → daemon-service-runtime-pECs8jVc.js} +2 -2
  32. package/dist/{daemon-service-runtime-DVqzJKke.js.map → daemon-service-runtime-pECs8jVc.js.map} +1 -1
  33. package/dist/{daemon-service-update-coordinator-BTlVzU-7.js → daemon-service-update-coordinator-DJKBTEjx.js} +10 -10
  34. package/dist/{daemon-service-update-coordinator-BTlVzU-7.js.map → daemon-service-update-coordinator-DJKBTEjx.js.map} +1 -1
  35. package/dist/{dispatch-owned-runtime-g2lLeYtx.js → dispatch-owned-runtime-QhxDRdNr.js} +12 -10
  36. package/dist/dispatch-owned-runtime-QhxDRdNr.js.map +1 -0
  37. package/dist/{dist-DGeoVaIx.js → dist-BQcUIyf6.js} +319 -226
  38. package/dist/dist-BQcUIyf6.js.map +1 -0
  39. package/dist/dist-C8M8nzJ2.js +4 -0
  40. package/dist/{dual-view-guide-catalog-CkcY09Kh.js → dual-view-guide-catalog-DDsnLpIT.js} +3 -3
  41. package/dist/{dual-view-guide-catalog-CkcY09Kh.js.map → dual-view-guide-catalog-DDsnLpIT.js.map} +1 -1
  42. package/dist/{elapsed-time-BMG1CU23.js → elapsed-time-DTb6L36x.js} +3 -3
  43. package/dist/{elapsed-time-BMG1CU23.js.map → elapsed-time-DTb6L36x.js.map} +1 -1
  44. package/dist/{entry-CP7_Vgs4.js → entry-B3w4ZTC5.js} +7 -7
  45. package/dist/{entry-CP7_Vgs4.js.map → entry-B3w4ZTC5.js.map} +1 -1
  46. package/dist/{installation-inventory-7JOtUjyG.js → installation-inventory-CCkKix8R.js} +3 -3
  47. package/dist/{installation-inventory-7JOtUjyG.js.map → installation-inventory-CCkKix8R.js.map} +1 -1
  48. package/dist/{installer-BRpAz1X_.js → installer-BiZM-o_y.js} +2 -2
  49. package/dist/{installer-BRpAz1X_.js.map → installer-BiZM-o_y.js.map} +1 -1
  50. package/dist/{meta-api-QskBmfuf.js → meta-api-9iqkG_MP.js} +5 -5
  51. package/dist/{meta-api-QskBmfuf.js.map → meta-api-9iqkG_MP.js.map} +1 -1
  52. package/dist/{openmeld-BxTCCHMn.js → openmeld-C70uo4ON.js} +53 -43
  53. package/dist/openmeld-C70uo4ON.js.map +1 -0
  54. package/dist/{openmeld-maintenance-worker-BQ2YbwA9.js → openmeld-maintenance-worker-BFPEm1rE.js} +9 -9
  55. package/dist/{openmeld-maintenance-worker-BQ2YbwA9.js.map → openmeld-maintenance-worker-BFPEm1rE.js.map} +1 -1
  56. package/dist/{openmeld-tools-update-join-Dj-MEQW_.js → openmeld-tools-update-join-Bki3ugUW.js} +4 -4
  57. package/dist/{openmeld-tools-update-join-Dj-MEQW_.js.map → openmeld-tools-update-join-Bki3ugUW.js.map} +1 -1
  58. package/dist/openmeld.js +4 -4
  59. package/dist/{prepare-provider-runtime-B6_dfpiZ.js → prepare-provider-runtime-CWZOcEF7.js} +21 -11
  60. package/dist/{prepare-provider-runtime-B6_dfpiZ.js.map → prepare-provider-runtime-CWZOcEF7.js.map} +1 -1
  61. package/dist/{prepare-session-executor-DA9saGAk.js → prepare-session-executor-B8XSTQdx.js} +18 -18
  62. package/dist/{prepare-session-executor-DA9saGAk.js.map → prepare-session-executor-B8XSTQdx.js.map} +1 -1
  63. package/dist/{process-channel-HthE5ehS.js → process-channel-DLXPiGRF.js} +2 -2
  64. package/dist/{process-channel-HthE5ehS.js.map → process-channel-DLXPiGRF.js.map} +1 -1
  65. package/dist/{runtime-C7lY_Z2r.js → runtime-DzToUfqW.js} +28 -28
  66. package/dist/{runtime-C7lY_Z2r.js.map → runtime-DzToUfqW.js.map} +1 -1
  67. package/dist/{runtime-agent-controller-reporting-submission-IhxMO4UA.js → runtime-agent-controller-reporting-submission-BszHi0S1.js} +8 -8
  68. package/dist/{runtime-agent-controller-reporting-submission-IhxMO4UA.js.map → runtime-agent-controller-reporting-submission-BszHi0S1.js.map} +1 -1
  69. package/dist/{runtime-transport-DRb5__yP.js → runtime-transport-DFBYm5Re.js} +28 -5
  70. package/dist/runtime-transport-DFBYm5Re.js.map +1 -0
  71. package/dist/{service-DveGEdh3.js → service-8EozP77B.js} +262 -28
  72. package/dist/service-8EozP77B.js.map +1 -0
  73. package/dist/{service-account-authorization-CAVkiKSF.js → service-account-authorization-CqUcNoD1.js} +2 -2
  74. package/dist/{service-account-authorization-CAVkiKSF.js.map → service-account-authorization-CqUcNoD1.js.map} +1 -1
  75. package/dist/{service-account-control-BtE73wcO.js → service-account-control-CzPgo-Iy.js} +9 -9
  76. package/dist/{service-account-control-BtE73wcO.js.map → service-account-control-CzPgo-Iy.js.map} +1 -1
  77. package/dist/{service-control-capabilities-BQrqIGBP.js → service-control-capabilities-C5hd37o9.js} +3 -3
  78. package/dist/{service-control-capabilities-BQrqIGBP.js.map → service-control-capabilities-C5hd37o9.js.map} +1 -1
  79. package/dist/{service-control-capabilities-adDptMIH.js → service-control-capabilities-CcwdbQf3.js} +1 -1
  80. package/dist/{state-DWwNdCy5.js → state-Fskb-utn.js} +2 -2
  81. package/dist/{state-DWwNdCy5.js.map → state-Fskb-utn.js.map} +1 -1
  82. package/dist/{updates-api-9midbUU1.js → updates-api-JM7f1ZDQ.js} +41 -20
  83. package/dist/updates-api-JM7f1ZDQ.js.map +1 -0
  84. package/dist/{upgrade-H-_QW75e.js → upgrade-CDW-7zvb.js} +8 -8
  85. package/dist/{upgrade-H-_QW75e.js.map → upgrade-CDW-7zvb.js.map} +1 -1
  86. package/dist/upgrade-r6W5TzOo.js +4 -0
  87. package/package.json +11 -11
  88. package/dist/auth-session-DXxmGll1.js +0 -4
  89. package/dist/dispatch-owned-runtime-g2lLeYtx.js.map +0 -1
  90. package/dist/dist-CXB_bdSS.js +0 -4
  91. package/dist/dist-DGeoVaIx.js.map +0 -1
  92. package/dist/openmeld-BxTCCHMn.js.map +0 -1
  93. package/dist/runtime-transport-DRb5__yP.js.map +0 -1
  94. package/dist/service-DveGEdh3.js.map +0 -1
  95. package/dist/updates-api-9midbUU1.js.map +0 -1
  96. package/dist/upgrade-BvpBhL0U.js +0 -4
@@ -1,45 +1,46 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { At as ensureOpenMeldManagedProfileWorkspace, Br as applyIntervalJitterMs$1, Bt as createMutableRouteCatalogState, Ct as resolveLocalProjectConnectionForPath, Fn as DaemonServiceRunError, Fr as resolveRouteRegistrationReconcileDecision, Ft as resolveConfiguredProfileWorkspacePathForAccount, Hr as resolveAdaptiveHeartbeatIntervalMs, Ht as summarizeSkippedDaemonProfiles, I as listAgentTargetStates, Ir as ADAPTIVE_HEARTBEAT_JITTER_RATIO, It as setCustomProfileWorkspace, Jn as buildAuthenticatedControlPlaneResponse, Jt as isDaemonReconcileInProgressError, Lr as MAX_HEARTBEAT_INTERVAL_MS, Mn as emitDriftDetectedEvidence, Nn as emitReconcileCompletedEvidence, Nt as readProfileWorkspaceConfigForAccount, O as syncDeviceRuntimeStateProjection, Ot as resolveRegistryRuntimeAdapterCapabilitySnapshot, Pn as emitReconcileStartedEvidence, Rr as MIN_HEARTBEAT_INTERVAL_MS, Sn as resolveInstalledCodexLaunchCandidates, Ur as resolveCatalogSyncIntervalMs, Ut as syncDaemonRouteCatalogState, Vr as pruneStaleLeases, Vt as createRouteCatalogFromMutableState, _t as removeProjectConnection, bt as setDefaultProjectConnection, ct as ProjectBindingOperationError, ft as listProjectBindings, gt as removeMissingProjectConnections, ln as resolveCatalogSyncSkippedProfilesLogState, lt as ProjectBindingStoreUpdateRequiredError, pt as listProjectConnectionsWithStatus, tn as buildLocalServiceDiagnosticsPayload, ut as bindProject, zr as applyAcceptedLeases } from "./prepare-provider-runtime-B6_dfpiZ.js";
3
+ import { At as ensureOpenMeldManagedProfileWorkspace, Br as applyAcceptedLeases, Bt as createMutableRouteCatalogState, Cn as resolveInstalledCodexLaunchCandidates, Ct as resolveLocalProjectConnectionForPath, Fn as emitReconcileStartedEvidence, Ft as resolveConfiguredProfileWorkspacePathForAccount, Hr as pruneStaleLeases, I as listAgentTargetStates, In as DaemonServiceRunError, Ir as resolveRouteRegistrationReconcileDecision, It as setCustomProfileWorkspace, Lr as ADAPTIVE_HEARTBEAT_JITTER_RATIO, Nn as emitDriftDetectedEvidence, Nt as readProfileWorkspaceConfigForAccount, O as syncDeviceRuntimeStateProjection, Ot as resolveRegistryRuntimeAdapterCapabilitySnapshot, Pn as emitReconcileCompletedEvidence, Rr as MAX_HEARTBEAT_INTERVAL_MS, Ur as resolveAdaptiveHeartbeatIntervalMs, Ut as summarizeSkippedDaemonProfiles, Vr as applyIntervalJitterMs$1, Vt as createRouteCatalogFromMutableState, Wr as resolveCatalogSyncIntervalMs, Wt as syncDaemonRouteCatalogState, Yn as buildAuthenticatedControlPlaneResponse, Yt as isDaemonReconcileInProgressError, _t as removeProjectConnection, bt as setDefaultProjectConnection, ct as ProjectBindingOperationError, ft as listProjectBindings, gt as removeMissingProjectConnections, lt as ProjectBindingStoreUpdateRequiredError, nn as buildLocalServiceDiagnosticsPayload, pt as listProjectConnectionsWithStatus, un as resolveCatalogSyncSkippedProfilesLogState, ut as bindProject, zr as MIN_HEARTBEAT_INTERVAL_MS } from "./prepare-provider-runtime-CWZOcEF7.js";
4
4
  import { D as openMeldRootDir, F as resolveOpenMeldRootDir, I as resolveOpenMeldServiceOwnedPathInput, P as resolveOpenMeldEnvPreset, h as isPublishedOpenMeldHome, o as accountsDir, y as normalizeAccountKey } from "./paths-De9xdA2h.js";
5
5
  import { r as resolveAuthBaseUrl } from "./auth-url-6Bb6YdNm.js";
6
- import { A as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Ar as localFolderPickerHelperResultSchema, C as runtimeTransportHeartbeatRequestSchema, Dr as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, Er as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, F as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, I as runtimeTransportRegisterSessionRequestSchema, M as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Or as localFolderPickerDaemonFrameSchema, P as runtimeTransportOpenMeldToolsControlFramePayloadSchema, V as runtimeTransportRouteCatalogChangedFramePayloadSchema, br as OPENMELD_REASONING_STREAM_HEADER, kr as localFolderPickerHelperProtocolResultSchema, n as OPENMELD_ADMISSION_EVIDENCE_HEADER, nn as OPENMELD_COMPUTER_CARE_HEADER, ot as sanitizeDispatchErrorSummary, qt as SPACE_WORK_HANDOFF_CAPABILITY_HEADER, r as OPENMELD_EXECUTION_ADMISSION_HEADER, s as localWakeRouteWorkingFolderObservationSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH } from "./runtime-transport-DRb5__yP.js";
6
+ import { A as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Ar as localFolderPickerHelperProtocolResultSchema, C as runtimeTransportHeartbeatRequestSchema, Dr as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, F as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, I as runtimeTransportRegisterSessionRequestSchema, M as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Or as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, P as runtimeTransportOpenMeldToolsControlFramePayloadSchema, V as runtimeTransportRouteCatalogChangedFramePayloadSchema, jr as localFolderPickerHelperResultSchema, kr as localFolderPickerDaemonFrameSchema, n as OPENMELD_ADMISSION_EVIDENCE_HEADER, nn as OPENMELD_COMPUTER_CARE_HEADER, ot as sanitizeDispatchErrorSummary, qt as SPACE_WORK_HANDOFF_CAPABILITY_HEADER, r as OPENMELD_EXECUTION_ADMISSION_HEADER, s as localWakeRouteWorkingFolderObservationSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, xr as OPENMELD_REASONING_STREAM_HEADER } from "./runtime-transport-DFBYm5Re.js";
7
7
  import { s as openMeldDaemonControlPlaneResponseSchema } from "./control-plane-B93wmVS6.js";
8
8
  import { a as formatLocalSetupActionLabel, i as formatLocalSetupActionDescription, n as formatLocalComponentsSummaryDescription, o as installedLocalComponentsSnapshotSchema, r as formatLocalComponentsSummaryLabel } from "./local-components-jXECvlEY.js";
9
- import { Fr as SESSION_HISTORY_CAPABILITY_HEADER, Hr as sessionHistoryResultFrameSchema, Ir as SESSION_HISTORY_RUNTIME_CAPABILITY, Lr as sessionHistoryAuditSchema, Sr as betterAuthSessionSnapshotResponseSchema, Vr as sessionHistoryRequestFrameSchema, Xn as DAEMON_STREAM_KEEPALIVE_PING, _r as betterAuthDeviceAuthorizationCodeRequestSchema, aa as localProjectControlDiscoverProjectsResponseSchema, br as betterAuthDeviceAuthorizationTokenRequestSchema, ea as serviceConnectionEvidenceEventSchema, fa as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, gr as BETTER_AUTH_DEVICE_AUTHORIZATION_GRANT_TYPE, ia as localProjectControlDaemonFrameSchema, ma as computerFileAccessDaemonFrameSchema, mn as createServiceConnectionEvidenceApi, pa as OPENMELD_RUNTIME_CAPABILITIES_HEADER, ta as serviceConnectionEvidenceJournalSchema, vr as betterAuthDeviceAuthorizationCodeResponseSchema, xr as betterAuthDeviceAuthorizationTokenResponseSchema, yr as betterAuthDeviceAuthorizationErrorResponseSchema, zr as sessionHistoryPolicySchema } from "./dist-DGeoVaIx.js";
9
+ import { Br as sessionHistoryPolicySchema, Cr as betterAuthSessionSnapshotResponseSchema, Hr as sessionHistoryRequestFrameSchema, Ir as SESSION_HISTORY_CAPABILITY_HEADER, Lr as SESSION_HISTORY_RUNTIME_CAPABILITY, Rr as sessionHistoryAuditSchema, Sr as betterAuthDeviceAuthorizationTokenResponseSchema, Ur as sessionHistoryResultFrameSchema, Xi as serviceConnectionEvidenceJournalSchema, Yi as serviceConnectionEvidenceEventSchema, Zn as DAEMON_STREAM_KEEPALIVE_PING, _r as BETTER_AUTH_DEVICE_AUTHORIZATION_GRANT_TYPE, br as betterAuthDeviceAuthorizationErrorResponseSchema, da as OPENMELD_RUNTIME_CAPABILITIES_HEADER, fa as computerFileAccessDaemonFrameSchema, hn as createServiceConnectionEvidenceApi, na as localProjectControlDaemonFrameSchema, ra as localProjectControlDiscoverProjectsResponseSchema, ua as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, vr as betterAuthDeviceAuthorizationCodeRequestSchema, xr as betterAuthDeviceAuthorizationTokenRequestSchema, yr as betterAuthDeviceAuthorizationCodeResponseSchema } from "./dist-BQcUIyf6.js";
10
10
  import { o as resolveCliBinaryPlatform } from "./cli-binary-manifest-ChuzORh3.js";
11
- import { D as ServiceAccountAdmissionError, S as setAuthSession, _ as onAuthSessionCredentialAvailable, a as beginAuthSessionTransition, d as getAuthSessionState, i as assertAuthSessionMutationAvailable, o as buildStoredAuthSessionIdentity, s as clearAuthSession, v as onAuthSessionCredentialObservation, w as withAdmittedServiceSession } from "./auth-session-D7hlE-47.js";
11
+ import { D as ServiceAccountAdmissionError, S as setAuthSession, _ as onAuthSessionCredentialAvailable, a as beginAuthSessionTransition, d as getAuthSessionState, i as assertAuthSessionMutationAvailable, o as buildStoredAuthSessionIdentity, s as clearAuthSession, v as onAuthSessionCredentialObservation, w as withAdmittedServiceSession } from "./auth-session-DywRZLBr.js";
12
12
  import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
13
- import { A as DEFAULT_RECONNECT_DELAY_MS, C as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, D as DAEMON_STREAM_CONNECT_TIMEOUT_MS, F as REGISTER_RESPONSE_TIMEOUT_MS, I as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, L as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, M as MAX_RECONNECT_DELAY_MS, N as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, O as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, P as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, R as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, _ as toErrorMessage$5, b as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, c as normalizeHeartbeatIntervalMs, d as normalizeText$1, f as nowIsoString, i as resolvePreferredDaemonDeviceId, j as HEARTBEAT_RESPONSE_TIMEOUT_MS, k as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, n as ensureDaemonRuntimePaths, r as resolveDaemonDeviceId, s as emitRunLine, u as normalizeOptionalText$1, v as warnDaemonEvent, w as DAEMON_RUNTIME_CONTRACT_EPOCH, x as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, y as CATALOG_SYNC_RETRY_INTERVAL_MS } from "./daemon-device-id-DgwvQllt.js";
14
- import { c as serviceExecutionHostSnapshotSchema, d as localExecutionInputResponseSchema, l as LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER, n as createExecutionHostClient, o as serviceExecutionHostMethods, t as ExecutionHostError, u as localExecutionInputFrameSchema } from "./channel-BeUv2bLR.js";
15
- import { m as hashBundledSkillAssets, p as computeDirectoryContentHash, u as loadSelectedSkillAssets } from "./state-DWwNdCy5.js";
16
- import { $ as ComputerFileAccessStoreError, R as createServiceGitEnvironment, X as resolveNextRuntimeAgentControllerReportSyncAtMs, Z as emitDaemonDispatchJournalEvent, _ as sendDaemonFrame, et as readComputerFileAccessPolicy, g as parseDaemonFrame, gn as cliJsonOutputEnvelopeSchema, h as handleDaemonTransportFrame, m as createCodexJsonRpcClient, n as assertDispatchOwnedRuntimeServiceMutationAllowed, nt as updateComputerFileAccessPolicy, rt as isSameOrDescendantPath, tt as resolveComputerFileAccessStorePath, v as collectObservedSessionWorkingDirectories } from "./dispatch-owned-runtime-g2lLeYtx.js";
17
- import { A as prepareDaemonServiceBundle, G as readManagedCliInstallation, M as resolveAlignedDaemonActiveBundleEntryPath, N as resolveDaemonBundleEntryPathFromState, a as resolveDaemonRuntimeState, b as cleanupInactiveDaemonServiceBundles, f as listDaemonOwnedProcesses, h as resolveDaemonBundleIdFromEntryPath, i as readCurrentObservedDaemonRuntimeStatus, j as readDaemonActiveBundleState, n as getEffectiveDaemonRuntimeStatus, o as resolveDaemonServiceManagerForRuntimeState, p as extractDaemonCommandEntryPath, r as readCurrentDaemonRuntimeContext, s as waitForDaemonSystemServiceToStop, t as clearDaemonRuntimeStateIfDefinitelyStopped, u as cleanupLegacySharedDaemonServiceState, v as isOpenMeldManagedBinaryPath } from "./daemon-service-runtime-DVqzJKke.js";
13
+ import { A as DEFAULT_RECONNECT_DELAY_MS, C as CONTROLLED_SHUTDOWN_SOCKET_CLOSE_TIMEOUT_MS, D as DAEMON_STREAM_CONNECT_TIMEOUT_MS, F as REGISTER_RESPONSE_TIMEOUT_MS, I as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS, L as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS, M as MAX_RECONNECT_DELAY_MS, N as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS, O as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS, P as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS, R as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS, _ as toErrorMessage$5, b as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS, c as normalizeHeartbeatIntervalMs, d as normalizeText$1, f as nowIsoString, i as resolvePreferredDaemonDeviceId, j as HEARTBEAT_RESPONSE_TIMEOUT_MS, k as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS, n as ensureDaemonRuntimePaths, r as resolveDaemonDeviceId, s as emitRunLine, u as normalizeOptionalText$1, v as warnDaemonEvent, w as DAEMON_RUNTIME_CONTRACT_EPOCH, x as CONTROLLED_SHUTDOWN_REQUEST_TIMEOUT_MS, y as CATALOG_SYNC_RETRY_INTERVAL_MS } from "./daemon-device-id-CmykIapy.js";
14
+ import { c as serviceExecutionHostSnapshotSchema, d as localExecutionInputResponseSchema, l as LOCAL_EXECUTION_INPUT_CAPABILITY_HEADER, n as createExecutionHostClient, o as serviceExecutionHostMethods, t as ExecutionHostError, u as localExecutionInputFrameSchema } from "./channel-40SR2b5S.js";
15
+ import { m as hashBundledSkillAssets, p as computeDirectoryContentHash, u as loadSelectedSkillAssets } from "./state-Fskb-utn.js";
16
+ import { Q as emitDaemonDispatchJournalEvent, Z as resolveNextRuntimeAgentControllerReportSyncAtMs, _ as sendDaemonFrame, _n as cliJsonOutputEnvelopeSchema, et as ComputerFileAccessStoreError, g as parseDaemonFrame, h as handleDaemonTransportFrame, it as isSameOrDescendantPath, m as createCodexJsonRpcClient, n as assertDispatchOwnedRuntimeServiceMutationAllowed, nt as resolveComputerFileAccessStorePath, rt as updateComputerFileAccessPolicy, tt as readComputerFileAccessPolicy, v as collectObservedSessionWorkingDirectories, w as resolveOpenCodeDatabasePath, x as queryOpenCodeReadOnly, z as createServiceGitEnvironment } from "./dispatch-owned-runtime-QhxDRdNr.js";
17
+ import { A as prepareDaemonServiceBundle, G as readManagedCliInstallation, M as resolveAlignedDaemonActiveBundleEntryPath, N as resolveDaemonBundleEntryPathFromState, a as resolveDaemonRuntimeState, b as cleanupInactiveDaemonServiceBundles, f as listDaemonOwnedProcesses, h as resolveDaemonBundleIdFromEntryPath, i as readCurrentObservedDaemonRuntimeStatus, j as readDaemonActiveBundleState, n as getEffectiveDaemonRuntimeStatus, o as resolveDaemonServiceManagerForRuntimeState, p as extractDaemonCommandEntryPath, r as readCurrentDaemonRuntimeContext, s as waitForDaemonSystemServiceToStop, t as clearDaemonRuntimeStateIfDefinitelyStopped, u as cleanupLegacySharedDaemonServiceState, v as isOpenMeldManagedBinaryPath } from "./daemon-service-runtime-pECs8jVc.js";
18
18
  import { i as writeDaemonRuntimeLease } from "./daemon-runtime-lease-Bv6vhqOe.js";
19
19
  import { i as readProcessStartIdentity, n as isPreciseProcessStartIdentity, t as CURRENT_PROCESS_START_IDENTITY } from "./process-identity-BRbhGGTM.js";
20
- import { $ as buildDaemonServiceDependencyTitle, At as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, C as formatDaemonServiceRefreshReliabilityMessage, Ct as ensureDaemonRuntimeContractState, D as writeDaemonStartFailureState, Dt as isVersionDowngrade, E as clearDaemonStartFailureState, Et as resolveDaemonServiceAlignmentDecision, Ft as resolveCurrentDaemonExpectedVersion, It as resolveServiceUpdateUrgency, Lt as assessServerRequiredVersion, Nt as classifyDaemonServiceRunStartability, Pt as classifyDaemonServiceWakeability, Q as buildDaemonServiceDependencySummary, Rt as describeServerRequiredVersionUnavailableReason, S as buildDaemonServiceUpdateRequiredNextStep, Tt as buildDaemonServiceTargetSpec, Ut as ensureDaemonSystemServiceCommandFiles, Vt as assessCliUpdate, W as resolveLocalServiceDemand, Wt as resolveInstalledDaemonSystemServiceCommandSpec, X as buildDaemonServiceDependencyMeaning, Y as buildDaemonServiceDependencyDetails, Z as buildDaemonServiceDependencyNextStep, _t as readCurrentDaemonOwnerSnapshot, a as isDaemonInventoryRunningAndStartReady$1, bt as summarizeDaemonOwnerSnapshot, c as waitForSystemServiceStartup$1, ct as writeOpenMeldToolsMaintenancePolicy, d as captureDaemonServiceEvidenceBestEffort, et as resolveDaemonServiceDependencyDiagnostics, f as formatDaemonFailureContextText, ft as uninstallDaemonServiceUpdateWorker, g as resolveServiceReadiness, gt as hasActiveDaemonOwners, h as resolveDaemonStatusAuthenticationAttention, ht as formatDaemonOwnerSummaryLabel, i as runDaemonServiceLifecycle, jt as DAEMON_SERVICE_REPAIR_ANOMALIES, kt as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, l as startDaemonSystemServiceWithAutoRepair, lt as ensureDaemonServiceMaintenanceInstalled, m as resolveDaemonStatusAttention, mt as buildDaemonOwnerSnapshotFromObservedState, n as scheduleDaemonServiceUpdate, nt as createOpenMeldToolsUpdateCoordinator, o as isSystemServiceStartupTimeoutError, ot as readOpenMeldToolsMaintenancePolicy, p as resolveDaemonStatusSnapshot, pt as inspectDaemonServiceInventory, r as DaemonServiceLifecycleDrainTimeoutError, s as resolveSystemServiceStartupWaitMs, st as resolveOpenMeldToolsMaintenanceProjection, tt as writeDaemonServiceContract, u as captureDaemonServiceEvidence, v as buildDaemonServiceRefreshNextStep, vt as resolveDaemonStopStrategy, w as formatDaemonServiceUpdateRequiredMessage, wt as readDaemonRuntimeContractRepairReport, x as buildDaemonServiceStatusReadOnlyDetail, y as buildDaemonServiceRefreshPromptMessage, yt as resolveStoppedContractWriteBlockedReason } from "./daemon-service-update-coordinator-BTlVzU-7.js";
20
+ import { $ as buildDaemonServiceDependencyTitle, At as DAEMON_SERVICE_FULL_ALIGNMENT_ANOMALIES, C as formatDaemonServiceRefreshReliabilityMessage, Ct as ensureDaemonRuntimeContractState, D as writeDaemonStartFailureState, Dt as isVersionDowngrade, E as clearDaemonStartFailureState, Et as resolveDaemonServiceAlignmentDecision, Ft as resolveCurrentDaemonExpectedVersion, It as resolveServiceUpdateUrgency, Lt as assessServerRequiredVersion, Nt as classifyDaemonServiceRunStartability, Pt as classifyDaemonServiceWakeability, Q as buildDaemonServiceDependencySummary, Rt as describeServerRequiredVersionUnavailableReason, S as buildDaemonServiceUpdateRequiredNextStep, Tt as buildDaemonServiceTargetSpec, Ut as ensureDaemonSystemServiceCommandFiles, Vt as assessCliUpdate, W as resolveLocalServiceDemand, Wt as resolveInstalledDaemonSystemServiceCommandSpec, X as buildDaemonServiceDependencyMeaning, Y as buildDaemonServiceDependencyDetails, Z as buildDaemonServiceDependencyNextStep, _t as readCurrentDaemonOwnerSnapshot, a as isDaemonInventoryRunningAndStartReady$1, bt as summarizeDaemonOwnerSnapshot, c as waitForSystemServiceStartup$1, ct as writeOpenMeldToolsMaintenancePolicy, d as captureDaemonServiceEvidenceBestEffort, et as resolveDaemonServiceDependencyDiagnostics, f as formatDaemonFailureContextText, ft as uninstallDaemonServiceUpdateWorker, g as resolveServiceReadiness, gt as hasActiveDaemonOwners, h as resolveDaemonStatusAuthenticationAttention, ht as formatDaemonOwnerSummaryLabel, i as runDaemonServiceLifecycle, jt as DAEMON_SERVICE_REPAIR_ANOMALIES, kt as DAEMON_SERVICE_AUTO_HEAL_ANOMALIES, l as startDaemonSystemServiceWithAutoRepair, lt as ensureDaemonServiceMaintenanceInstalled, m as resolveDaemonStatusAttention, mt as buildDaemonOwnerSnapshotFromObservedState, n as scheduleDaemonServiceUpdate, nt as createOpenMeldToolsUpdateCoordinator, o as isSystemServiceStartupTimeoutError, ot as readOpenMeldToolsMaintenancePolicy, p as resolveDaemonStatusSnapshot, pt as inspectDaemonServiceInventory, r as DaemonServiceLifecycleDrainTimeoutError, s as resolveSystemServiceStartupWaitMs, st as resolveOpenMeldToolsMaintenanceProjection, tt as writeDaemonServiceContract, u as captureDaemonServiceEvidence, v as buildDaemonServiceRefreshNextStep, vt as resolveDaemonStopStrategy, w as formatDaemonServiceUpdateRequiredMessage, wt as readDaemonRuntimeContractRepairReport, x as buildDaemonServiceStatusReadOnlyDetail, y as buildDaemonServiceRefreshPromptMessage, yt as resolveStoppedContractWriteBlockedReason } from "./daemon-service-update-coordinator-DJKBTEjx.js";
21
21
  import { C as assessLocalMachineFailure, E as createServiceSpawnPendingIssue, i as isOpenMeldLockError, k as formatLocalMachineIssueMessage, u as resolveOpenMeldOrphanedLockIssue, x as resolveOpenMeldLaneDescriptor } from "./lock-BMI00i2F.js";
22
- import { Ct as buildAgentOverviewFromContract, Q as getCommandEntryContract, ht as validateDaemonControlTargetInput, t as createAuthLoginGuideError } from "./dual-view-guide-catalog-CkcY09Kh.js";
22
+ import { Ct as buildAgentOverviewFromContract, Q as getCommandEntryContract, ht as validateDaemonControlTargetInput, t as createAuthLoginGuideError } from "./dual-view-guide-catalog-DDsnLpIT.js";
23
23
  import { a as resolveBaseUrl, c as resolveExplicitGatewayUrlOrThrow, f as getConfiguredDaemonDispatchLimits, i as normalizeGatewayBaseUrlOrNull, o as resolveBaseUrlOrNull, r as normalizeGatewayBaseUrl } from "./base-url-0AoeTi3w.js";
24
24
  import "./openmeld-dev-environment-DwdvL7jg.js";
25
25
  import { n as toErrorMessage$6, t as sleep } from "./dist-BLuEEVHh.js";
26
- import { D as createAuthenticationError, E as buildHumanAuthenticationCard, M as resolveAuthenticationReasonFromState, O as extractAuthenticationPromptAction, T as buildCommandAuthenticationPromptMessage$1, a as requireOpenMeldProfile, g as readDaemonCatalogSyncSignal, k as resolveAuthenticationGuidance, n as resolveRuntimeContext, o as resolveOpenMeldProfileOrNull, w as buildAuthenticationStatusLabel, y as clearAllSelectedOpenMeldProfileIds } from "./context-x0T_qTHp.js";
26
+ import { D as createAuthenticationError, E as buildHumanAuthenticationCard, M as resolveAuthenticationReasonFromState, O as extractAuthenticationPromptAction, T as buildCommandAuthenticationPromptMessage$1, a as requireOpenMeldProfile, g as readDaemonCatalogSyncSignal, k as resolveAuthenticationGuidance, n as resolveRuntimeContext, o as resolveOpenMeldProfileOrNull, w as buildAuthenticationStatusLabel, y as clearAllSelectedOpenMeldProfileIds } from "./context-BEgBhfbb.js";
27
27
  import { a as formatOpenMeldCliTextBlock, n as formatOpenMeldCliCommand, r as formatOpenMeldCliCommands, t as formatInlineOpenMeldCliCommands } from "./cli-entry-command-CR_9QU1i.js";
28
28
  import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
29
29
  import { t as isBinaryDistribution } from "./distribution-BDQT2ilb.js";
30
30
  import { A as getDaemonStatus, G as withDaemonServiceRegistrationMutationLock, H as setDaemonServiceRuntimeState, I as readDaemonServiceRuntimeSnapshot, K as withDaemonServiceRunLock, L as releaseDaemonServiceLifecycleLock, M as isDaemonServiceRuntimeHeartbeatStale, O as ensureDaemonControlPlaneToken, R as resolveDaemonControlPlaneEndpoint, S as daemonServiceRepairJournalPath, U as uninstallDaemon, W as withDaemonServiceReconcileLock, _ as daemonRuntimeStateRootPath, a as DAEMON_SERVICE_RUNTIME_MODE_ENV, c as acquireDaemonServiceLifecycleLock, f as daemonLifecycleJournalPath, h as daemonRuntimeRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, j as installDaemon, l as clearDaemonServiceRuntimeState, o as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, q as withDaemonServiceStopLock, z as resolveDaemonServiceRuntimeMetadata } from "./daemon-state-Dte9re5V.js";
31
31
  import { a as outJsonLine, n as sanitizeTerminalDisplayText, o as outLine, t as createPresenter } from "./presenter-BcxiQyJg.js";
32
- import { c as buildRequestAuthHeaders, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, t as createCliApiClientFoundation, u as fingerprintRequestAuthorization } from "./api-client-foundation-DMEfIARh.js";
32
+ import { c as buildRequestAuthHeaders, i as AuthRequestCredentialError, l as canAttachAuthTokenToRequest, o as buildOpenMeldProfileRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, t as createCliApiClientFoundation, u as fingerprintRequestAuthorization } from "./api-client-foundation-BZvzqIeX.js";
33
33
  import { a as upsertDaemonServiceContract, i as readDaemonServiceContract, n as isDaemonServiceContractIdentityReusable, t as clearDaemonServiceContract } from "./daemon-service-contract-COPKbCy_.js";
34
34
  import { t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-BgYR6ozy.js";
35
- import { t as admitServiceAccountStop } from "./service-account-authorization-CAVkiKSF.js";
36
- import { S as requestLocalDaemonShutdown, c as runWithDaemonLifecycleCommandJournal, d as compareSemver, i as readLatestDaemonLifecycleOriginEvent, l as OPENMELD_VERSION, n as formatDaemonLifecycleOriginSummary, o as resolveRecentDaemonSignalStopCause, r as readLatestDaemonLifecycleConnectionStateEvent, s as runDaemonServiceManagerAction, t as emitDaemonLifecycleEvent, w as sendLocalDaemonControlPlaneRequest, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-C32I8p4n.js";
35
+ import { t as admitServiceAccountStop } from "./service-account-authorization-CqUcNoD1.js";
36
+ import { S as requestLocalDaemonShutdown, c as runWithDaemonLifecycleCommandJournal, d as compareSemver, i as readLatestDaemonLifecycleOriginEvent, l as OPENMELD_VERSION, n as formatDaemonLifecycleOriginSummary, o as resolveRecentDaemonSignalStopCause, r as readLatestDaemonLifecycleConnectionStateEvent, s as runDaemonServiceManagerAction, t as emitDaemonLifecycleEvent, w as sendLocalDaemonControlPlaneRequest, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-2dzGUSWU.js";
37
37
  import { r as readWindowsManagedCliInstallation } from "./windows-managed-install-BVlswqjA.js";
38
38
  import { S as resolveDaemonServiceManager, _ as readDaemonServiceJobCrashExitCode, a as disableDaemonServiceAutostartIfConfigured, c as getDaemonSystemServiceLogPath, f as isDaemonServiceJobSpawnPending, o as formatDaemonServiceJobDiagnosticsEvidence, s as getDaemonServiceLaunchdLabel } from "./daemon-service-manager-SXQcFE9c.js";
39
- import { a as formatDaemonServiceDowngradeBlockedRecommendation, d as formatDaemonServiceMissingStatus, f as getDaemonDowngradeBlockedTitle, g as canUseInteractivePrompts, h as resolveOpenMeldToolsUpdateOperationProjection, l as formatDaemonServiceMissingRunStepOne, n as resolveElapsedTimeMs, o as formatDaemonServiceMissingAction, r as formatDaemonDowngradeBlockedNextStep, s as formatDaemonServiceMissingMeaning, t as formatElapsedTime, u as formatDaemonServiceMissingRunStepTwo } from "./elapsed-time-BMG1CU23.js";
40
- import { t as childExecutionHostChannel } from "./process-channel-HthE5ehS.js";
41
- import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-7JOtUjyG.js";
39
+ import { a as formatDaemonServiceDowngradeBlockedRecommendation, d as formatDaemonServiceMissingStatus, f as getDaemonDowngradeBlockedTitle, g as canUseInteractivePrompts, h as resolveOpenMeldToolsUpdateOperationProjection, l as formatDaemonServiceMissingRunStepOne, n as resolveElapsedTimeMs, o as formatDaemonServiceMissingAction, r as formatDaemonDowngradeBlockedNextStep, s as formatDaemonServiceMissingMeaning, t as formatElapsedTime, u as formatDaemonServiceMissingRunStepTwo } from "./elapsed-time-DTb6L36x.js";
40
+ import { t as childExecutionHostChannel } from "./process-channel-DLXPiGRF.js";
41
+ import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-CCkKix8R.js";
42
42
  import { createHash, randomUUID } from "node:crypto";
43
+ import { homedir } from "node:os";
43
44
  import { delimiter, dirname, isAbsolute, join, resolve } from "node:path";
44
45
  import { access, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
45
46
  import * as z$1 from "zod/v4";
@@ -53,6 +54,7 @@ import { createServer } from "node:net";
53
54
  import { cancel, confirm, isCancel, select } from "@clack/prompts";
54
55
  import stringWidth from "string-width";
55
56
  import WebSocket from "ws";
57
+ import { getSessionInfo, getSessionMessages } from "@anthropic-ai/claude-agent-sdk";
56
58
  //#region ../../packages/schemas/dist/schemas/daemon/service-connection-correlation.js
57
59
  const SERVICE_CONNECTION_ID_QUERY_PARAMETER = "connectionId";
58
60
  z$1.uuid();
@@ -5791,6 +5793,53 @@ function waitForRegisterResponse(input) {
5791
5793
  });
5792
5794
  }
5793
5795
  //#endregion
5796
+ //#region src/local-service/session-history/claude-history-reader.ts
5797
+ function projectClaudeHistory(items, sessionId) {
5798
+ const messages = [];
5799
+ let omittedNonMessageItems = false;
5800
+ for (const item of items) {
5801
+ if (item.session_id !== sessionId) throw new Error("Session identity mismatch.");
5802
+ if (item.type === "system" || item.parent_tool_use_id || item.parent_agent_id) {
5803
+ omittedNonMessageItems = true;
5804
+ continue;
5805
+ }
5806
+ const message = z.object({ content: z.union([z.string(), z.array(z.unknown())]) }).parse(item.message);
5807
+ const parts = typeof message.content === "string" ? [message.content] : message.content.flatMap((part) => {
5808
+ const text = z.object({
5809
+ type: z.literal("text"),
5810
+ text: z.string()
5811
+ }).safeParse(part);
5812
+ if (text.success) return [text.data.text];
5813
+ omittedNonMessageItems = true;
5814
+ return [];
5815
+ });
5816
+ if (!parts.length) continue;
5817
+ const text = parts.join("\n");
5818
+ messages.push({
5819
+ role: item.type,
5820
+ text: text.slice(0, 8e3),
5821
+ truncated: text.length > 8e3
5822
+ });
5823
+ }
5824
+ return {
5825
+ messages,
5826
+ omittedNonMessageItems
5827
+ };
5828
+ }
5829
+ async function readClaudeHistory(input) {
5830
+ const metadata = await getSessionInfo(input.sessionId);
5831
+ if (!metadata?.cwd || metadata.sessionId !== input.sessionId || metadata.fileSize === void 0 || metadata.fileSize > 8 * 1024 * 1024) throw new Error("Claude Code session metadata is unavailable or too large.");
5832
+ await input.authorizePath(metadata.cwd);
5833
+ const items = await getSessionMessages(input.sessionId, { dir: metadata.cwd });
5834
+ const current = await getSessionInfo(input.sessionId, { dir: metadata.cwd });
5835
+ if (!current || current.cwd !== metadata.cwd || current.fileSize !== metadata.fileSize || current.lastModified !== metadata.lastModified) throw new Error("Claude Code session changed during the read.");
5836
+ await input.authorizePath(current.cwd);
5837
+ return {
5838
+ cwd: current.cwd,
5839
+ ...projectClaudeHistory(items, input.sessionId)
5840
+ };
5841
+ }
5842
+ //#endregion
5794
5843
  //#region src/local-service/session-history/codex-history-reader.ts
5795
5844
  const threadSchema = z.object({
5796
5845
  id: z.string(),
@@ -5873,12 +5922,180 @@ async function readCodexHistory(input) {
5873
5922
  }
5874
5923
  }
5875
5924
  //#endregion
5925
+ //#region src/local-service/session-history/grok-history-reader.ts
5926
+ async function readBoundedFile(path) {
5927
+ const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW);
5928
+ try {
5929
+ const before = await file.stat();
5930
+ if (!before.isFile() || before.size > 8 * 1024 * 1024) throw new Error("Session file is too large.");
5931
+ const buffer = Buffer.alloc(before.size + 1);
5932
+ let length = 0;
5933
+ while (length < buffer.length) {
5934
+ const { bytesRead } = await file.read(buffer, length, buffer.length - length, null);
5935
+ if (!bytesRead) break;
5936
+ length += bytesRead;
5937
+ }
5938
+ const after = await file.stat();
5939
+ if (length !== before.size || after.mtimeMs !== before.mtimeMs || after.size !== before.size) throw new Error("Session changed during the read.");
5940
+ return buffer.subarray(0, length).toString("utf8");
5941
+ } finally {
5942
+ await file.close();
5943
+ }
5944
+ }
5945
+ function projectGrokHistory(source, sessionId) {
5946
+ const messages = [];
5947
+ let omittedNonMessageItems = false;
5948
+ let previousRole = null;
5949
+ for (const line of source.split("\n").filter(Boolean)) {
5950
+ const envelope = z.object({
5951
+ method: z.string(),
5952
+ params: z.object({
5953
+ sessionId: z.string(),
5954
+ update: z.object({ sessionUpdate: z.string() }).passthrough()
5955
+ })
5956
+ }).parse(JSON.parse(line));
5957
+ if (envelope.params.sessionId !== sessionId) throw new Error("Session identity mismatch.");
5958
+ const update = envelope.params.update;
5959
+ if (update.sessionUpdate === "rewind_marker") throw new Error("Rewound sessions are not supported.");
5960
+ if (envelope.method !== "session/update" || !["user_message_chunk", "agent_message_chunk"].includes(update.sessionUpdate)) {
5961
+ omittedNonMessageItems = true;
5962
+ previousRole = null;
5963
+ continue;
5964
+ }
5965
+ const chunk = z.object({
5966
+ content: z.object({
5967
+ type: z.string(),
5968
+ text: z.string().optional(),
5969
+ _meta: z.object({ bash_command: z.unknown().optional() }).optional()
5970
+ }),
5971
+ _meta: z.object({ host_turn: z.boolean().optional() }).optional()
5972
+ }).parse(update);
5973
+ if (chunk.content.type !== "text" || chunk.content.text === void 0 || chunk._meta?.host_turn || chunk.content._meta?.bash_command !== void 0) {
5974
+ omittedNonMessageItems = true;
5975
+ previousRole = null;
5976
+ continue;
5977
+ }
5978
+ const role = update.sessionUpdate === "user_message_chunk" ? "user" : "assistant";
5979
+ const previous = messages.at(-1);
5980
+ if (previous && previousRole === role) {
5981
+ const text = previous.text + chunk.content.text;
5982
+ previous.text = text.slice(0, 8e3);
5983
+ previous.truncated ||= text.length > 8e3;
5984
+ } else messages.push({
5985
+ role,
5986
+ text: chunk.content.text.slice(0, 8e3),
5987
+ truncated: chunk.content.text.length > 8e3
5988
+ });
5989
+ previousRole = role;
5990
+ }
5991
+ return {
5992
+ messages,
5993
+ omittedNonMessageItems
5994
+ };
5995
+ }
5996
+ async function readGrokHistory(input) {
5997
+ const sessionId = z.uuid().parse(input.sessionId);
5998
+ const root = join(input.grokHome ?? process.env.GROK_HOME ?? join(homedir(), ".grok"), "sessions");
5999
+ const matches = [];
6000
+ for (const project of await readdir(root, { withFileTypes: true })) {
6001
+ if (!project.isDirectory()) continue;
6002
+ for (const session of await readdir(join(root, project.name), { withFileTypes: true })) if (session.isDirectory() && session.name === sessionId) matches.push(join(root, project.name, session.name));
6003
+ }
6004
+ if (matches.length !== 1) throw new Error("Session identity is missing or ambiguous.");
6005
+ const directory = z.string().parse(matches[0]);
6006
+ const source = await readBoundedFile(join(directory, "summary.json"));
6007
+ const identity = z.object({
6008
+ id: z.string(),
6009
+ cwd: z.string().min(1)
6010
+ });
6011
+ const value = JSON.parse(source);
6012
+ const summary = identity.or(z.object({ info: identity }).transform(({ info }) => info)).parse(value);
6013
+ if (summary.id !== sessionId) throw new Error("Session identity mismatch.");
6014
+ await input.authorizePath(summary.cwd);
6015
+ const history = projectGrokHistory(await readBoundedFile(join(directory, "updates.jsonl")), sessionId);
6016
+ if (await readBoundedFile(join(directory, "summary.json")) !== source) throw new Error("Session changed during the read.");
6017
+ await input.authorizePath(summary.cwd);
6018
+ return {
6019
+ cwd: summary.cwd,
6020
+ ...history
6021
+ };
6022
+ }
6023
+ //#endregion
6024
+ //#region src/local-service/session-history/opencode-history-reader.ts
6025
+ async function readOpenCodeHistory(input) {
6026
+ const databasePath = input.databasePath ?? resolveOpenCodeDatabasePath({ homeDir: homedir() });
6027
+ const metadataSchema = z.object({
6028
+ id: z.string(),
6029
+ directory: z.string().min(1),
6030
+ time_updated: z.number(),
6031
+ revert: z.string().nullable()
6032
+ });
6033
+ const metadataSql = "SELECT id, directory, time_updated, revert FROM session WHERE id = ?";
6034
+ const [row] = await queryOpenCodeReadOnly(databasePath, metadataSql, [input.sessionId]);
6035
+ const metadata = metadataSchema.parse(row);
6036
+ await input.authorizePath(metadata.directory);
6037
+ const revert = metadata.revert ? z.object({ messageID: z.string() }).parse(JSON.parse(metadata.revert)) : null;
6038
+ const rows = await queryOpenCodeReadOnly(databasePath, `
6039
+ SELECT m.id, json_extract(m.data, '$.role') AS role,
6040
+ substr(json_extract(p.data, '$.text'), 1, 8001) AS text
6041
+ FROM message m JOIN part p ON p.message_id = m.id AND p.session_id = m.session_id
6042
+ WHERE m.session_id = ? AND json_extract(p.data, '$.type') = 'text'
6043
+ AND coalesce(json_extract(p.data, '$.synthetic'), 0) = 0
6044
+ AND coalesce(json_extract(p.data, '$.ignored'), 0) = 0
6045
+ AND json_extract(m.data, '$.role') IN ('user', 'assistant')
6046
+ ORDER BY m.time_created, m.id, p.id LIMIT 1001`, [input.sessionId]);
6047
+ if (rows.length > 1e3 || JSON.stringify(rows).length > 8 * 1024 * 1024) throw new Error("Session is too large.");
6048
+ const messages = [];
6049
+ let previousId = null;
6050
+ for (const row of rows) {
6051
+ const part = z.object({
6052
+ id: z.string(),
6053
+ role: z.enum(["user", "assistant"]),
6054
+ text: z.string()
6055
+ }).parse(row);
6056
+ if (revert && part.id >= revert.messageID) break;
6057
+ const previous = messages.at(-1);
6058
+ if (previous && previousId === part.id) {
6059
+ const combined = `${previous.text}\n${part.text}`;
6060
+ previous.text = combined.slice(0, 8e3);
6061
+ previous.truncated ||= combined.length > 8e3;
6062
+ } else messages.push({
6063
+ role: part.role,
6064
+ text: part.text.slice(0, 8e3),
6065
+ truncated: part.text.length > 8e3
6066
+ });
6067
+ previousId = part.id;
6068
+ }
6069
+ const [current] = await queryOpenCodeReadOnly(databasePath, metadataSql, [input.sessionId]);
6070
+ if (JSON.stringify(metadataSchema.parse(current)) !== JSON.stringify(metadata)) throw new Error("Session changed during the read.");
6071
+ await input.authorizePath(metadata.directory);
6072
+ return {
6073
+ cwd: metadata.directory,
6074
+ messages,
6075
+ omittedNonMessageItems: true
6076
+ };
6077
+ }
6078
+ //#endregion
6079
+ //#region src/local-service/session-history/history-reader.ts
6080
+ async function readSessionHistory(input) {
6081
+ return await {
6082
+ codex: readCodexHistory,
6083
+ "claude-code": readClaudeHistory,
6084
+ opencode: readOpenCodeHistory,
6085
+ "grok-build": readGrokHistory
6086
+ }[input.provider ?? "codex"](input);
6087
+ }
6088
+ //#endregion
5876
6089
  //#region src/local-service/session-history/session-history-store.ts
5877
6090
  const storeSchema = z.strictObject({
5878
- version: z.literal(1),
6091
+ version: z.literal(2),
5879
6092
  policy: sessionHistoryPolicySchema,
5880
6093
  entries: z.array(sessionHistoryAuditSchema).max(200)
5881
6094
  });
6095
+ const legacyStoreSchema = storeSchema.extend({
6096
+ version: z.literal(1),
6097
+ policy: sessionHistoryPolicySchema.extend({ readerProfileIds: z.array(z.string()).max(64) })
6098
+ });
5882
6099
  const tails = /* @__PURE__ */ new Map();
5883
6100
  function sessionHistoryStorePath(dataRoot, owner, organization) {
5884
6101
  return join(dataRoot, "session-history", `${createHash("sha256").update(JSON.stringify([owner, organization])).digest("hex")}.json`);
@@ -5888,17 +6105,31 @@ async function readSessionHistoryStore(path) {
5888
6105
  if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") return null;
5889
6106
  throw error;
5890
6107
  });
5891
- return body === null ? storeSchema.parse({
5892
- version: 1,
6108
+ if (body === null) return storeSchema.parse({
6109
+ version: 2,
5893
6110
  policy: {
5894
6111
  enabled: false,
5895
6112
  connections: [],
5896
- readerProfileIds: [],
5897
6113
  revision: 1,
5898
6114
  updatedAtMs: 0
5899
6115
  },
5900
6116
  entries: []
5901
- }) : storeSchema.parse(JSON.parse(body));
6117
+ });
6118
+ const parsed = JSON.parse(body);
6119
+ const legacy = legacyStoreSchema.safeParse(parsed);
6120
+ if (legacy.success) {
6121
+ const { readerProfileIds: _readers, ...policy } = legacy.data.policy;
6122
+ return storeSchema.parse({
6123
+ ...legacy.data,
6124
+ version: 2,
6125
+ policy: {
6126
+ ...policy,
6127
+ enabled: false,
6128
+ revision: policy.revision + 1
6129
+ }
6130
+ });
6131
+ }
6132
+ return storeSchema.parse(parsed);
5902
6133
  }
5903
6134
  async function updateSessionHistoryStore(path, operation) {
5904
6135
  const previous = tails.get(path) ?? Promise.resolve();
@@ -5960,7 +6191,7 @@ async function handleSessionHistoryFrame(input) {
5960
6191
  result = error instanceof HistoryDenied ? denied() : {
5961
6192
  kind: "error",
5962
6193
  code: "failed",
5963
- message: "Session history could not be read. Check the Computer connection and Codex installation."
6194
+ message: "Conversation could not be read. Check the local agent on this computer, then try again."
5964
6195
  };
5965
6196
  if (request.operation === "read_session") await appendSessionHistoryAudit(path, audit(error instanceof HistoryDenied ? "denied" : "failed", 0)).catch(() => void 0);
5966
6197
  }
@@ -5979,6 +6210,7 @@ async function handleSessionHistoryFrame(input) {
5979
6210
  atMs: Date.now(),
5980
6211
  requester,
5981
6212
  projectId: request.projectId,
6213
+ provider: request.provider ?? "codex",
5982
6214
  sessionId: request.sessionId,
5983
6215
  offset: request.offset,
5984
6216
  outcome,
@@ -6030,7 +6262,7 @@ async function handleSessionHistoryFrame(input) {
6030
6262
  const revision = store.policy.revision;
6031
6263
  const authorizePath = async (cwd) => {
6032
6264
  const current = await readSessionHistoryStore(path);
6033
- if (!current.policy.enabled || current.policy.revision !== revision || requester.readerProfileId && !current.policy.readerProfileIds.includes(requester.readerProfileId)) throw new HistoryDenied();
6265
+ if (!current.policy.enabled || current.policy.revision !== revision) throw new HistoryDenied();
6034
6266
  const binding = await resolveLocalProjectConnectionForPath({
6035
6267
  path: cwd,
6036
6268
  connections: await listProjectBindings({ rootDir: input.rootDir })
@@ -6042,8 +6274,9 @@ async function handleSessionHistoryFrame(input) {
6042
6274
  const folders = await Promise.all(files.folders.map((folder) => realpath(folder)));
6043
6275
  if (!(files.mode === "only_selected_folders" ? folders.some((folder) => isSameOrDescendantPath(canonical, folder)) : !folders.some((folder) => isSameOrDescendantPath(canonical, folder) || isSameOrDescendantPath(folder, binding.repositoryPath)))) throw new HistoryDenied();
6044
6276
  };
6045
- if (!store.policy.enabled || requester.readerProfileId && !store.policy.readerProfileIds.includes(requester.readerProfileId)) throw new HistoryDenied();
6046
- const history = await (input.readHistory ?? readCodexHistory)({
6277
+ if (!store.policy.enabled) throw new HistoryDenied();
6278
+ const history = await (input.readHistory ?? readSessionHistory)({
6279
+ provider: request.provider,
6047
6280
  sessionId: request.sessionId,
6048
6281
  authorizePath
6049
6282
  });
@@ -6052,6 +6285,7 @@ async function handleSessionHistoryFrame(input) {
6052
6285
  if (!await appendSessionHistoryAudit(path, audit("allowed", messages.length), revision)) return denied();
6053
6286
  return {
6054
6287
  kind: "session",
6288
+ provider: request.provider ?? "codex",
6055
6289
  sessionId: request.sessionId,
6056
6290
  requester,
6057
6291
  messages,
@@ -16356,4 +16590,4 @@ function parseDaemonRunMode(rawMode) {
16356
16590
  //#endregion
16357
16591
  export { buildAuthStatusSnapshot as $, buildDaemonStartNeedsAttentionCard as A, resolveDaemonServiceParticipationStatus as B, buildProfileWorkspaceRows as C, createDelayedSpinner as D, emitDaemonAgentOverview as E, emitCliJsonEnvelope as F, ensureCommandAuthenticationOrCancel as G, validateLocalProjectConnectionPath as H, runDaemonStartupPreflight as I, runAuthLogout as J, evaluateCommandAuthentication as K, readDaemonIncidentLogTail as L, buildHumanErrorCopy as M, renderHumanErrorCard as N, shouldEmitAgentOverview as O, renderHumanTextErrorCard as P, buildAuthStatusRows as Q, resolveLocalComponentsStatus as R, buildProfileWorkspacePresentation as S, createQuietPresenter as T, connectWebSocket as U, LocalProjectConnectionError as V, buildCommandAuthenticationPromptMessage as W, runAuthStatus as X, runAuthMenu as Y, exchangeOneTimeTokenAuthSession as Z, buildDaemonBackgroundStartFailure as _, resolveDeviceTokenExpiresAt as _t, runDaemonBackgroundStartForDecision as a, promptTextEntry as at, formatServiceRuntimeHeadline as b, runDaemonInterrupt as c, finishCurrentCommandCheckScope as ct, runDaemonServiceDetached as d, resetCurrentCommandCheckState as dt, formatActiveOrganizationLabel as et, runDaemonSnapshot as f, startCurrentCommandCheckScope as ft, runDaemonUninstall as g, resolveDeviceAuthClientId as gt, runDaemonTeardownStrict as h, requestDeviceToken as ht, runDaemonAutostart as i, buildUnifiedCardFrame as it, runDaemonStartDecisionPrompt as j, buildDaemonStartDeferredCard as k, runDaemonReinstall as l, getCurrentCommandCheckState as lt, runDaemonStop as m, fetchAuthUserSnapshot as mt, isManagedSystemServiceBootstrapRun as n, renderInfoCard as nt, runDaemonCancel as o, isReturnKeypress as ot, runDaemonStatusFlow as p, extractAuthApiErrorMessage as pt, runAuthLogin as q, runDaemon as r, renderTextInfoCard as rt, runDaemonInstall as s, runInteractivePrompt as st, bestEffortStopCurrentLaneDaemonService as t, buildTextInfoCardLines as tt, runDaemonRunAfterEntryChecks as u, isCurrentCommandCheckScopeActive as ut, buildSystemServiceStartupFailureReportFromVerdict as v, revokeAuthAccessToken as vt, reconcileCliVersionView as w, resolveServiceParticipationReadiness as x, formatServiceParticipationReadinessLabel as y, writeInstalledLocalComponentsSnapshot as z };
16358
16592
 
16359
- //# sourceMappingURL=service-DveGEdh3.js.map
16593
+ //# sourceMappingURL=service-8EozP77B.js.map