openmeld 0.3.237 → 0.3.238

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 (109) hide show
  1. package/dist/{add-me-membership-BEqSnfgo.js → add-me-membership-_7nC0hkr.js} +2 -2
  2. package/dist/{add-me-membership-BEqSnfgo.js.map → add-me-membership-_7nC0hkr.js.map} +1 -1
  3. package/dist/{agents-_Hh6L3Fi.js → agents-kG9UvazC.js} +10 -10
  4. package/dist/{agents-_Hh6L3Fi.js.map → agents-kG9UvazC.js.map} +1 -1
  5. package/dist/{api-client-foundation-ZuYF2Uah.js → api-client-foundation-DIcNjG9w.js} +1 -1
  6. package/dist/{api-client-foundation-CGc8AuMo.js → api-client-foundation-DNbvvZW2.js} +3 -3
  7. package/dist/{api-client-foundation-CGc8AuMo.js.map → api-client-foundation-DNbvvZW2.js.map} +1 -1
  8. package/dist/{auth-session-B3oyTcSI.js → auth-session-BTRu2Kc5.js} +2 -2
  9. package/dist/{auth-session-B3oyTcSI.js.map → auth-session-BTRu2Kc5.js.map} +1 -1
  10. package/dist/auth-session-D2f7Lud02.js +4 -0
  11. package/dist/{channel-BB6aEY--.js → channel-BxlX3o3i.js} +78 -4
  12. package/dist/channel-BxlX3o3i.js.map +1 -0
  13. package/dist/{command-D71NHS4j.js → command-Cyw5Gj59.js} +37 -123
  14. package/dist/command-Cyw5Gj59.js.map +1 -0
  15. package/dist/{computer-connection-DyL3C3HO.js → computer-connection-Sntn_-XO.js} +2 -2
  16. package/dist/{computer-connection-DyL3C3HO.js.map → computer-connection-Sntn_-XO.js.map} +1 -1
  17. package/dist/{computer-connection-review-BXuXP6KH.js → computer-connection-review-DWiapsro.js} +5 -5
  18. package/dist/{computer-connection-review-BXuXP6KH.js.map → computer-connection-review-DWiapsro.js.map} +1 -1
  19. package/dist/{computer-disconnect-BXZKVvxj.js → computer-disconnect-Bxxreumk.js} +8 -8
  20. package/dist/{computer-disconnect-BXZKVvxj.js.map → computer-disconnect-Bxxreumk.js.map} +1 -1
  21. package/dist/{computer-setup-continuation-DOvxRtAh.js → computer-setup-continuation-DkPRFlA1.js} +4 -4
  22. package/dist/{computer-setup-continuation-DOvxRtAh.js.map → computer-setup-continuation-DkPRFlA1.js.map} +1 -1
  23. package/dist/{daemon-device-id-Dwm7CHtX.js → daemon-device-id-D7lbw6c4.js} +226 -42
  24. package/dist/daemon-device-id-D7lbw6c4.js.map +1 -0
  25. package/dist/{daemon-lifecycle-journal-DrDyXoUO.js → daemon-lifecycle-journal-C0P8xFTk.js} +3 -3
  26. package/dist/{daemon-lifecycle-journal-DrDyXoUO.js.map → daemon-lifecycle-journal-C0P8xFTk.js.map} +1 -1
  27. package/dist/{daemon-service-runtime-D-tDDWWf.js → daemon-service-runtime-DhV7AKAv.js} +2 -2
  28. package/dist/{daemon-service-runtime-D-tDDWWf.js.map → daemon-service-runtime-DhV7AKAv.js.map} +1 -1
  29. package/dist/{daemon-service-update-coordinator-ykoOjGCd.js → daemon-service-update-coordinator-BM4ha5Nj.js} +9 -10
  30. package/dist/{daemon-service-update-coordinator-ykoOjGCd.js.map → daemon-service-update-coordinator-BM4ha5Nj.js.map} +1 -1
  31. package/dist/{dispatch-owned-runtime-eRa3wkl9.js → dispatch-owned-runtime-CfPwparq.js} +7 -7
  32. package/dist/{dispatch-owned-runtime-eRa3wkl9.js.map → dispatch-owned-runtime-CfPwparq.js.map} +1 -1
  33. package/dist/dist-Bfz_GJ0l.js +4 -0
  34. package/dist/{dist-DEjtwiDJ.js → dist-s_YTHAIc.js} +307 -16
  35. package/dist/dist-s_YTHAIc.js.map +1 -0
  36. package/dist/{elapsed-time-BnibmBPb.js → dual-view-guide-catalog-DDYa38RT.js} +215 -164
  37. package/dist/dual-view-guide-catalog-DDYa38RT.js.map +1 -0
  38. package/dist/elapsed-time-Ck4GiT9P.js +165 -0
  39. package/dist/elapsed-time-Ck4GiT9P.js.map +1 -0
  40. package/dist/{entry-CVxgr9uQ.js → entry-CTw122mn.js} +7 -8
  41. package/dist/{entry-CVxgr9uQ.js.map → entry-CTw122mn.js.map} +1 -1
  42. package/dist/{installation-inventory-HHLOQ2g7.js → installation-inventory-CSNq9dzc.js} +3 -3
  43. package/dist/{installation-inventory-HHLOQ2g7.js.map → installation-inventory-CSNq9dzc.js.map} +1 -1
  44. package/dist/{installer-Bg4KA0DR.js → installer-B4MjFlzg.js} +2 -2
  45. package/dist/{installer-Bg4KA0DR.js.map → installer-B4MjFlzg.js.map} +1 -1
  46. package/dist/{meta-api-CjvtAPvQ.js → meta-api-tg1rD8mP.js} +117 -6
  47. package/dist/meta-api-tg1rD8mP.js.map +1 -0
  48. package/dist/{openmeld-o_rTSEOO.js → openmeld-MSrVnYw0.js} +128 -88
  49. package/dist/openmeld-MSrVnYw0.js.map +1 -0
  50. package/dist/{openmeld-maintenance-worker-Cwv6_5UL.js → openmeld-maintenance-worker-CQGwuIl9.js} +9 -9
  51. package/dist/{openmeld-maintenance-worker-Cwv6_5UL.js.map → openmeld-maintenance-worker-CQGwuIl9.js.map} +1 -1
  52. package/dist/{openmeld-tools-update-join-IFQf70sm.js → openmeld-tools-update-join-CzBRWKVT.js} +4 -4
  53. package/dist/{openmeld-tools-update-join-IFQf70sm.js.map → openmeld-tools-update-join-CzBRWKVT.js.map} +1 -1
  54. package/dist/openmeld.js +4 -4
  55. package/dist/{prepare-provider-runtime-B_huS5DY.js → prepare-provider-runtime-L7u8iHAb.js} +94 -11
  56. package/dist/{prepare-provider-runtime-B_huS5DY.js.map → prepare-provider-runtime-L7u8iHAb.js.map} +1 -1
  57. package/dist/{prepare-session-executor-WWjgnqsh.js → prepare-session-executor-D8LvC1d8.js} +19 -20
  58. package/dist/{prepare-session-executor-WWjgnqsh.js.map → prepare-session-executor-D8LvC1d8.js.map} +1 -1
  59. package/dist/{presenter-MJ5YgsOT.js → presenter-BcxiQyJg.js} +13 -3
  60. package/dist/presenter-BcxiQyJg.js.map +1 -0
  61. package/dist/{process-channel-C2dB41fO.js → process-channel-QRugdtrY.js} +2 -2
  62. package/dist/{process-channel-C2dB41fO.js.map → process-channel-QRugdtrY.js.map} +1 -1
  63. package/dist/{runtime-DjEQja8c.js → runtime-C2v7iKNY.js} +126 -16
  64. package/dist/runtime-C2v7iKNY.js.map +1 -0
  65. package/dist/{runtime-agent-controller-reporting-submission-CRS5CwMp.js → runtime-agent-controller-reporting-submission-BFXtOHAU.js} +8 -8
  66. package/dist/{runtime-agent-controller-reporting-submission-CRS5CwMp.js.map → runtime-agent-controller-reporting-submission-BFXtOHAU.js.map} +1 -1
  67. package/dist/{runtime-transport-B-GZhwVt.js → runtime-transport-BVCHi4qM.js} +10 -6
  68. package/dist/runtime-transport-BVCHi4qM.js.map +1 -0
  69. package/dist/{service-CleUczqJ.js → service-6waBVmON.js} +43 -20
  70. package/dist/service-6waBVmON.js.map +1 -0
  71. package/dist/{service-account-authorization-s1bXEswT.js → service-account-authorization-C1CdX1P3.js} +2 -2
  72. package/dist/{service-account-authorization-s1bXEswT.js.map → service-account-authorization-C1CdX1P3.js.map} +1 -1
  73. package/dist/{service-account-control-CjZ5uqK4.js → service-account-control-BBY6pX86.js} +8 -9
  74. package/dist/{service-account-control-CjZ5uqK4.js.map → service-account-control-BBY6pX86.js.map} +1 -1
  75. package/dist/{service-control-capabilities-D5izhuhD.js → service-control-capabilities-BP9UE3a7.js} +3 -3
  76. package/dist/{service-control-capabilities-D5izhuhD.js.map → service-control-capabilities-BP9UE3a7.js.map} +1 -1
  77. package/dist/{service-control-capabilities-Bcho1Rwq.js → service-control-capabilities-CQjhvDFx.js} +1 -1
  78. package/dist/{state-CbrhgfNh.js → state-BJJLEoJY.js} +2 -2
  79. package/dist/{state-CbrhgfNh.js.map → state-BJJLEoJY.js.map} +1 -1
  80. package/dist/{updates-api-B7x39-DR.js → updates-api-dsNUTfpa.js} +142 -11
  81. package/dist/updates-api-dsNUTfpa.js.map +1 -0
  82. package/dist/upgrade-CUyMj35o.js +4 -0
  83. package/dist/{upgrade-BQSA2LfT.js → upgrade-DwlRN4_U.js} +9 -9
  84. package/dist/{upgrade-BQSA2LfT.js.map → upgrade-DwlRN4_U.js.map} +1 -1
  85. package/dist/windows/openmeld-windows-process.exe +0 -0
  86. package/package.json +12 -12
  87. package/skills/openmeld-cli/playbooks/space-ops.md +24 -2
  88. package/skills/openmeld-cli/references/commands.md +9 -2
  89. package/dist/auth-session-CoFlCq7_.js +0 -4
  90. package/dist/channel-BB6aEY--.js.map +0 -1
  91. package/dist/command-D71NHS4j.js.map +0 -1
  92. package/dist/context-43g3bIde.js +0 -162
  93. package/dist/context-43g3bIde.js.map +0 -1
  94. package/dist/daemon-device-id-Dwm7CHtX.js.map +0 -1
  95. package/dist/dist-CaCD0K8a.js +0 -216
  96. package/dist/dist-CaCD0K8a.js.map +0 -1
  97. package/dist/dist-DEjtwiDJ.js.map +0 -1
  98. package/dist/dist-DGNsLSYJ.js +0 -4
  99. package/dist/elapsed-time-BnibmBPb.js.map +0 -1
  100. package/dist/io-DT66typ4.js +0 -16
  101. package/dist/io-DT66typ4.js.map +0 -1
  102. package/dist/meta-api-CjvtAPvQ.js.map +0 -1
  103. package/dist/openmeld-o_rTSEOO.js.map +0 -1
  104. package/dist/presenter-MJ5YgsOT.js.map +0 -1
  105. package/dist/runtime-DjEQja8c.js.map +0 -1
  106. package/dist/runtime-transport-B-GZhwVt.js.map +0 -1
  107. package/dist/service-CleUczqJ.js.map +0 -1
  108. package/dist/updates-api-B7x39-DR.js.map +0 -1
  109. package/dist/upgrade-636PQBli.js +0 -4
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { $n as resolveExecutablePathsOnPath, On as resolveInstalledClaudeCodeLaunchCandidates, Tt as withAgentActivityLocalStateLock, Xn as resolveDispatchSpaceActionMcpServer, Zn as buildCliLaunchInvocation, er as listAgentControllerSupervisedProcessIds, ft as listProjectBindings, hn as resolveInstalledOpenCodeLaunchCandidates, ht as removeAgentActivityBindingsWhileDeliveryLocked, rr as isDispatchSpaceActionDeliveryOnly, vn as resolveInstalledGrokBuildLaunchCandidates, vt as resolveProjectBindingForPath, wt as withAgentActivityDeliveryLock, xn as resolveInstalledCodexLaunchCandidates } from "./prepare-provider-runtime-B_huS5DY.js";
3
+ import { $n as resolveExecutablePathsOnPath, On as resolveInstalledClaudeCodeLaunchCandidates, Tt as withAgentActivityLocalStateLock, Xn as resolveDispatchSpaceActionMcpServer, Zn as buildCliLaunchInvocation, er as listAgentControllerSupervisedProcessIds, ft as listProjectBindings, hn as resolveInstalledOpenCodeLaunchCandidates, ht as removeAgentActivityBindingsWhileDeliveryLocked, rr as isDispatchSpaceActionDeliveryOnly, vn as resolveInstalledGrokBuildLaunchCandidates, vt as resolveProjectBindingForPath, wt as withAgentActivityDeliveryLock, xn as resolveInstalledCodexLaunchCandidates } from "./prepare-provider-runtime-L7u8iHAb.js";
4
4
  import { g as toSpaceUpdatesUrl } from "./urls-CY2uzH2-.js";
