openmeld 0.3.227 → 0.3.229

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 (93) hide show
  1. package/dist/{add-me-membership-pkREbEJG.js → add-me-membership-25sIYCId.js} +2 -2
  2. package/dist/{add-me-membership-pkREbEJG.js.map → add-me-membership-25sIYCId.js.map} +1 -1
  3. package/dist/{agents-D_RojMEE.js → agents-DqhKdgat.js} +9 -9
  4. package/dist/{agents-D_RojMEE.js.map → agents-DqhKdgat.js.map} +1 -1
  5. package/dist/{api-client-foundation-Czb9hJvA.js → api-client-foundation-DgTXf3Gb.js} +3 -3
  6. package/dist/{api-client-foundation-Czb9hJvA.js.map → api-client-foundation-DgTXf3Gb.js.map} +1 -1
  7. package/dist/{api-client-foundation-CEScBsM7.js → api-client-foundation-d4E5XWdJ.js} +1 -1
  8. package/dist/auth-session-DExyUwLo.js +4 -0
  9. package/dist/{auth-session-Q0B3Nfae.js → auth-session-pLaN5cnC.js} +2 -2
  10. package/dist/{auth-session-Q0B3Nfae.js.map → auth-session-pLaN5cnC.js.map} +1 -1
  11. package/dist/{channel-B1gMWx__.js → channel-DppbHxHw.js} +3 -3
  12. package/dist/{channel-B1gMWx__.js.map → channel-DppbHxHw.js.map} +1 -1
  13. package/dist/{command-B5E_YSAY.js → command-BFIRSLTj.js} +15 -15
  14. package/dist/{command-B5E_YSAY.js.map → command-BFIRSLTj.js.map} +1 -1
  15. package/dist/{computer-connection-BbDdF_MD.js → computer-connection-DMkamVpB.js} +2 -2
  16. package/dist/{computer-connection-BbDdF_MD.js.map → computer-connection-DMkamVpB.js.map} +1 -1
  17. package/dist/{computer-connection-review-Dop02mby.js → computer-connection-review-C9CKzIdH.js} +5 -5
  18. package/dist/{computer-connection-review-Dop02mby.js.map → computer-connection-review-C9CKzIdH.js.map} +1 -1
  19. package/dist/{computer-disconnect-pH6HaHQq.js → computer-disconnect-Cvl_ia32.js} +7 -7
  20. package/dist/{computer-disconnect-pH6HaHQq.js.map → computer-disconnect-Cvl_ia32.js.map} +1 -1
  21. package/dist/{computer-setup-continuation-BhM3HsRI.js → computer-setup-continuation-uFrI9ZaE.js} +3 -3
  22. package/dist/{computer-setup-continuation-BhM3HsRI.js.map → computer-setup-continuation-uFrI9ZaE.js.map} +1 -1
  23. package/dist/{context-D3kAC8RG.js → context-qbQXVLF5.js} +3 -3
  24. package/dist/{context-D3kAC8RG.js.map → context-qbQXVLF5.js.map} +1 -1
  25. package/dist/{daemon-device-id-DEGf1fm6.js → daemon-device-id-B6iDyQEs.js} +4 -4
  26. package/dist/{daemon-device-id-DEGf1fm6.js.map → daemon-device-id-B6iDyQEs.js.map} +1 -1
  27. package/dist/{daemon-frame-transport-BMZP90f0.js → daemon-frame-transport-BQR5LfG2.js} +52 -8
  28. package/dist/{daemon-frame-transport-BMZP90f0.js.map → daemon-frame-transport-BQR5LfG2.js.map} +1 -1
  29. package/dist/{daemon-lifecycle-journal-NeBAn_SY.js → daemon-lifecycle-journal-G_C_pRtu.js} +3 -3
  30. package/dist/{daemon-lifecycle-journal-NeBAn_SY.js.map → daemon-lifecycle-journal-G_C_pRtu.js.map} +1 -1
  31. package/dist/{daemon-service-runtime-nIBQreis.js → daemon-service-runtime-BkVvz7bG.js} +2 -2
  32. package/dist/{daemon-service-runtime-nIBQreis.js.map → daemon-service-runtime-BkVvz7bG.js.map} +1 -1
  33. package/dist/{daemon-service-update-coordinator-BdcEl-QC.js → daemon-service-update-coordinator-UajkUU66.js} +43 -34
  34. package/dist/daemon-service-update-coordinator-UajkUU66.js.map +1 -0
  35. package/dist/{dist-DkN9tKMX.js → dist-CAypwFRu.js} +693 -63
  36. package/dist/dist-CAypwFRu.js.map +1 -0
  37. package/dist/{dist-vpxgF6Lp.js → dist-DFhd6JmQ.js} +2 -2
  38. package/dist/{dist-vpxgF6Lp.js.map → dist-DFhd6JmQ.js.map} +1 -1
  39. package/dist/dist-olOaAWkl.js +4 -0
  40. package/dist/{elapsed-time-BxMWSsxC.js → elapsed-time-UlhDiZjv.js} +5 -5
  41. package/dist/{elapsed-time-BxMWSsxC.js.map → elapsed-time-UlhDiZjv.js.map} +1 -1
  42. package/dist/{entry-jvTvDBr-.js → entry-BotSzkFU.js} +7 -7
  43. package/dist/{entry-jvTvDBr-.js.map → entry-BotSzkFU.js.map} +1 -1
  44. package/dist/{installation-inventory-Bf1SvGVh.js → installation-inventory-BgZq7fWv.js} +3 -3
  45. package/dist/{installation-inventory-Bf1SvGVh.js.map → installation-inventory-BgZq7fWv.js.map} +1 -1
  46. package/dist/{installer-IVAr1ZD-.js → installer-DxU4S_WH.js} +2 -2
  47. package/dist/{installer-IVAr1ZD-.js.map → installer-DxU4S_WH.js.map} +1 -1
  48. package/dist/{meta-api-BYB9vhya.js → meta-api-D0nhhSY7.js} +6 -6
  49. package/dist/{meta-api-BYB9vhya.js.map → meta-api-D0nhhSY7.js.map} +1 -1
  50. package/dist/{openmeld-0pnb6g3R.js → openmeld-BWAL_LKY.js} +822 -36
  51. package/dist/openmeld-BWAL_LKY.js.map +1 -0
  52. package/dist/{openmeld-maintenance-worker-CSes51Vp.js → openmeld-maintenance-worker-DOTHTGQt.js} +9 -9
  53. package/dist/{openmeld-maintenance-worker-CSes51Vp.js.map → openmeld-maintenance-worker-DOTHTGQt.js.map} +1 -1
  54. package/dist/{openmeld-tools-update-join-BlPynw_v.js → openmeld-tools-update-join-DQd7kyjX.js} +4 -4
  55. package/dist/{openmeld-tools-update-join-BlPynw_v.js.map → openmeld-tools-update-join-DQd7kyjX.js.map} +1 -1
  56. package/dist/openmeld.js +4 -4
  57. package/dist/{prepare-provider-runtime-DSKQFj-R.js → prepare-provider-runtime-DDYaeyRp.js} +9 -9
  58. package/dist/{prepare-provider-runtime-DSKQFj-R.js.map → prepare-provider-runtime-DDYaeyRp.js.map} +1 -1
  59. package/dist/{prepare-session-executor-DEJ9OaJh.js → prepare-session-executor-C7n9tbr-.js} +18 -18
  60. package/dist/{prepare-session-executor-DEJ9OaJh.js.map → prepare-session-executor-C7n9tbr-.js.map} +1 -1
  61. package/dist/{process-channel-BIumgluJ.js → process-channel-DmTb_kO4.js} +2 -2
  62. package/dist/{process-channel-BIumgluJ.js.map → process-channel-DmTb_kO4.js.map} +1 -1
  63. package/dist/{runtime-Du3Az4wt.js → runtime-Cxz_FMWn.js} +16 -16
  64. package/dist/{runtime-Du3Az4wt.js.map → runtime-Cxz_FMWn.js.map} +1 -1
  65. package/dist/{runtime-agent-controller-reporting-submission-Bl2CWQ96.js → runtime-agent-controller-reporting-submission-Ba_cI1hv.js} +8 -8
  66. package/dist/{runtime-agent-controller-reporting-submission-Bl2CWQ96.js.map → runtime-agent-controller-reporting-submission-Ba_cI1hv.js.map} +1 -1
  67. package/dist/{runtime-reporting-health-state-CKmph14R.js → runtime-reporting-health-state-BUX4e4x7.js} +9 -9
  68. package/dist/{runtime-reporting-health-state-CKmph14R.js.map → runtime-reporting-health-state-BUX4e4x7.js.map} +1 -1
  69. package/dist/{runtime-transport-DUR91mKK.js → runtime-transport-D4x8_AmR.js} +19 -2
  70. package/dist/runtime-transport-D4x8_AmR.js.map +1 -0
  71. package/dist/{service-Bh1iD84k.js → service-BHNAamFv.js} +18 -18
  72. package/dist/{service-Bh1iD84k.js.map → service-BHNAamFv.js.map} +1 -1
  73. package/dist/{service-account-authorization-CyV8YFAw.js → service-account-authorization-Di59Cjth.js} +2 -2
  74. package/dist/{service-account-authorization-CyV8YFAw.js.map → service-account-authorization-Di59Cjth.js.map} +1 -1
  75. package/dist/{service-account-control-Cc6qVa0m.js → service-account-control-s0OXYGgp.js} +9 -9
  76. package/dist/{service-account-control-Cc6qVa0m.js.map → service-account-control-s0OXYGgp.js.map} +1 -1
  77. package/dist/{service-control-capabilities-D4W3WTHS.js → service-control-capabilities-DrFu2peO.js} +3 -3
  78. package/dist/{service-control-capabilities-D4W3WTHS.js.map → service-control-capabilities-DrFu2peO.js.map} +1 -1
  79. package/dist/{service-control-capabilities-CdVTTNRK.js → service-control-capabilities-LZc_90-g.js} +1 -1
  80. package/dist/{state-ClTXLNB3.js → state-mQWCO2uD.js} +2 -2
  81. package/dist/{state-ClTXLNB3.js.map → state-mQWCO2uD.js.map} +1 -1
  82. package/dist/upgrade-BFwP5HXC.js +4 -0
  83. package/dist/{upgrade-B07Dh83M.js → upgrade-CJn4nMKH.js} +7 -7
  84. package/dist/{upgrade-B07Dh83M.js.map → upgrade-CJn4nMKH.js.map} +1 -1
  85. package/dist/windows/openmeld-windows-process.exe +0 -0
  86. package/package.json +13 -13
  87. package/dist/auth-session-ga82_Wa9.js +0 -4
  88. package/dist/daemon-service-update-coordinator-BdcEl-QC.js.map +0 -1
  89. package/dist/dist-C5emSnFG.js +0 -4
  90. package/dist/dist-DkN9tKMX.js.map +0 -1
  91. package/dist/openmeld-0pnb6g3R.js.map +0 -1
  92. package/dist/runtime-transport-DUR91mKK.js.map +0 -1
  93. package/dist/upgrade-DgTfV7-m.js +0 -4
@@ -2,48 +2,48 @@
2
2
 
3
3
  import { c as toSpaceDispatchLookupUrl, h as toSpaceResultUrl, i as toSpaceContractUrl, l as toSpaceDispatchTraceUrl, r as toSpaceBoardUrl, t as normalizeBaseUrl } from "./urls-CY2uzH2-.js";
4
4
  import { A as profileDir, D as openMeldRootDir, F as resolveOpenMeldEnvPreset, H as skillsDir, I as resolveOpenMeldRootDir, P as resolveOpenMeldCliEntryNameFromArgv, S as openMeldBinDir, U as spacesDir, W as systemDir, i as accountProfileViewPath, j as profileViewPath, o as accountsDir, r as accountProfileSpaceCacheDir, x as openMeldBackupsDir, y as normalizeAccountKey } from "./paths-DSkUuEu3.js";
