lody 0.115.0 → 0.116.0

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 (145) hide show
  1. package/dist/{access-Sut1_1-c.js → access-DIhEb_MP.js} +333 -314
  2. package/dist/{acp-interaction-owner-uSfNzpiU.js → acp-interaction-owner-8OMcZVET.js} +33 -33
  3. package/dist/{agent-execution-D1-dEIN6.js → agent-execution-ZTPT3A88.js} +13 -13
  4. package/dist/{analytics-events-BQIrmfJp.js → analytics-events-BNLOju7l.js} +2 -2
  5. package/dist/{app-J2sTmsZo.js → app-DzrwnZPK.js} +34 -34
  6. package/dist/{application-runtime-BPgp9fKR.js → application-runtime-4EGQJvLm.js} +2 -2
  7. package/dist/{auth-CTegS0TL.js → auth-CA7u_ijj.js} +8 -8
  8. package/dist/{automation-BL7x_nUm.js → automation-ClFKwWKg.js} +34 -34
  9. package/dist/baguette-worker.js +6 -6
  10. package/dist/chunks/{vendor-@agentclientprotocol-sdk-CpxTRW1f.js → vendor-@agentclientprotocol-sdk-54yhgJSn.js} +2 -2
  11. package/dist/chunks/{vendor-@anthropic-ai-claude-agent-sdk-B0HhZ112.js → vendor-@anthropic-ai-claude-agent-sdk-NAjHQcVv.js} +27 -3
  12. package/dist/chunks/{vendor-@better-auth-api-key-D0bKvhcn.js → vendor-@better-auth-api-key-Dy9PtbSj.js} +2 -2
  13. package/dist/chunks/{vendor-@better-auth-core-Dpzqxq_j.js → vendor-@better-auth-core-C7hql1k7.js} +8 -8
  14. package/dist/chunks/{vendor-@effect-platform-node-shared-DkrmBObz.js → vendor-@effect-platform-node-shared-DUSlMsdQ.js} +2 -2
  15. package/dist/chunks/{vendor-@loro-dev-streams-client-DPTfaXHE.js → vendor-@loro-dev-streams-client-DkeRiNAY.js} +1329 -88
  16. package/dist/chunks/{vendor-@loro-dev-streams-crdt-BOuVa3yO.js → vendor-@loro-dev-streams-crdt-CsXRvQxK.js} +861 -322
  17. package/dist/chunks/{vendor-@modelcontextprotocol-client-B_Q9G9Ku.js → vendor-@modelcontextprotocol-client-DuJtk4js.js} +3 -3
  18. package/dist/chunks/{vendor-@modelcontextprotocol-core-CW-vRGZP.js → vendor-@modelcontextprotocol-core-BkUcdvo6.js} +2 -2
  19. package/dist/chunks/{vendor-@modelcontextprotocol-node-CSCPUEbv.js → vendor-@modelcontextprotocol-node-D0s30TCx.js} +2 -2
  20. package/dist/chunks/{vendor-@modelcontextprotocol-server-BA5N3RYD.js → vendor-@modelcontextprotocol-server-C9c_OMTp.js} +3 -3
  21. package/dist/chunks/{vendor-@opencode-codemode-61MXX511.js → vendor-@opencode-codemode-DmkYINkB.js} +2 -2
  22. package/dist/chunks/{vendor-@sorbetai-artifacts-Dt9BTK8Q.js → vendor-@sorbetai-artifacts-Vz3r0uhj.js} +3 -3
  23. package/dist/chunks/{vendor-@sorbetai-context-COh8_Kmc.js → vendor-@sorbetai-context-BV7q3KwO.js} +2 -2
  24. package/dist/chunks/{vendor-@sorbetai-control-HcZa4Y-V.js → vendor-@sorbetai-control-C9pxQF9a.js} +137 -51
  25. package/dist/chunks/{vendor-@sorbetai-plugins-Bs93fyHc.js → vendor-@sorbetai-plugins-COkYjDxn.js} +3 -3
  26. package/dist/chunks/{vendor-@sorbetai-runtime-kicj4Xs_.js → vendor-@sorbetai-runtime-DKAfUiS0.js} +172 -60
  27. package/dist/chunks/{vendor-@sorbetai-schema-BYxzbt6U.js → vendor-@sorbetai-schema-D53JJ0HJ.js} +2 -2
  28. package/dist/chunks/{vendor-better-auth-PQ6PT4aF.js → vendor-better-auth-D1bP-dEy.js} +2 -2
  29. package/dist/chunks/{vendor-effect-CNM-5PoN.js → vendor-effect-BTVRmkqM.js} +418 -418
  30. package/dist/chunks/{vendor-es-toolkit-DnvFX_hl.js → vendor-es-toolkit-BDp9OdLC.js} +4 -4
  31. package/dist/chunks/{vendor-loro-repo-B1zdQ8Qd.js → vendor-loro-repo-DbOhEZ39.js} +2166 -93
  32. package/dist/chunks/{vendor-zod-DAcQjQuC.js → vendor-zod-nebGZ0VM.js} +6 -6
  33. package/dist/claude-acp.js +28 -7
  34. package/dist/{cli-platform-Cfc6A61f.js → cli-platform-qpp4fxi7.js} +6 -6
  35. package/dist/{cli-presence-application-D2Dn0fPM.js → cli-presence-application-Cw9rnD3u.js} +18 -18
  36. package/dist/{client-BsIzN-iC.js → client-09TiIsd2.js} +33 -33
  37. package/dist/{cloudflared-native-DmvSYnMb.js → cloudflared-native-Ber1sIlU.js} +4 -4
  38. package/dist/cloudflared-worker.js +7 -7
  39. package/dist/{code-collab-Cgso3Ix3.js → code-collab-DRoDl8u7.js} +3 -3
  40. package/dist/codex-acp.js +2 -1
  41. package/dist/{command-runtime-C7EPuHLe.js → command-runtime-CYs2KAyh.js} +774 -224
  42. package/dist/{const-LYLptZ7f.js → const-C9yql4zo.js} +2 -2
  43. package/dist/{control-CgRxpxvc.js → control-HMzEZJTm.js} +36 -36
  44. package/dist/{cross-workspace-D6-aE1-w.js → cross-workspace-CEB-pWmO.js} +3 -3
  45. package/dist/{daemon-runner-Bn8O9-a0.js → daemon-runner-BHgvKJ_l.js} +27 -27
  46. package/dist/{daemon-DWm2IzH9.js → daemon-s8LqFNYd.js} +30 -30
  47. package/dist/{daemon-session-tools-BSAgq4O1.js → daemon-session-tools-CrxHUVDk.js} +46 -46
  48. package/dist/{daemon-shared-NcwWGSEj.js → daemon-shared-BGfDcTED.js} +10 -10
  49. package/dist/{daemon-update-qOLnkZcv.js → daemon-update-BjGbzSFc.js} +2 -2
  50. package/dist/deepseek-acp.js +14 -2
  51. package/dist/{deepseek-harness-runtime-D6lV9pxi.js → deepseek-harness-runtime-CtfyKY7w.js} +8 -8
  52. package/dist/{deepseek-system-node-C2YpUQwp.js → deepseek-system-node-CBHH8N-Z.js} +4 -4
  53. package/dist/{device-preview-BjqAbZ9g.js → device-preview-WVdriBmC.js} +36 -11
  54. package/dist/devin-acp.js +2 -1
  55. package/dist/{diff-line-counts-ClicfZ_E.js → diff-line-counts-C7vhQioX.js} +2 -2
  56. package/dist/{diff-worker-task-BVD3EgeO.js → diff-worker-task-wwEm25bo.js} +2 -2
  57. package/dist/diff-worker.js +5 -5
  58. package/dist/{discovery-query-C_7lyBI8.js → discovery-query-6rvHO0Ax.js} +4 -4
  59. package/dist/{dsh-DVyIAYZ9.js → dsh-D8jYqbih.js} +9 -9
  60. package/dist/{dsh-plugins-Dfsqsiu7.js → dsh-plugins-BGuhIgPz.js} +15 -15
  61. package/dist/{e2ee-CslOKVIM.js → e2ee-BDxs5Gma.js} +3 -3
  62. package/dist/{e2ee-execution-intent-DYBEG410.js → e2ee-execution-intent-BTTWEaTs.js} +4 -4
  63. package/dist/{export-C-zeWP1i.js → export-BVe6KJcH.js} +40 -40
  64. package/dist/{feedback-Dde39k5W.js → feedback-8RRkLuXP.js} +34 -34
  65. package/dist/{feedback-jvl2Dz8w.js → feedback-Da3aBQ2E.js} +4 -4
  66. package/dist/{file-index-scan-core-Bta7tnbY.js → file-index-scan-core-QNHdA1nq.js} +5 -5
  67. package/dist/file-index-scan-worker.js +8 -8
  68. package/dist/{file-lock-By0YSSDw.js → file-lock-Oeerthnp.js} +9 -9
  69. package/dist/{github-BtMkInqL.js → github-B3lOSLjx.js} +33 -33
  70. package/dist/grok-acp.js +2 -1
  71. package/dist/{http-transport-C1f1XEnB.js → http-transport-3J_3rzKQ.js} +6 -6
  72. package/dist/{index-C41WZg1y.js → index-C5TYbo5p.js} +2 -2
  73. package/dist/{index-CitAbDql.js → index-CNsJ2gEh.js} +19 -6
  74. package/dist/{index-BUam8GIX.js → index-CbO2HBCx.js} +35 -35
  75. package/dist/{index-Ce9khNjj.js → index-CvTdgB45.js} +87 -75
  76. package/dist/{index-BsfKnSuo.js → index-CzJfh76P.js} +991 -964
  77. package/dist/index-DdJk9U2O.js +202 -0
  78. package/dist/{index-Dy-FYtdl.js → index-DtKSPvAx.js} +41 -41
  79. package/dist/{index-CZG5q6QS.js → index-PK9ed2VJ.js} +4 -4
  80. package/dist/{index-CwHleXV2.js → index-Z-EXLH2-.js} +2 -2
  81. package/dist/index.js +15 -15
  82. package/dist/{internal-BPOwohVc.js → internal-210PnQHj.js} +48 -48
  83. package/dist/{ios-simulator-BduF_qia.js → ios-simulator-B8Edygo_.js} +10 -10
  84. package/dist/{local-cli-host-lease-Chm4-jV0.js → local-cli-host-lease-BcOQ-7Gk.js} +3 -3
  85. package/dist/{local-ipc-B8vySppK.js → local-ipc-BNwkKO5i.js} +156 -103
  86. package/dist/{local-project-control-client-CIBpaXbo.js → local-project-control-client-BKaZlhrn.js} +5 -5
  87. package/dist/{lody-mcp-http-protocol-DBLKn7SZ.js → lody-mcp-http-protocol-C24PR-58.js} +46 -10
  88. package/dist/{lody-mcp-server-B4OeNPT4.js → lody-mcp-server-C_KUMdUq.js} +84 -39
  89. package/dist/{logger-C-G7jpWR.js → logger-zm-QQb1B.js} +2 -2
  90. package/dist/{login-Df1IkdeV.js → login-DoRU06W8.js} +18 -18
  91. package/dist/{login-shell-env-HKDW5zwx.js → login-shell-env-CFLesG20.js} +6 -6
  92. package/dist/{logout-gDuSiB0l.js → logout-4T76xG1C.js} +18 -18
  93. package/dist/{machine-bjdZ1hmy.js → machine-BFM6JQSw.js} +42 -42
  94. package/dist/{machine-identity-restore-BuoxXyiw.js → machine-identity-restore-CYjkTQcN.js} +3 -3
  95. package/dist/{machine-protocol-capabilities-DEhAj9SH.js → machine-protocol-capabilities-DcJpLvsC.js} +68 -47
  96. package/dist/{magpie-import-IrqfCF6i.js → magpie-import-CsiqaviF.js} +52 -50
  97. package/dist/{managed-daemon-forwarding-BpXhy_-O.js → managed-daemon-forwarding-D10w26x_.js} +9 -9
  98. package/dist/{managed-daemon-release-CwkvVtSj.js → managed-daemon-release-Bq0NQ5KB.js} +8 -8
  99. package/dist/{mcp-DTnh_PAT.js → mcp-CFSVE37k.js} +39 -39
  100. package/dist/{migrate-CUdZ3XBR.js → migrate-D0JGnFDi.js} +40 -38
  101. package/dist/{open-browser-3TOC7G1u.js → open-browser-CXJ_k8PZ.js} +3 -3
  102. package/dist/{operation-CzLcjV3W.js → operation-CjjYD8KR.js} +35 -35
  103. package/dist/{operation-store-rllAX2mr.js → operation-store-CjW-plfi.js} +6 -6
  104. package/dist/{presence-CZco7UQH.js → presence-DfPa6xSX.js} +95 -71
  105. package/dist/{presence-legacy-DIYBtj5j.js → presence-legacy-B7H0xyqf.js} +5 -5
  106. package/dist/{process-DrX1wZZk.js → process-BU5vWwzZ.js} +3 -3
  107. package/dist/{process-options-DNYWY_s6.js → process-options-CvxupoAj.js} +4 -4
  108. package/dist/{project-C_EZ2dLN.js → project-DbFdl-Tc.js} +41 -41
  109. package/dist/{project-path-CAQE9bes.js → project-path-BylnHhzQ.js} +11 -11
  110. package/dist/{realtime-journal-DyMe8jsR.js → realtime-journal-D5hdU6Fc.js} +2 -2
  111. package/dist/{register-VLBUVPh5.js → register-DzkfcD0R.js} +33 -33
  112. package/dist/{registry-generated-wkLapT7U.js → registry-generated-BtQFYqS0.js} +30 -30
  113. package/dist/{remote-pairing-D24xSpRh.js → remote-pairing-B-1pCVbn.js} +40 -40
  114. package/dist/{reset-identity-DVubJrt0.js → reset-identity-BKSdKzDv.js} +40 -40
  115. package/dist/{review-6aCgWEdv.js → review-DHDdCwwj.js} +9 -9
  116. package/dist/{review-viewer-CRYK94SE.js → review-viewer-DO7rhsH9.js} +3 -3
  117. package/dist/{rpc-secret-CPdan_XW.js → rpc-secret-Ds9rnsWf.js} +2 -2
  118. package/dist/{runtime-diagnostics-5l1pBD3m.js → runtime-diagnostics-BElvgU5u.js} +5 -5
  119. package/dist/{schedule-CGTbG70S.js → schedule-C-UJnfpM.js} +39 -39
  120. package/dist/{schedule-command-client-C6matZWn.js → schedule-command-client-B2k5ix1s.js} +38 -38
  121. package/dist/{schedule-command-service-2gToipBI.js → schedule-command-service-pFq9cQHf.js} +134 -58
  122. package/dist/{schedule-documents-DRc0byQm.js → schedule-documents-Di23etFx.js} +3 -3
  123. package/dist/{schedule-recurrence-BVxMRfp4.js → schedule-recurrence-D4r80Udd.js} +42 -14
  124. package/dist/{schedule-repository-dz9iwR0x.js → schedule-repository-BNUNXl15.js} +4 -4
  125. package/dist/{schedule-run-preparation-1oSQ5i-A.js → schedule-run-preparation-D2GjotJy.js} +5 -5
  126. package/dist/{schedule-types-BquxGfza.js → schedule-types-B9O0I1Ui.js} +472 -364
  127. package/dist/{service-D9xJKmI-.js → service-pb71b8fj.js} +5 -5
  128. package/dist/{session-npaRR-y3.js → session-C6dNbMjx.js} +21 -21
  129. package/dist/{session-file-blob-store-CBHDgf4e.js → session-file-blob-store-CdpmEU94.js} +4 -4
  130. package/dist/{session-image-download-DUwc2Fb4.js → session-image-download-DeZ6r1-w.js} +4 -4
  131. package/dist/{session-input-MeZheBJ0.js → session-input-Dz8R9xPL.js} +3 -3
  132. package/dist/{session-link-demCF_Y_.js → session-link-CABPzB2T.js} +51 -2
  133. package/dist/{session-link-export-BM1zZQRs.js → session-link-export-CabjkQNk.js} +3 -3
  134. package/dist/{session-operation-targets-lq3rsTnV.js → session-operation-targets-B-VimRwZ.js} +3 -3
  135. package/dist/{setting-Cq6nKJgF.js → setting-CKO-Tb-e.js} +116 -64
  136. package/dist/{start-BolVcMOA.js → start-B83c1-EW.js} +957 -297
  137. package/dist/streams-crdt-factory-CkuXGilB.js +17 -0
  138. package/dist/{subagent-emitter-DALyc5yu.js → subagent-emitter-D-zUFnS9.js} +2 -2
  139. package/dist/{subagent-events-CyFbbE20.js → subagent-events-D22OQNDm.js} +7 -2
  140. package/dist/{sync-BrDYKZ4H.js → sync-Cf_HanAI.js} +35 -35
  141. package/dist/{time-sync-D63wG9u-.js → time-sync-DjSg4eHx.js} +2 -2
  142. package/dist/{workspace-Bthb-nhu.js → workspace-BCjgp5pF.js} +36 -36
  143. package/dist/{workspace-legacy-jZ0D5Xl-.js → workspace-legacy-DJAko-Yj.js} +24 -24
  144. package/package.json +5 -5
  145. package/dist/index-BTgKuz44.js +0 -65
