openmeld 0.3.240 → 0.3.242
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-7tGVrYxL.js → add-me-membership-JGpmeWkk.js} +2 -2
- package/dist/{add-me-membership-7tGVrYxL.js.map → add-me-membership-JGpmeWkk.js.map} +1 -1
- package/dist/{agents-DBYRT3tv.js → agents-4ldZFtzT.js} +9 -9
- package/dist/{agents-DBYRT3tv.js.map → agents-4ldZFtzT.js.map} +1 -1
- package/dist/{api-client-foundation-BawOr_Me.js → api-client-foundation-Dbc5MXyW.js} +3 -3
- package/dist/{api-client-foundation-BawOr_Me.js.map → api-client-foundation-Dbc5MXyW.js.map} +1 -1
- package/dist/{api-client-foundation-D4d0zKkj.js → api-client-foundation-uYxH6diU.js} +1 -1
- package/dist/{auth-session-BTRu2Kc5.js → auth-session-Injt39gv.js} +2 -2
- package/dist/{auth-session-BTRu2Kc5.js.map → auth-session-Injt39gv.js.map} +1 -1
- package/dist/auth-session-j1EhJkpg2.js +4 -0
- package/dist/{channel-BxlX3o3i.js → channel-CxgYezuw.js} +3 -3
- package/dist/{channel-BxlX3o3i.js.map → channel-CxgYezuw.js.map} +1 -1
- package/dist/{command-De0etxkZ.js → command-D1poZMYq.js} +15 -15
- package/dist/{command-De0etxkZ.js.map → command-D1poZMYq.js.map} +1 -1
- package/dist/{computer-connection-Sntn_-XO.js → computer-connection-CSa8O0op.js} +2 -2
- package/dist/{computer-connection-Sntn_-XO.js.map → computer-connection-CSa8O0op.js.map} +1 -1
- package/dist/{computer-connection-review-7dITXNrp.js → computer-connection-review-DlPe08AU.js} +5 -5
- package/dist/{computer-connection-review-7dITXNrp.js.map → computer-connection-review-DlPe08AU.js.map} +1 -1
- package/dist/{computer-disconnect-D4KjKURR.js → computer-disconnect-C6xJfCMA.js} +7 -7
- package/dist/{computer-disconnect-D4KjKURR.js.map → computer-disconnect-C6xJfCMA.js.map} +1 -1
- package/dist/{computer-setup-continuation-Wrw13eZn.js → computer-setup-continuation-fbbvdA8o.js} +3 -3
- package/dist/{computer-setup-continuation-Wrw13eZn.js.map → computer-setup-continuation-fbbvdA8o.js.map} +1 -1
- package/dist/{daemon-device-id-D7lbw6c4.js → daemon-device-id-CAKHWLK9.js} +4 -4
- package/dist/{daemon-device-id-D7lbw6c4.js.map → daemon-device-id-CAKHWLK9.js.map} +1 -1
- package/dist/{daemon-lifecycle-journal-DGJEfJJV.js → daemon-lifecycle-journal-eiHCp4B7.js} +6 -6
- package/dist/{daemon-lifecycle-journal-DGJEfJJV.js.map → daemon-lifecycle-journal-eiHCp4B7.js.map} +1 -1
- package/dist/{daemon-service-runtime-C1JWxsWw.js → daemon-service-runtime-zCpuDvfl.js} +2 -2
- package/dist/{daemon-service-runtime-C1JWxsWw.js.map → daemon-service-runtime-zCpuDvfl.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-BTLSv327.js → daemon-service-update-coordinator-Q5ihbImP.js} +9 -9
- package/dist/{daemon-service-update-coordinator-BTLSv327.js.map → daemon-service-update-coordinator-Q5ihbImP.js.map} +1 -1
- package/dist/{dispatch-owned-runtime-BAvm8fPb.js → dispatch-owned-runtime-B6HXvHVa.js} +10 -6
- package/dist/dispatch-owned-runtime-B6HXvHVa.js.map +1 -0
- package/dist/{dist-BytcJRwx.js → dist-BE0dKSoc.js} +1225 -802
- package/dist/dist-BE0dKSoc.js.map +1 -0
- package/dist/{dist-GOicky_R.js → dist-D4nEGVsQ.js} +1 -1
- package/dist/{dual-view-guide-catalog-Cpu4NNXt.js → dual-view-guide-catalog-Cf9dxh8-.js} +3 -3
- package/dist/{dual-view-guide-catalog-Cpu4NNXt.js.map → dual-view-guide-catalog-Cf9dxh8-.js.map} +1 -1
- package/dist/{elapsed-time-Db-ZMRoB.js → elapsed-time-ZiuFKVLD.js} +3 -3
- package/dist/{elapsed-time-Db-ZMRoB.js.map → elapsed-time-ZiuFKVLD.js.map} +1 -1
- package/dist/{entry-DBhL4ZRa.js → entry-B3OCEi01.js} +6 -6
- package/dist/{entry-DBhL4ZRa.js.map → entry-B3OCEi01.js.map} +1 -1
- package/dist/{installation-inventory-zfLJh479.js → installation-inventory-CRS2_ZJi.js} +3 -3
- package/dist/{installation-inventory-zfLJh479.js.map → installation-inventory-CRS2_ZJi.js.map} +1 -1
- package/dist/{installer-7vF9Vexz.js → installer-9RCKL6Dh.js} +2 -2
- package/dist/{installer-7vF9Vexz.js.map → installer-9RCKL6Dh.js.map} +1 -1
- package/dist/{meta-api-BADovRJo.js → meta-api-BBfF-3ln.js} +5 -5
- package/dist/{meta-api-BADovRJo.js.map → meta-api-BBfF-3ln.js.map} +1 -1
- package/dist/{openmeld-BxJZzTQQ.js → openmeld-CAlNOxmA.js} +101 -35
- package/dist/openmeld-CAlNOxmA.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-Bk8iJrZe.js → openmeld-maintenance-worker-DR32kAsg.js} +9 -9
- package/dist/{openmeld-maintenance-worker-Bk8iJrZe.js.map → openmeld-maintenance-worker-DR32kAsg.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-QLXJ0nhz.js → openmeld-tools-update-join-DWRJ6WpO.js} +4 -4
- package/dist/{openmeld-tools-update-join-QLXJ0nhz.js.map → openmeld-tools-update-join-DWRJ6WpO.js.map} +1 -1
- package/dist/openmeld.js +4 -4
- package/dist/{prepare-provider-runtime-BMV0ay2U.js → prepare-provider-runtime-CpG_NTZF.js} +23 -15
- package/dist/prepare-provider-runtime-CpG_NTZF.js.map +1 -0
- package/dist/{prepare-session-executor-DqKiH0W-.js → prepare-session-executor-ByEiJyxT.js} +18 -18
- package/dist/{prepare-session-executor-DqKiH0W-.js.map → prepare-session-executor-ByEiJyxT.js.map} +1 -1
- package/dist/{process-channel-QRugdtrY.js → process-channel-Ceb-ha2V.js} +2 -2
- package/dist/{process-channel-QRugdtrY.js.map → process-channel-Ceb-ha2V.js.map} +1 -1
- package/dist/{runtime-krIc08XW.js → runtime-DMHRemwP.js} +49 -66
- package/dist/runtime-DMHRemwP.js.map +1 -0
- package/dist/{runtime-agent-controller-reporting-submission-B5oPP2LR.js → runtime-agent-controller-reporting-submission-D51t3Q8e.js} +8 -8
- package/dist/{runtime-agent-controller-reporting-submission-B5oPP2LR.js.map → runtime-agent-controller-reporting-submission-D51t3Q8e.js.map} +1 -1
- package/dist/{runtime-transport-BVCHi4qM.js → runtime-transport-BPK70mkB.js} +65 -7
- package/dist/runtime-transport-BPK70mkB.js.map +1 -0
- package/dist/{service-D-9aXzla.js → service-BhwxCPsM.js} +19 -18
- package/dist/service-BhwxCPsM.js.map +1 -0
- package/dist/{service-account-authorization-C1CdX1P3.js → service-account-authorization-C6wZHidB.js} +2 -2
- package/dist/{service-account-authorization-C1CdX1P3.js.map → service-account-authorization-C6wZHidB.js.map} +1 -1
- package/dist/{service-account-control-DcTdeEqI.js → service-account-control-D_hTHF4w.js} +8 -8
- package/dist/{service-account-control-DcTdeEqI.js.map → service-account-control-D_hTHF4w.js.map} +1 -1
- package/dist/{service-control-capabilities-DxF7oTYb.js → service-control-capabilities-CfKNg0x2.js} +1 -1
- package/dist/{service-control-capabilities-B-VAPKAy.js → service-control-capabilities-VYS3-qJC.js} +3 -3
- package/dist/{service-control-capabilities-B-VAPKAy.js.map → service-control-capabilities-VYS3-qJC.js.map} +1 -1
- package/dist/{state-DddjOWBm.js → state-Bef17OTn.js} +2 -2
- package/dist/{state-DddjOWBm.js.map → state-Bef17OTn.js.map} +1 -1
- package/dist/{updates-api-TVlrczrO.js → updates-api-Cot1YmlU.js} +205 -49
- package/dist/updates-api-Cot1YmlU.js.map +1 -0
- package/dist/{upgrade-Bb8Mv01-.js → upgrade-9xk3iYag.js} +8 -8
- package/dist/{upgrade-Bb8Mv01-.js.map → upgrade-9xk3iYag.js.map} +1 -1
- package/dist/upgrade-CGcMw4vC.js +4 -0
- package/dist/windows/openmeld-windows-process.exe +0 -0
- package/package.json +14 -14
- package/skills/openmeld-cli/playbooks/plugins.md +11 -3
- package/dist/auth-session-D2f7Lud02.js +0 -4
- package/dist/dispatch-owned-runtime-BAvm8fPb.js.map +0 -1
- package/dist/dist-BytcJRwx.js.map +0 -1
- package/dist/openmeld-BxJZzTQQ.js.map +0 -1
- package/dist/prepare-provider-runtime-BMV0ay2U.js.map +0 -1
- package/dist/runtime-krIc08XW.js.map +0 -1
- package/dist/runtime-transport-BVCHi4qM.js.map +0 -1
- package/dist/service-D-9aXzla.js.map +0 -1
- package/dist/updates-api-TVlrczrO.js.map +0 -1
- package/dist/upgrade-n4gQvHoE.js +0 -4
|
@@ -1,15 +1,15 @@
|
|
|
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-CpG_NTZF.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 {
|
|
7
|
-
import {
|
|
6
|
+
import { $r as stringifyOrganizationSkillBundleCanonicalJson, Bi as signalTextEnvelopeSchema, Dr as spaceTaskMutationReceiptSchema, Er as spaceTaskIdSchema, Kt as createDirectMessageApi, Lt as createAgentActivityApi, Mr as spaceThreadEvidenceResponseSchema, Qn as buildSpaceThreadEvidence, Tr as mutateSpaceTaskBodySchema, Zn as buildSpaceMessageEvidence, dr as openDirectMessageSpaceBodySchema, fn as createRuntimeReportingApi, li as submitAgentControllerTaskLifecycleEventItemSchema, lr as getSpaceUpdatesResponseSchema, nn as createOrganizationDocumentsApi, or as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, qr as organizationSkillBundleSchema, rn as createOrganizationSkillsApi, t as OpenMeldApiClientHttpError, wr as createSpaceTaskBodySchema, yi as observedLocalAgentSessionSchema } from "./dist-BE0dKSoc.js";
|
|
7
|
+
import { Er as executionContextTaskSchema, In as spaceFileRevisionNumberSchema, Mn as spaceFileEntryIdSchema, an as SPACE_WORK_MAX_BYTES, bn as readSpaceFileTextResponseSchema, cn as spaceWorkSelectionSchema, ln as spaceWorkingCopyResultSchema, qn as spaceThreadEvidenceRequestSchema, sn as spaceWorkRelativePathSchema, wr as executionContextAssignmentSchema, zn as spaceMessageFileReferenceSchema } from "./runtime-transport-BPK70mkB.js";
|
|
8
8
|
import { O as openMeldRuntimeProfileIdSchema } from "./control-plane-QqGL-jtT.js";
|
|
9
|
-
import { d as getAuthSessionState } from "./auth-session-
|
|
10
|
-
import { B as resolveRuntimeContext, U as requireOpenMeldProfile, o as dirnamePath } from "./daemon-device-id-
|
|
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-
|
|
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-
|
|
9
|
+
import { d as getAuthSessionState } from "./auth-session-Injt39gv.js";
|
|
10
|
+
import { B as resolveRuntimeContext, U as requireOpenMeldProfile, o as dirnamePath } from "./daemon-device-id-CAKHWLK9.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-B6HXvHVa.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-BBfF-3ln.js";
|
|
13
13
|
import { d as runWithHeldLock, s as releaseLock, t as acquireLock } from "./lock-BMI00i2F.js";
|
|
14
14
|
import { a as resolveBaseUrl } from "./base-url-0AoeTi3w.js";
|
|
15
15
|
import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
|
|
@@ -17,7 +17,7 @@ import { _ as daemonRuntimeStateRootPath } from "./daemon-state-Dte9re5V.js";
|
|
|
17
17
|
import { i as readDaemonServiceContract } from "./daemon-service-contract-COPKbCy_.js";
|
|
18
18
|
import { l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand } from "./cli-entry-command-CR_9QU1i.js";
|
|
19
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-
|
|
20
|
+
import { d as buildOpenMeldRequestContextFromProfile, l as canAttachAuthTokenToRequest, n as fetchSpaceRequestWithTimeout, s as buildOpenMeldRequestContextHeadersWithAuth, t as createCliApiClientFoundation } from "./api-client-foundation-Dbc5MXyW.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";
|
|
@@ -29,7 +29,7 @@ import { execFile, spawn } from "node:child_process";
|
|
|
29
29
|
import { promisify } from "node:util";
|
|
30
30
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
31
31
|
import { createInterface } from "node:readline";
|
|
32
|
-
import { performance } from "node:perf_hooks";
|
|
32
|
+
import { performance as performance$1 } from "node:perf_hooks";
|
|
33
33
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
34
34
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
35
35
|
//#region ../../packages/schemas/dist/schemas/config/agent-activity-route-registry.js
|
|
@@ -83,6 +83,13 @@ const runtimeReportingHealthStateSchema = z$1.strictObject({
|
|
|
83
83
|
providerConversationProof: runtimeReportingChannelHealthSchema
|
|
84
84
|
});
|
|
85
85
|
//#endregion
|
|
86
|
+
//#region ../../packages/schemas/dist/schemas/space-mesh/space-message-evidence.js
|
|
87
|
+
const spaceMessageEvidenceRequestSchema = z$1.strictObject({
|
|
88
|
+
sourceSignalId: z$1.string().trim().min(1).max(256),
|
|
89
|
+
version: z$1.string().regex(/^sha256:[0-9a-f]{64}$/u).optional(),
|
|
90
|
+
offset: z$1.int().nonnegative().max(1e6).optional()
|
|
91
|
+
}).refine((value) => !value.offset || value.version !== void 0, { message: "A continuation must retain the source version." });
|
|
92
|
+
//#endregion
|
|
86
93
|
//#region ../../packages/schemas/dist/schemas/space-mesh/dispatch-project-shell.js
|
|
87
94
|
const dispatchProjectShellInputSchema = z$1.strictObject({ command: z$1.string().trim().min(1).max(16e3) });
|
|
88
95
|
const dispatchProjectShellResultSchema = z$1.strictObject({
|
|
@@ -4440,11 +4447,11 @@ function emitActionRecorded(record) {
|
|
|
4440
4447
|
outLine(`Action recorded: OpenMeld saved this unpublished Space action proposal (${record.action.type}) for the current Wake.`);
|
|
4441
4448
|
}
|
|
4442
4449
|
function createSpaceActionReplyTiming() {
|
|
4443
|
-
const startedAt = performance.now();
|
|
4450
|
+
const startedAt = performance$1.now();
|
|
4444
4451
|
let previousAt = startedAt;
|
|
4445
4452
|
const commandStartProcessUptimeMs = Math.round(startedAt);
|
|
4446
4453
|
return { emit: (phase, context, fields = {}) => {
|
|
4447
|
-
const now = performance.now();
|
|
4454
|
+
const now = performance$1.now();
|
|
4448
4455
|
const elapsedMs = Math.max(0, Math.round(now - startedAt));
|
|
4449
4456
|
const durationMs = Math.max(0, Math.round(now - previousAt));
|
|
4450
4457
|
previousAt = now;
|
|
@@ -4714,26 +4721,12 @@ async function readDispatchSpaceFile(input) {
|
|
|
4714
4721
|
//#region src/space/dispatch-history-read.ts
|
|
4715
4722
|
/** Read the current Wake's bounded Space history through the existing member API. */
|
|
4716
4723
|
async function readDispatchSpaceHistory(env = process.env) {
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
});
|
|
4724
|
-
if (profile.openMeldProfileId !== context.targetProfileId || profile.profileKind !== "agent") throw new Error("The Space history reader does not match the current Agent.");
|
|
4725
|
-
const result = await createCliSpaceApi(await resolveBaseUrl()).listSignals({
|
|
4726
|
-
spaceId: context.spaceId,
|
|
4727
|
-
requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile }),
|
|
4728
|
-
query: {
|
|
4729
|
-
aroundSignalId: context.sourceEventId,
|
|
4730
|
-
beforeCount: 20,
|
|
4731
|
-
afterCount: 0,
|
|
4732
|
-
kinds: ["text"]
|
|
4733
|
-
}
|
|
4734
|
-
});
|
|
4735
|
-
const current = readDispatchSpaceActionContextFromEnv(env);
|
|
4736
|
-
if (current.contextId !== context.contextId || current.nonce !== context.nonce || current.spaceId !== context.spaceId || current.sourceEventId !== context.sourceEventId || current.targetProfileId !== context.targetProfileId) throw new Error("The dispatch context changed during the Space history read.");
|
|
4724
|
+
const { context, result } = await readDispatchSignals(env, (sourceSignalId) => ({
|
|
4725
|
+
aroundSignalId: sourceSignalId,
|
|
4726
|
+
beforeCount: 20,
|
|
4727
|
+
afterCount: 0,
|
|
4728
|
+
kinds: ["text"]
|
|
4729
|
+
}));
|
|
4737
4730
|
const output = dispatchSpaceHistoryResultSchema.parse({
|
|
4738
4731
|
spaceId: context.spaceId,
|
|
4739
4732
|
sourceSignalId: context.sourceEventId,
|
|
@@ -4743,14 +4736,113 @@ async function readDispatchSpaceHistory(env = process.env) {
|
|
|
4743
4736
|
nextCursor: result.nextCursor
|
|
4744
4737
|
});
|
|
4745
4738
|
const signals = output.signals.map((signal) => signalTextEnvelopeSchema.parse(signal));
|
|
4746
|
-
if (signals.some((signal) => signal.spaceId !== context.spaceId)) throw new Error("The Space history response does not match the current Space.");
|
|
4747
4739
|
return {
|
|
4748
4740
|
...output,
|
|
4749
4741
|
signals
|
|
4750
4742
|
};
|
|
4751
4743
|
}
|
|
4744
|
+
async function readDispatchSpaceEvidence(input, env = process.env) {
|
|
4745
|
+
const request = spaceMessageEvidenceRequestSchema.parse(input);
|
|
4746
|
+
const { context, result } = await readDispatchSignals(env, () => ({
|
|
4747
|
+
aroundSignalId: request.sourceSignalId,
|
|
4748
|
+
beforeCount: 0,
|
|
4749
|
+
afterCount: 0,
|
|
4750
|
+
kinds: ["text"]
|
|
4751
|
+
}));
|
|
4752
|
+
const signal = result.signals.find((candidate) => candidate.id === request.sourceSignalId);
|
|
4753
|
+
if (!signal || signal.type !== "signal.text") throw new Error("space.evidence_unavailable: The requested message is unavailable.");
|
|
4754
|
+
return await buildSpaceMessageEvidence({
|
|
4755
|
+
...request,
|
|
4756
|
+
spaceId: context.spaceId,
|
|
4757
|
+
signal: signalTextEnvelopeSchema.parse(signal)
|
|
4758
|
+
});
|
|
4759
|
+
}
|
|
4760
|
+
async function readDispatchSignals(env, query) {
|
|
4761
|
+
return await readDispatchSource(env, async ({ api, context, requestContext }) => {
|
|
4762
|
+
const result = await api.listSignals({
|
|
4763
|
+
spaceId: context.spaceId,
|
|
4764
|
+
requestContext,
|
|
4765
|
+
query: query(context.sourceEventId)
|
|
4766
|
+
});
|
|
4767
|
+
const signals = result.signals.map((signal) => signalTextEnvelopeSchema.parse(signal));
|
|
4768
|
+
if (signals.some((signal) => signal.spaceId !== context.spaceId)) throw new Error("The Space history response does not match the current Space.");
|
|
4769
|
+
return {
|
|
4770
|
+
...result,
|
|
4771
|
+
signals
|
|
4772
|
+
};
|
|
4773
|
+
});
|
|
4774
|
+
}
|
|
4775
|
+
async function readDispatchSpaceThreadEvidence(value, env = process.env) {
|
|
4776
|
+
const input = spaceThreadEvidenceRequestSchema.parse(value);
|
|
4777
|
+
const { result } = await readDispatchSource(env, async ({ api, context, requestContext }) => {
|
|
4778
|
+
const selection = {
|
|
4779
|
+
spaceId: context.spaceId,
|
|
4780
|
+
requestContext,
|
|
4781
|
+
threadId: input.threadId
|
|
4782
|
+
};
|
|
4783
|
+
const thread = await api.getThread(selection);
|
|
4784
|
+
if (thread.thread.spaceId !== context.spaceId || thread.thread.threadId !== input.threadId) throw new Error("space.evidence_source_mismatch");
|
|
4785
|
+
const page = await api.listThreadSignals(selection);
|
|
4786
|
+
if (page.placements.some((placement) => placement.threadId !== input.threadId)) throw new Error("space.evidence_source_mismatch");
|
|
4787
|
+
return await buildSpaceThreadEvidence({
|
|
4788
|
+
...input,
|
|
4789
|
+
thread: thread.thread,
|
|
4790
|
+
signals: page.signals
|
|
4791
|
+
});
|
|
4792
|
+
});
|
|
4793
|
+
return spaceThreadEvidenceResponseSchema.parse(result);
|
|
4794
|
+
}
|
|
4795
|
+
async function readDispatchSource(env, read) {
|
|
4796
|
+
if (env["OPENMELD_DISPATCH_RUNTIME_MODE"] !== "dispatch-owned-runtime") throw new Error("Space history tools require an active OpenMeld dispatch runtime.");
|
|
4797
|
+
const context = readDispatchSpaceActionContextFromEnv(env);
|
|
4798
|
+
const profile = await requireOpenMeldProfile({
|
|
4799
|
+
openMeldProfileId: context.targetProfileId,
|
|
4800
|
+
persistSelection: false,
|
|
4801
|
+
authAction: "reading the current Wake's Space history"
|
|
4802
|
+
});
|
|
4803
|
+
if (profile.openMeldProfileId !== context.targetProfileId || profile.profileKind !== "agent") throw new Error("The Space history reader does not match the current Agent.");
|
|
4804
|
+
const result = await read({
|
|
4805
|
+
api: createCliSpaceApi(await resolveBaseUrl()),
|
|
4806
|
+
context,
|
|
4807
|
+
requestContext: buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile })
|
|
4808
|
+
});
|
|
4809
|
+
const current = readDispatchSpaceActionContextFromEnv(env);
|
|
4810
|
+
if (current.contextId !== context.contextId || current.nonce !== context.nonce || current.spaceId !== context.spaceId || current.sourceEventId !== context.sourceEventId || current.targetProfileId !== context.targetProfileId) throw new Error("The dispatch context changed during the Space history read.");
|
|
4811
|
+
return {
|
|
4812
|
+
context,
|
|
4813
|
+
result
|
|
4814
|
+
};
|
|
4815
|
+
}
|
|
4752
4816
|
//#endregion
|
|
4753
4817
|
//#region src/space/dispatch-knowledge-read.ts
|
|
4818
|
+
async function observeRead(input, operation, read) {
|
|
4819
|
+
const startedAt = performance.now();
|
|
4820
|
+
let status = "failed";
|
|
4821
|
+
try {
|
|
4822
|
+
const result = await read();
|
|
4823
|
+
status = "loaded";
|
|
4824
|
+
return result;
|
|
4825
|
+
} finally {
|
|
4826
|
+
input.onRead?.({
|
|
4827
|
+
operation,
|
|
4828
|
+
durationMs: Math.round(performance.now() - startedAt),
|
|
4829
|
+
status
|
|
4830
|
+
});
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
/** Share identity and Space scope only for this preparation, never across Wakes. */
|
|
4834
|
+
async function readTaskKnowledge(input) {
|
|
4835
|
+
const { foundation, requestContext, spaceMeta } = await createTaskKnowledgeReader(input);
|
|
4836
|
+
const [documents, skills] = await Promise.all([observeRead(input, "documents", () => createOrganizationDocumentsApi(foundation).list({ requestContext })).then((result) => result.documents).catch(() => null), input.skillSelections !== void 0 ? Promise.resolve(input.skillSelections) : observeRead(input, "skills", () => readSkillSelections({
|
|
4837
|
+
foundation,
|
|
4838
|
+
requestContext
|
|
4839
|
+
})).catch(() => null)]);
|
|
4840
|
+
return {
|
|
4841
|
+
documents,
|
|
4842
|
+
skills,
|
|
4843
|
+
spaceMeta
|
|
4844
|
+
};
|
|
4845
|
+
}
|
|
4754
4846
|
/** Existing member API, with the Agent identity and the Space's Organization. */
|
|
4755
4847
|
async function readTaskDocuments(input) {
|
|
4756
4848
|
const { foundation, requestContext } = await createTaskKnowledgeReader(input);
|
|
@@ -4761,26 +4853,28 @@ async function readTaskDocuments(input) {
|
|
|
4761
4853
|
}) : await api.list({ requestContext });
|
|
4762
4854
|
}
|
|
4763
4855
|
async function createTaskKnowledgeReader(input) {
|
|
4764
|
-
const profile = await requireOpenMeldProfile({
|
|
4856
|
+
const profile = await observeRead(input, "identity", () => requireOpenMeldProfile({
|
|
4765
4857
|
openMeldProfileId: input.targetProfileId,
|
|
4766
4858
|
profileKind: "agent",
|
|
4767
4859
|
persistSelection: false,
|
|
4768
4860
|
authAction: "reading task documents"
|
|
4769
|
-
});
|
|
4861
|
+
}));
|
|
4770
4862
|
if (profile.openMeldProfileId !== input.targetProfileId || profile.profileKind !== "agent") throw new Error("The document reader does not match the current Agent.");
|
|
4771
4863
|
const requestContext = buildOpenMeldRequestContextFromProfile({ openMeldProfile: profile });
|
|
4772
4864
|
const baseUrl = await resolveBaseUrl();
|
|
4865
|
+
const meta = await observeRead(input, "space_metadata", () => fetchSpaceMeta({
|
|
4866
|
+
baseUrl,
|
|
4867
|
+
requestContext,
|
|
4868
|
+
space: input.spaceId,
|
|
4869
|
+
...input.spacePassword ? { password: input.spacePassword } : {}
|
|
4870
|
+
}));
|
|
4773
4871
|
return {
|
|
4872
|
+
spaceMeta: meta,
|
|
4774
4873
|
requestContext,
|
|
4775
|
-
foundation: createCliApiClientFoundation(baseUrl, { organizationId:
|
|
4776
|
-
baseUrl,
|
|
4777
|
-
requestContext,
|
|
4778
|
-
space: input.spaceId
|
|
4779
|
-
})).organizationId })
|
|
4874
|
+
foundation: createCliApiClientFoundation(baseUrl, { organizationId: meta.organizationId })
|
|
4780
4875
|
};
|
|
4781
4876
|
}
|
|
4782
|
-
async function
|
|
4783
|
-
const { foundation, requestContext } = await createTaskKnowledgeReader(input);
|
|
4877
|
+
async function readSkillSelections({ foundation, requestContext }) {
|
|
4784
4878
|
return (await createOrganizationSkillsApi(foundation).list({ requestContext })).skills.filter((skill) => skill.enabled).map((skill) => ({
|
|
4785
4879
|
skillId: skill.id,
|
|
4786
4880
|
name: skill.name,
|
|
@@ -4826,9 +4920,9 @@ const SNAPSHOT_COUNT = 4;
|
|
|
4826
4920
|
var DispatchReadResults = class {
|
|
4827
4921
|
#snapshots = /* @__PURE__ */ new Map();
|
|
4828
4922
|
#bytes = 0;
|
|
4829
|
-
wrap(result) {
|
|
4923
|
+
wrap(result, revalidate) {
|
|
4830
4924
|
if (result.isError) return result;
|
|
4831
|
-
const value =
|
|
4925
|
+
const value = readValue(result);
|
|
4832
4926
|
const complete = dispatchSpaceReadResultSchema.parse({ result: value });
|
|
4833
4927
|
if (Buffer.byteLength(JSON.stringify(complete)) <= PAGE_BYTES) return this.#result(complete);
|
|
4834
4928
|
const bytes = Buffer.from(JSON.stringify(value));
|
|
@@ -4842,14 +4936,29 @@ var DispatchReadResults = class {
|
|
|
4842
4936
|
const resultId = randomUUID();
|
|
4843
4937
|
this.#snapshots.set(resultId, {
|
|
4844
4938
|
bytes,
|
|
4845
|
-
offsets: /* @__PURE__ */ new Set([0])
|
|
4939
|
+
offsets: /* @__PURE__ */ new Set([0]),
|
|
4940
|
+
revalidate
|
|
4846
4941
|
});
|
|
4847
4942
|
this.#bytes += bytes.length;
|
|
4848
|
-
return this
|
|
4943
|
+
return this.#page(resultId, 0);
|
|
4944
|
+
}
|
|
4945
|
+
async read(resultId, offset) {
|
|
4946
|
+
const snapshot = this.#requireSnapshot(resultId, offset);
|
|
4947
|
+
const current = await snapshot.revalidate();
|
|
4948
|
+
if (current.isError || !Buffer.from(JSON.stringify(readValue(current))).equals(snapshot.bytes)) {
|
|
4949
|
+
this.#bytes -= snapshot.bytes.length;
|
|
4950
|
+
this.#snapshots.delete(resultId);
|
|
4951
|
+
throw new Error("The source is no longer accessible or its selected version changed. No cached page was disclosed. Read the source again.");
|
|
4952
|
+
}
|
|
4953
|
+
return this.#page(resultId, offset);
|
|
4849
4954
|
}
|
|
4850
|
-
|
|
4955
|
+
#requireSnapshot(resultId, offset) {
|
|
4851
4956
|
const snapshot = this.#snapshots.get(resultId);
|
|
4852
4957
|
if (!snapshot?.offsets.has(offset)) throw new Error("This result or offset is unavailable in the current tool invocation. Use a returned nextOffset, or read the source again; do not open a local file.");
|
|
4958
|
+
return snapshot;
|
|
4959
|
+
}
|
|
4960
|
+
#page(resultId, offset) {
|
|
4961
|
+
const snapshot = this.#requireSnapshot(resultId, offset);
|
|
4853
4962
|
const { bytes } = snapshot;
|
|
4854
4963
|
let end = Math.min(offset + PAGE_BYTES, bytes.length);
|
|
4855
4964
|
while (true) {
|
|
@@ -4883,6 +4992,9 @@ var DispatchReadResults = class {
|
|
|
4883
4992
|
};
|
|
4884
4993
|
}
|
|
4885
4994
|
};
|
|
4995
|
+
function readValue(result) {
|
|
4996
|
+
return result.structuredContent ?? JSON.parse(result.content.map((item) => item.text).join("\n"));
|
|
4997
|
+
}
|
|
4886
4998
|
function isUtf8Continuation(byte) {
|
|
4887
4999
|
return byte !== void 0 && byte >= 128 && byte < 192;
|
|
4888
5000
|
}
|
|
@@ -5008,6 +5120,8 @@ var DispatchSpaceTools = class {
|
|
|
5008
5120
|
const inputSchema = config.inputSchema instanceof z.ZodObject ? config.inputSchema : z.strictObject(config.inputSchema);
|
|
5009
5121
|
const pagedRead = [
|
|
5010
5122
|
"read_history",
|
|
5123
|
+
"read_evidence",
|
|
5124
|
+
"read_thread",
|
|
5011
5125
|
"read_file",
|
|
5012
5126
|
"list_tasks",
|
|
5013
5127
|
"read_documents",
|
|
@@ -5041,6 +5155,8 @@ var DispatchSpaceTools = class {
|
|
|
5041
5155
|
}, this.#env);
|
|
5042
5156
|
const pagedRead = [
|
|
5043
5157
|
"read_history",
|
|
5158
|
+
"read_evidence",
|
|
5159
|
+
"read_thread",
|
|
5044
5160
|
"read_file",
|
|
5045
5161
|
"list_tasks",
|
|
5046
5162
|
"read_documents",
|
|
@@ -5051,7 +5167,7 @@ var DispatchSpaceTools = class {
|
|
|
5051
5167
|
const result = await handler(args);
|
|
5052
5168
|
const active = readDispatchSpaceActionContextFromEnv(this.#env);
|
|
5053
5169
|
if (this.#closed || active.contextId !== this.#context.contextId || active.nonce !== this.#context.nonce) throw new Error("The Wake changed or closed during this read. No result is available.");
|
|
5054
|
-
return pagedRead ? this.#readResults.wrap(result) : result;
|
|
5170
|
+
return pagedRead ? this.#readResults.wrap(result, () => handler(args)) : result;
|
|
5055
5171
|
} catch (error) {
|
|
5056
5172
|
return {
|
|
5057
5173
|
isError: true,
|
|
@@ -5191,6 +5307,46 @@ function createDispatchSpaceTools(input = {}) {
|
|
|
5191
5307
|
};
|
|
5192
5308
|
}
|
|
5193
5309
|
});
|
|
5310
|
+
server.registerTool("read_evidence", {
|
|
5311
|
+
title: "Read an exact Space message version",
|
|
5312
|
+
description: "Read one selected message in the current Space, up to 4,000 characters per source page. Use its sourceSignalId and version; continue with the returned nextOffset and the same version. Every read checks current source access. An unavailable version fails explicitly.",
|
|
5313
|
+
inputSchema: spaceMessageEvidenceRequestSchema,
|
|
5314
|
+
annotations: {
|
|
5315
|
+
readOnlyHint: true,
|
|
5316
|
+
destructiveHint: false,
|
|
5317
|
+
idempotentHint: true,
|
|
5318
|
+
openWorldHint: false
|
|
5319
|
+
}
|
|
5320
|
+
}, async (input) => {
|
|
5321
|
+
const result = await readDispatchSpaceEvidence(input, env);
|
|
5322
|
+
return {
|
|
5323
|
+
structuredContent: result,
|
|
5324
|
+
content: [{
|
|
5325
|
+
type: "text",
|
|
5326
|
+
text: JSON.stringify(result)
|
|
5327
|
+
}]
|
|
5328
|
+
};
|
|
5329
|
+
});
|
|
5330
|
+
server.registerTool("read_thread", {
|
|
5331
|
+
title: "Read an exact Space thread version",
|
|
5332
|
+
description: "Read up to 20 messages and 4,000 characters from a named thread in this Space. Continue with nextOffset and the same sourceRef.version; changed or inaccessible versions fail explicitly. Read truncated messages with read_evidence using their exact sourceRef. Every page checks current access.",
|
|
5333
|
+
inputSchema: spaceThreadEvidenceRequestSchema,
|
|
5334
|
+
annotations: {
|
|
5335
|
+
readOnlyHint: true,
|
|
5336
|
+
destructiveHint: false,
|
|
5337
|
+
idempotentHint: true,
|
|
5338
|
+
openWorldHint: false
|
|
5339
|
+
}
|
|
5340
|
+
}, async (input) => {
|
|
5341
|
+
const result = await readDispatchSpaceThreadEvidence(input, env);
|
|
5342
|
+
return {
|
|
5343
|
+
structuredContent: result,
|
|
5344
|
+
content: [{
|
|
5345
|
+
type: "text",
|
|
5346
|
+
text: JSON.stringify(result)
|
|
5347
|
+
}]
|
|
5348
|
+
};
|
|
5349
|
+
});
|
|
5194
5350
|
server.registerTool("read_file", {
|
|
5195
5351
|
title: "Read a file in the current OpenMeld Space",
|
|
5196
5352
|
description: "Read a shared text file as the Agent in the current Wake. Use this for attached CSV, text, Markdown, or JSON files instead of running the CLI in a terminal. Pass the attachment's file ID and revision. This is a context read; it does not submit a reply or close the Wake.",
|
|
@@ -6166,6 +6322,6 @@ async function fetchSpaceUpdates(input) {
|
|
|
6166
6322
|
return parsed.data;
|
|
6167
6323
|
}
|
|
6168
6324
|
//#endregion
|
|
6169
|
-
export {
|
|
6325
|
+
export { readAgentActivityContextForPath as A, installAgentActivityIntegrations as B, recordRuntimeReportingNotApplicable as C, syncLocalAgentActivity as D, startLocalAgentActivitySyncLoop as E, registerAgentActivityRoute as F, resolveAgentActivityDispatcherCommand as H, resolveAgentActivityRouteForPath as I, unregisterAgentActivityRoute as L, enqueueControllerTaskLifecycleEventWhileLocked as M, readControllerTaskLifecycleOutboxHealth as N, discoverLocalAgentSessionProviders as O, isAgentActivityRouteRegistered as P, AGENT_ACTIVITY_INTEGRATION_OWNER as R, recordRuntimeReportingFailure as S, createLedgerIo as T, uninstallAgentActivityIntegrations as U, readAgentActivityIntegrationStatus as V, readExecutionContextWorkspace as _, createDispatchSpaceTools as a, startDispatchSpaceProgressRelay as b, runDirectMessage as c, runSpaceActionSilent as d, runSpaceActionStatus as f, prepareExecutionContextWorkspace as g, markExecutionContextWorkspaceInUse as h, materializeOrganizationSkillRelease as i, removeAgentActivityContextCache as j, recordOpenMeldCreatedLocalAgentSession as k, runSpaceActionHelp as l, runSpaceActionWake as m, createSpaceWorkingCopies as n, runSpaceActionMcpServer as o, runSpaceActionTargets as p, downloadWorkingCopyFile as r, readTaskKnowledge as s, fetchSpaceUpdates as t, runSpaceActionReply as u, releaseExecutionContextWorkspace as v, recordRuntimeReportingSuccess as w, readRuntimeReportingHealthState as x, prepareClaudeProjectContainer as y, defaultManagedIntegrationPaths as z };
|
|
6170
6326
|
|
|
6171
|
-
//# sourceMappingURL=updates-api-
|
|
6327
|
+
//# sourceMappingURL=updates-api-Cot1YmlU.js.map
|