5
- import { $r as agentActivityInventorySessionStatusSchema, $t as createPluginsApi, Ar as observabilityWakeTraceSelectorSchema, Bt as createCurrentDeviceApi, Cr as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, Dr as spaceDispatchTraceAttemptStatusSchema, Er as resolveSpaceDispatchTraceRootCause, Ht as createFeedbackApi, It as createCenterAgentApi, Jn as OPENMELD_HEADER_PROFILE_ID, Jr as ownerComputerDiagnosticsSchema, Mt as createAgentActivityApi, Nt as createAgentProfileBindingApi, Or as spaceDispatchTraceDispatchStatusSchema, Pn as toStructuredApiClientFailure, Pt as createAgentProfileExecutionModeApi, Qr as agentActivityInventorySessionOriginSchema, Rt as createComputerFileAccessApi, Tr as resolveRuntimeCoordinatorHeadStatusRootCause, Vr as resolvedSpaceMemberProfileSchema, Xr as summarizeComputerFileAccessPolicy, Yr as projectOwnerComputerLocalRuntimes, Yt as createOrganizationApi, Zn as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Zt as createOrganizationSkillsApi, an as createRoutinesApi, bi as agentActivitySnapshotQuerySchema, br as submitFeedbackIssueRequestSchema, dr as agentProfileCreationConfigurationSchema, ei as agentActivitySessionInventoryQuerySchema, en as createPrepareReadinessApi, fr as createAgentProfileCreationRequestBodySchema, jr as projectObservabilityWakeCorrelation, kr as spaceDispatchTraceResponseSchema, ni as localAgentSessionProviderSchema, nr as pluginActionRequestSchema, rn as createProjectsApi, tr as spaceEntryTargetSchema, ur as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, vi as agentActivityProviderSchema, wn as postSpaceWorkHandoff, wr as projectSpaceDispatchTraceFinalVisibleOutcome, yi as agentActivitySessionStatusSchema } from "./dist-DkN9tKMX.js";
5
+ import { Ai as agentActivitySnapshotQuerySchema, An as postSpaceWorkHandoff, Ar as projectSpaceDispatchTraceFinalVisibleOutcome, Bn as toStructuredApiClientFailure, Er as submitFeedbackIssueRequestSchema, Fr as spaceDispatchTraceResponseSchema, Gt as createCurrentDeviceApi, Ir as observabilityWakeTraceSelectorSchema, Lr as projectObservabilityWakeCorrelation, Lt as createAgentActivityApi, Mr as resolveSpaceDispatchTraceRootCause, Nr as spaceDispatchTraceAttemptStatusSchema, Oi as agentActivityProviderSchema, Pr as spaceDispatchTraceDispatchStatusSchema, Rr as ORGANIZATION_SKILL_BUNDLE_MAX_BYTES, Rt as createAgentProfileBindingApi, Ur as organizationSkillFileSchema, Ut as createComputerFileAccessApi, Vt as createCenterAgentApi, Yt as createFileRootApi, Zr as resolvedSpaceMemberProfileSchema, _r as agentProfileCreationConfigurationSchema, ai as projectOwnerComputerLocalRuntimes, an as createPluginsApi, ci as agentActivityInventorySessionOriginSchema, cr as pluginActionRequestSchema, dn as createRoutinesApi, er as OPENMELD_HEADER_PROFILE_ID, fi as localAgentSessionProviderSchema, gr as DEFAULT_AGENT_PROFILE_CREATION_CONFIGURATION, ii as ownerComputerDiagnosticsSchema, jr as resolveRuntimeCoordinatorHeadStatusRootCause, ki as agentActivitySessionStatusSchema, kr as SPACE_DISPATCH_TRACE_RESPONSE_CONTRACT_VERSION_HEADER, li as agentActivityInventorySessionStatusSchema, ln as createProjectsApi, oi as summarizeComputerFileAccessPolicy, on as createPrepareReadinessApi, qt as createFeedbackApi, rn as createOrganizationSkillsApi, rr as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, sr as spaceEntryTargetSchema, tn as createOrganizationApi, ui as agentActivitySessionInventoryQuerySchema, vr as createAgentProfileCreationRequestBodySchema, zr as ORGANIZATION_SKILL_FILE_MAX_BYTES, zt as createAgentProfileExecutionModeApi } from "./dist-CAypwFRu.js";
6
6
  import { c as agentControllerConversationRefSchema } from "./controller-contract-DAOCaefz.js";
7
- import { At as ensureOpenMeldManagedProfileWorkspace, C as createModelCatalogReadSession, E as resolveProfileWorkspaceRuntime, Et as listBuiltinAgentsRegistryEntries, I as listAgentTargetStates, It as setCustomProfileWorkspace, K as notifyDaemonRouteCatalogChanged, Lt as setOpenMeldManagedProfileWorkspace, Mt as readProfileWorkspaceConfig, Nr as compareAgentControllerRefsForDisplay, O as syncDeviceRuntimeStateProjection, Pt as resolveConfiguredProfileWorkspacePath, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, Rt as validateCustomProfileWorkspacePath, S as syncProfileWorkspaceState, Sr as resolveNativeAgentControllerPermissionModeForController, St as canonicalizeLocalProjectPath, _t as removeProjectConnection, br as resolveAgentProfileEditCapabilities, bt as setDefaultProjectConnection, fr as listAgentControllerPermissionModeOptions, ft as listProjectBindings, hr as projectPeopleComputersToLegacyLocalRuntimes, j as resolveAgentProfilePrimaryAgentControllerReport, jt as normalizeCustomProfileWorkspacePath, k as createPrimaryBindingReadSession, lr as getAgentControllerPermissionModeDisplayMetadata, mr as peopleComputerContainsDevice, mt as migrateProjectBindingStore, pr as parseAgentControllerRef, pt as listProjectConnectionsWithStatus, sr as createAgentExecutionStatusDisplayRows, ur as getAgentControllerPermissionModeFieldLabel, ut as bindProject, vr as resolveAgentControllerPermissionModeForController, xr as resolveEvidenceSyncHealth, xt as unbindProject, yr as resolveAgentExecutionStatus, yt as runIfAgentActivityBindingGenerationIsCurrent, zt as describeProfileWorkspacePathValidationFailure } from "./prepare-provider-runtime-DSKQFj-R.js";
8
- import { $t as isSpaceFileTextEditable, An as spaceContractSchema, Bt as centerAgentInteractionSourceSchema, Gt as spaceWorkSelectionSchema, Jt as SPACE_FILE_MAX_SIZE_BYTES, Kt as spaceWorkingCopyResultSchema, Qr as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, Tn as spaceThreadContextSchema, Un as messageEnvelopeSchema, Ut as spaceWorkHandoffSchema, Yr as START_BOUNDED_ID_SCHEMA, Yt as SPACE_FILE_RAW_UPLOAD_MAX_BYTES, br as runtimeTransportAdmissionEvidenceSchema, fr as agentInteractionResponseSchema, hr as clientMessageIdSchema, in as resolveSpaceFileMimeType, kn as spaceContractFieldsSchema, mi as openMeldRequestContextSchema, pi as openMeldProfileIdSchema, zt as spaceStatusSchema } from "./runtime-transport-DUR91mKK.js";
9
- import { C as updateAuthSessionActiveOrganization, T as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, d as getAuthSessionState, f as getCurrentAuthOwnerUserId, g as normalizeStoredActiveOrganization, n as AuthSessionRecoveryInProgressError, o as buildStoredAuthSessionIdentity, s as clearAuthSession, t as AuthSessionChangedBeforeTransitionError, u as getAuthSessionMetadata } from "./auth-session-Q0B3Nfae.js";
7
+ import { At as ensureOpenMeldManagedProfileWorkspace, C as createModelCatalogReadSession, E as resolveProfileWorkspaceRuntime, Et as listBuiltinAgentsRegistryEntries, I as listAgentTargetStates, It as setCustomProfileWorkspace, K as notifyDaemonRouteCatalogChanged, Lt as setOpenMeldManagedProfileWorkspace, Mt as readProfileWorkspaceConfig, Nr as compareAgentControllerRefsForDisplay, O as syncDeviceRuntimeStateProjection, Pt as resolveConfiguredProfileWorkspacePath, Q as resolveLocalRegistryAgentIdFromAgentControllerRef, Rt as validateCustomProfileWorkspacePath, S as syncProfileWorkspaceState, Sr as resolveNativeAgentControllerPermissionModeForController, St as canonicalizeLocalProjectPath, _t as removeProjectConnection, br as resolveAgentProfileEditCapabilities, bt as setDefaultProjectConnection, fr as listAgentControllerPermissionModeOptions, ft as listProjectBindings, hr as projectPeopleComputersToLegacyLocalRuntimes, j as resolveAgentProfilePrimaryAgentControllerReport, jt as normalizeCustomProfileWorkspacePath, k as createPrimaryBindingReadSession, lr as getAgentControllerPermissionModeDisplayMetadata, mr as peopleComputerContainsDevice, mt as migrateProjectBindingStore, pr as parseAgentControllerRef, pt as listProjectConnectionsWithStatus, sr as createAgentExecutionStatusDisplayRows, ur as getAgentControllerPermissionModeFieldLabel, ut as bindProject, vr as resolveAgentControllerPermissionModeForController, xr as resolveEvidenceSyncHealth, xt as unbindProject, yr as resolveAgentExecutionStatus, yt as runIfAgentActivityBindingGenerationIsCurrent, zt as describeProfileWorkspacePathValidationFailure } from "./prepare-provider-runtime-DDYaeyRp.js";
8
+ import { $t as isSpaceFileTextEditable, An as spaceThreadContextSchema, Bt as centerAgentInteractionSourceSchema, Fn as spaceContractSchema, Gt as spaceWorkSelectionSchema, Jn as messageEnvelopeSchema, Jt as SPACE_FILE_MAX_SIZE_BYTES, Kt as spaceWorkingCopyResultSchema, Pn as spaceContractFieldsSchema, Tr as runtimeTransportAdmissionEvidenceSchema, Ut as spaceWorkHandoffSchema, Yt as SPACE_FILE_RAW_UPLOAD_MAX_BYTES, _r as agentInteractionResponseSchema, br as clientMessageIdSchema, ei as START_BOUNDED_ID_SCHEMA, in as resolveSpaceFileMimeType, ri as START_TRIMMED_NON_EMPTY_STRING_SCHEMA, vi as openMeldProfileIdSchema, yi as openMeldRequestContextSchema, zt as spaceStatusSchema } from "./runtime-transport-D4x8_AmR.js";
9
+ import { C as updateAuthSessionActiveOrganization, T as runMacOsNativeKeychainHelperIfRequested, a as beginAuthSessionTransition, d as getAuthSessionState, f as getCurrentAuthOwnerUserId, g as normalizeStoredActiveOrganization, n as AuthSessionRecoveryInProgressError, o as buildStoredAuthSessionIdentity, s as clearAuthSession, t as AuthSessionChangedBeforeTransitionError, u as getAuthSessionMetadata } from "./auth-session-pLaN5cnC.js";
10
10
  import { L as nonEmptyTrimmedStringFromUnknown, O as openMeldRuntimeProfileIdSchema, w as dispatchExecutionSchema, z as trimmedStringFromUnknown } from "./control-plane-rTE2rHZ5.js";