@@ -1,13 +1,13 @@
1
1
  import path__default from "node:path";
2
2
  import { m as mapWithConcurrency } from "./bounded-concurrency-JZXr8Xjv.js";
3
- import { c as createSessionMirror, m as mapRoomId, d as crossWorkspaceRowWithheld, e as mapMetaKey, b as atomicJson, a as scheduleImportFence, s as sessionImportFence } from "./cross-workspace-D6-aE1-w.js";
3
+ import { c as createSessionMirror, m as mapRoomId, d as crossWorkspaceRowWithheld, e as mapMetaKey, b as atomicJson, a as scheduleImportFence, s as sessionImportFence } from "./cross-workspace-CEB-pWmO.js";
4
4
  import fs__default from "node:fs/promises";
5
- import { g as getSessionFileBlobPath } from "./session-file-blob-store-CBHDgf4e.js";
5
+ import { g as getSessionFileBlobPath } from "./session-file-blob-store-CdpmEU94.js";
6
6
  import { createHash, randomUUID } from "node:crypto";
7
- import { o as object, h as unknown, e as array, a as literal, c as string, f as _enum, n as number } from "./chunks/vendor-zod-DAcQjQuC.js";
7
+ import { o as object, h as unknown, e as array, a as literal, c as string, f as _enum, n as number } from "./chunks/vendor-zod-nebGZ0VM.js";
8
8
  import { y as yauzlExports } from "./chunks/vendor-yauzl-9hnFHTV6.js";
