openmeld 0.3.212 → 0.3.214
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-BwPpVKtA.js → add-me-membership-BaqG9F5c.js} +2 -2
- package/dist/{add-me-membership-BwPpVKtA.js.map → add-me-membership-BaqG9F5c.js.map} +1 -1
- package/dist/{agents-Y-UJ74By.js → agents-y9C8FCyv.js} +8 -8
- package/dist/{agents-Y-UJ74By.js.map → agents-y9C8FCyv.js.map} +1 -1
- package/dist/{api-client-foundation-CrQN8_-N.js → api-client-foundation-BYnU1pbS.js} +1 -1
- package/dist/{api-client-foundation-DjbtuE52.js → api-client-foundation-CKRP7Ymg.js} +3 -3
- package/dist/{api-client-foundation-DjbtuE52.js.map → api-client-foundation-CKRP7Ymg.js.map} +1 -1
- package/dist/auth-session-BWKfXWxl.js +4 -0
- package/dist/{auth-session-Dqz9X4F0.js → auth-session-gaLjWIKR.js} +67 -8
- package/dist/auth-session-gaLjWIKR.js.map +1 -0
- package/dist/{base-url-C6sHRNGu.js → base-url-BczddvzH.js} +2 -2
- package/dist/{base-url-C6sHRNGu.js.map → base-url-BczddvzH.js.map} +1 -1
- package/dist/{base-url-BE3pFiOZ.js → base-url-CfyKRz89.js} +1 -1
- package/dist/{command-jgHbP21v.js → command-C72QNhjP.js} +13 -13
- package/dist/{command-jgHbP21v.js.map → command-C72QNhjP.js.map} +1 -1
- package/dist/computer-connection-Dv9kex7h.js +120 -0
- package/dist/computer-connection-Dv9kex7h.js.map +1 -0
- package/dist/{computer-connection-review-CzSpaHE0.js → computer-connection-review-_ZLPsdE_.js} +6 -6
- package/dist/{computer-connection-review-CzSpaHE0.js.map → computer-connection-review-_ZLPsdE_.js.map} +1 -1
- package/dist/{computer-disconnect-DNM7jvda.js → computer-disconnect-BJ-Tl-7q.js} +9 -9
- package/dist/{computer-disconnect-DNM7jvda.js.map → computer-disconnect-BJ-Tl-7q.js.map} +1 -1
- package/dist/{computer-setup-continuation-BqdhIAjT.js → computer-setup-continuation-CN383Vvy.js} +4 -4
- package/dist/{computer-setup-continuation-BqdhIAjT.js.map → computer-setup-continuation-CN383Vvy.js.map} +1 -1
- package/dist/{control-plane-PxntAyDq.js → control-plane-Bpu7g9Av.js} +2 -2
- package/dist/{control-plane-PxntAyDq.js.map → control-plane-Bpu7g9Av.js.map} +1 -1
- package/dist/{daemon-runtime-lease-Dd4hdHNo.js → daemon-runtime-lease-CIzOT1zx.js} +2 -2
- package/dist/{daemon-runtime-lease-Dd4hdHNo.js.map → daemon-runtime-lease-CIzOT1zx.js.map} +1 -1
- package/dist/{daemon-runtime-lease-y3n1K0-C.js → daemon-runtime-lease-_M6hW8Mg.js} +1 -1
- package/dist/{daemon-service-manager-GiMCiTmu.js → daemon-service-manager-DxS5eH_N.js} +4 -4
- package/dist/{daemon-service-manager-GiMCiTmu.js.map → daemon-service-manager-DxS5eH_N.js.map} +1 -1
- package/dist/{daemon-service-manager-Bh0LoLed.js → daemon-service-manager-fPpyIyrU.js} +1 -1
- package/dist/{daemon-service-runtime-CWTlAhZY.js → daemon-service-runtime-CGT3yVOs.js} +113 -26
- package/dist/daemon-service-runtime-CGT3yVOs.js.map +1 -0
- package/dist/{daemon-service-update-coordinator-DcjOzGu1.js → daemon-service-update-coordinator--xLHNqDT.js} +966 -210
- package/dist/daemon-service-update-coordinator--xLHNqDT.js.map +1 -0
- package/dist/{daemon-state-C37ZtIZK.js → daemon-state-CoAZLwpi.js} +3 -3
- package/dist/{daemon-state-C37ZtIZK.js.map → daemon-state-CoAZLwpi.js.map} +1 -1
- package/dist/dist-CABuqfdH.js +4 -0
- package/dist/{dist-jsWwS864.js → dist-Dj3TOx03.js} +548 -223
- package/dist/dist-Dj3TOx03.js.map +1 -0
- package/dist/distribution-BDQT2ilb.js +20 -0
- package/dist/distribution-BDQT2ilb.js.map +1 -0
- package/dist/{elapsed-time-iFOSSUJo.js → elapsed-time-CCFWbCC8.js} +9 -7
- package/dist/{elapsed-time-iFOSSUJo.js.map → elapsed-time-CCFWbCC8.js.map} +1 -1
- package/dist/{installation-inventory-B0cbVLun.js → installation-inventory-C4WKcVEj.js} +6 -6
- package/dist/{installation-inventory-B0cbVLun.js.map → installation-inventory-C4WKcVEj.js.map} +1 -1
- package/dist/{local-components-H3SkJMC1.js → local-components-B6SCXZf9.js} +10 -2
- package/dist/local-components-B6SCXZf9.js.map +1 -0
- package/dist/{lock-Dxp6o_t_.js → lock-CAt9uTnZ.js} +5 -48
- package/dist/lock-CAt9uTnZ.js.map +1 -0
- package/dist/{openmeld-B4gQCCex.js → openmeld-DpV9lAF-.js} +325 -190
- package/dist/openmeld-DpV9lAF-.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/{openmeld-environment-target-NtJYJe1D.js → openmeld-environment-target-BWI2adGw.js} +3 -3
- package/dist/{openmeld-environment-target-NtJYJe1D.js.map → openmeld-environment-target-BWI2adGw.js.map} +1 -1
- package/dist/{openmeld-maintenance-worker-DtY_H7Bv.js → openmeld-maintenance-worker-Blfu_oOo.js} +9 -9
- package/dist/{openmeld-maintenance-worker-DtY_H7Bv.js.map → openmeld-maintenance-worker-Blfu_oOo.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-DS_EIL5q.js → openmeld-tools-update-join-BpLwmowQ.js} +6 -4
- package/dist/{openmeld-tools-update-join-DS_EIL5q.js.map → openmeld-tools-update-join-BpLwmowQ.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-CbZPpc7D.js → openmeld-tools-update-process-frame-0X-t0Kjv.js} +2 -2
- package/dist/{openmeld-tools-update-process-frame-CbZPpc7D.js.map → openmeld-tools-update-process-frame-0X-t0Kjv.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-CcPLrSsw.js → openmeld-tools-update-process-frame-DX1Dc8VI.js} +1 -1
- package/dist/openmeld.js +4 -4
- package/dist/{prepare-session-executor-CWKqfuse.js → prepare-session-executor-Cfm3EvXl.js} +176 -23
- package/dist/prepare-session-executor-Cfm3EvXl.js.map +1 -0
- package/dist/process-identity-Clby123a.js +145 -0
- package/dist/process-identity-Clby123a.js.map +1 -0
- package/dist/{runtime-transport-BQAmcHwF.js → runtime-transport-D8G8sANa.js} +113 -10
- package/dist/runtime-transport-D8G8sANa.js.map +1 -0
- package/dist/{service-CTG3_X0o.js → service-Cl_Ge6oJ.js} +949 -75
- package/dist/service-Cl_Ge6oJ.js.map +1 -0
- package/dist/{distribution-DY2fBeSW.js → service-account-admission-Dy2W3n3_.js} +9 -19
- package/dist/service-account-admission-Dy2W3n3_.js.map +1 -0
- package/dist/{service-account-authorization-Dq4LcAVa.js → service-account-authorization-4oZuo8sT.js} +6 -6
- package/dist/{service-account-authorization-Dq4LcAVa.js.map → service-account-authorization-4oZuo8sT.js.map} +1 -1
- package/dist/{service-account-control-BTR_X7QM.js → service-account-control-CTXv3924.js} +11 -12
- package/dist/service-account-control-CTXv3924.js.map +1 -0
- package/dist/{service-control-capabilities-ChRe8hkw.js → service-control-capabilities-B-vCQoBV.js} +1 -1
- package/dist/service-control-capabilities-ptf0u8n5.js +70 -0
- package/dist/service-control-capabilities-ptf0u8n5.js.map +1 -0
- package/dist/service-control-carrier-capability-hvpD7hGf.js +24 -0
- package/dist/service-control-carrier-capability-hvpD7hGf.js.map +1 -0
- package/dist/upgrade-EWdIdoHm.js +4 -0
- package/dist/{upgrade-DAVEeo8B.js → upgrade-vuPM1iX3.js} +12 -9
- package/dist/{upgrade-DAVEeo8B.js.map → upgrade-vuPM1iX3.js.map} +1 -1
- package/dist/{windows-user-task-DxPN7TzK.js → windows-user-task-FdycoSb4.js} +1 -1
- package/dist/{windows-user-task-DqJWtlAm.js → windows-user-task-i0oHCBc0.js} +49 -19
- package/dist/windows-user-task-i0oHCBc0.js.map +1 -0
- package/package.json +2 -2
- package/dist/auth-session-Dqz9X4F0.js.map +0 -1
- package/dist/auth-session-bRzDGlXy.js +0 -4
- package/dist/computer-connection-DvqsgYls.js +0 -81
- package/dist/computer-connection-DvqsgYls.js.map +0 -1
- package/dist/daemon-service-runtime-CWTlAhZY.js.map +0 -1
- package/dist/daemon-service-update-coordinator-DcjOzGu1.js.map +0 -1
- package/dist/dist--pb6JxqG.js +0 -4
- package/dist/dist-jsWwS864.js.map +0 -1
- package/dist/distribution-DY2fBeSW.js.map +0 -1
- package/dist/local-components-H3SkJMC1.js.map +0 -1
- package/dist/lock-Dxp6o_t_.js.map +0 -1
- package/dist/openmeld-B4gQCCex.js.map +0 -1
- package/dist/prepare-session-executor-CWKqfuse.js.map +0 -1
- package/dist/runtime-transport-BQAmcHwF.js.map +0 -1
- package/dist/service-CTG3_X0o.js.map +0 -1
- package/dist/service-account-control-BTR_X7QM.js.map +0 -1
- package/dist/service-control-capabilities-C5SxnBg2.js +0 -54
- package/dist/service-control-capabilities-C5SxnBg2.js.map +0 -1
- package/dist/upgrade-DKXu-1wO.js +0 -4
- package/dist/windows-user-task-DqJWtlAm.js.map +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { zt as createCurrentDeviceApi } from "./dist-
|
|
5
|
-
import { $
|
|
6
|
-
import { at as prepareSessionStreamServerFrameSchema, b as recordInterruptedComputerAuthSessionRecoveryFailure, c as completeInterruptedComputerAuthSessionRecovery, ct as prepareStepDiagnosticsBundleSchema, d as getAuthSessionState, dt as redactPrepareStepDiagnosticsValue, h as markInterruptedComputerAuthSessionRecovery, lt as redactPrepareStepDiagnosticsBundle, ot as prepareSessionWithTokenResponseSchema, p as getInterruptedComputerAuthSessionRecovery, rt as prepareSessionResponseSchema, st as prepareSetupBootstrapWriteSchema, tt as PREPARE_STEP_DIAGNOSTICS_MAX_CHARS, ut as redactPrepareStepDiagnosticsText } from "./auth-session-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import { D as isLocalMachineFailureError, S as LocalMachineFailureError, et as openMeldRootDir, mt as skillsDir } from "./lock-CAt9uTnZ.js";
|
|
4
|
+
import { zt as createCurrentDeviceApi } from "./dist-Dj3TOx03.js";
|
|
5
|
+
import { $t as resolveCurrentDaemonExpectedVersion, Bn as resolveSkillsAgentRegistry, Bt as toStartBackgroundHelperExecutionCompatibility, Dn as reconcileNewRunnableBuiltinAgentsForSetup, J as getSetupFlowCopy, Rn as canManageRegistryAgentSkillTargets, St as readOpenMeldToolsUpdateContextFromEnv, Xa as resolveOpenMeldProfile, Zn as notifyDaemonRouteCatalogChanged, ea as buildLocalAgentCatalogFromReadiness, jt as inspectDaemonServiceInventory, n as scheduleDaemonServiceUpdate, si as buildAgentControllerRef, za as resolveRuntimeContext, zn as detectInstalledSkillsAgents, zt as resolveDaemonRuntimeContractCompatibility } from "./daemon-service-update-coordinator--xLHNqDT.js";
|
|
6
|
+
import { at as prepareSessionStreamServerFrameSchema, b as recordInterruptedComputerAuthSessionRecoveryFailure, c as completeInterruptedComputerAuthSessionRecovery, ct as prepareStepDiagnosticsBundleSchema, d as getAuthSessionState, dt as redactPrepareStepDiagnosticsValue, h as markInterruptedComputerAuthSessionRecovery, lt as redactPrepareStepDiagnosticsBundle, ot as prepareSessionWithTokenResponseSchema, p as getInterruptedComputerAuthSessionRecovery, rt as prepareSessionResponseSchema, st as prepareSetupBootstrapWriteSchema, tt as PREPARE_STEP_DIAGNOSTICS_MAX_CHARS, ut as redactPrepareStepDiagnosticsText } from "./auth-session-gaLjWIKR.js";
|
|
7
|
+
import { T as resolveOpenMeldToolsUpdateTargetVersions } from "./local-components-B6SCXZf9.js";
|
|
8
|
+
import { a as mergeTargetsByDir, b as withSkillsInstallLock, c as summarizeSkillState, d as resolveSkillsInstallStates, f as ensureLocalSkills, i as filterTargetsWithInstalledOpenMeldSkills, l as installSkillsToTargets, m as readOpenMeldSkillMarker, n as collectSkillsReadinessSnapshot, o as persistDetectedInstallStateFromCheck, p as isOpenMeldManagedSkillDir, r as compareInstallRecords, s as resolveTrackedInstallTargets, t as buildAgentTargets } from "./installation-inventory-C4WKcVEj.js";
|
|
9
|
+
import { D as createDelayedSpinner, L as readDaemonIncidentLogTail, M as buildHumanErrorCopy, N as renderHumanErrorCard, Qn as renderTextInfoCard, Zn as renderInfoCard, _t as resolveLocalAgentControllerReportDecision, cr as extractAuthApiErrorMessage, dr as resolveDeviceAuthClientId, er as promptTextEntry, fr as resolveDeviceTokenExpiresAt, gt as resolveLocalAgentControllerLaunchability, hn as connectWebSocket, ht as resolveLocalAgentControllerBlockerReasonCodes, lr as fetchAuthUserSnapshot, mt as collectLocalAgentControllerInventory, nr as runInteractivePrompt, pr as revokeAuthAccessToken, pt as submitRuntimeAgentControllerReports, t as bestEffortStopCurrentLaneDaemonService, tr as isReturnKeypress, ur as requestDeviceToken } from "./service-Cl_Ge6oJ.js";
|
|
10
|
+
import { G as readRecentDaemonLifecycleEvents, Ht as upsertDaemonServiceContract, Vt as readDaemonServiceContract, Y as collectLocalOperationFailure, i as readCurrentObservedDaemonRuntimeStatus, lt as compareSemver, nt as OPENMELD_VERSION, st as readPendingDaemonServiceUpdate } from "./daemon-service-runtime-CGT3yVOs.js";
|
|
11
|
+
import { At as getCliVersionInfo, Bt as buildAgentOverviewFromContract, C as createSkillsActionGuideError, Et as getSkillsTargetSelectionRequiredArguments, Gt as createPresenter, Kt as sanitizeTerminalDisplayText, Ot as validateSkillsTargetSelectionInput, Tt as getSkillsTargetSelectionOptionalArguments, Wt as formatAgentOverviewPayload, Xt as outLine, g as canUseInteractivePrompts, ht as getCommandEntryContract, n as resolveElapsedTimeMs, t as formatElapsedTime, wt as buildSkillsTargetSelectionExamples } from "./elapsed-time-CCFWbCC8.js";
|
|
12
|
+
import { S as setConfiguredSkillsConfig, T as updateConfiguredSkillsConfig, g as getConfiguredSkillsConfig, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-BczddvzH.js";
|
|
13
|
+
import { A as getDaemonStatus } from "./daemon-state-CoAZLwpi.js";
|
|
14
|
+
import { S as resolveDaemonServiceManager, _ as readDaemonServiceJobCrashExitCode, d as isDaemonServiceJobNeverSpawned } from "./daemon-service-manager-DxS5eH_N.js";
|
|
15
|
+
import { a as formatOpenMeldCliCommand, c as formatOpenMeldCliTextBlock, i as formatInlineOpenMeldCliCommands, r as resolveAuthBaseUrl } from "./openmeld-environment-target-BWI2adGw.js";
|
|
15
16
|
import { t as sleep } from "./dist-o3UL1EGQ.js";
|
|
16
|
-
import { d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, t as createCliApiClientFoundation } from "./api-client-foundation-
|
|
17
|
-
import { n as waitForExternalOpenMeldToolsUpdate, r as waitForOpenMeldToolsUpdateCompletion, t as resolveExternalOpenMeldToolsUpdate } from "./openmeld-tools-update-join-
|
|
18
|
-
import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, f as runAgentsRepair, h as promptSearchMultiselect, l as runAgentsEnable, x as computeRetryDelayMs } from "./agents-
|
|
17
|
+
import { d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, t as createCliApiClientFoundation } from "./api-client-foundation-CKRP7Ymg.js";
|
|
18
|
+
import { n as waitForExternalOpenMeldToolsUpdate, r as waitForOpenMeldToolsUpdateCompletion, t as resolveExternalOpenMeldToolsUpdate } from "./openmeld-tools-update-join-BpLwmowQ.js";
|
|
19
|
+
import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, f as runAgentsRepair, h as promptSearchMultiselect, l as runAgentsEnable, x as computeRetryDelayMs } from "./agents-y9C8FCyv.js";
|
|
19
20
|
import os, { hostname, release } from "node:os";
|
|
20
21
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
21
22
|
import { lstat, readFile, readlink, rm, stat } from "node:fs/promises";
|
|
@@ -134,9 +135,26 @@ function normalizeOptionalString$1(value) {
|
|
|
134
135
|
//#region src/commands/computer-auth-handoff-recovery.ts
|
|
135
136
|
const UNUSED_SETUP_SESSION_CLEANUP_SUFFIX = " OpenMeld also could not revoke the unused setup session.";
|
|
136
137
|
async function recoverInterruptedComputerAuthHandoff(input) {
|
|
138
|
+
try {
|
|
139
|
+
return await runInterruptedComputerAuthHandoffRecovery(input);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
emitComputerAuthHandoffRecoveryProgress(input, {
|
|
142
|
+
code: "setup.computer_handoff_recovery.failed",
|
|
143
|
+
state: "failed",
|
|
144
|
+
text: error instanceof Error && error.message.trim() ? error.message : "The previous computer connection could not be restored."
|
|
145
|
+
});
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async function runInterruptedComputerAuthHandoffRecovery(input) {
|
|
137
150
|
await waitForOpenMeldToolsUpdateBeforeComputerHandoff(input);
|
|
138
151
|
const recovery = await getInterruptedComputerAuthSessionRecovery();
|
|
139
152
|
if (!recovery) return "none";
|
|
153
|
+
emitComputerAuthHandoffRecoveryProgress(input, {
|
|
154
|
+
code: "setup.computer_handoff_recovery.started",
|
|
155
|
+
state: "active",
|
|
156
|
+
text: "Restoring the previous computer connection."
|
|
157
|
+
});
|
|
140
158
|
const previousOwnerUserId = normalizeOptionalString(recovery.previousSession?.user?.id);
|
|
141
159
|
if (!recovery.serviceReconciled) {
|
|
142
160
|
const stopped = await stopCurrentLaneDaemonServiceAfterToolsUpdate(input);
|
|
@@ -207,6 +225,11 @@ async function recoverInterruptedComputerAuthHandoff(input) {
|
|
|
207
225
|
transitionId: recovery.id
|
|
208
226
|
});
|
|
209
227
|
emitUnusedSetupSessionCleanupWarning(input.presenter, revoked.error);
|
|
228
|
+
emitComputerAuthHandoffRecoveryProgress(input, {
|
|
229
|
+
code: "setup.computer_handoff_recovery.deferred",
|
|
230
|
+
state: "failed",
|
|
231
|
+
text: "The previous computer connection has not been fully restored."
|
|
232
|
+
});
|
|
210
233
|
return "deferred";
|
|
211
234
|
}
|
|
212
235
|
await markInterruptedComputerAuthSessionRecovery({
|
|
@@ -214,7 +237,29 @@ async function recoverInterruptedComputerAuthHandoff(input) {
|
|
|
214
237
|
phase: "remote_session"
|
|
215
238
|
});
|
|
216
239
|
}
|
|
217
|
-
|
|
240
|
+
const completed = await completeInterruptedComputerAuthSessionRecovery(recovery.id);
|
|
241
|
+
emitComputerAuthHandoffRecoveryProgress(input, {
|
|
242
|
+
code: completed ? "setup.computer_handoff_recovery.completed" : "setup.computer_handoff_recovery.deferred",
|
|
243
|
+
state: completed ? "completed" : "failed",
|
|
244
|
+
text: completed ? "Restored the previous computer connection." : "The previous computer connection has not been fully restored."
|
|
245
|
+
});
|
|
246
|
+
return completed ? "completed" : "deferred";
|
|
247
|
+
}
|
|
248
|
+
function emitComputerAuthHandoffRecoveryProgress(input, progress) {
|
|
249
|
+
input.presenter.line({
|
|
250
|
+
code: progress.code,
|
|
251
|
+
text: progress.text,
|
|
252
|
+
data: {
|
|
253
|
+
phase: "restoring",
|
|
254
|
+
state: progress.state
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
try {
|
|
258
|
+
input.onProgress?.({
|
|
259
|
+
...progress,
|
|
260
|
+
phase: "restoring"
|
|
261
|
+
});
|
|
262
|
+
} catch {}
|
|
218
263
|
}
|
|
219
264
|
async function stopCurrentLaneDaemonServiceAfterToolsUpdate(input) {
|
|
220
265
|
let stopped = await bestEffortStopCurrentLaneDaemonService({ runtime: input.runtime });
|
|
@@ -3637,8 +3682,10 @@ function shouldForceSetupServiceRefresh() {
|
|
|
3637
3682
|
function resolveSetupServiceUpdateTruth(input) {
|
|
3638
3683
|
const operation = input.operation;
|
|
3639
3684
|
if (!operation) return { status: "ready" };
|
|
3685
|
+
const target = resolveOpenMeldToolsUpdateTargetVersions(operation);
|
|
3686
|
+
const currentInstallationSatisfiesTarget = input.currentServiceVerified === true && input.installedServiceVersion !== null && compareSemver(input.currentCliVersion, target.cliVersion) >= 0 && compareSemver(input.installedServiceVersion, target.serviceVersion) >= 0;
|
|
3640
3687
|
if (operation.phase === "restored" || operation.phase === "needs_help") {
|
|
3641
|
-
if (
|
|
3688
|
+
if (currentInstallationSatisfiesTarget) return { status: "ready" };
|
|
3642
3689
|
return {
|
|
3643
3690
|
message: "OpenMeld Service update failed. Run `openmeld service update`.",
|
|
3644
3691
|
status: "failed"
|
|
@@ -3648,8 +3695,7 @@ function resolveSetupServiceUpdateTruth(input) {
|
|
|
3648
3695
|
message: "OpenMeld Service is updating in the background. Setup will continue automatically when it finishes.",
|
|
3649
3696
|
status: "updating"
|
|
3650
3697
|
};
|
|
3651
|
-
if (
|
|
3652
|
-
if (input.currentServiceVerified && input.currentCliVersion === operation.targetVersion && input.installedServiceVersion === operation.targetVersion) return { status: "ready" };
|
|
3698
|
+
if (currentInstallationSatisfiesTarget) return { status: "ready" };
|
|
3653
3699
|
return {
|
|
3654
3700
|
message: "OpenMeld Service update could not be verified. Run `openmeld service update`.",
|
|
3655
3701
|
status: "verifying"
|
|
@@ -3659,7 +3705,7 @@ async function assertSetupServiceUpdateComplete(input = {}) {
|
|
|
3659
3705
|
const operation = await waitForOpenMeldToolsUpdateCompletion(input);
|
|
3660
3706
|
if (!operation) return;
|
|
3661
3707
|
const inventory = await inspectDaemonServiceInventory({
|
|
3662
|
-
expectedVersion:
|
|
3708
|
+
expectedVersion: await resolveCurrentDaemonExpectedVersion(resolveOpenMeldToolsUpdateTargetVersions(operation).serviceVersion),
|
|
3663
3709
|
intent: "status_cleanup"
|
|
3664
3710
|
});
|
|
3665
3711
|
const truth = resolveSetupServiceUpdateTruth({
|
|
@@ -3800,6 +3846,7 @@ async function runPrepareSessionExecutorOnce(input) {
|
|
|
3800
3846
|
emitHumanSection(input.input, "OpenMeld setup");
|
|
3801
3847
|
const connectionProgress = startPrepareProgressStep(input.input, {
|
|
3802
3848
|
code: "prepare.session.progress.connect_terminal",
|
|
3849
|
+
phase: "connecting_service",
|
|
3803
3850
|
text: "Connecting Terminal to OpenMeld Web..."
|
|
3804
3851
|
});
|
|
3805
3852
|
let stream = null;
|
|
@@ -3809,6 +3856,7 @@ async function runPrepareSessionExecutorOnce(input) {
|
|
|
3809
3856
|
opaqueToken: input.input.startSession,
|
|
3810
3857
|
prepareSessionId: input.initial.prepareSessionId
|
|
3811
3858
|
});
|
|
3859
|
+
input.input.connectedStream = stream;
|
|
3812
3860
|
const connected = await waitForSnapshotWithProgress({
|
|
3813
3861
|
input: input.input,
|
|
3814
3862
|
stream,
|
|
@@ -4024,6 +4072,7 @@ async function reportLocalAgentCatalogForSelection(input) {
|
|
|
4024
4072
|
emitHumanSection(input.input, "Local agents");
|
|
4025
4073
|
const progress = startPrepareProgressStep(input.input, {
|
|
4026
4074
|
code: "prepare.session.progress.local_agents",
|
|
4075
|
+
phase: "confirming",
|
|
4027
4076
|
text: "Checking local agents..."
|
|
4028
4077
|
});
|
|
4029
4078
|
const reconciliation = input.input.localAgentSelection ? null : await reconcileNewRunnableBuiltinAgentsForSetup();
|
|
@@ -4142,6 +4191,7 @@ async function executeSelectedAgentPreparation(input) {
|
|
|
4142
4191
|
async function runTerminalStep(input) {
|
|
4143
4192
|
const progress = startPrepareProgressStep(input.input, {
|
|
4144
4193
|
code: `prepare.session.progress.${input.stepId}`,
|
|
4194
|
+
phase: resolveTerminalStepProgressPhase(input.stepId),
|
|
4145
4195
|
text: input.message
|
|
4146
4196
|
});
|
|
4147
4197
|
const stepStartRevision = input.snapshot.sessionRevision;
|
|
@@ -4766,6 +4816,7 @@ async function waitForSnapshotWithProgress(input) {
|
|
|
4766
4816
|
}
|
|
4767
4817
|
progress = startPrepareProgressStep(input.input, {
|
|
4768
4818
|
code: "prepare.session.waiting",
|
|
4819
|
+
phase: "connecting_service",
|
|
4769
4820
|
text: input.waitingMessage
|
|
4770
4821
|
});
|
|
4771
4822
|
progressStartedByWait = true;
|
|
@@ -4814,6 +4865,10 @@ async function connectPrepareSessionStream(input) {
|
|
|
4814
4865
|
let closedError = null;
|
|
4815
4866
|
let stateWriteSent = false;
|
|
4816
4867
|
let pendingStepWriteFallbackFrame = null;
|
|
4868
|
+
let supportsConnectionProgress = false;
|
|
4869
|
+
const progressOperationId = crypto.randomUUID();
|
|
4870
|
+
const progressStartedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
4871
|
+
let progressSequence = 0;
|
|
4817
4872
|
const assertStreamOpen = () => {
|
|
4818
4873
|
if (closedError) throw closedError;
|
|
4819
4874
|
};
|
|
@@ -4850,6 +4905,10 @@ async function connectPrepareSessionStream(input) {
|
|
|
4850
4905
|
handleServerErrorFrame(frame.payload);
|
|
4851
4906
|
return;
|
|
4852
4907
|
}
|
|
4908
|
+
if (frame.type === "server.capabilities") {
|
|
4909
|
+
supportsConnectionProgress = frame.payload.connectionProgress === 1;
|
|
4910
|
+
return;
|
|
4911
|
+
}
|
|
4853
4912
|
if (frame.type !== "snapshot" && frame.type !== "snapshot_changed") return;
|
|
4854
4913
|
pendingStepWriteFallbackFrame = null;
|
|
4855
4914
|
const snapshot = frame.payload.snapshot;
|
|
@@ -4920,6 +4979,29 @@ async function connectPrepareSessionStream(input) {
|
|
|
4920
4979
|
}
|
|
4921
4980
|
});
|
|
4922
4981
|
},
|
|
4982
|
+
writeConnectionProgress: (progress) => {
|
|
4983
|
+
if (!supportsConnectionProgress) return;
|
|
4984
|
+
const snapshot = latestSnapshot;
|
|
4985
|
+
const connectionEpoch = snapshot?.terminalConnection.connectionEpoch;
|
|
4986
|
+
if (!(snapshot && connectionEpoch)) return;
|
|
4987
|
+
sendFrame({
|
|
4988
|
+
type: "terminal.connection_progress.write",
|
|
4989
|
+
payload: {
|
|
4990
|
+
schemaVersion: 1,
|
|
4991
|
+
operationId: progressOperationId,
|
|
4992
|
+
attemptId: progressOperationId,
|
|
4993
|
+
prepareSessionId: snapshot.prepareSessionId,
|
|
4994
|
+
connectionEpoch,
|
|
4995
|
+
sequence: progressSequence++,
|
|
4996
|
+
startedAt: progressStartedAt,
|
|
4997
|
+
observedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4998
|
+
phase: progress.phase,
|
|
4999
|
+
state: progress.state,
|
|
5000
|
+
code: progress.code,
|
|
5001
|
+
...progress.detail ? { detail: progress.detail.slice(0, 512) } : {}
|
|
5002
|
+
}
|
|
5003
|
+
});
|
|
5004
|
+
},
|
|
4923
5005
|
writeTerminalLocalAgentCatalog: (catalog) => {
|
|
4924
5006
|
if (!latestSnapshot) throw new Error("Setup session snapshot is not available yet.");
|
|
4925
5007
|
stateWriteSent = true;
|
|
@@ -5005,6 +5087,12 @@ function emitHumanSection(input, title) {
|
|
|
5005
5087
|
});
|
|
5006
5088
|
}
|
|
5007
5089
|
function emitPrepareProgressLine(input, progress) {
|
|
5090
|
+
writeConnectionProgressObservation(input, {
|
|
5091
|
+
code: progress.code ?? `prepare.session.progress.${progress.state}`,
|
|
5092
|
+
phase: progress.phase ?? "confirming",
|
|
5093
|
+
state: progress.state === "success" ? "completed" : "active",
|
|
5094
|
+
text: progress.text
|
|
5095
|
+
});
|
|
5008
5096
|
createPrepareProgressReporter(input).line({
|
|
5009
5097
|
code: progress.code ?? `prepare.session.progress.${progress.state}`,
|
|
5010
5098
|
data: progress.data,
|
|
@@ -5012,18 +5100,83 @@ function emitPrepareProgressLine(input, progress) {
|
|
|
5012
5100
|
text: progress.text
|
|
5013
5101
|
});
|
|
5014
5102
|
}
|
|
5015
|
-
function emitPrepareProgressDetail(input, text, code) {
|
|
5103
|
+
function emitPrepareProgressDetail(input, text, code, phase = "confirming") {
|
|
5104
|
+
writeConnectionProgressObservation(input, {
|
|
5105
|
+
code: code ?? "prepare.session.progress.detail",
|
|
5106
|
+
phase,
|
|
5107
|
+
state: "active",
|
|
5108
|
+
text
|
|
5109
|
+
});
|
|
5016
5110
|
createPrepareProgressReporter(input).detail({
|
|
5017
5111
|
code: code ?? "prepare.session.progress.detail",
|
|
5018
5112
|
text
|
|
5019
5113
|
});
|
|
5020
5114
|
}
|
|
5021
5115
|
function startPrepareProgressStep(input, progress) {
|
|
5022
|
-
|
|
5116
|
+
writeConnectionProgressObservation(input, {
|
|
5117
|
+
code: progress.code,
|
|
5118
|
+
phase: progress.phase,
|
|
5119
|
+
state: "active",
|
|
5120
|
+
text: progress.text
|
|
5121
|
+
});
|
|
5122
|
+
const handle = createPrepareProgressReporter(input).startStep({
|
|
5023
5123
|
code: progress.code,
|
|
5024
5124
|
data: progress.data,
|
|
5025
5125
|
text: progress.text
|
|
5026
5126
|
});
|
|
5127
|
+
return {
|
|
5128
|
+
cancel: handle.cancel,
|
|
5129
|
+
complete: (message) => {
|
|
5130
|
+
handle.complete(message);
|
|
5131
|
+
writeConnectionProgressObservation(input, {
|
|
5132
|
+
code: `${progress.code}.completed`,
|
|
5133
|
+
phase: progress.phase,
|
|
5134
|
+
state: "completed",
|
|
5135
|
+
text: message ?? progress.text
|
|
5136
|
+
});
|
|
5137
|
+
},
|
|
5138
|
+
detail: (detail) => {
|
|
5139
|
+
handle.detail(detail);
|
|
5140
|
+
writeConnectionProgressObservation(input, {
|
|
5141
|
+
code: detail.code ?? `${progress.code}.detail`,
|
|
5142
|
+
phase: progress.phase,
|
|
5143
|
+
state: "active",
|
|
5144
|
+
text: detail.text
|
|
5145
|
+
});
|
|
5146
|
+
},
|
|
5147
|
+
fail: (message) => {
|
|
5148
|
+
handle.fail(message);
|
|
5149
|
+
writeConnectionProgressObservation(input, {
|
|
5150
|
+
code: `${progress.code}.failed`,
|
|
5151
|
+
phase: "needs_attention",
|
|
5152
|
+
state: "failed",
|
|
5153
|
+
text: message ?? progress.text
|
|
5154
|
+
});
|
|
5155
|
+
}
|
|
5156
|
+
};
|
|
5157
|
+
}
|
|
5158
|
+
function writeConnectionProgressObservation(input, progress) {
|
|
5159
|
+
try {
|
|
5160
|
+
input.connectedStream?.writeConnectionProgress?.({
|
|
5161
|
+
code: progress.code,
|
|
5162
|
+
detail: progress.text,
|
|
5163
|
+
phase: progress.phase,
|
|
5164
|
+
state: progress.state
|
|
5165
|
+
});
|
|
5166
|
+
} catch {}
|
|
5167
|
+
}
|
|
5168
|
+
function resolveTerminalStepProgressPhase(stepId) {
|
|
5169
|
+
switch (stepId) {
|
|
5170
|
+
case "computer":
|
|
5171
|
+
case "connect_terminal":
|
|
5172
|
+
case "refresh_service": return "connecting_service";
|
|
5173
|
+
case "choose_local_agents":
|
|
5174
|
+
case "prepare_selected_agents":
|
|
5175
|
+
case "report_runtime":
|
|
5176
|
+
case "verify_setup": return "confirming";
|
|
5177
|
+
case "ready": return "connected";
|
|
5178
|
+
default: return "connecting_service";
|
|
5179
|
+
}
|
|
5027
5180
|
}
|
|
5028
5181
|
function createPrepareProgressReporter(input) {
|
|
5029
5182
|
return createSetupProgressReporter({
|
|
@@ -5095,4 +5248,4 @@ function errorFromPrepareSessionServerError(input) {
|
|
|
5095
5248
|
//#endregion
|
|
5096
5249
|
export { mintPrepareSessionReconnectToken as A, buildNoLocalAgentsNoticeLines as C, recoverInterruptedComputerAuthHandoff as D, formatComputerAuthCleanupFailureSuffix as E, exchangeComputerAuthorizationGrant as O, buildLocalAgentsGuideUrl as S, emitUnusedSetupSessionCleanupWarning as T, runStartLocalAgentsEnable as _, assertSetupServiceUpdateComplete as a, submitSelectedAgentControllerReports as b, collectObservedDeviceMetadata as c, collectStartLocalReadiness as d, runSkillsCheck as f, runSkillsUpdate as g, runSkillsUninstall as h, runPrepareSessionExecutor as i, writePrepareSessionSetupBootstrapResult as j, revokePreparedAuthSession as k, createSetupProgressReporter as l, runSkillsInstall as m, reportPrepareHandoffStopped as n, shouldForceSetupServiceRefresh as o, runSkillsEnsure as p, resolvePrepareSessionForHandoff as r, syncLocalSetupCurrentDeviceTargetFromServiceContract as s, connectPrepareSessionStream as t, resolveControllingTerminalSession as u, isCliOutputHandledError as v, confirmContinueWithoutLocalAgents as w, appendLocalAgentsGuideUrl as x, assertSelectedAgentControllerReportSubmissionsAccepted as y };
|
|
5097
5250
|
|
|
5098
|
-
//# sourceMappingURL=prepare-session-executor-
|
|
5251
|
+
//# sourceMappingURL=prepare-session-executor-Cfm3EvXl.js.map
|