11
- import { t as computerConnectionIntentSchema } from "./computer-connection-BbDdF_MD.js";
12
- import { d as readSelectedSkillDocument, r as ensureLocalSkills } from "./state-ClTXLNB3.js";
13
- import { $ as buildAuthStatusSnapshot, B as resolveDaemonServiceParticipationStatus, C as buildProfileWorkspaceRows, E as emitDaemonAgentOverview, F as emitCliJsonEnvelope, G as ensureCommandAuthenticationOrCancel, H as validateLocalProjectConnectionPath, I as runDaemonStartupPreflight, J as runAuthLogout, K as evaluateCommandAuthentication, M as buildHumanErrorCopy, N as renderHumanErrorCard, O as shouldEmitAgentOverview, P as renderHumanTextErrorCard, Q as buildAuthStatusRows, R as resolveLocalComponentsStatus, S as buildProfileWorkspacePresentation, V as LocalProjectConnectionError, W as buildCommandAuthenticationPromptMessage, X as runAuthStatus, Y as runAuthMenu, Z as exchangeOneTimeTokenAuthSession, a as runDaemonBackgroundStartForDecision, at as promptTextEntry, c as runDaemonInterrupt, ct as finishCurrentCommandCheckScope, dt as resetCurrentCommandCheckState, et as formatActiveOrganizationLabel, f as runDaemonSnapshot, ft as startCurrentCommandCheckScope, g as runDaemonUninstall, h as runDaemonTeardownStrict, i as runDaemonAutostart, j as runDaemonStartDecisionPrompt, l as runDaemonReinstall, lt as getCurrentCommandCheckState, m as runDaemonStop, n as isManagedSystemServiceBootstrapRun, nt as renderInfoCard, o as runDaemonCancel, ot as isReturnKeypress, p as runDaemonStatusFlow, q as runAuthLogin, r as runDaemon, rt as renderTextInfoCard, s as runDaemonInstall, st as runInteractivePrompt, t as bestEffortStopCurrentLaneDaemonService, u as runDaemonRunAfterEntryChecks, ut as isCurrentCommandCheckScopeActive, w as reconcileCliVersionView, x as resolveServiceParticipationReadiness, y as formatServiceParticipationReadinessLabel, z as writeInstalledLocalComponentsSnapshot } from "./service-Bh1iD84k.js";
14
- import { C as readAgentActivityOutboxHealth, Cn as cliJsonSkillsLoadEnvelopeSchema, Dn as organizationJoinLinkErrorResponseSchema, Dt as upsertSpaceConfig, En as getOrganizationJoinLinkResponseSchema, Ft as buildSignalMessageReadProjection, Mt as buildDispatchResultReplyWorkflowProjection, Nt as buildPublicSpaceEntryUrl, On as organizationJoinLinkManagementQuerySchema, Pt as buildSignalIndex, Sn as cliJsonSkillsListEnvelopeSchema, T as removeProjectOutbox, Tn as acceptOrganizationJoinLinkBodySchema, Ut as buildUpdatesReplyWorkflowProjection, Vt as buildSpaceRoundReadProjection, Zt as formatRemovedCcRelationMessage, et as readRecentDaemonDispatchJournalEvents, g as readCodexSessionTitles, gt as inspectSpaceCacheFile, h as normalizeSharedSessionTitle, jt as buildDispatchResultMessageReadProjection, kn as revokeOrganizationJoinLinkResponseSchema, m as resolveObservedAgentActivityBinding, p as buildAgentActivityEvent, qt as createSpaceMemberIdentityIndex, v as enqueueAgentActivityHookEvent, wn as cliJsonSkillsShowEnvelopeSchema, xn as cliJsonOutputEnvelopeSchema, y as removeProjectInbox } from "./daemon-frame-transport-BMZP90f0.js";
15
- import { A as readControllerTaskLifecycleOutboxHealth, B as uninstallAgentActivityIntegrations, D as readAgentActivityContextForPath, I as defaultManagedIntegrationPaths, L as installAgentActivityIntegrations, M as registerAgentActivityRoute, N as resolveAgentActivityRouteForPath, O as removeAgentActivityContextCache, P as unregisterAgentActivityRoute, R as readAgentActivityIntegrationStatus, a as fetchSpaceUpdates, c as materializeOrganizationSkillRelease, d as runSpaceActionHelp, f as runSpaceActionReply, g as runSpaceActionWake, h as runSpaceActionTargets, j as isAgentActivityRouteRegistered, k as enqueueControllerTaskLifecycleEventWhileLocked, m as runSpaceActionStatus, o as createSpaceWorkingCopies, p as runSpaceActionSilent, s as downloadWorkingCopyFile, t as readRuntimeReportingHealthState, u as runSpaceActionMcpServer, w as syncLocalAgentActivity, z as resolveAgentActivityDispatcherCommand } from "./runtime-reporting-health-state-CKmph14R.js";
16
- import { G as readManagedCliInstallation, H as buildInstallSelfJsonPayload, U as performManagedInstall, r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-nIBQreis.js";
17
- import { B as requireOpenMeldProfile, H as createOpenMeldAgentProfile, J as resolveOpenMeldProfile, K as listOpenMeldProfiles, U as createOpenMeldHumanProfile, V as resolveOpenMeldProfileOrNull, W as deleteOpenMeldProfile, X as updateOpenMeldProfile, at as buildAgentAuthenticationGuide, ct as buildHumanAuthenticationCard, dt as resolveAuthenticationGuidance, et as alignSelectedOpenMeldProfileStorage, ft as resolveAuthenticationGuidanceFromError, it as setSelectedOpenMeldProfileId, lt as createAuthenticationError, nt as clearSelectedOpenMeldProfileId, pt as resolveAuthenticationGuidanceFromMessage, q as primeOpenMeldProfilesSessionCache, rt as getSelectedOpenMeldProfileId, z as isSelectedOpenMeldProfileRequiredError } from "./daemon-device-id-DEGf1fm6.js";
11
+ import { t as computerConnectionIntentSchema } from "./computer-connection-DMkamVpB.js";
12
+ import { d as readSelectedSkillDocument, r as ensureLocalSkills } from "./state-mQWCO2uD.js";
13
+ import { $ as buildAuthStatusSnapshot, B as resolveDaemonServiceParticipationStatus, C as buildProfileWorkspaceRows, E as emitDaemonAgentOverview, F as emitCliJsonEnvelope, G as ensureCommandAuthenticationOrCancel, H as validateLocalProjectConnectionPath, I as runDaemonStartupPreflight, J as runAuthLogout, K as evaluateCommandAuthentication, M as buildHumanErrorCopy, N as renderHumanErrorCard, O as shouldEmitAgentOverview, P as renderHumanTextErrorCard, Q as buildAuthStatusRows, R as resolveLocalComponentsStatus, S as buildProfileWorkspacePresentation, V as LocalProjectConnectionError, W as buildCommandAuthenticationPromptMessage, X as runAuthStatus, Y as runAuthMenu, Z as exchangeOneTimeTokenAuthSession, a as runDaemonBackgroundStartForDecision, at as promptTextEntry, c as runDaemonInterrupt, ct as finishCurrentCommandCheckScope, dt as resetCurrentCommandCheckState, et as formatActiveOrganizationLabel, f as runDaemonSnapshot, ft as startCurrentCommandCheckScope, g as runDaemonUninstall, h as runDaemonTeardownStrict, i as runDaemonAutostart, j as runDaemonStartDecisionPrompt, l as runDaemonReinstall, lt as getCurrentCommandCheckState, m as runDaemonStop, n as isManagedSystemServiceBootstrapRun, nt as renderInfoCard, o as runDaemonCancel, ot as isReturnKeypress, p as runDaemonStatusFlow, q as runAuthLogin, r as runDaemon, rt as renderTextInfoCard, s as runDaemonInstall, st as runInteractivePrompt, t as bestEffortStopCurrentLaneDaemonService, u as runDaemonRunAfterEntryChecks, ut as isCurrentCommandCheckScopeActive, w as reconcileCliVersionView, x as resolveServiceParticipationReadiness, y as formatServiceParticipationReadinessLabel, z as writeInstalledLocalComponentsSnapshot } from "./service-BHNAamFv.js";
14
+ import { An as getOrganizationJoinLinkResponseSchema, C as readAgentActivityOutboxHealth, Cn as cliJsonSkillsAddEnvelopeSchema, Dn as cliJsonSkillsScanEnvelopeSchema, Dt as upsertSpaceConfig, En as cliJsonSkillsLoadEnvelopeSchema, Ft as buildSignalMessageReadProjection, Mn as organizationJoinLinkManagementQuerySchema, Mt as buildDispatchResultReplyWorkflowProjection, Nn as revokeOrganizationJoinLinkResponseSchema, Nt as buildPublicSpaceEntryUrl, On as cliJsonSkillsShowEnvelopeSchema, Pt as buildSignalIndex, Sn as cliJsonSkillsAddAllEnvelopeSchema, T as removeProjectOutbox, Tn as cliJsonSkillsListEnvelopeSchema, Ut as buildUpdatesReplyWorkflowProjection, Vt as buildSpaceRoundReadProjection, Zt as formatRemovedCcRelationMessage, et as readRecentDaemonDispatchJournalEvents, g as readCodexSessionTitles, gt as inspectSpaceCacheFile, h as normalizeSharedSessionTitle, jn as organizationJoinLinkErrorResponseSchema, jt as buildDispatchResultMessageReadProjection, kn as acceptOrganizationJoinLinkBodySchema, m as resolveObservedAgentActivityBinding, p as buildAgentActivityEvent, qt as createSpaceMemberIdentityIndex, v as enqueueAgentActivityHookEvent, wn as cliJsonSkillsAddPreviewEnvelopeSchema, xn as cliJsonOutputEnvelopeSchema, y as removeProjectInbox } from "./daemon-frame-transport-BQR5LfG2.js";
15
+ import { A as readControllerTaskLifecycleOutboxHealth, B as uninstallAgentActivityIntegrations, D as readAgentActivityContextForPath, I as defaultManagedIntegrationPaths, L as installAgentActivityIntegrations, M as registerAgentActivityRoute, N as resolveAgentActivityRouteForPath, O as removeAgentActivityContextCache, P as unregisterAgentActivityRoute, R as readAgentActivityIntegrationStatus, a as fetchSpaceUpdates, c as materializeOrganizationSkillRelease, d as runSpaceActionHelp, f as runSpaceActionReply, g as runSpaceActionWake, h as runSpaceActionTargets, j as isAgentActivityRouteRegistered, k as enqueueControllerTaskLifecycleEventWhileLocked, m as runSpaceActionStatus, o as createSpaceWorkingCopies, p as runSpaceActionSilent, s as downloadWorkingCopyFile, t as readRuntimeReportingHealthState, u as runSpaceActionMcpServer, w as syncLocalAgentActivity, z as resolveAgentActivityDispatcherCommand } from "./runtime-reporting-health-state-BUX4e4x7.js";
16
+ import { G as readManagedCliInstallation, H as buildInstallSelfJsonPayload, U as performManagedInstall, r as readCurrentDaemonRuntimeContext } from "./daemon-service-runtime-BkVvz7bG.js";
17
+ import { B as requireOpenMeldProfile, H as createOpenMeldAgentProfile, J as resolveOpenMeldProfile, K as listOpenMeldProfiles, U as createOpenMeldHumanProfile, V as resolveOpenMeldProfileOrNull, W as deleteOpenMeldProfile, X as updateOpenMeldProfile, at as buildAgentAuthenticationGuide, ct as buildHumanAuthenticationCard, dt as resolveAuthenticationGuidance, et as alignSelectedOpenMeldProfileStorage, ft as resolveAuthenticationGuidanceFromError, it as setSelectedOpenMeldProfileId, lt as createAuthenticationError, nt as clearSelectedOpenMeldProfileId, pt as resolveAuthenticationGuidanceFromMessage, q as primeOpenMeldProfilesSessionCache, rt as getSelectedOpenMeldProfileId, z as isSelectedOpenMeldProfileRequiredError } from "./daemon-device-id-B6iDyQEs.js";
18
18
  import { a as activateWindowsManagedCommand } from "./process-identity-BRbhGGTM.js";
19
- import { A as formatDeviceReplyReadinessLabel, B as resolveGatewayChainReadiness, Bt as assessCliUpdate, It as assessServerRequiredVersion, J as getSetupFlowCopy, K as buildDaemonRouteObservationPresentation$1, Mt as classifyDaemonServiceRunStartability, N as mapAgentReplyReadinessToLegacyAutoReply, Nt as classifyDaemonServiceWakeability, O as resolveCurrentReplyReadinessSnapshot, Pt as resolveCurrentDaemonExpectedVersion, T as resolveDaemonServiceFreshnessWarning, U as resolveOpenClawLocalDiagnosticsValue, Vt as isCliUpdateCheckApplicable, _ as resolveServiceReadinessFromServiceStatus, ft as inspectDaemonServiceInventory, j as formatHumanReplyReadinessReason$1, k as formatAgentReplyReadinessLabel, q as buildOnboardingPlan, t as runPendingDaemonServiceUpdate, zt as readCurrentLocalDeviceId } from "./daemon-service-update-coordinator-BdcEl-QC.js";
20
- import { $ as ensureAgentProfileRuntimeBinding, A as assertFullSignalIdArgument, B as resolveAgentProfileSetup, C as buildFormalSignalReadPayload, D as resolveOrganizationVisibilityLabel, E as resolveLinkAccessLabel, F as emitSpaceCliAgentOverview, G as renderOpenMeldHeader, H as colorizeDisplayProfileLabel, I as prepareLocalAgentReadiness, J as resolveSpaceSendText, K as renderOpenMeldLogo, L as buildReplyReadinessGuidance, M as prepareAuthenticatedSpaceCommandContext, N as resolveOpenMeldProfileForSpaceCommand, O as parseEnvelope, P as emitSpaceAgentOverview, Q as resolveCreateProfileName, R as resolveHumanControllerDisplayName, S as buildFormalDispatchResultReadPayload, T as formatHumanReadTargetList, U as printOpenMeldBanner, V as colorizeAgentLabel, W as renderOpenMeldBrandBlockLines, X as createProfileByKind, Y as resolveSpaceTaskSelection, Z as resolveCreateProfileKind, _ as emitHumanReadSignalsTextProjection, a as runSpaceDelete, b as loadSpaceSignalIndexOrNull, c as runSpaceLeave, d as runSpaceRemoveMembers, et as assessActionParticipationCandidate, f as runSpaceSend, g as buildHumanReadSignalsTranscriptItems, h as runSpaceWriteWithPasswordRetry, i as runSpaceCreate, j as assertValidSpaceIdTarget, k as isSpaceCommandOutputHandledError, l as runSpaceList, m as runSpaceReadWithPasswordRetry, n as promptAndConfirmSpacePassword, o as runSpaceHistory, p as runSpaceWatch, q as renderOpenMeldTagline, r as runSpaceAddMembers, s as runSpaceJoin, t as buildCreateSpacePasswordPromptConfig, u as runSpacePassword, v as buildIdentityOnlyMembersSnapshotForReadProjection, w as buildHumanReplyContextSummary, x as toSpaceMetaUpsertInput, y as loadSpaceIdentityDirectoryOrNull, z as persistAgentTransportSelection } from "./command-B5E_YSAY.js";
19
+ import { A as formatDeviceReplyReadinessLabel, B as resolveGatewayChainReadiness, Bt as assessCliUpdate, It as assessServerRequiredVersion, J as getSetupFlowCopy, K as buildDaemonRouteObservationPresentation$1, Mt as classifyDaemonServiceRunStartability, N as mapAgentReplyReadinessToLegacyAutoReply, Nt as classifyDaemonServiceWakeability, O as resolveCurrentReplyReadinessSnapshot, Pt as resolveCurrentDaemonExpectedVersion, T as resolveDaemonServiceFreshnessWarning, U as resolveOpenClawLocalDiagnosticsValue, Vt as isCliUpdateCheckApplicable, _ as resolveServiceReadinessFromServiceStatus, ft as inspectDaemonServiceInventory, j as formatHumanReplyReadinessReason$1, k as formatAgentReplyReadinessLabel, q as buildOnboardingPlan, t as runPendingDaemonServiceUpdate, zt as readCurrentLocalDeviceId } from "./daemon-service-update-coordinator-UajkUU66.js";
20
+ import { $ as ensureAgentProfileRuntimeBinding, A as assertFullSignalIdArgument, B as resolveAgentProfileSetup, C as buildFormalSignalReadPayload, D as resolveOrganizationVisibilityLabel, E as resolveLinkAccessLabel, F as emitSpaceCliAgentOverview, G as renderOpenMeldHeader, H as colorizeDisplayProfileLabel, I as prepareLocalAgentReadiness, J as resolveSpaceSendText, K as renderOpenMeldLogo, L as buildReplyReadinessGuidance, M as prepareAuthenticatedSpaceCommandContext, N as resolveOpenMeldProfileForSpaceCommand, O as parseEnvelope, P as emitSpaceAgentOverview, Q as resolveCreateProfileName, R as resolveHumanControllerDisplayName, S as buildFormalDispatchResultReadPayload, T as formatHumanReadTargetList, U as printOpenMeldBanner, V as colorizeAgentLabel, W as renderOpenMeldBrandBlockLines, X as createProfileByKind, Y as resolveSpaceTaskSelection, Z as resolveCreateProfileKind, _ as emitHumanReadSignalsTextProjection, a as runSpaceDelete, b as loadSpaceSignalIndexOrNull, c as runSpaceLeave, d as runSpaceRemoveMembers, et as assessActionParticipationCandidate, f as runSpaceSend, g as buildHumanReadSignalsTranscriptItems, h as runSpaceWriteWithPasswordRetry, i as runSpaceCreate, j as assertValidSpaceIdTarget, k as isSpaceCommandOutputHandledError, l as runSpaceList, m as runSpaceReadWithPasswordRetry, n as promptAndConfirmSpacePassword, o as runSpaceHistory, p as runSpaceWatch, q as renderOpenMeldTagline, r as runSpaceAddMembers, s as runSpaceJoin, t as buildCreateSpacePasswordPromptConfig, u as runSpacePassword, v as buildIdentityOnlyMembersSnapshotForReadProjection, w as buildHumanReplyContextSummary, x as toSpaceMetaUpsertInput, y as loadSpaceIdentityDirectoryOrNull, z as persistAgentTransportSelection } from "./command-BFIRSLTj.js";
21
21
  import { D as isLocalMachineFailureError, O as toRecognizedLocalMachineFailureError, S as LocalMachineFailureError, T as createOrphanedSetupConcurrencyIssue, _ as resolveCliContext, a as isOpenMeldOrphanedLockError, b as formatLaneScopeSentence, c as releaseLockSync, d as runWithHeldLock, i as isOpenMeldLockError, k as formatLocalMachineIssueMessage, l as repairOrphanedLegacyLocks, m as OPENMELD_CLI_CONTEXT_ENV_KEY, p as LEGACY_OPENMELD_AGENT_SESSION_ENV_KEY, r as buildOpenMeldOrphanedLockAction, t as acquireLock, u as resolveOpenMeldOrphanedLockIssue, w as createActiveSetupConcurrencyIssue, x as resolveOpenMeldLaneDescriptor } from "./lock-CMH9eoS7.js";
22
- import { f as canonicalizeAllowedActions, i as areAllowedActionsEquivalent, o as buildAgentFacingPublicationModeGuideLines, t as OPENMELD_AGENT_MENTAL_MODEL_LINES } from "./dist-vpxgF6Lp.js";
22
+ import { f as canonicalizeAllowedActions, i as areAllowedActionsEquivalent, o as buildAgentFacingPublicationModeGuideLines, t as OPENMELD_AGENT_MENTAL_MODEL_LINES } from "./dist-DFhd6JmQ.js";
23
23
  import { E as updateConfiguredStartV1OnboardingState, S as setConfiguredSkillsConfig, a as resolveBaseUrl, b as setConfiguredBaseUrl, c as resolveExplicitGatewayUrlOrThrow, g as getConfiguredSkillsConfig, m as getConfiguredOnboardingDisclaimerAcceptedAt, o as resolveBaseUrlOrNull, u as alignRuntimeConfigStorage, w as updateConfiguredOnboardingConfig } from "./base-url-eck31vC8.js";
24
24
  import { n as resolveOpenMeldDistribution, t as isBinaryDistribution } from "./distribution-BDQT2ilb.js";
25
25
  import { A as getDaemonStatus } from "./daemon-state-B6G5xe7f.js";
26
26
  import { i as readDaemonServiceContract } from "./daemon-service-contract-DhEfbzHt.js";
27
27
  import { a as formatOpenMeldCliTextBlock, c as resolveSetupFollowUpCliEntryCommand, i as formatOpenMeldCliLine, l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand, r as formatOpenMeldCliCommands, s as formatProfileAwareOpenMeldCliCommands, t as formatInlineOpenMeldCliCommands } from "./cli-entry-command-CR_9QU1i.js";
28
28
  import { r as resolveAuthBaseUrl, t as resolveOpenMeldEnvironmentTarget } from "./openmeld-environment-target-Cw3V0WnE.js";
29
- import { r as runServiceAccountCarrier } from "./service-account-authorization-CyV8YFAw.js";
30
- import { b as requestLocalAgentActivitySync, d as compareSemver, f as ensureVersionStateReady, l as OPENMELD_VERSION, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-NeBAn_SY.js";
31
- import { a as setProfileDefaultView, i as getProfileDefaultView, n as resolveRuntimeContext, r as resolveViewProfileKey, t as parseCliViewMode } from "./context-D3kAC8RG.js";
29
+ import { r as runServiceAccountCarrier } from "./service-account-authorization-Di59Cjth.js";
30
+ import { b as requestLocalAgentActivitySync, d as compareSemver, f as ensureVersionStateReady, l as OPENMELD_VERSION, y as LocalDaemonControlPlaneClientError } from "./daemon-lifecycle-journal-G_C_pRtu.js";
31
+ import { a as setProfileDefaultView, i as getProfileDefaultView, n as resolveRuntimeContext, r as resolveViewProfileKey, t as parseCliViewMode } from "./context-qbQXVLF5.js";
32
32
  import { n as outJsonLine, r as outLine, t as errLine } from "./io-DT66typ4.js";
33
33
  import { n as sanitizeTerminalDisplayText, r as formatMessage, t as createPresenter } from "./presenter-MJ5YgsOT.js";
34
- import { Ct as formatDualViewGuideForDisplay, D as createSpaceContractSetGuideError, E as createSpaceAliasTargetGuideError, J as createStartAuthenticationGuideError, K as createSpaceUpdatesGuideError, L as createSpaceRemoveMembersGuideError, M as createSpaceMenuGuideError, P as createSpacePublicationSetGuideError, R as createSpaceResultGuideError, S as createResetConfirmationGuideError, St as DualViewGuideError, T as createSpaceAddMembersGuideError, Tt as formatAgentOverviewPayload, U as createSpaceSubcommandTargetGuideError, W as createSpaceTargetGuideError, Z as getCommandHintsFromContract, b as createProfileCreateGuideError, ct as registerSkillsTargetSelectionOptions, dt as getCliVersionInfo, et as registerSpaceMemberSelectionOptions, ft as registerDaemonControlTargetOptions, g as canUseInteractivePrompts, j as createSpaceLeaveGuideError, mt as registerAuthLoginRequestOptions, q as createStartAgentIdentityGuideError, rt as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, v as createDoctorFailedGuideError, wt as buildDualViewGuideMessage, x as createProfileMenuGuideError, y as createProfileActionGuideError, yt as registerBuiltinAgentSelectionOptions } from "./elapsed-time-BxMWSsxC.js";
35
- import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-Czb9hJvA.js";
36
- import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-Bf1SvGVh.js";
37
- import { t as runServiceAccountControl } from "./service-account-control-Cc6qVa0m.js";
38
- import { C as buildNoLocalAgentsNoticeLines, D as recoverInterruptedComputerAuthHandoff, E as formatComputerAuthCleanupFailureSuffix, O as exchangeComputerAuthorizationGrant, S as buildLocalAgentsGuideUrl, T as emitUnusedSetupSessionCleanupWarning, _ as runStartLocalAgentsEnable, a as assertSetupServiceUpdateComplete, b as submitSelectedAgentControllerReports, c as collectObservedDeviceMetadata, d as collectStartLocalReadiness, f as runSkillsCheck$1, g as runSkillsUpdate, h as runSkillsUninstall, i as runPrepareSessionExecutor, j as writePrepareSessionSetupBootstrapResult, k as revokePreparedAuthSession, l as createSetupProgressReporter, m as runSkillsInstall, n as reportPrepareHandoffStopped, o as shouldForceSetupServiceRefresh, p as runSkillsEnsure, r as resolvePrepareSessionForHandoff, s as syncLocalSetupCurrentDeviceTargetFromServiceContract, t as connectPrepareSessionStream, u as resolveControllingTerminalSession, v as isCliOutputHandledError, w as confirmContinueWithoutLocalAgents, x as appendLocalAgentsGuideUrl, y as assertSelectedAgentControllerReportSubmissionsAccepted } from "./prepare-session-executor-DEJ9OaJh.js";
39
- import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, a as runAgentsCustomRemove, c as runAgentsDisable, d as runAgentsManage, f as runAgentsRepair, h as promptSearchMultiselect, i as runAgentsCustomList, l as runAgentsEnable, m as formatTransportModeDisplay, n as runAgentsConfig, o as runAgentsCustomUpdate, p as runAgentsShow, r as runAgentsCustomAdd, s as runAgentsDetect, t as runAgents, u as runAgentsList, w as resolveSpaceWebGatewayOrigin } from "./agents-D_RojMEE.js";
40
- import { n as submitProfileRuntimeAgentControllerReport, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-Bl2CWQ96.js";
41
- import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1 } from "./upgrade-B07Dh83M.js";
42
- import { c as toStructuredGatewayFailure, f as createCliSpaceApi, h as readDispatchOwnedRuntimeGuard, l as parseJsonResponse, n as updateSpaceMeta, o as readGatewayJsonResponse, p as assertDispatchOwnedRuntimePublicWriteAllowed, s as readGatewayTextResponse, t as fetchSpaceMeta, x as readDispatchSpaceActionContextFromEnv } from "./meta-api-BYB9vhya.js";
34
+ import { Ct as formatDualViewGuideForDisplay, D as createSpaceContractSetGuideError, E as createSpaceAliasTargetGuideError, J as createStartAuthenticationGuideError, K as createSpaceUpdatesGuideError, L as createSpaceRemoveMembersGuideError, M as createSpaceMenuGuideError, P as createSpacePublicationSetGuideError, R as createSpaceResultGuideError, S as createResetConfirmationGuideError, St as DualViewGuideError, T as createSpaceAddMembersGuideError, Tt as formatAgentOverviewPayload, U as createSpaceSubcommandTargetGuideError, W as createSpaceTargetGuideError, Z as getCommandHintsFromContract, b as createProfileCreateGuideError, ct as registerSkillsTargetSelectionOptions, dt as getCliVersionInfo, et as registerSpaceMemberSelectionOptions, ft as registerDaemonControlTargetOptions, g as canUseInteractivePrompts, j as createSpaceLeaveGuideError, mt as registerAuthLoginRequestOptions, q as createStartAgentIdentityGuideError, rt as SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS, v as createDoctorFailedGuideError, wt as buildDualViewGuideMessage, x as createProfileMenuGuideError, y as createProfileActionGuideError, yt as registerBuiltinAgentSelectionOptions } from "./elapsed-time-UlhDiZjv.js";
35
+ import { c as buildRequestAuthHeaders, d as buildOpenMeldRequestContextFromProfile, n as fetchSpaceRequestWithTimeout, p as deriveAuthBaseUrlFromGatewayUrl, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-DgTXf3Gb.js";
36
+ import { n as collectSkillsReadinessSnapshot } from "./installation-inventory-BgZq7fWv.js";
37
+ import { t as runServiceAccountControl } from "./service-account-control-s0OXYGgp.js";
38
+ import { C as buildNoLocalAgentsNoticeLines, D as recoverInterruptedComputerAuthHandoff, E as formatComputerAuthCleanupFailureSuffix, O as exchangeComputerAuthorizationGrant, S as buildLocalAgentsGuideUrl, T as emitUnusedSetupSessionCleanupWarning, _ as runStartLocalAgentsEnable, a as assertSetupServiceUpdateComplete, b as submitSelectedAgentControllerReports, c as collectObservedDeviceMetadata, d as collectStartLocalReadiness, f as runSkillsCheck$1, g as runSkillsUpdate, h as runSkillsUninstall, i as runPrepareSessionExecutor, j as writePrepareSessionSetupBootstrapResult, k as revokePreparedAuthSession, l as createSetupProgressReporter, m as runSkillsInstall, n as reportPrepareHandoffStopped, o as shouldForceSetupServiceRefresh, p as runSkillsEnsure, r as resolvePrepareSessionForHandoff, s as syncLocalSetupCurrentDeviceTargetFromServiceContract, t as connectPrepareSessionStream, u as resolveControllingTerminalSession, v as isCliOutputHandledError, w as confirmContinueWithoutLocalAgents, x as appendLocalAgentsGuideUrl, y as assertSelectedAgentControllerReportSubmissionsAccepted } from "./prepare-session-executor-C7n9tbr-.js";
39
+ import { C as resolveGatewayWebOrigin, T as runDaemonServiceParticipationGate, _ as promptSearchSelect, a as runAgentsCustomRemove, c as runAgentsDisable, d as runAgentsManage, f as runAgentsRepair, h as promptSearchMultiselect, i as runAgentsCustomList, l as runAgentsEnable, m as formatTransportModeDisplay, n as runAgentsConfig, o as runAgentsCustomUpdate, p as runAgentsShow, r as runAgentsCustomAdd, s as runAgentsDetect, t as runAgents, u as runAgentsList, w as resolveSpaceWebGatewayOrigin } from "./agents-DqhKdgat.js";
40
+ import { n as submitProfileRuntimeAgentControllerReport, r as submitRuntimeAgentControllerReport } from "./runtime-agent-controller-reporting-submission-Ba_cI1hv.js";
41
+ import { a as runUpgrade, c as OPENMELD_UPGRADE_FAILURE_HINTS, l as OPENMELD_UPGRADE_METADATA_RECOVERY_HINTS, n as isUpgradeOutputHandledError, o as emitTopLevelAgentOverview, s as emitTopLevelCliAgentOverview, t as UPGRADE_INTERNAL_ALIGN_SERVICE_FLAG$1 } from "./upgrade-CJn4nMKH.js";
42
+ import { c as toStructuredGatewayFailure, f as createCliSpaceApi, h as readDispatchOwnedRuntimeGuard, l as parseJsonResponse, n as updateSpaceMeta, o as readGatewayJsonResponse, p as assertDispatchOwnedRuntimePublicWriteAllowed, s as readGatewayTextResponse, t as fetchSpaceMeta, x as readDispatchSpaceActionContextFromEnv } from "./meta-api-D0nhhSY7.js";
43
43
  import { createHash, randomUUID } from "node:crypto";
44
44
  import { homedir, tmpdir } from "node:os";
45
- import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
46
- import { appendFile, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
45
+ import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
46
+ import { appendFile, link, lstat, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
47
47
  import * as z$1 from "zod/v4";
48
48
  import { openAsBlob, realpathSync } from "node:fs";
49
49
  import process$1 from "node:process";
@@ -1877,6 +1877,16 @@ const COMMAND_CHECK_REQUIREMENTS = Object.freeze({
1877
1877
  "skills.install": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE),
1878
1878
  "skills.uninstall": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE),
1879
1879
  "skills.list": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1880
+ "skills.add": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1881
+ "skills.scan": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1882
+ "files.list": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1883
+ "files.read": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1884
+ "files.history": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1885
+ "files.copy": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1886
+ "files.copy-to-space": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1887
+ "files.upload": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1888
+ "files.write": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1889
+ "files.download": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1880
1890
  "skills.show": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1881
1891
  "skills.load": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE, REQUIRED_SIGN_IN),
1882
1892
  "skills.check": buildCommandChecks(REQUIRED_DISCLAIMER, OPTIONAL_CLI_UPDATE),
@@ -2036,6 +2046,14 @@ const COMMAND_ENTRY_NAME_BY_ROUTE = {
2036
2046
  login: "auth.login",
2037
2047
  logout: "auth.logout",
2038
2048
  skills: "skills.menu",
2049
+ "files list": "files.list",
2050
+ "files read": "files.read",
2051
+ "files history": "files.history",
2052
+ "files copy": "files.copy",
2053
+ "files copy-to-space": "files.copy-to-space",
2054
+ "files upload": "files.upload",
2055
+ "files write": "files.write",
2056
+ "files download": "files.download",
2039
2057
  "plugins list": "plugins.list",
2040
2058
  "plugins actions": "plugins.actions",
2041
2059
  "plugins call": "plugins.call",
@@ -2043,6 +2061,8 @@ const COMMAND_ENTRY_NAME_BY_ROUTE = {
2043
2061
  "skills install": "skills.install",
2044
2062
  "skills uninstall": "skills.uninstall",
2045
2063
  "skills list": "skills.list",
2064
+ "skills add": "skills.add",
2065
+ "skills scan": "skills.scan",
2046
2066
  "skills ls": "skills.list",
2047
2067
  "skills show": "skills.show",
2048
2068
  "skills load": "skills.load",
@@ -2597,6 +2617,46 @@ const COMMAND_ENTRY_COPY_BY_NAME = Object.freeze({
2597
2617
  signInAction: "reading Organization Skills",
2598
2618
  profileAction: null
2599
2619
  },
2620
+ "files.list": {
2621
+ ...DEFAULT_COPY,
2622
+ signInAction: "listing files",
2623
+ profileAction: null
2624
+ },
2625
+ "files.read": {
2626
+ ...DEFAULT_COPY,
2627
+ signInAction: "reading a file",
2628
+ profileAction: null
2629
+ },
2630
+ "files.history": {
2631
+ ...DEFAULT_COPY,
2632
+ signInAction: "reading file history",
2633
+ profileAction: null
2634
+ },
2635
+ "files.copy": {
2636
+ ...DEFAULT_COPY,
2637
+ signInAction: "copying a file",
2638
+ profileAction: null
2639
+ },
2640
+ "files.copy-to-space": {
2641
+ ...DEFAULT_COPY,
2642
+ signInAction: "copying a file to a Space",
2643
+ profileAction: null
2644
+ },
2645
+ "files.upload": {
2646
+ ...DEFAULT_COPY,
2647
+ signInAction: "uploading a file",
2648
+ profileAction: null
2649
+ },
2650
+ "files.write": {
2651
+ ...DEFAULT_COPY,
2652
+ signInAction: "updating a file",
2653
+ profileAction: null
2654
+ },
2655
+ "files.download": {
2656
+ ...DEFAULT_COPY,
2657
+ signInAction: "downloading a file",
2658
+ profileAction: null
2659
+ },
2600
2660
  "skills.ensure": {
2601
2661
  ...DEFAULT_COPY,
2602
2662
  signInAction: null,
@@ -2617,6 +2677,16 @@ const COMMAND_ENTRY_COPY_BY_NAME = Object.freeze({
2617
2677
  signInAction: "listing Organization Skills",
2618
2678
  profileAction: null
2619
2679
  },
2680
+ "skills.add": {
2681
+ ...DEFAULT_COPY,
2682
+ signInAction: "adding a Team Skill",
2683
+ profileAction: null
2684
+ },
2685
+ "skills.scan": {
2686
+ ...DEFAULT_COPY,
2687
+ signInAction: "reviewing a GitHub Skill repository",
2688
+ profileAction: null
2689
+ },
2620
2690
  "plugins.list": {
2621
2691
  ...DEFAULT_COPY,
2622
2692
  signInAction: "listing available plugin accounts",
@@ -17566,6 +17636,333 @@ function resolveWhoamiAgentProfileStateRows(profile) {
17566
17636
  return buildAgentProfileStateRows(profile);
17567
17637
  }
17568
17638
  //#endregion
17639
+ //#region src/files/download.ts
17640
+ /** Publish a complete download atomically without replacing an existing file by default. */
17641
+ async function saveFileDownload(input) {
17642
+ const temporary = join(dirname(input.destination), `.${basename(input.destination)}.openmeld-${randomUUID()}.tmp`);
17643
+ let received = 0;
17644
+ const chunks = async function* () {
17645
+ const reader = input.bytes.getReader();
17646
+ try {
17647
+ for (;;) {
17648
+ const chunk = await reader.read();
17649
+ if (chunk.done) break;
17650
+ received += chunk.value.byteLength;
17651
+ if (received > input.sizeBytes) throw new Error("The downloaded file exceeded its declared size.");
17652
+ yield chunk.value;
17653
+ }
17654
+ } finally {
17655
+ await reader.cancel();
17656
+ reader.releaseLock();
17657
+ }
17658
+ };
17659
+ try {
17660
+ await writeFile(temporary, chunks(), { flag: "wx" });
17661
+ if (received !== input.sizeBytes) throw new Error("The downloaded file was incomplete.");
17662
+ if (input.force) await rename(temporary, input.destination);
17663
+ else await link(temporary, input.destination);
17664
+ return received;
17665
+ } finally {
17666
+ await rm(temporary, { force: true });
17667
+ }
17668
+ }
17669
+ //#endregion
17670
+ //#region src/files/command.ts
17671
+ function location(value) {
17672
+ if (value === "team" || value === "my") return value;
17673
+ throw new Error("Choose --location team or --location my.");
17674
+ }
17675
+ function folder(value) {
17676
+ const id = value?.trim();
17677
+ return !id || id === "root" ? null : id;
17678
+ }
17679
+ function revision(value) {
17680
+ if (value === void 0) return;
17681
+ const parsed = Number(value);
17682
+ if (!Number.isSafeInteger(parsed) || parsed < 1) throw new Error("--revision must be a positive whole number.");
17683
+ return parsed;
17684
+ }
17685
+ async function withFiles(input) {
17686
+ const targetLocation = location(input.location);
17687
+ const presenter = createPresenter(await resolveRuntimeContext({ view: input.command.optsWithGlobals().view }));
17688
+ const auth = await getAuthSessionState({ validateRemote: true });
17689
+ const organization = auth.session?.activeOrganization;
17690
+ if (auth.state !== "valid" || !organization) throw new Error("Sign in and choose an active Team before using Files. Run `openmeld login`, then `openmeld org switch <slug>`.");
17691
+ const api = createFileRootApi(createCliApiClientFoundation(await resolveBaseUrl(), { organizationId: organization.id }));
17692
+ await input.run({
17693
+ api,
17694
+ location: targetLocation,
17695
+ presenter,
17696
+ output: (code, value, human) => {
17697
+ if (input.json) outJsonLine(value);
17698
+ else if (presenter.view === "agent") presenter.data({
17699
+ code,
17700
+ payload: value
17701
+ });
17702
+ else human();
17703
+ }
17704
+ });
17705
+ }
17706
+ function showEntry(entry) {
17707
+ return entry.kind === "folder" ? `[folder] ${entry.name} id=${entry.id}` : `[file] ${entry.name} revision=${entry.latestRevision.revision} size=${entry.latestRevision.sizeBytes} id=${entry.id}`;
17708
+ }
17709
+ function showList(input) {
17710
+ input.presenter.line({
17711
+ code: "files.list.location",
17712
+ text: `${input.location === "team" ? "Team files" : "My files"} / ${input.result.breadcrumbs.map((item) => item.name).join(" / ")}:`
17713
+ });
17714
+ for (const entry of input.result.entries) input.presenter.line({
17715
+ code: "files.list.entry",
17716
+ text: showEntry(entry),
17717
+ data: { entry }
17718
+ });
17719
+ if (input.result.entries.length === 0) input.presenter.line({
17720
+ code: "files.list.empty",
17721
+ text: input.result.view === "trash" ? "Trash is empty." : "This folder is empty."
17722
+ });
17723
+ }
17724
+ function registerFilesCommands(program, runChecked) {
17725
+ const files = program.command("files").description("Work with Team files or your private files.");
17726
+ files.command("list").description("List a Files location or folder.").requiredOption("--location <team|my>", "Team files or My files").option("--folder <id>", "Folder ID, or root", "root").option("--trash", "List Trash", false).option("--json", "Print canonical JSON", false).action(async (opts, command) => {
17727
+ await runChecked(["files", "list"], async () => {
17728
+ await withFiles({
17729
+ command,
17730
+ json: opts.json === true,
17731
+ location: opts.location,
17732
+ run: async ({ api, location: target, output, presenter }) => {
17733
+ const result = await api.list({
17734
+ location: target,
17735
+ parentId: folder(opts.folder),
17736
+ view: opts.trash ? "trash" : "active"
17737
+ });
17738
+ output("files.list", result, () => showList({
17739
+ location: target,
17740
+ presenter,
17741
+ result
17742
+ }));
17743
+ }
17744
+ });
17745
+ });
17746
+ });
17747
+ files.command("read").description("Print a text file, optionally at an exact revision.").argument("<file-id>", "File ID").requiredOption("--location <team|my>", "Team files or My files").option("--revision <number>", "Exact revision").option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17748
+ await runChecked(["files", "read"], async () => {
17749
+ await withFiles({
17750
+ command,
17751
+ json: opts.json === true,
17752
+ location: opts.location,
17753
+ run: async ({ api, location: target, output, presenter }) => {
17754
+ const [file, content] = await Promise.all([api.getFile({
17755
+ location: target,
17756
+ fileId
17757
+ }), api.download({
17758
+ location: target,
17759
+ fileId,
17760
+ revision: revision(opts.revision)
17761
+ })]);
17762
+ if (!isSpaceFileTextEditable({
17763
+ mimeType: content.mimeType,
17764
+ sizeBytes: content.bytes.byteLength
17765
+ })) throw new Error("This file is binary or too large to print. Open it in Files.");
17766
+ const result = {
17767
+ file,
17768
+ revision: content.revision,
17769
+ content: new TextDecoder("utf-8", { fatal: true }).decode(content.bytes)
17770
+ };
17771
+ output("files.read", result, () => presenter.line({
17772
+ code: "files.read",
17773
+ text: result.content
17774
+ }));
17775
+ }
17776
+ });
17777
+ });
17778
+ });
17779
+ files.command("history").description("List saved revisions of a file.").argument("<file-id>", "File ID").requiredOption("--location <team|my>", "Team files or My files").option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17780
+ await runChecked(["files", "history"], async () => {
17781
+ await withFiles({
17782
+ command,
17783
+ json: opts.json === true,
17784
+ location: opts.location,
17785
+ run: async ({ api, location: target, output, presenter }) => {
17786
+ const result = await api.listRevisions({
17787
+ location: target,
17788
+ fileId
17789
+ });
17790
+ output("files.history", result, () => {
17791
+ presenter.line({
17792
+ code: "files.history.file",
17793
+ text: `Version history for ${result.file.path}:`
17794
+ });
17795
+ for (const item of result.revisions) presenter.line({
17796
+ code: "files.history.revision",
17797
+ text: `Version ${item.revision} ${item.createdAt} ${item.sizeBytes} bytes`
17798
+ });
17799
+ });
17800
+ }
17801
+ });
17802
+ });
17803
+ });
17804
+ files.command("copy").description("Copy one saved revision between Team files and My files.").argument("<file-id>", "Source file ID").requiredOption("--source-location <team|my>", "Where the source file is").requiredOption("--location <team|my>", "Destination Files location").requiredOption("--revision <number>", "Exact source revision to copy").option("--folder <id>", "Destination folder ID, or root", "root").option("--name <name>", "Name for the new copy").option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17805
+ await runChecked(["files", "copy"], async () => {
17806
+ await withFiles({
17807
+ command,
17808
+ json: opts.json === true,
17809
+ location: opts.location,
17810
+ run: async ({ api, location: destination, output, presenter }) => {
17811
+ const sourceLocation = location(opts.sourceLocation);
17812
+ const sourceRevision = revision(opts.revision);
17813
+ if (sourceRevision === void 0) throw new Error("--revision is required.");
17814
+ const source = await api.getFile({
17815
+ location: sourceLocation,
17816
+ fileId
17817
+ });
17818
+ const result = await api.copyRevision({
17819
+ location: destination,
17820
+ body: {
17821
+ sourceLocation,
17822
+ sourceFileId: fileId,
17823
+ sourceRevision,
17824
+ name: opts.name?.trim() || source.name,
17825
+ parentId: folder(opts.folder),
17826
+ clientMutationId: randomUUID()
17827
+ }
17828
+ });
17829
+ output("files.copy", result, () => presenter.line({
17830
+ code: "files.copied",
17831
+ text: `Copied revision ${sourceRevision} to ${destination === "team" ? "Team files" : "My files"} as ${result.file.path}.`
17832
+ }));
17833
+ }
17834
+ });
17835
+ });
17836
+ });
17837
+ files.command("copy-to-space").description("Copy one saved Team or My file revision into a Space.").argument("<file-id>", "Source file ID").requiredOption("--source-location <team|my>", "Where the source file is").requiredOption("--space <id>", "Destination Space ID").requiredOption("--revision <number>", "Exact source revision to copy").option("--folder <id>", "Destination folder ID, or root", "root").option("--name <name>", "Name for the new copy").option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17838
+ await runChecked(["files", "copy-to-space"], async () => {
17839
+ await withFiles({
17840
+ command,
17841
+ json: opts.json === true,
17842
+ location: opts.sourceLocation,
17843
+ run: async ({ api, location: sourceLocation, output, presenter }) => {
17844
+ const sourceRevision = revision(opts.revision);
17845
+ if (sourceRevision === void 0) throw new Error("--revision is required.");
17846
+ const source = await api.getFile({
17847
+ location: sourceLocation,
17848
+ fileId
17849
+ });
17850
+ const spaceId = opts.space?.trim();
17851
+ if (!spaceId) throw new Error("Choose a destination Space ID with --space.");
17852
+ const result = await api.copyToSpace({
17853
+ spaceId,
17854
+ body: {
17855
+ sourceLocation,
17856
+ sourceFileId: fileId,
17857
+ sourceRevision,
17858
+ name: opts.name?.trim() || source.name,
17859
+ parentId: folder(opts.folder),
17860
+ clientMutationId: randomUUID()
17861
+ }
17862
+ });
17863
+ output("files.copy_to_space", {
17864
+ file: result,
17865
+ spaceId
17866
+ }, () => presenter.line({
17867
+ code: "files.copied_to_space",
17868
+ text: `Copied revision ${sourceRevision} to Space ${spaceId} as ${result.path}.`
17869
+ }));
17870
+ }
17871
+ });
17872
+ });
17873
+ });
17874
+ files.command("upload").description("Upload a local file to Team files or My files.").argument("<file>", "Local file path").requiredOption("--location <team|my>", "Team files or My files").option("--folder <id>", "Destination folder ID, or root", "root").option("--name <name>", "Name shown in Files").option("--type <mime-type>", "File media type").option("--json", "Print canonical JSON", false).action(async (path, opts, command) => {
17875
+ await runChecked(["files", "upload"], async () => {
17876
+ await withFiles({
17877
+ command,
17878
+ json: opts.json === true,
17879
+ location: opts.location,
17880
+ run: async ({ api, location: target, output, presenter }) => {
17881
+ const bytes = await openAsBlob(path);
17882
+ if (bytes.size > 1073741824) throw new Error("This file is too large for Files.");
17883
+ const result = await api.upload({
17884
+ location: target,
17885
+ bytes,
17886
+ name: opts.name?.trim() || basename(path),
17887
+ parentId: folder(opts.folder),
17888
+ mimeType: resolveSpaceFileMimeType({
17889
+ declaredMimeType: opts.type,
17890
+ fileName: path
17891
+ }),
17892
+ clientMutationId: randomUUID()
17893
+ });
17894
+ output("files.upload", { file: result }, () => presenter.line({
17895
+ code: "files.uploaded",
17896
+ text: `Uploaded ${result.path} (revision ${result.latestRevision.revision}).`
17897
+ }));
17898
+ }
17899
+ });
17900
+ });
17901
+ });
17902
+ files.command("write").description("Save a new file revision after reading the current one.").argument("<file-id>", "File ID").requiredOption("--location <team|my>", "Team files or My files").requiredOption("--base-revision <number>", "Revision being replaced").requiredOption("--file <path>", "Local file with the replacement content").option("--type <mime-type>", "File media type").option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17903
+ await runChecked(["files", "write"], async () => {
17904
+ await withFiles({
17905
+ command,
17906
+ json: opts.json === true,
17907
+ location: opts.location,
17908
+ run: async ({ api, location: target, output, presenter }) => {
17909
+ const baseRevision = revision(opts.baseRevision);
17910
+ if (baseRevision === void 0) throw new Error("--base-revision is required.");
17911
+ const bytes = await openAsBlob(opts.file);
17912
+ if (bytes.size > 1073741824) throw new Error("This file is too large for Files.");
17913
+ const file = await api.updateContent({
17914
+ location: target,
17915
+ fileId,
17916
+ bytes,
17917
+ mimeType: resolveSpaceFileMimeType({
17918
+ declaredMimeType: opts.type,
17919
+ fileName: opts.file
17920
+ }),
17921
+ baseRevision,
17922
+ clientMutationId: randomUUID()
17923
+ });
17924
+ output("files.write", { file }, () => presenter.line({
17925
+ code: "files.updated",
17926
+ text: `Saved ${file.path} as revision ${file.latestRevision.revision}.`
17927
+ }));
17928
+ }
17929
+ });
17930
+ });
17931
+ });
17932
+ files.command("download").description("Save a file revision to a local path, including binary files.").argument("<file-id>", "File ID").requiredOption("--location <team|my>", "Team files or My files").requiredOption("--output <path>", "Local destination path").option("--revision <number>", "Exact revision").option("--force", "Replace an existing local file", false).option("--json", "Print canonical JSON", false).action(async (fileId, opts, command) => {
17933
+ await runChecked(["files", "download"], async () => {
17934
+ await withFiles({
17935
+ command,
17936
+ json: opts.json === true,
17937
+ location: opts.location,
17938
+ run: async ({ api, location: target, output, presenter }) => {
17939
+ const content = await api.streamContent({
17940
+ location: target,
17941
+ fileId,
17942
+ revision: revision(opts.revision)
17943
+ });
17944
+ const destination = String(opts.output);
17945
+ const received = await saveFileDownload({
17946
+ bytes: content.bytes,
17947
+ destination,
17948
+ force: opts.force === true,
17949
+ sizeBytes: content.sizeBytes
17950
+ });
17951
+ output("files.download", {
17952
+ output: destination,
17953
+ revision: content.revision,
17954
+ mimeType: content.mimeType,
17955
+ sizeBytes: received
17956
+ }, () => presenter.line({
17957
+ code: "files.downloaded",
17958
+ text: `Downloaded revision ${content.revision} to ${destination}.`
17959
+ }));
17960
+ }
17961
+ });
17962
+ });
17963
+ });
17964
+ }
17965
+ //#endregion
17569
17966
  //#region src/lib/number-options.ts
