openmeld 0.3.216 → 0.3.217
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-CxgkT6ht.js → add-me-membership-C2Ys6Gq2.js} +2 -2
- package/dist/{add-me-membership-CxgkT6ht.js.map → add-me-membership-C2Ys6Gq2.js.map} +1 -1
- package/dist/{agents-B_qjzGkQ.js → agents-ClqMS9aO.js} +10 -10
- package/dist/{agents-B_qjzGkQ.js.map → agents-ClqMS9aO.js.map} +1 -1
- package/dist/{api-client-foundation-DdtV7aF-.js → api-client-foundation-CMVD057A.js} +1 -1
- package/dist/{api-client-foundation-XILCNkrF.js → api-client-foundation-Cib1elkI.js} +3 -3
- package/dist/{api-client-foundation-XILCNkrF.js.map → api-client-foundation-Cib1elkI.js.map} +1 -1
- package/dist/auth-session-D7oAIuHk.js +4 -0
- package/dist/{auth-session-B9Whm1hq.js → auth-session-DOjVKRI_.js} +2 -2
- package/dist/{auth-session-B9Whm1hq.js.map → auth-session-DOjVKRI_.js.map} +1 -1
- package/dist/{base-url-CiSsUvmr.js → base-url-CMBApK1J.js} +1 -1
- package/dist/{base-url-jdL78gyl.js → base-url-D7uE_xTo.js} +2 -2
- package/dist/{base-url-jdL78gyl.js.map → base-url-D7uE_xTo.js.map} +1 -1
- package/dist/{channel-CKmbucdt.js → channel-BfTy6fDo.js} +4 -4
- package/dist/{channel-CKmbucdt.js.map → channel-BfTy6fDo.js.map} +1 -1
- package/dist/{cli-space-api-DlDztj9O.js → cli-space-api-BT_Pu9Yg.js} +6 -6
- package/dist/{cli-space-api-DlDztj9O.js.map → cli-space-api-BT_Pu9Yg.js.map} +1 -1
- package/dist/{command-Cbp4ZeZs.js → command-C1w0UpIu.js} +28 -23
- package/dist/command-C1w0UpIu.js.map +1 -0
- package/dist/{computer-connection-CVE1MAqF.js → computer-connection-DsjsjmPp.js} +2 -2
- package/dist/{computer-connection-CVE1MAqF.js.map → computer-connection-DsjsjmPp.js.map} +1 -1
- package/dist/{computer-connection-review-CfFmjZLP.js → computer-connection-review-RXJyryCh.js} +5 -5
- package/dist/{computer-connection-review-CfFmjZLP.js.map → computer-connection-review-RXJyryCh.js.map} +1 -1
- package/dist/{computer-disconnect-B5nMRe9T.js → computer-disconnect-B_LZM2QE.js} +7 -7
- package/dist/{computer-disconnect-B5nMRe9T.js.map → computer-disconnect-B_LZM2QE.js.map} +1 -1
- package/dist/{computer-setup-continuation-Bd3BIgdU.js → computer-setup-continuation-BVI7SD0M.js} +3 -3
- package/dist/{computer-setup-continuation-Bd3BIgdU.js.map → computer-setup-continuation-BVI7SD0M.js.map} +1 -1
- package/dist/{context-Cz5nJnDe.js → context-Di5R4iik.js} +5 -5
- package/dist/{context-Cz5nJnDe.js.map → context-Di5R4iik.js.map} +1 -1
- package/dist/{control-plane-DKPz7DMv.js → control-plane-BDS63N7Y.js} +2 -2
- package/dist/{control-plane-DKPz7DMv.js.map → control-plane-BDS63N7Y.js.map} +1 -1
- package/dist/{controller-contract-pe3_Re-c.js → controller-contract-DAOCaefz.js} +9 -1
- package/dist/controller-contract-DAOCaefz.js.map +1 -0
- package/dist/{daemon-device-id-KgO7zcEr.js → daemon-device-id-bfkbZj9G.js} +7 -7
- package/dist/{daemon-device-id-KgO7zcEr.js.map → daemon-device-id-bfkbZj9G.js.map} +1 -1
- package/dist/{daemon-frame-transport-DUDAgNbO.js → daemon-frame-transport-saNQVOyi.js} +8 -8
- package/dist/daemon-frame-transport-saNQVOyi.js.map +1 -0
- package/dist/{daemon-lifecycle-journal-Bj-fw052.js → daemon-lifecycle-journal-DP01txRB.js} +5 -4
- package/dist/{daemon-lifecycle-journal-Bj-fw052.js.map → daemon-lifecycle-journal-DP01txRB.js.map} +1 -1
- package/dist/{daemon-service-manager-Cq3ANgn8.js → daemon-service-manager-CRHq3YSj.js} +1 -1
- package/dist/{daemon-service-manager-CZY8Bin4.js → daemon-service-manager-CXbN836B.js} +2 -2
- package/dist/{daemon-service-manager-CZY8Bin4.js.map → daemon-service-manager-CXbN836B.js.map} +1 -1
- package/dist/{daemon-service-runtime-yD-w1dQw.js → daemon-service-runtime-DpiD8oap.js} +5 -5
- package/dist/{daemon-service-runtime-yD-w1dQw.js.map → daemon-service-runtime-DpiD8oap.js.map} +1 -1
- package/dist/{daemon-service-update-coordinator-BATuKmZA.js → daemon-service-update-coordinator-BuCEBJoe.js} +16 -16
- package/dist/{daemon-service-update-coordinator-BATuKmZA.js.map → daemon-service-update-coordinator-BuCEBJoe.js.map} +1 -1
- package/dist/{dist-o3UL1EGQ.js → dist-BLuEEVHh.js} +2 -2
- package/dist/dist-BLuEEVHh.js.map +1 -0
- package/dist/{dist-Ddy96dwl.js → dist-BdibASYs.js} +3 -3
- package/dist/{dist-Ddy96dwl.js.map → dist-BdibASYs.js.map} +1 -1
- package/dist/{dist-CkGG099H.js → dist-DkRliHib.js} +9292 -9207
- package/dist/dist-DkRliHib.js.map +1 -0
- package/dist/{dist-DZYJ8yLA.js → dist-RR7jryeV.js} +1 -1
- package/dist/{elapsed-time-DGQ63StD.js → elapsed-time-CR9OIZSD.js} +6 -6
- package/dist/{elapsed-time-DGQ63StD.js.map → elapsed-time-CR9OIZSD.js.map} +1 -1
- package/dist/{entry-Dhify7h7.js → entry-CSoHtCQ9.js} +8 -8
- package/dist/{entry-Dhify7h7.js.map → entry-CSoHtCQ9.js.map} +1 -1
- package/dist/{installation-inventory-BJe8fC9k.js → installation-inventory-CscX0nmD.js} +4 -4
- package/dist/{installation-inventory-BJe8fC9k.js.map → installation-inventory-CscX0nmD.js.map} +1 -1
- package/dist/{installer-CWgaNzfE.js → installer-CkF3gSdD.js} +2 -2
- package/dist/{installer-CWgaNzfE.js.map → installer-CkF3gSdD.js.map} +1 -1
- package/dist/{openmeld-koCpjXo7.js → openmeld-BcyBlby4.js} +44 -40
- package/dist/openmeld-BcyBlby4.js.map +1 -0
- package/dist/openmeld-dev.js +1 -1
- package/dist/{openmeld-environment-target-Dn2rJCa7.js → openmeld-environment-target-B6HqY0_a.js} +2 -2
- package/dist/{openmeld-environment-target-Dn2rJCa7.js.map → openmeld-environment-target-B6HqY0_a.js.map} +1 -1
- package/dist/{openmeld-maintenance-worker-DdsIYpG-.js → openmeld-maintenance-worker-Brsfy22C.js} +11 -11
- package/dist/{openmeld-maintenance-worker-DdsIYpG-.js.map → openmeld-maintenance-worker-Brsfy22C.js.map} +1 -1
- package/dist/{openmeld-tools-update-join-Clgm1ix5.js → openmeld-tools-update-join-CUh0JERe.js} +4 -4
- package/dist/{openmeld-tools-update-join-Clgm1ix5.js.map → openmeld-tools-update-join-CUh0JERe.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-0X-t0Kjv.js → openmeld-tools-update-process-frame-B-XB4dmO.js} +2 -2
- package/dist/{openmeld-tools-update-process-frame-0X-t0Kjv.js.map → openmeld-tools-update-process-frame-B-XB4dmO.js.map} +1 -1
- package/dist/{openmeld-tools-update-process-frame-DX1Dc8VI.js → openmeld-tools-update-process-frame-j-RXwFsK.js} +1 -1
- package/dist/openmeld.js +5 -5
- package/dist/{prepare-provider-runtime-CeGzeQbD.js → prepare-provider-runtime-DxaGSe3R.js} +1130 -122
- package/dist/prepare-provider-runtime-DxaGSe3R.js.map +1 -0
- package/dist/{prepare-session-executor-CsxnDFgS.js → prepare-session-executor-CyouBl49.js} +22 -22
- package/dist/{prepare-session-executor-CsxnDFgS.js.map → prepare-session-executor-CyouBl49.js.map} +1 -1
- package/dist/{process-channel-BTxB9zK-.js → process-channel-Cocpv3Br.js} +2 -2
- package/dist/{process-channel-BTxB9zK-.js.map → process-channel-Cocpv3Br.js.map} +1 -1
- package/dist/{runtime-CesmzZ2L.js → runtime-DGT66AR-.js} +19 -19
- package/dist/{runtime-CesmzZ2L.js.map → runtime-DGT66AR-.js.map} +1 -1
- package/dist/{runtime-agent-controller-reporting-submission-B6cDV_zW.js → runtime-agent-controller-reporting-submission-C1Vc_JWm.js} +59 -9
- package/dist/runtime-agent-controller-reporting-submission-C1Vc_JWm.js.map +1 -0
- package/dist/{runtime-reporting-health-state-Cjavvccq.js → runtime-reporting-health-state-CPWlQ5IX.js} +9 -9
- package/dist/{runtime-reporting-health-state-Cjavvccq.js.map → runtime-reporting-health-state-CPWlQ5IX.js.map} +1 -1
- package/dist/{runtime-transport-CVtBXzIp.js → runtime-transport-BLtOFrtv.js} +64 -11
- package/dist/runtime-transport-BLtOFrtv.js.map +1 -0
- package/dist/{service-Cgat7nEE.js → service-ClETdJbz.js} +49 -28
- package/dist/service-ClETdJbz.js.map +1 -0
- package/dist/{service-account-authorization-Ct0OZwbr.js → service-account-authorization-kciEaW5t.js} +3 -3
- package/dist/{service-account-authorization-Ct0OZwbr.js.map → service-account-authorization-kciEaW5t.js.map} +1 -1
- package/dist/{service-account-control-DefN0EOY.js → service-account-control-3n_YwNsF.js} +10 -10
- package/dist/{service-account-control-DefN0EOY.js.map → service-account-control-3n_YwNsF.js.map} +1 -1
- package/dist/{service-control-capabilities-BsCCHsUg.js → service-control-capabilities-C2tMMuFl.js} +4 -4
- package/dist/{service-control-capabilities-BsCCHsUg.js.map → service-control-capabilities-C2tMMuFl.js.map} +1 -1
- package/dist/{service-control-capabilities-m7mmxVOi.js → service-control-capabilities-DoW5MW7A.js} +1 -1
- package/dist/{state-C2ztY4iq.js → state-CMs4p0wo.js} +2 -2
- package/dist/{state-C2ztY4iq.js.map → state-CMs4p0wo.js.map} +1 -1
- package/dist/{upgrade-O_blyOta.js → upgrade-2epQATRq.js} +8 -8
- package/dist/{upgrade-O_blyOta.js.map → upgrade-2epQATRq.js.map} +1 -1
- package/dist/upgrade-BVIot_cP.js +4 -0
- package/package.json +3 -2
- package/skills/openmeld-cli/playbooks/agent-onboarding.md +15 -0
- package/dist/auth-session-DXKHtGTr.js +0 -4
- package/dist/command-Cbp4ZeZs.js.map +0 -1
- package/dist/controller-contract-pe3_Re-c.js.map +0 -1
- package/dist/daemon-frame-transport-DUDAgNbO.js.map +0 -1
- package/dist/dist-CkGG099H.js.map +0 -1
- package/dist/dist-o3UL1EGQ.js.map +0 -1
- package/dist/openmeld-koCpjXo7.js.map +0 -1
- package/dist/prepare-provider-runtime-CeGzeQbD.js.map +0 -1
- package/dist/runtime-agent-controller-reporting-submission-B6cDV_zW.js.map +0 -1
- package/dist/runtime-transport-CVtBXzIp.js.map +0 -1
- package/dist/service-Cgat7nEE.js.map +0 -1
- package/dist/upgrade-axb9z2uy.js +0 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { J as normalizeOpenMeldProfileId, L as deviceOpenClawProfileBootstrapPath, P as accountProfileWorkspacePath, R as deviceOpenClawProfileDir, W as isPublishedOpenMeldHome, a as isOpenMeldOrphanedLockError, ct as resolveOpenMeldEnvPreset, d as runWithHeldLock, i as isOpenMeldLockError, j as accountProfileLocalMetaPath, lt as resolveOpenMeldRootDir, t as acquireLock, z as deviceOpenClawProfileWorkspaceDir } from "./lock-Bsl_ElWy.js";
|
|
4
|
-
import { Kt as createLocalRuntimeExpectedRoutesApi,
|
|
5
|
-
import { _ as canonicalizeAgentControllerRef, b as normalizeKnownBuiltinAgentControllerId, d as resolveBuiltinAgentControllerConversationKind, f as HOSTED_CENTER_AGENT_CONTROLLER_REF, g as buildAgentControllerRoutingKey, l as buildAgentControllerConversationRef, m as HOSTED_REMOTE_AGENT_CONTROLLER_REF, p as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, s as runtimeTransportModeSchema, v as canonicalizeBuiltinAgentControllerRef, x as parseAgentControllerRef$1 } from "./controller-contract-
|
|
6
|
-
import {
|
|
7
|
-
import { d as getAuthSessionState, q as OPENCLAW_CLI_TIMEOUT_MS$1 } from "./auth-session-
|
|
8
|
-
import { C as conversationExecutionStateSchema, D as normalizeOptionalWorkingDirectory, P as profileWorkspaceModeSchema, T as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, o as openMeldDaemonControlPlaneRequestSchema, s as openMeldDaemonControlPlaneResponseSchema, x as providerDispatchRuntimeContextSchema } from "./control-plane-
|
|
4
|
+
import { Kt as createLocalRuntimeExpectedRoutesApi, Mt as createAgentProfileBindingApi, mi as modelCatalogSchema, t as OpenMeldApiClientHttpError } from "./dist-DkRliHib.js";
|
|
5
|
+
import { _ as canonicalizeAgentControllerRef, b as normalizeKnownBuiltinAgentControllerId, d as resolveBuiltinAgentControllerConversationKind, f as HOSTED_CENTER_AGENT_CONTROLLER_REF, g as buildAgentControllerRoutingKey, l as buildAgentControllerConversationRef, m as HOSTED_REMOTE_AGENT_CONTROLLER_REF, p as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, s as runtimeTransportModeSchema, v as canonicalizeBuiltinAgentControllerRef, x as parseAgentControllerRef$1 } from "./controller-contract-DAOCaefz.js";
|
|
6
|
+
import { Bn as formatCanonicalMentionLiteral, H as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, J as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, K as openMeldDaemonProviderAccessEvidenceSchema, U as isOriginalErrorSafeForMessageDetails, Un as normalizeMessageEnvelope, di as resolveCommandAgentWorkActivity, q as openMeldDaemonTaskResultEnvelopeWriteSchema, sr as agentInteractionResolutionSchema, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH } from "./runtime-transport-BLtOFrtv.js";
|
|
7
|
+
import { d as getAuthSessionState, q as OPENCLAW_CLI_TIMEOUT_MS$1 } from "./auth-session-DOjVKRI_.js";
|
|
8
|
+
import { C as conversationExecutionStateSchema, D as normalizeOptionalWorkingDirectory, P as profileWorkspaceModeSchema, T as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, o as openMeldDaemonControlPlaneRequestSchema, s as openMeldDaemonControlPlaneResponseSchema, x as providerDispatchRuntimeContextSchema } from "./control-plane-BDS63N7Y.js";
|
|
9
9
|
import { r as daemonServiceLaneSchema } from "./service-contract-CRyDcIIf.js";
|
|
10
10
|
import { n as agentControllerPermissionModeSchema, r as agentControllerCollaborationModeSchema } from "./open-code-permission-Doem1R2N.js";
|
|
11
|
-
import { U as listOpenMeldProfiles, X as touchDaemonCatalogSyncSignal, _ as toErrorMessage$
|
|
12
|
-
import { C as updateConfiguredDeviceRuntimeState, T as updateConfiguredSkillsConfig, a as resolveBaseUrl, d as createDefaultRuntimeAgentControllerSettings, g as getConfiguredSkillsConfig, p as getConfiguredDeviceRuntimeState, v as getRuntimeConfigReadHealth, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-
|
|
11
|
+
import { U as listOpenMeldProfiles, X as touchDaemonCatalogSyncSignal, _ as toErrorMessage$20, ct as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, d as normalizeText$11, g as parseTransportMode$1, h as parseStreamingMode$1, m as parseRuntimeTransportMode, p as parseContextIdMappingSpec, s as emitRunLine, st as resolveCurrentOpenMeldAccountContext, u as normalizeOptionalText$52, ut as daemonRouteCatalogCacheSchema } from "./daemon-device-id-bfkbZj9G.js";
|
|
12
|
+
import { C as updateConfiguredDeviceRuntimeState, T as updateConfiguredSkillsConfig, a as resolveBaseUrl, d as createDefaultRuntimeAgentControllerSettings, g as getConfiguredSkillsConfig, p as getConfiguredDeviceRuntimeState, v as getRuntimeConfigReadHealth, y as resolveRuntimeSkillsCustomTargetId } from "./base-url-D7uE_xTo.js";
|
|
13
13
|
import { a as powerShellEncodedArguments, l as normalizeCommandEnvironment, o as readWindowsProcessStartFileTime, r as isProcessIdentityAlive, s as resolveWindowsPowerShellPath, t as CURRENT_PROCESS_START_IDENTITY } from "./process-identity-CNus0e6E.js";
|
|
14
14
|
import { n as writeDaemonLocalStateFile, t as readDaemonLocalStateFile } from "./daemon-local-state-file-jOXuXrky.js";
|
|
15
15
|
import { m as daemonRuntimeDataPath } from "./daemon-state-B44aq2nm.js";
|
|
16
16
|
import { i as readDaemonServiceContract } from "./daemon-service-contract-BpOBMGX0.js";
|
|
17
|
-
import { C as requestLocalSyncRouteCatalog } from "./daemon-lifecycle-journal-
|
|
18
|
-
import { d as buildOpenMeldRequestContextFromProfile, t as createCliApiClientFoundation } from "./api-client-foundation-
|
|
17
|
+
import { C as requestLocalSyncRouteCatalog } from "./daemon-lifecycle-journal-DP01txRB.js";
|
|
18
|
+
import { d as buildOpenMeldRequestContextFromProfile, t as createCliApiClientFoundation } from "./api-client-foundation-Cib1elkI.js";
|
|
19
19
|
import { createRequire } from "node:module";
|
|
20
20
|
import { createHash, randomUUID } from "node:crypto";
|
|
21
21
|
import { homedir, loadavg, tmpdir } from "node:os";
|
|
@@ -37,10 +37,21 @@ const BUILTIN_AGENT_CONTROLLER_DISPLAY_ORDER = [
|
|
|
37
37
|
"claude-code",
|
|
38
38
|
"grok-build",
|
|
39
39
|
"opencode",
|
|
40
|
+
"antigravity",
|
|
40
41
|
"openclaw",
|
|
41
42
|
"cursor"
|
|
42
43
|
];
|
|
43
44
|
const BUILTIN_AGENT_CONTROLLER_BRANDS = {
|
|
45
|
+
antigravity: {
|
|
46
|
+
accentHex: "#4f7df3",
|
|
47
|
+
accentRgb: [
|
|
48
|
+
79,
|
|
49
|
+
125,
|
|
50
|
+
243
|
|
51
|
+
],
|
|
52
|
+
controllerId: "antigravity",
|
|
53
|
+
selectionMixPercent: 32
|
|
54
|
+
},
|
|
44
55
|
"claude-code": {
|
|
45
56
|
accentHex: "#d97757",
|
|
46
57
|
accentRgb: [
|
|
@@ -719,6 +730,7 @@ function isAgentControllerPermissionModeControllerId(value) {
|
|
|
719
730
|
return Object.hasOwn(AGENT_CONTROLLER_PERMISSION_MODE_OPTIONS_BY_CONTROLLER_ID, value);
|
|
720
731
|
}
|
|
721
732
|
const AGENT_CONTROLLER_USAGE_LIMIT_SUPPORT_MATRIX = {
|
|
733
|
+
antigravity: "native",
|
|
722
734
|
"claude-code": "passive",
|
|
723
735
|
codex: "native",
|
|
724
736
|
cursor: "unsupported",
|
|
@@ -1953,20 +1965,50 @@ var registry_default$1 = {
|
|
|
1953
1965
|
"id": "antigravity",
|
|
1954
1966
|
"displayName": "Antigravity",
|
|
1955
1967
|
"category": "builtin",
|
|
1956
|
-
"skillsDir": ".
|
|
1957
|
-
"globalSkillsDir": "${HOME}/.gemini/antigravity/skills",
|
|
1968
|
+
"skillsDir": ".agents/skills",
|
|
1969
|
+
"globalSkillsDir": ["${HOME}/.gemini/antigravity-cli/skills", "${HOME}/.gemini/antigravity/skills"],
|
|
1958
1970
|
"detection": {
|
|
1959
1971
|
"mode": "any",
|
|
1960
|
-
"checks": [
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1972
|
+
"checks": [
|
|
1973
|
+
{
|
|
1974
|
+
"kind": "commandExists",
|
|
1975
|
+
"value": "agy"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
"kind": "pathExists",
|
|
1979
|
+
"value": "${HOME}/.gemini/antigravity-cli"
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
"kind": "pathExists",
|
|
1983
|
+
"value": "${HOME}/.gemini/antigravity"
|
|
1984
|
+
}
|
|
1985
|
+
]
|
|
1964
1986
|
},
|
|
1965
1987
|
"service": { "skillsInstallable": true },
|
|
1966
1988
|
"runtime": {
|
|
1967
|
-
"supported":
|
|
1968
|
-
"adapters": [
|
|
1969
|
-
|
|
1989
|
+
"supported": true,
|
|
1990
|
+
"adapters": [{
|
|
1991
|
+
"adapterId": "antigravity",
|
|
1992
|
+
"controllerRefMatcher": {
|
|
1993
|
+
"kind": "contains",
|
|
1994
|
+
"values": ["antigravity"]
|
|
1995
|
+
},
|
|
1996
|
+
"transportModes": ["local-cli"],
|
|
1997
|
+
"capabilityDeclaration": {
|
|
1998
|
+
"executionContextVersion": 2,
|
|
1999
|
+
"streamingCapability": "preview_capable",
|
|
2000
|
+
"imageInputCapability": "unsupported",
|
|
2001
|
+
"runtimeWorkingDirectoryMode": "spawn_cwd",
|
|
2002
|
+
"preparationRequirement": "none",
|
|
2003
|
+
"continuationCapability": "standard",
|
|
2004
|
+
"workspaceResumeBehavior": "validate_only"
|
|
2005
|
+
}
|
|
2006
|
+
}]
|
|
2007
|
+
},
|
|
2008
|
+
"lifecycle": { "status": "active" },
|
|
2009
|
+
"transportModes": ["local-cli"],
|
|
2010
|
+
"defaultTransportMode": "local-cli",
|
|
2011
|
+
"defaultStreamingMode": "stream"
|
|
1970
2012
|
},
|
|
1971
2013
|
{
|
|
1972
2014
|
"id": "augment",
|
|
@@ -2931,7 +2973,7 @@ function resolveConversationPolicyFromModelSelection(input) {
|
|
|
2931
2973
|
conversationPolicy: {}
|
|
2932
2974
|
};
|
|
2933
2975
|
if (!selection) {
|
|
2934
|
-
if (parsedRef.kind === "builtin" && parsedRef.id === "codex" && normalizeOptionalText$
|
|
2976
|
+
if (parsedRef.kind === "builtin" && parsedRef.id === "codex" && normalizeOptionalText$51(input.agentControllerConversationId)) return {
|
|
2935
2977
|
status: "accepted",
|
|
2936
2978
|
conversationPolicy: {}
|
|
2937
2979
|
};
|
|
@@ -2955,7 +2997,7 @@ function resolveConversationPolicyFromModelSelection(input) {
|
|
|
2955
2997
|
}
|
|
2956
2998
|
};
|
|
2957
2999
|
}
|
|
2958
|
-
function normalizeOptionalText$
|
|
3000
|
+
function normalizeOptionalText$51(value) {
|
|
2959
3001
|
const normalized = String(value ?? "").trim();
|
|
2960
3002
|
return normalized.length > 0 ? normalized : null;
|
|
2961
3003
|
}
|
|
@@ -3982,8 +4024,8 @@ var CliDriverError = class extends Error {
|
|
|
3982
4024
|
async function runCliDriver(input) {
|
|
3983
4025
|
const args = [...input.args];
|
|
3984
4026
|
const timeoutMs = normalizeTimeoutMs(input.timeoutMs);
|
|
3985
|
-
const binary = normalizeRequiredText(input.bin, "bin");
|
|
3986
|
-
const cwd = normalizeRequiredText(input.cwd, "cwd");
|
|
4027
|
+
const binary = normalizeRequiredText$1(input.bin, "bin");
|
|
4028
|
+
const cwd = normalizeRequiredText$1(input.cwd, "cwd");
|
|
3987
4029
|
return await new Promise((resolve, reject) => {
|
|
3988
4030
|
const runtimeProcess = spawnAgentControllerProcess({
|
|
3989
4031
|
args,
|
|
@@ -4218,7 +4260,7 @@ const resolveCliDriverCloseFailure = (input) => {
|
|
|
4218
4260
|
stdoutText: input.stdoutText
|
|
4219
4261
|
});
|
|
4220
4262
|
};
|
|
4221
|
-
const normalizeRequiredText = (value, field) => {
|
|
4263
|
+
const normalizeRequiredText$1 = (value, field) => {
|
|
4222
4264
|
const normalized = value.trim();
|
|
4223
4265
|
if (!normalized) throw new CliDriverError({
|
|
4224
4266
|
code: "input.invalid",
|
|
@@ -4274,8 +4316,8 @@ const MACOS_TEMP_FOLDER_RE = /^\/var\/folders\/[^/]+\/[^/]+\/t(?:\/|$)/u;
|
|
|
4274
4316
|
const WRAPPER_PATH_SEGMENT_RE = /(?:^|[-_.])(?:shim|shims|wrapper|wrappers)(?:$|[-_.])/u;
|
|
4275
4317
|
const MAX_LAUNCH_SCRIPT_INSPECTION_BYTES = 64 * 1024;
|
|
4276
4318
|
const DEFAULT_LOGIN_SHELL_LOOKUP_TIMEOUT_MS = 1500;
|
|
4277
|
-
const HOME_DIR = normalizeOptionalText$
|
|
4278
|
-
const TEMP_DIR = normalizeOptionalText$
|
|
4319
|
+
const HOME_DIR = normalizeOptionalText$50(homedir());
|
|
4320
|
+
const TEMP_DIR = normalizeOptionalText$50(tmpdir());
|
|
4279
4321
|
const loginShellExecutablePathsCache = /* @__PURE__ */ new Map();
|
|
4280
4322
|
function buildExecutableLaunchContract(input) {
|
|
4281
4323
|
return {
|
|
@@ -4323,7 +4365,7 @@ async function verifyLaunchContractFiles(input) {
|
|
|
4323
4365
|
};
|
|
4324
4366
|
} catch (error) {
|
|
4325
4367
|
return {
|
|
4326
|
-
errorMessage: toErrorMessage$
|
|
4368
|
+
errorMessage: toErrorMessage$19(error),
|
|
4327
4369
|
failureKind: "completed_negative",
|
|
4328
4370
|
ok: false
|
|
4329
4371
|
};
|
|
@@ -4352,7 +4394,7 @@ async function verifyCliLaunchContract(input) {
|
|
|
4352
4394
|
return fileCheck;
|
|
4353
4395
|
} catch (error) {
|
|
4354
4396
|
return {
|
|
4355
|
-
errorMessage: `${input.displayName} can't start on this device: ${toErrorMessage$
|
|
4397
|
+
errorMessage: `${input.displayName} can't start on this device: ${toErrorMessage$19(error)}`,
|
|
4356
4398
|
failureKind: classifyLaunchContractVerificationFailure(error),
|
|
4357
4399
|
ok: false
|
|
4358
4400
|
};
|
|
@@ -4468,7 +4510,7 @@ async function inspectInstalledNodeScriptLaunchCandidate(input) {
|
|
|
4468
4510
|
};
|
|
4469
4511
|
} catch (error) {
|
|
4470
4512
|
return {
|
|
4471
|
-
errorMessage: `${input.displayName} is installed, but OpenMeld could not inspect its launch files: ${toErrorMessage$
|
|
4513
|
+
errorMessage: `${input.displayName} is installed, but OpenMeld could not inspect its launch files: ${toErrorMessage$19(error)}`,
|
|
4472
4514
|
ok: false
|
|
4473
4515
|
};
|
|
4474
4516
|
}
|
|
@@ -4477,7 +4519,7 @@ function resolveInstalledCommandPath(input) {
|
|
|
4477
4519
|
return resolveInstalledCommandPaths(input)[0] ?? null;
|
|
4478
4520
|
}
|
|
4479
4521
|
function resolveInstalledCommandPaths(input) {
|
|
4480
|
-
const configuredCommand = normalizeOptionalText$
|
|
4522
|
+
const configuredCommand = normalizeOptionalText$50(input.configuredCommand);
|
|
4481
4523
|
if (configuredCommand) {
|
|
4482
4524
|
if (isAbsolute(configuredCommand)) return [configuredCommand];
|
|
4483
4525
|
if (configuredCommand.includes("/") || configuredCommand.includes("\\")) return [];
|
|
@@ -4486,9 +4528,9 @@ function resolveInstalledCommandPaths(input) {
|
|
|
4486
4528
|
return resolveExecutablePathsOnPath(input.commandName);
|
|
4487
4529
|
}
|
|
4488
4530
|
async function resolveInstalledCommandPathsForLaunch(input) {
|
|
4489
|
-
const preferredCommandPath = normalizeOptionalText$
|
|
4531
|
+
const preferredCommandPath = normalizeOptionalText$50(input.preferredCommandPath);
|
|
4490
4532
|
const preferredCommandPaths = preferredCommandPath && isAbsolute(preferredCommandPath) ? [preferredCommandPath] : [];
|
|
4491
|
-
const configuredCommand = normalizeOptionalText$
|
|
4533
|
+
const configuredCommand = normalizeOptionalText$50(input.configuredCommand);
|
|
4492
4534
|
if (configuredCommand) {
|
|
4493
4535
|
if (isAbsolute(configuredCommand)) return mergeUniquePaths(preferredCommandPaths, [configuredCommand]);
|
|
4494
4536
|
if (configuredCommand.includes("/") || configuredCommand.includes("\\")) return preferredCommandPaths;
|
|
@@ -4506,7 +4548,7 @@ function resolveExecutableOnPath(commandName) {
|
|
|
4506
4548
|
return resolveExecutablePathsOnPath(commandName)[0] ?? null;
|
|
4507
4549
|
}
|
|
4508
4550
|
function resolveExecutablePathsOnPath(commandName) {
|
|
4509
|
-
const normalizedCommandName = normalizeOptionalText$
|
|
4551
|
+
const normalizedCommandName = normalizeOptionalText$50(commandName);
|
|
4510
4552
|
if (!normalizedCommandName) return [];
|
|
4511
4553
|
const resolvedPaths = [];
|
|
4512
4554
|
for (const directory of resolvePathDirectories()) for (const candidateName of resolveCommandFileNameCandidates(normalizedCommandName)) {
|
|
@@ -4528,7 +4570,7 @@ async function resolveExecutablePathsFromSearchSurface(input) {
|
|
|
4528
4570
|
}
|
|
4529
4571
|
function resolvePathDirectories() {
|
|
4530
4572
|
const directories = [];
|
|
4531
|
-
const pathValue = normalizeOptionalText$
|
|
4573
|
+
const pathValue = normalizeOptionalText$50(process.env.PATH);
|
|
4532
4574
|
for (const pathEntry of pathValue?.split(delimiter) ?? []) addUniqueDirectory(directories, pathEntry);
|
|
4533
4575
|
return directories;
|
|
4534
4576
|
}
|
|
@@ -4539,7 +4581,7 @@ function resolveExecutablePathsFromKnownInstallDirectories(commandName) {
|
|
|
4539
4581
|
});
|
|
4540
4582
|
}
|
|
4541
4583
|
function resolveExecutablePathsFromDirectories(input) {
|
|
4542
|
-
const normalizedCommandName = normalizeOptionalText$
|
|
4584
|
+
const normalizedCommandName = normalizeOptionalText$50(input.commandName);
|
|
4543
4585
|
if (!normalizedCommandName) return [];
|
|
4544
4586
|
const resolvedPaths = [];
|
|
4545
4587
|
for (const directory of input.directories) for (const candidateName of resolveCommandFileNameCandidates(normalizedCommandName)) {
|
|
@@ -4552,12 +4594,12 @@ function resolveKnownInstallDirectories() {
|
|
|
4552
4594
|
const directories = [];
|
|
4553
4595
|
if (process.platform === "win32") return directories;
|
|
4554
4596
|
const home = resolveHomeDirectory();
|
|
4555
|
-
const nvmDir = normalizeOptionalText$
|
|
4556
|
-
const pnpmHome = normalizeOptionalText$
|
|
4557
|
-
const bunHome = normalizeOptionalText$
|
|
4558
|
-
const voltaHome = normalizeOptionalText$
|
|
4559
|
-
const asdfHome = normalizeOptionalText$
|
|
4560
|
-
const fnmHome = normalizeOptionalText$
|
|
4597
|
+
const nvmDir = normalizeOptionalText$50(process.env.NVM_DIR) ?? join(home, ".nvm");
|
|
4598
|
+
const pnpmHome = normalizeOptionalText$50(process.env.PNPM_HOME) ?? (process.platform === "darwin" ? join(home, "Library", "pnpm") : join(home, ".local", "share", "pnpm"));
|
|
4599
|
+
const bunHome = normalizeOptionalText$50(process.env.BUN_INSTALL) ?? join(home, ".bun");
|
|
4600
|
+
const voltaHome = normalizeOptionalText$50(process.env.VOLTA_HOME) ?? join(home, ".volta");
|
|
4601
|
+
const asdfHome = normalizeOptionalText$50(process.env.ASDF_DIR) ?? join(home, ".asdf");
|
|
4602
|
+
const fnmHome = normalizeOptionalText$50(process.env.FNM_DIR) ?? join(home, ".fnm");
|
|
4561
4603
|
addUniqueDirectory(directories, join(home, ".local", "bin"));
|
|
4562
4604
|
addUniqueDirectory(directories, "/usr/local/bin");
|
|
4563
4605
|
addUniqueDirectory(directories, "/opt/homebrew/bin");
|
|
@@ -4572,18 +4614,18 @@ function resolveKnownInstallDirectories() {
|
|
|
4572
4614
|
addUniqueDirectory(directories, join(home, ".local", "share", "fnm", "aliases", "default", "bin"));
|
|
4573
4615
|
addUniqueDirectory(directories, join(home, ".local", "share", "fnm", "current", "bin"));
|
|
4574
4616
|
for (const nvmBinDir of resolveNvmDefaultBinDirectories(nvmDir)) addUniqueDirectory(directories, nvmBinDir);
|
|
4575
|
-
const npmConfigPrefix = normalizeOptionalText$
|
|
4617
|
+
const npmConfigPrefix = normalizeOptionalText$50(process.env.NPM_CONFIG_PREFIX);
|
|
4576
4618
|
if (npmConfigPrefix) addUniqueDirectory(directories, join(npmConfigPrefix, "bin"));
|
|
4577
4619
|
return directories;
|
|
4578
4620
|
}
|
|
4579
4621
|
function addUniqueDirectory(directories, value) {
|
|
4580
|
-
const directory = normalizeOptionalText$
|
|
4622
|
+
const directory = normalizeOptionalText$50(value);
|
|
4581
4623
|
if (directory && !directories.includes(directory)) directories.push(directory);
|
|
4582
4624
|
}
|
|
4583
4625
|
async function resolveExecutablePathsFromLoginShell(commandName) {
|
|
4584
|
-
const normalizedCommandName = normalizeOptionalText$
|
|
4626
|
+
const normalizedCommandName = normalizeOptionalText$50(commandName);
|
|
4585
4627
|
if (!(normalizedCommandName && process.platform !== "win32")) return [];
|
|
4586
|
-
const shell = normalizeOptionalText$
|
|
4628
|
+
const shell = normalizeOptionalText$50(process.env.SHELL);
|
|
4587
4629
|
if (!(shell && isAbsolute(shell) && pathLooksExecutable(shell))) return [];
|
|
4588
4630
|
const cacheKey = [
|
|
4589
4631
|
shell,
|
|
@@ -4636,7 +4678,7 @@ async function runLoginShellExecutableLookup(input) {
|
|
|
4636
4678
|
finish([]);
|
|
4637
4679
|
return;
|
|
4638
4680
|
}
|
|
4639
|
-
finish(stdout.split(LOGIN_SHELL_OUTPUT_LINE_SPLIT_RE).map((line) => normalizeOptionalText$
|
|
4681
|
+
finish(stdout.split(LOGIN_SHELL_OUTPUT_LINE_SPLIT_RE).map((line) => normalizeOptionalText$50(line)).filter((line) => Boolean(line && isAbsolute(line) && pathLooksExecutable(line))));
|
|
4640
4682
|
});
|
|
4641
4683
|
});
|
|
4642
4684
|
}
|
|
@@ -4649,7 +4691,7 @@ function resolveNvmDefaultVersion(nvmDir) {
|
|
|
4649
4691
|
let value = readNvmAlias(nvmDir, "default");
|
|
4650
4692
|
const seenAliases = /* @__PURE__ */ new Set();
|
|
4651
4693
|
for (let depth = 0; depth < 4; depth += 1) {
|
|
4652
|
-
const normalizedValue = normalizeOptionalText$
|
|
4694
|
+
const normalizedValue = normalizeOptionalText$50(value);
|
|
4653
4695
|
if (!normalizedValue) return null;
|
|
4654
4696
|
if (isNvmVersionValue(normalizedValue)) return normalizedValue.startsWith("v") ? normalizedValue : `v${normalizedValue}`;
|
|
4655
4697
|
if (seenAliases.has(normalizedValue)) return null;
|
|
@@ -4660,7 +4702,7 @@ function resolveNvmDefaultVersion(nvmDir) {
|
|
|
4660
4702
|
}
|
|
4661
4703
|
function readNvmAlias(nvmDir, alias) {
|
|
4662
4704
|
try {
|
|
4663
|
-
return normalizeOptionalText$
|
|
4705
|
+
return normalizeOptionalText$50(readFileSync(join(nvmDir, "alias", alias), "utf8"));
|
|
4664
4706
|
} catch {
|
|
4665
4707
|
return null;
|
|
4666
4708
|
}
|
|
@@ -4669,10 +4711,10 @@ function isNvmVersionValue(value) {
|
|
|
4669
4711
|
return NVM_VERSION_VALUE_RE.test(value);
|
|
4670
4712
|
}
|
|
4671
4713
|
function resolveHomeDirectory() {
|
|
4672
|
-
return normalizeOptionalText$
|
|
4714
|
+
return normalizeOptionalText$50(process.env.HOME) ?? homedir();
|
|
4673
4715
|
}
|
|
4674
4716
|
function resolveLoginShellLookupTimeoutMs() {
|
|
4675
|
-
const raw = normalizeOptionalText$
|
|
4717
|
+
const raw = normalizeOptionalText$50(process.env.OPENMELD_EXECUTABLE_LOGIN_SHELL_TIMEOUT_MS);
|
|
4676
4718
|
if (!raw) return DEFAULT_LOGIN_SHELL_LOOKUP_TIMEOUT_MS;
|
|
4677
4719
|
const parsed = Number.parseInt(raw, 10);
|
|
4678
4720
|
return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_LOGIN_SHELL_LOOKUP_TIMEOUT_MS;
|
|
@@ -4687,7 +4729,7 @@ function quotePosixShellToken$1(value) {
|
|
|
4687
4729
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
4688
4730
|
}
|
|
4689
4731
|
function resolveSiblingCommandPath(input) {
|
|
4690
|
-
const normalizedCommandName = normalizeOptionalText$
|
|
4732
|
+
const normalizedCommandName = normalizeOptionalText$50(input.commandName);
|
|
4691
4733
|
if (!normalizedCommandName) return null;
|
|
4692
4734
|
const siblingDirectory = dirname(input.anchorPath);
|
|
4693
4735
|
for (const candidateName of resolveCommandFileNameCandidates(normalizedCommandName)) {
|
|
@@ -4697,7 +4739,7 @@ function resolveSiblingCommandPath(input) {
|
|
|
4697
4739
|
return null;
|
|
4698
4740
|
}
|
|
4699
4741
|
async function resolvePinnedNodePath(input) {
|
|
4700
|
-
const firstLine = normalizeOptionalText$
|
|
4742
|
+
const firstLine = normalizeOptionalText$50(input.firstLine);
|
|
4701
4743
|
if (!firstLine) return null;
|
|
4702
4744
|
if (firstLine === ENV_NODE_SHEBANG) {
|
|
4703
4745
|
const nodeSiblings = [join(dirname(input.commandPath), "node"), join(dirname(input.scriptPath), "node")].filter((candidate, index, candidates) => {
|
|
@@ -4707,7 +4749,7 @@ async function resolvePinnedNodePath(input) {
|
|
|
4707
4749
|
return null;
|
|
4708
4750
|
}
|
|
4709
4751
|
if (!firstLine.startsWith("#!")) return null;
|
|
4710
|
-
const interpreter = normalizeOptionalText$
|
|
4752
|
+
const interpreter = normalizeOptionalText$50(firstLine.slice(2));
|
|
4711
4753
|
if (!(interpreter && isAbsolute(interpreter))) return null;
|
|
4712
4754
|
const normalizedInterpreter = interpreter.split(SHEBANG_ARGS_SPLIT_RE, 1)[0] ?? interpreter;
|
|
4713
4755
|
try {
|
|
@@ -4755,11 +4797,11 @@ function resolveRunnablePathAccessMode() {
|
|
|
4755
4797
|
return process.platform === "win32" ? constants.F_OK : constants.X_OK;
|
|
4756
4798
|
}
|
|
4757
4799
|
function resolveWindowsPathExtensions(value) {
|
|
4758
|
-
const normalized = normalizeOptionalText$
|
|
4800
|
+
const normalized = normalizeOptionalText$50(value);
|
|
4759
4801
|
if (!normalized) return [...WINDOWS_PATHEXT];
|
|
4760
4802
|
return normalized.split(";").map((entry) => entry.trim().toLowerCase()).filter((entry, index, values) => entry && values.indexOf(entry) === index).map((entry) => entry.startsWith(".") ? entry : `.${entry}`);
|
|
4761
4803
|
}
|
|
4762
|
-
function normalizeOptionalText$
|
|
4804
|
+
function normalizeOptionalText$50(value) {
|
|
4763
4805
|
const normalized = String(value ?? "").trim();
|
|
4764
4806
|
return normalized.length > 0 ? normalized : null;
|
|
4765
4807
|
}
|
|
@@ -4853,7 +4895,7 @@ function shortenPathForDisplay(path) {
|
|
|
4853
4895
|
return `~${path.slice(HOME_DIR.length)}`;
|
|
4854
4896
|
}
|
|
4855
4897
|
function resolveNodeVersionFromPath(path) {
|
|
4856
|
-
return normalizeOptionalText$
|
|
4898
|
+
return normalizeOptionalText$50(path.match(NODE_VERSION_PATH_RE)?.[1]);
|
|
4857
4899
|
}
|
|
4858
4900
|
async function readLaunchScriptInspection(path) {
|
|
4859
4901
|
const file = await open(path, "r");
|
|
@@ -4868,7 +4910,7 @@ async function readLaunchScriptInspection(path) {
|
|
|
4868
4910
|
const firstLine = contents.split(FIRST_LINE_SPLIT_RE, 1)[0] ?? "";
|
|
4869
4911
|
return {
|
|
4870
4912
|
contents,
|
|
4871
|
-
firstLine: normalizeOptionalText$
|
|
4913
|
+
firstLine: normalizeOptionalText$50(firstLine)
|
|
4872
4914
|
};
|
|
4873
4915
|
}
|
|
4874
4916
|
function isTransientPathWrapper(input) {
|
|
@@ -4885,7 +4927,7 @@ function hasWrapperPathSegment(path) {
|
|
|
4885
4927
|
return normalizePathForDetection(path).split("/").filter((segment) => segment.length > 0).slice(-4).some((segment) => WRAPPER_PATH_SEGMENT_RE.test(segment));
|
|
4886
4928
|
}
|
|
4887
4929
|
function shellScriptLooksLikeWrapper(input) {
|
|
4888
|
-
const firstLine = normalizeOptionalText$
|
|
4930
|
+
const firstLine = normalizeOptionalText$50(input.firstLine)?.toLowerCase() ?? "";
|
|
4889
4931
|
if (!(firstLine.includes("bash") || firstLine.includes("/sh") || firstLine.includes("zsh"))) return false;
|
|
4890
4932
|
const contents = input.contents.toLowerCase();
|
|
4891
4933
|
return contents.includes("wrapper_shim") || contents.includes("shim_root") || contents.includes("\nexec ") && (contents.includes("wrapper") || contents.includes("shim"));
|
|
@@ -4896,7 +4938,7 @@ function normalizePathForDetection(path) {
|
|
|
4896
4938
|
function pathIsEqualOrDescendant(path, parentPath) {
|
|
4897
4939
|
return path === parentPath || path.startsWith(`${parentPath}/`);
|
|
4898
4940
|
}
|
|
4899
|
-
function toErrorMessage$
|
|
4941
|
+
function toErrorMessage$19(error) {
|
|
4900
4942
|
return error instanceof Error ? error.message : String(error);
|
|
4901
4943
|
}
|
|
4902
4944
|
//#endregion
|
|
@@ -5174,7 +5216,7 @@ var AcpProcessSession = class {
|
|
|
5174
5216
|
cause: error,
|
|
5175
5217
|
code: "protocol.invalid",
|
|
5176
5218
|
errorType: "adapter",
|
|
5177
|
-
message: `protocol.invalid: ${this.#processLabel} ACP emitted non-JSON-RPC output (${toErrorMessage$
|
|
5219
|
+
message: `protocol.invalid: ${this.#processLabel} ACP emitted non-JSON-RPC output (${toErrorMessage$18(error)})`
|
|
5178
5220
|
}));
|
|
5179
5221
|
return;
|
|
5180
5222
|
}
|
|
@@ -5254,7 +5296,7 @@ var AcpProcessSession = class {
|
|
|
5254
5296
|
let code = "protocol.request_failed";
|
|
5255
5297
|
if (error.code === -32601) code = "protocol.method_not_found";
|
|
5256
5298
|
else if (error.code === -32602) code = "protocol.invalid_params";
|
|
5257
|
-
const message = normalizeOptionalText$
|
|
5299
|
+
const message = normalizeOptionalText$49(error.message) ?? "ACP request failed";
|
|
5258
5300
|
return this.#error({
|
|
5259
5301
|
code,
|
|
5260
5302
|
errorType: "adapter",
|
|
@@ -5332,11 +5374,11 @@ var AcpProcessSession = class {
|
|
|
5332
5374
|
return this.#createError(input);
|
|
5333
5375
|
}
|
|
5334
5376
|
};
|
|
5335
|
-
function normalizeOptionalText$
|
|
5377
|
+
function normalizeOptionalText$49(value) {
|
|
5336
5378
|
const normalized = String(value ?? "").trim();
|
|
5337
5379
|
return normalized.length > 0 ? normalized : null;
|
|
5338
5380
|
}
|
|
5339
|
-
function toErrorMessage$
|
|
5381
|
+
function toErrorMessage$18(error) {
|
|
5340
5382
|
return error instanceof Error ? error.message : String(error);
|
|
5341
5383
|
}
|
|
5342
5384
|
//#endregion
|
|
@@ -5452,7 +5494,7 @@ function resolveFileWorkActivity(input, operation) {
|
|
|
5452
5494
|
};
|
|
5453
5495
|
}
|
|
5454
5496
|
function readCommand(value) {
|
|
5455
|
-
const command = toRecord$
|
|
5497
|
+
const command = toRecord$16(value)?.command;
|
|
5456
5498
|
if (typeof command === "string" && command.trim().length > 0) return command;
|
|
5457
5499
|
if (Array.isArray(command)) {
|
|
5458
5500
|
const joined = command.filter((part) => typeof part === "string").join(" ").trim();
|
|
@@ -5461,14 +5503,14 @@ function readCommand(value) {
|
|
|
5461
5503
|
return null;
|
|
5462
5504
|
}
|
|
5463
5505
|
function readFilePath$1(value) {
|
|
5464
|
-
const record = toRecord$
|
|
5506
|
+
const record = toRecord$16(value);
|
|
5465
5507
|
for (const candidate of [
|
|
5466
5508
|
record?.file_path,
|
|
5467
5509
|
record?.filePath,
|
|
5468
5510
|
record?.path
|
|
5469
5511
|
]) if (typeof candidate === "string" && candidate.trim().length > 0) return candidate.trim();
|
|
5470
5512
|
if (Array.isArray(record?.changes)) for (const change of record.changes) {
|
|
5471
|
-
const path = toRecord$
|
|
5513
|
+
const path = toRecord$16(change)?.path;
|
|
5472
5514
|
if (typeof path === "string" && path.trim().length > 0) return path.trim();
|
|
5473
5515
|
}
|
|
5474
5516
|
return null;
|
|
@@ -5476,7 +5518,7 @@ function readFilePath$1(value) {
|
|
|
5476
5518
|
function normalizeProviderToolName(value) {
|
|
5477
5519
|
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
5478
5520
|
}
|
|
5479
|
-
function toRecord$
|
|
5521
|
+
function toRecord$16(value) {
|
|
5480
5522
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
5481
5523
|
}
|
|
5482
5524
|
//#endregion
|
|
@@ -5520,22 +5562,22 @@ function createAcpToolActivityTracker() {
|
|
|
5520
5562
|
} };
|
|
5521
5563
|
}
|
|
5522
5564
|
function extractAcpToolActivityObservation(value) {
|
|
5523
|
-
const message = toRecord$
|
|
5565
|
+
const message = toRecord$15(value);
|
|
5524
5566
|
if (message?.method !== "session/update") return null;
|
|
5525
|
-
const params = toRecord$
|
|
5526
|
-
const update = toRecord$
|
|
5527
|
-
const updateType = normalizeOptionalText$
|
|
5567
|
+
const params = toRecord$15(message.params);
|
|
5568
|
+
const update = toRecord$15(params?.update);
|
|
5569
|
+
const updateType = normalizeOptionalText$48(update?.sessionUpdate);
|
|
5528
5570
|
if (!(update && (updateType === "tool_call" || updateType === "tool_call_update"))) return null;
|
|
5529
|
-
const toolCallId = normalizeOptionalText$
|
|
5571
|
+
const toolCallId = normalizeOptionalText$48(update.toolCallId ?? update.tool_call_id);
|
|
5530
5572
|
if (!toolCallId) return null;
|
|
5531
|
-
const sessionId = normalizeOptionalText$
|
|
5573
|
+
const sessionId = normalizeOptionalText$48(params?.sessionId);
|
|
5532
5574
|
return {
|
|
5533
5575
|
...Object.hasOwn(update, "rawInput") ? { providerInput: update.rawInput } : {},
|
|
5534
|
-
providerKind: normalizeOptionalText$
|
|
5576
|
+
providerKind: normalizeOptionalText$48(update.kind),
|
|
5535
5577
|
...Object.hasOwn(update, "locations") ? { providerLocations: update.locations } : {},
|
|
5536
|
-
providerTitle: normalizeOptionalText$
|
|
5578
|
+
providerTitle: normalizeOptionalText$48(update.title ?? update.name),
|
|
5537
5579
|
scopedToolCallId: sessionId ? `${sessionId}\0${toolCallId}` : toolCallId,
|
|
5538
|
-
status: normalizeOptionalText$
|
|
5580
|
+
status: normalizeOptionalText$48(update.status)?.toLowerCase() ?? null,
|
|
5539
5581
|
toolCallId
|
|
5540
5582
|
};
|
|
5541
5583
|
}
|
|
@@ -5563,7 +5605,7 @@ function resolveAcpToolWorkActivity(input) {
|
|
|
5563
5605
|
return resolveAdapterToolWorkActivity(input.providerToolName, input.providerInput);
|
|
5564
5606
|
}
|
|
5565
5607
|
function resolveAcpFileEvidenceInput(input) {
|
|
5566
|
-
const providerInput = toRecord$
|
|
5608
|
+
const providerInput = toRecord$15(input.providerInput);
|
|
5567
5609
|
if (providerInput && readFilePath(providerInput)) return providerInput;
|
|
5568
5610
|
const locationPath = readLocationPath(input.providerLocations);
|
|
5569
5611
|
if (!locationPath) return null;
|
|
@@ -5578,11 +5620,11 @@ function readFilePath(value) {
|
|
|
5578
5620
|
value.filePath,
|
|
5579
5621
|
value.path
|
|
5580
5622
|
]) {
|
|
5581
|
-
const path = normalizeOptionalText$
|
|
5623
|
+
const path = normalizeOptionalText$48(candidate);
|
|
5582
5624
|
if (path) return path;
|
|
5583
5625
|
}
|
|
5584
5626
|
if (Array.isArray(value.changes)) for (const change of value.changes) {
|
|
5585
|
-
const path = normalizeOptionalText$
|
|
5627
|
+
const path = normalizeOptionalText$48(toRecord$15(change)?.path);
|
|
5586
5628
|
if (path) return path;
|
|
5587
5629
|
}
|
|
5588
5630
|
return null;
|
|
@@ -5590,15 +5632,15 @@ function readFilePath(value) {
|
|
|
5590
5632
|
function readLocationPath(value) {
|
|
5591
5633
|
if (!Array.isArray(value)) return null;
|
|
5592
5634
|
for (const location of value) {
|
|
5593
|
-
const path = normalizeOptionalText$
|
|
5635
|
+
const path = normalizeOptionalText$48(toRecord$15(location)?.path);
|
|
5594
5636
|
if (path) return path;
|
|
5595
5637
|
}
|
|
5596
5638
|
return null;
|
|
5597
5639
|
}
|
|
5598
5640
|
function mergeProviderPatch(current, patch) {
|
|
5599
5641
|
if (patch === void 0 || patch === null) return current;
|
|
5600
|
-
const currentRecord = toRecord$
|
|
5601
|
-
const patchRecord = toRecord$
|
|
5642
|
+
const currentRecord = toRecord$15(current);
|
|
5643
|
+
const patchRecord = toRecord$15(patch);
|
|
5602
5644
|
if (currentRecord && patchRecord) return {
|
|
5603
5645
|
...currentRecord,
|
|
5604
5646
|
...patchRecord
|
|
@@ -5611,11 +5653,11 @@ function resolveToolActivityState$1(current, status) {
|
|
|
5611
5653
|
if (status === "completed") return "output-available";
|
|
5612
5654
|
return "input-available";
|
|
5613
5655
|
}
|
|
5614
|
-
function normalizeOptionalText$
|
|
5656
|
+
function normalizeOptionalText$48(value) {
|
|
5615
5657
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
5616
5658
|
return normalized.length > 0 ? normalized : null;
|
|
5617
5659
|
}
|
|
5618
|
-
function toRecord$
|
|
5660
|
+
function toRecord$15(value) {
|
|
5619
5661
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
5620
5662
|
}
|
|
5621
5663
|
//#endregion
|
|
@@ -5698,10 +5740,10 @@ const OPENMELD_CLI_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
5698
5740
|
"openmeld-canary"
|
|
5699
5741
|
]);
|
|
5700
5742
|
function resolveDispatchSpaceActionMcpServer(env) {
|
|
5701
|
-
if (!normalizeOptionalText$
|
|
5702
|
-
const command = normalizeOptionalText$
|
|
5743
|
+
if (!normalizeOptionalText$47(env?.[SPACE_ACTION_CONTEXT_PATH_ENV])) return null;
|
|
5744
|
+
const command = normalizeOptionalText$47(env?.[USER_FACING_CLI_COMMAND_ENV]);
|
|
5703
5745
|
if (!(command && OPENMELD_CLI_COMMANDS.has(command))) throw new Error("OpenMeld cannot start the dispatch Space Action tool because the active CLI command is invalid.");
|
|
5704
|
-
const commandPath = normalizeOptionalText$
|
|
5746
|
+
const commandPath = normalizeOptionalText$47(env?.[SPACE_ACTION_TOOL_COMMAND_PATH_ENV]);
|
|
5705
5747
|
if (!(commandPath && isAbsolute(commandPath) && basename(commandPath) === command)) throw new Error("OpenMeld cannot start the dispatch Space Action tool because its dispatch-owned CLI path is invalid.");
|
|
5706
5748
|
return {
|
|
5707
5749
|
args: [
|
|
@@ -5712,7 +5754,7 @@ function resolveDispatchSpaceActionMcpServer(env) {
|
|
|
5712
5754
|
command,
|
|
5713
5755
|
commandPath,
|
|
5714
5756
|
env: Object.fromEntries(FORWARDED_ENV_NAMES.flatMap((name) => {
|
|
5715
|
-
const value = normalizeOptionalText$
|
|
5757
|
+
const value = normalizeOptionalText$47(env?.[name]);
|
|
5716
5758
|
return value ? [[name, value]] : [];
|
|
5717
5759
|
})),
|
|
5718
5760
|
id: OPENMELD_SPACE_ACTION_MCP_SERVER_ID,
|
|
@@ -5735,7 +5777,7 @@ function buildAcpDispatchSpaceActionMcpServers(env) {
|
|
|
5735
5777
|
name: config.id
|
|
5736
5778
|
}];
|
|
5737
5779
|
}
|
|
5738
|
-
function normalizeOptionalText$
|
|
5780
|
+
function normalizeOptionalText$47(value) {
|
|
5739
5781
|
const normalized = String(value ?? "").trim();
|
|
5740
5782
|
return normalized.length > 0 ? normalized : null;
|
|
5741
5783
|
}
|
|
@@ -5781,9 +5823,9 @@ const buildProviderExitError = (input) => {
|
|
|
5781
5823
|
};
|
|
5782
5824
|
};
|
|
5783
5825
|
const hasVisibleText = (value) => {
|
|
5784
|
-
return normalizeOptionalText$
|
|
5826
|
+
return normalizeOptionalText$46(value) !== null;
|
|
5785
5827
|
};
|
|
5786
|
-
const normalizeOptionalText$
|
|
5828
|
+
const normalizeOptionalText$46 = (value) => {
|
|
5787
5829
|
if (typeof value !== "string") return null;
|
|
5788
5830
|
const normalized = value.trim();
|
|
5789
5831
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -5820,6 +5862,11 @@ function readRuntimePermissionDenialDetails(value) {
|
|
|
5820
5862
|
const normalizedMessage = normalizeRuntimePermissionMessage(value);
|
|
5821
5863
|
if (!normalizedMessage) return null;
|
|
5822
5864
|
const lowered = normalizedMessage.toLowerCase();
|
|
5865
|
+
if (isAntigravityPermissionDenial(lowered)) return {
|
|
5866
|
+
normalizedMessage,
|
|
5867
|
+
permissionKind: readAntigravityPermissionKind(lowered),
|
|
5868
|
+
source: "antigravity"
|
|
5869
|
+
};
|
|
5823
5870
|
if (isOpenCodePermissionDenial(lowered)) return {
|
|
5824
5871
|
normalizedMessage,
|
|
5825
5872
|
permissionKind: readOpenCodePermissionKind(normalizedMessage),
|
|
@@ -5842,6 +5889,14 @@ function readRuntimePermissionDenialDetails(value) {
|
|
|
5842
5889
|
};
|
|
5843
5890
|
return null;
|
|
5844
5891
|
}
|
|
5892
|
+
function isAntigravityPermissionDenial(value) {
|
|
5893
|
+
return value.includes("permission check failed") || value.includes("user denied permission to run command") || value.includes("tool required the") && value.includes("permission") && value.includes("auto-denied");
|
|
5894
|
+
}
|
|
5895
|
+
function readAntigravityPermissionKind(value) {
|
|
5896
|
+
if (value.includes("command")) return "command";
|
|
5897
|
+
if (value.includes("mcp")) return "mcp";
|
|
5898
|
+
return "tool_use";
|
|
5899
|
+
}
|
|
5845
5900
|
function normalizeRuntimePermissionMessage(value) {
|
|
5846
5901
|
const normalized = String(value ?? "").replace(ANSI_ESCAPE_RE, "").trim();
|
|
5847
5902
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -5963,13 +6018,13 @@ var AdapterRepairConversationError = class extends Error {
|
|
|
5963
6018
|
};
|
|
5964
6019
|
const resolveRequiredRepairConversationId = (input) => {
|
|
5965
6020
|
if (input.policy !== "require_canonical" || input.request.executionMode !== "repair") return null;
|
|
5966
|
-
const canonicalConversationId = normalizeOptionalText$
|
|
6021
|
+
const canonicalConversationId = normalizeOptionalText$45(input.invokeRequest.agentControllerConversationId);
|
|
5967
6022
|
if (!canonicalConversationId) throw new AdapterRepairConversationMissingError();
|
|
5968
6023
|
return canonicalConversationId;
|
|
5969
6024
|
};
|
|
5970
6025
|
const requireCanonicalRepairConversation = (input) => {
|
|
5971
6026
|
if (!input.canonicalConversationId) return input.contextDelta;
|
|
5972
|
-
const observedConversationId = normalizeOptionalText$
|
|
6027
|
+
const observedConversationId = normalizeOptionalText$45(input.contextDelta?.agentControllerConversationId);
|
|
5973
6028
|
if (input.contextDelta?.refreshed === true || observedConversationId !== input.canonicalConversationId) throw new AdapterRepairConversationError();
|
|
5974
6029
|
return input.contextDelta;
|
|
5975
6030
|
};
|
|
@@ -6354,13 +6409,13 @@ const buildDefaultInvokeRequest = (input) => {
|
|
|
6354
6409
|
agentControllerConversationId: input.request.agentControllerConversationId,
|
|
6355
6410
|
bridgeSpec: input.bridgeSpec,
|
|
6356
6411
|
agentControllerConversation: input.request.agentControllerConversation
|
|
6357
|
-
}) : normalizeOptionalText$
|
|
6412
|
+
}) : normalizeOptionalText$45(input.request.agentControllerConversationId);
|
|
6358
6413
|
return {
|
|
6359
6414
|
...input.request,
|
|
6360
6415
|
agentControllerConversationId
|
|
6361
6416
|
};
|
|
6362
6417
|
};
|
|
6363
|
-
const normalizeOptionalText$
|
|
6418
|
+
const normalizeOptionalText$45 = (value) => {
|
|
6364
6419
|
if (typeof value !== "string") return null;
|
|
6365
6420
|
const normalized = value.trim();
|
|
6366
6421
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -7616,7 +7671,7 @@ const removeConversationExecutionState = (input) => {
|
|
|
7616
7671
|
return nextState;
|
|
7617
7672
|
};
|
|
7618
7673
|
const seedLegacyAgentContext = (input) => {
|
|
7619
|
-
const normalizedLegacyAgentControllerConversationId = normalizeOptionalText$
|
|
7674
|
+
const normalizedLegacyAgentControllerConversationId = normalizeOptionalText$44(input.legacyAgentControllerConversationId);
|
|
7620
7675
|
if (!normalizedLegacyAgentControllerConversationId) return input.state;
|
|
7621
7676
|
if (input.state.agentContextByLookupKey[input.agentContextLookupKey]) return input.state;
|
|
7622
7677
|
return upsertAgentContext({
|
|
@@ -7636,7 +7691,7 @@ const seedLegacyAgentContext = (input) => {
|
|
|
7636
7691
|
});
|
|
7637
7692
|
};
|
|
7638
7693
|
const commitResolvedAgentContext = (input) => {
|
|
7639
|
-
const normalizedAgentControllerConversationId = normalizeOptionalText$
|
|
7694
|
+
const normalizedAgentControllerConversationId = normalizeOptionalText$44(input.agentControllerConversationId);
|
|
7640
7695
|
if (!normalizedAgentControllerConversationId) return input.state;
|
|
7641
7696
|
const existing = input.state.agentContextByLookupKey[input.agentContextLookupKey] ?? null;
|
|
7642
7697
|
return upsertAgentContext({
|
|
@@ -7674,7 +7729,7 @@ const appendAgentContextRotationRecord = (input) => {
|
|
|
7674
7729
|
nextState.updatedAtMs = Date.now();
|
|
7675
7730
|
return nextState;
|
|
7676
7731
|
};
|
|
7677
|
-
function normalizeOptionalText$
|
|
7732
|
+
function normalizeOptionalText$44(value) {
|
|
7678
7733
|
if (typeof value !== "string") return null;
|
|
7679
7734
|
const normalized = value.trim();
|
|
7680
7735
|
return normalized.length > 0 ? normalized : null;
|
|
@@ -8573,6 +8628,786 @@ function emitStructuredReconcileEvidence(eventName, payload) {
|
|
|
8573
8628
|
});
|
|
8574
8629
|
}
|
|
8575
8630
|
//#endregion
|
|
8631
|
+
//#region ../../runtime/adapters/antigravity/dist/config/antigravity-runtime-config.js
|
|
8632
|
+
const DEFAULT_ANTIGRAVITY_COMMAND = "agy";
|
|
8633
|
+
async function resolveInstalledAntigravityLaunchCandidates(input) {
|
|
8634
|
+
const configuredCommand = normalizeOptionalText$43(process.env.OPENMELD_DAEMON_RUNTIME_ANTIGRAVITY_BIN);
|
|
8635
|
+
const installed = await resolveInstalledNodeScriptLaunchCandidates({
|
|
8636
|
+
additionalCommandDirectories: [join(resolveHome$1(), ".local", "bin")],
|
|
8637
|
+
commandName: DEFAULT_ANTIGRAVITY_COMMAND,
|
|
8638
|
+
configuredCommand,
|
|
8639
|
+
displayName: "Antigravity CLI",
|
|
8640
|
+
preferredLaunchContract: input?.preferredLaunchContract
|
|
8641
|
+
});
|
|
8642
|
+
if (!installed.ok) return installed;
|
|
8643
|
+
const candidates = await resolveLaunchCandidatesAfterVerification({
|
|
8644
|
+
candidates: installed.candidates,
|
|
8645
|
+
verify: async (candidate) => await verifyAntigravityLaunchContract({
|
|
8646
|
+
launchContract: candidate.launchContract,
|
|
8647
|
+
timeoutMs: input?.timeoutMs
|
|
8648
|
+
})
|
|
8649
|
+
});
|
|
8650
|
+
if (candidates.length === 0) return {
|
|
8651
|
+
errorMessage: "Antigravity CLI is installed, but OpenMeld can't start it on this device.",
|
|
8652
|
+
ok: false,
|
|
8653
|
+
reason: "not_launchable"
|
|
8654
|
+
};
|
|
8655
|
+
return {
|
|
8656
|
+
candidates,
|
|
8657
|
+
ok: true
|
|
8658
|
+
};
|
|
8659
|
+
}
|
|
8660
|
+
async function verifyAntigravityLaunchContract(input) {
|
|
8661
|
+
return await verifyCliLaunchContract({
|
|
8662
|
+
cwd: input.cwd ?? process.cwd(),
|
|
8663
|
+
displayName: "Antigravity CLI",
|
|
8664
|
+
env: {},
|
|
8665
|
+
launchContract: input.launchContract,
|
|
8666
|
+
probeArgs: ["--version"],
|
|
8667
|
+
timeoutMs: input.timeoutMs ?? 15e3
|
|
8668
|
+
});
|
|
8669
|
+
}
|
|
8670
|
+
function resolveHome$1() {
|
|
8671
|
+
return normalizeOptionalText$43(process.env.HOME) ?? homedir();
|
|
8672
|
+
}
|
|
8673
|
+
function normalizeOptionalText$43(value) {
|
|
8674
|
+
const normalized = String(value ?? "").trim();
|
|
8675
|
+
return normalized.length > 0 ? normalized : null;
|
|
8676
|
+
}
|
|
8677
|
+
//#endregion
|
|
8678
|
+
//#region ../../runtime/adapters/antigravity/dist/output/antigravity-output-parser.js
|
|
8679
|
+
function parseAntigravityOutputLine(line) {
|
|
8680
|
+
let value;
|
|
8681
|
+
try {
|
|
8682
|
+
value = JSON.parse(line);
|
|
8683
|
+
} catch {
|
|
8684
|
+
return null;
|
|
8685
|
+
}
|
|
8686
|
+
const record = toRecord$14(value);
|
|
8687
|
+
if (record?.event === "init") {
|
|
8688
|
+
const init = toRecord$14(record.init);
|
|
8689
|
+
const conversationId = readText(record.conversation_id);
|
|
8690
|
+
if (!(init && conversationId)) return null;
|
|
8691
|
+
return {
|
|
8692
|
+
event: "init",
|
|
8693
|
+
conversationId
|
|
8694
|
+
};
|
|
8695
|
+
}
|
|
8696
|
+
if (record?.event === "step_update") {
|
|
8697
|
+
const step = toRecord$14(record.step_update);
|
|
8698
|
+
const conversationId = readText(step?.conversation_id);
|
|
8699
|
+
const state = step?.state;
|
|
8700
|
+
const stepIndex = step?.step_index;
|
|
8701
|
+
const stepType = readText(step?.step_type);
|
|
8702
|
+
if (!conversationId || state !== "ACTIVE" && state !== "DONE" && state !== "ERROR" || typeof stepIndex !== "number" || !Number.isInteger(stepIndex) || !stepType) return null;
|
|
8703
|
+
const toolInfo = toRecord$14(step?.tool_info);
|
|
8704
|
+
const toolError = toRecord$14(toolInfo?.error);
|
|
8705
|
+
return {
|
|
8706
|
+
conversationId,
|
|
8707
|
+
event: "step_update",
|
|
8708
|
+
state,
|
|
8709
|
+
stepIndex,
|
|
8710
|
+
stepType,
|
|
8711
|
+
textDelta: readTextDelta(step?.text_delta),
|
|
8712
|
+
toolError: readText(toolError?.message),
|
|
8713
|
+
toolInput: toolInfo?.parameters,
|
|
8714
|
+
toolName: readText(step?.tool_name) ?? readText(toolInfo?.name)
|
|
8715
|
+
};
|
|
8716
|
+
}
|
|
8717
|
+
if (record?.event === "result") {
|
|
8718
|
+
const result = toRecord$14(record.result);
|
|
8719
|
+
const conversationId = readText(result?.conversation_id) ?? "";
|
|
8720
|
+
const status = readText(result?.status);
|
|
8721
|
+
if (!(result && status)) return null;
|
|
8722
|
+
return {
|
|
8723
|
+
conversationId,
|
|
8724
|
+
error: readText(result.error),
|
|
8725
|
+
event: "result",
|
|
8726
|
+
response: typeof result.response === "string" ? result.response : "",
|
|
8727
|
+
status,
|
|
8728
|
+
structuredOutput: result.structured_output,
|
|
8729
|
+
usage: parseTokenUsage(result.usage)
|
|
8730
|
+
};
|
|
8731
|
+
}
|
|
8732
|
+
return null;
|
|
8733
|
+
}
|
|
8734
|
+
function parseTokenUsage(value) {
|
|
8735
|
+
const usage = toRecord$14(value);
|
|
8736
|
+
if (!usage) return null;
|
|
8737
|
+
const inputTokens = readNonNegativeNumber(usage.input_tokens);
|
|
8738
|
+
const outputTokens = readNonNegativeNumber(usage.output_tokens);
|
|
8739
|
+
const thinkingTokens = readNonNegativeNumber(usage.thinking_tokens);
|
|
8740
|
+
const cacheReadTokens = readNonNegativeNumber(usage.cache_read_tokens);
|
|
8741
|
+
const totalTokens = readNonNegativeNumber(usage.total_tokens);
|
|
8742
|
+
if (inputTokens === null || outputTokens === null || thinkingTokens === null || cacheReadTokens === null || totalTokens === null) return null;
|
|
8743
|
+
return {
|
|
8744
|
+
cacheReadTokens,
|
|
8745
|
+
inputTokens,
|
|
8746
|
+
outputTokens,
|
|
8747
|
+
thinkingTokens,
|
|
8748
|
+
totalTokens
|
|
8749
|
+
};
|
|
8750
|
+
}
|
|
8751
|
+
function readNonNegativeNumber(value) {
|
|
8752
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
|
|
8753
|
+
}
|
|
8754
|
+
function readText(value) {
|
|
8755
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
8756
|
+
}
|
|
8757
|
+
function readTextDelta(value) {
|
|
8758
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
8759
|
+
}
|
|
8760
|
+
function toRecord$14(value) {
|
|
8761
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
8762
|
+
}
|
|
8763
|
+
//#endregion
|
|
8764
|
+
//#region ../../runtime/adapters/antigravity/dist/transport/antigravity-cli-transport.js
|
|
8765
|
+
const AUTH_FAILURE_PATTERN = /auth(?:entication)? required|not signed in|sign in/iu;
|
|
8766
|
+
const CONTEXT_FAILURE_PATTERN = /conversation[^\n]*(?:not found|missing|unknown|does not exist)/iu;
|
|
8767
|
+
var AntigravityCliTransportError = class extends Error {
|
|
8768
|
+
code;
|
|
8769
|
+
errorType;
|
|
8770
|
+
originalError;
|
|
8771
|
+
telemetry;
|
|
8772
|
+
constructor(input) {
|
|
8773
|
+
super(input.message);
|
|
8774
|
+
this.name = "AntigravityCliTransportError";
|
|
8775
|
+
this.code = input.code;
|
|
8776
|
+
this.errorType = input.errorType;
|
|
8777
|
+
this.originalError = input.originalError;
|
|
8778
|
+
this.telemetry = input.telemetry;
|
|
8779
|
+
}
|
|
8780
|
+
};
|
|
8781
|
+
async function invokeAntigravityCliTransport(input) {
|
|
8782
|
+
const prompt = normalizeOptionalText$42(input.prompt);
|
|
8783
|
+
if (!prompt) throw new AntigravityCliTransportError({
|
|
8784
|
+
code: "schema.invalid",
|
|
8785
|
+
errorType: "config",
|
|
8786
|
+
message: "schema.invalid: prompt is required"
|
|
8787
|
+
});
|
|
8788
|
+
const invocation = buildCliLaunchInvocation({
|
|
8789
|
+
args: buildAntigravityArgs({
|
|
8790
|
+
addDir: input.addDir,
|
|
8791
|
+
conversationPolicy: input.conversationPolicy,
|
|
8792
|
+
jsonSchema: input.jsonSchema,
|
|
8793
|
+
prompt,
|
|
8794
|
+
sessionId: normalizeOptionalText$42(input.sessionId)
|
|
8795
|
+
}),
|
|
8796
|
+
launchContract: input.launchContract
|
|
8797
|
+
});
|
|
8798
|
+
const invokedAtMs = Date.now();
|
|
8799
|
+
let firstOutputAtMs = null;
|
|
8800
|
+
let conversationId = normalizeOptionalText$42(input.sessionId);
|
|
8801
|
+
const terminal = { result: null };
|
|
8802
|
+
let malformedOutput = false;
|
|
8803
|
+
const providerErrorMessages = [];
|
|
8804
|
+
let previewText = "";
|
|
8805
|
+
let previewChain = Promise.resolve();
|
|
8806
|
+
const driverResult = await runCliDriver({
|
|
8807
|
+
allowNonZeroExit: true,
|
|
8808
|
+
args: invocation.args,
|
|
8809
|
+
bin: invocation.bin,
|
|
8810
|
+
cwd: input.workdir,
|
|
8811
|
+
env: input.env,
|
|
8812
|
+
onLifecycleEvent: input.onRuntimeEvent,
|
|
8813
|
+
onProcessControlEvent: input.onProcessControlEvent,
|
|
8814
|
+
onStderrLine: (lineEvent) => {
|
|
8815
|
+
const message = normalizeOptionalText$42(lineEvent.line);
|
|
8816
|
+
if (message) providerErrorMessages.push(message);
|
|
8817
|
+
},
|
|
8818
|
+
onStdoutLine: (lineEvent) => {
|
|
8819
|
+
const event = parseAntigravityOutputLine(lineEvent.line);
|
|
8820
|
+
if (!event) {
|
|
8821
|
+
malformedOutput = true;
|
|
8822
|
+
return;
|
|
8823
|
+
}
|
|
8824
|
+
conversationId = event.conversationId || conversationId;
|
|
8825
|
+
if (event.event === "step_update") {
|
|
8826
|
+
if (event.toolError) providerErrorMessages.push(event.toolError);
|
|
8827
|
+
if (event.stepType === "agent_response" && event.textDelta && !input.jsonSchema) {
|
|
8828
|
+
firstOutputAtMs ??= Date.now();
|
|
8829
|
+
previewText += event.textDelta;
|
|
8830
|
+
if (input.onPreview) {
|
|
8831
|
+
const previewSnapshot = previewText;
|
|
8832
|
+
previewChain = previewChain.then(() => Promise.resolve(input.onPreview?.({ text: previewSnapshot })).then(() => void 0));
|
|
8833
|
+
}
|
|
8834
|
+
}
|
|
8835
|
+
emitToolActivity(event, input.onRuntimeEvent);
|
|
8836
|
+
}
|
|
8837
|
+
if (event.event === "result") terminal.result = event;
|
|
8838
|
+
},
|
|
8839
|
+
timeoutMs: input.timeoutMs
|
|
8840
|
+
});
|
|
8841
|
+
await previewChain;
|
|
8842
|
+
const telemetry = buildTelemetry({
|
|
8843
|
+
driverResult,
|
|
8844
|
+
firstOutputAtMs,
|
|
8845
|
+
invokedAtMs,
|
|
8846
|
+
resumedContext: input.sessionId !== null
|
|
8847
|
+
});
|
|
8848
|
+
if (malformedOutput) throw new AntigravityCliTransportError({
|
|
8849
|
+
code: "runtime.output.invalid",
|
|
8850
|
+
errorType: "adapter",
|
|
8851
|
+
message: "runtime.output.invalid: Antigravity CLI returned an invalid event stream",
|
|
8852
|
+
telemetry
|
|
8853
|
+
});
|
|
8854
|
+
const terminalResult = terminal.result;
|
|
8855
|
+
if (!terminalResult) throw classifyAntigravityFailure({
|
|
8856
|
+
exitCode: driverResult.exitCode,
|
|
8857
|
+
signal: driverResult.signal,
|
|
8858
|
+
stderr: driverResult.stderrText,
|
|
8859
|
+
telemetry
|
|
8860
|
+
});
|
|
8861
|
+
if (terminalResult.status !== "SUCCESS" || driverResult.exitCode !== 0 || driverResult.signal !== null) throw classifyAntigravityFailure({
|
|
8862
|
+
exitCode: driverResult.exitCode,
|
|
8863
|
+
providerError: terminalResult.error,
|
|
8864
|
+
signal: driverResult.signal,
|
|
8865
|
+
stderr: driverResult.stderrText,
|
|
8866
|
+
telemetry
|
|
8867
|
+
});
|
|
8868
|
+
const output = normalizeOptionalText$42(terminalResult.response);
|
|
8869
|
+
const resolvedSessionId = normalizeOptionalText$42(terminalResult.conversationId) ?? conversationId;
|
|
8870
|
+
if (!(output && resolvedSessionId)) {
|
|
8871
|
+
const permissionFailure = classifyAntigravityPermissionFailure(providerErrorMessages);
|
|
8872
|
+
if (permissionFailure) throw new AntigravityCliTransportError({
|
|
8873
|
+
...permissionFailure,
|
|
8874
|
+
telemetry
|
|
8875
|
+
});
|
|
8876
|
+
throw new AntigravityCliTransportError({
|
|
8877
|
+
code: output ? "context.missing" : "runtime.output.empty",
|
|
8878
|
+
errorType: "adapter",
|
|
8879
|
+
message: output ? "context.missing: Antigravity CLI completed without a conversation ID" : "runtime.output.empty: Antigravity CLI completed without agent output",
|
|
8880
|
+
telemetry
|
|
8881
|
+
});
|
|
8882
|
+
}
|
|
8883
|
+
return {
|
|
8884
|
+
output,
|
|
8885
|
+
sessionId: resolvedSessionId,
|
|
8886
|
+
structuredOutput: terminalResult.structuredOutput,
|
|
8887
|
+
telemetry
|
|
8888
|
+
};
|
|
8889
|
+
}
|
|
8890
|
+
function classifyAntigravityPermissionFailure(messages) {
|
|
8891
|
+
for (const message of messages) {
|
|
8892
|
+
const classification = classifyRuntimePermissionDenialMessage({
|
|
8893
|
+
message,
|
|
8894
|
+
source: "antigravity"
|
|
8895
|
+
});
|
|
8896
|
+
if (classification) return {
|
|
8897
|
+
code: classification.code,
|
|
8898
|
+
errorType: classification.errorType,
|
|
8899
|
+
message: classification.message,
|
|
8900
|
+
originalError: classification.details.normalizedMessage
|
|
8901
|
+
};
|
|
8902
|
+
}
|
|
8903
|
+
return null;
|
|
8904
|
+
}
|
|
8905
|
+
function buildAntigravityArgs(input) {
|
|
8906
|
+
const args = [
|
|
8907
|
+
"--print",
|
|
8908
|
+
input.prompt,
|
|
8909
|
+
"--output-format",
|
|
8910
|
+
"stream-json",
|
|
8911
|
+
"--print-timeout",
|
|
8912
|
+
"0"
|
|
8913
|
+
];
|
|
8914
|
+
const addDir = normalizeOptionalText$42(input.addDir);
|
|
8915
|
+
if (addDir) args.push("--add-dir", addDir);
|
|
8916
|
+
const jsonSchema = normalizeOptionalText$42(input.jsonSchema);
|
|
8917
|
+
if (jsonSchema) args.push("--json-schema", jsonSchema);
|
|
8918
|
+
if (input.sessionId) args.push("--conversation", input.sessionId);
|
|
8919
|
+
const model = normalizeOptionalText$42(input.conversationPolicy?.model);
|
|
8920
|
+
if (model) args.push("--model", model);
|
|
8921
|
+
const effort = normalizeOptionalText$42(input.conversationPolicy?.reasoningLevel);
|
|
8922
|
+
if (effort) {
|
|
8923
|
+
if (!ANTIGRAVITY_EFFORTS.has(effort)) throw new AntigravityCliTransportError({
|
|
8924
|
+
code: "model.reasoning_level.unsupported",
|
|
8925
|
+
errorType: "config",
|
|
8926
|
+
message: `model.reasoning_level.unsupported: Antigravity CLI does not support reasoning level '${effort}'`
|
|
8927
|
+
});
|
|
8928
|
+
args.push("--effort", effort);
|
|
8929
|
+
}
|
|
8930
|
+
if (input.conversationPolicy?.collaborationMode === "plan") args.push("--mode", "plan");
|
|
8931
|
+
return args;
|
|
8932
|
+
}
|
|
8933
|
+
const ANTIGRAVITY_EFFORTS = /* @__PURE__ */ new Set([
|
|
8934
|
+
"low",
|
|
8935
|
+
"medium",
|
|
8936
|
+
"high"
|
|
8937
|
+
]);
|
|
8938
|
+
function emitToolActivity(event, callback) {
|
|
8939
|
+
if (!(callback && event.stepType === "tool" && event.toolName)) return;
|
|
8940
|
+
const work = resolveAdapterToolWorkActivity(event.toolName, event.toolInput);
|
|
8941
|
+
let state;
|
|
8942
|
+
if (event.state === "ACTIVE") state = "input-available";
|
|
8943
|
+
else if (event.toolError) state = "output-error";
|
|
8944
|
+
else state = "output-available";
|
|
8945
|
+
callback({
|
|
8946
|
+
phase: "tool_activity",
|
|
8947
|
+
state,
|
|
8948
|
+
toolCallId: `antigravity-step-${String(event.stepIndex)}`,
|
|
8949
|
+
toolName: resolveAdapterToolActivityName(event.toolName),
|
|
8950
|
+
tsMs: Date.now(),
|
|
8951
|
+
...work ? { work } : {}
|
|
8952
|
+
});
|
|
8953
|
+
}
|
|
8954
|
+
function buildTelemetry(input) {
|
|
8955
|
+
const lifecycle = input.driverResult.lifecycle;
|
|
8956
|
+
return {
|
|
8957
|
+
completedAtMs: Date.now(),
|
|
8958
|
+
...lifecycle.exitCode === null ? {} : { exitCode: lifecycle.exitCode },
|
|
8959
|
+
...lifecycle.exitObservedAtMs === null ? {} : { exitObservedAtMs: lifecycle.exitObservedAtMs },
|
|
8960
|
+
...lifecycle.exitSignal === null ? {} : { exitSignal: lifecycle.exitSignal },
|
|
8961
|
+
...input.firstOutputAtMs === null ? {} : { firstOutputAtMs: input.firstOutputAtMs },
|
|
8962
|
+
...lifecycle.firstStderrAtMs === null ? {} : { firstStderrAtMs: lifecycle.firstStderrAtMs },
|
|
8963
|
+
...lifecycle.firstStdoutAtMs === null ? {} : { firstStdoutAtMs: lifecycle.firstStdoutAtMs },
|
|
8964
|
+
invokedAtMs: input.invokedAtMs,
|
|
8965
|
+
...lifecycle.processId === null ? {} : { processId: lifecycle.processId },
|
|
8966
|
+
...lifecycle.processSpawnedAtMs === null ? {} : { processSpawnedAtMs: lifecycle.processSpawnedAtMs },
|
|
8967
|
+
resumedContext: input.resumedContext,
|
|
8968
|
+
...lifecycle.stdinClosedAtMs === null ? {} : { stdinClosedAtMs: lifecycle.stdinClosedAtMs },
|
|
8969
|
+
streamingMode: "stream"
|
|
8970
|
+
};
|
|
8971
|
+
}
|
|
8972
|
+
function classifyAntigravityFailure(input) {
|
|
8973
|
+
const providerMessage = normalizeOptionalText$42(input.providerError) ?? normalizeOptionalText$42(input.stderr) ?? (input.signal ? `Antigravity CLI was interrupted by ${input.signal}.` : `Antigravity CLI exited with code ${String(input.exitCode)}.`);
|
|
8974
|
+
const authFailure = AUTH_FAILURE_PATTERN.test(providerMessage);
|
|
8975
|
+
const contextFailure = CONTEXT_FAILURE_PATTERN.test(providerMessage);
|
|
8976
|
+
let code = "provider_exit_error";
|
|
8977
|
+
if (authFailure) code = "auth.required";
|
|
8978
|
+
else if (contextFailure) code = "context_not_found";
|
|
8979
|
+
else if (input.signal) code = "runtime.interrupted";
|
|
8980
|
+
return new AntigravityCliTransportError({
|
|
8981
|
+
code,
|
|
8982
|
+
errorType: authFailure ? "auth" : "adapter",
|
|
8983
|
+
message: `${code}: ${providerMessage}`,
|
|
8984
|
+
telemetry: input.telemetry
|
|
8985
|
+
});
|
|
8986
|
+
}
|
|
8987
|
+
function normalizeOptionalText$42(value) {
|
|
8988
|
+
const normalized = String(value ?? "").trim();
|
|
8989
|
+
return normalized.length > 0 ? normalized : null;
|
|
8990
|
+
}
|
|
8991
|
+
//#endregion
|
|
8992
|
+
//#region ../../runtime/adapters/antigravity/dist/transport/antigravity-space-action-plugin.js
|
|
8993
|
+
const PLUGIN_DIRECTORY_PREFIX = "openmeld_dispatch_";
|
|
8994
|
+
const FINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
8995
|
+
"done",
|
|
8996
|
+
"blocked",
|
|
8997
|
+
"needs_input",
|
|
8998
|
+
"handoff"
|
|
8999
|
+
]);
|
|
9000
|
+
const ANTIGRAVITY_SPACE_ACTION_JSON_SCHEMA = JSON.stringify({
|
|
9001
|
+
additionalProperties: false,
|
|
9002
|
+
properties: {
|
|
9003
|
+
action: {
|
|
9004
|
+
enum: [
|
|
9005
|
+
"reply",
|
|
9006
|
+
"status",
|
|
9007
|
+
"silent"
|
|
9008
|
+
],
|
|
9009
|
+
type: "string"
|
|
9010
|
+
},
|
|
9011
|
+
mentionTargets: {
|
|
9012
|
+
items: { type: "string" },
|
|
9013
|
+
type: "array"
|
|
9014
|
+
},
|
|
9015
|
+
referenceTargets: {
|
|
9016
|
+
items: { type: "string" },
|
|
9017
|
+
type: "array"
|
|
9018
|
+
},
|
|
9019
|
+
status: {
|
|
9020
|
+
enum: [
|
|
9021
|
+
"none",
|
|
9022
|
+
"done",
|
|
9023
|
+
"blocked",
|
|
9024
|
+
"needs_input",
|
|
9025
|
+
"handoff"
|
|
9026
|
+
],
|
|
9027
|
+
type: "string"
|
|
9028
|
+
},
|
|
9029
|
+
text: {
|
|
9030
|
+
minLength: 1,
|
|
9031
|
+
type: "string"
|
|
9032
|
+
},
|
|
9033
|
+
wakeTargets: {
|
|
9034
|
+
items: { type: "string" },
|
|
9035
|
+
type: "array"
|
|
9036
|
+
}
|
|
9037
|
+
},
|
|
9038
|
+
required: [
|
|
9039
|
+
"action",
|
|
9040
|
+
"text",
|
|
9041
|
+
"status",
|
|
9042
|
+
"wakeTargets",
|
|
9043
|
+
"referenceTargets",
|
|
9044
|
+
"mentionTargets"
|
|
9045
|
+
],
|
|
9046
|
+
type: "object"
|
|
9047
|
+
});
|
|
9048
|
+
async function withAntigravityDispatchSpaceAction(input) {
|
|
9049
|
+
const actionServer = resolveDispatchSpaceActionMcpServer(input.env);
|
|
9050
|
+
if (!actionServer) return await input.run({
|
|
9051
|
+
addDir: null,
|
|
9052
|
+
jsonSchema: null
|
|
9053
|
+
});
|
|
9054
|
+
const pluginId = `${PLUGIN_DIRECTORY_PREFIX}${randomUUID().replaceAll("-", "")}`;
|
|
9055
|
+
const root = join(tmpdir(), pluginId);
|
|
9056
|
+
const pluginDir = join(root, ".agents", "plugins", pluginId);
|
|
9057
|
+
try {
|
|
9058
|
+
await mkdir(pluginDir, {
|
|
9059
|
+
recursive: true,
|
|
9060
|
+
mode: 448
|
|
9061
|
+
});
|
|
9062
|
+
await Promise.all([
|
|
9063
|
+
writeJson(join(pluginDir, "plugin.json"), {
|
|
9064
|
+
description: "Records one structured Space outcome for the active OpenMeld Wake.",
|
|
9065
|
+
name: pluginId
|
|
9066
|
+
}),
|
|
9067
|
+
writeJson(join(pluginDir, "hooks.json"), { "openmeld-space-action": { PreInvocation: [{
|
|
9068
|
+
command: "node ./inject-space-action.mjs",
|
|
9069
|
+
timeout: 5,
|
|
9070
|
+
type: "command"
|
|
9071
|
+
}] } }),
|
|
9072
|
+
writeFile(join(pluginDir, "inject-space-action.mjs"), buildInstructionHookSource(), {
|
|
9073
|
+
encoding: "utf8",
|
|
9074
|
+
mode: 384
|
|
9075
|
+
})
|
|
9076
|
+
]);
|
|
9077
|
+
const result = await input.run({
|
|
9078
|
+
addDir: root,
|
|
9079
|
+
jsonSchema: ANTIGRAVITY_SPACE_ACTION_JSON_SCHEMA
|
|
9080
|
+
});
|
|
9081
|
+
await recordStructuredSpaceAction({
|
|
9082
|
+
action: parseStructuredSpaceAction(result.structuredOutput),
|
|
9083
|
+
actionServer
|
|
9084
|
+
});
|
|
9085
|
+
return result;
|
|
9086
|
+
} finally {
|
|
9087
|
+
await rm(root, {
|
|
9088
|
+
force: true,
|
|
9089
|
+
recursive: true
|
|
9090
|
+
}).catch(() => void 0);
|
|
9091
|
+
}
|
|
9092
|
+
}
|
|
9093
|
+
function writeJson(path, value) {
|
|
9094
|
+
return writeFile(path, `${JSON.stringify(value, null, 2)}\n`, {
|
|
9095
|
+
encoding: "utf8",
|
|
9096
|
+
mode: 384
|
|
9097
|
+
});
|
|
9098
|
+
}
|
|
9099
|
+
function buildInstructionHookSource() {
|
|
9100
|
+
const instruction = [
|
|
9101
|
+
"For this OpenMeld Wake, do not run a Space Action CLI command and do not inspect its environment variables.",
|
|
9102
|
+
"If the request can be answered without tools, return the structured outcome immediately; do not inspect the workspace or run a command just to orient yourself.",
|
|
9103
|
+
"Complete the user's work under the normal Antigravity permission policy.",
|
|
9104
|
+
"At the end, return exactly one structured outcome using the required JSON schema: reply for a public message, status for a short final status, or silent when no public reply is appropriate.",
|
|
9105
|
+
"Put the public reply, status text, or silence reason in text.",
|
|
9106
|
+
"Use status=none unless action=status. Include only validated profile IDs from the provided target reference lists; otherwise leave all target arrays empty.",
|
|
9107
|
+
"OpenMeld will validate and record this outcome for the current dispatch."
|
|
9108
|
+
].join(" ");
|
|
9109
|
+
return `process.stdout.write(JSON.stringify({ injectSteps: [{ ephemeralMessage: ${JSON.stringify(instruction)} }] }));\n`;
|
|
9110
|
+
}
|
|
9111
|
+
function parseStructuredSpaceAction(value) {
|
|
9112
|
+
const record = toRecord$13(value);
|
|
9113
|
+
const action = record?.action;
|
|
9114
|
+
const status = record?.status;
|
|
9115
|
+
const text = normalizeRequiredText(record?.text);
|
|
9116
|
+
const wakeTargets = parseTargetIds(record?.wakeTargets);
|
|
9117
|
+
const referenceTargets = parseTargetIds(record?.referenceTargets);
|
|
9118
|
+
const mentionTargets = parseTargetIds(record?.mentionTargets);
|
|
9119
|
+
if (action !== "reply" && action !== "status" && action !== "silent" || status !== "none" && !FINAL_STATUSES.has(String(status)) || !text || wakeTargets === null || referenceTargets === null || mentionTargets === null) throw createSpaceActionError("Antigravity returned an invalid structured Space outcome.");
|
|
9120
|
+
if (action === "status" && !FINAL_STATUSES.has(String(status)) || action !== "status" && status !== "none" || action !== "reply" && (wakeTargets.length > 0 || referenceTargets.length > 0 || mentionTargets.length > 0)) throw createSpaceActionError("Antigravity returned an inconsistent structured Space outcome.");
|
|
9121
|
+
return {
|
|
9122
|
+
action,
|
|
9123
|
+
mentionTargets,
|
|
9124
|
+
referenceTargets,
|
|
9125
|
+
status,
|
|
9126
|
+
text,
|
|
9127
|
+
wakeTargets
|
|
9128
|
+
};
|
|
9129
|
+
}
|
|
9130
|
+
async function recordStructuredSpaceAction(input) {
|
|
9131
|
+
const baseArgs = input.actionServer.args.slice(0, -1);
|
|
9132
|
+
let args;
|
|
9133
|
+
let stdin = "";
|
|
9134
|
+
if (input.action.action === "reply") {
|
|
9135
|
+
args = [
|
|
9136
|
+
...baseArgs,
|
|
9137
|
+
"reply",
|
|
9138
|
+
"--message-file",
|
|
9139
|
+
"-"
|
|
9140
|
+
];
|
|
9141
|
+
stdin = input.action.text;
|
|
9142
|
+
appendTargetArgs(args, "--wake", input.action.wakeTargets);
|
|
9143
|
+
appendTargetArgs(args, "--reference", input.action.referenceTargets);
|
|
9144
|
+
appendTargetArgs(args, "--mention", input.action.mentionTargets);
|
|
9145
|
+
} else if (input.action.action === "status") args = [
|
|
9146
|
+
...baseArgs,
|
|
9147
|
+
"status",
|
|
9148
|
+
input.action.status,
|
|
9149
|
+
input.action.text
|
|
9150
|
+
];
|
|
9151
|
+
else args = [
|
|
9152
|
+
...baseArgs,
|
|
9153
|
+
"silent",
|
|
9154
|
+
"--reason",
|
|
9155
|
+
input.action.text
|
|
9156
|
+
];
|
|
9157
|
+
await runActionWriter({
|
|
9158
|
+
args,
|
|
9159
|
+
commandPath: input.actionServer.commandPath,
|
|
9160
|
+
env: input.actionServer.env,
|
|
9161
|
+
stdin
|
|
9162
|
+
});
|
|
9163
|
+
}
|
|
9164
|
+
function appendTargetArgs(args, option, values) {
|
|
9165
|
+
for (const value of values) args.push(option, value);
|
|
9166
|
+
}
|
|
9167
|
+
async function runActionWriter(input) {
|
|
9168
|
+
await new Promise((resolve, reject) => {
|
|
9169
|
+
const child = spawn(input.commandPath, [...input.args], {
|
|
9170
|
+
env: {
|
|
9171
|
+
...process.env,
|
|
9172
|
+
...input.env
|
|
9173
|
+
},
|
|
9174
|
+
stdio: [
|
|
9175
|
+
"pipe",
|
|
9176
|
+
"pipe",
|
|
9177
|
+
"pipe"
|
|
9178
|
+
]
|
|
9179
|
+
});
|
|
9180
|
+
let stderr = "";
|
|
9181
|
+
child.stderr.setEncoding("utf8");
|
|
9182
|
+
child.stderr.on("data", (chunk) => {
|
|
9183
|
+
stderr += chunk;
|
|
9184
|
+
});
|
|
9185
|
+
child.once("error", (error) => {
|
|
9186
|
+
reject(createSpaceActionError(error.message));
|
|
9187
|
+
});
|
|
9188
|
+
child.once("close", (code, signal) => {
|
|
9189
|
+
if (code === 0 && signal === null) {
|
|
9190
|
+
resolve();
|
|
9191
|
+
return;
|
|
9192
|
+
}
|
|
9193
|
+
reject(createSpaceActionError(normalizeRequiredText(stderr) ?? `The Space outcome writer exited with code ${String(code)}.`));
|
|
9194
|
+
});
|
|
9195
|
+
child.stdin.end(input.stdin);
|
|
9196
|
+
});
|
|
9197
|
+
}
|
|
9198
|
+
function createSpaceActionError(message) {
|
|
9199
|
+
return Object.assign(new Error(message), {
|
|
9200
|
+
code: "space.action.record_failed",
|
|
9201
|
+
errorType: "adapter"
|
|
9202
|
+
});
|
|
9203
|
+
}
|
|
9204
|
+
function parseTargetIds(value) {
|
|
9205
|
+
if (!Array.isArray(value)) return null;
|
|
9206
|
+
const values = value.map(normalizeRequiredText);
|
|
9207
|
+
if (values.some((item) => item === null)) return null;
|
|
9208
|
+
return values;
|
|
9209
|
+
}
|
|
9210
|
+
function normalizeRequiredText(value) {
|
|
9211
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
9212
|
+
}
|
|
9213
|
+
function toRecord$13(value) {
|
|
9214
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
9215
|
+
}
|
|
9216
|
+
//#endregion
|
|
9217
|
+
//#region ../../runtime/adapters/antigravity/dist/usage/antigravity-usage-limits.js
|
|
9218
|
+
const LINE_BREAK_PATTERN = /\r?\n/u;
|
|
9219
|
+
const USAGE_LINE_PATTERN = /^([^\t]+)\tWeekly Limit Remaining\t(\d{1,3})%\t([^\t]+)$/u;
|
|
9220
|
+
function parseAntigravityUsageLimits(input) {
|
|
9221
|
+
const limits = input.output.split(LINE_BREAK_PATTERN).map((line) => parseUsageLine(line, input.observedAt)).filter((limit) => limit !== null);
|
|
9222
|
+
return limits.length > 0 ? limits : createUnavailableProviderUsageLimits(input.observedAt);
|
|
9223
|
+
}
|
|
9224
|
+
function parseUsageLine(line, observedAt) {
|
|
9225
|
+
const match = line.trim().match(USAGE_LINE_PATTERN);
|
|
9226
|
+
if (!match) return null;
|
|
9227
|
+
const [, rawLabel, rawRemainingPercent, rawResetsAt] = match;
|
|
9228
|
+
const remainingPercent = Number(rawRemainingPercent);
|
|
9229
|
+
const resetTime = Date.parse(rawResetsAt ?? "");
|
|
9230
|
+
if (!(rawLabel && Number.isFinite(remainingPercent)) || remainingPercent < 0 || remainingPercent > 100 || !Number.isFinite(resetTime)) return null;
|
|
9231
|
+
const label = rawLabel.trim();
|
|
9232
|
+
const providerId = label.toLowerCase().startsWith("gemini") ? "antigravity-gemini" : "antigravity-other";
|
|
9233
|
+
const usedPercent = 100 - remainingPercent;
|
|
9234
|
+
return {
|
|
9235
|
+
key: `${providerId}:weekly`,
|
|
9236
|
+
label: "Weekly usage",
|
|
9237
|
+
observedAt,
|
|
9238
|
+
provider: {
|
|
9239
|
+
displayName: label,
|
|
9240
|
+
id: providerId
|
|
9241
|
+
},
|
|
9242
|
+
resetsAt: new Date(resetTime).toISOString(),
|
|
9243
|
+
status: remainingPercent === 0 ? "exhausted" : "available",
|
|
9244
|
+
usedPercent
|
|
9245
|
+
};
|
|
9246
|
+
}
|
|
9247
|
+
//#endregion
|
|
9248
|
+
//#region ../../runtime/adapters/antigravity/dist/index.js
|
|
9249
|
+
const ANTIGRAVITY_CONVERSATION_BRIDGE_SPEC = resolveBuiltinAdapterConversationBridgeSpec("antigravity");
|
|
9250
|
+
function createAntigravityAdapter(options = {}) {
|
|
9251
|
+
const activeTasks = /* @__PURE__ */ new Map();
|
|
9252
|
+
const invoke = createDefaultAntigravityInvoke({
|
|
9253
|
+
activeTasks,
|
|
9254
|
+
options
|
|
9255
|
+
});
|
|
9256
|
+
const processInterruptSender = options.registerRuntimeProcess ? createProcessInterruptSender(activeTasks) : void 0;
|
|
9257
|
+
const controlShell = createSharedControlShell({
|
|
9258
|
+
gracefulTimeoutMs: options.gracefulTimeoutMs,
|
|
9259
|
+
sendCancel: options.sendCancel,
|
|
9260
|
+
sendInterrupt: options.sendInterrupt ?? processInterruptSender,
|
|
9261
|
+
waitForMs: options.waitForMs
|
|
9262
|
+
});
|
|
9263
|
+
const dispatch = createSharedDispatchShell({
|
|
9264
|
+
adapterId: "antigravity",
|
|
9265
|
+
bridgeSpec: ANTIGRAVITY_CONVERSATION_BRIDGE_SPEC,
|
|
9266
|
+
invoke: options.invoke,
|
|
9267
|
+
invokeByMode: options.invokeByMode,
|
|
9268
|
+
repairConversationPolicy: "require_canonical",
|
|
9269
|
+
resolveDefaultInvoke: () => invoke,
|
|
9270
|
+
runtimeOptions: options
|
|
9271
|
+
});
|
|
9272
|
+
return {
|
|
9273
|
+
adapterId: "antigravity",
|
|
9274
|
+
cancel: controlShell.cancel,
|
|
9275
|
+
dispatch,
|
|
9276
|
+
interrupt: controlShell.interrupt,
|
|
9277
|
+
verifyComputerFileAccessBoundary: () => Promise.resolve({
|
|
9278
|
+
reasonCode: "computer.file_access.controller_unsupported",
|
|
9279
|
+
supported: false
|
|
9280
|
+
})
|
|
9281
|
+
};
|
|
9282
|
+
}
|
|
9283
|
+
function createDefaultAntigravityInvoke(input) {
|
|
9284
|
+
return async (request) => {
|
|
9285
|
+
const task = {
|
|
9286
|
+
cancellationRequested: false,
|
|
9287
|
+
process: null
|
|
9288
|
+
};
|
|
9289
|
+
input.activeTasks.set(request.taskId, task);
|
|
9290
|
+
try {
|
|
9291
|
+
const launchContract = await resolveDispatchLaunchContract({
|
|
9292
|
+
antigravityBin: input.options.antigravityBin,
|
|
9293
|
+
inputLaunchContract: request.launchContract,
|
|
9294
|
+
optionLaunchContract: input.options.launchContract
|
|
9295
|
+
});
|
|
9296
|
+
if (task.cancellationRequested) throw new AntigravityCliTransportError({
|
|
9297
|
+
code: "runtime.cancelled_before_start",
|
|
9298
|
+
errorType: "adapter",
|
|
9299
|
+
message: "runtime.cancelled_before_start: Antigravity dispatch was canceled before launch"
|
|
9300
|
+
});
|
|
9301
|
+
const result = await invokeWithSingleContextHeal({
|
|
9302
|
+
contextId: normalizeOptionalText$41(request.agentControllerConversationId),
|
|
9303
|
+
contextLossPolicy: request.executionMode === "repair" ? "fail" : "rebuild",
|
|
9304
|
+
createRebuildFailedError: (error) => new AntigravityCliTransportError({
|
|
9305
|
+
code: "context.rebuild_failed",
|
|
9306
|
+
errorType: "adapter",
|
|
9307
|
+
message: `context.rebuild_failed: ${toErrorMessage$17(error)}`
|
|
9308
|
+
}),
|
|
9309
|
+
invokeOnce: async (sessionId) => {
|
|
9310
|
+
const transportResult = await withAntigravityDispatchSpaceAction({
|
|
9311
|
+
env: request.env,
|
|
9312
|
+
run: async ({ addDir, jsonSchema }) => await invokeAntigravityCliTransport({
|
|
9313
|
+
addDir,
|
|
9314
|
+
conversationPolicy: request.conversationPolicy,
|
|
9315
|
+
env: request.env,
|
|
9316
|
+
jsonSchema,
|
|
9317
|
+
launchContract,
|
|
9318
|
+
onPreview: request.onPreview,
|
|
9319
|
+
onProcessControlEvent: (event) => {
|
|
9320
|
+
task.process = event.phase === "process_spawned" ? event : null;
|
|
9321
|
+
if (event.phase === "process_spawned" && task.cancellationRequested) signalProcess(event, "SIGINT");
|
|
9322
|
+
input.options.registerRuntimeProcess?.({
|
|
9323
|
+
...event,
|
|
9324
|
+
taskId: request.taskId
|
|
9325
|
+
});
|
|
9326
|
+
},
|
|
9327
|
+
onRuntimeEvent: request.onRuntimeEvent,
|
|
9328
|
+
prompt: request.prompt,
|
|
9329
|
+
sessionId,
|
|
9330
|
+
timeoutMs: request.timeoutMs ?? null,
|
|
9331
|
+
workdir: request.runtimeContext.providerRuntimeWorkingDirectory
|
|
9332
|
+
})
|
|
9333
|
+
});
|
|
9334
|
+
return {
|
|
9335
|
+
contextId: transportResult.sessionId,
|
|
9336
|
+
output: transportResult.output,
|
|
9337
|
+
telemetry: transportResult.telemetry
|
|
9338
|
+
};
|
|
9339
|
+
},
|
|
9340
|
+
isContextLostError: (error) => error instanceof AntigravityCliTransportError && error.code === "context_not_found"
|
|
9341
|
+
});
|
|
9342
|
+
const agentControllerConversation = ANTIGRAVITY_CONVERSATION_BRIDGE_SPEC && result.contextId ? bridgeAgentControllerConversationRef({
|
|
9343
|
+
bridgeSpec: ANTIGRAVITY_CONVERSATION_BRIDGE_SPEC,
|
|
9344
|
+
agentControllerConversationId: result.contextId
|
|
9345
|
+
}) : null;
|
|
9346
|
+
return {
|
|
9347
|
+
contextDelta: {
|
|
9348
|
+
agentControllerConversationId: result.contextId,
|
|
9349
|
+
refreshed: result.contextHealed,
|
|
9350
|
+
...agentControllerConversation ? { agentControllerConversation } : {}
|
|
9351
|
+
},
|
|
9352
|
+
output: result.output,
|
|
9353
|
+
telemetry: result.telemetry
|
|
9354
|
+
};
|
|
9355
|
+
} finally {
|
|
9356
|
+
if (input.activeTasks.get(request.taskId) === task) input.activeTasks.delete(request.taskId);
|
|
9357
|
+
}
|
|
9358
|
+
};
|
|
9359
|
+
}
|
|
9360
|
+
async function resolveDispatchLaunchContract(input) {
|
|
9361
|
+
const commandPath = normalizeOptionalText$41(input.antigravityBin);
|
|
9362
|
+
const launchContract = input.inputLaunchContract ?? input.optionLaunchContract ?? (commandPath ? buildExecutableLaunchContract({ commandPath }) : null);
|
|
9363
|
+
if (!launchContract) throw Object.assign(/* @__PURE__ */ new Error("Antigravity CLI launch contract is required for dispatch."), {
|
|
9364
|
+
code: "controller.launch.needs_repair",
|
|
9365
|
+
errorType: "config"
|
|
9366
|
+
});
|
|
9367
|
+
const verification = await verifyAntigravityLaunchContract({ launchContract });
|
|
9368
|
+
if (!verification.ok) throw Object.assign(new Error(verification.errorMessage), {
|
|
9369
|
+
code: "controller.launch.needs_repair",
|
|
9370
|
+
errorType: "config"
|
|
9371
|
+
});
|
|
9372
|
+
return launchContract;
|
|
9373
|
+
}
|
|
9374
|
+
function createProcessInterruptSender(activeTasks) {
|
|
9375
|
+
return (signal) => {
|
|
9376
|
+
const task = activeTasks.get(signal.taskId);
|
|
9377
|
+
if (!task) return Promise.reject(Object.assign(/* @__PURE__ */ new Error("Antigravity task is not running."), { code: "task.not_running" }));
|
|
9378
|
+
task.cancellationRequested = true;
|
|
9379
|
+
if (!task.process) return Promise.resolve();
|
|
9380
|
+
return signalProcess(task.process, signal.mode === "force" ? "SIGKILL" : "SIGINT") ? Promise.resolve() : Promise.reject(/* @__PURE__ */ new Error("Antigravity process signal was not sent."));
|
|
9381
|
+
};
|
|
9382
|
+
}
|
|
9383
|
+
function signalProcess(processEvent, signal) {
|
|
9384
|
+
return signalAgentControllerProcessTree({
|
|
9385
|
+
processId: processEvent.processId,
|
|
9386
|
+
signal,
|
|
9387
|
+
signalTarget: processEvent.signalTarget
|
|
9388
|
+
});
|
|
9389
|
+
}
|
|
9390
|
+
function normalizeOptionalText$41(value) {
|
|
9391
|
+
const normalized = String(value ?? "").trim();
|
|
9392
|
+
return normalized.length > 0 ? normalized : null;
|
|
9393
|
+
}
|
|
9394
|
+
function toErrorMessage$17(error) {
|
|
9395
|
+
return error instanceof Error ? error.message : String(error);
|
|
9396
|
+
}
|
|
9397
|
+
//#endregion
|
|
9398
|
+
//#region ../../runtime/local-service/src/adapters/installers/install-antigravity.ts
|
|
9399
|
+
const installAntigravityAdapter = {
|
|
9400
|
+
adapterId: "antigravity",
|
|
9401
|
+
install(input) {
|
|
9402
|
+
const antigravityAdapter = createAntigravityAdapter({ ...input.registerRuntimeProcess ? { registerRuntimeProcess: input.registerRuntimeProcess } : {} });
|
|
9403
|
+
return {
|
|
9404
|
+
adapter: antigravityAdapter,
|
|
9405
|
+
adapterId: antigravityAdapter.adapterId,
|
|
9406
|
+
transportModes: ["local-cli"]
|
|
9407
|
+
};
|
|
9408
|
+
}
|
|
9409
|
+
};
|
|
9410
|
+
//#endregion
|
|
8576
9411
|
//#region ../../runtime/adapters/claude-code/dist/config/claude-runtime-config.js
|
|
8577
9412
|
const DEFAULT_CLAUDE_CODE_COMMAND = "claude";
|
|
8578
9413
|
async function resolveInstalledClaudeCodeLaunchCandidates(input) {
|
|
@@ -11470,6 +12305,7 @@ foreach ($path in $paths) {
|
|
|
11470
12305
|
//#region ../../runtime/adapters/codex/dist/transport/codex-app-server-transport.js
|
|
11471
12306
|
const CODEX_APP_SERVER_VERSION_PATTERN = /\/([^\s]+)/u;
|
|
11472
12307
|
const EXECUTION_CONTEXT_ERROR_PATTERN = /^(execution_context\.[a-z_]+|context\.mcp_isolation_unverified)(?::|$)/u;
|
|
12308
|
+
const REQUIRED_MCP_INITIALIZATION_FAILURE_PATTERN = /required MCP servers? failed to initialize/iu;
|
|
11473
12309
|
const APP_SERVER_PROCESS_KILL_GRACE_MS = 1e3;
|
|
11474
12310
|
const DEFAULT_APP_SERVER_STARTUP_TIMEOUT_MS = 15e3;
|
|
11475
12311
|
var CodexAppServerTransportError = class extends Error {
|
|
@@ -13226,6 +14062,11 @@ function buildServerRequestDeclineResponse(method) {
|
|
|
13226
14062
|
function toJsonRpcTransportError$1(error) {
|
|
13227
14063
|
const message = normalizeOptionalText$31(error.message) ?? "codex app-server error";
|
|
13228
14064
|
const originalError = createProviderOriginalError(message) ?? void 0;
|
|
14065
|
+
const mcpInitializationFailure = classifyCodexRequiredMcpInitializationFailure({
|
|
14066
|
+
message,
|
|
14067
|
+
...typeof error.code === "number" ? { rpcErrorCode: error.code } : {}
|
|
14068
|
+
});
|
|
14069
|
+
if (mcpInitializationFailure) return mcpInitializationFailure;
|
|
13229
14070
|
const permissionDenial = classifyRuntimePermissionDenialMessage({
|
|
13230
14071
|
message,
|
|
13231
14072
|
source: "codex"
|
|
@@ -13265,6 +14106,16 @@ function toJsonRpcTransportError$1(error) {
|
|
|
13265
14106
|
...typeof error.code === "number" ? { rpcErrorCode: error.code } : {}
|
|
13266
14107
|
});
|
|
13267
14108
|
}
|
|
14109
|
+
function classifyCodexRequiredMcpInitializationFailure(input) {
|
|
14110
|
+
if (!REQUIRED_MCP_INITIALIZATION_FAILURE_PATTERN.test(input.message)) return null;
|
|
14111
|
+
return new CodexAppServerTransportError({
|
|
14112
|
+
code: "execution_context.mcp_server_initialization_failed",
|
|
14113
|
+
errorType: "config",
|
|
14114
|
+
message: "execution_context.mcp_server_initialization_failed: required tools could not start",
|
|
14115
|
+
originalError: createProviderOriginalError(input.message) ?? void 0,
|
|
14116
|
+
...typeof input.rpcErrorCode === "number" ? { rpcErrorCode: input.rpcErrorCode } : {}
|
|
14117
|
+
});
|
|
14118
|
+
}
|
|
13268
14119
|
function toCodexAppServerTransportError(error, timeoutMs) {
|
|
13269
14120
|
if (error instanceof CodexAppServerTransportError) return error;
|
|
13270
14121
|
const contextError = error instanceof Error ? EXECUTION_CONTEXT_ERROR_PATTERN.exec(error.message)?.[1] : void 0;
|
|
@@ -21066,6 +21917,7 @@ const installOpenCodeAdapter = {
|
|
|
21066
21917
|
//#region ../../runtime/local-service/src/adapters/installers/list-installers.ts
|
|
21067
21918
|
function listLocalAdapterInstallers() {
|
|
21068
21919
|
return [
|
|
21920
|
+
installAntigravityAdapter,
|
|
21069
21921
|
installClaudeCodeAdapter,
|
|
21070
21922
|
installCodexAdapter,
|
|
21071
21923
|
installCursorAdapter,
|
|
@@ -22334,7 +23186,7 @@ async function syncDaemonRouteCatalogState(input) {
|
|
|
22334
23186
|
return {
|
|
22335
23187
|
status: "failed",
|
|
22336
23188
|
reason: "load_failed",
|
|
22337
|
-
errorMessage: toErrorMessage$
|
|
23189
|
+
errorMessage: toErrorMessage$20(error)
|
|
22338
23190
|
};
|
|
22339
23191
|
}
|
|
22340
23192
|
const nextFingerprint = buildRouteCatalogFingerprint(nextCatalog);
|
|
@@ -22347,7 +23199,7 @@ async function syncDaemonRouteCatalogState(input) {
|
|
|
22347
23199
|
return {
|
|
22348
23200
|
status: "failed",
|
|
22349
23201
|
reason: "register_failed",
|
|
22350
|
-
errorMessage: toErrorMessage$
|
|
23202
|
+
errorMessage: toErrorMessage$20(error)
|
|
22351
23203
|
};
|
|
22352
23204
|
}
|
|
22353
23205
|
applyAcceptedLeases({
|
|
@@ -22388,7 +23240,7 @@ async function syncDaemonRouteCatalogState(input) {
|
|
|
22388
23240
|
return {
|
|
22389
23241
|
status: "failed",
|
|
22390
23242
|
reason: "register_failed",
|
|
22391
|
-
errorMessage: toErrorMessage$
|
|
23243
|
+
errorMessage: toErrorMessage$20(error)
|
|
22392
23244
|
};
|
|
22393
23245
|
}
|
|
22394
23246
|
const diff = buildRouteCatalogDiff({
|
|
@@ -23029,20 +23881,50 @@ var registry_default = {
|
|
|
23029
23881
|
"id": "antigravity",
|
|
23030
23882
|
"displayName": "Antigravity",
|
|
23031
23883
|
"category": "builtin",
|
|
23032
|
-
"skillsDir": ".
|
|
23033
|
-
"globalSkillsDir": "${HOME}/.gemini/antigravity/skills",
|
|
23884
|
+
"skillsDir": ".agents/skills",
|
|
23885
|
+
"globalSkillsDir": ["${HOME}/.gemini/antigravity-cli/skills", "${HOME}/.gemini/antigravity/skills"],
|
|
23034
23886
|
"detection": {
|
|
23035
23887
|
"mode": "any",
|
|
23036
|
-
"checks": [
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
|
|
23888
|
+
"checks": [
|
|
23889
|
+
{
|
|
23890
|
+
"kind": "commandExists",
|
|
23891
|
+
"value": "agy"
|
|
23892
|
+
},
|
|
23893
|
+
{
|
|
23894
|
+
"kind": "pathExists",
|
|
23895
|
+
"value": "${HOME}/.gemini/antigravity-cli"
|
|
23896
|
+
},
|
|
23897
|
+
{
|
|
23898
|
+
"kind": "pathExists",
|
|
23899
|
+
"value": "${HOME}/.gemini/antigravity"
|
|
23900
|
+
}
|
|
23901
|
+
]
|
|
23040
23902
|
},
|
|
23041
23903
|
"service": { "skillsInstallable": true },
|
|
23042
23904
|
"runtime": {
|
|
23043
|
-
"supported":
|
|
23044
|
-
"adapters": [
|
|
23045
|
-
|
|
23905
|
+
"supported": true,
|
|
23906
|
+
"adapters": [{
|
|
23907
|
+
"adapterId": "antigravity",
|
|
23908
|
+
"controllerRefMatcher": {
|
|
23909
|
+
"kind": "contains",
|
|
23910
|
+
"values": ["antigravity"]
|
|
23911
|
+
},
|
|
23912
|
+
"transportModes": ["local-cli"],
|
|
23913
|
+
"capabilityDeclaration": {
|
|
23914
|
+
"executionContextVersion": 2,
|
|
23915
|
+
"streamingCapability": "preview_capable",
|
|
23916
|
+
"imageInputCapability": "unsupported",
|
|
23917
|
+
"runtimeWorkingDirectoryMode": "spawn_cwd",
|
|
23918
|
+
"preparationRequirement": "none",
|
|
23919
|
+
"continuationCapability": "standard",
|
|
23920
|
+
"workspaceResumeBehavior": "validate_only"
|
|
23921
|
+
}
|
|
23922
|
+
}]
|
|
23923
|
+
},
|
|
23924
|
+
"lifecycle": { "status": "active" },
|
|
23925
|
+
"transportModes": ["local-cli"],
|
|
23926
|
+
"defaultTransportMode": "local-cli",
|
|
23927
|
+
"defaultStreamingMode": "stream"
|
|
23046
23928
|
},
|
|
23047
23929
|
{
|
|
23048
23930
|
"id": "augment",
|
|
@@ -23947,8 +24829,111 @@ var registry_default = {
|
|
|
23947
24829
|
//#region src/model-catalog/offline-catalog.json
|
|
23948
24830
|
var offline_catalog_default = {
|
|
23949
24831
|
schemaVersion: 1,
|
|
23950
|
-
updatedAt: "2026-09-
|
|
24832
|
+
updatedAt: "2026-09-21T00:00:00.000Z",
|
|
23951
24833
|
agentControllers: {
|
|
24834
|
+
"antigravity": {
|
|
24835
|
+
"defaultModelId": "gemini-3.8-flash-high",
|
|
24836
|
+
"models": [
|
|
24837
|
+
{
|
|
24838
|
+
"id": "gemini-3.8-flash-high",
|
|
24839
|
+
"displayName": "Gemini 3.8 Flash (High)",
|
|
24840
|
+
"unavailable": false,
|
|
24841
|
+
"supportedReasoningLevels": [],
|
|
24842
|
+
"minCliVersion": "1.2.7"
|
|
24843
|
+
},
|
|
24844
|
+
{
|
|
24845
|
+
"id": "gemini-3.8-flash-medium",
|
|
24846
|
+
"displayName": "Gemini 3.8 Flash (Medium)",
|
|
24847
|
+
"unavailable": false,
|
|
24848
|
+
"supportedReasoningLevels": [],
|
|
24849
|
+
"minCliVersion": "1.2.7"
|
|
24850
|
+
},
|
|
24851
|
+
{
|
|
24852
|
+
"id": "gemini-3.8-flash-low",
|
|
24853
|
+
"displayName": "Gemini 3.8 Flash (Low)",
|
|
24854
|
+
"unavailable": false,
|
|
24855
|
+
"supportedReasoningLevels": [],
|
|
24856
|
+
"minCliVersion": "1.2.7"
|
|
24857
|
+
},
|
|
24858
|
+
{
|
|
24859
|
+
"id": "gemini-3.7-flash-high",
|
|
24860
|
+
"displayName": "Gemini 3.7 Flash (High)",
|
|
24861
|
+
"unavailable": false,
|
|
24862
|
+
"supportedReasoningLevels": [],
|
|
24863
|
+
"minCliVersion": "1.2.7"
|
|
24864
|
+
},
|
|
24865
|
+
{
|
|
24866
|
+
"id": "gemini-3.7-flash-medium",
|
|
24867
|
+
"displayName": "Gemini 3.7 Flash (Medium)",
|
|
24868
|
+
"unavailable": false,
|
|
24869
|
+
"supportedReasoningLevels": [],
|
|
24870
|
+
"minCliVersion": "1.2.7"
|
|
24871
|
+
},
|
|
24872
|
+
{
|
|
24873
|
+
"id": "gemini-3.7-flash-low",
|
|
24874
|
+
"displayName": "Gemini 3.7 Flash (Low)",
|
|
24875
|
+
"unavailable": false,
|
|
24876
|
+
"supportedReasoningLevels": [],
|
|
24877
|
+
"minCliVersion": "1.2.7"
|
|
24878
|
+
},
|
|
24879
|
+
{
|
|
24880
|
+
"id": "gemini-3.6-flash-high",
|
|
24881
|
+
"displayName": "Gemini 3.6 Flash (High)",
|
|
24882
|
+
"unavailable": false,
|
|
24883
|
+
"supportedReasoningLevels": [],
|
|
24884
|
+
"minCliVersion": "1.2.7"
|
|
24885
|
+
},
|
|
24886
|
+
{
|
|
24887
|
+
"id": "gemini-3.6-flash-medium",
|
|
24888
|
+
"displayName": "Gemini 3.6 Flash (Medium)",
|
|
24889
|
+
"unavailable": false,
|
|
24890
|
+
"supportedReasoningLevels": [],
|
|
24891
|
+
"minCliVersion": "1.2.7"
|
|
24892
|
+
},
|
|
24893
|
+
{
|
|
24894
|
+
"id": "gemini-3.6-flash-low",
|
|
24895
|
+
"displayName": "Gemini 3.6 Flash (Low)",
|
|
24896
|
+
"unavailable": false,
|
|
24897
|
+
"supportedReasoningLevels": [],
|
|
24898
|
+
"minCliVersion": "1.2.7"
|
|
24899
|
+
},
|
|
24900
|
+
{
|
|
24901
|
+
"id": "gemini-3.1-pro-high",
|
|
24902
|
+
"displayName": "Gemini 3.1 Pro (High)",
|
|
24903
|
+
"unavailable": false,
|
|
24904
|
+
"supportedReasoningLevels": [],
|
|
24905
|
+
"minCliVersion": "1.2.7"
|
|
24906
|
+
},
|
|
24907
|
+
{
|
|
24908
|
+
"id": "gemini-3.1-pro-low",
|
|
24909
|
+
"displayName": "Gemini 3.1 Pro (Low)",
|
|
24910
|
+
"unavailable": false,
|
|
24911
|
+
"supportedReasoningLevels": [],
|
|
24912
|
+
"minCliVersion": "1.2.7"
|
|
24913
|
+
},
|
|
24914
|
+
{
|
|
24915
|
+
"id": "claude-sonnet-4-6",
|
|
24916
|
+
"displayName": "Claude Sonnet 4.6 (Thinking)",
|
|
24917
|
+
"unavailable": false,
|
|
24918
|
+
"supportedReasoningLevels": [],
|
|
24919
|
+
"minCliVersion": "1.2.7"
|
|
24920
|
+
},
|
|
24921
|
+
{
|
|
24922
|
+
"id": "claude-opus-4-6-thinking",
|
|
24923
|
+
"displayName": "Claude Opus 4.6 Thinking",
|
|
24924
|
+
"unavailable": false,
|
|
24925
|
+
"supportedReasoningLevels": [],
|
|
24926
|
+
"minCliVersion": "1.2.7"
|
|
24927
|
+
},
|
|
24928
|
+
{
|
|
24929
|
+
"id": "gpt-oss-120b-medium",
|
|
24930
|
+
"displayName": "GPT-OSS 120B (Medium)",
|
|
24931
|
+
"unavailable": false,
|
|
24932
|
+
"supportedReasoningLevels": [],
|
|
24933
|
+
"minCliVersion": "1.2.7"
|
|
24934
|
+
}
|
|
24935
|
+
]
|
|
24936
|
+
},
|
|
23952
24937
|
"codex": {
|
|
23953
24938
|
"defaultModelId": "gpt-5.6-sol",
|
|
23954
24939
|
"models": [
|
|
@@ -26081,6 +27066,29 @@ const EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES = {
|
|
|
26081
27066
|
structuredUserInput: false
|
|
26082
27067
|
};
|
|
26083
27068
|
const BUILTIN_AGENT_CONTROLLER_DEFINITIONS = [
|
|
27069
|
+
{
|
|
27070
|
+
adapterId: "antigravity",
|
|
27071
|
+
agentId: "antigravity",
|
|
27072
|
+
capabilities: {
|
|
27073
|
+
approvals: false,
|
|
27074
|
+
cancel: true,
|
|
27075
|
+
interrupt: true,
|
|
27076
|
+
modelSelection: true,
|
|
27077
|
+
nativeEventStream: true,
|
|
27078
|
+
permissionModes: false,
|
|
27079
|
+
structuredUserInput: false
|
|
27080
|
+
},
|
|
27081
|
+
conversationOccupancy: {
|
|
27082
|
+
contractVersion: 1,
|
|
27083
|
+
mode: "unsupported"
|
|
27084
|
+
},
|
|
27085
|
+
installResolver: {
|
|
27086
|
+
resolveInstalledLaunchCandidates: resolveInstalledAntigravityLaunchCandidates,
|
|
27087
|
+
verifyLaunchContract: verifyAntigravityLaunchContract
|
|
27088
|
+
},
|
|
27089
|
+
nativeInterface: "local-cli",
|
|
27090
|
+
usageLimitSupport: resolveAgentControllerUsageLimitSupport("builtin:antigravity")
|
|
27091
|
+
},
|
|
26084
27092
|
{
|
|
26085
27093
|
adapterId: "claude-code",
|
|
26086
27094
|
agentId: "claude-code",
|
|
@@ -28123,9 +29131,9 @@ function createModelCatalogReadSession(input) {
|
|
|
28123
29131
|
async function readModelCatalogOnce(baseUrl) {
|
|
28124
29132
|
try {
|
|
28125
29133
|
const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
|
|
28126
|
-
import("./dist-
|
|
28127
|
-
import("./base-url-
|
|
28128
|
-
import("./api-client-foundation-
|
|
29134
|
+
import("./dist-RR7jryeV.js"),
|
|
29135
|
+
import("./base-url-CMBApK1J.js"),
|
|
29136
|
+
import("./api-client-foundation-CMVD057A.js")
|
|
28129
29137
|
]);
|
|
28130
29138
|
if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
|
|
28131
29139
|
const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
|
|
@@ -28419,9 +29427,9 @@ function resolveBoundProfileLocalRouteCandidate(input) {
|
|
|
28419
29427
|
const agentControllerCollaborationMode = resolveNativeAgentControllerCollaborationModeForController(binding.agentControllerCollaborationMode, { agentControllerRef: agentControllerRef.ref });
|
|
28420
29428
|
return {
|
|
28421
29429
|
agentControllerRef: agentControllerRef.ref,
|
|
28422
|
-
agentControllerConversationId: normalizeOptionalText$
|
|
29430
|
+
agentControllerConversationId: normalizeOptionalText$52(executionTarget.agentControllerConversationId),
|
|
28423
29431
|
openMeldServiceRuntimeId: executionTarget.openMeldServiceRuntimeId.value,
|
|
28424
|
-
bindingId: normalizeOptionalText$
|
|
29432
|
+
bindingId: normalizeOptionalText$52(binding.bindingId),
|
|
28425
29433
|
...agentControllerCollaborationMode ? { agentControllerCollaborationMode } : {},
|
|
28426
29434
|
...agentControllerPermissionMode ? { agentControllerPermissionMode } : {},
|
|
28427
29435
|
...binding.modelSelection ? { modelSelection: binding.modelSelection } : {},
|
|
@@ -28764,7 +29772,7 @@ async function repairLocalReplyStateOrThrow(input) {
|
|
|
28764
29772
|
mode: "repair"
|
|
28765
29773
|
});
|
|
28766
29774
|
} catch (error) {
|
|
28767
|
-
const errorMessage = toErrorMessage$
|
|
29775
|
+
const errorMessage = toErrorMessage$20(error);
|
|
28768
29776
|
emitRunLine({
|
|
28769
29777
|
presenter: input.presenter,
|
|
28770
29778
|
code: "daemon.run.projection_sync_failed",
|
|
@@ -28781,7 +29789,7 @@ async function repairLocalReplyStateOrThrow(input) {
|
|
|
28781
29789
|
try {
|
|
28782
29790
|
await syncProfileWorkspaceState({ mode: "repair" });
|
|
28783
29791
|
} catch (error) {
|
|
28784
|
-
const errorMessage = toErrorMessage$
|
|
29792
|
+
const errorMessage = toErrorMessage$20(error);
|
|
28785
29793
|
emitRunLine({
|
|
28786
29794
|
presenter: input.presenter,
|
|
28787
29795
|
code: "daemon.run.profile_workspace_sync_failed",
|
|
@@ -29882,7 +30890,7 @@ const DEFAULT_OPENCLAW_RUNTIME_PREPARATION_DEPS = {
|
|
|
29882
30890
|
fetchGatewayHealth: fetchOpenClawGatewayHealth
|
|
29883
30891
|
};
|
|
29884
30892
|
async function prepareOpenClawRuntime(input, deps = DEFAULT_OPENCLAW_RUNTIME_PREPARATION_DEPS) {
|
|
29885
|
-
const profileName = normalizeOptionalText$
|
|
30893
|
+
const profileName = normalizeOptionalText$52(input.profileName);
|
|
29886
30894
|
if (!profileName) throw new DaemonServiceRunError({
|
|
29887
30895
|
code: "controller.bootstrap.failed",
|
|
29888
30896
|
message: "controller.bootstrap.failed: OpenClaw bootstrap requires an OpenMeld profile name"
|
|
@@ -29945,12 +30953,12 @@ function buildOpenClawGatewayVisibilityFailure(error) {
|
|
|
29945
30953
|
}
|
|
29946
30954
|
function extractErrorCode(error) {
|
|
29947
30955
|
if (!(error && typeof error === "object" && "code" in error)) return;
|
|
29948
|
-
return normalizeOptionalText$
|
|
30956
|
+
return normalizeOptionalText$52(error.code) ?? void 0;
|
|
29949
30957
|
}
|
|
29950
30958
|
function resolveOpenClawGatewayVisibilityDiagnostics(error) {
|
|
29951
30959
|
if (!(error instanceof Error)) return;
|
|
29952
30960
|
const diagnostics = error.diagnostics;
|
|
29953
|
-
if (!diagnostics || typeof diagnostics !== "object" || !normalizeOptionalText$
|
|
30961
|
+
if (!diagnostics || typeof diagnostics !== "object" || !normalizeOptionalText$52(diagnostics.agentId)) return;
|
|
29954
30962
|
const parsedGatewayVisibility = openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema.safeParse(diagnostics.gatewayVisibility);
|
|
29955
30963
|
if (!parsedGatewayVisibility.success) return;
|
|
29956
30964
|
return {
|
|
@@ -29977,6 +30985,6 @@ async function prepareProviderRuntime(input, options = {}) {
|
|
|
29977
30985
|
return await preparer(input);
|
|
29978
30986
|
}
|
|
29979
30987
|
//#endregion
|
|
29980
|
-
export { canManageRegistryAgentSkillTargets as $,
|
|
30988
|
+
export { canManageRegistryAgentSkillTargets as $, areAgentControllerInterfaceAccountsSame as $n, mergeOpenClawGatewayVisibility as $t, createExpectedRoutesReadSession as A, runRuntimeTask as An, compareAgentControllerRefsForDisplay as Ar, ensureOpenMeldManagedProfileWorkspace as At, reconcileNewRunnableBuiltinAgentsForSetup as B, upsertConversationExecutionState as Bn, createMutableRouteCatalogState as Bt, createModelCatalogReadSession as C, verifyCodexAppServerThread as Cn, MAX_HEARTBEAT_INTERVAL_MS as Cr, resolveLocalProjectConnectionForPath as Ct, NO_LOCAL_AGENTS_NEED_OPENMELD_SERVICE_REASON as D, emitReconcileCompletedEvidence as Dn, pruneStaleLeases as Dr, resolveRegistryOriginLaunchCommand as Dt, resolveProfileWorkspaceRuntime as E, emitDriftDetectedEvidence as En, applyIntervalJitterMs as Er, listBuiltinAgentsRegistryEntries as Et, listAgentRegistrations as F, loadLedgerState as Fn, resolveConfiguredProfileWorkspacePathForAccount as Ft, updateAgentRegistrations as G, createUnavailableProviderUsageLimits as Gn, syncRuntimeEventToInflightTaskControlRegistry as Gt, resolveAgentTargetState as H, buildAuthenticatedControlPlaneResponse as Hn, summarizeSkippedDaemonProfiles as Ht, listAgentTargetStates as I, removeConversationExecutionState as In, setCustomProfileWorkspace as It, normalizeAgentIds as J, buildCliLaunchInvocation as Jn, isDaemonReconcileInProgressError as Jt, notifyDaemonRouteCatalogChanged as K, createUnsupportedProviderUsageLimits as Kn, SPACE_ACTION_CONTEXT_GUIDANCE_LINES as Kt, manageAgentRegistrationInstallation as L, resolveConversationExecutionStateByLookupKey as Ln, setOpenMeldManagedProfileWorkspace as Lt, addAgentCustomTarget as M, buildTaskResultEnvelope as Mn, readProfileWorkspaceConfig as Mt, createRegistrationFromCatalogTarget as N, appendLedgerHistoryEntry as Nn, readProfileWorkspaceConfigForAccount as Nt, syncDeviceRuntimeStateProjection as O, emitReconcileStartedEvidence as On, resolveAdaptiveHeartbeatIntervalMs as Or, resolveRegistryRuntimeAdapterCapabilitySnapshot as Ot, listAgentCustomTargets as P, commitResolvedAgentContext as Pn, resolveConfiguredProfileWorkspacePath as Pt, resolveLocalRegistryAgentIdFromAgentControllerRef as Q, DEFAULT_TASK_LIFECYCLE_HEARTBEAT_INTERVAL_MS as Qn, createPendingAgentInteractionRegistry as Qt, readAgentRuntimeConfigHealth as R, seedLegacyAgentContext as Rn, validateCustomProfileWorkspacePath as Rt, syncProfileWorkspaceState as S, resolveCodexAppServerCompletedTurn as Sn, ADAPTIVE_HEARTBEAT_JITTER_RATIO as Sr, canonicalizeLocalProjectPath as St, resolveEffectiveProfileWorkingFolderRuntime as T, parseAntigravityUsageLimits as Tn, applyAcceptedLeases as Tr, withAgentActivityLocalStateLock as Tt, setAgentRegistrationEnabled as U, assertLegacyAgentContextAssociation as Un, syncDaemonRouteCatalogState as Ut, removeAgentCustomTarget as V, withLedgerStateTransaction as Vn, createRouteCatalogFromMutableState as Vt, updateAgentCustomTarget as W, buildAgentContextLookupKey as Wn, normalizeDispatchThreadAction as Wt, sortAgentRegistrations as X, listAgentControllerSupervisedProcessIds as Xn, buildDispatchReplyContextSummary as Xt, parseAgentEnabledOption as Y, materializeCliLaunchCommand as Yn, createSerialAgentInteractionCallback as Yt, repairBuiltinControllerInstall as Z, createProviderOriginalError as Zn, normalizeDispatchPostMessageAction as Zt, loadDaemonRouteCatalog as _, resolveInstalledGrokBuildLaunchCandidates as _n, resolveAgentProfileEditCapabilities as _r, removeProjectConnection as _t, buildOpenClawSpaceSessionKey as a, resolveDispatchContinuityObservation as an, createAuthorityOpenMeldServiceRuntimeId as ar, isHomebrewCommandPath as at, resolveLocalController as b, resolveInstalledCodexLaunchCandidates as bn, resolveSelectableCandidates as br, setDefaultProjectConnection as bt, findOpenClawAgentById as c, resolveLatestScopedConversationExecutionState as cn, isAgentExecutionReadyOrConnecting as cr, ProjectBindingOperationError as ct, resolveOpenClawAuthStatus as d, createLocalAdapterEntries as dn, peopleComputerContainsDevice as dr, isProjectBound as dt, createLocalTaskInterruptSender as en, buildAgentControllerRef as er, detectInstalledSkillsAgents as et, resolveOpenClawProviderRuntimeWorkingDirectory as f, parseOpenCodeGoUsageResponse as fn, projectPeopleComputersToLegacyLocalRuntimes as fr, listProjectBindings as ft, writeDaemonRouteCatalogCache as g, probeGrokBuildAcpInterface as gn, resolveAgentExecutionStatus as gr, removeMissingProjectConnections as gt, readDaemonRouteCatalogCache as h, GrokBuildAcpTransportError as hn, resolveAgentControllerPermissionModeForController as hr, removeAgentActivityBindingsWhileDeliveryLocked as ht, listOpenClawGatewayAgents as i, resolveDispatchQueueLogMeta as in, createAgentExecutionStatusDisplayRows as ir, isBunGlobalCommandPath as it, resolveAgentProfilePrimaryAgentControllerReport as j, buildRuntimeWorkspaceFingerprint as jn, resolveBuiltinAgentControllerBrand as jr, normalizeCustomProfileWorkspacePath as jt, createPrimaryBindingReadSession as k, DaemonServiceRunError as kn, resolveCatalogSyncIntervalMs as kr, resolveRegistryRuntimeAdapterContractByAgentControllerRef as kt, findOpenClawAgentsByWorkspace as l, resolveCatalogSyncSkippedProfilesLogState as ln, listAgentControllerPermissionModeOptions as lr, ProjectBindingStoreUpdateRequiredError as lt, resolveOpenClawLocalBootstrapPaths as m, resolveInstalledOpenCodeLaunchCandidates as mn, renderWorkingLanguagePrompt as mr, migrateProjectBindingStore as mt, fetchOpenClawGatewayHealth as n, createLocalExecutionSlots as nn, buildWorkingLanguagePromptPlan as nr, EMPTY_AGENT_CONTROLLER_INTERFACE_CAPABILITIES as nt, normalizeOpenClawSpaceIdPrefix as o, resolveCompatibleAgentContextMatch as on, getAgentControllerPermissionModeDisplayMetadata as or, isNpmGlobalCommandPath as ot, readOpenClawLocalBootstrapState as p, forkOpenCodeServerSession as pn, renderInformationProtectionPrompt as pr, listProjectConnectionsWithStatus as pt, normalizeAgentId as q, resolveDispatchSpaceActionMcpServer as qn, SPACE_ACTION_TARGET_GUIDANCE_LINES as qt, listOpenClawAgents as r, createInflightTaskControlRegistry as rn, createAgentControllerInterfaceDisplayRows as rr, resolveBuiltinAgentControllerDefinition as rt, slugifyOpenClawNamePart as s, resolveCompatibleConversationExecutionState as sn, getAgentControllerPermissionModeFieldLabel as sr, isPnpmGlobalCommandPath as st, prepareProviderRuntime as t, buildLocalServiceDiagnosticsPayload as tn, buildInformationProtectionPromptPlan as tr, resolveSkillsAgentRegistry as tt, matchesExpectedWorkspace as u, createLocalAdapterContainer as un, parseAgentControllerRef as ur, bindProject as ut, buildRuntimeRouteTargets as v, projectCodexUsageLimits as vn, resolveEvidenceSyncHealth as vr, resolveProjectBindingForPath as vt, resolveCurrentEffectiveProfileWorkingFolderRuntime as w, resolveInstalledClaudeCodeLaunchCandidates as wn, MIN_HEARTBEAT_INTERVAL_MS as wr, withAgentActivityDeliveryLock as wt, resolveLocalRuntimeControllerSupport as x, forkCodexAppServerThread as xn, resolveRouteRegistrationReconcileDecision as xr, unbindProject as xt, readLocalEnabledControllers as y, resolveCodexTimeoutMs as yn, resolveNativeAgentControllerPermissionModeForController as yr, runIfAgentActivityBindingGenerationIsCurrent as yt, reconcileNewRunnableBuiltinAgentRegistrations as z, settleInflightTask as zn, describeProfileWorkspacePathValidationFailure as zt };
|
|
29981
30989
|
|
|
29982
|
-
//# sourceMappingURL=prepare-provider-runtime-
|
|
30990
|
+
//# sourceMappingURL=prepare-provider-runtime-DxaGSe3R.js.map
|