9
9
  import { crc32 } from "node:zlib";
10
- import { f as formatErrorMessage } from "./logger-C-G7jpWR.js";
10
+ import { f as formatErrorMessage } from "./logger-zm-QQb1B.js";
11
11
  import { F as Flock } from "./chunks/vendor-@loro-dev-flock-wasm-BH1ts_Xn.js";
12
12
  import { L as LoroDoc } from "./chunks/vendor-loro-crdt-2CFvB1HS.js";
13
13
  const BUNDLE_FORMAT = "lody-workspace-bundle";
@@ -1205,4 +1205,4 @@ export {
1205
1205
  runWorkspaceImport as a,
1206
1206
  runWorkspaceExport as r
1207
1207
  };
1208
- //# sourceMappingURL=service-D9xJKmI-.js.map
1208
+ //# sourceMappingURL=service-pb71b8fj.js.map
@@ -1,32 +1,32 @@
1
- import { f as formatErrorMessage, e as formatErrorWithCauses, r as rootLogger, h as routeLoggerToStderr, g as getLogger } from "./logger-C-G7jpWR.js";
2
- import { cm as FlockSyncTimeoutError, cn as FlockSyncUnavailableError, cg as SessionAttachmentTransfer, co as resolveContainedUploadPath, af as normalizeCliValue, cp as WorkspaceSyncUnavailableError, bZ as createSessionBackend, U as readSessionHistoryMetadata, cq as readHistoryEntry, a6 as runOneShotCommand, ai as makeLocalWorkspaceCatalog, a9 as getAuthContextOrThrow$1, ab as resolveWorkspaceOrThrow, aj as classifyLocalDaemonIpcError, a7 as printJson, bV as getDaemonWorkspace, cj as syncWorkspaceMetaForRead, ag as listWorkspaceGitHubRepositoriesForCliToken, cr as readMachineLocalProjects, cs as withMachineRpcClient, bX as listMergedAgentConfigs, bW as getSessionCommandEnvironment, ae as listAliveDocMetas, ac as withWorkspaceManager$1, a8 as resolveStructuredOutputMode$1, ct as dispatchLocalControl, cu as upsertMachineAgentConfig, bY as ensureWorkspaceMetaSynced, cv as deleteMachineAgentConfig, cw as syncCommandTime, cx as resolveDaemonTarget, cy as createCommandAttachmentTransfer, cz as readEncryptedMachineAccess, cl as syncDocForRead, ad as listAliveRoomIds, c3 as localProjectsLegacy, cA as LocalDaemonAvailabilityError, cB as selectLocalProjectBranchSelector, cC as canUseMachineForCliToken, cD as canRequestMachineForCliToken, cE as canDelegateMachineUseForCliToken, ca as selectWorkspaceSummary, aa as listWorkspacesForToken, ci as listWorkspaceCandidates, ck as listAliveSessionMetas, $ as selectTranscriptHistoryPositions } from "./command-runtime-C7EPuHLe.js";
3
- import { s as listWorkspaceAgentRoles, t as readWorkspaceFlockRowsFromFlock, q as getWorkspaceFlockDocId, u as listWorkspaceMcpServers, v as getProjectMcpDefaults, w as deleteWorkspaceMcpServerFromFlock, x as writeWorkspaceMcpServerToFlock, e as isLoroRepoDocDeleted, f as readMachineFlockRowsFromFlock, y as getMachineFlockProviderSetupCancellations, z as getMachineFlockAgentConfigs, B as getMachineFlockProviderSetups, C as writeMachineFlockRowToFlock, D as machineFlockKeys, F as writeAgentConfigToFlock, p as parseRateLimitEntryKey, g as getMachineFlockDocId, j as getMachineFlockRateLimits, h as getMachineFlockAcpCapabilities, G as hasPendingUserTurnActivation, I as SessionStatusFactory, J as resolveActiveAssistantTurnId, K as resolveProjectGitHubRepo, L as deriveDraftSessionTitle, M as isBillingQuotaExempt, N as evaluateBillingQuota, O as countBillableSessionTurns, P as evaluateSessionCreateQuota, Q as resolveBaseBranchPreference, R as NEW_SESSION_HISTORY_BACKEND, T as formatSessionQuotaRejection, A as ACP_CAPABILITY_ROW_FAMILIES, U as FREE_SESSION_TURN_LIMIT } from "./access-Sut1_1-c.js";
4
- import { Z as snapshotAgentRole, aG as isMultiTargetAgentRole, aH as getAgentRoleTargets, aI as bindAgentRoleTarget, aJ as getProjectMcpKey, aK as getEffectiveDefaultMcpIds, q as normalizeSessionTurnInputConfig, aL as AgentRoleProposalCommandSchema, aM as canReadAgentRole, aN as findAgentRoleRunConfigIssue, aO as normalizeAgentRoleRunConfig, aP as summarizeAgentRunConfigCapabilities, aQ as MachineAcpCapabilitiesRefreshResponseSchema, aR as readChatFailureNotice, aS as withAcpConfigOptionsForModel, aT as normalizeMcpServerIdSelection, aU as hasAgentRunConfigSelection, aV as reconcileAgentRoleRunConfig, aW as getAcpModelEffortChoices, aX as getAcpModelSpeedTiers, aY as getAcpModelFastSupport, aZ as isAcpFastModeConfigId, a_ as ACP_CONFIG_OPTION_OFF_VALUE, a$ as isAcpNormalSpeedAlias, b0 as ACP_CONFIG_OPTION_ON_VALUE, an as SessionCancelResponseSchema, b1 as resolveAgentRunConfigSelection, b2 as getDeclaredModelControls, b3 as ACP_FAST_MODE_VALUE_ULTRAFAST, b4 as ACP_FAST_MODE_VALUE_FAST, b5 as isAcpThoughtLevelConfigOption, aj as MachineStatusResponseSchema } from "./schedule-types-BquxGfza.js";
5
- import { R as RepoTransportError, a as RepoSyncError } from "./chunks/vendor-loro-repo-B1zdQ8Qd.js";
6
- import { av as TaggedError, cV as runPromise, cI as result, R as fnUntraced, B as tryPromise, d2 as timeout, cS as seconds, bx as catchTag, j as fail, b as flatMap, v as void_, d3 as tapError, d as sync, dq as min, dr as exponential, ds as spaced, dt as minutes, du as jittered, dv as while_, dw as retry, dx as runSync, a3 as make, a2 as gen, C as acquireRelease, aG as promise, s as succeed, a_ as provideService, bl as Scope, aa as close, ab as void_$1, cl as scoped } from "./chunks/vendor-effect-CNM-5PoN.js";
1
+ import { f as formatErrorMessage, e as formatErrorWithCauses, r as rootLogger, h as routeLoggerToStderr, g as getLogger } from "./logger-zm-QQb1B.js";
2
+ import { cn as FlockSyncTimeoutError, co as FlockSyncUnavailableError, cg as SessionAttachmentTransfer, cp as resolveContainedUploadPath, af as normalizeCliValue, cq as WorkspaceSyncUnavailableError, b_ as createSessionBackend, U as readSessionHistoryMetadata, cr as readHistoryEntry, a6 as runOneShotCommand, ai as makeLocalWorkspaceCatalog, a9 as getAuthContextOrThrow$1, ab as resolveWorkspaceOrThrow, aj as classifyLocalDaemonIpcError, a7 as printJson, bV as getDaemonWorkspace, ck as syncWorkspaceMetaForRead, ag as listWorkspaceGitHubRepositoriesForCliToken, cs as readMachineLocalProjects, ct as withMachineRpcClient, bX as listMergedAgentConfigs, bW as getSessionCommandEnvironment, ae as listAliveDocMetas, ac as withWorkspaceManager$1, a8 as resolveStructuredOutputMode$1, cu as dispatchLocalControl, cv as upsertMachineAgentConfig, bY as ensureWorkspaceMetaSynced, cw as deleteMachineAgentConfig, cx as syncCommandTime, cy as resolveDaemonTarget, cz as createCommandAttachmentTransfer, cA as readEncryptedMachineAccess, cm as syncDocForRead, ad as listAliveRoomIds, c3 as localProjectsLegacy, cB as LocalDaemonAvailabilityError, cC as selectLocalProjectBranchSelector, cD as canUseMachineForCliToken, cE as canRequestMachineForCliToken, cF as canDelegateMachineUseForCliToken, ca as selectWorkspaceSummary, aa as listWorkspacesForToken, cj as listWorkspaceCandidates, cl as listAliveSessionMetas, $ as selectTranscriptHistoryPositions } from "./command-runtime-CYs2KAyh.js";
3
+ import { t as listWorkspaceAgentRoles, u as readWorkspaceFlockRowsFromFlock, s as getWorkspaceFlockDocId, v as listWorkspaceMcpServers, w as getProjectMcpDefaults, x as deleteWorkspaceMcpServerFromFlock, y as writeWorkspaceMcpServerToFlock, f as isLoroRepoDocDeleted, h as readMachineFlockRowsFromFlock, z as getMachineFlockProviderSetupCancellations, B as getMachineFlockAgentConfigs, C as getMachineFlockProviderSetups, D as writeMachineFlockRowToFlock, F as machineFlockKeys, G as writeAgentConfigToFlock, p as parseRateLimitEntryKey, g as getMachineFlockDocId, k as getMachineFlockRateLimits, j as getMachineFlockAcpCapabilities, I as hasPendingUserTurnActivation, J as SessionStatusFactory, K as resolveActiveAssistantTurnId, L as resolveProjectGitHubRepo, M as deriveDraftSessionTitle, N as isBillingQuotaExempt, O as evaluateBillingQuota, P as countBillableSessionTurns, Q as evaluateSessionCreateQuota, R as resolveBaseBranchPreference, T as NEW_SESSION_HISTORY_BACKEND, U as formatSessionQuotaRejection, A as ACP_CAPABILITY_ROW_FAMILIES, V as FREE_SESSION_TURN_LIMIT } from "./access-DIhEb_MP.js";
4
+ import { Z as snapshotAgentRole, aI as isMultiTargetAgentRole, aJ as getAgentRoleTargets, aK as bindAgentRoleTarget, aL as getProjectMcpKey, aM as getEffectiveDefaultMcpIds, q as normalizeSessionTurnInputConfig, aN as AgentRoleProposalCommandSchema, aO as canReadAgentRole, aP as findAgentRoleRunConfigIssue, aQ as normalizeAgentRoleRunConfig, aR as summarizeAgentRunConfigCapabilities, aS as MachineAcpCapabilitiesRefreshResponseSchema, aT as readChatFailureNotice, aU as withAcpConfigOptionsForModel, aV as normalizeMcpServerIdSelection, aW as hasAgentRunConfigSelection, aX as reconcileAgentRoleRunConfig, aY as getAcpModelEffortChoices, aZ as getAcpModelSpeedTiers, a_ as getAcpModelFastSupport, a$ as isAcpFastModeConfigId, b0 as ACP_CONFIG_OPTION_OFF_VALUE, b1 as isAcpNormalSpeedAlias, b2 as ACP_CONFIG_OPTION_ON_VALUE, ao as SessionCancelResponseSchema, b3 as resolveAgentRunConfigSelection, b4 as getDeclaredModelControls, b5 as ACP_FAST_MODE_VALUE_ULTRAFAST, b6 as ACP_FAST_MODE_VALUE_FAST, b7 as isAcpThoughtLevelConfigOption, ak as MachineStatusResponseSchema } from "./schedule-types-B9O0I1Ui.js";
5
+ import { R as RepoTransportError, a as RepoSyncError } from "./chunks/vendor-loro-repo-DbOhEZ39.js";
6
+ import { T as TaggedError, cV as runPromise, cI as result, N as fnUntraced, z as tryPromise, d2 as timeout, cS as seconds, a$ as catchTag, R as fail, E as flatMap, q as void_, d3 as tapError, s as sync, dq as min, dr as exponential, ds as spaced, dt as minutes, du as jittered, dv as while_, dw as retry, dx as runSync, m as make, g as gen, ab as acquireRelease, V as promise, K as succeed, al as provideService, aM as Scope, f as close, v as void_$1, cl as scoped } from "./chunks/vendor-effect-BTVRmkqM.js";
7
7
  import fs__default, { readFile } from "node:fs/promises";