5
5
  import { F as resolveOpenMeldRootDir, k as organizationSkillReleaseDir, t as OPENMELD_HOME_ENV_KEY } from "./paths-De9xdA2h.js";
6
- import { Cr as spaceTaskMutationReceiptSchema, Hr as organizationSkillBundleSchema, Lt as createAgentActivityApi, Pi as signalTextEnvelopeSchema, Sr as spaceTaskIdSchema, br as createSpaceTaskBodySchema, fn as createRuntimeReportingApi, or as getSpaceUpdatesResponseSchema, pi as observedLocalAgentSessionSchema, qr as stringifyOrganizationSkillBundleCanonicalJson, ri as submitAgentControllerTaskLifecycleEventItemSchema, rr as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, t as OpenMeldApiClientHttpError, xr as mutateSpaceTaskBodySchema } from "./dist-DEjtwiDJ.js";
7
- import { Fn as spaceFileRevisionNumberSchema, Rn as spaceMessageFileReferenceSchema, Sr as executionContextTaskSchema, br as executionContextAssignmentSchema, cn as spaceWorkingCopyResultSchema, in as SPACE_WORK_MAX_BYTES, jn as spaceFileEntryIdSchema, on as spaceWorkRelativePathSchema, sn as spaceWorkSelectionSchema, yn as readSpaceFileTextResponseSchema } from "./runtime-transport-B-GZhwVt.js";
6
+ import { Cr as mutateSpaceTaskBodySchema, Ii as signalTextEnvelopeSchema, Kt as createDirectMessageApi, Lt as createAgentActivityApi, Sr as createSpaceTaskBodySchema, Tr as spaceTaskMutationReceiptSchema, Wr as organizationSkillBundleSchema, Yr as stringifyOrganizationSkillBundleCanonicalJson, ai as submitAgentControllerTaskLifecycleEventItemSchema, fn as createRuntimeReportingApi, hi as observedLocalAgentSessionSchema, ir as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, lr as openDirectMessageSpaceBodySchema, sr as getSpaceUpdatesResponseSchema, t as OpenMeldApiClientHttpError, wr as spaceTaskIdSchema } from "./dist-s_YTHAIc.js";
7
+ import { Cr as executionContextTaskSchema, In as spaceFileRevisionNumberSchema, Mn as spaceFileEntryIdSchema, an as SPACE_WORK_MAX_BYTES, bn as readSpaceFileTextResponseSchema, cn as spaceWorkSelectionSchema, ln as spaceWorkingCopyResultSchema, sn as spaceWorkRelativePathSchema, xr as executionContextAssignmentSchema, zn as spaceMessageFileReferenceSchema } from "./runtime-transport-BVCHi4qM.js";
8
8
  import { O as openMeldRuntimeProfileIdSchema } from "./control-plane-QqGL-jtT.js";
