openmeld 0.3.246 → 0.3.248
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-C7dYkfPz.js → add-me-membership-zSJAa2ET.js} +2 -2
- package/dist/{add-me-membership-C7dYkfPz.js.map → add-me-membership-zSJAa2ET.js.map} +1 -1
- package/dist/{agents-QisYIlFS.js → agents-DLjDbkLV.js} +10 -10
- package/dist/{agents-QisYIlFS.js.map → agents-DLjDbkLV.js.map} +1 -1
- package/dist/{api-client-foundation-CYbEdm9o.js → api-client-foundation-BZvzqIeX.js} +3 -3
- package/dist/{api-client-foundation-CYbEdm9o.js.map → api-client-foundation-BZvzqIeX.js.map} +1 -1
- package/dist/{api-client-foundation-B1aTRrIy.js → api-client-foundation-DE_UqE2s.js} +1 -1
- package/dist/auth-session-BOi-tZ2y.js +4 -0
- package/dist/{auth-session-JhILeJRO.js → auth-session-DywRZLBr.js} +4 -4
- package/dist/{auth-session-JhILeJRO.js.map → auth-session-DywRZLBr.js.map} +1 -1
- package/dist/{channel-C6tm9T7P.js → channel-40SR2b5S.js} +3 -3
- package/dist/{channel-C6tm9T7P.js.map → channel-40SR2b5S.js.map} +1 -1
- package/dist/{cloud-computer-J2tdcTPm.js → cloud-computer-BqFhsHhC.js} +4 -4
- package/dist/{cloud-computer-J2tdcTPm.js.map → cloud-computer-BqFhsHhC.js.map} +1 -1
- package/dist/{command-BXJ-OwBD.js → command-DBfu-GeG.js} +15 -15
- package/dist/{command-BXJ-OwBD.js.map → command-DBfu-GeG.js.map} +1 -1
- package/dist/{computer-connection-BKtrn0d2.js → computer-connection-CVyM42a0.js} +2 -2
- package/dist/{computer-connection-BKtrn0d2.js.map → computer-connection-CVyM42a0.js.map} +1 -1
- package/dist/{computer-connection-review-bUqNKi6q.js → computer-connection-review-B5qKu2C9.js} +5 -5
- package/dist/{computer-connection-review-bUqNKi6q.js.map → computer-connection-review-B5qKu2C9.js.map} +1 -1
- package/dist/{computer-disconnect-D_Apsn9P.js → computer-disconnect-BxhAjQQx.js} +7 -7
- package/dist/{computer-disconnect-D_Apsn9P.js.map → computer-disconnect-BxhAjQQx.js.map} +1 -1
- package/dist/{computer-setup-continuation-occq0LmS.js → computer-setup-continuation-V40ov5FS.js} +3 -3
- package/dist/{computer-setup-continuation-occq0LmS.js.map → computer-setup-continuation-V40ov5FS.js.map} +1 -1
- package/dist/{context-M7dvalCp.js → context-BEgBhfbb.js} +4 -4
- package/dist/{context-M7dvalCp.js.map → context-BEgBhfbb.js.map} +1 -1
- package/dist/{daemon-device-id-C3gKch4E.js → daemon-device-id-CmykIapy.js} +4 -4
- package/dist/{daemon-device-id-C3gKch4E.js.map → daemon-device-id-CmykIapy.js.map} +1 -1
- package/dist/{daemon-lifecycle-journal-CGUuJshv.js → daemon-lifecycle-journal-2dzGUSWU.js} +3 -3
- package/dist/{daemon-lifecycle-journal-CGUuJshv.js.map → daemon-lifecycle-journal-2dzGUSWU.js.map} +1 -1
- package/dist/{daemon-service-runtime-CktU3ER4.js → daemon-service-runtime-pECs8jVc.js} +2 -2
- package/dist/{daemon-service-runtime-CktU3ER4.js.map → daemon-service-runtime-pECs8jVc.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-D0-15tZW.js → daemon-service-update-coordinator-DJKBTEjx.js} +14 -14
- package/dist/daemon-service-update-coordinator-DJKBTEjx.js.map +1 -0
- package/dist/{dispatch-owned-runtime-gOluDX5_.js → dispatch-owned-runtime-QhxDRdNr.js} +191 -52
- package/dist/dispatch-owned-runtime-QhxDRdNr.js.map +1 -0
- package/dist/{dist-KibLweLD.js → dist-BQcUIyf6.js} +747 -529
- package/dist/dist-BQcUIyf6.js.map +1 -0
- package/dist/dist-C8M8nzJ2.js +4 -0
- package/dist/{dual-view-guide-catalog-0kSizTFt.js → dual-view-guide-catalog-DDsnLpIT.js} +3 -3
- package/dist/{dual-view-guide-catalog-0kSizTFt.js.map → dual-view-guide-catalog-DDsnLpIT.js.map} +1 -1
- package/dist/{elapsed-time-Bo1CJczC.js → elapsed-time-DTb6L36x.js} +3 -3
- package/dist/{elapsed-time-Bo1CJczC.js.map → elapsed-time-DTb6L36x.js.map} +1 -1
- package/dist/{entry-B11DkH2I.js → entry-B3w4ZTC5.js} +7 -7
- package/dist/{entry-B11DkH2I.js.map → entry-B3w4ZTC5.js.map} +1 -1
- package/dist/{installation-inventory-BZgQmVup.js → installation-inventory-CCkKix8R.js} +3 -3
- package/dist/{installation-inventory-BZgQmVup.js.map → installation-inventory-CCkKix8R.js.map} +1 -1
- package/dist/{installer-k2gOOs58.js → installer-BiZM-o_y.js} +2 -2
- package/dist/{installer-k2gOOs58.js.map → installer-BiZM-o_y.js.map} +1 -1
- package/dist/{meta-api-DruuiAx-.js → meta-api-9iqkG_MP.js} +5 -5
- package/dist/{meta-api-DruuiAx-.js.map → meta-api-9iqkG_MP.js.map} +1 -1
- package/dist/{open-code-permission-DHFJYc_o.js → open-code-permission-B5f1e5an.js} +2 -31
- package/dist/open-code-permission-B5f1e5an.js.map +1 -0
- package/dist/{openmeld-DUdN78WD.js → openmeld-C70uo4ON.js} +215 -71
- package/dist/openmeld-C70uo4ON.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-DwkvZD0q.js → openmeld-maintenance-worker-BFPEm1rE.js} +9 -9
- package/dist/{openmeld-maintenance-worker-DwkvZD0q.js.map → openmeld-maintenance-worker-BFPEm1rE.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-BNUIw_Lo.js → openmeld-tools-update-join-Bki3ugUW.js} +4 -4
- package/dist/{openmeld-tools-update-join-BNUIw_Lo.js.map → openmeld-tools-update-join-Bki3ugUW.js.map} +1 -1
- package/dist/openmeld.js +4 -4
- package/dist/{prepare-provider-runtime-_XRIioDp.js → prepare-provider-runtime-CWZOcEF7.js} +85 -23
- package/dist/prepare-provider-runtime-CWZOcEF7.js.map +1 -0
- package/dist/{prepare-session-executor-B5AjN0qz.js → prepare-session-executor-B8XSTQdx.js} +18 -18
- package/dist/{prepare-session-executor-B5AjN0qz.js.map → prepare-session-executor-B8XSTQdx.js.map} +1 -1
- package/dist/{process-channel-CTXWjlBP.js → process-channel-DLXPiGRF.js} +2 -2
- package/dist/{process-channel-CTXWjlBP.js.map → process-channel-DLXPiGRF.js.map} +1 -1
- package/dist/{runtime-DCBc6YOq.js → runtime-DzToUfqW.js} +115 -32
- package/dist/{runtime-DCBc6YOq.js.map → runtime-DzToUfqW.js.map} +1 -1
- package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js → runtime-agent-controller-reporting-submission-BszHi0S1.js} +8 -8
- package/dist/{runtime-agent-controller-reporting-submission-CGa3GGL6.js.map → runtime-agent-controller-reporting-submission-BszHi0S1.js.map} +1 -1
- package/dist/{runtime-transport-BzCp9hM3.js → runtime-transport-DFBYm5Re.js} +214 -21
- package/dist/runtime-transport-DFBYm5Re.js.map +1 -0
- package/dist/{service-BEH6-P8U.js → service-8EozP77B.js} +546 -21
- package/dist/service-8EozP77B.js.map +1 -0
- package/dist/{service-account-authorization-CtvSn02O.js → service-account-authorization-CqUcNoD1.js} +2 -2
- package/dist/{service-account-authorization-CtvSn02O.js.map → service-account-authorization-CqUcNoD1.js.map} +1 -1
- package/dist/{service-account-control-BUPiFEGo.js → service-account-control-CzPgo-Iy.js} +9 -9
- package/dist/{service-account-control-BUPiFEGo.js.map → service-account-control-CzPgo-Iy.js.map} +1 -1
- package/dist/{service-control-capabilities-PMvSlaJj.js → service-control-capabilities-C5hd37o9.js} +3 -3
- package/dist/{service-control-capabilities-PMvSlaJj.js.map → service-control-capabilities-C5hd37o9.js.map} +1 -1
- package/dist/{service-control-capabilities-D-Nhqqgo.js → service-control-capabilities-CcwdbQf3.js} +1 -1
- package/dist/{state-C_iJAzKh.js → state-Fskb-utn.js} +2 -2
- package/dist/{state-C_iJAzKh.js.map → state-Fskb-utn.js.map} +1 -1
- package/dist/{updates-api-s2-QB929.js → updates-api-JM7f1ZDQ.js} +43 -146
- package/dist/updates-api-JM7f1ZDQ.js.map +1 -0
- package/dist/{upgrade-JmhCNmvs.js → upgrade-CDW-7zvb.js} +8 -8
- package/dist/{upgrade-JmhCNmvs.js.map → upgrade-CDW-7zvb.js.map} +1 -1
- package/dist/upgrade-r6W5TzOo.js +4 -0
- package/package.json +11 -11
- package/skills/openmeld-cli/SKILL.md +2 -0
- package/skills/openmeld-cli/playbooks/computer.md +55 -0
- package/skills/openmeld-cli/playbooks/plugins.md +37 -0
- package/dist/auth-session-DUYOBXO3.js +0 -4
- package/dist/daemon-service-update-coordinator-D0-15tZW.js.map +0 -1
- package/dist/dispatch-owned-runtime-gOluDX5_.js.map +0 -1
- package/dist/dist-DMlKqjUf.js +0 -4
- package/dist/dist-KibLweLD.js.map +0 -1
- package/dist/open-code-permission-DHFJYc_o.js.map +0 -1
- package/dist/openmeld-DUdN78WD.js.map +0 -1
- package/dist/prepare-provider-runtime-_XRIioDp.js.map +0 -1
- package/dist/runtime-transport-BzCp9hM3.js.map +0 -1
- package/dist/service-BEH6-P8U.js.map +0 -1
- package/dist/updates-api-s2-QB929.js.map +0 -1
- package/dist/upgrade-Dikfgr8z.js +0 -4
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { An as resolveInstalledClaudeCodeLaunchCandidates, Cn as resolveInstalledCodexLaunchCandidates, Tt as withAgentActivityLocalStateLock, _n as resolveInstalledOpenCodeLaunchCandidates, bn as resolveInstalledGrokBuildLaunchCandidates, er as resolveDispatchSpaceActionMcpServer, ft as listProjectBindings, ht as removeAgentActivityBindingsWhileDeliveryLocked, ir as listAgentControllerSupervisedProcessIds, rr as resolveExecutablePathsOnPath, sr as isDispatchSpaceActionDeliveryOnly, tr as buildCliLaunchInvocation, vt as resolveProjectBindingForPath, wt as withAgentActivityDeliveryLock } from "./prepare-provider-runtime-CWZOcEF7.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 {
|
|
6
|
+
import { Fn as executionContextAssignmentSchema, Jt as SPACE_WORK_MAX_BYTES, Ln as executionContextTaskSchema, Oi as spaceFileRevisionNumberSchema, Qt as spaceWorkingCopyResultSchema, Xt as spaceWorkRelativePathSchema, Zt as spaceWorkSelectionSchema, fi as readSpaceFileTextResponseSchema, ji as spaceMessageFileReferenceSchema, tn as spaceThreadEvidenceRequestSchema, wi as spaceFileEntryIdSchema } from "./runtime-transport-DFBYm5Re.js";
|
|
7
7
|
import { O as openMeldRuntimeProfileIdSchema } from "./control-plane-B93wmVS6.js";
|
|
8
|
-
import {
|
|
9
|
-
import { d as getAuthSessionState } from "./auth-session-
|
|
10
|
-
import { o as dirnamePath } from "./daemon-device-id-
|
|
11
|
-
import {
|
|
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-
|
|
8
|
+
import { Ar as spaceTaskIdSchema, Gr as spaceThreadEvidenceResponseSchema, Lt as createAgentActivityApi, Or as createSpaceTaskBodySchema, Si as submitAgentControllerTaskLifecycleEventItemSchema, Zi as signalTextEnvelopeSchema, an as createOrganizationSkillsApi, er as buildSpaceMessageEvidence, fi as stringifyOrganizationSkillBundleCanonicalJson, hr as openDirectMessageSpaceBodySchema, in as createOrganizationDocumentsApi, jr as spaceTaskMutationReceiptSchema, ki as observedLocalAgentSessionSchema, kr as mutateSpaceTaskBodySchema, lr as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, mn as createRuntimeReportingApi, oi as organizationSkillBundleSchema, pr as getSpaceUpdatesResponseSchema, qt as createDirectMessageApi, t as OpenMeldApiClientHttpError, tr as buildSpaceThreadEvidence } from "./dist-BQcUIyf6.js";
|
|
9
|
+
import { d as getAuthSessionState } from "./auth-session-DywRZLBr.js";
|
|
10
|
+
import { o as dirnamePath } from "./daemon-device-id-CmykIapy.js";
|
|
11
|
+
import { D as normalizeSharedSessionTitle, E as resolveObservedAgentActivityBinding, F as readAgentActivityOutboxHealth, I as readDueAgentActivityOutbox, L as removeProjectOutbox, M as AgentActivitySubmissionResultsMismatchError, Mt as buildPublicSpaceEntryPath, N as applyAgentActivitySubmissionResults, P as deferAgentActivityOutbox, R as readRecentAgentActivityHookStatus, S as readOpenCodeSessionRows, a as DispatchSpaceActionClosedError, b as startAgentActivityTranscriptWatchers, d as readDispatchSpaceActionRecord, gn as cliJsonErrorEnvelopeSchema, i as readDispatchOwnedRuntimeGuard, j as removeProjectInbox, k as drainAgentActivityHookInbox, l as readDispatchSpaceActionContextForReceiptFromEnv, m as createCodexJsonRpcClient, o as DispatchSpaceActionRejectedError, p as writeDispatchSpaceActionRecord, s as OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV, u as readDispatchSpaceActionContextFromEnv, w as resolveOpenCodeDatabasePath, y as scanLocalAgentActivity, z as createServiceGitEnvironment } from "./dispatch-owned-runtime-QhxDRdNr.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-9iqkG_MP.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
|
-
import { a as requireOpenMeldProfile, n as resolveRuntimeContext } from "./context-
|
|
15
|
+
import { a as requireOpenMeldProfile, n as resolveRuntimeContext } from "./context-BEgBhfbb.js";
|
|
16
16
|
import { l as resolveUserFacingCliEntryCommand, n as formatOpenMeldCliCommand } from "./cli-entry-command-CR_9QU1i.js";
|
|
17
17
|
import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
|
|
18
18
|
import { _ as daemonRuntimeStateRootPath } from "./daemon-state-Dte9re5V.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-BZvzqIeX.js";
|
|
21
21
|
import { i as readDaemonServiceContract } from "./daemon-service-contract-COPKbCy_.js";
|
|
22
22
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
23
23
|
import { homedir } from "node:os";
|
|
@@ -1490,8 +1490,6 @@ function isNodeError$2(error, code) {
|
|
|
1490
1490
|
//#endregion
|
|
1491
1491
|
//#region src/agent-activity/session-inventory-provider-adapters.ts
|
|
1492
1492
|
const PROVIDER_PROBE_TIMEOUT_MS = 5e3;
|
|
1493
|
-
const PROVIDER_DISCOVERY_TIMEOUT_MS = 3e4;
|
|
1494
|
-
const MAX_JSON_RPC_LINE_BYTES = 8 * 1024 * 1024;
|
|
1495
1493
|
const CODEX_THREAD_SOURCE_KINDS = [
|
|
1496
1494
|
"cli",
|
|
1497
1495
|
"vscode",
|
|
@@ -1552,21 +1550,17 @@ async function discoverCodex(input) {
|
|
|
1552
1550
|
}
|
|
1553
1551
|
async function discoverCodexThreads(input) {
|
|
1554
1552
|
if (!input.launchContract) throw new Error("Codex launch contract is unavailable.");
|
|
1555
|
-
const
|
|
1553
|
+
const threads = await listAllCodexThreads(input.launchContract);
|
|
1556
1554
|
const openMeldCreatedSessionKeys = await readOpenMeldCreatedLocalAgentSessionKeys(input);
|
|
1557
1555
|
const result = [];
|
|
1558
|
-
const
|
|
1559
|
-
for (const page of pages) for (const thread of page.data) {
|
|
1556
|
+
for (const { archived, thread } of threads) {
|
|
1560
1557
|
const mapped = await mapCodexThread({
|
|
1561
|
-
archived
|
|
1558
|
+
archived,
|
|
1562
1559
|
bindings: input.bindings,
|
|
1563
1560
|
openMeldCreatedSessionKeys,
|
|
1564
1561
|
thread
|
|
1565
1562
|
});
|
|
1566
1563
|
if (!mapped) continue;
|
|
1567
|
-
const identityKey = `${mapped.binding.organizationId}\0${mapped.session.nativeSessionId}`;
|
|
1568
|
-
if (identityKeys.has(identityKey)) throw new Error("Codex returned a duplicate native Session identity.");
|
|
1569
|
-
identityKeys.add(identityKey);
|
|
1570
1564
|
result.push(mapped);
|
|
1571
1565
|
}
|
|
1572
1566
|
return stableSessions(result);
|
|
@@ -1574,7 +1568,7 @@ async function discoverCodexThreads(input) {
|
|
|
1574
1568
|
async function mapCodexThread(input) {
|
|
1575
1569
|
const nativeSessionId = text(input.thread.id);
|
|
1576
1570
|
const cwd = text(input.thread.cwd);
|
|
1577
|
-
const lastActiveAtMs = secondsTimestamp(input.thread.
|
|
1571
|
+
const lastActiveAtMs = secondsTimestamp(input.thread.updatedAt);
|
|
1578
1572
|
if (!(nativeSessionId && cwd && lastActiveAtMs !== null)) throw new Error("Codex returned a malformed retained thread record.");
|
|
1579
1573
|
const binding = await resolveObservedAgentActivityBinding(cwd, input.bindings);
|
|
1580
1574
|
if (!binding) return null;
|
|
@@ -1598,6 +1592,30 @@ async function mapCodexThread(input) {
|
|
|
1598
1592
|
})
|
|
1599
1593
|
};
|
|
1600
1594
|
}
|
|
1595
|
+
async function resolveCodexInventoryThreads(pages, client) {
|
|
1596
|
+
const threads = /* @__PURE__ */ new Map();
|
|
1597
|
+
const repeatedIds = /* @__PURE__ */ new Set();
|
|
1598
|
+
for (const page of pages) for (const thread of page.data) {
|
|
1599
|
+
const id = text(thread.id);
|
|
1600
|
+
if (!id) throw new Error("Codex returned a malformed retained thread record.");
|
|
1601
|
+
const prior = threads.get(id);
|
|
1602
|
+
if (prior) repeatedIds.add(id);
|
|
1603
|
+
threads.set(id, {
|
|
1604
|
+
archived: page.archived || prior?.archived === true,
|
|
1605
|
+
thread
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
for (const id of repeatedIds) {
|
|
1609
|
+
const response = await client.request("thread/read", {
|
|
1610
|
+
threadId: id,
|
|
1611
|
+
includeTurns: false
|
|
1612
|
+
});
|
|
1613
|
+
if (!(isRecord(response) && isRecord(response.thread) && response.thread.id === id)) throw new Error("Codex thread/read metadata response is invalid.");
|
|
1614
|
+
const entry = threads.get(id);
|
|
1615
|
+
if (entry) entry.thread = response.thread;
|
|
1616
|
+
}
|
|
1617
|
+
return [...threads.values()];
|
|
1618
|
+
}
|
|
1601
1619
|
async function listAllCodexThreads(launchContract) {
|
|
1602
1620
|
const client = createCodexJsonRpcClient(launchContract);
|
|
1603
1621
|
try {
|
|
@@ -1617,6 +1635,7 @@ async function listAllCodexThreads(launchContract) {
|
|
|
1617
1635
|
archived,
|
|
1618
1636
|
cursor,
|
|
1619
1637
|
limit: 100,
|
|
1638
|
+
modelProviders: [],
|
|
1620
1639
|
sortDirection: "desc",
|
|
1621
1640
|
sortKey: "updated_at",
|
|
1622
1641
|
sourceKinds: CODEX_THREAD_SOURCE_KINDS,
|
|
@@ -1630,135 +1649,11 @@ async function listAllCodexThreads(launchContract) {
|
|
|
1630
1649
|
cursor = parseCodexNextCursor(response.nextCursor);
|
|
1631
1650
|
} while (cursor !== null);
|
|
1632
1651
|
}
|
|
1633
|
-
return pages;
|
|
1652
|
+
return await resolveCodexInventoryThreads(pages, client);
|
|
1634
1653
|
} finally {
|
|
1635
1654
|
await client.close();
|
|
1636
1655
|
}
|
|
1637
1656
|
}
|
|
1638
|
-
function createCodexJsonRpcClient(launchContract) {
|
|
1639
|
-
const invocation = buildCliLaunchInvocation({
|
|
1640
|
-
args: [
|
|
1641
|
-
"app-server",
|
|
1642
|
-
"--listen",
|
|
1643
|
-
"stdio://"
|
|
1644
|
-
],
|
|
1645
|
-
launchContract
|
|
1646
|
-
});
|
|
1647
|
-
const child = spawn(invocation.bin, invocation.args, {
|
|
1648
|
-
env: process.env,
|
|
1649
|
-
shell: invocation.shell ?? false,
|
|
1650
|
-
stdio: [
|
|
1651
|
-
"pipe",
|
|
1652
|
-
"pipe",
|
|
1653
|
-
"ignore"
|
|
1654
|
-
],
|
|
1655
|
-
windowsHide: true
|
|
1656
|
-
});
|
|
1657
|
-
let nextId = 1;
|
|
1658
|
-
let buffer = "";
|
|
1659
|
-
let closed = false;
|
|
1660
|
-
const pending = /* @__PURE__ */ new Map();
|
|
1661
|
-
const rejectPending = (error) => {
|
|
1662
|
-
for (const request of pending.values()) {
|
|
1663
|
-
clearTimeout(request.timer);
|
|
1664
|
-
request.reject(error);
|
|
1665
|
-
}
|
|
1666
|
-
pending.clear();
|
|
1667
|
-
};
|
|
1668
|
-
child.stdout.setEncoding("utf8");
|
|
1669
|
-
child.stdout.on("data", (chunk) => {
|
|
1670
|
-
buffer = consumeCodexJsonRpcChunk({
|
|
1671
|
-
buffer,
|
|
1672
|
-
chunk,
|
|
1673
|
-
kill: () => child.kill("SIGTERM"),
|
|
1674
|
-
pending,
|
|
1675
|
-
rejectPending
|
|
1676
|
-
});
|
|
1677
|
-
});
|
|
1678
|
-
child.on("error", (error) => rejectPending(error));
|
|
1679
|
-
child.on("close", () => {
|
|
1680
|
-
closed = true;
|
|
1681
|
-
rejectPending(/* @__PURE__ */ new Error("Codex app-server closed during discovery."));
|
|
1682
|
-
});
|
|
1683
|
-
return {
|
|
1684
|
-
close: async () => {
|
|
1685
|
-
if (closed) return;
|
|
1686
|
-
child.kill("SIGTERM");
|
|
1687
|
-
await new Promise((resolveClose) => {
|
|
1688
|
-
const timer = setTimeout(resolveClose, 1e3);
|
|
1689
|
-
child.once("close", () => {
|
|
1690
|
-
clearTimeout(timer);
|
|
1691
|
-
resolveClose();
|
|
1692
|
-
});
|
|
1693
|
-
});
|
|
1694
|
-
},
|
|
1695
|
-
notify: (method, params) => {
|
|
1696
|
-
child.stdin.write(`${JSON.stringify({
|
|
1697
|
-
jsonrpc: "2.0",
|
|
1698
|
-
method,
|
|
1699
|
-
params
|
|
1700
|
-
})}\n`);
|
|
1701
|
-
},
|
|
1702
|
-
request: (method, params) => {
|
|
1703
|
-
if (closed) return Promise.reject(/* @__PURE__ */ new Error("Codex app-server is closed."));
|
|
1704
|
-
const id = nextId;
|
|
1705
|
-
nextId += 1;
|
|
1706
|
-
return new Promise((resolveRequest, rejectRequest) => {
|
|
1707
|
-
const timer = setTimeout(() => {
|
|
1708
|
-
pending.delete(id);
|
|
1709
|
-
rejectRequest(/* @__PURE__ */ new Error(`Codex ${method} timed out.`));
|
|
1710
|
-
}, PROVIDER_DISCOVERY_TIMEOUT_MS);
|
|
1711
|
-
pending.set(id, {
|
|
1712
|
-
reject: rejectRequest,
|
|
1713
|
-
resolve: resolveRequest,
|
|
1714
|
-
timer
|
|
1715
|
-
});
|
|
1716
|
-
child.stdin.write(`${JSON.stringify({
|
|
1717
|
-
id,
|
|
1718
|
-
jsonrpc: "2.0",
|
|
1719
|
-
method,
|
|
1720
|
-
params
|
|
1721
|
-
})}\n`);
|
|
1722
|
-
});
|
|
1723
|
-
}
|
|
1724
|
-
};
|
|
1725
|
-
}
|
|
1726
|
-
function consumeCodexJsonRpcChunk(input) {
|
|
1727
|
-
let buffer = input.buffer + input.chunk;
|
|
1728
|
-
if (Buffer.byteLength(buffer) > MAX_JSON_RPC_LINE_BYTES) {
|
|
1729
|
-
input.rejectPending(/* @__PURE__ */ new Error("Codex app-server response exceeded its bound."));
|
|
1730
|
-
input.kill();
|
|
1731
|
-
return "";
|
|
1732
|
-
}
|
|
1733
|
-
while (true) {
|
|
1734
|
-
const newline = buffer.indexOf("\n");
|
|
1735
|
-
if (newline < 0) return buffer;
|
|
1736
|
-
const line = buffer.slice(0, newline).trim();
|
|
1737
|
-
buffer = buffer.slice(newline + 1);
|
|
1738
|
-
if (!line) continue;
|
|
1739
|
-
let message;
|
|
1740
|
-
try {
|
|
1741
|
-
message = JSON.parse(line);
|
|
1742
|
-
} catch {
|
|
1743
|
-
input.rejectPending(/* @__PURE__ */ new Error("Codex app-server returned invalid JSON."));
|
|
1744
|
-
input.kill();
|
|
1745
|
-
return "";
|
|
1746
|
-
}
|
|
1747
|
-
settleCodexJsonRpcResponse(message, input.pending);
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
function settleCodexJsonRpcResponse(message, pending) {
|
|
1751
|
-
if (!isRecord(message) || typeof message.id !== "number") return;
|
|
1752
|
-
const request = pending.get(message.id);
|
|
1753
|
-
if (!request) return;
|
|
1754
|
-
pending.delete(message.id);
|
|
1755
|
-
clearTimeout(request.timer);
|
|
1756
|
-
if (isRecord(message.error)) {
|
|
1757
|
-
request.reject(new Error(text(message.error.message) ?? "Codex app-server request failed."));
|
|
1758
|
-
return;
|
|
1759
|
-
}
|
|
1760
|
-
request.resolve(message.result);
|
|
1761
|
-
}
|
|
1762
1657
|
async function discoverClaudeCode(input) {
|
|
1763
1658
|
const launch = await resolveInstalledClaudeCodeLaunchCandidates({ timeoutMs: PROVIDER_PROBE_TIMEOUT_MS });
|
|
1764
1659
|
if (!launch.ok) return providerLaunchFailure("claude-code", launch.reason);
|
|
@@ -2207,6 +2102,8 @@ function isRecord(value) {
|
|
|
2207
2102
|
function isNodeError$1(error, code) {
|
|
2208
2103
|
return error instanceof Error && error.code === code;
|
|
2209
2104
|
}
|
|
2105
|
+
const PROVIDER_DISCOVERY_TIMEOUT_MS = 3e4;
|
|
2106
|
+
const MAX_JSON_RPC_LINE_BYTES = 8 * 1024 * 1024;
|
|
2210
2107
|
//#endregion
|
|
2211
2108
|
//#region src/agent-activity/session-inventory-sync.ts
|
|
2212
2109
|
const SOURCE_STORE_VERSION = 2;
|
|
@@ -5451,7 +5348,7 @@ function createDispatchSpaceTools(input = {}) {
|
|
|
5451
5348
|
});
|
|
5452
5349
|
if (input.reportProgress) server.registerTool("report_progress", {
|
|
5453
5350
|
title: "Share public progress in the current OpenMeld Space",
|
|
5454
|
-
description: "Share one brief, concrete update while this Wake is still running. Use this
|
|
5351
|
+
description: "Share one brief, concrete update while this Wake is still running. Use this when you start meaningful work, confirm a useful fact, encounter a blocker, change direction, or begin verification. For a blocker, explain its effect on the request and the next step. Do not repeat an unchanged update or 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.",
|
|
5455
5352
|
inputSchema: { update: z.string().trim().min(1).max(600) },
|
|
5456
5353
|
annotations: {
|
|
5457
5354
|
readOnlyHint: false,
|
|
@@ -6353,4 +6250,4 @@ async function fetchSpaceUpdates(input) {
|
|
|
6353
6250
|
//#endregion
|
|
6354
6251
|
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 };
|
|
6355
6252
|
|
|
6356
|
-
//# sourceMappingURL=updates-api-
|
|
6253
|
+
//# sourceMappingURL=updates-api-JM7f1ZDQ.js.map
|