8
8
  import { constants, promises } from "node:fs";
9
9
  import os__default from "node:os";
10
10
  import path__default from "node:path";
11
11
  import { randomUUID, createHash } from "node:crypto";
12
- import { c as copyIntoSessionFileBlobStore, r as removeSessionFileBlob } from "./session-file-blob-store-CBHDgf4e.js";
13
- import { S as SESSION_FILE_MAX_COUNT, a as SESSION_FILE_MAX_SIZE_BYTES, b as SESSION_IMAGE_MAX_SIZE_BYTES, c as SESSION_IMAGE_ALLOWED_MIME_TYPES, p as parseMagpieImportLink, n as normalizeMagpieGateway, M as MAGPIE_TARGETS, m as magpieProviderSettings, s as supportsBuiltinProviderSetup, g as getReadableAcpCapabilityCacheEntryForRuntimeOverrides, d as getAcpCapabilityCacheKey, e as getBuiltinDefaultModeId, f as getReadableAcpCapabilityCacheEntry } from "./magpie-import-IrqfCF6i.js";
14
- import { g as getServerNow } from "./time-sync-D63wG9u-.js";
15
- import { R as ResourceListSchemas, m as matchesDiscoveryQuery, a as discoveryPage, b as buildCommandInputBlocks, c as SessionDiscoveryFilterShape, e as matchesSessionDiscovery } from "./discovery-query-C_7lyBI8.js";
12
+ import { c as copyIntoSessionFileBlobStore, r as removeSessionFileBlob } from "./session-file-blob-store-CdpmEU94.js";
13
+ import { S as SESSION_FILE_MAX_COUNT, a as SESSION_FILE_MAX_SIZE_BYTES, b as SESSION_IMAGE_MAX_SIZE_BYTES, c as SESSION_IMAGE_ALLOWED_MIME_TYPES, p as parseMagpieImportLink, n as normalizeMagpieGateway, M as MAGPIE_TARGETS, m as magpieProviderSettings, s as supportsBuiltinProviderSetup, d as getReadableAcpCapabilityCacheEntryForRuntimeOverrides, e as getAcpCapabilityCacheKey, f as getBuiltinDefaultModeId, h as getReadableAcpCapabilityCacheEntry } from "./magpie-import-CsiqaviF.js";
14
+ import { g as getServerNow } from "./time-sync-DjSg4eHx.js";
15
+ import { R as ResourceListSchemas, m as matchesDiscoveryQuery, a as discoveryPage, b as buildCommandInputBlocks, c as SessionDiscoveryFilterShape, e as matchesSessionDiscovery } from "./discovery-query-6rvHO0Ax.js";
16
16
  import { isDeepStrictEqual } from "node:util";