9
- import { d as getAuthSessionState } from "./auth-session-B3oyTcSI.js";
10
- import { A as AgentActivitySubmissionResultsMismatchError, D as drainAgentActivityHookInbox, F as removeProjectOutbox, I as readRecentAgentActivityHookStatus, L as createServiceGitEnvironment, M as deferAgentActivityOutbox, N as readAgentActivityOutboxHealth, P as readDueAgentActivityOutbox, S as resolveOpenCodeDatabasePath, T as normalizeSharedSessionTitle, a as DispatchSpaceActionClosedError, b as readOpenCodeSessionRows, d as readDispatchSpaceActionRecord, j as applyAgentActivitySubmissionResults, k as removeProjectInbox, l as readDispatchSpaceActionContextForReceiptFromEnv, o as DispatchSpaceActionRejectedError, p as writeDispatchSpaceActionRecord, pn as cliJsonErrorEnvelopeSchema, s as OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV, u as readDispatchSpaceActionContextFromEnv, v as scanLocalAgentActivity, w as resolveObservedAgentActivityBinding, y as startAgentActivityTranscriptWatchers } from "./dispatch-owned-runtime-eRa3wkl9.js";
11
- import { B as requireOpenMeldProfile, o as dirnamePath } from "./daemon-device-id-Dwm7CHtX.js";
9
+ import { d as getAuthSessionState } from "./auth-session-BTRu2Kc5.js";
10
+ import { B as resolveRuntimeContext, U as requireOpenMeldProfile, o as dirnamePath } from "./daemon-device-id-D7lbw6c4.js";
11
+ import { A as AgentActivitySubmissionResultsMismatchError, At as buildPublicSpaceEntryPath, D as drainAgentActivityHookInbox, F as removeProjectOutbox, I as readRecentAgentActivityHookStatus, L as createServiceGitEnvironment, M as deferAgentActivityOutbox, N as readAgentActivityOutboxHealth, P as readDueAgentActivityOutbox, S as resolveOpenCodeDatabasePath, T as normalizeSharedSessionTitle, a as DispatchSpaceActionClosedError, b as readOpenCodeSessionRows, d as readDispatchSpaceActionRecord, i as readDispatchOwnedRuntimeGuard, j as applyAgentActivitySubmissionResults, k as removeProjectInbox, l as readDispatchSpaceActionContextForReceiptFromEnv, mn as cliJsonErrorEnvelopeSchema, o as DispatchSpaceActionRejectedError, p as writeDispatchSpaceActionRecord, s as OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV, u as readDispatchSpaceActionContextFromEnv, v as scanLocalAgentActivity, w as resolveObservedAgentActivityBinding, y as startAgentActivityTranscriptWatchers } from "./dispatch-owned-runtime-CfPwparq.js";
12
+ import { f as prepareRequestedSpaceSendFiles, h as spaceSendRequestReceiptSchema, l as parseJsonResponse, m as createCliSpaceApi, p as uploadPreparedSpaceFiles, s as readGatewayTextResponse, u as resolveSpaceSendText } from "./meta-api-tg1rD8mP.js";
12
13
  import { d as runWithHeldLock, s as releaseLock, t as acquireLock } from "./lock-BMI00i2F.js";
