openmeld 0.3.220 → 0.3.221

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 (68) hide show
  1. package/dist/{add-me-membership-GzOoooxS.js → add-me-membership-DpckwGof.js} +2 -2
  2. package/dist/{add-me-membership-GzOoooxS.js.map → add-me-membership-DpckwGof.js.map} +1 -1
  3. package/dist/{agents-C8ATowD6.js → agents-2TzCubpV.js} +7 -7
  4. package/dist/{agents-C8ATowD6.js.map → agents-2TzCubpV.js.map} +1 -1
  5. package/dist/{api-client-foundation-Dv2OE-Pi.js → api-client-foundation-CGImd4c8.js} +1 -1
  6. package/dist/{api-client-foundation-CDlVc0zT.js → api-client-foundation-D-Cb6EVg.js} +2 -2
  7. package/dist/{api-client-foundation-CDlVc0zT.js.map → api-client-foundation-D-Cb6EVg.js.map} +1 -1
  8. package/dist/{cli-space-api-skevaFSC.js → cli-space-api-B2l1xMPn.js} +4 -4
  9. package/dist/{cli-space-api-skevaFSC.js.map → cli-space-api-B2l1xMPn.js.map} +1 -1
  10. package/dist/{command-CmlgCUU2.js → command-MlrjQYq5.js} +11 -11
  11. package/dist/{command-CmlgCUU2.js.map → command-MlrjQYq5.js.map} +1 -1
  12. package/dist/{computer-connection-review-Bjyn3UbU.js → computer-connection-review-mO6vn3C3.js} +2 -2
  13. package/dist/{computer-connection-review-Bjyn3UbU.js.map → computer-connection-review-mO6vn3C3.js.map} +1 -1
  14. package/dist/{computer-disconnect-CRWsoihu.js → computer-disconnect-CLtQwKDS.js} +3 -3
  15. package/dist/{computer-disconnect-CRWsoihu.js.map → computer-disconnect-CLtQwKDS.js.map} +1 -1
  16. package/dist/{computer-setup-continuation-D0kC6-l2.js → computer-setup-continuation-PVwPXc5i.js} +2 -2
  17. package/dist/{computer-setup-continuation-D0kC6-l2.js.map → computer-setup-continuation-PVwPXc5i.js.map} +1 -1
  18. package/dist/{daemon-frame-transport-E-H3DjWA.js → daemon-frame-transport-D-4StENt.js} +3 -3
  19. package/dist/{daemon-frame-transport-E-H3DjWA.js.map → daemon-frame-transport-D-4StENt.js.map} +1 -1
  20. package/dist/{daemon-lifecycle-journal-DDrWgEzN.js → daemon-lifecycle-journal-DcrVY0xb.js} +2 -2
  21. package/dist/{daemon-lifecycle-journal-DDrWgEzN.js.map → daemon-lifecycle-journal-DcrVY0xb.js.map} +1 -1
  22. package/dist/{daemon-service-runtime-M-kfrWro.js → daemon-service-runtime-Kr6Bs2J2.js} +2 -2
  23. package/dist/{daemon-service-runtime-M-kfrWro.js.map → daemon-service-runtime-Kr6Bs2J2.js.map} +1 -1
  24. package/dist/{daemon-service-update-coordinator-Clqxj3A1.js → daemon-service-update-coordinator-RJO997me.js} +6 -6
  25. package/dist/{daemon-service-update-coordinator-Clqxj3A1.js.map → daemon-service-update-coordinator-RJO997me.js.map} +1 -1
  26. package/dist/{dist-kTVDInkZ.js → dist-B6VsppM7.js} +1 -1
  27. package/dist/{dist-YPzkhLLp.js → dist-BewA9srP.js} +17 -3
  28. package/dist/dist-BewA9srP.js.map +1 -0
  29. package/dist/{elapsed-time-4PuBjDUi.js → elapsed-time-Cw6b9rYy.js} +4 -4
  30. package/dist/{elapsed-time-4PuBjDUi.js.map → elapsed-time-Cw6b9rYy.js.map} +1 -1
  31. package/dist/{entry-q_QHht2-.js → entry-BE8uqbkD.js} +2 -2
  32. package/dist/{entry-q_QHht2-.js.map → entry-BE8uqbkD.js.map} +1 -1
  33. package/dist/{installation-inventory-CuPmLaLZ.js → installation-inventory-Dwn8FoKT.js} +3 -3
  34. package/dist/{installation-inventory-CuPmLaLZ.js.map → installation-inventory-Dwn8FoKT.js.map} +1 -1
  35. package/dist/{installer-mSB-Oiwx.js → installer-CsQ4vNjT.js} +2 -2
  36. package/dist/{installer-mSB-Oiwx.js.map → installer-CsQ4vNjT.js.map} +1 -1
  37. package/dist/{openmeld-CFXnmBH6.js → openmeld-Tkp17vPg.js} +24 -24
  38. package/dist/{openmeld-CFXnmBH6.js.map → openmeld-Tkp17vPg.js.map} +1 -1
  39. package/dist/{openmeld-maintenance-worker-K-nEox6k.js → openmeld-maintenance-worker-C1J_ISOh.js} +9 -9
  40. package/dist/{openmeld-maintenance-worker-K-nEox6k.js.map → openmeld-maintenance-worker-C1J_ISOh.js.map} +1 -1
  41. package/dist/{openmeld-tools-update-join-CN4mjp4-.js → openmeld-tools-update-join-ZLpRTHO3.js} +4 -4
  42. package/dist/{openmeld-tools-update-join-CN4mjp4-.js.map → openmeld-tools-update-join-ZLpRTHO3.js.map} +1 -1
  43. package/dist/openmeld.js +4 -4
  44. package/dist/{prepare-provider-runtime-iA3g-8MS.js → prepare-provider-runtime-CD5ZI-ct.js} +6 -6
  45. package/dist/{prepare-provider-runtime-iA3g-8MS.js.map → prepare-provider-runtime-CD5ZI-ct.js.map} +1 -1
  46. package/dist/{prepare-session-executor-DbewUeyQ.js → prepare-session-executor-C2nNM2yb.js} +15 -15
  47. package/dist/{prepare-session-executor-DbewUeyQ.js.map → prepare-session-executor-C2nNM2yb.js.map} +1 -1
  48. package/dist/{runtime-D_AGEH9G.js → runtime-DMYoB5_x.js} +11 -11
  49. package/dist/{runtime-D_AGEH9G.js.map → runtime-DMYoB5_x.js.map} +1 -1
  50. package/dist/{runtime-agent-controller-reporting-submission-CB25cpq0.js → runtime-agent-controller-reporting-submission-DGm8O4q_.js} +5 -5
  51. package/dist/{runtime-agent-controller-reporting-submission-CB25cpq0.js.map → runtime-agent-controller-reporting-submission-DGm8O4q_.js.map} +1 -1
  52. package/dist/{runtime-reporting-health-state-205lHdBE.js → runtime-reporting-health-state-BWZgy4pF.js} +6 -6
  53. package/dist/{runtime-reporting-health-state-205lHdBE.js.map → runtime-reporting-health-state-BWZgy4pF.js.map} +1 -1
  54. package/dist/{service-yziCG6lR.js → service-C72KhNft.js} +11 -11
  55. package/dist/{service-yziCG6lR.js.map → service-C72KhNft.js.map} +1 -1
  56. package/dist/{service-account-control-BQ1e5Y1X.js → service-account-control-DZjUR3I_.js} +5 -5
  57. package/dist/{service-account-control-BQ1e5Y1X.js.map → service-account-control-DZjUR3I_.js.map} +1 -1
  58. package/dist/{service-control-capabilities-C4520NIi.js → service-control-capabilities-C2MF5FUD.js} +3 -3
  59. package/dist/{service-control-capabilities-C4520NIi.js.map → service-control-capabilities-C2MF5FUD.js.map} +1 -1
  60. package/dist/{service-control-capabilities-DPYmrWgX.js → service-control-capabilities-Y4CGrchz.js} +1 -1
  61. package/dist/{state-DLMkZqd8.js → state-CK1WXIsI.js} +2 -2
  62. package/dist/{state-DLMkZqd8.js.map → state-CK1WXIsI.js.map} +1 -1
  63. package/dist/{upgrade-BmM1hEB3.js → upgrade-BTIKVek7.js} +6 -6
  64. package/dist/{upgrade-BmM1hEB3.js.map → upgrade-BTIKVek7.js.map} +1 -1
  65. package/dist/upgrade-DTB0ZmxI.js +4 -0
  66. package/package.json +11 -11
  67. package/dist/dist-YPzkhLLp.js.map +0 -1
  68. package/dist/upgrade-neqPXWyw.js +0 -4