17570
17967
  const NON_NEGATIVE_INTEGER_RE = /^(0|[1-9][0-9]*)$/;
17571
17968
  function parseNonNegativeIntegerOption(raw, optionName) {
@@ -18974,6 +19371,7 @@ const TOP_LEVEL_HELP_EXAMPLES = [
18974
19371
  "openmeld prompt commands --raw",
18975
19372
  "openmeld skills",
18976
19373
  "openmeld skills list",
19374
+ "openmeld skills add <github-url> --preview",
18977
19375
  "openmeld skills show <name-or-id>",
18978
19376
  "openmeld skills load <name-or-id> --view agent",
18979
19377
  "openmeld agents",
@@ -20052,6 +20450,82 @@ async function runOrganizationInvitationRequests(input) {
20052
20450
  }
20053
20451
  }
20054
20452
  //#endregion
20453
+ //#region src/organization-skills/local-source.ts
20454
+ const mediaTypes = {
20455
+ ".csv": "text/csv",
20456
+ ".gif": "image/gif",
20457
+ ".jpeg": "image/jpeg",
20458
+ ".jpg": "image/jpeg",
20459
+ ".json": "application/json",
20460
+ ".md": "text/markdown",
20461
+ ".pdf": "application/pdf",
20462
+ ".png": "image/png",
20463
+ ".svg": "image/svg+xml",
20464
+ ".txt": "text/plain",
20465
+ ".webp": "image/webp",
20466
+ ".yaml": "application/yaml",
20467
+ ".yml": "application/yaml"
20468
+ };
20469
+ async function readLocalSkillFiles(directory) {
20470
+ const root = resolve(directory);
20471
+ if (!(await lstat(root)).isDirectory()) throw new Error("Choose a Skill directory containing SKILL.md.");
20472
+ const paths = await listLocalSkillPaths(root);
20473
+ if (paths.length > 257) throw new Error(`This Skill has too many files. The limit is 256 supporting files.`);
20474
+ const files = [];
20475
+ let totalBytes = 0;
20476
+ for (const absolute of paths) {
20477
+ const info = await lstat(absolute);
20478
+ if (!info.isFile() || info.isSymbolicLink()) throw new Error(`Skill file changed while it was being read: ${absolute}`);
20479
+ if (info.size > 2e6) throw new Error(`${absolute} exceeds the ${ORGANIZATION_SKILL_FILE_MAX_BYTES}-byte single-file limit.`);
20480
+ totalBytes += info.size;
20481
+ if (totalBytes > 8e6) throw new Error(`This Skill exceeds the ${ORGANIZATION_SKILL_BUNDLE_MAX_BYTES}-byte package limit.`);
20482
+ files.push(await readLocalSkillFile(root, absolute, info.size));
20483
+ }
20484
+ if (!files.some((file) => file.path === "SKILL.md")) throw new Error("Choose a Skill directory containing SKILL.md at its root.");
20485
+ return files;
20486
+ }
20487
+ async function listLocalSkillPaths(root) {
20488
+ const paths = [];
20489
+ const visit = async (current) => {
20490
+ const entries = (await readdir(current, { withFileTypes: true })).sort((left, right) => left.name.localeCompare(right.name));
20491
+ for (const entry of entries) {
20492
+ if (entry.name === ".git") continue;
20493
+ const absolute = join(current, entry.name);
20494
+ const info = await lstat(absolute);
20495
+ if (info.isSymbolicLink()) throw new Error(`Skill packages cannot contain symbolic links: ${absolute}`);
20496
+ if (info.isDirectory()) {
20497
+ await visit(absolute);
20498
+ continue;
20499
+ }
20500
+ if (!info.isFile()) throw new Error(`Skill packages can contain only regular files: ${absolute}`);
20501
+ paths.push(absolute);
20502
+ if (paths.length > 257) return;
20503
+ }
20504
+ };
20505
+ await visit(root);
20506
+ return paths;
20507
+ }
20508
+ async function readLocalSkillFile(root, absolute, expectedSize) {
20509
+ const bytes = await readFile(absolute);
20510
+ if (bytes.byteLength !== expectedSize) throw new Error(`${absolute} changed while it was being read. Try again.`);
20511
+ let decoded;
20512
+ try {
20513
+ decoded = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
20514
+ } catch {
20515
+ decoded = null;
20516
+ }
20517
+ const path = relative(root, absolute).split(sep).join("/");
20518
+ const file = organizationSkillFileSchema.safeParse({
20519
+ content: decoded ?? bytes.toString("base64"),
20520
+ encoding: decoded === null ? "base64" : "utf8",
20521
+ mediaType: mediaTypes[extname(path).toLowerCase()] ?? (decoded === null ? "application/octet-stream" : "text/plain"),
20522
+ path,
20523
+ size: bytes.byteLength
20524
+ });
20525
+ if (!file.success) throw new Error(`${absolute} is not a valid portable Skill file.`);
20526
+ return file.data;
20527
+ }
20528
+ //#endregion
20055
20529
  //#region src/organization-skills/command.ts
20056
20530
  const defaultDependencies = {
20057
20531
  getAuthState: getAuthSessionState,
@@ -20059,6 +20533,8 @@ const defaultDependencies = {
20059
20533
  resolveApi: async () => createOrganizationSkillsApi(createCliApiClientFoundation(await resolveBaseUrl())),
20060
20534
  resolveHumanProfile: resolveOpenMeldProfile
20061
20535
  };
20536
+ const GITHUB_COMMIT_SHA_PATTERN = /^[a-f0-9]{40}$/;
20537
+ const ORGANIZATION_SKILL_GITHUB_REQUEST_TIMEOUT_MS = 6e4;
20062
20538
  async function runOrganizationSkillsList(input = {}, dependencyOverrides = {}) {
20063
20539
  await runOrganizationSkillsCommand(input, dependencyOverrides, async (context) => {
20064
20540
  const response = await listForCurrentOrganization(context);
@@ -20080,6 +20556,271 @@ async function runOrganizationSkillsList(input = {}, dependencyOverrides = {}) {
20080
20556
  renderSkillsList(context, response.skills);
20081
20557
  });
20082
20558
  }
20559
+ async function runOrganizationSkillsAdd(input, dependencyOverrides = {}) {
20560
+ await runOrganizationSkillsCommand(input, dependencyOverrides, async (context) => {
20561
+ if (!input.source.startsWith("https://github.com/")) {
20562
+ if (input.source.includes("://")) throw new Error("Choose a local Skill directory or a github.com URL.");
20563
+ const files = await readLocalSkillFiles(input.source);
20564
+ const preview = await context.api.previewFromFiles({
20565
+ expectedOrganizationId: context.organization.id,
20566
+ files,
20567
+ requestContext: context.requestContext
20568
+ });
20569
+ requireOrganizationIdentity(context, preview.organizationId);
20570
+ const summary = {
20571
+ name: preview.preview.portable.name,
20572
+ files: preview.preview.files.map(({ path, size }) => ({
20573
+ path,
20574
+ size
20575
+ })),
20576
+ warnings: preview.preview.warnings
20577
+ };
20578
+ if (input.previewOnly) {
20579
+ emitOrganizationSkillAddResult(context, "skills.add.preview", summary);
20580
+ return;
20581
+ }
20582
+ const installed = await context.api.importFromFiles({
20583
+ expectedOrganizationId: context.organization.id,
20584
+ files,
20585
+ requestContext: context.requestContext
20586
+ });
20587
+ requireOrganizationIdentity(context, installed.skill.organizationId);
20588
+ if (installed.skill.name !== preview.preview.portable.name) throw new Error("The installed Skill does not match its preview.");
20589
+ emitOrganizationSkillAddResult(context, "skills.add", {
20590
+ ...summary,
20591
+ skillId: installed.skill.id,
20592
+ releaseId: installed.skill.activeRelease.id
20593
+ });
20594
+ return;
20595
+ }
20596
+ const preview = await context.api.previewFromGitHub({
20597
+ expectedOrganizationId: context.organization.id,
20598
+ requestContext: context.requestContext,
20599
+ timeoutMs: ORGANIZATION_SKILL_GITHUB_REQUEST_TIMEOUT_MS,
20600
+ url: input.source
20601
+ });
20602
+ requireOrganizationIdentity(context, preview.organizationId);
20603
+ const summary = {
20604
+ name: preview.preview.portable.name,
20605
+ commitSha: preview.preview.source.commitSha,
20606
+ files: preview.preview.files,
20607
+ warnings: preview.preview.warnings
20608
+ };
20609
+ if (input.previewOnly) {
20610
+ emitOrganizationSkillAddResult(context, "skills.add.preview", summary);
20611
+ return;
20612
+ }
20613
+ const installed = await context.api.importFromGitHub({
20614
+ expectedCommitSha: preview.preview.source.commitSha,
20615
+ expectedOrganizationId: context.organization.id,
20616
+ operationId: input.operationId ?? crypto.randomUUID(),
20617
+ requestContext: context.requestContext,
20618
+ timeoutMs: ORGANIZATION_SKILL_GITHUB_REQUEST_TIMEOUT_MS,
20619
+ url: input.source
20620
+ });
20621
+ requireOrganizationIdentity(context, installed.skill.organizationId);
20622
+ if (installed.skill.name !== preview.preview.portable.name) throw new Error("The installed Skill does not match its preview.");
20623
+ emitOrganizationSkillAddResult(context, "skills.add", {
20624
+ ...summary,
20625
+ skillId: installed.skill.id,
20626
+ releaseId: installed.skill.activeRelease.id
20627
+ });
20628
+ });
20629
+ }
20630
+ async function runOrganizationSkillsAddAll(input, dependencyOverrides = {}) {
20631
+ const source = parseRepositoryBatchSource(input.source);
20632
+ if (input.operationId && !source.pinnedCommitSha) throw new Error("Retry a repository batch with its pinned commit URL and --operation-id.");
20633
+ await runOrganizationSkillsCommand(input, dependencyOverrides, async (context) => await installRepositoryBatch(context, source, input.operationId));
20634
+ }
20635
+ async function installRepositoryBatch(context, source, requestedBatchId) {
20636
+ const batchId = requestedBatchId ?? crypto.randomUUID();
20637
+ const started = await context.api.beginImportBatch({
20638
+ batchId,
20639
+ expectedOrganizationId: context.organization.id,
20640
+ requestContext: context.requestContext,
20641
+ timeoutMs: ORGANIZATION_SKILL_GITHUB_REQUEST_TIMEOUT_MS,
20642
+ url: source.url
20643
+ });
20644
+ requireOrganizationIdentity(context, started.batch.organizationId);
20645
+ if (source.pinnedCommitSha && source.pinnedCommitSha !== started.batch.preview.commitSha) throw new Error("The saved batch does not match the pinned commit.");
20646
+ if (!context.json && context.presenter.view !== "agent") context.presenter.line({
20647
+ code: "skills.add.all.start",
20648
+ text: `Installing Skills from commit ${started.batch.preview.commitSha.slice(0, 12)}. Retry ID: ${batchId}.`
20649
+ });
20650
+ for (const [index, item] of started.batch.preview.skills.entries()) {
20651
+ const prior = started.batch.results[index];
20652
+ if (prior?.selected === false || prior?.status === "installed" || prior?.status === "skipped") continue;
20653
+ const result = await installRepositorySkill(context, item, started.batch.preview.commitSha, batchId);
20654
+ if (!context.json && context.presenter.view !== "agent") context.presenter.line({
20655
+ code: "skills.add.all.item",
20656
+ text: `${sanitizeTerminalDisplayText(result.path || "Repository root")} — ${result.status}${result.error ? `: ${sanitizeTerminalDisplayText(result.error)}` : ""}`
20657
+ });
20658
+ }
20659
+ const saved = await context.api.getImportBatch({
20660
+ batchId,
20661
+ requestContext: context.requestContext
20662
+ });
20663
+ requireOrganizationIdentity(context, saved.batch.organizationId);
20664
+ const results = saved.batch.results.map(({ selected: _selected, ...result }, index) => ({
20665
+ ...result,
20666
+ url: saved.batch.preview.skills[index]?.url ?? ""
20667
+ }));
20668
+ presentRepositoryInstallSummary(context, {
20669
+ commitSha: saved.batch.preview.commitSha,
20670
+ operationId: batchId,
20671
+ organizationId: context.organization.id,
20672
+ repository: saved.batch.preview.repository,
20673
+ retrySource: `${saved.batch.preview.repository}/tree/${saved.batch.preview.commitSha}`,
20674
+ results
20675
+ });
20676
+ if (saved.batch.results.some((result) => result.selected && (result.status === "failed" || result.status === "pending" || result.status === "skipped" && result.error !== "Already in Team"))) process.exitCode = 1;
20677
+ }
20678
+ function presentRepositoryInstallSummary(context, payload) {
20679
+ if (context.json) {
20680
+ emitCliJsonEnvelope(cliJsonSkillsAddAllEnvelopeSchema.parse({
20681
+ schemaVersion: 1,
20682
+ type: "skills.add.all",
20683
+ ...payload
20684
+ }));
20685
+ return;
20686
+ }
20687
+ if (context.presenter.view === "agent") {
20688
+ context.presenter.data({
20689
+ code: "skills.add.all",
20690
+ payload
20691
+ });
20692
+ return;
20693
+ }
20694
+ const installedCount = payload.results.filter((item) => item.status === "installed").length;
20695
+ context.presenter.line({
20696
+ code: "skills.add.all.summary",
20697
+ text: `${installedCount} ${installedCount === 1 ? "Skill" : "Skills"} installed from commit ${payload.commitSha.slice(0, 12)}. Retry with: openmeld skills add ${payload.retrySource} --all --operation-id ${payload.operationId}`
20698
+ });
20699
+ }
20700
+ function parseRepositoryBatchSource(source) {
20701
+ let parsed;
20702
+ try {
20703
+ parsed = new URL(source);
20704
+ } catch {
20705
+ throw new Error("Choose a public github.com repository for --all.");
20706
+ }
20707
+ if (parsed.protocol !== "https:" || parsed.hostname !== "github.com") throw new Error("Choose a public github.com repository for --all.");
20708
+ const parts = parsed.pathname.split("/").filter(Boolean);
20709
+ const pinnedCommitSha = parts.length === 4 && parts[2] === "tree" && GITHUB_COMMIT_SHA_PATTERN.test(parts[3] ?? "") ? parts[3] ?? null : null;
20710
+ if (parts.length !== 2 && !pinnedCommitSha) throw new Error("Use a GitHub repository URL or its pinned commit URL for --all.");
20711
+ return {
20712
+ pinnedCommitSha,
20713
+ url: source
20714
+ };
20715
+ }
20716
+ async function installRepositorySkill(context, item, commitSha, batchId) {
20717
+ if (item.blocker) return {
20718
+ error: item.blocker.message,
20719
+ path: item.path,
20720
+ status: "skipped",
20721
+ url: item.url
20722
+ };
20723
+ try {
20724
+ const installed = await context.api.importFromGitHub({
20725
+ expectedCommitSha: commitSha,
20726
+ expectedOrganizationId: context.organization.id,
20727
+ batchId,
20728
+ requestContext: context.requestContext,
20729
+ timeoutMs: ORGANIZATION_SKILL_GITHUB_REQUEST_TIMEOUT_MS,
20730
+ url: item.url
20731
+ });
20732
+ requireOrganizationIdentity(context, installed.skill.organizationId);
20733
+ return {
20734
+ path: item.path,
20735
+ releaseId: installed.skill.activeRelease.id,
20736
+ skillId: installed.skill.id,
20737
+ status: "installed",
20738
+ url: item.url
20739
+ };
20740
+ } catch (error) {
20741
+ return {
20742
+ error: error instanceof Error ? error.message : String(error),
20743
+ path: item.path,
20744
+ status: "failed",
20745
+ url: item.url
20746
+ };
20747
+ }
20748
+ }
20749
+ async function runOrganizationSkillsScan(input, dependencyOverrides = {}) {
20750
+ await runOrganizationSkillsCommand(input, dependencyOverrides, async (context) => {
20751
+ const response = await context.api.previewRepositoryFromGitHub({
20752
+ expectedOrganizationId: context.organization.id,
20753
+ requestContext: context.requestContext,
20754
+ url: input.url
20755
+ });
20756
+ requireOrganizationIdentity(context, response.organizationId);
20757
+ const payload = {
20758
+ organizationId: response.organizationId,
20759
+ preview: response.preview
20760
+ };
20761
+ if (context.json) {
20762
+ emitCliJsonEnvelope(cliJsonSkillsScanEnvelopeSchema.parse({
20763
+ schemaVersion: 1,
20764
+ type: "skills.scan",
20765
+ ...payload
20766
+ }));
20767
+ return;
20768
+ }
20769
+ if (context.presenter.view === "agent") {
20770
+ context.presenter.data({
20771
+ code: "skills.scan",
20772
+ payload
20773
+ });
20774
+ return;
20775
+ }
20776
+ context.presenter.line({
20777
+ code: "skills.scan.summary",
20778
+ text: `${response.preview.skills.length} Skills found at commit ${response.preview.commitSha.slice(0, 12)}.`
20779
+ });
20780
+ for (const item of response.preview.skills) {
20781
+ const path = sanitizeTerminalDisplayText(item.path || "Repository root");
20782
+ const status = item.blocker ? `Can't install: ${sanitizeTerminalDisplayText(item.blocker.message)}` : `${item.fileCount} ${item.fileCount === 1 ? "file" : "files"} · ${item.totalBytes.toLocaleString()} bytes`;
20783
+ context.presenter.line({
20784
+ code: "skills.scan.item",
20785
+ text: `${path} — ${status}`
20786
+ });
20787
+ }
20788
+ });
20789
+ }
20790
+ function emitOrganizationSkillAddResult(context, code, result) {
20791
+ const payload = {
20792
+ organizationId: context.organization.id,
20793
+ ...result
20794
+ };
20795
+ if (context.json) {
20796
+ if (code === "skills.add.preview") emitCliJsonEnvelope(cliJsonSkillsAddPreviewEnvelopeSchema.parse({
20797
+ schemaVersion: 1,
20798
+ type: code,
20799
+ ...payload
20800
+ }));
20801
+ else emitCliJsonEnvelope(cliJsonSkillsAddEnvelopeSchema.parse({
20802
+ schemaVersion: 1,
20803
+ type: code,
20804
+ ...payload
20805
+ }));
20806
+ return;
20807
+ }
20808
+ if (context.presenter.view === "agent") {
20809
+ context.presenter.data({
20810
+ code,
20811
+ payload
20812
+ });
20813
+ return;
20814
+ }
20815
+ context.presenter.line({
20816
+ code,
20817
+ text: `${code === "skills.add.preview" ? "Preview" : "Added"} ${result.name} (${result.files.length} supporting files)${result.commitSha ? ` from commit ${result.commitSha.slice(0, 12)}` : ""}.`
20818
+ });
20819
+ for (const warning of result.warnings) context.presenter.line({
20820
+ code: "skills.add.warning",
20821
+ text: warning
20822
+ });
20823
+ }
20083
20824
  async function runOrganizationSkillsShow(input, dependencyOverrides = {}) {
20084
20825
  await runOrganizationSkillsCommand(input, dependencyOverrides, async (context) => {
20085
20826
  const skill = await getSkillByNameOrId(context, input.skill);
@@ -23736,7 +24477,7 @@ function normalizeOptionalString(value) {
23736
24477
  return normalized.length > 0 ? normalized : null;
23737
24478
  }
23738
24479
  async function runDefaultSpaceAddMeMembership(input) {
23739
- const { runSpaceAddMeMembership } = await import("./add-me-membership-pkREbEJG.js");
24480
+ const { runSpaceAddMeMembership } = await import("./add-me-membership-25sIYCId.js");
23740
24481
  return await runSpaceAddMeMembership(input);
23741
24482
  }
23742
24483
  //#endregion
@@ -28770,7 +29511,7 @@ computerCmd.command("disconnect").description("Disconnect this computer from its
28770
29511
  routeTokens: ["computer", "disconnect"],
28771
29512
  view,
28772
29513
  run: async () => {
28773
- const { runComputerDisconnect } = await import("./computer-disconnect-pH6HaHQq.js");
29514
+ const { runComputerDisconnect } = await import("./computer-disconnect-Cvl_ia32.js");
28774
29515
  await runComputerDisconnect(computerConnectionIntentSchema.parse(JSON.parse(opts.connectionIntent)), view);
28775
29516
  }
28776
29517
  });
@@ -28821,7 +29562,15 @@ computerCmd.command("rename").description("Rename this computer in OpenMeld.").a
28821
29562
  }
28822
29563
  });
28823
29564
  });