13
14
  import { a as resolveBaseUrl } from "./base-url-0AoeTi3w.js";
14
15
  import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
15
16
  import { _ as daemonRuntimeStateRootPath } from "./daemon-state-Dte9re5V.js";
16
17
  import { i as readDaemonServiceContract } from "./daemon-service-contract-COPKbCy_.js";
17
18
  import { l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand } from "./cli-entry-command-CR_9QU1i.js";
18
- import { r as outLine } from "./io-DT66typ4.js";
19
- import { d as buildOpenMeldRequestContextFromProfile, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-CGc8AuMo.js";
20
- import { d as uploadPreparedSpaceFiles, f as createCliSpaceApi, l as parseJsonResponse, s as readGatewayTextResponse, u as prepareRequestedSpaceSendFiles } from "./meta-api-CjvtAPvQ.js";
19
+ import { o as outLine, t as createPresenter } from "./presenter-BcxiQyJg.js";
20
+ import { d as buildOpenMeldRequestContextFromProfile, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-DNbvvZW2.js";
21
21
  import { createHash, randomBytes, randomUUID } from "node:crypto";
22
22
  import { homedir } from "node:os";
23
23
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -4551,6 +4551,120 @@ function normalizeRequiredText(value, errorMessage) {
4551
4551
  return normalized;
4552
4552
  }
4553
4553
  //#endregion
4554
+ //#region src/space/direct-message.ts
4555
+ /** Non-final collaboration shared by the CLI and every dispatch tool carrier. */
4556
+ async function openDirectMessage(input) {
4557
+ const request = openDirectMessageSpaceBodySchema.parse(input.request);
4558
+ const env = input.env ?? process.env;
4559
+ const baseUrl = await resolveBaseUrl(input.baseUrl);
4560
+ const { profile, dispatch, requestContext, organizationId } = await resolveDirectMessageCaller({
4561
+ profile: input.profile,
4562
+ baseUrl,
4563
+ env
4564
+ });
4565
+ const api = createDirectMessageApi(createCliApiClientFoundation(baseUrl, {
4566
+ expectedOwnerUserId: profile.ownerUserId,
4567
+ organizationId
4568
+ }));
4569
+ assertCurrentDispatch(dispatch, env);
4570
+ const opened = request.message && !request.spaceId ? await api.openSpace({
4571
+ targetProfileId: request.targetProfileId,
4572
+ creationId: request.creationId,
4573
+ requestContext
4574
+ }) : null;
4575
+ const spaceId = request.spaceId ?? opened?.spaceId;
4576
+ if (request.message && spaceId) {
4577
+ input.onRequest?.(spaceSendRequestReceiptSchema.parse({
4578
+ spaceId,
4579
+ profileId: profile.openMeldProfileId,
4580
+ clientMessageId: request.message.clientMessageId,
4581
+ targetProfileIds: request.message.wake ? [request.targetProfileId] : []
4582
+ }));
4583
+ assertCurrentDispatch(dispatch, env);
4584
+ }
4585
+ const response = await (opened ? createDirectMessageApi(createCliApiClientFoundation(baseUrl, {
4586
+ expectedOwnerUserId: profile.ownerUserId,
4587
+ organizationId: opened.organizationId
4588
+ })) : api).openSpace({
4589
+ ...request,
4590
+ ...opened ? {
4591
+ creationId: void 0,
4592
+ spaceId: opened.spaceId
4593
+ } : {},
4594
+ requestContext
4595
+ });
4596
+ return {
4597
+ ...response,
4598
+ ...opened ? {
4599
+ created: opened.created,
4600
+ creationId: opened.creationId
4601
+ } : {},
4602
+ path: buildPublicSpaceEntryPath({ spaceId: response.spaceId })
4603
+ };
4604
+ }
4605
+ async function resolveDirectMessageCaller(input) {
4606
+ const { env, baseUrl } = input;
4607
+ const dispatch = readDispatchOwnedRuntimeGuard(env).active ? readDispatchSpaceActionContextFromEnv(env) : null;
4608
+ if (dispatch && input.profile && input.profile !== dispatch.targetProfileId) throw new Error("The selected profile must match this Wake’s Local Agent.");
4609
+ const profile = await requireOpenMeldProfile({
4610
+ openMeldProfileId: dispatch?.targetProfileId ?? input.profile,
4611
+ persistSelection: false,
4612
+ authAction: "opening a Direct Message"
4613
+ });
4614
+ if (dispatch && (profile.profileKind !== "agent" || profile.openMeldProfileId !== dispatch.targetProfileId)) throw new Error("The Direct Message sender does not match this Wake’s Local Agent.");
4615
+ const requestContext = buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile });
4616
+ const source = dispatch ? await createCliSpaceApi(baseUrl).resolveEntry({
4617
+ spaceId: dispatch.spaceId,
4618
+ requestContext
4619
+ }) : null;
4620
+ if (source && (source.view.state !== "allowed" || source.participation.state !== "active_member" || !source.safeContext.organizationId)) throw new Error("This Agent no longer has access to the Wake’s source conversation.");
4621
+ return {
4622
+ profile,
4623
+ dispatch,
4624
+ requestContext,
4625
+ organizationId: source?.safeContext.organizationId ?? void 0
4626
+ };
4627
+ }
4628
+ function assertCurrentDispatch(dispatch, env) {
4629
+ if (dispatch) {
4630
+ const current = readDispatchSpaceActionContextFromEnv(env);
4631
+ if (current.contextId !== dispatch.contextId || current.nonce !== dispatch.nonce) throw new Error("The Wake changed before the Direct Message could be sent.");
4632
+ }
4633
+ }
4634
+ async function runDirectMessage(input) {
4635
+ const text = await resolveSpaceSendText({
4636
+ text: input.text,
4637
+ stdin: input.stdin,
4638
+ file: input.textFile,
4639
+ allowEmpty: true
4640
+ });
4641
+ if (input.wake && !text.trim()) throw new Error("Include a message describing the work to start.");
4642
+ const presenter = createPresenter(await resolveRuntimeContext({ view: input.view }));
4643
+ const response = await openDirectMessage({
4644
+ profile: input.profile,
4645
+ baseUrl: input.baseUrl,
4646
+ onRequest: (receipt) => presenter.line({
4647
+ code: "space.send.request",
4648
+ text: `Request: ${receipt.clientMessageId}`,
4649
+ data: receipt
4650
+ }),
4651
+ request: {
4652
+ targetProfileId: input.targetProfileId,
4653
+ ...input.spaceId ? { spaceId: input.spaceId } : {},
4654
+ ...input.creationId ? { creationId: input.creationId } : {},
4655
+ ...text.trim() ? { message: {
4656
+ text,
4657
+ clientMessageId: input.clientMessageId ?? randomUUID(),
4658
+ wake: input.wake === true
4659
+ } } : {}
4660
+ }
4661
+ });
4662
+ presenter.data({
4663
+ code: "direct_message.opened",
4664
+ payload: response
4665
+ });
4666
+ }
4667
+ //#endregion
4554
4668
  //#region src/space/dispatch-file-read.ts
