openmeld 0.3.145 → 0.3.147
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-2D5BlWyL.js → add-me-membership-C9IpIjBD.js} +2 -2
- package/dist/{add-me-membership-2D5BlWyL.js.map → add-me-membership-C9IpIjBD.js.map} +1 -1
- package/dist/{api-client-foundation-C9xMaR4i.js → api-client-foundation-BngNFCww.js} +2 -2
- package/dist/{api-client-foundation-C9xMaR4i.js.map → api-client-foundation-BngNFCww.js.map} +1 -1
- package/dist/{command-C93tfru0.js → command-DaXUm8Zj.js} +311 -150
- package/dist/{command-C93tfru0.js.map → command-DaXUm8Zj.js.map} +1 -1
- package/dist/{dist-QiJwpnJk.js → dist-yUGk9-aD.js} +57 -2
- package/dist/dist-yUGk9-aD.js.map +1 -0
- package/dist/openmeld.js +379 -125
- package/dist/openmeld.js.map +1 -1
- package/package.json +1 -1
- package/skills/openmeld-cli/SKILL.md +26 -2
- package/skills/openmeld-cli/playbooks/space-ops.md +32 -3
- package/skills/openmeld-cli/references/commands.md +21 -0
- package/dist/dist-QiJwpnJk.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { $ as resolveOpenMeldOrphanedLockIssue, $t as systemDir, At as legacyAccountProfileSpacesDir, B as toSpaceRemoveMembersUrl, C as updateConfiguredDeviceRuntimeState, Ct as accountProfileViewPath, D as normalizeBaseUrl, Dt as deviceOpenClawProfileDir, Et as deviceOpenClawProfileBootstrapPath, Ft as openMeldManagedBinaryPath, G as acquireLock, H as toSpaceUpdatesUrl, I as toSpaceLeaveUrl, It as openMeldManagedVersionBinaryPath, J as isOpenMeldOrphanedLockError, Jt as resolveOpenMeldRootDir, Kt as resolveOpenMeldEnvPreset, L as toSpaceMembersUrl, Lt as openMeldManagedVersionDir, M as toSpaceCursorUrl, Mt as normalizeOpenMeldProfileId, N as toSpaceDeleteUrl, Nt as openMeldBackupsDir, O as toDaemonRouteObservationUrl, Ot as deviceOpenClawProfileWorkspaceDir, Pt as openMeldBinDir, R as toSpaceMetaUrl, Rt as openMeldRootDir, S as setConfiguredSkillsConfig, St as accountProfileSpaceCacheDir, T as updateConfiguredSkillsConfig, Tt as accountsDir, U as toSpaceWsUrl, Ut as resolveDefaultOpenMeldHomeDirname, W as isLoopbackHostname, Wt as resolveExplicitOpenMeldEnvPreset, Xt as runtimeLogsDir, Yt as runtimeDir, Zt as skillsDir, _ as getConfiguredViewCustomization, _n as normalizeBuiltinAgentControllerId, a as resolveBaseUrl, an as runtimeStreamingModeSchema, at as readCliContextState, bt as OPENMELD_HOME_ENV_KEY, c as resolveExplicitGatewayUrlOrThrow, cn as buildAgentControllerConversationRef, ct as writeCliContextState, d as createDefaultRuntimeAgentControllerSettings, dn as HOSTED_CENTER_AGENT_CONTROLLER_REF, en as formatLocalMachineIssueMessage, et as runWithHeldLock, f as getConfiguredDaemonDispatchLimits, fn as HOSTED_CENTER_AGENT_CONTROLLER_REF_ID, ft as assessLocalMachineFailure, g as getConfiguredSkillsConfig, gn as canonicalizeBuiltinAgentControllerRef, h as getConfiguredOpenMeldToolsMaintenance, hn as canonicalizeAgentControllerRef, i as normalizeGatewayBaseUrlOrNull, it as listCliContextStates, j as toSpaceCreateUrl, jt as normalizeAccountKey, kt as isPublishedOpenMeldHome, l as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, ln as conversationPolicySchema, mn as buildAgentControllerRoutingKey, mt as createBackgroundExecutionBlockedIssue, nn as runtimeAgentControllerConversationIdMappingSpecSchema, o as resolveBaseUrlOrNull, on as runtimeTransportModeSchema, ot as resolveCliContext, p as getConfiguredDeviceRuntimeState, q as isOpenMeldLockError, qt as resolveOpenMeldPresetOwnedPathInput, r as normalizeGatewayBaseUrl, rn as runtimeAgentControllerLaunchContractSchema, s as resolveDefaultGatewayBaseUrl, st as resolveCliContextId, un as resolveBuiltinAgentControllerConversationKind, ut as resolveOpenMeldLaneDescriptor, v as getRuntimeConfigReadHealth, vn as normalizeKnownBuiltinAgentControllerId, vt as CURRENT_PROCESS_START_IDENTITY, wt as accountProfileWorkspacePath, x as setConfiguredOpenMeldToolsMaintenance, xt as accountProfileLocalMetaPath, y as resolveRuntimeSkillsCustomTargetId, yn as parseAgentControllerRef$1, yt as isProcessIdentityAlive, z as toSpacePasswordUrl, zt as openMeldVersionsDir } from "./base-url-CY_j4bLH.js";
|
|
4
|
-
import { $ as submitAgentControllerTaskLifecycleEventItemSchema, $t as
|
|
4
|
+
import { $ as submitAgentControllerTaskLifecycleEventItemSchema, $t as spaceMemberDirectoryAllowedRelationsSchema, A as MAX_TEXT_LENGTH, At as submitFeedbackIssueRequestSchema, B as toErrorMessage$44, Bt as AGENT_ACTIVITY_PRESENCE_TTL_MAX_MS, C as createSpaceApi, Cn as agentControllerCollaborationModeSchema, Ct as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_CODE, D as toStructuredApiClientFailure, Dt as profileCapabilitiesResponseSchema, E as resolveProfileSpaceHistoryGatewayHost, Et as authProfileManagedRoleSchema, F as OPENMELD_HEADER_PROFILE_ID, Ft as listCenterAgentRoutinesResponseSchema, Gt as agentActivitySnapshotResponseSchema, H as toErrorMessage$43, It as pauseCenterAgentRoutineResponseSchema, Jt as localProjectControlDiscoverProjectsResponseSchema, Kt as localProjectControlConnectionSchema, L as OPENMELD_HEADER_REQUEST_ID, Lt as resumeCenterAgentRoutineResponseSchema, M as parseIncoming$1, Mt as createCenterAgentRoutineResponseSchema, N as parseServerErrorFrame$1, Nt as deleteCenterAgentRoutineResponseSchema, O as DAEMON_STREAM_KEEPALIVE_PING, Ot as profileErrorResponseSchema, P as resolveCustomMentionAliasOverride, Pt as listCenterAgentRoutineRunsResponseSchema, Qt as spaceMemberAgentWakeAvailabilitySchema, R as OPENMELD_HEADER_SPACE_ADDRESSING_VERSION, Rt as updateCenterAgentRoutineResponseSchema, S as createRuntimeReportingApi, Sn as agentControllerPermissionModeSchema, St as organizationDirectoryResponseSchema, T as resolveAccountSpaceIndexGatewayHost, U as getSpaceUpdatesResponseSchema, V as sleep, Vt as agentActivityEventSchema, W as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, Xt as postSpaceMembersResponseSchema, Yt as leaveSpaceResponseSchema, Zt as removeSpaceMembersResponseSchema, _t as listOrganizationSkillsResponseSchema, a as buildSpaceAttachmentDownloadPath, at as gatewayErrorEnvelopeSchema, bt as organizationSkillSummarySchema, c as createAgentProfileBindingApi, cn as observedLocalAgentSessionSchema, ct as computerFileAccessDaemonFrameSchema, d as createCurrentDeviceApi, dn as listProjectsResponseSchema, dt as modelCatalogSchema, en as spaceMemberDirectoryEntrySchema, fn as projectSchema, ft as organizationSpaceDirectoryWithMemberCountsResponseSchema, g as createOrganizationApi, gt as getOrganizationSkillResponseSchema, h as createOpenMeldApiClient, hn as openCodePermissionConfigSchema, ht as spaceMetaSchema, i as buildProfileSpaceHistoryUpsertPath, j as parseEnvelope$1, jt as submitFeedbackIssueResponseSchema, kt as organizationComputersResponseSchema, ln as archiveProjectResponseSchema, lt as computerFileAccessPolicyInputSchema, m as createLocalRuntimeExpectedRoutesApi, mn as centerAgentToolSpeakerSchema, mt as spaceCreatorSchema, n as OpenMeldApiClientInvalidResponseError, nn as spaceMemberKindSchema, o as createAccountSpaceIndexApi, on as agentActivitySessionInventoryResponseSchema, ot as COMPUTER_FILE_ACCESS_RUNTIME_CAPABILITY, p as createFetchTransport, pn as updateProjectResponseSchema, pt as resolveInitialSpaceAccessMode, qt as localProjectControlDaemonFrameSchema, r as buildProfileSpaceHistoryStatusPath, s as createAgentActivityApi, st as OPENMELD_RUNTIME_CAPABILITIES_HEADER, t as OpenMeldApiClientHttpError, tn as spaceMemberDirectorySchema, un as createProjectResponseSchema, ut as computerFileAccessPolicySchema, wn as toCompatibleSpaceAddressingRequestWireValue, wt as ADDITIONAL_HUMAN_PROFILE_CREATION_DISABLED_MESSAGE, y as createProfileSpaceHistoryApi, yt as organizationSkillReleaseSummarySchema } from "./dist-yUGk9-aD.js";
|
|
5
5
|
import { $r as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, A as runtimeTransportRegisterSessionResponseSchema, Bn as agentInteractionResolutionSchema, C as runtimeTransportLocalAgentControlRefreshCatalogFramePayloadSchema, Cn as MESSAGE_MENTION_TYPE_VALUES, D as runtimeTransportOpenMeldToolsControlFramePayloadSchema, Dr as url, E as runtimeTransportLookupRouteOwnerServiceEvidenceSchema, En as getSpaceMessageAddressingRelationSupportForTargetKind, Fr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Gn as formatLocalSetupActionLabel, H as openMeldDaemonTaskResultEnvelopeWriteSchema, Hn as formatLocalComponentsSummaryDescription, Hr as resolveSpaceMentionLabels, I as runtimeTransportSubmitTaskResultRequestSchema, Ir as runtimeTransportDeliveryExecutionIdentitySchema, J as OPENMELD_LOCAL_FOLDER_PICKER_CAPABILITY_HEADER, K as openMeldSpaceEgressActionSchema, Kn as installedLocalComponentsSnapshotSchema, Kt as resolveSpaceFileMimeType, L as OPENMELD_ORIGINAL_ERROR_MAX_LENGTH, Ln as AGENT_INTERACTION_DEFAULT_TIMEOUT_MS, M as runtimeTransportResumeControllerConversationFramePayloadSchema, N as runtimeTransportResumeControllerConversationResultFramePayloadSchema, O as runtimeTransportOpenMeldToolsControlResultFramePayloadSchema, On as normalizeMessageEnvelope, P as runtimeTransportRouteCatalogChangedFramePayloadSchema, Qr as openMeldRequestContextSchema, R as isOriginalErrorSafeForMessageDetails, Rt as SPACE_FILE_MAX_SIZE_BYTES, S as runtimeTransportLocalAgentControlManageInstallationFramePayloadSchema, Si as resolveCommandAgentWorkActivity, Sr as string, St as sanitizeSignalTextPreview, T as runtimeTransportLocalAgentControlSetProfileWorkspaceFramePayloadSchema, Tn as formatCanonicalMentionLiteral, U as openMeldDaemonTaskResultOpenClawGatewayVisibilityStatusSchema, Un as formatLocalComponentsSummaryLabel, V as openMeldDaemonProviderAccessEvidenceSchema, Vr as resolveSingleSpaceMentionLabels, W as openMeldDaemonTaskResultPayloadSchema, Wn as formatLocalSetupActionDescription, X as localFolderPickerHelperProtocolResultSchema, Xt as spaceFileNameSchema, Y as localFolderPickerDaemonFrameSchema, Z as localFolderPickerHelperResultSchema, Zn as localServiceComponentUpdateProjectionSchema, Zr as openMeldProfileIdSchema, _ as runtimeTransportHeartbeatRequestSchema, _i as sanitizeDispatchErrorSummary, a as runtimeTransportCapabilitiesSchema, b as runtimeTransportLocalAgentControlForkSessionFramePayloadSchema, bt as SPACE_MENTION_REJECT_NOTICE_PURPOSE, c as runtimeTransportDispatchInteractionRequestSchema, cn as conversationExecutionStateSchema, d as runtimeTransportDispatchPreviewEndRequestSchema, di as trimmedStringFromUnknown, dr as enumFactory, ei as agentProfileIdSchema, er as openMeldToolsUpdateAttemptSchema, f as runtimeTransportDispatchPreviewRequestSchema, fi as MAX_TEXT_LENGTH$1, g as runtimeTransportForkAgentSessionResultSchema, gi as resolvePublicAgentFailureRecovery, h as runtimeTransportErrorCodeSchema, hi as resolvePublicAgentAvailabilityCopy, i as localWakeRouteReportSchema, in as openMeldDaemonControlPlaneResponseSchema, ir as openMeldToolsUpdateRequestSourceSchema, j as runtimeTransportRejectedProfileRegistrationSchema, jr as parseOptionalClientMessageId, k as runtimeTransportRegisterSessionRequestSchema, kn as resolveMessageEnvelopeTargetField, l as runtimeTransportDispatchInteractionResponseFramePayloadSchema, lr as discriminatedUnion, m as runtimeTransportDispatchToolActivityRequestSchema, mi as resolveMappedPublicAgentFailureReason, mr as literal, mt as CONVERSATION_CONTINUITY_WARNING_PURPOSE, n as daemonExecutionCompatibilitySchema, ni as openMeldRuntimeProfileIdSchema, o as runtimeTransportDeliverDispatchRequestSchema, oi as profileWorkspaceModeSchema, on as skippedDaemonProfileSchema, p as runtimeTransportDispatchRuntimeEvidenceRequestSchema, pr as iso, q as LOCAL_FOLDER_PICKER_RUNTIME_CAPABILITY, qn as localCliComponentUpdateProjectionSchema, r as daemonStreamFrameSchema, rn as openMeldDaemonControlPlaneRequestSchema, s as runtimeTransportDispatchInteractionDeliveredRequestSchema, sn as providerDispatchRuntimeContextSchema, sr as boolean, t as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, ti as normalizeOptionalWorkingDirectory, tr as openMeldToolsUpdateOperationPhaseSchema, u as runtimeTransportDispatchLifecycleRequestSchema, v as runtimeTransportHeartbeatResponseSchema, vi as shouldPreferMappedPublicAgentFailureReason, vt as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, w as runtimeTransportLocalAgentControlSetEnabledFramePayloadSchema, wn as collectCanonicalMentionTextFragments, x as runtimeTransportLocalAgentControlInterruptFramePayloadSchema, xr as strictObject, y as runtimeTransportLocalAgentControlCancelFramePayloadSchema, yt as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, zn as agentInteractionRequestSchema, zr as normalizeSpacePasswordText } from "./runtime-transport-QslOj6uZ.js";
|
|
6
6
|
import { r as daemonServiceLaneSchema, t as daemonServiceContractSchema } from "./service-contract-CRyDcIIf.js";
|
|
7
7
|
import { A as getDaemonRuntimeStatus, B as resolveDaemonServiceRuntimeMetadata, C as daemonServiceRepairJournalPath, D as daemonServiceUpdateWorkerBinaryExecutablePath, E as daemonServiceStableLauncherPath, F as readDaemonServiceLifecycleLockMeta, G as withDaemonServiceReconcileLock, H as rotateDaemonControlPlaneTokenIfExpired, I as readDaemonServiceLifecycleLockMetaWithCleanup, J as withDaemonServiceStopLock, K as withDaemonServiceRegistrationMutationLock, L as readDaemonServiceRuntimeSnapshot, M as installDaemon, N as isDaemonServiceRuntimeHeartbeatStale, O as daemonStatePath, P as readDaemonControlPlaneToken, R as releaseDaemonServiceLifecycleLock, S as daemonServiceRecognizedExecutablePaths$1, T as daemonServiceStableExecutableWrapperPath, U as setDaemonServiceRuntimeState, V as restoreDaemonInstallStateSnapshot, W as uninstallDaemon, X as writeDaemonLocalStateFile, Y as readDaemonLocalStateFile, _ as daemonRuntimeServiceManagerPath, a as DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV, b as daemonServiceExecutableWrapperPaths$1, c as DAEMON_SERVICE_RUNTIME_STATE_SCHEMA, d as clearDaemonServiceRuntimeState, f as daemonDispatchJournalPath, g as daemonRuntimeRootPath, h as daemonRuntimeDataPath, i as DAEMON_SERVICE_RUNTIME_AUTO_START_ENV, j as getDaemonStatus, k as ensureDaemonControlPlaneToken, l as DAEMON_SERVICE_RUNTIME_SYSTEM_SERVICE_ENV, m as daemonRuntimeBundlesPath, n as writeDaemonRuntimeLease, o as DAEMON_SERVICE_RUNTIME_DETACHED_ENV, p as daemonLifecycleJournalPath, q as withDaemonServiceRunLock, r as DAEMON_HEARTBEAT_STALE_MS, s as DAEMON_SERVICE_RUNTIME_MODE_ENV, t as readDaemonRuntimeLease, u as acquireDaemonServiceLifecycleLock, v as daemonRuntimeStateRootPath, w as daemonServiceStableBinaryExecutablePath, x as daemonServiceLegacyExecutableWrapperPath, y as daemonServiceActiveBundleStatePath, z as resolveDaemonControlPlaneEndpoint } from "./daemon-runtime-lease-6DIprlJy.js";
|
|
8
8
|
import { A as HEARTBEAT_RESPONSE_TIMEOUT_MS$1, B as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS$1, C as DAEMON_RUNTIME_CONTRACT_EPOCH$1, D as DEFAULT_GATEWAY_CHAIN_TIMEOUT_MS$1, E as DAEMON_STREAM_KEEPALIVE_PONG_TIMEOUT_MS$1, F as OPENCLAW_CLI_TIMEOUT_MS$1, H as RUNTIME_STATE_PERSIST_MIN_INTERVAL_MS$1, I as PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS$1, L as PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS$1, N as MIN_HEARTBEAT_INTERVAL_MS$2, O as DEFAULT_HEARTBEAT_INTERVAL_MS$1, R as REGISTER_RESPONSE_TIMEOUT_MS$1, S as CATALOG_SYNC_SIGNAL_POLL_INTERVAL_MS$1, T as DAEMON_STREAM_KEEPALIVE_INTERVAL_MS$1, V as RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS$1, a as beginAuthSessionTransition, h as setAuthSession, j as MAX_HEARTBEAT_INTERVAL_MS$2, l as getAuthSessionState, o as clearAuthSession, r as assertAuthSessionMutationAvailable, v as isBinaryDistribution, w as DAEMON_STREAM_CONNECT_TIMEOUT_MS$1, x as CATALOG_SYNC_RETRY_INTERVAL_MS$1, y as resolveOpenMeldDistribution } from "./auth-session-BFa5tO5y.js";
|
|
9
|
-
import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation-
|
|
9
|
+
import { a as AuthRequestCredentialError, c as buildOpenMeldRequestContextHeadersWithAuth, d as buildOpenMeldRequestContextFromProfile, f as buildOpenMeldRequestContextFromProfileIdentity, i as resolveSpaceRequestTimeoutMsForDiagnostics, l as buildRequestAuthHeaders, m as resolveAuthRequestCompatibility, n as createCliApiClientFoundation, o as buildOpenMeldProfileIdentityRequestHeadersWithAuth, p as deriveAuthBaseUrlFromGatewayUrl, r as fetchSpaceRequestWithTimeout, s as buildOpenMeldProfileRequestHeadersWithAuth, u as canAttachAuthTokenToRequest } from "./api-client-foundation-BngNFCww.js";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { homedir, tmpdir, userInfo } from "node:os";
|
|
12
12
|
import * as z$1 from "zod/v4";
|
|
@@ -506,6 +506,25 @@ const cliJsonRoutinesResumeEnvelopeSchema = defineStrictSuccessEnvelope("routine
|
|
|
506
506
|
const cliJsonRoutinesDeleteEnvelopeSchema = defineStrictSuccessEnvelope("routines.delete", deleteCenterAgentRoutineResponseSchema.shape);
|
|
507
507
|
const cliJsonRoutinesRunsEnvelopeSchema = defineStrictSuccessEnvelope("routines.runs", listCenterAgentRoutineRunsResponseSchema.shape);
|
|
508
508
|
const cliJsonSpaceMembersEnvelopeSchema = defineStrictSuccessEnvelope("space.members", spaceMemberDirectorySchema.shape);
|
|
509
|
+
const cliJsonSpaceMembersBriefEnvelopeSchema = defineStrictSuccessEnvelope("space.members.brief", {
|
|
510
|
+
spaceId: z$1.string().trim().min(1),
|
|
511
|
+
generatedAt: z$1.iso.datetime({ offset: true }),
|
|
512
|
+
members: z$1.array(z$1.strictObject({
|
|
513
|
+
profileId: z$1.string().trim().min(1),
|
|
514
|
+
displayName: z$1.string().trim().min(1),
|
|
515
|
+
profileKind: spaceMemberKindSchema,
|
|
516
|
+
primaryMentionLabel: z$1.string().trim().min(1),
|
|
517
|
+
allowedRelations: spaceMemberDirectoryAllowedRelationsSchema,
|
|
518
|
+
wakeAvailability: spaceMemberAgentWakeAvailabilitySchema.pick({
|
|
519
|
+
action: true,
|
|
520
|
+
phase: true,
|
|
521
|
+
reasonCode: true,
|
|
522
|
+
status: true,
|
|
523
|
+
summary: true
|
|
524
|
+
}).optional(),
|
|
525
|
+
canWakeNow: z$1.boolean().optional()
|
|
526
|
+
}))
|
|
527
|
+
});
|
|
509
528
|
const cliJsonSpaceListOrganizationEnvelopeSchema = defineStrictSuccessEnvelope("space.list.organization", {
|
|
510
529
|
scope: z$1.literal("organization"),
|
|
511
530
|
organizationId: organizationSpaceDirectoryWithMemberCountsResponseSchema.shape.organizationId,
|
|
@@ -578,6 +597,7 @@ const cliJsonOutputEnvelopeSchema = z$1.discriminatedUnion("type", [
|
|
|
578
597
|
cliJsonRoutinesDeleteEnvelopeSchema,
|
|
579
598
|
cliJsonRoutinesRunsEnvelopeSchema,
|
|
580
599
|
cliJsonSpaceMembersEnvelopeSchema,
|
|
600
|
+
cliJsonSpaceMembersBriefEnvelopeSchema,
|
|
581
601
|
cliJsonSpaceListOrganizationEnvelopeSchema,
|
|
582
602
|
cliJsonOrganizationDirectoryEnvelopeSchema,
|
|
583
603
|
cliJsonOrganizationComputersEnvelopeSchema,
|
|
@@ -3276,6 +3296,9 @@ function isSameContractState(current, candidate) {
|
|
|
3276
3296
|
function resolveOpenCodeDatabasePath(input) {
|
|
3277
3297
|
return join(normalizeOptionalText$76(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "opencode.db");
|
|
3278
3298
|
}
|
|
3299
|
+
function resolveOpenCodeAuthPath(input) {
|
|
3300
|
+
return join(normalizeOptionalText$76(input.xdgDataHome ?? process.env.XDG_DATA_HOME) ?? join(input.homeDir, ".local", "share"), "opencode", "auth.json");
|
|
3301
|
+
}
|
|
3279
3302
|
function normalizeOptionalText$76(value) {
|
|
3280
3303
|
const normalized = value?.trim();
|
|
3281
3304
|
return normalized ? normalized : null;
|
|
@@ -5838,7 +5861,7 @@ function resolveFileWorkActivity(input, operation) {
|
|
|
5838
5861
|
};
|
|
5839
5862
|
}
|
|
5840
5863
|
function readCommand(value) {
|
|
5841
|
-
const command = toRecord$
|
|
5864
|
+
const command = toRecord$18(value)?.command;
|
|
5842
5865
|
if (typeof command === "string" && command.trim().length > 0) return command;
|
|
5843
5866
|
if (Array.isArray(command)) {
|
|
5844
5867
|
const joined = command.filter((part) => typeof part === "string").join(" ").trim();
|
|
@@ -5847,14 +5870,14 @@ function readCommand(value) {
|
|
|
5847
5870
|
return null;
|
|
5848
5871
|
}
|
|
5849
5872
|
function readFilePath$1(value) {
|
|
5850
|
-
const record = toRecord$
|
|
5873
|
+
const record = toRecord$18(value);
|
|
5851
5874
|
for (const candidate of [
|
|
5852
5875
|
record?.file_path,
|
|
5853
5876
|
record?.filePath,
|
|
5854
5877
|
record?.path
|
|
5855
5878
|
]) if (typeof candidate === "string" && candidate.trim().length > 0) return candidate.trim();
|
|
5856
5879
|
if (Array.isArray(record?.changes)) for (const change of record.changes) {
|
|
5857
|
-
const path = toRecord$
|
|
5880
|
+
const path = toRecord$18(change)?.path;
|
|
5858
5881
|
if (typeof path === "string" && path.trim().length > 0) return path.trim();
|
|
5859
5882
|
}
|
|
5860
5883
|
return null;
|
|
@@ -5862,7 +5885,7 @@ function readFilePath$1(value) {
|
|
|
5862
5885
|
function normalizeProviderToolName(value) {
|
|
5863
5886
|
return typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
5864
5887
|
}
|
|
5865
|
-
function toRecord$
|
|
5888
|
+
function toRecord$18(value) {
|
|
5866
5889
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
5867
5890
|
}
|
|
5868
5891
|
//#endregion
|
|
@@ -5906,10 +5929,10 @@ function createAcpToolActivityTracker() {
|
|
|
5906
5929
|
} };
|
|
5907
5930
|
}
|
|
5908
5931
|
function extractAcpToolActivityObservation(value) {
|
|
5909
|
-
const message = toRecord$
|
|
5932
|
+
const message = toRecord$17(value);
|
|
5910
5933
|
if (message?.method !== "session/update") return null;
|
|
5911
|
-
const params = toRecord$
|
|
5912
|
-
const update = toRecord$
|
|
5934
|
+
const params = toRecord$17(message.params);
|
|
5935
|
+
const update = toRecord$17(params?.update);
|
|
5913
5936
|
const updateType = normalizeOptionalText$73(update?.sessionUpdate);
|
|
5914
5937
|
if (!(update && (updateType === "tool_call" || updateType === "tool_call_update"))) return null;
|
|
5915
5938
|
const toolCallId = normalizeOptionalText$73(update.toolCallId ?? update.tool_call_id);
|
|
@@ -5949,7 +5972,7 @@ function resolveAcpToolWorkActivity(input) {
|
|
|
5949
5972
|
return resolveAdapterToolWorkActivity(input.providerToolName, input.providerInput);
|
|
5950
5973
|
}
|
|
5951
5974
|
function resolveAcpFileEvidenceInput(input) {
|
|
5952
|
-
const providerInput = toRecord$
|
|
5975
|
+
const providerInput = toRecord$17(input.providerInput);
|
|
5953
5976
|
if (providerInput && readFilePath(providerInput)) return providerInput;
|
|
5954
5977
|
const locationPath = readLocationPath(input.providerLocations);
|
|
5955
5978
|
if (!locationPath) return null;
|
|
@@ -5968,7 +5991,7 @@ function readFilePath(value) {
|
|
|
5968
5991
|
if (path) return path;
|
|
5969
5992
|
}
|
|
5970
5993
|
if (Array.isArray(value.changes)) for (const change of value.changes) {
|
|
5971
|
-
const path = normalizeOptionalText$73(toRecord$
|
|
5994
|
+
const path = normalizeOptionalText$73(toRecord$17(change)?.path);
|
|
5972
5995
|
if (path) return path;
|
|
5973
5996
|
}
|
|
5974
5997
|
return null;
|
|
@@ -5976,15 +5999,15 @@ function readFilePath(value) {
|
|
|
5976
5999
|
function readLocationPath(value) {
|
|
5977
6000
|
if (!Array.isArray(value)) return null;
|
|
5978
6001
|
for (const location of value) {
|
|
5979
|
-
const path = normalizeOptionalText$73(toRecord$
|
|
6002
|
+
const path = normalizeOptionalText$73(toRecord$17(location)?.path);
|
|
5980
6003
|
if (path) return path;
|
|
5981
6004
|
}
|
|
5982
6005
|
return null;
|
|
5983
6006
|
}
|
|
5984
6007
|
function mergeProviderPatch(current, patch) {
|
|
5985
6008
|
if (patch === void 0 || patch === null) return current;
|
|
5986
|
-
const currentRecord = toRecord$
|
|
5987
|
-
const patchRecord = toRecord$
|
|
6009
|
+
const currentRecord = toRecord$17(current);
|
|
6010
|
+
const patchRecord = toRecord$17(patch);
|
|
5988
6011
|
if (currentRecord && patchRecord) return {
|
|
5989
6012
|
...currentRecord,
|
|
5990
6013
|
...patchRecord
|
|
@@ -6001,7 +6024,7 @@ function normalizeOptionalText$73(value) {
|
|
|
6001
6024
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
6002
6025
|
return normalized.length > 0 ? normalized : null;
|
|
6003
6026
|
}
|
|
6004
|
-
function toRecord$
|
|
6027
|
+
function toRecord$17(value) {
|
|
6005
6028
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
6006
6029
|
}
|
|
6007
6030
|
//#endregion
|
|
@@ -6117,17 +6140,18 @@ function normalizeOptionalText$72(value) {
|
|
|
6117
6140
|
//#region ../../runtime/adapters/core/dist/provider-usage-limits.js
|
|
6118
6141
|
const PROVIDER_USAGE_LIMIT_KEY = "provider";
|
|
6119
6142
|
const PROVIDER_USAGE_LIMIT_LABEL = "Usage limits";
|
|
6120
|
-
function createUnsupportedProviderUsageLimits(observedAt) {
|
|
6121
|
-
return [createProviderUsageLimitWithoutFacts("unsupported", observedAt)];
|
|
6143
|
+
function createUnsupportedProviderUsageLimits(observedAt, provider) {
|
|
6144
|
+
return [createProviderUsageLimitWithoutFacts("unsupported", observedAt, provider)];
|
|
6122
6145
|
}
|
|
6123
|
-
function createUnavailableProviderUsageLimits(observedAt) {
|
|
6124
|
-
return [createProviderUsageLimitWithoutFacts("unavailable", observedAt)];
|
|
6146
|
+
function createUnavailableProviderUsageLimits(observedAt, provider) {
|
|
6147
|
+
return [createProviderUsageLimitWithoutFacts("unavailable", observedAt, provider)];
|
|
6125
6148
|
}
|
|
6126
|
-
function createProviderUsageLimitWithoutFacts(status, observedAt) {
|
|
6149
|
+
function createProviderUsageLimitWithoutFacts(status, observedAt, provider) {
|
|
6127
6150
|
return {
|
|
6128
|
-
key: PROVIDER_USAGE_LIMIT_KEY,
|
|
6151
|
+
key: provider ? `${provider.id}:${PROVIDER_USAGE_LIMIT_KEY}` : PROVIDER_USAGE_LIMIT_KEY,
|
|
6129
6152
|
label: PROVIDER_USAGE_LIMIT_LABEL,
|
|
6130
6153
|
observedAt,
|
|
6154
|
+
...provider ? { provider } : {},
|
|
6131
6155
|
resetsAt: null,
|
|
6132
6156
|
status,
|
|
6133
6157
|
usedPercent: null
|
|
@@ -6863,7 +6887,7 @@ function createClaudeAgentSdkToolActivityTracker() {
|
|
|
6863
6887
|
} };
|
|
6864
6888
|
}
|
|
6865
6889
|
function extractClaudeToolLifecycleObservations(message) {
|
|
6866
|
-
const record = toRecord$
|
|
6890
|
+
const record = toRecord$16(message);
|
|
6867
6891
|
if (!record) return [];
|
|
6868
6892
|
if (record.type === "tool_progress") {
|
|
6869
6893
|
const toolCallId = normalizeOptionalText$68(record.tool_use_id);
|
|
@@ -6901,14 +6925,14 @@ function extractClaudeToolLifecycleObservations(message) {
|
|
|
6901
6925
|
});
|
|
6902
6926
|
}
|
|
6903
6927
|
function readMessageContent(message) {
|
|
6904
|
-
const record = toRecord$
|
|
6928
|
+
const record = toRecord$16(message);
|
|
6905
6929
|
if (!(record && Array.isArray(record.content))) return [];
|
|
6906
6930
|
return record.content.flatMap((block) => {
|
|
6907
|
-
const parsed = toRecord$
|
|
6931
|
+
const parsed = toRecord$16(block);
|
|
6908
6932
|
return parsed ? [parsed] : [];
|
|
6909
6933
|
});
|
|
6910
6934
|
}
|
|
6911
|
-
function toRecord$
|
|
6935
|
+
function toRecord$16(value) {
|
|
6912
6936
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
6913
6937
|
}
|
|
6914
6938
|
function normalizeOptionalText$68(value) {
|
|
@@ -6943,15 +6967,15 @@ const WINDOW_DISPLAY_BY_TYPE = {
|
|
|
6943
6967
|
}
|
|
6944
6968
|
};
|
|
6945
6969
|
function projectClaudeCodeUsageLimits(input) {
|
|
6946
|
-
const event = toRecord$
|
|
6970
|
+
const event = toRecord$15(input.event);
|
|
6947
6971
|
if (event?.type !== "rate_limit_event") return [];
|
|
6948
|
-
const info = toRecord$
|
|
6972
|
+
const info = toRecord$15(event.rate_limit_info);
|
|
6949
6973
|
if (!info) return [];
|
|
6950
|
-
const unifiedWindows = toRecord$
|
|
6974
|
+
const unifiedWindows = toRecord$15(info.unifiedWindows);
|
|
6951
6975
|
const unifiedLimits = unifiedWindows ? SUPPORTED_RATE_LIMIT_TYPES.flatMap((rateLimitType) => projectUsageLimit({
|
|
6952
6976
|
observedAt: input.observedAt,
|
|
6953
6977
|
rateLimitType,
|
|
6954
|
-
window: toRecord$
|
|
6978
|
+
window: toRecord$15(unifiedWindows[rateLimitType])
|
|
6955
6979
|
})) : [];
|
|
6956
6980
|
if (unifiedLimits.length > 0) return unifiedLimits;
|
|
6957
6981
|
const rateLimitType = readRateLimitType(info?.rateLimitType);
|
|
@@ -6987,7 +7011,7 @@ function readResetTime$1(value) {
|
|
|
6987
7011
|
const date = /* @__PURE__ */ new Date(value * SECONDS_PER_MILLISECOND$1);
|
|
6988
7012
|
return Number.isNaN(date.getTime()) ? null : date.toISOString();
|
|
6989
7013
|
}
|
|
6990
|
-
function toRecord$
|
|
7014
|
+
function toRecord$15(value) {
|
|
6991
7015
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
6992
7016
|
}
|
|
6993
7017
|
//#endregion
|
|
@@ -7190,12 +7214,12 @@ async function resolveAskUserQuestion(input) {
|
|
|
7190
7214
|
};
|
|
7191
7215
|
}
|
|
7192
7216
|
function mapClaudeQuestion(value, questionIndex) {
|
|
7193
|
-
const question = toRecord$
|
|
7217
|
+
const question = toRecord$14(value) ?? {};
|
|
7194
7218
|
const providerQuestion = normalizeBoundedText$4(question.question, 4e3) ?? `Question ${questionIndex + 1}`;
|
|
7195
7219
|
const questionId = `claude-question-${questionIndex}`;
|
|
7196
7220
|
const optionLabelById = /* @__PURE__ */ new Map();
|
|
7197
7221
|
const options = (Array.isArray(question.options) ? question.options : []).slice(0, 20).map((value, optionIndex) => {
|
|
7198
|
-
const option = toRecord$
|
|
7222
|
+
const option = toRecord$14(value) ?? {};
|
|
7199
7223
|
const label = normalizeBoundedText$4(option.label, 240) ?? `Option ${optionIndex + 1}`;
|
|
7200
7224
|
const optionId = `${questionId}-option-${optionIndex}`;
|
|
7201
7225
|
optionLabelById.set(optionId, label);
|
|
@@ -7276,7 +7300,7 @@ async function resolveUrlElicitation(input) {
|
|
|
7276
7300
|
}
|
|
7277
7301
|
async function resolveFormElicitation(input) {
|
|
7278
7302
|
const schema = input.request.requestedSchema;
|
|
7279
|
-
const properties = toRecord$
|
|
7303
|
+
const properties = toRecord$14(schema?.properties);
|
|
7280
7304
|
if (!properties) return { action: "decline" };
|
|
7281
7305
|
const fields = Object.entries(properties).map(([name, value], index) => mapElicitationField(name, value, index));
|
|
7282
7306
|
if (fields.length === 0) return { action: "decline" };
|
|
@@ -7305,8 +7329,8 @@ async function resolveFormElicitation(input) {
|
|
|
7305
7329
|
};
|
|
7306
7330
|
}
|
|
7307
7331
|
function mapElicitationField(name, value, fieldIndex) {
|
|
7308
|
-
const field = toRecord$
|
|
7309
|
-
const rawValues = resolveElicitationOptionValues(field, toRecord$
|
|
7332
|
+
const field = toRecord$14(value) ?? {};
|
|
7333
|
+
const rawValues = resolveElicitationOptionValues(field, toRecord$14(field.items));
|
|
7310
7334
|
const questionId = `claude-elicitation-field-${fieldIndex}`;
|
|
7311
7335
|
const optionValueById = /* @__PURE__ */ new Map();
|
|
7312
7336
|
const options = rawValues.slice(0, 20).map((rawValue, optionIndex) => {
|
|
@@ -7354,7 +7378,7 @@ function normalizeBoundedText$4(value, maxLength) {
|
|
|
7354
7378
|
const normalized = String(value ?? "").trim();
|
|
7355
7379
|
return normalized ? normalized.slice(0, maxLength) : null;
|
|
7356
7380
|
}
|
|
7357
|
-
function toRecord$
|
|
7381
|
+
function toRecord$14(value) {
|
|
7358
7382
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
7359
7383
|
return value;
|
|
7360
7384
|
}
|
|
@@ -8949,12 +8973,12 @@ const CODEX_TOOL_ITEM_TYPES = /* @__PURE__ */ new Set([
|
|
|
8949
8973
|
"web_search"
|
|
8950
8974
|
]);
|
|
8951
8975
|
function extractCodexToolActivityEvent(value, fallbackObservedAtMs = Date.now()) {
|
|
8952
|
-
const record = toRecord$
|
|
8976
|
+
const record = toRecord$13(value);
|
|
8953
8977
|
if (!record) return null;
|
|
8954
8978
|
const lifecycle = resolveLifecycle(record);
|
|
8955
8979
|
if (!lifecycle) return null;
|
|
8956
|
-
const params = toRecord$
|
|
8957
|
-
const item = toRecord$
|
|
8980
|
+
const params = toRecord$13(record.params);
|
|
8981
|
+
const item = toRecord$13(params?.item ?? record.item);
|
|
8958
8982
|
const itemType = normalizeCompactName(item?.type);
|
|
8959
8983
|
const toolCallId = normalizeOptionalText$61(item?.id);
|
|
8960
8984
|
if (!(item && toolCallId && CODEX_TOOL_ITEM_TYPES.has(itemType))) return null;
|
|
@@ -8984,14 +9008,14 @@ function resolveLifecycle(record) {
|
|
|
8984
9008
|
}
|
|
8985
9009
|
function resolveCodexToolActivityName(itemType, item) {
|
|
8986
9010
|
if (itemType === "websearch" || itemType === "web_search") {
|
|
8987
|
-
const actionType = normalizeCompactName(toRecord$
|
|
9011
|
+
const actionType = normalizeCompactName(toRecord$13(item.action)?.type);
|
|
8988
9012
|
return actionType === "openpage" || actionType === "open_page" ? "agent_open_webpage" : "agent_search_web";
|
|
8989
9013
|
}
|
|
8990
9014
|
return resolveAdapterToolActivityName(itemType);
|
|
8991
9015
|
}
|
|
8992
9016
|
function isFailedCodexItem(item) {
|
|
8993
9017
|
const status = normalizeCompactName(item.status);
|
|
8994
|
-
return status === "failed" || status === "declined" || item.success === false || toRecord$
|
|
9018
|
+
return status === "failed" || status === "declined" || item.success === false || toRecord$13(item.error) !== null;
|
|
8995
9019
|
}
|
|
8996
9020
|
function resolveObservedAtMs(input) {
|
|
8997
9021
|
const candidate = input.lifecycle === "started" ? input.params?.startedAtMs ?? input.record.startedAtMs : input.params?.completedAtMs ?? input.record.completedAtMs;
|
|
@@ -9004,7 +9028,7 @@ function normalizeOptionalText$61(value) {
|
|
|
9004
9028
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
9005
9029
|
return normalized.length > 0 ? normalized : null;
|
|
9006
9030
|
}
|
|
9007
|
-
function toRecord$
|
|
9031
|
+
function toRecord$13(value) {
|
|
9008
9032
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
9009
9033
|
}
|
|
9010
9034
|
//#endregion
|
|
@@ -9325,10 +9349,10 @@ async function probeCodexAppServerAccount(input) {
|
|
|
9325
9349
|
launchContract: input.launchContract,
|
|
9326
9350
|
startupTimeoutMs: timeoutMs
|
|
9327
9351
|
}, async (session, initialized) => {
|
|
9328
|
-
const response = toRecord$
|
|
9352
|
+
const response = toRecord$12(await session.request("account/read", {}));
|
|
9329
9353
|
return {
|
|
9330
9354
|
authStatus: resolveCodexAppServerAuthStatus({
|
|
9331
|
-
account: toRecord$
|
|
9355
|
+
account: toRecord$12(response?.account),
|
|
9332
9356
|
response
|
|
9333
9357
|
}),
|
|
9334
9358
|
version: parseCodexAppServerVersion(initialized)
|
|
@@ -9625,7 +9649,7 @@ async function resolveCodexAppServerCollaborationMode(input) {
|
|
|
9625
9649
|
errorType: "adapter",
|
|
9626
9650
|
message: "protocol.invalid: Codex Plan collaboration mode requires a resolved model"
|
|
9627
9651
|
});
|
|
9628
|
-
const response = toRecord$
|
|
9652
|
+
const response = toRecord$12(await input.session.requestControl("collaborationMode/list", {}, {
|
|
9629
9653
|
code: "runtime.control_timeout",
|
|
9630
9654
|
operation: "collaborationMode/list"
|
|
9631
9655
|
}));
|
|
@@ -9653,7 +9677,7 @@ async function resolveCodexAppServerTurnCollaborationMode(input) {
|
|
|
9653
9677
|
});
|
|
9654
9678
|
}
|
|
9655
9679
|
function readCodexAppServerCollaborationModePreset(value) {
|
|
9656
|
-
const preset = toRecord$
|
|
9680
|
+
const preset = toRecord$12(value);
|
|
9657
9681
|
const mode = normalizeOptionalText$60(preset?.mode);
|
|
9658
9682
|
if (mode !== "default" && mode !== "plan") return null;
|
|
9659
9683
|
return {
|
|
@@ -10023,10 +10047,10 @@ var CodexAppServerSession = class {
|
|
|
10023
10047
|
});
|
|
10024
10048
|
}
|
|
10025
10049
|
async waitForTurnCompleted(input) {
|
|
10026
|
-
const turn = toRecord$
|
|
10050
|
+
const turn = toRecord$12(toRecord$12((await this.#waitForNotification((candidate) => {
|
|
10027
10051
|
if (candidate.method !== "turn/completed") return false;
|
|
10028
|
-
const params = toRecord$
|
|
10029
|
-
const turn = toRecord$
|
|
10052
|
+
const params = toRecord$12(candidate.params);
|
|
10053
|
+
const turn = toRecord$12(params?.turn);
|
|
10030
10054
|
return params?.threadId === input.threadId && normalizeOptionalText$60(turn?.id) === input.turnId;
|
|
10031
10055
|
})).params)?.turn);
|
|
10032
10056
|
if (!turn) throw new CodexAppServerTransportError({
|
|
@@ -10141,11 +10165,11 @@ var CodexAppServerSession = class {
|
|
|
10141
10165
|
}
|
|
10142
10166
|
#observeContextTelemetry(message) {
|
|
10143
10167
|
if (message.method === "thread/tokenUsage/updated") {
|
|
10144
|
-
const tokenUsage = readCodexTokenUsage(toRecord$
|
|
10168
|
+
const tokenUsage = readCodexTokenUsage(toRecord$12(message.params)?.tokenUsage);
|
|
10145
10169
|
if (tokenUsage) this.#latestTokenUsage = tokenUsage;
|
|
10146
10170
|
return;
|
|
10147
10171
|
}
|
|
10148
|
-
if ((message.method === "item/started" || message.method === "item/completed") && toRecord$
|
|
10172
|
+
if ((message.method === "item/started" || message.method === "item/completed") && toRecord$12(toRecord$12(message.params)?.item)?.type === "contextCompaction") this.#contextCompactionObserved = true;
|
|
10149
10173
|
}
|
|
10150
10174
|
async #handleServerRequest(message) {
|
|
10151
10175
|
const id = message.id;
|
|
@@ -10153,7 +10177,7 @@ var CodexAppServerSession = class {
|
|
|
10153
10177
|
const result = this.#onInteractionRequest ? await resolveCodexServerInteraction({
|
|
10154
10178
|
method: message.method,
|
|
10155
10179
|
onCancel: async () => {
|
|
10156
|
-
const params = toRecord$
|
|
10180
|
+
const params = toRecord$12(message.params) ?? {};
|
|
10157
10181
|
const threadId = readRequiredText(params.threadId, "requestUserInput params.threadId");
|
|
10158
10182
|
const turnId = readRequiredText(params.turnId, "requestUserInput params.turnId");
|
|
10159
10183
|
this.#interactionFailure = {
|
|
@@ -10198,7 +10222,7 @@ var CodexAppServerSession = class {
|
|
|
10198
10222
|
}
|
|
10199
10223
|
#collectAgentMessageDelta(message) {
|
|
10200
10224
|
if (message.method !== "item/agentMessage/delta") return;
|
|
10201
|
-
const params = toRecord$
|
|
10225
|
+
const params = toRecord$12(message.params);
|
|
10202
10226
|
const itemId = normalizeOptionalText$60(params?.itemId);
|
|
10203
10227
|
const delta = readAgentMessageDeltaText(params?.delta);
|
|
10204
10228
|
if (!(itemId && delta)) return;
|
|
@@ -10288,10 +10312,10 @@ var CodexAppServerSession = class {
|
|
|
10288
10312
|
}
|
|
10289
10313
|
};
|
|
10290
10314
|
function readThreadIdFromResponse(value) {
|
|
10291
|
-
return readRequiredText(toRecord$
|
|
10315
|
+
return readRequiredText(toRecord$12(value)?.thread?.id, "thread response thread.id");
|
|
10292
10316
|
}
|
|
10293
10317
|
function readThreadContextFromResponse(value) {
|
|
10294
|
-
const response = toRecord$
|
|
10318
|
+
const response = toRecord$12(value);
|
|
10295
10319
|
return {
|
|
10296
10320
|
model: normalizeOptionalText$60(response?.model),
|
|
10297
10321
|
threadId: readRequiredText(response?.thread?.id, "thread response thread.id"),
|
|
@@ -10299,7 +10323,7 @@ function readThreadContextFromResponse(value) {
|
|
|
10299
10323
|
};
|
|
10300
10324
|
}
|
|
10301
10325
|
function readTurnStartResponse(value) {
|
|
10302
|
-
const turn = toRecord$
|
|
10326
|
+
const turn = toRecord$12(value)?.turn;
|
|
10303
10327
|
if (!turn || typeof turn !== "object") throw new CodexAppServerTransportError({
|
|
10304
10328
|
code: "protocol.invalid",
|
|
10305
10329
|
errorType: "adapter",
|
|
@@ -10318,7 +10342,7 @@ function readTurnFailureCodexErrorInfo(turn) {
|
|
|
10318
10342
|
return normalizeOptionalText$60(turn.error?.codexErrorInfo);
|
|
10319
10343
|
}
|
|
10320
10344
|
function readCodexTokenUsage(value) {
|
|
10321
|
-
const usage = toRecord$
|
|
10345
|
+
const usage = toRecord$12(value);
|
|
10322
10346
|
const last = readCodexTokenUsageBreakdown(usage?.last);
|
|
10323
10347
|
const total = readCodexTokenUsageBreakdown(usage?.total);
|
|
10324
10348
|
const rawModelContextWindow = usage?.modelContextWindow;
|
|
@@ -10331,7 +10355,7 @@ function readCodexTokenUsage(value) {
|
|
|
10331
10355
|
};
|
|
10332
10356
|
}
|
|
10333
10357
|
function readCodexTokenUsageBreakdown(value) {
|
|
10334
|
-
const usage = toRecord$
|
|
10358
|
+
const usage = toRecord$12(value);
|
|
10335
10359
|
const cachedInputTokens = readNonNegativeInteger(usage?.cachedInputTokens);
|
|
10336
10360
|
const inputTokens = readNonNegativeInteger(usage?.inputTokens);
|
|
10337
10361
|
const outputTokens = readNonNegativeInteger(usage?.outputTokens);
|
|
@@ -10398,7 +10422,7 @@ async function resolveCodexServerInteraction(input) {
|
|
|
10398
10422
|
}
|
|
10399
10423
|
}
|
|
10400
10424
|
async function resolveCommandApprovalInteraction(input) {
|
|
10401
|
-
const params = toRecord$
|
|
10425
|
+
const params = toRecord$12(input.params) ?? {};
|
|
10402
10426
|
const command = normalizeBoundedText$3(input.legacy && Array.isArray(params.command) ? params.command.map(String).join(" ") : params.command, 16e3) ?? "Command details were not provided.";
|
|
10403
10427
|
const cwd = normalizeBoundedText$3(params.cwd, 4096);
|
|
10404
10428
|
const mappedOptions = (input.legacy ? [
|
|
@@ -10463,7 +10487,7 @@ function presentCommandApprovalDecision(decision) {
|
|
|
10463
10487
|
label: "Deny"
|
|
10464
10488
|
};
|
|
10465
10489
|
if (decision === "cancel" || decision === "abort") return null;
|
|
10466
|
-
const record = toRecord$
|
|
10490
|
+
const record = toRecord$12(decision);
|
|
10467
10491
|
if (record?.acceptWithExecpolicyAmendment) return {
|
|
10468
10492
|
intent: "allow_always",
|
|
10469
10493
|
label: "Allow matching commands"
|
|
@@ -10475,7 +10499,7 @@ function presentCommandApprovalDecision(decision) {
|
|
|
10475
10499
|
return null;
|
|
10476
10500
|
}
|
|
10477
10501
|
async function resolveFileChangeApprovalInteraction(input) {
|
|
10478
|
-
const params = toRecord$
|
|
10502
|
+
const params = toRecord$12(input.params) ?? {};
|
|
10479
10503
|
const resource = input.legacy ? normalizeBoundedText$3(safeJsonStringify(params.fileChanges), 4096) : normalizeBoundedText$3(params.grantRoot, 4096);
|
|
10480
10504
|
const options = [
|
|
10481
10505
|
{
|
|
@@ -10519,7 +10543,7 @@ async function resolveFileChangeApprovalInteraction(input) {
|
|
|
10519
10543
|
return { decision: input.legacy ? { denied: { rejection: "Denied by the user." } } : "decline" };
|
|
10520
10544
|
}
|
|
10521
10545
|
async function resolveUserInputInteraction(input) {
|
|
10522
|
-
const params = toRecord$
|
|
10546
|
+
const params = toRecord$12(input.params) ?? {};
|
|
10523
10547
|
const rawQuestions = Array.isArray(params.questions) ? params.questions : [];
|
|
10524
10548
|
const answers = {};
|
|
10525
10549
|
for (let offset = 0; offset < rawQuestions.length; offset += 3) {
|
|
@@ -10543,12 +10567,12 @@ async function resolveUserInputInteraction(input) {
|
|
|
10543
10567
|
return { answers };
|
|
10544
10568
|
}
|
|
10545
10569
|
function mapCodexQuestion(value, questionIndex) {
|
|
10546
|
-
const question = toRecord$
|
|
10570
|
+
const question = toRecord$12(value) ?? {};
|
|
10547
10571
|
const questionId = normalizeBoundedText$3(question.id, 256) ?? `codex-question-${questionIndex}`;
|
|
10548
10572
|
const rawOptions = Array.isArray(question.options) ? question.options.slice(0, 20) : [];
|
|
10549
10573
|
const optionValueById = /* @__PURE__ */ new Map();
|
|
10550
10574
|
const options = rawOptions.map((rawOption, optionIndex) => {
|
|
10551
|
-
const option = toRecord$
|
|
10575
|
+
const option = toRecord$12(rawOption) ?? {};
|
|
10552
10576
|
const label = normalizeBoundedText$3(option.label, 240) ?? `Option ${optionIndex + 1}`;
|
|
10553
10577
|
const optionId = `${questionId}-option-${optionIndex}`;
|
|
10554
10578
|
optionValueById.set(optionId, label);
|
|
@@ -10576,8 +10600,8 @@ async function resolveAdditionalPermissionsInteraction(input) {
|
|
|
10576
10600
|
const allowTurnOptionId = "codex-additional-permissions-turn";
|
|
10577
10601
|
const allowSessionOptionId = "codex-additional-permissions-session";
|
|
10578
10602
|
const denyOptionId = "codex-additional-permissions-deny";
|
|
10579
|
-
const params = toRecord$
|
|
10580
|
-
const requestedPermissions = toRecord$
|
|
10603
|
+
const params = toRecord$12(input.params) ?? {};
|
|
10604
|
+
const requestedPermissions = toRecord$12(params.permissions) ?? {};
|
|
10581
10605
|
const grantedPermissions = Object.fromEntries(Object.entries(requestedPermissions).filter(([, value]) => value !== null));
|
|
10582
10606
|
const options = [
|
|
10583
10607
|
{
|
|
@@ -10625,7 +10649,7 @@ async function resolveAdditionalPermissionsInteraction(input) {
|
|
|
10625
10649
|
};
|
|
10626
10650
|
}
|
|
10627
10651
|
async function resolveMcpServerElicitationInteraction(input) {
|
|
10628
|
-
const params = toRecord$
|
|
10652
|
+
const params = toRecord$12(input.params) ?? {};
|
|
10629
10653
|
if (params.mode === "url") return await resolveMcpServerUrlElicitation({
|
|
10630
10654
|
onInteractionRequest: input.onInteractionRequest,
|
|
10631
10655
|
params
|
|
@@ -10637,8 +10661,8 @@ async function resolveMcpServerElicitationInteraction(input) {
|
|
|
10637
10661
|
});
|
|
10638
10662
|
}
|
|
10639
10663
|
async function resolveMcpServerFormElicitation(input) {
|
|
10640
|
-
const requestedSchema = toRecord$
|
|
10641
|
-
const properties = toRecord$
|
|
10664
|
+
const requestedSchema = toRecord$12(input.params.requestedSchema);
|
|
10665
|
+
const properties = toRecord$12(requestedSchema?.properties);
|
|
10642
10666
|
if (!properties) return { action: "decline" };
|
|
10643
10667
|
const requiredNames = new Set(Array.isArray(requestedSchema?.required) ? requestedSchema.required.map(String) : []);
|
|
10644
10668
|
const fields = Object.entries(properties).map(([name, value], index) => mapCodexMcpElicitationField({
|
|
@@ -10700,7 +10724,7 @@ async function resolveMcpServerUrlElicitation(input) {
|
|
|
10700
10724
|
return { action: response.kind === "cancel" ? "cancel" : "decline" };
|
|
10701
10725
|
}
|
|
10702
10726
|
function mapCodexMcpElicitationField(input) {
|
|
10703
|
-
const schema = toRecord$
|
|
10727
|
+
const schema = toRecord$12(input.schema) ?? {};
|
|
10704
10728
|
const questionId = `codex-mcp-field-${input.fieldIndex}`;
|
|
10705
10729
|
const skipOptionId = input.required ? null : `${questionId}-skip`;
|
|
10706
10730
|
const optionValueById = /* @__PURE__ */ new Map();
|
|
@@ -10741,12 +10765,12 @@ function listCodexMcpElicitationOptions(schema) {
|
|
|
10741
10765
|
label: "No",
|
|
10742
10766
|
value: false
|
|
10743
10767
|
}];
|
|
10744
|
-
const itemSchema = toRecord$
|
|
10768
|
+
const itemSchema = toRecord$12(schema.items);
|
|
10745
10769
|
let titledOptions = null;
|
|
10746
10770
|
if (Array.isArray(schema.oneOf)) titledOptions = schema.oneOf;
|
|
10747
10771
|
else if (Array.isArray(itemSchema?.anyOf)) titledOptions = itemSchema.anyOf;
|
|
10748
10772
|
if (titledOptions) return titledOptions.map((value) => {
|
|
10749
|
-
const option = toRecord$
|
|
10773
|
+
const option = toRecord$12(value) ?? {};
|
|
10750
10774
|
const rawValue = option.const ?? "";
|
|
10751
10775
|
return {
|
|
10752
10776
|
label: normalizeBoundedText$3(option.title, 240) ?? String(rawValue).slice(0, 240),
|
|
@@ -10871,7 +10895,7 @@ function readRequiredText(value, label) {
|
|
|
10871
10895
|
message: `protocol.invalid: missing ${label}`
|
|
10872
10896
|
});
|
|
10873
10897
|
}
|
|
10874
|
-
function toRecord$
|
|
10898
|
+
function toRecord$12(value) {
|
|
10875
10899
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
10876
10900
|
return value;
|
|
10877
10901
|
}
|
|
@@ -10883,7 +10907,7 @@ function normalizeOptionalText$60(value) {
|
|
|
10883
10907
|
return normalized.length > 0 ? normalized : null;
|
|
10884
10908
|
}
|
|
10885
10909
|
function parseCodexAppServerVersion(response) {
|
|
10886
|
-
return normalizeOptionalText$60(toRecord$
|
|
10910
|
+
return normalizeOptionalText$60(toRecord$12(response)?.userAgent)?.match(CODEX_APP_SERVER_VERSION_PATTERN)?.[1] ?? null;
|
|
10887
10911
|
}
|
|
10888
10912
|
function resolveCodexAppServerAuthStatus(input) {
|
|
10889
10913
|
if (input.account) return "authenticated";
|
|
@@ -11861,16 +11885,16 @@ function projectCodexUsageLimits(input) {
|
|
|
11861
11885
|
return [...uniqueLimits.values()];
|
|
11862
11886
|
}
|
|
11863
11887
|
function readRateLimitBuckets(response) {
|
|
11864
|
-
const record = toRecord$
|
|
11865
|
-
const bucketsById = toRecord$
|
|
11888
|
+
const record = toRecord$11(response);
|
|
11889
|
+
const bucketsById = toRecord$11(record?.rateLimitsByLimitId);
|
|
11866
11890
|
if (bucketsById && Object.keys(bucketsById).length > 0) return Object.entries(bucketsById).flatMap(([bucketKey, snapshot]) => {
|
|
11867
|
-
const recordSnapshot = toRecord$
|
|
11891
|
+
const recordSnapshot = toRecord$11(snapshot);
|
|
11868
11892
|
return recordSnapshot ? [{
|
|
11869
11893
|
bucketKey,
|
|
11870
11894
|
snapshot: recordSnapshot
|
|
11871
11895
|
}] : [];
|
|
11872
11896
|
});
|
|
11873
|
-
const legacySnapshot = toRecord$
|
|
11897
|
+
const legacySnapshot = toRecord$11(record?.rateLimits);
|
|
11874
11898
|
return legacySnapshot ? [{
|
|
11875
11899
|
bucketKey: DEFAULT_LIMIT_ID,
|
|
11876
11900
|
snapshot: legacySnapshot
|
|
@@ -11880,7 +11904,7 @@ function projectRateLimitBucket(input) {
|
|
|
11880
11904
|
const limitId = resolveLimitId(input);
|
|
11881
11905
|
const limitName = normalizeLabel$1(input.snapshot.limitName);
|
|
11882
11906
|
return ["primary", "secondary"].flatMap((windowKind) => {
|
|
11883
|
-
const window = toRecord$
|
|
11907
|
+
const window = toRecord$11(input.snapshot[windowKind]);
|
|
11884
11908
|
const usedPercent = normalizeUsedPercent(window?.usedPercent);
|
|
11885
11909
|
if (usedPercent === null) return [];
|
|
11886
11910
|
const windowLabel = formatWindowLabel({
|
|
@@ -11930,7 +11954,7 @@ function formatWindowLabel(input) {
|
|
|
11930
11954
|
if (input.windowDurationMins === 10080) return "Weekly usage";
|
|
11931
11955
|
return input.windowKind === "primary" ? "Short-term usage" : "Long-term usage";
|
|
11932
11956
|
}
|
|
11933
|
-
function toRecord$
|
|
11957
|
+
function toRecord$11(value) {
|
|
11934
11958
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
11935
11959
|
}
|
|
11936
11960
|
//#endregion
|
|
@@ -12428,10 +12452,10 @@ function normalizeOptionalText$55(value) {
|
|
|
12428
12452
|
//#region ../../runtime/adapters/grok-build/dist/usage/grok-build-usage-limits.js
|
|
12429
12453
|
const GROK_BUILD_USAGE_LIMIT_KEY = "grok-build:included-credits";
|
|
12430
12454
|
function projectGrokBuildUsageLimits(input) {
|
|
12431
|
-
const config = toRecord$
|
|
12455
|
+
const config = toRecord$10(toRecord$10(input.response)?.config);
|
|
12432
12456
|
const usedPercent = readUsedPercent(config?.creditUsagePercent);
|
|
12433
12457
|
if (usedPercent === null) return createUnavailableProviderUsageLimits(input.observedAt);
|
|
12434
|
-
const currentPeriod = toRecord$
|
|
12458
|
+
const currentPeriod = toRecord$10(config?.currentPeriod);
|
|
12435
12459
|
return [{
|
|
12436
12460
|
key: GROK_BUILD_USAGE_LIMIT_KEY,
|
|
12437
12461
|
label: resolvePeriodLabel(currentPeriod?.type),
|
|
@@ -12455,7 +12479,7 @@ function resolvePeriodLabel(value) {
|
|
|
12455
12479
|
if (normalized === "monthly" || normalized === "usage_period_type_monthly") return "Monthly usage limit";
|
|
12456
12480
|
return "Included credits";
|
|
12457
12481
|
}
|
|
12458
|
-
function toRecord$
|
|
12482
|
+
function toRecord$10(value) {
|
|
12459
12483
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
12460
12484
|
}
|
|
12461
12485
|
//#endregion
|
|
@@ -12484,9 +12508,9 @@ function isGrokBuildPlanMethod(method) {
|
|
|
12484
12508
|
return EXIT_PLAN_MODE_METHODS.has(method);
|
|
12485
12509
|
}
|
|
12486
12510
|
function readGrokBuildPermissionOptions(params) {
|
|
12487
|
-
const record = toRecord$
|
|
12511
|
+
const record = toRecord$9(params);
|
|
12488
12512
|
return (Array.isArray(record?.options) ? record.options : []).flatMap((option) => {
|
|
12489
|
-
const optionRecord = toRecord$
|
|
12513
|
+
const optionRecord = toRecord$9(option);
|
|
12490
12514
|
const kind = normalizeText$8(optionRecord?.kind);
|
|
12491
12515
|
const optionId = normalizeText$8(optionRecord?.optionId);
|
|
12492
12516
|
if (!(kind && optionId)) return [];
|
|
@@ -12498,7 +12522,7 @@ function readGrokBuildPermissionOptions(params) {
|
|
|
12498
12522
|
});
|
|
12499
12523
|
}
|
|
12500
12524
|
async function resolvePermissionInteraction$1(input) {
|
|
12501
|
-
const toolCall = toRecord$
|
|
12525
|
+
const toolCall = toRecord$9(toRecord$9(input.params)?.toolCall);
|
|
12502
12526
|
const options = readGrokBuildPermissionOptions(input.params).flatMap((option) => {
|
|
12503
12527
|
const intent = mapPermissionIntent$1(option.kind);
|
|
12504
12528
|
return intent ? [{
|
|
@@ -12527,7 +12551,7 @@ async function resolvePermissionInteraction$1(input) {
|
|
|
12527
12551
|
function buildPermissionSubject$2(toolCall) {
|
|
12528
12552
|
const kind = normalizeText$8(toolCall?.kind);
|
|
12529
12553
|
const title = normalizeBoundedText$2(toolCall?.title, 4096);
|
|
12530
|
-
const command = normalizeBoundedText$2(toRecord$
|
|
12554
|
+
const command = normalizeBoundedText$2(toRecord$9(toolCall?.rawInput)?.command, 16e3) ?? normalizeBoundedText$2(toolCall?.command, 16e3);
|
|
12531
12555
|
if (kind === "execute") return {
|
|
12532
12556
|
...command ? { command } : {},
|
|
12533
12557
|
...title ? { resource: title } : {},
|
|
@@ -12552,7 +12576,7 @@ function buildPermissionTitle$2(toolCall) {
|
|
|
12552
12576
|
}
|
|
12553
12577
|
}
|
|
12554
12578
|
async function resolveQuestionInteraction$1(input) {
|
|
12555
|
-
const params = toRecord$
|
|
12579
|
+
const params = toRecord$9(input.params);
|
|
12556
12580
|
const rawQuestions = Array.isArray(params?.questions) ? params.questions : [];
|
|
12557
12581
|
if (rawQuestions.length === 0) return { outcome: "cancelled" };
|
|
12558
12582
|
const answers = {};
|
|
@@ -12588,11 +12612,11 @@ async function resolveQuestionInteraction$1(input) {
|
|
|
12588
12612
|
};
|
|
12589
12613
|
}
|
|
12590
12614
|
function mapGrokQuestion(value, index) {
|
|
12591
|
-
const question = toRecord$
|
|
12615
|
+
const question = toRecord$9(value);
|
|
12592
12616
|
const providerQuestionKey = normalizeBoundedText$2(question?.question, 4e3) ?? `Grok question ${index + 1}`;
|
|
12593
12617
|
const providerLabelByOptionId = /* @__PURE__ */ new Map();
|
|
12594
12618
|
const options = (Array.isArray(question?.options) ? question.options : []).flatMap((option, optionIndex) => {
|
|
12595
|
-
const record = toRecord$
|
|
12619
|
+
const record = toRecord$9(option);
|
|
12596
12620
|
const label = normalizeBoundedText$2(record?.label, 240);
|
|
12597
12621
|
if (!label) return [];
|
|
12598
12622
|
const optionId = `grok-option-${index + 1}-${optionIndex + 1}`;
|
|
@@ -12616,7 +12640,7 @@ function mapGrokQuestion(value, index) {
|
|
|
12616
12640
|
};
|
|
12617
12641
|
}
|
|
12618
12642
|
async function resolvePlanInteraction$1(input) {
|
|
12619
|
-
const plan = normalizeBoundedText$2(toRecord$
|
|
12643
|
+
const plan = normalizeBoundedText$2(toRecord$9(input.params)?.planContent, 64e3) ?? "Grok requested approval without a plan summary.";
|
|
12620
12644
|
const response = await input.onInteractionRequest({
|
|
12621
12645
|
allowFeedback: true,
|
|
12622
12646
|
kind: "plan_review",
|
|
@@ -12655,7 +12679,7 @@ function normalizeText$8(value) {
|
|
|
12655
12679
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
12656
12680
|
return normalized.length > 0 ? normalized : null;
|
|
12657
12681
|
}
|
|
12658
|
-
function toRecord$
|
|
12682
|
+
function toRecord$9(value) {
|
|
12659
12683
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
12660
12684
|
}
|
|
12661
12685
|
//#endregion
|
|
@@ -12834,7 +12858,7 @@ var GrokBuildAcpSession = class {
|
|
|
12834
12858
|
this.#process.start();
|
|
12835
12859
|
}
|
|
12836
12860
|
async initialize(input) {
|
|
12837
|
-
const initializeResult = toRecord$
|
|
12861
|
+
const initializeResult = toRecord$8(await this.request("initialize", {
|
|
12838
12862
|
clientCapabilities: { fs: {
|
|
12839
12863
|
readTextFile: false,
|
|
12840
12864
|
writeTextFile: false
|
|
@@ -12851,15 +12875,15 @@ var GrokBuildAcpSession = class {
|
|
|
12851
12875
|
errorType: "adapter",
|
|
12852
12876
|
message: `protocol.invalid: Grok Build negotiated unsupported ACP version '${String(initializeResult?.protocolVersion ?? "missing")}'`
|
|
12853
12877
|
});
|
|
12854
|
-
const sessionCapabilities = toRecord$
|
|
12855
|
-
this.#supportsResume = toRecord$
|
|
12856
|
-
this.#supportsClose = toRecord$
|
|
12878
|
+
const sessionCapabilities = toRecord$8(toRecord$8(initializeResult.agentCapabilities)?.sessionCapabilities);
|
|
12879
|
+
this.#supportsResume = toRecord$8(sessionCapabilities?.resume) !== null;
|
|
12880
|
+
this.#supportsClose = toRecord$8(sessionCapabilities?.close) !== null;
|
|
12857
12881
|
if (!(this.#supportsResume && this.#supportsClose)) throw new GrokBuildAcpTransportError({
|
|
12858
12882
|
code: "protocol.invalid",
|
|
12859
12883
|
errorType: "adapter",
|
|
12860
12884
|
message: "protocol.invalid: Grok Build ACP must advertise session resume and close"
|
|
12861
12885
|
});
|
|
12862
|
-
this.#initializeModelState = readModelState(toRecord$
|
|
12886
|
+
this.#initializeModelState = readModelState(toRecord$8(initializeResult._meta)?.modelState);
|
|
12863
12887
|
if (!this.#initializeModelState) throw new GrokBuildAcpTransportError({
|
|
12864
12888
|
code: "model.inventory_unavailable",
|
|
12865
12889
|
errorType: "adapter",
|
|
@@ -12915,7 +12939,7 @@ var GrokBuildAcpSession = class {
|
|
|
12915
12939
|
});
|
|
12916
12940
|
throw error;
|
|
12917
12941
|
}
|
|
12918
|
-
const record = toRecord$
|
|
12942
|
+
const record = toRecord$8(result);
|
|
12919
12943
|
const sessionId = normalizeOptionalText$54(record?.sessionId) ?? input.sessionId ?? null;
|
|
12920
12944
|
if (!sessionId) throw new GrokBuildAcpTransportError({
|
|
12921
12945
|
code: "protocol.invalid",
|
|
@@ -13031,7 +13055,7 @@ var GrokBuildAcpSession = class {
|
|
|
13031
13055
|
if (toolActivity) this.#emitRuntimeEvent(toolActivity);
|
|
13032
13056
|
}
|
|
13033
13057
|
async #handleClientRequest(request) {
|
|
13034
|
-
const requestSessionId = normalizeOptionalText$54(toRecord$
|
|
13058
|
+
const requestSessionId = normalizeOptionalText$54(toRecord$8(request.params)?.sessionId);
|
|
13035
13059
|
if (!(this.#turnActive && requestSessionId !== null && this.#sessionId !== null && requestSessionId === this.#sessionId)) {
|
|
13036
13060
|
this.#recordInteractionFailure("interaction.session_mismatch", "interaction.session_mismatch: Grok Build requested input for a different session");
|
|
13037
13061
|
return { error: {
|
|
@@ -13067,9 +13091,9 @@ var GrokBuildAcpSession = class {
|
|
|
13067
13091
|
}
|
|
13068
13092
|
#collectAgentMessageChunk(notification) {
|
|
13069
13093
|
if (notification.method !== "session/update") return;
|
|
13070
|
-
const update = toRecord$
|
|
13094
|
+
const update = toRecord$8(toRecord$8(notification.params)?.update);
|
|
13071
13095
|
if (update?.sessionUpdate !== "agent_message_chunk") return;
|
|
13072
|
-
const content = toRecord$
|
|
13096
|
+
const content = toRecord$8(update.content);
|
|
13073
13097
|
const text = content?.type === "text" ? normalizeOutputText$2(content.text) : null;
|
|
13074
13098
|
if (!text) return;
|
|
13075
13099
|
this.#firstOutputAtMs ??= Date.now();
|
|
@@ -13134,15 +13158,15 @@ function buildSessionDescriptor(input) {
|
|
|
13134
13158
|
};
|
|
13135
13159
|
}
|
|
13136
13160
|
function readModelState(value) {
|
|
13137
|
-
const record = toRecord$
|
|
13161
|
+
const record = toRecord$8(value);
|
|
13138
13162
|
const currentModelId = normalizeOptionalText$54(record?.currentModelId);
|
|
13139
13163
|
const models = (Array.isArray(record?.availableModels) ? record.availableModels : []).flatMap((candidate) => {
|
|
13140
|
-
const model = toRecord$
|
|
13164
|
+
const model = toRecord$8(candidate);
|
|
13141
13165
|
const modelId = normalizeOptionalText$54(model?.modelId);
|
|
13142
13166
|
if (!modelId) return [];
|
|
13143
|
-
const meta = toRecord$
|
|
13167
|
+
const meta = toRecord$8(model?._meta);
|
|
13144
13168
|
const efforts = Array.isArray(meta?.reasoningEfforts) ? uniqueStrings(meta.reasoningEfforts.map((effort) => {
|
|
13145
|
-
const record = toRecord$
|
|
13169
|
+
const record = toRecord$8(effort);
|
|
13146
13170
|
return record?.value ?? record?.id;
|
|
13147
13171
|
})) : [];
|
|
13148
13172
|
return [{
|
|
@@ -13189,10 +13213,10 @@ function buildModelNegotiationDiagnostics$1(input) {
|
|
|
13189
13213
|
}
|
|
13190
13214
|
function resolveNonInteractiveAuthMethod(initializeResult) {
|
|
13191
13215
|
const authMethodIds = (Array.isArray(initializeResult.authMethods) ? initializeResult.authMethods : []).flatMap((method) => {
|
|
13192
|
-
const methodId = normalizeOptionalText$54(toRecord$
|
|
13216
|
+
const methodId = normalizeOptionalText$54(toRecord$8(method)?.id);
|
|
13193
13217
|
return methodId ? [methodId] : [];
|
|
13194
13218
|
});
|
|
13195
|
-
const preferred = normalizeOptionalText$54(toRecord$
|
|
13219
|
+
const preferred = normalizeOptionalText$54(toRecord$8(initializeResult._meta)?.defaultAuthMethodId);
|
|
13196
13220
|
if (preferred && (/* @__PURE__ */ new Set(["cached_token", "xai.api_key"])).has(preferred) && authMethodIds.includes(preferred)) return preferred;
|
|
13197
13221
|
if (authMethodIds.includes("cached_token")) return "cached_token";
|
|
13198
13222
|
if (authMethodIds.includes("xai.api_key")) return "xai.api_key";
|
|
@@ -13237,7 +13261,7 @@ async function resolveCanonicalDirectory(value) {
|
|
|
13237
13261
|
}
|
|
13238
13262
|
}
|
|
13239
13263
|
function assertSuccessfulStopReason$1(value) {
|
|
13240
|
-
const stopReason = normalizeOptionalText$54(toRecord$
|
|
13264
|
+
const stopReason = normalizeOptionalText$54(toRecord$8(value)?.stopReason);
|
|
13241
13265
|
if (!stopReason) throw new GrokBuildAcpTransportError({
|
|
13242
13266
|
code: "protocol.invalid",
|
|
13243
13267
|
errorType: "adapter",
|
|
@@ -13341,7 +13365,7 @@ function normalizeOptionalText$54(value) {
|
|
|
13341
13365
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
13342
13366
|
return normalized.length > 0 ? normalized : null;
|
|
13343
13367
|
}
|
|
13344
|
-
function toRecord$
|
|
13368
|
+
function toRecord$8(value) {
|
|
13345
13369
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
13346
13370
|
}
|
|
13347
13371
|
function toErrorMessage$35(error) {
|
|
@@ -14544,7 +14568,7 @@ async function runOpenCodeServerStartAttempt(input) {
|
|
|
14544
14568
|
}
|
|
14545
14569
|
async function assertOpenCodeServerHealthy(input) {
|
|
14546
14570
|
const healthTimeoutMs = Math.min(readRemainingTimeoutMs(input.deadlineMs) ?? Number.POSITIVE_INFINITY, SERVER_HEALTH_TIMEOUT_MS);
|
|
14547
|
-
if (toRecord$
|
|
14571
|
+
if (toRecord$7(unwrapSdkData(await Promise.race([createOpencodeClient({
|
|
14548
14572
|
baseUrl: input.serverUrl,
|
|
14549
14573
|
directory: input.directory,
|
|
14550
14574
|
responseStyle: "data",
|
|
@@ -14746,7 +14770,7 @@ async function consumeOpenCodeEvents(input) {
|
|
|
14746
14770
|
if (!ready) input.eventReady.reject(/* @__PURE__ */ new Error("OpenCode event stream closed before becoming ready."));
|
|
14747
14771
|
}
|
|
14748
14772
|
function dispatchOpenCodeEvent(input, event) {
|
|
14749
|
-
const properties = toRecord$
|
|
14773
|
+
const properties = toRecord$7(event.properties);
|
|
14750
14774
|
if (!properties) return;
|
|
14751
14775
|
observeOpenCodeSessionTree(input.turnState, event.type, properties);
|
|
14752
14776
|
if (!eventBelongsToTurn(properties, input.turnState)) return;
|
|
@@ -14781,19 +14805,19 @@ function detachOpenCodeEventTask(task, eventFailure) {
|
|
|
14781
14805
|
task.catch(eventFailure.reject);
|
|
14782
14806
|
}
|
|
14783
14807
|
function eventBelongsToTurn(properties, turnState) {
|
|
14784
|
-
const eventSessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(toRecord$
|
|
14808
|
+
const eventSessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(toRecord$7(properties.part)?.sessionID);
|
|
14785
14809
|
return eventSessionId === null || turnState.acceptedSessionIds.has(eventSessionId);
|
|
14786
14810
|
}
|
|
14787
14811
|
function observeOpenCodeSessionTree(turnState, eventType, properties) {
|
|
14788
14812
|
if (eventType !== "session.created" && eventType !== "session.updated") return;
|
|
14789
|
-
const session = toRecord$
|
|
14813
|
+
const session = toRecord$7(properties.info);
|
|
14790
14814
|
const sessionId = normalizeOptionalText$49(properties.sessionID) ?? normalizeOptionalText$49(session?.id);
|
|
14791
14815
|
const parentId = normalizeOptionalText$49(session?.parentID);
|
|
14792
14816
|
if (sessionId && parentId && turnState.acceptedSessionIds.has(parentId)) turnState.acceptedSessionIds.add(sessionId);
|
|
14793
14817
|
}
|
|
14794
14818
|
function observeOpenCodeTurnLifecycle(turnState, eventType, properties) {
|
|
14795
14819
|
if (eventType === "message.updated") {
|
|
14796
|
-
const message = toRecord$
|
|
14820
|
+
const message = toRecord$7(properties.info);
|
|
14797
14821
|
const messageId = normalizeOptionalText$49(message?.id);
|
|
14798
14822
|
const messageSessionId = normalizeOptionalText$49(message?.sessionID) ?? normalizeOptionalText$49(properties.sessionID);
|
|
14799
14823
|
if (turnState.promptDispatchStarted && turnState.promptMessageId === null && message?.role === "user" && messageSessionId === turnState.rootSessionId && messageId) turnState.promptMessageId = messageId;
|
|
@@ -14802,7 +14826,7 @@ function observeOpenCodeTurnLifecycle(turnState, eventType, properties) {
|
|
|
14802
14826
|
return;
|
|
14803
14827
|
}
|
|
14804
14828
|
const isRootSession = normalizeOptionalText$49(properties.sessionID) === turnState.rootSessionId;
|
|
14805
|
-
const status = toRecord$
|
|
14829
|
+
const status = toRecord$7(properties.status);
|
|
14806
14830
|
const isIdle = eventType === "session.idle" || eventType === "session.status" && status?.type === "idle";
|
|
14807
14831
|
if (isRootSession && isIdle && turnState.promptMessageObserved && turnState.assistantMessageIds.size > 0) {
|
|
14808
14832
|
turnState.rootIdleObserved = true;
|
|
@@ -14819,12 +14843,12 @@ function maybeResolveOpenCodeTurn(turnState) {
|
|
|
14819
14843
|
function readOpenCodeTurnEventFailure(turnState, eventType, properties) {
|
|
14820
14844
|
if (eventType === "session.error") return readOpenCodeProviderFailure(properties.error) ?? "OpenCode reported a session error.";
|
|
14821
14845
|
if (eventType !== "message.updated") return null;
|
|
14822
|
-
const message = toRecord$
|
|
14846
|
+
const message = toRecord$7(properties.info);
|
|
14823
14847
|
if (message?.role !== "assistant" || normalizeOptionalText$49(message.parentID) !== turnState.promptMessageId) return null;
|
|
14824
14848
|
return readOpenCodeProviderFailure(message.error);
|
|
14825
14849
|
}
|
|
14826
14850
|
async function updateOpenCodePreview(input) {
|
|
14827
|
-
const part = toRecord$
|
|
14851
|
+
const part = toRecord$7(input.part);
|
|
14828
14852
|
const partId = normalizeOptionalText$49(part?.id);
|
|
14829
14853
|
const messageId = normalizeOptionalText$49(part?.messageID);
|
|
14830
14854
|
const text = part?.type === "text" && part?.ignored !== true ? normalizeOutputText$1(part.text) : null;
|
|
@@ -14841,20 +14865,20 @@ async function readOpenCodeTurnOutput(input) {
|
|
|
14841
14865
|
responseStyle: "data",
|
|
14842
14866
|
throwOnError: true
|
|
14843
14867
|
}));
|
|
14844
|
-
const reply = toRecord$
|
|
14845
|
-
const info = toRecord$
|
|
14868
|
+
const reply = toRecord$7((Array.isArray(messages) ? messages.filter((value) => {
|
|
14869
|
+
const info = toRecord$7(toRecord$7(value)?.info);
|
|
14846
14870
|
return info?.role === "assistant" && normalizeOptionalText$49(info.parentID) === input.promptMessageId;
|
|
14847
14871
|
}) : []).at(-1));
|
|
14848
|
-
const providerFailure = readOpenCodeProviderFailure(toRecord$
|
|
14872
|
+
const providerFailure = readOpenCodeProviderFailure(toRecord$7(reply?.info)?.error);
|
|
14849
14873
|
if (providerFailure) throw new Error(providerFailure);
|
|
14850
14874
|
return (Array.isArray(reply?.parts) ? reply.parts : []).flatMap((value) => {
|
|
14851
|
-
const part = toRecord$
|
|
14875
|
+
const part = toRecord$7(value);
|
|
14852
14876
|
return part?.type === "text" && part.ignored !== true && typeof part.text === "string" ? [part.text] : [];
|
|
14853
14877
|
}).join("").trim();
|
|
14854
14878
|
}
|
|
14855
14879
|
function unwrapOpenCodeEvent(value) {
|
|
14856
|
-
const record = toRecord$
|
|
14857
|
-
const payload = toRecord$
|
|
14880
|
+
const record = toRecord$7(value);
|
|
14881
|
+
const payload = toRecord$7(record?.payload) ?? record;
|
|
14858
14882
|
const type = normalizeOptionalText$49(payload?.type);
|
|
14859
14883
|
if (!type) return null;
|
|
14860
14884
|
return {
|
|
@@ -14870,13 +14894,13 @@ function readPermissionRequest(properties) {
|
|
|
14870
14894
|
return {
|
|
14871
14895
|
always: readStringArray(properties.always ?? properties.save),
|
|
14872
14896
|
id,
|
|
14873
|
-
metadata: toRecord$
|
|
14897
|
+
metadata: toRecord$7(properties.metadata) ?? {},
|
|
14874
14898
|
patterns: readStringArray(properties.patterns ?? properties.resources),
|
|
14875
14899
|
permission,
|
|
14876
14900
|
sessionID,
|
|
14877
|
-
...toRecord$
|
|
14878
|
-
callID: normalizeOptionalText$49(toRecord$
|
|
14879
|
-
messageID: normalizeOptionalText$49(toRecord$
|
|
14901
|
+
...toRecord$7(properties.tool) ? { tool: {
|
|
14902
|
+
callID: normalizeOptionalText$49(toRecord$7(properties.tool)?.callID) ?? "",
|
|
14903
|
+
messageID: normalizeOptionalText$49(toRecord$7(properties.tool)?.messageID) ?? ""
|
|
14880
14904
|
} } : {}
|
|
14881
14905
|
};
|
|
14882
14906
|
}
|
|
@@ -14884,7 +14908,7 @@ function readQuestionRequest(properties) {
|
|
|
14884
14908
|
const id = normalizeOptionalText$49(properties.id);
|
|
14885
14909
|
const sessionID = normalizeOptionalText$49(properties.sessionID);
|
|
14886
14910
|
const questions = Array.isArray(properties.questions) ? properties.questions.flatMap((value) => {
|
|
14887
|
-
const question = toRecord$
|
|
14911
|
+
const question = toRecord$7(value);
|
|
14888
14912
|
const prompt = normalizeOptionalText$49(question?.question ?? question?.prompt);
|
|
14889
14913
|
if (!prompt) return [];
|
|
14890
14914
|
return [{
|
|
@@ -14892,7 +14916,7 @@ function readQuestionRequest(properties) {
|
|
|
14892
14916
|
header: normalizeOptionalText$49(question?.header) ?? "Question",
|
|
14893
14917
|
multiple: question?.multiple === true,
|
|
14894
14918
|
options: (Array.isArray(question?.options) ? question.options : []).flatMap((optionValue) => {
|
|
14895
|
-
const option = toRecord$
|
|
14919
|
+
const option = toRecord$7(optionValue);
|
|
14896
14920
|
const label = normalizeOptionalText$49(option?.label);
|
|
14897
14921
|
return label ? [{
|
|
14898
14922
|
description: normalizeOptionalText$49(option?.description) ?? "",
|
|
@@ -15254,11 +15278,11 @@ function parseOpenCodeSessionModel(policy) {
|
|
|
15254
15278
|
};
|
|
15255
15279
|
}
|
|
15256
15280
|
function readOpenCodeProviderFailure(value) {
|
|
15257
|
-
const error = toRecord$
|
|
15258
|
-
return normalizeOptionalText$49(toRecord$
|
|
15281
|
+
const error = toRecord$7(value);
|
|
15282
|
+
return normalizeOptionalText$49(toRecord$7(error?.data)?.message) ?? normalizeOptionalText$49(error?.message) ?? normalizeOptionalText$49(value);
|
|
15259
15283
|
}
|
|
15260
15284
|
function readOpenCodeSessionId(value) {
|
|
15261
|
-
const sessionId = normalizeOptionalText$49(toRecord$
|
|
15285
|
+
const sessionId = normalizeOptionalText$49(toRecord$7(unwrapSdkData(value))?.id);
|
|
15262
15286
|
if (!sessionId) throw new OpenCodeServerTransportError({
|
|
15263
15287
|
code: "protocol.invalid",
|
|
15264
15288
|
errorType: "adapter",
|
|
@@ -15267,7 +15291,7 @@ function readOpenCodeSessionId(value) {
|
|
|
15267
15291
|
return sessionId;
|
|
15268
15292
|
}
|
|
15269
15293
|
function unwrapSdkData(value) {
|
|
15270
|
-
const record = toRecord$
|
|
15294
|
+
const record = toRecord$7(value);
|
|
15271
15295
|
return record && "data" in record ? record.data : value;
|
|
15272
15296
|
}
|
|
15273
15297
|
function toOpenCodeServerTransportError(error, stderr) {
|
|
@@ -15298,7 +15322,7 @@ function normalizeOptionalText$49(value) {
|
|
|
15298
15322
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
15299
15323
|
return normalized.length > 0 ? normalized : null;
|
|
15300
15324
|
}
|
|
15301
|
-
function toRecord$
|
|
15325
|
+
function toRecord$7(value) {
|
|
15302
15326
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
15303
15327
|
}
|
|
15304
15328
|
function formatStderrSuffix(stderr) {
|
|
@@ -15410,6 +15434,41 @@ function toErrorMessage$33(error) {
|
|
|
15410
15434
|
return String(error);
|
|
15411
15435
|
}
|
|
15412
15436
|
//#endregion
|
|
15437
|
+
//#region ../../runtime/adapters/opencode/dist/usage/opencode-go-usage-limits.js
|
|
15438
|
+
const OPENCODE_GO_PROVIDER = {
|
|
15439
|
+
displayName: "OpenCode Go",
|
|
15440
|
+
id: "opencode-go"
|
|
15441
|
+
};
|
|
15442
|
+
function parseOpenCodeGoUsageResponse(input) {
|
|
15443
|
+
const usage = toRecord$6(toRecord$6(input.value)?.usage);
|
|
15444
|
+
const parsed = [
|
|
15445
|
+
["rolling", "5-hour usage"],
|
|
15446
|
+
["weekly", "Weekly usage"],
|
|
15447
|
+
["monthly", "Monthly usage"]
|
|
15448
|
+
].map(([key, label]) => {
|
|
15449
|
+
const value = toRecord$6(usage?.[key]);
|
|
15450
|
+
const percent = value?.percent;
|
|
15451
|
+
const resetsAt = value?.resetsAt;
|
|
15452
|
+
const sourceStatus = value?.status;
|
|
15453
|
+
if (typeof percent !== "number" || !Number.isFinite(percent) || percent < 0 || percent > 100 || typeof resetsAt !== "string" || !Number.isFinite(Date.parse(resetsAt)) || sourceStatus !== "ok" && sourceStatus !== "rate-limited") return null;
|
|
15454
|
+
const exhausted = sourceStatus === "rate-limited" || percent === 100;
|
|
15455
|
+
return {
|
|
15456
|
+
key: `opencode-go:${key}`,
|
|
15457
|
+
label,
|
|
15458
|
+
observedAt: input.observedAt,
|
|
15459
|
+
provider: OPENCODE_GO_PROVIDER,
|
|
15460
|
+
resetsAt,
|
|
15461
|
+
status: exhausted ? "exhausted" : "available",
|
|
15462
|
+
usedPercent: exhausted ? 100 : percent
|
|
15463
|
+
};
|
|
15464
|
+
});
|
|
15465
|
+
if (parsed.some((limit) => limit === null)) return createUnavailableProviderUsageLimits(input.observedAt, OPENCODE_GO_PROVIDER);
|
|
15466
|
+
return parsed.filter((limit) => limit !== null);
|
|
15467
|
+
}
|
|
15468
|
+
function toRecord$6(value) {
|
|
15469
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
15470
|
+
}
|
|
15471
|
+
//#endregion
|
|
15413
15472
|
//#region ../../runtime/adapters/opencode/dist/index.js
|
|
15414
15473
|
const OPENCODE_CONVERSATION_BRIDGE_SPEC = resolveBuiltinAdapterConversationBridgeSpec("opencode");
|
|
15415
15474
|
const OPENCODE_PERMISSION_ENV = "OPENCODE_PERMISSION";
|
|
@@ -20057,7 +20116,7 @@ function splitSentences(message) {
|
|
|
20057
20116
|
var package_default = {
|
|
20058
20117
|
$schema: "https://www.schemastore.org/package.json",
|
|
20059
20118
|
name: "openmeld",
|
|
20060
|
-
version: "0.3.
|
|
20119
|
+
version: "0.3.147",
|
|
20061
20120
|
openMeldReleaseDate: "2026-09-02",
|
|
20062
20121
|
description: "OpenMeld CLI - https://openmeld.ai",
|
|
20063
20122
|
license: "MIT",
|
|
@@ -29119,7 +29178,7 @@ const AGENT_CONTROLLER_USAGE_LIMIT_SUPPORT_MATRIX = {
|
|
|
29119
29178
|
codex: "native",
|
|
29120
29179
|
cursor: "unsupported",
|
|
29121
29180
|
"grok-build": "native",
|
|
29122
|
-
opencode: "
|
|
29181
|
+
opencode: "provider_scoped",
|
|
29123
29182
|
openclaw: "not_evaluated"
|
|
29124
29183
|
};
|
|
29125
29184
|
function resolveAgentControllerUsageLimitSupport(agentControllerRef) {
|
|
@@ -39430,9 +39489,9 @@ function createModelCatalogReadSession(input) {
|
|
|
39430
39489
|
async function readModelCatalogOnce(baseUrl) {
|
|
39431
39490
|
try {
|
|
39432
39491
|
const [apiClient, baseUrlModule, clientFoundationModule] = await Promise.all([
|
|
39433
|
-
import("./dist-
|
|
39492
|
+
import("./dist-yUGk9-aD.js").then((n) => n.w),
|
|
39434
39493
|
import("./base-url-CY_j4bLH.js").then((n) => n.n),
|
|
39435
|
-
import("./api-client-foundation-
|
|
39494
|
+
import("./api-client-foundation-BngNFCww.js").then((n) => n.t)
|
|
39436
39495
|
]);
|
|
39437
39496
|
if (typeof apiClient.createConfigApi !== "function") throw new Error("config api client is unavailable");
|
|
39438
39497
|
const resolvedBaseUrl = baseUrl ?? await baseUrlModule.resolveBaseUrl();
|
|
@@ -54335,6 +54394,8 @@ const OPENCODE_PROBE_HOSTNAME = "127.0.0.1";
|
|
|
54335
54394
|
const OPENCODE_SERVER_READY_PREFIX = "opencode server listening";
|
|
54336
54395
|
const OPENCODE_SERVER_URL_RE = /on\s+(https?:\/\/[^\s]+)/u;
|
|
54337
54396
|
const ANSI_ESCAPE = String.fromCharCode(27);
|
|
54397
|
+
const OPENCODE_GO_PROVIDER_ID = "opencode-go";
|
|
54398
|
+
const OPENCODE_GO_USAGE_URL = "https://opencode.ai/zen/go/v1/usage";
|
|
54338
54399
|
async function probeOpenCodeReadiness(input) {
|
|
54339
54400
|
let server = null;
|
|
54340
54401
|
try {
|
|
@@ -54342,11 +54403,20 @@ async function probeOpenCodeReadiness(input) {
|
|
|
54342
54403
|
launchContract: input.launchContract,
|
|
54343
54404
|
timeoutMs: input.timeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS
|
|
54344
54405
|
});
|
|
54345
|
-
|
|
54406
|
+
const providerListResult = await rejectAfterTimeout(createOpencodeClient({
|
|
54346
54407
|
baseUrl: server.url,
|
|
54347
54408
|
directory: process.cwd(),
|
|
54348
54409
|
throwOnError: true
|
|
54349
|
-
}).provider.list(), SDK_READ_TIMEOUT_MS, `Timed out while reading OpenCode provider status after ${SDK_READ_TIMEOUT_MS}ms.`)
|
|
54410
|
+
}).provider.list(), SDK_READ_TIMEOUT_MS, `Timed out while reading OpenCode provider status after ${SDK_READ_TIMEOUT_MS}ms.`);
|
|
54411
|
+
const readiness = resolveOpenCodeReadinessFromProviderList(providerListResult.data);
|
|
54412
|
+
const usageLimits = providerListResult.data ? await readOpenCodeProviderUsageLimits({
|
|
54413
|
+
observedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54414
|
+
providerList: providerListResult.data
|
|
54415
|
+
}) : void 0;
|
|
54416
|
+
return {
|
|
54417
|
+
...readiness,
|
|
54418
|
+
...usageLimits ? { usageLimits } : {}
|
|
54419
|
+
};
|
|
54350
54420
|
} catch (error) {
|
|
54351
54421
|
const auth = resolveOpenCodeAuthSnapshotFromProbeError(error);
|
|
54352
54422
|
return {
|
|
@@ -54360,6 +54430,59 @@ async function probeOpenCodeReadiness(input) {
|
|
|
54360
54430
|
if (server) await stopOpenCodeProbeServer(server.child);
|
|
54361
54431
|
}
|
|
54362
54432
|
}
|
|
54433
|
+
async function readOpenCodeProviderUsageLimits(input) {
|
|
54434
|
+
const providersById = /* @__PURE__ */ new Map();
|
|
54435
|
+
for (const connectedProviderId of input.providerList.connected) {
|
|
54436
|
+
const id = normalizeOptionalText$16(connectedProviderId);
|
|
54437
|
+
if (!(id && id.length <= 256) || providersById.has(id)) continue;
|
|
54438
|
+
const displayName = (normalizeOptionalText$16(input.providerList.all.find((provider) => provider.id === id)?.name) ?? id).slice(0, 256);
|
|
54439
|
+
providersById.set(id, {
|
|
54440
|
+
displayName,
|
|
54441
|
+
id
|
|
54442
|
+
});
|
|
54443
|
+
}
|
|
54444
|
+
const providers = [...providersById.values()];
|
|
54445
|
+
return (await Promise.all(providers.map(async (provider) => {
|
|
54446
|
+
if (provider.id !== OPENCODE_GO_PROVIDER_ID) return createUnsupportedProviderUsageLimits(input.observedAt, provider);
|
|
54447
|
+
const apiKey = await resolveOpenCodeProviderApiKey({
|
|
54448
|
+
authContent: input.authContent,
|
|
54449
|
+
providerId: provider.id,
|
|
54450
|
+
readAuthFile: input.readAuthFile
|
|
54451
|
+
});
|
|
54452
|
+
if (!apiKey) return createUnavailableProviderUsageLimits(input.observedAt, provider);
|
|
54453
|
+
try {
|
|
54454
|
+
const response = await (input.fetchFn ?? fetch)(OPENCODE_GO_USAGE_URL, {
|
|
54455
|
+
headers: { authorization: `Bearer ${apiKey}` },
|
|
54456
|
+
signal: AbortSignal.timeout(SDK_READ_TIMEOUT_MS)
|
|
54457
|
+
});
|
|
54458
|
+
if (!response.ok) return createUnavailableProviderUsageLimits(input.observedAt, provider);
|
|
54459
|
+
return parseOpenCodeGoUsageResponse({
|
|
54460
|
+
observedAt: input.observedAt,
|
|
54461
|
+
value: await response.json()
|
|
54462
|
+
});
|
|
54463
|
+
} catch {
|
|
54464
|
+
return createUnavailableProviderUsageLimits(input.observedAt, provider);
|
|
54465
|
+
}
|
|
54466
|
+
}))).flat().slice(0, 32);
|
|
54467
|
+
}
|
|
54468
|
+
async function resolveOpenCodeProviderApiKey(input) {
|
|
54469
|
+
let authContent = input.authContent ?? process.env.OPENCODE_AUTH_CONTENT;
|
|
54470
|
+
if (!authContent) try {
|
|
54471
|
+
const authPath = resolveOpenCodeAuthPath({
|
|
54472
|
+
homeDir: homedir(),
|
|
54473
|
+
xdgDataHome: process.env.XDG_DATA_HOME
|
|
54474
|
+
});
|
|
54475
|
+
authContent = input.readAuthFile ? await input.readAuthFile(authPath) : await readFile(authPath, "utf8");
|
|
54476
|
+
} catch {
|
|
54477
|
+
return null;
|
|
54478
|
+
}
|
|
54479
|
+
try {
|
|
54480
|
+
const providerAuth = toRecord$2(JSON.parse(authContent)?.[input.providerId]);
|
|
54481
|
+
return providerAuth?.type === "api" ? normalizeOptionalText$16(providerAuth.key) : null;
|
|
54482
|
+
} catch {
|
|
54483
|
+
return null;
|
|
54484
|
+
}
|
|
54485
|
+
}
|
|
54363
54486
|
async function startOpenCodeProbeServer(input) {
|
|
54364
54487
|
const port = await findAvailableLocalPort();
|
|
54365
54488
|
const invocation = buildCliLaunchInvocation({
|
|
@@ -55157,6 +55280,7 @@ async function resolveOpenCodeInterfaceSnapshot(input) {
|
|
|
55157
55280
|
message: readinessProbe.message ?? input.baseSnapshot.message,
|
|
55158
55281
|
models: readinessProbe.models,
|
|
55159
55282
|
status: readinessProbe.status,
|
|
55283
|
+
...readinessProbe.usageLimits ? { usageLimits: readinessProbe.usageLimits } : {},
|
|
55160
55284
|
version,
|
|
55161
55285
|
versionAdvisory: await resolveControllerVersionAdvisory({
|
|
55162
55286
|
checkedAt: input.baseSnapshot.checkedAt,
|
|
@@ -55824,8 +55948,11 @@ function projectAgentControllerInterfaceForCloud(snapshot) {
|
|
|
55824
55948
|
schemaVersion: snapshot.schemaVersion,
|
|
55825
55949
|
skills: [],
|
|
55826
55950
|
status: snapshot.status,
|
|
55827
|
-
...snapshot.usageLimits ? { usageLimits: snapshot.usageLimits.map((limit) => ({
|
|
55828
|
-
|
|
55951
|
+
...snapshot.usageLimits ? { usageLimits: snapshot.usageLimits.map((limit) => ({
|
|
55952
|
+
...limit,
|
|
55953
|
+
...limit.provider ? { provider: { ...limit.provider } } : {}
|
|
55954
|
+
})) } : {},
|
|
55955
|
+
usageLimitsSupportMatrixVersion: 2,
|
|
55829
55956
|
version: snapshot.version,
|
|
55830
55957
|
...snapshot.versionAdvisory ? { versionAdvisory: {
|
|
55831
55958
|
checkedAt: snapshot.versionAdvisory.checkedAt,
|
|
@@ -56277,7 +56404,9 @@ function shouldRetryWithoutUsageLimits(input) {
|
|
|
56277
56404
|
if (!input.submittedReports.some((report) => report.agentControllerInterface?.usageLimits || report.agentControllerInterface?.usageLimitsSupportMatrixVersion)) return false;
|
|
56278
56405
|
const failure = toStructuredApiClientFailure(input.error);
|
|
56279
56406
|
if (failure.status !== 400) return false;
|
|
56280
|
-
|
|
56407
|
+
const diagnosticText = collectCompatibilityDiagnosticText(failure);
|
|
56408
|
+
if (diagnosticText.includes("usagelimits")) return true;
|
|
56409
|
+
return diagnosticText.includes("provider") && input.submittedReports.some((report) => report.agentControllerInterface?.usageLimits?.some((limit) => limit.provider));
|
|
56281
56410
|
}
|
|
56282
56411
|
function shouldRetryWithoutAgentControllerInterface(input) {
|
|
56283
56412
|
if (!input.requestedReports.some((report) => report.agentControllerInterface)) return false;
|
|
@@ -103828,6 +103957,8 @@ async function runReadonlyPiTuiSession(input) {
|
|
|
103828
103957
|
}
|
|
103829
103958
|
//#endregion
|
|
103830
103959
|
//#region src/space/history.ts
|
|
103960
|
+
const SPACE_HISTORY_BRIEF_TEXT_MAX_CHARACTERS = 1200;
|
|
103961
|
+
const SPACE_HISTORY_BRIEF_TRUNCATION_MARKER = "…";
|
|
103831
103962
|
async function runTail(input) {
|
|
103832
103963
|
if (!Number.isInteger(input.limit) || input.limit < 0) throw new Error("limit must be a non-negative integer");
|
|
103833
103964
|
const runtime = await resolveRuntimeContext({
|
|
@@ -104125,10 +104256,13 @@ function buildSpaceHistoryBriefPayload(input) {
|
|
|
104125
104256
|
checkedBy: "space.history",
|
|
104126
104257
|
note: "This command proves readable conversation access for the acting profile. It does not prove Wake execution success."
|
|
104127
104258
|
},
|
|
104259
|
+
briefTextMaxCharacters: SPACE_HISTORY_BRIEF_TEXT_MAX_CHARACTERS,
|
|
104128
104260
|
messages: input.events.map((event) => buildSpaceHistoryBriefMessage({
|
|
104129
104261
|
event,
|
|
104130
104262
|
identityDirectory: input.identityDirectory,
|
|
104263
|
+
profileId: input.openMeldProfile.openMeldProfileId,
|
|
104131
104264
|
signalIndex: input.signalIndex,
|
|
104265
|
+
spaceId: input.spaceId,
|
|
104132
104266
|
thread: input.threadByRootSignalId.get(event.id) ?? null
|
|
104133
104267
|
})),
|
|
104134
104268
|
...buildThreadNextCommandsField({
|
|
@@ -104148,6 +104282,7 @@ function buildSpaceHistoryBriefMessage(input) {
|
|
|
104148
104282
|
identityDirectory: input.identityDirectory,
|
|
104149
104283
|
signalIndex: input.signalIndex
|
|
104150
104284
|
}) : null;
|
|
104285
|
+
const briefText = buildBriefMessageText(messageReadProjection?.text ?? null);
|
|
104151
104286
|
return {
|
|
104152
104287
|
signalId: input.event.id,
|
|
104153
104288
|
timestamp: input.event.ts,
|
|
@@ -104157,14 +104292,40 @@ function buildSpaceHistoryBriefMessage(input) {
|
|
|
104157
104292
|
profileName: input.event.profile?.profileName ?? null,
|
|
104158
104293
|
profileKind: input.event.profile?.kind ?? null
|
|
104159
104294
|
},
|
|
104160
|
-
text:
|
|
104161
|
-
|
|
104162
|
-
|
|
104163
|
-
|
|
104164
|
-
|
|
104165
|
-
|
|
104295
|
+
text: briefText.text,
|
|
104296
|
+
textOriginalCharacters: briefText.originalCharacters,
|
|
104297
|
+
textTruncated: briefText.truncated,
|
|
104298
|
+
...briefText.truncated ? { fullTextCommand: formatOpenMeldCliCommand(`openmeld space history ${input.spaceId} --around-signal ${input.event.id} --before 0 --after 0 --kind ${toHistoryKindOption(input.event.type)} --profile ${input.profileId} --view agent`) } : {},
|
|
104299
|
+
...messageReadProjection?.replyToSignalId ? { replyTo: messageReadProjection.replyToSignalId } : {},
|
|
104300
|
+
...messageReadProjection?.wakeTargets.length ? { wakeTargets: messageReadProjection.wakeTargets } : {},
|
|
104301
|
+
...messageReadProjection?.referenceTargets.length ? { referenceTargets: messageReadProjection.referenceTargets } : {},
|
|
104302
|
+
...messageReadProjection?.mentionTargets.length ? { mentionTargets: messageReadProjection.mentionTargets } : {},
|
|
104303
|
+
...input.thread ? { thread: input.thread } : {}
|
|
104304
|
+
};
|
|
104305
|
+
}
|
|
104306
|
+
function buildBriefMessageText(text) {
|
|
104307
|
+
if (text === null) return {
|
|
104308
|
+
originalCharacters: null,
|
|
104309
|
+
text: null,
|
|
104310
|
+
truncated: false
|
|
104311
|
+
};
|
|
104312
|
+
const characters = [...text];
|
|
104313
|
+
if (characters.length <= 1200) return {
|
|
104314
|
+
originalCharacters: characters.length,
|
|
104315
|
+
text,
|
|
104316
|
+
truncated: false
|
|
104317
|
+
};
|
|
104318
|
+
return {
|
|
104319
|
+
originalCharacters: characters.length,
|
|
104320
|
+
text: `${characters.slice(0, SPACE_HISTORY_BRIEF_TEXT_MAX_CHARACTERS - 1).join("").trimEnd()}${SPACE_HISTORY_BRIEF_TRUNCATION_MARKER}`,
|
|
104321
|
+
truncated: true
|
|
104166
104322
|
};
|
|
104167
104323
|
}
|
|
104324
|
+
function toHistoryKindOption(signalType) {
|
|
104325
|
+
if (signalType === "signal.status") return "status";
|
|
104326
|
+
if (signalType === "signal.system_notice") return "system_notice";
|
|
104327
|
+
return "text";
|
|
104328
|
+
}
|
|
104168
104329
|
function isMessageSemanticSignal(signal) {
|
|
104169
104330
|
return signal.type === "signal.text" || signal.type === "signal.status" || signal.type === "signal.system_notice";
|
|
104170
104331
|
}
|
|
@@ -111121,4 +111282,4 @@ function isHumanInteractiveSpaceRuntime(runtime) {
|
|
|
111121
111282
|
//#endregion
|
|
111122
111283
|
export { runAgentsManage as $, resolveAuthenticationGuidanceFromMessage as $a, getCurrentCommandCheckState as $i, assessCliUpdate as $n, outJsonLine as $o, resolveDaemonDeviceId as $r, runSkillsUpdate as $t, parseEnvelope as A, formatMessage as Aa, createAgentExecutionStatusDisplayRows as Ai, computeRetryDelayMs as An, resolveObservedAgentActivityBinding as Ao, getCommandHintsFromContract as Ar, emitDaemonAgentOverview as At, resolveHumanControllerDisplayName as B, listOpenMeldProfiles as Ba, PREPARE_SESSION_RECONNECT_GRACE_MS as Bi, assertNoRemovedCcSpaceAddressingSyntax as Bn, migrateProjectBindingStore as Bo, formatDualViewGuideForDisplay as Br, readGatewayTextResponse as Bt, toSpaceMetaUpsertInput as C, toStartBackgroundHelperExecutionCompatibility as Ca, resolveAgentProfilePrimaryAgentControllerReport as Ci, resolveCreateProfileKind as Cn, resolveUserFacingCliEntryCommand as Co, createSpaceSubcommandTargetGuideError as Cr, runDaemonStatusFlow as Ct, formatHumanReadTargetList as D, renderHumanErrorCard as Da, notifyDaemonRouteCatalogChanged as Di, formatServiceParticipationReadinessLabel as Dn, readAgentActivityContextForPath as Do, createStartAuthenticationGuideError as Dr, buildProfileWorkspacePresentation as Dt, buildHumanReplyContextSummary as E, buildHumanErrorCopy as Ea, listBuiltinAgentsRegistryEntries as Ei, ensureAgentProfileRuntimeBinding as En, upsertDaemonServiceContract as Eo, createStartAgentIdentityGuideError as Er, runDaemonUninstall as Et, resolveOpenMeldProfileForSpaceCommand as F, requireOpenMeldProfile as Fa, resolveAgentControllerPermissionModeForController as Fi, resolveLocalAgentControllerBlockerReasonCodes as Fn, readAgentActivityOutboxHealth as Fo, registerDaemonControlTargetOptions as Fr, fetchSpaceUpdates as Ft, runAgentsCustomAdd as G, clearSelectedOpenMeldProfileId as Ga, resolveDaemonServiceAlignmentDecision as Gi, buildSpaceRoundReadProjection as Gn, canonicalizeLocalProjectPath as Go, areAllowedActionsEquivalent as Gr, resolveDaemonServiceParticipationStatus as Gt, resolveAgentProfileSetup as H, resolveOpenMeldProfile as Ha, buildOnboardingPlan as Hi, buildDispatchResultReplyWorkflowProjection as Hn, runIfAgentActivityBindingGenerationIsCurrent as Ho, formatAgentOverviewPayload as Hr, parseJsonResponse$1 as Ht, emitSpaceAgentOverview as I, resolveOpenMeldProfileOrNull as Ia, resolveAgentExecutionStatus as Ii, resolveLocalAgentControllerLaunchability as In, removeProjectOutbox as Io, registerAuthLoginRequestOptions as Ir, createCliSpaceApi as It, runAgentsCustomUpdate as J, buildAgentAuthenticationGuide as Ja, resolveServiceUpdateUrgency as Ji, formatRemovedCcRelationMessage as Jn, renderInfoCard as Jo, readPendingOpenMeldToolsUpdateAttempt as Jr, collectSkillsReadinessSnapshot as Jt, runAgentsCustomList as K, getSelectedOpenMeldProfileId as Ka, classifyDaemonServiceRunStartability as Ki, buildUpdatesReplyWorkflowProjection as Kn, enqueueControllerTaskLifecycleEventWhileLocked as Ko, buildAgentFacingPublicationModeGuideLines as Kr, runDaemonServiceParticipationGate as Kt, emitSpaceCliAgentOverview as L, createOpenMeldAgentProfile as La, resolveAgentProfileEditCapabilities as Li, resolveLocalAgentControllerReportDecision as Ln, bindProject as Lo, registerBuiltinAgentSelectionOptions as Lr, fetchSpaceMeta as Lt, assertFullSignalIdArgument as M, resolveRuntimeContext as Ma, getAgentControllerPermissionModeFieldLabel as Mi, submitRuntimeAgentControllerReport as Mn, readCodexSessionTitles as Mo, SPACE_ADD_MEMBERS_PROGRESS_HEARTBEAT_MS as Mr, shouldEmitAgentOverview as Mt, assertValidSpaceIdTarget as N, resolveViewProfileKey as Na, listAgentControllerPermissionModeOptions as Ni, submitRuntimeAgentControllerReports as Nn, enqueueAgentActivityHookEvent as No, registerSkillsTargetSelectionOptions as Nr, runDaemonStartupPreflight as Nt, resolveLinkAccessLabel as O, renderHumanTextErrorCard as Oa, resolveLocalRegistryAgentIdFromAgentControllerRef as Oi, resolveServiceParticipationReadiness as On, removeAgentActivityContextCache as Oo, createUpgradeConfirmationGuideError as Or, buildProfileWorkspaceRows as Ot, prepareAuthenticatedSpaceCommandContext as P, isSelectedOpenMeldProfileRequiredError as Pa, parseAgentControllerRef as Pi, collectLocalAgentControllerInventory as Pn, removeProjectInbox as Po, getCliVersionInfo as Pr, readDaemonStartFailureLogTailLines as Pt, runAgentsList as Q, resolveAuthenticationGuidanceFromError as Qa, finishCurrentCommandCheckScope as Qi, runInteractivePrompt as Qn, errLine as Qo, ensureDaemonRuntimePaths as Qr, runSkillsUninstall as Qt, prepareLocalAgentReadiness as R, createOpenMeldHumanProfile as Ra, resolveEvidenceSyncHealth as Ri, inspectSpaceCacheFile as Rn, listProjectBindings as Ro, buildAgentOverviewFromContract as Rr, updateSpaceMeta as Rt, loadSpaceSignalIndexOrNull as S, resolveDaemonRuntimeContractCompatibility as Sa, createPrimaryBindingReadSession as Si, createProfileByKind as Sn, resolveSetupFollowUpCliEntryCommand as So, createSpaceResultGuideError as Sr, runDaemonSnapshot as St, buildFormalSignalReadPayload as T, OPENMELD_VERSION as Ta, reconcileNewRunnableBuiltinAgentsForSetup as Ti, promptTextEntry as Tn, readDaemonServiceContract as To, createSpaceUpdatesGuideError as Tr, runDaemonTeardownStrict as Tt, runAgents as U, updateOpenMeldProfile as Ua, getSetupFlowCopy as Ui, buildSignalIndex as Un, setDefaultProjectConnection as Uo, OPENMELD_AGENT_MENTAL_MODEL_LINES as Ur, resolveLocalComponentsStatus as Ut, persistAgentTransportSelection as V, primeOpenMeldProfilesSessionCache as Va, buildDaemonRouteObservationPresentation as Vi, buildDispatchResultMessageReadProjection as Vn, removeProjectConnection as Vo, buildDualViewGuideMessage as Vr, toStructuredGatewayFailure as Vt, runAgentsConfig as W, alignSelectedOpenMeldProfileStorage as Wa, buildDaemonServiceTargetSpec as Wi, buildSignalMessageReadProjection as Wn, unbindProject as Wo, SPACE_CONTRACT_ALLOWED_ACTION_ORDER as Wr, writeInstalledLocalComponentsSnapshot as Wt, runAgentsDisable as X, createAuthenticationError as Xa, resolveOpenMeldEnvironmentTarget as Xi, promptSearchSelect as Xn, sanitizeTerminalDisplayText as Xo, runPendingDaemonServiceUpdate as Xr, runSkillsEnsure as Xt, runAgentsDetect as Y, buildHumanAuthenticationCard as Ya, assessServerRequiredVersion as Yi, promptSearchMultiselect as Yn, renderTextInfoCard as Yo, readOpenMeldToolsUpdateContextFromEnv as Yr, runSkillsCheck as Yt, runAgentsEnable as Z, resolveAuthenticationGuidance as Za, resolveAuthBaseUrl as Zi, isReturnKeypress as Zn, emitCliJsonEnvelope as Zo, scheduleDaemonServiceUpdate as Zr, runSkillsInstall as Zt, runSpaceWriteWithPasswordRetry as _, ensureVersionStateReady as _a, setCustomProfileWorkspace as _i, fetchAuthUserSnapshot as _n, formatOpenMeldCliCommand as _o, createSpaceContractSetGuideError as _r, runDaemonCancel as _t, runSpaceDelete as a, readCurrentDaemonRuntimeContext as aa, formatDeviceReplyReadinessLabel as ai, buildCommandAuthenticationPromptMessage as an, requestLocalAgentActivitySync as ao, formatElapsedTime as ar, cliJsonSkillsShowEnvelopeSchema as as, printOpenMeldBanner as at, buildIdentityOnlyMembersSnapshotForReadProjection as b, readVersionState as ba, describeProfileWorkspacePathValidationFailure as bi, resolveDeviceTokenExpiresAt as bn, formatOpenMeldCliTextBlock as bo, createSpacePublicationSetGuideError as br, runDaemonReinstall as bt, runSpaceLeave as c, isDaemonServiceJobNeverSpawned as ca, resolveGatewayChainReadiness as ci, runAuthLogin as cn, resolveAgentActivityRouteForPath as co, formatDaemonServiceMissingRecommendation as cr, revokeOrganizationJoinLinkResponseSchema as cs, renderOpenMeldLogo as ct, runSpaceRemoveMembers as d, readRecentDaemonLifecycleEvents as da, createModelCatalogReadSession as di, runAuthStatus as dn, defaultManagedIntegrationPaths as do, createProfileActionGuideError as dr, resolveSpaceWebGatewayOrigin as dt, isCurrentCommandCheckScopeActive as ea, formatDaemonFailureContextText as ei, ensureLocalSkills as en, getProfileDefaultView as eo, isCliUpdateCheckApplicable as er, outLine as es, runAgentsRepair as et, runSpaceSend as f, buildInstallSelfJsonPayload as fa, resolveProfileWorkspaceRuntime as fi, exchangeOneTimeTokenAuthSession as fn, installAgentActivityIntegrations as fo, createProfileCreateGuideError as fr, resolveSpaceSendText as ft, runSpaceReadWithPasswordRetry as g, compareSemver as ga, resolveConfiguredProfileWorkspacePath as gi, extractAuthApiErrorMessage as gn, formatInlineOpenMeldCliCommands as go, createSpaceAliasTargetGuideError as gr, runDaemonBackgroundStartForDecision as gt, uploadPreparedSpaceFiles as h, buildNextVersionState as ha, readProfileWorkspaceConfig as hi, formatActiveOrganizationLabel as hn, uninstallAgentActivityIntegrations as ho, createSpaceAddMembersGuideError as hr, runDaemonAutostart as ht, runSpaceCreate as i, resolveVersionChangeDirection as ia, formatAgentReplyReadinessLabel as ii, connectWebSocket as in, LocalDaemonControlPlaneClientError as io, writeDispatchSpaceActionRecord as ir, cliJsonSkillsLoadEnvelopeSchema as is, colorizeDisplayProfileLabel as it, isSpaceCommandOutputHandledError as j, parseCliViewMode as ja, getAgentControllerPermissionModeDisplayMetadata as ji, submitProfileRuntimeAgentControllerReport as jn, normalizeSharedSessionTitle as jo, registerSpaceMemberSelectionOptions as jr, createDelayedSpinner as jt, resolveOrganizationVisibilityLabel as k, createPresenter as ka, buildAgentControllerRef as ki, assessActionParticipationCandidate as kn, buildAgentActivityEvent as ko, getCommandEntryContract as kr, reconcileCliVersionView as kt, runSpaceList as l, readDaemonServiceJobCrashExitCode as la, resolveOpenClawLocalDiagnosticsValue as li, runAuthLogout as ln, unregisterAgentActivityRoute as lo, canUseInteractivePrompts as lr, compareAgentControllerRefsForDisplay as ls, renderOpenMeldTagline as lt, prepareRequestedSpaceSendFiles as m, readPendingDaemonServiceUpdate as ma, normalizeCustomProfileWorkspacePath as mi, buildAuthStatusSnapshot as mn, resolveAgentActivityDispatcherCommand as mo, createResetConfirmationGuideError as mr, runDaemon as mt, promptAndConfirmSpacePassword as n, startCurrentCommandCheckScope as na, resolveDaemonServiceFreshnessWarning as ni, readRuntimeReportingHealthState as nn, LocalProjectConnectionError as no, readDispatchOwnedRuntimeGuard as nr, cliJsonOutputEnvelopeSchema as ns, formatTransportModeDisplay as nt, runSpaceHistory as o, readCurrentObservedDaemonRuntimeStatus as oa, formatHumanReplyReadinessReason as oi, ensureCommandAuthenticationOrCancel as on, isAgentActivityRouteRegistered as oo, resolveElapsedTimeMs as or, getOrganizationJoinLinkResponseSchema as os, renderOpenMeldBrandBlockLines as ot, runSpaceWatch as p, performManagedInstall as pa, ensureOpenMeldManagedProfileWorkspace as pi, buildAuthStatusRows as pn, readAgentActivityIntegrationStatus as po, createProfileMenuGuideError as pr, bestEffortStopCurrentLaneDaemonService as pt, runAgentsCustomRemove as q, setSelectedOpenMeldProfileId as qa, classifyDaemonServiceWakeability as qi, createSpaceMemberIdentityIndex as qn, readControllerTaskLifecycleOutboxHealth as qo, canonicalizeAllowedActions as qr, runDaemonStartDecisionPrompt as qt, runSpaceAddMembers as r, inspectDaemonServiceInventory as ra, resolveCurrentReplyReadinessSnapshot as ri, readRecentDaemonDispatchJournalEvents as rn, validateLocalProjectConnectionPath as ro, readDispatchSpaceActionContextFromEnv as rr, cliJsonSkillsListEnvelopeSchema as rs, colorizeAgentLabel as rt, runSpaceJoin as s, getDaemonSystemServiceLogPath as sa, mapAgentReplyReadinessToLegacyAutoReply as si, evaluateCommandAuthentication as sn, registerAgentActivityRoute as so, formatDaemonServiceDowngradeBlockedRecommendation as sr, organizationJoinLinkErrorResponseSchema as ss, renderOpenMeldHeader as st, buildCreateSpacePasswordPromptConfig as t, resetCurrentCommandCheckState as ta, resolveServiceReadinessFromServiceStatus as ti, readBundledOpenMeldCliSkillDocumentByPath as tn, setProfileDefaultView as to, assertDispatchOwnedRuntimePublicWriteAllowed as tr, cliBinaryDeltaPatchSchema as ts, runAgentsShow as tt, runSpacePassword as u, resolveDaemonServiceManager as ua, syncProfileWorkspaceState as ui, runAuthMenu as un, AGENT_ACTIVITY_INTEGRATION_OWNER as uo, createDoctorFailedGuideError as ur, resolveGatewayWebOrigin as ut, buildHumanReadSignalsTranscriptItems as v, fetchLatestCliBinaryRelease as va, setOpenMeldManagedProfileWorkspace as vi, requestDeviceToken as vn, formatOpenMeldCliCommands as vo, createSpaceLeaveGuideError as vr, runDaemonInstall as vt, buildFormalDispatchResultReadPayload as w, resolveCurrentDaemonExpectedVersion as wa, listAgentTargetStates as wi, resolveCreateProfileName as wn, syncLocalAgentActivity as wo, createSpaceTargetGuideError as wr, runDaemonStop as wt, loadSpaceIdentityDirectoryOrNull as x, writeVersionState as xa, syncDeviceRuntimeStateProjection as xi, revokeAuthAccessToken as xn, formatProfileAwareOpenMeldCliCommands as xo, createSpaceRemoveMembersGuideError as xr, runDaemonRunAfterEntryChecks as xt, emitHumanReadSignalsTextProjection as y, fetchLatestPackageInfo as ya, validateCustomProfileWorkspacePath as yi, resolveDeviceAuthClientId as yn, formatOpenMeldCliLine as yo, createSpaceMenuGuideError as yr, runDaemonInterrupt as yt, buildReplyReadinessGuidance as z, deleteOpenMeldProfile as za, resolveNativeAgentControllerPermissionModeForController as zi, upsertSpaceConfig as zn, listProjectConnectionsWithStatus as zo, DualViewGuideError as zr, readGatewayJsonResponse as zt };
|
|
111123
111284
|
|
|
111124
|
-
//# sourceMappingURL=command-
|
|
111285
|
+
//# sourceMappingURL=command-DaXUm8Zj.js.map
|