29565
+ registerFilesCommands(program, (routeTokens, run) => runCommandWithEntryChecks({
29566
+ routeTokens,
29567
+ view: getGlobalViewOption(),
29568
+ run
29569
+ }));
28824
29570
  const skillsCmd = program.command("skills").description("Read and load Organization Skills.").option("--json", "Print one machine-readable JSON envelope.", false);
29571
+ function skillsJsonRequested(opts) {
29572
+ return opts.json === true || skillsCmd.opts().json === true;
29573
+ }
28825
29574
  registerPluginCommands(program, {
28826
29575
  view: getGlobalViewOption,
28827
29576
  run: (routeTokens, run) => runCommandWithEntryChecks({
@@ -28897,6 +29646,43 @@ registerSkillsTargetSelectionOptions({
28897
29646
  }
28898
29647
  });
28899
29648
  });
29649
+ skillsCmd.command("add").description("Add a local or GitHub Skill, or every eligible Skill in a repository.").argument("<source>", "Local Skill directory or GitHub Skill or repository URL").option("--preview", "Show the exact Skill and source commit without adding it").option("--operation-id <id>", "Reuse this ID to safely retry a GitHub install or repository batch").option("--all", "Install every eligible Skill in a GitHub repository").option("--json", "Print one machine-readable JSON envelope.", false).action(async (source, opts) => {
29650
+ if (opts.all && opts.preview) throw new Error("Use skills scan to preview a repository before --all.");
29651
+ const view = getGlobalViewOption();
29652
+ await runCommandWithEntryChecks({
29653
+ routeTokens: ["skills", "add"],
29654
+ view,
29655
+ run: async () => {
29656
+ if (opts.all) await runOrganizationSkillsAddAll({
29657
+ json: skillsJsonRequested(opts),
29658
+ operationId: opts.operationId,
29659
+ source,
29660
+ view
29661
+ });
29662
+ else await runOrganizationSkillsAdd({
29663
+ json: skillsJsonRequested(opts),
29664
+ previewOnly: opts.preview === true,
29665
+ operationId: opts.operationId,
29666
+ source,
29667
+ view
29668
+ });
29669
+ }
29670
+ });
29671
+ });
29672
+ skillsCmd.command("scan").description("List the Skills in a GitHub repository without installing them.").argument("<url>", "GitHub repository or folder URL").option("--json", "Print one machine-readable JSON envelope.", false).action(async (url, opts) => {
29673
+ const view = getGlobalViewOption();
29674
+ await runCommandWithEntryChecks({
29675
+ routeTokens: ["skills", "scan"],
29676
+ view,
29677
+ run: async () => {
29678
+ await runOrganizationSkillsScan({
29679
+ json: skillsJsonRequested(opts),
29680
+ url,
29681
+ view
29682
+ });
29683
+ }
29684
+ });
29685
+ });
28900
29686
  skillsCmd.command("list").alias("ls").description("List Skills in the active Organization.").option("--json", "Print one machine-readable JSON envelope.", false).action(async (opts) => {
28901
29687
  const view = getGlobalViewOption();
28902
29688
  await runCommandWithEntryChecks({
@@ -28904,7 +29690,7 @@ skillsCmd.command("list").alias("ls").description("List Skills in the active Org
28904
29690
  view,
28905
29691
  run: async () => {
28906
29692
  await runOrganizationSkillsList({
28907
- json: opts.json === true,
29693
+ json: skillsJsonRequested(opts),
28908
29694
  view
28909
29695
  });
28910
29696
  await maybeRunAgentViewRecoveryAfterSuccess({ view });
@@ -28918,7 +29704,7 @@ skillsCmd.command("show").description("Show one Skill in the active Organization
28918
29704
  view,
28919
29705
  run: async () => {
28920
29706
  await runOrganizationSkillsShow({
28921
- json: opts.json === true,
29707
+ json: skillsJsonRequested(opts),
28922
29708
  skill,
28923
29709
  view
28924
29710
  });
@@ -28933,7 +29719,7 @@ skillsCmd.command("load").description("Load one enabled Skill into the private O
28933
29719
  view,
28934
29720
  run: async () => {
28935
29721
  await runOrganizationSkillsLoad({
28936
- json: opts.json === true,
29722
+ json: skillsJsonRequested(opts),
28937
29723
  releaseId: opts.release,
28938
29724
  skill,
28939
29725
  view
@@ -30985,7 +31771,7 @@ async function main() {
30985
31771
  if (await runMacOsNativeKeychainHelperIfRequested()) return;
30986
31772
  const argv = process.argv.map((arg) => arg === "--h" ? "--help" : arg);
30987
31773
  if (argv.length === 5 && argv[2] === "computer" && argv[3] === "connection-review" && argv[4] === "--json") {
30988
- const { readComputerConnectionReview } = await import("./computer-connection-review-Dop02mby.js");
31774
+ const { readComputerConnectionReview } = await import("./computer-connection-review-C9CKzIdH.js");
30989
31775
  outLine(JSON.stringify(await readComputerConnectionReview()));
30990
31776
  return;
30991
31777
  }
@@ -30996,7 +31782,7 @@ async function main() {
30996
31782
  return;
30997
31783
  }
30998
31784
  if (argv[3] === "control-capabilities") {
30999
- const { readServiceControlCapabilities } = await import("./service-control-capabilities-CdVTTNRK.js");
31785
+ const { readServiceControlCapabilities } = await import("./service-control-capabilities-LZc_90-g.js");
31000
31786
  emitCliJsonEnvelope({
31001
31787
  schemaVersion: 1,
31002
31788
  type: "service.control_capabilities",
@@ -31179,4 +31965,4 @@ main().catch((error) => {
31179
31965
  //#endregion
31180
31966
  export {};
31181
31967
 
31182
- //# sourceMappingURL=openmeld-0pnb6g3R.js.map
31968
+ //# sourceMappingURL=openmeld-BWAL_LKY.js.map