4555
4669
  const execFileAsync = promisify(execFile);
4556
4670
  /** Keep file access outside the controller sandbox, under the existing CLI auth contract. */
@@ -5054,6 +5168,23 @@ function createDispatchSpaceTools(input = {}) {
5054
5168
  text: JSON.stringify(result ?? { status: "unavailable" })
5055
5169
  }] };
5056
5170
  });
5171
+ server.registerTool("open_direct_message", {
5172
+ title: "Open or send a Direct Message",
5173
+ description: "Open or reuse your private conversation with a Human or Agent in this organization. Open without message first to obtain spaceId. Then include that spaceId and a message with a stable UUID clientMessageId and wake=true to assign work; wake=false sends context only. Those IDs let you stop the request immediately with space wake-stop. Keep both IDs on retries. Agent owners can read and join. This is non-final: still return your final action to the current Space. A sent message does not prove work completed. Do not send acknowledgements that wake another Agent or forward unrelated private context.",
5174
+ inputSchema: openDirectMessageSpaceBodySchema.shape,
5175
+ annotations: {
5176
+ readOnlyHint: false,
5177
+ destructiveHint: false,
5178
+ idempotentHint: true,
5179
+ openWorldHint: false
5180
+ }
5181
+ }, async (request) => executeTaskAction(() => {
5182
+ if (request.message?.wake && !request.spaceId) throw new Error("Open the Direct Message first, then include its spaceId when assigning work.");
5183
+ return openDirectMessage({
5184
+ request,
5185
+ env
5186
+ });
5187
+ }));
5057
5188
  server.registerTool("list_tasks", {
5058
5189
  title: "List Tasks in the current OpenMeld Space",
5059
5190
  description: "Read durable collaboration Tasks for this Space. Use the returned revision before changing a Task. Task phase is collaboration state, not Agent execution truth.",
@@ -5922,6 +6053,6 @@ async function fetchSpaceUpdates(input) {
5922
6053
  return parsed.data;
5923
6054
  }
5924
6055
  //#endregion
5925
- export { enqueueControllerTaskLifecycleEventWhileLocked as A, resolveAgentActivityDispatcherCommand as B, createLedgerIo as C, recordOpenMeldCreatedLocalAgentSession as D, discoverLocalAgentSessionProviders as E, unregisterAgentActivityRoute as F, AGENT_ACTIVITY_INTEGRATION_OWNER as I, defaultManagedIntegrationPaths as L, isAgentActivityRouteRegistered as M, registerAgentActivityRoute as N, readAgentActivityContextForPath as O, resolveAgentActivityRouteForPath as P, installAgentActivityIntegrations as R, recordRuntimeReportingSuccess as S, syncLocalAgentActivity as T, uninstallAgentActivityIntegrations as V, prepareClaudeProjectContainer as _, createDispatchSpaceTools as a, recordRuntimeReportingFailure as b, runSpaceActionReply as c, runSpaceActionTargets as d, runSpaceActionWake as f, releaseExecutionContextWorkspace as g, readExecutionContextWorkspace as h, materializeOrganizationSkillRelease as i, readControllerTaskLifecycleOutboxHealth as j, removeAgentActivityContextCache as k, runSpaceActionSilent as l, prepareExecutionContextWorkspace as m, createSpaceWorkingCopies as n, runSpaceActionMcpServer as o, markExecutionContextWorkspaceInUse as p, downloadWorkingCopyFile as r, runSpaceActionHelp as s, fetchSpaceUpdates as t, runSpaceActionStatus as u, startDispatchSpaceProgressRelay as v, startLocalAgentActivitySyncLoop as w, recordRuntimeReportingNotApplicable as x, readRuntimeReportingHealthState as y, readAgentActivityIntegrationStatus as z };
6056
+ export { removeAgentActivityContextCache as A, readAgentActivityIntegrationStatus as B, recordRuntimeReportingSuccess as C, discoverLocalAgentSessionProviders as D, syncLocalAgentActivity as E, resolveAgentActivityRouteForPath as F, uninstallAgentActivityIntegrations as H, unregisterAgentActivityRoute as I, AGENT_ACTIVITY_INTEGRATION_OWNER as L, readControllerTaskLifecycleOutboxHealth as M, isAgentActivityRouteRegistered as N, recordOpenMeldCreatedLocalAgentSession as O, registerAgentActivityRoute as P, defaultManagedIntegrationPaths as R, recordRuntimeReportingNotApplicable as S, startLocalAgentActivitySyncLoop as T, resolveAgentActivityDispatcherCommand as V, releaseExecutionContextWorkspace as _, createDispatchSpaceTools as a, readRuntimeReportingHealthState as b, runSpaceActionHelp as c, runSpaceActionStatus as d, runSpaceActionTargets as f, readExecutionContextWorkspace as g, prepareExecutionContextWorkspace as h, materializeOrganizationSkillRelease as i, enqueueControllerTaskLifecycleEventWhileLocked as j, readAgentActivityContextForPath as k, runSpaceActionReply as l, markExecutionContextWorkspaceInUse as m, createSpaceWorkingCopies as n, runSpaceActionMcpServer as o, runSpaceActionWake as p, downloadWorkingCopyFile as r, runDirectMessage as s, fetchSpaceUpdates as t, runSpaceActionSilent as u, prepareClaudeProjectContainer as v, createLedgerIo as w, recordRuntimeReportingFailure as x, startDispatchSpaceProgressRelay as y, installAgentActivityIntegrations as z };
5926
6057
 
5927
- //# sourceMappingURL=updates-api-B7x39-DR.js.map
6058
+ //# sourceMappingURL=updates-api-dsNUTfpa.js.map