openmeld 0.3.244 → 0.3.247
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-CWS97GK8.js → add-me-membership-DUeJA9q4.js} +2 -2
- package/dist/{add-me-membership-CWS97GK8.js.map → add-me-membership-DUeJA9q4.js.map} +1 -1
- package/dist/{agents-BoapsuRq.js → agents-woAcH0O6.js} +10 -10
- package/dist/{agents-BoapsuRq.js.map → agents-woAcH0O6.js.map} +1 -1
- package/dist/{api-client-foundation-BYTxVhem.js → api-client-foundation-DMEfIARh.js} +3 -3
- package/dist/{api-client-foundation-BYTxVhem.js.map → api-client-foundation-DMEfIARh.js.map} +1 -1
- package/dist/{api-client-foundation-DDdQCc2T.js → api-client-foundation-mqLjUunz.js} +1 -1
- package/dist/{auth-session-CpKxiYC2.js → auth-session-D7hlE-47.js} +3 -3
- package/dist/{auth-session-CpKxiYC2.js.map → auth-session-D7hlE-47.js.map} +1 -1
- package/dist/auth-session-DXxmGll1.js +4 -0
- package/dist/{channel-BXovlRXN.js → channel-BeUv2bLR.js} +4 -4
- package/dist/{channel-BXovlRXN.js.map → channel-BeUv2bLR.js.map} +1 -1
- package/dist/{cli-binary-manifest-ETxqCzfS.js → cli-binary-manifest-ChuzORh3.js} +2 -2
- package/dist/{cli-binary-manifest-ETxqCzfS.js.map → cli-binary-manifest-ChuzORh3.js.map} +1 -1
- package/dist/{cloud-computer-D2VuZov1.js → cloud-computer-C81_vVOV.js} +4 -4
- package/dist/{cloud-computer-D2VuZov1.js.map → cloud-computer-C81_vVOV.js.map} +1 -1
- package/dist/{command-BZvpjGWe.js → command-qNknO9gl.js} +16 -16
- package/dist/{command-BZvpjGWe.js.map → command-qNknO9gl.js.map} +1 -1
- package/dist/{computer-connection-Cd5R-jnA.js → computer-connection-WpsIQfkh.js} +2 -2
- package/dist/{computer-connection-Cd5R-jnA.js.map → computer-connection-WpsIQfkh.js.map} +1 -1
- package/dist/{computer-connection-review-lBDHLC0c.js → computer-connection-review-Df2G8VWY.js} +5 -5
- package/dist/{computer-connection-review-lBDHLC0c.js.map → computer-connection-review-Df2G8VWY.js.map} +1 -1
- package/dist/{computer-disconnect-C6OH3940.js → computer-disconnect-ttAH9WgN.js} +7 -7
- package/dist/{computer-disconnect-C6OH3940.js.map → computer-disconnect-ttAH9WgN.js.map} +1 -1
- package/dist/{computer-setup-continuation-BsSM1pzW.js → computer-setup-continuation-tbuUZSe5.js} +3 -3
- package/dist/{computer-setup-continuation-BsSM1pzW.js.map → computer-setup-continuation-tbuUZSe5.js.map} +1 -1
- package/dist/{context-BbodhIFX.js → context-x0T_qTHp.js} +4 -4
- package/dist/{context-BbodhIFX.js.map → context-x0T_qTHp.js.map} +1 -1
- package/dist/{control-plane-TOfZ-veG.js → control-plane-B93wmVS6.js} +2 -2
- package/dist/{control-plane-TOfZ-veG.js.map → control-plane-B93wmVS6.js.map} +1 -1
- package/dist/{daemon-device-id-DwMFWGI5.js → daemon-device-id-DgwvQllt.js} +5 -5
- package/dist/{daemon-device-id-DwMFWGI5.js.map → daemon-device-id-DgwvQllt.js.map} +1 -1
- package/dist/{daemon-lifecycle-journal-NJaimyPD.js → daemon-lifecycle-journal-C32I8p4n.js} +7 -6
- package/dist/{daemon-lifecycle-journal-NJaimyPD.js.map → daemon-lifecycle-journal-C32I8p4n.js.map} +1 -1
- package/dist/{daemon-service-runtime-COC1JtWX.js → daemon-service-runtime-DVqzJKke.js} +4 -4
- package/dist/{daemon-service-runtime-COC1JtWX.js.map → daemon-service-runtime-DVqzJKke.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-BmZHGGiO.js → daemon-service-update-coordinator-BTlVzU-7.js} +17 -17
- package/dist/daemon-service-update-coordinator-BTlVzU-7.js.map +1 -0
- package/dist/{dispatch-owned-runtime-dLHDTL7f.js → dispatch-owned-runtime-g2lLeYtx.js} +211 -65
- package/dist/dispatch-owned-runtime-g2lLeYtx.js.map +1 -0
- package/dist/dist-CXB_bdSS.js +4 -0
- package/dist/{dist-Cu_yzOuS.js → dist-DGeoVaIx.js} +521 -288
- package/dist/dist-DGeoVaIx.js.map +1 -0
- package/dist/{dual-view-guide-catalog-8Pr5QO_z.js → dual-view-guide-catalog-CkcY09Kh.js} +4 -4
- package/dist/{dual-view-guide-catalog-8Pr5QO_z.js.map → dual-view-guide-catalog-CkcY09Kh.js.map} +1 -1
- package/dist/{elapsed-time-DCufUrLA.js → elapsed-time-BMG1CU23.js} +4 -4
- package/dist/{elapsed-time-DCufUrLA.js.map → elapsed-time-BMG1CU23.js.map} +1 -1
- package/dist/{entry-CJ289WR7.js → entry-CP7_Vgs4.js} +7 -7
- package/dist/{entry-CJ289WR7.js.map → entry-CP7_Vgs4.js.map} +1 -1
- package/dist/{installation-inventory-dvcGmUBg.js → installation-inventory-7JOtUjyG.js} +3 -3
- package/dist/{installation-inventory-dvcGmUBg.js.map → installation-inventory-7JOtUjyG.js.map} +1 -1
- package/dist/{installer-D0fh4fzg.js → installer-BRpAz1X_.js} +2 -2
- package/dist/{installer-D0fh4fzg.js.map → installer-BRpAz1X_.js.map} +1 -1
- package/dist/{local-components-DJiMS67S.js → local-components-jXECvlEY.js} +3 -2
- package/dist/local-components-jXECvlEY.js.map +1 -0
- package/dist/{meta-api-BdH7IJMv.js → meta-api-QskBmfuf.js} +5 -5
- package/dist/{meta-api-BdH7IJMv.js.map → meta-api-QskBmfuf.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-DQPDws0E.js → openmeld-BxTCCHMn.js} +224 -69
- package/dist/openmeld-BxTCCHMn.js.map +1 -0
- package/dist/{openmeld-maintenance-worker-ALfbSMyQ.js → openmeld-maintenance-worker-BQ2YbwA9.js} +9 -9
- package/dist/{openmeld-maintenance-worker-ALfbSMyQ.js.map → openmeld-maintenance-worker-BQ2YbwA9.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-Cezc7ARc.js → openmeld-tools-update-join-Dj-MEQW_.js} +4 -4
- package/dist/{openmeld-tools-update-join-Cezc7ARc.js.map → openmeld-tools-update-join-Dj-MEQW_.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-YLOS82E3.js → openmeld-tools-update-process-frame-BtYOlJXu.js} +2 -2
- package/dist/{openmeld-tools-update-process-frame-YLOS82E3.js.map → openmeld-tools-update-process-frame-BtYOlJXu.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-Csy2XKUf.js → openmeld-tools-update-process-frame-CINV6Qt3.js} +1 -1
- package/dist/openmeld.js +5 -5
- package/dist/{prepare-provider-runtime-Cko0dLXN.js → prepare-provider-runtime-B6_dfpiZ.js} +1679 -1018
- package/dist/prepare-provider-runtime-B6_dfpiZ.js.map +1 -0
- package/dist/{prepare-session-executor-B-TWlSSd.js → prepare-session-executor-DA9saGAk.js} +19 -19
- package/dist/{prepare-session-executor-B-TWlSSd.js.map → prepare-session-executor-DA9saGAk.js.map} +1 -1
- package/dist/{process-channel-z_4u04-k.js → process-channel-HthE5ehS.js} +2 -2
- package/dist/{process-channel-z_4u04-k.js.map → process-channel-HthE5ehS.js.map} +1 -1
- package/dist/{runtime-C6SS6jm6.js → runtime-C7lY_Z2r.js} +104 -21
- package/dist/{runtime-C6SS6jm6.js.map → runtime-C7lY_Z2r.js.map} +1 -1
- package/dist/{runtime-agent-controller-reporting-submission-Cyb5OuVp.js → runtime-agent-controller-reporting-submission-IhxMO4UA.js} +80 -19
- package/dist/runtime-agent-controller-reporting-submission-IhxMO4UA.js.map +1 -0
- package/dist/{runtime-transport-DYbpUYBL.js → runtime-transport-DRb5__yP.js} +214 -37
- package/dist/runtime-transport-DRb5__yP.js.map +1 -0
- package/dist/{service-DjqXdt6p.js → service-DveGEdh3.js} +315 -24
- package/dist/service-DveGEdh3.js.map +1 -0
- package/dist/{service-account-authorization-BZFLy1E7.js → service-account-authorization-CAVkiKSF.js} +2 -2
- package/dist/{service-account-authorization-BZFLy1E7.js.map → service-account-authorization-CAVkiKSF.js.map} +1 -1
- package/dist/{service-account-control-CsXtCjRi.js → service-account-control-BtE73wcO.js} +9 -9
- package/dist/{service-account-control-CsXtCjRi.js.map → service-account-control-BtE73wcO.js.map} +1 -1
- package/dist/{service-control-capabilities-Ck-KcBXg.js → service-control-capabilities-BQrqIGBP.js} +3 -3
- package/dist/{service-control-capabilities-Ck-KcBXg.js.map → service-control-capabilities-BQrqIGBP.js.map} +1 -1
- package/dist/{service-control-capabilities-C4SOrFHN.js → service-control-capabilities-adDptMIH.js} +1 -1
- package/dist/{state-BmiyrHe4.js → state-DWwNdCy5.js} +2 -2
- package/dist/{state-BmiyrHe4.js.map → state-DWwNdCy5.js.map} +1 -1
- package/dist/{updates-api-DD3p5dx5.js → updates-api-9midbUU1.js} +71 -167
- package/dist/updates-api-9midbUU1.js.map +1 -0
- package/dist/upgrade-BvpBhL0U.js +4 -0
- package/dist/{upgrade-DIt6nkyo.js → upgrade-H-_QW75e.js} +9 -9
- package/dist/{upgrade-DIt6nkyo.js.map → upgrade-H-_QW75e.js.map} +1 -1
- package/package.json +13 -12
- package/skills/openmeld-cli/SKILL.md +5 -2
- package/skills/openmeld-cli/playbooks/computer.md +55 -0
- package/skills/openmeld-cli/playbooks/plugins.md +37 -0
- package/skills/openmeld-cli/references/commands.md +20 -0
- package/dist/auth-session-EhHX7q2K.js +0 -4
- package/dist/daemon-service-update-coordinator-BmZHGGiO.js.map +0 -1
- package/dist/dispatch-owned-runtime-dLHDTL7f.js.map +0 -1
- package/dist/dist-BDix0nxy.js +0 -4
- package/dist/dist-Cu_yzOuS.js.map +0 -1
- package/dist/local-components-DJiMS67S.js.map +0 -1
- package/dist/open-code-permission-DHFJYc_o.js.map +0 -1
- package/dist/openmeld-DQPDws0E.js.map +0 -1
- package/dist/prepare-provider-runtime-Cko0dLXN.js.map +0 -1
- package/dist/runtime-agent-controller-reporting-submission-Cyb5OuVp.js.map +0 -1
- package/dist/runtime-transport-DYbpUYBL.js.map +0 -1
- package/dist/service-DjqXdt6p.js.map +0 -1
- package/dist/updates-api-DD3p5dx5.js.map +0 -1
- package/dist/upgrade-3z755G8g.js +0 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { Cr as
|
|
3
|
+
import { Cr as parseAgentControllerRef, Ct as resolveLocalProjectConnectionForPath, Er as renderInformationProtectionPrompt, Fn as DaemonServiceRunError, Kt as SPACE_ACTION_CONTEXT_GUIDANCE_LINES, Or as renderWorkingLanguagePrompt, Tt as withAgentActivityLocalStateLock, Xt as buildDispatchReplyContextSummary, dr as buildInformationProtectionPromptPlan, dt as isProjectBound, er as buildCliLaunchInvocation, fr as buildWorkingLanguagePromptPlan, ft as listProjectBindings, lr as areAgentControllerInterfaceAccountsSame, yr as isAgentControllerUsageAccountUnavailable } from "./prepare-provider-runtime-B6_dfpiZ.js";
|
|
4
4
|
import { F as resolveOpenMeldRootDir, P as resolveOpenMeldEnvPreset, b as normalizeOpenMeldProfileId, g as legacyAccountProfileSpacesDir, r as accountProfileSpaceCacheDir, w as openMeldManagedBinaryPath } from "./paths-De9xdA2h.js";
|
|
5
|
-
import { $ as openMeldSpaceEgressActionSchema, At as sanitizeSignalTextPreview,
|
|
6
|
-
import { O as openMeldRuntimeProfileIdSchema } from "./control-plane-
|
|
7
|
-
import { A as boolean,
|
|
8
|
-
import { $
|
|
9
|
-
import { a as asRecord, d as normalizeText, l as normalizeNonNegativeInteger$1, s as emitRunLine, u as normalizeOptionalText$8 } from "./daemon-device-id-
|
|
5
|
+
import { $ as openMeldSpaceEgressActionSchema, At as sanitizeSignalTextPreview, Fn as executionContextAssignmentSchema, Ii as centerAgentToolSpeakerSchema, L as runtimeTransportRegisterSessionResponseSchema, Sn as getSpaceMessageAddressingRelationSupportForTargetKind, Tn as resolveMessageEnvelopeTargetField, Yi as openMeldRequestContextSchema, a as daemonStreamFrameSchema, ar as runtimeCoordinatorExecutionTokenEchoSchema, bn as collectCanonicalMentionTextFragments, fr as resolveSingleSpaceMentionLabels, pr as resolveSpaceMentionLabels, ur as normalizeSpacePasswordText, w as runtimeTransportHeartbeatResponseSchema, wn as normalizeMessageEnvelope, yn as MESSAGE_MENTION_TYPE_VALUES } from "./runtime-transport-DRb5__yP.js";
|
|
6
|
+
import { O as openMeldRuntimeProfileIdSchema } from "./control-plane-B93wmVS6.js";
|
|
7
|
+
import { A as boolean, I as iso, K as strictObject, M as discriminatedUnion, P as enumFactory, Q as url, p as localServiceComponentUpdateProjectionSchema, q as string, s as localCliComponentUpdateProjectionSchema, z as literal } from "./local-components-jXECvlEY.js";
|
|
8
|
+
import { $i as agentActivitySnapshotResponseSchema, Bi as listRoutineManagementResponseSchema, Fi as centerAgentRoutineSchema, Gi as updateCenterAgentRoutineResponseSchema, Hi as resumeCenterAgentRoutineResponseSchema, Ii as createCenterAgentRoutineResponseSchema, Ji as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, Li as deleteCenterAgentRoutineResponseSchema, Mr as organizationDirectoryResponseSchema, Ni as spaceCreatorSchema, Nr as submitFeedbackIssueRequestSchema, Pr as submitFeedbackIssueResponseSchema, Ri as listCenterAgentRoutineRunsResponseSchema, Rr as sessionHistoryPageSchema, Ti as organizationComputersResponseSchema, Ui as routineManagementSchema, Vi as pauseCenterAgentRoutineResponseSchema, Yi as agentActivityEventSchema, _i as spaceMemberDirectoryAllowedRelationsSchema, bi as spaceMemberKindSchema, ca as listProjectsResponseSchema, ci as organizationSkillReleaseSummarySchema, ga as computerFileAccessPolicySchema, gi as spaceMemberAgentWakeAvailabilitySchema, ha as computerFileAccessPolicyInputSchema, ii as listOrganizationSkillsResponseSchema, jr as organizationSpaceDirectoryWithMemberCountsResponseSchema, ki as agentActivitySessionInventoryResponseSchema, la as projectSchema, li as organizationSkillRuntimeReleaseSelectionSchema, oa as archiveProjectResponseSchema, pr as spaceEntryTargetSchema, ra as localProjectControlConnectionSchema, ri as getOrganizationSkillResponseSchema, sa as createProjectResponseSchema, si as organizationSkillGitHubRepositoryPreviewSchema, ua as updateProjectResponseSchema, ui as organizationSkillSummarySchema, vi as spaceMemberDirectoryEntrySchema, yi as spaceMemberDirectorySchema, zi as listCenterAgentRoutinesResponseSchema } from "./dist-DGeoVaIx.js";
|
|
9
|
+
import { a as asRecord, d as normalizeText, l as normalizeNonNegativeInteger$1, s as emitRunLine, u as normalizeOptionalText$8 } from "./daemon-device-id-DgwvQllt.js";
|
|
10
10
|
import { i as serviceControlCapabilitiesSchema } from "./service-account-admission-BfdJ-kKR.js";
|
|
11
11
|
import { v as resolveCliContextId } from "./lock-BMI00i2F.js";
|
|
12
|
-
import { B as buildCenterAgentRoleTemplateText, F as SPACE_COLLABORATION_CONTEXT_RULE, H as buildSpaceAgentIdentityLine, J as isSelfWakeSpaceAction, K as composeDispatchBrief, R as buildAgentFacingMentalModelLines, U as buildSpaceEntryBriefNeedMoreLine, V as buildCompactDispatchActionGuidanceLines, W as buildSpaceWakeParticipantLines, Y as renderSpaceEntryBrief, Z as resolveSpacePublicationRequirement, q as deriveContinuity } from "./dual-view-guide-catalog-
|
|
12
|
+
import { B as buildCenterAgentRoleTemplateText, F as SPACE_COLLABORATION_CONTEXT_RULE, H as buildSpaceAgentIdentityLine, J as isSelfWakeSpaceAction, K as composeDispatchBrief, R as buildAgentFacingMentalModelLines, U as buildSpaceEntryBriefNeedMoreLine, V as buildCompactDispatchActionGuidanceLines, W as buildSpaceWakeParticipantLines, Y as renderSpaceEntryBrief, Z as resolveSpacePublicationRequirement, q as deriveContinuity } from "./dual-view-guide-catalog-CkcY09Kh.js";
|
|
13
13
|
import { d as createDefaultRuntimeAgentControllerSettings } from "./base-url-0AoeTi3w.js";
|
|
14
|
-
import { F as resolveCurrentOpenMeldAccountContext } from "./context-
|
|
14
|
+
import { F as resolveCurrentOpenMeldAccountContext } from "./context-x0T_qTHp.js";
|
|
15
15
|
import { a as formatOpenMeldCliTextBlock } from "./cli-entry-command-CR_9QU1i.js";
|
|
16
16
|
import { n as resolveOpenMeldDistribution } from "./distribution-BDQT2ilb.js";
|
|
17
17
|
import { a as DAEMON_SERVICE_RUNTIME_MODE_ENV, d as daemonDispatchJournalPath, h as daemonRuntimeRootPath, i as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, n as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, r as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, s as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV } from "./daemon-state-Dte9re5V.js";
|
|
@@ -23,6 +23,7 @@ import * as z$1 from "zod/v4";
|
|
|
23
23
|
import { z } from "zod/v4";
|
|
24
24
|
import { appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, renameSync, watch, writeFileSync } from "node:fs";
|
|
25
25
|
import process$1 from "node:process";
|
|
26
|
+
import { spawn } from "node:child_process";
|
|
26
27
|
import { isDeepStrictEqual } from "node:util";
|
|
27
28
|
import { Worker } from "node:worker_threads";
|
|
28
29
|
//#region ../../packages/schemas/dist/schemas/cli/daemon-status-server-requirement.js
|
|
@@ -347,6 +348,7 @@ const cliJsonProjectsConnectionsRemoveEnvelopeSchema = defineStrictSuccessEnvelo
|
|
|
347
348
|
});
|
|
348
349
|
const cliJsonAgentActivityReadEnvelopeSchema = defineStrictSuccessEnvelope("activity.read", agentActivitySnapshotResponseSchema.shape);
|
|
349
350
|
const cliJsonAgentActivitySessionsEnvelopeSchema = defineStrictSuccessEnvelope("activity.sessions", agentActivitySessionInventoryResponseSchema.shape);
|
|
351
|
+
const cliJsonAgentActivityHistoryEnvelopeSchema = defineStrictSuccessEnvelope("activity.history", sessionHistoryPageSchema.shape);
|
|
350
352
|
const cliJsonAgentActivityIntegrationStatusSchema = z$1.strictObject({
|
|
351
353
|
claude: z$1.boolean(),
|
|
352
354
|
codex: z$1.boolean(),
|
|
@@ -416,9 +418,13 @@ const cliJsonAgentActivitySyncEnvelopeSchema = defineStrictSuccessEnvelope("acti
|
|
|
416
418
|
submittedCount: z$1.number().int().nonnegative()
|
|
417
419
|
}) });
|
|
418
420
|
const cliJsonAgentActivityContextEnvelopeSchema = defineStrictSuccessEnvelope("activity.context", { context: z$1.string().min(1).max(300).nullable() });
|
|
419
|
-
const cliJsonRoutinesListEnvelopeSchema = defineStrictSuccessEnvelope("routines.list",
|
|
421
|
+
const cliJsonRoutinesListEnvelopeSchema = defineStrictSuccessEnvelope("routines.list", {
|
|
422
|
+
...listCenterAgentRoutinesResponseSchema.shape,
|
|
423
|
+
routines: z$1.array(z$1.union([routineManagementSchema, centerAgentRoutineSchema])),
|
|
424
|
+
executors: listRoutineManagementResponseSchema.shape.executors.optional()
|
|
425
|
+
});
|
|
420
426
|
const cliJsonRoutinesCreateEnvelopeSchema = defineStrictSuccessEnvelope("routines.create", createCenterAgentRoutineResponseSchema.shape);
|
|
421
|
-
const cliJsonRoutinesShowEnvelopeSchema = defineStrictSuccessEnvelope("routines.show",
|
|
427
|
+
const cliJsonRoutinesShowEnvelopeSchema = defineStrictSuccessEnvelope("routines.show", { routine: z$1.union([routineManagementSchema, centerAgentRoutineSchema]) });
|
|
422
428
|
const cliJsonRoutinesUpdateEnvelopeSchema = defineStrictSuccessEnvelope("routines.update", updateCenterAgentRoutineResponseSchema.shape);
|
|
423
429
|
const cliJsonRoutinesPauseEnvelopeSchema = defineStrictSuccessEnvelope("routines.pause", pauseCenterAgentRoutineResponseSchema.shape);
|
|
424
430
|
const cliJsonRoutinesResumeEnvelopeSchema = defineStrictSuccessEnvelope("routines.resume", resumeCenterAgentRoutineResponseSchema.shape);
|
|
@@ -542,6 +548,7 @@ const cliJsonOutputEnvelopeSchema = z$1.discriminatedUnion("type", [
|
|
|
542
548
|
cliJsonProjectsConnectionsRemoveEnvelopeSchema,
|
|
543
549
|
cliJsonAgentActivityReadEnvelopeSchema,
|
|
544
550
|
cliJsonAgentActivitySessionsEnvelopeSchema,
|
|
551
|
+
cliJsonAgentActivityHistoryEnvelopeSchema,
|
|
545
552
|
cliJsonAgentActivityInstallEnvelopeSchema,
|
|
546
553
|
cliJsonAgentActivityUninstallEnvelopeSchema,
|
|
547
554
|
cliJsonAgentActivityStatusEnvelopeSchema,
|
|
@@ -2829,7 +2836,7 @@ function storeNewestSpaceConfig(list, candidate) {
|
|
|
2829
2836
|
if (!existing || compareIsoDateDesc(candidate.updatedAt, existing.updatedAt) < 0) list.set(candidate.space, candidate);
|
|
2830
2837
|
}
|
|
2831
2838
|
function normalizeSpaceConfig(value) {
|
|
2832
|
-
if (!isRecord$
|
|
2839
|
+
if (!isRecord$3(value)) return null;
|
|
2833
2840
|
if (value.v === 2) return normalizeCurrentSpaceConfig(value);
|
|
2834
2841
|
if (value.v === 1) return normalizeLegacySpaceConfig(value);
|
|
2835
2842
|
return null;
|
|
@@ -2858,7 +2865,7 @@ function normalizeCurrentSpaceConfig(parsed) {
|
|
|
2858
2865
|
});
|
|
2859
2866
|
}
|
|
2860
2867
|
function normalizeSpaceCacheMaintenanceState(value) {
|
|
2861
|
-
if (!isRecord$
|
|
2868
|
+
if (!isRecord$3(value)) return null;
|
|
2862
2869
|
const lastRunAt = resolveIsoTimestamp(value.lastRunAt);
|
|
2863
2870
|
const lastRemovedByRemote = resolveOptionalNonNegativeInteger(value.lastRemovedByRemote);
|
|
2864
2871
|
const lastRemovedByTtl = resolveOptionalNonNegativeInteger(value.lastRemovedByTtl);
|
|
@@ -2873,8 +2880,8 @@ function normalizeSpaceCacheMaintenanceState(value) {
|
|
|
2873
2880
|
};
|
|
2874
2881
|
}
|
|
2875
2882
|
function normalizeSpaceCacheDeletionNoticeState(value) {
|
|
2876
|
-
if (!isRecord$
|
|
2877
|
-
if (value.v !== SPACE_CACHE_DELETION_NOTICE_SCHEMA_VERSION || !isRecord$
|
|
2883
|
+
if (!isRecord$3(value)) return null;
|
|
2884
|
+
if (value.v !== SPACE_CACHE_DELETION_NOTICE_SCHEMA_VERSION || !isRecord$3(value.seen)) return null;
|
|
2878
2885
|
const seen = {};
|
|
2879
2886
|
for (const [rawKey, rawValue] of Object.entries(value.seen)) {
|
|
2880
2887
|
const key = normalizeTrimmedOptionalString(rawKey);
|
|
@@ -2975,7 +2982,7 @@ function hasInvalidLegacySpaceConfigPrimitives(parsed) {
|
|
|
2975
2982
|
hasInvalidOptionalStringEntry(parsed, "role"),
|
|
2976
2983
|
hasInvalidOptionalStringEntry(parsed, "mentionAlias"),
|
|
2977
2984
|
hasInvalidOptionalStringEntry(parsed, "guide"),
|
|
2978
|
-
hasOwn(parsed, "permissions") && !isRecord$
|
|
2985
|
+
hasOwn(parsed, "permissions") && !isRecord$3(parsed.permissions),
|
|
2979
2986
|
hasInvalidOptionalBooleanEntry(parsed, "passwordProtected"),
|
|
2980
2987
|
hasInvalidOptionalStringEntry(parsed, "spacePurpose"),
|
|
2981
2988
|
hasInvalidOptionalNonNegativeIntegerEntry(parsed, "activeAgentCount"),
|
|
@@ -3060,7 +3067,7 @@ function areStringListsEqual(left, right) {
|
|
|
3060
3067
|
for (let index = 0; index < left.length; index += 1) if (left[index] !== right[index]) return false;
|
|
3061
3068
|
return true;
|
|
3062
3069
|
}
|
|
3063
|
-
function isRecord$
|
|
3070
|
+
function isRecord$3(value) {
|
|
3064
3071
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
3065
3072
|
}
|
|
3066
3073
|
function hasOwn(value, key) {
|
|
@@ -3357,6 +3364,16 @@ const OPENMELD_WAKE_WORKFLOW = `OpenMeld Wake workflow:
|
|
|
3357
3364
|
- Follow the current Wake's completion contract. When a Space Action is required, a private answer is insufficient. OpenMeld validates and publishes the proposal.`;
|
|
3358
3365
|
const COMPACT_DISPATCH_BOOTSTRAP_TEMPLATE_VERSION = "space-mesh-entry-brief-v2";
|
|
3359
3366
|
const LOCAL_AGENT_INSTRUCTION_CONTRACT_VERSION = "openmeld-native-instructions-v1";
|
|
3367
|
+
const SPACE_ACTION_COMPLETION_RULES = [
|
|
3368
|
+
"- Plain text is not a Space reply.",
|
|
3369
|
+
"- Use supplied context first. Discover read_history for this Wake's bounded Space text, or read_file with a file ID and revision. Both dispatch tools read as you without local login files; neither completes the Wake.",
|
|
3370
|
+
"- Use the Space Action tool first. If your harness offers tool search or discovery, look up the required action before declaring it unavailable. A tool missing from the initial list is not proof of unavailability. Do not read setup or onboarding guides merely to submit this result.",
|
|
3371
|
+
"- For a plain reply, omit wakeTargets and referenceTargets. Add targets only for an intentional handoff or reference to another Agent; never copy incoming activation targets or wake yourself.",
|
|
3372
|
+
"- Submit the actual result and inspect the tool response before ending this turn.",
|
|
3373
|
+
"- After one successful acknowledgement, stop submitting. It confirms a recorded proposal, not publication.",
|
|
3374
|
+
"- If a Space Action submission is confirmed rejected before recording, follow its correction guidance. If its submission outcome is unknown, submit no further Space Action in this turn, including an error-report reply. End with the diagnostic; OpenMeld owns recovery. Do not switch tools to retry the submission.",
|
|
3375
|
+
"- A failed context read or business tool is not a Space Action submission. If no Space Action has been submitted, use the required completion action to report the blocker honestly; do not invent results from unread material."
|
|
3376
|
+
];
|
|
3360
3377
|
const TRAILING_TITLE_SURROGATE = /\p{Surrogate}$/u;
|
|
3361
3378
|
function buildDispatchSessionTitle(input) {
|
|
3362
3379
|
const clean = (value) => value.slice(0, 256).replace(/[\p{Cc}\p{Cf}\s]+/gu, " ").trim();
|
|
@@ -3565,6 +3582,7 @@ function buildDispatchPromptPlan(input) {
|
|
|
3565
3582
|
"OpenMeld local agent contract:",
|
|
3566
3583
|
OPENMELD_SPACE_DEFINITION,
|
|
3567
3584
|
OPENMELD_WAKE_WORKFLOW,
|
|
3585
|
+
["OpenMeld Space Action rules (apply only when the current Wake's Mandatory completion section requires a Space Action; they do not authorize an action):", ...SPACE_ACTION_COMPLETION_RULES].join("\n"),
|
|
3568
3586
|
informationProtectionPlan.developerInstructions,
|
|
3569
3587
|
workingLanguagePlan.developerInstructions
|
|
3570
3588
|
].join("\n\n");
|
|
@@ -3574,6 +3592,7 @@ function buildDispatchPromptPlan(input) {
|
|
|
3574
3592
|
fallbackPrompt: buildDispatchPromptWithBootstrap(input),
|
|
3575
3593
|
instructionEpoch: `${LOCAL_AGENT_INSTRUCTION_CONTRACT_VERSION}:${contentFingerprint}`,
|
|
3576
3594
|
userPrompt: renderDispatchPrompt({
|
|
3595
|
+
nativeInstructions: true,
|
|
3577
3596
|
informationProtectionPrompt: informationProtectionPlan.perTurnPrompt,
|
|
3578
3597
|
workingLanguagePrompt: workingLanguagePlan.perTurnPrompt,
|
|
3579
3598
|
input
|
|
@@ -3604,7 +3623,7 @@ function renderDispatchPrompt(input) {
|
|
|
3604
3623
|
if (promptInput.imageAttachmentPromptSection) sections.push(promptInput.imageAttachmentPromptSection);
|
|
3605
3624
|
const spaceFilesSection = renderSharedSpaceFilesSection(promptInput);
|
|
3606
3625
|
if (spaceFilesSection) sections.push(spaceFilesSection);
|
|
3607
|
-
const completionSection = renderMandatoryCompletionSection(promptInput);
|
|
3626
|
+
const completionSection = renderMandatoryCompletionSection(promptInput, input.nativeInstructions === true);
|
|
3608
3627
|
if (completionSection) sections.push(completionSection);
|
|
3609
3628
|
return sections.filter(Boolean).join("\n\n");
|
|
3610
3629
|
}
|
|
@@ -3703,21 +3722,14 @@ function buildCurrentWakeContextLines(input) {
|
|
|
3703
3722
|
readOutcomesInstruction: `run \`${updatesCommand}\``
|
|
3704
3723
|
});
|
|
3705
3724
|
}
|
|
3706
|
-
function renderMandatoryCompletionSection(input) {
|
|
3725
|
+
function renderMandatoryCompletionSection(input, nativeInstructions) {
|
|
3707
3726
|
const publicationRequirement = resolveSpacePublicationRequirement(input.spaceContractSnapshot);
|
|
3708
3727
|
if (publicationRequirement.allowsRawReplyWithoutAction) return null;
|
|
3709
3728
|
if (!publicationRequirement.allowedActions.some((action) => action === "post_message" || action === "stay_silent")) return ["Mandatory completion:", ...publicationRequirement.actionGuidanceLines].join("\n");
|
|
3710
3729
|
return [
|
|
3711
3730
|
"Mandatory completion:",
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
buildMandatoryCompletionActionLine(publicationRequirement),
|
|
3715
|
-
"- Use the Space Action tool first. If your harness offers tool search or discovery, look up the required action before declaring it unavailable. A tool missing from the initial list is not proof of unavailability. Do not read setup or onboarding guides merely to submit this result.",
|
|
3716
|
-
...publicationRequirement.allowedActions.includes("post_message") ? ["- For a plain reply, omit wakeTargets and referenceTargets. Add targets only for an intentional handoff or reference to another Agent; never copy incoming activation targets or wake yourself."] : [],
|
|
3717
|
-
"- Submit the actual result and inspect the tool response before ending this turn.",
|
|
3718
|
-
"- After one successful acknowledgement, stop submitting. It confirms a recorded proposal, not publication.",
|
|
3719
|
-
"- If a Space Action submission is confirmed rejected before recording, follow its correction guidance. If its submission outcome is unknown, submit no further Space Action in this turn, including an error-report reply. End with the diagnostic; OpenMeld owns recovery. Do not switch tools to retry the submission.",
|
|
3720
|
-
"- A failed context read or business tool is not a Space Action submission. If no Space Action has been submitted, use the required completion action to report the blocker honestly; do not invent results from unread material."
|
|
3731
|
+
...nativeInstructions ? [] : SPACE_ACTION_COMPLETION_RULES,
|
|
3732
|
+
buildMandatoryCompletionActionLine(publicationRequirement)
|
|
3721
3733
|
].join("\n");
|
|
3722
3734
|
}
|
|
3723
3735
|
function buildMandatoryCompletionActionLine(publicationRequirement) {
|
|
@@ -5002,8 +5014,8 @@ async function readCodexSessionTitles(input) {
|
|
|
5002
5014
|
if (!line.trim()) continue;
|
|
5003
5015
|
try {
|
|
5004
5016
|
const record = JSON.parse(line);
|
|
5005
|
-
if (!isRecord$
|
|
5006
|
-
const sessionId = text$
|
|
5017
|
+
if (!isRecord$2(record)) continue;
|
|
5018
|
+
const sessionId = text$3(record.id);
|
|
5007
5019
|
const title = normalizeSharedSessionTitle(record.thread_name);
|
|
5008
5020
|
if (sessionId && title) titles.set(sessionId, title);
|
|
5009
5021
|
} catch {}
|
|
@@ -5011,13 +5023,13 @@ async function readCodexSessionTitles(input) {
|
|
|
5011
5023
|
return titles;
|
|
5012
5024
|
}
|
|
5013
5025
|
function normalizeSharedSessionTitle(value) {
|
|
5014
|
-
const normalized = text$
|
|
5026
|
+
const normalized = text$3(value);
|
|
5015
5027
|
return normalized && normalized.length <= 240 ? normalized : null;
|
|
5016
5028
|
}
|
|
5017
|
-
function text$
|
|
5029
|
+
function text$3(value) {
|
|
5018
5030
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
5019
5031
|
}
|
|
5020
|
-
function isRecord$
|
|
5032
|
+
function isRecord$2(value) {
|
|
5021
5033
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5022
5034
|
}
|
|
5023
5035
|
function isNodeError(error) {
|
|
@@ -5027,12 +5039,12 @@ function isNodeError(error) {
|
|
|
5027
5039
|
//#region src/agent-activity/observer-adapters.ts
|
|
5028
5040
|
const ACTIVE_WINDOW_MS = 2 * 6e4;
|
|
5029
5041
|
function parseCodexRolloutSnapshot(input) {
|
|
5030
|
-
const meta = input.lines.find((line) => isRecord(line) && line.type === "session_meta" && isRecord(line.payload));
|
|
5031
|
-
if (!(isRecord(meta) && isRecord(meta.payload))) return null;
|
|
5032
|
-
const sessionId = text$
|
|
5033
|
-
const cwd = text$
|
|
5042
|
+
const meta = input.lines.find((line) => isRecord$1(line) && line.type === "session_meta" && isRecord$1(line.payload));
|
|
5043
|
+
if (!(isRecord$1(meta) && isRecord$1(meta.payload))) return null;
|
|
5044
|
+
const sessionId = text$2(meta.payload.id);
|
|
5045
|
+
const cwd = text$2(meta.payload.cwd);
|
|
5034
5046
|
if (!(sessionId && cwd)) return null;
|
|
5035
|
-
const safeEvidence = input.lines.filter((line) => isRecord(line)).map((line) => ({
|
|
5047
|
+
const safeEvidence = input.lines.filter((line) => isRecord$1(line)).map((line) => ({
|
|
5036
5048
|
line,
|
|
5037
5049
|
observedAtMs: timestamp(line.timestamp)
|
|
5038
5050
|
})).filter((entry) => entry.observedAtMs !== null).sort((left, right) => Number(left.observedAtMs) - Number(right.observedAtMs));
|
|
@@ -5040,17 +5052,17 @@ function parseCodexRolloutSnapshot(input) {
|
|
|
5040
5052
|
const latestTurn = [...safeEvidence].reverse().find((entry) => entry.line.type === "turn_context");
|
|
5041
5053
|
const observedAtMs = latest?.observedAtMs ?? timestamp(meta.timestamp);
|
|
5042
5054
|
if (observedAtMs === null) return null;
|
|
5043
|
-
const turnPayload = isRecord(latestTurn?.line.payload) ? latestTurn.line.payload : {};
|
|
5055
|
+
const turnPayload = isRecord$1(latestTurn?.line.payload) ? latestTurn.line.payload : {};
|
|
5044
5056
|
const originator = normalizeCodexOriginator(meta.payload);
|
|
5045
5057
|
const status = resolveObservedStatus({
|
|
5046
5058
|
explicitIdle: safeEvidence.slice(-4).some((entry) => {
|
|
5047
|
-
const payload = isRecord(entry.line.payload) ? entry.line.payload : null;
|
|
5059
|
+
const payload = isRecord$1(entry.line.payload) ? entry.line.payload : null;
|
|
5048
5060
|
return entry.line.type === "event_msg" && (payload?.type === "task_complete" || payload?.type === "turn_aborted");
|
|
5049
5061
|
}),
|
|
5050
5062
|
nowMs: input.nowMs,
|
|
5051
5063
|
observedAtMs
|
|
5052
5064
|
});
|
|
5053
|
-
const git = isRecord(meta.payload.git) ? meta.payload.git : {};
|
|
5065
|
+
const git = isRecord$1(meta.payload.git) ? meta.payload.git : {};
|
|
5054
5066
|
return {
|
|
5055
5067
|
clientKind: resolveCodexClientKind(originator),
|
|
5056
5068
|
cwd,
|
|
@@ -5068,7 +5080,7 @@ function parseCodexRolloutSnapshot(input) {
|
|
|
5068
5080
|
"never"
|
|
5069
5081
|
]),
|
|
5070
5082
|
cliVersion: nullableText(meta.payload.cli_version),
|
|
5071
|
-
contextWindow: positiveInteger(isRecord(turnPayload.summary) ? turnPayload.summary.model_context_window : void 0),
|
|
5083
|
+
contextWindow: positiveInteger(isRecord$1(turnPayload.summary) ? turnPayload.summary.model_context_window : void 0),
|
|
5072
5084
|
modelProvider: nullableText(meta.payload.model_provider),
|
|
5073
5085
|
originator,
|
|
5074
5086
|
reasoningEffort: enumValue(turnPayload.effort, [
|
|
@@ -5079,7 +5091,7 @@ function parseCodexRolloutSnapshot(input) {
|
|
|
5079
5091
|
"xhigh",
|
|
5080
5092
|
"ultra"
|
|
5081
5093
|
]),
|
|
5082
|
-
sandboxMode: enumValue(isRecord(turnPayload.sandbox_policy) ? turnPayload.sandbox_policy.type : turnPayload.sandbox_policy, [
|
|
5094
|
+
sandboxMode: enumValue(isRecord$1(turnPayload.sandbox_policy) ? turnPayload.sandbox_policy.type : turnPayload.sandbox_policy, [
|
|
5083
5095
|
"read-only",
|
|
5084
5096
|
"workspace-write",
|
|
5085
5097
|
"danger-full-access"
|
|
@@ -5097,11 +5109,11 @@ function resolveCodexClientKind(originator) {
|
|
|
5097
5109
|
return originator === "cli" ? "codex-cli" : "unknown";
|
|
5098
5110
|
}
|
|
5099
5111
|
function parseClaudeTranscriptSnapshot(input) {
|
|
5100
|
-
const records = input.lines.filter((line) => isRecord(line));
|
|
5101
|
-
const identity = records.find((line) => text$
|
|
5112
|
+
const records = input.lines.filter((line) => isRecord$1(line));
|
|
5113
|
+
const identity = records.find((line) => text$2(line.sessionId) && text$2(line.cwd));
|
|
5102
5114
|
if (!identity) return null;
|
|
5103
|
-
const providerSessionId = text$
|
|
5104
|
-
const cwd = text$
|
|
5115
|
+
const providerSessionId = text$2(identity.sessionId);
|
|
5116
|
+
const cwd = text$2(identity.cwd);
|
|
5105
5117
|
if (!(providerSessionId && cwd)) return null;
|
|
5106
5118
|
const timed = records.map((line) => ({
|
|
5107
5119
|
line,
|
|
@@ -5109,7 +5121,7 @@ function parseClaudeTranscriptSnapshot(input) {
|
|
|
5109
5121
|
})).filter((entry) => entry.observedAtMs !== null).sort((left, right) => left.observedAtMs - right.observedAtMs);
|
|
5110
5122
|
const latest = timed.at(-1);
|
|
5111
5123
|
if (!latest) return null;
|
|
5112
|
-
const latestWithModel = [...timed].reverse().find((entry) => isRecord(entry.line.message) && text$
|
|
5124
|
+
const latestWithModel = [...timed].reverse().find((entry) => isRecord$1(entry.line.message) && text$2(entry.line.message.model));
|
|
5113
5125
|
const customTitle = [...records].reverse().find((line) => line.type === "custom-title");
|
|
5114
5126
|
const status = resolveObservedStatus({
|
|
5115
5127
|
explicitIdle: false,
|
|
@@ -5122,7 +5134,7 @@ function parseClaudeTranscriptSnapshot(input) {
|
|
|
5122
5134
|
eventType: status === "active" ? "heartbeat" : statusEventType(status),
|
|
5123
5135
|
gitBranch: nullableText(latest.line.gitBranch ?? identity.gitBranch),
|
|
5124
5136
|
gitCommit: null,
|
|
5125
|
-
model: isRecord(latestWithModel?.line.message) ? nullableText(latestWithModel.line.message.model) : null,
|
|
5137
|
+
model: isRecord$1(latestWithModel?.line.message) ? nullableText(latestWithModel.line.message.model) : null,
|
|
5126
5138
|
observedAtMs: latest.observedAtMs,
|
|
5127
5139
|
provider: "claude-code",
|
|
5128
5140
|
providerMetadata: compact({
|
|
@@ -5148,8 +5160,8 @@ function parseClaudeTranscriptSnapshot(input) {
|
|
|
5148
5160
|
};
|
|
5149
5161
|
}
|
|
5150
5162
|
function parseOpenCodeSessionRow(input) {
|
|
5151
|
-
const providerSessionId = text$
|
|
5152
|
-
const cwd = text$
|
|
5163
|
+
const providerSessionId = text$2(input.row.id);
|
|
5164
|
+
const cwd = text$2(input.row.directory);
|
|
5153
5165
|
const observedAtMs = timestamp(input.row.time_updated);
|
|
5154
5166
|
if (!(providerSessionId && cwd && observedAtMs !== null)) return null;
|
|
5155
5167
|
const model = parseJsonRecord(input.row.model);
|
|
@@ -5248,13 +5260,13 @@ function resolveObservedStatus(input) {
|
|
|
5248
5260
|
return !input.explicitIdle && input.nowMs - input.observedAtMs <= ACTIVE_WINDOW_MS ? "active" : "idle";
|
|
5249
5261
|
}
|
|
5250
5262
|
function normalizeCodexOriginator(meta) {
|
|
5251
|
-
if (text$
|
|
5252
|
-
if (isRecord(meta.source) && "subagent" in meta.source) return "subagent";
|
|
5253
|
-
const originator = text$
|
|
5263
|
+
if (text$2(meta.originator) === "Codex Desktop") return "desktop";
|
|
5264
|
+
if (isRecord$1(meta.source) && "subagent" in meta.source) return "subagent";
|
|
5265
|
+
const originator = text$2(meta.originator)?.toLowerCase();
|
|
5254
5266
|
return originator === "codex cli" || originator === "codex_cli" ? "cli" : void 0;
|
|
5255
5267
|
}
|
|
5256
5268
|
function normalizeClaudeEntrypoint(value) {
|
|
5257
|
-
const normalized = text$
|
|
5269
|
+
const normalized = text$2(value);
|
|
5258
5270
|
if (normalized === "claude-desktop") return "desktop";
|
|
5259
5271
|
return normalized === "cli" ? "cli" : void 0;
|
|
5260
5272
|
}
|
|
@@ -5266,7 +5278,7 @@ function compact(value) {
|
|
|
5266
5278
|
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== void 0));
|
|
5267
5279
|
}
|
|
5268
5280
|
function enumValue(value, allowed) {
|
|
5269
|
-
const normalized = text$
|
|
5281
|
+
const normalized = text$2(value);
|
|
5270
5282
|
return normalized && allowed.includes(normalized) ? normalized : void 0;
|
|
5271
5283
|
}
|
|
5272
5284
|
function positiveInteger(value) {
|
|
@@ -5287,23 +5299,23 @@ function timestamp(value) {
|
|
|
5287
5299
|
return Number.isFinite(parsed) ? parsed : null;
|
|
5288
5300
|
}
|
|
5289
5301
|
function nullableText(value) {
|
|
5290
|
-
const normalized = text$
|
|
5302
|
+
const normalized = text$2(value);
|
|
5291
5303
|
return normalized && normalized.length <= 512 ? normalized : null;
|
|
5292
5304
|
}
|
|
5293
|
-
function text$
|
|
5305
|
+
function text$2(value) {
|
|
5294
5306
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
5295
5307
|
}
|
|
5296
5308
|
function parseJsonRecord(value) {
|
|
5297
|
-
if (isRecord(value)) return value;
|
|
5309
|
+
if (isRecord$1(value)) return value;
|
|
5298
5310
|
if (typeof value !== "string") return null;
|
|
5299
5311
|
try {
|
|
5300
5312
|
const parsed = JSON.parse(value);
|
|
5301
|
-
return isRecord(parsed) ? parsed : null;
|
|
5313
|
+
return isRecord$1(parsed) ? parsed : null;
|
|
5302
5314
|
} catch {
|
|
5303
5315
|
return null;
|
|
5304
5316
|
}
|
|
5305
5317
|
}
|
|
5306
|
-
function isRecord(value) {
|
|
5318
|
+
function isRecord$1(value) {
|
|
5307
5319
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5308
5320
|
}
|
|
5309
5321
|
//#endregion
|
|
@@ -5759,8 +5771,8 @@ function reportCandidateReadDiagnostic(input, diagnostic) {
|
|
|
5759
5771
|
}
|
|
5760
5772
|
async function processOpenCodeIdentityRows(input, database, identityRows, result) {
|
|
5761
5773
|
for (const identity of identityRows) {
|
|
5762
|
-
const id = text(identity.id);
|
|
5763
|
-
const directory = text(identity.directory);
|
|
5774
|
+
const id = text$1(identity.id);
|
|
5775
|
+
const directory = text$1(identity.directory);
|
|
5764
5776
|
const updatedAtMs = Number(identity.time_updated) || 0;
|
|
5765
5777
|
input.state.openCodeCursor = {
|
|
5766
5778
|
id: id ?? "",
|
|
@@ -5982,7 +5994,7 @@ async function writeObserverState(input, state) {
|
|
|
5982
5994
|
function observerStatePath(input) {
|
|
5983
5995
|
return join(input.rootDir ?? resolveOpenMeldRootDir(), "device", "agent-activity", "observer-state.json");
|
|
5984
5996
|
}
|
|
5985
|
-
function text(value) {
|
|
5997
|
+
function text$1(value) {
|
|
5986
5998
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
5987
5999
|
}
|
|
5988
6000
|
//#endregion
|
|
@@ -6120,6 +6132,140 @@ function sendDaemonFrame(sink, input) {
|
|
|
6120
6132
|
}));
|
|
6121
6133
|
}
|
|
6122
6134
|
//#endregion
|
|
6135
|
+
//#region src/agent-activity/codex-read-client.ts
|
|
6136
|
+
const PROVIDER_DISCOVERY_TIMEOUT_MS = 3e4;
|
|
6137
|
+
const MAX_JSON_RPC_LINE_BYTES = 8 * 1024 * 1024;
|
|
6138
|
+
function createCodexJsonRpcClient(launchContract) {
|
|
6139
|
+
const invocation = buildCliLaunchInvocation({
|
|
6140
|
+
args: [
|
|
6141
|
+
"app-server",
|
|
6142
|
+
"--listen",
|
|
6143
|
+
"stdio://"
|
|
6144
|
+
],
|
|
6145
|
+
launchContract
|
|
6146
|
+
});
|
|
6147
|
+
const child = spawn(invocation.bin, invocation.args, {
|
|
6148
|
+
env: process.env,
|
|
6149
|
+
shell: invocation.shell ?? false,
|
|
6150
|
+
stdio: [
|
|
6151
|
+
"pipe",
|
|
6152
|
+
"pipe",
|
|
6153
|
+
"ignore"
|
|
6154
|
+
],
|
|
6155
|
+
windowsHide: true
|
|
6156
|
+
});
|
|
6157
|
+
let nextId = 1;
|
|
6158
|
+
let buffer = "";
|
|
6159
|
+
let closed = false;
|
|
6160
|
+
const pending = /* @__PURE__ */ new Map();
|
|
6161
|
+
const rejectPending = (error) => {
|
|
6162
|
+
for (const request of pending.values()) {
|
|
6163
|
+
clearTimeout(request.timer);
|
|
6164
|
+
request.reject(error);
|
|
6165
|
+
}
|
|
6166
|
+
pending.clear();
|
|
6167
|
+
};
|
|
6168
|
+
child.stdout.setEncoding("utf8");
|
|
6169
|
+
child.stdout.on("data", (chunk) => {
|
|
6170
|
+
buffer = consumeCodexJsonRpcChunk({
|
|
6171
|
+
buffer,
|
|
6172
|
+
chunk,
|
|
6173
|
+
kill: () => child.kill("SIGTERM"),
|
|
6174
|
+
pending,
|
|
6175
|
+
rejectPending
|
|
6176
|
+
});
|
|
6177
|
+
});
|
|
6178
|
+
child.on("error", (error) => rejectPending(error));
|
|
6179
|
+
child.on("close", () => {
|
|
6180
|
+
closed = true;
|
|
6181
|
+
rejectPending(/* @__PURE__ */ new Error("Codex app-server closed during discovery."));
|
|
6182
|
+
});
|
|
6183
|
+
return {
|
|
6184
|
+
close: async () => {
|
|
6185
|
+
if (closed) return;
|
|
6186
|
+
child.kill("SIGTERM");
|
|
6187
|
+
await new Promise((resolveClose) => {
|
|
6188
|
+
const timer = setTimeout(resolveClose, 1e3);
|
|
6189
|
+
child.once("close", () => {
|
|
6190
|
+
clearTimeout(timer);
|
|
6191
|
+
resolveClose();
|
|
6192
|
+
});
|
|
6193
|
+
});
|
|
6194
|
+
},
|
|
6195
|
+
notify: (method, params) => {
|
|
6196
|
+
child.stdin.write(`${JSON.stringify({
|
|
6197
|
+
jsonrpc: "2.0",
|
|
6198
|
+
method,
|
|
6199
|
+
params
|
|
6200
|
+
})}\n`);
|
|
6201
|
+
},
|
|
6202
|
+
request: (method, params) => {
|
|
6203
|
+
if (closed) return Promise.reject(/* @__PURE__ */ new Error("Codex app-server is closed."));
|
|
6204
|
+
const id = nextId;
|
|
6205
|
+
nextId += 1;
|
|
6206
|
+
return new Promise((resolveRequest, rejectRequest) => {
|
|
6207
|
+
const timer = setTimeout(() => {
|
|
6208
|
+
pending.delete(id);
|
|
6209
|
+
rejectRequest(/* @__PURE__ */ new Error(`Codex ${method} timed out.`));
|
|
6210
|
+
}, PROVIDER_DISCOVERY_TIMEOUT_MS);
|
|
6211
|
+
pending.set(id, {
|
|
6212
|
+
reject: rejectRequest,
|
|
6213
|
+
resolve: resolveRequest,
|
|
6214
|
+
timer
|
|
6215
|
+
});
|
|
6216
|
+
child.stdin.write(`${JSON.stringify({
|
|
6217
|
+
id,
|
|
6218
|
+
jsonrpc: "2.0",
|
|
6219
|
+
method,
|
|
6220
|
+
params
|
|
6221
|
+
})}\n`);
|
|
6222
|
+
});
|
|
6223
|
+
}
|
|
6224
|
+
};
|
|
6225
|
+
}
|
|
6226
|
+
function consumeCodexJsonRpcChunk(input) {
|
|
6227
|
+
let buffer = input.buffer + input.chunk;
|
|
6228
|
+
if (Buffer.byteLength(buffer) > MAX_JSON_RPC_LINE_BYTES) {
|
|
6229
|
+
input.rejectPending(/* @__PURE__ */ new Error("Codex app-server response exceeded its bound."));
|
|
6230
|
+
input.kill();
|
|
6231
|
+
return "";
|
|
6232
|
+
}
|
|
6233
|
+
while (true) {
|
|
6234
|
+
const newline = buffer.indexOf("\n");
|
|
6235
|
+
if (newline < 0) return buffer;
|
|
6236
|
+
const line = buffer.slice(0, newline).trim();
|
|
6237
|
+
buffer = buffer.slice(newline + 1);
|
|
6238
|
+
if (!line) continue;
|
|
6239
|
+
let message;
|
|
6240
|
+
try {
|
|
6241
|
+
message = JSON.parse(line);
|
|
6242
|
+
} catch {
|
|
6243
|
+
input.rejectPending(/* @__PURE__ */ new Error("Codex app-server returned invalid JSON."));
|
|
6244
|
+
input.kill();
|
|
6245
|
+
return "";
|
|
6246
|
+
}
|
|
6247
|
+
settleCodexJsonRpcResponse(message, input.pending);
|
|
6248
|
+
}
|
|
6249
|
+
}
|
|
6250
|
+
function settleCodexJsonRpcResponse(message, pending) {
|
|
6251
|
+
if (!isRecord(message) || typeof message.id !== "number") return;
|
|
6252
|
+
const request = pending.get(message.id);
|
|
6253
|
+
if (!request) return;
|
|
6254
|
+
pending.delete(message.id);
|
|
6255
|
+
clearTimeout(request.timer);
|
|
6256
|
+
if (isRecord(message.error)) {
|
|
6257
|
+
request.reject(new Error(text(message.error.message) ?? "Codex app-server request failed."));
|
|
6258
|
+
return;
|
|
6259
|
+
}
|
|
6260
|
+
request.resolve(message.result);
|
|
6261
|
+
}
|
|
6262
|
+
function isRecord(value) {
|
|
6263
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
6264
|
+
}
|
|
6265
|
+
function text(value) {
|
|
6266
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
6267
|
+
}
|
|
6268
|
+
//#endregion
|
|
6123
6269
|
//#region src/runtime/dispatch-space-action-context.ts
|
|
6124
6270
|
const OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV = "OPENMELD_SPACE_ACTION_CONTEXT_PATH";
|
|
6125
6271
|
/** The local action context is known expired/closed/mismatched: a new ordinary action must be rejected, never recorded. */
|
|
@@ -6603,6 +6749,6 @@ function prependPathEntry(input) {
|
|
|
6603
6749
|
return [input.nextEntry, ...dedupedEntries].join(delimiter);
|
|
6604
6750
|
}
|
|
6605
6751
|
//#endregion
|
|
6606
|
-
export {
|
|
6752
|
+
export { ComputerFileAccessStoreError as $, isRelationPickerState as $t, removeProjectInbox as A, buildDispatchResultReplyWorkflowProjection as At, consumeArmedAgentControllerInterfaceReprobe as B, buildSpaceRoundReadProjection as Bt, resolveOpenCodeDatabasePath as C, cliJsonSkillsShowEnvelopeSchema as Cn, toSpaceConfigListIntegrityError as Ct, readCodexSessionTitles as D, organizationJoinLinkManagementQuerySchema as Dn, writeSpaceRecentMentionProfileIds as Dt, normalizeSharedSessionTitle as E, organizationJoinLinkErrorResponseSchema as En, writeSpaceCacheDeletionNoticeState as Et, readDueAgentActivityOutbox as F, buildSignalReplyWorkflowProjection as Ft, readReusableAgentControllerInterfaceSnapshot as G, createDispatchContinuationSpaceAccessContext as Gt, readLastKnownAgentControllerAuthSnapshot as H, buildUpdatesReplyWorkflowProjection as Ht, removeProjectOutbox as I, buildSpaceMemberAgentPresencePresentation as It, recordAgentControllerUsageLimitsObservation as J, enterRelationPickerState as Jt, recordAgentControllerInterfaceProbeFailure as K, createSpaceMemberIdentityIndex as Kt, readRecentAgentActivityHookStatus as L, buildSpaceMentionProfileIndex as Lt, applyAgentActivitySubmissionResults as M, buildPublicSpaceEntryUrl as Mt, deferAgentActivityOutbox as N, buildSignalIndex as Nt, drainAgentActivityHookInbox as O, revokeOrganizationJoinLinkResponseSchema as On, SpaceComposerSubmissionError as Ot, readAgentActivityOutboxHealth as P, buildSignalMessageReadProjection as Pt, readRecentDaemonDispatchJournalEvents as Q, getSpaceAccessRequestContext as Qt, createServiceGitEnvironment as R, buildSpaceMessageReadRelationSummary as Rt, resolveOpenCodeAuthPath as S, cliJsonSkillsScanEnvelopeSchema as Sn, toLocalSpaceStateIntegrityError as St, resolveObservedAgentActivityBinding as T, getOrganizationJoinLinkResponseSchema as Tn, upsertSpaceConfig as Tt, readLastKnownAgentControllerUsageLimits as U, closeMentionPickerState as Ut, didAgentControllerCommandFingerprintRemainStable as V, buildSpaceRoundSignalPublication as Vt, readLastSuccessfulAgentControllerInterfaceCheckAt as W, collectResolvedSpaceMentions as Wt, resolveNextRuntimeAgentControllerReportSyncAtMs as X, formatRemovedCcRelationMessage as Xt, resolveAgentControllerCommandFingerprint as Y, extractMentionAuthoringPrefix as Yt, emitDaemonDispatchJournalEvent as Z, getSpaceAccessPassword as Zt, sendDaemonFrame as _, cliJsonSkillsAddAllEnvelopeSchema as _n, readSpaceCacheDeletionNoticeState as _t, DispatchSpaceActionClosedError as a, openTargetPickerState as an, buildDispatchCorrelation as at, startAgentActivityTranscriptWatchers as b, cliJsonSkillsListEnvelopeSchema as bn, readSpaceRecentMentionProfileIds as bt, createDispatchSpaceActionContext as c, resolveNextRecentMentionProfileIdsForQueuedText as cn, parseDispatchTask as ct, readDispatchSpaceActionRecord as d, updateAuthoredMentionRanges as dn, resolveDispatchMentionSourceContext as dt, isTargetPickerState as en, readComputerFileAccessPolicy as et, supersedeDispatchSpaceActionRecordForReconsideration as f, DISPATCH_OWNED_RUNTIME_MODE as fn, projectSpaceProfileCache as ft, parseDaemonFrame as g, cliJsonOutputEnvelopeSchema as gn, listSpaceConfigs as gt, handleDaemonTransportFrame as h, cliJsonErrorEnvelopeSchema as hn, isLocalSpaceStateCorruptResult as ht, readDispatchOwnedRuntimeGuard as i, listSpaceMentionSuggestions as in, buildDispatchBootstrapTemplateFacts as it, AgentActivitySubmissionResultsMismatchError as j, buildPublicSpaceEntryPath as jt, enqueueAgentActivityHookEvent as k, buildDispatchResultMessageReadProjection as kt, readDispatchSpaceActionContextForReceiptFromEnv as l, resolveSpaceMemberAgentOwnerWakeDiagnosticsView as ln, resolveBootstrapSpaceOwnerProfileId as lt, createCodexJsonRpcClient as m, OPENMELD_DISPATCH_RUNTIME_MODE_ENV as mn, inspectSpaceCacheFile as mt, assertDispatchOwnedRuntimeServiceMutationAllowed as n, listSpaceMemberDirectorySendTargets as nn, updateComputerFileAccessPolicy as nt, DispatchSpaceActionRejectedError as o, prepareSpaceComposerSubmission as on, buildDispatchPromptPlan as ot, writeDispatchSpaceActionRecord as p, DISPATCH_SPACE_ACTION_CLI_FALLBACK_COMMAND as pn, LocalSpaceStateIntegrityError as pt, recordAgentControllerInterfaceProbeSuccess as q, createSpaceTargetCatalog as qt, buildDispatchOwnedRuntimeEnv as r, listSpaceMentionRelationChoices as rn, isSameOrDescendantPath as rt, OPENMELD_SPACE_ACTION_CONTEXT_PATH_ENV as s, prepareSpaceFileOnlySubmission as sn, buildDispatchSessionTitle as st, assertDispatchOwnedRuntimePublicWriteAllowed as t, isWakeClosingSystemNoticeType as tn, resolveComputerFileAccessStorePath as tt, readDispatchSpaceActionContextFromEnv as u, returnToTargetPickerState as un, resolveBootstrapTargetProfileContext as ut, collectObservedSessionWorkingDirectories as v, cliJsonSkillsAddEnvelopeSchema as vn, readSpaceConfig as vt, buildAgentActivityEvent as w, acceptOrganizationJoinLinkBodySchema as wn, updateSpaceLastSeenTs as wt, readOpenCodeSessionRows as x, cliJsonSkillsLoadEnvelopeSchema as xn, removeSpaceConfig as xt, scanLocalAgentActivity as y, cliJsonSkillsAddPreviewEnvelopeSchema as yn, readSpaceLastSeenTs as yt, buildAgentControllerInterfaceKeeperKey as z, buildSpaceProfileAddPlan as zt };
|
|
6607
6753
|
|
|
6608
|
-
//# sourceMappingURL=dispatch-owned-runtime-
|
|
6754
|
+
//# sourceMappingURL=dispatch-owned-runtime-g2lLeYtx.js.map
|