17
- import { b as getSessionRoomId, i as isMachineDocRoomId, m as getMachineRoomId, D as isSessionDocRoomId, k as getSessionIdFromRoomId } from "./presence-CZco7UQH.js";
17
+ import { b as getSessionRoomId, i as isMachineDocRoomId, n as getMachineRoomId, D as isSessionDocRoomId, k as getSessionIdFromRoomId } from "./presence-DfPa6xSX.js";
18
18
  import { C as Command, O as Option } from "./chunks/vendor-commander-BkZcYyor.js";
19
- import { A as AuthClient } from "./auth-CTegS0TL.js";
19
+ import { A as AuthClient } from "./auth-CA7u_ijj.js";
20
20
  import { r as renderTerminalTable } from "./terminal-table-DSTeeT1J.js";
21
- import { g as getCliPlatformKind, f as fileLocksLegacy } from "./cli-platform-Cfc6A61f.js";
22
- import { a as machineSupportsProtocolCapability, M as MACHINE_PROTOCOL_CAPABILITIES, n as negotiatedAcpCapabilitiesRefreshForce, r as resolveNewSessionHistoryBackend, b as machineSupportsPreparedSessionInputProtocol, c as machineSupportsMemoryProviders, O as OPERATION_INBOX_PROTOCOL_VERSION } from "./machine-protocol-capabilities-DEhAj9SH.js";
23
- import { t as makeLocalControlClientAuto, v as SessionToolResultSchema } from "./local-ipc-B8vySppK.js";
24
- import { f as flushTelemetry } from "./login-shell-env-HKDW5zwx.js";
25
- import { d as captureSessionCommandEvent } from "./analytics-events-BQIrmfJp.js";
26
- import { r as resolveSessionConversationConfig, i as inputBlocksToHistoryItems } from "./session-input-MeZheBJ0.js";
21
+ import { g as getCliPlatformKind, f as fileLocksLegacy } from "./cli-platform-qpp4fxi7.js";
22
+ import { a as machineSupportsProtocolCapability, M as MACHINE_PROTOCOL_CAPABILITIES, n as negotiatedAcpCapabilitiesRefreshForce, r as resolveNewSessionHistoryBackend, b as machineSupportsPreparedSessionInputProtocol, c as machineSupportsMemoryProviders, O as OPERATION_INBOX_PROTOCOL_VERSION } from "./machine-protocol-capabilities-DcJpLvsC.js";
23
+ import { u as makeLocalControlClientAuto, w as SessionToolResultSchema } from "./local-ipc-BNwkKO5i.js";
24
+ import { f as flushTelemetry } from "./login-shell-env-CFLesG20.js";
25
+ import { d as captureSessionCommandEvent } from "./analytics-events-BNLOju7l.js";
26
+ import { r as resolveSessionConversationConfig, i as inputBlocksToHistoryItems } from "./session-input-Dz8R9xPL.js";
27
27
  import { v as v4 } from "./chunks/vendor-uuid-ZvTlSCzA.js";
28
- import { r as readSessionOperationTargets } from "./session-operation-targets-lq3rsTnV.js";
29
- import { o as object } from "./chunks/vendor-zod-DAcQjQuC.js";
28
+ import { r as readSessionOperationTargets } from "./session-operation-targets-B-VimRwZ.js";
29
+ import { o as object } from "./chunks/vendor-zod-nebGZ0VM.js";
30
30
  import { m as mapWithConcurrency } from "./bounded-concurrency-JZXr8Xjv.js";
31
31
  const MACHINE_CATALOG_RETRY_GUIDANCE = " If no active Operation handle was returned, wait at least 5 seconds between attempts, make at most 3 total attempts (the initial call plus 2 retries), and reuse the identical request and operationId when present. Then stop and report the catalog blocker; do not create a new operationId to retry. If an active Operation handle was returned, let the daemon recover it and await automatic completion.";