@@ -4,7 +4,7 @@ import { d as getAuthSessionState, o as buildStoredAuthSessionIdentity, u as get
4
4
  import { n as computerConnectionReviewSchema } from "./computer-connection-DYnof5Xw.js";
5
5
  import { i as readDaemonServiceContract } from "./daemon-service-contract-BpOBMGX0.js";
6
6
  import { n as resolveServiceAccountIdentity } from "./service-account-authorization-DAPQy2yP.js";
7
- import { t as readServiceControlCapabilities } from "./service-control-capabilities-C4520NIi.js";
7
+ import { t as readServiceControlCapabilities } from "./service-control-capabilities-C2MF5FUD.js";
8
8
  //#region src/commands/computer-connection-review.ts
9
9
  /** Display evidence only. Auth and Service owners validate an existing connection. */
10
10
  async function readComputerConnectionReview() {
@@ -36,4 +36,4 @@ async function readComputerConnectionReview() {
36
36
  //#endregion
37
37
  export { readComputerConnectionReview };
38
38
 
39
- //# sourceMappingURL=computer-connection-review-Bjyn3UbU.js.map
39
+ //# sourceMappingURL=computer-connection-review-mO6vn3C3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer-connection-review-Bjyn3UbU.js","names":[],"sources":["../src/commands/computer-connection-review.ts"],"sourcesContent":["import { computerConnectionReviewSchema } from \"@openmeld/schemas\";\nimport {\n buildStoredAuthSessionIdentity,\n getAuthSessionMetadata,\n getAuthSessionState,\n} from \"../config/auth-session\";\nimport { readDaemonServiceContract } from \"../config/daemon-service-contract\";\nimport { resolveServiceAccountIdentity } from \"../local-service/lifecycle/service-account-authorization\";\nimport { readServiceControlCapabilities } from \"./service-control-capabilities\";\n\n/** Display evidence only. Auth and Service owners validate an existing connection. */\nexport async function readComputerConnectionReview() {\n const session = await getAuthSessionMetadata();\n if (session && !session.user?.id) {\n throw new Error(\n \"The computer account cannot be identified. Review its sign-in before connecting.\"\n );\n }\n let existingConnection: ReturnType<\n typeof computerConnectionReviewSchema.parse\n >[\"existingConnection\"] = null;\n const contract = await readDaemonServiceContract();\n if (session && contract && contract.ownerUserId === session.user?.id) {\n const auth = await getAuthSessionState({ validateRemote: true });\n if (auth.state === \"valid\" && auth.session) {\n const identity = await resolveServiceAccountIdentity(\n auth.session,\n contract\n );\n const capabilities = await readServiceControlCapabilities();\n if (capabilities.stop && capabilities.deviceId === identity.deviceId) {\n existingConnection = {\n deviceId: identity.deviceId,\n runtimeLane: identity.lane,\n };\n }\n }\n }\n return computerConnectionReviewSchema.parse({\n protocol: \"computer-connection-v1\",\n previousSessionIdentity: buildStoredAuthSessionIdentity(session),\n account: session\n ? { id: session.user?.id, email: session.user?.email ?? null }\n : null,\n existingConnection,\n });\n}\n"],"mappings":";;;;;;;;;AAWA,eAAsB,+BAA+B;CACnD,MAAM,UAAU,MAAM,uBAAuB;CAC7C,IAAI,WAAW,CAAC,QAAQ,MAAM,IAC5B,MAAM,IAAI,MACR,kFACF;CAEF,IAAI,qBAEsB;CAC1B,MAAM,WAAW,MAAM,0BAA0B;CACjD,IAAI,WAAW,YAAY,SAAS,gBAAgB,QAAQ,MAAM,IAAI;EACpE,MAAM,OAAO,MAAM,oBAAoB,EAAE,gBAAgB,KAAK,CAAC;EAC/D,IAAI,KAAK,UAAU,WAAW,KAAK,SAAS;GAC1C,MAAM,WAAW,MAAM,8BACrB,KAAK,SACL,QACF;GACA,MAAM,eAAe,MAAM,+BAA+B;GAC1D,IAAI,aAAa,QAAQ,aAAa,aAAa,SAAS,UAC1D,qBAAqB;IACnB,UAAU,SAAS;IACnB,aAAa,SAAS;GACxB;EAEJ;CACF;CACA,OAAO,+BAA+B,MAAM;EAC1C,UAAU;EACV,yBAAyB,+BAA+B,OAAO;EAC/D,SAAS,UACL;GAAE,IAAI,QAAQ,MAAM;GAAI,OAAO,QAAQ,MAAM,SAAS;EAAK,IAC3D;EACJ;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"computer-connection-review-mO6vn3C3.js","names":[],"sources":["../src/commands/computer-connection-review.ts"],"sourcesContent":["import { computerConnectionReviewSchema } from \"@openmeld/schemas\";\nimport {\n buildStoredAuthSessionIdentity,\n getAuthSessionMetadata,\n getAuthSessionState,\n} from \"../config/auth-session\";\nimport { readDaemonServiceContract } from \"../config/daemon-service-contract\";\nimport { resolveServiceAccountIdentity } from \"../local-service/lifecycle/service-account-authorization\";\nimport { readServiceControlCapabilities } from \"./service-control-capabilities\";\n\n/** Display evidence only. Auth and Service owners validate an existing connection. */\nexport async function readComputerConnectionReview() {\n const session = await getAuthSessionMetadata();\n if (session && !session.user?.id) {\n throw new Error(\n \"The computer account cannot be identified. Review its sign-in before connecting.\"\n );\n }\n let existingConnection: ReturnType<\n typeof computerConnectionReviewSchema.parse\n >[\"existingConnection\"] = null;\n const contract = await readDaemonServiceContract();\n if (session && contract && contract.ownerUserId === session.user?.id) {\n const auth = await getAuthSessionState({ validateRemote: true });\n if (auth.state === \"valid\" && auth.session) {\n const identity = await resolveServiceAccountIdentity(\n auth.session,\n contract\n );\n const capabilities = await readServiceControlCapabilities();\n if (capabilities.stop && capabilities.deviceId === identity.deviceId) {\n existingConnection = {\n deviceId: identity.deviceId,\n runtimeLane: identity.lane,\n };\n }\n }\n }\n return computerConnectionReviewSchema.parse({\n protocol: \"computer-connection-v1\",\n previousSessionIdentity: buildStoredAuthSessionIdentity(session),\n account: session\n ? { id: session.user?.id, email: session.user?.email ?? null }\n : null,\n existingConnection,\n });\n}\n"],"mappings":";;;;;;;;;AAWA,eAAsB,+BAA+B;CACnD,MAAM,UAAU,MAAM,uBAAuB;CAC7C,IAAI,WAAW,CAAC,QAAQ,MAAM,IAC5B,MAAM,IAAI,MACR,kFACF;CAEF,IAAI,qBAEsB;CAC1B,MAAM,WAAW,MAAM,0BAA0B;CACjD,IAAI,WAAW,YAAY,SAAS,gBAAgB,QAAQ,MAAM,IAAI;EACpE,MAAM,OAAO,MAAM,oBAAoB,EAAE,gBAAgB,KAAK,CAAC;EAC/D,IAAI,KAAK,UAAU,WAAW,KAAK,SAAS;GAC1C,MAAM,WAAW,MAAM,8BACrB,KAAK,SACL,QACF;GACA,MAAM,eAAe,MAAM,+BAA+B;GAC1D,IAAI,aAAa,QAAQ,aAAa,aAAa,SAAS,UAC1D,qBAAqB;IACnB,UAAU,SAAS;IACnB,aAAa,SAAS;GACxB;EAEJ;CACF;CACA,OAAO,+BAA+B,MAAM;EAC1C,UAAU;EACV,yBAAyB,+BAA+B,OAAO;EAC/D,SAAS,UACL;GAAE,IAAI,QAAQ,MAAM;GAAI,OAAO,QAAQ,MAAM,SAAS;EAAK,IAC3D;EACJ;CACF,CAAC;AACH"}
@@ -2,13 +2,13 @@
2
2
 
3
3
  import { l as getAuthSession, o as buildStoredAuthSessionIdentity, s as clearAuthSession, u as getAuthSessionMetadata } from "./auth-session-CDhQANWx.js";
4
4
  import { t as computerConnectionIntentSchema } from "./computer-connection-DYnof5Xw.js";
5
- import { r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-M-kfrWro.js";
5
+ import { r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-Kr6Bs2J2.js";
6
6
  import { K as withDaemonServiceRunLock } from "./daemon-state-B44aq2nm.js";
7
7
  import { i as readDaemonServiceContract } from "./daemon-service-contract-BpOBMGX0.js";
8
8
  import { n as resolveServiceAccountIdentity } from "./service-account-authorization-DAPQy2yP.js";
9
9
  import { n as resolveRuntimeContext } from "./context-D9Ebb5wl.js";
10
10
  import { t as createPresenter } from "./presenter-BcxiQyJg.js";
11
- import { t as runServiceAccountControl } from "./service-account-control-BQ1e5Y1X.js";
11
+ import { t as runServiceAccountControl } from "./service-account-control-DZjUR3I_.js";
12
12
  //#region src/commands/computer-disconnect.ts
13
13
  async function runComputerDisconnect(request, view) {
14
14
  const presenter = createPresenter(await resolveRuntimeContext({ view }));
@@ -45,4 +45,4 @@ async function disconnectComputer(request) {
45
45
  //#endregion
46
46
  export { runComputerDisconnect };
47
47
 
48
- //# sourceMappingURL=computer-disconnect-CRWsoihu.js.map
48
+ //# sourceMappingURL=computer-disconnect-CLtQwKDS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer-disconnect-CRWsoihu.js","names":[],"sources":["../src/commands/computer-disconnect.ts"],"sourcesContent":["import {\n type ComputerConnectionIntent,\n computerConnectionIntentSchema,\n} from \"@openmeld/schemas\";\nimport {\n buildStoredAuthSessionIdentity,\n clearAuthSession,\n getAuthSession,\n getAuthSessionMetadata,\n} from \"../config/auth-session\";\nimport { readDaemonServiceContract } from \"../config/daemon-service-contract\";\nimport { withDaemonServiceRunLock } from \"../config/daemon-state\";\nimport { readCurrentDaemonRuntimeContext } from \"../local-service/lifecycle/daemon-service-runtime\";\nimport { resolveServiceAccountIdentity } from \"../local-service/lifecycle/service-account-authorization\";\nimport { resolveRuntimeContext } from \"../runtime/context\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport { runServiceAccountControl } from \"./service-account-control\";\n\nexport async function runComputerDisconnect(\n request: ComputerConnectionIntent,\n view?: string\n) {\n const presenter = createPresenter(await resolveRuntimeContext({ view }));\n presenter.line({\n code: \"computer.disconnect.started\",\n text: \"Stopping OpenMeld Service…\",\n data: { state: \"started\" },\n });\n await disconnectComputer(request);\n presenter.line({\n code: \"computer.disconnected\",\n text: \"This computer is disconnected. Its record is still in your account.\",\n });\n}\n\n// Disconnect ends this Mac's local account connection. Forget remains the\n// separate cloud operation that removes the account's Computer record.\nexport async function disconnectComputer(\n request: ComputerConnectionIntent\n): Promise<void> {\n const intent = computerConnectionIntentSchema.parse(request);\n const session = await getAuthSessionMetadata();\n if (\n !session ||\n session.user?.id !== intent.expectedAccount ||\n buildStoredAuthSessionIdentity(session) !== intent.previousSessionIdentity\n ) {\n throw new Error(\n \"The computer sign-in changed. Review its connection before disconnecting.\"\n );\n }\n // The existing admission owner rechecks account, process and generation,\n // drains active work, and disables automatic startup. Never use an unscoped Stop.\n await withDaemonServiceRunLock(async () => {\n const contract = await readDaemonServiceContract();\n const runtime = await readCurrentDaemonRuntimeContext();\n if (contract?.desiredState === \"stopped\") {\n const current = await getAuthSession();\n if (!current) {\n throw new Error(\"Review this computer's sign-in before disconnecting.\");\n }\n await resolveServiceAccountIdentity(current, contract);\n }\n // A retry may follow an acknowledged Stop and a failed credential cleanup.\n // Only the owner's explicit stopped intent can skip another Stop.\n if (\n !(\n contract?.ownerUserId === intent.expectedAccount &&\n contract.desiredState === \"stopped\" &&\n runtime.effectiveRuntimeStatus === \"not_running\"\n )\n ) {\n await runServiceAccountControl(\n {\n operation: \"stop\",\n expectedAccount: intent.expectedAccount,\n },\n intent.previousSessionIdentity\n );\n }\n // Hold the existing lifecycle lock through cleanup so Start cannot race it.\n // A concurrent sign-in after Stop must never be cleared by this operation.\n await clearAuthSession(session);\n });\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,eAAsB,sBACpB,SACA,MACA;CACA,MAAM,YAAY,gBAAgB,MAAM,sBAAsB,EAAE,KAAK,CAAC,CAAC;CACvE,UAAU,KAAK;EACb,MAAM;EACN,MAAM;EACN,MAAM,EAAE,OAAO,UAAU;CAC3B,CAAC;CACD,MAAM,mBAAmB,OAAO;CAChC,UAAU,KAAK;EACb,MAAM;EACN,MAAM;CACR,CAAC;AACH;AAIA,eAAsB,mBACpB,SACe;CACf,MAAM,SAAS,+BAA+B,MAAM,OAAO;CAC3D,MAAM,UAAU,MAAM,uBAAuB;CAC7C,IACE,CAAC,WACD,QAAQ,MAAM,OAAO,OAAO,mBAC5B,+BAA+B,OAAO,MAAM,OAAO,yBAEnD,MAAM,IAAI,MACR,2EACF;CAIF,MAAM,yBAAyB,YAAY;EACzC,MAAM,WAAW,MAAM,0BAA0B;EACjD,MAAM,UAAU,MAAM,gCAAgC;EACtD,IAAI,UAAU,iBAAiB,WAAW;GACxC,MAAM,UAAU,MAAM,eAAe;GACrC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,sDAAsD;GAExE,MAAM,8BAA8B,SAAS,QAAQ;EACvD;EAGA,IACE,EACE,UAAU,gBAAgB,OAAO,mBACjC,SAAS,iBAAiB,aAC1B,QAAQ,2BAA2B,gBAGrC,MAAM,yBACJ;GACE,WAAW;GACX,iBAAiB,OAAO;EAC1B,GACA,OAAO,uBACT;EAIF,MAAM,iBAAiB,OAAO;CAChC,CAAC;AACH"}
1
+ {"version":3,"file":"computer-disconnect-CLtQwKDS.js","names":[],"sources":["../src/commands/computer-disconnect.ts"],"sourcesContent":["import {\n type ComputerConnectionIntent,\n computerConnectionIntentSchema,\n} from \"@openmeld/schemas\";\nimport {\n buildStoredAuthSessionIdentity,\n clearAuthSession,\n getAuthSession,\n getAuthSessionMetadata,\n} from \"../config/auth-session\";\nimport { readDaemonServiceContract } from \"../config/daemon-service-contract\";\nimport { withDaemonServiceRunLock } from \"../config/daemon-state\";\nimport { readCurrentDaemonRuntimeContext } from \"../local-service/lifecycle/daemon-service-runtime\";\nimport { resolveServiceAccountIdentity } from \"../local-service/lifecycle/service-account-authorization\";\nimport { resolveRuntimeContext } from \"../runtime/context\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport { runServiceAccountControl } from \"./service-account-control\";\n\nexport async function runComputerDisconnect(\n request: ComputerConnectionIntent,\n view?: string\n) {\n const presenter = createPresenter(await resolveRuntimeContext({ view }));\n presenter.line({\n code: \"computer.disconnect.started\",\n text: \"Stopping OpenMeld Service…\",\n data: { state: \"started\" },\n });\n await disconnectComputer(request);\n presenter.line({\n code: \"computer.disconnected\",\n text: \"This computer is disconnected. Its record is still in your account.\",\n });\n}\n\n// Disconnect ends this Mac's local account connection. Forget remains the\n// separate cloud operation that removes the account's Computer record.\nexport async function disconnectComputer(\n request: ComputerConnectionIntent\n): Promise<void> {\n const intent = computerConnectionIntentSchema.parse(request);\n const session = await getAuthSessionMetadata();\n if (\n !session ||\n session.user?.id !== intent.expectedAccount ||\n buildStoredAuthSessionIdentity(session) !== intent.previousSessionIdentity\n ) {\n throw new Error(\n \"The computer sign-in changed. Review its connection before disconnecting.\"\n );\n }\n // The existing admission owner rechecks account, process and generation,\n // drains active work, and disables automatic startup. Never use an unscoped Stop.\n await withDaemonServiceRunLock(async () => {\n const contract = await readDaemonServiceContract();\n const runtime = await readCurrentDaemonRuntimeContext();\n if (contract?.desiredState === \"stopped\") {\n const current = await getAuthSession();\n if (!current) {\n throw new Error(\"Review this computer's sign-in before disconnecting.\");\n }\n await resolveServiceAccountIdentity(current, contract);\n }\n // A retry may follow an acknowledged Stop and a failed credential cleanup.\n // Only the owner's explicit stopped intent can skip another Stop.\n if (\n !(\n contract?.ownerUserId === intent.expectedAccount &&\n contract.desiredState === \"stopped\" &&\n runtime.effectiveRuntimeStatus === \"not_running\"\n )\n ) {\n await runServiceAccountControl(\n {\n operation: \"stop\",\n expectedAccount: intent.expectedAccount,\n },\n intent.previousSessionIdentity\n );\n }\n // Hold the existing lifecycle lock through cleanup so Start cannot race it.\n // A concurrent sign-in after Stop must never be cleared by this operation.\n await clearAuthSession(session);\n });\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,eAAsB,sBACpB,SACA,MACA;CACA,MAAM,YAAY,gBAAgB,MAAM,sBAAsB,EAAE,KAAK,CAAC,CAAC;CACvE,UAAU,KAAK;EACb,MAAM;EACN,MAAM;EACN,MAAM,EAAE,OAAO,UAAU;CAC3B,CAAC;CACD,MAAM,mBAAmB,OAAO;CAChC,UAAU,KAAK;EACb,MAAM;EACN,MAAM;CACR,CAAC;AACH;AAIA,eAAsB,mBACpB,SACe;CACf,MAAM,SAAS,+BAA+B,MAAM,OAAO;CAC3D,MAAM,UAAU,MAAM,uBAAuB;CAC7C,IACE,CAAC,WACD,QAAQ,MAAM,OAAO,OAAO,mBAC5B,+BAA+B,OAAO,MAAM,OAAO,yBAEnD,MAAM,IAAI,MACR,2EACF;CAIF,MAAM,yBAAyB,YAAY;EACzC,MAAM,WAAW,MAAM,0BAA0B;EACjD,MAAM,UAAU,MAAM,gCAAgC;EACtD,IAAI,UAAU,iBAAiB,WAAW;GACxC,MAAM,UAAU,MAAM,eAAe;GACrC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,sDAAsD;GAExE,MAAM,8BAA8B,SAAS,QAAQ;EACvD;EAGA,IACE,EACE,UAAU,gBAAgB,OAAO,mBACjC,SAAS,iBAAiB,aAC1B,QAAQ,2BAA2B,gBAGrC,MAAM,yBACJ;GACE,WAAW;GACX,iBAAiB,OAAO;EAC1B,GACA,OAAO,uBACT;EAIF,MAAM,iBAAiB,OAAO;CAChC,CAAC;AACH"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { m as hasPendingComputerSetupContinuation, x as resumeInterruptedComputerSetup } from "./auth-session-CDhQANWx.js";
4
4
  import { t as createPresenter } from "./presenter-BcxiQyJg.js";
5
- import { A as mintPrepareSessionReconnectToken, D as recoverInterruptedComputerAuthHandoff, i as runPrepareSessionExecutor } from "./prepare-session-executor-DbewUeyQ.js";
5
+ import { A as mintPrepareSessionReconnectToken, D as recoverInterruptedComputerAuthHandoff, i as runPrepareSessionExecutor } from "./prepare-session-executor-C2nNM2yb.js";
6
6
  import { setTimeout } from "node:timers/promises";
7
7
  //#region src/commands/computer-setup-continuation.ts
8
8
  const runtime = {
@@ -39,4 +39,4 @@ async function recoverComputerSetupAfterBackgroundUpdate() {
39
39
  //#endregion
40
40
  export { finishComputerSetupAfterBackgroundUpdate, recoverComputerSetupAfterBackgroundUpdate };
41
41
 
42
- //# sourceMappingURL=computer-setup-continuation-D0kC6-l2.js.map
42
+ //# sourceMappingURL=computer-setup-continuation-PVwPXc5i.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer-setup-continuation-D0kC6-l2.js","names":["sleep"],"sources":["../src/commands/computer-setup-continuation.ts"],"sourcesContent":["import { setTimeout as sleep } from \"node:timers/promises\";\nimport {\n hasPendingComputerSetupContinuation,\n resumeInterruptedComputerSetup,\n} from \"../config/auth-session\";\nimport { mintPrepareSessionReconnectToken } from \"../config/prepare-session-api\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport type { RuntimeContext } from \"../runtime/types\";\nimport { recoverInterruptedComputerAuthHandoff } from \"./computer-auth-handoff-recovery\";\nimport { runPrepareSessionExecutor } from \"./prepare-session-executor\";\n\nconst runtime: RuntimeContext = {\n interactive: false,\n resolvedView: \"agent\",\n viewMode: \"agent\",\n};\n\n// Called only by the existing OS-owned maintenance worker after its update.\n// The live Terminal keeps ownership. If it exits, continue the same Core\n// Prepare session using the existing auth journal, not a second setup plan.\nexport async function finishComputerSetupAfterBackgroundUpdate(): Promise<void> {\n while (await hasPendingComputerSetupContinuation()) {\n const resumed = await resumeInterruptedComputerSetup(\n async (continuation) => {\n const { snapshot, opaqueToken } =\n await mintPrepareSessionReconnectToken({\n baseUrl: continuation.gatewayUrl,\n prepareSessionId: continuation.prepareSessionId,\n });\n if (\n snapshot.lifecycleStatus !== \"active\" &&\n snapshot.lifecycleStatus !== \"completed\"\n ) {\n return \"not_completed\";\n }\n const result = await runPrepareSessionExecutor({\n gatewayUrl: continuation.gatewayUrl,\n initialSnapshot: snapshot,\n interactive: false,\n localAgentSelection: continuation.localAgentSelection,\n presenter: createPresenter(runtime),\n runtime,\n startSession: opaqueToken,\n view: \"agent\",\n });\n return result.status;\n }\n );\n if (!resumed) {\n await sleep(500);\n }\n }\n}\n\n// Run after the completed update has released its pending job. Account rollback\n// uses the existing handoff recovery, which itself waits for active updates.\nexport async function recoverComputerSetupAfterBackgroundUpdate(): Promise<void> {\n await recoverInterruptedComputerAuthHandoff({\n presenter: createPresenter(runtime),\n runtime,\n view: \"agent\",\n });\n}\n"],"mappings":";;;;;;;AAWA,MAAM,UAA0B;CAC9B,aAAa;CACb,cAAc;CACd,UAAU;AACZ;AAKA,eAAsB,2CAA0D;CAC9E,OAAO,MAAM,oCAAoC,GA2B/C,IAAI,CAAC,MA1BiB,+BACpB,OAAO,iBAAiB;EACtB,MAAM,EAAE,UAAU,gBAChB,MAAM,iCAAiC;GACrC,SAAS,aAAa;GACtB,kBAAkB,aAAa;EACjC,CAAC;EACH,IACE,SAAS,oBAAoB,YAC7B,SAAS,oBAAoB,aAE7B,OAAO;EAYT,QAAO,MAVc,0BAA0B;GAC7C,YAAY,aAAa;GACzB,iBAAiB;GACjB,aAAa;GACb,qBAAqB,aAAa;GAClC,WAAW,gBAAgB,OAAO;GAClC;GACA,cAAc;GACd,MAAM;EACR,CAAC,EAAA,CACa;CAChB,CACF,GAEE,MAAMA,WAAM,GAAG;AAGrB;AAIA,eAAsB,4CAA2D;CAC/E,MAAM,sCAAsC;EAC1C,WAAW,gBAAgB,OAAO;EAClC;EACA,MAAM;CACR,CAAC;AACH"}
1
+ {"version":3,"file":"computer-setup-continuation-PVwPXc5i.js","names":["sleep"],"sources":["../src/commands/computer-setup-continuation.ts"],"sourcesContent":["import { setTimeout as sleep } from \"node:timers/promises\";\nimport {\n hasPendingComputerSetupContinuation,\n resumeInterruptedComputerSetup,\n} from \"../config/auth-session\";\nimport { mintPrepareSessionReconnectToken } from \"../config/prepare-session-api\";\nimport { createPresenter } from \"../runtime/presenter/index\";\nimport type { RuntimeContext } from \"../runtime/types\";\nimport { recoverInterruptedComputerAuthHandoff } from \"./computer-auth-handoff-recovery\";\nimport { runPrepareSessionExecutor } from \"./prepare-session-executor\";\n\nconst runtime: RuntimeContext = {\n interactive: false,\n resolvedView: \"agent\",\n viewMode: \"agent\",\n};\n\n// Called only by the existing OS-owned maintenance worker after its update.\n// The live Terminal keeps ownership. If it exits, continue the same Core\n// Prepare session using the existing auth journal, not a second setup plan.\nexport async function finishComputerSetupAfterBackgroundUpdate(): Promise<void> {\n while (await hasPendingComputerSetupContinuation()) {\n const resumed = await resumeInterruptedComputerSetup(\n async (continuation) => {\n const { snapshot, opaqueToken } =\n await mintPrepareSessionReconnectToken({\n baseUrl: continuation.gatewayUrl,\n prepareSessionId: continuation.prepareSessionId,\n });\n if (\n snapshot.lifecycleStatus !== \"active\" &&\n snapshot.lifecycleStatus !== \"completed\"\n ) {\n return \"not_completed\";\n }\n const result = await runPrepareSessionExecutor({\n gatewayUrl: continuation.gatewayUrl,\n initialSnapshot: snapshot,\n interactive: false,\n localAgentSelection: continuation.localAgentSelection,\n presenter: createPresenter(runtime),\n runtime,\n startSession: opaqueToken,\n view: \"agent\",\n });\n return result.status;\n }\n );\n if (!resumed) {\n await sleep(500);\n }\n }\n}\n\n// Run after the completed update has released its pending job. Account rollback\n// uses the existing handoff recovery, which itself waits for active updates.\nexport async function recoverComputerSetupAfterBackgroundUpdate(): Promise<void> {\n await recoverInterruptedComputerAuthHandoff({\n presenter: createPresenter(runtime),\n runtime,\n view: \"agent\",\n });\n}\n"],"mappings":";;;;;;;AAWA,MAAM,UAA0B;CAC9B,aAAa;CACb,cAAc;CACd,UAAU;AACZ;AAKA,eAAsB,2CAA0D;CAC9E,OAAO,MAAM,oCAAoC,GA2B/C,IAAI,CAAC,MA1BiB,+BACpB,OAAO,iBAAiB;EACtB,MAAM,EAAE,UAAU,gBAChB,MAAM,iCAAiC;GACrC,SAAS,aAAa;GACtB,kBAAkB,aAAa;EACjC,CAAC;EACH,IACE,SAAS,oBAAoB,YAC7B,SAAS,oBAAoB,aAE7B,OAAO;EAYT,QAAO,MAVc,0BAA0B;GAC7C,YAAY,aAAa;GACzB,iBAAiB;GACjB,aAAa;GACb,qBAAqB,aAAa;GAClC,WAAW,gBAAgB,OAAO;GAClC;GACA,cAAc;GACd,MAAM;EACR,CAAC,EAAA,CACa;CAChB,CACF,GAEE,MAAMA,WAAM,GAAG;AAGrB;AAIA,eAAsB,4CAA2D;CAC/E,MAAM,sCAAsC;EAC1C,WAAW,gBAAgB,OAAO;EAClC;EACA,MAAM;CACR,CAAC;AACH"}
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { G as legacyAccountProfileSpacesDir, J as normalizeOpenMeldProfileId, M as accountProfileSpaceCacheDir, ct as resolveOpenMeldEnvPreset, lt as resolveOpenMeldRootDir, v as resolveCliContextId } from "./lock-Bsl_ElWy.js";
4
- import { Ri as computerFileAccessPolicyInputSchema, Vi as toCompatibleSpaceAddressingRequestWireValue, _i as agentActivityEventSchema, ai as spaceCreatorSchema, er as spaceEntryTargetSchema, gi as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, zi as computerFileAccessPolicySchema } from "./dist-YPzkhLLp.js";
5
- import { $n as areAgentControllerInterfaceAccountsSame, Ct as resolveLocalProjectConnectionForPath, Kt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Mn as buildTaskResultEnvelope, Tt as withAgentActivityLocalStateLock, Xt as buildDispatchReplyContextSummary, dt as isProjectBound, ft as listProjectBindings, jn as buildRuntimeWorkspaceFingerprint, kn as DaemonServiceRunError, mr as renderWorkingLanguagePrompt, nr as buildWorkingLanguagePromptPlan, pr as renderInformationProtectionPrompt, tr as buildInformationProtectionPromptPlan, ur as parseAgentControllerRef } from "./prepare-provider-runtime-iA3g-8MS.js";
4
+ import { Ri as computerFileAccessPolicyInputSchema, Vi as toCompatibleSpaceAddressingRequestWireValue, _i as agentActivityEventSchema, ai as spaceCreatorSchema, er as spaceEntryTargetSchema, gi as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, zi as computerFileAccessPolicySchema } from "./dist-BewA9srP.js";
5
+ import { $n as areAgentControllerInterfaceAccountsSame, Ct as resolveLocalProjectConnectionForPath, Kt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Mn as buildTaskResultEnvelope, Tt as withAgentActivityLocalStateLock, Xt as buildDispatchReplyContextSummary, dt as isProjectBound, ft as listProjectBindings, jn as buildRuntimeWorkspaceFingerprint, kn as DaemonServiceRunError, mr as renderWorkingLanguagePrompt, nr as buildWorkingLanguagePromptPlan, pr as renderInformationProtectionPrompt, tr as buildInformationProtectionPromptPlan, ur as parseAgentControllerRef } from "./prepare-provider-runtime-CD5ZI-ct.js";
6
6
  import { Cr as resolveSpaceMentionLabels, F as runtimeTransportRegisterSessionResponseSchema, Rn as MESSAGE_MENTION_TYPE_VALUES, S as runtimeTransportHeartbeatResponseSchema, Sr as resolveSingleSpaceMentionLabels, Un as normalizeMessageEnvelope, V as runtimeTransportSubmitTaskResultRequestSchema, Vn as getSpaceMessageAddressingRelationSupportForTargetKind, Wn as resolveMessageEnvelopeTargetField, Y as openMeldDaemonTaskResultPayloadSchema, _ as runtimeTransportDispatchRuntimeEvidenceRequestSchema, br as normalizeSpacePasswordText, g as runtimeTransportDispatchReasoningRequestSchema, h as runtimeTransportDispatchPreviewRequestSchema, i as daemonStreamFrameSchema, m as runtimeTransportDispatchPreviewEndRequestSchema, p as runtimeTransportDispatchLifecycleRequestSchema, u as runtimeTransportDispatchInteractionRequestSchema, v as runtimeTransportDispatchToolActivityRequestSchema, wt as sanitizeSignalTextPreview, zn as collectCanonicalMentionTextFragments } from "./runtime-transport-0F5E6So6.js";
7
7
  import { D as normalizeOptionalWorkingDirectory, O as openMeldRuntimeProfileIdSchema } from "./control-plane-BDS63N7Y.js";
8
8
  import { _ as toErrorMessage, a as asRecord, d as normalizeText, l as normalizeNonNegativeInteger$1, s as emitRunLine, st as resolveCurrentOpenMeldAccountContext, u as normalizeOptionalText$8 } from "./daemon-device-id-YnLMx1kN.js";
@@ -6116,4 +6116,4 @@ function sendDaemonFrame(sink, input) {
6116
6116
  //#endregion
6117
6117
  export { emitDaemonDispatchJournalEvent as $, getSpaceAccessRequestContext as $t, readLastKnownAgentControllerAuthSnapshot as A, SpaceComposerSubmissionError as At, enqueueDispatchResultOutboxRecord as B, buildSpaceProfileAddPlan as Bt, readAgentActivityOutboxHealth as C, removeSpaceConfig as Ct, buildAgentControllerInterfaceKeeperKey as D, upsertSpaceConfig as Dt, readRecentAgentActivityHookStatus as E, updateSpaceLastSeenTs as Et, recordAgentControllerInterfaceProbeSuccess as F, buildSignalMessageReadProjection as Ft, resolveDispatchResultPayload as G, collectResolvedSpaceMentions as Gt, listDispatchResultOutboxPendingAcknowledgementKeys as H, buildSpaceRoundSignalPublication as Ht, recordAgentControllerUsageLimitsObservation as I, buildSignalReplyWorkflowProjection as It, sendDispatchPreviewEndFrame as J, createSpaceTargetCatalog as Jt, sendDispatchInteractionRequestFrame as K, createDispatchContinuationSpaceAccessContext as Kt, resolveAgentControllerCommandFingerprint as L, buildSpaceMemberAgentPresencePresentation as Lt, readLastSuccessfulAgentControllerInterfaceCheckAt as M, buildDispatchResultReplyWorkflowProjection as Mt, readReusableAgentControllerInterfaceSnapshot as N, buildPublicSpaceEntryUrl as Nt, consumeArmedAgentControllerInterfaceReprobe as O, writeSpaceCacheDeletionNoticeState as Ot, recordAgentControllerInterfaceProbeFailure as P, buildSignalIndex as Pt, sendDispatchToolActivityFrame as Q, getSpaceAccessPassword as Qt, resolveNextRuntimeAgentControllerReportSyncAtMs as R, buildSpaceMentionProfileIndex as Rt, deferAgentActivityOutbox as S, readSpaceRecentMentionProfileIds as St, removeProjectOutbox as T, toSpaceConfigListIntegrityError as Tt, waitForDispatchResultOutboxAcknowledgement as U, buildUpdatesReplyWorkflowProjection as Ut, flushDispatchResultOutbox as V, buildSpaceRoundReadProjection as Vt, buildFailedTaskResultPayload as W, closeMentionPickerState as Wt, sendDispatchReasoningFrame as X, extractMentionAuthoringPrefix as Xt, sendDispatchPreviewFrame as Y, enterRelationPickerState as Yt, sendDispatchRuntimeEvidenceFrame as Z, formatRemovedCcRelationMessage as Zt, drainAgentActivityHookInbox as _, OPENMELD_DISPATCH_RUNTIME_TARGET_PROFILE_ID_ENV as _n, isLocalSpaceStateCorruptResult as _t, resolveRegisterResponseFrame as a, listSpaceMentionSuggestions as an, isSameOrDescendantPath as at, AgentActivitySubmissionResultsMismatchError as b, readSpaceConfig as bt, scanLocalAgentActivity as c, prepareSpaceFileOnlySubmission as cn, buildDispatchPromptPlan as ct, resolveOpenCodeAuthPath as d, returnToTargetPickerState as dn, resolveBootstrapSpaceOwnerProfileId as dt, isRelationPickerState as en, readRecentDaemonDispatchJournalEvents as et, resolveOpenCodeDatabasePath as f, updateAuthoredMentionRanges as fn, resolveBootstrapTargetProfileContext as ft, readCodexSessionTitles as g, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as gn, inspectSpaceCacheFile as gt, normalizeSharedSessionTitle as h, OPENMELD_DISPATCH_RUNTIME_DISPATCH_ID_ENV as hn, LocalSpaceStateIntegrityError as ht, resolveHeartbeatResponseFrame as i, listSpaceMentionRelationChoices as in, updateComputerFileAccessPolicy as it, readLastKnownAgentControllerUsageLimits as j, buildDispatchResultMessageReadProjection as jt, didAgentControllerCommandFingerprintRemainStable as k, writeSpaceRecentMentionProfileIds as kt, startAgentActivityTranscriptWatchers as l, resolveNextRecentMentionProfileIdsForQueuedText as ln, buildDispatchSessionTitle as lt, resolveObservedAgentActivityBinding as m, DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND as mn, projectSpaceProfileCache as mt, handleDaemonTransportFrame as n, isWakeClosingSystemNoticeType as nn, readComputerFileAccessPolicy as nt, sendDaemonFrame as o, openTargetPickerState as on, buildDispatchBootstrapTemplateFacts as ot, buildAgentActivityEvent as p, DISPATCH_OWNED_RUNTIME_MODE as pn, resolveDispatchMentionSourceContext as pt, sendDispatchLifecycleFrame as q, createSpaceMemberIdentityIndex as qt, parseDaemonFrame as r, listSpaceMemberDirectorySendTargets as rn, resolveComputerFileAccessStorePath as rt, collectObservedSessionWorkingDirectories as s, prepareSpaceComposerSubmission as sn, buildDispatchCorrelation as st, emitDaemonErrorFrame as t, isTargetPickerState as tn, ComputerFileAccessStoreError as tt, readOpenCodeSessionRows as u, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as un, parseDispatchTask as ut, enqueueAgentActivityHookEvent as v, OPENMELD_SPACE_ACTION_TOOL_COMMAND_PATH_ENV as vn, listSpaceConfigs as vt, readDueAgentActivityOutbox as w, toLocalSpaceStateIntegrityError as wt, applyAgentActivitySubmissionResults as x, readSpaceLastSeenTs as xt, removeProjectInbox as y, OPENMELD_USER_FACING_CLI_COMMAND_ENV as yn, readSpaceCacheDeletionNoticeState as yt, acknowledgeDispatchResultOutboxRecord as z, buildSpaceMessageReadRelationSummary as zt };
6118
6118
 
6119
- //# sourceMappingURL=daemon-frame-transport-E-H3DjWA.js.map
6119
+ //# sourceMappingURL=daemon-frame-transport-D-4StENt.js.map