openmeld 0.3.246 → 0.3.247
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/{add-me-membership-C7dYkfPz.js → add-me-membership-DUeJA9q4.js} +2 -2
- package/dist/{add-me-membership-C7dYkfPz.js.map → add-me-membership-DUeJA9q4.js.map} +1 -1
- package/dist/{agents-QisYIlFS.js → agents-woAcH0O6.js} +10 -10
- package/dist/{agents-QisYIlFS.js.map → agents-woAcH0O6.js.map} +1 -1
- package/dist/{api-client-foundation-CYbEdm9o.js → api-client-foundation-DMEfIARh.js} +3 -3
- package/dist/{api-client-foundation-CYbEdm9o.js.map → api-client-foundation-DMEfIARh.js.map} +1 -1
- package/dist/{api-client-foundation-B1aTRrIy.js → api-client-foundation-mqLjUunz.js} +1 -1
- package/dist/{auth-session-JhILeJRO.js → auth-session-D7hlE-47.js} +2 -2
- package/dist/{auth-session-JhILeJRO.js.map → auth-session-D7hlE-47.js.map} +1 -1
- package/dist/auth-session-DXxmGll1.js +4 -0
- package/dist/{channel-C6tm9T7P.js → channel-BeUv2bLR.js} +3 -3
- package/dist/{channel-C6tm9T7P.js.map → channel-BeUv2bLR.js.map} +1 -1
- package/dist/{cloud-computer-J2tdcTPm.js → cloud-computer-C81_vVOV.js} +4 -4
- package/dist/{cloud-computer-J2tdcTPm.js.map → cloud-computer-C81_vVOV.js.map} +1 -1
- package/dist/{command-BXJ-OwBD.js → command-qNknO9gl.js} +15 -15
- package/dist/{command-BXJ-OwBD.js.map → command-qNknO9gl.js.map} +1 -1
- package/dist/{computer-connection-BKtrn0d2.js → computer-connection-WpsIQfkh.js} +2 -2
- package/dist/{computer-connection-BKtrn0d2.js.map → computer-connection-WpsIQfkh.js.map} +1 -1
- package/dist/{computer-connection-review-bUqNKi6q.js → computer-connection-review-Df2G8VWY.js} +5 -5
- package/dist/{computer-connection-review-bUqNKi6q.js.map → computer-connection-review-Df2G8VWY.js.map} +1 -1
- package/dist/{computer-disconnect-D_Apsn9P.js → computer-disconnect-ttAH9WgN.js} +7 -7
- package/dist/{computer-disconnect-D_Apsn9P.js.map → computer-disconnect-ttAH9WgN.js.map} +1 -1
- package/dist/{computer-setup-continuation-occq0LmS.js → computer-setup-continuation-tbuUZSe5.js} +3 -3
- package/dist/{computer-setup-continuation-occq0LmS.js.map → computer-setup-continuation-tbuUZSe5.js.map} +1 -1
- package/dist/{context-M7dvalCp.js → context-x0T_qTHp.js} +4 -4
- package/dist/{context-M7dvalCp.js.map → context-x0T_qTHp.js.map} +1 -1
- package/dist/{daemon-device-id-C3gKch4E.js → daemon-device-id-DgwvQllt.js} +4 -4
- package/dist/{daemon-device-id-C3gKch4E.js.map → daemon-device-id-DgwvQllt.js.map} +1 -1
- package/dist/{daemon-lifecycle-journal-CGUuJshv.js → daemon-lifecycle-journal-C32I8p4n.js} +3 -3
- package/dist/{daemon-lifecycle-journal-CGUuJshv.js.map → daemon-lifecycle-journal-C32I8p4n.js.map} +1 -1
- package/dist/{daemon-service-runtime-CktU3ER4.js → daemon-service-runtime-DVqzJKke.js} +2 -2
- package/dist/{daemon-service-runtime-CktU3ER4.js.map → daemon-service-runtime-DVqzJKke.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-D0-15tZW.js → daemon-service-update-coordinator-BTlVzU-7.js} +14 -14
- package/dist/daemon-service-update-coordinator-BTlVzU-7.js.map +1 -0
- package/dist/{dispatch-owned-runtime-gOluDX5_.js → dispatch-owned-runtime-g2lLeYtx.js} +187 -50
- package/dist/dispatch-owned-runtime-g2lLeYtx.js.map +1 -0
- package/dist/dist-CXB_bdSS.js +4 -0
- package/dist/{dist-KibLweLD.js → dist-DGeoVaIx.js} +404 -279
- package/dist/dist-DGeoVaIx.js.map +1 -0
- package/dist/{dual-view-guide-catalog-0kSizTFt.js → dual-view-guide-catalog-CkcY09Kh.js} +3 -3
- package/dist/{dual-view-guide-catalog-0kSizTFt.js.map → dual-view-guide-catalog-CkcY09Kh.js.map} +1 -1
- package/dist/{elapsed-time-Bo1CJczC.js → elapsed-time-BMG1CU23.js} +3 -3
- package/dist/{elapsed-time-Bo1CJczC.js.map → elapsed-time-BMG1CU23.js.map} +1 -1
- package/dist/{entry-B11DkH2I.js → entry-CP7_Vgs4.js} +7 -7
- package/dist/{entry-B11DkH2I.js.map → entry-CP7_Vgs4.js.map} +1 -1
- package/dist/{installation-inventory-BZgQmVup.js → installation-inventory-7JOtUjyG.js} +3 -3
- package/dist/{installation-inventory-BZgQmVup.js.map → installation-inventory-7JOtUjyG.js.map} +1 -1
- package/dist/{installer-k2gOOs58.js → installer-BRpAz1X_.js} +2 -2
- package/dist/{installer-k2gOOs58.js.map → installer-BRpAz1X_.js.map} +1 -1
- package/dist/{meta-api-DruuiAx-.js → meta-api-QskBmfuf.js} +5 -5
- package/dist/{meta-api-DruuiAx-.js.map → meta-api-QskBmfuf.js.map} +1 -1
- package/dist/{open-code-permission-DHFJYc_o.js → open-code-permission-B5f1e5an.js} +2 -31
- package/dist/open-code-permission-B5f1e5an.js.map +1 -0
- package/dist/{openmeld-DUdN78WD.js → openmeld-BxTCCHMn.js} +194 -60
- package/dist/openmeld-BxTCCHMn.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-DwkvZD0q.js → openmeld-maintenance-worker-BQ2YbwA9.js} +9 -9
- package/dist/{openmeld-maintenance-worker-DwkvZD0q.js.map → openmeld-maintenance-worker-BQ2YbwA9.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-BNUIw_Lo.js → openmeld-tools-update-join-Dj-MEQW_.js} +4 -4
- package/dist/{openmeld-tools-update-join-BNUIw_Lo.js.map → openmeld-tools-update-join-Dj-MEQW_.js.map} +1 -1
- package/dist/openmeld.js +4 -4
- package/dist/{prepare-provider-runtime-_XRIioDp.js → prepare-provider-runtime-B6_dfpiZ.js} +74 -22
- package/dist/prepare-provider-runtime-B6_dfpiZ.js.map +1 -0
- package/dist/{prepare-session-executor-B5AjN0qz.js → prepare-session-executor-DA9saGAk.js} +18 -18
- package/dist/{prepare-session-executor-B5AjN0qz.js.map → prepare-session-executor-DA9saGAk.js.map} +1 -1
- package/dist/{process-channel-CTXWjlBP.js → process-channel-HthE5ehS.js} +2 -2
- package/dist/{process-channel-CTXWjlBP.js.map → process-channel-HthE5ehS.js.map} +1 -1
- package/dist/{runtime-DCBc6YOq.js → runtime-C7lY_Z2r.js} +103 -20
- package/dist/{runtime-DCBc6YOq.js.map → runtime-C7lY_Z2r.js.map} +1 -1
- package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js → runtime-agent-controller-reporting-submission-IhxMO4UA.js} +8 -8
- package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js.map → runtime-agent-controller-reporting-submission-IhxMO4UA.js.map} +1 -1
- package/dist/{runtime-transport-BzCp9hM3.js → runtime-transport-DRb5__yP.js} +188 -18
- package/dist/runtime-transport-DRb5__yP.js.map +1 -0
- package/dist/{service-BEH6-P8U.js → service-DveGEdh3.js} +312 -21
- package/dist/service-DveGEdh3.js.map +1 -0
- package/dist/{service-account-authorization-CtvSn02O.js → service-account-authorization-CAVkiKSF.js} +2 -2
- package/dist/{service-account-authorization-CtvSn02O.js.map → service-account-authorization-CAVkiKSF.js.map} +1 -1
- package/dist/{service-account-control-BUPiFEGo.js → service-account-control-BtE73wcO.js} +9 -9
- package/dist/{service-account-control-BUPiFEGo.js.map → service-account-control-BtE73wcO.js.map} +1 -1
- package/dist/{service-control-capabilities-PMvSlaJj.js → service-control-capabilities-BQrqIGBP.js} +3 -3
- package/dist/{service-control-capabilities-PMvSlaJj.js.map → service-control-capabilities-BQrqIGBP.js.map} +1 -1
- package/dist/{service-control-capabilities-D-Nhqqgo.js → service-control-capabilities-adDptMIH.js} +1 -1
- package/dist/{state-C_iJAzKh.js → state-DWwNdCy5.js} +2 -2
- package/dist/{state-C_iJAzKh.js.map → state-DWwNdCy5.js.map} +1 -1
- package/dist/{updates-api-s2-QB929.js → updates-api-9midbUU1.js} +12 -136
- package/dist/updates-api-9midbUU1.js.map +1 -0
- package/dist/upgrade-BvpBhL0U.js +4 -0
- package/dist/{upgrade-JmhCNmvs.js → upgrade-H-_QW75e.js} +8 -8
- package/dist/{upgrade-JmhCNmvs.js.map → upgrade-H-_QW75e.js.map} +1 -1
- package/package.json +12 -12
- package/skills/openmeld-cli/SKILL.md +2 -0
- package/skills/openmeld-cli/playbooks/computer.md +55 -0
- package/skills/openmeld-cli/playbooks/plugins.md +37 -0
- package/dist/auth-session-DUYOBXO3.js +0 -4
- package/dist/daemon-service-update-coordinator-D0-15tZW.js.map +0 -1
- package/dist/dispatch-owned-runtime-gOluDX5_.js.map +0 -1
- package/dist/dist-DMlKqjUf.js +0 -4
- package/dist/dist-KibLweLD.js.map +0 -1
- package/dist/open-code-permission-DHFJYc_o.js.map +0 -1
- package/dist/openmeld-DUdN78WD.js.map +0 -1
- package/dist/prepare-provider-runtime-_XRIioDp.js.map +0 -1
- package/dist/runtime-transport-BzCp9hM3.js.map +0 -1
- package/dist/service-BEH6-P8U.js.map +0 -1
- package/dist/updates-api-s2-QB929.js.map +0 -1
- package/dist/upgrade-Dikfgr8z.js +0 -4
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { At as ensureOpenMeldManagedProfileWorkspace, Br as applyIntervalJitterMs$1, Bt as createMutableRouteCatalogState, 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, 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-
|
|
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";
|
|
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, C as runtimeTransportHeartbeatRequestSchema,
|
|
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";
|
|
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 {
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
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-
|
|
15
|
-
import { m as hashBundledSkillAssets, p as computeDirectoryContentHash, u as loadSelectedSkillAssets } from "./state-
|
|
16
|
-
import { $ as
|
|
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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
22
|
+
import { Ct as buildAgentOverviewFromContract, Q as getCommandEntryContract, ht as validateDaemonControlTargetInput, t as createAuthLoginGuideError } from "./dual-view-guide-catalog-CkcY09Kh.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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
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-
|
|
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";
|
|
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-
|
|
40
|
-
import { t as childExecutionHostChannel } from "./process-channel-
|
|
41
|
-
import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-
|
|
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";
|
|
42
42
|
import { createHash, randomUUID } from "node:crypto";
|
|
43
43
|
import { delimiter, dirname, isAbsolute, join, resolve } from "node:path";
|
|
44
44
|
import { access, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
45
45
|
import * as z$1 from "zod/v4";
|
|
46
|
+
import { z } from "zod/v4";
|
|
46
47
|
import { accessSync, constants, readSync } from "node:fs";
|
|
47
48
|
import process$1 from "node:process";
|
|
48
49
|
import { execFile, spawn } from "node:child_process";
|
|
@@ -5790,6 +5791,276 @@ function waitForRegisterResponse(input) {
|
|
|
5790
5791
|
});
|
|
5791
5792
|
}
|
|
5792
5793
|
//#endregion
|
|
5794
|
+
//#region src/local-service/session-history/codex-history-reader.ts
|
|
5795
|
+
const threadSchema = z.object({
|
|
5796
|
+
id: z.string(),
|
|
5797
|
+
cwd: z.string().min(1),
|
|
5798
|
+
turns: z.array(z.object({ items: z.array(z.unknown()) })).max(1e5)
|
|
5799
|
+
});
|
|
5800
|
+
const userMessage = z.object({
|
|
5801
|
+
type: z.literal("userMessage"),
|
|
5802
|
+
content: z.array(z.unknown())
|
|
5803
|
+
});
|
|
5804
|
+
const assistantMessage = z.object({
|
|
5805
|
+
type: z.literal("agentMessage"),
|
|
5806
|
+
text: z.string()
|
|
5807
|
+
});
|
|
5808
|
+
const textContent = z.object({
|
|
5809
|
+
type: z.literal("text"),
|
|
5810
|
+
text: z.string()
|
|
5811
|
+
});
|
|
5812
|
+
function projectCodexHistory(value, sessionId) {
|
|
5813
|
+
const { thread } = z.object({ thread: threadSchema }).parse(value);
|
|
5814
|
+
if (thread.id !== sessionId) throw new Error("Session identity mismatch.");
|
|
5815
|
+
const messages = [];
|
|
5816
|
+
let omittedNonMessageItems = false;
|
|
5817
|
+
for (const turn of thread.turns) for (const item of turn.items) {
|
|
5818
|
+
const assistant = assistantMessage.safeParse(item);
|
|
5819
|
+
const user = userMessage.safeParse(item);
|
|
5820
|
+
let text;
|
|
5821
|
+
let role;
|
|
5822
|
+
if (assistant.success) {
|
|
5823
|
+
text = assistant.data.text;
|
|
5824
|
+
role = "assistant";
|
|
5825
|
+
} else if (user.success) {
|
|
5826
|
+
text = user.data.content.flatMap((part) => {
|
|
5827
|
+
const parsed = textContent.safeParse(part);
|
|
5828
|
+
if (parsed.success) return [parsed.data.text];
|
|
5829
|
+
omittedNonMessageItems = true;
|
|
5830
|
+
return [];
|
|
5831
|
+
}).join("\n");
|
|
5832
|
+
role = "user";
|
|
5833
|
+
} else {
|
|
5834
|
+
omittedNonMessageItems = true;
|
|
5835
|
+
continue;
|
|
5836
|
+
}
|
|
5837
|
+
messages.push({
|
|
5838
|
+
role,
|
|
5839
|
+
text: text.slice(0, 8e3),
|
|
5840
|
+
truncated: text.length > 8e3
|
|
5841
|
+
});
|
|
5842
|
+
}
|
|
5843
|
+
return {
|
|
5844
|
+
cwd: thread.cwd,
|
|
5845
|
+
messages,
|
|
5846
|
+
omittedNonMessageItems
|
|
5847
|
+
};
|
|
5848
|
+
}
|
|
5849
|
+
async function readCodexHistory(input) {
|
|
5850
|
+
const launch = await resolveInstalledCodexLaunchCandidates({ timeoutMs: 5e3 });
|
|
5851
|
+
if (!(launch.ok && launch.candidates[0])) throw new Error("Codex is unavailable.");
|
|
5852
|
+
const client = createCodexJsonRpcClient(launch.candidates[0].launchContract);
|
|
5853
|
+
try {
|
|
5854
|
+
await client.request("initialize", { clientInfo: {
|
|
5855
|
+
name: "openmeld-session-history",
|
|
5856
|
+
version: "1"
|
|
5857
|
+
} });
|
|
5858
|
+
client.notify("initialized", {});
|
|
5859
|
+
const metadata = z.object({ thread: threadSchema }).parse(await client.request("thread/read", {
|
|
5860
|
+
threadId: input.sessionId,
|
|
5861
|
+
includeTurns: false
|
|
5862
|
+
}));
|
|
5863
|
+
if (metadata.thread.id !== input.sessionId) throw new Error("Session identity mismatch.");
|
|
5864
|
+
await input.authorizePath(metadata.thread.cwd);
|
|
5865
|
+
const history = projectCodexHistory(await client.request("thread/read", {
|
|
5866
|
+
threadId: input.sessionId,
|
|
5867
|
+
includeTurns: true
|
|
5868
|
+
}), input.sessionId);
|
|
5869
|
+
await input.authorizePath(history.cwd);
|
|
5870
|
+
return history;
|
|
5871
|
+
} finally {
|
|
5872
|
+
await client.close();
|
|
5873
|
+
}
|
|
5874
|
+
}
|
|
5875
|
+
//#endregion
|
|
5876
|
+
//#region src/local-service/session-history/session-history-store.ts
|
|
5877
|
+
const storeSchema = z.strictObject({
|
|
5878
|
+
version: z.literal(1),
|
|
5879
|
+
policy: sessionHistoryPolicySchema,
|
|
5880
|
+
entries: z.array(sessionHistoryAuditSchema).max(200)
|
|
5881
|
+
});
|
|
5882
|
+
const tails = /* @__PURE__ */ new Map();
|
|
5883
|
+
function sessionHistoryStorePath(dataRoot, owner, organization) {
|
|
5884
|
+
return join(dataRoot, "session-history", `${createHash("sha256").update(JSON.stringify([owner, organization])).digest("hex")}.json`);
|
|
5885
|
+
}
|
|
5886
|
+
async function readSessionHistoryStore(path) {
|
|
5887
|
+
const body = await readFile(path, "utf8").catch((error) => {
|
|
5888
|
+
if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") return null;
|
|
5889
|
+
throw error;
|
|
5890
|
+
});
|
|
5891
|
+
return body === null ? storeSchema.parse({
|
|
5892
|
+
version: 1,
|
|
5893
|
+
policy: {
|
|
5894
|
+
enabled: false,
|
|
5895
|
+
connections: [],
|
|
5896
|
+
readerProfileIds: [],
|
|
5897
|
+
revision: 1,
|
|
5898
|
+
updatedAtMs: 0
|
|
5899
|
+
},
|
|
5900
|
+
entries: []
|
|
5901
|
+
}) : storeSchema.parse(JSON.parse(body));
|
|
5902
|
+
}
|
|
5903
|
+
async function updateSessionHistoryStore(path, operation) {
|
|
5904
|
+
const previous = tails.get(path) ?? Promise.resolve();
|
|
5905
|
+
let release = () => void 0;
|
|
5906
|
+
const next = new Promise((resolve) => {
|
|
5907
|
+
release = resolve;
|
|
5908
|
+
});
|
|
5909
|
+
tails.set(path, next);
|
|
5910
|
+
await previous;
|
|
5911
|
+
try {
|
|
5912
|
+
const store = await readSessionHistoryStore(path);
|
|
5913
|
+
const result = operation(store);
|
|
5914
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
5915
|
+
await mkdir(dirname(path), {
|
|
5916
|
+
recursive: true,
|
|
5917
|
+
mode: 448
|
|
5918
|
+
});
|
|
5919
|
+
try {
|
|
5920
|
+
await writeFile(temporary, JSON.stringify(storeSchema.parse(store)), { mode: 384 });
|
|
5921
|
+
await rename(temporary, path);
|
|
5922
|
+
} finally {
|
|
5923
|
+
await rm(temporary, { force: true });
|
|
5924
|
+
}
|
|
5925
|
+
return result;
|
|
5926
|
+
} finally {
|
|
5927
|
+
release();
|
|
5928
|
+
if (tails.get(path) === next) tails.delete(path);
|
|
5929
|
+
}
|
|
5930
|
+
}
|
|
5931
|
+
async function appendSessionHistoryAudit(path, entry, expectedRevision) {
|
|
5932
|
+
return await updateSessionHistoryStore(path, (store) => {
|
|
5933
|
+
const current = expectedRevision === void 0 || store.policy.revision === expectedRevision;
|
|
5934
|
+
store.entries = [{
|
|
5935
|
+
...entry,
|
|
5936
|
+
outcome: current ? entry.outcome : "denied",
|
|
5937
|
+
count: current ? entry.count : 0
|
|
5938
|
+
}, ...store.entries].slice(0, 200);
|
|
5939
|
+
return current;
|
|
5940
|
+
});
|
|
5941
|
+
}
|
|
5942
|
+
//#endregion
|
|
5943
|
+
//#region src/local-service/session-history/session-history-handler.ts
|
|
5944
|
+
var HistoryDenied = class extends Error {};
|
|
5945
|
+
const denied = () => ({
|
|
5946
|
+
kind: "error",
|
|
5947
|
+
code: "denied",
|
|
5948
|
+
message: "This session is outside your authorized history access."
|
|
5949
|
+
});
|
|
5950
|
+
async function handleSessionHistoryFrame(input) {
|
|
5951
|
+
const { requestId, request: envelope } = input.frame.payload;
|
|
5952
|
+
const { request, requester, organizationId } = envelope;
|
|
5953
|
+
const path = sessionHistoryStorePath(dirname(input.computerFileAccessStorePath), input.ownerUserId, organizationId);
|
|
5954
|
+
let result;
|
|
5955
|
+
try {
|
|
5956
|
+
if (envelope.expectedDeviceId !== input.deviceId || requester.ownerUserId !== input.ownerUserId || requester.requesterUserId !== input.ownerUserId) throw new HistoryDenied();
|
|
5957
|
+
if (request.operation !== "read_session" && (requester.readerProfileId !== null || requester.audience !== "owner_private")) throw new HistoryDenied();
|
|
5958
|
+
result = await execute();
|
|
5959
|
+
} catch (error) {
|
|
5960
|
+
result = error instanceof HistoryDenied ? denied() : {
|
|
5961
|
+
kind: "error",
|
|
5962
|
+
code: "failed",
|
|
5963
|
+
message: "Session history could not be read. Check the Computer connection and Codex installation."
|
|
5964
|
+
};
|
|
5965
|
+
if (request.operation === "read_session") await appendSessionHistoryAudit(path, audit(error instanceof HistoryDenied ? "denied" : "failed", 0)).catch(() => void 0);
|
|
5966
|
+
}
|
|
5967
|
+
return sessionHistoryResultFrameSchema.parse({
|
|
5968
|
+
v: 1,
|
|
5969
|
+
code: "daemon.session_history.request_result",
|
|
5970
|
+
payload: {
|
|
5971
|
+
requestId,
|
|
5972
|
+
result
|
|
5973
|
+
}
|
|
5974
|
+
});
|
|
5975
|
+
function audit(outcome, count) {
|
|
5976
|
+
if (request.operation !== "read_session") throw new HistoryDenied();
|
|
5977
|
+
return {
|
|
5978
|
+
requestId,
|
|
5979
|
+
atMs: Date.now(),
|
|
5980
|
+
requester,
|
|
5981
|
+
projectId: request.projectId,
|
|
5982
|
+
sessionId: request.sessionId,
|
|
5983
|
+
offset: request.offset,
|
|
5984
|
+
outcome,
|
|
5985
|
+
count
|
|
5986
|
+
};
|
|
5987
|
+
}
|
|
5988
|
+
async function saveSettings(request, connections) {
|
|
5989
|
+
if (!request.policy.connections.every((grant) => connections.some((connection) => connection.projectId === grant.projectId && connection.bindingGeneration === grant.bindingGeneration))) throw new HistoryDenied();
|
|
5990
|
+
return await updateSessionHistoryStore(path, (current) => {
|
|
5991
|
+
if (current.policy.revision !== request.expectedRevision) return null;
|
|
5992
|
+
current.policy = {
|
|
5993
|
+
...request.policy,
|
|
5994
|
+
revision: current.policy.revision + 1,
|
|
5995
|
+
updatedAtMs: Date.now()
|
|
5996
|
+
};
|
|
5997
|
+
return current.policy;
|
|
5998
|
+
});
|
|
5999
|
+
}
|
|
6000
|
+
async function execute() {
|
|
6001
|
+
const store = await readSessionHistoryStore(path);
|
|
6002
|
+
const connections = await listProjectBindings({
|
|
6003
|
+
rootDir: input.rootDir,
|
|
6004
|
+
organizationId
|
|
6005
|
+
});
|
|
6006
|
+
const settings = () => ({
|
|
6007
|
+
kind: "settings",
|
|
6008
|
+
policy: store.policy,
|
|
6009
|
+
connections: connections.map(({ projectId, bindingGeneration, projectSlug }) => ({
|
|
6010
|
+
projectId,
|
|
6011
|
+
bindingGeneration,
|
|
6012
|
+
projectSlug
|
|
6013
|
+
}))
|
|
6014
|
+
});
|
|
6015
|
+
if (request.operation === "read_settings") return settings();
|
|
6016
|
+
if (request.operation === "read_audit") return {
|
|
6017
|
+
kind: "audit",
|
|
6018
|
+
entries: store.entries
|
|
6019
|
+
};
|
|
6020
|
+
if (request.operation === "update_settings") {
|
|
6021
|
+
const updated = await saveSettings(request, connections);
|
|
6022
|
+
if (!updated) return {
|
|
6023
|
+
kind: "error",
|
|
6024
|
+
code: "changed",
|
|
6025
|
+
message: "History settings changed. Reload them before saving."
|
|
6026
|
+
};
|
|
6027
|
+
store.policy = updated;
|
|
6028
|
+
return settings();
|
|
6029
|
+
}
|
|
6030
|
+
const revision = store.policy.revision;
|
|
6031
|
+
const authorizePath = async (cwd) => {
|
|
6032
|
+
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();
|
|
6034
|
+
const binding = await resolveLocalProjectConnectionForPath({
|
|
6035
|
+
path: cwd,
|
|
6036
|
+
connections: await listProjectBindings({ rootDir: input.rootDir })
|
|
6037
|
+
});
|
|
6038
|
+
if (!binding || binding.organizationId !== organizationId || binding.projectId !== request.projectId || !current.policy.connections.some((grant) => grant.projectId === binding.projectId && grant.bindingGeneration === binding.bindingGeneration)) throw new HistoryDenied();
|
|
6039
|
+
const canonical = await realpath(cwd);
|
|
6040
|
+
const files = await readComputerFileAccessPolicy(input.computerFileAccessStorePath);
|
|
6041
|
+
if (files.mode === "local_agent_settings") return;
|
|
6042
|
+
const folders = await Promise.all(files.folders.map((folder) => realpath(folder)));
|
|
6043
|
+
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
|
+
};
|
|
6045
|
+
if (!store.policy.enabled || requester.readerProfileId && !store.policy.readerProfileIds.includes(requester.readerProfileId)) throw new HistoryDenied();
|
|
6046
|
+
const history = await (input.readHistory ?? readCodexHistory)({
|
|
6047
|
+
sessionId: request.sessionId,
|
|
6048
|
+
authorizePath
|
|
6049
|
+
});
|
|
6050
|
+
await authorizePath(history.cwd);
|
|
6051
|
+
const messages = history.messages.slice(request.offset, request.offset + request.limit);
|
|
6052
|
+
if (!await appendSessionHistoryAudit(path, audit("allowed", messages.length), revision)) return denied();
|
|
6053
|
+
return {
|
|
6054
|
+
kind: "session",
|
|
6055
|
+
sessionId: request.sessionId,
|
|
6056
|
+
requester,
|
|
6057
|
+
messages,
|
|
6058
|
+
nextOffset: request.offset + messages.length < history.messages.length ? request.offset + messages.length : null,
|
|
6059
|
+
omittedNonMessageItems: history.omittedNonMessageItems
|
|
6060
|
+
};
|
|
6061
|
+
}
|
|
6062
|
+
}
|
|
6063
|
+
//#endregion
|
|
5793
6064
|
//#region src/local-service/carrier/run-socket-session.ts
|
|
5794
6065
|
function buildShutdownHeartbeatFacts(input) {
|
|
5795
6066
|
if (input.acceptingDispatches) return {};
|
|
@@ -5851,6 +6122,22 @@ function classifyDaemonSocketDisconnect(input) {
|
|
|
5851
6122
|
if (input.closeCode === 1006) return "possible_deploy_or_edge_restart";
|
|
5852
6123
|
return "abnormal_socket_close";
|
|
5853
6124
|
}
|
|
6125
|
+
function handleSessionHistorySocketFrame(input) {
|
|
6126
|
+
if (input.frame.code !== "daemon.session_history.request") return false;
|
|
6127
|
+
const parsed = sessionHistoryRequestFrameSchema.safeParse(input.frame);
|
|
6128
|
+
if (!parsed.success) return true;
|
|
6129
|
+
handleSessionHistoryFrame({
|
|
6130
|
+
...input,
|
|
6131
|
+
frame: parsed.data
|
|
6132
|
+
}).then((frame) => input.socket.send(JSON.stringify(frame))).catch(() => {
|
|
6133
|
+
emitRunLine({
|
|
6134
|
+
presenter: input.presenter,
|
|
6135
|
+
code: "daemon.run.session_history_failed",
|
|
6136
|
+
text: "Session history request failed. No transcript content was logged."
|
|
6137
|
+
});
|
|
6138
|
+
});
|
|
6139
|
+
return true;
|
|
6140
|
+
}
|
|
5854
6141
|
function handleComputerFileAccessSocketFrame(input) {
|
|
5855
6142
|
if (!input.frame.code.startsWith("daemon.computer_file_access.")) return false;
|
|
5856
6143
|
const parsed = computerFileAccessDaemonFrameSchema.safeParse(input.frame);
|
|
@@ -6976,7 +7263,10 @@ async function runDaemonSocketSession(input) {
|
|
|
6976
7263
|
});
|
|
6977
7264
|
return;
|
|
6978
7265
|
}
|
|
6979
|
-
if (
|
|
7266
|
+
if (handleSessionHistorySocketFrame({
|
|
7267
|
+
...input,
|
|
7268
|
+
frame: parsedFrame
|
|
7269
|
+
}) || handleLocalFolderPickerSocketFrame({
|
|
6980
7270
|
deviceId: input.deviceId,
|
|
6981
7271
|
frame: parsedFrame,
|
|
6982
7272
|
presenter: input.presenter,
|
|
@@ -7806,7 +8096,8 @@ function buildLocalServiceCapabilityHeaders(input) {
|
|
|
7806
8096
|
[OPENMELD_EXECUTION_ADMISSION_HEADER]: "1",
|
|
7807
8097
|
[OPENMELD_ADMISSION_EVIDENCE_HEADER]: "1",
|
|
7808
8098
|
...input.localFolderPickerAvailable ? { [OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER]: LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY } : {},
|
|
7809
|
-
[OPENMELD_RUNTIME_CAPABILITIES_HEADER]: COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY
|
|
8099
|
+
[OPENMELD_RUNTIME_CAPABILITIES_HEADER]: COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY,
|
|
8100
|
+
[SESSION_HISTORY_CAPABILITY_HEADER]: SESSION_HISTORY_RUNTIME_CAPABILITY
|
|
7810
8101
|
};
|
|
7811
8102
|
}
|
|
7812
8103
|
var DaemonStreamAuthenticationRequiredError = class extends Error {
|
|
@@ -16065,4 +16356,4 @@ function parseDaemonRunMode(rawMode) {
|
|
|
16065
16356
|
//#endregion
|
|
16066
16357
|
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 };
|
|
16067
16358
|
|
|
16068
|
-
//# sourceMappingURL=service-
|
|
16359
|
+
//# sourceMappingURL=service-DveGEdh3.js.map
|