32
32
  function getSyncRetryability(error, seen = /* @__PURE__ */ new Set(), depth = 0) {
@@ -7096,4 +7096,4 @@ export {
7096
7096
  validateSessionChatTarget as y,
7097
7097
  MachineOfflineError as z
7098
7098
  };
7099
- //# sourceMappingURL=session-npaRR-y3.js.map
7099
+ //# sourceMappingURL=session-C6dNbMjx.js.map
@@ -1,11 +1,11 @@
1
1
  import { randomUUID } from "node:crypto";
2
- import { l as SessionImagePayloadSchema, m as EncryptedAttachmentSchema } from "./schedule-types-BquxGfza.js";
2
+ import { l as SessionImagePayloadSchema, m as EncryptedAttachmentSchema } from "./schedule-types-B9O0I1Ui.js";
3
3
  import os__default from "os";
4
4
  import fs__default from "fs";
5
5
  import path__default from "path";
6
6
  import { g as getLodyDataDir } from "./installation-profile-BgCqPyUj.js";
7
- import { g as getServerNow } from "./time-sync-D63wG9u-.js";
8
- import { c as string, o as object, a as literal } from "./chunks/vendor-zod-DAcQjQuC.js";
7
+ import { g as getServerNow } from "./time-sync-DjSg4eHx.js";
8
+ import { c as string, o as object, a as literal } from "./chunks/vendor-zod-nebGZ0VM.js";
9
9
  const SESSION_FILES_DIR_NAME = "session-files";
10
10
  const BACKFILLED_DIR_NAME = "_backfilled";
11
11
  const SESSION_FILE_BLOB_DEFAULT_QUOTA_BYTES = 2 * 1024 * 1024 * 1024;
@@ -466,4 +466,4 @@ export {
466
466
  storeLocalSessionImage as s,
467
467
  writeSessionFileBlobBackfillMarker as w
468
468
  };
469
- //# sourceMappingURL=session-file-blob-store-CBHDgf4e.js.map
469
+ //# sourceMappingURL=session-file-blob-store-CdpmEU94.js.map
@@ -1,6 +1,6 @@
1
- import { f as formatErrorMessage } from "./logger-C-G7jpWR.js";
2
- import { n as assertEncryptedAttachmentReference, r as readEncryptedAttachment, o as encryptedAttachmentPath } from "./schedule-types-BquxGfza.js";
3
- import { b as buildSessionImageApiUrl, c as getSessionImageDownloadApiPath, d as getSessionFileDownloadApiPath } from "./access-Sut1_1-c.js";
1
+ import { f as formatErrorMessage } from "./logger-zm-QQb1B.js";
2
+ import { n as assertEncryptedAttachmentReference, r as readEncryptedAttachment, o as encryptedAttachmentPath } from "./schedule-types-B9O0I1Ui.js";
3
+ import { b as buildSessionImageApiUrl, c as getSessionImageDownloadApiPath, d as getSessionFileDownloadApiPath } from "./access-DIhEb_MP.js";
4
4
  const SESSION_IMAGE_DOWNLOAD_RETRY_DELAYS_MS = [250, 750, 1500];
5
5
  const SESSION_IMAGE_DOWNLOAD_MAX_RETRY_AFTER_MS = 3e3;
6
6
  const RETRYABLE_SESSION_IMAGE_DOWNLOAD_STATUSES = /* @__PURE__ */ new Set([408, 429, 500, 502, 503, 504]);
@@ -176,4 +176,4 @@ export {
176
176
  downloadSessionImageForPrompt as a,
177
177
  downloadEncryptedSessionImageBytes as d
178
178
  };
179
- //# sourceMappingURL=session-image-download-DUwc2Fb4.js.map
179
+ //# sourceMappingURL=session-image-download-DeZ6r1-w.js.map
@@ -1,5 +1,5 @@
1
- import { i as isSessionFileSourcePath } from "./magpie-import-IrqfCF6i.js";
2
- import { A as AgentConfigCliTypeSchema, p as SessionInputBlocksSchema, s as sanitizeMessageTextSpans, q as normalizeSessionTurnInputConfig, t as reanchorMessageTextSpansForTrim } from "./schedule-types-BquxGfza.js";
1
+ import { i as isSessionFileSourcePath } from "./magpie-import-CsiqaviF.js";
2
+ import { A as AgentConfigCliTypeSchema, p as SessionInputBlocksSchema, s as sanitizeMessageTextSpans, q as normalizeSessionTurnInputConfig, t as reanchorMessageTextSpansForTrim } from "./schedule-types-B9O0I1Ui.js";
3
3
  const collectSessionConversationSources = (history, messageQueue = []) => {
4
4
  const sources = [];
5
5
  for (let index = messageQueue.length - 1; index >= 0; index -= 1) {
@@ -462,4 +462,4 @@ export {
462
462
  queuedInputEvidence as q,
463
463
  resolveSessionConversationConfig as r
464
464
  };
465
- //# sourceMappingURL=session-input-MeZheBJ0.js.map
465
+ //# sourceMappingURL=session-input-Dz8R9xPL.js.map
@@ -1,4 +1,4 @@
1
- import { S as SESSION_LINK_SCHEMES, L as LODY_PROTOCOLS } from "./presence-CZco7UQH.js";
1
+ import { S as SESSION_LINK_SCHEMES, L as LODY_PROTOCOLS } from "./presence-DfPa6xSX.js";
2
2
  const ID = /^[A-Za-z0-9_-]+$/u;
3
3
  const SCHEMES = new Set(SESSION_LINK_SCHEMES.map((scheme) => `${scheme}:`));
4
4
  function buildSessionLink(target) {
@@ -50,9 +50,58 @@ function resolveSessionLinkId(raw, workspaceId) {
50
50
  if (link.tabSessionId) throw new Error("Use the child session ID directly for MCP requests");
51
51
  return link.sessionId;
52
52
  }
53
+ const APP_SETTINGS_LINK_TABS = [
54
+ "account",
55
+ "preferences",
56
+ "appearance",
57
+ "keyboard-shortcuts",
58
+ "workspace",
59
+ "shares",
60
+ "people",
61
+ "machines",
62
+ "agents",
63
+ "memory",
64
+ "agent-roles",
65
+ "prompt-shortcuts",
66
+ "mcp",
67
+ "projects",
68
+ "github",
69
+ "ai-usage",
70
+ "billing",
71
+ "data",
72
+ "about"
73
+ ];
74
+ const AGENT_CREATE_BUILTIN_TARGETS = [
75
+ "codex",
76
+ "claude",
77
+ "kimi",
78
+ "deepseek",
79
+ "pi",
80
+ "devin",
81
+ "grok",
82
+ "antigravity",
83
+ "bub",
84
+ "dimcode"
85
+ ];
86
+ const AGENT_CREATE_PRESET_TARGETS = [
87
+ "glm-over-claude-code",
88
+ "mimo-over-claude-code",
89
+ "minimax-over-claude-code"
90
+ ];
91
+ const PROJECT_LINK_PAGES = [
92
+ "general",
93
+ "worktree",
94
+ "skills",
95
+ "defaultMcp",
96
+ "conversations"
97
+ ];
98
+ new Set(APP_SETTINGS_LINK_TABS);
99
+ new Set(AGENT_CREATE_BUILTIN_TARGETS);
100
+ new Set(AGENT_CREATE_PRESET_TARGETS);
101
+ new Set(PROJECT_LINK_PAGES);
53
102
  export {
54
103
  buildSessionLink as b,
55
104
  parseSessionLink as p,
56
105
  resolveSessionLinkId as r
57
106
  };
58
- //# sourceMappingURL=session-link-demCF_Y_.js.map
107
+ //# sourceMappingURL=session-link-CABPzB2T.js.map
@@ -1,6 +1,6 @@
1
- import { p as parseSessionLink, b as buildSessionLink } from "./session-link-demCF_Y_.js";
1
+ import { p as parseSessionLink, b as buildSessionLink } from "./session-link-CABPzB2T.js";
2
2
  import { f as fromMarkdown } from "./chunks/vendor-mdast-util-from-markdown-DQq6W3Ku.js";
3
- import { S as SESSION_LINK_SCHEMES } from "./presence-CZco7UQH.js";
3
+ import { S as SESSION_LINK_SCHEMES } from "./presence-DfPa6xSX.js";
4
4
  const schemePattern = [...SESSION_LINK_SCHEMES, "session"].map((scheme) => scheme.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&")).join("|");
5
5
  const sessionScheme = new RegExp(`(?:${schemePattern}):\\/\\/`, "u");
6
6
  const sessionUri = new RegExp(
@@ -44,4 +44,4 @@ function normalizeSessionLinksForExport(markdown, workspaceId) {
44
44
  export {
45
45
  normalizeSessionLinksForExport as n
46
46
  };
47
- //# sourceMappingURL=session-link-export-BM1zZQRs.js.map
47
+ //# sourceMappingURL=session-link-export-CabjkQNk.js.map
@@ -1,5 +1,5 @@
1
- import { j as SESSION_DOC_PREFIX, k as getSessionIdFromRoomId } from "./presence-CZco7UQH.js";
2
- import { e as isLoroRepoDocDeleted } from "./access-Sut1_1-c.js";
1
+ import { j as SESSION_DOC_PREFIX, k as getSessionIdFromRoomId } from "./presence-DfPa6xSX.js";
2
+ import { f as isLoroRepoDocDeleted } from "./access-DIhEb_MP.js";
3
3
  function collectSessionArchiveTargets(sessionId, sessions) {
4
4
  return collectDescendants(sessionId, sessions, (session) => session.parentSessionId);
5
5
  }
@@ -78,4 +78,4 @@ export {
78
78
  isSessionCollaborationStopped as i,
79
79
  readSessionOperationTargets as r
80
80
  };
81
- //# sourceMappingURL=session-operation-targets-lq3rsTnV.js.map
81
+ //# sourceMappingURL=session-operation-targets-B-VimRwZ.js.map
@@ -1,12 +1,12 @@
1
- import { getCliNodeExecutable } from "./managed-daemon-release-CwkvVtSj.js";
1
+ import { getCliNodeExecutable } from "./managed-daemon-release-Bq0NQ5KB.js";
2
2
  import { rmSync, readdirSync, readFileSync, existsSync, createWriteStream, createReadStream, lstatSync, statSync, unlinkSync, symlinkSync, linkSync, copyFileSync, accessSync, constants } from "node:fs";
3
+ import { lstat, writeFile, rename, rm, stat, readlink, readFile, mkdir, symlink, realpath, mkdtemp, chmod, readdir } from "node:fs/promises";
4
+ import { homedir } from "node:os";
3
5
  import { createHash, randomUUID } from "node:crypto";
4
- import { mkdir, writeFile, rename, rm, realpath, symlink, mkdtemp, chmod, readdir, readFile, stat, lstat } from "node:fs/promises";
5
6
  import path__default$1, { join, resolve, dirname, relative, isAbsolute, sep, basename, delimiter, normalize } from "node:path";
7
+ import { n as normalizeMagpieGateway, k as MAGPIE_CODEX_SKILLS, l as MAGPIE_TOKEN, o as getRegistryAcpLaunchKind, q as getManagedBuiltinRuntimeByRuntimeName, j as isManagedBuiltinAgentType, r as getManagedBuiltinRuntimeByAgentType, t as isBuiltinAgentType, u as getBuiltinRuntimeOverrideSourceVersionSuffix, v as serializeCustomAcpLaunchSpec } from "./magpie-import-CsiqaviF.js";
6
8
  import { g as getLodyDataDir } from "./installation-profile-BgCqPyUj.js";
7
- import { n as normalizeMagpieGateway, j as MAGPIE_TOKEN, k as getRegistryAcpLaunchKind, l as getManagedBuiltinRuntimeByRuntimeName, h as isManagedBuiltinAgentType, o as getManagedBuiltinRuntimeByAgentType, q as isBuiltinAgentType, r as getBuiltinRuntimeOverrideSourceVersionSuffix, t as serializeCustomAcpLaunchSpec } from "./magpie-import-IrqfCF6i.js";
8
- import { o as object, a as literal, e as array, n as number, c as string, d as boolean, h as unknown, f as _enum } from "./chunks/vendor-zod-DAcQjQuC.js";
9
- import { homedir } from "node:os";
9
+ import { o as object, a as literal, e as array, n as number, c as string, d as boolean, h as unknown, f as _enum } from "./chunks/vendor-zod-nebGZ0VM.js";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { PassThrough, Readable, Transform } from "node:stream";
12
12
  import { pipeline, finished } from "node:stream/promises";
@@ -15,18 +15,82 @@ import "./chunks/vendor-minipass-CfF1uFKZ.js";
15
15
  import { readFileSync as readFileSync$1, writeFileSync, mkdirSync, lstatSync as lstatSync$1, unlinkSync as unlinkSync$1, realpathSync, statSync as statSync$1, accessSync as accessSync$1, constants as constants$1 } from "fs";
16
16
  import path__default from "path";
17
17
  import { y as yauzlExports } from "./chunks/vendor-yauzl-9hnFHTV6.js";
18
- import { e as formatErrorWithCauses, g as getLogger, f as formatErrorMessage } from "./logger-C-G7jpWR.js";
18
+ import { e as formatErrorWithCauses, g as getLogger, f as formatErrorMessage } from "./logger-zm-QQb1B.js";
19
19
  import { d as decompressStream } from "./chunks/vendor-zstd-stream-46u8wyoZ.js";
20
20
  import { c as claudeSdkManifestJson, a as claudeSdkPackageJson } from "./chunks/vendor-@anthropic-ai-claude-agent-sdk-Cnk9IorF.js";
21
- import { g as getCliHttpFetch, e as resolveProxyUrl, f as resolveCliHttpTransportConfig } from "./http-transport-C1f1XEnB.js";
22
- import { C as CURRENT_MACHINE_PROTOCOL_CAPABILITIES, M as MACHINE_PROTOCOL_CAPABILITIES, P as PI_EXTENSIONS_PROTOCOL_VERSION } from "./machine-protocol-capabilities-DEhAj9SH.js";
23
- import { c as captureCli } from "./login-shell-env-HKDW5zwx.js";
21
+ import { g as getCliHttpFetch, e as resolveProxyUrl, f as resolveCliHttpTransportConfig } from "./http-transport-3J_3rzKQ.js";
22
+ import { C as CURRENT_MACHINE_PROTOCOL_CAPABILITIES, M as MACHINE_PROTOCOL_CAPABILITIES, P as PI_EXTENSIONS_PROTOCOL_VERSION } from "./machine-protocol-capabilities-DcJpLvsC.js";
23
+ import { c as captureCli } from "./login-shell-env-CFLesG20.js";
24
24
  import { createHash as createHash$1 } from "crypto";
25
25
  import { g as githubCredentialRuntime } from "./github-credential-runtime-Vuv6HxRs.js";
26
26
  import { execFileSync } from "node:child_process";
27
- import { resolveDeepSeekHarnessProcessLaunch, DEEPSEEK_HARNESS_CAPABILITY_SOURCE_VERSION } from "./deepseek-harness-runtime-D6lV9pxi.js";
28
- import { R as REGISTRY_ACP_AGENTS } from "./registry-generated-wkLapT7U.js";
27
+ import { resolveDeepSeekHarnessProcessLaunch, DEEPSEEK_HARNESS_CAPABILITY_SOURCE_VERSION } from "./deepseek-harness-runtime-CtfyKY7w.js";
28
+ import { R as REGISTRY_ACP_AGENTS } from "./registry-generated-BtQFYqS0.js";
29
29
  import { f as DEEPSEEK_HARNESS_BASE_URL_ENV } from "./capabilities-CNX3VCPQ.js";
30
+ function magpieProfileDirectory(root, gateway, agent) {
31
+ const key = createHash("sha256").update(normalizeMagpieGateway(gateway)).digest("hex").slice(0, 24);
32
+ return join(root, key, agent);
33
+ }
34
+ async function writeMagpieFile(path, value) {
35
+ const temporary = `${path}.${randomUUID()}.tmp`;
36
+ try {
37
+ await writeFile(temporary, typeof value === "string" ? value : JSON.stringify(value), {
38
+ mode: 384
39
+ });
40
+ await rename(temporary, path);
41
+ } finally {
42
+ await rm(temporary, { force: true });
43
+ }
44
+ }
45
+ async function ifPresent(operation) {
46
+ try {
47
+ return await operation;
48
+ } catch (error) {
49
+ const code = error.code;
50
+ if (code === "ENOENT" || code === "ENOTDIR") return void 0;
51
+ throw error;
52
+ }
53
+ }
54
+ async function codexMagpieSkillEntries(profile, home) {
55
+ const skills = join(profile, "skills");
56
+ const parent = await ifPresent(lstat(skills));
57
+ return Promise.all(
58
+ MAGPIE_CODEX_SKILLS.map(async (name2) => {
59
+ const native = join(home, ".codex", "skills", name2);
60
+ const destination = join(skills, name2);
61
+ const existing = await ifPresent(lstat(destination));
62
+ return { name: name2, native, destination, existing, writable: !parent || parent.isDirectory() };
63
+ })
64
+ );
65
+ }
66
+ function linkIdentity(link) {
67
+ return [link.dev, link.ino, link.birthtimeMs].join(":");
68
+ }
69
+ async function syncCodexMagpieSkills(profile, home) {
70
+ for (const entry of await codexMagpieSkillEntries(profile, home)) {
71
+ if (!entry.writable) continue;
72
+ const { name: name2, native, destination, existing } = entry;
73
+ const installed = (await ifPresent(stat(join(native, "SKILL.md"))))?.isFile();
74
+ const marker = join(profile, ".lody-linked-" + name2);
75
+ if (existing) {
76
+ if (!installed && existing.isSymbolicLink() && (await ifPresent(lstat(marker)))?.isFile() && await ifPresent(readlink(destination)) === native && await ifPresent(readFile(marker, "utf8")) === linkIdentity(existing)) {
77
+ await rm(destination, { force: true });
78
+ await rm(marker, { force: true });
79
+ }
80
+ continue;
81
+ }
82
+ if (!installed) continue;
83
+ await mkdir(join(profile, "skills"), { recursive: true });
84
+ try {
85
+ await symlink(native, destination, process.platform === "win32" ? "junction" : "dir");
86
+ } catch (error) {
87
+ if (error.code === "EEXIST") continue;
88
+ throw error;
89
+ }
90
+ const created = await ifPresent(lstat(destination));
91
+ if (created?.isSymbolicLink()) await writeMagpieFile(marker, linkIdentity(created));
92
+ }
93
+ }
30
94
  const LOOPBACK_NO_PROXY_HOSTS = ["localhost", "127.0.0.1", "::1"];
31
95
  LOOPBACK_NO_PROXY_HOSTS.join(",");
32
96
  function mergeLoopbackNoProxy(upper, lower) {
@@ -214,18 +278,7 @@ function buildMagpieGrokConfig(gateway, models) {
214
278
  ""
215
279
  ].join("\n");
216
280
  }
217
- async function writeAtomic(path, value) {
218
- const temporary = `${path}.${randomUUID()}.tmp`;
219
- try {
220
- await writeFile(temporary, typeof value === "string" ? value : JSON.stringify(value), {
221
- mode: 384
222
- });
223
- await rename(temporary, path);
224
- } finally {
225
- await rm(temporary, { force: true });
226
- }
227
- }
228
- async function prepareMagpieRuntime(agentType, gateway, signal, root = join(getLodyDataDir(), "magpie"), fetcher = fetch) {
281
+ async function prepareMagpieRuntime(agentType, gateway, signal, root = join(getLodyDataDir(), "magpie"), fetcher = fetch, home = homedir()) {
229
282
  const base = normalizeMagpieGateway(gateway);
230
283
  if (!["claude", "codex", "pi", "deepseek", "kimi", "grok", "bub"].includes(agentType))
231
284
  throw new Error("Unsupported Magpie runtime");
@@ -261,15 +314,11 @@ async function prepareMagpieRuntime(agentType, gateway, signal, root = join(getL
261
314
  }
262
315
  };
263
316
  }
264
- const directory = join(
265
- root,
266
- createHash("sha256").update(base).digest("hex").slice(0, 24),
267
- agentType
268
- );
317
+ const directory = magpieProfileDirectory(root, base, agentType);
269
318
  await mkdir(directory, { recursive: true, mode: 448 });
270
319
  if (agentType === "kimi" || agentType === "grok") {
271
320
  const config2 = agentType === "kimi" ? buildMagpieKimiConfig(base, models) : buildMagpieGrokConfig(base, models);
272
- await writeAtomic(join(directory, "config.toml"), config2);
321
+ await writeMagpieFile(join(directory, "config.toml"), config2);
273
322
  return {
274
323
  args: [],
275
324
  env: agentType === "kimi" ? { KIMI_CODE_HOME: directory, KIMI_MODEL_NAME: "" } : {
@@ -281,12 +330,13 @@ async function prepareMagpieRuntime(agentType, gateway, signal, root = join(getL
281
330
  };
282
331
  }
283
332
  if (agentType === "pi") {
284
- await writeAtomic(join(directory, "models.json"), buildMagpiePiCatalog(base, models));
333
+ await writeMagpieFile(join(directory, "models.json"), buildMagpiePiCatalog(base, models));
285
334
  return {
286
335
  args: ["--provider", "magpie", "--model", first.id],
287
336
  env: { PI_CODING_AGENT_DIR: directory }
288
337
  };
289
338
  }
339
+ await syncCodexMagpieSkills(directory, home);
290
340
  const config = JSON.stringify({
291
341
  model_provider: "magpie",
292
342
  model: first.id,
@@ -4687,48 +4737,50 @@ const setting = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4687
4737
  withDefaultAcpPathEntries
4688
4738
  }, Symbol.toStringTag, { value: "Module" }));
4689
4739
  export {
4690
- getAcpCapabilitySourceVersion as A,
4691
- getAcpBinaryManager as B,
4692
- formatManagedRuntimeFailureMessage as C,
4693
- classifyManagedRuntimeFailureReason as D,
4694
- AcpBinaryUnsupportedPlatformError as E,
4695
- resolveExpectedAcpCapabilitySourceVersion as F,
4740
+ normalizeAgentProcessEnv as A,
4741
+ getManagedAgentRuntimeManager as B,
4742
+ getAcpCapabilitySourceVersion as C,
4743
+ getAcpBinaryManager as D,
4744
+ formatManagedRuntimeFailureMessage as E,
4745
+ classifyManagedRuntimeFailureReason as F,
4696
4746
  GITHUB_CREDENTIAL_ENV_KEYS as G,
4697
- getHostMachineProtocolCapabilities as H,
4698
- normalizeComparablePath$1 as I,
4699
- ManagedRuntimeError as J,
4700
- clearManagedGhTokenEnv as K,
4701
- LODY_MANAGED_GH_TOKEN_SHA256_ENV as L,
4747
+ AcpBinaryUnsupportedPlatformError as H,
4748
+ resolveExpectedAcpCapabilitySourceVersion as I,
4749
+ getHostMachineProtocolCapabilities as J,
4750
+ normalizeComparablePath$1 as K,
4751
+ ManagedRuntimeError as L,
4702
4752
  ManagedRuntimeUnsupportedPlatformError as M,
4703
- configureManagedAgentRuntimeManager as N,
4704
- configureManagedRuntimeUpdateCoordinator as O,
4753
+ clearManagedGhTokenEnv as N,
4754
+ LODY_MANAGED_GH_TOKEN_SHA256_ENV as O,
4705
4755
  PI_EXTENSIONS_SUPPORTED as P,
4706
- setting as Q,
4756
+ configureManagedAgentRuntimeManager as Q,
4757
+ configureManagedRuntimeUpdateCoordinator as R,
4758
+ setting as S,
4707
4759
  inspectNpxInstallState as a,
4708
4760
  purgeBrokenNpxInstall as b,
4709
- isLikelyNpmCacheCorruption as c,
4710
- purgeBrokenNpxCache as d,
4711
- purgeLodyNpmCache as e,
4712
- isLikelyBrokenNpxInstall as f,
4761
+ codexMagpieSkillEntries as c,
4762
+ isLikelyNpmCacheCorruption as d,
4763
+ purgeBrokenNpxCache as e,
4764
+ purgeLodyNpmCache as f,
4713
4765
  getConfiguredNpxCacheRoot as g,
4714
- resolveACPProcessLaunchAsync as h,
4766
+ isLikelyBrokenNpxInstall as h,
4715
4767
  isNpxCommand as i,
4716
- mergeLoginShellEnv as j,
4717
- withLodyNpmCacheForNpx as k,
4718
- withDefaultAcpPathEntries as l,
4719
- mergeACPProcessEnv as m,
4720
- resolveACPProcessLaunch as n,
4721
- extractAbortableZip as o,
4768
+ resolveACPProcessLaunchAsync as j,
4769
+ mergeLoginShellEnv as k,
4770
+ withLodyNpmCacheForNpx as l,
4771
+ magpieProfileDirectory as m,
4772
+ withDefaultAcpPathEntries as n,
4773
+ mergeACPProcessEnv as o,
4722
4774
  parseNpxPackageSpecFromArgs as p,
4723
- ensureGhShimScript as q,
4775
+ resolveACPProcessLaunch as q,
4724
4776
  resolveBuiltinAuthenticationProcessLaunch as r,
4725
- prependGhShimBinDirToPath as s,
4726
- getGhShimHostBinDir as t,
4727
- toSingleQuotedShellString as u,
4728
- writeIfChanged as v,
4777
+ extractAbortableZip as s,
4778
+ ensureGhShimScript as t,
4779
+ prependGhShimBinDirToPath as u,
4780
+ getGhShimHostBinDir as v,
4729
4781
  withLoopbackNoProxy as w,
4730
- clearGitHubTokenEnv as x,
4731
- normalizeAgentProcessEnv as y,
4732
- getManagedAgentRuntimeManager as z
4782
+ toSingleQuotedShellString as x,
4783
+ writeIfChanged as y,
4784
+ clearGitHubTokenEnv as z
4733
4785
  };
4734
- //# sourceMappingURL=setting-Cq6nKJgF.js.map
4786
+ //# sourceMappingURL=setting-CKO-Tb-e.js.map