openmeld 0.3.237 → 0.3.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-me-membership-BEqSnfgo.js → add-me-membership-CoM_mJ-b.js} +2 -2
- package/dist/{add-me-membership-BEqSnfgo.js.map → add-me-membership-CoM_mJ-b.js.map} +1 -1
- package/dist/{agents-_Hh6L3Fi.js → agents-BrHNPIza.js} +17 -14
- package/dist/agents-BrHNPIza.js.map +1 -0
- package/dist/{api-client-foundation-CGc8AuMo.js → api-client-foundation-D5pIprkz.js} +3 -3
- package/dist/{api-client-foundation-CGc8AuMo.js.map → api-client-foundation-D5pIprkz.js.map} +1 -1
- package/dist/{api-client-foundation-ZuYF2Uah.js → api-client-foundation-DHkGzzGG.js} +1 -1
- package/dist/{auth-session-B3oyTcSI.js → auth-session-BTRu2Kc5.js} +2 -2
- package/dist/{auth-session-B3oyTcSI.js.map → auth-session-BTRu2Kc5.js.map} +1 -1
- package/dist/auth-session-D2f7Lud02.js +4 -0
- package/dist/{channel-BB6aEY--.js → channel-BxlX3o3i.js} +78 -4
- package/dist/channel-BxlX3o3i.js.map +1 -0
- package/dist/{command-D71NHS4j.js → command-DfIyDuvl.js} +37 -123
- package/dist/command-DfIyDuvl.js.map +1 -0
- package/dist/{computer-connection-DyL3C3HO.js → computer-connection-Sntn_-XO.js} +2 -2
- package/dist/{computer-connection-DyL3C3HO.js.map → computer-connection-Sntn_-XO.js.map} +1 -1
- package/dist/{computer-connection-review-BXuXP6KH.js → computer-connection-review-Ka_oNySD.js} +5 -5
- package/dist/{computer-connection-review-BXuXP6KH.js.map → computer-connection-review-Ka_oNySD.js.map} +1 -1
- package/dist/{computer-disconnect-BXZKVvxj.js → computer-disconnect-pvBUMehS.js} +8 -8
- package/dist/{computer-disconnect-BXZKVvxj.js.map → computer-disconnect-pvBUMehS.js.map} +1 -1
- package/dist/{computer-setup-continuation-DOvxRtAh.js → computer-setup-continuation-Cowbbx8k.js} +4 -4
- package/dist/{computer-setup-continuation-DOvxRtAh.js.map → computer-setup-continuation-Cowbbx8k.js.map} +1 -1
- package/dist/{daemon-device-id-Dwm7CHtX.js → daemon-device-id-D7lbw6c4.js} +226 -42
- package/dist/daemon-device-id-D7lbw6c4.js.map +1 -0
- package/dist/{daemon-lifecycle-journal-DrDyXoUO.js → daemon-lifecycle-journal-0gXU-eU8.js} +3 -3
- package/dist/{daemon-lifecycle-journal-DrDyXoUO.js.map → daemon-lifecycle-journal-0gXU-eU8.js.map} +1 -1
- package/dist/{daemon-service-runtime-D-tDDWWf.js → daemon-service-runtime-CTo2oiT_.js} +2 -2
- package/dist/{daemon-service-runtime-D-tDDWWf.js.map → daemon-service-runtime-CTo2oiT_.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-ykoOjGCd.js → daemon-service-update-coordinator-CfXSbQH7.js} +9 -10
- package/dist/{daemon-service-update-coordinator-ykoOjGCd.js.map → daemon-service-update-coordinator-CfXSbQH7.js.map} +1 -1
- package/dist/{dispatch-owned-runtime-eRa3wkl9.js → dispatch-owned-runtime-CPD9gM2K.js} +9 -7
- package/dist/{dispatch-owned-runtime-eRa3wkl9.js.map → dispatch-owned-runtime-CPD9gM2K.js.map} +1 -1
- package/dist/dist-JmQvl3T6.js +4 -0
- package/dist/{dist-DEjtwiDJ.js → dist-sH8NpjIN.js} +309 -18
- package/dist/dist-sH8NpjIN.js.map +1 -0
- package/dist/{elapsed-time-BnibmBPb.js → dual-view-guide-catalog-Qk4ZQfam.js} +215 -164
- package/dist/dual-view-guide-catalog-Qk4ZQfam.js.map +1 -0
- package/dist/elapsed-time-Df6d3nkk.js +165 -0
- package/dist/elapsed-time-Df6d3nkk.js.map +1 -0
- package/dist/{entry-CVxgr9uQ.js → entry-B6WlnCha.js} +7 -8
- package/dist/{entry-CVxgr9uQ.js.map → entry-B6WlnCha.js.map} +1 -1
- package/dist/{installation-inventory-HHLOQ2g7.js → installation-inventory-_duIUWss.js} +3 -3
- package/dist/{installation-inventory-HHLOQ2g7.js.map → installation-inventory-_duIUWss.js.map} +1 -1
- package/dist/{installer-Bg4KA0DR.js → installer-CJdJQco3.js} +2 -2
- package/dist/{installer-Bg4KA0DR.js.map → installer-CJdJQco3.js.map} +1 -1
- package/dist/{meta-api-CjvtAPvQ.js → meta-api-XVAyoWIw.js} +117 -6
- package/dist/meta-api-XVAyoWIw.js.map +1 -0
- package/dist/{openmeld-o_rTSEOO.js → openmeld-aOpLpGnq.js} +128 -88
- package/dist/openmeld-aOpLpGnq.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-Cwv6_5UL.js → openmeld-maintenance-worker-BmCadk9-.js} +9 -9
- package/dist/{openmeld-maintenance-worker-Cwv6_5UL.js.map → openmeld-maintenance-worker-BmCadk9-.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-IFQf70sm.js → openmeld-tools-update-join-9pbGIjqE.js} +4 -4
- package/dist/{openmeld-tools-update-join-IFQf70sm.js.map → openmeld-tools-update-join-9pbGIjqE.js.map} +1 -1
- package/dist/openmeld.js +4 -4
- package/dist/{prepare-provider-runtime-B_huS5DY.js → prepare-provider-runtime-BnwBAQkH.js} +126 -12
- package/dist/prepare-provider-runtime-BnwBAQkH.js.map +1 -0
- package/dist/{prepare-session-executor-WWjgnqsh.js → prepare-session-executor-CAz4foMJ.js} +19 -20
- package/dist/{prepare-session-executor-WWjgnqsh.js.map → prepare-session-executor-CAz4foMJ.js.map} +1 -1
- package/dist/{presenter-MJ5YgsOT.js → presenter-BcxiQyJg.js} +13 -3
- package/dist/presenter-BcxiQyJg.js.map +1 -0
- package/dist/{process-channel-C2dB41fO.js → process-channel-QRugdtrY.js} +2 -2
- package/dist/{process-channel-C2dB41fO.js.map → process-channel-QRugdtrY.js.map} +1 -1
- package/dist/{runtime-DjEQja8c.js → runtime-Ctey_DIE.js} +141 -18
- package/dist/runtime-Ctey_DIE.js.map +1 -0
- package/dist/{runtime-agent-controller-reporting-submission-CRS5CwMp.js → runtime-agent-controller-reporting-submission-adIxUk6V.js} +8 -8
- package/dist/{runtime-agent-controller-reporting-submission-CRS5CwMp.js.map → runtime-agent-controller-reporting-submission-adIxUk6V.js.map} +1 -1
- package/dist/{runtime-transport-B-GZhwVt.js → runtime-transport-BVCHi4qM.js} +10 -6
- package/dist/runtime-transport-BVCHi4qM.js.map +1 -0
- package/dist/{service-CleUczqJ.js → service-W-CdoiQ4.js} +43 -20
- package/dist/service-W-CdoiQ4.js.map +1 -0
- package/dist/{service-account-authorization-s1bXEswT.js → service-account-authorization-C1CdX1P3.js} +2 -2
- package/dist/{service-account-authorization-s1bXEswT.js.map → service-account-authorization-C1CdX1P3.js.map} +1 -1
- package/dist/{service-account-control-CjZ5uqK4.js → service-account-control-CRIDZfll.js} +8 -9
- package/dist/{service-account-control-CjZ5uqK4.js.map → service-account-control-CRIDZfll.js.map} +1 -1
- package/dist/{service-control-capabilities-D5izhuhD.js → service-control-capabilities-DUaoTDfB.js} +3 -3
- package/dist/{service-control-capabilities-D5izhuhD.js.map → service-control-capabilities-DUaoTDfB.js.map} +1 -1
- package/dist/{service-control-capabilities-Bcho1Rwq.js → service-control-capabilities-SarCxWmg.js} +1 -1
- package/dist/{state-CbrhgfNh.js → state-BCso_DsL.js} +2 -2
- package/dist/{state-CbrhgfNh.js.map → state-BCso_DsL.js.map} +1 -1
- package/dist/{updates-api-B7x39-DR.js → updates-api-BEVyS67y.js} +257 -13
- package/dist/updates-api-BEVyS67y.js.map +1 -0
- package/dist/upgrade-CbKLfGQ1.js +4 -0
- package/dist/{upgrade-BQSA2LfT.js → upgrade-DZKZ3xLM.js} +9 -9
- package/dist/{upgrade-BQSA2LfT.js.map → upgrade-DZKZ3xLM.js.map} +1 -1
- package/package.json +11 -11
- package/skills/openmeld-cli/playbooks/space-ops.md +24 -2
- package/skills/openmeld-cli/references/commands.md +9 -2
- package/dist/agents-_Hh6L3Fi.js.map +0 -1
- package/dist/auth-session-CoFlCq7_.js +0 -4
- package/dist/channel-BB6aEY--.js.map +0 -1
- package/dist/command-D71NHS4j.js.map +0 -1
- package/dist/context-43g3bIde.js +0 -162
- package/dist/context-43g3bIde.js.map +0 -1
- package/dist/daemon-device-id-Dwm7CHtX.js.map +0 -1
- package/dist/dist-CaCD0K8a.js +0 -216
- package/dist/dist-CaCD0K8a.js.map +0 -1
- package/dist/dist-DEjtwiDJ.js.map +0 -1
- package/dist/dist-DGNsLSYJ.js +0 -4
- package/dist/elapsed-time-BnibmBPb.js.map +0 -1
- package/dist/io-DT66typ4.js +0 -16
- package/dist/io-DT66typ4.js.map +0 -1
- package/dist/meta-api-CjvtAPvQ.js.map +0 -1
- package/dist/openmeld-o_rTSEOO.js.map +0 -1
- package/dist/prepare-provider-runtime-B_huS5DY.js.map +0 -1
- package/dist/presenter-MJ5YgsOT.js.map +0 -1
- package/dist/runtime-DjEQja8c.js.map +0 -1
- package/dist/runtime-transport-B-GZhwVt.js.map +0 -1
- package/dist/service-CleUczqJ.js.map +0 -1
- package/dist/updates-api-B7x39-DR.js.map +0 -1
- 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-
|
|
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-BnwBAQkH.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
|
|
7
|
-
import {
|
|
6
|
+
import { Cr as mutateSpaceTaskBodySchema, Kt as createDirectMessageApi, Li as signalTextEnvelopeSchema, Lt as createAgentActivityApi, Sr as createSpaceTaskBodySchema, Tr as spaceTaskMutationReceiptSchema, Wr as organizationSkillBundleSchema, Xr as stringifyOrganizationSkillBundleCanonicalJson, fn as createRuntimeReportingApi, gi as observedLocalAgentSessionSchema, ir as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, lr as openDirectMessageSpaceBodySchema, nn as createOrganizationDocumentsApi, oi as submitAgentControllerTaskLifecycleEventItemSchema, rn as createOrganizationSkillsApi, sr as getSpaceUpdatesResponseSchema, t as OpenMeldApiClientHttpError, wr as spaceTaskIdSchema } from "./dist-sH8NpjIN.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-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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-CPD9gM2K.js";
|
|
12
|
+
import { f as prepareRequestedSpaceSendFiles, h as spaceSendRequestReceiptSchema, l as parseJsonResponse, m as createCliSpaceApi, p as uploadPreparedSpaceFiles, s as readGatewayTextResponse, t as fetchSpaceMeta, u as resolveSpaceSendText } from "./meta-api-XVAyoWIw.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 {
|
|
19
|
-
import { d as buildOpenMeldRequestContextFromProfile, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-
|
|
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-D5pIprkz.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. */
|
|
@@ -4636,6 +4750,75 @@ async function readDispatchSpaceHistory(env = process.env) {
|
|
|
4636
4750
|
};
|
|
4637
4751
|
}
|
|
4638
4752
|
//#endregion
|
|
4753
|
+
//#region src/space/dispatch-knowledge-read.ts
|
|
4754
|
+
/** Existing member API, with the Agent identity and the Space's Organization. */
|
|
4755
|
+
async function readTaskDocuments(input) {
|
|
4756
|
+
const { foundation, requestContext } = await createTaskKnowledgeReader(input);
|
|
4757
|
+
const api = createOrganizationDocumentsApi(foundation);
|
|
4758
|
+
return input.documentId ? await api.get({
|
|
4759
|
+
requestContext,
|
|
4760
|
+
documentId: input.documentId
|
|
4761
|
+
}) : await api.list({ requestContext });
|
|
4762
|
+
}
|
|
4763
|
+
async function createTaskKnowledgeReader(input) {
|
|
4764
|
+
const profile = await requireOpenMeldProfile({
|
|
4765
|
+
openMeldProfileId: input.targetProfileId,
|
|
4766
|
+
profileKind: "agent",
|
|
4767
|
+
persistSelection: false,
|
|
4768
|
+
authAction: "reading task documents"
|
|
4769
|
+
});
|
|
4770
|
+
if (profile.openMeldProfileId !== input.targetProfileId || profile.profileKind !== "agent") throw new Error("The document reader does not match the current Agent.");
|
|
4771
|
+
const requestContext = buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile });
|
|
4772
|
+
const baseUrl = await resolveBaseUrl();
|
|
4773
|
+
return {
|
|
4774
|
+
requestContext,
|
|
4775
|
+
foundation: createCliApiClientFoundation(baseUrl, { organizationId: (await fetchSpaceMeta({
|
|
4776
|
+
baseUrl,
|
|
4777
|
+
requestContext,
|
|
4778
|
+
space: input.spaceId
|
|
4779
|
+
})).organizationId })
|
|
4780
|
+
};
|
|
4781
|
+
}
|
|
4782
|
+
async function readTaskSkillSelections(input) {
|
|
4783
|
+
const { foundation, requestContext } = await createTaskKnowledgeReader(input);
|
|
4784
|
+
return (await createOrganizationSkillsApi(foundation).list({ requestContext })).skills.filter((skill) => skill.enabled).map((skill) => ({
|
|
4785
|
+
skillId: skill.id,
|
|
4786
|
+
name: skill.name,
|
|
4787
|
+
releaseId: skill.activeRelease.id,
|
|
4788
|
+
digest: skill.activeRelease.digest
|
|
4789
|
+
}));
|
|
4790
|
+
}
|
|
4791
|
+
async function readDispatchSkill(input) {
|
|
4792
|
+
const context = readDispatchSpaceActionContextFromEnv(input.env);
|
|
4793
|
+
const selections = context.organizationSkillReleases ?? [];
|
|
4794
|
+
const { foundation, requestContext } = await createTaskKnowledgeReader(context);
|
|
4795
|
+
const api = createOrganizationSkillsApi(foundation);
|
|
4796
|
+
if (!input.name) {
|
|
4797
|
+
const current = await api.list({ requestContext });
|
|
4798
|
+
const enabled = new Set(current.skills.filter((skill) => skill.enabled).map((skill) => skill.id));
|
|
4799
|
+
return { skills: selections.filter((selection) => enabled.has(selection.skillId)) };
|
|
4800
|
+
}
|
|
4801
|
+
const selected = selections.filter((skill) => skill.name === input.name);
|
|
4802
|
+
if (!selected.length) throw new Error("This Skill was not selected for the current task.");
|
|
4803
|
+
return { skills: await Promise.all(selected.map(async (selection) => {
|
|
4804
|
+
const result = await api.get({
|
|
4805
|
+
...selection,
|
|
4806
|
+
requestContext
|
|
4807
|
+
});
|
|
4808
|
+
if (!(result.skill.enabled && result.selectedRelease) || result.selectedRelease.digest !== selection.digest || result.selectedRelease.releaseId !== selection.releaseId) throw new Error("The selected Skill release is unavailable or changed.");
|
|
4809
|
+
return {
|
|
4810
|
+
...selection,
|
|
4811
|
+
bundle: result.selectedRelease.bundle
|
|
4812
|
+
};
|
|
4813
|
+
})) };
|
|
4814
|
+
}
|
|
4815
|
+
async function readDispatchDocuments(input) {
|
|
4816
|
+
return await readTaskDocuments({
|
|
4817
|
+
...readDispatchSpaceActionContextFromEnv(input.env),
|
|
4818
|
+
documentId: input.documentId
|
|
4819
|
+
});
|
|
4820
|
+
}
|
|
4821
|
+
//#endregion
|
|
4639
4822
|
//#region src/space/dispatch-read-result.ts
|
|
4640
4823
|
const PAGE_BYTES = 8 * 1024;
|
|
4641
4824
|
const SNAPSHOT_BYTES = 32 * 1024 * 1024;
|
|
@@ -4826,7 +5009,9 @@ var DispatchSpaceTools = class {
|
|
|
4826
5009
|
const pagedRead = [
|
|
4827
5010
|
"read_history",
|
|
4828
5011
|
"read_file",
|
|
4829
|
-
"list_tasks"
|
|
5012
|
+
"list_tasks",
|
|
5013
|
+
"read_documents",
|
|
5014
|
+
"read_skills"
|
|
4830
5015
|
].includes(name);
|
|
4831
5016
|
this.tools.push({
|
|
4832
5017
|
...config,
|
|
@@ -4857,7 +5042,9 @@ var DispatchSpaceTools = class {
|
|
|
4857
5042
|
const pagedRead = [
|
|
4858
5043
|
"read_history",
|
|
4859
5044
|
"read_file",
|
|
4860
|
-
"list_tasks"
|
|
5045
|
+
"list_tasks",
|
|
5046
|
+
"read_documents",
|
|
5047
|
+
"read_skills"
|
|
4861
5048
|
].includes(name);
|
|
4862
5049
|
if (pagedRead || name === "read_result") try {
|
|
4863
5050
|
readDispatchSpaceActionContextFromEnv(this.#env);
|
|
@@ -5037,6 +5224,46 @@ function createDispatchSpaceTools(input = {}) {
|
|
|
5037
5224
|
};
|
|
5038
5225
|
}
|
|
5039
5226
|
});
|
|
5227
|
+
server.registerTool("read_documents", {
|
|
5228
|
+
title: "Read approved task documents",
|
|
5229
|
+
description: "List all approved Organization documents visible to this Wake, or pass documentId to read its current approved body. Uses the current Agent and Space; never returns drafts or grants action permissions. Read relevant bodies before applying rules. This does not complete the Wake.",
|
|
5230
|
+
inputSchema: { documentId: z.string().trim().min(1).optional() },
|
|
5231
|
+
annotations: {
|
|
5232
|
+
readOnlyHint: true,
|
|
5233
|
+
destructiveHint: false,
|
|
5234
|
+
idempotentHint: true,
|
|
5235
|
+
openWorldHint: false
|
|
5236
|
+
}
|
|
5237
|
+
}, async (args) => {
|
|
5238
|
+
const result = await readDispatchDocuments({
|
|
5239
|
+
...args,
|
|
5240
|
+
env
|
|
5241
|
+
});
|
|
5242
|
+
return { content: [{
|
|
5243
|
+
type: "text",
|
|
5244
|
+
text: JSON.stringify(result)
|
|
5245
|
+
}] };
|
|
5246
|
+
});
|
|
5247
|
+
server.registerTool("read_skills", {
|
|
5248
|
+
title: "Read this task's selected Skills",
|
|
5249
|
+
description: "List the task's frozen Skill selections, or pass name to read its exact instructions and resources through current Organization permissions. Includes entries omitted from the prompt. Does not install anything or change the selected release.",
|
|
5250
|
+
inputSchema: { name: z.string().trim().min(1).optional() },
|
|
5251
|
+
annotations: {
|
|
5252
|
+
readOnlyHint: true,
|
|
5253
|
+
destructiveHint: false,
|
|
5254
|
+
idempotentHint: true,
|
|
5255
|
+
openWorldHint: false
|
|
5256
|
+
}
|
|
5257
|
+
}, async (args) => {
|
|
5258
|
+
const result = await readDispatchSkill({
|
|
5259
|
+
...args,
|
|
5260
|
+
env
|
|
5261
|
+
});
|
|
5262
|
+
return { content: [{
|
|
5263
|
+
type: "text",
|
|
5264
|
+
text: JSON.stringify(result)
|
|
5265
|
+
}] };
|
|
5266
|
+
});
|
|
5040
5267
|
if (input.reportProgress) server.registerTool("report_progress", {
|
|
5041
5268
|
title: "Share public progress in the current OpenMeld Space",
|
|
5042
5269
|
description: "Share one brief, concrete update while this Wake is still running. Use this only when you start meaningful work, confirm a useful fact, change direction, or begin verification. Do not include private reasoning, protected information, credentials, raw commands, or unverified claims. Exact retries are idempotent. This does not post a final reply, close the Wake, or resume a parent task.",
|
|
@@ -5054,6 +5281,23 @@ function createDispatchSpaceTools(input = {}) {
|
|
|
5054
5281
|
text: JSON.stringify(result ?? { status: "unavailable" })
|
|
5055
5282
|
}] };
|
|
5056
5283
|
});
|
|
5284
|
+
server.registerTool("open_direct_message", {
|
|
5285
|
+
title: "Open or send a Direct Message",
|
|
5286
|
+
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.",
|
|
5287
|
+
inputSchema: openDirectMessageSpaceBodySchema.shape,
|
|
5288
|
+
annotations: {
|
|
5289
|
+
readOnlyHint: false,
|
|
5290
|
+
destructiveHint: false,
|
|
5291
|
+
idempotentHint: true,
|
|
5292
|
+
openWorldHint: false
|
|
5293
|
+
}
|
|
5294
|
+
}, async (request) => executeTaskAction(() => {
|
|
5295
|
+
if (request.message?.wake && !request.spaceId) throw new Error("Open the Direct Message first, then include its spaceId when assigning work.");
|
|
5296
|
+
return openDirectMessage({
|
|
5297
|
+
request,
|
|
5298
|
+
env
|
|
5299
|
+
});
|
|
5300
|
+
}));
|
|
5057
5301
|
server.registerTool("list_tasks", {
|
|
5058
5302
|
title: "List Tasks in the current OpenMeld Space",
|
|
5059
5303
|
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 +6166,6 @@ async function fetchSpaceUpdates(input) {
|
|
|
5922
6166
|
return parsed.data;
|
|
5923
6167
|
}
|
|
5924
6168
|
//#endregion
|
|
5925
|
-
export {
|
|
6169
|
+
export { recordOpenMeldCreatedLocalAgentSession as A, defaultManagedIntegrationPaths as B, recordRuntimeReportingFailure as C, startLocalAgentActivitySyncLoop as D, createLedgerIo as E, isAgentActivityRouteRegistered as F, readAgentActivityIntegrationStatus as H, registerAgentActivityRoute as I, resolveAgentActivityRouteForPath as L, removeAgentActivityContextCache as M, enqueueControllerTaskLifecycleEventWhileLocked as N, syncLocalAgentActivity as O, readControllerTaskLifecycleOutboxHealth as P, unregisterAgentActivityRoute as R, readRuntimeReportingHealthState as S, recordRuntimeReportingSuccess as T, resolveAgentActivityDispatcherCommand as U, installAgentActivityIntegrations as V, uninstallAgentActivityIntegrations as W, prepareExecutionContextWorkspace as _, createDispatchSpaceTools as a, prepareClaudeProjectContainer as b, readTaskSkillSelections as c, runSpaceActionReply as d, runSpaceActionSilent as f, markExecutionContextWorkspaceInUse as g, runSpaceActionWake as h, materializeOrganizationSkillRelease as i, readAgentActivityContextForPath as j, discoverLocalAgentSessionProviders as k, runDirectMessage as l, runSpaceActionTargets as m, createSpaceWorkingCopies as n, runSpaceActionMcpServer as o, runSpaceActionStatus as p, downloadWorkingCopyFile as r, readTaskDocuments as s, fetchSpaceUpdates as t, runSpaceActionHelp as u, readExecutionContextWorkspace as v, recordRuntimeReportingNotApplicable as w, startDispatchSpaceProgressRelay as x, releaseExecutionContextWorkspace as y, AGENT_ACTIVITY_INTEGRATION_OWNER as z };
|
|
5926
6170
|
|
|
5927
|
-
//# sourceMappingURL=updates-api-
|
|
6171
|
+
//# sourceMappingURL=updates-api-BEVyS67y.js.map
|