From 330ba1fa319407315d5173cffd318cf123361fe3 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 7 May 2026 05:07:32 +0100 Subject: [PATCH] refactor: move canvas to plugin surfaces --- .agents/skills/crabbox/SKILL.md | 57 +- .crabbox.yaml | 7 +- .github/pull_request_template.md | 2 +- .github/workflows/ci.yml | 171 +- .gitignore | 2 + .oxfmtrc.jsonc | 1 + AGENTS.md | 2 +- CHANGELOG.md | 1 + CONTRIBUTING.md | 4 +- Dockerfile | 6 +- README.md | 7 +- apps/android/README.md | 2 +- .../main/java/ai/openclaw/app/NodeRuntime.kt | 2 +- .../openclaw/app/gateway/GatewayProtocol.kt | 2 +- .../ai/openclaw/app/gateway/GatewaySession.kt | 118 +- .../ai/openclaw/app/node/InvokeDispatcher.kt | 16 +- .../app/gateway/GatewaySessionInvokeTest.kt | 61 +- .../GatewaySessionInvokeTimeoutTest.kt | 22 - .../openclaw/app/node/InvokeDispatcherTest.kt | 2 +- .../Sources/Model/NodeAppModel+Canvas.swift | 23 +- .../Sources/OpenClaw/CanvasManager.swift | 12 +- .../Sources/OpenClaw/GatewayConnection.swift | 5 +- .../NodeMode/MacNodeModeCoordinator.swift | 12 +- .../OpenClaw/NodeMode/MacNodeRuntime.swift | 31 +- .../OpenClawProtocol/GatewayModels.swift | 5847 ------ .../MacGatewayChatTransportMappingTests.swift | 2 +- .../MacNodeRuntimeTests.swift | 24 + .../Sources/OpenClawKit/BridgeFrames.swift | 3 - .../OpenClawKit/GatewayNodeSession.swift | 112 +- .../OpenClawProtocol/GatewayModels.swift | 10 +- docs/automation/cron-jobs.md | 2 - docs/cli/cron.md | 2 - docs/cli/nodes.md | 2 +- docs/cli/plugins.md | 6 +- docs/cli/update.md | 5 - docs/concepts/system-prompt.md | 7 +- docs/concepts/typebox.md | 12 +- docs/gateway/bridge-protocol.md | 6 +- docs/gateway/configuration-examples.md | 2 +- docs/gateway/configuration-reference.md | 18 +- docs/gateway/configuration.md | 2 +- docs/gateway/doctor.md | 1 - docs/gateway/protocol.md | 27 +- docs/gateway/security/index.md | 63 - docs/help/faq.md | 2 +- docs/install/development-channels.md | 30 +- docs/install/updating.md | 4 - docs/platforms/ios.md | 2 +- docs/plugins/plugin-inventory.md | 1 + docs/plugins/reference.md | 1 + docs/plugins/reference/canvas.md | 19 + docs/plugins/sdk-entrypoints.md | 9 +- docs/plugins/sdk-overview.md | 35 +- docs/refactor/canvas.md | 131 + docs/reference/RELEASING.md | 29 +- docs/tools/index.md | 4 +- docs/tools/plugin.md | 4 - docs/tools/subagents.md | 5 - docs/tools/web.md | 13 +- extensions/canvas/cli-metadata.ts | 18 + extensions/canvas/index.ts | 98 + extensions/canvas/openclaw.plugin.json | 40 + extensions/canvas/package.json | 22 + extensions/canvas/runtime-api.ts | 42 + extensions/canvas/scripts/bundle-a2ui.mjs | 228 + extensions/canvas/scripts/copy-a2ui.d.mts | 4 + .../canvas/scripts/copy-a2ui.mjs | 13 +- extensions/canvas/setup-api.ts | 11 + .../canvas/src}/a2ui-jsonl.ts | 0 extensions/canvas/src/capability.ts | 25 + extensions/canvas/src/cli-helpers.ts | 42 + extensions/canvas/src/cli.test.ts | 75 + extensions/canvas/src/cli.ts | 428 + .../canvas/src/config-migration.test.ts | 75 + extensions/canvas/src/config-migration.ts | 54 + extensions/canvas/src/config.test.ts | 87 + extensions/canvas/src/config.ts | 126 + .../canvas/src/documents.test.ts | 2 +- .../canvas/src/documents.ts | 8 +- .../canvas/src/host-url.test.ts | 2 +- extensions/canvas/src/host-url.ts | 15 + .../canvas/src/host/a2ui-app}/bootstrap.js | 109 +- .../src/host/a2ui-app}/rolldown.config.mjs | 22 +- .../canvas/src/host}/a2ui-shared.ts | 2 +- .../canvas/src/host}/a2ui.ts | 19 +- extensions/canvas/src/host/a2ui/.bundle.hash | 1 + .../canvas/src/host}/a2ui/index.html | 0 .../canvas/src/host}/file-resolver.test.ts | 2 +- .../canvas/src/host}/file-resolver.ts | 6 +- .../canvas/src/host}/server.state-dir.test.ts | 4 +- .../canvas/src/host}/server.test.ts | 4 +- .../canvas/src/host}/server.ts | 24 +- extensions/canvas/src/http-route.ts | 72 + extensions/canvas/src/tool.test.ts | 92 + .../canvas/src/tool.ts | 153 +- .../codex/src/app-server/auth-bridge.ts | 22 +- .../codex/src/app-server/computer-use.ts | 65 +- .../codex/src/app-server/event-projector.ts | 4 +- extensions/codex/src/app-server/models.ts | 6 +- .../json/DynamicToolCallParams.json | 31 +- .../json/v2/ErrorNotification.json | 124 +- .../json/v2/GetAccountResponse.json | 61 +- .../json/v2/ModelListResponse.json | 197 +- .../json/v2/ThreadResumeResponse.json | 1984 +- .../json/v2/ThreadStartResponse.json | 1984 +- .../json/v2/TurnCompletedNotification.json | 1270 +- .../json/v2/TurnStartResponse.json | 1266 +- .../typescript/AbsolutePathBuf.ts | 14 - .../typescript/AgentPath.ts | 5 - .../typescript/ApplyPatchApprovalParams.ts | 24 - .../typescript/ApplyPatchApprovalResponse.ts | 6 - .../protocol-generated/typescript/AuthMode.ts | 8 - .../typescript/ClientInfo.ts | 5 - .../typescript/ClientNotification.ts | 5 - .../typescript/ClientRequest.ts | 244 - .../typescript/CollaborationMode.ts | 10 - .../typescript/ContentItem.ts | 9 - .../typescript/ConversationGitInfo.ts | 9 - .../typescript/ConversationSummary.ts | 19 - .../typescript/ExecCommandApprovalParams.ts | 22 - .../typescript/ExecCommandApprovalResponse.ts | 6 - .../typescript/ExecPolicyAmendment.ts | 12 - .../typescript/FileChange.ts | 8 - .../typescript/ForcedLoginMethod.ts | 5 - .../typescript/FunctionCallOutputBody.ts | 6 - .../FunctionCallOutputContentItem.ts | 12 - .../typescript/FuzzyFileSearchMatchType.ts | 5 - .../typescript/FuzzyFileSearchParams.ts | 9 - .../typescript/FuzzyFileSearchResponse.ts | 6 - .../typescript/FuzzyFileSearchResult.ts | 16 - ...yFileSearchSessionCompletedNotification.ts | 5 - .../FuzzyFileSearchSessionStartParams.ts | 5 - .../FuzzyFileSearchSessionStartResponse.ts | 5 - .../FuzzyFileSearchSessionStopParams.ts | 5 - .../FuzzyFileSearchSessionStopResponse.ts | 5 - .../FuzzyFileSearchSessionUpdateParams.ts | 5 - .../FuzzyFileSearchSessionUpdateResponse.ts | 5 - ...zzyFileSearchSessionUpdatedNotification.ts | 10 - .../typescript/GetAuthStatusParams.ts | 5 - .../typescript/GetAuthStatusResponse.ts | 10 - .../GetConversationSummaryParams.ts | 6 - .../GetConversationSummaryResponse.ts | 6 - .../typescript/GitDiffToRemoteParams.ts | 5 - .../typescript/GitDiffToRemoteResponse.ts | 6 - .../protocol-generated/typescript/GitSha.ts | 5 - .../typescript/ImageDetail.ts | 5 - .../typescript/InitializeCapabilities.ts | 18 - .../typescript/InitializeParams.ts | 10 - .../typescript/InitializeResponse.ts | 22 - .../typescript/InputModality.ts | 8 - .../typescript/InternalSessionSource.ts | 5 - .../typescript/LocalShellAction.ts | 6 - .../typescript/LocalShellExecAction.ts | 11 - .../typescript/LocalShellStatus.ts | 5 - .../typescript/MessagePhase.ts | 11 - .../protocol-generated/typescript/ModeKind.ts | 8 - .../typescript/NetworkPolicyAmendment.ts | 6 - .../typescript/NetworkPolicyRuleAction.ts | 5 - .../typescript/ParsedCommand.ts | 20 - .../typescript/Personality.ts | 5 - .../protocol-generated/typescript/PlanType.ts | 17 - .../typescript/RealtimeConversationVersion.ts | 5 - .../typescript/RealtimeOutputModality.ts | 5 - .../typescript/RealtimeVoice.ts | 24 - .../typescript/RealtimeVoicesList.ts | 11 - .../typescript/ReasoningEffort.ts | 8 - .../typescript/ReasoningItemContent.ts | 7 - .../ReasoningItemReasoningSummary.ts | 5 - .../typescript/ReasoningSummary.ts | 10 - .../typescript/RequestId.ts | 5 - .../protocol-generated/typescript/Resource.ts | 19 - .../typescript/ResourceContent.ts | 27 - .../typescript/ResourceTemplate.ts | 16 - .../typescript/ResponseItem.ts | 63 - .../typescript/ReviewDecision.ts | 17 - .../typescript/ServerNotification.ts | 150 - .../typescript/ServerRequest.ts | 47 - .../typescript/ServiceTier.ts | 5 - .../typescript/SessionSource.ts | 15 - .../protocol-generated/typescript/Settings.ts | 13 - .../typescript/SubAgentSource.ts | 20 - .../protocol-generated/typescript/ThreadId.ts | 5 - .../typescript/ThreadMemoryMode.ts | 5 - .../protocol-generated/typescript/Tool.ts | 18 - .../typescript/Verbosity.ts | 9 - .../typescript/WebSearchAction.ts | 9 - .../typescript/WebSearchContextSize.ts | 5 - .../typescript/WebSearchLocation.ts | 10 - .../typescript/WebSearchMode.ts | 5 - .../typescript/WebSearchToolConfig.ts | 11 - .../protocol-generated/typescript/index.ts | 86 - .../typescript/serde_json/JsonValue.ts | 11 - .../typescript/v2/Account.ts | 9 - .../v2/AccountLoginCompletedNotification.ts | 9 - .../AccountRateLimitsUpdatedNotification.ts | 6 - .../v2/AccountUpdatedNotification.ts | 7 - .../typescript/v2/ActivePermissionProfile.ts | 22 - .../v2/ActivePermissionProfileModification.ts | 9 - .../v2/AddCreditsNudgeCreditType.ts | 5 - .../v2/AddCreditsNudgeEmailStatus.ts | 5 - .../v2/AdditionalFileSystemPermissions.ts | 18 - .../v2/AdditionalNetworkPermissions.ts | 5 - .../v2/AdditionalPermissionProfile.ts | 13 - .../v2/AgentMessageDeltaNotification.ts | 10 - .../typescript/v2/AnalyticsConfig.ts | 14 - .../typescript/v2/AppBranding.ts | 15 - .../typescript/v2/AppInfo.ts | 32 - .../v2/AppListUpdatedNotification.ts | 9 - .../typescript/v2/AppMetadata.ts | 20 - .../typescript/v2/AppReview.ts | 5 - .../typescript/v2/AppScreenshot.ts | 5 - .../typescript/v2/AppSummary.ts | 14 - .../typescript/v2/AppToolApproval.ts | 5 - .../typescript/v2/AppToolsConfig.ts | 8 - .../typescript/v2/ApprovalsReviewer.ts | 12 - .../typescript/v2/AppsConfig.ts | 17 - .../typescript/v2/AppsDefaultConfig.ts | 9 - .../typescript/v2/AppsListParams.ts | 25 - .../typescript/v2/AppsListResponse.ts | 16 - .../typescript/v2/AskForApproval.ts | 18 - .../typescript/v2/AutoReviewDecisionSource.ts | 8 - .../typescript/v2/ByteRange.ts | 5 - .../typescript/v2/CancelLoginAccountParams.ts | 5 - .../v2/CancelLoginAccountResponse.ts | 6 - .../typescript/v2/CancelLoginAccountStatus.ts | 5 - .../v2/ChatgptAuthTokensRefreshParams.ts | 18 - .../v2/ChatgptAuthTokensRefreshReason.ts | 5 - .../v2/ChatgptAuthTokensRefreshResponse.ts | 9 - .../typescript/v2/CodexErrorInfo.ts | 27 - .../typescript/v2/CollabAgentState.ts | 6 - .../typescript/v2/CollabAgentStatus.ts | 12 - .../typescript/v2/CollabAgentTool.ts | 5 - .../v2/CollabAgentToolCallStatus.ts | 5 - .../v2/CollaborationModeListParams.ts | 8 - .../v2/CollaborationModeListResponse.ts | 9 - .../typescript/v2/CollaborationModeMask.ts | 15 - .../typescript/v2/CommandAction.ts | 10 - .../v2/CommandExecOutputDeltaNotification.ts | 31 - .../typescript/v2/CommandExecOutputStream.ts | 8 - .../typescript/v2/CommandExecParams.ts | 107 - .../typescript/v2/CommandExecResizeParams.ts | 19 - .../v2/CommandExecResizeResponse.ts | 8 - .../typescript/v2/CommandExecResponse.ts | 25 - .../typescript/v2/CommandExecTerminalSize.ts | 17 - .../v2/CommandExecTerminateParams.ts | 14 - .../v2/CommandExecTerminateResponse.ts | 8 - .../typescript/v2/CommandExecWriteParams.ts | 23 - .../typescript/v2/CommandExecWriteResponse.ts | 8 - .../v2/CommandExecutionApprovalDecision.ts | 13 - ...CommandExecutionOutputDeltaNotification.ts | 10 - .../CommandExecutionRequestApprovalParams.ts | 62 - ...CommandExecutionRequestApprovalResponse.ts | 8 - .../typescript/v2/CommandExecutionSource.ts | 9 - .../typescript/v2/CommandExecutionStatus.ts | 5 - .../typescript/v2/CommandMigration.ts | 5 - .../typescript/v2/Config.ts | 57 - .../typescript/v2/ConfigBatchWriteParams.ts | 17 - .../typescript/v2/ConfigEdit.ts | 7 - .../typescript/v2/ConfigLayer.ts | 12 - .../typescript/v2/ConfigLayerMetadata.ts | 6 - .../typescript/v2/ConfigLayerSource.ts | 27 - .../typescript/v2/ConfigReadParams.ts | 13 - .../typescript/v2/ConfigReadResponse.ts | 12 - .../typescript/v2/ConfigRequirements.ts | 21 - .../v2/ConfigRequirementsReadResponse.ts | 11 - .../typescript/v2/ConfigValueWriteParams.ts | 16 - .../v2/ConfigWarningNotification.ts | 23 - .../typescript/v2/ConfigWriteResponse.ts | 16 - .../typescript/v2/ConfiguredHookHandler.ts | 14 - .../v2/ConfiguredHookMatcherGroup.ts | 9 - .../v2/ContextCompactedNotification.ts | 8 - .../typescript/v2/CreditsSnapshot.ts | 5 - .../v2/DeprecationNoticeNotification.ts | 14 - .../typescript/v2/DeviceKeyAlgorithm.ts | 8 - .../typescript/v2/DeviceKeyCreateParams.ts | 16 - .../typescript/v2/DeviceKeyCreateResponse.ts | 18 - .../typescript/v2/DeviceKeyProtectionClass.ts | 11 - .../v2/DeviceKeyProtectionPolicy.ts | 8 - .../typescript/v2/DeviceKeyPublicParams.ts | 8 - .../typescript/v2/DeviceKeyPublicResponse.ts | 18 - .../typescript/v2/DeviceKeySignParams.ts | 9 - .../typescript/v2/DeviceKeySignPayload.ts | 68 - .../typescript/v2/DeviceKeySignResponse.ts | 20 - .../v2/DynamicToolCallOutputContentItem.ts | 7 - .../typescript/v2/DynamicToolCallParams.ts | 13 - .../typescript/v2/DynamicToolCallResponse.ts | 9 - .../typescript/v2/DynamicToolCallStatus.ts | 5 - .../typescript/v2/DynamicToolSpec.ts | 12 - .../typescript/v2/ErrorNotification.ts | 11 - .../typescript/v2/ExecPolicyAmendment.ts | 5 - .../typescript/v2/ExperimentalFeature.ts | 38 - .../ExperimentalFeatureEnablementSetParams.ts | 13 - ...xperimentalFeatureEnablementSetResponse.ts | 10 - .../v2/ExperimentalFeatureListParams.ts | 14 - .../v2/ExperimentalFeatureListResponse.ts | 13 - .../typescript/v2/ExperimentalFeatureStage.ts | 10 - .../v2/ExternalAgentConfigDetectParams.ts | 14 - .../v2/ExternalAgentConfigDetectResponse.ts | 6 - ...lAgentConfigImportCompletedNotification.ts | 5 - .../v2/ExternalAgentConfigImportParams.ts | 8 - .../v2/ExternalAgentConfigImportResponse.ts | 5 - .../v2/ExternalAgentConfigMigrationItem.ts | 15 - .../ExternalAgentConfigMigrationItemType.ts | 14 - .../typescript/v2/FeedbackUploadParams.ts | 12 - .../typescript/v2/FeedbackUploadResponse.ts | 5 - .../v2/FileChangeApprovalDecision.ts | 5 - .../v2/FileChangeOutputDeltaNotification.ts | 15 - .../v2/FileChangePatchUpdatedNotification.ts | 11 - .../v2/FileChangeRequestApprovalParams.ts | 18 - .../v2/FileChangeRequestApprovalResponse.ts | 6 - .../typescript/v2/FileSystemAccessMode.ts | 5 - .../typescript/v2/FileSystemPath.ts | 10 - .../typescript/v2/FileSystemSandboxEntry.ts | 7 - .../typescript/v2/FileSystemSpecialPath.ts | 11 - .../typescript/v2/FileUpdateChange.ts | 6 - .../typescript/v2/FsChangedNotification.ts | 18 - .../typescript/v2/FsCopyParams.ts | 22 - .../typescript/v2/FsCopyResponse.ts | 8 - .../typescript/v2/FsCreateDirectoryParams.ts | 18 - .../v2/FsCreateDirectoryResponse.ts | 8 - .../typescript/v2/FsGetMetadataParams.ts | 14 - .../typescript/v2/FsGetMetadataResponse.ts | 29 - .../typescript/v2/FsReadDirectoryEntry.ts | 21 - .../typescript/v2/FsReadDirectoryParams.ts | 14 - .../typescript/v2/FsReadDirectoryResponse.ts | 14 - .../typescript/v2/FsReadFileParams.ts | 14 - .../typescript/v2/FsReadFileResponse.ts | 13 - .../typescript/v2/FsRemoveParams.ts | 22 - .../typescript/v2/FsRemoveResponse.ts | 8 - .../typescript/v2/FsUnwatchParams.ts | 13 - .../typescript/v2/FsUnwatchResponse.ts | 8 - .../typescript/v2/FsWatchParams.ts | 18 - .../typescript/v2/FsWatchResponse.ts | 14 - .../typescript/v2/FsWriteFileParams.ts | 18 - .../typescript/v2/FsWriteFileResponse.ts | 8 - .../typescript/v2/GetAccountParams.ts | 14 - .../v2/GetAccountRateLimitsResponse.ts | 15 - .../typescript/v2/GetAccountResponse.ts | 6 - .../typescript/v2/GitInfo.ts | 5 - .../typescript/v2/GrantedPermissionProfile.ts | 10 - .../typescript/v2/GuardianApprovalReview.ts | 18 - .../v2/GuardianApprovalReviewAction.ts | 34 - .../v2/GuardianApprovalReviewStatus.ts | 13 - .../typescript/v2/GuardianCommandSource.ts | 5 - .../typescript/v2/GuardianRiskLevel.ts | 8 - .../v2/GuardianUserAuthorization.ts | 8 - .../v2/GuardianWarningNotification.ts | 14 - .../v2/HookCompletedNotification.ts | 10 - .../typescript/v2/HookErrorInfo.ts | 5 - .../typescript/v2/HookEventName.ts | 11 - .../typescript/v2/HookExecutionMode.ts | 5 - .../typescript/v2/HookHandlerType.ts | 5 - .../typescript/v2/HookMetadata.ts | 23 - .../typescript/v2/HookMigration.ts | 5 - .../typescript/v2/HookOutputEntry.ts | 6 - .../typescript/v2/HookOutputEntryKind.ts | 5 - .../typescript/v2/HookPromptFragment.ts | 5 - .../typescript/v2/HookRunStatus.ts | 5 - .../typescript/v2/HookRunSummary.ts | 28 - .../typescript/v2/HookScope.ts | 5 - .../typescript/v2/HookSource.ts | 15 - .../typescript/v2/HookStartedNotification.ts | 10 - .../typescript/v2/HooksListEntry.ts | 12 - .../typescript/v2/HooksListParams.ts | 10 - .../typescript/v2/HooksListResponse.ts | 6 - .../v2/ItemCompletedNotification.ts | 14 - ...dianApprovalReviewCompletedNotification.ts | 36 - ...ardianApprovalReviewStartedNotification.ts | 34 - .../typescript/v2/ItemStartedNotification.ts | 14 - .../v2/ListMcpServerStatusParams.ts | 20 - .../v2/ListMcpServerStatusResponse.ts | 13 - .../typescript/v2/LoginAccountParams.ts | 27 - .../typescript/v2/LoginAccountResponse.ts | 27 - .../typescript/v2/LogoutAccountResponse.ts | 5 - .../typescript/v2/ManagedHooksRequirements.ts | 15 - .../typescript/v2/MarketplaceAddParams.ts | 9 - .../typescript/v2/MarketplaceAddResponse.ts | 10 - .../typescript/v2/MarketplaceInterface.ts | 5 - .../typescript/v2/MarketplaceLoadErrorInfo.ts | 6 - .../typescript/v2/MarketplaceRemoveParams.ts | 5 - .../v2/MarketplaceRemoveResponse.ts | 9 - .../v2/MarketplaceUpgradeErrorInfo.ts | 5 - .../typescript/v2/MarketplaceUpgradeParams.ts | 5 - .../v2/MarketplaceUpgradeResponse.ts | 11 - .../typescript/v2/McpAuthStatus.ts | 5 - .../typescript/v2/McpElicitationArrayType.ts | 5 - .../v2/McpElicitationBooleanSchema.ts | 11 - .../v2/McpElicitationBooleanType.ts | 5 - .../v2/McpElicitationConstOption.ts | 5 - .../typescript/v2/McpElicitationEnumSchema.ts | 11 - .../McpElicitationLegacyTitledEnumSchema.ts | 13 - .../v2/McpElicitationMultiSelectEnumSchema.ts | 9 - .../v2/McpElicitationNumberSchema.ts | 13 - .../typescript/v2/McpElicitationNumberType.ts | 5 - .../typescript/v2/McpElicitationObjectType.ts | 5 - .../v2/McpElicitationPrimitiveSchema.ts | 13 - .../typescript/v2/McpElicitationSchema.ts | 18 - .../McpElicitationSingleSelectEnumSchema.ts | 9 - .../v2/McpElicitationStringFormat.ts | 5 - .../v2/McpElicitationStringSchema.ts | 15 - .../typescript/v2/McpElicitationStringType.ts | 5 - .../v2/McpElicitationTitledEnumItems.ts | 6 - ...pElicitationTitledMultiSelectEnumSchema.ts | 15 - ...ElicitationTitledSingleSelectEnumSchema.ts | 13 - .../v2/McpElicitationUntitledEnumItems.ts | 9 - ...licitationUntitledMultiSelectEnumSchema.ts | 15 - ...icitationUntitledSingleSelectEnumSchema.ts | 12 - .../typescript/v2/McpResourceReadParams.ts | 5 - .../typescript/v2/McpResourceReadResponse.ts | 6 - .../v2/McpServerElicitationAction.ts | 5 - .../v2/McpServerElicitationRequestParams.ts | 27 - .../v2/McpServerElicitationRequestResponse.ts | 19 - .../typescript/v2/McpServerMigration.ts | 5 - ...cpServerOauthLoginCompletedNotification.ts | 9 - .../v2/McpServerOauthLoginParams.ts | 9 - .../v2/McpServerOauthLoginResponse.ts | 5 - .../typescript/v2/McpServerRefreshResponse.ts | 5 - .../typescript/v2/McpServerStartupState.ts | 5 - .../typescript/v2/McpServerStatus.ts | 15 - .../typescript/v2/McpServerStatusDetail.ts | 5 - .../v2/McpServerStatusUpdatedNotification.ts | 10 - .../typescript/v2/McpServerToolCallParams.ts | 12 - .../v2/McpServerToolCallResponse.ts | 11 - .../typescript/v2/McpToolCallError.ts | 5 - .../v2/McpToolCallProgressNotification.ts | 10 - .../typescript/v2/McpToolCallResult.ts | 10 - .../typescript/v2/McpToolCallStatus.ts | 5 - .../typescript/v2/MemoryCitation.ts | 6 - .../typescript/v2/MemoryCitationEntry.ts | 10 - .../typescript/v2/MemoryResetResponse.ts | 5 - .../typescript/v2/MergeStrategy.ts | 5 - .../typescript/v2/MigrationDetails.ts | 18 - .../v2/MockExperimentalMethodParams.ts | 10 - .../v2/MockExperimentalMethodResponse.ts | 10 - .../protocol-generated/typescript/v2/Model.ts | 25 - .../typescript/v2/ModelAvailabilityNux.ts | 5 - .../typescript/v2/ModelListParams.ts | 18 - .../typescript/v2/ModelListResponse.ts | 13 - .../v2/ModelProviderCapabilitiesReadParams.ts | 5 - .../ModelProviderCapabilitiesReadResponse.ts | 9 - .../typescript/v2/ModelRerouteReason.ts | 5 - .../v2/ModelReroutedNotification.ts | 12 - .../typescript/v2/ModelUpgradeInfo.ts | 10 - .../typescript/v2/ModelVerification.ts | 5 - .../v2/ModelVerificationNotification.ts | 10 - .../typescript/v2/NetworkAccess.ts | 5 - .../typescript/v2/NetworkApprovalContext.ts | 6 - .../typescript/v2/NetworkApprovalProtocol.ts | 5 - .../typescript/v2/NetworkDomainPermission.ts | 5 - .../typescript/v2/NetworkPolicyAmendment.ts | 6 - .../typescript/v2/NetworkPolicyRuleAction.ts | 5 - .../typescript/v2/NetworkRequirements.ts | 40 - .../v2/NetworkUnixSocketPermission.ts | 5 - .../typescript/v2/NonSteerableTurnKind.ts | 5 - .../typescript/v2/OverriddenMetadata.ts | 11 - .../typescript/v2/PatchApplyStatus.ts | 5 - .../typescript/v2/PatchChangeKind.ts | 8 - .../typescript/v2/PermissionGrantScope.ts | 5 - .../typescript/v2/PermissionProfile.ts | 14 - .../PermissionProfileFileSystemPermissions.ts | 8 - .../v2/PermissionProfileModificationParams.ts | 9 - .../v2/PermissionProfileNetworkPermissions.ts | 5 - .../v2/PermissionProfileSelectionParams.ts | 10 - .../v2/PermissionsRequestApprovalParams.ts | 14 - .../v2/PermissionsRequestApprovalResponse.ts | 14 - .../typescript/v2/PlanDeltaNotification.ts | 14 - .../typescript/v2/PluginAuthPolicy.ts | 5 - .../typescript/v2/PluginAvailability.ts | 5 - .../typescript/v2/PluginDetail.ts | 17 - .../typescript/v2/PluginInstallParams.ts | 10 - .../typescript/v2/PluginInstallPolicy.ts | 5 - .../typescript/v2/PluginInstallResponse.ts | 10 - .../typescript/v2/PluginInterface.ts | 46 - .../typescript/v2/PluginListParams.ts | 12 - .../typescript/v2/PluginListResponse.ts | 11 - .../typescript/v2/PluginMarketplaceEntry.ts | 17 - .../typescript/v2/PluginReadParams.ts | 10 - .../typescript/v2/PluginReadResponse.ts | 6 - .../typescript/v2/PluginShareDeleteParams.ts | 5 - .../v2/PluginShareDeleteResponse.ts | 5 - .../typescript/v2/PluginShareListItem.ts | 11 - .../typescript/v2/PluginShareListParams.ts | 5 - .../typescript/v2/PluginShareListResponse.ts | 6 - .../typescript/v2/PluginShareSaveParams.ts | 6 - .../typescript/v2/PluginShareSaveResponse.ts | 5 - .../typescript/v2/PluginSkillReadParams.ts | 9 - .../typescript/v2/PluginSkillReadResponse.ts | 5 - .../typescript/v2/PluginSource.ts | 9 - .../typescript/v2/PluginSummary.ts | 23 - .../typescript/v2/PluginUninstallParams.ts | 5 - .../typescript/v2/PluginUninstallResponse.ts | 5 - .../typescript/v2/PluginsMigration.ts | 5 - .../typescript/v2/ProfileV2.ts | 39 - .../typescript/v2/RateLimitReachedType.ts | 10 - .../typescript/v2/RateLimitSnapshot.ts | 17 - .../typescript/v2/RateLimitWindow.ts | 9 - .../RawResponseItemCompletedNotification.ts | 10 - .../typescript/v2/ReasoningEffortOption.ts | 6 - .../ReasoningSummaryPartAddedNotification.ts | 10 - .../ReasoningSummaryTextDeltaNotification.ts | 11 - .../v2/ReasoningTextDeltaNotification.ts | 11 - .../RemoteControlClientConnectionAudience.ts | 8 - .../RemoteControlClientEnrollmentAudience.ts | 8 - .../v2/RemoteControlConnectionStatus.ts | 5 - .../RemoteControlStatusChangedNotification.ts | 12 - .../typescript/v2/RequestPermissionProfile.ts | 10 - .../typescript/v2/ResidencyRequirement.ts | 5 - .../typescript/v2/ReviewDelivery.ts | 5 - .../typescript/v2/ReviewStartParams.ts | 15 - .../typescript/v2/ReviewStartResponse.ts | 15 - .../typescript/v2/ReviewTarget.ts | 16 - .../typescript/v2/SandboxMode.ts | 5 - .../typescript/v2/SandboxPolicy.ts | 17 - .../typescript/v2/SandboxWorkspaceWrite.ts | 10 - .../v2/SendAddCreditsNudgeEmailParams.ts | 6 - .../v2/SendAddCreditsNudgeEmailResponse.ts | 6 - .../v2/ServerRequestResolvedNotification.ts | 6 - .../typescript/v2/SessionMigration.ts | 5 - .../typescript/v2/SessionSource.ts | 13 - .../typescript/v2/SkillDependencies.ts | 6 - .../typescript/v2/SkillErrorInfo.ts | 5 - .../typescript/v2/SkillInterface.ts | 13 - .../typescript/v2/SkillMetadata.ts | 21 - .../typescript/v2/SkillScope.ts | 5 - .../typescript/v2/SkillSummary.ts | 14 - .../typescript/v2/SkillToolDependency.ts | 12 - .../v2/SkillsChangedNotification.ts | 11 - .../typescript/v2/SkillsConfigWriteParams.ts | 16 - .../v2/SkillsConfigWriteResponse.ts | 5 - .../typescript/v2/SkillsListEntry.ts | 11 - .../v2/SkillsListExtraRootsForCwd.ts | 5 - .../typescript/v2/SkillsListParams.ts | 19 - .../typescript/v2/SkillsListResponse.ts | 6 - .../typescript/v2/SortDirection.ts | 5 - .../typescript/v2/SubagentMigration.ts | 5 - .../v2/TerminalInteractionNotification.ts | 11 - .../typescript/v2/TextElement.ts | 15 - .../typescript/v2/TextPosition.ts | 14 - .../typescript/v2/TextRange.ts | 6 - .../typescript/v2/Thread.ts | 79 - .../typescript/v2/ThreadActiveFlag.ts | 5 - ...ThreadApproveGuardianDeniedActionParams.ts | 12 - ...readApproveGuardianDeniedActionResponse.ts | 5 - .../typescript/v2/ThreadArchiveParams.ts | 5 - .../typescript/v2/ThreadArchiveResponse.ts | 5 - .../v2/ThreadArchivedNotification.ts | 5 - .../ThreadBackgroundTerminalsCleanParams.ts | 5 - .../ThreadBackgroundTerminalsCleanResponse.ts | 5 - .../typescript/v2/ThreadClosedNotification.ts | 5 - .../typescript/v2/ThreadCompactStartParams.ts | 5 - .../v2/ThreadCompactStartResponse.ts | 5 - .../v2/ThreadDecrementElicitationParams.ts | 13 - .../v2/ThreadDecrementElicitationResponse.ts | 17 - .../typescript/v2/ThreadForkParams.ts | 63 - .../typescript/v2/ThreadForkResponse.ts | 46 - .../typescript/v2/ThreadGoal.ts | 15 - .../typescript/v2/ThreadGoalClearParams.ts | 5 - .../typescript/v2/ThreadGoalClearResponse.ts | 5 - .../v2/ThreadGoalClearedNotification.ts | 5 - .../typescript/v2/ThreadGoalGetParams.ts | 5 - .../typescript/v2/ThreadGoalGetResponse.ts | 6 - .../typescript/v2/ThreadGoalSetParams.ts | 11 - .../typescript/v2/ThreadGoalSetResponse.ts | 6 - .../typescript/v2/ThreadGoalStatus.ts | 5 - .../v2/ThreadGoalUpdatedNotification.ts | 10 - .../v2/ThreadIncrementElicitationParams.ts | 13 - .../v2/ThreadIncrementElicitationResponse.ts | 17 - .../typescript/v2/ThreadInjectItemsParams.ts | 12 - .../v2/ThreadInjectItemsResponse.ts | 5 - .../typescript/v2/ThreadItem.ts | 156 - .../typescript/v2/ThreadListParams.ts | 55 - .../typescript/v2/ThreadListResponse.ts | 20 - .../typescript/v2/ThreadLoadedListParams.ts | 14 - .../typescript/v2/ThreadLoadedListResponse.ts | 15 - .../v2/ThreadMemoryModeSetParams.ts | 6 - .../v2/ThreadMemoryModeSetResponse.ts | 5 - .../v2/ThreadMetadataGitInfoUpdateParams.ts | 21 - .../v2/ThreadMetadataUpdateParams.ts | 14 - .../v2/ThreadMetadataUpdateResponse.ts | 6 - .../v2/ThreadNameUpdatedNotification.ts | 5 - .../typescript/v2/ThreadReadParams.ts | 11 - .../typescript/v2/ThreadReadResponse.ts | 6 - .../v2/ThreadRealtimeAppendAudioParams.ts | 9 - .../v2/ThreadRealtimeAppendAudioResponse.ts | 8 - .../v2/ThreadRealtimeAppendTextParams.ts | 8 - .../v2/ThreadRealtimeAppendTextResponse.ts | 8 - .../typescript/v2/ThreadRealtimeAudioChunk.ts | 14 - .../v2/ThreadRealtimeClosedNotification.ts | 8 - .../v2/ThreadRealtimeErrorNotification.ts | 8 - .../v2/ThreadRealtimeItemAddedNotification.ts | 9 - .../v2/ThreadRealtimeListVoicesParams.ts | 8 - .../v2/ThreadRealtimeListVoicesResponse.ts | 9 - ...eadRealtimeOutputAudioDeltaNotification.ts | 12 - .../v2/ThreadRealtimeSdpNotification.ts | 8 - .../v2/ThreadRealtimeStartParams.ts | 22 - .../v2/ThreadRealtimeStartResponse.ts | 8 - .../v2/ThreadRealtimeStartTransport.ts | 17 - .../v2/ThreadRealtimeStartedNotification.ts | 13 - .../typescript/v2/ThreadRealtimeStopParams.ts | 8 - .../v2/ThreadRealtimeStopResponse.ts | 8 - ...readRealtimeTranscriptDeltaNotification.ts | 16 - ...hreadRealtimeTranscriptDoneNotification.ts | 16 - .../typescript/v2/ThreadResumeParams.ts | 73 - .../typescript/v2/ThreadResumeResponse.ts | 46 - .../typescript/v2/ThreadRollbackParams.ts | 14 - .../typescript/v2/ThreadRollbackResponse.ts | 15 - .../typescript/v2/ThreadSetNameParams.ts | 5 - .../typescript/v2/ThreadSetNameResponse.ts | 5 - .../typescript/v2/ThreadShellCommandParams.ts | 14 - .../v2/ThreadShellCommandResponse.ts | 5 - .../typescript/v2/ThreadSortKey.ts | 5 - .../typescript/v2/ThreadSourceKind.ts | 15 - .../typescript/v2/ThreadStartParams.ts | 66 - .../typescript/v2/ThreadStartResponse.ts | 46 - .../typescript/v2/ThreadStartSource.ts | 5 - .../v2/ThreadStartedNotification.ts | 6 - .../typescript/v2/ThreadStatus.ts | 10 - .../v2/ThreadStatusChangedNotification.ts | 6 - .../typescript/v2/ThreadTokenUsage.ts | 10 - .../v2/ThreadTokenUsageUpdatedNotification.ts | 10 - .../typescript/v2/ThreadTurnsListParams.ts | 20 - .../typescript/v2/ThreadTurnsListResponse.ts | 20 - .../typescript/v2/ThreadUnarchiveParams.ts | 5 - .../typescript/v2/ThreadUnarchiveResponse.ts | 6 - .../v2/ThreadUnarchivedNotification.ts | 5 - .../typescript/v2/ThreadUnsubscribeParams.ts | 5 - .../v2/ThreadUnsubscribeResponse.ts | 6 - .../typescript/v2/ThreadUnsubscribeStatus.ts | 5 - .../typescript/v2/TokenUsageBreakdown.ts | 11 - .../v2/ToolRequestUserInputAnswer.ts | 8 - .../v2/ToolRequestUserInputOption.ts | 8 - .../v2/ToolRequestUserInputParams.ts | 14 - .../v2/ToolRequestUserInputQuestion.ts | 16 - .../v2/ToolRequestUserInputResponse.ts | 11 - .../typescript/v2/ToolsV2.ts | 6 - .../protocol-generated/typescript/v2/Turn.ts | 33 - .../v2/TurnCompletedNotification.ts | 6 - .../v2/TurnDiffUpdatedNotification.ts | 9 - .../typescript/v2/TurnEnvironmentParams.ts | 6 - .../typescript/v2/TurnError.ts | 10 - .../typescript/v2/TurnInterruptParams.ts | 5 - .../typescript/v2/TurnInterruptResponse.ts | 5 - .../typescript/v2/TurnPlanStep.ts | 6 - .../typescript/v2/TurnPlanStepStatus.ts | 5 - .../v2/TurnPlanUpdatedNotification.ts | 11 - .../typescript/v2/TurnStartParams.ts | 89 - .../typescript/v2/TurnStartResponse.ts | 6 - .../typescript/v2/TurnStartedNotification.ts | 6 - .../typescript/v2/TurnStatus.ts | 5 - .../typescript/v2/TurnSteerParams.ts | 18 - .../typescript/v2/TurnSteerResponse.ts | 5 - .../typescript/v2/UserInput.ts | 18 - .../typescript/v2/WarningNotification.ts | 14 - .../typescript/v2/WebSearchAction.ts | 9 - ...indowsSandboxSetupCompletedNotification.ts | 10 - .../typescript/v2/WindowsSandboxSetupMode.ts | 5 - .../v2/WindowsSandboxSetupStartParams.ts | 10 - .../v2/WindowsSandboxSetupStartResponse.ts | 5 - ...WindowsWorldWritableWarningNotification.ts | 9 - .../typescript/v2/WriteStatus.ts | 5 - .../protocol-generated/typescript/v2/index.ts | 470 - .../src/app-server/protocol-validators.ts | 16 +- extensions/codex/src/app-server/protocol.ts | 307 +- extensions/deepseek/index.test.ts | 217 +- extensions/discord/src/channel.test.ts | 27 - extensions/discord/src/channel.ts | 16 - extensions/discord/src/normalize.ts | 3 - .../discord/src/outbound-adapter.test.ts | 7 - .../src/outbound-session-route.test.ts | 32 - extensions/discord/src/target-parsing.ts | 17 - extensions/discord/src/targets.test.ts | 6 - .../src/memory/search-manager.test.ts | 182 +- .../qa-lab/src/mantis/crabbox-runtime.ts | 208 + .../mantis/desktop-browser-smoke.runtime.ts | 214 +- .../src/mantis/slack-desktop-smoke.runtime.ts | 219 +- .../qa-lab/src/mantis/visual-task.runtime.ts | 189 +- extensions/telegram/src/bot-access.ts | 38 - .../telegram/src/bot-handlers.runtime.ts | 19 +- .../telegram/src/bot-message-context.ts | 23 +- .../telegram/src/bot-message-dispatch.test.ts | 18 - .../telegram/src/bot-native-commands.ts | 20 +- .../src/bot.create-telegram-bot.test.ts | 79 - extensions/telegram/src/bot/helpers.ts | 18 +- .../telegram/src/polling-liveness.test.ts | 16 +- extensions/telegram/src/polling-liveness.ts | 51 +- .../telegram/src/polling-session.test.ts | 41 +- package.json | 9 +- pnpm-lock.yaml | 76 +- scripts/build-all.mjs | 16 +- scripts/bundle-a2ui.mjs | 221 +- scripts/bundled-plugin-assets.mjs | 177 + scripts/check-codex-app-server-protocol.ts | 50 +- scripts/ci-changed-scope.mjs | 23 +- scripts/ci-run-timings.mjs | 160 +- scripts/ci-runner-labels.mjs | 200 - scripts/e2e/lib/parallels-package-common.sh | 2 +- scripts/e2e/parallels/package-artifact.ts | 10 +- scripts/lib/ci-node-test-plan.mjs | 8 +- scripts/pre-commit/filter-staged-files.mjs | 6 +- scripts/prepush-ci.sh | 3 +- scripts/protocol-gen-swift.ts | 1 - scripts/restart-mac.sh | 4 +- scripts/run-additional-boundary-checks.mjs | 25 +- scripts/run-node-watch-paths.mjs | 10 +- scripts/sync-codex-app-server-protocol.ts | 5 +- scripts/test-projects.test-support.mjs | 15 +- src/agents/command/delivery.test.ts | 18 +- src/agents/command/delivery.ts | 4 +- ...compaction.identifier-preservation.test.ts | 1 - ...compaction.reserve-tokens-clamping.test.ts | 154 - src/agents/compaction.ts | 11 +- src/agents/failover-error.ts | 2 +- src/agents/model-fallback.test.ts | 30 - src/agents/model-fallback.ts | 4 - src/agents/openclaw-gateway-tool.test.ts | 1 - .../openclaw-tools.subagents.scope.test.ts | 1 - ...subagents.sessions-spawn.lifecycle.test.ts | 1 - ...s.steer-failure-clears-suppression.test.ts | 1 - src/agents/openclaw-tools.ts | 2 - src/agents/openclaw-tools.tts-config.test.ts | 4 - .../pi-embedded-runner/system-prompt.ts | 1 - .../tool-result-context-guard.test.ts | 45 - .../tool-result-context-guard.ts | 17 +- ...-embedded-subscribe.handlers.tools.test.ts | 411 - .../pi-embedded-subscribe.handlers.tools.ts | 111 +- ...s.before-tool-call.integration.e2e.test.ts | 3 +- src/agents/subagent-registry.test.ts | 8 - src/agents/subagent-registry.ts | 14 +- src/agents/system-prompt-params.test.ts | 9 - src/agents/system-prompt-params.ts | 21 - src/agents/system-prompt.test.ts | 4 +- src/agents/system-prompt.ts | 12 +- src/agents/test-helpers/fast-core-tools.ts | 6 - src/agents/tool-catalog.ts | 3 +- src/agents/tools/message-tool.test.ts | 3 - src/auto-reply/reply/session.test.ts | 30 - src/canvas-host/a2ui/.bundle.hash | 1 - src/canvas-host/a2ui/a2ui.bundle.js | 14908 ---------------- src/channels/draft-stream-controls.test.ts | 62 - src/cli/cli-utils.test.ts | 2 +- src/cli/completion-runtime.ts | 4 +- src/cli/nodes-canvas.ts | 24 - src/cli/nodes-cli.coverage.test.ts | 11 +- src/cli/nodes-cli/register.canvas.ts | 247 - src/cli/nodes-cli/register.ts | 10 +- src/cli/program.nodes-basic.e2e.test.ts | 6 +- src/cli/program.nodes-media.e2e.test.ts | 16 +- .../doctor-cron-store-migration.test.ts | 43 - src/commands/doctor-cron-store-migration.ts | 21 - src/commands/doctor-cron.test.ts | 61 - src/commands/doctor-cron.ts | 6 - src/config/config-misc.test.ts | 23 + src/config/config.plugin-validation.test.ts | 49 - src/config/config.web-search-provider.test.ts | 20 +- src/config/plugin-auto-enable.apply.ts | 29 +- src/config/schema-base.ts | 2 +- src/config/schema.base.generated.test.ts | 9 +- src/config/schema.help.quality.test.ts | 6 - src/config/schema.help.ts | 10 - src/config/schema.labels.ts | 5 - src/config/sessions/paths.ts | 68 - src/config/sessions/sessions.test.ts | 52 - src/config/types.gateway.ts | 10 - src/config/types.openclaw.ts | 8 +- src/config/validation.ts | 22 +- src/config/zod-schema.ts | 20 +- .../run.message-tool-policy.test.ts | 64 +- src/cron/isolated-agent/run.ts | 46 - src/gateway/canvas-capability.ts | 87 - src/gateway/config-reload-plan.ts | 1 - src/gateway/gateway-misc.test.ts | 4 +- src/gateway/hosted-plugin-surface-url.test.ts | 26 + .../hosted-plugin-surface-url.ts} | 41 +- src/gateway/method-scopes.test.ts | 1 + src/gateway/method-scopes.ts | 2 +- src/gateway/node-command-policy.test.ts | 57 +- src/gateway/node-command-policy.ts | 54 +- src/gateway/plugin-node-capability.test.ts | 182 + src/gateway/plugin-node-capability.ts | 255 + src/gateway/protocol/schema/frames.ts | 2 +- src/gateway/protocol/version.ts | 2 +- src/gateway/role-policy.test.ts | 2 + src/gateway/server-close.test.ts | 11 +- src/gateway/server-close.ts | 9 - src/gateway/server-http.request-trace.test.ts | 1 - src/gateway/server-http.test-harness.ts | 1 - src/gateway/server-http.ts | 154 +- src/gateway/server-import-boundary.test.ts | 2 +- src/gateway/server-methods-list.test.ts | 4 + src/gateway/server-methods-list.ts | 2 +- src/gateway/server-methods/agent.test.ts | 132 - src/gateway/server-methods/agent.ts | 13 - .../nodes.canvas-capability-refresh.test.ts | 63 - .../server-methods/nodes.invoke-wake.test.ts | 49 + src/gateway/server-methods/nodes.ts | 112 +- src/gateway/server-methods/shared-types.ts | 7 +- src/gateway/server-runtime-config.ts | 5 - src/gateway/server-runtime-state.test.ts | 45 +- src/gateway/server-runtime-state.ts | 73 +- .../server-startup-config.recovery.test.ts | 42 - src/gateway/server-startup-config.ts | 5 - src/gateway/server-ws-runtime.ts | 5 +- src/gateway/server.impl.ts | 33 +- .../server.models-voicewake-misc.test.ts | 19 - ...erver.plugin-node-capability-auth.test.ts} | 61 +- src/gateway/server.preauth-hardening.test.ts | 6 +- ...auth.ts => plugin-node-capability-auth.ts} | 56 +- src/gateway/server/plugins-http.ts | 98 + .../plugins-http/route-capability.test.ts | 20 + .../server/plugins-http/route-capability.ts | 56 + .../server/ws-connection.startup.test.ts | 1 - src/gateway/server/ws-connection.test.ts | 338 +- src/gateway/server/ws-connection.ts | 40 +- .../server/ws-connection/message-handler.ts | 68 +- src/gateway/server/ws-types.ts | 7 +- src/gateway/talk-realtime-relay.test.ts | 188 +- src/gateway/test-helpers.config-runtime.ts | 12 - src/gateway/test-helpers.runtime-state.ts | 2 - src/gateway/test-helpers.server.ts | 2 - .../heartbeat-runner.tool-response.test.ts | 262 +- src/infra/outbound/outbound-send-service.ts | 112 +- src/infra/run-node.test.ts | 8 +- src/infra/vitest-e2e-config.test.ts | 10 +- src/media/web-media.test.ts | 22 +- src/media/web-media.ts | 15 +- src/plugin-sdk/gateway-runtime.ts | 15 + src/plugin-sdk/plugin-test-api.ts | 2 + src/plugins/api-builder.ts | 12 +- src/plugins/captured-registration.ts | 5 + src/plugins/cli-registry-loader.ts | 16 +- src/plugins/cli.test.ts | 69 + .../installed-plugin-index-records.test.ts | 56 +- src/plugins/loader-channel-setup.ts | 6 - src/plugins/loader.test.ts | 152 +- src/plugins/plugin-lookup-table.test.ts | 196 +- src/plugins/plugin-registry-snapshot.test.ts | 56 +- .../register-plugin-cli-command-groups.ts | 48 +- src/plugins/registry-empty.ts | 1 + src/plugins/registry-types.ts | 17 + src/plugins/registry.ts | 61 +- src/plugins/setup-registry.canvas.test.ts | 39 + src/plugins/status.registry-snapshot.test.ts | 58 +- .../test-helpers/managed-npm-plugin.ts | 59 + src/plugins/types.ts | 74 +- src/scripts/canvas-a2ui-copy.test.ts | 2 +- src/scripts/ci-changed-scope.test.ts | 87 +- src/secrets/target-registry.docs.test.ts | 2 +- .../discord-group-codex-message-tool.md | 14 +- test/scripts/build-all.test.ts | 8 +- test/scripts/bundle-a2ui.test.ts | 39 +- test/scripts/bundled-plugin-assets.test.ts | 73 + test/scripts/changed-lanes.test.ts | 24 +- test/scripts/ci-node-test-plan.test.ts | 9 +- test/scripts/ci-runner-labels.test.ts | 42 - test/scripts/prompt-snapshots.test.ts | 30 +- .../run-additional-boundary-checks.test.ts | 13 +- test/vitest/vitest.e2e.config.ts | 23 +- test/vitest/vitest.unit-fast-paths.mjs | 4 +- ui/src/ui/app-gateway-chat-load.node.test.ts | 2 +- ui/src/ui/app-gateway.node.test.ts | 8 +- ui/src/ui/app-render.ts | 2 +- ui/src/ui/canvas-url.ts | 6 +- ui/src/ui/chat/grouped-render.test.ts | 2 +- ui/src/ui/chat/grouped-render.ts | 18 +- ui/src/ui/chat/tool-cards.ts | 16 +- ui/src/ui/controllers/dreaming.test.ts | 8 +- ui/src/ui/gateway.node.test.ts | 4 +- ui/src/ui/gateway.ts | 10 +- ui/src/ui/views/chat.test.ts | 2 +- ui/src/ui/views/chat.ts | 6 +- ui/src/ui/views/markdown-sidebar.ts | 4 +- vendor/a2ui/.gemini/GEMINI.md | 94 - vendor/a2ui/.github/workflows/docs.yml | 79 - .../a2ui/.github/workflows/editor_build.yml | 55 - .../.github/workflows/inspector_build.yml | 56 - .../.github/workflows/java_build_and_test.yml | 48 - .../.github/workflows/lit_samples_build.yml | 54 - .../.github/workflows/ng_build_and_test.yml | 72 - .../workflows/python_samples_build.yml | 62 - .../.github/workflows/web_build_and_test.yml | 50 - vendor/a2ui/.gitignore | 16 - vendor/a2ui/CONTRIBUTING.md | 49 - vendor/a2ui/LICENSE | 203 - vendor/a2ui/README.md | 162 - vendor/a2ui/mkdocs.yaml | 184 - vendor/a2ui/renderers/angular/.npmrc | 2 - vendor/a2ui/renderers/angular/README.md | 9 - vendor/a2ui/renderers/angular/angular.json | 35 - vendor/a2ui/renderers/angular/ng-package.json | 8 - .../a2ui/renderers/angular/package-lock.json | 14264 --------------- vendor/a2ui/renderers/angular/package.json | 59 - .../angular/src/lib/catalog/audio.ts | 50 - .../angular/src/lib/catalog/button.ts | 56 - .../renderers/angular/src/lib/catalog/card.ts | 57 - .../angular/src/lib/catalog/checkbox.ts | 73 - .../angular/src/lib/catalog/column.ts | 96 - .../angular/src/lib/catalog/datetime-input.ts | 127 - .../angular/src/lib/catalog/default.ts | 185 - .../angular/src/lib/catalog/divider.ts | 37 - .../renderers/angular/src/lib/catalog/icon.ts | 44 - .../angular/src/lib/catalog/image.ts | 62 - .../renderers/angular/src/lib/catalog/list.ts | 63 - .../angular/src/lib/catalog/modal.ts | 113 - .../src/lib/catalog/multiple-choice.ts | 77 - .../renderers/angular/src/lib/catalog/row.ts | 100 - .../angular/src/lib/catalog/slider.ts | 73 - .../angular/src/lib/catalog/surface.ts | 99 - .../renderers/angular/src/lib/catalog/tabs.ts | 72 - .../angular/src/lib/catalog/text-field.ts | 86 - .../renderers/angular/src/lib/catalog/text.ts | 137 - .../angular/src/lib/catalog/video.ts | 50 - .../a2ui/renderers/angular/src/lib/config.ts | 25 - .../renderers/angular/src/lib/data/index.ts | 18 - .../angular/src/lib/data/markdown.ts | 114 - .../angular/src/lib/data/processor.ts | 47 - .../renderers/angular/src/lib/data/types.ts | 29 - .../angular/src/lib/rendering/catalog.ts | 36 - .../src/lib/rendering/dynamic-component.ts | 100 - .../angular/src/lib/rendering/index.ts | 20 - .../angular/src/lib/rendering/renderer.ts | 109 - .../angular/src/lib/rendering/theming.ts | 22 - .../a2ui/renderers/angular/src/public-api.ts | 21 - vendor/a2ui/renderers/angular/tsconfig.json | 23 - .../a2ui/renderers/angular/tsconfig.lib.json | 16 - .../renderers/angular/tsconfig.lib.prod.json | 9 - .../a2ui/renderers/angular/tsconfig.spec.json | 12 - vendor/a2ui/renderers/lit/.npmrc | 2 - vendor/a2ui/renderers/lit/README | 9 - vendor/a2ui/renderers/lit/README.md | 9 - vendor/a2ui/renderers/lit/package-lock.json | 1196 -- vendor/a2ui/renderers/lit/package.json | 108 - vendor/a2ui/renderers/lit/src/0.8/core.ts | 35 - .../a2ui/renderers/lit/src/0.8/data/guards.ts | 236 - .../lit/src/0.8/data/model-processor.ts | 867 - .../src/0.8/data/signal-model-processor.ts | 31 - .../a2ui/renderers/lit/src/0.8/events/a2ui.ts | 28 - .../a2ui/renderers/lit/src/0.8/events/base.ts | 19 - .../renderers/lit/src/0.8/events/events.ts | 53 - vendor/a2ui/renderers/lit/src/0.8/index.ts | 18 - .../a2ui/renderers/lit/src/0.8/model.test.ts | 1376 -- .../renderers/lit/src/0.8/schemas/.gitignore | 4 - ...erver_to_client_with_standard_catalog.json | 827 - .../renderers/lit/src/0.8/styles/behavior.ts | 55 - .../renderers/lit/src/0.8/styles/border.ts | 42 - .../renderers/lit/src/0.8/styles/colors.ts | 100 - .../renderers/lit/src/0.8/styles/icons.ts | 60 - .../renderers/lit/src/0.8/styles/index.ts | 37 - .../renderers/lit/src/0.8/styles/layout.ts | 235 - .../renderers/lit/src/0.8/styles/opacity.ts | 24 - .../renderers/lit/src/0.8/styles/shared.ts | 17 - .../a2ui/renderers/lit/src/0.8/styles/type.ts | 156 - .../renderers/lit/src/0.8/styles/utils.ts | 104 - .../lit/src/0.8/types/client-event.ts | 80 - .../renderers/lit/src/0.8/types/colors.ts | 66 - .../renderers/lit/src/0.8/types/components.ts | 211 - .../renderers/lit/src/0.8/types/primitives.ts | 60 - .../a2ui/renderers/lit/src/0.8/types/types.ts | 474 - vendor/a2ui/renderers/lit/src/0.8/ui/audio.ts | 96 - .../a2ui/renderers/lit/src/0.8/ui/button.ts | 65 - vendor/a2ui/renderers/lit/src/0.8/ui/card.ts | 64 - .../a2ui/renderers/lit/src/0.8/ui/checkbox.ts | 139 - .../a2ui/renderers/lit/src/0.8/ui/column.ts | 104 - .../lit/src/0.8/ui/component-registry.ts | 58 - .../renderers/lit/src/0.8/ui/context/theme.ts | 20 - .../lit/src/0.8/ui/custom-components/index.ts | 22 - .../lit/src/0.8/ui/datetime-input.ts | 197 - .../lit/src/0.8/ui/directives/directives.ts | 17 - .../lit/src/0.8/ui/directives/markdown.ts | 152 - .../lit/src/0.8/ui/directives/sanitizer.ts | 40 - .../a2ui/renderers/lit/src/0.8/ui/divider.ts | 51 - vendor/a2ui/renderers/lit/src/0.8/ui/icon.ts | 98 - vendor/a2ui/renderers/lit/src/0.8/ui/image.ts | 118 - vendor/a2ui/renderers/lit/src/0.8/ui/list.ts | 72 - vendor/a2ui/renderers/lit/src/0.8/ui/modal.ts | 131 - .../lit/src/0.8/ui/multiple-choice.ts | 142 - vendor/a2ui/renderers/lit/src/0.8/ui/root.ts | 475 - vendor/a2ui/renderers/lit/src/0.8/ui/row.ts | 104 - .../a2ui/renderers/lit/src/0.8/ui/slider.ts | 159 - .../a2ui/renderers/lit/src/0.8/ui/styles.ts | 20 - .../a2ui/renderers/lit/src/0.8/ui/surface.ts | 134 - vendor/a2ui/renderers/lit/src/0.8/ui/tabs.ts | 132 - .../renderers/lit/src/0.8/ui/text-field.ts | 131 - vendor/a2ui/renderers/lit/src/0.8/ui/text.ts | 164 - vendor/a2ui/renderers/lit/src/0.8/ui/ui.ts | 119 - .../renderers/lit/src/0.8/ui/utils/utils.ts | 92 - .../renderers/lit/src/0.8/ui/utils/youtube.ts | 77 - vendor/a2ui/renderers/lit/src/0.8/ui/video.ts | 96 - vendor/a2ui/renderers/lit/src/index.ts | 17 - vendor/a2ui/renderers/lit/tsconfig.json | 36 - vendor/a2ui/requirements-docs.txt | 9 - vendor/a2ui/specification/0.8/eval/.gitignore | 26 - vendor/a2ui/specification/0.8/eval/GEMINI.md | 76 - vendor/a2ui/specification/0.8/eval/README.md | 61 - .../specification/0.8/eval/genkit.conf.js | 24 - .../a2ui/specification/0.8/eval/package.json | 36 - .../specification/0.8/eval/pnpm-lock.yaml | 4885 ----- .../0.8/eval/pnpm-workspace.yaml | 18 - .../0.8/eval/src/basic_schema_matcher.ts | 65 - vendor/a2ui/specification/0.8/eval/src/dev.ts | 17 - .../a2ui/specification/0.8/eval/src/flows.ts | 71 - .../a2ui/specification/0.8/eval/src/index.ts | 363 - .../0.8/eval/src/message_type_matcher.ts | 50 - .../a2ui/specification/0.8/eval/src/models.ts | 68 - .../specification/0.8/eval/src/prompts.ts | 493 - .../0.8/eval/src/schema_matcher.ts | 24 - .../eval/src/surface_update_schema_matcher.ts | 207 - .../specification/0.8/eval/src/validator.ts | 496 - .../a2ui/specification/0.8/eval/tsconfig.json | 12 - vendor/a2ui/specification/0.8/json/README.md | 15 - .../json/a2ui_client_capabilities_schema.json | 23 - .../0.8/json/catalog_description_schema.json | 34 - .../0.8/json/client_to_server.json | 53 - .../0.8/json/server_to_client.json | 148 - ...erver_to_client_with_standard_catalog.json | 827 - .../0.8/json/standard_catalog_definition.json | 685 - vendor/a2ui/specification/0.9/eval/.gitignore | 26 - vendor/a2ui/specification/0.9/eval/README.md | 79 - .../specification/0.9/eval/genkit.conf.js | 24 - .../a2ui/specification/0.9/eval/package.json | 47 - .../specification/0.9/eval/pnpm-lock.yaml | 4727 ----- .../0.9/eval/pnpm-workspace.yaml | 18 - vendor/a2ui/specification/0.9/eval/src/ai.ts | 46 - .../0.9/eval/src/analysis_flow.ts | 118 - vendor/a2ui/specification/0.9/eval/src/dev.ts | 18 - .../0.9/eval/src/evaluation_flow.ts | 193 - .../specification/0.9/eval/src/evaluator.ts | 205 - .../0.9/eval/src/generation_flow.ts | 148 - .../specification/0.9/eval/src/generator.ts | 211 - .../a2ui/specification/0.9/eval/src/index.ts | 493 - .../a2ui/specification/0.9/eval/src/logger.ts | 70 - .../a2ui/specification/0.9/eval/src/models.ts | 93 - .../specification/0.9/eval/src/prompts.ts | 373 - .../specification/0.9/eval/src/rateLimiter.ts | 205 - .../a2ui/specification/0.9/eval/src/types.ts | 47 - .../a2ui/specification/0.9/eval/src/utils.ts | 44 - .../specification/0.9/eval/src/validator.ts | 365 - .../a2ui/specification/0.9/eval/tsconfig.json | 12 - .../0.9/json/client_to_server.json | 97 - .../specification/0.9/json/common_types.json | 120 - .../0.9/json/contact_form_example.jsonl | 3 - .../0.9/json/server_to_client.json | 114 - .../0.9/json/standard_catalog_definition.json | 638 - .../0.9/json/standard_catalog_rules.txt | 5 - vendor/a2ui/specification/0.9/validate.sh | 38 - 1044 files changed, 11532 insertions(+), 81283 deletions(-) delete mode 100644 apps/macos/Sources/OpenClawProtocol/GatewayModels.swift create mode 100644 docs/plugins/reference/canvas.md create mode 100644 docs/refactor/canvas.md create mode 100644 extensions/canvas/cli-metadata.ts create mode 100644 extensions/canvas/index.ts create mode 100644 extensions/canvas/openclaw.plugin.json create mode 100644 extensions/canvas/package.json create mode 100644 extensions/canvas/runtime-api.ts create mode 100644 extensions/canvas/scripts/bundle-a2ui.mjs create mode 100644 extensions/canvas/scripts/copy-a2ui.d.mts rename scripts/canvas-a2ui-copy.ts => extensions/canvas/scripts/copy-a2ui.mjs (72%) create mode 100644 extensions/canvas/setup-api.ts rename {src/cli/nodes-cli => extensions/canvas/src}/a2ui-jsonl.ts (100%) create mode 100644 extensions/canvas/src/capability.ts create mode 100644 extensions/canvas/src/cli-helpers.ts create mode 100644 extensions/canvas/src/cli.test.ts create mode 100644 extensions/canvas/src/cli.ts create mode 100644 extensions/canvas/src/config-migration.test.ts create mode 100644 extensions/canvas/src/config-migration.ts create mode 100644 extensions/canvas/src/config.test.ts create mode 100644 extensions/canvas/src/config.ts rename src/gateway/canvas-documents.test.ts => extensions/canvas/src/documents.test.ts (99%) rename src/gateway/canvas-documents.ts => extensions/canvas/src/documents.ts (97%) rename src/infra/canvas-host-url.test.ts => extensions/canvas/src/host-url.test.ts (97%) create mode 100644 extensions/canvas/src/host-url.ts rename {apps/shared/OpenClawKit/Tools/CanvasA2UI => extensions/canvas/src/host/a2ui-app}/bootstrap.js (87%) rename {apps/shared/OpenClawKit/Tools/CanvasA2UI => extensions/canvas/src/host/a2ui-app}/rolldown.config.mjs (80%) rename {src/canvas-host => extensions/canvas/src/host}/a2ui-shared.ts (96%) rename {src/canvas-host => extensions/canvas/src/host}/a2ui.ts (88%) create mode 100644 extensions/canvas/src/host/a2ui/.bundle.hash rename {src/canvas-host => extensions/canvas/src/host}/a2ui/index.html (100%) rename {src/canvas-host => extensions/canvas/src/host}/file-resolver.test.ts (95%) rename {src/canvas-host => extensions/canvas/src/host}/file-resolver.ts (84%) rename {src/canvas-host => extensions/canvas/src/host}/server.state-dir.test.ts (88%) rename {src/canvas-host => extensions/canvas/src/host}/server.test.ts (98%) rename {src/canvas-host => extensions/canvas/src/host}/server.ts (95%) create mode 100644 extensions/canvas/src/http-route.ts create mode 100644 extensions/canvas/src/tool.test.ts rename src/agents/tools/canvas-tool.ts => extensions/canvas/src/tool.ts (59%) delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/AbsolutePathBuf.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/AgentPath.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/AuthMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ClientInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ClientNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/CollaborationMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ContentItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ConversationGitInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ConversationSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ExecPolicyAmendment.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FileChange.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ForcedLoginMethod.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputBody.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputContentItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchMatchType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResult.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GitSha.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ImageDetail.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InitializeCapabilities.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InitializeParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InitializeResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InputModality.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/LocalShellAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/LocalShellExecAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/LocalShellStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/MessagePhase.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ModeKind.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyAmendment.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyRuleAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ParsedCommand.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/Personality.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/PlanType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/RealtimeConversationVersion.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/RealtimeOutputModality.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoice.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoicesList.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ReasoningEffort.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemContent.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemReasoningSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ReasoningSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/RequestId.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/Resource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ResourceContent.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ResourceTemplate.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ReviewDecision.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ServerRequest.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ServiceTier.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/Settings.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/SubAgentSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ThreadId.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/ThreadMemoryMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/Tool.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/Verbosity.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/WebSearchAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/WebSearchContextSize.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/WebSearchLocation.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/WebSearchMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/WebSearchToolConfig.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/index.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/serde_json/JsonValue.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/Account.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountLoginCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountRateLimitsUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeCreditType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeEmailStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalFileSystemPermissions.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalNetworkPermissions.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AgentMessageDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AnalyticsConfig.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppBranding.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppListUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppMetadata.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppReview.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppScreenshot.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolApproval.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolsConfig.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ApprovalsReviewer.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsConfig.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsDefaultConfig.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AskForApproval.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/AutoReviewDecisionSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ByteRange.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshReason.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CodexErrorInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentState.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentTool.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentToolCallStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeMask.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputStream.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminalSize.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionApprovalDecision.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionOutputDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigBatchWriteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigEdit.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayer.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerMetadata.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirementsReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigValueWriteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWarningNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWriteResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookHandler.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookMatcherGroup.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ContextCompactedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CreditsSnapshot.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeprecationNoticeNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyAlgorithm.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionClass.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionPolicy.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignPayload.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallOutputContentItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolSpec.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ErrorNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExecPolicyAmendment.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeature.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureStage.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeApprovalDecision.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangePatchUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemAccessMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemPath.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSandboxEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FileUpdateChange.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsChangedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountRateLimitsResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GitInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GrantedPermissionProfile.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReview.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianCommandSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianRiskLevel.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianUserAuthorization.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianWarningNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookEventName.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookExecutionMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookHandlerType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntryKind.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookPromptFragment.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookScope.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/LogoutAccountResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ManagedHooksRequirements.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceInterface.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceLoadErrorInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeErrorInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpAuthStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationArrayType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationConstOption.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationLegacyTitledEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationMultiSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationObjectType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationPrimitiveSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSingleSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringFormat.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledEnumItems.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledMultiSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledSingleSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledEnumItems.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledMultiSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledSingleSelectEnumSchema.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerRefreshResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStartupState.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusDetail.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallError.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallProgressNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallResult.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitation.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitationEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MergeStrategy.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/Model.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelAvailabilityNux.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelRerouteReason.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelReroutedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelUpgradeInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerificationNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkAccess.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalContext.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalProtocol.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkDomainPermission.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyAmendment.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyRuleAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkRequirements.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkUnixSocketPermission.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/NonSteerableTurnKind.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/OverriddenMetadata.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchApplyStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchChangeKind.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionGrantScope.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PlanDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAuthPolicy.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginDetail.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallPolicy.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInterface.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginMarketplaceEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginsMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitReachedType.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitSnapshot.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitWindow.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RawResponseItemCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningEffortOption.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryPartAddedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryTextDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningTextDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientConnectionAudience.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientEnrollmentAudience.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RequestPermissionProfile.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ResidencyRequirement.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewDelivery.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewTarget.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxWorkspaceWrite.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ServerRequestResolvedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillDependencies.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillErrorInfo.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillInterface.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillMetadata.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillScope.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillSummary.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillToolDependency.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsChangedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListEntry.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListExtraRootsForCwd.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SortDirection.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TerminalInteractionNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TextElement.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TextPosition.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TextRange.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/Thread.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadActiveFlag.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchivedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadClosedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadItem.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadNameUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAudioChunk.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeClosedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeErrorNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeItemAddedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeOutputAudioDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeSdpNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartTransport.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDeltaNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDoneNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSortKey.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSourceKind.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartSource.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatusChangedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsage.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsageUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchivedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TokenUsageBreakdown.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputAnswer.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputOption.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputQuestion.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolsV2.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/Turn.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnDiffUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnEnvironmentParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnError.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStep.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStepStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanUpdatedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/UserInput.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WarningNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WebSearchAction.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupCompletedNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupMode.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartParams.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsWorldWritableWarningNotification.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/WriteStatus.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts create mode 100644 extensions/qa-lab/src/mantis/crabbox-runtime.ts create mode 100644 scripts/bundled-plugin-assets.mjs delete mode 100644 scripts/ci-runner-labels.mjs delete mode 100644 src/agents/compaction.reserve-tokens-clamping.test.ts delete mode 100644 src/agents/test-helpers/fast-core-tools.ts delete mode 100644 src/canvas-host/a2ui/.bundle.hash delete mode 100644 src/canvas-host/a2ui/a2ui.bundle.js delete mode 100644 src/cli/nodes-canvas.ts delete mode 100644 src/cli/nodes-cli/register.canvas.ts delete mode 100644 src/gateway/canvas-capability.ts create mode 100644 src/gateway/hosted-plugin-surface-url.test.ts rename src/{infra/canvas-host-url.ts => gateway/hosted-plugin-surface-url.ts} (57%) create mode 100644 src/gateway/plugin-node-capability.test.ts create mode 100644 src/gateway/plugin-node-capability.ts delete mode 100644 src/gateway/server-methods/nodes.canvas-capability-refresh.test.ts rename src/gateway/{server.canvas-auth.test.ts => server.plugin-node-capability-auth.test.ts} (90%) rename src/gateway/server/{http-auth.ts => plugin-node-capability-auth.ts} (53%) create mode 100644 src/gateway/server/plugins-http/route-capability.test.ts create mode 100644 src/gateway/server/plugins-http/route-capability.ts create mode 100644 src/plugins/setup-registry.canvas.test.ts create mode 100644 src/plugins/test-helpers/managed-npm-plugin.ts create mode 100644 test/scripts/bundled-plugin-assets.test.ts delete mode 100644 test/scripts/ci-runner-labels.test.ts delete mode 100644 vendor/a2ui/.gemini/GEMINI.md delete mode 100644 vendor/a2ui/.github/workflows/docs.yml delete mode 100644 vendor/a2ui/.github/workflows/editor_build.yml delete mode 100644 vendor/a2ui/.github/workflows/inspector_build.yml delete mode 100644 vendor/a2ui/.github/workflows/java_build_and_test.yml delete mode 100644 vendor/a2ui/.github/workflows/lit_samples_build.yml delete mode 100644 vendor/a2ui/.github/workflows/ng_build_and_test.yml delete mode 100644 vendor/a2ui/.github/workflows/python_samples_build.yml delete mode 100644 vendor/a2ui/.github/workflows/web_build_and_test.yml delete mode 100644 vendor/a2ui/.gitignore delete mode 100644 vendor/a2ui/CONTRIBUTING.md delete mode 100644 vendor/a2ui/LICENSE delete mode 100644 vendor/a2ui/README.md delete mode 100644 vendor/a2ui/mkdocs.yaml delete mode 100644 vendor/a2ui/renderers/angular/.npmrc delete mode 100644 vendor/a2ui/renderers/angular/README.md delete mode 100644 vendor/a2ui/renderers/angular/angular.json delete mode 100644 vendor/a2ui/renderers/angular/ng-package.json delete mode 100644 vendor/a2ui/renderers/angular/package-lock.json delete mode 100644 vendor/a2ui/renderers/angular/package.json delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/audio.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/button.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/card.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/checkbox.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/column.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/datetime-input.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/default.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/divider.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/icon.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/image.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/list.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/modal.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/multiple-choice.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/row.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/slider.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/surface.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/tabs.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/text-field.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/text.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/catalog/video.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/config.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/data/index.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/data/markdown.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/data/processor.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/data/types.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/rendering/catalog.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/rendering/dynamic-component.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/rendering/index.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/rendering/renderer.ts delete mode 100644 vendor/a2ui/renderers/angular/src/lib/rendering/theming.ts delete mode 100644 vendor/a2ui/renderers/angular/src/public-api.ts delete mode 100644 vendor/a2ui/renderers/angular/tsconfig.json delete mode 100644 vendor/a2ui/renderers/angular/tsconfig.lib.json delete mode 100644 vendor/a2ui/renderers/angular/tsconfig.lib.prod.json delete mode 100644 vendor/a2ui/renderers/angular/tsconfig.spec.json delete mode 100644 vendor/a2ui/renderers/lit/.npmrc delete mode 100644 vendor/a2ui/renderers/lit/README delete mode 100644 vendor/a2ui/renderers/lit/README.md delete mode 100644 vendor/a2ui/renderers/lit/package-lock.json delete mode 100644 vendor/a2ui/renderers/lit/package.json delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/core.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/data/guards.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/data/model-processor.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/data/signal-model-processor.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/events/a2ui.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/events/base.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/events/events.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/index.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/model.test.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/schemas/.gitignore delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/schemas/server_to_client_with_standard_catalog.json delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/behavior.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/border.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/colors.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/icons.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/index.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/layout.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/opacity.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/shared.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/type.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/styles/utils.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/types/client-event.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/types/colors.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/types/components.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/types/primitives.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/types/types.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/audio.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/button.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/card.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/checkbox.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/column.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/component-registry.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/context/theme.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/custom-components/index.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/datetime-input.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/directives/directives.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/directives/markdown.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/directives/sanitizer.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/divider.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/icon.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/image.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/list.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/modal.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/multiple-choice.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/root.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/row.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/slider.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/styles.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/surface.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/tabs.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/text-field.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/text.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/ui.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/utils/utils.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/utils/youtube.ts delete mode 100644 vendor/a2ui/renderers/lit/src/0.8/ui/video.ts delete mode 100644 vendor/a2ui/renderers/lit/src/index.ts delete mode 100644 vendor/a2ui/renderers/lit/tsconfig.json delete mode 100644 vendor/a2ui/requirements-docs.txt delete mode 100644 vendor/a2ui/specification/0.8/eval/.gitignore delete mode 100644 vendor/a2ui/specification/0.8/eval/GEMINI.md delete mode 100644 vendor/a2ui/specification/0.8/eval/README.md delete mode 100644 vendor/a2ui/specification/0.8/eval/genkit.conf.js delete mode 100644 vendor/a2ui/specification/0.8/eval/package.json delete mode 100644 vendor/a2ui/specification/0.8/eval/pnpm-lock.yaml delete mode 100644 vendor/a2ui/specification/0.8/eval/pnpm-workspace.yaml delete mode 100644 vendor/a2ui/specification/0.8/eval/src/basic_schema_matcher.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/dev.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/flows.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/index.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/message_type_matcher.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/models.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/prompts.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/schema_matcher.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/surface_update_schema_matcher.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/src/validator.ts delete mode 100644 vendor/a2ui/specification/0.8/eval/tsconfig.json delete mode 100644 vendor/a2ui/specification/0.8/json/README.md delete mode 100644 vendor/a2ui/specification/0.8/json/a2ui_client_capabilities_schema.json delete mode 100644 vendor/a2ui/specification/0.8/json/catalog_description_schema.json delete mode 100644 vendor/a2ui/specification/0.8/json/client_to_server.json delete mode 100644 vendor/a2ui/specification/0.8/json/server_to_client.json delete mode 100644 vendor/a2ui/specification/0.8/json/server_to_client_with_standard_catalog.json delete mode 100644 vendor/a2ui/specification/0.8/json/standard_catalog_definition.json delete mode 100644 vendor/a2ui/specification/0.9/eval/.gitignore delete mode 100644 vendor/a2ui/specification/0.9/eval/README.md delete mode 100644 vendor/a2ui/specification/0.9/eval/genkit.conf.js delete mode 100644 vendor/a2ui/specification/0.9/eval/package.json delete mode 100644 vendor/a2ui/specification/0.9/eval/pnpm-lock.yaml delete mode 100644 vendor/a2ui/specification/0.9/eval/pnpm-workspace.yaml delete mode 100644 vendor/a2ui/specification/0.9/eval/src/ai.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/analysis_flow.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/dev.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/evaluation_flow.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/evaluator.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/generation_flow.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/generator.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/index.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/logger.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/models.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/prompts.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/rateLimiter.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/types.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/utils.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/src/validator.ts delete mode 100644 vendor/a2ui/specification/0.9/eval/tsconfig.json delete mode 100644 vendor/a2ui/specification/0.9/json/client_to_server.json delete mode 100644 vendor/a2ui/specification/0.9/json/common_types.json delete mode 100644 vendor/a2ui/specification/0.9/json/contact_form_example.jsonl delete mode 100644 vendor/a2ui/specification/0.9/json/server_to_client.json delete mode 100644 vendor/a2ui/specification/0.9/json/standard_catalog_definition.json delete mode 100644 vendor/a2ui/specification/0.9/json/standard_catalog_rules.txt delete mode 100755 vendor/a2ui/specification/0.9/validate.sh diff --git a/.agents/skills/crabbox/SKILL.md b/.agents/skills/crabbox/SKILL.md index 95eda7ae25d..1e52d71a87c 100644 --- a/.agents/skills/crabbox/SKILL.md +++ b/.agents/skills/crabbox/SKILL.md @@ -229,21 +229,6 @@ Raw Blacksmith footguns: - Treat `blacksmith testbox list` as cleanup diagnostics, not a shared reusable queue. -Blacksmith queue/outage mode: - -```sh -blacksmith --version -blacksmith testbox list --all -blacksmith testbox status --id -``` - -If the CLI can list/status boxes but new warmups stay `queued` with no IP or -Actions run URL after a couple of minutes, treat it as Blacksmith provider, -org-limit, billing, or queue pressure. Stop the queued ids you created and do -not warm more boxes into the same stalled queue. Check the Blacksmith dashboard, -billing, and org limits out-of-band, then use Owned Cloud Fallback below for -maintainer proof. - Escalate to owned AWS/Hetzner only when Blacksmith is down, quota-limited, missing the needed environment, or owned capacity is the explicit goal. Use the Owned Cloud Fallback section below. @@ -277,9 +262,6 @@ Important Blacksmith footguns: - Always run from repo root. The CLI syncs the current directory. - Raw commit SHAs are not reliable `warmup --ref` refs; use a branch or tag. -- If `blacksmith testbox list --all` works but warmups stay `queued`, this is - not a Crabbox bug. Stop the queued ids and switch to owned AWS/Hetzner instead - of retrying. - If auth is missing and browser auth is acceptable: ```sh @@ -291,45 +273,8 @@ blacksmith auth login --non-interactive --organization openclaw Use AWS/Hetzner only when Blacksmith is down, quota-limited, missing the needed environment, or owned capacity is explicitly the goal. -When AWS capacity is under pressure, do not start with `class=beast`. -`beast` begins at 48xlarge instances and can burn 192 vCPU quota per request. -OpenClaw's owned-cloud default is `standard`; escalate to `fast`, then `large`, -and only use `beast` when the work is explicitly CPU-bound and the smaller class -already failed the goal. -Keep capacity hints enabled so brokered AWS leases print selected region/market, -quota pressure, Spot fallback, and high-pressure class warnings. The OpenClaw -repo config sets `capacity.hints: true`; use `CRABBOX_CAPACITY_HINTS=0` only -when debugging hint rendering itself. - -Use `beast` only for exceptional lanes: - -- full-suite or all-plugin Docker matrices where wall time is dominated by CPU, - not dependency install or network; -- release/blocker validation where a maintainer explicitly asks for the largest - owned AWS class; -- performance profiling where the point is to compare high-core behavior. - -Do not use `beast` for `pnpm check:changed`, focused tests, docs-only work, -ordinary lint/typecheck, small E2E repros, or Blacksmith outage triage. Those -should use `standard` first and `fast` only when the extra cores materially help. - -Preferred AWS pressure-relief flow: - ```sh -CRABBOX_CAPACITY_REGIONS=eu-west-1,eu-west-2,eu-central-1,us-east-1,us-west-2 \ - pnpm crabbox:warmup -- --provider aws --class standard --market on-demand --idle-timeout 90m -pnpm crabbox:hydrate -- --id -pnpm crabbox:run -- --id --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm check:changed" -pnpm crabbox:stop -- -``` - -Use `--market spot` only when testing Spot behavior or saving cost matters more -than launch reliability. Use `--market on-demand` when diagnosing quota/capacity -because it removes Spot market churn from the failure. - -```sh -CRABBOX_CAPACITY_REGIONS=eu-west-1,eu-west-2,eu-central-1,us-east-1,us-west-2 \ - pnpm crabbox:warmup -- --provider aws --class fast --market on-demand --idle-timeout 90m +pnpm crabbox:warmup -- --provider aws --class beast --market on-demand --idle-timeout 90m pnpm crabbox:hydrate -- --id pnpm crabbox:run -- --id --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed" pnpm crabbox:stop -- diff --git a/.crabbox.yaml b/.crabbox.yaml index d745f9d837a..ab0046d8ce9 100644 --- a/.crabbox.yaml +++ b/.crabbox.yaml @@ -1,17 +1,12 @@ profile: openclaw-check provider: aws -class: standard +class: beast capacity: market: spot strategy: most-available fallback: on-demand-after-120s - hints: true regions: - eu-west-1 - - eu-west-2 - - eu-central-1 - - us-east-1 - - us-west-2 actions: workflow: .github/workflows/crabbox-hydrate.yml job: hydrate diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e5f0a311bf4..d659077dc34 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -37,7 +37,7 @@ If this PR fixes a plugin beta-release blocker, title it `fix(): beta ## Real behavior proof (required for external PRs) -External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only. Screenshots are encouraged even for CLI, console, text, or log changes; terminal screenshots and copied live output count. Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence. +External contributors must show after-fix evidence from a real OpenClaw setup. Unit tests, mocks, lint, typechecks, snapshots, and CI are supplemental only. Screenshots are encouraged even for CLI, console, text, or log changes; terminal screenshots and copied live output count. - Behavior or issue addressed: - Real environment tested: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39c8756ea12..b5e84058296 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,6 @@ jobs: # work fan out from a single source of truth. preflight: permissions: - actions: read contents: read if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-24.04 @@ -66,11 +65,9 @@ jobs: checks_node_core_dist_matrix: ${{ steps.manifest.outputs.checks_node_core_dist_matrix }} run_check: ${{ steps.manifest.outputs.run_check }} run_check_additional: ${{ steps.manifest.outputs.run_check_additional }} - additional_matrix: ${{ steps.manifest.outputs.additional_matrix }} run_build_smoke: ${{ steps.manifest.outputs.run_build_smoke }} run_check_docs: ${{ steps.manifest.outputs.run_check_docs }} run_control_ui_i18n: ${{ steps.manifest.outputs.run_control_ui_i18n }} - run_prompt_snapshots: ${{ steps.manifest.outputs.run_prompt_snapshots }} run_checks_windows: ${{ steps.manifest.outputs.run_checks_windows }} checks_windows_matrix: ${{ steps.manifest.outputs.checks_windows_matrix }} run_macos_node: ${{ steps.manifest.outputs.run_macos_node }} @@ -78,12 +75,6 @@ jobs: run_macos_swift: ${{ steps.manifest.outputs.run_macos_swift }} run_android_job: ${{ steps.manifest.outputs.run_android_job }} android_matrix: ${{ steps.manifest.outputs.android_matrix }} - runner_4vcpu_ubuntu: ${{ steps.runner_labels.outputs.runner_4vcpu_ubuntu }} - runner_8vcpu_ubuntu: ${{ steps.runner_labels.outputs.runner_8vcpu_ubuntu }} - runner_16vcpu_ubuntu: ${{ steps.runner_labels.outputs.runner_16vcpu_ubuntu }} - runner_16vcpu_windows: ${{ steps.runner_labels.outputs.runner_16vcpu_windows }} - runner_6vcpu_macos: ${{ steps.runner_labels.outputs.runner_6vcpu_macos }} - runner_12vcpu_macos: ${{ steps.runner_labels.outputs.runner_12vcpu_macos }} steps: - name: Checkout uses: actions/checkout@v6 @@ -139,7 +130,6 @@ jobs: OPENCLAW_CI_RUN_NODE_FAST_CI_ROUTING: ${{ github.event_name == 'workflow_dispatch' && 'false' || steps.changed_scope.outputs.run_node_fast_ci_routing || 'false' }} OPENCLAW_CI_RUN_SKILLS_PYTHON: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.changed_scope.outputs.run_skills_python || 'false' }} OPENCLAW_CI_RUN_CONTROL_UI_I18N: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.changed_scope.outputs.run_control_ui_i18n || 'false' }} - OPENCLAW_CI_RUN_PROMPT_SNAPSHOTS: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.changed_scope.outputs.run_prompt_snapshots || 'false' }} OPENCLAW_CI_CHECKOUT_REVISION: ${{ steps.checkout_ref.outputs.sha }} OPENCLAW_CI_REPOSITORY: ${{ github.repository }} run: | @@ -204,46 +194,6 @@ jobs: const runSkillsPython = parseBoolean(process.env.OPENCLAW_CI_RUN_SKILLS_PYTHON) && !docsOnly; const runControlUiI18n = parseBoolean(process.env.OPENCLAW_CI_RUN_CONTROL_UI_I18N) && !docsOnly; - const runPromptSnapshots = - parseBoolean(process.env.OPENCLAW_CI_RUN_PROMPT_SNAPSHOTS) && !docsOnly; - const additionalCheckTasks = [ - { - check_name: "check-additional-boundaries-a", - group: "boundaries", - boundary_shard: "1/4", - }, - { - check_name: "check-additional-boundaries-b", - group: "boundaries", - boundary_shard: "2/4", - }, - { - check_name: "check-additional-boundaries-c", - group: "boundaries", - boundary_shard: "3/4", - }, - { - check_name: "check-additional-boundaries-d", - group: "boundaries", - boundary_shard: "4/4", - }, - { check_name: "check-additional-extension-channels", group: "extension-channels" }, - { check_name: "check-additional-extension-bundled", group: "extension-bundled" }, - { - check_name: "check-additional-extension-package-boundary", - group: "extension-package-boundary", - }, - { - check_name: "check-additional-runtime-topology-architecture", - group: "runtime-topology-architecture", - }, - ]; - if (runPromptSnapshots) { - additionalCheckTasks.push({ - check_name: "check-additional-prompt-snapshots", - group: "prompt-snapshots", - }); - } const checksFastCoreTasks = []; if (runNodeFull) { checksFastCoreTasks.push( @@ -309,11 +259,9 @@ jobs: checks_node_core_dist_matrix: createMatrix(nodeTestDistShards), run_check: runNodeFull, run_check_additional: runNodeFull, - additional_matrix: createMatrix(runNodeFull ? additionalCheckTasks : []), run_build_smoke: runNodeFull, run_check_docs: docsChanged, run_control_ui_i18n: runControlUiI18n, - run_prompt_snapshots: runPromptSnapshots, run_skills_python_job: runSkillsPython, run_checks_windows: runWindows, checks_windows_matrix: createMatrix( @@ -347,13 +295,6 @@ jobs: } EOF - - name: Select runner labels - id: runner_labels - env: - GITHUB_TOKEN: ${{ github.token }} - OPENCLAW_CI_BLACKSMITH_FALLBACK: "true" - run: node scripts/ci-runner-labels.mjs - # Run the fast security/SCM checks in parallel with scope detection so the # main Node jobs do not have to wait for Python/pre-commit setup. security-scm-fast: @@ -511,7 +452,7 @@ jobs: contents: read needs: [preflight] if: needs.preflight.outputs.run_build_artifacts == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_8vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 20 outputs: channels-result: ${{ steps.built_artifact_checks.outputs['channels-result'] }} @@ -606,11 +547,13 @@ jobs: path: dist-runtime-build.tar.zst retention-days: 1 - - name: Upload A2UI bundle artifact + - name: Upload bundled plugin asset artifacts uses: actions/upload-artifact@v7 with: - name: canvas-a2ui-bundle - path: src/canvas-host/a2ui/ + name: bundled-plugin-assets + path: | + extensions/*/src/host/**/.bundle.hash + extensions/*/src/host/**/*.bundle.js include-hidden-files: true retention-days: 1 @@ -633,7 +576,6 @@ jobs: RUN_CHANNELS: ${{ needs.preflight.outputs.run_checks }} RUN_CORE_SUPPORT_BOUNDARY: ${{ needs.preflight.outputs.run_checks_node_core_dist }} RUN_GATEWAY_WATCH: ${{ needs.preflight.outputs.run_check_additional }} - OPENCLAW_RUN_PROMPT_SNAPSHOTS: ${{ needs.preflight.outputs.run_prompt_snapshots }} shell: bash run: | set -uo pipefail @@ -711,7 +653,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: needs.preflight.outputs.run_checks_fast_core == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_4vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 60 strategy: fail-fast: false @@ -800,67 +742,13 @@ jobs: ;; esac - ci-timings-summary: - permissions: - actions: read - contents: read - name: ci-timings-summary - needs: - - preflight - - security-fast - - build-artifacts - - checks-fast-core - - checks-fast-plugin-contracts - - checks-fast-channel-contracts - - checks-fast-protocol - - checks - - checks-node-compat - - checks-node-core-test - - check - - check-additional - - build-smoke - - check-docs - - skills-python - - checks-windows - - macos-node - - macos-swift - - android - if: ${{ !cancelled() && always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }} - runs-on: ubuntu-24.04 - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - ref: ${{ needs.preflight.outputs.checkout_revision || github.sha }} - fetch-depth: 1 - fetch-tags: false - persist-credentials: false - submodules: false - - - name: Write CI timing summary - env: - GITHUB_REPOSITORY: ${{ github.repository }} - GH_TOKEN: ${{ github.token }} - RUN_ID: ${{ github.run_id }} - run: | - node scripts/ci-run-timings.mjs "$RUN_ID" --limit 25 > ci-timings-summary.txt - cat ci-timings-summary.txt >> "$GITHUB_STEP_SUMMARY" - - - name: Upload CI timing summary - uses: actions/upload-artifact@v7 - with: - name: ci-timings-summary - path: ci-timings-summary.txt - retention-days: 14 - checks-fast-plugin-contracts-shard: permissions: contents: read name: ${{ matrix.checkName }} needs: [preflight] if: needs.preflight.outputs.run_plugin_contracts_shards == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_4vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 60 strategy: fail-fast: false @@ -1169,7 +1057,7 @@ jobs: name: checks-node-compat-node22 needs: [preflight] if: needs.preflight.outputs.run_build_artifacts == 'true' && github.event_name == 'workflow_dispatch' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_4vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 60 steps: - name: Checkout @@ -1246,7 +1134,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: needs.preflight.outputs.run_checks_node_core_nondist == 'true' - runs-on: ${{ github.repository != 'openclaw/openclaw' && 'ubuntu-24.04' || matrix.runner == 'blacksmith-4vcpu-ubuntu-2404' && needs.preflight.outputs.runner_4vcpu_ubuntu || matrix.runner == 'blacksmith-8vcpu-ubuntu-2404' && needs.preflight.outputs.runner_8vcpu_ubuntu || matrix.runner == 'blacksmith-16vcpu-ubuntu-2404' && needs.preflight.outputs.runner_16vcpu_ubuntu || matrix.runner || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && (matrix.runner || 'ubuntu-24.04') || 'ubuntu-24.04' }} timeout-minutes: 60 strategy: fail-fast: false @@ -1414,7 +1302,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check == 'true' }} - runs-on: ${{ github.repository != 'openclaw/openclaw' && 'ubuntu-24.04' || matrix.runner == 'blacksmith-4vcpu-ubuntu-2404' && needs.preflight.outputs.runner_4vcpu_ubuntu || matrix.runner == 'blacksmith-8vcpu-ubuntu-2404' && needs.preflight.outputs.runner_8vcpu_ubuntu || matrix.runner == 'blacksmith-16vcpu-ubuntu-2404' && needs.preflight.outputs.runner_16vcpu_ubuntu || matrix.runner || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && matrix.runner || 'ubuntu-24.04' }} timeout-minutes: 20 strategy: fail-fast: false @@ -1575,11 +1463,32 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check_additional == 'true' }} - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_8vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 20 strategy: fail-fast: false - matrix: ${{ fromJson(needs.preflight.outputs.additional_matrix) }} + matrix: + include: + - check_name: check-additional-boundaries-a + group: boundaries + boundary_shard: 1/4 + - check_name: check-additional-boundaries-b + group: boundaries + boundary_shard: 2/4 + - check_name: check-additional-boundaries-c + group: boundaries + boundary_shard: 3/4 + - check_name: check-additional-boundaries-d + group: boundaries + boundary_shard: 4/4 + - check_name: check-additional-extension-channels + group: extension-channels + - check_name: check-additional-extension-bundled + group: extension-bundled + - check_name: check-additional-extension-package-boundary + group: extension-package-boundary + - check_name: check-additional-runtime-topology-architecture + group: runtime-topology-architecture steps: - name: Checkout shell: bash @@ -1677,7 +1586,6 @@ jobs: env: ADDITIONAL_CHECK_GROUP: ${{ matrix.group }} OPENCLAW_ADDITIONAL_BOUNDARY_SHARD: ${{ matrix.boundary_shard || '' }} - OPENCLAW_RUN_PROMPT_SNAPSHOTS: ${{ needs.preflight.outputs.run_prompt_snapshots }} RUN_CONTROL_UI_I18N: ${{ needs.preflight.outputs.run_control_ui_i18n }} OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY: 4 OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY: 6 @@ -1705,9 +1613,6 @@ jobs: boundaries) node scripts/run-additional-boundary-checks.mjs ;; - prompt-snapshots) - run_check "prompt:snapshots:check" pnpm prompt:snapshots:check - ;; extension-channels) run_check "lint:extensions:channels" pnpm run lint:extensions:channels ;; @@ -1877,7 +1782,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: needs.preflight.outputs.run_checks_windows == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_16vcpu_windows || 'windows-2025' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-16vcpu-windows-2025' || 'windows-2025' }} timeout-minutes: 60 env: NODE_OPTIONS: --max-old-space-size=6144 @@ -1990,7 +1895,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: ${{ !cancelled() && always() && needs.preflight.outputs.run_macos_node == 'true' }} - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_6vcpu_macos || 'macos-latest' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-6vcpu-macos-latest' || 'macos-latest' }} timeout-minutes: 20 strategy: fail-fast: false @@ -2034,7 +1939,7 @@ jobs: name: "macos-swift" needs: [preflight] if: needs.preflight.outputs.run_macos_swift == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_12vcpu_macos || 'macos-latest' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-12vcpu-macos-latest' || 'macos-latest' }} timeout-minutes: 20 steps: - name: Checkout @@ -2131,7 +2036,7 @@ jobs: name: ${{ matrix.check_name }} needs: [preflight] if: needs.preflight.outputs.run_android_job == 'true' - runs-on: ${{ github.repository == 'openclaw/openclaw' && needs.preflight.outputs.runner_8vcpu_ubuntu || 'ubuntu-24.04' }} + runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 20 strategy: fail-fast: false diff --git a/.gitignore b/.gitignore index efb6b5e820f..7d420cdcc0e 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,8 @@ apps/ios/*.xcfilelist vendor/a2ui/renderers/lit/dist/ src/canvas-host/a2ui/*.bundle.js src/canvas-host/a2ui/*.map +extensions/canvas/src/host/a2ui/*.bundle.js +extensions/canvas/src/host/a2ui/*.map .bundle.hash # fastlane (iOS) diff --git a/.oxfmtrc.jsonc b/.oxfmtrc.jsonc index 2def267522f..221e1cd7172 100644 --- a/.oxfmtrc.jsonc +++ b/.oxfmtrc.jsonc @@ -14,6 +14,7 @@ "docker-compose.yml", "dist/", "docs/_layouts/", + "**/*.json", "node_modules/", "patches/", "pnpm-lock.yaml/", diff --git a/AGENTS.md b/AGENTS.md index 71fac20f004..f41103d56b2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -190,7 +190,7 @@ Telegraph style. Root rules only. Read scoped `AGENTS.md` before subtree work. - Mac gateway: dev watch = `pnpm gateway:watch` (tmux `openclaw-gateway-watch-main`, auto-attach). Noninteractive: `OPENCLAW_GATEWAY_WATCH_ATTACH=0 pnpm gateway:watch`; attach/stop: `tmux attach -t openclaw-gateway-watch-main` / `tmux kill-session -t openclaw-gateway-watch-main`. Managed installs: `openclaw gateway restart/status --deep`. No launchd/ad-hoc tmux. Logs: `./scripts/clawlog.sh`. - Version bump touches: `package.json`, `apps/android/app/build.gradle.kts`, `apps/ios/version.json` + `pnpm ios:version:sync`, macOS `Info.plist`, `docs/install/updating.md`. Appcast only for Sparkle release. - Mobile LAN pairing: plaintext `ws://` loopback-only. Private-network `ws://` needs `OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1`; Tailscale/public use `wss://` or tunnel. -- A2UI hash `src/canvas-host/a2ui/.bundle.hash`: generated; ignore unless running `pnpm canvas:a2ui:bundle`; commit separately. +- A2UI hash `extensions/canvas/src/host/a2ui/.bundle.hash`: generated; ignore unless running `pnpm canvas:a2ui:bundle`; commit separately. ## Ops / Footguns diff --git a/CHANGELOG.md b/CHANGELOG.md index 6291f78cb1e..7260d01dcfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,6 +141,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Canvas plugin: keep legacy root `canvasHost` configs valid until `openclaw doctor --fix` migrates them into `plugins.entries.canvas.config.host`, move Canvas/A2UI clients to gateway protocol v4 plugin surfaces, and refresh the generated A2UI bundle hash so normal builds stay clean. - feishu: honor config write policy for dynamic agents [AI]. (#78520) Thanks @pgondhi987. - fix(skill-workshop): honor pending approval for tool suggestions [AI]. (#78516) Thanks @pgondhi987. - Native chat: decode gateway-provided thinking metadata for the iOS/macOS picker so provider-specific levels such as `adaptive`, `xhigh`, and `max` appear without leaking unsupported default-model options. Thanks @BunsDev. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a2908bec36..c5b441bac09 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,7 +103,7 @@ For coordinated change sets that genuinely need more than 20 PRs, join the **#cl ## Before You PR - Test locally with your OpenClaw instance -- External PRs must include a filled **Real behavior proof** section in the PR body. Show the real setup you tested, the exact command or steps you ran after the patch, after-fix evidence, the observed result, and anything you did not test. Screenshots, recordings, terminal screenshots, console output, copied live output, linked artifacts, and redacted runtime logs all count. Be mindful of private information like IP addresses, API keys, phone numbers, non-public endpoints, or other private details when providing evidence. Unit tests, mocks, snapshots, lint, typechecks, and CI are useful but do not satisfy this requirement by themselves. Maintainers may apply `proof: override` only when the proof gate should not apply. +- External PRs must include a filled **Real behavior proof** section in the PR body. Show the real setup you tested, the exact command or steps you ran after the patch, after-fix evidence, the observed result, and anything you did not test. Screenshots, recordings, terminal screenshots, console output, copied live output, linked artifacts, and redacted runtime logs all count. Unit tests, mocks, snapshots, lint, typechecks, and CI are useful but do not satisfy this requirement by themselves. Maintainers may apply `proof: override` only when the proof gate should not apply. - Run tests: `pnpm build && pnpm check && pnpm test` - For iterative local commits, `scripts/committer --fast "message" ` passes `FAST_COMMIT=1` through to the pre-commit hook so it skips the repo-wide `pnpm check`. Only use it when you've already run equivalent targeted validation for the touched surface. - For extension/plugin changes, run the fast local lane first: @@ -164,7 +164,7 @@ Built with Codex, Claude, or other AI tools? **Awesome - just mark it!** Please include in your PR: - [ ] Mark as AI-assisted in the PR title or description -- [ ] Include human-run real behavior proof from your own setup. Redact private information like IP addresses, API keys, phone numbers, or non-public endpoints before posting evidence. AI-generated tests, mocks, lint, typechecks, and CI output are supplemental only; they do not prove the fix works for users. +- [ ] Include human-run real behavior proof from your own setup. AI-generated tests, mocks, lint, typechecks, and CI output are supplemental only; they do not prove the fix works for users. - [ ] Include prompts or session logs if possible (super helpful!) - [ ] Confirm you understand what the code does - [ ] If you have access to Codex, run `codex review --base origin/main` locally and address the findings before asking for review diff --git a/Dockerfile b/Dockerfile index 081e0cfbb1b..3e9213bb882 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,9 +97,9 @@ RUN for dir in /app/${OPENCLAW_BUNDLED_PLUGIN_DIR} /app/.agent /app/.agents; do # Stub it so local cross-arch builds still succeed. RUN pnpm canvas:a2ui:bundle || \ (echo "A2UI bundle: creating stub (non-fatal)" && \ - mkdir -p src/canvas-host/a2ui && \ - echo "/* A2UI bundle unavailable in this build */" > src/canvas-host/a2ui/a2ui.bundle.js && \ - echo "stub" > src/canvas-host/a2ui/.bundle.hash && \ + mkdir -p extensions/canvas/src/host/a2ui && \ + echo "/* A2UI bundle unavailable in this build */" > extensions/canvas/src/host/a2ui/a2ui.bundle.js && \ + echo "stub" > extensions/canvas/src/host/a2ui/.bundle.hash && \ rm -rf vendor/a2ui apps/shared/OpenClawKit/Tools/CanvasA2UI) RUN pnpm build:docker # Force pnpm for UI build (Bun may fail on ARM/Synology architectures) diff --git a/README.md b/README.md index 1ae806d9ea8..3bee5fbba4d 100644 --- a/README.md +++ b/README.md @@ -246,18 +246,13 @@ Note: `pnpm openclaw ...` runs TypeScript directly (via `tsx`). `pnpm build` pro ## Development channels -- **stable**: tagged releases (`vYYYY.M.D` today), npm dist-tag `latest`. +- **stable**: tagged releases (`vYYYY.M.D` or `vYYYY.M.D-`), npm dist-tag `latest`. - **beta**: prerelease tags (`vYYYY.M.D-beta.N`), npm dist-tag `beta` (macOS app may be missing). - **dev**: moving head of `main`, npm dist-tag `dev` (when published). Switch channels (git + npm): `openclaw update --channel stable|beta|dev`. Details: [Development channels](https://docs.openclaw.ai/install/development-channels). -We are planning SemVer-compatible monthly support lines using `YYYY.M.PATCH` -versions, but they are not available yet. Legacy `vYYYY.M.D-` correction -tags may still be recognized for older releases; new release work should not use -that format as the long-term support model. - ## Agent workspace + skills - Workspace root: `~/.openclaw/workspace` (configurable via `agents.defaults.workspace`). diff --git a/apps/android/README.md b/apps/android/README.md index d9e622ea6a6..3eb5d9eb763 100644 --- a/apps/android/README.md +++ b/apps/android/README.md @@ -285,7 +285,7 @@ Common failure quick-fixes: - `pairing required` before tests start: - approve pending device pairing (`openclaw devices approve --latest`) and rerun. - `A2UI host not reachable` / `A2UI_HOST_NOT_CONFIGURED`: - - ensure gateway canvas host is running and reachable, keep the app on the **Screen** tab. The app will auto-refresh canvas capability once; if it still fails, reconnect app and rerun. + - ensure the Canvas plugin host is running and reachable, keep the app on the **Screen** tab. The app refreshes the Canvas plugin surface URL once before failing; if it still fails, reconnect app and rerun. - `NODE_BACKGROUND_UNAVAILABLE: canvas unavailable`: - app is not effectively ready for canvas commands; keep app foregrounded and **Screen** tab active. diff --git a/apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt b/apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt index 379bb0f5908..42e7ab614d9 100644 --- a/apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt +++ b/apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt @@ -233,13 +233,13 @@ class NodeRuntime( smsTelephonyAvailable = { sms.hasTelephonyFeature() }, callLogAvailable = { SensitiveFeatureConfig.callLogEnabled }, debugBuild = { BuildConfig.DEBUG }, - refreshNodeCanvasCapability = { nodeSession.refreshNodeCanvasCapability() }, onCanvasA2uiPush = { _canvasA2uiHydrated.value = true _canvasRehydratePending.value = false _canvasRehydrateErrorText.value = null }, onCanvasA2uiReset = { _canvasA2uiHydrated.value = false }, + refreshCanvasHostUrl = { nodeSession.refreshCanvasHostUrl() }, motionActivityAvailable = { motionHandler.isActivityAvailable() }, motionPedometerAvailable = { motionHandler.isPedometerAvailable() }, ) diff --git a/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt b/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt index 27b4566ac93..ddf33c60702 100644 --- a/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt +++ b/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt @@ -1,3 +1,3 @@ package ai.openclaw.app.gateway -const val GATEWAY_PROTOCOL_VERSION = 3 +const val GATEWAY_PROTOCOL_VERSION = 4 diff --git a/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt b/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt index 73c9b1e1cdb..1cf13a43c3e 100644 --- a/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt +++ b/apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt @@ -135,7 +135,7 @@ class GatewaySession( private val writeLock = Mutex() private val pending = ConcurrentHashMap>() - @Volatile private var canvasHostUrl: String? = null + @Volatile private var pluginSurfaceUrls: Map = emptyMap() @Volatile private var mainSessionKey: String? = null @@ -185,7 +185,7 @@ class GatewaySession( scope.launch(Dispatchers.IO) { job?.cancelAndJoin() job = null - canvasHostUrl = null + pluginSurfaceUrls = emptyMap() mainSessionKey = null onDisconnected("Offline") } @@ -196,7 +196,20 @@ class GatewaySession( currentConnection?.closeQuietly() } - fun currentCanvasHostUrl(): String? = canvasHostUrl + fun currentCanvasHostUrl(): String? = pluginSurfaceUrls["canvas"] + + suspend fun refreshCanvasHostUrl(timeoutMs: Long = 8_000): String? { + val refreshed = + refreshPluginSurfaceUrl( + method = "node.pluginSurface.refresh", + params = buildJsonObject { put("surface", JsonPrimitive("canvas")) }, + timeoutMs = timeoutMs, + ) + if (!refreshed.isNullOrBlank()) { + pluginSurfaceUrls = pluginSurfaceUrls + ("canvas" to refreshed) + } + return refreshed + } fun currentMainSessionKey(): String? = mainSessionKey @@ -218,6 +231,28 @@ class GatewaySession( } } + private suspend fun refreshPluginSurfaceUrl( + method: String, + params: JsonElement?, + timeoutMs: Long, + ): String? { + val conn = currentConnection ?: return null + return try { + val res = conn.request(method, params, timeoutMs) + if (!res.ok) return null + val obj = res.payloadJson?.let { json.parseToJsonElement(it).asObjectOrNull() } ?: return null + val raw = + obj["pluginSurfaceUrls"] + .asObjectOrNull() + ?.get("canvas") + .asStringOrNull() + normalizeCanvasHostUrl(raw, conn.endpoint, isTlsConnection = conn.tls != null) + } catch (err: Throwable) { + Log.d("OpenClawGateway", "$method failed: ${err.message ?: err::class.java.simpleName}") + null + } + } + suspend fun sendNodeEventDetailed( event: String, payloadJson: String?, @@ -280,52 +315,6 @@ class GatewaySession( return RpcResult(ok = res.ok, payloadJson = res.payloadJson, error = res.error) } - suspend fun refreshNodeCanvasCapability(timeoutMs: Long = 8_000): Boolean { - val conn = currentConnection ?: return false - val response = - try { - conn.request( - "node.canvas.capability.refresh", - params = buildJsonObject {}, - timeoutMs = timeoutMs, - ) - } catch (err: Throwable) { - Log.w("OpenClawGateway", "node.canvas.capability.refresh failed: ${err.message ?: err::class.java.simpleName}") - return false - } - if (!response.ok) { - val err = response.error - Log.w( - "OpenClawGateway", - "node.canvas.capability.refresh rejected: ${err?.code ?: "UNAVAILABLE"}: ${err?.message ?: "request failed"}", - ) - return false - } - val payloadObj = response.payloadJson?.let(::parseJsonOrNull)?.asObjectOrNull() - val refreshedCapability = - payloadObj - ?.get("canvasCapability") - .asStringOrNull() - ?.trim() - .orEmpty() - if (refreshedCapability.isEmpty()) { - Log.w("OpenClawGateway", "node.canvas.capability.refresh missing canvasCapability") - return false - } - val scopedCanvasHostUrl = canvasHostUrl?.trim().orEmpty() - if (scopedCanvasHostUrl.isEmpty()) { - Log.w("OpenClawGateway", "node.canvas.capability.refresh missing local canvasHostUrl") - return false - } - val refreshedUrl = replaceCanvasCapabilityInScopedHostUrl(scopedCanvasHostUrl, refreshedCapability) - if (refreshedUrl == null) { - Log.w("OpenClawGateway", "node.canvas.capability.refresh unable to rewrite scoped canvas URL") - return false - } - canvasHostUrl = refreshedUrl - return true - } - private data class RpcResponse( val id: String, val ok: Boolean, @@ -334,12 +323,12 @@ class GatewaySession( ) private inner class Connection( - private val endpoint: GatewayEndpoint, + val endpoint: GatewayEndpoint, private val token: String?, private val bootstrapToken: String?, private val password: String?, private val options: GatewayConnectOptions, - private val tls: GatewayTlsParams?, + val tls: GatewayTlsParams?, ) { private val connectDeferred = CompletableDeferred() private val closedDeferred = CompletableDeferred() @@ -615,8 +604,13 @@ class GatewaySession( } } } - val rawCanvas = obj["canvasHostUrl"].asStringOrNull() - canvasHostUrl = normalizeCanvasHostUrl(rawCanvas, endpoint, isTlsConnection = tls != null) + val rawPluginSurfaceUrls = obj["pluginSurfaceUrls"].asObjectOrNull() + val normalizedPluginSurfaceUrls = + rawPluginSurfaceUrls?.mapNotNull { (surface, value) -> + normalizeCanvasHostUrl(value.asStringOrNull(), endpoint, isTlsConnection = tls != null) + ?.let { normalized -> surface to normalized } + } ?: emptyList() + pluginSurfaceUrls = normalizedPluginSurfaceUrls.toMap() val sessionDefaults = obj["snapshot"] .asObjectOrNull() @@ -910,7 +904,7 @@ class GatewaySession( conn.awaitClose() } finally { currentConnection = null - canvasHostUrl = null + pluginSurfaceUrls = emptyMap() mainSessionKey = null } } @@ -1133,22 +1127,6 @@ private fun parseJsonOrNull(payload: String): JsonElement? { } } -internal fun replaceCanvasCapabilityInScopedHostUrl( - scopedUrl: String, - capability: String, -): String? { - val marker = "/__openclaw__/cap/" - val markerStart = scopedUrl.indexOf(marker) - if (markerStart < 0) return null - val capabilityStart = markerStart + marker.length - val slashEnd = scopedUrl.indexOf("/", capabilityStart).takeIf { it >= 0 } - val queryEnd = scopedUrl.indexOf("?", capabilityStart).takeIf { it >= 0 } - val fragmentEnd = scopedUrl.indexOf("#", capabilityStart).takeIf { it >= 0 } - val capabilityEnd = listOfNotNull(slashEnd, queryEnd, fragmentEnd).minOrNull() ?: scopedUrl.length - if (capabilityEnd <= capabilityStart) return null - return scopedUrl.substring(0, capabilityStart) + capability + scopedUrl.substring(capabilityEnd) -} - internal fun resolveInvokeResultAckTimeoutMs(invokeTimeoutMs: Long?): Long { val normalized = invokeTimeoutMs?.takeIf { it > 0L } ?: 15_000L return normalized.coerceIn(15_000L, 120_000L) diff --git a/apps/android/app/src/main/java/ai/openclaw/app/node/InvokeDispatcher.kt b/apps/android/app/src/main/java/ai/openclaw/app/node/InvokeDispatcher.kt index 10d610ef8a4..b6afaf8256a 100644 --- a/apps/android/app/src/main/java/ai/openclaw/app/node/InvokeDispatcher.kt +++ b/apps/android/app/src/main/java/ai/openclaw/app/node/InvokeDispatcher.kt @@ -78,9 +78,9 @@ class InvokeDispatcher( private val smsTelephonyAvailable: () -> Boolean, private val callLogAvailable: () -> Boolean, private val debugBuild: () -> Boolean, - private val refreshNodeCanvasCapability: suspend () -> Boolean, private val onCanvasA2uiPush: () -> Unit, private val onCanvasA2uiReset: () -> Unit, + private val refreshCanvasHostUrl: suspend () -> String?, private val motionActivityAvailable: () -> Boolean, private val motionPedometerAvailable: () -> Boolean, ) { @@ -231,23 +231,15 @@ class InvokeDispatcher( private suspend fun withReadyA2ui(block: suspend () -> GatewaySession.InvokeResult): GatewaySession.InvokeResult { var a2uiUrl = a2uiHandler.resolveA2uiHostUrl() + ?: refreshCanvasHostUrl().let { a2uiHandler.resolveA2uiHostUrl() } ?: return GatewaySession.InvokeResult.error( code = "A2UI_HOST_NOT_CONFIGURED", message = "A2UI_HOST_NOT_CONFIGURED: gateway did not advertise canvas host", ) val readyOnFirstCheck = a2uiHandler.ensureA2uiReady(a2uiUrl) if (!readyOnFirstCheck) { - if (!refreshNodeCanvasCapability()) { - return GatewaySession.InvokeResult.error( - code = "A2UI_HOST_UNAVAILABLE", - message = "A2UI_HOST_UNAVAILABLE: A2UI host not reachable", - ) - } - a2uiUrl = a2uiHandler.resolveA2uiHostUrl() - ?: return GatewaySession.InvokeResult.error( - code = "A2UI_HOST_NOT_CONFIGURED", - message = "A2UI_HOST_NOT_CONFIGURED: gateway did not advertise canvas host", - ) + refreshCanvasHostUrl() + a2uiUrl = a2uiHandler.resolveA2uiHostUrl() ?: a2uiUrl if (!a2uiHandler.ensureA2uiReady(a2uiUrl)) { return GatewaySession.InvokeResult.error( code = "A2UI_HOST_UNAVAILABLE", diff --git a/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTest.kt b/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTest.kt index 81f33937842..7437adc6e0c 100644 --- a/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTest.kt +++ b/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTest.kt @@ -476,56 +476,6 @@ class GatewaySessionInvokeTest { ) } - @Test - fun refreshNodeCanvasCapability_sendsObjectParamsAndUpdatesScopedUrl() = - runBlocking { - val json = testJson() - val connected = CompletableDeferred() - val refreshRequestParams = CompletableDeferred() - val lastDisconnect = AtomicReference("") - - val server = - startGatewayServer(json) { webSocket, id, method, frame -> - when (method) { - "connect" -> { - webSocket.send(connectResponseFrame(id, canvasHostUrl = "http://127.0.0.1/__openclaw__/cap/old-cap")) - } - "node.canvas.capability.refresh" -> { - if (!refreshRequestParams.isCompleted) { - refreshRequestParams.complete(frame["params"]?.toString()) - } - webSocket.send( - """{"type":"res","id":"$id","ok":true,"payload":{"canvasCapability":"new-cap"}}""", - ) - webSocket.close(1000, "done") - } - } - } - - val harness = - createNodeHarness( - connected = connected, - lastDisconnect = lastDisconnect, - ) { GatewaySession.InvokeResult.ok("""{"handled":true}""") } - - try { - connectNodeSession(harness.session, server.port) - awaitConnectedOrThrow(connected, lastDisconnect, server) - - val refreshed = harness.session.refreshNodeCanvasCapability(timeoutMs = TEST_TIMEOUT_MS) - val refreshParamsJson = withTimeout(TEST_TIMEOUT_MS) { refreshRequestParams.await() } - - assertEquals(true, refreshed) - assertEquals("{}", refreshParamsJson) - assertEquals( - "http://127.0.0.1:${server.port}/__openclaw__/cap/new-cap", - harness.session.currentCanvasHostUrl(), - ) - } finally { - shutdownHarness(harness, server) - } - } - @Test fun sendNodeEventDetailed_sendsPresenceAlivePayloadAndReturnsStructuredResponse() = runBlocking { @@ -778,12 +728,17 @@ class GatewaySessionInvokeTest { private fun connectResponseFrame( id: String, - canvasHostUrl: String? = null, + pluginSurfaceUrls: Map = emptyMap(), authJson: String? = null, ): String { - val canvas = canvasHostUrl?.let { "\"canvasHostUrl\":\"$it\"," } ?: "" + val surfaces = + pluginSurfaceUrls.entries + .joinToString(",") { (key, value) -> """"$key":"$value"""" } + .takeIf { it.isNotEmpty() } + ?.let { """"pluginSurfaceUrls":{$it},""" } + ?: "" val auth = authJson?.let { "\"auth\":$it," } ?: "" - return """{"type":"res","id":"$id","ok":true,"payload":{$canvas$auth"snapshot":{"sessionDefaults":{"mainSessionKey":"main"}}}}""" + return """{"type":"res","id":"$id","ok":true,"payload":{$surfaces$auth"snapshot":{"sessionDefaults":{"mainSessionKey":"main"}}}}""" } private fun startGatewayServer( diff --git a/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTimeoutTest.kt b/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTimeoutTest.kt index 0f7b072722b..0b79cbbd454 100644 --- a/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTimeoutTest.kt +++ b/apps/android/app/src/test/java/ai/openclaw/app/gateway/GatewaySessionInvokeTimeoutTest.kt @@ -39,26 +39,4 @@ class GatewaySessionInvokeTimeoutTest { assertEquals(120_000L, resolveInvokeResultAckTimeoutMs(121_000L)) assertEquals(120_000L, resolveInvokeResultAckTimeoutMs(Long.MAX_VALUE)) } - - @Test - fun replaceCanvasCapabilityInScopedHostUrl_rewritesTerminalCapabilitySegment() { - assertEquals( - "http://127.0.0.1:18789/__openclaw__/cap/new-token", - replaceCanvasCapabilityInScopedHostUrl( - "http://127.0.0.1:18789/__openclaw__/cap/old-token", - "new-token", - ), - ) - } - - @Test - fun replaceCanvasCapabilityInScopedHostUrl_rewritesWhenQueryAndFragmentPresent() { - assertEquals( - "http://127.0.0.1:18789/__openclaw__/cap/new-token?a=1#frag", - replaceCanvasCapabilityInScopedHostUrl( - "http://127.0.0.1:18789/__openclaw__/cap/old-token?a=1#frag", - "new-token", - ), - ) - } } diff --git a/apps/android/app/src/test/java/ai/openclaw/app/node/InvokeDispatcherTest.kt b/apps/android/app/src/test/java/ai/openclaw/app/node/InvokeDispatcherTest.kt index cad08b1f689..80bacc6efe5 100644 --- a/apps/android/app/src/test/java/ai/openclaw/app/node/InvokeDispatcherTest.kt +++ b/apps/android/app/src/test/java/ai/openclaw/app/node/InvokeDispatcherTest.kt @@ -286,9 +286,9 @@ class InvokeDispatcherTest { smsTelephonyAvailable = { smsTelephonyAvailable }, callLogAvailable = { callLogAvailable }, debugBuild = { debugBuild }, - refreshNodeCanvasCapability = { false }, onCanvasA2uiPush = {}, onCanvasA2uiReset = {}, + refreshCanvasHostUrl = { null }, motionActivityAvailable = { motionActivityAvailable }, motionPedometerAvailable = { motionPedometerAvailable }, ) diff --git a/apps/ios/Sources/Model/NodeAppModel+Canvas.swift b/apps/ios/Sources/Model/NodeAppModel+Canvas.swift index 668cd3a8245..9259fe96459 100644 --- a/apps/ios/Sources/Model/NodeAppModel+Canvas.swift +++ b/apps/ios/Sources/Model/NodeAppModel+Canvas.swift @@ -63,10 +63,9 @@ extension NodeAppModel { if await self.screen.waitForA2UIReady(timeoutMs: timeoutMs) { return .ready(initialUrl) } - - // First render can fail when scoped capability rotates between reconnects. - guard await self.gatewaySession.refreshNodeCanvasCapability() else { return .hostUnavailable } - guard let refreshedUrl = await self.resolveA2UIHostURL() else { return .hostUnavailable } + guard let refreshedUrl = await self.resolveA2UIHostURLWithCapabilityRefresh(forceRefresh: true) else { + return .hostUnavailable + } self.screen.navigate(to: refreshedUrl, trustA2UIActions: true) if await self.screen.waitForA2UIReady(timeoutMs: timeoutMs) { return .ready(refreshedUrl) @@ -79,19 +78,19 @@ extension NodeAppModel { self.screen.showDefaultCanvas() } - private func resolveA2UIHostURLWithCapabilityRefresh() async -> String? { - if let url = await self.resolveA2UIHostURL() { - return url + private func resolveA2UIHostURLWithCapabilityRefresh(forceRefresh: Bool = false) async -> String? { + if !forceRefresh, let current = await self.resolveA2UIHostURL() { + return current } - guard await self.gatewaySession.refreshNodeCanvasCapability() else { return nil } + _ = await self.gatewaySession.refreshCanvasHostUrl() return await self.resolveA2UIHostURL() } - private func resolveCanvasHostURLWithCapabilityRefresh() async -> String? { - if let url = await self.resolveCanvasHostURL() { - return url + private func resolveCanvasHostURLWithCapabilityRefresh(forceRefresh: Bool = false) async -> String? { + if !forceRefresh, let current = await self.resolveCanvasHostURL() { + return current } - guard await self.gatewaySession.refreshNodeCanvasCapability() else { return nil } + _ = await self.gatewaySession.refreshCanvasHostUrl() return await self.resolveCanvasHostURL() } diff --git a/apps/macos/Sources/OpenClaw/CanvasManager.swift b/apps/macos/Sources/OpenClaw/CanvasManager.swift index 4b2c3120e6e..dfd690111af 100644 --- a/apps/macos/Sources/OpenClaw/CanvasManager.swift +++ b/apps/macos/Sources/OpenClaw/CanvasManager.swift @@ -152,15 +152,17 @@ final class CanvasManager { private func handleGatewayPush(_ push: GatewayPush) { guard case let .snapshot(snapshot) = push else { return } - let raw = snapshot.canvashosturl?.trimmingCharacters(in: .whitespacesAndNewlines) ?? "" + let raw = + (snapshot.pluginsurfaceurls?["canvas"]?.value as? String)? + .trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) ?? "" if raw.isEmpty { - Self.logger.debug("canvas host url missing in gateway snapshot") + Self.logger.debug("canvas plugin surface URL missing in gateway snapshot") } else { - Self.logger.debug("canvas host url snapshot=\(raw, privacy: .public)") + Self.logger.debug("canvas plugin surface URL snapshot=\(raw, privacy: .public)") } let a2uiUrl = Self.resolveA2UIHostUrl(from: raw) if a2uiUrl == nil, !raw.isEmpty { - Self.logger.debug("canvas host url invalid; cannot resolve A2UI") + Self.logger.debug("canvas plugin surface URL invalid; cannot resolve A2UI") } guard let controller = self.panelController else { if a2uiUrl != nil { @@ -197,7 +199,7 @@ final class CanvasManager { } private func resolveA2UIHostUrl() async -> String? { - let raw = await GatewayConnection.shared.canvasHostUrl() + let raw = await GatewayConnection.shared.canvasPluginSurfaceUrl() return Self.resolveA2UIHostUrl(from: raw) } diff --git a/apps/macos/Sources/OpenClaw/GatewayConnection.swift b/apps/macos/Sources/OpenClaw/GatewayConnection.swift index 261b94b02c4..1ec076b1e6e 100644 --- a/apps/macos/Sources/OpenClaw/GatewayConnection.swift +++ b/apps/macos/Sources/OpenClaw/GatewayConnection.swift @@ -311,9 +311,10 @@ actor GatewayConnection { self.lastSnapshot = nil } - func canvasHostUrl() async -> String? { + func canvasPluginSurfaceUrl() async -> String? { guard let snapshot = self.lastSnapshot else { return nil } - let trimmed = snapshot.canvashosturl?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) ?? "" + let raw = snapshot.pluginsurfaceurls?["canvas"]?.value as? String + let trimmed = raw?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) ?? "" return trimmed.isEmpty ? nil : trimmed } diff --git a/apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift b/apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift index 20ede5febc9..7cf8938bcca 100644 --- a/apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift +++ b/apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift @@ -8,10 +8,18 @@ final class MacNodeModeCoordinator { private let logger = Logger(subsystem: "ai.openclaw", category: "mac-node") private var task: Task? - private let runtime = MacNodeRuntime() - private let session = GatewayNodeSession() + private let runtime: MacNodeRuntime + private let session: GatewayNodeSession private var autoRepairedTLSFingerprintsByStoreKey: [String: String] = [:] + private init() { + let session = GatewayNodeSession() + self.session = session + self.runtime = MacNodeRuntime( + canvasSurfaceUrl: { await session.currentCanvasHostUrl() }, + refreshCanvasSurfaceUrl: { await session.refreshCanvasHostUrl() }) + } + func start() { guard self.task == nil else { return } self.task = Task { [weak self] in diff --git a/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift b/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift index fa156895f1d..077f1868fd7 100644 --- a/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift +++ b/apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift @@ -7,6 +7,8 @@ actor MacNodeRuntime { private let cameraCapture = CameraCaptureService() private let makeMainActorServices: () async -> any MacNodeRuntimeMainActorServices private let browserProxyRequest: @Sendable (String?) async throws -> String + private let canvasSurfaceUrl: @Sendable () async -> String? + private let refreshCanvasSurfaceUrl: @Sendable () async -> String? private var cachedMainActorServices: (any MacNodeRuntimeMainActorServices)? private var mainSessionKey: String = "main" private var eventSender: (@Sendable (String, String?) async -> Void)? @@ -17,10 +19,16 @@ actor MacNodeRuntime { }, browserProxyRequest: @escaping @Sendable (String?) async throws -> String = { paramsJSON in try await MacNodeBrowserProxy.shared.request(paramsJSON: paramsJSON) - }) + }, + canvasSurfaceUrl: @escaping @Sendable () async -> String? = { + await GatewayConnection.shared.canvasPluginSurfaceUrl() + }, + refreshCanvasSurfaceUrl: @escaping @Sendable () async -> String? = { nil }) { self.makeMainActorServices = makeMainActorServices self.browserProxyRequest = browserProxyRequest + self.canvasSurfaceUrl = canvasSurfaceUrl + self.refreshCanvasSurfaceUrl = refreshCanvasSurfaceUrl } func updateMainSessionKey(_ sessionKey: String) { @@ -441,7 +449,7 @@ actor MacNodeRuntime { private func ensureA2UIHost() async throws { if await self.isA2UIReady() { return } - guard let a2uiUrl = await self.resolveA2UIHostUrl() else { + guard let a2uiUrl = await self.resolveA2UIHostUrlWithCapabilityRefresh() else { throw NSError(domain: "Canvas", code: 30, userInfo: [ NSLocalizedDescriptionKey: "A2UI_HOST_NOT_CONFIGURED: gateway did not advertise canvas host", ]) @@ -451,18 +459,35 @@ actor MacNodeRuntime { try CanvasManager.shared.show(sessionKey: sessionKey, path: a2uiUrl) } if await self.isA2UIReady(poll: true) { return } + if let refreshedUrl = await self.resolveA2UIHostUrlWithCapabilityRefresh(forceRefresh: true) { + _ = try await MainActor.run { + try CanvasManager.shared.show(sessionKey: sessionKey, path: refreshedUrl) + } + if await self.isA2UIReady(poll: true) { return } + } throw NSError(domain: "Canvas", code: 31, userInfo: [ NSLocalizedDescriptionKey: "A2UI_HOST_UNAVAILABLE: A2UI host not reachable", ]) } private func resolveA2UIHostUrl() async -> String? { - guard let raw = await GatewayConnection.shared.canvasHostUrl() else { return nil } + Self.resolveA2UIHostUrl(from: await self.canvasSurfaceUrl()) + } + + private static func resolveA2UIHostUrl(from raw: String?) -> String? { + guard let raw else { return nil } let trimmed = raw.trimmingCharacters(in: .whitespacesAndNewlines) guard !trimmed.isEmpty, let baseUrl = URL(string: trimmed) else { return nil } return baseUrl.appendingPathComponent("__openclaw__/a2ui/").absoluteString + "?platform=macos" } + func resolveA2UIHostUrlWithCapabilityRefresh(forceRefresh: Bool = false) async -> String? { + if !forceRefresh, let current = await self.resolveA2UIHostUrl() { + return current + } + return Self.resolveA2UIHostUrl(from: await self.refreshCanvasSurfaceUrl()) + } + private func isA2UIReady(poll: Bool = false) async -> Bool { let deadline = poll ? Date().addingTimeInterval(6.0) : Date() while true { diff --git a/apps/macos/Sources/OpenClawProtocol/GatewayModels.swift b/apps/macos/Sources/OpenClawProtocol/GatewayModels.swift deleted file mode 100644 index ccef9eb5dd0..00000000000 --- a/apps/macos/Sources/OpenClawProtocol/GatewayModels.swift +++ /dev/null @@ -1,5847 +0,0 @@ -// Generated by scripts/protocol-gen-swift.ts — do not edit by hand -// swiftlint:disable file_length -import Foundation - -public let GATEWAY_PROTOCOL_VERSION = 3 - -public enum ErrorCode: String, Codable, Sendable { - case notLinked = "NOT_LINKED" - case notPaired = "NOT_PAIRED" - case agentTimeout = "AGENT_TIMEOUT" - case invalidRequest = "INVALID_REQUEST" - case approvalNotFound = "APPROVAL_NOT_FOUND" - case unavailable = "UNAVAILABLE" -} - -public enum EnvironmentStatus: String, Codable, Sendable { - case available = "available" - case unavailable = "unavailable" - case starting = "starting" - case stopping = "stopping" - case error = "error" -} - -public enum NodePresenceAliveReason: String, Codable, Sendable { - case background = "background" - case silentPush = "silent_push" - case bgAppRefresh = "bg_app_refresh" - case significantLocation = "significant_location" - case manual = "manual" - case connect = "connect" -} - -public struct ConnectParams: Codable, Sendable { - public let minprotocol: Int - public let maxprotocol: Int - public let client: [String: AnyCodable] - public let caps: [String]? - public let commands: [String]? - public let permissions: [String: AnyCodable]? - public let pathenv: String? - public let role: String? - public let scopes: [String]? - public let device: [String: AnyCodable]? - public let auth: [String: AnyCodable]? - public let locale: String? - public let useragent: String? - - public init( - minprotocol: Int, - maxprotocol: Int, - client: [String: AnyCodable], - caps: [String]?, - commands: [String]?, - permissions: [String: AnyCodable]?, - pathenv: String?, - role: String?, - scopes: [String]?, - device: [String: AnyCodable]?, - auth: [String: AnyCodable]?, - locale: String?, - useragent: String?) - { - self.minprotocol = minprotocol - self.maxprotocol = maxprotocol - self.client = client - self.caps = caps - self.commands = commands - self.permissions = permissions - self.pathenv = pathenv - self.role = role - self.scopes = scopes - self.device = device - self.auth = auth - self.locale = locale - self.useragent = useragent - } - - private enum CodingKeys: String, CodingKey { - case minprotocol = "minProtocol" - case maxprotocol = "maxProtocol" - case client - case caps - case commands - case permissions - case pathenv = "pathEnv" - case role - case scopes - case device - case auth - case locale - case useragent = "userAgent" - } -} - -public struct HelloOk: Codable, Sendable { - public let type: String - public let _protocol: Int - public let server: [String: AnyCodable] - public let features: [String: AnyCodable] - public let snapshot: Snapshot - public let canvashosturl: String? - public let auth: [String: AnyCodable] - public let policy: [String: AnyCodable] - - public init( - type: String, - _protocol: Int, - server: [String: AnyCodable], - features: [String: AnyCodable], - snapshot: Snapshot, - canvashosturl: String?, - auth: [String: AnyCodable], - policy: [String: AnyCodable]) - { - self.type = type - self._protocol = _protocol - self.server = server - self.features = features - self.snapshot = snapshot - self.canvashosturl = canvashosturl - self.auth = auth - self.policy = policy - } - - private enum CodingKeys: String, CodingKey { - case type - case _protocol = "protocol" - case server - case features - case snapshot - case canvashosturl = "canvasHostUrl" - case auth - case policy - } -} - -public struct RequestFrame: Codable, Sendable { - public let type: String - public let id: String - public let method: String - public let params: AnyCodable? - - public init( - type: String, - id: String, - method: String, - params: AnyCodable?) - { - self.type = type - self.id = id - self.method = method - self.params = params - } - - private enum CodingKeys: String, CodingKey { - case type - case id - case method - case params - } -} - -public struct ResponseFrame: Codable, Sendable { - public let type: String - public let id: String - public let ok: Bool - public let payload: AnyCodable? - public let error: [String: AnyCodable]? - - public init( - type: String, - id: String, - ok: Bool, - payload: AnyCodable?, - error: [String: AnyCodable]?) - { - self.type = type - self.id = id - self.ok = ok - self.payload = payload - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case type - case id - case ok - case payload - case error - } -} - -public struct EventFrame: Codable, Sendable { - public let type: String - public let event: String - public let payload: AnyCodable? - public let seq: Int? - public let stateversion: [String: AnyCodable]? - - public init( - type: String, - event: String, - payload: AnyCodable?, - seq: Int?, - stateversion: [String: AnyCodable]?) - { - self.type = type - self.event = event - self.payload = payload - self.seq = seq - self.stateversion = stateversion - } - - private enum CodingKeys: String, CodingKey { - case type - case event - case payload - case seq - case stateversion = "stateVersion" - } -} - -public struct PresenceEntry: Codable, Sendable { - public let host: String? - public let ip: String? - public let version: String? - public let platform: String? - public let devicefamily: String? - public let modelidentifier: String? - public let mode: String? - public let lastinputseconds: Int? - public let reason: String? - public let tags: [String]? - public let text: String? - public let ts: Int - public let deviceid: String? - public let roles: [String]? - public let scopes: [String]? - public let instanceid: String? - - public init( - host: String?, - ip: String?, - version: String?, - platform: String?, - devicefamily: String?, - modelidentifier: String?, - mode: String?, - lastinputseconds: Int?, - reason: String?, - tags: [String]?, - text: String?, - ts: Int, - deviceid: String?, - roles: [String]?, - scopes: [String]?, - instanceid: String?) - { - self.host = host - self.ip = ip - self.version = version - self.platform = platform - self.devicefamily = devicefamily - self.modelidentifier = modelidentifier - self.mode = mode - self.lastinputseconds = lastinputseconds - self.reason = reason - self.tags = tags - self.text = text - self.ts = ts - self.deviceid = deviceid - self.roles = roles - self.scopes = scopes - self.instanceid = instanceid - } - - private enum CodingKeys: String, CodingKey { - case host - case ip - case version - case platform - case devicefamily = "deviceFamily" - case modelidentifier = "modelIdentifier" - case mode - case lastinputseconds = "lastInputSeconds" - case reason - case tags - case text - case ts - case deviceid = "deviceId" - case roles - case scopes - case instanceid = "instanceId" - } -} - -public struct StateVersion: Codable, Sendable { - public let presence: Int - public let health: Int - - public init( - presence: Int, - health: Int) - { - self.presence = presence - self.health = health - } - - private enum CodingKeys: String, CodingKey { - case presence - case health - } -} - -public struct Snapshot: Codable, Sendable { - public let presence: [PresenceEntry] - public let health: AnyCodable - public let stateversion: StateVersion - public let uptimems: Int - public let configpath: String? - public let statedir: String? - public let sessiondefaults: [String: AnyCodable]? - public let authmode: AnyCodable? - public let updateavailable: [String: AnyCodable]? - - public init( - presence: [PresenceEntry], - health: AnyCodable, - stateversion: StateVersion, - uptimems: Int, - configpath: String?, - statedir: String?, - sessiondefaults: [String: AnyCodable]?, - authmode: AnyCodable?, - updateavailable: [String: AnyCodable]?) - { - self.presence = presence - self.health = health - self.stateversion = stateversion - self.uptimems = uptimems - self.configpath = configpath - self.statedir = statedir - self.sessiondefaults = sessiondefaults - self.authmode = authmode - self.updateavailable = updateavailable - } - - private enum CodingKeys: String, CodingKey { - case presence - case health - case stateversion = "stateVersion" - case uptimems = "uptimeMs" - case configpath = "configPath" - case statedir = "stateDir" - case sessiondefaults = "sessionDefaults" - case authmode = "authMode" - case updateavailable = "updateAvailable" - } -} - -public struct ErrorShape: Codable, Sendable { - public let code: String - public let message: String - public let details: AnyCodable? - public let retryable: Bool? - public let retryafterms: Int? - - public init( - code: String, - message: String, - details: AnyCodable?, - retryable: Bool?, - retryafterms: Int?) - { - self.code = code - self.message = message - self.details = details - self.retryable = retryable - self.retryafterms = retryafterms - } - - private enum CodingKeys: String, CodingKey { - case code - case message - case details - case retryable - case retryafterms = "retryAfterMs" - } -} - -public struct EnvironmentSummary: Codable, Sendable { - public let id: String - public let type: String - public let label: String? - public let status: EnvironmentStatus - public let capabilities: [String]? - - public init( - id: String, - type: String, - label: String?, - status: EnvironmentStatus, - capabilities: [String]?) - { - self.id = id - self.type = type - self.label = label - self.status = status - self.capabilities = capabilities - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case label - case status - case capabilities - } -} - -public struct EnvironmentsListParams: Codable, Sendable {} - -public struct EnvironmentsListResult: Codable, Sendable { - public let environments: [EnvironmentSummary] - - public init( - environments: [EnvironmentSummary]) - { - self.environments = environments - } - - private enum CodingKeys: String, CodingKey { - case environments - } -} - -public struct EnvironmentsStatusParams: Codable, Sendable { - public let environmentid: String - - public init( - environmentid: String) - { - self.environmentid = environmentid - } - - private enum CodingKeys: String, CodingKey { - case environmentid = "environmentId" - } -} - -public struct EnvironmentsStatusResult: Codable, Sendable { - public let id: String - public let type: String - public let label: String? - public let status: EnvironmentStatus - public let capabilities: [String]? - - public init( - id: String, - type: String, - label: String?, - status: EnvironmentStatus, - capabilities: [String]?) - { - self.id = id - self.type = type - self.label = label - self.status = status - self.capabilities = capabilities - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case label - case status - case capabilities - } -} - -public struct AgentEvent: Codable, Sendable { - public let runid: String - public let seq: Int - public let stream: String - public let ts: Int - public let spawnedby: String? - public let data: [String: AnyCodable] - - public init( - runid: String, - seq: Int, - stream: String, - ts: Int, - spawnedby: String?, - data: [String: AnyCodable]) - { - self.runid = runid - self.seq = seq - self.stream = stream - self.ts = ts - self.spawnedby = spawnedby - self.data = data - } - - private enum CodingKeys: String, CodingKey { - case runid = "runId" - case seq - case stream - case ts - case spawnedby = "spawnedBy" - case data - } -} - -public struct MessageActionParams: Codable, Sendable { - public let channel: String - public let action: String - public let params: [String: AnyCodable] - public let accountid: String? - public let requestersenderid: String? - public let senderisowner: Bool? - public let sessionkey: String? - public let sessionid: String? - public let agentid: String? - public let toolcontext: [String: AnyCodable]? - public let idempotencykey: String - - public init( - channel: String, - action: String, - params: [String: AnyCodable], - accountid: String?, - requestersenderid: String?, - senderisowner: Bool?, - sessionkey: String?, - sessionid: String?, - agentid: String?, - toolcontext: [String: AnyCodable]?, - idempotencykey: String) - { - self.channel = channel - self.action = action - self.params = params - self.accountid = accountid - self.requestersenderid = requestersenderid - self.senderisowner = senderisowner - self.sessionkey = sessionkey - self.sessionid = sessionid - self.agentid = agentid - self.toolcontext = toolcontext - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case channel - case action - case params - case accountid = "accountId" - case requestersenderid = "requesterSenderId" - case senderisowner = "senderIsOwner" - case sessionkey = "sessionKey" - case sessionid = "sessionId" - case agentid = "agentId" - case toolcontext = "toolContext" - case idempotencykey = "idempotencyKey" - } -} - -public struct SendParams: Codable, Sendable { - public let to: String - public let message: String? - public let mediaurl: String? - public let mediaurls: [String]? - public let asvoice: Bool? - public let gifplayback: Bool? - public let channel: String? - public let accountid: String? - public let agentid: String? - public let replytoid: String? - public let threadid: String? - public let sessionkey: String? - public let idempotencykey: String - - public init( - to: String, - message: String?, - mediaurl: String?, - mediaurls: [String]?, - asvoice: Bool?, - gifplayback: Bool?, - channel: String?, - accountid: String?, - agentid: String?, - replytoid: String?, - threadid: String?, - sessionkey: String?, - idempotencykey: String) - { - self.to = to - self.message = message - self.mediaurl = mediaurl - self.mediaurls = mediaurls - self.asvoice = asvoice - self.gifplayback = gifplayback - self.channel = channel - self.accountid = accountid - self.agentid = agentid - self.replytoid = replytoid - self.threadid = threadid - self.sessionkey = sessionkey - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case to - case message - case mediaurl = "mediaUrl" - case mediaurls = "mediaUrls" - case asvoice = "asVoice" - case gifplayback = "gifPlayback" - case channel - case accountid = "accountId" - case agentid = "agentId" - case replytoid = "replyToId" - case threadid = "threadId" - case sessionkey = "sessionKey" - case idempotencykey = "idempotencyKey" - } -} - -public struct PollParams: Codable, Sendable { - public let to: String - public let question: String - public let options: [String] - public let maxselections: Int? - public let durationseconds: Int? - public let durationhours: Int? - public let silent: Bool? - public let isanonymous: Bool? - public let threadid: String? - public let channel: String? - public let accountid: String? - public let idempotencykey: String - - public init( - to: String, - question: String, - options: [String], - maxselections: Int?, - durationseconds: Int?, - durationhours: Int?, - silent: Bool?, - isanonymous: Bool?, - threadid: String?, - channel: String?, - accountid: String?, - idempotencykey: String) - { - self.to = to - self.question = question - self.options = options - self.maxselections = maxselections - self.durationseconds = durationseconds - self.durationhours = durationhours - self.silent = silent - self.isanonymous = isanonymous - self.threadid = threadid - self.channel = channel - self.accountid = accountid - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case to - case question - case options - case maxselections = "maxSelections" - case durationseconds = "durationSeconds" - case durationhours = "durationHours" - case silent - case isanonymous = "isAnonymous" - case threadid = "threadId" - case channel - case accountid = "accountId" - case idempotencykey = "idempotencyKey" - } -} - -public struct AgentParams: Codable, Sendable { - public let message: String - public let agentid: String? - public let provider: String? - public let model: String? - public let to: String? - public let replyto: String? - public let sessionid: String? - public let sessionkey: String? - public let thinking: String? - public let deliver: Bool? - public let attachments: [AnyCodable]? - public let channel: String? - public let replychannel: String? - public let accountid: String? - public let replyaccountid: String? - public let threadid: String? - public let groupid: String? - public let groupchannel: String? - public let groupspace: String? - public let timeout: Int? - public let besteffortdeliver: Bool? - public let lane: String? - public let cleanupbundlemcponrunend: Bool? - public let modelrun: Bool? - public let promptmode: AnyCodable? - public let extrasystemprompt: String? - public let bootstrapcontextmode: AnyCodable? - public let bootstrapcontextrunkind: AnyCodable? - public let acpturnsource: String? - public let internalevents: [[String: AnyCodable]]? - public let inputprovenance: [String: AnyCodable]? - public let voicewaketrigger: String? - public let idempotencykey: String - public let label: String? - - public init( - message: String, - agentid: String?, - provider: String?, - model: String?, - to: String?, - replyto: String?, - sessionid: String?, - sessionkey: String?, - thinking: String?, - deliver: Bool?, - attachments: [AnyCodable]?, - channel: String?, - replychannel: String?, - accountid: String?, - replyaccountid: String?, - threadid: String?, - groupid: String?, - groupchannel: String?, - groupspace: String?, - timeout: Int?, - besteffortdeliver: Bool?, - lane: String?, - cleanupbundlemcponrunend: Bool?, - modelrun: Bool?, - promptmode: AnyCodable?, - extrasystemprompt: String?, - bootstrapcontextmode: AnyCodable?, - bootstrapcontextrunkind: AnyCodable?, - acpturnsource: String?, - internalevents: [[String: AnyCodable]]?, - inputprovenance: [String: AnyCodable]?, - voicewaketrigger: String?, - idempotencykey: String, - label: String?) - { - self.message = message - self.agentid = agentid - self.provider = provider - self.model = model - self.to = to - self.replyto = replyto - self.sessionid = sessionid - self.sessionkey = sessionkey - self.thinking = thinking - self.deliver = deliver - self.attachments = attachments - self.channel = channel - self.replychannel = replychannel - self.accountid = accountid - self.replyaccountid = replyaccountid - self.threadid = threadid - self.groupid = groupid - self.groupchannel = groupchannel - self.groupspace = groupspace - self.timeout = timeout - self.besteffortdeliver = besteffortdeliver - self.lane = lane - self.cleanupbundlemcponrunend = cleanupbundlemcponrunend - self.modelrun = modelrun - self.promptmode = promptmode - self.extrasystemprompt = extrasystemprompt - self.bootstrapcontextmode = bootstrapcontextmode - self.bootstrapcontextrunkind = bootstrapcontextrunkind - self.acpturnsource = acpturnsource - self.internalevents = internalevents - self.inputprovenance = inputprovenance - self.voicewaketrigger = voicewaketrigger - self.idempotencykey = idempotencykey - self.label = label - } - - private enum CodingKeys: String, CodingKey { - case message - case agentid = "agentId" - case provider - case model - case to - case replyto = "replyTo" - case sessionid = "sessionId" - case sessionkey = "sessionKey" - case thinking - case deliver - case attachments - case channel - case replychannel = "replyChannel" - case accountid = "accountId" - case replyaccountid = "replyAccountId" - case threadid = "threadId" - case groupid = "groupId" - case groupchannel = "groupChannel" - case groupspace = "groupSpace" - case timeout - case besteffortdeliver = "bestEffortDeliver" - case lane - case cleanupbundlemcponrunend = "cleanupBundleMcpOnRunEnd" - case modelrun = "modelRun" - case promptmode = "promptMode" - case extrasystemprompt = "extraSystemPrompt" - case bootstrapcontextmode = "bootstrapContextMode" - case bootstrapcontextrunkind = "bootstrapContextRunKind" - case acpturnsource = "acpTurnSource" - case internalevents = "internalEvents" - case inputprovenance = "inputProvenance" - case voicewaketrigger = "voiceWakeTrigger" - case idempotencykey = "idempotencyKey" - case label - } -} - -public struct AgentIdentityParams: Codable, Sendable { - public let agentid: String? - public let sessionkey: String? - - public init( - agentid: String?, - sessionkey: String?) - { - self.agentid = agentid - self.sessionkey = sessionkey - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case sessionkey = "sessionKey" - } -} - -public struct AgentIdentityResult: Codable, Sendable { - public let agentid: String - public let name: String? - public let avatar: String? - public let avatarsource: String? - public let avatarstatus: String? - public let avatarreason: String? - public let emoji: String? - - public init( - agentid: String, - name: String?, - avatar: String?, - avatarsource: String?, - avatarstatus: String?, - avatarreason: String?, - emoji: String?) - { - self.agentid = agentid - self.name = name - self.avatar = avatar - self.avatarsource = avatarsource - self.avatarstatus = avatarstatus - self.avatarreason = avatarreason - self.emoji = emoji - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case name - case avatar - case avatarsource = "avatarSource" - case avatarstatus = "avatarStatus" - case avatarreason = "avatarReason" - case emoji - } -} - -public struct AgentWaitParams: Codable, Sendable { - public let runid: String - public let timeoutms: Int? - - public init( - runid: String, - timeoutms: Int?) - { - self.runid = runid - self.timeoutms = timeoutms - } - - private enum CodingKeys: String, CodingKey { - case runid = "runId" - case timeoutms = "timeoutMs" - } -} - -public struct WakeParams: Codable, Sendable { - public let mode: AnyCodable - public let text: String - - public init( - mode: AnyCodable, - text: String) - { - self.mode = mode - self.text = text - } - - private enum CodingKeys: String, CodingKey { - case mode - case text - } -} - -public struct NodePairRequestParams: Codable, Sendable { - public let nodeid: String - public let displayname: String? - public let platform: String? - public let version: String? - public let coreversion: String? - public let uiversion: String? - public let devicefamily: String? - public let modelidentifier: String? - public let caps: [String]? - public let commands: [String]? - public let remoteip: String? - public let silent: Bool? - - public init( - nodeid: String, - displayname: String?, - platform: String?, - version: String?, - coreversion: String?, - uiversion: String?, - devicefamily: String?, - modelidentifier: String?, - caps: [String]?, - commands: [String]?, - remoteip: String?, - silent: Bool?) - { - self.nodeid = nodeid - self.displayname = displayname - self.platform = platform - self.version = version - self.coreversion = coreversion - self.uiversion = uiversion - self.devicefamily = devicefamily - self.modelidentifier = modelidentifier - self.caps = caps - self.commands = commands - self.remoteip = remoteip - self.silent = silent - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case displayname = "displayName" - case platform - case version - case coreversion = "coreVersion" - case uiversion = "uiVersion" - case devicefamily = "deviceFamily" - case modelidentifier = "modelIdentifier" - case caps - case commands - case remoteip = "remoteIp" - case silent - } -} - -public struct NodePairListParams: Codable, Sendable {} - -public struct NodePairApproveParams: Codable, Sendable { - public let requestid: String - - public init( - requestid: String) - { - self.requestid = requestid - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - } -} - -public struct NodePairRejectParams: Codable, Sendable { - public let requestid: String - - public init( - requestid: String) - { - self.requestid = requestid - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - } -} - -public struct NodePairRemoveParams: Codable, Sendable { - public let nodeid: String - - public init( - nodeid: String) - { - self.nodeid = nodeid - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - } -} - -public struct NodePairVerifyParams: Codable, Sendable { - public let nodeid: String - public let token: String - - public init( - nodeid: String, - token: String) - { - self.nodeid = nodeid - self.token = token - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case token - } -} - -public struct NodeRenameParams: Codable, Sendable { - public let nodeid: String - public let displayname: String - - public init( - nodeid: String, - displayname: String) - { - self.nodeid = nodeid - self.displayname = displayname - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case displayname = "displayName" - } -} - -public struct NodeListParams: Codable, Sendable {} - -public struct NodePendingAckParams: Codable, Sendable { - public let ids: [String] - - public init( - ids: [String]) - { - self.ids = ids - } - - private enum CodingKeys: String, CodingKey { - case ids - } -} - -public struct NodeDescribeParams: Codable, Sendable { - public let nodeid: String - - public init( - nodeid: String) - { - self.nodeid = nodeid - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - } -} - -public struct NodeInvokeParams: Codable, Sendable { - public let nodeid: String - public let command: String - public let params: AnyCodable? - public let timeoutms: Int? - public let idempotencykey: String - - public init( - nodeid: String, - command: String, - params: AnyCodable?, - timeoutms: Int?, - idempotencykey: String) - { - self.nodeid = nodeid - self.command = command - self.params = params - self.timeoutms = timeoutms - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case command - case params - case timeoutms = "timeoutMs" - case idempotencykey = "idempotencyKey" - } -} - -public struct NodeInvokeResultParams: Codable, Sendable { - public let id: String - public let nodeid: String - public let ok: Bool - public let payload: AnyCodable? - public let payloadjson: String? - public let error: [String: AnyCodable]? - - public init( - id: String, - nodeid: String, - ok: Bool, - payload: AnyCodable?, - payloadjson: String?, - error: [String: AnyCodable]?) - { - self.id = id - self.nodeid = nodeid - self.ok = ok - self.payload = payload - self.payloadjson = payloadjson - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case id - case nodeid = "nodeId" - case ok - case payload - case payloadjson = "payloadJSON" - case error - } -} - -public struct NodeEventParams: Codable, Sendable { - public let event: String - public let payload: AnyCodable? - public let payloadjson: String? - - public init( - event: String, - payload: AnyCodable?, - payloadjson: String?) - { - self.event = event - self.payload = payload - self.payloadjson = payloadjson - } - - private enum CodingKeys: String, CodingKey { - case event - case payload - case payloadjson = "payloadJSON" - } -} - -public struct NodeEventResult: Codable, Sendable { - public let ok: Bool - public let event: String - public let handled: Bool - public let reason: String? - - public init( - ok: Bool, - event: String, - handled: Bool, - reason: String?) - { - self.ok = ok - self.event = event - self.handled = handled - self.reason = reason - } - - private enum CodingKeys: String, CodingKey { - case ok - case event - case handled - case reason - } -} - -public struct NodePresenceAlivePayload: Codable, Sendable { - public let trigger: NodePresenceAliveReason - public let sentatms: Int? - public let displayname: String? - public let version: String? - public let platform: String? - public let devicefamily: String? - public let modelidentifier: String? - public let pushtransport: String? - - public init( - trigger: NodePresenceAliveReason, - sentatms: Int?, - displayname: String?, - version: String?, - platform: String?, - devicefamily: String?, - modelidentifier: String?, - pushtransport: String?) - { - self.trigger = trigger - self.sentatms = sentatms - self.displayname = displayname - self.version = version - self.platform = platform - self.devicefamily = devicefamily - self.modelidentifier = modelidentifier - self.pushtransport = pushtransport - } - - private enum CodingKeys: String, CodingKey { - case trigger - case sentatms = "sentAtMs" - case displayname = "displayName" - case version - case platform - case devicefamily = "deviceFamily" - case modelidentifier = "modelIdentifier" - case pushtransport = "pushTransport" - } -} - -public struct NodePendingDrainParams: Codable, Sendable { - public let maxitems: Int? - - public init( - maxitems: Int?) - { - self.maxitems = maxitems - } - - private enum CodingKeys: String, CodingKey { - case maxitems = "maxItems" - } -} - -public struct NodePendingDrainResult: Codable, Sendable { - public let nodeid: String - public let revision: Int - public let items: [[String: AnyCodable]] - public let hasmore: Bool - - public init( - nodeid: String, - revision: Int, - items: [[String: AnyCodable]], - hasmore: Bool) - { - self.nodeid = nodeid - self.revision = revision - self.items = items - self.hasmore = hasmore - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case revision - case items - case hasmore = "hasMore" - } -} - -public struct NodePendingEnqueueParams: Codable, Sendable { - public let nodeid: String - public let type: String - public let priority: String? - public let expiresinms: Int? - public let wake: Bool? - - public init( - nodeid: String, - type: String, - priority: String?, - expiresinms: Int?, - wake: Bool?) - { - self.nodeid = nodeid - self.type = type - self.priority = priority - self.expiresinms = expiresinms - self.wake = wake - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case type - case priority - case expiresinms = "expiresInMs" - case wake - } -} - -public struct NodePendingEnqueueResult: Codable, Sendable { - public let nodeid: String - public let revision: Int - public let queued: [String: AnyCodable] - public let waketriggered: Bool - - public init( - nodeid: String, - revision: Int, - queued: [String: AnyCodable], - waketriggered: Bool) - { - self.nodeid = nodeid - self.revision = revision - self.queued = queued - self.waketriggered = waketriggered - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case revision - case queued - case waketriggered = "wakeTriggered" - } -} - -public struct NodeInvokeRequestEvent: Codable, Sendable { - public let id: String - public let nodeid: String - public let command: String - public let paramsjson: String? - public let timeoutms: Int? - public let idempotencykey: String? - - public init( - id: String, - nodeid: String, - command: String, - paramsjson: String?, - timeoutms: Int?, - idempotencykey: String?) - { - self.id = id - self.nodeid = nodeid - self.command = command - self.paramsjson = paramsjson - self.timeoutms = timeoutms - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case id - case nodeid = "nodeId" - case command - case paramsjson = "paramsJSON" - case timeoutms = "timeoutMs" - case idempotencykey = "idempotencyKey" - } -} - -public struct PushTestParams: Codable, Sendable { - public let nodeid: String - public let title: String? - public let body: String? - public let environment: String? - - public init( - nodeid: String, - title: String?, - body: String?, - environment: String?) - { - self.nodeid = nodeid - self.title = title - self.body = body - self.environment = environment - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case title - case body - case environment - } -} - -public struct PushTestResult: Codable, Sendable { - public let ok: Bool - public let status: Int - public let apnsid: String? - public let reason: String? - public let tokensuffix: String - public let topic: String - public let environment: String - public let transport: String - - public init( - ok: Bool, - status: Int, - apnsid: String?, - reason: String?, - tokensuffix: String, - topic: String, - environment: String, - transport: String) - { - self.ok = ok - self.status = status - self.apnsid = apnsid - self.reason = reason - self.tokensuffix = tokensuffix - self.topic = topic - self.environment = environment - self.transport = transport - } - - private enum CodingKeys: String, CodingKey { - case ok - case status - case apnsid = "apnsId" - case reason - case tokensuffix = "tokenSuffix" - case topic - case environment - case transport - } -} - -public struct SecretsReloadParams: Codable, Sendable {} - -public struct SecretsResolveParams: Codable, Sendable { - public let commandname: String - public let targetids: [String] - - public init( - commandname: String, - targetids: [String]) - { - self.commandname = commandname - self.targetids = targetids - } - - private enum CodingKeys: String, CodingKey { - case commandname = "commandName" - case targetids = "targetIds" - } -} - -public struct SecretsResolveAssignment: Codable, Sendable { - public let path: String? - public let pathsegments: [String] - public let value: AnyCodable - - public init( - path: String?, - pathsegments: [String], - value: AnyCodable) - { - self.path = path - self.pathsegments = pathsegments - self.value = value - } - - private enum CodingKeys: String, CodingKey { - case path - case pathsegments = "pathSegments" - case value - } -} - -public struct SecretsResolveResult: Codable, Sendable { - public let ok: Bool? - public let assignments: [SecretsResolveAssignment]? - public let diagnostics: [String]? - public let inactiverefpaths: [String]? - - public init( - ok: Bool?, - assignments: [SecretsResolveAssignment]?, - diagnostics: [String]?, - inactiverefpaths: [String]?) - { - self.ok = ok - self.assignments = assignments - self.diagnostics = diagnostics - self.inactiverefpaths = inactiverefpaths - } - - private enum CodingKeys: String, CodingKey { - case ok - case assignments - case diagnostics - case inactiverefpaths = "inactiveRefPaths" - } -} - -public struct SessionsListParams: Codable, Sendable { - public let limit: Int? - public let activeminutes: Int? - public let includeglobal: Bool? - public let includeunknown: Bool? - public let includederivedtitles: Bool? - public let includelastmessage: Bool? - public let label: String? - public let spawnedby: String? - public let agentid: String? - public let search: String? - - public init( - limit: Int?, - activeminutes: Int?, - includeglobal: Bool?, - includeunknown: Bool?, - includederivedtitles: Bool?, - includelastmessage: Bool?, - label: String?, - spawnedby: String?, - agentid: String?, - search: String?) - { - self.limit = limit - self.activeminutes = activeminutes - self.includeglobal = includeglobal - self.includeunknown = includeunknown - self.includederivedtitles = includederivedtitles - self.includelastmessage = includelastmessage - self.label = label - self.spawnedby = spawnedby - self.agentid = agentid - self.search = search - } - - private enum CodingKeys: String, CodingKey { - case limit - case activeminutes = "activeMinutes" - case includeglobal = "includeGlobal" - case includeunknown = "includeUnknown" - case includederivedtitles = "includeDerivedTitles" - case includelastmessage = "includeLastMessage" - case label - case spawnedby = "spawnedBy" - case agentid = "agentId" - case search - } -} - -public struct SessionsCleanupParams: Codable, Sendable { - public let agent: String? - public let allagents: Bool? - public let enforce: Bool? - public let activekey: String? - public let fixmissing: Bool? - public let fixdmscope: Bool? - - public init( - agent: String?, - allagents: Bool?, - enforce: Bool?, - activekey: String?, - fixmissing: Bool?, - fixdmscope: Bool?) - { - self.agent = agent - self.allagents = allagents - self.enforce = enforce - self.activekey = activekey - self.fixmissing = fixmissing - self.fixdmscope = fixdmscope - } - - private enum CodingKeys: String, CodingKey { - case agent - case allagents = "allAgents" - case enforce - case activekey = "activeKey" - case fixmissing = "fixMissing" - case fixdmscope = "fixDmScope" - } -} - -public struct SessionsPreviewParams: Codable, Sendable { - public let keys: [String] - public let limit: Int? - public let maxchars: Int? - - public init( - keys: [String], - limit: Int?, - maxchars: Int?) - { - self.keys = keys - self.limit = limit - self.maxchars = maxchars - } - - private enum CodingKeys: String, CodingKey { - case keys - case limit - case maxchars = "maxChars" - } -} - -public struct SessionsDescribeParams: Codable, Sendable { - public let key: String - public let includederivedtitles: Bool? - public let includelastmessage: Bool? - - public init( - key: String, - includederivedtitles: Bool?, - includelastmessage: Bool?) - { - self.key = key - self.includederivedtitles = includederivedtitles - self.includelastmessage = includelastmessage - } - - private enum CodingKeys: String, CodingKey { - case key - case includederivedtitles = "includeDerivedTitles" - case includelastmessage = "includeLastMessage" - } -} - -public struct SessionsResolveParams: Codable, Sendable { - public let key: String? - public let sessionid: String? - public let label: String? - public let agentid: String? - public let spawnedby: String? - public let includeglobal: Bool? - public let includeunknown: Bool? - - public init( - key: String?, - sessionid: String?, - label: String?, - agentid: String?, - spawnedby: String?, - includeglobal: Bool?, - includeunknown: Bool?) - { - self.key = key - self.sessionid = sessionid - self.label = label - self.agentid = agentid - self.spawnedby = spawnedby - self.includeglobal = includeglobal - self.includeunknown = includeunknown - } - - private enum CodingKeys: String, CodingKey { - case key - case sessionid = "sessionId" - case label - case agentid = "agentId" - case spawnedby = "spawnedBy" - case includeglobal = "includeGlobal" - case includeunknown = "includeUnknown" - } -} - -public struct SessionCompactionCheckpoint: Codable, Sendable { - public let checkpointid: String - public let sessionkey: String - public let sessionid: String - public let createdat: Int - public let reason: AnyCodable - public let tokensbefore: Int? - public let tokensafter: Int? - public let summary: String? - public let firstkeptentryid: String? - public let precompaction: [String: AnyCodable] - public let postcompaction: [String: AnyCodable] - - public init( - checkpointid: String, - sessionkey: String, - sessionid: String, - createdat: Int, - reason: AnyCodable, - tokensbefore: Int?, - tokensafter: Int?, - summary: String?, - firstkeptentryid: String?, - precompaction: [String: AnyCodable], - postcompaction: [String: AnyCodable]) - { - self.checkpointid = checkpointid - self.sessionkey = sessionkey - self.sessionid = sessionid - self.createdat = createdat - self.reason = reason - self.tokensbefore = tokensbefore - self.tokensafter = tokensafter - self.summary = summary - self.firstkeptentryid = firstkeptentryid - self.precompaction = precompaction - self.postcompaction = postcompaction - } - - private enum CodingKeys: String, CodingKey { - case checkpointid = "checkpointId" - case sessionkey = "sessionKey" - case sessionid = "sessionId" - case createdat = "createdAt" - case reason - case tokensbefore = "tokensBefore" - case tokensafter = "tokensAfter" - case summary - case firstkeptentryid = "firstKeptEntryId" - case precompaction = "preCompaction" - case postcompaction = "postCompaction" - } -} - -public struct SessionsCompactionListParams: Codable, Sendable { - public let key: String - - public init( - key: String) - { - self.key = key - } - - private enum CodingKeys: String, CodingKey { - case key - } -} - -public struct SessionsCompactionGetParams: Codable, Sendable { - public let key: String - public let checkpointid: String - - public init( - key: String, - checkpointid: String) - { - self.key = key - self.checkpointid = checkpointid - } - - private enum CodingKeys: String, CodingKey { - case key - case checkpointid = "checkpointId" - } -} - -public struct SessionsCompactionBranchParams: Codable, Sendable { - public let key: String - public let checkpointid: String - - public init( - key: String, - checkpointid: String) - { - self.key = key - self.checkpointid = checkpointid - } - - private enum CodingKeys: String, CodingKey { - case key - case checkpointid = "checkpointId" - } -} - -public struct SessionsCompactionRestoreParams: Codable, Sendable { - public let key: String - public let checkpointid: String - - public init( - key: String, - checkpointid: String) - { - self.key = key - self.checkpointid = checkpointid - } - - private enum CodingKeys: String, CodingKey { - case key - case checkpointid = "checkpointId" - } -} - -public struct SessionsCompactionListResult: Codable, Sendable { - public let ok: Bool - public let key: String - public let checkpoints: [SessionCompactionCheckpoint] - - public init( - ok: Bool, - key: String, - checkpoints: [SessionCompactionCheckpoint]) - { - self.ok = ok - self.key = key - self.checkpoints = checkpoints - } - - private enum CodingKeys: String, CodingKey { - case ok - case key - case checkpoints - } -} - -public struct SessionsCompactionGetResult: Codable, Sendable { - public let ok: Bool - public let key: String - public let checkpoint: SessionCompactionCheckpoint - - public init( - ok: Bool, - key: String, - checkpoint: SessionCompactionCheckpoint) - { - self.ok = ok - self.key = key - self.checkpoint = checkpoint - } - - private enum CodingKeys: String, CodingKey { - case ok - case key - case checkpoint - } -} - -public struct SessionsCompactionBranchResult: Codable, Sendable { - public let ok: Bool - public let sourcekey: String - public let key: String - public let sessionid: String - public let checkpoint: SessionCompactionCheckpoint - public let entry: [String: AnyCodable] - - public init( - ok: Bool, - sourcekey: String, - key: String, - sessionid: String, - checkpoint: SessionCompactionCheckpoint, - entry: [String: AnyCodable]) - { - self.ok = ok - self.sourcekey = sourcekey - self.key = key - self.sessionid = sessionid - self.checkpoint = checkpoint - self.entry = entry - } - - private enum CodingKeys: String, CodingKey { - case ok - case sourcekey = "sourceKey" - case key - case sessionid = "sessionId" - case checkpoint - case entry - } -} - -public struct SessionsCompactionRestoreResult: Codable, Sendable { - public let ok: Bool - public let key: String - public let sessionid: String - public let checkpoint: SessionCompactionCheckpoint - public let entry: [String: AnyCodable] - - public init( - ok: Bool, - key: String, - sessionid: String, - checkpoint: SessionCompactionCheckpoint, - entry: [String: AnyCodable]) - { - self.ok = ok - self.key = key - self.sessionid = sessionid - self.checkpoint = checkpoint - self.entry = entry - } - - private enum CodingKeys: String, CodingKey { - case ok - case key - case sessionid = "sessionId" - case checkpoint - case entry - } -} - -public struct SessionsCreateParams: Codable, Sendable { - public let key: String? - public let agentid: String? - public let label: String? - public let model: String? - public let parentsessionkey: String? - public let emitcommandhooks: Bool? - public let task: String? - public let message: String? - - public init( - key: String?, - agentid: String?, - label: String?, - model: String?, - parentsessionkey: String?, - emitcommandhooks: Bool?, - task: String?, - message: String?) - { - self.key = key - self.agentid = agentid - self.label = label - self.model = model - self.parentsessionkey = parentsessionkey - self.emitcommandhooks = emitcommandhooks - self.task = task - self.message = message - } - - private enum CodingKeys: String, CodingKey { - case key - case agentid = "agentId" - case label - case model - case parentsessionkey = "parentSessionKey" - case emitcommandhooks = "emitCommandHooks" - case task - case message - } -} - -public struct SessionsSendParams: Codable, Sendable { - public let key: String - public let message: String - public let thinking: String? - public let attachments: [AnyCodable]? - public let timeoutms: Int? - public let idempotencykey: String? - - public init( - key: String, - message: String, - thinking: String?, - attachments: [AnyCodable]?, - timeoutms: Int?, - idempotencykey: String?) - { - self.key = key - self.message = message - self.thinking = thinking - self.attachments = attachments - self.timeoutms = timeoutms - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case key - case message - case thinking - case attachments - case timeoutms = "timeoutMs" - case idempotencykey = "idempotencyKey" - } -} - -public struct SessionsMessagesSubscribeParams: Codable, Sendable { - public let key: String - - public init( - key: String) - { - self.key = key - } - - private enum CodingKeys: String, CodingKey { - case key - } -} - -public struct SessionsMessagesUnsubscribeParams: Codable, Sendable { - public let key: String - - public init( - key: String) - { - self.key = key - } - - private enum CodingKeys: String, CodingKey { - case key - } -} - -public struct SessionsAbortParams: Codable, Sendable { - public let key: String? - public let runid: String? - - public init( - key: String?, - runid: String?) - { - self.key = key - self.runid = runid - } - - private enum CodingKeys: String, CodingKey { - case key - case runid = "runId" - } -} - -public struct SessionsPatchParams: Codable, Sendable { - public let key: String - public let label: AnyCodable? - public let thinkinglevel: AnyCodable? - public let fastmode: AnyCodable? - public let verboselevel: AnyCodable? - public let tracelevel: AnyCodable? - public let reasoninglevel: AnyCodable? - public let responseusage: AnyCodable? - public let elevatedlevel: AnyCodable? - public let exechost: AnyCodable? - public let execsecurity: AnyCodable? - public let execask: AnyCodable? - public let execnode: AnyCodable? - public let model: AnyCodable? - public let spawnedby: AnyCodable? - public let spawnedworkspacedir: AnyCodable? - public let spawndepth: AnyCodable? - public let subagentrole: AnyCodable? - public let subagentcontrolscope: AnyCodable? - public let sendpolicy: AnyCodable? - public let groupactivation: AnyCodable? - - public init( - key: String, - label: AnyCodable?, - thinkinglevel: AnyCodable?, - fastmode: AnyCodable?, - verboselevel: AnyCodable?, - tracelevel: AnyCodable?, - reasoninglevel: AnyCodable?, - responseusage: AnyCodable?, - elevatedlevel: AnyCodable?, - exechost: AnyCodable?, - execsecurity: AnyCodable?, - execask: AnyCodable?, - execnode: AnyCodable?, - model: AnyCodable?, - spawnedby: AnyCodable?, - spawnedworkspacedir: AnyCodable?, - spawndepth: AnyCodable?, - subagentrole: AnyCodable?, - subagentcontrolscope: AnyCodable?, - sendpolicy: AnyCodable?, - groupactivation: AnyCodable?) - { - self.key = key - self.label = label - self.thinkinglevel = thinkinglevel - self.fastmode = fastmode - self.verboselevel = verboselevel - self.tracelevel = tracelevel - self.reasoninglevel = reasoninglevel - self.responseusage = responseusage - self.elevatedlevel = elevatedlevel - self.exechost = exechost - self.execsecurity = execsecurity - self.execask = execask - self.execnode = execnode - self.model = model - self.spawnedby = spawnedby - self.spawnedworkspacedir = spawnedworkspacedir - self.spawndepth = spawndepth - self.subagentrole = subagentrole - self.subagentcontrolscope = subagentcontrolscope - self.sendpolicy = sendpolicy - self.groupactivation = groupactivation - } - - private enum CodingKeys: String, CodingKey { - case key - case label - case thinkinglevel = "thinkingLevel" - case fastmode = "fastMode" - case verboselevel = "verboseLevel" - case tracelevel = "traceLevel" - case reasoninglevel = "reasoningLevel" - case responseusage = "responseUsage" - case elevatedlevel = "elevatedLevel" - case exechost = "execHost" - case execsecurity = "execSecurity" - case execask = "execAsk" - case execnode = "execNode" - case model - case spawnedby = "spawnedBy" - case spawnedworkspacedir = "spawnedWorkspaceDir" - case spawndepth = "spawnDepth" - case subagentrole = "subagentRole" - case subagentcontrolscope = "subagentControlScope" - case sendpolicy = "sendPolicy" - case groupactivation = "groupActivation" - } -} - -public struct SessionsPluginPatchParams: Codable, Sendable { - public let key: String - public let pluginid: String - public let namespace: String - public let value: AnyCodable? - public let unset: Bool? - - public init( - key: String, - pluginid: String, - namespace: String, - value: AnyCodable?, - unset: Bool?) - { - self.key = key - self.pluginid = pluginid - self.namespace = namespace - self.value = value - self.unset = unset - } - - private enum CodingKeys: String, CodingKey { - case key - case pluginid = "pluginId" - case namespace - case value - case unset - } -} - -public struct SessionsPluginPatchResult: Codable, Sendable { - public let ok: Bool - public let key: String - public let value: AnyCodable? - - public init( - ok: Bool, - key: String, - value: AnyCodable?) - { - self.ok = ok - self.key = key - self.value = value - } - - private enum CodingKeys: String, CodingKey { - case ok - case key - case value - } -} - -public struct SessionsResetParams: Codable, Sendable { - public let key: String - public let reason: AnyCodable? - - public init( - key: String, - reason: AnyCodable?) - { - self.key = key - self.reason = reason - } - - private enum CodingKeys: String, CodingKey { - case key - case reason - } -} - -public struct SessionsDeleteParams: Codable, Sendable { - public let key: String - public let deletetranscript: Bool? - public let emitlifecyclehooks: Bool? - - public init( - key: String, - deletetranscript: Bool?, - emitlifecyclehooks: Bool?) - { - self.key = key - self.deletetranscript = deletetranscript - self.emitlifecyclehooks = emitlifecyclehooks - } - - private enum CodingKeys: String, CodingKey { - case key - case deletetranscript = "deleteTranscript" - case emitlifecyclehooks = "emitLifecycleHooks" - } -} - -public struct SessionsCompactParams: Codable, Sendable { - public let key: String - public let maxlines: Int? - - public init( - key: String, - maxlines: Int?) - { - self.key = key - self.maxlines = maxlines - } - - private enum CodingKeys: String, CodingKey { - case key - case maxlines = "maxLines" - } -} - -public struct SessionsUsageParams: Codable, Sendable { - public let key: String? - public let startdate: String? - public let enddate: String? - public let mode: AnyCodable? - public let utcoffset: String? - public let limit: Int? - public let includecontextweight: Bool? - - public init( - key: String?, - startdate: String?, - enddate: String?, - mode: AnyCodable?, - utcoffset: String?, - limit: Int?, - includecontextweight: Bool?) - { - self.key = key - self.startdate = startdate - self.enddate = enddate - self.mode = mode - self.utcoffset = utcoffset - self.limit = limit - self.includecontextweight = includecontextweight - } - - private enum CodingKeys: String, CodingKey { - case key - case startdate = "startDate" - case enddate = "endDate" - case mode - case utcoffset = "utcOffset" - case limit - case includecontextweight = "includeContextWeight" - } -} - -public struct ConfigGetParams: Codable, Sendable {} - -public struct ConfigSetParams: Codable, Sendable { - public let raw: String - public let basehash: String? - - public init( - raw: String, - basehash: String?) - { - self.raw = raw - self.basehash = basehash - } - - private enum CodingKeys: String, CodingKey { - case raw - case basehash = "baseHash" - } -} - -public struct ConfigApplyParams: Codable, Sendable { - public let raw: String - public let basehash: String? - public let sessionkey: String? - public let deliverycontext: [String: AnyCodable]? - public let note: String? - public let restartdelayms: Int? - - public init( - raw: String, - basehash: String?, - sessionkey: String?, - deliverycontext: [String: AnyCodable]?, - note: String?, - restartdelayms: Int?) - { - self.raw = raw - self.basehash = basehash - self.sessionkey = sessionkey - self.deliverycontext = deliverycontext - self.note = note - self.restartdelayms = restartdelayms - } - - private enum CodingKeys: String, CodingKey { - case raw - case basehash = "baseHash" - case sessionkey = "sessionKey" - case deliverycontext = "deliveryContext" - case note - case restartdelayms = "restartDelayMs" - } -} - -public struct ConfigPatchParams: Codable, Sendable { - public let raw: String - public let basehash: String? - public let sessionkey: String? - public let deliverycontext: [String: AnyCodable]? - public let note: String? - public let restartdelayms: Int? - - public init( - raw: String, - basehash: String?, - sessionkey: String?, - deliverycontext: [String: AnyCodable]?, - note: String?, - restartdelayms: Int?) - { - self.raw = raw - self.basehash = basehash - self.sessionkey = sessionkey - self.deliverycontext = deliverycontext - self.note = note - self.restartdelayms = restartdelayms - } - - private enum CodingKeys: String, CodingKey { - case raw - case basehash = "baseHash" - case sessionkey = "sessionKey" - case deliverycontext = "deliveryContext" - case note - case restartdelayms = "restartDelayMs" - } -} - -public struct ConfigSchemaParams: Codable, Sendable {} - -public struct ConfigSchemaLookupParams: Codable, Sendable { - public let path: String - - public init( - path: String) - { - self.path = path - } - - private enum CodingKeys: String, CodingKey { - case path - } -} - -public struct ConfigSchemaResponse: Codable, Sendable { - public let schema: AnyCodable - public let uihints: [String: AnyCodable] - public let version: String - public let generatedat: String - - public init( - schema: AnyCodable, - uihints: [String: AnyCodable], - version: String, - generatedat: String) - { - self.schema = schema - self.uihints = uihints - self.version = version - self.generatedat = generatedat - } - - private enum CodingKeys: String, CodingKey { - case schema - case uihints = "uiHints" - case version - case generatedat = "generatedAt" - } -} - -public struct ConfigSchemaLookupResult: Codable, Sendable { - public let path: String - public let schema: AnyCodable - public let hint: [String: AnyCodable]? - public let hintpath: String? - public let children: [[String: AnyCodable]] - - public init( - path: String, - schema: AnyCodable, - hint: [String: AnyCodable]?, - hintpath: String?, - children: [[String: AnyCodable]]) - { - self.path = path - self.schema = schema - self.hint = hint - self.hintpath = hintpath - self.children = children - } - - private enum CodingKeys: String, CodingKey { - case path - case schema - case hint - case hintpath = "hintPath" - case children - } -} - -public struct WizardStartParams: Codable, Sendable { - public let mode: AnyCodable? - public let workspace: String? - - public init( - mode: AnyCodable?, - workspace: String?) - { - self.mode = mode - self.workspace = workspace - } - - private enum CodingKeys: String, CodingKey { - case mode - case workspace - } -} - -public struct WizardNextParams: Codable, Sendable { - public let sessionid: String - public let answer: [String: AnyCodable]? - - public init( - sessionid: String, - answer: [String: AnyCodable]?) - { - self.sessionid = sessionid - self.answer = answer - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case answer - } -} - -public struct WizardCancelParams: Codable, Sendable { - public let sessionid: String - - public init( - sessionid: String) - { - self.sessionid = sessionid - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - } -} - -public struct WizardStatusParams: Codable, Sendable { - public let sessionid: String - - public init( - sessionid: String) - { - self.sessionid = sessionid - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - } -} - -public struct WizardStep: Codable, Sendable { - public let id: String - public let type: AnyCodable - public let title: String? - public let message: String? - public let format: AnyCodable? - public let options: [[String: AnyCodable]]? - public let initialvalue: AnyCodable? - public let placeholder: String? - public let sensitive: Bool? - public let executor: AnyCodable? - - public init( - id: String, - type: AnyCodable, - title: String?, - message: String?, - format: AnyCodable?, - options: [[String: AnyCodable]]?, - initialvalue: AnyCodable?, - placeholder: String?, - sensitive: Bool?, - executor: AnyCodable?) - { - self.id = id - self.type = type - self.title = title - self.message = message - self.format = format - self.options = options - self.initialvalue = initialvalue - self.placeholder = placeholder - self.sensitive = sensitive - self.executor = executor - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case title - case message - case format - case options - case initialvalue = "initialValue" - case placeholder - case sensitive - case executor - } -} - -public struct WizardNextResult: Codable, Sendable { - public let done: Bool - public let step: [String: AnyCodable]? - public let status: AnyCodable? - public let error: String? - - public init( - done: Bool, - step: [String: AnyCodable]?, - status: AnyCodable?, - error: String?) - { - self.done = done - self.step = step - self.status = status - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case done - case step - case status - case error - } -} - -public struct WizardStartResult: Codable, Sendable { - public let sessionid: String - public let done: Bool - public let step: [String: AnyCodable]? - public let status: AnyCodable? - public let error: String? - - public init( - sessionid: String, - done: Bool, - step: [String: AnyCodable]?, - status: AnyCodable?, - error: String?) - { - self.sessionid = sessionid - self.done = done - self.step = step - self.status = status - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case done - case step - case status - case error - } -} - -public struct WizardStatusResult: Codable, Sendable { - public let status: AnyCodable - public let error: String? - - public init( - status: AnyCodable, - error: String?) - { - self.status = status - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case status - case error - } -} - -public struct TalkModeParams: Codable, Sendable { - public let enabled: Bool - public let phase: String? - - public init( - enabled: Bool, - phase: String?) - { - self.enabled = enabled - self.phase = phase - } - - private enum CodingKeys: String, CodingKey { - case enabled - case phase - } -} - -public struct TalkEvent: Codable, Sendable { - public let id: String - public let type: AnyCodable - public let sessionid: String - public let turnid: String? - public let captureid: String? - public let seq: Int - public let timestamp: String - public let mode: AnyCodable - public let transport: AnyCodable - public let brain: AnyCodable - public let provider: String? - public let final: Bool? - public let callid: String? - public let itemid: String? - public let parentid: String? - public let payload: AnyCodable - - public init( - id: String, - type: AnyCodable, - sessionid: String, - turnid: String?, - captureid: String?, - seq: Int, - timestamp: String, - mode: AnyCodable, - transport: AnyCodable, - brain: AnyCodable, - provider: String?, - final: Bool?, - callid: String?, - itemid: String?, - parentid: String?, - payload: AnyCodable) - { - self.id = id - self.type = type - self.sessionid = sessionid - self.turnid = turnid - self.captureid = captureid - self.seq = seq - self.timestamp = timestamp - self.mode = mode - self.transport = transport - self.brain = brain - self.provider = provider - self.final = final - self.callid = callid - self.itemid = itemid - self.parentid = parentid - self.payload = payload - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case sessionid = "sessionId" - case turnid = "turnId" - case captureid = "captureId" - case seq - case timestamp - case mode - case transport - case brain - case provider - case final - case callid = "callId" - case itemid = "itemId" - case parentid = "parentId" - case payload - } -} - -public struct TalkCatalogParams: Codable, Sendable {} - -public struct TalkCatalogResult: Codable, Sendable { - public let modes: [AnyCodable] - public let transports: [AnyCodable] - public let brains: [AnyCodable] - public let speech: [String: AnyCodable] - public let transcription: [String: AnyCodable] - public let realtime: [String: AnyCodable] - - public init( - modes: [AnyCodable], - transports: [AnyCodable], - brains: [AnyCodable], - speech: [String: AnyCodable], - transcription: [String: AnyCodable], - realtime: [String: AnyCodable]) - { - self.modes = modes - self.transports = transports - self.brains = brains - self.speech = speech - self.transcription = transcription - self.realtime = realtime - } - - private enum CodingKeys: String, CodingKey { - case modes - case transports - case brains - case speech - case transcription - case realtime - } -} - -public struct TalkClientCreateParams: Codable, Sendable { - public let sessionkey: String? - public let provider: String? - public let model: String? - public let voice: String? - public let mode: AnyCodable? - public let transport: AnyCodable? - public let brain: AnyCodable? - - public init( - sessionkey: String?, - provider: String?, - model: String?, - voice: String?, - mode: AnyCodable?, - transport: AnyCodable?, - brain: AnyCodable?) - { - self.sessionkey = sessionkey - self.provider = provider - self.model = model - self.voice = voice - self.mode = mode - self.transport = transport - self.brain = brain - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case provider - case model - case voice - case mode - case transport - case brain - } -} - -public struct TalkClientToolCallParams: Codable, Sendable { - public let sessionkey: String - public let callid: String - public let name: String - public let args: AnyCodable? - public let relaysessionid: String? - - public init( - sessionkey: String, - callid: String, - name: String, - args: AnyCodable?, - relaysessionid: String?) - { - self.sessionkey = sessionkey - self.callid = callid - self.name = name - self.args = args - self.relaysessionid = relaysessionid - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case callid = "callId" - case name - case args - case relaysessionid = "relaySessionId" - } -} - -public struct TalkClientToolCallResult: Codable, Sendable { - public let runid: String - public let idempotencykey: String - - public init( - runid: String, - idempotencykey: String) - { - self.runid = runid - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case runid = "runId" - case idempotencykey = "idempotencyKey" - } -} - -public struct TalkConfigParams: Codable, Sendable { - public let includesecrets: Bool? - - public init( - includesecrets: Bool?) - { - self.includesecrets = includesecrets - } - - private enum CodingKeys: String, CodingKey { - case includesecrets = "includeSecrets" - } -} - -public struct TalkConfigResult: Codable, Sendable { - public let config: [String: AnyCodable] - - public init( - config: [String: AnyCodable]) - { - self.config = config - } - - private enum CodingKeys: String, CodingKey { - case config - } -} - -public struct TalkSessionAppendAudioParams: Codable, Sendable { - public let sessionid: String - public let audiobase64: String - public let timestamp: Double? - - public init( - sessionid: String, - audiobase64: String, - timestamp: Double?) - { - self.sessionid = sessionid - self.audiobase64 = audiobase64 - self.timestamp = timestamp - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case audiobase64 = "audioBase64" - case timestamp - } -} - -public struct TalkSessionCancelOutputParams: Codable, Sendable { - public let sessionid: String - public let turnid: String? - public let reason: String? - - public init( - sessionid: String, - turnid: String?, - reason: String?) - { - self.sessionid = sessionid - self.turnid = turnid - self.reason = reason - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case turnid = "turnId" - case reason - } -} - -public struct TalkSessionCancelTurnParams: Codable, Sendable { - public let sessionid: String - public let turnid: String? - public let reason: String? - - public init( - sessionid: String, - turnid: String?, - reason: String?) - { - self.sessionid = sessionid - self.turnid = turnid - self.reason = reason - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case turnid = "turnId" - case reason - } -} - -public struct TalkSessionCreateParams: Codable, Sendable { - public let sessionkey: String? - public let provider: String? - public let model: String? - public let voice: String? - public let mode: AnyCodable? - public let transport: AnyCodable? - public let brain: AnyCodable? - public let ttlms: Int? - - public init( - sessionkey: String?, - provider: String?, - model: String?, - voice: String?, - mode: AnyCodable?, - transport: AnyCodable?, - brain: AnyCodable?, - ttlms: Int?) - { - self.sessionkey = sessionkey - self.provider = provider - self.model = model - self.voice = voice - self.mode = mode - self.transport = transport - self.brain = brain - self.ttlms = ttlms - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case provider - case model - case voice - case mode - case transport - case brain - case ttlms = "ttlMs" - } -} - -public struct TalkSessionCreateResult: Codable, Sendable { - public let sessionid: String - public let provider: String? - public let mode: AnyCodable - public let transport: AnyCodable - public let brain: AnyCodable - public let relaysessionid: String? - public let transcriptionsessionid: String? - public let handoffid: String? - public let roomid: String? - public let roomurl: String? - public let token: String? - public let audio: AnyCodable? - public let model: String? - public let voice: String? - public let expiresat: Double? - - public init( - sessionid: String, - provider: String?, - mode: AnyCodable, - transport: AnyCodable, - brain: AnyCodable, - relaysessionid: String?, - transcriptionsessionid: String?, - handoffid: String?, - roomid: String?, - roomurl: String?, - token: String?, - audio: AnyCodable?, - model: String?, - voice: String?, - expiresat: Double?) - { - self.sessionid = sessionid - self.provider = provider - self.mode = mode - self.transport = transport - self.brain = brain - self.relaysessionid = relaysessionid - self.transcriptionsessionid = transcriptionsessionid - self.handoffid = handoffid - self.roomid = roomid - self.roomurl = roomurl - self.token = token - self.audio = audio - self.model = model - self.voice = voice - self.expiresat = expiresat - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case provider - case mode - case transport - case brain - case relaysessionid = "relaySessionId" - case transcriptionsessionid = "transcriptionSessionId" - case handoffid = "handoffId" - case roomid = "roomId" - case roomurl = "roomUrl" - case token - case audio - case model - case voice - case expiresat = "expiresAt" - } -} - -public struct TalkSessionJoinParams: Codable, Sendable { - public let sessionid: String - public let token: String - - public init( - sessionid: String, - token: String) - { - self.sessionid = sessionid - self.token = token - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case token - } -} - -public struct TalkSessionJoinResult: Codable, Sendable { - public let id: String - public let roomid: String - public let roomurl: String - public let sessionkey: String - public let sessionid: String? - public let channel: String? - public let target: String? - public let provider: String? - public let model: String? - public let voice: String? - public let mode: AnyCodable - public let transport: AnyCodable - public let brain: AnyCodable - public let createdat: Double - public let expiresat: Double - public let room: [String: AnyCodable] - - public init( - id: String, - roomid: String, - roomurl: String, - sessionkey: String, - sessionid: String?, - channel: String?, - target: String?, - provider: String?, - model: String?, - voice: String?, - mode: AnyCodable, - transport: AnyCodable, - brain: AnyCodable, - createdat: Double, - expiresat: Double, - room: [String: AnyCodable]) - { - self.id = id - self.roomid = roomid - self.roomurl = roomurl - self.sessionkey = sessionkey - self.sessionid = sessionid - self.channel = channel - self.target = target - self.provider = provider - self.model = model - self.voice = voice - self.mode = mode - self.transport = transport - self.brain = brain - self.createdat = createdat - self.expiresat = expiresat - self.room = room - } - - private enum CodingKeys: String, CodingKey { - case id - case roomid = "roomId" - case roomurl = "roomUrl" - case sessionkey = "sessionKey" - case sessionid = "sessionId" - case channel - case target - case provider - case model - case voice - case mode - case transport - case brain - case createdat = "createdAt" - case expiresat = "expiresAt" - case room - } -} - -public struct TalkSessionTurnParams: Codable, Sendable { - public let sessionid: String - public let turnid: String? - - public init( - sessionid: String, - turnid: String?) - { - self.sessionid = sessionid - self.turnid = turnid - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case turnid = "turnId" - } -} - -public struct TalkSessionTurnResult: Codable, Sendable { - public let ok: Bool - public let turnid: String? - public let events: [TalkEvent]? - - public init( - ok: Bool, - turnid: String?, - events: [TalkEvent]?) - { - self.ok = ok - self.turnid = turnid - self.events = events - } - - private enum CodingKeys: String, CodingKey { - case ok - case turnid = "turnId" - case events - } -} - -public struct TalkSessionSubmitToolResultParams: Codable, Sendable { - public let sessionid: String - public let callid: String - public let result: AnyCodable - - public init( - sessionid: String, - callid: String, - result: AnyCodable) - { - self.sessionid = sessionid - self.callid = callid - self.result = result - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - case callid = "callId" - case result - } -} - -public struct TalkSessionCloseParams: Codable, Sendable { - public let sessionid: String - - public init( - sessionid: String) - { - self.sessionid = sessionid - } - - private enum CodingKeys: String, CodingKey { - case sessionid = "sessionId" - } -} - -public struct TalkSessionOkResult: Codable, Sendable { - public let ok: Bool - - public init( - ok: Bool) - { - self.ok = ok - } - - private enum CodingKeys: String, CodingKey { - case ok - } -} - -public struct TalkSpeakParams: Codable, Sendable { - public let text: String - public let voiceid: String? - public let modelid: String? - public let outputformat: String? - public let speed: Double? - public let ratewpm: Int? - public let stability: Double? - public let similarity: Double? - public let style: Double? - public let speakerboost: Bool? - public let seed: Int? - public let normalize: String? - public let language: String? - public let latencytier: Int? - - public init( - text: String, - voiceid: String?, - modelid: String?, - outputformat: String?, - speed: Double?, - ratewpm: Int?, - stability: Double?, - similarity: Double?, - style: Double?, - speakerboost: Bool?, - seed: Int?, - normalize: String?, - language: String?, - latencytier: Int?) - { - self.text = text - self.voiceid = voiceid - self.modelid = modelid - self.outputformat = outputformat - self.speed = speed - self.ratewpm = ratewpm - self.stability = stability - self.similarity = similarity - self.style = style - self.speakerboost = speakerboost - self.seed = seed - self.normalize = normalize - self.language = language - self.latencytier = latencytier - } - - private enum CodingKeys: String, CodingKey { - case text - case voiceid = "voiceId" - case modelid = "modelId" - case outputformat = "outputFormat" - case speed - case ratewpm = "rateWpm" - case stability - case similarity - case style - case speakerboost = "speakerBoost" - case seed - case normalize - case language - case latencytier = "latencyTier" - } -} - -public struct TalkSpeakResult: Codable, Sendable { - public let audiobase64: String - public let provider: String - public let outputformat: String? - public let voicecompatible: Bool? - public let mimetype: String? - public let fileextension: String? - - public init( - audiobase64: String, - provider: String, - outputformat: String?, - voicecompatible: Bool?, - mimetype: String?, - fileextension: String?) - { - self.audiobase64 = audiobase64 - self.provider = provider - self.outputformat = outputformat - self.voicecompatible = voicecompatible - self.mimetype = mimetype - self.fileextension = fileextension - } - - private enum CodingKeys: String, CodingKey { - case audiobase64 = "audioBase64" - case provider - case outputformat = "outputFormat" - case voicecompatible = "voiceCompatible" - case mimetype = "mimeType" - case fileextension = "fileExtension" - } -} - -public struct ChannelsStatusParams: Codable, Sendable { - public let probe: Bool? - public let timeoutms: Int? - - public init( - probe: Bool?, - timeoutms: Int?) - { - self.probe = probe - self.timeoutms = timeoutms - } - - private enum CodingKeys: String, CodingKey { - case probe - case timeoutms = "timeoutMs" - } -} - -public struct ChannelsStatusResult: Codable, Sendable { - public let ts: Int - public let channelorder: [String] - public let channellabels: [String: AnyCodable] - public let channeldetaillabels: [String: AnyCodable]? - public let channelsystemimages: [String: AnyCodable]? - public let channelmeta: [[String: AnyCodable]]? - public let channels: [String: AnyCodable] - public let channelaccounts: [String: AnyCodable] - public let channeldefaultaccountid: [String: AnyCodable] - public let eventloop: [String: AnyCodable]? - public let partial: Bool? - public let warnings: [String]? - - public init( - ts: Int, - channelorder: [String], - channellabels: [String: AnyCodable], - channeldetaillabels: [String: AnyCodable]?, - channelsystemimages: [String: AnyCodable]?, - channelmeta: [[String: AnyCodable]]?, - channels: [String: AnyCodable], - channelaccounts: [String: AnyCodable], - channeldefaultaccountid: [String: AnyCodable], - eventloop: [String: AnyCodable]?, - partial: Bool?, - warnings: [String]?) - { - self.ts = ts - self.channelorder = channelorder - self.channellabels = channellabels - self.channeldetaillabels = channeldetaillabels - self.channelsystemimages = channelsystemimages - self.channelmeta = channelmeta - self.channels = channels - self.channelaccounts = channelaccounts - self.channeldefaultaccountid = channeldefaultaccountid - self.eventloop = eventloop - self.partial = partial - self.warnings = warnings - } - - private enum CodingKeys: String, CodingKey { - case ts - case channelorder = "channelOrder" - case channellabels = "channelLabels" - case channeldetaillabels = "channelDetailLabels" - case channelsystemimages = "channelSystemImages" - case channelmeta = "channelMeta" - case channels - case channelaccounts = "channelAccounts" - case channeldefaultaccountid = "channelDefaultAccountId" - case eventloop = "eventLoop" - case partial - case warnings - } -} - -public struct ChannelsStartParams: Codable, Sendable { - public let channel: String - public let accountid: String? - - public init( - channel: String, - accountid: String?) - { - self.channel = channel - self.accountid = accountid - } - - private enum CodingKeys: String, CodingKey { - case channel - case accountid = "accountId" - } -} - -public struct ChannelsStopParams: Codable, Sendable { - public let channel: String - public let accountid: String? - - public init( - channel: String, - accountid: String?) - { - self.channel = channel - self.accountid = accountid - } - - private enum CodingKeys: String, CodingKey { - case channel - case accountid = "accountId" - } -} - -public struct ChannelsLogoutParams: Codable, Sendable { - public let channel: String - public let accountid: String? - - public init( - channel: String, - accountid: String?) - { - self.channel = channel - self.accountid = accountid - } - - private enum CodingKeys: String, CodingKey { - case channel - case accountid = "accountId" - } -} - -public struct WebLoginStartParams: Codable, Sendable { - public let force: Bool? - public let timeoutms: Int? - public let verbose: Bool? - public let accountid: String? - - public init( - force: Bool?, - timeoutms: Int?, - verbose: Bool?, - accountid: String?) - { - self.force = force - self.timeoutms = timeoutms - self.verbose = verbose - self.accountid = accountid - } - - private enum CodingKeys: String, CodingKey { - case force - case timeoutms = "timeoutMs" - case verbose - case accountid = "accountId" - } -} - -public struct WebLoginWaitParams: Codable, Sendable { - public let timeoutms: Int? - public let accountid: String? - public let currentqrdataurl: String? - - public init( - timeoutms: Int?, - accountid: String?, - currentqrdataurl: String?) - { - self.timeoutms = timeoutms - self.accountid = accountid - self.currentqrdataurl = currentqrdataurl - } - - private enum CodingKeys: String, CodingKey { - case timeoutms = "timeoutMs" - case accountid = "accountId" - case currentqrdataurl = "currentQrDataUrl" - } -} - -public struct AgentSummary: Codable, Sendable { - public let id: String - public let name: String? - public let identity: [String: AnyCodable]? - public let workspace: String? - public let model: [String: AnyCodable]? - public let agentruntime: [String: AnyCodable]? - - public init( - id: String, - name: String?, - identity: [String: AnyCodable]?, - workspace: String?, - model: [String: AnyCodable]?, - agentruntime: [String: AnyCodable]?) - { - self.id = id - self.name = name - self.identity = identity - self.workspace = workspace - self.model = model - self.agentruntime = agentruntime - } - - private enum CodingKeys: String, CodingKey { - case id - case name - case identity - case workspace - case model - case agentruntime = "agentRuntime" - } -} - -public struct AgentsCreateParams: Codable, Sendable { - public let name: String - public let workspace: String - public let model: String? - public let emoji: String? - public let avatar: String? - - public init( - name: String, - workspace: String, - model: String?, - emoji: String?, - avatar: String?) - { - self.name = name - self.workspace = workspace - self.model = model - self.emoji = emoji - self.avatar = avatar - } - - private enum CodingKeys: String, CodingKey { - case name - case workspace - case model - case emoji - case avatar - } -} - -public struct AgentsCreateResult: Codable, Sendable { - public let ok: Bool - public let agentid: String - public let name: String - public let workspace: String - public let model: String? - - public init( - ok: Bool, - agentid: String, - name: String, - workspace: String, - model: String?) - { - self.ok = ok - self.agentid = agentid - self.name = name - self.workspace = workspace - self.model = model - } - - private enum CodingKeys: String, CodingKey { - case ok - case agentid = "agentId" - case name - case workspace - case model - } -} - -public struct AgentsUpdateParams: Codable, Sendable { - public let agentid: String - public let name: String? - public let workspace: String? - public let model: String? - public let emoji: String? - public let avatar: String? - - public init( - agentid: String, - name: String?, - workspace: String?, - model: String?, - emoji: String?, - avatar: String?) - { - self.agentid = agentid - self.name = name - self.workspace = workspace - self.model = model - self.emoji = emoji - self.avatar = avatar - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case name - case workspace - case model - case emoji - case avatar - } -} - -public struct AgentsUpdateResult: Codable, Sendable { - public let ok: Bool - public let agentid: String - - public init( - ok: Bool, - agentid: String) - { - self.ok = ok - self.agentid = agentid - } - - private enum CodingKeys: String, CodingKey { - case ok - case agentid = "agentId" - } -} - -public struct AgentsDeleteParams: Codable, Sendable { - public let agentid: String - public let deletefiles: Bool? - - public init( - agentid: String, - deletefiles: Bool?) - { - self.agentid = agentid - self.deletefiles = deletefiles - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case deletefiles = "deleteFiles" - } -} - -public struct AgentsDeleteResult: Codable, Sendable { - public let ok: Bool - public let agentid: String - public let removedbindings: Int - - public init( - ok: Bool, - agentid: String, - removedbindings: Int) - { - self.ok = ok - self.agentid = agentid - self.removedbindings = removedbindings - } - - private enum CodingKeys: String, CodingKey { - case ok - case agentid = "agentId" - case removedbindings = "removedBindings" - } -} - -public struct AgentsFileEntry: Codable, Sendable { - public let name: String - public let path: String - public let missing: Bool - public let size: Int? - public let updatedatms: Int? - public let content: String? - - public init( - name: String, - path: String, - missing: Bool, - size: Int?, - updatedatms: Int?, - content: String?) - { - self.name = name - self.path = path - self.missing = missing - self.size = size - self.updatedatms = updatedatms - self.content = content - } - - private enum CodingKeys: String, CodingKey { - case name - case path - case missing - case size - case updatedatms = "updatedAtMs" - case content - } -} - -public struct AgentsFilesListParams: Codable, Sendable { - public let agentid: String - - public init( - agentid: String) - { - self.agentid = agentid - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - } -} - -public struct AgentsFilesListResult: Codable, Sendable { - public let agentid: String - public let workspace: String - public let files: [AgentsFileEntry] - - public init( - agentid: String, - workspace: String, - files: [AgentsFileEntry]) - { - self.agentid = agentid - self.workspace = workspace - self.files = files - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case workspace - case files - } -} - -public struct AgentsFilesGetParams: Codable, Sendable { - public let agentid: String - public let name: String - - public init( - agentid: String, - name: String) - { - self.agentid = agentid - self.name = name - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case name - } -} - -public struct AgentsFilesGetResult: Codable, Sendable { - public let agentid: String - public let workspace: String - public let file: AgentsFileEntry - - public init( - agentid: String, - workspace: String, - file: AgentsFileEntry) - { - self.agentid = agentid - self.workspace = workspace - self.file = file - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case workspace - case file - } -} - -public struct AgentsFilesSetParams: Codable, Sendable { - public let agentid: String - public let name: String - public let content: String - - public init( - agentid: String, - name: String, - content: String) - { - self.agentid = agentid - self.name = name - self.content = content - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case name - case content - } -} - -public struct AgentsFilesSetResult: Codable, Sendable { - public let ok: Bool - public let agentid: String - public let workspace: String - public let file: AgentsFileEntry - - public init( - ok: Bool, - agentid: String, - workspace: String, - file: AgentsFileEntry) - { - self.ok = ok - self.agentid = agentid - self.workspace = workspace - self.file = file - } - - private enum CodingKeys: String, CodingKey { - case ok - case agentid = "agentId" - case workspace - case file - } -} - -public struct ArtifactSummary: Codable, Sendable { - public let id: String - public let type: String - public let title: String - public let mimetype: String? - public let sizebytes: Int? - public let sessionkey: String? - public let runid: String? - public let taskid: String? - public let messageseq: Int? - public let source: String? - public let download: [String: AnyCodable] - - public init( - id: String, - type: String, - title: String, - mimetype: String?, - sizebytes: Int?, - sessionkey: String?, - runid: String?, - taskid: String?, - messageseq: Int?, - source: String?, - download: [String: AnyCodable]) - { - self.id = id - self.type = type - self.title = title - self.mimetype = mimetype - self.sizebytes = sizebytes - self.sessionkey = sessionkey - self.runid = runid - self.taskid = taskid - self.messageseq = messageseq - self.source = source - self.download = download - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case title - case mimetype = "mimeType" - case sizebytes = "sizeBytes" - case sessionkey = "sessionKey" - case runid = "runId" - case taskid = "taskId" - case messageseq = "messageSeq" - case source - case download - } -} - -public struct ArtifactsListParams: Codable, Sendable { - public let sessionkey: String? - public let runid: String? - public let taskid: String? - - public init( - sessionkey: String?, - runid: String?, - taskid: String?) - { - self.sessionkey = sessionkey - self.runid = runid - self.taskid = taskid - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case runid = "runId" - case taskid = "taskId" - } -} - -public struct ArtifactsListResult: Codable, Sendable { - public let artifacts: [ArtifactSummary] - - public init( - artifacts: [ArtifactSummary]) - { - self.artifacts = artifacts - } - - private enum CodingKeys: String, CodingKey { - case artifacts - } -} - -public struct ArtifactsGetParams: Codable, Sendable { - public let sessionkey: String? - public let runid: String? - public let taskid: String? - public let artifactid: String - - public init( - sessionkey: String?, - runid: String?, - taskid: String?, - artifactid: String) - { - self.sessionkey = sessionkey - self.runid = runid - self.taskid = taskid - self.artifactid = artifactid - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case runid = "runId" - case taskid = "taskId" - case artifactid = "artifactId" - } -} - -public struct ArtifactsGetResult: Codable, Sendable { - public let artifact: ArtifactSummary - - public init( - artifact: ArtifactSummary) - { - self.artifact = artifact - } - - private enum CodingKeys: String, CodingKey { - case artifact - } -} - -public struct ArtifactsDownloadParams: Codable, Sendable { - public let sessionkey: String? - public let runid: String? - public let taskid: String? - public let artifactid: String - - public init( - sessionkey: String?, - runid: String?, - taskid: String?, - artifactid: String) - { - self.sessionkey = sessionkey - self.runid = runid - self.taskid = taskid - self.artifactid = artifactid - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case runid = "runId" - case taskid = "taskId" - case artifactid = "artifactId" - } -} - -public struct ArtifactsDownloadResult: Codable, Sendable { - public let artifact: ArtifactSummary - public let encoding: String? - public let data: String? - public let url: String? - - public init( - artifact: ArtifactSummary, - encoding: String?, - data: String?, - url: String?) - { - self.artifact = artifact - self.encoding = encoding - self.data = data - self.url = url - } - - private enum CodingKeys: String, CodingKey { - case artifact - case encoding - case data - case url - } -} - -public struct AgentsListParams: Codable, Sendable {} - -public struct AgentsListResult: Codable, Sendable { - public let defaultid: String - public let mainkey: String - public let scope: AnyCodable - public let agents: [AgentSummary] - - public init( - defaultid: String, - mainkey: String, - scope: AnyCodable, - agents: [AgentSummary]) - { - self.defaultid = defaultid - self.mainkey = mainkey - self.scope = scope - self.agents = agents - } - - private enum CodingKeys: String, CodingKey { - case defaultid = "defaultId" - case mainkey = "mainKey" - case scope - case agents - } -} - -public struct ModelChoice: Codable, Sendable { - public let id: String - public let name: String - public let provider: String - public let alias: String? - public let contextwindow: Int? - public let reasoning: Bool? - - public init( - id: String, - name: String, - provider: String, - alias: String?, - contextwindow: Int?, - reasoning: Bool?) - { - self.id = id - self.name = name - self.provider = provider - self.alias = alias - self.contextwindow = contextwindow - self.reasoning = reasoning - } - - private enum CodingKeys: String, CodingKey { - case id - case name - case provider - case alias - case contextwindow = "contextWindow" - case reasoning - } -} - -public struct ModelsListParams: Codable, Sendable { - public let view: AnyCodable? - - public init( - view: AnyCodable?) - { - self.view = view - } - - private enum CodingKeys: String, CodingKey { - case view - } -} - -public struct ModelsListResult: Codable, Sendable { - public let models: [ModelChoice] - - public init( - models: [ModelChoice]) - { - self.models = models - } - - private enum CodingKeys: String, CodingKey { - case models - } -} - -public struct CommandEntry: Codable, Sendable { - public let name: String - public let nativename: String? - public let textaliases: [String]? - public let description: String - public let category: AnyCodable? - public let source: AnyCodable - public let scope: AnyCodable - public let acceptsargs: Bool - public let args: [[String: AnyCodable]]? - - public init( - name: String, - nativename: String?, - textaliases: [String]?, - description: String, - category: AnyCodable?, - source: AnyCodable, - scope: AnyCodable, - acceptsargs: Bool, - args: [[String: AnyCodable]]?) - { - self.name = name - self.nativename = nativename - self.textaliases = textaliases - self.description = description - self.category = category - self.source = source - self.scope = scope - self.acceptsargs = acceptsargs - self.args = args - } - - private enum CodingKeys: String, CodingKey { - case name - case nativename = "nativeName" - case textaliases = "textAliases" - case description - case category - case source - case scope - case acceptsargs = "acceptsArgs" - case args - } -} - -public struct CommandsListParams: Codable, Sendable { - public let agentid: String? - public let provider: String? - public let scope: AnyCodable? - public let includeargs: Bool? - - public init( - agentid: String?, - provider: String?, - scope: AnyCodable?, - includeargs: Bool?) - { - self.agentid = agentid - self.provider = provider - self.scope = scope - self.includeargs = includeargs - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case provider - case scope - case includeargs = "includeArgs" - } -} - -public struct CommandsListResult: Codable, Sendable { - public let commands: [CommandEntry] - - public init( - commands: [CommandEntry]) - { - self.commands = commands - } - - private enum CodingKeys: String, CodingKey { - case commands - } -} - -public struct SkillsStatusParams: Codable, Sendable { - public let agentid: String? - - public init( - agentid: String?) - { - self.agentid = agentid - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - } -} - -public struct ToolsCatalogParams: Codable, Sendable { - public let agentid: String? - public let includeplugins: Bool? - - public init( - agentid: String?, - includeplugins: Bool?) - { - self.agentid = agentid - self.includeplugins = includeplugins - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case includeplugins = "includePlugins" - } -} - -public struct ToolCatalogProfile: Codable, Sendable { - public let id: AnyCodable - public let label: String - - public init( - id: AnyCodable, - label: String) - { - self.id = id - self.label = label - } - - private enum CodingKeys: String, CodingKey { - case id - case label - } -} - -public struct ToolCatalogEntry: Codable, Sendable { - public let id: String - public let label: String - public let description: String - public let source: AnyCodable - public let pluginid: String? - public let optional: Bool? - public let risk: AnyCodable? - public let tags: [String]? - public let defaultprofiles: [AnyCodable] - - public init( - id: String, - label: String, - description: String, - source: AnyCodable, - pluginid: String?, - optional: Bool?, - risk: AnyCodable?, - tags: [String]?, - defaultprofiles: [AnyCodable]) - { - self.id = id - self.label = label - self.description = description - self.source = source - self.pluginid = pluginid - self.optional = optional - self.risk = risk - self.tags = tags - self.defaultprofiles = defaultprofiles - } - - private enum CodingKeys: String, CodingKey { - case id - case label - case description - case source - case pluginid = "pluginId" - case optional - case risk - case tags - case defaultprofiles = "defaultProfiles" - } -} - -public struct ToolCatalogGroup: Codable, Sendable { - public let id: String - public let label: String - public let source: AnyCodable - public let pluginid: String? - public let tools: [ToolCatalogEntry] - - public init( - id: String, - label: String, - source: AnyCodable, - pluginid: String?, - tools: [ToolCatalogEntry]) - { - self.id = id - self.label = label - self.source = source - self.pluginid = pluginid - self.tools = tools - } - - private enum CodingKeys: String, CodingKey { - case id - case label - case source - case pluginid = "pluginId" - case tools - } -} - -public struct ToolsCatalogResult: Codable, Sendable { - public let agentid: String - public let profiles: [ToolCatalogProfile] - public let groups: [ToolCatalogGroup] - - public init( - agentid: String, - profiles: [ToolCatalogProfile], - groups: [ToolCatalogGroup]) - { - self.agentid = agentid - self.profiles = profiles - self.groups = groups - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case profiles - case groups - } -} - -public struct ToolsEffectiveParams: Codable, Sendable { - public let agentid: String? - public let sessionkey: String - - public init( - agentid: String?, - sessionkey: String) - { - self.agentid = agentid - self.sessionkey = sessionkey - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case sessionkey = "sessionKey" - } -} - -public struct ToolsEffectiveEntry: Codable, Sendable { - public let id: String - public let label: String - public let description: String - public let rawdescription: String - public let source: AnyCodable - public let pluginid: String? - public let channelid: String? - public let risk: AnyCodable? - public let tags: [String]? - - public init( - id: String, - label: String, - description: String, - rawdescription: String, - source: AnyCodable, - pluginid: String?, - channelid: String?, - risk: AnyCodable?, - tags: [String]?) - { - self.id = id - self.label = label - self.description = description - self.rawdescription = rawdescription - self.source = source - self.pluginid = pluginid - self.channelid = channelid - self.risk = risk - self.tags = tags - } - - private enum CodingKeys: String, CodingKey { - case id - case label - case description - case rawdescription = "rawDescription" - case source - case pluginid = "pluginId" - case channelid = "channelId" - case risk - case tags - } -} - -public struct ToolsEffectiveGroup: Codable, Sendable { - public let id: AnyCodable - public let label: String - public let source: AnyCodable - public let tools: [ToolsEffectiveEntry] - - public init( - id: AnyCodable, - label: String, - source: AnyCodable, - tools: [ToolsEffectiveEntry]) - { - self.id = id - self.label = label - self.source = source - self.tools = tools - } - - private enum CodingKeys: String, CodingKey { - case id - case label - case source - case tools - } -} - -public struct ToolsEffectiveResult: Codable, Sendable { - public let agentid: String - public let profile: String - public let groups: [ToolsEffectiveGroup] - - public init( - agentid: String, - profile: String, - groups: [ToolsEffectiveGroup]) - { - self.agentid = agentid - self.profile = profile - self.groups = groups - } - - private enum CodingKeys: String, CodingKey { - case agentid = "agentId" - case profile - case groups - } -} - -public struct ToolsInvokeParams: Codable, Sendable { - public let name: String - public let args: [String: AnyCodable]? - public let sessionkey: String? - public let agentid: String? - public let confirm: Bool? - public let idempotencykey: String? - - public init( - name: String, - args: [String: AnyCodable]?, - sessionkey: String?, - agentid: String?, - confirm: Bool?, - idempotencykey: String?) - { - self.name = name - self.args = args - self.sessionkey = sessionkey - self.agentid = agentid - self.confirm = confirm - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case name - case args - case sessionkey = "sessionKey" - case agentid = "agentId" - case confirm - case idempotencykey = "idempotencyKey" - } -} - -public struct ToolsInvokeError: Codable, Sendable { - public let code: String - public let message: String - public let details: AnyCodable? - - public init( - code: String, - message: String, - details: AnyCodable?) - { - self.code = code - self.message = message - self.details = details - } - - private enum CodingKeys: String, CodingKey { - case code - case message - case details - } -} - -public struct ToolsInvokeResult: Codable, Sendable { - public let ok: Bool - public let toolname: String - public let output: AnyCodable? - public let requiresapproval: Bool? - public let approvalid: String? - public let source: AnyCodable? - public let error: [String: AnyCodable]? - - public init( - ok: Bool, - toolname: String, - output: AnyCodable?, - requiresapproval: Bool?, - approvalid: String?, - source: AnyCodable?, - error: [String: AnyCodable]?) - { - self.ok = ok - self.toolname = toolname - self.output = output - self.requiresapproval = requiresapproval - self.approvalid = approvalid - self.source = source - self.error = error - } - - private enum CodingKeys: String, CodingKey { - case ok - case toolname = "toolName" - case output - case requiresapproval = "requiresApproval" - case approvalid = "approvalId" - case source - case error - } -} - -public struct SkillsBinsParams: Codable, Sendable {} - -public struct SkillsBinsResult: Codable, Sendable { - public let bins: [String] - - public init( - bins: [String]) - { - self.bins = bins - } - - private enum CodingKeys: String, CodingKey { - case bins - } -} - -public struct SkillsSearchParams: Codable, Sendable { - public let query: String? - public let limit: Int? - - public init( - query: String?, - limit: Int?) - { - self.query = query - self.limit = limit - } - - private enum CodingKeys: String, CodingKey { - case query - case limit - } -} - -public struct SkillsSearchResult: Codable, Sendable { - public let results: [[String: AnyCodable]] - - public init( - results: [[String: AnyCodable]]) - { - self.results = results - } - - private enum CodingKeys: String, CodingKey { - case results - } -} - -public struct SkillsDetailParams: Codable, Sendable { - public let slug: String - - public init( - slug: String) - { - self.slug = slug - } - - private enum CodingKeys: String, CodingKey { - case slug - } -} - -public struct SkillsDetailResult: Codable, Sendable { - public let skill: AnyCodable - public let latestversion: AnyCodable? - public let metadata: AnyCodable? - public let owner: AnyCodable? - - public init( - skill: AnyCodable, - latestversion: AnyCodable?, - metadata: AnyCodable?, - owner: AnyCodable?) - { - self.skill = skill - self.latestversion = latestversion - self.metadata = metadata - self.owner = owner - } - - private enum CodingKeys: String, CodingKey { - case skill - case latestversion = "latestVersion" - case metadata - case owner - } -} - -public struct CronJob: Codable, Sendable { - public let id: String - public let agentid: String? - public let sessionkey: String? - public let name: String - public let description: String? - public let enabled: Bool - public let deleteafterrun: Bool? - public let createdatms: Int - public let updatedatms: Int - public let schedule: AnyCodable - public let sessiontarget: AnyCodable - public let wakemode: AnyCodable - public let payload: AnyCodable - public let delivery: AnyCodable? - public let failurealert: AnyCodable? - public let state: [String: AnyCodable] - - public init( - id: String, - agentid: String?, - sessionkey: String?, - name: String, - description: String?, - enabled: Bool, - deleteafterrun: Bool?, - createdatms: Int, - updatedatms: Int, - schedule: AnyCodable, - sessiontarget: AnyCodable, - wakemode: AnyCodable, - payload: AnyCodable, - delivery: AnyCodable?, - failurealert: AnyCodable?, - state: [String: AnyCodable]) - { - self.id = id - self.agentid = agentid - self.sessionkey = sessionkey - self.name = name - self.description = description - self.enabled = enabled - self.deleteafterrun = deleteafterrun - self.createdatms = createdatms - self.updatedatms = updatedatms - self.schedule = schedule - self.sessiontarget = sessiontarget - self.wakemode = wakemode - self.payload = payload - self.delivery = delivery - self.failurealert = failurealert - self.state = state - } - - private enum CodingKeys: String, CodingKey { - case id - case agentid = "agentId" - case sessionkey = "sessionKey" - case name - case description - case enabled - case deleteafterrun = "deleteAfterRun" - case createdatms = "createdAtMs" - case updatedatms = "updatedAtMs" - case schedule - case sessiontarget = "sessionTarget" - case wakemode = "wakeMode" - case payload - case delivery - case failurealert = "failureAlert" - case state - } -} - -public struct CronListParams: Codable, Sendable { - public let includedisabled: Bool? - public let limit: Int? - public let offset: Int? - public let query: String? - public let enabled: AnyCodable? - public let sortby: AnyCodable? - public let sortdir: AnyCodable? - public let agentid: String? - - public init( - includedisabled: Bool?, - limit: Int?, - offset: Int?, - query: String?, - enabled: AnyCodable?, - sortby: AnyCodable?, - sortdir: AnyCodable?, - agentid: String?) - { - self.includedisabled = includedisabled - self.limit = limit - self.offset = offset - self.query = query - self.enabled = enabled - self.sortby = sortby - self.sortdir = sortdir - self.agentid = agentid - } - - private enum CodingKeys: String, CodingKey { - case includedisabled = "includeDisabled" - case limit - case offset - case query - case enabled - case sortby = "sortBy" - case sortdir = "sortDir" - case agentid = "agentId" - } -} - -public struct CronStatusParams: Codable, Sendable {} - -public struct CronAddParams: Codable, Sendable { - public let name: String - public let agentid: AnyCodable? - public let sessionkey: AnyCodable? - public let description: String? - public let enabled: Bool? - public let deleteafterrun: Bool? - public let schedule: AnyCodable - public let sessiontarget: AnyCodable - public let wakemode: AnyCodable - public let payload: AnyCodable - public let delivery: AnyCodable? - public let failurealert: AnyCodable? - - public init( - name: String, - agentid: AnyCodable?, - sessionkey: AnyCodable?, - description: String?, - enabled: Bool?, - deleteafterrun: Bool?, - schedule: AnyCodable, - sessiontarget: AnyCodable, - wakemode: AnyCodable, - payload: AnyCodable, - delivery: AnyCodable?, - failurealert: AnyCodable?) - { - self.name = name - self.agentid = agentid - self.sessionkey = sessionkey - self.description = description - self.enabled = enabled - self.deleteafterrun = deleteafterrun - self.schedule = schedule - self.sessiontarget = sessiontarget - self.wakemode = wakemode - self.payload = payload - self.delivery = delivery - self.failurealert = failurealert - } - - private enum CodingKeys: String, CodingKey { - case name - case agentid = "agentId" - case sessionkey = "sessionKey" - case description - case enabled - case deleteafterrun = "deleteAfterRun" - case schedule - case sessiontarget = "sessionTarget" - case wakemode = "wakeMode" - case payload - case delivery - case failurealert = "failureAlert" - } -} - -public struct CronRunsParams: Codable, Sendable { - public let scope: AnyCodable? - public let id: String? - public let jobid: String? - public let limit: Int? - public let offset: Int? - public let statuses: [AnyCodable]? - public let status: AnyCodable? - public let deliverystatuses: [AnyCodable]? - public let deliverystatus: AnyCodable? - public let query: String? - public let sortdir: AnyCodable? - - public init( - scope: AnyCodable?, - id: String?, - jobid: String?, - limit: Int?, - offset: Int?, - statuses: [AnyCodable]?, - status: AnyCodable?, - deliverystatuses: [AnyCodable]?, - deliverystatus: AnyCodable?, - query: String?, - sortdir: AnyCodable?) - { - self.scope = scope - self.id = id - self.jobid = jobid - self.limit = limit - self.offset = offset - self.statuses = statuses - self.status = status - self.deliverystatuses = deliverystatuses - self.deliverystatus = deliverystatus - self.query = query - self.sortdir = sortdir - } - - private enum CodingKeys: String, CodingKey { - case scope - case id - case jobid = "jobId" - case limit - case offset - case statuses - case status - case deliverystatuses = "deliveryStatuses" - case deliverystatus = "deliveryStatus" - case query - case sortdir = "sortDir" - } -} - -public struct CronRunLogEntry: Codable, Sendable { - public let ts: Int - public let jobid: String - public let action: String - public let status: AnyCodable? - public let error: String? - public let summary: String? - public let diagnostics: [String: AnyCodable]? - public let delivered: Bool? - public let deliverystatus: AnyCodable? - public let deliveryerror: String? - public let sessionid: String? - public let sessionkey: String? - public let runid: String? - public let runatms: Int? - public let durationms: Int? - public let nextrunatms: Int? - public let model: String? - public let provider: String? - public let usage: [String: AnyCodable]? - public let jobname: String? - - public init( - ts: Int, - jobid: String, - action: String, - status: AnyCodable?, - error: String?, - summary: String?, - diagnostics: [String: AnyCodable]?, - delivered: Bool?, - deliverystatus: AnyCodable?, - deliveryerror: String?, - sessionid: String?, - sessionkey: String?, - runid: String?, - runatms: Int?, - durationms: Int?, - nextrunatms: Int?, - model: String?, - provider: String?, - usage: [String: AnyCodable]?, - jobname: String?) - { - self.ts = ts - self.jobid = jobid - self.action = action - self.status = status - self.error = error - self.summary = summary - self.diagnostics = diagnostics - self.delivered = delivered - self.deliverystatus = deliverystatus - self.deliveryerror = deliveryerror - self.sessionid = sessionid - self.sessionkey = sessionkey - self.runid = runid - self.runatms = runatms - self.durationms = durationms - self.nextrunatms = nextrunatms - self.model = model - self.provider = provider - self.usage = usage - self.jobname = jobname - } - - private enum CodingKeys: String, CodingKey { - case ts - case jobid = "jobId" - case action - case status - case error - case summary - case diagnostics - case delivered - case deliverystatus = "deliveryStatus" - case deliveryerror = "deliveryError" - case sessionid = "sessionId" - case sessionkey = "sessionKey" - case runid = "runId" - case runatms = "runAtMs" - case durationms = "durationMs" - case nextrunatms = "nextRunAtMs" - case model - case provider - case usage - case jobname = "jobName" - } -} - -public struct LogsTailParams: Codable, Sendable { - public let cursor: Int? - public let limit: Int? - public let maxbytes: Int? - - public init( - cursor: Int?, - limit: Int?, - maxbytes: Int?) - { - self.cursor = cursor - self.limit = limit - self.maxbytes = maxbytes - } - - private enum CodingKeys: String, CodingKey { - case cursor - case limit - case maxbytes = "maxBytes" - } -} - -public struct LogsTailResult: Codable, Sendable { - public let file: String - public let cursor: Int - public let size: Int - public let lines: [String] - public let truncated: Bool? - public let reset: Bool? - - public init( - file: String, - cursor: Int, - size: Int, - lines: [String], - truncated: Bool?, - reset: Bool?) - { - self.file = file - self.cursor = cursor - self.size = size - self.lines = lines - self.truncated = truncated - self.reset = reset - } - - private enum CodingKeys: String, CodingKey { - case file - case cursor - case size - case lines - case truncated - case reset - } -} - -public struct ExecApprovalsGetParams: Codable, Sendable {} - -public struct ExecApprovalsSetParams: Codable, Sendable { - public let file: [String: AnyCodable] - public let basehash: String? - - public init( - file: [String: AnyCodable], - basehash: String?) - { - self.file = file - self.basehash = basehash - } - - private enum CodingKeys: String, CodingKey { - case file - case basehash = "baseHash" - } -} - -public struct ExecApprovalsNodeGetParams: Codable, Sendable { - public let nodeid: String - - public init( - nodeid: String) - { - self.nodeid = nodeid - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - } -} - -public struct ExecApprovalsNodeSetParams: Codable, Sendable { - public let nodeid: String - public let file: [String: AnyCodable] - public let basehash: String? - - public init( - nodeid: String, - file: [String: AnyCodable], - basehash: String?) - { - self.nodeid = nodeid - self.file = file - self.basehash = basehash - } - - private enum CodingKeys: String, CodingKey { - case nodeid = "nodeId" - case file - case basehash = "baseHash" - } -} - -public struct ExecApprovalsSnapshot: Codable, Sendable { - public let path: String - public let exists: Bool - public let hash: String - public let file: [String: AnyCodable] - - public init( - path: String, - exists: Bool, - hash: String, - file: [String: AnyCodable]) - { - self.path = path - self.exists = exists - self.hash = hash - self.file = file - } - - private enum CodingKeys: String, CodingKey { - case path - case exists - case hash - case file - } -} - -public struct ExecApprovalGetParams: Codable, Sendable { - public let id: String - - public init( - id: String) - { - self.id = id - } - - private enum CodingKeys: String, CodingKey { - case id - } -} - -public struct ExecApprovalRequestParams: Codable, Sendable { - public let id: String? - public let command: String? - public let commandargv: [String]? - public let systemrunplan: [String: AnyCodable]? - public let env: [String: AnyCodable]? - public let cwd: AnyCodable? - public let nodeid: AnyCodable? - public let host: AnyCodable? - public let security: AnyCodable? - public let ask: AnyCodable? - public let warningtext: AnyCodable? - public let agentid: AnyCodable? - public let resolvedpath: AnyCodable? - public let sessionkey: AnyCodable? - public let turnsourcechannel: AnyCodable? - public let turnsourceto: AnyCodable? - public let turnsourceaccountid: AnyCodable? - public let turnsourcethreadid: AnyCodable? - public let timeoutms: Int? - public let twophase: Bool? - - public init( - id: String?, - command: String?, - commandargv: [String]?, - systemrunplan: [String: AnyCodable]?, - env: [String: AnyCodable]?, - cwd: AnyCodable?, - nodeid: AnyCodable?, - host: AnyCodable?, - security: AnyCodable?, - ask: AnyCodable?, - warningtext: AnyCodable?, - agentid: AnyCodable?, - resolvedpath: AnyCodable?, - sessionkey: AnyCodable?, - turnsourcechannel: AnyCodable?, - turnsourceto: AnyCodable?, - turnsourceaccountid: AnyCodable?, - turnsourcethreadid: AnyCodable?, - timeoutms: Int?, - twophase: Bool?) - { - self.id = id - self.command = command - self.commandargv = commandargv - self.systemrunplan = systemrunplan - self.env = env - self.cwd = cwd - self.nodeid = nodeid - self.host = host - self.security = security - self.ask = ask - self.warningtext = warningtext - self.agentid = agentid - self.resolvedpath = resolvedpath - self.sessionkey = sessionkey - self.turnsourcechannel = turnsourcechannel - self.turnsourceto = turnsourceto - self.turnsourceaccountid = turnsourceaccountid - self.turnsourcethreadid = turnsourcethreadid - self.timeoutms = timeoutms - self.twophase = twophase - } - - private enum CodingKeys: String, CodingKey { - case id - case command - case commandargv = "commandArgv" - case systemrunplan = "systemRunPlan" - case env - case cwd - case nodeid = "nodeId" - case host - case security - case ask - case warningtext = "warningText" - case agentid = "agentId" - case resolvedpath = "resolvedPath" - case sessionkey = "sessionKey" - case turnsourcechannel = "turnSourceChannel" - case turnsourceto = "turnSourceTo" - case turnsourceaccountid = "turnSourceAccountId" - case turnsourcethreadid = "turnSourceThreadId" - case timeoutms = "timeoutMs" - case twophase = "twoPhase" - } -} - -public struct ExecApprovalResolveParams: Codable, Sendable { - public let id: String - public let decision: String - - public init( - id: String, - decision: String) - { - self.id = id - self.decision = decision - } - - private enum CodingKeys: String, CodingKey { - case id - case decision - } -} - -public struct PluginApprovalRequestParams: Codable, Sendable { - public let pluginid: String? - public let title: String - public let description: String - public let severity: String? - public let toolname: String? - public let toolcallid: String? - public let alloweddecisions: [String]? - public let agentid: String? - public let sessionkey: String? - public let turnsourcechannel: String? - public let turnsourceto: String? - public let turnsourceaccountid: String? - public let turnsourcethreadid: AnyCodable? - public let timeoutms: Int? - public let twophase: Bool? - - public init( - pluginid: String?, - title: String, - description: String, - severity: String?, - toolname: String?, - toolcallid: String?, - alloweddecisions: [String]?, - agentid: String?, - sessionkey: String?, - turnsourcechannel: String?, - turnsourceto: String?, - turnsourceaccountid: String?, - turnsourcethreadid: AnyCodable?, - timeoutms: Int?, - twophase: Bool?) - { - self.pluginid = pluginid - self.title = title - self.description = description - self.severity = severity - self.toolname = toolname - self.toolcallid = toolcallid - self.alloweddecisions = alloweddecisions - self.agentid = agentid - self.sessionkey = sessionkey - self.turnsourcechannel = turnsourcechannel - self.turnsourceto = turnsourceto - self.turnsourceaccountid = turnsourceaccountid - self.turnsourcethreadid = turnsourcethreadid - self.timeoutms = timeoutms - self.twophase = twophase - } - - private enum CodingKeys: String, CodingKey { - case pluginid = "pluginId" - case title - case description - case severity - case toolname = "toolName" - case toolcallid = "toolCallId" - case alloweddecisions = "allowedDecisions" - case agentid = "agentId" - case sessionkey = "sessionKey" - case turnsourcechannel = "turnSourceChannel" - case turnsourceto = "turnSourceTo" - case turnsourceaccountid = "turnSourceAccountId" - case turnsourcethreadid = "turnSourceThreadId" - case timeoutms = "timeoutMs" - case twophase = "twoPhase" - } -} - -public struct PluginApprovalResolveParams: Codable, Sendable { - public let id: String - public let decision: String - - public init( - id: String, - decision: String) - { - self.id = id - self.decision = decision - } - - private enum CodingKeys: String, CodingKey { - case id - case decision - } -} - -public struct PluginControlUiDescriptor: Codable, Sendable { - public let id: String - public let pluginid: String - public let pluginname: String? - public let surface: AnyCodable - public let label: String - public let description: String? - public let placement: String? - public let schema: AnyCodable? - public let requiredscopes: [String]? - - public init( - id: String, - pluginid: String, - pluginname: String?, - surface: AnyCodable, - label: String, - description: String?, - placement: String?, - schema: AnyCodable?, - requiredscopes: [String]?) - { - self.id = id - self.pluginid = pluginid - self.pluginname = pluginname - self.surface = surface - self.label = label - self.description = description - self.placement = placement - self.schema = schema - self.requiredscopes = requiredscopes - } - - private enum CodingKeys: String, CodingKey { - case id - case pluginid = "pluginId" - case pluginname = "pluginName" - case surface - case label - case description - case placement - case schema - case requiredscopes = "requiredScopes" - } -} - -public struct PluginsUiDescriptorsParams: Codable, Sendable {} - -public struct PluginsUiDescriptorsResult: Codable, Sendable { - public let ok: Bool - public let descriptors: [PluginControlUiDescriptor] - - public init( - ok: Bool, - descriptors: [PluginControlUiDescriptor]) - { - self.ok = ok - self.descriptors = descriptors - } - - private enum CodingKeys: String, CodingKey { - case ok - case descriptors - } -} - -public struct DevicePairListParams: Codable, Sendable {} - -public struct DevicePairApproveParams: Codable, Sendable { - public let requestid: String - - public init( - requestid: String) - { - self.requestid = requestid - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - } -} - -public struct DevicePairRejectParams: Codable, Sendable { - public let requestid: String - - public init( - requestid: String) - { - self.requestid = requestid - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - } -} - -public struct DevicePairRemoveParams: Codable, Sendable { - public let deviceid: String - - public init( - deviceid: String) - { - self.deviceid = deviceid - } - - private enum CodingKeys: String, CodingKey { - case deviceid = "deviceId" - } -} - -public struct DeviceTokenRotateParams: Codable, Sendable { - public let deviceid: String - public let role: String - public let scopes: [String]? - - public init( - deviceid: String, - role: String, - scopes: [String]?) - { - self.deviceid = deviceid - self.role = role - self.scopes = scopes - } - - private enum CodingKeys: String, CodingKey { - case deviceid = "deviceId" - case role - case scopes - } -} - -public struct DeviceTokenRevokeParams: Codable, Sendable { - public let deviceid: String - public let role: String - - public init( - deviceid: String, - role: String) - { - self.deviceid = deviceid - self.role = role - } - - private enum CodingKeys: String, CodingKey { - case deviceid = "deviceId" - case role - } -} - -public struct DevicePairRequestedEvent: Codable, Sendable { - public let requestid: String - public let deviceid: String - public let publickey: String - public let displayname: String? - public let platform: String? - public let devicefamily: String? - public let clientid: String? - public let clientmode: String? - public let role: String? - public let roles: [String]? - public let scopes: [String]? - public let remoteip: String? - public let silent: Bool? - public let isrepair: Bool? - public let ts: Int - - public init( - requestid: String, - deviceid: String, - publickey: String, - displayname: String?, - platform: String?, - devicefamily: String?, - clientid: String?, - clientmode: String?, - role: String?, - roles: [String]?, - scopes: [String]?, - remoteip: String?, - silent: Bool?, - isrepair: Bool?, - ts: Int) - { - self.requestid = requestid - self.deviceid = deviceid - self.publickey = publickey - self.displayname = displayname - self.platform = platform - self.devicefamily = devicefamily - self.clientid = clientid - self.clientmode = clientmode - self.role = role - self.roles = roles - self.scopes = scopes - self.remoteip = remoteip - self.silent = silent - self.isrepair = isrepair - self.ts = ts - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - case deviceid = "deviceId" - case publickey = "publicKey" - case displayname = "displayName" - case platform - case devicefamily = "deviceFamily" - case clientid = "clientId" - case clientmode = "clientMode" - case role - case roles - case scopes - case remoteip = "remoteIp" - case silent - case isrepair = "isRepair" - case ts - } -} - -public struct DevicePairResolvedEvent: Codable, Sendable { - public let requestid: String - public let deviceid: String - public let decision: String - public let ts: Int - - public init( - requestid: String, - deviceid: String, - decision: String, - ts: Int) - { - self.requestid = requestid - self.deviceid = deviceid - self.decision = decision - self.ts = ts - } - - private enum CodingKeys: String, CodingKey { - case requestid = "requestId" - case deviceid = "deviceId" - case decision - case ts - } -} - -public struct ChatHistoryParams: Codable, Sendable { - public let sessionkey: String - public let limit: Int? - public let maxchars: Int? - - public init( - sessionkey: String, - limit: Int?, - maxchars: Int?) - { - self.sessionkey = sessionkey - self.limit = limit - self.maxchars = maxchars - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case limit - case maxchars = "maxChars" - } -} - -public struct ChatSendParams: Codable, Sendable { - public let sessionkey: String - public let sessionid: String? - public let message: String - public let thinking: String? - public let deliver: Bool? - public let originatingchannel: String? - public let originatingto: String? - public let originatingaccountid: String? - public let originatingthreadid: String? - public let attachments: [AnyCodable]? - public let timeoutms: Int? - public let systeminputprovenance: [String: AnyCodable]? - public let systemprovenancereceipt: String? - public let idempotencykey: String - - public init( - sessionkey: String, - sessionid: String?, - message: String, - thinking: String?, - deliver: Bool?, - originatingchannel: String?, - originatingto: String?, - originatingaccountid: String?, - originatingthreadid: String?, - attachments: [AnyCodable]?, - timeoutms: Int?, - systeminputprovenance: [String: AnyCodable]?, - systemprovenancereceipt: String?, - idempotencykey: String) - { - self.sessionkey = sessionkey - self.sessionid = sessionid - self.message = message - self.thinking = thinking - self.deliver = deliver - self.originatingchannel = originatingchannel - self.originatingto = originatingto - self.originatingaccountid = originatingaccountid - self.originatingthreadid = originatingthreadid - self.attachments = attachments - self.timeoutms = timeoutms - self.systeminputprovenance = systeminputprovenance - self.systemprovenancereceipt = systemprovenancereceipt - self.idempotencykey = idempotencykey - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case sessionid = "sessionId" - case message - case thinking - case deliver - case originatingchannel = "originatingChannel" - case originatingto = "originatingTo" - case originatingaccountid = "originatingAccountId" - case originatingthreadid = "originatingThreadId" - case attachments - case timeoutms = "timeoutMs" - case systeminputprovenance = "systemInputProvenance" - case systemprovenancereceipt = "systemProvenanceReceipt" - case idempotencykey = "idempotencyKey" - } -} - -public struct ChatAbortParams: Codable, Sendable { - public let sessionkey: String - public let runid: String? - - public init( - sessionkey: String, - runid: String?) - { - self.sessionkey = sessionkey - self.runid = runid - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case runid = "runId" - } -} - -public struct ChatInjectParams: Codable, Sendable { - public let sessionkey: String - public let message: String - public let label: String? - - public init( - sessionkey: String, - message: String, - label: String?) - { - self.sessionkey = sessionkey - self.message = message - self.label = label - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case message - case label - } -} - -public struct ChatEvent: Codable, Sendable { - public let runid: String - public let sessionkey: String - public let spawnedby: String? - public let seq: Int - public let state: AnyCodable - public let message: AnyCodable? - public let errormessage: String? - public let errorkind: AnyCodable? - public let usage: AnyCodable? - public let stopreason: String? - - public init( - runid: String, - sessionkey: String, - spawnedby: String?, - seq: Int, - state: AnyCodable, - message: AnyCodable?, - errormessage: String?, - errorkind: AnyCodable?, - usage: AnyCodable?, - stopreason: String?) - { - self.runid = runid - self.sessionkey = sessionkey - self.spawnedby = spawnedby - self.seq = seq - self.state = state - self.message = message - self.errormessage = errormessage - self.errorkind = errorkind - self.usage = usage - self.stopreason = stopreason - } - - private enum CodingKeys: String, CodingKey { - case runid = "runId" - case sessionkey = "sessionKey" - case spawnedby = "spawnedBy" - case seq - case state - case message - case errormessage = "errorMessage" - case errorkind = "errorKind" - case usage - case stopreason = "stopReason" - } -} - -public struct UpdateStatusParams: Codable, Sendable {} - -public struct UpdateRunParams: Codable, Sendable { - public let sessionkey: String? - public let deliverycontext: [String: AnyCodable]? - public let note: String? - public let continuationmessage: String? - public let restartdelayms: Int? - public let timeoutms: Int? - - public init( - sessionkey: String?, - deliverycontext: [String: AnyCodable]?, - note: String?, - continuationmessage: String?, - restartdelayms: Int?, - timeoutms: Int?) - { - self.sessionkey = sessionkey - self.deliverycontext = deliverycontext - self.note = note - self.continuationmessage = continuationmessage - self.restartdelayms = restartdelayms - self.timeoutms = timeoutms - } - - private enum CodingKeys: String, CodingKey { - case sessionkey = "sessionKey" - case deliverycontext = "deliveryContext" - case note - case continuationmessage = "continuationMessage" - case restartdelayms = "restartDelayMs" - case timeoutms = "timeoutMs" - } -} - -public struct TickEvent: Codable, Sendable { - public let ts: Int - - public init( - ts: Int) - { - self.ts = ts - } - - private enum CodingKeys: String, CodingKey { - case ts - } -} - -public struct ShutdownEvent: Codable, Sendable { - public let reason: String - public let restartexpectedms: Int? - - public init( - reason: String, - restartexpectedms: Int?) - { - self.reason = reason - self.restartexpectedms = restartexpectedms - } - - private enum CodingKeys: String, CodingKey { - case reason - case restartexpectedms = "restartExpectedMs" - } -} - -public enum GatewayFrame: Codable, Sendable { - case req(RequestFrame) - case res(ResponseFrame) - case event(EventFrame) - case unknown(type: String, raw: [String: AnyCodable]) - - private enum CodingKeys: String, CodingKey { - case type - } - - public init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - let type = try typeContainer.decode(String.self, forKey: .type) - switch type { - case "req": - self = try .req(RequestFrame(from: decoder)) - case "res": - self = try .res(ResponseFrame(from: decoder)) - case "event": - self = try .event(EventFrame(from: decoder)) - default: - let container = try decoder.singleValueContainer() - let raw = try container.decode([String: AnyCodable].self) - self = .unknown(type: type, raw: raw) - } - } - - public func encode(to encoder: Encoder) throws { - switch self { - case let .req(v): - try v.encode(to: encoder) - case let .res(v): - try v.encode(to: encoder) - case let .event(v): - try v.encode(to: encoder) - case let .unknown(_, raw): - var container = encoder.singleValueContainer() - try container.encode(raw) - } - } -} diff --git a/apps/macos/Tests/OpenClawIPCTests/MacGatewayChatTransportMappingTests.swift b/apps/macos/Tests/OpenClawIPCTests/MacGatewayChatTransportMappingTests.swift index 3f6254fcf30..bf8d4d40a13 100644 --- a/apps/macos/Tests/OpenClawIPCTests/MacGatewayChatTransportMappingTests.swift +++ b/apps/macos/Tests/OpenClawIPCTests/MacGatewayChatTransportMappingTests.swift @@ -22,7 +22,7 @@ struct MacGatewayChatTransportMappingTests { server: [:], features: [:], snapshot: snapshot, - canvashosturl: nil, + pluginsurfaceurls: nil, auth: [:], policy: [:]) diff --git a/apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift b/apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift index d6eae4d866f..f24e288b2a7 100644 --- a/apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift +++ b/apps/macos/Tests/OpenClawIPCTests/MacNodeRuntimeTests.swift @@ -5,6 +5,15 @@ import Testing @testable import OpenClaw struct MacNodeRuntimeTests { + actor CanvasRefreshProbe { + private(set) var calls = 0 + + func refresh() -> String? { + self.calls += 1 + return "http://127.0.0.1:18789/refreshed" + } + } + @Test func `handle invoke rejects unknown command`() async { let runtime = MacNodeRuntime() let response = await runtime.handleInvoke( @@ -12,6 +21,21 @@ struct MacNodeRuntimeTests { #expect(response.ok == false) } + @Test func `A2UI host capability refresh uses injected node session refresher`() async { + let probe = CanvasRefreshProbe() + let runtime = MacNodeRuntime( + canvasSurfaceUrl: { "http://127.0.0.1:18789/current" }, + refreshCanvasSurfaceUrl: { await probe.refresh() }) + + let current = await runtime.resolveA2UIHostUrlWithCapabilityRefresh() + #expect(current == "http://127.0.0.1:18789/current/__openclaw__/a2ui/?platform=macos") + #expect(await probe.calls == 0) + + let refreshed = await runtime.resolveA2UIHostUrlWithCapabilityRefresh(forceRefresh: true) + #expect(refreshed == "http://127.0.0.1:18789/refreshed/__openclaw__/a2ui/?platform=macos") + #expect(await probe.calls == 1) + } + @Test func `handle invoke rejects empty system run`() async throws { let runtime = MacNodeRuntime() let params = OpenClawSystemRunParams(command: []) diff --git a/apps/shared/OpenClawKit/Sources/OpenClawKit/BridgeFrames.swift b/apps/shared/OpenClawKit/Sources/OpenClawKit/BridgeFrames.swift index 648b257bbb4..debcec3ae87 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawKit/BridgeFrames.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawKit/BridgeFrames.swift @@ -105,18 +105,15 @@ public struct BridgeHello: Codable, Sendable { public struct BridgeHelloOk: Codable, Sendable { public let type: String public let serverName: String - public let canvasHostUrl: String? public let mainSessionKey: String? public init( type: String = "hello-ok", serverName: String, - canvasHostUrl: String? = nil, mainSessionKey: String? = nil) { self.type = type self.serverName = serverName - self.canvasHostUrl = canvasHostUrl self.mainSessionKey = mainSessionKey } } diff --git a/apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift b/apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift index 58d437ce1bf..4e497ae2039 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift @@ -11,19 +11,6 @@ private struct NodeInvokeRequestPayload: Codable { var idempotencyKey: String? } -private func replaceCanvasCapabilityInScopedHostUrl(scopedUrl: String, capability: String) -> String? { - let marker = "/__openclaw__/cap/" - guard let markerRange = scopedUrl.range(of: marker) else { return nil } - let capabilityStart = markerRange.upperBound - let suffix = scopedUrl[capabilityStart...] - let nextSlash = suffix.firstIndex(of: "/") - let nextQuery = suffix.firstIndex(of: "?") - let nextFragment = suffix.firstIndex(of: "#") - let capabilityEnd = [nextSlash, nextQuery, nextFragment].compactMap(\.self).min() ?? scopedUrl.endIndex - guard capabilityStart < capabilityEnd else { return nil } - return String(scopedUrl[.. String? { let trimmed = raw?.trimmingCharacters(in: .whitespacesAndNewlines) ?? "" guard !trimmed.isEmpty else { return nil } @@ -152,7 +139,11 @@ public actor GatewayNodeSession { } private var serverEventSubscribers: [UUID: AsyncStream.Continuation] = [:] - private var canvasHostUrl: String? + private var pluginSurfaceUrls: [String: String] = [:] + + private struct PluginSurfaceRefreshResponse: Decodable { + let pluginSurfaceUrls: [String: AnyCodable]? + } public init() {} @@ -270,47 +261,26 @@ public actor GatewayNodeSession { } public func currentCanvasHostUrl() -> String? { - self.canvasHostUrl + self.pluginSurfaceUrls["canvas"] } - public func refreshNodeCanvasCapability(timeoutMs: Int = 8000) async -> Bool { - guard let channel = self.channel else { return false } - do { - let data = try await channel.request( - method: "node.canvas.capability.refresh", - params: [:], - timeoutMs: Double(max(timeoutMs, 1))) - guard - let payload = try JSONSerialization.jsonObject(with: data) as? [String: Any], - let rawCapability = payload["canvasCapability"] as? String - else { - self.logger.warning("node.canvas.capability.refresh missing canvasCapability") - return false - } - let capability = rawCapability.trimmingCharacters(in: .whitespacesAndNewlines) - guard !capability.isEmpty else { - self.logger.warning("node.canvas.capability.refresh returned empty capability") - return false - } - let scopedUrl = self.canvasHostUrl?.trimmingCharacters(in: .whitespacesAndNewlines) ?? "" - guard !scopedUrl.isEmpty else { - self.logger.warning("node.canvas.capability.refresh missing local canvasHostUrl") - return false - } - guard let refreshed = replaceCanvasCapabilityInScopedHostUrl( - scopedUrl: scopedUrl, - capability: capability) - else { - self.logger.warning("node.canvas.capability.refresh could not rewrite scoped canvas URL") - return false - } - self.canvasHostUrl = refreshed - return true - } catch { - self.logger.warning( - "node.canvas.capability.refresh failed: \(error.localizedDescription, privacy: .public)") - return false - } + @discardableResult + public func refreshPluginSurfaceUrl(surface: String, timeoutSeconds: Int = 8) async -> String? { + guard let channel = self.channel else { return nil } + let trimmedSurface = surface.trimmingCharacters(in: .whitespacesAndNewlines) + guard !trimmedSurface.isEmpty else { return nil } + + return await self.requestPluginSurfaceRefresh( + channel: channel, + method: "node.pluginSurface.refresh", + params: ["surface": AnyCodable(trimmedSurface)], + surface: trimmedSurface, + timeoutSeconds: timeoutSeconds) + } + + @discardableResult + public func refreshCanvasHostUrl(timeoutSeconds: Int = 8) async -> String? { + await self.refreshPluginSurfaceUrl(surface: "canvas", timeoutSeconds: timeoutSeconds) } public func currentRemoteAddress() -> String? { @@ -364,8 +334,7 @@ public actor GatewayNodeSession { private func handlePush(_ push: GatewayPush) async { switch push { case let .snapshot(ok): - let raw = ok.canvashosturl?.trimmingCharacters(in: .whitespacesAndNewlines) - self.canvasHostUrl = self.normalizeCanvasHostUrl(raw) + self.pluginSurfaceUrls = self.normalizePluginSurfaceUrls(ok.pluginsurfaceurls) if self.hasEverConnected { self.broadcastServerEvent( EventFrame(type: "event", event: "seqGap", payload: nil, seq: nil, stateversion: nil)) @@ -436,6 +405,39 @@ public actor GatewayNodeSession { canonicalizeCanvasHostUrl(raw: raw, activeURL: self.activeURL) } + private func normalizePluginSurfaceUrls(_ raw: [String: AnyCodable]?) -> [String: String] { + var normalized: [String: String] = [:] + if let raw { + normalized = raw.compactMapValues { value in + self.normalizeCanvasHostUrl(value.value as? String) + } + } + return normalized + } + + private func requestPluginSurfaceRefresh( + channel: GatewayChannelActor, + method: String, + params: [String: AnyCodable]?, + surface: String, + timeoutSeconds: Int) async -> String? + { + do { + let data = try await channel.request( + method: method, + params: params, + timeoutMs: Double(timeoutSeconds * 1000)) + let decoded = try self.decoder.decode(PluginSurfaceRefreshResponse.self, from: data) + let urls = self.normalizePluginSurfaceUrls(decoded.pluginSurfaceUrls) + guard let refreshed = urls[surface] else { return nil } + self.pluginSurfaceUrls[surface] = refreshed + return refreshed + } catch { + self.logger.debug("\(method, privacy: .public) failed: \(error.localizedDescription, privacy: .public)") + return nil + } + } + private func handleEvent(_ evt: EventFrame) async { self.broadcastServerEvent(evt) guard evt.event == "node.invoke.request" else { return } diff --git a/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift b/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift index ccef9eb5dd0..d8081b2d68a 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift @@ -2,7 +2,7 @@ // swiftlint:disable file_length import Foundation -public let GATEWAY_PROTOCOL_VERSION = 3 +public let GATEWAY_PROTOCOL_VERSION = 4 public enum ErrorCode: String, Codable, Sendable { case notLinked = "NOT_LINKED" @@ -98,7 +98,7 @@ public struct HelloOk: Codable, Sendable { public let server: [String: AnyCodable] public let features: [String: AnyCodable] public let snapshot: Snapshot - public let canvashosturl: String? + public let pluginsurfaceurls: [String: AnyCodable]? public let auth: [String: AnyCodable] public let policy: [String: AnyCodable] @@ -108,7 +108,7 @@ public struct HelloOk: Codable, Sendable { server: [String: AnyCodable], features: [String: AnyCodable], snapshot: Snapshot, - canvashosturl: String?, + pluginsurfaceurls: [String: AnyCodable]?, auth: [String: AnyCodable], policy: [String: AnyCodable]) { @@ -117,7 +117,7 @@ public struct HelloOk: Codable, Sendable { self.server = server self.features = features self.snapshot = snapshot - self.canvashosturl = canvashosturl + self.pluginsurfaceurls = pluginsurfaceurls self.auth = auth self.policy = policy } @@ -128,7 +128,7 @@ public struct HelloOk: Codable, Sendable { case server case features case snapshot - case canvashosturl = "canvasHostUrl" + case pluginsurfaceurls = "pluginSurfaceUrls" case auth case policy } diff --git a/docs/automation/cron-jobs.md b/docs/automation/cron-jobs.md index 93917097880..b4a9459bdfe 100644 --- a/docs/automation/cron-jobs.md +++ b/docs/automation/cron-jobs.md @@ -134,8 +134,6 @@ This fires ~5–6 times per month instead of 0–1 times per month. OpenClaw use `--model` uses the selected allowed model as that job's primary model. It is not the same as a chat-session `/model` override: configured fallback chains still apply when the job primary fails. If the requested model is not allowed or cannot be resolved, cron fails the run with an explicit validation error instead of silently falling back to the job's agent/default model selection. -If older or hand-edited `jobs.json` entries store `payload.model` as `"default"`, `"null"`, a blank string, or JSON `null`, run `openclaw doctor --fix`. Doctor removes those invalid persisted override sentinels; runtime does not support them as fallback aliases. Omit the model field to use the normal agent/default model selection. - Cron jobs can also carry payload-level `fallbacks`. When present, that list replaces the configured fallback chain for the job. Use `fallbacks: []` in the job payload/API when you want a strict cron run that tries only the selected model. If a job has `--model` but neither payload nor configured fallbacks, OpenClaw passes an explicit empty fallback override so the agent primary is not appended as a hidden extra retry target. Model-selection precedence for isolated jobs is: diff --git a/docs/cli/cron.md b/docs/cli/cron.md index c3f9b22a677..f836b6520c1 100644 --- a/docs/cli/cron.md +++ b/docs/cli/cron.md @@ -157,8 +157,6 @@ Retention and pruning are controlled in config: If you have cron jobs from before the current delivery and store format, run `openclaw doctor --fix`. Doctor normalizes legacy cron fields (`jobId`, `schedule.cron`, top-level delivery fields including legacy `threadId`, payload `provider` delivery aliases) and migrates simple `notify: true` webhook fallback jobs to explicit webhook delivery when `cron.webhook` is configured. - -Doctor also removes persisted cron `payload.model` sentinels such as `"default"`, `"null"`, blank strings, and JSON `null`. Cron runtime still treats any non-empty `payload.model` string as an explicit model override and validates it against `agents.defaults.models`; omit the model key when a job should use the agent/default model selection. ## Common edits diff --git a/docs/cli/nodes.md b/docs/cli/nodes.md index d225d37bac1..1567ceb7dd0 100644 --- a/docs/cli/nodes.md +++ b/docs/cli/nodes.md @@ -68,7 +68,7 @@ Invoke flags: For shell execution on a node, use the `exec` tool with `host=node` instead of `openclaw nodes run`. The `nodes` CLI is now capability-focused: direct RPC via `nodes invoke`, plus pairing, camera, -screen, location, canvas, and notifications. +screen, location, Canvas, and notifications. Canvas commands are implemented by the bundled experimental Canvas plugin; core keeps a compatibility hook so they remain under `openclaw nodes canvas`. ## Related diff --git a/docs/cli/plugins.md b/docs/cli/plugins.md index 6457fbbe0bf..217eaa34e22 100644 --- a/docs/cli/plugins.md +++ b/docs/cli/plugins.md @@ -139,7 +139,7 @@ is available, then fall back to `latest`. Use `npm:` when you want to make npm resolution explicit. Bare package specs also install directly from npm during the launch cutover. - Bare specs and `@latest` stay on the stable track. Legacy OpenClaw correction versions such as `2026.5.3-1` are still treated as stable releases for this check so older packages keep updating safely. New monthly support-line work is planned to use normal SemVer patch numbers instead of hyphen correction suffixes. If npm resolves a default-line spec to a prerelease, OpenClaw stops and asks you to opt in explicitly with a prerelease tag such as `@beta`/`@rc` or an exact prerelease version such as `@1.2.3-beta.4`. + Bare specs and `@latest` stay on the stable track. OpenClaw date-stamped correction versions such as `2026.5.3-1` are stable releases for this check. If npm resolves either of those to a prerelease, OpenClaw stops and asks you to opt in explicitly with a prerelease tag such as `@beta`/`@rc` or an exact prerelease version such as `@1.2.3-beta.4`. If a bare install spec matches an official plugin id (for example `diffs`), OpenClaw installs the catalog entry directly. To install an npm package with the same name, use an explicit scoped spec (for example `@scope/diffs`). @@ -337,8 +337,6 @@ Updates apply to tracked plugin installs in the managed plugin index and tracked `openclaw plugins update` reuses the tracked plugin spec unless you pass a new spec. `openclaw update` additionally knows the active OpenClaw update channel: on the beta channel, default-line npm and ClawHub plugin records try `@beta` first, then fall back to the recorded default/latest spec if no plugin beta release exists. Exact versions and explicit tags stay pinned to that selector. - OpenClaw does not yet expose LTS or monthly support plugin channels. Planned support-line work will need plugin package and ClawHub tags to follow the same support line as the core package. - Before a live npm update, OpenClaw checks the installed package version against the npm registry metadata. If the installed version and recorded artifact identity already match the resolved target, the update is skipped without downloading, reinstalling, or rewriting `openclaw.json`. @@ -361,7 +359,7 @@ openclaw plugins inspect --json Inspect shows identity, load status, source, manifest capabilities, policy flags, diagnostics, install metadata, bundle capabilities, and any detected MCP or LSP server support without importing plugin runtime by default. Add `--runtime` to load the plugin module and include registered hooks, tools, commands, services, gateway methods, and HTTP routes. Runtime inspection reports missing plugin dependencies directly; installs and repairs stay in `openclaw plugins install`, `openclaw plugins update`, and `openclaw doctor --fix`. -Plugin-owned CLI commands are installed as root `openclaw` command groups. After `inspect --runtime` shows a command under `cliCommands`, run it as `openclaw ...`; for example a plugin that registers `demo-git` can be verified with `openclaw demo-git ping`. +Plugin-owned CLI commands are usually installed as root `openclaw` command groups, but plugins may also register nested commands under a core parent such as `openclaw nodes`. After `inspect --runtime` shows a command under `cliCommands`, run it at the listed path; for example a plugin that registers `demo-git` can be verified with `openclaw demo-git ping`. Each plugin is classified by what it actually registers at runtime: diff --git a/docs/cli/update.md b/docs/cli/update.md index dbe7e4afbc9..47780f80cb2 100644 --- a/docs/cli/update.md +++ b/docs/cli/update.md @@ -96,11 +96,6 @@ install method aligned: - `beta` → prefers npm dist-tag `beta`, but falls back to `latest` when beta is missing or older than the current stable release. -OpenClaw does not yet have an LTS or monthly support channel. We are working -toward monthly support lines, but `--channel` currently accepts only -`stable`, `beta`, and `dev`. Use `--tag ` for a one-off -target when you need a specific package artifact. - The Gateway core auto-updater (when enabled via config) launches the CLI update path outside the live Gateway request handler. Control-plane `update.run` package-manager updates force a non-deferred, no-cooldown update restart after the package swap, diff --git a/docs/concepts/system-prompt.md b/docs/concepts/system-prompt.md index b914f4a6778..921103289dd 100644 --- a/docs/concepts/system-prompt.md +++ b/docs/concepts/system-prompt.md @@ -137,10 +137,9 @@ collaboration-mode instructions inside the Codex runtime after OpenClaw sends thread and turn params. Regenerate them with `pnpm prompt:snapshots:gen` and verify drift with -`pnpm prompt:snapshots:check`. CI runs the drift check as a dedicated -additional check for manual CI and prompt-affecting changes so prompt changes -and snapshot updates stay attached to the same PR without slowing unrelated -boundary shards. +`pnpm prompt:snapshots:check`. CI runs the drift check in the additional +boundary shard so prompt changes and snapshot updates stay attached to the same +PR. ## Workspace bootstrap injection diff --git a/docs/concepts/typebox.md b/docs/concepts/typebox.md index 3878fac1bcc..df6734bebc5 100644 --- a/docs/concepts/typebox.md +++ b/docs/concepts/typebox.md @@ -94,8 +94,8 @@ Connect (first message): "id": "c1", "method": "connect", "params": { - "minProtocol": 3, - "maxProtocol": 3, + "minProtocol": 4, + "maxProtocol": 4, "client": { "id": "openclaw-macos", "displayName": "macos", @@ -117,7 +117,7 @@ Hello-ok response: "ok": true, "payload": { "type": "hello-ok", - "protocol": 3, + "protocol": 4, "server": { "version": "dev", "connId": "ws-1" }, "features": { "methods": ["health"], "events": ["tick"] }, "snapshot": { @@ -163,8 +163,8 @@ ws.on("open", () => { id: "c1", method: "connect", params: { - minProtocol: 3, - maxProtocol: 3, + minProtocol: 4, + maxProtocol: 4, client: { id: "cli", displayName: "example", @@ -272,7 +272,7 @@ Unknown frame types are preserved as raw payloads for forward compatibility. ## Versioning + compatibility -- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema.ts`. +- `PROTOCOL_VERSION` lives in `src/gateway/protocol/version.ts`. - Clients send `minProtocol` + `maxProtocol`; the server rejects mismatches. - The Swift models keep unknown frame types to avoid breaking older clients. diff --git a/docs/gateway/bridge-protocol.md b/docs/gateway/bridge-protocol.md index 025303bd73f..077dd24d265 100644 --- a/docs/gateway/bridge-protocol.md +++ b/docs/gateway/bridge-protocol.md @@ -40,8 +40,10 @@ authoritative pin without explicit user intent or other out-of-band verification 3. Client sends `pair-request`. 4. Gateway waits for approval, then sends `pair-ok` and `hello-ok`. -Historically, `hello-ok` returned `serverName` and could include -`canvasHostUrl`. +Historically, `hello-ok` returned `serverName`; hosted plugin surfaces are now +advertised through `pluginSurfaceUrls`. Canvas/A2UI uses +`pluginSurfaceUrls.canvas`; the deprecated `canvasHostUrl` alias is not part of +the refactored protocol. ## Frames diff --git a/docs/gateway/configuration-examples.md b/docs/gateway/configuration-examples.md index 98bbccd911a..e81c96a2834 100644 --- a/docs/gateway/configuration-examples.md +++ b/docs/gateway/configuration-examples.md @@ -654,7 +654,7 @@ Only enable direct mutable name/email/nick matching with each channel's `dangero - If you set `dmPolicy: "open"`, the matching `allowFrom` list must include `"*"`. - Provider IDs differ (phone numbers, user IDs, channel IDs). Use the provider docs to confirm the format. -- Optional sections to add later: `web`, `browser`, `ui`, `discovery`, `canvasHost`, `talk`, `signal`, `imessage`. +- Optional sections to add later: `web`, `browser`, `ui`, `discovery`, `plugins`, `talk`, `signal`, `imessage`. - See [Providers](/providers) and [Troubleshooting](/gateway/troubleshooting) for deeper setup notes. ## Related diff --git a/docs/gateway/configuration-reference.md b/docs/gateway/configuration-reference.md index 772f25f336d..3eada9e6c54 100644 --- a/docs/gateway/configuration-reference.md +++ b/docs/gateway/configuration-reference.md @@ -651,14 +651,22 @@ Validation and safety notes: --- -## Canvas host +## Canvas plugin host ```json5 { - canvasHost: { - root: "~/.openclaw/workspace/canvas", - liveReload: true, - // enabled: false, // or OPENCLAW_SKIP_CANVAS_HOST=1 + plugins: { + entries: { + canvas: { + config: { + host: { + root: "~/.openclaw/workspace/canvas", + liveReload: true, + // enabled: false, // or OPENCLAW_SKIP_CANVAS_HOST=1 + }, + }, + }, + }, }, } ``` diff --git a/docs/gateway/configuration.md b/docs/gateway/configuration.md index 51f4b260238..9b9ecc7c3b8 100644 --- a/docs/gateway/configuration.md +++ b/docs/gateway/configuration.md @@ -575,7 +575,7 @@ Most fields hot-apply without downtime. In `hybrid` mode, restart-required chang | Tools & media | `tools`, `browser`, `skills`, `mcp`, `audio`, `talk` | No | | UI & misc | `ui`, `logging`, `identity`, `bindings` | No | | Gateway server | `gateway.*` (port, bind, auth, tailscale, TLS, HTTP) | **Yes** | -| Infrastructure | `discovery`, `canvasHost`, `plugins` | **Yes** | +| Infrastructure | `discovery`, `plugins` | **Yes** | `gateway.reload` and `gateway.remote` are exceptions - changing them does **not** trigger a restart. diff --git a/docs/gateway/doctor.md b/docs/gateway/doctor.md index 75b1d7e1d3b..c43e5fd5651 100644 --- a/docs/gateway/doctor.md +++ b/docs/gateway/doctor.md @@ -310,7 +310,6 @@ That stages grounded durable candidates into the short-term dreaming store while - top-level payload fields (`message`, `model`, `thinking`, ...) → `payload` - top-level delivery fields (`deliver`, `channel`, `to`, `provider`, ...) → `delivery` - payload `provider` delivery aliases → explicit `delivery.channel` - - invalid persisted cron `payload.model` sentinels (`"default"`, `"null"`, blank strings, JSON `null`) → removed model override - simple legacy `notify: true` webhook fallback jobs → explicit `delivery.mode="webhook"` with `delivery.to=cron.webhook` Doctor only auto-migrates `notify: true` jobs when it can do so without changing behavior. If a job combines legacy notify fallback with an existing non-webhook delivery mode, doctor warns and leaves that job for manual review. diff --git a/docs/gateway/protocol.md b/docs/gateway/protocol.md index 342d3e4bb4f..e1d67c51d19 100644 --- a/docs/gateway/protocol.md +++ b/docs/gateway/protocol.md @@ -44,8 +44,8 @@ Client → Gateway: "id": "…", "method": "connect", "params": { - "minProtocol": 3, - "maxProtocol": 3, + "minProtocol": 4, + "maxProtocol": 4, "client": { "id": "cli", "version": "1.2.3", @@ -80,7 +80,7 @@ Gateway → Client: "ok": true, "payload": { "type": "hello-ok", - "protocol": 3, + "protocol": 4, "server": { "version": "…", "connId": "…" }, "features": { "methods": ["…"], "events": ["…"] }, "snapshot": { "…": "…" }, @@ -105,7 +105,15 @@ handshake failure. `server`, `features`, `snapshot`, and `policy` are all required by the schema (`src/gateway/protocol/schema/frames.ts`). `auth` is also required and reports -the negotiated role/scopes. `canvasHostUrl` is optional. +the negotiated role/scopes. `pluginSurfaceUrls` is optional and maps plugin +surface names, such as `canvas`, to scoped hosted URLs. + +Scoped plugin surface URLs may expire. Nodes can call +`node.pluginSurface.refresh` with `{ "surface": "canvas" }` to receive a fresh +entry in `pluginSurfaceUrls`. The experimental Canvas plugin refactor does not +support the deprecated `canvasHostUrl`, `canvasCapability`, or +`node.canvas.capability.refresh` compatibility path; current native clients and +gateways must use plugin surfaces. When no device token is issued, `hello-ok.auth` reports the negotiated permissions without token fields: @@ -174,8 +182,8 @@ roles still need scopes under their own role prefix. "id": "…", "method": "connect", "params": { - "minProtocol": 3, - "maxProtocol": 3, + "minProtocol": 4, + "maxProtocol": 4, "client": { "id": "ios-node", "version": "1.2.3", @@ -443,7 +451,6 @@ enumeration of `src/gateway/server-methods/*.ts`. - `node.invoke` forwards a command to a connected node. - `node.invoke.result` returns the result for an invoke request. - `node.event` carries node-originated events back into the gateway. - - `node.canvas.capability.refresh` refreshes scoped canvas-capability tokens. - `node.pending.pull` and `node.pending.ack` are the connected-node queue APIs. - `node.pending.enqueue` and `node.pending.drain` manage durable pending work for offline/disconnected nodes. @@ -572,7 +579,7 @@ enumeration of `src/gateway/server-methods/*.ts`. ## Versioning -- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema/protocol-schemas.ts`. +- `PROTOCOL_VERSION` lives in `src/gateway/protocol/version.ts`. - Clients send `minProtocol` + `maxProtocol`; the server rejects mismatches. - Schemas + models are generated from TypeBox definitions: - `pnpm protocol:gen` @@ -582,11 +589,11 @@ enumeration of `src/gateway/server-methods/*.ts`. ### Client constants The reference client in `src/gateway/client.ts` uses these defaults. Values are -stable across protocol v3 and are the expected baseline for third-party clients. +stable across protocol v4 and are the expected baseline for third-party clients. | Constant | Default | Source | | ----------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `PROTOCOL_VERSION` | `3` | `src/gateway/protocol/schema/protocol-schemas.ts` | +| `PROTOCOL_VERSION` | `4` | `src/gateway/protocol/version.ts` | | Request timeout (per RPC) | `30_000` ms | `src/gateway/client.ts` (`requestTimeoutMs`) | | Preauth / connect-challenge timeout | `15_000` ms | `src/gateway/handshake-timeouts.ts` (config/env can raise the paired server/client budget) | | Initial reconnect backoff | `1_000` ms | `src/gateway/client.ts` (`backoffMs`) | diff --git a/docs/gateway/security/index.md b/docs/gateway/security/index.md index f762e44ae62..55cb0ba1ffa 100644 --- a/docs/gateway/security/index.md +++ b/docs/gateway/security/index.md @@ -126,65 +126,6 @@ Use this as the quick model when triaging risk: | Node pairing and node commands | Operator-level remote execution on paired devices | "Remote device control should be treated as untrusted user access by default" | | `gateway.nodes.pairing.autoApproveCidrs` | Opt-in trusted-network node enrollment policy | "A disabled-by-default allowlist is an automatic pairing vulnerability" | -## Multi-agent and sub-agent boundaries - -OpenClaw can run many agents inside one Gateway, but those agents still sit -inside the same trusted-operator boundary unless you split the deployment by -Gateway, OS user, host, or sandbox. Treat sub-agent delegation as a tool-policy -and sandboxing decision, not as a hostile multi-tenant authorization layer. - -Expected behavior inside one trusted Gateway: - -- An authenticated operator can route work to sessions and agents they are - allowed to use by config. -- `sessionKey`, session id, labels, and sub-agent session keys select - conversation context. They are not bearer credentials and are not per-user - authorization boundaries. -- Sub-agents have separate sessions by default. Native `sessions_spawn` uses - isolated context unless the caller explicitly asks for `context: "fork"`; - thread-bound follow-up sessions use forked context because they continue the - conversation thread. -- A forked sub-agent can see the transcript context it was deliberately given. - That is expected. It becomes a security issue only if it receives context that - policy said it must not receive. -- Tool access comes from the effective profile, channel/group/provider policy, - sandbox policy, per-agent policy, and the sub-agent restriction layer. A broad - tool profile intentionally gives broad capability. -- Sub-agent auth profiles are resolved by target agent id. Main-agent auth can - be available as fallback unless you split credentials/deployments; do not rely - on sub-agent identity alone for strong secret isolation. - -What counts as a real boundary bypass: - -- `sessions_spawn` works even though the effective tool policy denied it. -- A child runs unsandboxed even though the requester is sandboxed or the call - required `sandbox: "require"`. -- A child receives session tools, system tools, or target-agent access that the - resolved config denied. -- A leaf sub-agent controls, kills, steers, or messages sibling sessions that it - did not spawn. -- A sub-agent sees transcript, memory, credentials, or files that were excluded - by an explicit policy or sandbox boundary. -- A Gateway/API caller without the required Gateway auth or trusted-proxy/device - identity can trigger agent or tool execution. - -Hardening knobs: - -- Keep `sessions_spawn` denied unless an agent truly needs delegation. -- Prefer `tools.profile: "messaging"` or another narrow profile for agents that - talk to external channels. -- Set `agents.list[].subagents.requireAgentId: true` for agents that may spawn - work, so target selection is explicit. -- Keep `agents.defaults.subagents.allowAgents` and - `agents.list[].subagents.allowAgents` narrow; avoid `["*"]` for agents that - receive untrusted input. -- Use `tools.subagents.tools.allow` to make sub-agent tools allow-only instead - of inheriting a broad parent profile. -- For workflows that must remain sandboxed, use `sessions_spawn` with - `sandbox: "require"`. -- Use separate gateways, OS users, hosts, browser profiles, and credentials when - agents or users are mutually untrusted. - ## Not vulnerabilities by design @@ -198,10 +139,6 @@ a real boundary bypass is demonstrated: - Claims that classify normal operator read-path access (for example `sessions.list` / `sessions.preview` / `chat.history`) as IDOR in a shared-gateway setup. -- Claims that treat expected `context: "fork"` transcript inheritance as a - boundary bypass when the requester explicitly forked that context. -- Claims that treat broad sub-agent tool access as a bypass when the configured - profile or allowlist intentionally granted those tools. - Localhost-only deployment findings (for example HSTS on a loopback-only gateway). - Discord inbound webhook signature findings for inbound paths that do not diff --git a/docs/help/faq.md b/docs/help/faq.md index 97ccea1412a..63f56c25f1a 100644 --- a/docs/help/faq.md +++ b/docs/help/faq.md @@ -988,7 +988,7 @@ lives on the [First-run FAQ](/help/faq-first-run). to the gateway (iOS/Android nodes, or macOS "node mode" in the menubar app). For headless node hosts and CLI control, see [Node host CLI](/cli/node). - A full restart is required for `gateway`, `discovery`, and `canvasHost` changes. + A full restart is required for `gateway`, `discovery`, and hosted plugin surface changes. diff --git a/docs/install/development-channels.md b/docs/install/development-channels.md index 026be7d3e37..05c8efccd3d 100644 --- a/docs/install/development-channels.md +++ b/docs/install/development-channels.md @@ -23,28 +23,6 @@ changing the version number. Maintainers can also publish a stable release directly to `latest` when needed. Dist-tags are the source of truth for npm installs. -## Planned monthly support lines - -OpenClaw does not yet ship an LTS or monthly support channel. We are working -toward SemVer-compatible monthly support lines so users can stay on a quieter -line while `latest` keeps moving quickly. - -The planned version shape is `YYYY.M.PATCH`: - -- `YYYY` is the year. -- `M` is the monthly release line, without a leading zero. -- `PATCH` increments within that monthly line and can grow past 100 if needed. - -Example future tags: - -- `v2026.6.0`, `v2026.6.1`, `v2026.6.2` for the June line. -- `v2026.6.3-beta.1` for a prerelease on the fast/latest train. -- A future support-line dist-tag such as `stable-2026-6` or `lts-2026-6` may - point at a monthly line, but no such channel is available today. - -Until that migration lands, the public update channels remain `stable`, `beta`, -and `dev`. - ## Switching channels ```bash @@ -134,12 +112,10 @@ source (config, git tag, git branch, or default). ## Tagging best practices -- Tag releases you want git checkouts to land on (`vYYYY.M.D` for current - stable releases, `vYYYY.M.D-beta.N` for current beta releases). +- Tag releases you want git checkouts to land on (`vYYYY.M.D` for stable, + `vYYYY.M.D-beta.N` for beta). - `vYYYY.M.D.beta.N` is also recognized for compatibility, but prefer `-beta.N`. -- Legacy `vYYYY.M.D-` tags are still recognized as stable (non-beta), - but the planned monthly support model will use normal patch numbers - (`vYYYY.M.PATCH`) instead of a hyphen correction suffix. +- Legacy `vYYYY.M.D-` tags are still recognized as stable (non-beta). - Keep tags immutable: never move or reuse a tag. - npm dist-tags remain the source of truth for npm installs: - `latest` -> stable diff --git a/docs/install/updating.md b/docs/install/updating.md index 39dd57c346e..c609c5c2bc0 100644 --- a/docs/install/updating.md +++ b/docs/install/updating.md @@ -35,10 +35,6 @@ installer has its own `--verbose` flag, but that flag is not part of the beta tag is missing or older than the latest stable release. Use `--tag beta` if you want the raw npm beta dist-tag for a one-off package update. -OpenClaw does not yet expose an LTS or monthly support update channel. We are -working toward SemVer-compatible monthly support lines, but today the supported -channels are still `stable`, `beta`, and `dev`. - See [Development channels](/install/development-channels) for channel semantics. ## Switch between npm and git installs diff --git a/docs/platforms/ios.md b/docs/platforms/ios.md index 2b8d01c86a3..d1dadfb1ede 100644 --- a/docs/platforms/ios.md +++ b/docs/platforms/ios.md @@ -272,7 +272,7 @@ openclaw nodes invoke --node "iOS Node" --command canvas.snapshot --params '{"ma ## Common errors - `NODE_BACKGROUND_UNAVAILABLE`: bring the iOS app to the foreground (canvas/camera/screen commands require it). -- `A2UI_HOST_NOT_CONFIGURED`: the Gateway did not advertise a canvas host URL; check `canvasHost` in [Gateway configuration](/gateway/configuration). +- `A2UI_HOST_NOT_CONFIGURED`: the Gateway did not advertise the Canvas plugin surface URL; check `plugins.entries.canvas.config.host` in [Gateway configuration](/gateway/configuration). - Pairing prompt never appears: run `openclaw devices list` and approve manually. - Reconnect fails after reinstall: the Keychain pairing token was cleared; re-pair the node. diff --git a/docs/plugins/plugin-inventory.md b/docs/plugins/plugin-inventory.md index db1490b66e6..1677c7f320b 100644 --- a/docs/plugins/plugin-inventory.md +++ b/docs/plugins/plugin-inventory.md @@ -60,6 +60,7 @@ uninstall, and publishing commands. | [bonjour](/plugins/reference/bonjour) | Advertise the local OpenClaw gateway over Bonjour/mDNS. | `@openclaw/bonjour`
included in OpenClaw | plugin | | [browser](/plugins/reference/browser) | Adds agent-callable tools. | `@openclaw/browser-plugin`
included in OpenClaw | contracts: tools; skills | | [byteplus](/plugins/reference/byteplus) | Adds BytePlus, BytePlus Plan model provider support to OpenClaw. | `@openclaw/byteplus-provider`
included in OpenClaw | providers: byteplus, byteplus-plan; contracts: videoGenerationProviders | +| [canvas](/plugins/reference/canvas) | Experimental Canvas control and A2UI rendering surfaces for paired nodes. | `@openclaw/canvas-plugin`
included in OpenClaw | contracts: tools | | [cerebras](/plugins/reference/cerebras) | Adds Cerebras model provider support to OpenClaw. | `@openclaw/cerebras-provider`
included in OpenClaw | providers: cerebras | | [chutes](/plugins/reference/chutes) | Adds Chutes model provider support to OpenClaw. | `@openclaw/chutes-provider`
included in OpenClaw | providers: chutes | | [cloudflare-ai-gateway](/plugins/reference/cloudflare-ai-gateway) | Adds Cloudflare AI Gateway model provider support to OpenClaw. | `@openclaw/cloudflare-ai-gateway-provider`
included in OpenClaw | providers: cloudflare-ai-gateway | diff --git a/docs/plugins/reference.md b/docs/plugins/reference.md index 250354fac5e..0f63719d65c 100644 --- a/docs/plugins/reference.md +++ b/docs/plugins/reference.md @@ -30,6 +30,7 @@ pnpm plugins:inventory:gen | [brave](/plugins/reference/brave) | Adds web search provider support. | `@openclaw/brave-plugin`
npm; ClawHub | contracts: webSearchProviders | | [browser](/plugins/reference/browser) | Adds agent-callable tools. | `@openclaw/browser-plugin`
included in OpenClaw | contracts: tools; skills | | [byteplus](/plugins/reference/byteplus) | Adds BytePlus, BytePlus Plan model provider support to OpenClaw. | `@openclaw/byteplus-provider`
included in OpenClaw | providers: byteplus, byteplus-plan; contracts: videoGenerationProviders | +| [canvas](/plugins/reference/canvas) | Experimental Canvas control and A2UI rendering surfaces for paired nodes. | `@openclaw/canvas-plugin`
included in OpenClaw | contracts: tools | | [cerebras](/plugins/reference/cerebras) | Adds Cerebras model provider support to OpenClaw. | `@openclaw/cerebras-provider`
included in OpenClaw | providers: cerebras | | [chutes](/plugins/reference/chutes) | Adds Chutes model provider support to OpenClaw. | `@openclaw/chutes-provider`
included in OpenClaw | providers: chutes | | [cloudflare-ai-gateway](/plugins/reference/cloudflare-ai-gateway) | Adds Cloudflare AI Gateway model provider support to OpenClaw. | `@openclaw/cloudflare-ai-gateway-provider`
included in OpenClaw | providers: cloudflare-ai-gateway | diff --git a/docs/plugins/reference/canvas.md b/docs/plugins/reference/canvas.md new file mode 100644 index 00000000000..1c1f490eee0 --- /dev/null +++ b/docs/plugins/reference/canvas.md @@ -0,0 +1,19 @@ +--- +summary: "Experimental Canvas control and A2UI rendering surfaces for paired nodes." +read_when: + - You are installing, configuring, or auditing the canvas plugin +title: "Canvas plugin" +--- + +# Canvas plugin + +Experimental Canvas control and A2UI rendering surfaces for paired nodes. + +## Distribution + +- Package: `@openclaw/canvas-plugin` +- Install route: included in OpenClaw + +## Surface + +contracts: tools diff --git a/docs/plugins/sdk-entrypoints.md b/docs/plugins/sdk-entrypoints.md index 69052d62097..568e72c32d3 100644 --- a/docs/plugins/sdk-entrypoints.md +++ b/docs/plugins/sdk-entrypoints.md @@ -140,8 +140,13 @@ export default defineChannelPluginEntry({ memoizes the resolved schema on first access. - For plugin-owned root CLI commands, prefer `api.registerCli(..., { descriptors: [...] })` when you want the command to stay lazy-loaded without disappearing from the - root CLI parse tree. For channel plugins, prefer registering those descriptors - from `registerCliMetadata(...)` and keep `registerFull(...)` focused on runtime-only work. + root CLI parse tree. For paired-node feature commands, prefer + `api.registerNodeCliFeature(...)` so the command lands under `openclaw nodes`. + For other nested plugin commands, add `parentPath` and register commands on + the `program` object passed to the registrar; OpenClaw resolves it to the + parent command before calling the plugin. For channel plugins, prefer + registering those descriptors from `registerCliMetadata(...)` and keep + `registerFull(...)` focused on runtime-only work. - If `registerFull(...)` also registers gateway RPC methods, keep them on a plugin-specific prefix. Reserved core admin namespaces (`config.*`, `exec.approvals.*`, `wizard.*`, `update.*`) are always coerced to diff --git a/docs/plugins/sdk-overview.md b/docs/plugins/sdk-overview.md index 5c237ba6a98..d689a117878 100644 --- a/docs/plugins/sdk-overview.md +++ b/docs/plugins/sdk-overview.md @@ -117,6 +117,7 @@ provider- or plugin-specific policy to core prompt builders. | `api.registerGatewayMethod(name, handler)` | Gateway RPC method | | `api.registerGatewayDiscoveryService(service)` | Local Gateway discovery advertiser | | `api.registerCli(registrar, opts?)` | CLI subcommand | +| `api.registerNodeCliFeature(registrar, opts?)` | Node feature CLI under `openclaw nodes` | | `api.registerService(service)` | Background service | | `api.registerInteractiveHandler(registration)` | Interactive handler | | `api.registerAgentToolResultMiddleware(...)` | Runtime tool-result middleware | @@ -214,11 +215,18 @@ own trust. ### CLI registration metadata -`api.registerCli(registrar, opts?)` accepts two kinds of top-level metadata: +`api.registerCli(registrar, opts?)` accepts two kinds of command metadata: -- `commands`: explicit command roots owned by the registrar -- `descriptors`: parse-time command descriptors used for root CLI help, +- `commands`: explicit command names owned by the registrar +- `descriptors`: parse-time command descriptors used for CLI help, routing, and lazy plugin CLI registration +- `parentPath`: optional parent command path for nested command groups, such as + `["nodes"]` + +For paired-node features, prefer +`api.registerNodeCliFeature(registrar, opts?)`. It is a small wrapper around +`api.registerCli(..., { parentPath: ["nodes"] })` and makes commands such as +`openclaw nodes canvas` explicit plugin-owned node features. If you want a plugin command to stay lazy-loaded in the normal root CLI path, provide `descriptors` that cover every top-level command root exposed by that @@ -242,6 +250,27 @@ api.registerCli( ); ``` +Nested commands receive the resolved parent command as `program`: + +```typescript +api.registerCli( + async ({ program }) => { + const { registerNodesCanvasCommands } = await import("./src/cli.js"); + registerNodesCanvasCommands(program); + }, + { + parentPath: ["nodes"], + descriptors: [ + { + name: "canvas", + description: "Capture or render canvas content from a paired node", + hasSubcommands: true, + }, + ], + }, +); +``` + Use `commands` by itself only when you do not need lazy root CLI registration. That eager compatibility path remains supported, but it does not install descriptor-backed placeholders for parse-time lazy loading. diff --git a/docs/refactor/canvas.md b/docs/refactor/canvas.md new file mode 100644 index 00000000000..d90c00fdfbf --- /dev/null +++ b/docs/refactor/canvas.md @@ -0,0 +1,131 @@ +--- +summary: "Plan and audit checklist for moving Canvas out of core and into a bundled experimental plugin." +read_when: + - Moving Canvas host, tools, commands, docs, or protocol ownership + - Auditing whether Canvas is still core-owned + - Preparing or reviewing the experimental Canvas plugin PR +title: "Canvas plugin refactor" +--- + +# Canvas plugin refactor + +Canvas is low-use and experimental. Treat it as a bundled plugin, not a core feature. Core may keep generic gateway, node, HTTP, auth, config, and native-client plumbing, but Canvas-specific behavior should live under `extensions/canvas`. + +## Goal + +Move Canvas ownership to `extensions/canvas` while preserving the current paired-node behavior: + +- the agent-facing `canvas` tool is registered by the Canvas plugin +- Canvas node commands are allowed only when the Canvas plugin registers them +- A2UI host/source files live under the Canvas plugin +- Canvas document materialization lives under the Canvas plugin +- CLI command implementation lives under the Canvas plugin, or delegates through a plugin-owned runtime barrel +- docs and plugin inventory describe Canvas as experimental and plugin-backed + +## Non-goals + +- Do not redesign the native app Canvas UI in this refactor. +- Do not remove Canvas protocol/client support from iOS, Android, or macOS unless a separate product decision says Canvas should be deleted. +- Do not build a broad plugin service framework only for Canvas unless at least one other bundled plugin needs the same seam. + +## Current branch state + +Done: + +- Added bundled plugin package in `extensions/canvas`. +- Added `extensions/canvas/openclaw.plugin.json`. +- Moved the agent `canvas` tool from `src/agents/tools/canvas-tool.ts` to `extensions/canvas/src/tool.ts`. +- Removed core registration of `createCanvasTool` from `src/agents/openclaw-tools.ts`. +- Moved Canvas host implementation from `src/canvas-host` to `extensions/canvas/src/host`. +- Kept `extensions/canvas/runtime-api.ts` as the plugin-owned compatibility barrel for tests, packaging, and external public Canvas helpers. +- Moved Canvas document materialization from `src/gateway/canvas-documents.ts` to `extensions/canvas/src/documents.ts`. +- Moved Canvas CLI implementation and A2UI JSONL helpers into `extensions/canvas/src/cli.ts`. +- Moved Canvas host URL and scoped capability helpers into `extensions/canvas/src`. +- Moved Canvas node command defaults out of hardcoded core lists and into plugin `nodeInvokePolicies`. +- Added plugin-owned Canvas host config at `plugins.entries.canvas.config.host`. +- Moved Canvas and A2UI HTTP serving behind Canvas plugin HTTP route registration. +- Added generic plugin WebSocket upgrade dispatch for plugin-owned HTTP routes. +- Replaced Canvas-specific gateway host URL and node capability auth with generic hosted plugin surface and node capability helpers. +- Added plugin-owned hosted media resolvers so Canvas document URLs resolve through the Canvas plugin instead of core importing Canvas document internals. +- Added `api.registerNodeCliFeature(...)` so Canvas can declare `openclaw nodes canvas` as a plugin-owned node feature without manually spelling the parent command path. +- Removed production `src/**` imports of `extensions/canvas/runtime-api.js`. +- Moved the A2UI bundle source from `apps/shared/OpenClawKit/Tools/CanvasA2UI` to `extensions/canvas/src/host/a2ui-app`. +- Moved A2UI build/copy implementation under `extensions/canvas/scripts` and replaced root build wiring with generic bundled-plugin asset hooks. +- Removed the runtime legacy top-level `canvasHost` config alias. +- Kept the Canvas doctor migration so `openclaw doctor --fix` rewrites old `canvasHost` configs into `plugins.entries.canvas.config.host`. +- Removed old-agent Canvas protocol compatibility behind gateway protocol v4. Native clients and gateways now use only `pluginSurfaceUrls.canvas` plus `node.pluginSurface.refresh`; the deprecated `canvasHostUrl`, `canvasCapability`, and `node.canvas.capability.refresh` path is intentionally unsupported in this experimental refactor. +- Updated generated plugin inventory to include Canvas. +- Added plugin reference docs at `docs/plugins/reference/canvas.md`. + +Known remaining core-owned Canvas surfaces: + +- Native app Canvas handlers under `apps/` still intentionally consume the Canvas plugin surface +- native app Canvas protocol/client handlers under `apps/` +- published artifact output still uses `dist/canvas-host/a2ui` for backwards-compatible runtime lookup, but the copy step is now plugin-owned + +## Target shape + +`extensions/canvas` should own: + +- plugin manifest and package metadata +- agent tool registration +- node invoke command policy +- Canvas host and A2UI runtime +- Canvas A2UI bundle source and asset build/copy scripts +- Canvas document creation and asset resolution +- Canvas CLI implementation +- Canvas docs page and plugin inventory entry + +Core should own only generic seams: + +- plugin discovery and registration +- generic agent tool registry +- generic node invoke policy registry +- generic gateway HTTP/auth and WebSocket upgrade dispatch +- generic hosted plugin surface URL resolution +- generic hosted media resolver registration +- generic node capability transport +- generic config plumbing +- generic bundled-plugin asset hook discovery + +Native apps may keep Canvas command handlers as clients of the protocol. They are not the plugin runtime owner. + +## Migration steps + +1. Treat `plugins.entries.canvas.config.host` as the plugin-owned config surface. +2. Update docs so Canvas is described as an experimental bundled plugin. +3. Run focused Canvas tests, plugin inventory checks, plugin SDK API checks, and build/type gates affected by runtime boundaries. + +## Audit checklist + +Before calling the refactor complete: + +- `rg "src/canvas-host|../canvas-host"` returns no live source imports. +- `rg "canvas-tool|createCanvasTool" src` finds no core-owned Canvas tool implementation. +- `rg "canvas.present|canvas.snapshot|canvas.a2ui" src/gateway` finds no hardcoded allowlist defaults outside generic plugin policy tests. +- `rg "extensions/canvas/runtime-api" src --glob '!**/*.test.ts'` is empty. +- `rg "canvas-documents" src` is empty. +- `rg "registerNodesCanvasCommands|nodes-canvas" src` is empty; the Canvas plugin registers `openclaw nodes canvas` through nested plugin CLI metadata. +- `rg "createCanvasHostHandler|handleA2uiHttpRequest" src/gateway` returns no gateway runtime ownership. +- `rg "apps/shared/OpenClawKit/Tools/CanvasA2UI|canvas-a2ui-copy|extensions/canvas/src/host/a2ui" scripts .github package.json` finds only compatibility wrappers or plugin-owned paths. +- `pnpm plugins:inventory:check` passes. +- `pnpm plugin-sdk:api:check` passes, or generated API baselines are intentionally updated and reviewed. +- Targeted Canvas tests pass. +- Changed-lanes tests pass for Canvas host/A2UI paths. +- PR body explicitly says Canvas is experimental and plugin-backed. + +## Verification commands + +Use targeted local checks while iterating: + +```sh +pnpm test extensions/canvas/src/host/server.test.ts extensions/canvas/src/host/server.state-dir.test.ts extensions/canvas/src/host/file-resolver.test.ts +pnpm test src/gateway/server.plugin-node-capability-auth.test.ts src/gateway/server-import-boundary.test.ts +pnpm test extensions/canvas/src/config-migration.test.ts src/commands/doctor-legacy-config.migrations.test.ts +pnpm test test/scripts/changed-lanes.test.ts test/scripts/build-all.test.ts test/scripts/bundle-a2ui.test.ts test/scripts/bundled-plugin-assets.test.ts src/scripts/canvas-a2ui-copy.test.ts src/infra/run-node.test.ts +pnpm tsgo:extensions +pnpm plugins:inventory:check +pnpm plugin-sdk:api:check +``` + +Run `pnpm build` before push if runtime barrel, lazy import, packaging, or published plugin surfaces change. diff --git a/docs/reference/RELEASING.md b/docs/reference/RELEASING.md index 85d6d03fa8e..d25f072d2b0 100644 --- a/docs/reference/RELEASING.md +++ b/docs/reference/RELEASING.md @@ -1,11 +1,10 @@ --- -summary: "Release lanes, operator checklist, validation boxes, version naming, planned monthly support lines, and cadence" +summary: "Release lanes, operator checklist, validation boxes, version naming, and cadence" title: "Release policy" read_when: - Looking for public release channel definitions - Running release validation or package acceptance - Looking for version naming and cadence - - Planning monthly support or LTS release lines --- OpenClaw has three public release lanes: @@ -18,38 +17,18 @@ OpenClaw has three public release lanes: - Stable release version: `YYYY.M.D` - Git tag: `vYYYY.M.D` -- Legacy stable correction release version: `YYYY.M.D-N` +- Stable correction release version: `YYYY.M.D-N` - Git tag: `vYYYY.M.D-N` - Beta prerelease version: `YYYY.M.D-beta.N` - Git tag: `vYYYY.M.D-beta.N` - Do not zero-pad month or day - `latest` means the current promoted stable npm release - `beta` means the current beta install target -- Stable and legacy correction releases publish to npm `beta` by default; release operators can target `latest` explicitly, or promote a vetted beta build later +- Stable and stable correction releases publish to npm `beta` by default; release operators can target `latest` explicitly, or promote a vetted beta build later - Every stable OpenClaw release ships the npm package and macOS app together; beta releases normally validate and publish the npm/package path first, with mac app build/sign/notarize reserved for stable unless explicitly requested -### Planned monthly support versioning - -OpenClaw does not yet have an LTS or monthly support channel. Maintainers are -working toward SemVer-compatible monthly support lines, but the shipped update -channels today are still `stable`, `beta`, and `dev`. - -The planned version shape is `YYYY.M.PATCH`: - -- `YYYY` is the year. -- `M` is the monthly release line, without a leading zero. -- `PATCH` increments within that monthly line and can grow as high as needed. - -For example, `2026.6.0`, `2026.6.1`, and `2026.6.2` would all be on the June -2026 line. A future monthly support dist-tag such as `stable-2026-6` or -`lts-2026-6` may point at that line, while `latest` continues to move quickly. - -This future model replaces the need for new `YYYY.M.D-N` correction releases. -Existing legacy correction versions remain recognized so older packages and -upgrade paths keep working. - ## Release cadence - Releases move beta-first @@ -260,7 +239,7 @@ Validation` or from the `main`/release workflow ref so workflow logic and `preflight_run_id` and `validate_run_id` - the real publish paths promote prepared artifacts instead of rebuilding them again -- For legacy stable correction releases like `YYYY.M.D-N`, the post-publish verifier +- For stable correction releases like `YYYY.M.D-N`, the post-publish verifier also checks the same temp-prefix upgrade path from `YYYY.M.D` to `YYYY.M.D-N` so release corrections cannot silently leave older global installs on the base stable payload diff --git a/docs/tools/index.md b/docs/tools/index.md index 956918a4240..f38b3e9a302 100644 --- a/docs/tools/index.md +++ b/docs/tools/index.md @@ -60,7 +60,6 @@ These tools ship with OpenClaw and are available without installing any plugins: | `read` / `write` / `edit` | File I/O in the workspace | | | `apply_patch` | Multi-hunk file patches | [Apply Patch](/tools/apply-patch) | | `message` | Send messages across all channels | [Agent Send](/tools/agent-send) | -| `canvas` | Drive node Canvas (present, eval, snapshot) | | | `nodes` | Discover and target paired devices | | | `cron` / `gateway` | Manage scheduled jobs; inspect, patch, restart, or update the gateway | | | `image` / `image_generate` | Analyze or generate images | [Image Generation](/tools/image-generation) | @@ -104,6 +103,7 @@ legacy `tools.bash.*` aliases normalize to the same protected exec paths. Plugins can register additional tools. Some examples: +- [Canvas](/plugins/reference/canvas) — experimental bundled plugin for node Canvas control and A2UI rendering - [Diffs](/tools/diffs) — diff viewer and renderer - [LLM Task](/tools/llm-task) — JSON-only LLM step for structured output - [Lobster](/tools/lobster) — typed workflow runtime with resumable approvals @@ -195,7 +195,7 @@ Use `group:*` shorthands in allow/deny lists: | `group:sessions` | sessions_list, sessions_history, sessions_send, sessions_spawn, sessions_yield, subagents, session_status | | `group:memory` | memory_search, memory_get | | `group:web` | web_search, x_search, web_fetch | -| `group:ui` | browser, canvas | +| `group:ui` | browser, canvas when the bundled Canvas plugin is enabled | | `group:automation` | heartbeat_respond, cron, gateway | | `group:messaging` | message | | `group:nodes` | nodes | diff --git a/docs/tools/plugin.md b/docs/tools/plugin.md index e9dd139968b..c13a43c5dd4 100644 --- a/docs/tools/plugin.md +++ b/docs/tools/plugin.md @@ -594,10 +594,6 @@ When `openclaw update` runs on the beta channel, default-line npm and ClawHub plugin records try `@beta` first and fall back to default/latest when no plugin beta release exists. Exact versions and explicit tags stay pinned. -OpenClaw does not yet expose LTS or monthly support plugin channels. Planned -monthly support-line work will need plugin npm and ClawHub tags to follow the -same support line as the core package instead of silently using `latest`. - `--pin` is npm-only. It is not supported with `--marketplace`, because marketplace installs persist marketplace source metadata instead of an npm spec. diff --git a/docs/tools/subagents.md b/docs/tools/subagents.md index 9a2ab0a08d3..99584b9c13b 100644 --- a/docs/tools/subagents.md +++ b/docs/tools/subagents.md @@ -14,11 +14,6 @@ when finished, **announce** their result back to the requester chat channel. Each sub-agent run is tracked as a [background task](/automation/tasks). -For the security model behind delegation, see -[Multi-agent and sub-agent boundaries](/gateway/security#multi-agent-and-sub-agent-boundaries). -Sub-agents are useful isolation and workflow units, but they are not a hostile -multi-tenant authorization boundary inside one shared Gateway. - Primary goals: - Parallelize "research / long task / slow tool" work without blocking the main run. diff --git a/docs/tools/web.md b/docs/tools/web.md index 02024e16c58..208074028ae 100644 --- a/docs/tools/web.md +++ b/docs/tools/web.md @@ -231,13 +231,12 @@ fallbacks after its dedicated web-search config and `GEMINI_API_KEY`. See the provider pages for examples. `tools.web.search.provider` is validated against the web-search provider ids -declared by bundled and installed plugin manifests, plus known installable -provider plugins. A typo such as `"brvae"` fails config validation instead of -silently falling back to auto-detection. If the configured provider is known but -the owning plugin is unavailable, OpenClaw keeps startup resilient and reports a -warning so you can run `openclaw doctor --fix` to install or enable the plugin. -The same warning behavior applies to stale plugin evidence, such as a leftover -`plugins.entries.` block after uninstalling a third-party plugin. +declared by bundled and installed plugin manifests. A typo such as `"brvae"` +fails config validation instead of silently falling back to auto-detection. If a +configured provider only has stale plugin evidence, such as a leftover +`plugins.entries.` block after uninstalling a third-party plugin, +OpenClaw keeps startup resilient and reports a warning so you can reinstall the +plugin or run `openclaw doctor --fix` to clean up the stale config. `web_fetch` fallback provider selection is separate: diff --git a/extensions/canvas/cli-metadata.ts b/extensions/canvas/cli-metadata.ts new file mode 100644 index 00000000000..0af33a762db --- /dev/null +++ b/extensions/canvas/cli-metadata.ts @@ -0,0 +1,18 @@ +import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; + +export default definePluginEntry({ + id: "canvas", + name: "Canvas", + description: "Experimental Canvas control and A2UI rendering surfaces for paired nodes.", + register(api) { + api.registerNodeCliFeature(() => {}, { + descriptors: [ + { + name: "canvas", + description: "Capture or render canvas content from a paired node", + hasSubcommands: true, + }, + ], + }); + }, +}); diff --git a/extensions/canvas/index.ts b/extensions/canvas/index.ts new file mode 100644 index 00000000000..f99d4165eef --- /dev/null +++ b/extensions/canvas/index.ts @@ -0,0 +1,98 @@ +import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; +import { createDefaultCanvasCliDependencies, registerNodesCanvasCommands } from "./src/cli.js"; +import { canvasConfigSchema, isCanvasHostEnabled } from "./src/config.js"; +import { resolveCanvasHttpPathToLocalPath } from "./src/documents.js"; +import { A2UI_PATH, CANVAS_HOST_PATH, CANVAS_WS_PATH } from "./src/host/a2ui.js"; +import { createCanvasHttpRouteHandler } from "./src/http-route.js"; +import { createCanvasTool } from "./src/tool.js"; + +const CANVAS_NODE_COMMANDS = [ + "canvas.present", + "canvas.hide", + "canvas.navigate", + "canvas.eval", + "canvas.snapshot", + "canvas.a2ui.push", + "canvas.a2ui.pushJSONL", + "canvas.a2ui.reset", +]; + +export default definePluginEntry({ + id: "canvas", + name: "Canvas", + description: "Experimental Canvas control and A2UI rendering surfaces for paired nodes.", + configSchema: canvasConfigSchema, + reload: { + restartPrefixes: ["plugins.enabled", "plugins.allow", "plugins.deny", "plugins.entries.canvas"], + }, + register(api) { + if (isCanvasHostEnabled(api.config)) { + const httpRouteHandler = createCanvasHttpRouteHandler({ + config: api.config, + pluginConfig: api.pluginConfig, + runtime: { + log: (...args) => api.logger.info(args.map(String).join(" ")), + error: (...args) => api.logger.error(args.map(String).join(" ")), + exit: (code) => { + throw new Error(`canvas host requested process exit ${code}`); + }, + }, + }); + const nodeCapability = { surface: "canvas" }; + api.registerHttpRoute({ + path: A2UI_PATH, + auth: "plugin", + match: "prefix", + nodeCapability, + handler: httpRouteHandler.handleHttpRequest, + }); + api.registerHttpRoute({ + path: CANVAS_HOST_PATH, + auth: "plugin", + match: "prefix", + nodeCapability, + handler: httpRouteHandler.handleHttpRequest, + }); + api.registerHttpRoute({ + path: CANVAS_WS_PATH, + auth: "plugin", + match: "exact", + nodeCapability, + handler: httpRouteHandler.handleHttpRequest, + handleUpgrade: httpRouteHandler.handleUpgrade, + }); + api.registerService({ + id: "canvas-host", + start: () => {}, + stop: () => httpRouteHandler.close(), + }); + api.registerHostedMediaResolver((mediaUrl) => resolveCanvasHttpPathToLocalPath(mediaUrl)); + } + api.registerNodeInvokePolicy({ + commands: CANVAS_NODE_COMMANDS, + defaultPlatforms: ["ios", "android", "macos", "windows", "unknown"], + foregroundRestrictedOnIos: true, + handle: (ctx) => ctx.invokeNode(), + }); + api.registerTool((ctx) => + createCanvasTool({ + config: ctx.runtimeConfig ?? ctx.config, + workspaceDir: ctx.workspaceDir, + }), + ); + api.registerNodeCliFeature( + ({ program }) => { + registerNodesCanvasCommands(program, createDefaultCanvasCliDependencies()); + }, + { + descriptors: [ + { + name: "canvas", + description: "Capture or render canvas content from a paired node", + hasSubcommands: true, + }, + ], + }, + ); + }, +}); diff --git a/extensions/canvas/openclaw.plugin.json b/extensions/canvas/openclaw.plugin.json new file mode 100644 index 00000000000..656f70695f8 --- /dev/null +++ b/extensions/canvas/openclaw.plugin.json @@ -0,0 +1,40 @@ +{ + "id": "canvas", + "activation": { + "onStartup": true + }, + "enabledByDefault": true, + "name": "Canvas", + "description": "Experimental Canvas control and A2UI rendering surfaces for paired nodes.", + "contracts": { + "tools": ["canvas"] + }, + "configContracts": { + "compatibilityMigrationPaths": ["canvasHost"] + }, + "configSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "host": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean" + }, + "root": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 1 + }, + "liveReload": { + "type": "boolean" + } + } + } + } + } +} diff --git a/extensions/canvas/package.json b/extensions/canvas/package.json new file mode 100644 index 00000000000..fded840fbaf --- /dev/null +++ b/extensions/canvas/package.json @@ -0,0 +1,22 @@ +{ + "name": "@openclaw/canvas-plugin", + "version": "2026.5.6", + "private": true, + "description": "OpenClaw Canvas plugin", + "type": "module", + "devDependencies": { + "@openclaw/plugin-sdk": "workspace:*" + }, + "dependencies": { + "typebox": "^1.0.58" + }, + "openclaw": { + "extensions": [ + "./index.ts" + ], + "assetScripts": { + "build": "node scripts/bundle-a2ui.mjs", + "copy": "node scripts/copy-a2ui.mjs" + } + } +} diff --git a/extensions/canvas/runtime-api.ts b/extensions/canvas/runtime-api.ts new file mode 100644 index 00000000000..9962ec980b5 --- /dev/null +++ b/extensions/canvas/runtime-api.ts @@ -0,0 +1,42 @@ +export { + canvasConfigSchema, + isCanvasHostEnabled, + isCanvasPluginEnabled, + parseCanvasPluginConfig, + resolveCanvasHostConfig, + type CanvasHostConfig, + type CanvasPluginConfig, +} from "./src/config.js"; +export { + A2UI_PATH, + CANVAS_HOST_PATH, + CANVAS_WS_PATH, + handleA2uiHttpRequest, +} from "./src/host/a2ui.js"; +export { + createCanvasHostHandler, + startCanvasHost, + type CanvasHostHandler, + type CanvasHostServer, +} from "./src/host/server.js"; +export { + buildCanvasDocumentEntryUrl, + createCanvasDocument, + resolveCanvasDocumentAssets, + resolveCanvasDocumentDir, + resolveCanvasHttpPathToLocalPath, +} from "./src/documents.js"; +export { + registerNodesCanvasCommands, + type CanvasCliDependencies, + type CanvasNodesRpcOpts, +} from "./src/cli.js"; +export { canvasSnapshotTempPath, parseCanvasSnapshotPayload } from "./src/cli-helpers.js"; +export { + buildCanvasScopedHostUrl, + CANVAS_CAPABILITY_PATH_PREFIX, + CANVAS_CAPABILITY_TTL_MS, + mintCanvasCapabilityToken, + normalizeCanvasScopedUrl, +} from "./src/capability.js"; +export { resolveCanvasHostUrl } from "./src/host-url.js"; diff --git a/extensions/canvas/scripts/bundle-a2ui.mjs b/extensions/canvas/scripts/bundle-a2ui.mjs new file mode 100644 index 00000000000..1407bf23647 --- /dev/null +++ b/extensions/canvas/scripts/bundle-a2ui.mjs @@ -0,0 +1,228 @@ +#!/usr/bin/env node + +import { spawnSync } from "node:child_process"; +import { createHash } from "node:crypto"; +import { existsSync } from "node:fs"; +import fs from "node:fs/promises"; +import { createRequire } from "node:module"; +import path from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; +import { resolvePnpmRunner } from "../../../scripts/pnpm-runner.mjs"; + +const pluginDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const rootDir = path.resolve(pluginDir, "../.."); +const require = createRequire(import.meta.url); +const hashFile = path.join(pluginDir, "src", "host", "a2ui", ".bundle.hash"); +const outputFile = path.join(pluginDir, "src", "host", "a2ui", "a2ui.bundle.js"); +const a2uiAppDir = path.join(pluginDir, "src", "host", "a2ui-app"); +const rootPackageFile = path.join(rootDir, "package.json"); +const lockFile = path.join(rootDir, "pnpm-lock.yaml"); +const repoInputPaths = [rootPackageFile, lockFile, a2uiAppDir]; +const relativeRepoInputPaths = repoInputPaths.map((inputPath) => + normalizePath(path.relative(rootDir, inputPath)), +); + +function fail(message) { + console.error(message); + console.error("A2UI bundling failed. Re-run with: pnpm canvas:a2ui:bundle"); + console.error("If this persists, verify pnpm deps and try again."); + process.exit(1); +} + +async function pathExists(targetPath) { + try { + await fs.stat(targetPath); + return true; + } catch { + return false; + } +} + +function normalizePath(filePath) { + return filePath.split(path.sep).join("/"); +} + +export function isBundleHashInputPath(filePath, repoRoot = rootDir) { + return Boolean(filePath && repoRoot); +} + +export function getLocalRolldownCliCandidates(repoRoot = rootDir) { + return [ + path.join(repoRoot, "node_modules", "rolldown", "bin", "cli.mjs"), + path.join(repoRoot, "node_modules", ".pnpm", "node_modules", "rolldown", "bin", "cli.mjs"), + path.join( + repoRoot, + "node_modules", + ".pnpm", + "rolldown@1.0.0-rc.12", + "node_modules", + "rolldown", + "bin", + "cli.mjs", + ), + ]; +} + +export function getBundleHashRepoInputPaths(repoRoot = rootDir) { + return [ + path.join(repoRoot, "package.json"), + path.join(repoRoot, "pnpm-lock.yaml"), + path.join(repoRoot, "extensions", "canvas", "src", "host", "a2ui-app"), + ]; +} + +export function getBundleHashInputPaths(repoRoot = rootDir) { + return getBundleHashRepoInputPaths(repoRoot); +} + +export function compareNormalizedPaths(left, right) { + const normalizedLeft = normalizePath(left); + const normalizedRight = normalizePath(right); + if (normalizedLeft < normalizedRight) { + return -1; + } + if (normalizedLeft > normalizedRight) { + return 1; + } + return 0; +} + +async function walkFiles(entryPath, files) { + if (!isBundleHashInputPath(entryPath)) { + return; + } + const stat = await fs.stat(entryPath); + if (!stat.isDirectory()) { + files.push(entryPath); + return; + } + const entries = await fs.readdir(entryPath); + for (const entry of entries) { + await walkFiles(path.join(entryPath, entry), files); + } +} + +function listTrackedInputFiles() { + const result = spawnSync("git", ["ls-files", "--", ...relativeRepoInputPaths], { + cwd: rootDir, + encoding: "utf8", + stdio: ["ignore", "pipe", "pipe"], + }); + if (result.status !== 0) { + return null; + } + const trackedFiles = result.stdout + .split("\n") + .filter(Boolean) + .map((filePath) => path.join(rootDir, filePath)) + .filter((filePath) => existsSync(filePath)) + .filter((filePath) => isBundleHashInputPath(filePath)); + return trackedFiles; +} + +async function computeHash() { + let files = listTrackedInputFiles(); + if (!files) { + files = []; + for (const inputPath of getBundleHashRepoInputPaths(rootDir)) { + await walkFiles(inputPath, files); + } + } + files = [...new Set(files)].toSorted(compareNormalizedPaths); + + const hash = createHash("sha256"); + for (const filePath of files) { + hash.update(normalizePath(path.relative(rootDir, filePath))); + hash.update("\0"); + hash.update(await fs.readFile(filePath)); + hash.update("\0"); + } + return hash.digest("hex"); +} + +function runStep(command, args, options = {}) { + const result = spawnSync(command, args, { + cwd: rootDir, + env: process.env, + stdio: "inherit", + ...options, + }); + if (result.status !== 0) { + process.exit(result.status ?? 1); + } +} + +function runPnpm(pnpmArgs) { + const runner = resolvePnpmRunner({ + pnpmArgs, + nodeExecPath: process.execPath, + npmExecPath: process.env.npm_execpath, + comSpec: process.env.ComSpec, + platform: process.platform, + }); + runStep(runner.command, runner.args, { + shell: runner.shell, + windowsVerbatimArguments: runner.windowsVerbatimArguments, + }); +} + +async function main() { + const hasAppDir = await pathExists(a2uiAppDir); + const hasOutputFile = await pathExists(outputFile); + let hasA2uiPackage = true; + try { + require.resolve("@a2ui/lit"); + require.resolve("@a2ui/lit/ui"); + } catch { + hasA2uiPackage = false; + } + if (!hasA2uiPackage || !hasAppDir) { + if (hasOutputFile) { + console.log("A2UI package missing; keeping prebuilt bundle."); + return; + } + if (process.env.OPENCLAW_SPARSE_PROFILE || process.env.OPENCLAW_A2UI_SKIP_MISSING === "1") { + console.error( + "A2UI package missing; skipping bundle because OPENCLAW_A2UI_SKIP_MISSING=1 or OPENCLAW_SPARSE_PROFILE is set.", + ); + return; + } + fail(`A2UI package missing and no prebuilt bundle found at: ${outputFile}`); + } + + const currentHash = await computeHash(); + if (await pathExists(hashFile)) { + const previousHash = (await fs.readFile(hashFile, "utf8")).trim(); + if (previousHash === currentHash && hasOutputFile) { + console.log("A2UI bundle up to date; skipping."); + return; + } + } + + const localRolldownCliCandidates = getLocalRolldownCliCandidates(rootDir); + const localRolldownCli = ( + await Promise.all( + localRolldownCliCandidates.map(async (candidate) => + (await pathExists(candidate)) ? candidate : null, + ), + ) + ).find(Boolean); + + if (localRolldownCli) { + runStep(process.execPath, [ + localRolldownCli, + "-c", + path.join(a2uiAppDir, "rolldown.config.mjs"), + ]); + } else { + runPnpm(["-s", "exec", "rolldown", "-c", path.join(a2uiAppDir, "rolldown.config.mjs")]); + } + + await fs.writeFile(hashFile, `${currentHash}\n`, "utf8"); +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + await main().catch((error) => { + fail(error instanceof Error ? error.message : String(error)); + }); +} diff --git a/extensions/canvas/scripts/copy-a2ui.d.mts b/extensions/canvas/scripts/copy-a2ui.d.mts new file mode 100644 index 00000000000..76f35c91c15 --- /dev/null +++ b/extensions/canvas/scripts/copy-a2ui.d.mts @@ -0,0 +1,4 @@ +export declare function copyA2uiAssets(params: { + srcDir: string; + outDir: string; +}): Promise; diff --git a/scripts/canvas-a2ui-copy.ts b/extensions/canvas/scripts/copy-a2ui.mjs similarity index 72% rename from scripts/canvas-a2ui-copy.ts rename to extensions/canvas/scripts/copy-a2ui.mjs index 36ed4fcaeec..441953fd844 100644 --- a/scripts/canvas-a2ui-copy.ts +++ b/extensions/canvas/scripts/copy-a2ui.mjs @@ -1,20 +1,23 @@ +#!/usr/bin/env node + import fs from "node:fs/promises"; import path from "node:path"; import { fileURLToPath, pathToFileURL } from "node:url"; -const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const pluginDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const rootDir = path.resolve(pluginDir, "../.."); function getA2uiPaths(env = process.env) { - const srcDir = env.OPENCLAW_A2UI_SRC_DIR ?? path.join(repoRoot, "src", "canvas-host", "a2ui"); - const outDir = env.OPENCLAW_A2UI_OUT_DIR ?? path.join(repoRoot, "dist", "canvas-host", "a2ui"); + const srcDir = env.OPENCLAW_A2UI_SRC_DIR ?? path.join(pluginDir, "src", "host", "a2ui"); + const outDir = env.OPENCLAW_A2UI_OUT_DIR ?? path.join(rootDir, "dist", "canvas-host", "a2ui"); return { srcDir, outDir }; } -function shouldSkipMissingA2uiAssets(env = process.env): boolean { +function shouldSkipMissingA2uiAssets(env = process.env) { return env.OPENCLAW_A2UI_SKIP_MISSING === "1" || Boolean(env.OPENCLAW_SPARSE_PROFILE); } -export async function copyA2uiAssets({ srcDir, outDir }: { srcDir: string; outDir: string }) { +export async function copyA2uiAssets({ srcDir, outDir }) { const skipMissing = shouldSkipMissingA2uiAssets(process.env); try { await fs.stat(path.join(srcDir, "index.html")); diff --git a/extensions/canvas/setup-api.ts b/extensions/canvas/setup-api.ts new file mode 100644 index 00000000000..56abb3b0b03 --- /dev/null +++ b/extensions/canvas/setup-api.ts @@ -0,0 +1,11 @@ +import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; +import { migrateLegacyCanvasHostConfig } from "./src/config-migration.js"; + +export default definePluginEntry({ + id: "canvas", + name: "Canvas Setup", + description: "Lightweight Canvas setup hooks", + register(api) { + api.registerConfigMigration((config) => migrateLegacyCanvasHostConfig(config)); + }, +}); diff --git a/src/cli/nodes-cli/a2ui-jsonl.ts b/extensions/canvas/src/a2ui-jsonl.ts similarity index 100% rename from src/cli/nodes-cli/a2ui-jsonl.ts rename to extensions/canvas/src/a2ui-jsonl.ts diff --git a/extensions/canvas/src/capability.ts b/extensions/canvas/src/capability.ts new file mode 100644 index 00000000000..bcf2472d9b0 --- /dev/null +++ b/extensions/canvas/src/capability.ts @@ -0,0 +1,25 @@ +import { + buildPluginNodeCapabilityScopedHostUrl, + DEFAULT_PLUGIN_NODE_CAPABILITY_TTL_MS, + mintPluginNodeCapabilityToken, + normalizePluginNodeCapabilityScopedUrl, + PLUGIN_NODE_CAPABILITY_PATH_PREFIX, + type NormalizedPluginNodeCapabilityUrl, +} from "openclaw/plugin-sdk/gateway-runtime"; + +export const CANVAS_CAPABILITY_PATH_PREFIX = PLUGIN_NODE_CAPABILITY_PATH_PREFIX; +export const CANVAS_CAPABILITY_TTL_MS = DEFAULT_PLUGIN_NODE_CAPABILITY_TTL_MS; + +export type NormalizedCanvasScopedUrl = NormalizedPluginNodeCapabilityUrl; + +export function mintCanvasCapabilityToken(): string { + return mintPluginNodeCapabilityToken(); +} + +export function buildCanvasScopedHostUrl(baseUrl: string, capability: string): string | undefined { + return buildPluginNodeCapabilityScopedHostUrl(baseUrl, capability); +} + +export function normalizeCanvasScopedUrl(rawUrl: string): NormalizedCanvasScopedUrl { + return normalizePluginNodeCapabilityScopedUrl(rawUrl); +} diff --git a/extensions/canvas/src/cli-helpers.ts b/extensions/canvas/src/cli-helpers.ts new file mode 100644 index 00000000000..fb2c3b120ab --- /dev/null +++ b/extensions/canvas/src/cli-helpers.ts @@ -0,0 +1,42 @@ +import { randomUUID } from "node:crypto"; +import fs from "node:fs"; +import * as path from "node:path"; +import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/security-runtime"; +import { asRecord, readStringValue } from "openclaw/plugin-sdk/text-runtime"; + +type CanvasSnapshotPayload = { + format: string; + base64: string; +}; + +export function parseCanvasSnapshotPayload(value: unknown): CanvasSnapshotPayload { + const obj = asRecord(value); + const format = readStringValue(obj.format); + const base64 = readStringValue(obj.base64); + if (!format || !base64) { + throw new Error("invalid canvas.snapshot payload"); + } + return { format, base64 }; +} + +function resolveCliName(): string { + return "openclaw"; +} + +function resolveTempPathParts(opts: { ext: string; tmpDir?: string; id?: string }) { + const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir(); + if (!opts.tmpDir) { + fs.mkdirSync(tmpDir, { recursive: true, mode: 0o700 }); + } + return { + tmpDir, + id: opts.id ?? randomUUID(), + ext: opts.ext.startsWith(".") ? opts.ext : `.${opts.ext}`, + }; +} + +export function canvasSnapshotTempPath(opts: { ext: string; tmpDir?: string; id?: string }) { + const { tmpDir, id, ext } = resolveTempPathParts(opts); + const cliName = resolveCliName(); + return path.join(tmpDir, `${cliName}-canvas-snapshot-${id}${ext}`); +} diff --git a/extensions/canvas/src/cli.test.ts b/extensions/canvas/src/cli.test.ts new file mode 100644 index 00000000000..2dd089a91a1 --- /dev/null +++ b/extensions/canvas/src/cli.test.ts @@ -0,0 +1,75 @@ +import { Command } from "commander"; +import { describe, expect, it, vi } from "vitest"; +import { registerNodesCanvasCommands, type CanvasCliDependencies } from "./cli.js"; + +function createCanvasCliDeps() { + const writtenFiles: Array<{ filePath: string; base64: string }> = []; + const runtime = { + log: vi.fn(), + error: vi.fn(), + exit: vi.fn((code: number) => { + throw new Error(`exit ${code}`); + }), + writeJson: vi.fn(), + }; + const deps: CanvasCliDependencies = { + defaultRuntime: runtime, + nodesCallOpts: (cmd) => + cmd + .option("--url ", "Gateway WebSocket URL") + .option("--token ", "Gateway token") + .option("--timeout ", "Timeout in ms", "10000") + .option("--json", "Output JSON", false), + runNodesCommand: async (_label, action) => { + await action(); + }, + getNodesTheme: () => ({ ok: (value) => value }), + parseTimeoutMs: (raw) => (typeof raw === "string" ? Number.parseInt(raw, 10) : undefined), + resolveNodeId: async (opts) => opts.node ?? "ios-node", + buildNodeInvokeParams: ({ nodeId, command, params, timeoutMs }) => ({ + nodeId, + command, + params, + ...(typeof timeoutMs === "number" ? { timeoutMs } : {}), + }), + callGatewayCli: vi.fn(async () => ({ + payload: { + format: "png", + base64: "aGk=", + }, + })), + writeBase64ToFile: async (filePath, base64) => { + writtenFiles.push({ filePath, base64 }); + }, + shortenHomePath: (filePath) => filePath, + }; + return { deps, runtime, writtenFiles }; +} + +describe("canvas CLI", () => { + it("registers under nodes and captures a snapshot media path", async () => { + const program = new Command(); + program.exitOverride(); + const nodes = program.command("nodes"); + const { deps, runtime, writtenFiles } = createCanvasCliDeps(); + + registerNodesCanvasCommands(nodes, deps); + await program.parseAsync(["nodes", "canvas", "snapshot", "--node", "ios-node"], { + from: "user", + }); + + expect(deps.callGatewayCli).toHaveBeenCalledWith( + "node.invoke", + expect.objectContaining({ node: "ios-node" }), + expect.objectContaining({ + nodeId: "ios-node", + command: "canvas.snapshot", + params: expect.objectContaining({ format: "jpeg" }), + }), + ); + expect(writtenFiles).toHaveLength(1); + expect(writtenFiles[0]?.filePath).toMatch(/openclaw-canvas-snapshot-.*\.png$/); + expect(writtenFiles[0]?.base64).toBe("aGk="); + expect(runtime.log).toHaveBeenCalledWith(expect.stringMatching(/^MEDIA:.*\.png$/)); + }); +}); diff --git a/extensions/canvas/src/cli.ts b/extensions/canvas/src/cli.ts new file mode 100644 index 00000000000..b75369c455f --- /dev/null +++ b/extensions/canvas/src/cli.ts @@ -0,0 +1,428 @@ +import { randomUUID } from "node:crypto"; +import fs from "node:fs/promises"; +import type { Command } from "commander"; +import { runCommandWithRuntime, theme } from "openclaw/plugin-sdk/cli-runtime"; +import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; +import { + callGatewayFromCli, + resolveNodeFromNodeList, + type NodeMatchCandidate, +} from "openclaw/plugin-sdk/gateway-runtime"; +import { defaultRuntime } from "openclaw/plugin-sdk/runtime"; +import { + normalizeLowercaseStringOrEmpty, + normalizeOptionalString, + shortenHomePath, +} from "openclaw/plugin-sdk/text-runtime"; +import { buildA2UITextJsonl, validateA2UIJsonl } from "./a2ui-jsonl.js"; +import { canvasSnapshotTempPath, parseCanvasSnapshotPayload } from "./cli-helpers.js"; + +export type CanvasCliRuntime = { + log: (message: string) => void; + error: (message: string) => void; + exit: (code: number) => void; + writeJson: (value: unknown) => void; +}; + +export type CanvasNodesRpcOpts = { + url?: string; + token?: string; + timeout?: string; + json?: boolean; + node?: string; + invokeTimeout?: string; + target?: string; + x?: string; + y?: string; + width?: string; + height?: string; + js?: string; + jsonl?: string; + text?: string; + format?: string; + maxWidth?: string; + quality?: string; +}; + +export type CanvasCliDependencies = { + defaultRuntime: CanvasCliRuntime; + nodesCallOpts: (cmd: Command, defaults?: { timeoutMs?: number }) => Command; + runNodesCommand: (label: string, action: () => Promise) => Promise | void; + getNodesTheme: () => { ok: (value: string) => string }; + parseTimeoutMs: (raw: unknown) => number | undefined; + resolveNodeId: (opts: CanvasNodesRpcOpts, query: string) => Promise; + buildNodeInvokeParams: (params: { + nodeId: string; + command: string; + params?: Record; + timeoutMs?: number; + }) => Record; + callGatewayCli: ( + method: string, + opts: CanvasNodesRpcOpts, + params?: unknown, + callOpts?: { transportTimeoutMs?: number }, + ) => Promise; + writeBase64ToFile: (filePath: string, base64: string) => Promise; + shortenHomePath: (filePath: string) => string; +}; + +type CanvasNodeCandidate = NodeMatchCandidate; + +function parseTimeoutMs(raw: unknown): number | undefined { + if (raw === undefined || raw === null) { + return undefined; + } + const value = + typeof raw === "number" || typeof raw === "bigint" + ? Number(raw) + : typeof raw === "string" && raw.trim() + ? Number.parseInt(raw.trim(), 10) + : Number.NaN; + return Number.isFinite(value) ? value : undefined; +} + +function parseNodeCandidates(raw: unknown): CanvasNodeCandidate[] { + const payload = + raw && typeof raw === "object" ? (raw as { nodes?: unknown; paired?: unknown }) : {}; + const list = Array.isArray(payload.nodes) + ? payload.nodes + : Array.isArray(payload.paired) + ? payload.paired + : []; + return list + .map((entry) => { + if (!entry || typeof entry !== "object") { + return null; + } + const node = entry as { + nodeId?: unknown; + displayName?: unknown; + remoteIp?: unknown; + connected?: unknown; + clientId?: unknown; + }; + return typeof node.nodeId === "string" + ? { + nodeId: node.nodeId, + ...(typeof node.displayName === "string" && { displayName: node.displayName }), + ...(typeof node.remoteIp === "string" && { remoteIp: node.remoteIp }), + ...(typeof node.connected === "boolean" && { connected: node.connected }), + ...(typeof node.clientId === "string" && { clientId: node.clientId }), + } + : null; + }) + .filter((entry): entry is CanvasNodeCandidate => entry !== null); +} + +function unauthorizedHintForMessage(message: string): string | null { + const haystack = normalizeLowercaseStringOrEmpty(message); + if ( + haystack.includes("unauthorizedclient") || + haystack.includes("bridge client is not authorized") || + haystack.includes("unsigned bridge clients are not allowed") + ) { + return [ + "peekaboo bridge rejected the client.", + "sign the peekaboo CLI (TeamID Y5PE65HELJ) or launch the host with", + "PEEKABOO_ALLOW_UNSIGNED_SOCKET_CLIENTS=1 for local dev.", + ].join(" "); + } + return null; +} + +export function createDefaultCanvasCliDependencies(): CanvasCliDependencies { + const nodesCallOpts = (cmd: Command, defaults?: { timeoutMs?: number }) => + cmd + .option( + "--url ", + "Gateway WebSocket URL (defaults to gateway.remote.url when configured)", + ) + .option("--token ", "Gateway token (if required)") + .option("--timeout ", "Timeout in ms", String(defaults?.timeoutMs ?? 10_000)) + .option("--json", "Output JSON", false); + const callGatewayCli: CanvasCliDependencies["callGatewayCli"] = async ( + method, + opts, + params, + callOpts, + ) => { + const timeout = String(callOpts?.transportTimeoutMs ?? opts.timeout ?? 10_000); + return await callGatewayFromCli(method, { ...opts, timeout }, params, { + progress: opts.json !== true, + }); + }; + return { + defaultRuntime, + nodesCallOpts, + runNodesCommand: (label, action) => + runCommandWithRuntime(defaultRuntime, action, (err) => { + const message = formatErrorMessage(err); + defaultRuntime.error(theme.error(`nodes ${label} failed: ${message}`)); + const hint = unauthorizedHintForMessage(message); + if (hint) { + defaultRuntime.error(theme.warn(hint)); + } + defaultRuntime.exit(1); + }), + getNodesTheme: () => ({ ok: theme.success }), + parseTimeoutMs, + resolveNodeId: async (opts, query) => { + let raw: unknown; + try { + raw = await callGatewayCli("node.list", opts, {}); + } catch { + raw = await callGatewayCli("node.pair.list", opts, {}); + } + return resolveNodeFromNodeList(parseNodeCandidates(raw), query).nodeId; + }, + buildNodeInvokeParams: ({ nodeId, command, params, timeoutMs }) => ({ + nodeId, + command, + params, + idempotencyKey: randomUUID(), + ...(typeof timeoutMs === "number" && Number.isFinite(timeoutMs) ? { timeoutMs } : {}), + }), + callGatewayCli, + writeBase64ToFile: async (filePath, base64) => + await fs.writeFile(filePath, Buffer.from(base64, "base64")), + shortenHomePath, + }; +} + +async function invokeCanvas( + deps: CanvasCliDependencies, + opts: CanvasNodesRpcOpts, + command: string, + params?: Record, +) { + const nodeId = await deps.resolveNodeId(opts, normalizeOptionalString(opts.node) ?? ""); + const timeoutMs = deps.parseTimeoutMs(opts.invokeTimeout); + return await deps.callGatewayCli( + "node.invoke", + opts, + deps.buildNodeInvokeParams({ + nodeId, + command, + params, + timeoutMs: typeof timeoutMs === "number" ? timeoutMs : undefined, + }), + ); +} + +export function registerNodesCanvasCommands(nodes: Command, deps: CanvasCliDependencies) { + const canvas = nodes + .command("canvas") + .description("Capture or render canvas content from a paired node"); + + deps.nodesCallOpts( + canvas + .command("snapshot") + .description("Capture a canvas snapshot (prints MEDIA:)") + .requiredOption("--node ", "Node id, name, or IP") + .option("--format ", "Image format", "jpg") + .option("--max-width ", "Max width in px (optional)") + .option("--quality <0-1>", "JPEG quality (optional)") + .option("--invoke-timeout ", "Node invoke timeout in ms (default 20000)", "20000") + .action(async (opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas snapshot", async () => { + const formatOpt = normalizeLowercaseStringOrEmpty( + normalizeOptionalString(opts.format) ?? "jpg", + ); + const formatForParams = + formatOpt === "jpg" ? "jpeg" : formatOpt === "jpeg" ? "jpeg" : "png"; + if (formatForParams !== "png" && formatForParams !== "jpeg") { + throw new Error(`invalid format: ${String(opts.format)} (expected png|jpg|jpeg)`); + } + + const maxWidth = opts.maxWidth ? Number.parseInt(opts.maxWidth, 10) : undefined; + const quality = opts.quality ? Number.parseFloat(opts.quality) : undefined; + const raw = await invokeCanvas(deps, opts, "canvas.snapshot", { + format: formatForParams, + maxWidth: Number.isFinite(maxWidth) ? maxWidth : undefined, + quality: Number.isFinite(quality) ? quality : undefined, + }); + const res = typeof raw === "object" && raw !== null ? (raw as { payload?: unknown }) : {}; + const payload = parseCanvasSnapshotPayload(res.payload); + const filePath = canvasSnapshotTempPath({ + ext: payload.format === "jpeg" ? "jpg" : payload.format, + }); + await deps.writeBase64ToFile(filePath, payload.base64); + + if (opts.json) { + deps.defaultRuntime.writeJson({ file: { path: filePath, format: payload.format } }); + return; + } + deps.defaultRuntime.log(`MEDIA:${deps.shortenHomePath(filePath)}`); + }); + }), + { timeoutMs: 60_000 }, + ); + + deps.nodesCallOpts( + canvas + .command("present") + .description("Show the canvas (optionally with a target URL/path)") + .requiredOption("--node ", "Node id, name, or IP") + .option("--target ", "Target URL/path (optional)") + .option("--x ", "Placement x coordinate") + .option("--y ", "Placement y coordinate") + .option("--width ", "Placement width") + .option("--height ", "Placement height") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas present", async () => { + const placement = { + x: opts.x ? Number.parseFloat(opts.x) : undefined, + y: opts.y ? Number.parseFloat(opts.y) : undefined, + width: opts.width ? Number.parseFloat(opts.width) : undefined, + height: opts.height ? Number.parseFloat(opts.height) : undefined, + }; + const params: Record = {}; + if (opts.target) { + params.url = opts.target; + } + if ( + Number.isFinite(placement.x) || + Number.isFinite(placement.y) || + Number.isFinite(placement.width) || + Number.isFinite(placement.height) + ) { + params.placement = placement; + } + await invokeCanvas(deps, opts, "canvas.present", params); + if (!opts.json) { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log(ok("canvas present ok")); + } + }); + }), + ); + + deps.nodesCallOpts( + canvas + .command("hide") + .description("Hide the canvas") + .requiredOption("--node ", "Node id, name, or IP") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas hide", async () => { + await invokeCanvas(deps, opts, "canvas.hide", undefined); + if (!opts.json) { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log(ok("canvas hide ok")); + } + }); + }), + ); + + deps.nodesCallOpts( + canvas + .command("navigate") + .description("Navigate the canvas to a URL") + .argument("", "Target URL/path") + .requiredOption("--node ", "Node id, name, or IP") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (url: string, opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas navigate", async () => { + await invokeCanvas(deps, opts, "canvas.navigate", { url }); + if (!opts.json) { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log(ok("canvas navigate ok")); + } + }); + }), + ); + + deps.nodesCallOpts( + canvas + .command("eval") + .description("Evaluate JavaScript in the canvas") + .argument("[js]", "JavaScript to evaluate") + .option("--js ", "JavaScript to evaluate") + .requiredOption("--node ", "Node id, name, or IP") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (jsArg: string | undefined, opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas eval", async () => { + const js = opts.js ?? jsArg; + if (!js) { + throw new Error("missing --js or "); + } + const raw = await invokeCanvas(deps, opts, "canvas.eval", { + javaScript: js, + }); + if (opts.json) { + deps.defaultRuntime.writeJson(raw); + return; + } + const payload = + typeof raw === "object" && raw !== null + ? (raw as { payload?: { result?: string } }).payload + : undefined; + if (payload?.result) { + deps.defaultRuntime.log(payload.result); + } else { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log(ok("canvas eval ok")); + } + }); + }), + ); + + const a2ui = canvas.command("a2ui").description("Render A2UI content on the canvas"); + + deps.nodesCallOpts( + a2ui + .command("push") + .description("Push A2UI JSONL to the canvas") + .option("--jsonl ", "Path to JSONL payload") + .option("--text ", "Render a quick A2UI text payload") + .requiredOption("--node ", "Node id, name, or IP") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas a2ui push", async () => { + const hasJsonl = Boolean(opts.jsonl); + const hasText = typeof opts.text === "string"; + if (hasJsonl === hasText) { + throw new Error("provide exactly one of --jsonl or --text"); + } + + const jsonl = hasText + ? buildA2UITextJsonl(opts.text ?? "") + : await fs.readFile(String(opts.jsonl), "utf8"); + const { version, messageCount } = validateA2UIJsonl(jsonl); + if (version === "v0.9") { + throw new Error( + "Detected A2UI v0.9 JSONL (createSurface). OpenClaw currently supports v0.8 only.", + ); + } + await invokeCanvas(deps, opts, "canvas.a2ui.pushJSONL", { jsonl }); + if (!opts.json) { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log( + ok( + `canvas a2ui push ok (v0.8, ${messageCount} message${messageCount === 1 ? "" : "s"})`, + ), + ); + } + }); + }), + ); + + deps.nodesCallOpts( + a2ui + .command("reset") + .description("Reset A2UI renderer state") + .requiredOption("--node ", "Node id, name, or IP") + .option("--invoke-timeout ", "Node invoke timeout in ms") + .action(async (opts: CanvasNodesRpcOpts) => { + await deps.runNodesCommand("canvas a2ui reset", async () => { + await invokeCanvas(deps, opts, "canvas.a2ui.reset", undefined); + if (!opts.json) { + const { ok } = deps.getNodesTheme(); + deps.defaultRuntime.log(ok("canvas a2ui reset ok")); + } + }); + }), + ); +} diff --git a/extensions/canvas/src/config-migration.test.ts b/extensions/canvas/src/config-migration.test.ts new file mode 100644 index 00000000000..7040eb04af5 --- /dev/null +++ b/extensions/canvas/src/config-migration.test.ts @@ -0,0 +1,75 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { describe, expect, test } from "vitest"; +import { migrateLegacyCanvasHostConfig } from "./config-migration.js"; + +describe("migrateLegacyCanvasHostConfig", () => { + test("moves legacy canvasHost into the Canvas plugin config", () => { + const result = migrateLegacyCanvasHostConfig({ + canvasHost: { + enabled: false, + root: "~/canvas", + liveReload: false, + }, + } as OpenClawConfig); + + expect(result?.changes).toEqual(["migrated canvasHost to plugins.entries.canvas.config.host"]); + expect(result?.config).toEqual({ + plugins: { + entries: { + canvas: { + config: { + host: { + enabled: false, + root: "~/canvas", + liveReload: false, + }, + }, + }, + }, + }, + }); + }); + + test("preserves plugin-owned Canvas host values when both shapes exist", () => { + const result = migrateLegacyCanvasHostConfig({ + canvasHost: { + enabled: false, + root: "~/legacy-canvas", + liveReload: false, + }, + plugins: { + entries: { + canvas: { + enabled: true, + config: { + host: { + root: "~/plugin-canvas", + }, + }, + }, + }, + }, + } as OpenClawConfig); + + expect(result?.config).toEqual({ + plugins: { + entries: { + canvas: { + enabled: true, + config: { + host: { + enabled: false, + root: "~/plugin-canvas", + liveReload: false, + }, + }, + }, + }, + }, + }); + }); + + test("ignores configs without legacy canvasHost", () => { + expect(migrateLegacyCanvasHostConfig({} as OpenClawConfig)).toBeNull(); + }); +}); diff --git a/extensions/canvas/src/config-migration.ts b/extensions/canvas/src/config-migration.ts new file mode 100644 index 00000000000..fe7180edf73 --- /dev/null +++ b/extensions/canvas/src/config-migration.ts @@ -0,0 +1,54 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { isRecord } from "openclaw/plugin-sdk/text-runtime"; + +type MutableRecord = Record; + +function readRecord(value: unknown): MutableRecord | undefined { + return isRecord(value) ? (value as MutableRecord) : undefined; +} + +function mergeHostConfig(params: { + legacyHost: MutableRecord; + existingHost: MutableRecord | undefined; +}): MutableRecord { + return { + ...params.legacyHost, + ...(params.existingHost ?? {}), + }; +} + +export function migrateLegacyCanvasHostConfig(config: OpenClawConfig): { + config: OpenClawConfig; + changes: string[]; +} | null { + const legacyHost = readRecord((config as { canvasHost?: unknown }).canvasHost); + if (!legacyHost) { + return null; + } + + const plugins = structuredClone(readRecord(config.plugins) ?? {}); + const entries = readRecord(plugins.entries) ?? {}; + const canvasEntry = readRecord(entries.canvas) ?? {}; + const canvasConfig = readRecord(canvasEntry.config) ?? {}; + const existingHost = readRecord(canvasConfig.host); + + entries.canvas = { + ...canvasEntry, + config: { + ...canvasConfig, + host: mergeHostConfig({ + legacyHost, + existingHost, + }), + }, + }; + plugins.entries = entries; + + const next = { ...config, plugins } as OpenClawConfig & { canvasHost?: unknown }; + delete next.canvasHost; + + return { + config: next, + changes: ["migrated canvasHost to plugins.entries.canvas.config.host"], + }; +} diff --git a/extensions/canvas/src/config.test.ts b/extensions/canvas/src/config.test.ts new file mode 100644 index 00000000000..69786174c04 --- /dev/null +++ b/extensions/canvas/src/config.test.ts @@ -0,0 +1,87 @@ +import { afterEach, describe, expect, it } from "vitest"; +import { + isCanvasHostEnabled, + isCanvasPluginEnabled, + parseCanvasPluginConfig, + resolveCanvasHostConfig, +} from "./config.js"; + +describe("Canvas plugin config", () => { + const originalSkipCanvasHost = process.env.OPENCLAW_SKIP_CANVAS_HOST; + + afterEach(() => { + if (originalSkipCanvasHost === undefined) { + delete process.env.OPENCLAW_SKIP_CANVAS_HOST; + } else { + process.env.OPENCLAW_SKIP_CANVAS_HOST = originalSkipCanvasHost; + } + }); + + it("parses host config from the plugin entry", () => { + expect( + parseCanvasPluginConfig({ + host: { + enabled: false, + root: "~/canvas", + port: 18793, + liveReload: false, + ignored: true, + }, + }), + ).toEqual({ + host: { + enabled: false, + root: "~/canvas", + port: 18793, + liveReload: false, + }, + }); + }); + + it("resolves host config from the plugin entry only", () => { + expect( + resolveCanvasHostConfig({ + config: { + plugins: { + entries: { + canvas: { + config: { + host: { + enabled: false, + root: "/plugin", + liveReload: false, + }, + }, + }, + }, + }, + }, + }), + ).toEqual({ + enabled: false, + root: "/plugin", + liveReload: false, + }); + }); + + it("disables the host when the bundled Canvas plugin is disabled", () => { + const config = { + plugins: { + entries: { + canvas: { + enabled: false, + }, + }, + }, + }; + expect(isCanvasPluginEnabled(config)).toBe(false); + expect(isCanvasHostEnabled(config)).toBe(false); + }); + + it("honors truthy skip-canvas env values before host registration", () => { + for (const value of ["1", "true", " yes ", "ON"]) { + process.env.OPENCLAW_SKIP_CANVAS_HOST = value; + expect(isCanvasHostEnabled()).toBe(false); + } + }); +}); diff --git a/extensions/canvas/src/config.ts b/extensions/canvas/src/config.ts new file mode 100644 index 00000000000..4176b72e172 --- /dev/null +++ b/extensions/canvas/src/config.ts @@ -0,0 +1,126 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { + normalizePluginsConfig, + resolveEffectiveEnableState, + resolvePluginConfigObject, +} from "openclaw/plugin-sdk/plugin-config-runtime"; +import { isTruthyEnvValue } from "openclaw/plugin-sdk/runtime-env"; + +export type CanvasHostConfig = { + enabled?: boolean; + root?: string; + port?: number; + liveReload?: boolean; +}; + +export type CanvasPluginConfig = { + host?: CanvasHostConfig; +}; + +type CanvasPluginConfigSchema = { + parse: (value: unknown) => CanvasPluginConfig; + uiHints: Record; +}; + +function isRecord(value: unknown): value is Record { + return Boolean(value && typeof value === "object" && !Array.isArray(value)); +} + +function readBoolean(value: unknown): boolean | undefined { + return typeof value === "boolean" ? value : undefined; +} + +function readString(value: unknown): string | undefined { + return typeof value === "string" ? value : undefined; +} + +function readPositiveInteger(value: unknown): number | undefined { + return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined; +} + +function parseCanvasHostConfig(value: unknown): CanvasHostConfig | undefined { + if (!isRecord(value)) { + return undefined; + } + return { + ...(readBoolean(value.enabled) !== undefined ? { enabled: readBoolean(value.enabled) } : {}), + ...(readString(value.root) !== undefined ? { root: readString(value.root) } : {}), + ...(readPositiveInteger(value.port) !== undefined + ? { port: readPositiveInteger(value.port) } + : {}), + ...(readBoolean(value.liveReload) !== undefined + ? { liveReload: readBoolean(value.liveReload) } + : {}), + }; +} + +export function parseCanvasPluginConfig(value: unknown): CanvasPluginConfig { + if (!isRecord(value)) { + return {}; + } + const host = parseCanvasHostConfig(value.host); + return { + ...(host ? { host } : {}), + }; +} + +export function isCanvasPluginEnabled(config?: OpenClawConfig): boolean { + if (!config) { + return true; + } + return resolveEffectiveEnableState({ + id: "canvas", + origin: "bundled", + config: normalizePluginsConfig(config.plugins), + rootConfig: config, + enabledByDefault: true, + }).enabled; +} + +export function resolveCanvasHostConfig(params: { + config?: OpenClawConfig; + pluginConfig?: Record; +}): CanvasHostConfig { + const pluginConfig = + params.pluginConfig ?? resolvePluginConfigObject(params.config, "canvas") ?? {}; + const parsedPluginConfig = parseCanvasPluginConfig(pluginConfig); + return parsedPluginConfig.host ?? {}; +} + +export function isCanvasHostEnabled(config?: OpenClawConfig): boolean { + if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_CANVAS_HOST)) { + return false; + } + if (!isCanvasPluginEnabled(config)) { + return false; + } + return resolveCanvasHostConfig({ config }).enabled !== false; +} + +export const canvasConfigSchema: CanvasPluginConfigSchema = { + parse: parseCanvasPluginConfig, + uiHints: { + host: { + label: "Canvas Host", + help: "Serves local Canvas and A2UI files for paired nodes.", + advanced: true, + }, + "host.enabled": { + label: "Canvas Host Enabled", + advanced: true, + }, + "host.root": { + label: "Canvas Host Root Directory", + help: "Directory to serve. Defaults to the OpenClaw state canvas directory.", + advanced: true, + }, + "host.port": { + label: "Canvas Host Port", + advanced: true, + }, + "host.liveReload": { + label: "Canvas Host Live Reload", + advanced: true, + }, + }, +}; diff --git a/src/gateway/canvas-documents.test.ts b/extensions/canvas/src/documents.test.ts similarity index 99% rename from src/gateway/canvas-documents.test.ts rename to extensions/canvas/src/documents.test.ts index d01b0bb18de..addd6aabc3f 100644 --- a/src/gateway/canvas-documents.test.ts +++ b/extensions/canvas/src/documents.test.ts @@ -8,7 +8,7 @@ import { resolveCanvasDocumentAssets, resolveCanvasDocumentDir, resolveCanvasHttpPathToLocalPath, -} from "./canvas-documents.js"; +} from "./documents.js"; const tempDirs: string[] = []; diff --git a/src/gateway/canvas-documents.ts b/extensions/canvas/src/documents.ts similarity index 97% rename from src/gateway/canvas-documents.ts rename to extensions/canvas/src/documents.ts index 16c084c06da..8c4a24185fc 100644 --- a/src/gateway/canvas-documents.ts +++ b/extensions/canvas/src/documents.ts @@ -1,10 +1,10 @@ import { randomUUID } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; -import { CANVAS_HOST_PATH } from "../canvas-host/a2ui.js"; -import { resolveStateDir } from "../config/paths.js"; -import { root as fsRoot, sanitizeUntrustedFileName } from "../infra/fs-safe.js"; -import { resolveUserPath } from "../utils.js"; +import { root as fsRoot, sanitizeUntrustedFileName } from "openclaw/plugin-sdk/security-runtime"; +import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; +import { resolveUserPath } from "openclaw/plugin-sdk/text-runtime"; +import { CANVAS_HOST_PATH } from "./host/a2ui.js"; type CanvasDocumentKind = "html_bundle" | "url_embed" | "document" | "image" | "video_asset"; diff --git a/src/infra/canvas-host-url.test.ts b/extensions/canvas/src/host-url.test.ts similarity index 97% rename from src/infra/canvas-host-url.test.ts rename to extensions/canvas/src/host-url.test.ts index 26ae9720e07..360060e3590 100644 --- a/src/infra/canvas-host-url.test.ts +++ b/extensions/canvas/src/host-url.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { resolveCanvasHostUrl } from "./canvas-host-url.js"; +import { resolveCanvasHostUrl } from "./host-url.js"; describe("resolveCanvasHostUrl", () => { it.each([ diff --git a/extensions/canvas/src/host-url.ts b/extensions/canvas/src/host-url.ts new file mode 100644 index 00000000000..028a798b0aa --- /dev/null +++ b/extensions/canvas/src/host-url.ts @@ -0,0 +1,15 @@ +import { + resolveHostedPluginSurfaceUrl, + type HostedPluginSurfaceUrlParams, +} from "openclaw/plugin-sdk/gateway-runtime"; + +type CanvasHostUrlParams = Omit & { + canvasPort?: number; +}; + +export function resolveCanvasHostUrl(params: CanvasHostUrlParams) { + return resolveHostedPluginSurfaceUrl({ + ...params, + port: params.canvasPort, + }); +} diff --git a/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js b/extensions/canvas/src/host/a2ui-app/bootstrap.js similarity index 87% rename from apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js rename to extensions/canvas/src/host/a2ui-app/bootstrap.js index b2d03165aa3..dfebeaed277 100644 --- a/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js +++ b/extensions/canvas/src/host/a2ui-app/bootstrap.js @@ -1,10 +1,9 @@ -import { html, css, LitElement, unsafeCSS } from "lit"; -import { repeat } from "lit/directives/repeat.js"; -import { ContextProvider } from "@lit/context"; - import { v0_8 } from "@a2ui/lit"; -import "@a2ui/lit/ui"; +import { ContextProvider } from "@lit/context"; import { themeContext } from "@openclaw/a2ui-theme-context"; +import { html, css, LitElement, unsafeCSS } from "lit"; +import "@a2ui/lit/ui"; +import { repeat } from "lit/directives/repeat.js"; const modalStyles = css` dialog { @@ -97,8 +96,12 @@ const textHintStyles = () => ({ h1: {}, h2: {}, h3: {}, h4: {}, h5: {}, body: {} const isAndroid = /Android/i.test(globalThis.navigator?.userAgent ?? ""); const cardShadow = isAndroid ? "0 2px 10px rgba(0,0,0,.18)" : "0 10px 30px rgba(0,0,0,.35)"; -const buttonShadow = isAndroid ? "0 2px 10px rgba(6, 182, 212, 0.14)" : "0 10px 25px rgba(6, 182, 212, 0.18)"; -const statusShadow = isAndroid ? "0 2px 10px rgba(0, 0, 0, 0.18)" : "0 10px 24px rgba(0, 0, 0, 0.25)"; +const buttonShadow = isAndroid + ? "0 2px 10px rgba(6, 182, 212, 0.14)" + : "0 10px 25px rgba(6, 182, 212, 0.18)"; +const statusShadow = isAndroid + ? "0 2px 10px rgba(0, 0, 0, 0.18)" + : "0 10px 24px rgba(0, 0, 0, 0.25)"; const statusBlur = isAndroid ? "10px" : "14px"; const openclawTheme = { @@ -125,7 +128,11 @@ const openclawTheme = { MultipleChoice: { container: emptyClasses(), element: emptyClasses(), label: emptyClasses() }, Row: emptyClasses(), Slider: { container: emptyClasses(), element: emptyClasses(), label: emptyClasses() }, - Tabs: { container: emptyClasses(), element: emptyClasses(), controls: { all: emptyClasses(), selected: emptyClasses() } }, + Tabs: { + container: emptyClasses(), + element: emptyClasses(), + controls: { all: emptyClasses(), selected: emptyClasses() }, + }, Text: { all: emptyClasses(), h1: emptyClasses(), @@ -235,11 +242,8 @@ class OpenClawA2UIHost extends LitElement { height: 100%; position: relative; box-sizing: border-box; - padding: - var(--openclaw-a2ui-inset-top, 0px) - var(--openclaw-a2ui-inset-right, 0px) - var(--openclaw-a2ui-inset-bottom, 0px) - var(--openclaw-a2ui-inset-left, 0px); + padding: var(--openclaw-a2ui-inset-top, 0px) var(--openclaw-a2ui-inset-right, 0px) + var(--openclaw-a2ui-inset-bottom, 0px) var(--openclaw-a2ui-inset-left, 0px); } #surfaces { @@ -264,7 +268,12 @@ class OpenClawA2UIHost extends LitElement { background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.92); - font: 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif; + font: + 13px/1.2 system-ui, + -apple-system, + BlinkMacSystemFont, + "Roboto", + sans-serif; pointer-events: none; backdrop-filter: blur(${unsafeCSS(statusBlur)}); -webkit-backdrop-filter: blur(${unsafeCSS(statusBlur)}); @@ -285,7 +294,12 @@ class OpenClawA2UIHost extends LitElement { background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.92); - font: 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif; + font: + 13px/1.2 system-ui, + -apple-system, + BlinkMacSystemFont, + "Roboto", + sans-serif; pointer-events: none; backdrop-filter: blur(${unsafeCSS(statusBlur)}); -webkit-backdrop-filter: blur(${unsafeCSS(statusBlur)}); @@ -360,7 +374,10 @@ class OpenClawA2UIHost extends LitElement { } #makeActionId() { - return globalThis.crypto?.randomUUID?.() ?? `a2ui_${Date.now()}_${Math.random().toString(16).slice(2)}`; + return ( + globalThis.crypto?.randomUUID?.() ?? + `a2ui_${Date.now()}_${Math.random().toString(16).slice(2)}` + ); } #setToast(text, kind = "ok", timeoutMs = 1400) { @@ -377,8 +394,12 @@ class OpenClawA2UIHost extends LitElement { #handleActionStatus(evt) { const detail = evt?.detail ?? null; - if (!detail || typeof detail.id !== "string") {return;} - if (!this.pendingAction || this.pendingAction.id !== detail.id) {return;} + if (!detail || typeof detail.id !== "string") { + return; + } + if (!this.pendingAction || this.pendingAction.id !== detail.id) { + return; + } if (detail.ok) { this.pendingAction = { ...this.pendingAction, phase: "sent", sentAt: Date.now() }; @@ -421,7 +442,9 @@ class OpenClawA2UIHost extends LitElement { for (const item of ctxItems) { const key = item?.key; const value = item?.value ?? null; - if (!key || !value) {continue;} + if (!key || !value) { + continue; + } if (typeof value.path === "string") { const resolved = sourceNode @@ -474,11 +497,23 @@ class OpenClawA2UIHost extends LitElement { } } catch (e) { const msg = String(e?.message ?? e); - this.pendingAction = { id: actionId, name, phase: "error", startedAt: Date.now(), error: msg }; + this.pendingAction = { + id: actionId, + name, + phase: "error", + startedAt: Date.now(), + error: msg, + }; this.#setToast(`Failed: ${msg}`, "error", 4500); } } else { - this.pendingAction = { id: actionId, name, phase: "error", startedAt: Date.now(), error: "missing native bridge" }; + this.pendingAction = { + id: actionId, + name, + phase: "error", + startedAt: Date.now(), + error: "missing native bridge", + }; this.#setToast("Failed: missing native bridge", "error", 4500); } } @@ -525,24 +560,28 @@ class OpenClawA2UIHost extends LitElement { ? `Failed: ${this.pendingAction.name}` : ""; - return html` - ${this.pendingAction && this.pendingAction.phase !== "error" - ? html`
${statusText}
` + return html` ${this.pendingAction && this.pendingAction.phase !== "error" + ? html`
+
+
${statusText}
+
` : ""} ${this.toast - ? html`
${this.toast.text}
` + ? html`
+ ${this.toast.text} +
` : ""}
- ${repeat( - this.surfaces, - ([surfaceId]) => surfaceId, - ([surfaceId, surface]) => html`` - )} -
`; + ${repeat( + this.surfaces, + ([surfaceId]) => surfaceId, + ([surfaceId, surface]) => html``, + )} + `; } } diff --git a/apps/shared/OpenClawKit/Tools/CanvasA2UI/rolldown.config.mjs b/extensions/canvas/src/host/a2ui-app/rolldown.config.mjs similarity index 80% rename from apps/shared/OpenClawKit/Tools/CanvasA2UI/rolldown.config.mjs rename to extensions/canvas/src/host/a2ui-app/rolldown.config.mjs index ccf1683d565..ab9cbfa64cc 100644 --- a/apps/shared/OpenClawKit/Tools/CanvasA2UI/rolldown.config.mjs +++ b/extensions/canvas/src/host/a2ui-app/rolldown.config.mjs @@ -1,22 +1,18 @@ -import path from "node:path"; import { existsSync } from "node:fs"; +import { createRequire } from "node:module"; +import path from "node:path"; import { fileURLToPath } from "node:url"; const here = path.dirname(fileURLToPath(import.meta.url)); const repoRoot = path.resolve(here, "../../../../.."); +const require = createRequire(import.meta.url); const uiRoot = path.resolve(repoRoot, "ui"); const fromHere = (p) => path.resolve(here, p); -const outputFile = path.resolve( - here, - "../../../../..", - "src", - "canvas-host", - "a2ui", - "a2ui.bundle.js", -); +const outputFile = path.resolve(here, "..", "a2ui", "a2ui.bundle.js"); -const a2uiLitDist = path.resolve(repoRoot, "vendor/a2ui/renderers/lit/dist/src"); -const a2uiThemeContext = path.resolve(a2uiLitDist, "0.8/ui/context/theme.js"); +const a2uiLitIndex = require.resolve("@a2ui/lit"); +const a2uiLitUi = require.resolve("@a2ui/lit/ui"); +const a2uiThemeContext = path.resolve(path.dirname(a2uiLitUi), "context/theme.js"); const uiNodeModules = path.resolve(uiRoot, "node_modules"); const repoNodeModules = path.resolve(repoRoot, "node_modules"); @@ -46,8 +42,8 @@ export default { treeshake: false, resolve: { alias: { - "@a2ui/lit": path.resolve(a2uiLitDist, "index.js"), - "@a2ui/lit/ui": path.resolve(a2uiLitDist, "0.8/ui/ui.js"), + "@a2ui/lit": a2uiLitIndex, + "@a2ui/lit/ui": a2uiLitUi, "@openclaw/a2ui-theme-context": a2uiThemeContext, "@lit/context": resolveUiDependency("@lit/context"), "@lit/context/": resolveUiDependency("@lit/context/"), diff --git a/src/canvas-host/a2ui-shared.ts b/extensions/canvas/src/host/a2ui-shared.ts similarity index 96% rename from src/canvas-host/a2ui-shared.ts rename to extensions/canvas/src/host/a2ui-shared.ts index ee1897292ef..a1f8e063bd2 100644 --- a/src/canvas-host/a2ui-shared.ts +++ b/extensions/canvas/src/host/a2ui-shared.ts @@ -1,4 +1,4 @@ -import { lowercasePreservingWhitespace } from "../shared/string-coerce.js"; +import { lowercasePreservingWhitespace } from "openclaw/plugin-sdk/text-runtime"; export const A2UI_PATH = "/__openclaw__/a2ui"; diff --git a/src/canvas-host/a2ui.ts b/extensions/canvas/src/host/a2ui.ts similarity index 88% rename from src/canvas-host/a2ui.ts rename to extensions/canvas/src/host/a2ui.ts index 4b5bb5d3c53..6e2f6dbd64a 100644 --- a/src/canvas-host/a2ui.ts +++ b/extensions/canvas/src/host/a2ui.ts @@ -2,8 +2,8 @@ import fs from "node:fs/promises"; import type { IncomingMessage, ServerResponse } from "node:http"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import { detectMime } from "../media/mime.js"; -import { lowercasePreservingWhitespace } from "../shared/string-coerce.js"; +import { detectMime } from "openclaw/plugin-sdk/media-mime"; +import { lowercasePreservingWhitespace } from "openclaw/plugin-sdk/text-runtime"; import { A2UI_PATH, injectCanvasLiveReload, isA2uiPath } from "./a2ui-shared.js"; import { resolveFileWithinRoot } from "./file-resolver.js"; @@ -24,24 +24,19 @@ async function resolveA2uiRoot(): Promise { const here = path.dirname(fileURLToPath(import.meta.url)); const entryDir = process.argv[1] ? path.dirname(path.resolve(process.argv[1])) : null; const candidates = [ - // Running from source (bun) or dist/canvas-host chunk. + // Running from source (bun) or a copied dist asset chunk. path.resolve(here, "a2ui"), // Running from dist root chunk (common launchd path). path.resolve(here, "canvas-host/a2ui"), - path.resolve(here, "../canvas-host/a2ui"), // Entry path fallbacks (helps when cwd is not the repo root). ...(entryDir - ? [ - path.resolve(entryDir, "a2ui"), - path.resolve(entryDir, "canvas-host/a2ui"), - path.resolve(entryDir, "../canvas-host/a2ui"), - ] + ? [path.resolve(entryDir, "a2ui"), path.resolve(entryDir, "canvas-host/a2ui")] : []), // Running from dist without copied assets (fallback to source). - path.resolve(here, "../../src/canvas-host/a2ui"), - path.resolve(here, "../src/canvas-host/a2ui"), + path.resolve(here, "../../extensions/canvas/src/host/a2ui"), + path.resolve(here, "../extensions/canvas/src/host/a2ui"), // Running from repo root. - path.resolve(process.cwd(), "src/canvas-host/a2ui"), + path.resolve(process.cwd(), "extensions/canvas/src/host/a2ui"), path.resolve(process.cwd(), "dist/canvas-host/a2ui"), ]; if (process.execPath) { diff --git a/extensions/canvas/src/host/a2ui/.bundle.hash b/extensions/canvas/src/host/a2ui/.bundle.hash new file mode 100644 index 00000000000..1d36360ff0e --- /dev/null +++ b/extensions/canvas/src/host/a2ui/.bundle.hash @@ -0,0 +1 @@ +9010c06425882ffb9300677df1255b4b2018edec1f03eafe78fda6bec84a0406 diff --git a/src/canvas-host/a2ui/index.html b/extensions/canvas/src/host/a2ui/index.html similarity index 100% rename from src/canvas-host/a2ui/index.html rename to extensions/canvas/src/host/a2ui/index.html diff --git a/src/canvas-host/file-resolver.test.ts b/extensions/canvas/src/host/file-resolver.test.ts similarity index 95% rename from src/canvas-host/file-resolver.test.ts rename to extensions/canvas/src/host/file-resolver.test.ts index f8877faf3d7..4ed34cfc2ba 100644 --- a/src/canvas-host/file-resolver.test.ts +++ b/extensions/canvas/src/host/file-resolver.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs/promises"; import path from "node:path"; import { afterEach, describe, expect, it } from "vitest"; -import { createTrackedTempDirs } from "../test-utils/tracked-temp-dirs.js"; +import { createTrackedTempDirs } from "../../../../src/test-utils/tracked-temp-dirs.js"; import { normalizeUrlPath, resolveFileWithinRoot } from "./file-resolver.js"; const tempDirs = createTrackedTempDirs(); diff --git a/src/canvas-host/file-resolver.ts b/extensions/canvas/src/host/file-resolver.ts similarity index 84% rename from src/canvas-host/file-resolver.ts rename to extensions/canvas/src/host/file-resolver.ts index 6f5f1a2e758..2dace0fa2c8 100644 --- a/src/canvas-host/file-resolver.ts +++ b/extensions/canvas/src/host/file-resolver.ts @@ -1,5 +1,7 @@ import path from "node:path"; -import { root as fsRoot, FsSafeError, type OpenResult } from "../infra/fs-safe.js"; +import { root as fsRoot, FsSafeError } from "openclaw/plugin-sdk/security-runtime"; + +type CanvasOpenResult = Awaited>["open"]>>; export function normalizeUrlPath(rawPath: string): string { const decoded = decodeURIComponent(rawPath || "/"); @@ -10,7 +12,7 @@ export function normalizeUrlPath(rawPath: string): string { export async function resolveFileWithinRoot( rootReal: string, urlPath: string, -): Promise { +): Promise { const normalized = normalizeUrlPath(urlPath); const rel = normalized.replace(/^\/+/, ""); if (rel.split("/").some((p) => p === "..")) { diff --git a/src/canvas-host/server.state-dir.test.ts b/extensions/canvas/src/host/server.state-dir.test.ts similarity index 88% rename from src/canvas-host/server.state-dir.test.ts rename to extensions/canvas/src/host/server.state-dir.test.ts index d274b9826ed..7749331cd4f 100644 --- a/src/canvas-host/server.state-dir.test.ts +++ b/extensions/canvas/src/host/server.state-dir.test.ts @@ -1,8 +1,8 @@ import fs from "node:fs/promises"; import path from "node:path"; +import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env"; import { beforeAll, describe, expect, it } from "vitest"; -import { defaultRuntime } from "../runtime.js"; -import { withStateDirEnv } from "../test-helpers/state-dir-env.js"; +import { withStateDirEnv } from "../../../../src/test-helpers/state-dir-env.js"; describe("canvas host state dir defaults", () => { let createCanvasHostHandler: typeof import("./server.js").createCanvasHostHandler; diff --git a/src/canvas-host/server.test.ts b/extensions/canvas/src/host/server.test.ts similarity index 98% rename from src/canvas-host/server.test.ts rename to extensions/canvas/src/host/server.test.ts index 8f6e2ff8ba4..238906a33dd 100644 --- a/src/canvas-host/server.test.ts +++ b/extensions/canvas/src/host/server.test.ts @@ -3,8 +3,8 @@ import type { IncomingMessage } from "node:http"; import os from "node:os"; import path from "node:path"; import type { Duplex } from "node:stream"; +import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env"; import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { defaultRuntime } from "../runtime.js"; import { A2UI_PATH, CANVAS_HOST_PATH, @@ -354,7 +354,7 @@ describe("canvas host", () => { }); it("serves A2UI scaffold and blocks traversal/symlink escapes", async () => { - const a2uiRoot = path.resolve(process.cwd(), "src/canvas-host/a2ui"); + const a2uiRoot = path.resolve(process.cwd(), "extensions/canvas/src/host/a2ui"); const bundlePath = path.join(a2uiRoot, "a2ui.bundle.js"); const linkName = `test-link-${Date.now()}-${Math.random().toString(16).slice(2)}.txt`; const linkPath = path.join(a2uiRoot, linkName); diff --git a/src/canvas-host/server.ts b/extensions/canvas/src/host/server.ts similarity index 95% rename from src/canvas-host/server.ts rename to extensions/canvas/src/host/server.ts index ac69eed01f4..ba4c8744bc2 100644 --- a/src/canvas-host/server.ts +++ b/extensions/canvas/src/host/server.ts @@ -10,13 +10,16 @@ import { setTimeout as scheduleNativeTimeout, } from "node:timers"; import chokidar from "chokidar"; +import { detectMime } from "openclaw/plugin-sdk/media-mime"; +import { isTruthyEnvValue, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; +import { + ensureDir, + lowercasePreservingWhitespace, + normalizeOptionalString, + resolveUserPath, +} from "openclaw/plugin-sdk/text-runtime"; import { type WebSocket, WebSocketServer } from "ws"; -import { resolveStateDir } from "../config/paths.js"; -import { isTruthyEnvValue } from "../infra/env.js"; -import { detectMime } from "../media/mime.js"; -import type { RuntimeEnv } from "../runtime.js"; -import { lowercasePreservingWhitespace, normalizeOptionalString } from "../shared/string-coerce.js"; -import { ensureDir, resolveUserPath } from "../utils.js"; import { CANVAS_HOST_PATH, CANVAS_WS_PATH, @@ -169,9 +172,6 @@ function defaultIndexHTML() { } function isDisabledByEnv() { - if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_CANVAS_HOST)) { - return true; - } if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_CANVAS_HOST)) { return true; } @@ -321,7 +321,7 @@ export async function createCanvasHostHandler( } watcherClosed = true; opts.runtime.error( - `canvasHost watcher error: ${String(err)} (live reload disabled; consider canvasHost.liveReload=false or a smaller canvasHost.root)`, + `Canvas host watcher error: ${String(err)} (live reload disabled; consider plugins.entries.canvas.config.host.liveReload=false or a smaller plugins.entries.canvas.config.host.root)`, ); void watcher.close().catch(() => {}); }); @@ -412,7 +412,7 @@ export async function createCanvasHostHandler( res.end(data); return true; } catch (err) { - opts.runtime.error(`canvasHost request failed: ${String(err)}`); + opts.runtime.error(`Canvas host request failed: ${String(err)}`); res.statusCode = 500; res.setHeader("Content-Type", "text/plain; charset=utf-8"); res.end("error"); @@ -482,7 +482,7 @@ export async function startCanvasHost(opts: CanvasHostServerOpts): Promise { - opts.runtime.error(`canvasHost request failed: ${String(err)}`); + opts.runtime.error(`Canvas host request failed: ${String(err)}`); res.statusCode = 500; res.setHeader("Content-Type", "text/plain; charset=utf-8"); res.end("error"); diff --git a/extensions/canvas/src/http-route.ts b/extensions/canvas/src/http-route.ts new file mode 100644 index 00000000000..697744bdaca --- /dev/null +++ b/extensions/canvas/src/http-route.ts @@ -0,0 +1,72 @@ +import type { IncomingMessage, ServerResponse } from "node:http"; +import type { Duplex } from "node:stream"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { isCanvasHostEnabled, resolveCanvasHostConfig } from "./config.js"; +import { A2UI_PATH, CANVAS_HOST_PATH, CANVAS_WS_PATH, handleA2uiHttpRequest } from "./host/a2ui.js"; +import { createCanvasHostHandler, type CanvasHostHandler } from "./host/server.js"; + +export type CanvasHttpRouteHandler = { + handleHttpRequest: (req: IncomingMessage, res: ServerResponse) => Promise; + handleUpgrade: (req: IncomingMessage, socket: Duplex, head: Buffer) => Promise; + close: () => Promise; +}; + +export function createCanvasHttpRouteHandler(params: { + config: OpenClawConfig; + pluginConfig?: Record; + runtime: RuntimeEnv; + allowInTests?: boolean; +}): CanvasHttpRouteHandler { + let hostHandlerPromise: Promise | null = null; + const loadHostHandler = async (): Promise => { + if (!isCanvasHostEnabled(params.config)) { + return null; + } + hostHandlerPromise ??= (async () => { + const hostConfig = resolveCanvasHostConfig({ + config: params.config, + pluginConfig: params.pluginConfig, + }); + const handler = await createCanvasHostHandler({ + runtime: params.runtime, + rootDir: hostConfig.root, + basePath: CANVAS_HOST_PATH, + allowInTests: params.allowInTests, + liveReload: hostConfig.liveReload, + }); + return handler.rootDir ? handler : null; + })(); + return hostHandlerPromise; + }; + + return { + async handleHttpRequest(req, res) { + const handler = await loadHostHandler(); + if (!handler) { + return false; + } + const url = new URL(req.url ?? "/", "http://localhost"); + if (url.pathname === A2UI_PATH || url.pathname.startsWith(`${A2UI_PATH}/`)) { + return handleA2uiHttpRequest(req, res); + } + return handler.handleHttpRequest(req, res); + }, + async handleUpgrade(req, socket, head) { + const handler = await loadHostHandler(); + if (!handler) { + return false; + } + const url = new URL(req.url ?? "/", "http://localhost"); + if (url.pathname !== CANVAS_WS_PATH) { + return false; + } + return handler.handleUpgrade(req, socket, head); + }, + async close() { + const handler = hostHandlerPromise ? await hostHandlerPromise : null; + await handler?.close(); + hostHandlerPromise = null; + }, + }; +} diff --git a/extensions/canvas/src/tool.test.ts b/extensions/canvas/src/tool.test.ts new file mode 100644 index 00000000000..fc3b974bcc0 --- /dev/null +++ b/extensions/canvas/src/tool.test.ts @@ -0,0 +1,92 @@ +import { mkdtemp, mkdir, rm, symlink, writeFile } from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { createCanvasTool } from "./tool.js"; + +const mocks = vi.hoisted(() => ({ + callGatewayTool: vi.fn(), + imageResultFromFile: vi.fn(async (params) => ({ content: [], details: params })), + listNodes: vi.fn(async () => []), + resolveNodeIdFromList: vi.fn(() => "node-1"), +})); + +vi.mock("openclaw/plugin-sdk/agent-harness-runtime", () => ({ + callGatewayTool: mocks.callGatewayTool, + listNodes: mocks.listNodes, + resolveNodeIdFromList: mocks.resolveNodeIdFromList, +})); + +vi.mock("openclaw/plugin-sdk/channel-actions", async (importOriginal) => ({ + ...(await importOriginal()), + imageResultFromFile: mocks.imageResultFromFile, +})); + +describe("Canvas tool", () => { + let tempRoot: string | undefined; + + beforeEach(() => { + mocks.callGatewayTool.mockReset(); + mocks.imageResultFromFile.mockClear(); + mocks.listNodes.mockClear(); + mocks.listNodes.mockResolvedValue([]); + mocks.resolveNodeIdFromList.mockClear(); + mocks.resolveNodeIdFromList.mockReturnValue("node-1"); + }); + + afterEach(async () => { + if (tempRoot) { + await rm(tempRoot, { recursive: true, force: true }); + tempRoot = undefined; + } + }); + + it.skipIf(process.platform === "win32")( + "rejects jsonlPath symlinks that resolve outside the workspace", + async () => { + tempRoot = await mkdtemp(path.join(os.tmpdir(), "openclaw-canvas-tool-")); + const workspaceDir = path.join(tempRoot, "workspace"); + await mkdir(workspaceDir); + const outsidePath = path.join(tempRoot, "outside.jsonl"); + await writeFile(outsidePath, '{"secret":true}\n'); + await symlink(outsidePath, path.join(workspaceDir, "events.jsonl")); + + const tool = createCanvasTool({ workspaceDir }); + + await expect( + tool.execute("tool-call-1", { + action: "a2ui_push", + jsonlPath: "events.jsonl", + }), + ).rejects.toThrow("jsonlPath outside workspace"); + expect(mocks.callGatewayTool).not.toHaveBeenCalled(); + }, + ); + + it("applies configured image limits to canvas snapshots", async () => { + mocks.callGatewayTool.mockResolvedValue({ + payload: { + format: "png", + base64: Buffer.from("not-a-real-png").toString("base64"), + }, + }); + const tool = createCanvasTool({ + config: { + agents: { + defaults: { + imageMaxDimensionPx: 1600.9, + }, + }, + }, + }); + + await tool.execute("tool-call-1", { action: "snapshot" }); + + expect(mocks.imageResultFromFile).toHaveBeenCalledWith( + expect.objectContaining({ + label: "canvas:snapshot", + imageSanitization: { maxDimensionPx: 1600 }, + }), + ); + }); +}); diff --git a/src/agents/tools/canvas-tool.ts b/extensions/canvas/src/tool.ts similarity index 59% rename from src/agents/tools/canvas-tool.ts rename to extensions/canvas/src/tool.ts index 41c56e70678..cd216da536f 100644 --- a/src/agents/tools/canvas-tool.ts +++ b/extensions/canvas/src/tool.ts @@ -1,18 +1,21 @@ -import crypto from "node:crypto"; +import { randomUUID } from "node:crypto"; +import fs from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; +import { + callGatewayTool, + listNodes, + resolveNodeIdFromList, +} from "openclaw/plugin-sdk/agent-harness-runtime"; +import { + imageResultFromFile, + jsonResult, + optionalStringEnum, + readStringParam, + stringEnum, +} from "openclaw/plugin-sdk/channel-actions"; +import type { AnyAgentTool, OpenClawConfig } from "openclaw/plugin-sdk/plugin-entry"; import { Type } from "typebox"; -import { writeBase64ToFile } from "../../cli/nodes-camera.js"; -import { canvasSnapshotTempPath, parseCanvasSnapshotPayload } from "../../cli/nodes-canvas.js"; -import type { OpenClawConfig } from "../../config/types.openclaw.js"; -import { logVerbose, shouldLogVerbose } from "../../globals.js"; -import { readLocalFileFromRoots } from "../../infra/fs-safe.js"; -import { getDefaultMediaLocalRoots } from "../../media/local-roots.js"; -import { imageMimeFromFormat } from "../../media/mime.js"; -import { normalizeLowercaseStringOrEmpty } from "../../shared/string-coerce.js"; -import { resolveImageSanitizationLimits } from "../image-sanitization.js"; -import { optionalStringEnum, stringEnum } from "../schema/typebox.js"; -import { type AnyAgentTool, imageResult, jsonResult, readStringParam } from "./common.js"; -import { callGatewayTool, readGatewayCallOptions } from "./gateway.js"; -import { resolveNodeId } from "./nodes-utils.js"; const CANVAS_ACTIONS = [ "present", @@ -26,24 +29,90 @@ const CANVAS_ACTIONS = [ const CANVAS_SNAPSHOT_FORMATS = ["png", "jpg", "jpeg"] as const; -async function readJsonlFromPath(jsonlPath: string): Promise { +type CanvasToolOptions = { + config?: OpenClawConfig; + workspaceDir?: string; +}; + +type CanvasSnapshotPayload = { + format: string; + base64: string; +}; + +type CanvasImageSanitizationLimits = { + maxDimensionPx?: number; +}; + +function readGatewayCallOptions(params: Record) { + return { + gatewayUrl: readStringParam(params, "gatewayUrl", { trim: false }), + gatewayToken: readStringParam(params, "gatewayToken", { trim: false }), + timeoutMs: typeof params.timeoutMs === "number" ? params.timeoutMs : undefined, + }; +} + +async function resolveNodeId( + opts: ReturnType, + query?: string, + allowDefault = false, +): Promise { + return resolveNodeIdFromList(await listNodes(opts), query, allowDefault); +} + +function parseCanvasSnapshotPayload(value: unknown): CanvasSnapshotPayload { + if (!value || typeof value !== "object" || Array.isArray(value)) { + throw new Error("invalid canvas.snapshot payload"); + } + const record = value as Record; + const format = typeof record.format === "string" ? record.format : ""; + const base64 = typeof record.base64 === "string" ? record.base64 : ""; + if (!format || !base64) { + throw new Error("invalid canvas.snapshot payload"); + } + return { format, base64 }; +} + +async function writeBase64ToTempFile(params: { base64: string; ext: string }): Promise { + const dir = path.join(os.tmpdir(), "openclaw"); + await fs.mkdir(dir, { recursive: true, mode: 0o700 }); + const ext = params.ext.startsWith(".") ? params.ext : `.${params.ext}`; + const filePath = path.join(dir, `openclaw-canvas-snapshot-${randomUUID()}${ext}`); + await fs.writeFile(filePath, Buffer.from(params.base64, "base64")); + return filePath; +} + +function isPathInsideRoot(root: string, candidate: string): boolean { + const relative = path.relative(root, candidate); + return ( + relative === "" || (!!relative && !relative.startsWith("..") && !path.isAbsolute(relative)) + ); +} + +async function readJsonlFromPath(jsonlPath: string, workspaceDir?: string): Promise { const trimmed = jsonlPath.trim(); if (!trimmed) { return ""; } - const roots = getDefaultMediaLocalRoots(); - const result = await readLocalFileFromRoots({ - filePath: trimmed, - roots, - label: "canvas jsonlPath", - }); - if (!result) { - if (shouldLogVerbose()) { - logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${trimmed}`); - } - throw new Error("jsonlPath outside allowed roots"); + const workspaceRoot = path.resolve(workspaceDir ?? process.cwd()); + const resolved = path.resolve(workspaceRoot, trimmed); + const [workspaceReal, resolvedReal] = await Promise.all([ + fs.realpath(workspaceRoot), + fs.realpath(resolved), + ]); + if (!isPathInsideRoot(workspaceReal, resolvedReal)) { + throw new Error("jsonlPath outside workspace"); } - return result.buffer.toString("utf8"); + return await fs.readFile(resolvedReal, "utf8"); +} + +function resolveCanvasImageSanitizationLimits( + config?: OpenClawConfig, +): CanvasImageSanitizationLimits { + const configured = config?.agents?.defaults?.imageMaxDimensionPx; + if (typeof configured !== "number" || !Number.isFinite(configured)) { + return {}; + } + return { maxDimensionPx: Math.max(1, Math.floor(configured)) }; } // Flattened schema: runtime validates per-action requirements. @@ -53,28 +122,23 @@ const CanvasToolSchema = Type.Object({ gatewayToken: Type.Optional(Type.String()), timeoutMs: Type.Optional(Type.Number()), node: Type.Optional(Type.String()), - // present target: Type.Optional(Type.String()), x: Type.Optional(Type.Number()), y: Type.Optional(Type.Number()), width: Type.Optional(Type.Number()), height: Type.Optional(Type.Number()), - // navigate url: Type.Optional(Type.String()), - // eval javaScript: Type.Optional(Type.String()), - // snapshot outputFormat: optionalStringEnum(CANVAS_SNAPSHOT_FORMATS), maxWidth: Type.Optional(Type.Number()), quality: Type.Optional(Type.Number()), delayMs: Type.Optional(Type.Number()), - // a2ui_push jsonl: Type.Optional(Type.String()), jsonlPath: Type.Optional(Type.String()), }); -export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgentTool { - const imageSanitization = resolveImageSanitizationLimits(options?.config); +export function createCanvasTool(options?: CanvasToolOptions): AnyAgentTool { + const imageSanitization = resolveCanvasImageSanitizationLimits(options?.config); return { label: "Canvas", name: "canvas", @@ -97,7 +161,7 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen nodeId, command, params: invokeParams, - idempotencyKey: crypto.randomUUID(), + idempotencyKey: randomUUID(), }); switch (action) { @@ -109,8 +173,6 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen height: typeof params.height === "number" ? params.height : undefined, }; const invokeParams: Record = {}; - // Accept both `target` and `url` for present to match common caller expectations. - // `target` remains the canonical field for CLI compatibility. const presentTarget = readStringParam(params, "target", { trim: true }) ?? readStringParam(params, "url", { trim: true }); @@ -132,7 +194,6 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen await invoke("canvas.hide", undefined); return jsonResult({ ok: true }); case "navigate": { - // Support `target` as an alias so callers can reuse the same field across present/navigate. const url = readStringParam(params, "url", { trim: true }) ?? readStringParam(params, "target", { required: true, trim: true, label: "url" }); @@ -156,7 +217,10 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen return jsonResult({ ok: true }); } case "snapshot": { - const formatRaw = normalizeLowercaseStringOrEmpty(params.outputFormat) || "png"; + const formatRaw = + typeof params.outputFormat === "string" && params.outputFormat.trim() + ? params.outputFormat.trim().toLowerCase() + : "png"; const format = formatRaw === "jpg" || formatRaw === "jpeg" ? "jpeg" : "png"; const maxWidth = typeof params.maxWidth === "number" && Number.isFinite(params.maxWidth) @@ -172,16 +236,13 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen quality, })) as { payload?: unknown }; const payload = parseCanvasSnapshotPayload(raw?.payload); - const filePath = canvasSnapshotTempPath({ + const filePath = await writeBase64ToTempFile({ + base64: payload.base64, ext: payload.format === "jpeg" ? "jpg" : payload.format, }); - await writeBase64ToFile(filePath, payload.base64); - const mimeType = imageMimeFromFormat(payload.format) ?? "image/png"; - return await imageResult({ + return await imageResultFromFile({ label: "canvas:snapshot", path: filePath, - base64: payload.base64, - mimeType, details: { format: payload.format }, imageSanitization, }); @@ -191,7 +252,7 @@ export function createCanvasTool(options?: { config?: OpenClawConfig }): AnyAgen typeof params.jsonl === "string" && params.jsonl.trim() ? params.jsonl : typeof params.jsonlPath === "string" && params.jsonlPath.trim() - ? await readJsonlFromPath(params.jsonlPath) + ? await readJsonlFromPath(params.jsonlPath, options?.workspaceDir) : ""; if (!jsonl.trim()) { throw new Error("jsonl or jsonlPath required"); diff --git a/extensions/codex/src/app-server/auth-bridge.ts b/extensions/codex/src/app-server/auth-bridge.ts index fba62d2d39c..9bef9470dd1 100644 --- a/extensions/codex/src/app-server/auth-bridge.ts +++ b/extensions/codex/src/app-server/auth-bridge.ts @@ -14,9 +14,11 @@ import { } from "openclaw/plugin-sdk/agent-runtime"; import type { CodexAppServerClient } from "./client.js"; import type { CodexAppServerStartOptions } from "./config.js"; -import type { ChatgptAuthTokensRefreshResponse } from "./protocol-generated/typescript/v2/ChatgptAuthTokensRefreshResponse.js"; -import type { GetAccountResponse } from "./protocol-generated/typescript/v2/GetAccountResponse.js"; -import type { LoginAccountParams } from "./protocol-generated/typescript/v2/LoginAccountParams.js"; +import type { + CodexChatgptAuthTokensRefreshResponse, + CodexGetAccountResponse, + CodexLoginAccountParams, +} from "./protocol.js"; import { resolveCodexAppServerSpawnEnv } from "./transport-stdio.js"; const CODEX_APP_SERVER_AUTH_PROVIDER = "openai-codex"; @@ -170,7 +172,7 @@ function resolveCodexAppServerAuthProfileLoginParams(params: { agentDir: string; authProfileId?: string; config?: AuthProfileOrderConfig; -}): Promise { +}): Promise { return resolveCodexAppServerAuthProfileLoginParamsInternal(params); } @@ -178,7 +180,7 @@ export async function refreshCodexAppServerAuthTokens(params: { agentDir: string; authProfileId?: string; config?: AuthProfileOrderConfig; -}): Promise { +}): Promise { const loginParams = await resolveCodexAppServerAuthProfileLoginParamsInternal({ ...params, forceOAuthRefresh: true, @@ -198,7 +200,7 @@ async function resolveCodexAppServerAuthProfileLoginParamsInternal(params: { authProfileId?: string; forceOAuthRefresh?: boolean; config?: AuthProfileOrderConfig; -}): Promise { +}): Promise { const store = ensureAuthProfileStore(params.agentDir, { allowKeychainPrompt: false }); const profileId = resolveCodexAppServerAuthProfileId({ authProfileId: params.authProfileId, @@ -233,12 +235,12 @@ async function resolveCodexAppServerAuthProfileLoginParamsInternal(params: { async function resolveCodexAppServerEnvApiKeyLoginParams(params: { client: CodexAppServerClient; env: NodeJS.ProcessEnv; -}): Promise { +}): Promise { const apiKey = readFirstNonEmptyEnv(params.env, CODEX_APP_SERVER_API_KEY_ENV_VARS); if (!apiKey) { return undefined; } - const response = await params.client.request("account/read", { + const response = await params.client.request("account/read", { refreshToken: false, }); if (response.account || !response.requiresOpenaiAuth) { @@ -251,7 +253,7 @@ async function resolveLoginParamsForCredential( profileId: string, credential: AuthProfileCredential, params: { agentDir: string; forceOAuthRefresh: boolean; config?: AuthProfileOrderConfig }, -): Promise { +): Promise { if (credential.type === "api_key") { const resolved = await resolveApiKeyForProfile({ store: ensureAuthProfileStore(params.agentDir, { allowKeychainPrompt: false }), @@ -378,7 +380,7 @@ function buildChatgptAuthTokensParams( profileId: string, credential: AuthProfileCredential, accessToken: string, -): LoginAccountParams { +): CodexLoginAccountParams { return { type: "chatgptAuthTokens", accessToken, diff --git a/extensions/codex/src/app-server/computer-use.ts b/extensions/codex/src/app-server/computer-use.ts index 895ba584018..ff01ce0d5bf 100644 --- a/extensions/codex/src/app-server/computer-use.ts +++ b/extensions/codex/src/app-server/computer-use.ts @@ -7,8 +7,15 @@ import { type CodexComputerUseConfig, type ResolvedCodexComputerUseConfig, } from "./config.js"; -import type { v2 } from "./protocol-generated/typescript/index.js"; -import type { JsonValue } from "./protocol.js"; +import type { + CodexListMcpServerStatusResponse, + CodexMcpServerStatus, + CodexPluginDetail, + CodexPluginListResponse, + CodexPluginReadResponse, + CodexRequestObject, + JsonValue, +} from "./protocol.js"; import { requestCodexAppServerJson } from "./request.js"; export type CodexComputerUseRequest = ( @@ -83,7 +90,7 @@ type MarketplaceResolution = { type PluginInspection = | { ok: true; - plugin: v2.PluginDetail; + plugin: CodexPluginDetail; } | { ok: false; @@ -184,12 +191,9 @@ async function inspectCodexComputerUse(params: { }): Promise { const request = createComputerUseRequest(params); if (params.installPlugin) { - await request( - "experimentalFeature/enablement/set", - { - enablement: { plugins: true }, - } satisfies v2.ExperimentalFeatureEnablementSetParams, - ); + await request("experimentalFeature/enablement/set", { + enablement: { plugins: true }, + } satisfies CodexRequestObject); } const marketplace = await resolveMarketplaceRef({ @@ -262,12 +266,9 @@ async function ensureComputerUsePlugin(params: { }), }; } - await params.request( + await params.request( "plugin/install", - pluginRequestParams( - params.marketplace, - params.config.pluginName, - ) satisfies v2.PluginInstallParams, + pluginRequestParams(params.marketplace, params.config.pluginName), ); await reloadMcpServers(params.request); plugin = await readComputerUsePlugin( @@ -294,7 +295,7 @@ async function ensureComputerUsePlugin(params: { async function readComputerUseTools(params: { request: CodexComputerUseRequest; config: ResolvedCodexComputerUseConfig; - plugin: v2.PluginDetail; + plugin: CodexPluginDetail; installPlugin: boolean; }): Promise { let server = await readMcpServerStatus(params.request, params.config.mcpServerName); @@ -330,9 +331,9 @@ async function resolveMarketplaceRef(params: { }): Promise { let preferredMarketplaceName = params.config.marketplaceName; if (params.config.marketplaceSource && params.allowAdd) { - const added = await params.request("marketplace/add", { + const added = await params.request<{ marketplaceName?: string }>("marketplace/add", { source: params.config.marketplaceSource, - } satisfies v2.MarketplaceAddParams); + } satisfies CodexRequestObject); preferredMarketplaceName ??= added.marketplaceName; } @@ -347,9 +348,9 @@ async function resolveMarketplaceRef(params: { if (candidates.length === 0 && shouldAddBundledComputerUseMarketplace(params)) { const bundledMarketplacePath = params.defaultBundledMarketplacePath ?? DEFAULT_CODEX_BUNDLED_MARKETPLACE_PATH; - const added = await params.request("marketplace/add", { + const added = await params.request<{ marketplaceName?: string }>("marketplace/add", { source: bundledMarketplacePath, - } satisfies v2.MarketplaceAddParams); + } satisfies CodexRequestObject); preferredMarketplaceName ??= added.marketplaceName; candidates = await listComputerUseMarketplaceCandidates(params.request, params.config); } @@ -398,9 +399,9 @@ async function listComputerUseMarketplaceCandidates( request: CodexComputerUseRequest, config: ResolvedCodexComputerUseConfig, ): Promise { - const listed = await request("plugin/list", { + const listed = await request("plugin/list", { cwds: [], - } satisfies v2.PluginListParams); + } satisfies CodexRequestObject); return findComputerUseMarketplaces(listed, config.pluginName); } @@ -434,7 +435,7 @@ function shouldAddBundledComputerUseMarketplace(params: { } function findComputerUseMarketplaces( - listed: v2.PluginListResponse, + listed: CodexPluginListResponse, pluginName: string, ): MarketplaceRef[] { return listed.marketplaces @@ -509,10 +510,10 @@ async function readComputerUsePlugin( request: CodexComputerUseRequest, marketplace: MarketplaceRef, pluginName: string, -): Promise { - const response = await request( +): Promise { + const response = await request( "plugin/read", - pluginRequestParams(marketplace, pluginName) satisfies v2.PluginReadParams, + pluginRequestParams(marketplace, pluginName), ); return response.plugin; } @@ -520,14 +521,14 @@ async function readComputerUsePlugin( async function readMcpServerStatus( request: CodexComputerUseRequest, serverName: string, -): Promise { +): Promise { let cursor: string | null | undefined; do { - const response = await request("mcpServerStatus/list", { + const response = await request("mcpServerStatus/list", { cursor, limit: 100, detail: "toolsAndAuthOnly", - } satisfies v2.ListMcpServerStatusParams); + } satisfies CodexRequestObject); const found = response.data.find((server) => server.name === serverName); if (found) { return found; @@ -552,7 +553,7 @@ function pluginRequestParams(marketplace: MarketplaceRef, pluginName: string) { } function pluginSetupReason( - plugin: v2.PluginDetail, + plugin: CodexPluginDetail, marketplace: MarketplaceRef, ): CodexComputerUseStatusReason { if (marketplace.kind === "remote") { @@ -563,7 +564,7 @@ function pluginSetupReason( function pluginSetupMessage( config: ResolvedCodexComputerUseConfig, - plugin: v2.PluginDetail, + plugin: CodexPluginDetail, marketplace: MarketplaceRef, ): string { if (marketplace.kind === "remote") { @@ -576,7 +577,7 @@ function pluginSetupMessage( } function remoteInstallUnsupportedMessage( - plugin: v2.PluginDetail, + plugin: CodexPluginDetail, marketplace: MarketplaceRef, ): string { const marketplaceName = marketplace.name ?? plugin.marketplaceName; @@ -586,7 +587,7 @@ function remoteInstallUnsupportedMessage( function statusFromPlugin(params: { config: ResolvedCodexComputerUseConfig; - plugin: v2.PluginDetail; + plugin: CodexPluginDetail; tools: string[]; reason: CodexComputerUseStatusReason; message: string; diff --git a/extensions/codex/src/app-server/event-projector.ts b/extensions/codex/src/app-server/event-projector.ts index e21efe51604..be29bd098cd 100644 --- a/extensions/codex/src/app-server/event-projector.ts +++ b/extensions/codex/src/app-server/event-projector.ts @@ -1268,9 +1268,7 @@ function itemOutputText(item: CodexThreadItem): string | undefined { return undefined; } -function collectDynamicToolContentText( - contentItems: Extract["contentItems"], -): string { +function collectDynamicToolContentText(contentItems: CodexThreadItem["contentItems"]): string { if (!Array.isArray(contentItems)) { return ""; } diff --git a/extensions/codex/src/app-server/models.ts b/extensions/codex/src/app-server/models.ts index 4cd84436914..911677d0fff 100644 --- a/extensions/codex/src/app-server/models.ts +++ b/extensions/codex/src/app-server/models.ts @@ -1,8 +1,8 @@ import type { resolveCodexAppServerAuthProfileIdForAgent } from "./auth-bridge.js"; import type { CodexAppServerClient } from "./client.js"; import type { CodexAppServerStartOptions } from "./config.js"; -import type { v2 } from "./protocol-generated/typescript/index.js"; import { readCodexModelListResponse } from "./protocol-validators.js"; +import type { CodexModel, CodexReasoningEffortOption } from "./protocol.js"; export type CodexAppServerModel = { id: string; @@ -127,7 +127,7 @@ export function readModelListResult(value: unknown): CodexAppServerModelListResu return { models, ...(nextCursor ? { nextCursor } : {}) }; } -function readCodexModel(value: v2.Model): CodexAppServerModel | undefined { +function readCodexModel(value: CodexModel): CodexAppServerModel | undefined { const id = readNonEmptyString(value.id); const model = readNonEmptyString(value.model) ?? id; if (!id || !model) { @@ -152,7 +152,7 @@ function readCodexModel(value: v2.Model): CodexAppServerModel | undefined { }; } -function readReasoningEfforts(value: v2.ReasoningEffortOption[]): string[] { +function readReasoningEfforts(value: CodexReasoningEffortOption[]): string[] { const efforts = value .map((entry) => readNonEmptyString(entry.reasoningEffort)) .filter((entry): entry is string => entry !== undefined); diff --git a/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json b/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json index 812682bdce3..d002d9b6e88 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json +++ b/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json @@ -2,13 +2,32 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "DynamicToolCallParams", "type": "object", - "required": ["arguments", "callId", "threadId", "tool", "turnId"], + "required": [ + "arguments", + "callId", + "threadId", + "tool", + "turnId" + ], "properties": { "arguments": true, - "callId": { "type": "string" }, - "namespace": { "type": ["string", "null"] }, - "threadId": { "type": "string" }, - "tool": { "type": "string" }, - "turnId": { "type": "string" } + "callId": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + }, + "tool": { + "type": "string" + }, + "turnId": { + "type": "string" + } } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json index 1f02701b0e7..d96b9e472a0 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json @@ -2,12 +2,25 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ErrorNotification", "type": "object", - "required": ["error", "threadId", "turnId", "willRetry"], + "required": [ + "error", + "threadId", + "turnId", + "willRetry" + ], "properties": { - "error": { "$ref": "#/definitions/TurnError" }, - "threadId": { "type": "string" }, - "turnId": { "type": "string" }, - "willRetry": { "type": "boolean" } + "error": { + "$ref": "#/definitions/TurnError" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + }, + "willRetry": { + "type": "boolean" + } }, "definitions": { "CodexErrorInfo": { @@ -30,12 +43,21 @@ }, { "type": "object", - "required": ["httpConnectionFailed"], + "required": [ + "httpConnectionFailed" + ], "properties": { "httpConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -45,12 +67,21 @@ { "description": "Failed to connect to the response SSE stream.", "type": "object", - "required": ["responseStreamConnectionFailed"], + "required": [ + "responseStreamConnectionFailed" + ], "properties": { "responseStreamConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -60,12 +91,21 @@ { "description": "The response SSE stream disconnected in the middle of a turn before completion.", "type": "object", - "required": ["responseStreamDisconnected"], + "required": [ + "responseStreamDisconnected" + ], "properties": { "responseStreamDisconnected": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -75,12 +115,21 @@ { "description": "Reached the retry limit for responses.", "type": "object", - "required": ["responseTooManyFailedAttempts"], + "required": [ + "responseTooManyFailedAttempts" + ], "properties": { "responseTooManyFailedAttempts": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -90,12 +139,20 @@ { "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", "type": "object", - "required": ["activeTurnNotSteerable"], + "required": [ + "activeTurnNotSteerable" + ], "properties": { "activeTurnNotSteerable": { "type": "object", - "required": ["turnKind"], - "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } } + "required": [ + "turnKind" + ], + "properties": { + "turnKind": { + "$ref": "#/definitions/NonSteerableTurnKind" + } + } } }, "additionalProperties": false, @@ -103,16 +160,39 @@ } ] }, - "NonSteerableTurnKind": { "type": "string", "enum": ["review", "compact"] }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, "TurnError": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { - "additionalDetails": { "default": null, "type": ["string", "null"] }, - "codexErrorInfo": { - "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] }, - "message": { "type": "string" } + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } } } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json index e5e26fe695c..8b9f7729e1a 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json @@ -2,39 +2,78 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "GetAccountResponse", "type": "object", - "required": ["requiresOpenaiAuth"], + "required": [ + "requiresOpenaiAuth" + ], "properties": { - "account": { "anyOf": [{ "$ref": "#/definitions/Account" }, { "type": "null" }] }, - "requiresOpenaiAuth": { "type": "boolean" } + "account": { + "anyOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] + }, + "requiresOpenaiAuth": { + "type": "boolean" + } }, "definitions": { "Account": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["apiKey"], "title": "ApiKeyAccountType" } + "type": { + "type": "string", + "enum": [ + "apiKey" + ], + "title": "ApiKeyAccountType" + } }, "title": "ApiKeyAccount" }, { "type": "object", - "required": ["email", "planType", "type"], + "required": [ + "email", + "planType", + "type" + ], "properties": { - "email": { "type": "string" }, - "planType": { "$ref": "#/definitions/PlanType" }, - "type": { "type": "string", "enum": ["chatgpt"], "title": "ChatgptAccountType" } + "email": { + "type": "string" + }, + "planType": { + "$ref": "#/definitions/PlanType" + }, + "type": { + "type": "string", + "enum": [ + "chatgpt" + ], + "title": "ChatgptAccountType" + } }, "title": "ChatgptAccount" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["amazonBedrock"], + "enum": [ + "amazonBedrock" + ], "title": "AmazonBedrockAccountType" } }, diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json index 7f4c9ca9444..26453e005fa 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json @@ -2,12 +2,22 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ModelListResponse", "type": "object", - "required": ["data"], + "required": [ + "data" + ], "properties": { - "data": { "type": "array", "items": { "$ref": "#/definitions/Model" } }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Model" + } + }, "nextCursor": { "description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] } }, "definitions": { @@ -17,12 +27,16 @@ { "description": "Plain text turns and tool payloads.", "type": "string", - "enum": ["text"] + "enum": [ + "text" + ] }, { "description": "Image attachments included in user turns.", "type": "string", - "enum": ["image"] + "enum": [ + "image" + ] } ] }, @@ -39,59 +53,174 @@ "supportedReasoningEfforts" ], "properties": { - "additionalSpeedTiers": { "default": [], "type": "array", "items": { "type": "string" } }, - "availabilityNux": { - "anyOf": [{ "$ref": "#/definitions/ModelAvailabilityNux" }, { "type": "null" }] - }, - "defaultReasoningEffort": { "$ref": "#/definitions/ReasoningEffort" }, - "description": { "type": "string" }, - "displayName": { "type": "string" }, - "hidden": { "type": "boolean" }, - "id": { "type": "string" }, - "inputModalities": { - "default": ["text", "image"], + "additionalSpeedTiers": { + "description": "Deprecated: use `serviceTiers` instead.", + "default": [], "type": "array", - "items": { "$ref": "#/definitions/InputModality" } + "items": { + "type": "string" + } + }, + "availabilityNux": { + "anyOf": [ + { + "$ref": "#/definitions/ModelAvailabilityNux" + }, + { + "type": "null" + } + ] + }, + "defaultReasoningEffort": { + "$ref": "#/definitions/ReasoningEffort" + }, + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "hidden": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "inputModalities": { + "default": [ + "text", + "image" + ], + "type": "array", + "items": { + "$ref": "#/definitions/InputModality" + } + }, + "isDefault": { + "type": "boolean" + }, + "model": { + "type": "string" + }, + "serviceTiers": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ModelServiceTier" + } }, - "isDefault": { "type": "boolean" }, - "model": { "type": "string" }, "supportedReasoningEfforts": { "type": "array", - "items": { "$ref": "#/definitions/ReasoningEffortOption" } + "items": { + "$ref": "#/definitions/ReasoningEffortOption" + } + }, + "supportsPersonality": { + "default": false, + "type": "boolean" + }, + "upgrade": { + "type": [ + "string", + "null" + ] }, - "supportsPersonality": { "default": false, "type": "boolean" }, - "upgrade": { "type": ["string", "null"] }, "upgradeInfo": { - "anyOf": [{ "$ref": "#/definitions/ModelUpgradeInfo" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ModelUpgradeInfo" + }, + { + "type": "null" + } + ] } } }, "ModelAvailabilityNux": { "type": "object", - "required": ["message"], - "properties": { "message": { "type": "string" } } + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + }, + "ModelServiceTier": { + "type": "object", + "required": [ + "description", + "id", + "name" + ], + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } }, "ModelUpgradeInfo": { "type": "object", - "required": ["model"], + "required": [ + "model" + ], "properties": { - "migrationMarkdown": { "type": ["string", "null"] }, - "model": { "type": "string" }, - "modelLink": { "type": ["string", "null"] }, - "upgradeCopy": { "type": ["string", "null"] } + "migrationMarkdown": { + "type": [ + "string", + "null" + ] + }, + "model": { + "type": "string" + }, + "modelLink": { + "type": [ + "string", + "null" + ] + }, + "upgradeCopy": { + "type": [ + "string", + "null" + ] + } } }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ] }, "ReasoningEffortOption": { "type": "object", - "required": ["description", "reasoningEffort"], + "required": [ + "description", + "reasoningEffort" + ], "properties": { - "description": { "type": "string" }, - "reasoningEffort": { "$ref": "#/definitions/ReasoningEffort" } + "description": { + "type": "string" + }, + "reasoningEffort": { + "$ref": "#/definitions/ReasoningEffort" + } } } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json index eac156d5773..d4800805328 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json @@ -15,36 +15,86 @@ "activePermissionProfile": { "description": "Named or implicit built-in profile that produced the active permissions, when known.", "default": null, - "anyOf": [{ "$ref": "#/definitions/ActivePermissionProfile" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ActivePermissionProfile" + }, + { + "type": "null" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" }, - "approvalPolicy": { "$ref": "#/definitions/AskForApproval" }, "approvalsReviewer": { "description": "Reviewer currently used for approval requests on this thread.", - "allOf": [{ "$ref": "#/definitions/ApprovalsReviewer" }] + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" }, - "cwd": { "$ref": "#/definitions/AbsolutePathBuf" }, "instructionSources": { "description": "Instruction source files currently loaded for this thread.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/AbsolutePathBuf" } + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" }, - "model": { "type": "string" }, - "modelProvider": { "type": "string" }, "permissionProfile": { "description": "Full active permissions for this thread. `activePermissionProfile` carries display/provenance metadata for this runtime profile.", "default": null, - "anyOf": [{ "$ref": "#/definitions/PermissionProfile" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/PermissionProfile" + }, + { + "type": "null" + } + ] }, "reasoningEffort": { - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "sandbox": { "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", - "allOf": [{ "$ref": "#/definitions/SandboxPolicy" }] + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] }, - "serviceTier": { "anyOf": [{ "$ref": "#/definitions/ServiceTier" }, { "type": "null" }] }, - "thread": { "$ref": "#/definitions/Thread" } + "serviceTier": { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + "thread": { + "$ref": "#/definitions/Thread" + } }, "definitions": { "AbsolutePathBuf": { @@ -53,12 +103,17 @@ }, "ActivePermissionProfile": { "type": "object", - "required": ["id"], + "required": [ + "id" + ], "properties": { "extends": { "description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", "default": null, - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "id": { "description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", @@ -68,7 +123,9 @@ "description": "Bounded user-requested modifications applied on top of the named profile, if any.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/ActivePermissionProfileModification" } + "items": { + "$ref": "#/definitions/ActivePermissionProfileModification" + } } } }, @@ -77,12 +134,19 @@ { "description": "Additional concrete directory that should be writable.", "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, "type": { "type": "string", - "enum": ["additionalWritableRoot"], + "enum": [ + "additionalWritableRoot" + ], "title": "AdditionalWritableRootActivePermissionProfileModificationType" } }, @@ -90,28 +154,60 @@ } ] }, - "AgentPath": { "type": "string" }, + "AgentPath": { + "type": "string" + }, "ApprovalsReviewer": { "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", "type": "string", - "enum": ["user", "auto_review", "guardian_subagent"] + "enum": [ + "user", + "auto_review", + "guardian_subagent" + ] }, "AskForApproval": { "oneOf": [ - { "type": "string", "enum": ["untrusted", "on-failure", "on-request", "never"] }, + { + "type": "string", + "enum": [ + "untrusted", + "on-failure", + "on-request", + "never" + ] + }, { "type": "object", - "required": ["granular"], + "required": [ + "granular" + ], "properties": { "granular": { "type": "object", - "required": ["mcp_elicitations", "rules", "sandbox_approval"], + "required": [ + "mcp_elicitations", + "rules", + "sandbox_approval" + ], "properties": { - "mcp_elicitations": { "type": "boolean" }, - "request_permissions": { "default": false, "type": "boolean" }, - "rules": { "type": "boolean" }, - "sandbox_approval": { "type": "boolean" }, - "skill_approval": { "default": false, "type": "boolean" } + "mcp_elicitations": { + "type": "boolean" + }, + "request_permissions": { + "default": false, + "type": "boolean" + }, + "rules": { + "type": "boolean" + }, + "sandbox_approval": { + "type": "boolean" + }, + "skill_approval": { + "default": false, + "type": "boolean" + } } } }, @@ -122,10 +218,21 @@ }, "ByteRange": { "type": "object", - "required": ["end", "start"], + "required": [ + "end", + "start" + ], "properties": { - "end": { "type": "integer", "format": "uint", "minimum": 0 }, - "start": { "type": "integer", "format": "uint", "minimum": 0 } + "end": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "start": { + "type": "integer", + "format": "uint", + "minimum": 0 + } } }, "CodexErrorInfo": { @@ -148,12 +255,21 @@ }, { "type": "object", - "required": ["httpConnectionFailed"], + "required": [ + "httpConnectionFailed" + ], "properties": { "httpConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -163,12 +279,21 @@ { "description": "Failed to connect to the response SSE stream.", "type": "object", - "required": ["responseStreamConnectionFailed"], + "required": [ + "responseStreamConnectionFailed" + ], "properties": { "responseStreamConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -178,12 +303,21 @@ { "description": "The response SSE stream disconnected in the middle of a turn before completion.", "type": "object", - "required": ["responseStreamDisconnected"], + "required": [ + "responseStreamDisconnected" + ], "properties": { "responseStreamDisconnected": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -193,12 +327,21 @@ { "description": "Reached the retry limit for responses.", "type": "object", - "required": ["responseTooManyFailedAttempts"], + "required": [ + "responseTooManyFailedAttempts" + ], "properties": { "responseTooManyFailedAttempts": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -208,12 +351,20 @@ { "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", "type": "object", - "required": ["activeTurnNotSteerable"], + "required": [ + "activeTurnNotSteerable" + ], "properties": { "activeTurnNotSteerable": { "type": "object", - "required": ["turnKind"], - "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } } + "required": [ + "turnKind" + ], + "properties": { + "turnKind": { + "$ref": "#/definitions/NonSteerableTurnKind" + } + } } }, "additionalProperties": false, @@ -223,10 +374,19 @@ }, "CollabAgentState": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { - "message": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/CollabAgentStatus" } + "message": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/CollabAgentStatus" + } } }, "CollabAgentStatus": { @@ -243,34 +403,73 @@ }, "CollabAgentTool": { "type": "string", - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] + "enum": [ + "spawnAgent", + "sendInput", + "resumeAgent", + "wait", + "closeAgent" + ] }, "CollabAgentToolCallStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed"] + "enum": [ + "inProgress", + "completed", + "failed" + ] }, "CommandAction": { "oneOf": [ { "type": "object", - "required": ["command", "name", "path", "type"], + "required": [ + "command", + "name", + "path", + "type" + ], "properties": { - "command": { "type": "string" }, - "name": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["read"], "title": "ReadCommandActionType" } + "command": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "read" + ], + "title": "ReadCommandActionType" + } }, "title": "ReadCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["listFiles"], + "enum": [ + "listFiles" + ], "title": "ListFilesCommandActionType" } }, @@ -278,21 +477,53 @@ }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchCommandActionType" } + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchCommandActionType" + } }, "title": "SearchCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "type": { "type": "string", "enum": ["unknown"], "title": "UnknownCommandActionType" } + "command": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "unknown" + ], + "title": "UnknownCommandActionType" + } }, "title": "UnknownCommandAction" } @@ -300,22 +531,39 @@ }, "CommandExecutionSource": { "type": "string", - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] + "enum": [ + "agent", + "userShell", + "unifiedExecStartup", + "unifiedExecInteraction" + ] }, "CommandExecutionStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputText"], + "enum": [ + "inputText" + ], "title": "InputTextDynamicToolCallOutputContentItemType" } }, @@ -323,12 +571,19 @@ }, { "type": "object", - "required": ["imageUrl", "type"], + "required": [ + "imageUrl", + "type" + ], "properties": { - "imageUrl": { "type": "string" }, + "imageUrl": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputImage"], + "enum": [ + "inputImage" + ], "title": "InputImageDynamicToolCallOutputContentItemType" } }, @@ -336,27 +591,59 @@ } ] }, - "DynamicToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, - "FileSystemAccessMode": { "type": "string", "enum": ["read", "write", "none"] }, + "DynamicToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, + "FileSystemAccessMode": { + "type": "string", + "enum": [ + "read", + "write", + "none" + ] + }, "FileSystemPath": { "oneOf": [ { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["path"], "title": "PathFileSystemPathType" } + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "path" + ], + "title": "PathFileSystemPathType" + } }, "title": "PathFileSystemPath" }, { "type": "object", - "required": ["pattern", "type"], + "required": [ + "pattern", + "type" + ], "properties": { - "pattern": { "type": "string" }, + "pattern": { + "type": "string" + }, "type": { "type": "string", - "enum": ["glob_pattern"], + "enum": [ + "glob_pattern" + ], "title": "GlobPatternFileSystemPathType" } }, @@ -364,10 +651,21 @@ }, { "type": "object", - "required": ["type", "value"], + "required": [ + "type", + "value" + ], "properties": { - "type": { "type": "string", "enum": ["special"], "title": "SpecialFileSystemPathType" }, - "value": { "$ref": "#/definitions/FileSystemSpecialPath" } + "type": { + "type": "string", + "enum": [ + "special" + ], + "title": "SpecialFileSystemPathType" + }, + "value": { + "$ref": "#/definitions/FileSystemSpecialPath" + } }, "title": "SpecialFileSystemPath" } @@ -375,111 +673,264 @@ }, "FileSystemSandboxEntry": { "type": "object", - "required": ["access", "path"], + "required": [ + "access", + "path" + ], "properties": { - "access": { "$ref": "#/definitions/FileSystemAccessMode" }, - "path": { "$ref": "#/definitions/FileSystemPath" } + "access": { + "$ref": "#/definitions/FileSystemAccessMode" + }, + "path": { + "$ref": "#/definitions/FileSystemPath" + } } }, "FileSystemSpecialPath": { "oneOf": [ { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["root"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "root" + ] + } + }, "title": "RootFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["minimal"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "minimal" + ] + } + }, "title": "MinimalFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], + "required": [ + "kind" + ], "properties": { - "kind": { "type": "string", "enum": ["project_roots"] }, - "subpath": { "type": ["string", "null"] } + "kind": { + "type": "string", + "enum": [ + "project_roots" + ] + }, + "subpath": { + "type": [ + "string", + "null" + ] + } }, "title": "KindFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["tmpdir"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "tmpdir" + ] + } + }, "title": "TmpdirFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["slash_tmp"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "slash_tmp" + ] + } + }, "title": "SlashTmpFileSystemSpecialPath" }, { "type": "object", - "required": ["kind", "path"], + "required": [ + "kind", + "path" + ], "properties": { - "kind": { "type": "string", "enum": ["unknown"] }, - "path": { "type": "string" }, - "subpath": { "type": ["string", "null"] } + "kind": { + "type": "string", + "enum": [ + "unknown" + ] + }, + "path": { + "type": "string" + }, + "subpath": { + "type": [ + "string", + "null" + ] + } } } ] }, "FileUpdateChange": { "type": "object", - "required": ["diff", "kind", "path"], + "required": [ + "diff", + "kind", + "path" + ], "properties": { - "diff": { "type": "string" }, - "kind": { "$ref": "#/definitions/PatchChangeKind" }, - "path": { "type": "string" } + "diff": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/PatchChangeKind" + }, + "path": { + "type": "string" + } } }, "GitInfo": { "type": "object", "properties": { - "branch": { "type": ["string", "null"] }, - "originUrl": { "type": ["string", "null"] }, - "sha": { "type": ["string", "null"] } + "branch": { + "type": [ + "string", + "null" + ] + }, + "originUrl": { + "type": [ + "string", + "null" + ] + }, + "sha": { + "type": [ + "string", + "null" + ] + } } }, "HookPromptFragment": { "type": "object", - "required": ["hookRunId", "text"], - "properties": { "hookRunId": { "type": "string" }, "text": { "type": "string" } } + "required": [ + "hookRunId", + "text" + ], + "properties": { + "hookRunId": { + "type": "string" + }, + "text": { + "type": "string" + } + } }, "McpToolCallError": { "type": "object", - "required": ["message"], - "properties": { "message": { "type": "string" } } + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } }, "McpToolCallResult": { "type": "object", - "required": ["content"], + "required": [ + "content" + ], "properties": { "_meta": true, - "content": { "type": "array", "items": true }, + "content": { + "type": "array", + "items": true + }, "structuredContent": true } }, - "McpToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "McpToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "MemoryCitation": { "type": "object", - "required": ["entries", "threadIds"], + "required": [ + "entries", + "threadIds" + ], "properties": { - "entries": { "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" } }, - "threadIds": { "type": "array", "items": { "type": "string" } } + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/MemoryCitationEntry" + } + }, + "threadIds": { + "type": "array", + "items": { + "type": "string" + } + } } }, "MemoryCitationEntry": { "type": "object", - "required": ["lineEnd", "lineStart", "note", "path"], + "required": [ + "lineEnd", + "lineStart", + "note", + "path" + ], "properties": { - "lineEnd": { "type": "integer", "format": "uint32", "minimum": 0 }, - "lineStart": { "type": "integer", "format": "uint32", "minimum": 0 }, - "note": { "type": "string" }, - "path": { "type": "string" } + "lineEnd": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "lineStart": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "note": { + "type": "string" + }, + "path": { + "type": "string" + } } }, "MessagePhase": { @@ -488,45 +939,95 @@ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", "type": "string", - "enum": ["commentary"] + "enum": [ + "commentary" + ] }, { "description": "The assistant's terminal answer text for the current turn.", "type": "string", - "enum": ["final_answer"] + "enum": [ + "final_answer" + ] } ] }, - "NetworkAccess": { "type": "string", "enum": ["restricted", "enabled"] }, - "NonSteerableTurnKind": { "type": "string", "enum": ["review", "compact"] }, + "NetworkAccess": { + "type": "string", + "enum": [ + "restricted", + "enabled" + ] + }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, "PatchApplyStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "PatchChangeKind": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["add"], "title": "AddPatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "add" + ], + "title": "AddPatchChangeKindType" + } }, "title": "AddPatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["delete"], "title": "DeletePatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "delete" + ], + "title": "DeletePatchChangeKindType" + } }, "title": "DeletePatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "move_path": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["update"], "title": "UpdatePatchChangeKindType" } + "move_path": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "update" + ], + "title": "UpdatePatchChangeKindType" + } }, "title": "UpdatePatchChangeKind" } @@ -537,13 +1038,23 @@ { "description": "Codex owns sandbox construction for this profile.", "type": "object", - "required": ["fileSystem", "network", "type"], + "required": [ + "fileSystem", + "network", + "type" + ], "properties": { - "fileSystem": { "$ref": "#/definitions/PermissionProfileFileSystemPermissions" }, - "network": { "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, + "fileSystem": { + "$ref": "#/definitions/PermissionProfileFileSystemPermissions" + }, + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, "type": { "type": "string", - "enum": ["managed"], + "enum": [ + "managed" + ], "title": "ManagedPermissionProfileType" } }, @@ -552,11 +1063,15 @@ { "description": "Do not apply an outer sandbox.", "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["disabled"], + "enum": [ + "disabled" + ], "title": "DisabledPermissionProfileType" } }, @@ -565,12 +1080,19 @@ { "description": "Filesystem isolation is enforced by an external caller.", "type": "object", - "required": ["network", "type"], + "required": [ + "network", + "type" + ], "properties": { - "network": { "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, "type": { "type": "string", - "enum": ["external"], + "enum": [ + "external" + ], "title": "ExternalPermissionProfileType" } }, @@ -582,16 +1104,30 @@ "oneOf": [ { "type": "object", - "required": ["entries", "type"], + "required": [ + "entries", + "type" + ], "properties": { "entries": { "type": "array", - "items": { "$ref": "#/definitions/FileSystemSandboxEntry" } + "items": { + "$ref": "#/definitions/FileSystemSandboxEntry" + } + }, + "globScanMaxDepth": { + "type": [ + "integer", + "null" + ], + "format": "uint", + "minimum": 1 }, - "globScanMaxDepth": { "type": ["integer", "null"], "format": "uint", "minimum": 1 }, "type": { "type": "string", - "enum": ["restricted"], + "enum": [ + "restricted" + ], "title": "RestrictedPermissionProfileFileSystemPermissionsType" } }, @@ -599,11 +1135,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["unrestricted"], + "enum": [ + "unrestricted" + ], "title": "UnrestrictedPermissionProfileFileSystemPermissionsType" } }, @@ -613,23 +1153,40 @@ }, "PermissionProfileNetworkPermissions": { "type": "object", - "required": ["enabled"], - "properties": { "enabled": { "type": "boolean" } } + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ] }, "SandboxPolicy": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["dangerFullAccess"], + "enum": [ + "dangerFullAccess" + ], "title": "DangerFullAccessSandboxPolicyType" } }, @@ -637,24 +1194,43 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "networkAccess": { "default": false, "type": "boolean" }, - "type": { "type": "string", "enum": ["readOnly"], "title": "ReadOnlySandboxPolicyType" } + "networkAccess": { + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "readOnly" + ], + "title": "ReadOnlySandboxPolicyType" + } }, "title": "ReadOnlySandboxPolicy" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "networkAccess": { "default": "restricted", - "allOf": [{ "$ref": "#/definitions/NetworkAccess" }] + "allOf": [ + { + "$ref": "#/definitions/NetworkAccess" + } + ] }, "type": { "type": "string", - "enum": ["externalSandbox"], + "enum": [ + "externalSandbox" + ], "title": "ExternalSandboxSandboxPolicyType" } }, @@ -662,41 +1238,83 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "excludeSlashTmp": { "default": false, "type": "boolean" }, - "excludeTmpdirEnvVar": { "default": false, "type": "boolean" }, - "networkAccess": { "default": false, "type": "boolean" }, + "excludeSlashTmp": { + "default": false, + "type": "boolean" + }, + "excludeTmpdirEnvVar": { + "default": false, + "type": "boolean" + }, + "networkAccess": { + "default": false, + "type": "boolean" + }, "type": { "type": "string", - "enum": ["workspaceWrite"], + "enum": [ + "workspaceWrite" + ], "title": "WorkspaceWriteSandboxPolicyType" }, "writableRoots": { "default": [], "type": "array", - "items": { "$ref": "#/definitions/AbsolutePathBuf" } + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } } }, "title": "WorkspaceWriteSandboxPolicy" } ] }, - "ServiceTier": { "type": "string", "enum": ["fast", "flex"] }, + "ServiceTier": { + "type": "string", + "enum": [ + "fast", + "flex" + ] + }, "SessionSource": { "oneOf": [ - { "type": "string", "enum": ["cli", "vscode", "exec", "appServer", "unknown"] }, + { + "type": "string", + "enum": [ + "cli", + "vscode", + "exec", + "appServer", + "unknown" + ] + }, { "type": "object", - "required": ["custom"], - "properties": { "custom": { "type": "string" } }, + "required": [ + "custom" + ], + "properties": { + "custom": { + "type": "string" + } + }, "additionalProperties": false, "title": "CustomSessionSource" }, { "type": "object", - "required": ["subAgent"], - "properties": { "subAgent": { "$ref": "#/definitions/SubAgentSource" } }, + "required": [ + "subAgent" + ], + "properties": { + "subAgent": { + "$ref": "#/definitions/SubAgentSource" + } + }, "additionalProperties": false, "title": "SubAgentSessionSource" } @@ -704,23 +1322,59 @@ }, "SubAgentSource": { "oneOf": [ - { "type": "string", "enum": ["review", "compact", "memory_consolidation"] }, + { + "type": "string", + "enum": [ + "review", + "compact", + "memory_consolidation" + ] + }, { "type": "object", - "required": ["thread_spawn"], + "required": [ + "thread_spawn" + ], "properties": { "thread_spawn": { "type": "object", - "required": ["depth", "parent_thread_id"], + "required": [ + "depth", + "parent_thread_id" + ], "properties": { - "agent_nickname": { "default": null, "type": ["string", "null"] }, + "agent_nickname": { + "default": null, + "type": [ + "string", + "null" + ] + }, "agent_path": { "default": null, - "anyOf": [{ "$ref": "#/definitions/AgentPath" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/AgentPath" + }, + { + "type": "null" + } + ] }, - "agent_role": { "default": null, "type": ["string", "null"] }, - "depth": { "type": "integer", "format": "int32" }, - "parent_thread_id": { "$ref": "#/definitions/ThreadId" } + "agent_role": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "depth": { + "type": "integer", + "format": "int32" + }, + "parent_thread_id": { + "$ref": "#/definitions/ThreadId" + } } } }, @@ -729,8 +1383,14 @@ }, { "type": "object", - "required": ["other"], - "properties": { "other": { "type": "string" } }, + "required": [ + "other" + ], + "properties": { + "other": { + "type": "string" + } + }, "additionalProperties": false, "title": "OtherSubAgentSource" } @@ -738,15 +1398,24 @@ }, "TextElement": { "type": "object", - "required": ["byteRange"], + "required": [ + "byteRange" + ], "properties": { "byteRange": { "description": "Byte range in the parent `text` buffer that this element occupies.", - "allOf": [{ "$ref": "#/definitions/ByteRange" }] + "allOf": [ + { + "$ref": "#/definitions/ByteRange" + } + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] } } }, @@ -768,11 +1437,17 @@ "properties": { "agentNickname": { "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "agentRole": { "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "cliVersion": { "description": "Version of the CLI that created the thread.", @@ -785,7 +1460,11 @@ }, "cwd": { "description": "Working directory captured for the thread.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "ephemeral": { "description": "Whether the thread is ephemeral and should not be materialized on disk.", @@ -793,21 +1472,42 @@ }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "gitInfo": { "description": "Optional Git metadata captured when the thread was created.", - "anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/GitInfo" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "modelProvider": { "description": "Model provider used for this thread (for example, 'openai').", "type": "string" }, - "name": { "description": "Optional user-facing thread title.", "type": ["string", "null"] }, + "name": { + "description": "Optional user-facing thread title.", + "type": [ + "string", + "null" + ] + }, "path": { "description": "[UNSTABLE] Path to the thread on disk.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "preview": { "description": "Usually the first user message in the thread, if available.", @@ -815,16 +1515,37 @@ }, "source": { "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", - "allOf": [{ "$ref": "#/definitions/SessionSource" }] + "allOf": [ + { + "$ref": "#/definitions/SessionSource" + } + ] }, "status": { "description": "Current runtime status for the thread.", - "allOf": [{ "$ref": "#/definitions/ThreadStatus" }] + "allOf": [ + { + "$ref": "#/definitions/ThreadStatus" + } + ] + }, + "threadSource": { + "description": "Optional analytics source classification for this thread.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSource" + }, + { + "type": "null" + } + ] }, "turns": { "description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", "type": "array", - "items": { "$ref": "#/definitions/Turn" } + "items": { + "$ref": "#/definitions/Turn" + } }, "updatedAt": { "description": "Unix timestamp (in seconds) when the thread was last updated.", @@ -833,19 +1554,40 @@ } } }, - "ThreadActiveFlag": { "type": "string", "enum": ["waitingOnApproval", "waitingOnUserInput"] }, - "ThreadId": { "type": "string" }, + "ThreadActiveFlag": { + "type": "string", + "enum": [ + "waitingOnApproval", + "waitingOnUserInput" + ] + }, + "ThreadId": { + "type": "string" + }, "ThreadItem": { "oneOf": [ { "type": "object", - "required": ["content", "id", "type"], + "required": [ + "content", + "id", + "type" + ], "properties": { - "content": { "type": "array", "items": { "$ref": "#/definitions/UserInput" } }, - "id": { "type": "string" }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["userMessage"], + "enum": [ + "userMessage" + ], "title": "UserMessageThreadItemType" } }, @@ -853,16 +1595,26 @@ }, { "type": "object", - "required": ["fragments", "id", "type"], + "required": [ + "fragments", + "id", + "type" + ], "properties": { "fragments": { "type": "array", - "items": { "$ref": "#/definitions/HookPromptFragment" } + "items": { + "$ref": "#/definitions/HookPromptFragment" + } + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "type": { "type": "string", - "enum": ["hookPrompt"], + "enum": [ + "hookPrompt" + ], "title": "HookPromptThreadItemType" } }, @@ -870,21 +1622,45 @@ }, { "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "memoryCitation": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MemoryCitation" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MemoryCitation" + }, + { + "type": "null" + } + ] }, "phase": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MessagePhase" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "text": { + "type": "string" }, - "text": { "type": "string" }, "type": { "type": "string", - "enum": ["agentMessage"], + "enum": [ + "agentMessage" + ], "title": "AgentMessageThreadItemType" } }, @@ -893,66 +1669,141 @@ { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, - "text": { "type": "string" }, - "type": { "type": "string", "enum": ["plan"], "title": "PlanThreadItemType" } + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan" + ], + "title": "PlanThreadItemType" + } }, "title": "PlanThreadItem" }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "content": { "default": [], "type": "array", "items": { "type": "string" } }, - "id": { "type": "string" }, - "summary": { "default": [], "type": "array", "items": { "type": "string" } }, - "type": { "type": "string", "enum": ["reasoning"], "title": "ReasoningThreadItemType" } + "content": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "summary": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningThreadItemType" + } }, "title": "ReasoningThreadItem" }, { "type": "object", - "required": ["command", "commandActions", "cwd", "id", "status", "type"], + "required": [ + "command", + "commandActions", + "cwd", + "id", + "status", + "type" + ], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] + }, + "command": { + "description": "The command to be executed.", + "type": "string" }, - "command": { "description": "The command to be executed.", "type": "string" }, "commandActions": { "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", "type": "array", - "items": { "$ref": "#/definitions/CommandAction" } + "items": { + "$ref": "#/definitions/CommandAction" + } }, "cwd": { "description": "The command's working directory.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int32" }, - "id": { "type": "string" }, + "id": { + "type": "string" + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "source": { "default": "agent", - "allOf": [{ "$ref": "#/definitions/CommandExecutionSource" }] + "allOf": [ + { + "$ref": "#/definitions/CommandExecutionSource" + } + ] + }, + "status": { + "$ref": "#/definitions/CommandExecutionStatus" }, - "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { "type": "string", - "enum": ["commandExecution"], + "enum": [ + "commandExecution" + ], "title": "CommandExecutionThreadItemType" } }, @@ -960,14 +1811,30 @@ }, { "type": "object", - "required": ["changes", "id", "status", "type"], + "required": [ + "changes", + "id", + "status", + "type" + ], "properties": { - "changes": { "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" } }, - "id": { "type": "string" }, - "status": { "$ref": "#/definitions/PatchApplyStatus" }, + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/FileUpdateChange" + } + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/PatchApplyStatus" + }, "type": { "type": "string", - "enum": ["fileChange"], + "enum": [ + "fileChange" + ], "title": "FileChangeThreadItemType" } }, @@ -975,28 +1842,67 @@ }, { "type": "object", - "required": ["arguments", "id", "server", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "server", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "mcpAppResourceUri": { + "type": [ + "string", + "null" + ] }, - "id": { "type": "string" }, - "mcpAppResourceUri": { "type": ["string", "null"] }, "result": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallResult" + }, + { + "type": "null" + } + ] + }, + "server": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpToolCallStatus" + }, + "tool": { + "type": "string" }, - "server": { "type": "string" }, - "status": { "$ref": "#/definitions/McpToolCallStatus" }, - "tool": { "type": "string" }, "type": { "type": "string", - "enum": ["mcpToolCall"], + "enum": [ + "mcpToolCall" + ], "title": "McpToolCallThreadItemType" } }, @@ -1004,26 +1910,58 @@ }, { "type": "object", - "required": ["arguments", "id", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "contentItems": { - "type": ["array", "null"], - "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" } + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/DynamicToolCallOutputContentItem" + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "id": { "type": "string" }, - "namespace": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, - "success": { "type": ["boolean", "null"] }, - "tool": { "type": "string" }, + "id": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/DynamicToolCallStatus" + }, + "success": { + "type": [ + "boolean", + "null" + ] + }, + "tool": { + "type": "string" + }, "type": { "type": "string", - "enum": ["dynamicToolCall"], + "enum": [ + "dynamicToolCall" + ], "title": "DynamicToolCallThreadItemType" } }, @@ -1044,7 +1982,9 @@ "agentsStates": { "description": "Last known status of the target agents, when available.", "type": "object", - "additionalProperties": { "$ref": "#/definitions/CollabAgentState" } + "additionalProperties": { + "$ref": "#/definitions/CollabAgentState" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -1052,20 +1992,35 @@ }, "model": { "description": "Model requested for the spawned agent, when applicable.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "reasoningEffort": { "description": "Reasoning effort requested for the spawned agent, when applicable.", - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", @@ -1073,15 +2028,25 @@ }, "status": { "description": "Current status of the collab tool call.", - "allOf": [{ "$ref": "#/definitions/CollabAgentToolCallStatus" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentToolCallStatus" + } + ] }, "tool": { "description": "Name of the collab tool that was invoked.", - "allOf": [{ "$ref": "#/definitions/CollabAgentTool" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentTool" + } + ] }, "type": { "type": "string", - "enum": ["collabAgentToolCall"], + "enum": [ + "collabAgentToolCall" + ], "title": "CollabAgentToolCallThreadItemType" } }, @@ -1089,41 +2054,101 @@ }, { "type": "object", - "required": ["id", "query", "type"], + "required": [ + "id", + "query", + "type" + ], "properties": { "action": { - "anyOf": [{ "$ref": "#/definitions/WebSearchAction" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/WebSearchAction" + }, + { + "type": "null" + } + ] }, - "id": { "type": "string" }, - "query": { "type": "string" }, - "type": { "type": "string", "enum": ["webSearch"], "title": "WebSearchThreadItemType" } + "id": { + "type": "string" + }, + "query": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "webSearch" + ], + "title": "WebSearchThreadItemType" + } }, "title": "WebSearchThreadItem" }, { "type": "object", - "required": ["id", "path", "type"], + "required": [ + "id", + "path", + "type" + ], "properties": { - "id": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["imageView"], "title": "ImageViewThreadItemType" } + "id": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "imageView" + ], + "title": "ImageViewThreadItemType" + } }, "title": "ImageViewThreadItem" }, { "type": "object", - "required": ["id", "result", "status", "type"], + "required": [ + "id", + "result", + "status", + "type" + ], "properties": { - "id": { "type": "string" }, - "result": { "type": "string" }, - "revisedPrompt": { "type": ["string", "null"] }, - "savedPath": { - "anyOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" }] + "id": { + "type": "string" + }, + "result": { + "type": "string" + }, + "revisedPrompt": { + "type": [ + "string", + "null" + ] + }, + "savedPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" }, - "status": { "type": "string" }, "type": { "type": "string", - "enum": ["imageGeneration"], + "enum": [ + "imageGeneration" + ], "title": "ImageGenerationThreadItemType" } }, @@ -1131,13 +2156,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["enteredReviewMode"], + "enum": [ + "enteredReviewMode" + ], "title": "EnteredReviewModeThreadItemType" } }, @@ -1145,13 +2180,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["exitedReviewMode"], + "enum": [ + "exitedReviewMode" + ], "title": "ExitedReviewModeThreadItemType" } }, @@ -1159,12 +2204,19 @@ }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["contextCompaction"], + "enum": [ + "contextCompaction" + ], "title": "ContextCompactionThreadItemType" } }, @@ -1172,15 +2224,27 @@ } ] }, + "ThreadSource": { + "type": "string", + "enum": [ + "user", + "subagent", + "memory_consolidation" + ] + }, "ThreadStatus": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["notLoaded"], + "enum": [ + "notLoaded" + ], "title": "NotLoadedThreadStatusType" } }, @@ -1188,19 +2252,31 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["idle"], "title": "IdleThreadStatusType" } + "type": { + "type": "string", + "enum": [ + "idle" + ], + "title": "IdleThreadStatusType" + } }, "title": "IdleThreadStatus" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["systemError"], + "enum": [ + "systemError" + ], "title": "SystemErrorThreadStatusType" } }, @@ -1208,13 +2284,24 @@ }, { "type": "object", - "required": ["activeFlags", "type"], + "required": [ + "activeFlags", + "type" + ], "properties": { "activeFlags": { "type": "array", - "items": { "$ref": "#/definitions/ThreadActiveFlag" } + "items": { + "$ref": "#/definitions/ThreadActiveFlag" + } }, - "type": { "type": "string", "enum": ["active"], "title": "ActiveThreadStatusType" } + "type": { + "type": "string", + "enum": [ + "active" + ], + "title": "ActiveThreadStatusType" + } }, "title": "ActiveThreadStatus" } @@ -1222,103 +2309,248 @@ }, "Turn": { "type": "object", - "required": ["id", "items", "status"], + "required": [ + "id", + "items", + "status" + ], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { "description": "Only populated when the Turn's status is failed.", - "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/TurnError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "items": { - "description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + "description": "Thread items currently included in this turn payload.", "type": "array", - "items": { "$ref": "#/definitions/ThreadItem" } + "items": { + "$ref": "#/definitions/ThreadItem" + } + }, + "itemsView": { + "description": "Describes how much of `items` has been loaded for this turn.", + "default": "full", + "allOf": [ + { + "$ref": "#/definitions/TurnItemsView" + } + ] }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "status": { "$ref": "#/definitions/TurnStatus" } + "status": { + "$ref": "#/definitions/TurnStatus" + } } }, "TurnError": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { - "additionalDetails": { "default": null, "type": ["string", "null"] }, - "codexErrorInfo": { - "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] }, - "message": { "type": "string" } + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } } }, + "TurnItemsView": { + "oneOf": [ + { + "description": "`items` was not loaded for this turn. The field is intentionally empty.", + "type": "string", + "enum": [ + "notLoaded" + ] + }, + { + "description": "`items` contains only a display summary for this turn.", + "type": "string", + "enum": [ + "summary" + ] + }, + { + "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.", + "type": "string", + "enum": [ + "full" + ] + } + ] + }, "TurnStatus": { "type": "string", - "enum": ["completed", "interrupted", "failed", "inProgress"] + "enum": [ + "completed", + "interrupted", + "failed", + "inProgress" + ] }, "UserInput": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "text_elements": { "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/TextElement" } + "items": { + "$ref": "#/definitions/TextElement" + } }, - "type": { "type": "string", "enum": ["text"], "title": "TextUserInputType" } + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextUserInputType" + } }, "title": "TextUserInput" }, { "type": "object", - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "properties": { - "type": { "type": "string", "enum": ["image"], "title": "ImageUserInputType" }, - "url": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "image" + ], + "title": "ImageUserInputType" + }, + "url": { + "type": "string" + } }, "title": "ImageUserInput" }, { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["localImage"], "title": "LocalImageUserInputType" } + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localImage" + ], + "title": "LocalImageUserInputType" + } }, "title": "LocalImageUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["skill"], "title": "SkillUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "skill" + ], + "title": "SkillUserInputType" + } }, "title": "SkillUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["mention"], "title": "MentionUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mention" + ], + "title": "MentionUserInputType" + } }, "title": "MentionUserInput" } @@ -1328,46 +2560,98 @@ "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "queries": { "type": ["array", "null"], "items": { "type": "string" } }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchWebSearchActionType" } + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchWebSearchActionType" + } }, "title": "SearchWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["openPage"], + "enum": [ + "openPage" + ], "title": "OpenPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "OpenPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "pattern": { "type": ["string", "null"] }, + "pattern": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["findInPage"], + "enum": [ + "findInPage" + ], "title": "FindInPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "FindInPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["other"], "title": "OtherWebSearchActionType" } + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherWebSearchActionType" + } }, "title": "OtherWebSearchAction" } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json index 6315e981dd5..f052ccbe76d 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json @@ -15,36 +15,86 @@ "activePermissionProfile": { "description": "Named or implicit built-in profile that produced the active permissions, when known.", "default": null, - "anyOf": [{ "$ref": "#/definitions/ActivePermissionProfile" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ActivePermissionProfile" + }, + { + "type": "null" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" }, - "approvalPolicy": { "$ref": "#/definitions/AskForApproval" }, "approvalsReviewer": { "description": "Reviewer currently used for approval requests on this thread.", - "allOf": [{ "$ref": "#/definitions/ApprovalsReviewer" }] + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" }, - "cwd": { "$ref": "#/definitions/AbsolutePathBuf" }, "instructionSources": { "description": "Instruction source files currently loaded for this thread.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/AbsolutePathBuf" } + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" }, - "model": { "type": "string" }, - "modelProvider": { "type": "string" }, "permissionProfile": { "description": "Full active permissions for this thread. `activePermissionProfile` carries display/provenance metadata for this runtime profile.", "default": null, - "anyOf": [{ "$ref": "#/definitions/PermissionProfile" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/PermissionProfile" + }, + { + "type": "null" + } + ] }, "reasoningEffort": { - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "sandbox": { "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", - "allOf": [{ "$ref": "#/definitions/SandboxPolicy" }] + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] }, - "serviceTier": { "anyOf": [{ "$ref": "#/definitions/ServiceTier" }, { "type": "null" }] }, - "thread": { "$ref": "#/definitions/Thread" } + "serviceTier": { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + "thread": { + "$ref": "#/definitions/Thread" + } }, "definitions": { "AbsolutePathBuf": { @@ -53,12 +103,17 @@ }, "ActivePermissionProfile": { "type": "object", - "required": ["id"], + "required": [ + "id" + ], "properties": { "extends": { "description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", "default": null, - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "id": { "description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", @@ -68,7 +123,9 @@ "description": "Bounded user-requested modifications applied on top of the named profile, if any.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/ActivePermissionProfileModification" } + "items": { + "$ref": "#/definitions/ActivePermissionProfileModification" + } } } }, @@ -77,12 +134,19 @@ { "description": "Additional concrete directory that should be writable.", "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, "type": { "type": "string", - "enum": ["additionalWritableRoot"], + "enum": [ + "additionalWritableRoot" + ], "title": "AdditionalWritableRootActivePermissionProfileModificationType" } }, @@ -90,28 +154,60 @@ } ] }, - "AgentPath": { "type": "string" }, + "AgentPath": { + "type": "string" + }, "ApprovalsReviewer": { "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", "type": "string", - "enum": ["user", "auto_review", "guardian_subagent"] + "enum": [ + "user", + "auto_review", + "guardian_subagent" + ] }, "AskForApproval": { "oneOf": [ - { "type": "string", "enum": ["untrusted", "on-failure", "on-request", "never"] }, + { + "type": "string", + "enum": [ + "untrusted", + "on-failure", + "on-request", + "never" + ] + }, { "type": "object", - "required": ["granular"], + "required": [ + "granular" + ], "properties": { "granular": { "type": "object", - "required": ["mcp_elicitations", "rules", "sandbox_approval"], + "required": [ + "mcp_elicitations", + "rules", + "sandbox_approval" + ], "properties": { - "mcp_elicitations": { "type": "boolean" }, - "request_permissions": { "default": false, "type": "boolean" }, - "rules": { "type": "boolean" }, - "sandbox_approval": { "type": "boolean" }, - "skill_approval": { "default": false, "type": "boolean" } + "mcp_elicitations": { + "type": "boolean" + }, + "request_permissions": { + "default": false, + "type": "boolean" + }, + "rules": { + "type": "boolean" + }, + "sandbox_approval": { + "type": "boolean" + }, + "skill_approval": { + "default": false, + "type": "boolean" + } } } }, @@ -122,10 +218,21 @@ }, "ByteRange": { "type": "object", - "required": ["end", "start"], + "required": [ + "end", + "start" + ], "properties": { - "end": { "type": "integer", "format": "uint", "minimum": 0 }, - "start": { "type": "integer", "format": "uint", "minimum": 0 } + "end": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "start": { + "type": "integer", + "format": "uint", + "minimum": 0 + } } }, "CodexErrorInfo": { @@ -148,12 +255,21 @@ }, { "type": "object", - "required": ["httpConnectionFailed"], + "required": [ + "httpConnectionFailed" + ], "properties": { "httpConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -163,12 +279,21 @@ { "description": "Failed to connect to the response SSE stream.", "type": "object", - "required": ["responseStreamConnectionFailed"], + "required": [ + "responseStreamConnectionFailed" + ], "properties": { "responseStreamConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -178,12 +303,21 @@ { "description": "The response SSE stream disconnected in the middle of a turn before completion.", "type": "object", - "required": ["responseStreamDisconnected"], + "required": [ + "responseStreamDisconnected" + ], "properties": { "responseStreamDisconnected": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -193,12 +327,21 @@ { "description": "Reached the retry limit for responses.", "type": "object", - "required": ["responseTooManyFailedAttempts"], + "required": [ + "responseTooManyFailedAttempts" + ], "properties": { "responseTooManyFailedAttempts": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -208,12 +351,20 @@ { "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", "type": "object", - "required": ["activeTurnNotSteerable"], + "required": [ + "activeTurnNotSteerable" + ], "properties": { "activeTurnNotSteerable": { "type": "object", - "required": ["turnKind"], - "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } } + "required": [ + "turnKind" + ], + "properties": { + "turnKind": { + "$ref": "#/definitions/NonSteerableTurnKind" + } + } } }, "additionalProperties": false, @@ -223,10 +374,19 @@ }, "CollabAgentState": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { - "message": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/CollabAgentStatus" } + "message": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/CollabAgentStatus" + } } }, "CollabAgentStatus": { @@ -243,34 +403,73 @@ }, "CollabAgentTool": { "type": "string", - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] + "enum": [ + "spawnAgent", + "sendInput", + "resumeAgent", + "wait", + "closeAgent" + ] }, "CollabAgentToolCallStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed"] + "enum": [ + "inProgress", + "completed", + "failed" + ] }, "CommandAction": { "oneOf": [ { "type": "object", - "required": ["command", "name", "path", "type"], + "required": [ + "command", + "name", + "path", + "type" + ], "properties": { - "command": { "type": "string" }, - "name": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["read"], "title": "ReadCommandActionType" } + "command": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "read" + ], + "title": "ReadCommandActionType" + } }, "title": "ReadCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["listFiles"], + "enum": [ + "listFiles" + ], "title": "ListFilesCommandActionType" } }, @@ -278,21 +477,53 @@ }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchCommandActionType" } + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchCommandActionType" + } }, "title": "SearchCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "type": { "type": "string", "enum": ["unknown"], "title": "UnknownCommandActionType" } + "command": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "unknown" + ], + "title": "UnknownCommandActionType" + } }, "title": "UnknownCommandAction" } @@ -300,22 +531,39 @@ }, "CommandExecutionSource": { "type": "string", - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] + "enum": [ + "agent", + "userShell", + "unifiedExecStartup", + "unifiedExecInteraction" + ] }, "CommandExecutionStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputText"], + "enum": [ + "inputText" + ], "title": "InputTextDynamicToolCallOutputContentItemType" } }, @@ -323,12 +571,19 @@ }, { "type": "object", - "required": ["imageUrl", "type"], + "required": [ + "imageUrl", + "type" + ], "properties": { - "imageUrl": { "type": "string" }, + "imageUrl": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputImage"], + "enum": [ + "inputImage" + ], "title": "InputImageDynamicToolCallOutputContentItemType" } }, @@ -336,27 +591,59 @@ } ] }, - "DynamicToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, - "FileSystemAccessMode": { "type": "string", "enum": ["read", "write", "none"] }, + "DynamicToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, + "FileSystemAccessMode": { + "type": "string", + "enum": [ + "read", + "write", + "none" + ] + }, "FileSystemPath": { "oneOf": [ { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["path"], "title": "PathFileSystemPathType" } + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "path" + ], + "title": "PathFileSystemPathType" + } }, "title": "PathFileSystemPath" }, { "type": "object", - "required": ["pattern", "type"], + "required": [ + "pattern", + "type" + ], "properties": { - "pattern": { "type": "string" }, + "pattern": { + "type": "string" + }, "type": { "type": "string", - "enum": ["glob_pattern"], + "enum": [ + "glob_pattern" + ], "title": "GlobPatternFileSystemPathType" } }, @@ -364,10 +651,21 @@ }, { "type": "object", - "required": ["type", "value"], + "required": [ + "type", + "value" + ], "properties": { - "type": { "type": "string", "enum": ["special"], "title": "SpecialFileSystemPathType" }, - "value": { "$ref": "#/definitions/FileSystemSpecialPath" } + "type": { + "type": "string", + "enum": [ + "special" + ], + "title": "SpecialFileSystemPathType" + }, + "value": { + "$ref": "#/definitions/FileSystemSpecialPath" + } }, "title": "SpecialFileSystemPath" } @@ -375,111 +673,264 @@ }, "FileSystemSandboxEntry": { "type": "object", - "required": ["access", "path"], + "required": [ + "access", + "path" + ], "properties": { - "access": { "$ref": "#/definitions/FileSystemAccessMode" }, - "path": { "$ref": "#/definitions/FileSystemPath" } + "access": { + "$ref": "#/definitions/FileSystemAccessMode" + }, + "path": { + "$ref": "#/definitions/FileSystemPath" + } } }, "FileSystemSpecialPath": { "oneOf": [ { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["root"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "root" + ] + } + }, "title": "RootFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["minimal"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "minimal" + ] + } + }, "title": "MinimalFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], + "required": [ + "kind" + ], "properties": { - "kind": { "type": "string", "enum": ["project_roots"] }, - "subpath": { "type": ["string", "null"] } + "kind": { + "type": "string", + "enum": [ + "project_roots" + ] + }, + "subpath": { + "type": [ + "string", + "null" + ] + } }, "title": "KindFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["tmpdir"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "tmpdir" + ] + } + }, "title": "TmpdirFileSystemSpecialPath" }, { "type": "object", - "required": ["kind"], - "properties": { "kind": { "type": "string", "enum": ["slash_tmp"] } }, + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "slash_tmp" + ] + } + }, "title": "SlashTmpFileSystemSpecialPath" }, { "type": "object", - "required": ["kind", "path"], + "required": [ + "kind", + "path" + ], "properties": { - "kind": { "type": "string", "enum": ["unknown"] }, - "path": { "type": "string" }, - "subpath": { "type": ["string", "null"] } + "kind": { + "type": "string", + "enum": [ + "unknown" + ] + }, + "path": { + "type": "string" + }, + "subpath": { + "type": [ + "string", + "null" + ] + } } } ] }, "FileUpdateChange": { "type": "object", - "required": ["diff", "kind", "path"], + "required": [ + "diff", + "kind", + "path" + ], "properties": { - "diff": { "type": "string" }, - "kind": { "$ref": "#/definitions/PatchChangeKind" }, - "path": { "type": "string" } + "diff": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/PatchChangeKind" + }, + "path": { + "type": "string" + } } }, "GitInfo": { "type": "object", "properties": { - "branch": { "type": ["string", "null"] }, - "originUrl": { "type": ["string", "null"] }, - "sha": { "type": ["string", "null"] } + "branch": { + "type": [ + "string", + "null" + ] + }, + "originUrl": { + "type": [ + "string", + "null" + ] + }, + "sha": { + "type": [ + "string", + "null" + ] + } } }, "HookPromptFragment": { "type": "object", - "required": ["hookRunId", "text"], - "properties": { "hookRunId": { "type": "string" }, "text": { "type": "string" } } + "required": [ + "hookRunId", + "text" + ], + "properties": { + "hookRunId": { + "type": "string" + }, + "text": { + "type": "string" + } + } }, "McpToolCallError": { "type": "object", - "required": ["message"], - "properties": { "message": { "type": "string" } } + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } }, "McpToolCallResult": { "type": "object", - "required": ["content"], + "required": [ + "content" + ], "properties": { "_meta": true, - "content": { "type": "array", "items": true }, + "content": { + "type": "array", + "items": true + }, "structuredContent": true } }, - "McpToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "McpToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "MemoryCitation": { "type": "object", - "required": ["entries", "threadIds"], + "required": [ + "entries", + "threadIds" + ], "properties": { - "entries": { "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" } }, - "threadIds": { "type": "array", "items": { "type": "string" } } + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/MemoryCitationEntry" + } + }, + "threadIds": { + "type": "array", + "items": { + "type": "string" + } + } } }, "MemoryCitationEntry": { "type": "object", - "required": ["lineEnd", "lineStart", "note", "path"], + "required": [ + "lineEnd", + "lineStart", + "note", + "path" + ], "properties": { - "lineEnd": { "type": "integer", "format": "uint32", "minimum": 0 }, - "lineStart": { "type": "integer", "format": "uint32", "minimum": 0 }, - "note": { "type": "string" }, - "path": { "type": "string" } + "lineEnd": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "lineStart": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "note": { + "type": "string" + }, + "path": { + "type": "string" + } } }, "MessagePhase": { @@ -488,45 +939,95 @@ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", "type": "string", - "enum": ["commentary"] + "enum": [ + "commentary" + ] }, { "description": "The assistant's terminal answer text for the current turn.", "type": "string", - "enum": ["final_answer"] + "enum": [ + "final_answer" + ] } ] }, - "NetworkAccess": { "type": "string", "enum": ["restricted", "enabled"] }, - "NonSteerableTurnKind": { "type": "string", "enum": ["review", "compact"] }, + "NetworkAccess": { + "type": "string", + "enum": [ + "restricted", + "enabled" + ] + }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, "PatchApplyStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "PatchChangeKind": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["add"], "title": "AddPatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "add" + ], + "title": "AddPatchChangeKindType" + } }, "title": "AddPatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["delete"], "title": "DeletePatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "delete" + ], + "title": "DeletePatchChangeKindType" + } }, "title": "DeletePatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "move_path": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["update"], "title": "UpdatePatchChangeKindType" } + "move_path": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "update" + ], + "title": "UpdatePatchChangeKindType" + } }, "title": "UpdatePatchChangeKind" } @@ -537,13 +1038,23 @@ { "description": "Codex owns sandbox construction for this profile.", "type": "object", - "required": ["fileSystem", "network", "type"], + "required": [ + "fileSystem", + "network", + "type" + ], "properties": { - "fileSystem": { "$ref": "#/definitions/PermissionProfileFileSystemPermissions" }, - "network": { "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, + "fileSystem": { + "$ref": "#/definitions/PermissionProfileFileSystemPermissions" + }, + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, "type": { "type": "string", - "enum": ["managed"], + "enum": [ + "managed" + ], "title": "ManagedPermissionProfileType" } }, @@ -552,11 +1063,15 @@ { "description": "Do not apply an outer sandbox.", "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["disabled"], + "enum": [ + "disabled" + ], "title": "DisabledPermissionProfileType" } }, @@ -565,12 +1080,19 @@ { "description": "Filesystem isolation is enforced by an external caller.", "type": "object", - "required": ["network", "type"], + "required": [ + "network", + "type" + ], "properties": { - "network": { "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, "type": { "type": "string", - "enum": ["external"], + "enum": [ + "external" + ], "title": "ExternalPermissionProfileType" } }, @@ -582,16 +1104,30 @@ "oneOf": [ { "type": "object", - "required": ["entries", "type"], + "required": [ + "entries", + "type" + ], "properties": { "entries": { "type": "array", - "items": { "$ref": "#/definitions/FileSystemSandboxEntry" } + "items": { + "$ref": "#/definitions/FileSystemSandboxEntry" + } + }, + "globScanMaxDepth": { + "type": [ + "integer", + "null" + ], + "format": "uint", + "minimum": 1 }, - "globScanMaxDepth": { "type": ["integer", "null"], "format": "uint", "minimum": 1 }, "type": { "type": "string", - "enum": ["restricted"], + "enum": [ + "restricted" + ], "title": "RestrictedPermissionProfileFileSystemPermissionsType" } }, @@ -599,11 +1135,15 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["unrestricted"], + "enum": [ + "unrestricted" + ], "title": "UnrestrictedPermissionProfileFileSystemPermissionsType" } }, @@ -613,23 +1153,40 @@ }, "PermissionProfileNetworkPermissions": { "type": "object", - "required": ["enabled"], - "properties": { "enabled": { "type": "boolean" } } + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ] }, "SandboxPolicy": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["dangerFullAccess"], + "enum": [ + "dangerFullAccess" + ], "title": "DangerFullAccessSandboxPolicyType" } }, @@ -637,24 +1194,43 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "networkAccess": { "default": false, "type": "boolean" }, - "type": { "type": "string", "enum": ["readOnly"], "title": "ReadOnlySandboxPolicyType" } + "networkAccess": { + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "readOnly" + ], + "title": "ReadOnlySandboxPolicyType" + } }, "title": "ReadOnlySandboxPolicy" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "networkAccess": { "default": "restricted", - "allOf": [{ "$ref": "#/definitions/NetworkAccess" }] + "allOf": [ + { + "$ref": "#/definitions/NetworkAccess" + } + ] }, "type": { "type": "string", - "enum": ["externalSandbox"], + "enum": [ + "externalSandbox" + ], "title": "ExternalSandboxSandboxPolicyType" } }, @@ -662,41 +1238,83 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "excludeSlashTmp": { "default": false, "type": "boolean" }, - "excludeTmpdirEnvVar": { "default": false, "type": "boolean" }, - "networkAccess": { "default": false, "type": "boolean" }, + "excludeSlashTmp": { + "default": false, + "type": "boolean" + }, + "excludeTmpdirEnvVar": { + "default": false, + "type": "boolean" + }, + "networkAccess": { + "default": false, + "type": "boolean" + }, "type": { "type": "string", - "enum": ["workspaceWrite"], + "enum": [ + "workspaceWrite" + ], "title": "WorkspaceWriteSandboxPolicyType" }, "writableRoots": { "default": [], "type": "array", - "items": { "$ref": "#/definitions/AbsolutePathBuf" } + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } } }, "title": "WorkspaceWriteSandboxPolicy" } ] }, - "ServiceTier": { "type": "string", "enum": ["fast", "flex"] }, + "ServiceTier": { + "type": "string", + "enum": [ + "fast", + "flex" + ] + }, "SessionSource": { "oneOf": [ - { "type": "string", "enum": ["cli", "vscode", "exec", "appServer", "unknown"] }, + { + "type": "string", + "enum": [ + "cli", + "vscode", + "exec", + "appServer", + "unknown" + ] + }, { "type": "object", - "required": ["custom"], - "properties": { "custom": { "type": "string" } }, + "required": [ + "custom" + ], + "properties": { + "custom": { + "type": "string" + } + }, "additionalProperties": false, "title": "CustomSessionSource" }, { "type": "object", - "required": ["subAgent"], - "properties": { "subAgent": { "$ref": "#/definitions/SubAgentSource" } }, + "required": [ + "subAgent" + ], + "properties": { + "subAgent": { + "$ref": "#/definitions/SubAgentSource" + } + }, "additionalProperties": false, "title": "SubAgentSessionSource" } @@ -704,23 +1322,59 @@ }, "SubAgentSource": { "oneOf": [ - { "type": "string", "enum": ["review", "compact", "memory_consolidation"] }, + { + "type": "string", + "enum": [ + "review", + "compact", + "memory_consolidation" + ] + }, { "type": "object", - "required": ["thread_spawn"], + "required": [ + "thread_spawn" + ], "properties": { "thread_spawn": { "type": "object", - "required": ["depth", "parent_thread_id"], + "required": [ + "depth", + "parent_thread_id" + ], "properties": { - "agent_nickname": { "default": null, "type": ["string", "null"] }, + "agent_nickname": { + "default": null, + "type": [ + "string", + "null" + ] + }, "agent_path": { "default": null, - "anyOf": [{ "$ref": "#/definitions/AgentPath" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/AgentPath" + }, + { + "type": "null" + } + ] }, - "agent_role": { "default": null, "type": ["string", "null"] }, - "depth": { "type": "integer", "format": "int32" }, - "parent_thread_id": { "$ref": "#/definitions/ThreadId" } + "agent_role": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "depth": { + "type": "integer", + "format": "int32" + }, + "parent_thread_id": { + "$ref": "#/definitions/ThreadId" + } } } }, @@ -729,8 +1383,14 @@ }, { "type": "object", - "required": ["other"], - "properties": { "other": { "type": "string" } }, + "required": [ + "other" + ], + "properties": { + "other": { + "type": "string" + } + }, "additionalProperties": false, "title": "OtherSubAgentSource" } @@ -738,15 +1398,24 @@ }, "TextElement": { "type": "object", - "required": ["byteRange"], + "required": [ + "byteRange" + ], "properties": { "byteRange": { "description": "Byte range in the parent `text` buffer that this element occupies.", - "allOf": [{ "$ref": "#/definitions/ByteRange" }] + "allOf": [ + { + "$ref": "#/definitions/ByteRange" + } + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] } } }, @@ -768,11 +1437,17 @@ "properties": { "agentNickname": { "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "agentRole": { "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "cliVersion": { "description": "Version of the CLI that created the thread.", @@ -785,7 +1460,11 @@ }, "cwd": { "description": "Working directory captured for the thread.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "ephemeral": { "description": "Whether the thread is ephemeral and should not be materialized on disk.", @@ -793,21 +1472,42 @@ }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "gitInfo": { "description": "Optional Git metadata captured when the thread was created.", - "anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/GitInfo" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "modelProvider": { "description": "Model provider used for this thread (for example, 'openai').", "type": "string" }, - "name": { "description": "Optional user-facing thread title.", "type": ["string", "null"] }, + "name": { + "description": "Optional user-facing thread title.", + "type": [ + "string", + "null" + ] + }, "path": { "description": "[UNSTABLE] Path to the thread on disk.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "preview": { "description": "Usually the first user message in the thread, if available.", @@ -815,16 +1515,37 @@ }, "source": { "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", - "allOf": [{ "$ref": "#/definitions/SessionSource" }] + "allOf": [ + { + "$ref": "#/definitions/SessionSource" + } + ] }, "status": { "description": "Current runtime status for the thread.", - "allOf": [{ "$ref": "#/definitions/ThreadStatus" }] + "allOf": [ + { + "$ref": "#/definitions/ThreadStatus" + } + ] + }, + "threadSource": { + "description": "Optional analytics source classification for this thread.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSource" + }, + { + "type": "null" + } + ] }, "turns": { "description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", "type": "array", - "items": { "$ref": "#/definitions/Turn" } + "items": { + "$ref": "#/definitions/Turn" + } }, "updatedAt": { "description": "Unix timestamp (in seconds) when the thread was last updated.", @@ -833,19 +1554,40 @@ } } }, - "ThreadActiveFlag": { "type": "string", "enum": ["waitingOnApproval", "waitingOnUserInput"] }, - "ThreadId": { "type": "string" }, + "ThreadActiveFlag": { + "type": "string", + "enum": [ + "waitingOnApproval", + "waitingOnUserInput" + ] + }, + "ThreadId": { + "type": "string" + }, "ThreadItem": { "oneOf": [ { "type": "object", - "required": ["content", "id", "type"], + "required": [ + "content", + "id", + "type" + ], "properties": { - "content": { "type": "array", "items": { "$ref": "#/definitions/UserInput" } }, - "id": { "type": "string" }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["userMessage"], + "enum": [ + "userMessage" + ], "title": "UserMessageThreadItemType" } }, @@ -853,16 +1595,26 @@ }, { "type": "object", - "required": ["fragments", "id", "type"], + "required": [ + "fragments", + "id", + "type" + ], "properties": { "fragments": { "type": "array", - "items": { "$ref": "#/definitions/HookPromptFragment" } + "items": { + "$ref": "#/definitions/HookPromptFragment" + } + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "type": { "type": "string", - "enum": ["hookPrompt"], + "enum": [ + "hookPrompt" + ], "title": "HookPromptThreadItemType" } }, @@ -870,21 +1622,45 @@ }, { "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "memoryCitation": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MemoryCitation" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MemoryCitation" + }, + { + "type": "null" + } + ] }, "phase": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MessagePhase" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "text": { + "type": "string" }, - "text": { "type": "string" }, "type": { "type": "string", - "enum": ["agentMessage"], + "enum": [ + "agentMessage" + ], "title": "AgentMessageThreadItemType" } }, @@ -893,66 +1669,141 @@ { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, - "text": { "type": "string" }, - "type": { "type": "string", "enum": ["plan"], "title": "PlanThreadItemType" } + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan" + ], + "title": "PlanThreadItemType" + } }, "title": "PlanThreadItem" }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "content": { "default": [], "type": "array", "items": { "type": "string" } }, - "id": { "type": "string" }, - "summary": { "default": [], "type": "array", "items": { "type": "string" } }, - "type": { "type": "string", "enum": ["reasoning"], "title": "ReasoningThreadItemType" } + "content": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "summary": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningThreadItemType" + } }, "title": "ReasoningThreadItem" }, { "type": "object", - "required": ["command", "commandActions", "cwd", "id", "status", "type"], + "required": [ + "command", + "commandActions", + "cwd", + "id", + "status", + "type" + ], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] + }, + "command": { + "description": "The command to be executed.", + "type": "string" }, - "command": { "description": "The command to be executed.", "type": "string" }, "commandActions": { "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", "type": "array", - "items": { "$ref": "#/definitions/CommandAction" } + "items": { + "$ref": "#/definitions/CommandAction" + } }, "cwd": { "description": "The command's working directory.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int32" }, - "id": { "type": "string" }, + "id": { + "type": "string" + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "source": { "default": "agent", - "allOf": [{ "$ref": "#/definitions/CommandExecutionSource" }] + "allOf": [ + { + "$ref": "#/definitions/CommandExecutionSource" + } + ] + }, + "status": { + "$ref": "#/definitions/CommandExecutionStatus" }, - "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { "type": "string", - "enum": ["commandExecution"], + "enum": [ + "commandExecution" + ], "title": "CommandExecutionThreadItemType" } }, @@ -960,14 +1811,30 @@ }, { "type": "object", - "required": ["changes", "id", "status", "type"], + "required": [ + "changes", + "id", + "status", + "type" + ], "properties": { - "changes": { "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" } }, - "id": { "type": "string" }, - "status": { "$ref": "#/definitions/PatchApplyStatus" }, + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/FileUpdateChange" + } + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/PatchApplyStatus" + }, "type": { "type": "string", - "enum": ["fileChange"], + "enum": [ + "fileChange" + ], "title": "FileChangeThreadItemType" } }, @@ -975,28 +1842,67 @@ }, { "type": "object", - "required": ["arguments", "id", "server", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "server", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "mcpAppResourceUri": { + "type": [ + "string", + "null" + ] }, - "id": { "type": "string" }, - "mcpAppResourceUri": { "type": ["string", "null"] }, "result": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallResult" + }, + { + "type": "null" + } + ] + }, + "server": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpToolCallStatus" + }, + "tool": { + "type": "string" }, - "server": { "type": "string" }, - "status": { "$ref": "#/definitions/McpToolCallStatus" }, - "tool": { "type": "string" }, "type": { "type": "string", - "enum": ["mcpToolCall"], + "enum": [ + "mcpToolCall" + ], "title": "McpToolCallThreadItemType" } }, @@ -1004,26 +1910,58 @@ }, { "type": "object", - "required": ["arguments", "id", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "contentItems": { - "type": ["array", "null"], - "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" } + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/DynamicToolCallOutputContentItem" + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "id": { "type": "string" }, - "namespace": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, - "success": { "type": ["boolean", "null"] }, - "tool": { "type": "string" }, + "id": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/DynamicToolCallStatus" + }, + "success": { + "type": [ + "boolean", + "null" + ] + }, + "tool": { + "type": "string" + }, "type": { "type": "string", - "enum": ["dynamicToolCall"], + "enum": [ + "dynamicToolCall" + ], "title": "DynamicToolCallThreadItemType" } }, @@ -1044,7 +1982,9 @@ "agentsStates": { "description": "Last known status of the target agents, when available.", "type": "object", - "additionalProperties": { "$ref": "#/definitions/CollabAgentState" } + "additionalProperties": { + "$ref": "#/definitions/CollabAgentState" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -1052,20 +1992,35 @@ }, "model": { "description": "Model requested for the spawned agent, when applicable.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "reasoningEffort": { "description": "Reasoning effort requested for the spawned agent, when applicable.", - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", @@ -1073,15 +2028,25 @@ }, "status": { "description": "Current status of the collab tool call.", - "allOf": [{ "$ref": "#/definitions/CollabAgentToolCallStatus" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentToolCallStatus" + } + ] }, "tool": { "description": "Name of the collab tool that was invoked.", - "allOf": [{ "$ref": "#/definitions/CollabAgentTool" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentTool" + } + ] }, "type": { "type": "string", - "enum": ["collabAgentToolCall"], + "enum": [ + "collabAgentToolCall" + ], "title": "CollabAgentToolCallThreadItemType" } }, @@ -1089,41 +2054,101 @@ }, { "type": "object", - "required": ["id", "query", "type"], + "required": [ + "id", + "query", + "type" + ], "properties": { "action": { - "anyOf": [{ "$ref": "#/definitions/WebSearchAction" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/WebSearchAction" + }, + { + "type": "null" + } + ] }, - "id": { "type": "string" }, - "query": { "type": "string" }, - "type": { "type": "string", "enum": ["webSearch"], "title": "WebSearchThreadItemType" } + "id": { + "type": "string" + }, + "query": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "webSearch" + ], + "title": "WebSearchThreadItemType" + } }, "title": "WebSearchThreadItem" }, { "type": "object", - "required": ["id", "path", "type"], + "required": [ + "id", + "path", + "type" + ], "properties": { - "id": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["imageView"], "title": "ImageViewThreadItemType" } + "id": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "imageView" + ], + "title": "ImageViewThreadItemType" + } }, "title": "ImageViewThreadItem" }, { "type": "object", - "required": ["id", "result", "status", "type"], + "required": [ + "id", + "result", + "status", + "type" + ], "properties": { - "id": { "type": "string" }, - "result": { "type": "string" }, - "revisedPrompt": { "type": ["string", "null"] }, - "savedPath": { - "anyOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" }] + "id": { + "type": "string" + }, + "result": { + "type": "string" + }, + "revisedPrompt": { + "type": [ + "string", + "null" + ] + }, + "savedPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" }, - "status": { "type": "string" }, "type": { "type": "string", - "enum": ["imageGeneration"], + "enum": [ + "imageGeneration" + ], "title": "ImageGenerationThreadItemType" } }, @@ -1131,13 +2156,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["enteredReviewMode"], + "enum": [ + "enteredReviewMode" + ], "title": "EnteredReviewModeThreadItemType" } }, @@ -1145,13 +2180,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["exitedReviewMode"], + "enum": [ + "exitedReviewMode" + ], "title": "ExitedReviewModeThreadItemType" } }, @@ -1159,12 +2204,19 @@ }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["contextCompaction"], + "enum": [ + "contextCompaction" + ], "title": "ContextCompactionThreadItemType" } }, @@ -1172,15 +2224,27 @@ } ] }, + "ThreadSource": { + "type": "string", + "enum": [ + "user", + "subagent", + "memory_consolidation" + ] + }, "ThreadStatus": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["notLoaded"], + "enum": [ + "notLoaded" + ], "title": "NotLoadedThreadStatusType" } }, @@ -1188,19 +2252,31 @@ }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["idle"], "title": "IdleThreadStatusType" } + "type": { + "type": "string", + "enum": [ + "idle" + ], + "title": "IdleThreadStatusType" + } }, "title": "IdleThreadStatus" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["systemError"], + "enum": [ + "systemError" + ], "title": "SystemErrorThreadStatusType" } }, @@ -1208,13 +2284,24 @@ }, { "type": "object", - "required": ["activeFlags", "type"], + "required": [ + "activeFlags", + "type" + ], "properties": { "activeFlags": { "type": "array", - "items": { "$ref": "#/definitions/ThreadActiveFlag" } + "items": { + "$ref": "#/definitions/ThreadActiveFlag" + } }, - "type": { "type": "string", "enum": ["active"], "title": "ActiveThreadStatusType" } + "type": { + "type": "string", + "enum": [ + "active" + ], + "title": "ActiveThreadStatusType" + } }, "title": "ActiveThreadStatus" } @@ -1222,103 +2309,248 @@ }, "Turn": { "type": "object", - "required": ["id", "items", "status"], + "required": [ + "id", + "items", + "status" + ], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { "description": "Only populated when the Turn's status is failed.", - "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/TurnError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "items": { - "description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + "description": "Thread items currently included in this turn payload.", "type": "array", - "items": { "$ref": "#/definitions/ThreadItem" } + "items": { + "$ref": "#/definitions/ThreadItem" + } + }, + "itemsView": { + "description": "Describes how much of `items` has been loaded for this turn.", + "default": "full", + "allOf": [ + { + "$ref": "#/definitions/TurnItemsView" + } + ] }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "status": { "$ref": "#/definitions/TurnStatus" } + "status": { + "$ref": "#/definitions/TurnStatus" + } } }, "TurnError": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { - "additionalDetails": { "default": null, "type": ["string", "null"] }, - "codexErrorInfo": { - "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] }, - "message": { "type": "string" } + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } } }, + "TurnItemsView": { + "oneOf": [ + { + "description": "`items` was not loaded for this turn. The field is intentionally empty.", + "type": "string", + "enum": [ + "notLoaded" + ] + }, + { + "description": "`items` contains only a display summary for this turn.", + "type": "string", + "enum": [ + "summary" + ] + }, + { + "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.", + "type": "string", + "enum": [ + "full" + ] + } + ] + }, "TurnStatus": { "type": "string", - "enum": ["completed", "interrupted", "failed", "inProgress"] + "enum": [ + "completed", + "interrupted", + "failed", + "inProgress" + ] }, "UserInput": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "text_elements": { "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/TextElement" } + "items": { + "$ref": "#/definitions/TextElement" + } }, - "type": { "type": "string", "enum": ["text"], "title": "TextUserInputType" } + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextUserInputType" + } }, "title": "TextUserInput" }, { "type": "object", - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "properties": { - "type": { "type": "string", "enum": ["image"], "title": "ImageUserInputType" }, - "url": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "image" + ], + "title": "ImageUserInputType" + }, + "url": { + "type": "string" + } }, "title": "ImageUserInput" }, { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["localImage"], "title": "LocalImageUserInputType" } + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localImage" + ], + "title": "LocalImageUserInputType" + } }, "title": "LocalImageUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["skill"], "title": "SkillUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "skill" + ], + "title": "SkillUserInputType" + } }, "title": "SkillUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["mention"], "title": "MentionUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mention" + ], + "title": "MentionUserInputType" + } }, "title": "MentionUserInput" } @@ -1328,46 +2560,98 @@ "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "queries": { "type": ["array", "null"], "items": { "type": "string" } }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchWebSearchActionType" } + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchWebSearchActionType" + } }, "title": "SearchWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["openPage"], + "enum": [ + "openPage" + ], "title": "OpenPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "OpenPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "pattern": { "type": ["string", "null"] }, + "pattern": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["findInPage"], + "enum": [ + "findInPage" + ], "title": "FindInPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "FindInPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["other"], "title": "OtherWebSearchActionType" } + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherWebSearchActionType" + } }, "title": "OtherWebSearchAction" } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json index 80bef4b7275..792e82593ec 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json @@ -2,8 +2,18 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "TurnCompletedNotification", "type": "object", - "required": ["threadId", "turn"], - "properties": { "threadId": { "type": "string" }, "turn": { "$ref": "#/definitions/Turn" } }, + "required": [ + "threadId", + "turn" + ], + "properties": { + "threadId": { + "type": "string" + }, + "turn": { + "$ref": "#/definitions/Turn" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", @@ -11,10 +21,21 @@ }, "ByteRange": { "type": "object", - "required": ["end", "start"], + "required": [ + "end", + "start" + ], "properties": { - "end": { "type": "integer", "format": "uint", "minimum": 0 }, - "start": { "type": "integer", "format": "uint", "minimum": 0 } + "end": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "start": { + "type": "integer", + "format": "uint", + "minimum": 0 + } } }, "CodexErrorInfo": { @@ -37,12 +58,21 @@ }, { "type": "object", - "required": ["httpConnectionFailed"], + "required": [ + "httpConnectionFailed" + ], "properties": { "httpConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -52,12 +82,21 @@ { "description": "Failed to connect to the response SSE stream.", "type": "object", - "required": ["responseStreamConnectionFailed"], + "required": [ + "responseStreamConnectionFailed" + ], "properties": { "responseStreamConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -67,12 +106,21 @@ { "description": "The response SSE stream disconnected in the middle of a turn before completion.", "type": "object", - "required": ["responseStreamDisconnected"], + "required": [ + "responseStreamDisconnected" + ], "properties": { "responseStreamDisconnected": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -82,12 +130,21 @@ { "description": "Reached the retry limit for responses.", "type": "object", - "required": ["responseTooManyFailedAttempts"], + "required": [ + "responseTooManyFailedAttempts" + ], "properties": { "responseTooManyFailedAttempts": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -97,12 +154,20 @@ { "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", "type": "object", - "required": ["activeTurnNotSteerable"], + "required": [ + "activeTurnNotSteerable" + ], "properties": { "activeTurnNotSteerable": { "type": "object", - "required": ["turnKind"], - "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } } + "required": [ + "turnKind" + ], + "properties": { + "turnKind": { + "$ref": "#/definitions/NonSteerableTurnKind" + } + } } }, "additionalProperties": false, @@ -112,10 +177,19 @@ }, "CollabAgentState": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { - "message": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/CollabAgentStatus" } + "message": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/CollabAgentStatus" + } } }, "CollabAgentStatus": { @@ -132,34 +206,73 @@ }, "CollabAgentTool": { "type": "string", - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] + "enum": [ + "spawnAgent", + "sendInput", + "resumeAgent", + "wait", + "closeAgent" + ] }, "CollabAgentToolCallStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed"] + "enum": [ + "inProgress", + "completed", + "failed" + ] }, "CommandAction": { "oneOf": [ { "type": "object", - "required": ["command", "name", "path", "type"], + "required": [ + "command", + "name", + "path", + "type" + ], "properties": { - "command": { "type": "string" }, - "name": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["read"], "title": "ReadCommandActionType" } + "command": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "read" + ], + "title": "ReadCommandActionType" + } }, "title": "ReadCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["listFiles"], + "enum": [ + "listFiles" + ], "title": "ListFilesCommandActionType" } }, @@ -167,21 +280,53 @@ }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchCommandActionType" } + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchCommandActionType" + } }, "title": "SearchCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "type": { "type": "string", "enum": ["unknown"], "title": "UnknownCommandActionType" } + "command": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "unknown" + ], + "title": "UnknownCommandActionType" + } }, "title": "UnknownCommandAction" } @@ -189,22 +334,39 @@ }, "CommandExecutionSource": { "type": "string", - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] + "enum": [ + "agent", + "userShell", + "unifiedExecStartup", + "unifiedExecInteraction" + ] }, "CommandExecutionStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputText"], + "enum": [ + "inputText" + ], "title": "InputTextDynamicToolCallOutputContentItemType" } }, @@ -212,12 +374,19 @@ }, { "type": "object", - "required": ["imageUrl", "type"], + "required": [ + "imageUrl", + "type" + ], "properties": { - "imageUrl": { "type": "string" }, + "imageUrl": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputImage"], + "enum": [ + "inputImage" + ], "title": "InputImageDynamicToolCallOutputContentItemType" } }, @@ -225,52 +394,127 @@ } ] }, - "DynamicToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "DynamicToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "FileUpdateChange": { "type": "object", - "required": ["diff", "kind", "path"], + "required": [ + "diff", + "kind", + "path" + ], "properties": { - "diff": { "type": "string" }, - "kind": { "$ref": "#/definitions/PatchChangeKind" }, - "path": { "type": "string" } + "diff": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/PatchChangeKind" + }, + "path": { + "type": "string" + } } }, "HookPromptFragment": { "type": "object", - "required": ["hookRunId", "text"], - "properties": { "hookRunId": { "type": "string" }, "text": { "type": "string" } } + "required": [ + "hookRunId", + "text" + ], + "properties": { + "hookRunId": { + "type": "string" + }, + "text": { + "type": "string" + } + } }, "McpToolCallError": { "type": "object", - "required": ["message"], - "properties": { "message": { "type": "string" } } + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } }, "McpToolCallResult": { "type": "object", - "required": ["content"], + "required": [ + "content" + ], "properties": { "_meta": true, - "content": { "type": "array", "items": true }, + "content": { + "type": "array", + "items": true + }, "structuredContent": true } }, - "McpToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "McpToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "MemoryCitation": { "type": "object", - "required": ["entries", "threadIds"], + "required": [ + "entries", + "threadIds" + ], "properties": { - "entries": { "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" } }, - "threadIds": { "type": "array", "items": { "type": "string" } } + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/MemoryCitationEntry" + } + }, + "threadIds": { + "type": "array", + "items": { + "type": "string" + } + } } }, "MemoryCitationEntry": { "type": "object", - "required": ["lineEnd", "lineStart", "note", "path"], + "required": [ + "lineEnd", + "lineStart", + "note", + "path" + ], "properties": { - "lineEnd": { "type": "integer", "format": "uint32", "minimum": 0 }, - "lineStart": { "type": "integer", "format": "uint32", "minimum": 0 }, - "note": { "type": "string" }, - "path": { "type": "string" } + "lineEnd": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "lineStart": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "note": { + "type": "string" + }, + "path": { + "type": "string" + } } }, "MessagePhase": { @@ -279,44 +523,88 @@ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", "type": "string", - "enum": ["commentary"] + "enum": [ + "commentary" + ] }, { "description": "The assistant's terminal answer text for the current turn.", "type": "string", - "enum": ["final_answer"] + "enum": [ + "final_answer" + ] } ] }, - "NonSteerableTurnKind": { "type": "string", "enum": ["review", "compact"] }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, "PatchApplyStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "PatchChangeKind": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["add"], "title": "AddPatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "add" + ], + "title": "AddPatchChangeKindType" + } }, "title": "AddPatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["delete"], "title": "DeletePatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "delete" + ], + "title": "DeletePatchChangeKindType" + } }, "title": "DeletePatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "move_path": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["update"], "title": "UpdatePatchChangeKindType" } + "move_path": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "update" + ], + "title": "UpdatePatchChangeKindType" + } }, "title": "UpdatePatchChangeKind" } @@ -325,19 +613,35 @@ "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ] }, "TextElement": { "type": "object", - "required": ["byteRange"], + "required": [ + "byteRange" + ], "properties": { "byteRange": { "description": "Byte range in the parent `text` buffer that this element occupies.", - "allOf": [{ "$ref": "#/definitions/ByteRange" }] + "allOf": [ + { + "$ref": "#/definitions/ByteRange" + } + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] } } }, @@ -345,13 +649,26 @@ "oneOf": [ { "type": "object", - "required": ["content", "id", "type"], + "required": [ + "content", + "id", + "type" + ], "properties": { - "content": { "type": "array", "items": { "$ref": "#/definitions/UserInput" } }, - "id": { "type": "string" }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["userMessage"], + "enum": [ + "userMessage" + ], "title": "UserMessageThreadItemType" } }, @@ -359,16 +676,26 @@ }, { "type": "object", - "required": ["fragments", "id", "type"], + "required": [ + "fragments", + "id", + "type" + ], "properties": { "fragments": { "type": "array", - "items": { "$ref": "#/definitions/HookPromptFragment" } + "items": { + "$ref": "#/definitions/HookPromptFragment" + } + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "type": { "type": "string", - "enum": ["hookPrompt"], + "enum": [ + "hookPrompt" + ], "title": "HookPromptThreadItemType" } }, @@ -376,21 +703,45 @@ }, { "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "memoryCitation": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MemoryCitation" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MemoryCitation" + }, + { + "type": "null" + } + ] }, "phase": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MessagePhase" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "text": { + "type": "string" }, - "text": { "type": "string" }, "type": { "type": "string", - "enum": ["agentMessage"], + "enum": [ + "agentMessage" + ], "title": "AgentMessageThreadItemType" } }, @@ -399,66 +750,141 @@ { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, - "text": { "type": "string" }, - "type": { "type": "string", "enum": ["plan"], "title": "PlanThreadItemType" } + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan" + ], + "title": "PlanThreadItemType" + } }, "title": "PlanThreadItem" }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "content": { "default": [], "type": "array", "items": { "type": "string" } }, - "id": { "type": "string" }, - "summary": { "default": [], "type": "array", "items": { "type": "string" } }, - "type": { "type": "string", "enum": ["reasoning"], "title": "ReasoningThreadItemType" } + "content": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "summary": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningThreadItemType" + } }, "title": "ReasoningThreadItem" }, { "type": "object", - "required": ["command", "commandActions", "cwd", "id", "status", "type"], + "required": [ + "command", + "commandActions", + "cwd", + "id", + "status", + "type" + ], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] + }, + "command": { + "description": "The command to be executed.", + "type": "string" }, - "command": { "description": "The command to be executed.", "type": "string" }, "commandActions": { "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", "type": "array", - "items": { "$ref": "#/definitions/CommandAction" } + "items": { + "$ref": "#/definitions/CommandAction" + } }, "cwd": { "description": "The command's working directory.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int32" }, - "id": { "type": "string" }, + "id": { + "type": "string" + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "source": { "default": "agent", - "allOf": [{ "$ref": "#/definitions/CommandExecutionSource" }] + "allOf": [ + { + "$ref": "#/definitions/CommandExecutionSource" + } + ] + }, + "status": { + "$ref": "#/definitions/CommandExecutionStatus" }, - "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { "type": "string", - "enum": ["commandExecution"], + "enum": [ + "commandExecution" + ], "title": "CommandExecutionThreadItemType" } }, @@ -466,14 +892,30 @@ }, { "type": "object", - "required": ["changes", "id", "status", "type"], + "required": [ + "changes", + "id", + "status", + "type" + ], "properties": { - "changes": { "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" } }, - "id": { "type": "string" }, - "status": { "$ref": "#/definitions/PatchApplyStatus" }, + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/FileUpdateChange" + } + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/PatchApplyStatus" + }, "type": { "type": "string", - "enum": ["fileChange"], + "enum": [ + "fileChange" + ], "title": "FileChangeThreadItemType" } }, @@ -481,28 +923,67 @@ }, { "type": "object", - "required": ["arguments", "id", "server", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "server", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "mcpAppResourceUri": { + "type": [ + "string", + "null" + ] }, - "id": { "type": "string" }, - "mcpAppResourceUri": { "type": ["string", "null"] }, "result": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallResult" + }, + { + "type": "null" + } + ] + }, + "server": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpToolCallStatus" + }, + "tool": { + "type": "string" }, - "server": { "type": "string" }, - "status": { "$ref": "#/definitions/McpToolCallStatus" }, - "tool": { "type": "string" }, "type": { "type": "string", - "enum": ["mcpToolCall"], + "enum": [ + "mcpToolCall" + ], "title": "McpToolCallThreadItemType" } }, @@ -510,26 +991,58 @@ }, { "type": "object", - "required": ["arguments", "id", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "contentItems": { - "type": ["array", "null"], - "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" } + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/DynamicToolCallOutputContentItem" + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "id": { "type": "string" }, - "namespace": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, - "success": { "type": ["boolean", "null"] }, - "tool": { "type": "string" }, + "id": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/DynamicToolCallStatus" + }, + "success": { + "type": [ + "boolean", + "null" + ] + }, + "tool": { + "type": "string" + }, "type": { "type": "string", - "enum": ["dynamicToolCall"], + "enum": [ + "dynamicToolCall" + ], "title": "DynamicToolCallThreadItemType" } }, @@ -550,7 +1063,9 @@ "agentsStates": { "description": "Last known status of the target agents, when available.", "type": "object", - "additionalProperties": { "$ref": "#/definitions/CollabAgentState" } + "additionalProperties": { + "$ref": "#/definitions/CollabAgentState" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -558,20 +1073,35 @@ }, "model": { "description": "Model requested for the spawned agent, when applicable.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "reasoningEffort": { "description": "Reasoning effort requested for the spawned agent, when applicable.", - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", @@ -579,15 +1109,25 @@ }, "status": { "description": "Current status of the collab tool call.", - "allOf": [{ "$ref": "#/definitions/CollabAgentToolCallStatus" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentToolCallStatus" + } + ] }, "tool": { "description": "Name of the collab tool that was invoked.", - "allOf": [{ "$ref": "#/definitions/CollabAgentTool" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentTool" + } + ] }, "type": { "type": "string", - "enum": ["collabAgentToolCall"], + "enum": [ + "collabAgentToolCall" + ], "title": "CollabAgentToolCallThreadItemType" } }, @@ -595,41 +1135,101 @@ }, { "type": "object", - "required": ["id", "query", "type"], + "required": [ + "id", + "query", + "type" + ], "properties": { "action": { - "anyOf": [{ "$ref": "#/definitions/WebSearchAction" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/WebSearchAction" + }, + { + "type": "null" + } + ] }, - "id": { "type": "string" }, - "query": { "type": "string" }, - "type": { "type": "string", "enum": ["webSearch"], "title": "WebSearchThreadItemType" } + "id": { + "type": "string" + }, + "query": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "webSearch" + ], + "title": "WebSearchThreadItemType" + } }, "title": "WebSearchThreadItem" }, { "type": "object", - "required": ["id", "path", "type"], + "required": [ + "id", + "path", + "type" + ], "properties": { - "id": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["imageView"], "title": "ImageViewThreadItemType" } + "id": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "imageView" + ], + "title": "ImageViewThreadItemType" + } }, "title": "ImageViewThreadItem" }, { "type": "object", - "required": ["id", "result", "status", "type"], + "required": [ + "id", + "result", + "status", + "type" + ], "properties": { - "id": { "type": "string" }, - "result": { "type": "string" }, - "revisedPrompt": { "type": ["string", "null"] }, - "savedPath": { - "anyOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" }] + "id": { + "type": "string" + }, + "result": { + "type": "string" + }, + "revisedPrompt": { + "type": [ + "string", + "null" + ] + }, + "savedPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" }, - "status": { "type": "string" }, "type": { "type": "string", - "enum": ["imageGeneration"], + "enum": [ + "imageGeneration" + ], "title": "ImageGenerationThreadItemType" } }, @@ -637,13 +1237,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["enteredReviewMode"], + "enum": [ + "enteredReviewMode" + ], "title": "EnteredReviewModeThreadItemType" } }, @@ -651,13 +1261,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["exitedReviewMode"], + "enum": [ + "exitedReviewMode" + ], "title": "ExitedReviewModeThreadItemType" } }, @@ -665,12 +1285,19 @@ }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["contextCompaction"], + "enum": [ + "contextCompaction" + ], "title": "ContextCompactionThreadItemType" } }, @@ -680,103 +1307,248 @@ }, "Turn": { "type": "object", - "required": ["id", "items", "status"], + "required": [ + "id", + "items", + "status" + ], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { "description": "Only populated when the Turn's status is failed.", - "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/TurnError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "items": { - "description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + "description": "Thread items currently included in this turn payload.", "type": "array", - "items": { "$ref": "#/definitions/ThreadItem" } + "items": { + "$ref": "#/definitions/ThreadItem" + } + }, + "itemsView": { + "description": "Describes how much of `items` has been loaded for this turn.", + "default": "full", + "allOf": [ + { + "$ref": "#/definitions/TurnItemsView" + } + ] }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "status": { "$ref": "#/definitions/TurnStatus" } + "status": { + "$ref": "#/definitions/TurnStatus" + } } }, "TurnError": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { - "additionalDetails": { "default": null, "type": ["string", "null"] }, - "codexErrorInfo": { - "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] }, - "message": { "type": "string" } + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } } }, + "TurnItemsView": { + "oneOf": [ + { + "description": "`items` was not loaded for this turn. The field is intentionally empty.", + "type": "string", + "enum": [ + "notLoaded" + ] + }, + { + "description": "`items` contains only a display summary for this turn.", + "type": "string", + "enum": [ + "summary" + ] + }, + { + "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.", + "type": "string", + "enum": [ + "full" + ] + } + ] + }, "TurnStatus": { "type": "string", - "enum": ["completed", "interrupted", "failed", "inProgress"] + "enum": [ + "completed", + "interrupted", + "failed", + "inProgress" + ] }, "UserInput": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "text_elements": { "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/TextElement" } + "items": { + "$ref": "#/definitions/TextElement" + } }, - "type": { "type": "string", "enum": ["text"], "title": "TextUserInputType" } + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextUserInputType" + } }, "title": "TextUserInput" }, { "type": "object", - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "properties": { - "type": { "type": "string", "enum": ["image"], "title": "ImageUserInputType" }, - "url": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "image" + ], + "title": "ImageUserInputType" + }, + "url": { + "type": "string" + } }, "title": "ImageUserInput" }, { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["localImage"], "title": "LocalImageUserInputType" } + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localImage" + ], + "title": "LocalImageUserInputType" + } }, "title": "LocalImageUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["skill"], "title": "SkillUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "skill" + ], + "title": "SkillUserInputType" + } }, "title": "SkillUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["mention"], "title": "MentionUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mention" + ], + "title": "MentionUserInputType" + } }, "title": "MentionUserInput" } @@ -786,46 +1558,98 @@ "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "queries": { "type": ["array", "null"], "items": { "type": "string" } }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchWebSearchActionType" } + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchWebSearchActionType" + } }, "title": "SearchWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["openPage"], + "enum": [ + "openPage" + ], "title": "OpenPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "OpenPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "pattern": { "type": ["string", "null"] }, + "pattern": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["findInPage"], + "enum": [ + "findInPage" + ], "title": "FindInPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "FindInPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["other"], "title": "OtherWebSearchActionType" } + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherWebSearchActionType" + } }, "title": "OtherWebSearchAction" } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json index 8a88784e23b..1457a7c2456 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json @@ -2,8 +2,14 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "TurnStartResponse", "type": "object", - "required": ["turn"], - "properties": { "turn": { "$ref": "#/definitions/Turn" } }, + "required": [ + "turn" + ], + "properties": { + "turn": { + "$ref": "#/definitions/Turn" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", @@ -11,10 +17,21 @@ }, "ByteRange": { "type": "object", - "required": ["end", "start"], + "required": [ + "end", + "start" + ], "properties": { - "end": { "type": "integer", "format": "uint", "minimum": 0 }, - "start": { "type": "integer", "format": "uint", "minimum": 0 } + "end": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "start": { + "type": "integer", + "format": "uint", + "minimum": 0 + } } }, "CodexErrorInfo": { @@ -37,12 +54,21 @@ }, { "type": "object", - "required": ["httpConnectionFailed"], + "required": [ + "httpConnectionFailed" + ], "properties": { "httpConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -52,12 +78,21 @@ { "description": "Failed to connect to the response SSE stream.", "type": "object", - "required": ["responseStreamConnectionFailed"], + "required": [ + "responseStreamConnectionFailed" + ], "properties": { "responseStreamConnectionFailed": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -67,12 +102,21 @@ { "description": "The response SSE stream disconnected in the middle of a turn before completion.", "type": "object", - "required": ["responseStreamDisconnected"], + "required": [ + "responseStreamDisconnected" + ], "properties": { "responseStreamDisconnected": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -82,12 +126,21 @@ { "description": "Reached the retry limit for responses.", "type": "object", - "required": ["responseTooManyFailedAttempts"], + "required": [ + "responseTooManyFailedAttempts" + ], "properties": { "responseTooManyFailedAttempts": { "type": "object", "properties": { - "httpStatusCode": { "type": ["integer", "null"], "format": "uint16", "minimum": 0 } + "httpStatusCode": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0 + } } } }, @@ -97,12 +150,20 @@ { "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", "type": "object", - "required": ["activeTurnNotSteerable"], + "required": [ + "activeTurnNotSteerable" + ], "properties": { "activeTurnNotSteerable": { "type": "object", - "required": ["turnKind"], - "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } } + "required": [ + "turnKind" + ], + "properties": { + "turnKind": { + "$ref": "#/definitions/NonSteerableTurnKind" + } + } } }, "additionalProperties": false, @@ -112,10 +173,19 @@ }, "CollabAgentState": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { - "message": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/CollabAgentStatus" } + "message": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/CollabAgentStatus" + } } }, "CollabAgentStatus": { @@ -132,34 +202,73 @@ }, "CollabAgentTool": { "type": "string", - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] + "enum": [ + "spawnAgent", + "sendInput", + "resumeAgent", + "wait", + "closeAgent" + ] }, "CollabAgentToolCallStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed"] + "enum": [ + "inProgress", + "completed", + "failed" + ] }, "CommandAction": { "oneOf": [ { "type": "object", - "required": ["command", "name", "path", "type"], + "required": [ + "command", + "name", + "path", + "type" + ], "properties": { - "command": { "type": "string" }, - "name": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["read"], "title": "ReadCommandActionType" } + "command": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "read" + ], + "title": "ReadCommandActionType" + } }, "title": "ReadCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["listFiles"], + "enum": [ + "listFiles" + ], "title": "ListFilesCommandActionType" } }, @@ -167,21 +276,53 @@ }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "path": { "type": ["string", "null"] }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchCommandActionType" } + "command": { + "type": "string" + }, + "path": { + "type": [ + "string", + "null" + ] + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchCommandActionType" + } }, "title": "SearchCommandAction" }, { "type": "object", - "required": ["command", "type"], + "required": [ + "command", + "type" + ], "properties": { - "command": { "type": "string" }, - "type": { "type": "string", "enum": ["unknown"], "title": "UnknownCommandActionType" } + "command": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "unknown" + ], + "title": "UnknownCommandActionType" + } }, "title": "UnknownCommandAction" } @@ -189,22 +330,39 @@ }, "CommandExecutionSource": { "type": "string", - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] + "enum": [ + "agent", + "userShell", + "unifiedExecStartup", + "unifiedExecInteraction" + ] }, "CommandExecutionStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputText"], + "enum": [ + "inputText" + ], "title": "InputTextDynamicToolCallOutputContentItemType" } }, @@ -212,12 +370,19 @@ }, { "type": "object", - "required": ["imageUrl", "type"], + "required": [ + "imageUrl", + "type" + ], "properties": { - "imageUrl": { "type": "string" }, + "imageUrl": { + "type": "string" + }, "type": { "type": "string", - "enum": ["inputImage"], + "enum": [ + "inputImage" + ], "title": "InputImageDynamicToolCallOutputContentItemType" } }, @@ -225,52 +390,127 @@ } ] }, - "DynamicToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "DynamicToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "FileUpdateChange": { "type": "object", - "required": ["diff", "kind", "path"], + "required": [ + "diff", + "kind", + "path" + ], "properties": { - "diff": { "type": "string" }, - "kind": { "$ref": "#/definitions/PatchChangeKind" }, - "path": { "type": "string" } + "diff": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/PatchChangeKind" + }, + "path": { + "type": "string" + } } }, "HookPromptFragment": { "type": "object", - "required": ["hookRunId", "text"], - "properties": { "hookRunId": { "type": "string" }, "text": { "type": "string" } } + "required": [ + "hookRunId", + "text" + ], + "properties": { + "hookRunId": { + "type": "string" + }, + "text": { + "type": "string" + } + } }, "McpToolCallError": { "type": "object", - "required": ["message"], - "properties": { "message": { "type": "string" } } + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } }, "McpToolCallResult": { "type": "object", - "required": ["content"], + "required": [ + "content" + ], "properties": { "_meta": true, - "content": { "type": "array", "items": true }, + "content": { + "type": "array", + "items": true + }, "structuredContent": true } }, - "McpToolCallStatus": { "type": "string", "enum": ["inProgress", "completed", "failed"] }, + "McpToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, "MemoryCitation": { "type": "object", - "required": ["entries", "threadIds"], + "required": [ + "entries", + "threadIds" + ], "properties": { - "entries": { "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" } }, - "threadIds": { "type": "array", "items": { "type": "string" } } + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/MemoryCitationEntry" + } + }, + "threadIds": { + "type": "array", + "items": { + "type": "string" + } + } } }, "MemoryCitationEntry": { "type": "object", - "required": ["lineEnd", "lineStart", "note", "path"], + "required": [ + "lineEnd", + "lineStart", + "note", + "path" + ], "properties": { - "lineEnd": { "type": "integer", "format": "uint32", "minimum": 0 }, - "lineStart": { "type": "integer", "format": "uint32", "minimum": 0 }, - "note": { "type": "string" }, - "path": { "type": "string" } + "lineEnd": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "lineStart": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "note": { + "type": "string" + }, + "path": { + "type": "string" + } } }, "MessagePhase": { @@ -279,44 +519,88 @@ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", "type": "string", - "enum": ["commentary"] + "enum": [ + "commentary" + ] }, { "description": "The assistant's terminal answer text for the current turn.", "type": "string", - "enum": ["final_answer"] + "enum": [ + "final_answer" + ] } ] }, - "NonSteerableTurnKind": { "type": "string", "enum": ["review", "compact"] }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, "PatchApplyStatus": { "type": "string", - "enum": ["inProgress", "completed", "failed", "declined"] + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] }, "PatchChangeKind": { "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["add"], "title": "AddPatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "add" + ], + "title": "AddPatchChangeKindType" + } }, "title": "AddPatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["delete"], "title": "DeletePatchChangeKindType" } + "type": { + "type": "string", + "enum": [ + "delete" + ], + "title": "DeletePatchChangeKindType" + } }, "title": "DeletePatchChangeKind" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "move_path": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["update"], "title": "UpdatePatchChangeKindType" } + "move_path": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "update" + ], + "title": "UpdatePatchChangeKindType" + } }, "title": "UpdatePatchChangeKind" } @@ -325,19 +609,35 @@ "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", "type": "string", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ] }, "TextElement": { "type": "object", - "required": ["byteRange"], + "required": [ + "byteRange" + ], "properties": { "byteRange": { "description": "Byte range in the parent `text` buffer that this element occupies.", - "allOf": [{ "$ref": "#/definitions/ByteRange" }] + "allOf": [ + { + "$ref": "#/definitions/ByteRange" + } + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] } } }, @@ -345,13 +645,26 @@ "oneOf": [ { "type": "object", - "required": ["content", "id", "type"], + "required": [ + "content", + "id", + "type" + ], "properties": { - "content": { "type": "array", "items": { "$ref": "#/definitions/UserInput" } }, - "id": { "type": "string" }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["userMessage"], + "enum": [ + "userMessage" + ], "title": "UserMessageThreadItemType" } }, @@ -359,16 +672,26 @@ }, { "type": "object", - "required": ["fragments", "id", "type"], + "required": [ + "fragments", + "id", + "type" + ], "properties": { "fragments": { "type": "array", - "items": { "$ref": "#/definitions/HookPromptFragment" } + "items": { + "$ref": "#/definitions/HookPromptFragment" + } + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "type": { "type": "string", - "enum": ["hookPrompt"], + "enum": [ + "hookPrompt" + ], "title": "HookPromptThreadItemType" } }, @@ -376,21 +699,45 @@ }, { "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "memoryCitation": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MemoryCitation" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MemoryCitation" + }, + { + "type": "null" + } + ] }, "phase": { "default": null, - "anyOf": [{ "$ref": "#/definitions/MessagePhase" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "text": { + "type": "string" }, - "text": { "type": "string" }, "type": { "type": "string", - "enum": ["agentMessage"], + "enum": [ + "agentMessage" + ], "title": "AgentMessageThreadItemType" } }, @@ -399,66 +746,141 @@ { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", "type": "object", - "required": ["id", "text", "type"], + "required": [ + "id", + "text", + "type" + ], "properties": { - "id": { "type": "string" }, - "text": { "type": "string" }, - "type": { "type": "string", "enum": ["plan"], "title": "PlanThreadItemType" } + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan" + ], + "title": "PlanThreadItemType" + } }, "title": "PlanThreadItem" }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "content": { "default": [], "type": "array", "items": { "type": "string" } }, - "id": { "type": "string" }, - "summary": { "default": [], "type": "array", "items": { "type": "string" } }, - "type": { "type": "string", "enum": ["reasoning"], "title": "ReasoningThreadItemType" } + "content": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "summary": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningThreadItemType" + } }, "title": "ReasoningThreadItem" }, { "type": "object", - "required": ["command", "commandActions", "cwd", "id", "status", "type"], + "required": [ + "command", + "commandActions", + "cwd", + "id", + "status", + "type" + ], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] + }, + "command": { + "description": "The command to be executed.", + "type": "string" }, - "command": { "description": "The command to be executed.", "type": "string" }, "commandActions": { "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", "type": "array", - "items": { "$ref": "#/definitions/CommandAction" } + "items": { + "$ref": "#/definitions/CommandAction" + } }, "cwd": { "description": "The command's working directory.", - "allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }] + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int32" }, - "id": { "type": "string" }, + "id": { + "type": "string" + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "source": { "default": "agent", - "allOf": [{ "$ref": "#/definitions/CommandExecutionSource" }] + "allOf": [ + { + "$ref": "#/definitions/CommandExecutionSource" + } + ] + }, + "status": { + "$ref": "#/definitions/CommandExecutionStatus" }, - "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { "type": "string", - "enum": ["commandExecution"], + "enum": [ + "commandExecution" + ], "title": "CommandExecutionThreadItemType" } }, @@ -466,14 +888,30 @@ }, { "type": "object", - "required": ["changes", "id", "status", "type"], + "required": [ + "changes", + "id", + "status", + "type" + ], "properties": { - "changes": { "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" } }, - "id": { "type": "string" }, - "status": { "$ref": "#/definitions/PatchApplyStatus" }, + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/FileUpdateChange" + } + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/PatchApplyStatus" + }, "type": { "type": "string", - "enum": ["fileChange"], + "enum": [ + "fileChange" + ], "title": "FileChangeThreadItemType" } }, @@ -481,28 +919,67 @@ }, { "type": "object", - "required": ["arguments", "id", "server", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "server", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "mcpAppResourceUri": { + "type": [ + "string", + "null" + ] }, - "id": { "type": "string" }, - "mcpAppResourceUri": { "type": ["string", "null"] }, "result": { - "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallResult" + }, + { + "type": "null" + } + ] + }, + "server": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpToolCallStatus" + }, + "tool": { + "type": "string" }, - "server": { "type": "string" }, - "status": { "$ref": "#/definitions/McpToolCallStatus" }, - "tool": { "type": "string" }, "type": { "type": "string", - "enum": ["mcpToolCall"], + "enum": [ + "mcpToolCall" + ], "title": "McpToolCallThreadItemType" } }, @@ -510,26 +987,58 @@ }, { "type": "object", - "required": ["arguments", "id", "status", "tool", "type"], + "required": [ + "arguments", + "id", + "status", + "tool", + "type" + ], "properties": { "arguments": true, "contentItems": { - "type": ["array", "null"], - "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" } + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/DynamicToolCallOutputContentItem" + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "id": { "type": "string" }, - "namespace": { "type": ["string", "null"] }, - "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, - "success": { "type": ["boolean", "null"] }, - "tool": { "type": "string" }, + "id": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/DynamicToolCallStatus" + }, + "success": { + "type": [ + "boolean", + "null" + ] + }, + "tool": { + "type": "string" + }, "type": { "type": "string", - "enum": ["dynamicToolCall"], + "enum": [ + "dynamicToolCall" + ], "title": "DynamicToolCallThreadItemType" } }, @@ -550,7 +1059,9 @@ "agentsStates": { "description": "Last known status of the target agents, when available.", "type": "object", - "additionalProperties": { "$ref": "#/definitions/CollabAgentState" } + "additionalProperties": { + "$ref": "#/definitions/CollabAgentState" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -558,20 +1069,35 @@ }, "model": { "description": "Model requested for the spawned agent, when applicable.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", - "type": ["string", "null"] + "type": [ + "string", + "null" + ] }, "reasoningEffort": { "description": "Reasoning effort requested for the spawned agent, when applicable.", - "anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", @@ -579,15 +1105,25 @@ }, "status": { "description": "Current status of the collab tool call.", - "allOf": [{ "$ref": "#/definitions/CollabAgentToolCallStatus" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentToolCallStatus" + } + ] }, "tool": { "description": "Name of the collab tool that was invoked.", - "allOf": [{ "$ref": "#/definitions/CollabAgentTool" }] + "allOf": [ + { + "$ref": "#/definitions/CollabAgentTool" + } + ] }, "type": { "type": "string", - "enum": ["collabAgentToolCall"], + "enum": [ + "collabAgentToolCall" + ], "title": "CollabAgentToolCallThreadItemType" } }, @@ -595,41 +1131,101 @@ }, { "type": "object", - "required": ["id", "query", "type"], + "required": [ + "id", + "query", + "type" + ], "properties": { "action": { - "anyOf": [{ "$ref": "#/definitions/WebSearchAction" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/WebSearchAction" + }, + { + "type": "null" + } + ] }, - "id": { "type": "string" }, - "query": { "type": "string" }, - "type": { "type": "string", "enum": ["webSearch"], "title": "WebSearchThreadItemType" } + "id": { + "type": "string" + }, + "query": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "webSearch" + ], + "title": "WebSearchThreadItemType" + } }, "title": "WebSearchThreadItem" }, { "type": "object", - "required": ["id", "path", "type"], + "required": [ + "id", + "path", + "type" + ], "properties": { - "id": { "type": "string" }, - "path": { "$ref": "#/definitions/AbsolutePathBuf" }, - "type": { "type": "string", "enum": ["imageView"], "title": "ImageViewThreadItemType" } + "id": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "imageView" + ], + "title": "ImageViewThreadItemType" + } }, "title": "ImageViewThreadItem" }, { "type": "object", - "required": ["id", "result", "status", "type"], + "required": [ + "id", + "result", + "status", + "type" + ], "properties": { - "id": { "type": "string" }, - "result": { "type": "string" }, - "revisedPrompt": { "type": ["string", "null"] }, - "savedPath": { - "anyOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" }] + "id": { + "type": "string" + }, + "result": { + "type": "string" + }, + "revisedPrompt": { + "type": [ + "string", + "null" + ] + }, + "savedPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" }, - "status": { "type": "string" }, "type": { "type": "string", - "enum": ["imageGeneration"], + "enum": [ + "imageGeneration" + ], "title": "ImageGenerationThreadItemType" } }, @@ -637,13 +1233,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["enteredReviewMode"], + "enum": [ + "enteredReviewMode" + ], "title": "EnteredReviewModeThreadItemType" } }, @@ -651,13 +1257,23 @@ }, { "type": "object", - "required": ["id", "review", "type"], + "required": [ + "id", + "review", + "type" + ], "properties": { - "id": { "type": "string" }, - "review": { "type": "string" }, + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, "type": { "type": "string", - "enum": ["exitedReviewMode"], + "enum": [ + "exitedReviewMode" + ], "title": "ExitedReviewModeThreadItemType" } }, @@ -665,12 +1281,19 @@ }, { "type": "object", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "type": { "type": "string", - "enum": ["contextCompaction"], + "enum": [ + "contextCompaction" + ], "title": "ContextCompactionThreadItemType" } }, @@ -680,103 +1303,248 @@ }, "Turn": { "type": "object", - "required": ["id", "items", "status"], + "required": [ + "id", + "items", + "status" + ], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, "error": { "description": "Only populated when the Turn's status is failed.", - "anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }] + "anyOf": [ + { + "$ref": "#/definitions/TurnError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" }, - "id": { "type": "string" }, "items": { - "description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", + "description": "Thread items currently included in this turn payload.", "type": "array", - "items": { "$ref": "#/definitions/ThreadItem" } + "items": { + "$ref": "#/definitions/ThreadItem" + } + }, + "itemsView": { + "description": "Describes how much of `items` has been loaded for this turn.", + "default": "full", + "allOf": [ + { + "$ref": "#/definitions/TurnItemsView" + } + ] }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "type": ["integer", "null"], + "type": [ + "integer", + "null" + ], "format": "int64" }, - "status": { "$ref": "#/definitions/TurnStatus" } + "status": { + "$ref": "#/definitions/TurnStatus" + } } }, "TurnError": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { - "additionalDetails": { "default": null, "type": ["string", "null"] }, - "codexErrorInfo": { - "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] }, - "message": { "type": "string" } + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } } }, + "TurnItemsView": { + "oneOf": [ + { + "description": "`items` was not loaded for this turn. The field is intentionally empty.", + "type": "string", + "enum": [ + "notLoaded" + ] + }, + { + "description": "`items` contains only a display summary for this turn.", + "type": "string", + "enum": [ + "summary" + ] + }, + { + "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.", + "type": "string", + "enum": [ + "full" + ] + } + ] + }, "TurnStatus": { "type": "string", - "enum": ["completed", "interrupted", "failed", "inProgress"] + "enum": [ + "completed", + "interrupted", + "failed", + "inProgress" + ] }, "UserInput": { "oneOf": [ { "type": "object", - "required": ["text", "type"], + "required": [ + "text", + "type" + ], "properties": { - "text": { "type": "string" }, + "text": { + "type": "string" + }, "text_elements": { "description": "UI-defined spans within `text` used to render or persist special elements.", "default": [], "type": "array", - "items": { "$ref": "#/definitions/TextElement" } + "items": { + "$ref": "#/definitions/TextElement" + } }, - "type": { "type": "string", "enum": ["text"], "title": "TextUserInputType" } + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextUserInputType" + } }, "title": "TextUserInput" }, { "type": "object", - "required": ["type", "url"], + "required": [ + "type", + "url" + ], "properties": { - "type": { "type": "string", "enum": ["image"], "title": "ImageUserInputType" }, - "url": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "image" + ], + "title": "ImageUserInputType" + }, + "url": { + "type": "string" + } }, "title": "ImageUserInput" }, { "type": "object", - "required": ["path", "type"], + "required": [ + "path", + "type" + ], "properties": { - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["localImage"], "title": "LocalImageUserInputType" } + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localImage" + ], + "title": "LocalImageUserInputType" + } }, "title": "LocalImageUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["skill"], "title": "SkillUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "skill" + ], + "title": "SkillUserInputType" + } }, "title": "SkillUserInput" }, { "type": "object", - "required": ["name", "path", "type"], + "required": [ + "name", + "path", + "type" + ], "properties": { - "name": { "type": "string" }, - "path": { "type": "string" }, - "type": { "type": "string", "enum": ["mention"], "title": "MentionUserInputType" } + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mention" + ], + "title": "MentionUserInputType" + } }, "title": "MentionUserInput" } @@ -786,46 +1554,98 @@ "oneOf": [ { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "queries": { "type": ["array", "null"], "items": { "type": "string" } }, - "query": { "type": ["string", "null"] }, - "type": { "type": "string", "enum": ["search"], "title": "SearchWebSearchActionType" } + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchWebSearchActionType" + } }, "title": "SearchWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { "type": { "type": "string", - "enum": ["openPage"], + "enum": [ + "openPage" + ], "title": "OpenPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "OpenPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "pattern": { "type": ["string", "null"] }, + "pattern": { + "type": [ + "string", + "null" + ] + }, "type": { "type": "string", - "enum": ["findInPage"], + "enum": [ + "findInPage" + ], "title": "FindInPageWebSearchActionType" }, - "url": { "type": ["string", "null"] } + "url": { + "type": [ + "string", + "null" + ] + } }, "title": "FindInPageWebSearchAction" }, { "type": "object", - "required": ["type"], + "required": [ + "type" + ], "properties": { - "type": { "type": "string", "enum": ["other"], "title": "OtherWebSearchActionType" } + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherWebSearchActionType" + } }, "title": "OtherWebSearchAction" } diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/AbsolutePathBuf.ts b/extensions/codex/src/app-server/protocol-generated/typescript/AbsolutePathBuf.ts deleted file mode 100644 index dc1cde12410..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/AbsolutePathBuf.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * A path that is guaranteed to be absolute and normalized (though it is not - * guaranteed to be canonicalized or exist on the filesystem). - * - * IMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set - * using [AbsolutePathBufGuard::new]. If no base path is set, the - * deserialization will fail unless the path being deserialized is already - * absolute. - */ -export type AbsolutePathBuf = string; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/AgentPath.ts b/extensions/codex/src/app-server/protocol-generated/typescript/AgentPath.ts deleted file mode 100644 index 6e55ce69e20..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/AgentPath.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AgentPath = string; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalParams.ts deleted file mode 100644 index 0dd4959f95c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalParams.ts +++ /dev/null @@ -1,24 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileChange } from "./FileChange.js"; -import type { ThreadId } from "./ThreadId.js"; - -export type ApplyPatchApprovalParams = { - conversationId: ThreadId; - /** - * Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] - * and [codex_protocol::protocol::PatchApplyEndEvent]. - */ - callId: string; - fileChanges: { [key in string]?: FileChange }; - /** - * Optional explanatory reason (e.g. request for extra write access). - */ - reason: string | null; - /** - * When set, the agent is asking the user to allow writes under this root - * for the remainder of the session (unclear if this is honored today). - */ - grantRoot: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalResponse.ts deleted file mode 100644 index 4977876d966..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ApplyPatchApprovalResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReviewDecision } from "./ReviewDecision.js"; - -export type ApplyPatchApprovalResponse = { decision: ReviewDecision }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/AuthMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/AuthMode.ts deleted file mode 100644 index 210e54c4a5f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/AuthMode.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Authentication mode for OpenAI-backed providers. - */ -export type AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens" | "agentIdentity"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ClientInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ClientInfo.ts deleted file mode 100644 index b3871d69067..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ClientInfo.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ClientInfo = { name: string; title: string | null; version: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ClientNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ClientNotification.ts deleted file mode 100644 index 814c9de78da..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ClientNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ClientNotification = { method: "initialized" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts deleted file mode 100644 index 1f2fc108e3c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts +++ /dev/null @@ -1,244 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams.js"; -import type { FuzzyFileSearchSessionStartParams } from "./FuzzyFileSearchSessionStartParams.js"; -import type { FuzzyFileSearchSessionStopParams } from "./FuzzyFileSearchSessionStopParams.js"; -import type { FuzzyFileSearchSessionUpdateParams } from "./FuzzyFileSearchSessionUpdateParams.js"; -import type { GetAuthStatusParams } from "./GetAuthStatusParams.js"; -import type { GetConversationSummaryParams } from "./GetConversationSummaryParams.js"; -import type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams.js"; -import type { InitializeParams } from "./InitializeParams.js"; -import type { RequestId } from "./RequestId.js"; -import type { AppsListParams } from "./v2/AppsListParams.js"; -import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams.js"; -import type { CollaborationModeListParams } from "./v2/CollaborationModeListParams.js"; -import type { CommandExecParams } from "./v2/CommandExecParams.js"; -import type { CommandExecResizeParams } from "./v2/CommandExecResizeParams.js"; -import type { CommandExecTerminateParams } from "./v2/CommandExecTerminateParams.js"; -import type { CommandExecWriteParams } from "./v2/CommandExecWriteParams.js"; -import type { ConfigBatchWriteParams } from "./v2/ConfigBatchWriteParams.js"; -import type { ConfigReadParams } from "./v2/ConfigReadParams.js"; -import type { ConfigValueWriteParams } from "./v2/ConfigValueWriteParams.js"; -import type { DeviceKeyCreateParams } from "./v2/DeviceKeyCreateParams.js"; -import type { DeviceKeyPublicParams } from "./v2/DeviceKeyPublicParams.js"; -import type { DeviceKeySignParams } from "./v2/DeviceKeySignParams.js"; -import type { ExperimentalFeatureEnablementSetParams } from "./v2/ExperimentalFeatureEnablementSetParams.js"; -import type { ExperimentalFeatureListParams } from "./v2/ExperimentalFeatureListParams.js"; -import type { ExternalAgentConfigDetectParams } from "./v2/ExternalAgentConfigDetectParams.js"; -import type { ExternalAgentConfigImportParams } from "./v2/ExternalAgentConfigImportParams.js"; -import type { FeedbackUploadParams } from "./v2/FeedbackUploadParams.js"; -import type { FsCopyParams } from "./v2/FsCopyParams.js"; -import type { FsCreateDirectoryParams } from "./v2/FsCreateDirectoryParams.js"; -import type { FsGetMetadataParams } from "./v2/FsGetMetadataParams.js"; -import type { FsReadDirectoryParams } from "./v2/FsReadDirectoryParams.js"; -import type { FsReadFileParams } from "./v2/FsReadFileParams.js"; -import type { FsRemoveParams } from "./v2/FsRemoveParams.js"; -import type { FsUnwatchParams } from "./v2/FsUnwatchParams.js"; -import type { FsWatchParams } from "./v2/FsWatchParams.js"; -import type { FsWriteFileParams } from "./v2/FsWriteFileParams.js"; -import type { GetAccountParams } from "./v2/GetAccountParams.js"; -import type { HooksListParams } from "./v2/HooksListParams.js"; -import type { ListMcpServerStatusParams } from "./v2/ListMcpServerStatusParams.js"; -import type { LoginAccountParams } from "./v2/LoginAccountParams.js"; -import type { MarketplaceAddParams } from "./v2/MarketplaceAddParams.js"; -import type { MarketplaceRemoveParams } from "./v2/MarketplaceRemoveParams.js"; -import type { MarketplaceUpgradeParams } from "./v2/MarketplaceUpgradeParams.js"; -import type { McpResourceReadParams } from "./v2/McpResourceReadParams.js"; -import type { McpServerOauthLoginParams } from "./v2/McpServerOauthLoginParams.js"; -import type { McpServerToolCallParams } from "./v2/McpServerToolCallParams.js"; -import type { MockExperimentalMethodParams } from "./v2/MockExperimentalMethodParams.js"; -import type { ModelListParams } from "./v2/ModelListParams.js"; -import type { ModelProviderCapabilitiesReadParams } from "./v2/ModelProviderCapabilitiesReadParams.js"; -import type { PluginInstallParams } from "./v2/PluginInstallParams.js"; -import type { PluginListParams } from "./v2/PluginListParams.js"; -import type { PluginReadParams } from "./v2/PluginReadParams.js"; -import type { PluginShareDeleteParams } from "./v2/PluginShareDeleteParams.js"; -import type { PluginShareListParams } from "./v2/PluginShareListParams.js"; -import type { PluginShareSaveParams } from "./v2/PluginShareSaveParams.js"; -import type { PluginSkillReadParams } from "./v2/PluginSkillReadParams.js"; -import type { PluginUninstallParams } from "./v2/PluginUninstallParams.js"; -import type { ReviewStartParams } from "./v2/ReviewStartParams.js"; -import type { SendAddCreditsNudgeEmailParams } from "./v2/SendAddCreditsNudgeEmailParams.js"; -import type { SkillsConfigWriteParams } from "./v2/SkillsConfigWriteParams.js"; -import type { SkillsListParams } from "./v2/SkillsListParams.js"; -import type { ThreadApproveGuardianDeniedActionParams } from "./v2/ThreadApproveGuardianDeniedActionParams.js"; -import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams.js"; -import type { ThreadBackgroundTerminalsCleanParams } from "./v2/ThreadBackgroundTerminalsCleanParams.js"; -import type { ThreadCompactStartParams } from "./v2/ThreadCompactStartParams.js"; -import type { ThreadDecrementElicitationParams } from "./v2/ThreadDecrementElicitationParams.js"; -import type { ThreadForkParams } from "./v2/ThreadForkParams.js"; -import type { ThreadGoalClearParams } from "./v2/ThreadGoalClearParams.js"; -import type { ThreadGoalGetParams } from "./v2/ThreadGoalGetParams.js"; -import type { ThreadGoalSetParams } from "./v2/ThreadGoalSetParams.js"; -import type { ThreadIncrementElicitationParams } from "./v2/ThreadIncrementElicitationParams.js"; -import type { ThreadInjectItemsParams } from "./v2/ThreadInjectItemsParams.js"; -import type { ThreadListParams } from "./v2/ThreadListParams.js"; -import type { ThreadLoadedListParams } from "./v2/ThreadLoadedListParams.js"; -import type { ThreadMemoryModeSetParams } from "./v2/ThreadMemoryModeSetParams.js"; -import type { ThreadMetadataUpdateParams } from "./v2/ThreadMetadataUpdateParams.js"; -import type { ThreadReadParams } from "./v2/ThreadReadParams.js"; -import type { ThreadRealtimeAppendAudioParams } from "./v2/ThreadRealtimeAppendAudioParams.js"; -import type { ThreadRealtimeAppendTextParams } from "./v2/ThreadRealtimeAppendTextParams.js"; -import type { ThreadRealtimeListVoicesParams } from "./v2/ThreadRealtimeListVoicesParams.js"; -import type { ThreadRealtimeStartParams } from "./v2/ThreadRealtimeStartParams.js"; -import type { ThreadRealtimeStopParams } from "./v2/ThreadRealtimeStopParams.js"; -import type { ThreadResumeParams } from "./v2/ThreadResumeParams.js"; -import type { ThreadRollbackParams } from "./v2/ThreadRollbackParams.js"; -import type { ThreadSetNameParams } from "./v2/ThreadSetNameParams.js"; -import type { ThreadShellCommandParams } from "./v2/ThreadShellCommandParams.js"; -import type { ThreadStartParams } from "./v2/ThreadStartParams.js"; -import type { ThreadTurnsListParams } from "./v2/ThreadTurnsListParams.js"; -import type { ThreadUnarchiveParams } from "./v2/ThreadUnarchiveParams.js"; -import type { ThreadUnsubscribeParams } from "./v2/ThreadUnsubscribeParams.js"; -import type { TurnInterruptParams } from "./v2/TurnInterruptParams.js"; -import type { TurnStartParams } from "./v2/TurnStartParams.js"; -import type { TurnSteerParams } from "./v2/TurnSteerParams.js"; -import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupStartParams.js"; - -/** - * Request from the client to the server. - */ -export type ClientRequest = - | { method: "initialize"; id: RequestId; params: InitializeParams } - | { method: "thread/start"; id: RequestId; params: ThreadStartParams } - | { method: "thread/resume"; id: RequestId; params: ThreadResumeParams } - | { method: "thread/fork"; id: RequestId; params: ThreadForkParams } - | { method: "thread/archive"; id: RequestId; params: ThreadArchiveParams } - | { method: "thread/unsubscribe"; id: RequestId; params: ThreadUnsubscribeParams } - | { - method: "thread/increment_elicitation"; - id: RequestId; - params: ThreadIncrementElicitationParams; - } - | { - method: "thread/decrement_elicitation"; - id: RequestId; - params: ThreadDecrementElicitationParams; - } - | { method: "thread/name/set"; id: RequestId; params: ThreadSetNameParams } - | { method: "thread/goal/set"; id: RequestId; params: ThreadGoalSetParams } - | { method: "thread/goal/get"; id: RequestId; params: ThreadGoalGetParams } - | { method: "thread/goal/clear"; id: RequestId; params: ThreadGoalClearParams } - | { method: "thread/metadata/update"; id: RequestId; params: ThreadMetadataUpdateParams } - | { method: "thread/memoryMode/set"; id: RequestId; params: ThreadMemoryModeSetParams } - | { method: "memory/reset"; id: RequestId; params: undefined } - | { method: "thread/unarchive"; id: RequestId; params: ThreadUnarchiveParams } - | { method: "thread/compact/start"; id: RequestId; params: ThreadCompactStartParams } - | { method: "thread/shellCommand"; id: RequestId; params: ThreadShellCommandParams } - | { - method: "thread/approveGuardianDeniedAction"; - id: RequestId; - params: ThreadApproveGuardianDeniedActionParams; - } - | { - method: "thread/backgroundTerminals/clean"; - id: RequestId; - params: ThreadBackgroundTerminalsCleanParams; - } - | { method: "thread/rollback"; id: RequestId; params: ThreadRollbackParams } - | { method: "thread/list"; id: RequestId; params: ThreadListParams } - | { method: "thread/loaded/list"; id: RequestId; params: ThreadLoadedListParams } - | { method: "thread/read"; id: RequestId; params: ThreadReadParams } - | { method: "thread/turns/list"; id: RequestId; params: ThreadTurnsListParams } - | { method: "thread/inject_items"; id: RequestId; params: ThreadInjectItemsParams } - | { method: "skills/list"; id: RequestId; params: SkillsListParams } - | { method: "hooks/list"; id: RequestId; params: HooksListParams } - | { method: "marketplace/add"; id: RequestId; params: MarketplaceAddParams } - | { method: "marketplace/remove"; id: RequestId; params: MarketplaceRemoveParams } - | { method: "marketplace/upgrade"; id: RequestId; params: MarketplaceUpgradeParams } - | { method: "plugin/list"; id: RequestId; params: PluginListParams } - | { method: "plugin/read"; id: RequestId; params: PluginReadParams } - | { method: "plugin/skill/read"; id: RequestId; params: PluginSkillReadParams } - | { method: "plugin/share/save"; id: RequestId; params: PluginShareSaveParams } - | { method: "plugin/share/list"; id: RequestId; params: PluginShareListParams } - | { method: "plugin/share/delete"; id: RequestId; params: PluginShareDeleteParams } - | { method: "app/list"; id: RequestId; params: AppsListParams } - | { method: "device/key/create"; id: RequestId; params: DeviceKeyCreateParams } - | { method: "device/key/public"; id: RequestId; params: DeviceKeyPublicParams } - | { method: "device/key/sign"; id: RequestId; params: DeviceKeySignParams } - | { method: "fs/readFile"; id: RequestId; params: FsReadFileParams } - | { method: "fs/writeFile"; id: RequestId; params: FsWriteFileParams } - | { method: "fs/createDirectory"; id: RequestId; params: FsCreateDirectoryParams } - | { method: "fs/getMetadata"; id: RequestId; params: FsGetMetadataParams } - | { method: "fs/readDirectory"; id: RequestId; params: FsReadDirectoryParams } - | { method: "fs/remove"; id: RequestId; params: FsRemoveParams } - | { method: "fs/copy"; id: RequestId; params: FsCopyParams } - | { method: "fs/watch"; id: RequestId; params: FsWatchParams } - | { method: "fs/unwatch"; id: RequestId; params: FsUnwatchParams } - | { method: "skills/config/write"; id: RequestId; params: SkillsConfigWriteParams } - | { method: "plugin/install"; id: RequestId; params: PluginInstallParams } - | { method: "plugin/uninstall"; id: RequestId; params: PluginUninstallParams } - | { method: "turn/start"; id: RequestId; params: TurnStartParams } - | { method: "turn/steer"; id: RequestId; params: TurnSteerParams } - | { method: "turn/interrupt"; id: RequestId; params: TurnInterruptParams } - | { method: "thread/realtime/start"; id: RequestId; params: ThreadRealtimeStartParams } - | { - method: "thread/realtime/appendAudio"; - id: RequestId; - params: ThreadRealtimeAppendAudioParams; - } - | { method: "thread/realtime/appendText"; id: RequestId; params: ThreadRealtimeAppendTextParams } - | { method: "thread/realtime/stop"; id: RequestId; params: ThreadRealtimeStopParams } - | { method: "thread/realtime/listVoices"; id: RequestId; params: ThreadRealtimeListVoicesParams } - | { method: "review/start"; id: RequestId; params: ReviewStartParams } - | { method: "model/list"; id: RequestId; params: ModelListParams } - | { - method: "modelProvider/capabilities/read"; - id: RequestId; - params: ModelProviderCapabilitiesReadParams; - } - | { method: "experimentalFeature/list"; id: RequestId; params: ExperimentalFeatureListParams } - | { - method: "experimentalFeature/enablement/set"; - id: RequestId; - params: ExperimentalFeatureEnablementSetParams; - } - | { method: "collaborationMode/list"; id: RequestId; params: CollaborationModeListParams } - | { method: "mock/experimentalMethod"; id: RequestId; params: MockExperimentalMethodParams } - | { method: "mcpServer/oauth/login"; id: RequestId; params: McpServerOauthLoginParams } - | { method: "config/mcpServer/reload"; id: RequestId; params: undefined } - | { method: "mcpServerStatus/list"; id: RequestId; params: ListMcpServerStatusParams } - | { method: "mcpServer/resource/read"; id: RequestId; params: McpResourceReadParams } - | { method: "mcpServer/tool/call"; id: RequestId; params: McpServerToolCallParams } - | { method: "windowsSandbox/setupStart"; id: RequestId; params: WindowsSandboxSetupStartParams } - | { method: "account/login/start"; id: RequestId; params: LoginAccountParams } - | { method: "account/login/cancel"; id: RequestId; params: CancelLoginAccountParams } - | { method: "account/logout"; id: RequestId; params: undefined } - | { method: "account/rateLimits/read"; id: RequestId; params: undefined } - | { - method: "account/sendAddCreditsNudgeEmail"; - id: RequestId; - params: SendAddCreditsNudgeEmailParams; - } - | { method: "feedback/upload"; id: RequestId; params: FeedbackUploadParams } - | { method: "command/exec"; id: RequestId; params: CommandExecParams } - | { method: "command/exec/write"; id: RequestId; params: CommandExecWriteParams } - | { method: "command/exec/terminate"; id: RequestId; params: CommandExecTerminateParams } - | { method: "command/exec/resize"; id: RequestId; params: CommandExecResizeParams } - | { method: "config/read"; id: RequestId; params: ConfigReadParams } - | { method: "externalAgentConfig/detect"; id: RequestId; params: ExternalAgentConfigDetectParams } - | { method: "externalAgentConfig/import"; id: RequestId; params: ExternalAgentConfigImportParams } - | { method: "config/value/write"; id: RequestId; params: ConfigValueWriteParams } - | { method: "config/batchWrite"; id: RequestId; params: ConfigBatchWriteParams } - | { method: "configRequirements/read"; id: RequestId; params: undefined } - | { method: "account/read"; id: RequestId; params: GetAccountParams } - | { method: "getConversationSummary"; id: RequestId; params: GetConversationSummaryParams } - | { method: "gitDiffToRemote"; id: RequestId; params: GitDiffToRemoteParams } - | { method: "getAuthStatus"; id: RequestId; params: GetAuthStatusParams } - | { method: "fuzzyFileSearch"; id: RequestId; params: FuzzyFileSearchParams } - | { - method: "fuzzyFileSearch/sessionStart"; - id: RequestId; - params: FuzzyFileSearchSessionStartParams; - } - | { - method: "fuzzyFileSearch/sessionUpdate"; - id: RequestId; - params: FuzzyFileSearchSessionUpdateParams; - } - | { - method: "fuzzyFileSearch/sessionStop"; - id: RequestId; - params: FuzzyFileSearchSessionStopParams; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/CollaborationMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/CollaborationMode.ts deleted file mode 100644 index 42ed1899432..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/CollaborationMode.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ModeKind } from "./ModeKind.js"; -import type { Settings } from "./Settings.js"; - -/** - * Collaboration mode for a Codex session. - */ -export type CollaborationMode = { mode: ModeKind; settings: Settings }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ContentItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ContentItem.ts deleted file mode 100644 index 955e3a65264..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ContentItem.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ImageDetail } from "./ImageDetail.js"; - -export type ContentItem = - | { type: "input_text"; text: string } - | { type: "input_image"; image_url: string; detail?: ImageDetail } - | { type: "output_text"; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ConversationGitInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ConversationGitInfo.ts deleted file mode 100644 index 87156451e03..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ConversationGitInfo.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ConversationGitInfo = { - sha: string | null; - branch: string | null; - origin_url: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ConversationSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ConversationSummary.ts deleted file mode 100644 index 431f5e79420..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ConversationSummary.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConversationGitInfo } from "./ConversationGitInfo.js"; -import type { SessionSource } from "./SessionSource.js"; -import type { ThreadId } from "./ThreadId.js"; - -export type ConversationSummary = { - conversationId: ThreadId; - path: string; - preview: string; - timestamp: string | null; - updatedAt: string | null; - modelProvider: string; - cwd: string; - cliVersion: string; - source: SessionSource; - gitInfo: ConversationGitInfo | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalParams.ts deleted file mode 100644 index f6153f68889..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalParams.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ParsedCommand } from "./ParsedCommand.js"; -import type { ThreadId } from "./ThreadId.js"; - -export type ExecCommandApprovalParams = { - conversationId: ThreadId; - /** - * Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] - * and [codex_protocol::protocol::ExecCommandEndEvent]. - */ - callId: string; - /** - * Identifier for this specific approval callback. - */ - approvalId: string | null; - command: Array; - cwd: string; - reason: string | null; - parsedCmd: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalResponse.ts deleted file mode 100644 index b695e5f12e1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ExecCommandApprovalResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReviewDecision } from "./ReviewDecision.js"; - -export type ExecCommandApprovalResponse = { decision: ReviewDecision }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ExecPolicyAmendment.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ExecPolicyAmendment.ts deleted file mode 100644 index 98e2626c381..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ExecPolicyAmendment.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Proposed execpolicy change to allow commands starting with this prefix. - * - * The `command` tokens form the prefix that would be added as an execpolicy - * `prefix_rule(..., decision="allow")`, letting the agent bypass approval for - * commands that start with this token sequence. - */ -export type ExecPolicyAmendment = Array; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FileChange.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FileChange.ts deleted file mode 100644 index da6abdda285..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FileChange.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileChange = - | { type: "add"; content: string } - | { type: "delete"; content: string } - | { type: "update"; unified_diff: string; move_path: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ForcedLoginMethod.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ForcedLoginMethod.ts deleted file mode 100644 index c695908866a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ForcedLoginMethod.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ForcedLoginMethod = "chatgpt" | "api"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputBody.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputBody.ts deleted file mode 100644 index 737f4cea9bf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputBody.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem.js"; - -export type FunctionCallOutputBody = string | Array; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputContentItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputContentItem.ts deleted file mode 100644 index c60d1b72792..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FunctionCallOutputContentItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ImageDetail } from "./ImageDetail.js"; - -/** - * Responses API compatible content items that can be returned by a tool call. - * This is a subset of ContentItem with the types we support as function call outputs. - */ -export type FunctionCallOutputContentItem = - | { type: "input_text"; text: string } - | { type: "input_image"; image_url: string; detail?: ImageDetail }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchMatchType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchMatchType.ts deleted file mode 100644 index 60e92f925ea..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchMatchType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchMatchType = "file" | "directory"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchParams.ts deleted file mode 100644 index 24e397c8478..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchParams = { - query: string; - roots: Array; - cancellationToken: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResponse.ts deleted file mode 100644 index af93c1a2e42..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js"; - -export type FuzzyFileSearchResponse = { files: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResult.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResult.ts deleted file mode 100644 index bfd5992fd88..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchResult.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FuzzyFileSearchMatchType } from "./FuzzyFileSearchMatchType.js"; - -/** - * Superset of [`codex_file_search::FileMatch`] - */ -export type FuzzyFileSearchResult = { - root: string; - path: string; - match_type: FuzzyFileSearchMatchType; - file_name: string; - score: number; - indices: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionCompletedNotification.ts deleted file mode 100644 index e8f3e391fae..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionCompletedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionCompletedNotification = { sessionId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts deleted file mode 100644 index f746734f004..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionStartParams = { sessionId: string; roots: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts deleted file mode 100644 index cfe1399b75c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionStartResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts deleted file mode 100644 index 72da3c89454..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionStopParams = { sessionId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts deleted file mode 100644 index a3500fb00c6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionStopResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts deleted file mode 100644 index 53542ea6c75..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionUpdateParams = { sessionId: string; query: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts deleted file mode 100644 index 54b8701656d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FuzzyFileSearchSessionUpdateResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdatedNotification.ts deleted file mode 100644 index ccd8f5c36e0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdatedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js"; - -export type FuzzyFileSearchSessionUpdatedNotification = { - sessionId: string; - query: string; - files: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusParams.ts deleted file mode 100644 index c3f4c1a04f9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GetAuthStatusParams = { includeToken: boolean | null; refreshToken: boolean | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusResponse.ts deleted file mode 100644 index ec5e7783a31..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GetAuthStatusResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AuthMode } from "./AuthMode.js"; - -export type GetAuthStatusResponse = { - authMethod: AuthMode | null; - authToken: string | null; - requiresOpenaiAuth: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryParams.ts deleted file mode 100644 index acb7fba5d7b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryParams.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadId } from "./ThreadId.js"; - -export type GetConversationSummaryParams = { rolloutPath: string } | { conversationId: ThreadId }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryResponse.ts deleted file mode 100644 index 4b68fe805af..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GetConversationSummaryResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConversationSummary } from "./ConversationSummary.js"; - -export type GetConversationSummaryResponse = { summary: ConversationSummary }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteParams.ts deleted file mode 100644 index 31ff4f9ddd7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GitDiffToRemoteParams = { cwd: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteResponse.ts deleted file mode 100644 index e06a77c0a26..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GitDiffToRemoteResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { GitSha } from "./GitSha.js"; - -export type GitDiffToRemoteResponse = { sha: GitSha; diff: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GitSha.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GitSha.ts deleted file mode 100644 index 701b75aa0bf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GitSha.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GitSha = string; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ImageDetail.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ImageDetail.ts deleted file mode 100644 index a48f07c0882..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ImageDetail.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ImageDetail = "auto" | "low" | "high" | "original"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeCapabilities.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InitializeCapabilities.ts deleted file mode 100644 index eaac4b8da1f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeCapabilities.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Client-declared capabilities negotiated during initialize. - */ -export type InitializeCapabilities = { - /** - * Opt into receiving experimental API methods and fields. - */ - experimentalApi: boolean; - /** - * Exact notification method names that should be suppressed for this - * connection (for example `thread/started`). - */ - optOutNotificationMethods?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InitializeParams.ts deleted file mode 100644 index 9322cf9129b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ClientInfo } from "./ClientInfo.js"; -import type { InitializeCapabilities } from "./InitializeCapabilities.js"; - -export type InitializeParams = { - clientInfo: ClientInfo; - capabilities: InitializeCapabilities | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InitializeResponse.ts deleted file mode 100644 index c6a9bc5377d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/InitializeResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "./AbsolutePathBuf.js"; - -export type InitializeResponse = { - userAgent: string; - /** - * Absolute path to the server's $CODEX_HOME directory. - */ - codexHome: AbsolutePathBuf; - /** - * Platform family for the running app-server target, for example - * `"unix"` or `"windows"`. - */ - platformFamily: string; - /** - * Operating system for the running app-server target, for example - * `"macos"`, `"linux"`, or `"windows"`. - */ - platformOs: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InputModality.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InputModality.ts deleted file mode 100644 index 73661938b38..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/InputModality.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Canonical user-input modality tags advertised by a model. - */ -export type InputModality = "text" | "image"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts deleted file mode 100644 index 47417c51679..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type InternalSessionSource = "memory_consolidation"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellAction.ts deleted file mode 100644 index 89cd49e69b6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellAction.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { LocalShellExecAction } from "./LocalShellExecAction.js"; - -export type LocalShellAction = { type: "exec" } & LocalShellExecAction; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellExecAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellExecAction.ts deleted file mode 100644 index 5faf9621ad9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellExecAction.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type LocalShellExecAction = { - command: Array; - timeout_ms: bigint | null; - working_directory: string | null; - env: { [key in string]?: string } | null; - user: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellStatus.ts deleted file mode 100644 index 00db484ad6d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/LocalShellStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type LocalShellStatus = "completed" | "in_progress" | "incomplete"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/MessagePhase.ts b/extensions/codex/src/app-server/protocol-generated/typescript/MessagePhase.ts deleted file mode 100644 index 9e16021b546..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/MessagePhase.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Classifies an assistant message as interim commentary or final answer text. - * - * Providers do not emit this consistently, so callers must treat `None` as - * "phase unknown" and keep compatibility behavior for legacy models. - */ -export type MessagePhase = "commentary" | "final_answer"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ModeKind.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ModeKind.ts deleted file mode 100644 index 7d2324add70..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ModeKind.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Initial collaboration mode to use when the TUI starts. - */ -export type ModeKind = "plan" | "default"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyAmendment.ts b/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyAmendment.ts deleted file mode 100644 index 5455621ece7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyAmendment.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js"; - -export type NetworkPolicyAmendment = { host: string; action: NetworkPolicyRuleAction }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyRuleAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyRuleAction.ts deleted file mode 100644 index 55ec70032a6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/NetworkPolicyRuleAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkPolicyRuleAction = "allow" | "deny"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ParsedCommand.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ParsedCommand.ts deleted file mode 100644 index 2302ea10d74..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ParsedCommand.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ParsedCommand = - | { - type: "read"; - cmd: string; - name: string; - /** - * (Best effort) Path to the file being read by the command. When - * possible, this is an absolute path, though when relative, it should - * be resolved against the `cwd`` that will be used to run the command - * to derive the absolute path. - */ - path: string; - } - | { type: "list_files"; cmd: string; path: string | null } - | { type: "search"; cmd: string; query: string | null; path: string | null } - | { type: "unknown"; cmd: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/Personality.ts b/extensions/codex/src/app-server/protocol-generated/typescript/Personality.ts deleted file mode 100644 index 45165f4e33d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/Personality.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type Personality = "none" | "friendly" | "pragmatic"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/PlanType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/PlanType.ts deleted file mode 100644 index 54281532d13..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/PlanType.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PlanType = - | "free" - | "go" - | "plus" - | "pro" - | "prolite" - | "team" - | "self_serve_business_usage_based" - | "business" - | "enterprise_cbp_usage_based" - | "enterprise" - | "edu" - | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeConversationVersion.ts b/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeConversationVersion.ts deleted file mode 100644 index cedc4bbe525..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeConversationVersion.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RealtimeConversationVersion = "v1" | "v2"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeOutputModality.ts b/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeOutputModality.ts deleted file mode 100644 index 78e00e7143d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeOutputModality.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RealtimeOutputModality = "text" | "audio"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoice.ts b/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoice.ts deleted file mode 100644 index bd40db79a1c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoice.ts +++ /dev/null @@ -1,24 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RealtimeVoice = - | "alloy" - | "arbor" - | "ash" - | "ballad" - | "breeze" - | "cedar" - | "coral" - | "cove" - | "echo" - | "ember" - | "juniper" - | "maple" - | "marin" - | "sage" - | "shimmer" - | "sol" - | "spruce" - | "vale" - | "verse"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoicesList.ts b/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoicesList.ts deleted file mode 100644 index f2d19ee1e30..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/RealtimeVoicesList.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RealtimeVoice } from "./RealtimeVoice.js"; - -export type RealtimeVoicesList = { - v1: Array; - v2: Array; - defaultV1: RealtimeVoice; - defaultV2: RealtimeVoice; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningEffort.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningEffort.ts deleted file mode 100644 index c0798f43a32..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningEffort.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning - */ -export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemContent.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemContent.ts deleted file mode 100644 index 1583fa45f00..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemContent.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReasoningItemContent = - | { type: "reasoning_text"; text: string } - | { type: "text"; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemReasoningSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemReasoningSummary.ts deleted file mode 100644 index cd7cf0acd2b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningItemReasoningSummary.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReasoningItemReasoningSummary = { type: "summary_text"; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningSummary.ts deleted file mode 100644 index d246ac12ec7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ReasoningSummary.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * A summary of the reasoning performed by the model. This can be useful for - * debugging and understanding the model's reasoning process. - * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries - */ -export type ReasoningSummary = "auto" | "concise" | "detailed" | "none"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/RequestId.ts b/extensions/codex/src/app-server/protocol-generated/typescript/RequestId.ts deleted file mode 100644 index 8a771bd0213..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/RequestId.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RequestId = string | number; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/Resource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/Resource.ts deleted file mode 100644 index b519402c8e8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/Resource.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "./serde_json/JsonValue.js"; - -/** - * A known resource that the server is capable of reading. - */ -export type Resource = { - annotations?: JsonValue; - description?: string; - mimeType?: string; - name: string; - size?: number; - title?: string; - uri: string; - icons?: Array; - _meta?: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ResourceContent.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ResourceContent.ts deleted file mode 100644 index d1d8316aa3b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ResourceContent.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "./serde_json/JsonValue.js"; - -/** - * Contents returned when reading a resource from an MCP server. - */ -export type ResourceContent = - | { - /** - * The URI of this resource. - */ - uri: string; - mimeType?: string; - text: string; - _meta?: JsonValue; - } - | { - /** - * The URI of this resource. - */ - uri: string; - mimeType?: string; - blob: string; - _meta?: JsonValue; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ResourceTemplate.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ResourceTemplate.ts deleted file mode 100644 index 5ee2f13cd1b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ResourceTemplate.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "./serde_json/JsonValue.js"; - -/** - * A template description for resources available on the server. - */ -export type ResourceTemplate = { - annotations?: JsonValue; - uriTemplate: string; - name: string; - title?: string; - description?: string; - mimeType?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts deleted file mode 100644 index fe3c211c75e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts +++ /dev/null @@ -1,63 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ContentItem } from "./ContentItem.js"; -import type { FunctionCallOutputBody } from "./FunctionCallOutputBody.js"; -import type { LocalShellAction } from "./LocalShellAction.js"; -import type { LocalShellStatus } from "./LocalShellStatus.js"; -import type { MessagePhase } from "./MessagePhase.js"; -import type { ReasoningItemContent } from "./ReasoningItemContent.js"; -import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary.js"; -import type { WebSearchAction } from "./WebSearchAction.js"; - -export type ResponseItem = - | { type: "message"; role: string; content: Array; phase?: MessagePhase } - | { - type: "reasoning"; - summary: Array; - content?: Array; - encrypted_content: string | null; - } - | { - type: "local_shell_call"; - /** - * Set when using the Responses API. - */ - call_id: string | null; - status: LocalShellStatus; - action: LocalShellAction; - } - | { type: "function_call"; name: string; namespace?: string; arguments: string; call_id: string } - | { - type: "tool_search_call"; - call_id: string | null; - status?: string; - execution: string; - arguments: unknown; - } - | { type: "function_call_output"; call_id: string; output: FunctionCallOutputBody } - | { type: "custom_tool_call"; status?: string; call_id: string; name: string; input: string } - | { - type: "custom_tool_call_output"; - call_id: string; - name?: string; - output: FunctionCallOutputBody; - } - | { - type: "tool_search_output"; - call_id: string | null; - status: string; - execution: string; - tools: unknown[]; - } - | { type: "web_search_call"; status?: string; action?: WebSearchAction } - | { - type: "image_generation_call"; - id: string; - status: string; - revised_prompt?: string; - result: string; - } - | { type: "compaction"; encrypted_content: string } - | { type: "context_compaction"; encrypted_content?: string } - | { type: "other" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ReviewDecision.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ReviewDecision.ts deleted file mode 100644 index 23b8771936d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ReviewDecision.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js"; -import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js"; - -/** - * User's decision in response to an ExecApprovalRequest. - */ -export type ReviewDecision = - | "approved" - | { approved_execpolicy_amendment: { proposed_execpolicy_amendment: ExecPolicyAmendment } } - | "approved_for_session" - | { network_policy_amendment: { network_policy_amendment: NetworkPolicyAmendment } } - | "denied" - | "timed_out" - | "abort"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts deleted file mode 100644 index 04d8301bcc3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts +++ /dev/null @@ -1,150 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification.js"; -import type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification.js"; -import type { AccountLoginCompletedNotification } from "./v2/AccountLoginCompletedNotification.js"; -import type { AccountRateLimitsUpdatedNotification } from "./v2/AccountRateLimitsUpdatedNotification.js"; -import type { AccountUpdatedNotification } from "./v2/AccountUpdatedNotification.js"; -import type { AgentMessageDeltaNotification } from "./v2/AgentMessageDeltaNotification.js"; -import type { AppListUpdatedNotification } from "./v2/AppListUpdatedNotification.js"; -import type { CommandExecOutputDeltaNotification } from "./v2/CommandExecOutputDeltaNotification.js"; -import type { CommandExecutionOutputDeltaNotification } from "./v2/CommandExecutionOutputDeltaNotification.js"; -import type { ConfigWarningNotification } from "./v2/ConfigWarningNotification.js"; -import type { ContextCompactedNotification } from "./v2/ContextCompactedNotification.js"; -import type { DeprecationNoticeNotification } from "./v2/DeprecationNoticeNotification.js"; -import type { ErrorNotification } from "./v2/ErrorNotification.js"; -import type { ExternalAgentConfigImportCompletedNotification } from "./v2/ExternalAgentConfigImportCompletedNotification.js"; -import type { FileChangeOutputDeltaNotification } from "./v2/FileChangeOutputDeltaNotification.js"; -import type { FileChangePatchUpdatedNotification } from "./v2/FileChangePatchUpdatedNotification.js"; -import type { FsChangedNotification } from "./v2/FsChangedNotification.js"; -import type { GuardianWarningNotification } from "./v2/GuardianWarningNotification.js"; -import type { HookCompletedNotification } from "./v2/HookCompletedNotification.js"; -import type { HookStartedNotification } from "./v2/HookStartedNotification.js"; -import type { ItemCompletedNotification } from "./v2/ItemCompletedNotification.js"; -import type { ItemGuardianApprovalReviewCompletedNotification } from "./v2/ItemGuardianApprovalReviewCompletedNotification.js"; -import type { ItemGuardianApprovalReviewStartedNotification } from "./v2/ItemGuardianApprovalReviewStartedNotification.js"; -import type { ItemStartedNotification } from "./v2/ItemStartedNotification.js"; -import type { McpServerOauthLoginCompletedNotification } from "./v2/McpServerOauthLoginCompletedNotification.js"; -import type { McpServerStatusUpdatedNotification } from "./v2/McpServerStatusUpdatedNotification.js"; -import type { McpToolCallProgressNotification } from "./v2/McpToolCallProgressNotification.js"; -import type { ModelReroutedNotification } from "./v2/ModelReroutedNotification.js"; -import type { ModelVerificationNotification } from "./v2/ModelVerificationNotification.js"; -import type { PlanDeltaNotification } from "./v2/PlanDeltaNotification.js"; -import type { RawResponseItemCompletedNotification } from "./v2/RawResponseItemCompletedNotification.js"; -import type { ReasoningSummaryPartAddedNotification } from "./v2/ReasoningSummaryPartAddedNotification.js"; -import type { ReasoningSummaryTextDeltaNotification } from "./v2/ReasoningSummaryTextDeltaNotification.js"; -import type { ReasoningTextDeltaNotification } from "./v2/ReasoningTextDeltaNotification.js"; -import type { RemoteControlStatusChangedNotification } from "./v2/RemoteControlStatusChangedNotification.js"; -import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolvedNotification.js"; -import type { SkillsChangedNotification } from "./v2/SkillsChangedNotification.js"; -import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification.js"; -import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification.js"; -import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification.js"; -import type { ThreadGoalClearedNotification } from "./v2/ThreadGoalClearedNotification.js"; -import type { ThreadGoalUpdatedNotification } from "./v2/ThreadGoalUpdatedNotification.js"; -import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification.js"; -import type { ThreadRealtimeClosedNotification } from "./v2/ThreadRealtimeClosedNotification.js"; -import type { ThreadRealtimeErrorNotification } from "./v2/ThreadRealtimeErrorNotification.js"; -import type { ThreadRealtimeItemAddedNotification } from "./v2/ThreadRealtimeItemAddedNotification.js"; -import type { ThreadRealtimeOutputAudioDeltaNotification } from "./v2/ThreadRealtimeOutputAudioDeltaNotification.js"; -import type { ThreadRealtimeSdpNotification } from "./v2/ThreadRealtimeSdpNotification.js"; -import type { ThreadRealtimeStartedNotification } from "./v2/ThreadRealtimeStartedNotification.js"; -import type { ThreadRealtimeTranscriptDeltaNotification } from "./v2/ThreadRealtimeTranscriptDeltaNotification.js"; -import type { ThreadRealtimeTranscriptDoneNotification } from "./v2/ThreadRealtimeTranscriptDoneNotification.js"; -import type { ThreadStartedNotification } from "./v2/ThreadStartedNotification.js"; -import type { ThreadStatusChangedNotification } from "./v2/ThreadStatusChangedNotification.js"; -import type { ThreadTokenUsageUpdatedNotification } from "./v2/ThreadTokenUsageUpdatedNotification.js"; -import type { ThreadUnarchivedNotification } from "./v2/ThreadUnarchivedNotification.js"; -import type { TurnCompletedNotification } from "./v2/TurnCompletedNotification.js"; -import type { TurnDiffUpdatedNotification } from "./v2/TurnDiffUpdatedNotification.js"; -import type { TurnPlanUpdatedNotification } from "./v2/TurnPlanUpdatedNotification.js"; -import type { TurnStartedNotification } from "./v2/TurnStartedNotification.js"; -import type { WarningNotification } from "./v2/WarningNotification.js"; -import type { WindowsSandboxSetupCompletedNotification } from "./v2/WindowsSandboxSetupCompletedNotification.js"; -import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldWritableWarningNotification.js"; - -/** - * Notification sent from the server to the client. - */ -export type ServerNotification = - | { method: "error"; params: ErrorNotification } - | { method: "thread/started"; params: ThreadStartedNotification } - | { method: "thread/status/changed"; params: ThreadStatusChangedNotification } - | { method: "thread/archived"; params: ThreadArchivedNotification } - | { method: "thread/unarchived"; params: ThreadUnarchivedNotification } - | { method: "thread/closed"; params: ThreadClosedNotification } - | { method: "skills/changed"; params: SkillsChangedNotification } - | { method: "thread/name/updated"; params: ThreadNameUpdatedNotification } - | { method: "thread/goal/updated"; params: ThreadGoalUpdatedNotification } - | { method: "thread/goal/cleared"; params: ThreadGoalClearedNotification } - | { method: "thread/tokenUsage/updated"; params: ThreadTokenUsageUpdatedNotification } - | { method: "turn/started"; params: TurnStartedNotification } - | { method: "hook/started"; params: HookStartedNotification } - | { method: "turn/completed"; params: TurnCompletedNotification } - | { method: "hook/completed"; params: HookCompletedNotification } - | { method: "turn/diff/updated"; params: TurnDiffUpdatedNotification } - | { method: "turn/plan/updated"; params: TurnPlanUpdatedNotification } - | { method: "item/started"; params: ItemStartedNotification } - | { - method: "item/autoApprovalReview/started"; - params: ItemGuardianApprovalReviewStartedNotification; - } - | { - method: "item/autoApprovalReview/completed"; - params: ItemGuardianApprovalReviewCompletedNotification; - } - | { method: "item/completed"; params: ItemCompletedNotification } - | { method: "rawResponseItem/completed"; params: RawResponseItemCompletedNotification } - | { method: "item/agentMessage/delta"; params: AgentMessageDeltaNotification } - | { method: "item/plan/delta"; params: PlanDeltaNotification } - | { method: "command/exec/outputDelta"; params: CommandExecOutputDeltaNotification } - | { method: "item/commandExecution/outputDelta"; params: CommandExecutionOutputDeltaNotification } - | { method: "item/commandExecution/terminalInteraction"; params: TerminalInteractionNotification } - | { method: "item/fileChange/outputDelta"; params: FileChangeOutputDeltaNotification } - | { method: "item/fileChange/patchUpdated"; params: FileChangePatchUpdatedNotification } - | { method: "serverRequest/resolved"; params: ServerRequestResolvedNotification } - | { method: "item/mcpToolCall/progress"; params: McpToolCallProgressNotification } - | { method: "mcpServer/oauthLogin/completed"; params: McpServerOauthLoginCompletedNotification } - | { method: "mcpServer/startupStatus/updated"; params: McpServerStatusUpdatedNotification } - | { method: "account/updated"; params: AccountUpdatedNotification } - | { method: "account/rateLimits/updated"; params: AccountRateLimitsUpdatedNotification } - | { method: "app/list/updated"; params: AppListUpdatedNotification } - | { method: "remoteControl/status/changed"; params: RemoteControlStatusChangedNotification } - | { - method: "externalAgentConfig/import/completed"; - params: ExternalAgentConfigImportCompletedNotification; - } - | { method: "fs/changed"; params: FsChangedNotification } - | { method: "item/reasoning/summaryTextDelta"; params: ReasoningSummaryTextDeltaNotification } - | { method: "item/reasoning/summaryPartAdded"; params: ReasoningSummaryPartAddedNotification } - | { method: "item/reasoning/textDelta"; params: ReasoningTextDeltaNotification } - | { method: "thread/compacted"; params: ContextCompactedNotification } - | { method: "model/rerouted"; params: ModelReroutedNotification } - | { method: "model/verification"; params: ModelVerificationNotification } - | { method: "warning"; params: WarningNotification } - | { method: "guardianWarning"; params: GuardianWarningNotification } - | { method: "deprecationNotice"; params: DeprecationNoticeNotification } - | { method: "configWarning"; params: ConfigWarningNotification } - | { method: "fuzzyFileSearch/sessionUpdated"; params: FuzzyFileSearchSessionUpdatedNotification } - | { - method: "fuzzyFileSearch/sessionCompleted"; - params: FuzzyFileSearchSessionCompletedNotification; - } - | { method: "thread/realtime/started"; params: ThreadRealtimeStartedNotification } - | { method: "thread/realtime/itemAdded"; params: ThreadRealtimeItemAddedNotification } - | { - method: "thread/realtime/transcript/delta"; - params: ThreadRealtimeTranscriptDeltaNotification; - } - | { method: "thread/realtime/transcript/done"; params: ThreadRealtimeTranscriptDoneNotification } - | { - method: "thread/realtime/outputAudio/delta"; - params: ThreadRealtimeOutputAudioDeltaNotification; - } - | { method: "thread/realtime/sdp"; params: ThreadRealtimeSdpNotification } - | { method: "thread/realtime/error"; params: ThreadRealtimeErrorNotification } - | { method: "thread/realtime/closed"; params: ThreadRealtimeClosedNotification } - | { method: "windows/worldWritableWarning"; params: WindowsWorldWritableWarningNotification } - | { method: "windowsSandbox/setupCompleted"; params: WindowsSandboxSetupCompletedNotification } - | { method: "account/login/completed"; params: AccountLoginCompletedNotification }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ServerRequest.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ServerRequest.ts deleted file mode 100644 index 356126c38ca..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ServerRequest.ts +++ /dev/null @@ -1,47 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ApplyPatchApprovalParams } from "./ApplyPatchApprovalParams.js"; -import type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams.js"; -import type { RequestId } from "./RequestId.js"; -import type { ChatgptAuthTokensRefreshParams } from "./v2/ChatgptAuthTokensRefreshParams.js"; -import type { CommandExecutionRequestApprovalParams } from "./v2/CommandExecutionRequestApprovalParams.js"; -import type { DynamicToolCallParams } from "./v2/DynamicToolCallParams.js"; -import type { FileChangeRequestApprovalParams } from "./v2/FileChangeRequestApprovalParams.js"; -import type { McpServerElicitationRequestParams } from "./v2/McpServerElicitationRequestParams.js"; -import type { PermissionsRequestApprovalParams } from "./v2/PermissionsRequestApprovalParams.js"; -import type { ToolRequestUserInputParams } from "./v2/ToolRequestUserInputParams.js"; - -/** - * Request initiated from the server and sent to the client. - */ -export type ServerRequest = - | { - method: "item/commandExecution/requestApproval"; - id: RequestId; - params: CommandExecutionRequestApprovalParams; - } - | { - method: "item/fileChange/requestApproval"; - id: RequestId; - params: FileChangeRequestApprovalParams; - } - | { method: "item/tool/requestUserInput"; id: RequestId; params: ToolRequestUserInputParams } - | { - method: "mcpServer/elicitation/request"; - id: RequestId; - params: McpServerElicitationRequestParams; - } - | { - method: "item/permissions/requestApproval"; - id: RequestId; - params: PermissionsRequestApprovalParams; - } - | { method: "item/tool/call"; id: RequestId; params: DynamicToolCallParams } - | { - method: "account/chatgptAuthTokens/refresh"; - id: RequestId; - params: ChatgptAuthTokensRefreshParams; - } - | { method: "applyPatchApproval"; id: RequestId; params: ApplyPatchApprovalParams } - | { method: "execCommandApproval"; id: RequestId; params: ExecCommandApprovalParams }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ServiceTier.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ServiceTier.ts deleted file mode 100644 index ce11286dbd1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ServiceTier.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ServiceTier = "fast" | "flex"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts deleted file mode 100644 index 4ff2e10411a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { InternalSessionSource } from "./InternalSessionSource.js"; -import type { SubAgentSource } from "./SubAgentSource.js"; - -export type SessionSource = - | "cli" - | "vscode" - | "exec" - | "mcp" - | { custom: string } - | { internal: InternalSessionSource } - | { subagent: SubAgentSource } - | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/Settings.ts b/extensions/codex/src/app-server/protocol-generated/typescript/Settings.ts deleted file mode 100644 index 12132380a22..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/Settings.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReasoningEffort } from "./ReasoningEffort.js"; - -/** - * Settings for a collaboration mode. - */ -export type Settings = { - model: string; - reasoning_effort: ReasoningEffort | null; - developer_instructions: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/SubAgentSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/SubAgentSource.ts deleted file mode 100644 index 3c102517629..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/SubAgentSource.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AgentPath } from "./AgentPath.js"; -import type { ThreadId } from "./ThreadId.js"; - -export type SubAgentSource = - | "review" - | "compact" - | { - thread_spawn: { - parent_thread_id: ThreadId; - depth: number; - agent_path: AgentPath | null; - agent_nickname: string | null; - agent_role: string | null; - }; - } - | "memory_consolidation" - | { other: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ThreadId.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ThreadId.ts deleted file mode 100644 index bfb3b4b4d76..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ThreadId.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadId = string; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ThreadMemoryMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ThreadMemoryMode.ts deleted file mode 100644 index 74a7e759e73..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ThreadMemoryMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadMemoryMode = "enabled" | "disabled"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/Tool.ts b/extensions/codex/src/app-server/protocol-generated/typescript/Tool.ts deleted file mode 100644 index e0e7c0f9811..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/Tool.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "./serde_json/JsonValue.js"; - -/** - * Definition for a tool the client can call. - */ -export type Tool = { - name: string; - title?: string; - description?: string; - inputSchema: JsonValue; - outputSchema?: JsonValue; - annotations?: JsonValue; - icons?: Array; - _meta?: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/Verbosity.ts b/extensions/codex/src/app-server/protocol-generated/typescript/Verbosity.ts deleted file mode 100644 index 8fd97b0b89d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/Verbosity.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Controls output length/detail on GPT-5 models via the Responses API. - * Serialized with lowercase values to match the OpenAI API. - */ -export type Verbosity = "low" | "medium" | "high"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchAction.ts deleted file mode 100644 index 3cae0b56f59..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchAction.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WebSearchAction = - | { type: "search"; query?: string; queries?: Array } - | { type: "open_page"; url?: string } - | { type: "find_in_page"; url?: string; pattern?: string } - | { type: "other" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchContextSize.ts b/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchContextSize.ts deleted file mode 100644 index d6feedde849..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchContextSize.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WebSearchContextSize = "low" | "medium" | "high"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchLocation.ts b/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchLocation.ts deleted file mode 100644 index 4f257eeb418..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchLocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WebSearchLocation = { - country: string | null; - region: string | null; - city: string | null; - timezone: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchMode.ts deleted file mode 100644 index 695c13e3f6f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WebSearchMode = "disabled" | "cached" | "live"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchToolConfig.ts b/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchToolConfig.ts deleted file mode 100644 index 31d47ae300d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/WebSearchToolConfig.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { WebSearchContextSize } from "./WebSearchContextSize.js"; -import type { WebSearchLocation } from "./WebSearchLocation.js"; - -export type WebSearchToolConfig = { - context_size: WebSearchContextSize | null; - allowed_domains: Array | null; - location: WebSearchLocation | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/index.ts b/extensions/codex/src/app-server/protocol-generated/typescript/index.ts deleted file mode 100644 index 55cb96c4993..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/index.ts +++ /dev/null @@ -1,86 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -export type { AbsolutePathBuf } from "./AbsolutePathBuf.js"; -export type { AgentPath } from "./AgentPath.js"; -export type { ApplyPatchApprovalParams } from "./ApplyPatchApprovalParams.js"; -export type { ApplyPatchApprovalResponse } from "./ApplyPatchApprovalResponse.js"; -export type { AuthMode } from "./AuthMode.js"; -export type { ClientInfo } from "./ClientInfo.js"; -export type { ClientNotification } from "./ClientNotification.js"; -export type { ClientRequest } from "./ClientRequest.js"; -export type { CollaborationMode } from "./CollaborationMode.js"; -export type { ContentItem } from "./ContentItem.js"; -export type { ConversationGitInfo } from "./ConversationGitInfo.js"; -export type { ConversationSummary } from "./ConversationSummary.js"; -export type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams.js"; -export type { ExecCommandApprovalResponse } from "./ExecCommandApprovalResponse.js"; -export type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js"; -export type { FileChange } from "./FileChange.js"; -export type { ForcedLoginMethod } from "./ForcedLoginMethod.js"; -export type { FunctionCallOutputBody } from "./FunctionCallOutputBody.js"; -export type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem.js"; -export type { FuzzyFileSearchMatchType } from "./FuzzyFileSearchMatchType.js"; -export type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams.js"; -export type { FuzzyFileSearchResponse } from "./FuzzyFileSearchResponse.js"; -export type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js"; -export type { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification.js"; -export type { FuzzyFileSearchSessionStartParams } from "./FuzzyFileSearchSessionStartParams.js"; -export type { FuzzyFileSearchSessionStartResponse } from "./FuzzyFileSearchSessionStartResponse.js"; -export type { FuzzyFileSearchSessionStopParams } from "./FuzzyFileSearchSessionStopParams.js"; -export type { FuzzyFileSearchSessionStopResponse } from "./FuzzyFileSearchSessionStopResponse.js"; -export type { FuzzyFileSearchSessionUpdateParams } from "./FuzzyFileSearchSessionUpdateParams.js"; -export type { FuzzyFileSearchSessionUpdateResponse } from "./FuzzyFileSearchSessionUpdateResponse.js"; -export type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification.js"; -export type { GetAuthStatusParams } from "./GetAuthStatusParams.js"; -export type { GetAuthStatusResponse } from "./GetAuthStatusResponse.js"; -export type { GetConversationSummaryParams } from "./GetConversationSummaryParams.js"; -export type { GetConversationSummaryResponse } from "./GetConversationSummaryResponse.js"; -export type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams.js"; -export type { GitDiffToRemoteResponse } from "./GitDiffToRemoteResponse.js"; -export type { GitSha } from "./GitSha.js"; -export type { ImageDetail } from "./ImageDetail.js"; -export type { InitializeCapabilities } from "./InitializeCapabilities.js"; -export type { InitializeParams } from "./InitializeParams.js"; -export type { InitializeResponse } from "./InitializeResponse.js"; -export type { InputModality } from "./InputModality.js"; -export type { InternalSessionSource } from "./InternalSessionSource.js"; -export type { LocalShellAction } from "./LocalShellAction.js"; -export type { LocalShellExecAction } from "./LocalShellExecAction.js"; -export type { LocalShellStatus } from "./LocalShellStatus.js"; -export type { MessagePhase } from "./MessagePhase.js"; -export type { ModeKind } from "./ModeKind.js"; -export type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js"; -export type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js"; -export type { ParsedCommand } from "./ParsedCommand.js"; -export type { Personality } from "./Personality.js"; -export type { PlanType } from "./PlanType.js"; -export type { RealtimeConversationVersion } from "./RealtimeConversationVersion.js"; -export type { RealtimeOutputModality } from "./RealtimeOutputModality.js"; -export type { RealtimeVoice } from "./RealtimeVoice.js"; -export type { RealtimeVoicesList } from "./RealtimeVoicesList.js"; -export type { ReasoningEffort } from "./ReasoningEffort.js"; -export type { ReasoningItemContent } from "./ReasoningItemContent.js"; -export type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary.js"; -export type { ReasoningSummary } from "./ReasoningSummary.js"; -export type { RequestId } from "./RequestId.js"; -export type { Resource } from "./Resource.js"; -export type { ResourceContent } from "./ResourceContent.js"; -export type { ResourceTemplate } from "./ResourceTemplate.js"; -export type { ResponseItem } from "./ResponseItem.js"; -export type { ReviewDecision } from "./ReviewDecision.js"; -export type { ServerNotification } from "./ServerNotification.js"; -export type { ServerRequest } from "./ServerRequest.js"; -export type { ServiceTier } from "./ServiceTier.js"; -export type { SessionSource } from "./SessionSource.js"; -export type { Settings } from "./Settings.js"; -export type { SubAgentSource } from "./SubAgentSource.js"; -export type { ThreadId } from "./ThreadId.js"; -export type { ThreadMemoryMode } from "./ThreadMemoryMode.js"; -export type { Tool } from "./Tool.js"; -export type { Verbosity } from "./Verbosity.js"; -export type { WebSearchAction } from "./WebSearchAction.js"; -export type { WebSearchContextSize } from "./WebSearchContextSize.js"; -export type { WebSearchLocation } from "./WebSearchLocation.js"; -export type { WebSearchMode } from "./WebSearchMode.js"; -export type { WebSearchToolConfig } from "./WebSearchToolConfig.js"; -export * as v2 from "./v2/index.js"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/serde_json/JsonValue.ts b/extensions/codex/src/app-server/protocol-generated/typescript/serde_json/JsonValue.ts deleted file mode 100644 index dbf7173b1dc..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/serde_json/JsonValue.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type JsonValue = - | number - | string - | boolean - | Array - | { [key in string]?: JsonValue } - | null; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Account.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Account.ts deleted file mode 100644 index ff69d7c4d5f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Account.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PlanType } from "../PlanType.js"; - -export type Account = - | { type: "apiKey" } - | { type: "chatgpt"; email: string; planType: PlanType } - | { type: "amazonBedrock" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountLoginCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountLoginCompletedNotification.ts deleted file mode 100644 index b8960c6666e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountLoginCompletedNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AccountLoginCompletedNotification = { - loginId: string | null; - success: boolean; - error: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountRateLimitsUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountRateLimitsUpdatedNotification.ts deleted file mode 100644 index 4ae9a60207b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountRateLimitsUpdatedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RateLimitSnapshot } from "./RateLimitSnapshot.js"; - -export type AccountRateLimitsUpdatedNotification = { rateLimits: RateLimitSnapshot }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountUpdatedNotification.ts deleted file mode 100644 index 867778fac4c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AccountUpdatedNotification.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AuthMode } from "../AuthMode.js"; -import type { PlanType } from "../PlanType.js"; - -export type AccountUpdatedNotification = { authMode: AuthMode | null; planType: PlanType | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts deleted file mode 100644 index ec5b5af7d93..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ActivePermissionProfileModification } from "./ActivePermissionProfileModification.js"; - -export type ActivePermissionProfile = { - /** - * Identifier from `default_permissions` or the implicit built-in default, - * such as `:workspace` or a user-defined `[permissions.]` profile. - */ - id: string; - /** - * Parent profile identifier once permissions profiles support - * inheritance. This is currently always `null`. - */ - extends: string | null; - /** - * Bounded user-requested modifications applied on top of the named - * profile, if any. - */ - modifications: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts deleted file mode 100644 index 69cf70ce53e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type ActivePermissionProfileModification = { - type: "additionalWritableRoot"; - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeCreditType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeCreditType.ts deleted file mode 100644 index 70498d6a67a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeCreditType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AddCreditsNudgeCreditType = "credits" | "usage_limit"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeEmailStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeEmailStatus.ts deleted file mode 100644 index 2b62da68eaf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AddCreditsNudgeEmailStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AddCreditsNudgeEmailStatus = "sent" | "cooldown_active"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalFileSystemPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalFileSystemPermissions.ts deleted file mode 100644 index 7be8c2c956e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalFileSystemPermissions.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { FileSystemSandboxEntry } from "./FileSystemSandboxEntry.js"; - -export type AdditionalFileSystemPermissions = { - /** - * This will be removed in favor of `entries`. - */ - read: Array | null; - /** - * This will be removed in favor of `entries`. - */ - write: Array | null; - globScanMaxDepth?: number; - entries?: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalNetworkPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalNetworkPermissions.ts deleted file mode 100644 index 9349aa6628c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalNetworkPermissions.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AdditionalNetworkPermissions = { enabled: boolean | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts deleted file mode 100644 index 75c176bec81..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPermissions.js"; -import type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermissions.js"; - -export type AdditionalPermissionProfile = { - /** - * Partial overlay used for per-command permission requests. - */ - network: AdditionalNetworkPermissions | null; - fileSystem: AdditionalFileSystemPermissions | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AgentMessageDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AgentMessageDeltaNotification.ts deleted file mode 100644 index 1beb2e9026e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AgentMessageDeltaNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AgentMessageDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AnalyticsConfig.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AnalyticsConfig.ts deleted file mode 100644 index b8203b0d0b5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AnalyticsConfig.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type AnalyticsConfig = { enabled: boolean | null } & { - [key in string]?: - | number - | string - | boolean - | Array - | { [key in string]?: JsonValue } - | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppBranding.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppBranding.ts deleted file mode 100644 index 8a2999eaa5b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppBranding.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - app metadata returned by app-list APIs. - */ -export type AppBranding = { - category: string | null; - developer: string | null; - website: string | null; - privacyPolicy: string | null; - termsOfService: string | null; - isDiscoverableApp: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppInfo.ts deleted file mode 100644 index 0f444d7cf5b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppInfo.ts +++ /dev/null @@ -1,32 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppBranding } from "./AppBranding.js"; -import type { AppMetadata } from "./AppMetadata.js"; - -/** - * EXPERIMENTAL - app metadata returned by app-list APIs. - */ -export type AppInfo = { - id: string; - name: string; - description: string | null; - logoUrl: string | null; - logoUrlDark: string | null; - distributionChannel: string | null; - branding: AppBranding | null; - appMetadata: AppMetadata | null; - labels: { [key in string]?: string } | null; - installUrl: string | null; - isAccessible: boolean; - /** - * Whether this app is enabled in config.toml. - * Example: - * ```toml - * [apps.bad_app] - * enabled = false - * ``` - */ - isEnabled: boolean; - pluginDisplayNames: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppListUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppListUpdatedNotification.ts deleted file mode 100644 index 285273d98f5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppListUpdatedNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppInfo } from "./AppInfo.js"; - -/** - * EXPERIMENTAL - notification emitted when the app list changes. - */ -export type AppListUpdatedNotification = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppMetadata.ts deleted file mode 100644 index 5aee5aaf427..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppMetadata.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppReview } from "./AppReview.js"; -import type { AppScreenshot } from "./AppScreenshot.js"; - -export type AppMetadata = { - review: AppReview | null; - categories: Array | null; - subCategories: Array | null; - seoDescription: string | null; - screenshots: Array | null; - developer: string | null; - version: string | null; - versionId: string | null; - versionNotes: string | null; - firstPartyType: string | null; - firstPartyRequiresInstall: boolean | null; - showInComposerWhenUnlinked: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppReview.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppReview.ts deleted file mode 100644 index 96e14b7e9c9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppReview.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AppReview = { status: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppScreenshot.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppScreenshot.ts deleted file mode 100644 index f538ccc9bd8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppScreenshot.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AppScreenshot = { url: string | null; fileId: string | null; userPrompt: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppSummary.ts deleted file mode 100644 index b3160665060..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppSummary.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - app metadata summary for plugin responses. - */ -export type AppSummary = { - id: string; - name: string; - description: string | null; - installUrl: string | null; - needsAuth: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolApproval.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolApproval.ts deleted file mode 100644 index e92cd8e28b2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolApproval.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AppToolApproval = "auto" | "prompt" | "approve"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolsConfig.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolsConfig.ts deleted file mode 100644 index af47194bc86..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppToolsConfig.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppToolApproval } from "./AppToolApproval.js"; - -export type AppToolsConfig = { - [key in string]?: { enabled: boolean | null; approval_mode: AppToolApproval | null }; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ApprovalsReviewer.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ApprovalsReviewer.ts deleted file mode 100644 index 1d932946cc5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ApprovalsReviewer.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Configures who approval requests are routed to for review. Examples - * include sandbox escapes, blocked network access, MCP approval prompts, and - * ARC escalations. Defaults to `user`. `auto_review` uses a carefully - * prompted subagent to gather relevant context and apply a risk-based - * decision framework before approving or denying the request. - */ -export type ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsConfig.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsConfig.ts deleted file mode 100644 index 1bd048c7ddb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -import type { AppsDefaultConfig } from "./AppsDefaultConfig.js"; -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppToolApproval } from "./AppToolApproval.js"; -import type { AppToolsConfig } from "./AppToolsConfig.js"; - -export type AppsConfig = { _default: AppsDefaultConfig | null } & { - [key in string]?: { - enabled: boolean; - destructive_enabled: boolean | null; - open_world_enabled: boolean | null; - default_tools_approval_mode: AppToolApproval | null; - default_tools_enabled: boolean | null; - tools: AppToolsConfig | null; - }; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsDefaultConfig.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsDefaultConfig.ts deleted file mode 100644 index 1fd8e81a0dc..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsDefaultConfig.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AppsDefaultConfig = { - enabled: boolean; - destructive_enabled: boolean; - open_world_enabled: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListParams.ts deleted file mode 100644 index e85212c2827..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListParams.ts +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - list available apps/connectors. - */ -export type AppsListParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to a reasonable server-side value. - */ - limit?: number | null; - /** - * Optional thread id used to evaluate app feature gating from that thread's config. - */ - threadId?: string | null; - /** - * When true, bypass app caches and fetch the latest data from sources. - */ - forceRefetch?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListResponse.ts deleted file mode 100644 index cd4cc6dc3e8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AppsListResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppInfo } from "./AppInfo.js"; - -/** - * EXPERIMENTAL - app list response. - */ -export type AppsListResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * If None, there are no more items to return. - */ - nextCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AskForApproval.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AskForApproval.ts deleted file mode 100644 index 8c134c91e24..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AskForApproval.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type AskForApproval = - | "untrusted" - | "on-failure" - | "on-request" - | { - granular: { - sandbox_approval: boolean; - rules: boolean; - skill_approval: boolean; - request_permissions: boolean; - mcp_elicitations: boolean; - }; - } - | "never"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AutoReviewDecisionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AutoReviewDecisionSource.ts deleted file mode 100644 index 8806981237f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AutoReviewDecisionSource.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * [UNSTABLE] Source that produced a terminal approval auto-review decision. - */ -export type AutoReviewDecisionSource = "agent"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ByteRange.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ByteRange.ts deleted file mode 100644 index fae7a1ca5f7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ByteRange.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ByteRange = { start: number; end: number }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountParams.ts deleted file mode 100644 index 8096042be44..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CancelLoginAccountParams = { loginId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountResponse.ts deleted file mode 100644 index 3a8b587da25..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CancelLoginAccountStatus } from "./CancelLoginAccountStatus.js"; - -export type CancelLoginAccountResponse = { status: CancelLoginAccountStatus }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountStatus.ts deleted file mode 100644 index bd851c6a39c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CancelLoginAccountStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CancelLoginAccountStatus = "canceled" | "notFound"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshParams.ts deleted file mode 100644 index 548d26f9775..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ChatgptAuthTokensRefreshReason } from "./ChatgptAuthTokensRefreshReason.js"; - -export type ChatgptAuthTokensRefreshParams = { - reason: ChatgptAuthTokensRefreshReason; - /** - * Workspace/account identifier that Codex was previously using. - * - * Clients that manage multiple accounts/workspaces can use this as a hint - * to refresh the token for the correct workspace. - * - * This may be `null` when the prior auth state did not include a workspace - * identifier (`chatgpt_account_id`). - */ - previousAccountId?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshReason.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshReason.ts deleted file mode 100644 index ac4006ba6a9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshReason.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ChatgptAuthTokensRefreshReason = "unauthorized"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshResponse.ts deleted file mode 100644 index 060598850e3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ChatgptAuthTokensRefreshResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ChatgptAuthTokensRefreshResponse = { - accessToken: string; - chatgptAccountId: string; - chatgptPlanType: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CodexErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CodexErrorInfo.ts deleted file mode 100644 index be64bb95465..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CodexErrorInfo.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { NonSteerableTurnKind } from "./NonSteerableTurnKind.js"; - -/** - * This translation layer make sure that we expose codex error code in camel case. - * - * When an upstream HTTP status is available (for example, from the Responses API or a provider), - * it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant. - */ -export type CodexErrorInfo = - | "contextWindowExceeded" - | "usageLimitExceeded" - | "serverOverloaded" - | "cyberPolicy" - | { httpConnectionFailed: { httpStatusCode: number | null } } - | { responseStreamConnectionFailed: { httpStatusCode: number | null } } - | "internalServerError" - | "unauthorized" - | "badRequest" - | "threadRollbackFailed" - | "sandboxError" - | { responseStreamDisconnected: { httpStatusCode: number | null } } - | { responseTooManyFailedAttempts: { httpStatusCode: number | null } } - | { activeTurnNotSteerable: { turnKind: NonSteerableTurnKind } } - | "other"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentState.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentState.ts deleted file mode 100644 index 0a3fb2c0490..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentState.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CollabAgentStatus } from "./CollabAgentStatus.js"; - -export type CollabAgentState = { status: CollabAgentStatus; message: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentStatus.ts deleted file mode 100644 index 5bff8e16bba..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentStatus.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CollabAgentStatus = - | "pendingInit" - | "running" - | "interrupted" - | "completed" - | "errored" - | "shutdown" - | "notFound"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentTool.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentTool.ts deleted file mode 100644 index 3637853a389..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentTool.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentToolCallStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentToolCallStatus.ts deleted file mode 100644 index f21f7bd5d5f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollabAgentToolCallStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CollabAgentToolCallStatus = "inProgress" | "completed" | "failed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts deleted file mode 100644 index 37e8f792d95..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - list collaboration mode presets. - */ -export type CollaborationModeListParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts deleted file mode 100644 index 479f76a8c20..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CollaborationModeMask } from "./CollaborationModeMask.js"; - -/** - * EXPERIMENTAL - collaboration mode presets response. - */ -export type CollaborationModeListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeMask.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeMask.ts deleted file mode 100644 index 3482bcc3af7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeMask.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ModeKind } from "../ModeKind.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; - -/** - * EXPERIMENTAL - collaboration mode preset metadata for clients. - */ -export type CollaborationModeMask = { - name: string; - mode: ModeKind | null; - model: string | null; - reasoning_effort: ReasoningEffort | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandAction.ts deleted file mode 100644 index aa2c5cbae31..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandAction.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type CommandAction = - | { type: "read"; command: string; name: string; path: AbsolutePathBuf } - | { type: "listFiles"; command: string; path: string | null } - | { type: "search"; command: string; query: string | null; path: string | null } - | { type: "unknown"; command: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputDeltaNotification.ts deleted file mode 100644 index 669860d57a7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputDeltaNotification.ts +++ /dev/null @@ -1,31 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommandExecOutputStream } from "./CommandExecOutputStream.js"; - -/** - * Base64-encoded output chunk emitted for a streaming `command/exec` request. - * - * These notifications are connection-scoped. If the originating connection - * closes, the server terminates the process. - */ -export type CommandExecOutputDeltaNotification = { - /** - * Client-supplied, connection-scoped `processId` from the original - * `command/exec` request. - */ - processId: string; - /** - * Output stream for this chunk. - */ - stream: CommandExecOutputStream; - /** - * Base64-encoded output bytes. - */ - deltaBase64: string; - /** - * `true` on the final streamed chunk for a stream when `outputBytesCap` - * truncated later output on that stream. - */ - capReached: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputStream.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputStream.ts deleted file mode 100644 index a8c5b66711d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecOutputStream.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Stream label for `command/exec/outputDelta` notifications. - */ -export type CommandExecOutputStream = "stdout" | "stderr"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecParams.ts deleted file mode 100644 index ab97afd89f8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecParams.ts +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommandExecTerminalSize } from "./CommandExecTerminalSize.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; -import type { SandboxPolicy } from "./SandboxPolicy.js"; - -/** - * Run a standalone command (argv vector) in the server sandbox without - * creating a thread or turn. - * - * The final `command/exec` response is deferred until the process exits and is - * sent only after all `command/exec/outputDelta` notifications for that - * connection have been emitted. - */ -export type CommandExecParams = { - /** - * Command argv vector. Empty arrays are rejected. - */ - command: Array; - /** - * Optional client-supplied, connection-scoped process id. - * - * Required for `tty`, `streamStdin`, `streamStdoutStderr`, and follow-up - * `command/exec/write`, `command/exec/resize`, and - * `command/exec/terminate` calls. When omitted, buffered execution gets an - * internal id that is not exposed to the client. - */ - processId?: string | null; - /** - * Enable PTY mode. - * - * This implies `streamStdin` and `streamStdoutStderr`. - */ - tty?: boolean; - /** - * Allow follow-up `command/exec/write` requests to write stdin bytes. - * - * Requires a client-supplied `processId`. - */ - streamStdin?: boolean; - /** - * Stream stdout/stderr via `command/exec/outputDelta` notifications. - * - * Streamed bytes are not duplicated into the final response and require a - * client-supplied `processId`. - */ - streamStdoutStderr?: boolean; - /** - * Optional per-stream stdout/stderr capture cap in bytes. - * - * When omitted, the server default applies. Cannot be combined with - * `disableOutputCap`. - */ - outputBytesCap?: number | null; - /** - * Disable stdout/stderr capture truncation for this request. - * - * Cannot be combined with `outputBytesCap`. - */ - disableOutputCap?: boolean; - /** - * Disable the timeout entirely for this request. - * - * Cannot be combined with `timeoutMs`. - */ - disableTimeout?: boolean; - /** - * Optional timeout in milliseconds. - * - * When omitted, the server default applies. Cannot be combined with - * `disableTimeout`. - */ - timeoutMs?: number | null; - /** - * Optional working directory. Defaults to the server cwd. - */ - cwd?: string | null; - /** - * Optional environment overrides merged into the server-computed - * environment. - * - * Matching names override inherited values. Set a key to `null` to unset - * an inherited variable. - */ - env?: { [key in string]?: string | null } | null; - /** - * Optional initial PTY size in character cells. Only valid when `tty` is - * true. - */ - size?: CommandExecTerminalSize | null; - /** - * Optional sandbox policy for this command. - * - * Uses the same shape as thread/turn execution sandbox configuration and - * defaults to the user's configured policy when omitted. Cannot be - * combined with `permissionProfile`. - */ - sandboxPolicy?: SandboxPolicy | null; - /** - * Optional full permissions profile for this command. - * - * Defaults to the user's configured permissions when omitted. Cannot be - * combined with `sandboxPolicy`. - */ - permissionProfile?: PermissionProfile | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeParams.ts deleted file mode 100644 index d2a2e4b5873..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeParams.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommandExecTerminalSize } from "./CommandExecTerminalSize.js"; - -/** - * Resize a running PTY-backed `command/exec` session. - */ -export type CommandExecResizeParams = { - /** - * Client-supplied, connection-scoped `processId` from the original - * `command/exec` request. - */ - processId: string; - /** - * New PTY size in character cells. - */ - size: CommandExecTerminalSize; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeResponse.ts deleted file mode 100644 index 7b7f2be7006..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResizeResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Empty success response for `command/exec/resize`. - */ -export type CommandExecResizeResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResponse.ts deleted file mode 100644 index caa53bd18e1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Final buffered result for `command/exec`. - */ -export type CommandExecResponse = { - /** - * Process exit code. - */ - exitCode: number; - /** - * Buffered stdout capture. - * - * Empty when stdout was streamed via `command/exec/outputDelta`. - */ - stdout: string; - /** - * Buffered stderr capture. - * - * Empty when stderr was streamed via `command/exec/outputDelta`. - */ - stderr: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminalSize.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminalSize.ts deleted file mode 100644 index 5d409e076d5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminalSize.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * PTY size in character cells for `command/exec` PTY sessions. - */ -export type CommandExecTerminalSize = { - /** - * Terminal height in character cells. - */ - rows: number; - /** - * Terminal width in character cells. - */ - cols: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateParams.ts deleted file mode 100644 index 43cbaab71c5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Terminate a running `command/exec` session. - */ -export type CommandExecTerminateParams = { - /** - * Client-supplied, connection-scoped `processId` from the original - * `command/exec` request. - */ - processId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateResponse.ts deleted file mode 100644 index dc6371fbdd6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecTerminateResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Empty success response for `command/exec/terminate`. - */ -export type CommandExecTerminateResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteParams.ts deleted file mode 100644 index 960fadcc872..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteParams.ts +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Write stdin bytes to a running `command/exec` session, close stdin, or - * both. - */ -export type CommandExecWriteParams = { - /** - * Client-supplied, connection-scoped `processId` from the original - * `command/exec` request. - */ - processId: string; - /** - * Optional base64-encoded stdin bytes to write. - */ - deltaBase64?: string | null; - /** - * Close stdin after writing `deltaBase64`, if present. - */ - closeStdin?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteResponse.ts deleted file mode 100644 index 6dbbddf4dd2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecWriteResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Empty success response for `command/exec/write`. - */ -export type CommandExecWriteResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionApprovalDecision.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionApprovalDecision.ts deleted file mode 100644 index d6404e44b03..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionApprovalDecision.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js"; -import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js"; - -export type CommandExecutionApprovalDecision = - | "accept" - | "acceptForSession" - | { acceptWithExecpolicyAmendment: { execpolicy_amendment: ExecPolicyAmendment } } - | { applyNetworkPolicyAmendment: { network_policy_amendment: NetworkPolicyAmendment } } - | "decline" - | "cancel"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionOutputDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionOutputDeltaNotification.ts deleted file mode 100644 index c476d448abe..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionOutputDeltaNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CommandExecutionOutputDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalParams.ts deleted file mode 100644 index 2b1d21b21d3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalParams.ts +++ /dev/null @@ -1,62 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { AdditionalPermissionProfile } from "./AdditionalPermissionProfile.js"; -import type { CommandAction } from "./CommandAction.js"; -import type { CommandExecutionApprovalDecision } from "./CommandExecutionApprovalDecision.js"; -import type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js"; -import type { NetworkApprovalContext } from "./NetworkApprovalContext.js"; -import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js"; - -export type CommandExecutionRequestApprovalParams = { - threadId: string; - turnId: string; - itemId: string; - /** - * Unique identifier for this specific approval callback. - * - * For regular shell/unified_exec approvals, this is null. - * - * For zsh-exec-bridge subcommand approvals, multiple callbacks can belong to - * one parent `itemId`, so `approvalId` is a distinct opaque callback id - * (a UUID) used to disambiguate routing. - */ - approvalId?: string | null; - /** - * Optional explanatory reason (e.g. request for network access). - */ - reason?: string | null; - /** - * Optional context for a managed-network approval prompt. - */ - networkApprovalContext?: NetworkApprovalContext | null; - /** - * The command to be executed. - */ - command?: string | null; - /** - * The command's working directory. - */ - cwd?: AbsolutePathBuf | null; - /** - * Best-effort parsed command actions for friendly display. - */ - commandActions?: Array | null; - /** - * Optional additional permissions requested for this command. - */ - additionalPermissions?: AdditionalPermissionProfile | null; - /** - * Optional proposed execpolicy amendment to allow similar commands without prompting. - */ - proposedExecpolicyAmendment?: ExecPolicyAmendment | null; - /** - * Optional proposed network policy amendments (allow/deny host) for future requests. - */ - proposedNetworkPolicyAmendments?: Array | null; - /** - * Ordered list of decisions the client may present for this prompt. - */ - availableDecisions?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalResponse.ts deleted file mode 100644 index 1a02bbf6a60..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionRequestApprovalResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommandExecutionApprovalDecision } from "./CommandExecutionApprovalDecision.js"; - -export type CommandExecutionRequestApprovalResponse = { - decision: CommandExecutionApprovalDecision; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionSource.ts deleted file mode 100644 index 790b65b7ed1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionSource.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CommandExecutionSource = - | "agent" - | "userShell" - | "unifiedExecStartup" - | "unifiedExecInteraction"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionStatus.ts deleted file mode 100644 index c58b3cc7faa..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandExecutionStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CommandExecutionStatus = "inProgress" | "completed" | "failed" | "declined"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts deleted file mode 100644 index 8f2bee05871..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CommandMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts deleted file mode 100644 index fff341ae2f9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts +++ /dev/null @@ -1,57 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ForcedLoginMethod } from "../ForcedLoginMethod.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ReasoningSummary } from "../ReasoningSummary.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { Verbosity } from "../Verbosity.js"; -import type { WebSearchMode } from "../WebSearchMode.js"; -import type { AnalyticsConfig } from "./AnalyticsConfig.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AppsConfig } from "./AppsConfig.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { ProfileV2 } from "./ProfileV2.js"; -import type { SandboxMode } from "./SandboxMode.js"; -import type { SandboxWorkspaceWrite } from "./SandboxWorkspaceWrite.js"; -import type { ToolsV2 } from "./ToolsV2.js"; - -export type Config = { - model: string | null; - review_model: string | null; - model_context_window: bigint | null; - model_auto_compact_token_limit: bigint | null; - model_provider: string | null; - approval_policy: AskForApproval | null; - /** - * [UNSTABLE] Optional default for where approval requests are routed for - * review. - */ - approvals_reviewer: ApprovalsReviewer | null; - sandbox_mode: SandboxMode | null; - sandbox_workspace_write: SandboxWorkspaceWrite | null; - forced_chatgpt_workspace_id: string | null; - forced_login_method: ForcedLoginMethod | null; - web_search: WebSearchMode | null; - tools: ToolsV2 | null; - profile: string | null; - profiles: { [key in string]?: ProfileV2 }; - instructions: string | null; - developer_instructions: string | null; - compact_prompt: string | null; - model_reasoning_effort: ReasoningEffort | null; - model_reasoning_summary: ReasoningSummary | null; - model_verbosity: Verbosity | null; - service_tier: ServiceTier | null; - analytics: AnalyticsConfig | null; - apps: AppsConfig | null; -} & { - [key in string]?: - | number - | string - | boolean - | Array - | { [key in string]?: JsonValue } - | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigBatchWriteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigBatchWriteParams.ts deleted file mode 100644 index c763ac23a2f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigBatchWriteParams.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConfigEdit } from "./ConfigEdit.js"; - -export type ConfigBatchWriteParams = { - edits: Array; - /** - * Path to the config file to write; defaults to the user's `config.toml` when omitted. - */ - filePath?: string | null; - expectedVersion?: string | null; - /** - * When true, hot-reload the updated user config into all loaded threads after writing. - */ - reloadUserConfig?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigEdit.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigEdit.ts deleted file mode 100644 index 92a26a15271..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigEdit.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { MergeStrategy } from "./MergeStrategy.js"; - -export type ConfigEdit = { keyPath: string; value: JsonValue; mergeStrategy: MergeStrategy }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayer.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayer.ts deleted file mode 100644 index f48ad34a055..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayer.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ConfigLayerSource } from "./ConfigLayerSource.js"; - -export type ConfigLayer = { - name: ConfigLayerSource; - version: string; - config: JsonValue; - disabledReason: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerMetadata.ts deleted file mode 100644 index 26d4e976305..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerMetadata.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConfigLayerSource } from "./ConfigLayerSource.js"; - -export type ConfigLayerMetadata = { name: ConfigLayerSource; version: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerSource.ts deleted file mode 100644 index 2941dfe7e41..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigLayerSource.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type ConfigLayerSource = - | { type: "mdm"; domain: string; key: string } - | { - type: "system"; - /** - * This is the path to the system config.toml file, though it is not - * guaranteed to exist. - */ - file: AbsolutePathBuf; - } - | { - type: "user"; - /** - * This is the path to the user's config.toml file, though it is not - * guaranteed to exist. - */ - file: AbsolutePathBuf; - } - | { type: "project"; dotCodexFolder: AbsolutePathBuf } - | { type: "sessionFlags" } - | { type: "legacyManagedConfigTomlFromFile"; file: AbsolutePathBuf } - | { type: "legacyManagedConfigTomlFromMdm" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadParams.ts deleted file mode 100644 index 7e14e83f047..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ConfigReadParams = { - includeLayers: boolean; - /** - * Optional working directory to resolve project config layers. If specified, - * return the effective config as seen from that directory (i.e., including any - * project layers between `cwd` and the project/repo root). - */ - cwd?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadResponse.ts deleted file mode 100644 index edf3436d977..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigReadResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Config } from "./Config.js"; -import type { ConfigLayer } from "./ConfigLayer.js"; -import type { ConfigLayerMetadata } from "./ConfigLayerMetadata.js"; - -export type ConfigReadResponse = { - config: Config; - origins: { [key in string]?: ConfigLayerMetadata }; - layers: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts deleted file mode 100644 index 7b977d9bea9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { WebSearchMode } from "../WebSearchMode.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { ManagedHooksRequirements } from "./ManagedHooksRequirements.js"; -import type { NetworkRequirements } from "./NetworkRequirements.js"; -import type { ResidencyRequirement } from "./ResidencyRequirement.js"; -import type { SandboxMode } from "./SandboxMode.js"; - -export type ConfigRequirements = { - allowedApprovalPolicies: Array | null; - allowedApprovalsReviewers: Array | null; - allowedSandboxModes: Array | null; - allowedWebSearchModes: Array | null; - featureRequirements: { [key in string]?: boolean } | null; - hooks: ManagedHooksRequirements | null; - enforceResidency: ResidencyRequirement | null; - network: NetworkRequirements | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirementsReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirementsReadResponse.ts deleted file mode 100644 index e030f512cd9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirementsReadResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConfigRequirements } from "./ConfigRequirements.js"; - -export type ConfigRequirementsReadResponse = { - /** - * Null if no requirements are configured (e.g. no requirements.toml/MDM entries). - */ - requirements: ConfigRequirements | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigValueWriteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigValueWriteParams.ts deleted file mode 100644 index 37b2f44ffe2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigValueWriteParams.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { MergeStrategy } from "./MergeStrategy.js"; - -export type ConfigValueWriteParams = { - keyPath: string; - value: JsonValue; - mergeStrategy: MergeStrategy; - /** - * Path to the config file to write; defaults to the user's `config.toml` when omitted. - */ - filePath?: string | null; - expectedVersion?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWarningNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWarningNotification.ts deleted file mode 100644 index f6be1f97f6b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWarningNotification.ts +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TextRange } from "./TextRange.js"; - -export type ConfigWarningNotification = { - /** - * Concise summary of the warning. - */ - summary: string; - /** - * Optional extra guidance or error details. - */ - details: string | null; - /** - * Optional path to the config file that triggered the warning. - */ - path?: string; - /** - * Optional range for the error location inside the config file. - */ - range?: TextRange; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWriteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWriteResponse.ts deleted file mode 100644 index 43560042d03..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigWriteResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { OverriddenMetadata } from "./OverriddenMetadata.js"; -import type { WriteStatus } from "./WriteStatus.js"; - -export type ConfigWriteResponse = { - status: WriteStatus; - version: string; - /** - * Canonical path to the config file that was written. - */ - filePath: AbsolutePathBuf; - overriddenMetadata: OverriddenMetadata | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookHandler.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookHandler.ts deleted file mode 100644 index da81b015d96..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ConfiguredHookHandler = - | { - type: "command"; - command: string; - timeoutSec: bigint | null; - async: boolean; - statusMessage: string | null; - } - | { type: "prompt" } - | { type: "agent" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookMatcherGroup.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookMatcherGroup.ts deleted file mode 100644 index ee08ee7b1e0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfiguredHookMatcherGroup.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConfiguredHookHandler } from "./ConfiguredHookHandler.js"; - -export type ConfiguredHookMatcherGroup = { - matcher: string | null; - hooks: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ContextCompactedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ContextCompactedNotification.ts deleted file mode 100644 index bb6825365bb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ContextCompactedNotification.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Deprecated: Use `ContextCompaction` item type instead. - */ -export type ContextCompactedNotification = { threadId: string; turnId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CreditsSnapshot.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CreditsSnapshot.ts deleted file mode 100644 index dd5e746f6da..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CreditsSnapshot.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CreditsSnapshot = { hasCredits: boolean; unlimited: boolean; balance: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeprecationNoticeNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeprecationNoticeNotification.ts deleted file mode 100644 index 54f3d085c08..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeprecationNoticeNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type DeprecationNoticeNotification = { - /** - * Concise summary of what is deprecated. - */ - summary: string; - /** - * Optional extra guidance, such as migration steps or rationale. - */ - details: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyAlgorithm.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyAlgorithm.ts deleted file mode 100644 index 6809c41eb54..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyAlgorithm.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Device-key algorithm reported at enrollment and signing boundaries. - */ -export type DeviceKeyAlgorithm = "ecdsa_p256_sha256"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateParams.ts deleted file mode 100644 index 485b6a7c9e3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateParams.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DeviceKeyProtectionPolicy } from "./DeviceKeyProtectionPolicy.js"; - -/** - * Create a controller-local device key with a random key id. - */ -export type DeviceKeyCreateParams = { - /** - * Defaults to `hardware_only` when omitted. - */ - protectionPolicy?: DeviceKeyProtectionPolicy | null; - accountUserId: string; - clientId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateResponse.ts deleted file mode 100644 index a7b8ebcfd9a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyCreateResponse.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DeviceKeyAlgorithm } from "./DeviceKeyAlgorithm.js"; -import type { DeviceKeyProtectionClass } from "./DeviceKeyProtectionClass.js"; - -/** - * Device-key metadata and public key returned by create/public APIs. - */ -export type DeviceKeyCreateResponse = { - keyId: string; - /** - * SubjectPublicKeyInfo DER encoded as base64. - */ - publicKeySpkiDerBase64: string; - algorithm: DeviceKeyAlgorithm; - protectionClass: DeviceKeyProtectionClass; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionClass.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionClass.ts deleted file mode 100644 index fd3471b71c6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionClass.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Platform protection class for a controller-local device key. - */ -export type DeviceKeyProtectionClass = - | "hardware_secure_enclave" - | "hardware_tpm" - | "os_protected_nonextractable"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionPolicy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionPolicy.ts deleted file mode 100644 index 66fceafb514..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyProtectionPolicy.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Protection policy for creating or loading a controller-local device key. - */ -export type DeviceKeyProtectionPolicy = "hardware_only" | "allow_os_protected_nonextractable"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicParams.ts deleted file mode 100644 index 06442578a80..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Fetch a controller-local device key public key by id. - */ -export type DeviceKeyPublicParams = { keyId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicResponse.ts deleted file mode 100644 index 46176860cc1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeyPublicResponse.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DeviceKeyAlgorithm } from "./DeviceKeyAlgorithm.js"; -import type { DeviceKeyProtectionClass } from "./DeviceKeyProtectionClass.js"; - -/** - * Device-key public metadata returned by `device/key/public`. - */ -export type DeviceKeyPublicResponse = { - keyId: string; - /** - * SubjectPublicKeyInfo DER encoded as base64. - */ - publicKeySpkiDerBase64: string; - algorithm: DeviceKeyAlgorithm; - protectionClass: DeviceKeyProtectionClass; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignParams.ts deleted file mode 100644 index bbb37c9a2af..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DeviceKeySignPayload } from "./DeviceKeySignPayload.js"; - -/** - * Sign an accepted structured payload with a controller-local device key. - */ -export type DeviceKeySignParams = { keyId: string; payload: DeviceKeySignPayload }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignPayload.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignPayload.ts deleted file mode 100644 index 269026544ff..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignPayload.ts +++ /dev/null @@ -1,68 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RemoteControlClientConnectionAudience } from "./RemoteControlClientConnectionAudience.js"; -import type { RemoteControlClientEnrollmentAudience } from "./RemoteControlClientEnrollmentAudience.js"; - -/** - * Structured payloads accepted by `device/key/sign`. - */ -export type DeviceKeySignPayload = - | { - type: "remoteControlClientConnection"; - nonce: string; - audience: RemoteControlClientConnectionAudience; - /** - * Backend-issued websocket session id that this proof authorizes. - */ - sessionId: string; - /** - * Origin of the backend endpoint that issued the challenge and will verify this proof. - */ - targetOrigin: string; - /** - * Websocket route path that this proof authorizes. - */ - targetPath: string; - accountUserId: string; - clientId: string; - /** - * Remote-control token expiration as Unix seconds. - */ - tokenExpiresAt: number; - /** - * SHA-256 of the controller-scoped remote-control token, encoded as unpadded base64url. - */ - tokenSha256Base64url: string; - /** - * Must contain exactly `remote_control_controller_websocket`. - */ - scopes: Array; - } - | { - type: "remoteControlClientEnrollment"; - nonce: string; - audience: RemoteControlClientEnrollmentAudience; - /** - * Backend-issued enrollment challenge id that this proof authorizes. - */ - challengeId: string; - /** - * Origin of the backend endpoint that issued the challenge and will verify this proof. - */ - targetOrigin: string; - /** - * HTTP route path that this proof authorizes. - */ - targetPath: string; - accountUserId: string; - clientId: string; - /** - * SHA-256 of the requested device identity operation, encoded as unpadded base64url. - */ - deviceIdentitySha256Base64url: string; - /** - * Enrollment challenge expiration as Unix seconds. - */ - challengeExpiresAt: number; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignResponse.ts deleted file mode 100644 index b3882f463be..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DeviceKeySignResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DeviceKeyAlgorithm } from "./DeviceKeyAlgorithm.js"; - -/** - * ASN.1 DER signature returned by `device/key/sign`. - */ -export type DeviceKeySignResponse = { - /** - * ECDSA signature DER encoded as base64. - */ - signatureDerBase64: string; - /** - * Exact bytes signed by the device key, encoded as base64. Verifiers must verify this byte - * string directly and must not reserialize `payload`. - */ - signedPayloadBase64: string; - algorithm: DeviceKeyAlgorithm; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallOutputContentItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallOutputContentItem.ts deleted file mode 100644 index c2fb2785582..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallOutputContentItem.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type DynamicToolCallOutputContentItem = - | { type: "inputText"; text: string } - | { type: "inputImage"; imageUrl: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallParams.ts deleted file mode 100644 index d35926a4f04..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type DynamicToolCallParams = { - threadId: string; - turnId: string; - callId: string; - namespace: string | null; - tool: string; - arguments: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallResponse.ts deleted file mode 100644 index 5e1e84b0956..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem.js"; - -export type DynamicToolCallResponse = { - contentItems: Array; - success: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallStatus.ts deleted file mode 100644 index 04f44ec0a8b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolCallStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type DynamicToolCallStatus = "inProgress" | "completed" | "failed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolSpec.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolSpec.ts deleted file mode 100644 index 5f9176ac05d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/DynamicToolSpec.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type DynamicToolSpec = { - namespace?: string; - name: string; - description: string; - inputSchema: JsonValue; - deferLoading?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ErrorNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ErrorNotification.ts deleted file mode 100644 index c0cacfc8794..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ErrorNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TurnError } from "./TurnError.js"; - -export type ErrorNotification = { - error: TurnError; - willRetry: boolean; - threadId: string; - turnId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExecPolicyAmendment.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExecPolicyAmendment.ts deleted file mode 100644 index e893dd4477e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExecPolicyAmendment.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExecPolicyAmendment = Array; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeature.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeature.ts deleted file mode 100644 index 6b44cc29cd1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeature.ts +++ /dev/null @@ -1,38 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExperimentalFeatureStage } from "./ExperimentalFeatureStage.js"; - -export type ExperimentalFeature = { - /** - * Stable key used in config.toml and CLI flag toggles. - */ - name: string; - /** - * Lifecycle stage of this feature flag. - */ - stage: ExperimentalFeatureStage; - /** - * User-facing display name shown in the experimental features UI. - * Null when this feature is not in beta. - */ - displayName: string | null; - /** - * Short summary describing what the feature does. - * Null when this feature is not in beta. - */ - description: string | null; - /** - * Announcement copy shown to users when the feature is introduced. - * Null when this feature is not in beta. - */ - announcement: string | null; - /** - * Whether this feature is currently enabled in the loaded config. - */ - enabled: boolean; - /** - * Whether this feature is enabled by default. - */ - defaultEnabled: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetParams.ts deleted file mode 100644 index de388e3dc62..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExperimentalFeatureEnablementSetParams = { - /** - * Process-wide runtime feature enablement keyed by canonical feature name. - * - * Only named features are updated. Omitted features are left unchanged. - * Send an empty map for a no-op. - */ - enablement: { [key in string]?: boolean }; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts deleted file mode 100644 index e3349d166d7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExperimentalFeatureEnablementSetResponse = { - /** - * Feature enablement entries updated by this request. - */ - enablement: { [key in string]?: boolean }; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListParams.ts deleted file mode 100644 index b17c8a637e4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExperimentalFeatureListParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to a reasonable server-side value. - */ - limit?: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListResponse.ts deleted file mode 100644 index c874344b568..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureListResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExperimentalFeature } from "./ExperimentalFeature.js"; - -export type ExperimentalFeatureListResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * If None, there are no more items to return. - */ - nextCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureStage.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureStage.ts deleted file mode 100644 index b72828d4ca3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExperimentalFeatureStage.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExperimentalFeatureStage = - | "beta" - | "underDevelopment" - | "stable" - | "deprecated" - | "removed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectParams.ts deleted file mode 100644 index 7a081f254c6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExternalAgentConfigDetectParams = { - /** - * If true, include detection under the user's home (~/.claude, ~/.codex, etc.). - */ - includeHome?: boolean; - /** - * Zero or more working directories to include for repo-scoped detection. - */ - cwds?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectResponse.ts deleted file mode 100644 index db6c9c81236..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigDetectResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExternalAgentConfigMigrationItem } from "./ExternalAgentConfigMigrationItem.js"; - -export type ExternalAgentConfigDetectResponse = { items: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportCompletedNotification.ts deleted file mode 100644 index edb8f191621..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportCompletedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExternalAgentConfigImportCompletedNotification = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportParams.ts deleted file mode 100644 index d83473ed92f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExternalAgentConfigMigrationItem } from "./ExternalAgentConfigMigrationItem.js"; - -export type ExternalAgentConfigImportParams = { - migrationItems: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportResponse.ts deleted file mode 100644 index 2ceddade0e7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigImportResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExternalAgentConfigImportResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItem.ts deleted file mode 100644 index a4df7554331..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItem.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ExternalAgentConfigMigrationItemType } from "./ExternalAgentConfigMigrationItemType.js"; -import type { MigrationDetails } from "./MigrationDetails.js"; - -export type ExternalAgentConfigMigrationItem = { - itemType: ExternalAgentConfigMigrationItemType; - description: string; - /** - * Null or empty means home-scoped migration; non-empty means repo-scoped migration. - */ - cwd: string | null; - details: MigrationDetails | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts deleted file mode 100644 index 5a2ee5fc783..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ExternalAgentConfigMigrationItemType = - | "AGENTS_MD" - | "CONFIG" - | "SKILLS" - | "PLUGINS" - | "MCP_SERVER_CONFIG" - | "SUBAGENTS" - | "HOOKS" - | "COMMANDS" - | "SESSIONS"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadParams.ts deleted file mode 100644 index 4313db5d87a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FeedbackUploadParams = { - classification: string; - reason?: string | null; - threadId?: string | null; - includeLogs: boolean; - extraLogFiles?: Array | null; - tags?: { [key in string]?: string } | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadResponse.ts deleted file mode 100644 index 6b2db6462f1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FeedbackUploadResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FeedbackUploadResponse = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeApprovalDecision.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeApprovalDecision.ts deleted file mode 100644 index b74ba004b88..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeApprovalDecision.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileChangeApprovalDecision = "accept" | "acceptForSession" | "decline" | "cancel"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts deleted file mode 100644 index abd645ca2f6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Deprecated legacy notification for `apply_patch` textual output. - * - * The server no longer emits this notification. - */ -export type FileChangeOutputDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangePatchUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangePatchUpdatedNotification.ts deleted file mode 100644 index 9015c2894ae..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangePatchUpdatedNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileUpdateChange } from "./FileUpdateChange.js"; - -export type FileChangePatchUpdatedNotification = { - threadId: string; - turnId: string; - itemId: string; - changes: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalParams.ts deleted file mode 100644 index c7855319252..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileChangeRequestApprovalParams = { - threadId: string; - turnId: string; - itemId: string; - /** - * Optional explanatory reason (e.g. request for extra write access). - */ - reason?: string | null; - /** - * [UNSTABLE] When set, the agent is asking the user to allow writes under this root - * for the remainder of the session (unclear if this is honored today). - */ - grantRoot?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalResponse.ts deleted file mode 100644 index 6e528884ad4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeRequestApprovalResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileChangeApprovalDecision } from "./FileChangeApprovalDecision.js"; - -export type FileChangeRequestApprovalResponse = { decision: FileChangeApprovalDecision }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemAccessMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemAccessMode.ts deleted file mode 100644 index b1d801fe416..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemAccessMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileSystemAccessMode = "read" | "write" | "none"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemPath.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemPath.ts deleted file mode 100644 index 36dd69193c7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemPath.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { FileSystemSpecialPath } from "./FileSystemSpecialPath.js"; - -export type FileSystemPath = - | { type: "path"; path: AbsolutePathBuf } - | { type: "glob_pattern"; pattern: string } - | { type: "special"; value: FileSystemSpecialPath }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSandboxEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSandboxEntry.ts deleted file mode 100644 index ff0a2dabd63..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSandboxEntry.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileSystemAccessMode } from "./FileSystemAccessMode.js"; -import type { FileSystemPath } from "./FileSystemPath.js"; - -export type FileSystemSandboxEntry = { path: FileSystemPath; access: FileSystemAccessMode }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts deleted file mode 100644 index 05827f26554..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileSystemSpecialPath = - | { kind: "root" } - | { kind: "minimal" } - | { kind: "project_roots"; subpath: string | null } - | { kind: "tmpdir" } - | { kind: "slash_tmp" } - | { kind: "unknown"; path: string; subpath: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileUpdateChange.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileUpdateChange.ts deleted file mode 100644 index 914add8a283..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileUpdateChange.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PatchChangeKind } from "./PatchChangeKind.js"; - -export type FileUpdateChange = { path: string; kind: PatchChangeKind; diff: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsChangedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsChangedNotification.ts deleted file mode 100644 index 34572071185..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsChangedNotification.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Filesystem watch notification emitted for `fs/watch` subscribers. - */ -export type FsChangedNotification = { - /** - * Watch identifier previously provided to `fs/watch`. - */ - watchId: string; - /** - * File or directory paths associated with this event. - */ - changedPaths: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyParams.ts deleted file mode 100644 index 59b5906b4b1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyParams.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Copy a file or directory tree on the host filesystem. - */ -export type FsCopyParams = { - /** - * Absolute source path. - */ - sourcePath: AbsolutePathBuf; - /** - * Absolute destination path. - */ - destinationPath: AbsolutePathBuf; - /** - * Required for directory copies; ignored for file copies. - */ - recursive?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyResponse.ts deleted file mode 100644 index 3e3061a8ab5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCopyResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Successful response for `fs/copy`. - */ -export type FsCopyResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryParams.ts deleted file mode 100644 index f606ca5fe72..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Create a directory on the host filesystem. - */ -export type FsCreateDirectoryParams = { - /** - * Absolute directory path to create. - */ - path: AbsolutePathBuf; - /** - * Whether parent directories should also be created. Defaults to `true`. - */ - recursive?: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryResponse.ts deleted file mode 100644 index 5d251b71564..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsCreateDirectoryResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Successful response for `fs/createDirectory`. - */ -export type FsCreateDirectoryResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataParams.ts deleted file mode 100644 index e4d68d01b24..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Request metadata for an absolute path. - */ -export type FsGetMetadataParams = { - /** - * Absolute path to inspect. - */ - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataResponse.ts deleted file mode 100644 index 14352b90800..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsGetMetadataResponse.ts +++ /dev/null @@ -1,29 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Metadata returned by `fs/getMetadata`. - */ -export type FsGetMetadataResponse = { - /** - * Whether the path resolves to a directory. - */ - isDirectory: boolean; - /** - * Whether the path resolves to a regular file. - */ - isFile: boolean; - /** - * Whether the path itself is a symbolic link. - */ - isSymlink: boolean; - /** - * File creation time in Unix milliseconds when available, otherwise `0`. - */ - createdAtMs: number; - /** - * File modification time in Unix milliseconds when available, otherwise `0`. - */ - modifiedAtMs: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryEntry.ts deleted file mode 100644 index 0d44a75384f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryEntry.ts +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * A directory entry returned by `fs/readDirectory`. - */ -export type FsReadDirectoryEntry = { - /** - * Direct child entry name only, not an absolute or relative path. - */ - fileName: string; - /** - * Whether this entry resolves to a directory. - */ - isDirectory: boolean; - /** - * Whether this entry resolves to a regular file. - */ - isFile: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryParams.ts deleted file mode 100644 index d025a33d754..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * List direct child names for a directory. - */ -export type FsReadDirectoryParams = { - /** - * Absolute directory path to read. - */ - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryResponse.ts deleted file mode 100644 index 3a235bbf35f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadDirectoryResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FsReadDirectoryEntry } from "./FsReadDirectoryEntry.js"; - -/** - * Directory entries returned by `fs/readDirectory`. - */ -export type FsReadDirectoryResponse = { - /** - * Direct child entries in the requested directory. - */ - entries: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileParams.ts deleted file mode 100644 index 179c3a46567..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Read a file from the host filesystem. - */ -export type FsReadFileParams = { - /** - * Absolute path to read. - */ - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileResponse.ts deleted file mode 100644 index 15906af2bdd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsReadFileResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Base64-encoded file contents returned by `fs/readFile`. - */ -export type FsReadFileResponse = { - /** - * File contents encoded as base64. - */ - dataBase64: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveParams.ts deleted file mode 100644 index 779a9ef7eea..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveParams.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Remove a file or directory tree from the host filesystem. - */ -export type FsRemoveParams = { - /** - * Absolute path to remove. - */ - path: AbsolutePathBuf; - /** - * Whether directory removal should recurse. Defaults to `true`. - */ - recursive?: boolean | null; - /** - * Whether missing paths should be ignored. Defaults to `true`. - */ - force?: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveResponse.ts deleted file mode 100644 index 981c28fa1e4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsRemoveResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Successful response for `fs/remove`. - */ -export type FsRemoveResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchParams.ts deleted file mode 100644 index d3f6198b9a8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Stop filesystem watch notifications for a prior `fs/watch`. - */ -export type FsUnwatchParams = { - /** - * Watch identifier previously provided to `fs/watch`. - */ - watchId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchResponse.ts deleted file mode 100644 index 02507d2c008..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsUnwatchResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Successful response for `fs/unwatch`. - */ -export type FsUnwatchResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchParams.ts deleted file mode 100644 index a665c4c5cbb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Start filesystem watch notifications for an absolute path. - */ -export type FsWatchParams = { - /** - * Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`. - */ - watchId: string; - /** - * Absolute file or directory path to watch. - */ - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchResponse.ts deleted file mode 100644 index 180484c7c24..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWatchResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Successful response for `fs/watch`. - */ -export type FsWatchResponse = { - /** - * Canonicalized path associated with the watch. - */ - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileParams.ts deleted file mode 100644 index 97322921683..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -/** - * Write a file on the host filesystem. - */ -export type FsWriteFileParams = { - /** - * Absolute path to write. - */ - path: AbsolutePathBuf; - /** - * File contents encoded as base64. - */ - dataBase64: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileResponse.ts deleted file mode 100644 index ad0ce283801..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FsWriteFileResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Successful response for `fs/writeFile`. - */ -export type FsWriteFileResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountParams.ts deleted file mode 100644 index c297c3e0d73..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GetAccountParams = { - /** - * When `true`, requests a proactive token refresh before returning. - * - * In managed auth mode this triggers the normal refresh-token flow. In - * external auth mode this flag is ignored. Clients should refresh tokens - * themselves and call `account/login/start` with `chatgptAuthTokens`. - */ - refreshToken: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountRateLimitsResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountRateLimitsResponse.ts deleted file mode 100644 index ffb594807db..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountRateLimitsResponse.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RateLimitSnapshot } from "./RateLimitSnapshot.js"; - -export type GetAccountRateLimitsResponse = { - /** - * Backward-compatible single-bucket view; mirrors the historical payload. - */ - rateLimits: RateLimitSnapshot; - /** - * Multi-bucket view keyed by metered `limit_id` (for example, `codex`). - */ - rateLimitsByLimitId: { [key in string]?: RateLimitSnapshot } | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountResponse.ts deleted file mode 100644 index 77f00e83aea..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GetAccountResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Account } from "./Account.js"; - -export type GetAccountResponse = { account: Account | null; requiresOpenaiAuth: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GitInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GitInfo.ts deleted file mode 100644 index ea62ce27226..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GitInfo.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GitInfo = { sha: string | null; branch: string | null; originUrl: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GrantedPermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GrantedPermissionProfile.ts deleted file mode 100644 index 70b804fa6fd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GrantedPermissionProfile.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPermissions.js"; -import type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermissions.js"; - -export type GrantedPermissionProfile = { - network?: AdditionalNetworkPermissions; - fileSystem?: AdditionalFileSystemPermissions; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReview.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReview.ts deleted file mode 100644 index 11bc2010f57..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReview.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { GuardianApprovalReviewStatus } from "./GuardianApprovalReviewStatus.js"; -import type { GuardianRiskLevel } from "./GuardianRiskLevel.js"; -import type { GuardianUserAuthorization } from "./GuardianUserAuthorization.js"; - -/** - * [UNSTABLE] Temporary approval auto-review payload used by - * `item/autoApprovalReview/*` notifications. This shape is expected to change - * soon. - */ -export type GuardianApprovalReview = { - status: GuardianApprovalReviewStatus; - riskLevel: GuardianRiskLevel | null; - userAuthorization: GuardianUserAuthorization | null; - rationale: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewAction.ts deleted file mode 100644 index 5f9ddfa7df4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewAction.ts +++ /dev/null @@ -1,34 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { GuardianCommandSource } from "./GuardianCommandSource.js"; -import type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol.js"; -import type { RequestPermissionProfile } from "./RequestPermissionProfile.js"; - -export type GuardianApprovalReviewAction = - | { type: "command"; source: GuardianCommandSource; command: string; cwd: AbsolutePathBuf } - | { - type: "execve"; - source: GuardianCommandSource; - program: string; - argv: Array; - cwd: AbsolutePathBuf; - } - | { type: "applyPatch"; cwd: AbsolutePathBuf; files: Array } - | { - type: "networkAccess"; - target: string; - host: string; - protocol: NetworkApprovalProtocol; - port: number; - } - | { - type: "mcpToolCall"; - server: string; - toolName: string; - connectorId: string | null; - connectorName: string | null; - toolTitle: string | null; - } - | { type: "requestPermissions"; reason: string | null; permissions: RequestPermissionProfile }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewStatus.ts deleted file mode 100644 index 7e84c40bffe..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianApprovalReviewStatus.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * [UNSTABLE] Lifecycle state for an approval auto-review. - */ -export type GuardianApprovalReviewStatus = - | "inProgress" - | "approved" - | "denied" - | "timedOut" - | "aborted"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianCommandSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianCommandSource.ts deleted file mode 100644 index b48e9b08261..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianCommandSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GuardianCommandSource = "shell" | "unifiedExec"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianRiskLevel.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianRiskLevel.ts deleted file mode 100644 index 7734016aa87..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianRiskLevel.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * [UNSTABLE] Risk level assigned by approval auto-review. - */ -export type GuardianRiskLevel = "low" | "medium" | "high" | "critical"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianUserAuthorization.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianUserAuthorization.ts deleted file mode 100644 index 936611f7849..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianUserAuthorization.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * [UNSTABLE] Authorization level assigned by approval auto-review. - */ -export type GuardianUserAuthorization = "unknown" | "low" | "medium" | "high"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianWarningNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianWarningNotification.ts deleted file mode 100644 index 763a0f6ef8a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/GuardianWarningNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GuardianWarningNotification = { - /** - * Thread target for the guardian warning. - */ - threadId: string; - /** - * Concise guardian warning message for the user. - */ - message: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookCompletedNotification.ts deleted file mode 100644 index 0a9ed32f4bf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookCompletedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { HookRunSummary } from "./HookRunSummary.js"; - -export type HookCompletedNotification = { - threadId: string; - turnId: string | null; - run: HookRunSummary; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts deleted file mode 100644 index 9d6607387f1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookErrorInfo = { path: string; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookEventName.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookEventName.ts deleted file mode 100644 index 6557e2247d9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookEventName.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookEventName = - | "preToolUse" - | "permissionRequest" - | "postToolUse" - | "sessionStart" - | "userPromptSubmit" - | "stop"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookExecutionMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookExecutionMode.ts deleted file mode 100644 index 61f98564cad..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookExecutionMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookExecutionMode = "sync" | "async"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookHandlerType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookHandlerType.ts deleted file mode 100644 index dc3f087bff9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookHandlerType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookHandlerType = "command" | "prompt" | "agent"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts deleted file mode 100644 index a57110fbb73..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { HookEventName } from "./HookEventName.js"; -import type { HookHandlerType } from "./HookHandlerType.js"; -import type { HookSource } from "./HookSource.js"; - -export type HookMetadata = { - key: string; - eventName: HookEventName; - handlerType: HookHandlerType; - matcher: string | null; - command: string | null; - timeoutSec: bigint; - statusMessage: string | null; - sourcePath: AbsolutePathBuf; - source: HookSource; - pluginId: string | null; - displayOrder: bigint; - enabled: boolean; - isManaged: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts deleted file mode 100644 index 4f4b3f34443..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntry.ts deleted file mode 100644 index 026a1b6579d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntry.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { HookOutputEntryKind } from "./HookOutputEntryKind.js"; - -export type HookOutputEntry = { kind: HookOutputEntryKind; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntryKind.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntryKind.ts deleted file mode 100644 index 090dfe38740..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookOutputEntryKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookOutputEntryKind = "warning" | "stop" | "feedback" | "context" | "error"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookPromptFragment.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookPromptFragment.ts deleted file mode 100644 index 74f24559ae3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookPromptFragment.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookPromptFragment = { text: string; hookRunId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunStatus.ts deleted file mode 100644 index ffca7e0e2c9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookRunStatus = "running" | "completed" | "failed" | "blocked" | "stopped"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunSummary.ts deleted file mode 100644 index 2198e4f6094..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookRunSummary.ts +++ /dev/null @@ -1,28 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { HookEventName } from "./HookEventName.js"; -import type { HookExecutionMode } from "./HookExecutionMode.js"; -import type { HookHandlerType } from "./HookHandlerType.js"; -import type { HookOutputEntry } from "./HookOutputEntry.js"; -import type { HookRunStatus } from "./HookRunStatus.js"; -import type { HookScope } from "./HookScope.js"; -import type { HookSource } from "./HookSource.js"; - -export type HookRunSummary = { - id: string; - eventName: HookEventName; - handlerType: HookHandlerType; - executionMode: HookExecutionMode; - scope: HookScope; - sourcePath: AbsolutePathBuf; - source: HookSource; - displayOrder: bigint; - status: HookRunStatus; - statusMessage: string | null; - startedAt: bigint; - completedAt: bigint | null; - durationMs: bigint | null; - entries: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookScope.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookScope.ts deleted file mode 100644 index ff6f8bfee44..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookScope.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookScope = "thread" | "turn"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts deleted file mode 100644 index c33572010d6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HookSource = - | "system" - | "user" - | "project" - | "mdm" - | "sessionFlags" - | "plugin" - | "cloudRequirements" - | "legacyManagedConfigFile" - | "legacyManagedConfigMdm" - | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookStartedNotification.ts deleted file mode 100644 index 445fa4b4251..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookStartedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { HookRunSummary } from "./HookRunSummary.js"; - -export type HookStartedNotification = { - threadId: string; - turnId: string | null; - run: HookRunSummary; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts deleted file mode 100644 index 7fe1fc27e97..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { HookErrorInfo } from "./HookErrorInfo.js"; -import type { HookMetadata } from "./HookMetadata.js"; - -export type HooksListEntry = { - cwd: string; - hooks: Array; - warnings: Array; - errors: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts deleted file mode 100644 index 3f85dcb5a2c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type HooksListParams = { - /** - * When empty, defaults to the current session working directory. - */ - cwds?: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts deleted file mode 100644 index 8371d011394..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { HooksListEntry } from "./HooksListEntry.js"; - -export type HooksListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts deleted file mode 100644 index 91fbc4cdac7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadItem } from "./ThreadItem.js"; - -export type ItemCompletedNotification = { - item: ThreadItem; - threadId: string; - turnId: string; - /** - * Unix timestamp (in milliseconds) when this item lifecycle completed. - */ - completedAtMs: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts deleted file mode 100644 index 282594172db..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts +++ /dev/null @@ -1,36 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AutoReviewDecisionSource } from "./AutoReviewDecisionSource.js"; -import type { GuardianApprovalReview } from "./GuardianApprovalReview.js"; -import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewAction.js"; - -/** - * [UNSTABLE] Temporary notification payload for approval auto-review. This - * shape is expected to change soon. - */ -export type ItemGuardianApprovalReviewCompletedNotification = { - threadId: string; - turnId: string; - /** - * Stable identifier for this review. - */ - reviewId: string; - /** - * Identifier for the reviewed item or tool call when one exists. - * - * In most cases, one review maps to one target item. The exceptions are - * - execve reviews, where a single command may contain multiple execve - * calls to review (only possible when using the shell_zsh_fork feature) - * - network policy reviews, where there is no target item - * - * A network call is triggered by a CommandExecution item, so having a - * target_item_id set to the CommandExecution item would be misleading - * because the review is about the network call, not the command execution. - * Therefore, target_item_id is set to None for network policy reviews. - */ - targetItemId: string | null; - decisionSource: AutoReviewDecisionSource; - review: GuardianApprovalReview; - action: GuardianApprovalReviewAction; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts deleted file mode 100644 index 306084647ff..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts +++ /dev/null @@ -1,34 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { GuardianApprovalReview } from "./GuardianApprovalReview.js"; -import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewAction.js"; - -/** - * [UNSTABLE] Temporary notification payload for approval auto-review. This - * shape is expected to change soon. - */ -export type ItemGuardianApprovalReviewStartedNotification = { - threadId: string; - turnId: string; - /** - * Stable identifier for this review. - */ - reviewId: string; - /** - * Identifier for the reviewed item or tool call when one exists. - * - * In most cases, one review maps to one target item. The exceptions are - * - execve reviews, where a single command may contain multiple execve - * calls to review (only possible when using the shell_zsh_fork feature) - * - network policy reviews, where there is no target item - * - * A network call is triggered by a CommandExecution item, so having a - * target_item_id set to the CommandExecution item would be misleading - * because the review is about the network call, not the command execution. - * Therefore, target_item_id is set to None for network policy reviews. - */ - targetItemId: string | null; - review: GuardianApprovalReview; - action: GuardianApprovalReviewAction; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts deleted file mode 100644 index a13ab1998c0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadItem } from "./ThreadItem.js"; - -export type ItemStartedNotification = { - item: ThreadItem; - threadId: string; - turnId: string; - /** - * Unix timestamp (in milliseconds) when this item lifecycle started. - */ - startedAtMs: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusParams.ts deleted file mode 100644 index d230518a335..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusParams.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpServerStatusDetail } from "./McpServerStatusDetail.js"; - -export type ListMcpServerStatusParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to a server-defined value. - */ - limit?: number | null; - /** - * Controls how much MCP inventory data to fetch for each server. - * Defaults to `Full` when omitted. - */ - detail?: McpServerStatusDetail | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusResponse.ts deleted file mode 100644 index e5ece3822b3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ListMcpServerStatusResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpServerStatus } from "./McpServerStatus.js"; - -export type ListMcpServerStatusResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * If None, there are no more items to return. - */ - nextCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts deleted file mode 100644 index daab1239b7b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type LoginAccountParams = - | { type: "apiKey"; apiKey: string } - | { type: "chatgpt"; codexStreamlinedLogin?: boolean } - | { type: "chatgptDeviceCode" } - | { - type: "chatgptAuthTokens"; - /** - * Access token (JWT) supplied by the client. - * This token is used for backend API requests and email extraction. - */ - accessToken: string; - /** - * Workspace/account identifier supplied by the client. - */ - chatgptAccountId: string; - /** - * Optional plan type supplied by the client. - * - * When `null`, Codex attempts to derive the plan type from access-token - * claims. If unavailable, the plan defaults to `unknown`. - */ - chatgptPlanType?: string | null; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountResponse.ts deleted file mode 100644 index b961e2c14c3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountResponse.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type LoginAccountResponse = - | { type: "apiKey" } - | { - type: "chatgpt"; - loginId: string; - /** - * URL the client should open in a browser to initiate the OAuth flow. - */ - authUrl: string; - } - | { - type: "chatgptDeviceCode"; - loginId: string; - /** - * URL the client should open in a browser to complete device code authorization. - */ - verificationUrl: string; - /** - * One-time code the user must enter after signing in. - */ - userCode: string; - } - | { type: "chatgptAuthTokens" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LogoutAccountResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/LogoutAccountResponse.ts deleted file mode 100644 index ec85cf0ff77..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LogoutAccountResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type LogoutAccountResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ManagedHooksRequirements.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ManagedHooksRequirements.ts deleted file mode 100644 index 59d3d7c2e41..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ManagedHooksRequirements.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ConfiguredHookMatcherGroup } from "./ConfiguredHookMatcherGroup.js"; - -export type ManagedHooksRequirements = { - managedDir: string | null; - windowsManagedDir: string | null; - PreToolUse: Array; - PermissionRequest: Array; - PostToolUse: Array; - SessionStart: Array; - UserPromptSubmit: Array; - Stop: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddParams.ts deleted file mode 100644 index 40f5378dee5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MarketplaceAddParams = { - source: string; - refName?: string | null; - sparsePaths?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddResponse.ts deleted file mode 100644 index f04abf50ed3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceAddResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type MarketplaceAddResponse = { - marketplaceName: string; - installedRoot: AbsolutePathBuf; - alreadyAdded: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceInterface.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceInterface.ts deleted file mode 100644 index 71f55ebcef0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceInterface.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MarketplaceInterface = { displayName: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceLoadErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceLoadErrorInfo.ts deleted file mode 100644 index 5e755b46102..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceLoadErrorInfo.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type MarketplaceLoadErrorInfo = { marketplacePath: AbsolutePathBuf; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveParams.ts deleted file mode 100644 index 88e6f3fe50c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MarketplaceRemoveParams = { marketplaceName: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveResponse.ts deleted file mode 100644 index b5fe4787a08..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceRemoveResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type MarketplaceRemoveResponse = { - marketplaceName: string; - installedRoot: AbsolutePathBuf | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeErrorInfo.ts deleted file mode 100644 index 6f3dfc67eb0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeErrorInfo.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MarketplaceUpgradeErrorInfo = { marketplaceName: string; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeParams.ts deleted file mode 100644 index 2061385580e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MarketplaceUpgradeParams = { marketplaceName?: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeResponse.ts deleted file mode 100644 index 9c94c9bdcaa..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MarketplaceUpgradeResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { MarketplaceUpgradeErrorInfo } from "./MarketplaceUpgradeErrorInfo.js"; - -export type MarketplaceUpgradeResponse = { - selectedMarketplaces: Array; - upgradedRoots: Array; - errors: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpAuthStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpAuthStatus.ts deleted file mode 100644 index 6903a123210..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpAuthStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpAuthStatus = "unsupported" | "notLoggedIn" | "bearerToken" | "oAuth"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationArrayType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationArrayType.ts deleted file mode 100644 index 066b44ea595..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationArrayType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationArrayType = "array"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanSchema.ts deleted file mode 100644 index eda80ed2415..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanSchema.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationBooleanType } from "./McpElicitationBooleanType.js"; - -export type McpElicitationBooleanSchema = { - type: McpElicitationBooleanType; - title?: string; - description?: string; - default?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanType.ts deleted file mode 100644 index f2b9ed48df4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationBooleanType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationBooleanType = "boolean"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationConstOption.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationConstOption.ts deleted file mode 100644 index eed92e21ac1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationConstOption.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationConstOption = { const: string; title: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationEnumSchema.ts deleted file mode 100644 index d34200ef9e3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationEnumSchema.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationLegacyTitledEnumSchema } from "./McpElicitationLegacyTitledEnumSchema.js"; -import type { McpElicitationMultiSelectEnumSchema } from "./McpElicitationMultiSelectEnumSchema.js"; -import type { McpElicitationSingleSelectEnumSchema } from "./McpElicitationSingleSelectEnumSchema.js"; - -export type McpElicitationEnumSchema = - | McpElicitationSingleSelectEnumSchema - | McpElicitationMultiSelectEnumSchema - | McpElicitationLegacyTitledEnumSchema; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationLegacyTitledEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationLegacyTitledEnumSchema.ts deleted file mode 100644 index c00359f4b5e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationLegacyTitledEnumSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationStringType } from "./McpElicitationStringType.js"; - -export type McpElicitationLegacyTitledEnumSchema = { - type: McpElicitationStringType; - title?: string; - description?: string; - enum: Array; - enumNames?: Array; - default?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationMultiSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationMultiSelectEnumSchema.ts deleted file mode 100644 index 662639ac508..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationMultiSelectEnumSchema.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationTitledMultiSelectEnumSchema } from "./McpElicitationTitledMultiSelectEnumSchema.js"; -import type { McpElicitationUntitledMultiSelectEnumSchema } from "./McpElicitationUntitledMultiSelectEnumSchema.js"; - -export type McpElicitationMultiSelectEnumSchema = - | McpElicitationUntitledMultiSelectEnumSchema - | McpElicitationTitledMultiSelectEnumSchema; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberSchema.ts deleted file mode 100644 index c579eb68558..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationNumberType } from "./McpElicitationNumberType.js"; - -export type McpElicitationNumberSchema = { - type: McpElicitationNumberType; - title?: string; - description?: string; - minimum?: number; - maximum?: number; - default?: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberType.ts deleted file mode 100644 index 96a9ded7607..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationNumberType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationNumberType = "number" | "integer"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationObjectType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationObjectType.ts deleted file mode 100644 index 2449a0c1ed2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationObjectType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationObjectType = "object"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationPrimitiveSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationPrimitiveSchema.ts deleted file mode 100644 index dacf6cf21d6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationPrimitiveSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationBooleanSchema } from "./McpElicitationBooleanSchema.js"; -import type { McpElicitationEnumSchema } from "./McpElicitationEnumSchema.js"; -import type { McpElicitationNumberSchema } from "./McpElicitationNumberSchema.js"; -import type { McpElicitationStringSchema } from "./McpElicitationStringSchema.js"; - -export type McpElicitationPrimitiveSchema = - | McpElicitationEnumSchema - | McpElicitationStringSchema - | McpElicitationNumberSchema - | McpElicitationBooleanSchema; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSchema.ts deleted file mode 100644 index 1c377f886fb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSchema.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationObjectType } from "./McpElicitationObjectType.js"; -import type { McpElicitationPrimitiveSchema } from "./McpElicitationPrimitiveSchema.js"; - -/** - * Typed form schema for MCP `elicitation/create` requests. - * - * This matches the `requestedSchema` shape from the MCP 2025-11-25 - * `ElicitRequestFormParams` schema. - */ -export type McpElicitationSchema = { - $schema?: string; - type: McpElicitationObjectType; - properties: { [key in string]?: McpElicitationPrimitiveSchema }; - required?: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSingleSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSingleSelectEnumSchema.ts deleted file mode 100644 index e9a3c8d67c7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationSingleSelectEnumSchema.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationTitledSingleSelectEnumSchema } from "./McpElicitationTitledSingleSelectEnumSchema.js"; -import type { McpElicitationUntitledSingleSelectEnumSchema } from "./McpElicitationUntitledSingleSelectEnumSchema.js"; - -export type McpElicitationSingleSelectEnumSchema = - | McpElicitationUntitledSingleSelectEnumSchema - | McpElicitationTitledSingleSelectEnumSchema; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringFormat.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringFormat.ts deleted file mode 100644 index 9891d4c7ca7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringFormat.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationStringFormat = "email" | "uri" | "date" | "date-time"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringSchema.ts deleted file mode 100644 index f4d863d6f9b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringSchema.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationStringFormat } from "./McpElicitationStringFormat.js"; -import type { McpElicitationStringType } from "./McpElicitationStringType.js"; - -export type McpElicitationStringSchema = { - type: McpElicitationStringType; - title?: string; - description?: string; - minLength?: number; - maxLength?: number; - format?: McpElicitationStringFormat; - default?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringType.ts deleted file mode 100644 index bf2ddfab91c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationStringType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpElicitationStringType = "string"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledEnumItems.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledEnumItems.ts deleted file mode 100644 index f1f3b63ec5c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledEnumItems.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationConstOption } from "./McpElicitationConstOption.js"; - -export type McpElicitationTitledEnumItems = { anyOf: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledMultiSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledMultiSelectEnumSchema.ts deleted file mode 100644 index 4a6aeb7afff..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledMultiSelectEnumSchema.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationArrayType } from "./McpElicitationArrayType.js"; -import type { McpElicitationTitledEnumItems } from "./McpElicitationTitledEnumItems.js"; - -export type McpElicitationTitledMultiSelectEnumSchema = { - type: McpElicitationArrayType; - title?: string; - description?: string; - minItems?: bigint; - maxItems?: bigint; - items: McpElicitationTitledEnumItems; - default?: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledSingleSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledSingleSelectEnumSchema.ts deleted file mode 100644 index 2cc558616cd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationTitledSingleSelectEnumSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationConstOption } from "./McpElicitationConstOption.js"; -import type { McpElicitationStringType } from "./McpElicitationStringType.js"; - -export type McpElicitationTitledSingleSelectEnumSchema = { - type: McpElicitationStringType; - title?: string; - description?: string; - oneOf: Array; - default?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledEnumItems.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledEnumItems.ts deleted file mode 100644 index 8419e36a4c9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledEnumItems.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationStringType } from "./McpElicitationStringType.js"; - -export type McpElicitationUntitledEnumItems = { - type: McpElicitationStringType; - enum: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledMultiSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledMultiSelectEnumSchema.ts deleted file mode 100644 index 5bfbbbd0a48..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledMultiSelectEnumSchema.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationArrayType } from "./McpElicitationArrayType.js"; -import type { McpElicitationUntitledEnumItems } from "./McpElicitationUntitledEnumItems.js"; - -export type McpElicitationUntitledMultiSelectEnumSchema = { - type: McpElicitationArrayType; - title?: string; - description?: string; - minItems?: bigint; - maxItems?: bigint; - items: McpElicitationUntitledEnumItems; - default?: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledSingleSelectEnumSchema.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledSingleSelectEnumSchema.ts deleted file mode 100644 index 701c5d22e44..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpElicitationUntitledSingleSelectEnumSchema.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpElicitationStringType } from "./McpElicitationStringType.js"; - -export type McpElicitationUntitledSingleSelectEnumSchema = { - type: McpElicitationStringType; - title?: string; - description?: string; - enum: Array; - default?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadParams.ts deleted file mode 100644 index 1aa57b4471c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpResourceReadParams = { threadId?: string | null; server: string; uri: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadResponse.ts deleted file mode 100644 index 337929783ae..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpResourceReadResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ResourceContent } from "../ResourceContent.js"; - -export type McpResourceReadResponse = { contents: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationAction.ts deleted file mode 100644 index 7be134c0150..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerElicitationAction = "accept" | "decline" | "cancel"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestParams.ts deleted file mode 100644 index c0a3c915efd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestParams.ts +++ /dev/null @@ -1,27 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { McpElicitationSchema } from "./McpElicitationSchema.js"; - -export type McpServerElicitationRequestParams = { - threadId: string; - /** - * Active Codex turn when this elicitation was observed, if app-server could correlate one. - * - * This is nullable because MCP models elicitation as a standalone server-to-client request - * identified by the MCP server request id. It may be triggered during a turn, but turn - * context is app-server correlation rather than part of the protocol identity of the - * elicitation itself. - */ - turnId: string | null; - serverName: string; -} & ( - | { - mode: "form"; - _meta: JsonValue | null; - message: string; - requestedSchema: McpElicitationSchema; - } - | { mode: "url"; _meta: JsonValue | null; message: string; url: string; elicitationId: string } -); diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestResponse.ts deleted file mode 100644 index d70c55de7f9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerElicitationRequestResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { McpServerElicitationAction } from "./McpServerElicitationAction.js"; - -export type McpServerElicitationRequestResponse = { - action: McpServerElicitationAction; - /** - * Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`. - * - * This is nullable because decline/cancel responses have no content. - */ - content: JsonValue | null; - /** - * Optional client metadata for form-mode action handling. - */ - _meta: JsonValue | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts deleted file mode 100644 index fe7f2009478..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginCompletedNotification.ts deleted file mode 100644 index 6303a53c92f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginCompletedNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerOauthLoginCompletedNotification = { - name: string; - success: boolean; - error?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginParams.ts deleted file mode 100644 index 4d0982c4730..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerOauthLoginParams = { - name: string; - scopes?: Array | null; - timeoutSecs?: bigint | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginResponse.ts deleted file mode 100644 index b119e07650c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerOauthLoginResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerOauthLoginResponse = { authorizationUrl: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerRefreshResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerRefreshResponse.ts deleted file mode 100644 index 48a25d2fec0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerRefreshResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerRefreshResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStartupState.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStartupState.ts deleted file mode 100644 index c62babca66a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStartupState.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerStartupState = "starting" | "ready" | "failed" | "cancelled"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatus.ts deleted file mode 100644 index 61fa8693130..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatus.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Resource } from "../Resource.js"; -import type { ResourceTemplate } from "../ResourceTemplate.js"; -import type { Tool } from "../Tool.js"; -import type { McpAuthStatus } from "./McpAuthStatus.js"; - -export type McpServerStatus = { - name: string; - tools: { [key in string]?: Tool }; - resources: Array; - resourceTemplates: Array; - authStatus: McpAuthStatus; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusDetail.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusDetail.ts deleted file mode 100644 index ab97cc2f31d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusDetail.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpServerStatusDetail = "full" | "toolsAndAuthOnly"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusUpdatedNotification.ts deleted file mode 100644 index 3b6c168b119..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerStatusUpdatedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { McpServerStartupState } from "./McpServerStartupState.js"; - -export type McpServerStatusUpdatedNotification = { - name: string; - status: McpServerStartupState; - error: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallParams.ts deleted file mode 100644 index 6da04c52ac4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type McpServerToolCallParams = { - threadId: string; - server: string; - tool: string; - arguments?: JsonValue; - _meta?: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallResponse.ts deleted file mode 100644 index 0314ef363d9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerToolCallResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type McpServerToolCallResponse = { - content: Array; - structuredContent?: JsonValue; - isError?: boolean; - _meta?: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallError.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallError.ts deleted file mode 100644 index f11054a8af9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallError.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpToolCallError = { message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallProgressNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallProgressNotification.ts deleted file mode 100644 index 3f3137e100f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallProgressNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpToolCallProgressNotification = { - threadId: string; - turnId: string; - itemId: string; - message: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallResult.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallResult.ts deleted file mode 100644 index ac6804332e7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallResult.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type McpToolCallResult = { - content: Array; - structuredContent: JsonValue | null; - _meta: JsonValue | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallStatus.ts deleted file mode 100644 index f46bca07e84..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpToolCallStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type McpToolCallStatus = "inProgress" | "completed" | "failed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitation.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitation.ts deleted file mode 100644 index 677d2791cb4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitation.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { MemoryCitationEntry } from "./MemoryCitationEntry.js"; - -export type MemoryCitation = { entries: Array; threadIds: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitationEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitationEntry.ts deleted file mode 100644 index eb74521c268..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryCitationEntry.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MemoryCitationEntry = { - path: string; - lineStart: number; - lineEnd: number; - note: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts deleted file mode 100644 index d9507945a06..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MemoryResetResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MergeStrategy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MergeStrategy.ts deleted file mode 100644 index 098677f2895..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MergeStrategy.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MergeStrategy = "replace" | "upsert"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts deleted file mode 100644 index 0f53c4d2a1d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommandMigration } from "./CommandMigration.js"; -import type { HookMigration } from "./HookMigration.js"; -import type { McpServerMigration } from "./McpServerMigration.js"; -import type { PluginsMigration } from "./PluginsMigration.js"; -import type { SessionMigration } from "./SessionMigration.js"; -import type { SubagentMigration } from "./SubagentMigration.js"; - -export type MigrationDetails = { - plugins: Array; - sessions: Array; - mcpServers: Array; - hooks: Array; - subagents: Array; - commands: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts deleted file mode 100644 index f48f7968476..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MockExperimentalMethodParams = { - /** - * Test-only payload field. - */ - value?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts deleted file mode 100644 index 02ad93098f6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type MockExperimentalMethodResponse = { - /** - * Echoes the input `value`. - */ - echoed: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Model.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Model.ts deleted file mode 100644 index 88f0803e009..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Model.ts +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { InputModality } from "../InputModality.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ModelAvailabilityNux } from "./ModelAvailabilityNux.js"; -import type { ModelUpgradeInfo } from "./ModelUpgradeInfo.js"; -import type { ReasoningEffortOption } from "./ReasoningEffortOption.js"; - -export type Model = { - id: string; - model: string; - upgrade: string | null; - upgradeInfo: ModelUpgradeInfo | null; - availabilityNux: ModelAvailabilityNux | null; - displayName: string; - description: string; - hidden: boolean; - supportedReasoningEfforts: Array; - defaultReasoningEffort: ReasoningEffort; - inputModalities: Array; - supportsPersonality: boolean; - additionalSpeedTiers: Array; - isDefault: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelAvailabilityNux.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelAvailabilityNux.ts deleted file mode 100644 index 8ea4b6ed1fd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelAvailabilityNux.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelAvailabilityNux = { message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListParams.ts deleted file mode 100644 index 568c8ae9790..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelListParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to a reasonable server-side value. - */ - limit?: number | null; - /** - * When true, include models that are hidden from the default picker list. - */ - includeHidden?: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListResponse.ts deleted file mode 100644 index 4de72f017e1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelListResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Model } from "./Model.js"; - -export type ModelListResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * If None, there are no more items to return. - */ - nextCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts deleted file mode 100644 index 00cbe470b3c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelProviderCapabilitiesReadParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts deleted file mode 100644 index f831613025c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelProviderCapabilitiesReadResponse = { - namespaceTools: boolean; - imageGeneration: boolean; - webSearch: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelRerouteReason.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelRerouteReason.ts deleted file mode 100644 index e780e7f95d7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelRerouteReason.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelRerouteReason = "highRiskCyberActivity"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelReroutedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelReroutedNotification.ts deleted file mode 100644 index 6d0e392660a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelReroutedNotification.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ModelRerouteReason } from "./ModelRerouteReason.js"; - -export type ModelReroutedNotification = { - threadId: string; - turnId: string; - fromModel: string; - toModel: string; - reason: ModelRerouteReason; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelUpgradeInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelUpgradeInfo.ts deleted file mode 100644 index 2976b6d201d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelUpgradeInfo.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelUpgradeInfo = { - model: string; - upgradeCopy: string | null; - modelLink: string | null; - migrationMarkdown: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerification.ts deleted file mode 100644 index 00538c090f0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ModelVerification = "trustedAccessForCyber"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerificationNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerificationNotification.ts deleted file mode 100644 index 24dcb7e7bcf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelVerificationNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ModelVerification } from "./ModelVerification.js"; - -export type ModelVerificationNotification = { - threadId: string; - turnId: string; - verifications: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkAccess.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkAccess.ts deleted file mode 100644 index 7b697b23149..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkAccess.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkAccess = "restricted" | "enabled"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalContext.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalContext.ts deleted file mode 100644 index 20c32d6f445..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalContext.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol.js"; - -export type NetworkApprovalContext = { host: string; protocol: NetworkApprovalProtocol }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalProtocol.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalProtocol.ts deleted file mode 100644 index 9dd4066fd13..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkApprovalProtocol.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkDomainPermission.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkDomainPermission.ts deleted file mode 100644 index 2ea44392de9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkDomainPermission.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkDomainPermission = "allow" | "deny"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyAmendment.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyAmendment.ts deleted file mode 100644 index 5455621ece7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyAmendment.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js"; - -export type NetworkPolicyAmendment = { host: string; action: NetworkPolicyRuleAction }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyRuleAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyRuleAction.ts deleted file mode 100644 index 55ec70032a6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkPolicyRuleAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkPolicyRuleAction = "allow" | "deny"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkRequirements.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkRequirements.ts deleted file mode 100644 index ab7475c9af3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkRequirements.ts +++ /dev/null @@ -1,40 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { NetworkDomainPermission } from "./NetworkDomainPermission.js"; -import type { NetworkUnixSocketPermission } from "./NetworkUnixSocketPermission.js"; - -export type NetworkRequirements = { - enabled: boolean | null; - httpPort: number | null; - socksPort: number | null; - allowUpstreamProxy: boolean | null; - dangerouslyAllowNonLoopbackProxy: boolean | null; - dangerouslyAllowAllUnixSockets: boolean | null; - /** - * Canonical network permission map for `experimental_network`. - */ - domains: { [key in string]?: NetworkDomainPermission } | null; - /** - * When true, only managed allowlist entries are respected while managed - * network enforcement is active. - */ - managedAllowedDomainsOnly: boolean | null; - /** - * Legacy compatibility view derived from `domains`. - */ - allowedDomains: Array | null; - /** - * Legacy compatibility view derived from `domains`. - */ - deniedDomains: Array | null; - /** - * Canonical unix socket permission map for `experimental_network`. - */ - unixSockets: { [key in string]?: NetworkUnixSocketPermission } | null; - /** - * Legacy compatibility view derived from `unix_sockets`. - */ - allowUnixSockets: Array | null; - allowLocalBinding: boolean | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkUnixSocketPermission.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkUnixSocketPermission.ts deleted file mode 100644 index 466c6e5f8f9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NetworkUnixSocketPermission.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NetworkUnixSocketPermission = "allow" | "none"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NonSteerableTurnKind.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/NonSteerableTurnKind.ts deleted file mode 100644 index 2624df2ba0d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/NonSteerableTurnKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type NonSteerableTurnKind = "review" | "compact"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/OverriddenMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/OverriddenMetadata.ts deleted file mode 100644 index bc6817aeed4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/OverriddenMetadata.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ConfigLayerMetadata } from "./ConfigLayerMetadata.js"; - -export type OverriddenMetadata = { - message: string; - overridingLayer: ConfigLayerMetadata; - effectiveValue: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchApplyStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchApplyStatus.ts deleted file mode 100644 index 620be789e49..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchApplyStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PatchApplyStatus = "inProgress" | "completed" | "failed" | "declined"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchChangeKind.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchChangeKind.ts deleted file mode 100644 index 41ef25c6a48..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PatchChangeKind.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PatchChangeKind = - | { type: "add" } - | { type: "delete" } - | { type: "update"; move_path: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionGrantScope.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionGrantScope.ts deleted file mode 100644 index 8ca127ebcb1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionGrantScope.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PermissionGrantScope = "turn" | "session"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts deleted file mode 100644 index 3a4ba02bd06..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PermissionProfileFileSystemPermissions } from "./PermissionProfileFileSystemPermissions.js"; -import type { PermissionProfileNetworkPermissions } from "./PermissionProfileNetworkPermissions.js"; - -export type PermissionProfile = - | { - type: "managed"; - network: PermissionProfileNetworkPermissions; - fileSystem: PermissionProfileFileSystemPermissions; - } - | { type: "disabled" } - | { type: "external"; network: PermissionProfileNetworkPermissions }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts deleted file mode 100644 index e528056b57e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileSystemSandboxEntry } from "./FileSystemSandboxEntry.js"; - -export type PermissionProfileFileSystemPermissions = - | { type: "restricted"; entries: Array; globScanMaxDepth?: number } - | { type: "unrestricted" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts deleted file mode 100644 index ad980413f7f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PermissionProfileModificationParams = { - type: "additionalWritableRoot"; - path: AbsolutePathBuf; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts deleted file mode 100644 index 12217e5374a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PermissionProfileNetworkPermissions = { enabled: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts deleted file mode 100644 index fe6bff93b47..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PermissionProfileModificationParams } from "./PermissionProfileModificationParams.js"; - -export type PermissionProfileSelectionParams = { - type: "profile"; - id: string; - modifications?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalParams.ts deleted file mode 100644 index 92d9d4b87c6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { RequestPermissionProfile } from "./RequestPermissionProfile.js"; - -export type PermissionsRequestApprovalParams = { - threadId: string; - turnId: string; - itemId: string; - cwd: AbsolutePathBuf; - reason: string | null; - permissions: RequestPermissionProfile; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalResponse.ts deleted file mode 100644 index 730f29c72e8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionsRequestApprovalResponse.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { GrantedPermissionProfile } from "./GrantedPermissionProfile.js"; -import type { PermissionGrantScope } from "./PermissionGrantScope.js"; - -export type PermissionsRequestApprovalResponse = { - permissions: GrantedPermissionProfile; - scope: PermissionGrantScope; - /** - * Review every subsequent command in this turn before normal sandboxed execution. - */ - strictAutoReview?: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PlanDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PlanDeltaNotification.ts deleted file mode 100644 index 262f65204cf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PlanDeltaNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should - * not assume concatenated deltas match the completed plan item content. - */ -export type PlanDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAuthPolicy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAuthPolicy.ts deleted file mode 100644 index 5b90e9c3136..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAuthPolicy.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts deleted file mode 100644 index bec0b88cc20..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginAvailability = "AVAILABLE" | "DISABLED_BY_ADMIN"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginDetail.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginDetail.ts deleted file mode 100644 index 6b7b1b3c5c5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginDetail.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { AppSummary } from "./AppSummary.js"; -import type { PluginSummary } from "./PluginSummary.js"; -import type { SkillSummary } from "./SkillSummary.js"; - -export type PluginDetail = { - marketplaceName: string; - marketplacePath: AbsolutePathBuf | null; - summary: PluginSummary; - description: string | null; - skills: Array; - apps: Array; - mcpServers: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallParams.ts deleted file mode 100644 index 12584472d1a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginInstallParams = { - marketplacePath?: AbsolutePathBuf | null; - remoteMarketplaceName?: string | null; - pluginName: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallPolicy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallPolicy.ts deleted file mode 100644 index d624f38ea3f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallPolicy.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallResponse.ts deleted file mode 100644 index 08bf1ebc20e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInstallResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AppSummary } from "./AppSummary.js"; -import type { PluginAuthPolicy } from "./PluginAuthPolicy.js"; - -export type PluginInstallResponse = { - authPolicy: PluginAuthPolicy; - appsNeedingAuth: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInterface.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInterface.ts deleted file mode 100644 index 97596ce765e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginInterface.ts +++ /dev/null @@ -1,46 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginInterface = { - displayName: string | null; - shortDescription: string | null; - longDescription: string | null; - developerName: string | null; - category: string | null; - capabilities: Array; - websiteUrl: string | null; - privacyPolicyUrl: string | null; - termsOfServiceUrl: string | null; - /** - * Starter prompts for the plugin. Capped at 3 entries with a maximum of - * 128 characters per entry. - */ - defaultPrompt: Array | null; - brandColor: string | null; - /** - * Local composer icon path, resolved from the installed plugin package. - */ - composerIcon: AbsolutePathBuf | null; - /** - * Remote composer icon URL from the plugin catalog. - */ - composerIconUrl: string | null; - /** - * Local logo path, resolved from the installed plugin package. - */ - logo: AbsolutePathBuf | null; - /** - * Remote logo URL from the plugin catalog. - */ - logoUrl: string | null; - /** - * Local screenshot paths, resolved from the installed plugin package. - */ - screenshots: Array; - /** - * Remote screenshot URLs from the plugin catalog. - */ - screenshotUrls: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListParams.ts deleted file mode 100644 index 51e5652e91e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginListParams = { - /** - * Optional working directories used to discover repo marketplaces. When omitted, - * only home-scoped marketplaces and the official curated marketplace are considered. - */ - cwds?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListResponse.ts deleted file mode 100644 index c14b1306a68..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginListResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { MarketplaceLoadErrorInfo } from "./MarketplaceLoadErrorInfo.js"; -import type { PluginMarketplaceEntry } from "./PluginMarketplaceEntry.js"; - -export type PluginListResponse = { - marketplaces: Array; - marketplaceLoadErrors: Array; - featuredPluginIds: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginMarketplaceEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginMarketplaceEntry.ts deleted file mode 100644 index a7dbbd78c8e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginMarketplaceEntry.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { MarketplaceInterface } from "./MarketplaceInterface.js"; -import type { PluginSummary } from "./PluginSummary.js"; - -export type PluginMarketplaceEntry = { - name: string; - /** - * Local marketplace file path when the marketplace is backed by a local file. - * Remote-only catalog marketplaces do not have a local path. - */ - path: AbsolutePathBuf | null; - interface: MarketplaceInterface | null; - plugins: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadParams.ts deleted file mode 100644 index 47125184bd6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginReadParams = { - marketplacePath?: AbsolutePathBuf | null; - remoteMarketplaceName?: string | null; - pluginName: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadResponse.ts deleted file mode 100644 index a23191fb80a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginReadResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PluginDetail } from "./PluginDetail.js"; - -export type PluginReadResponse = { plugin: PluginDetail }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts deleted file mode 100644 index 092ac6c126e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginShareDeleteParams = { remotePluginId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts deleted file mode 100644 index 23102683645..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginShareDeleteResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts deleted file mode 100644 index 3b5176c6da1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { PluginSummary } from "./PluginSummary.js"; - -export type PluginShareListItem = { - plugin: PluginSummary; - shareUrl: string; - localPluginPath: AbsolutePathBuf | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts deleted file mode 100644 index 167ace7ac2c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginShareListParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts deleted file mode 100644 index eca6c2bbf7c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PluginShareListItem } from "./PluginShareListItem.js"; - -export type PluginShareListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts deleted file mode 100644 index 1720cddfbf8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginShareSaveParams = { pluginPath: AbsolutePathBuf; remotePluginId?: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts deleted file mode 100644 index 27abc82e06b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginShareSaveResponse = { remotePluginId: string; shareUrl: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts deleted file mode 100644 index 5145b2ceabc..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginSkillReadParams = { - remoteMarketplaceName: string; - remotePluginId: string; - skillName: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts deleted file mode 100644 index 98007bdb9ac..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginSkillReadResponse = { contents: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSource.ts deleted file mode 100644 index d3f864c5f31..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSource.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type PluginSource = - | { type: "local"; path: AbsolutePathBuf } - | { type: "git"; url: string; path: string | null; refName: string | null; sha: string | null } - | { type: "remote" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts deleted file mode 100644 index 9d724b10ae7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts +++ /dev/null @@ -1,23 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PluginAuthPolicy } from "./PluginAuthPolicy.js"; -import type { PluginAvailability } from "./PluginAvailability.js"; -import type { PluginInstallPolicy } from "./PluginInstallPolicy.js"; -import type { PluginInterface } from "./PluginInterface.js"; -import type { PluginSource } from "./PluginSource.js"; - -export type PluginSummary = { - id: string; - name: string; - source: PluginSource; - installed: boolean; - enabled: boolean; - installPolicy: PluginInstallPolicy; - authPolicy: PluginAuthPolicy; - /** - * Availability state for installing and using the plugin. - */ - availability: PluginAvailability; - interface: PluginInterface | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallParams.ts deleted file mode 100644 index 250ee7d3b90..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginUninstallParams = { pluginId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallResponse.ts deleted file mode 100644 index 5d02c2f7167..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginUninstallResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginUninstallResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginsMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginsMigration.ts deleted file mode 100644 index 3d882cf1929..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginsMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type PluginsMigration = { marketplaceName: string; pluginNames: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts deleted file mode 100644 index c9fbdf28c56..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts +++ /dev/null @@ -1,39 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ReasoningSummary } from "../ReasoningSummary.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { Verbosity } from "../Verbosity.js"; -import type { WebSearchMode } from "../WebSearchMode.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { ToolsV2 } from "./ToolsV2.js"; - -export type ProfileV2 = { - model: string | null; - model_provider: string | null; - approval_policy: AskForApproval | null; - /** - * [UNSTABLE] Optional profile-level override for where approval requests - * are routed for review. If omitted, the enclosing config default is - * used. - */ - approvals_reviewer: ApprovalsReviewer | null; - service_tier: ServiceTier | null; - model_reasoning_effort: ReasoningEffort | null; - model_reasoning_summary: ReasoningSummary | null; - model_verbosity: Verbosity | null; - web_search: WebSearchMode | null; - tools: ToolsV2 | null; - chatgpt_base_url: string | null; -} & { - [key in string]?: - | number - | string - | boolean - | Array - | { [key in string]?: JsonValue } - | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitReachedType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitReachedType.ts deleted file mode 100644 index 84bb0b50979..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitReachedType.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RateLimitReachedType = - | "rate_limit_reached" - | "workspace_owner_credits_depleted" - | "workspace_member_credits_depleted" - | "workspace_owner_usage_limit_reached" - | "workspace_member_usage_limit_reached"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitSnapshot.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitSnapshot.ts deleted file mode 100644 index a852413d239..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitSnapshot.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PlanType } from "../PlanType.js"; -import type { CreditsSnapshot } from "./CreditsSnapshot.js"; -import type { RateLimitReachedType } from "./RateLimitReachedType.js"; -import type { RateLimitWindow } from "./RateLimitWindow.js"; - -export type RateLimitSnapshot = { - limitId: string | null; - limitName: string | null; - primary: RateLimitWindow | null; - secondary: RateLimitWindow | null; - credits: CreditsSnapshot | null; - planType: PlanType | null; - rateLimitReachedType: RateLimitReachedType | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitWindow.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitWindow.ts deleted file mode 100644 index c0ad59583b5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RateLimitWindow.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RateLimitWindow = { - usedPercent: number; - windowDurationMins: number | null; - resetsAt: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RawResponseItemCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RawResponseItemCompletedNotification.ts deleted file mode 100644 index 531655936f6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RawResponseItemCompletedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ResponseItem } from "../ResponseItem.js"; - -export type RawResponseItemCompletedNotification = { - threadId: string; - turnId: string; - item: ResponseItem; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningEffortOption.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningEffortOption.ts deleted file mode 100644 index a9258c07079..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningEffortOption.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReasoningEffort } from "../ReasoningEffort.js"; - -export type ReasoningEffortOption = { reasoningEffort: ReasoningEffort; description: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryPartAddedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryPartAddedNotification.ts deleted file mode 100644 index 3ba8282e045..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryPartAddedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReasoningSummaryPartAddedNotification = { - threadId: string; - turnId: string; - itemId: string; - summaryIndex: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryTextDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryTextDeltaNotification.ts deleted file mode 100644 index 7ce59515b14..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningSummaryTextDeltaNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReasoningSummaryTextDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; - summaryIndex: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningTextDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningTextDeltaNotification.ts deleted file mode 100644 index 23e9bc4cc12..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReasoningTextDeltaNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReasoningTextDeltaNotification = { - threadId: string; - turnId: string; - itemId: string; - delta: string; - contentIndex: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientConnectionAudience.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientConnectionAudience.ts deleted file mode 100644 index e4d41ff4c23..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientConnectionAudience.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Audience for a remote-control client connection device-key proof. - */ -export type RemoteControlClientConnectionAudience = "remote_control_client_websocket"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientEnrollmentAudience.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientEnrollmentAudience.ts deleted file mode 100644 index b65fb3d11ba..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlClientEnrollmentAudience.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Audience for a remote-control client enrollment device-key proof. - */ -export type RemoteControlClientEnrollmentAudience = "remote_control_client_enrollment"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts deleted file mode 100644 index 3e6197f5b55..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type RemoteControlConnectionStatus = "disabled" | "connecting" | "connected" | "errored"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts deleted file mode 100644 index 923edb23434..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RemoteControlConnectionStatus } from "./RemoteControlConnectionStatus.js"; - -/** - * Current remote-control connection status and environment id exposed to clients. - */ -export type RemoteControlStatusChangedNotification = { - status: RemoteControlConnectionStatus; - environmentId: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RequestPermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RequestPermissionProfile.ts deleted file mode 100644 index 3a5c34b243e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RequestPermissionProfile.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPermissions.js"; -import type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermissions.js"; - -export type RequestPermissionProfile = { - network: AdditionalNetworkPermissions | null; - fileSystem: AdditionalFileSystemPermissions | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ResidencyRequirement.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ResidencyRequirement.ts deleted file mode 100644 index 1699c84e7cd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ResidencyRequirement.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ResidencyRequirement = "us"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewDelivery.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewDelivery.ts deleted file mode 100644 index 8fbccd1050a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewDelivery.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReviewDelivery = "inline" | "detached"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartParams.ts deleted file mode 100644 index b2af886bf18..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ReviewDelivery } from "./ReviewDelivery.js"; -import type { ReviewTarget } from "./ReviewTarget.js"; - -export type ReviewStartParams = { - threadId: string; - target: ReviewTarget; - /** - * Where to run the review: inline (default) on the current thread or - * detached on a new thread (returned in `reviewThreadId`). - */ - delivery?: ReviewDelivery | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartResponse.ts deleted file mode 100644 index ea0ebeb4de0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewStartResponse.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Turn } from "./Turn.js"; - -export type ReviewStartResponse = { - turn: Turn; - /** - * Identifies the thread where the review runs. - * - * For inline reviews, this is the original thread id. - * For detached reviews, this is the id of the new review thread. - */ - reviewThreadId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewTarget.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewTarget.ts deleted file mode 100644 index 640a5d8da8f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReviewTarget.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ReviewTarget = - | { type: "uncommittedChanges" } - | { type: "baseBranch"; branch: string } - | { - type: "commit"; - sha: string; - /** - * Optional human-readable label (e.g., commit subject) for UIs. - */ - title: string | null; - } - | { type: "custom"; instructions: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxMode.ts deleted file mode 100644 index b8cf4326b98..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SandboxMode = "read-only" | "workspace-write" | "danger-full-access"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts deleted file mode 100644 index 7afe44eb15a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { NetworkAccess } from "./NetworkAccess.js"; - -export type SandboxPolicy = - | { type: "dangerFullAccess" } - | { type: "readOnly"; networkAccess: boolean } - | { type: "externalSandbox"; networkAccess: NetworkAccess } - | { - type: "workspaceWrite"; - writableRoots: Array; - networkAccess: boolean; - excludeTmpdirEnvVar: boolean; - excludeSlashTmp: boolean; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxWorkspaceWrite.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxWorkspaceWrite.ts deleted file mode 100644 index c7e4cb6072f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxWorkspaceWrite.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SandboxWorkspaceWrite = { - writable_roots: Array; - network_access: boolean; - exclude_tmpdir_env_var: boolean; - exclude_slash_tmp: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailParams.ts deleted file mode 100644 index fa699d893e1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailParams.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AddCreditsNudgeCreditType } from "./AddCreditsNudgeCreditType.js"; - -export type SendAddCreditsNudgeEmailParams = { creditType: AddCreditsNudgeCreditType }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailResponse.ts deleted file mode 100644 index 2da8ace4c96..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SendAddCreditsNudgeEmailResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AddCreditsNudgeEmailStatus } from "./AddCreditsNudgeEmailStatus.js"; - -export type SendAddCreditsNudgeEmailResponse = { status: AddCreditsNudgeEmailStatus }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ServerRequestResolvedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ServerRequestResolvedNotification.ts deleted file mode 100644 index 80fdbfbf7f8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ServerRequestResolvedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RequestId } from "../RequestId.js"; - -export type ServerRequestResolvedNotification = { threadId: string; requestId: RequestId }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts deleted file mode 100644 index 79a08cb8143..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SessionMigration = { path: string; cwd: string; title: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionSource.ts deleted file mode 100644 index 37ed283f396..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionSource.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SubAgentSource } from "../SubAgentSource.js"; - -export type SessionSource = - | "cli" - | "vscode" - | "exec" - | "appServer" - | { custom: string } - | { subAgent: SubAgentSource } - | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillDependencies.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillDependencies.ts deleted file mode 100644 index 8d915861bf3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillDependencies.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SkillToolDependency } from "./SkillToolDependency.js"; - -export type SkillDependencies = { tools: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillErrorInfo.ts deleted file mode 100644 index 5d7edccd0f1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillErrorInfo.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SkillErrorInfo = { path: string; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillInterface.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillInterface.ts deleted file mode 100644 index 7db9e8eaea5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillInterface.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type SkillInterface = { - displayName?: string; - shortDescription?: string; - iconSmall?: AbsolutePathBuf; - iconLarge?: AbsolutePathBuf; - brandColor?: string; - defaultPrompt?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillMetadata.ts deleted file mode 100644 index 657b0a860c7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillMetadata.ts +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { SkillDependencies } from "./SkillDependencies.js"; -import type { SkillInterface } from "./SkillInterface.js"; -import type { SkillScope } from "./SkillScope.js"; - -export type SkillMetadata = { - name: string; - description: string; - /** - * Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description. - */ - shortDescription?: string; - interface?: SkillInterface; - dependencies?: SkillDependencies; - path: AbsolutePathBuf; - scope: SkillScope; - enabled: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillScope.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillScope.ts deleted file mode 100644 index 997006f5b83..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillScope.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SkillScope = "user" | "repo" | "system" | "admin"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillSummary.ts deleted file mode 100644 index c4bb4c57707..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillSummary.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { SkillInterface } from "./SkillInterface.js"; - -export type SkillSummary = { - name: string; - description: string; - shortDescription: string | null; - interface: SkillInterface | null; - path: AbsolutePathBuf | null; - enabled: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillToolDependency.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillToolDependency.ts deleted file mode 100644 index 36a30a113b4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillToolDependency.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SkillToolDependency = { - type: string; - value: string; - description?: string; - transport?: string; - command?: string; - url?: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsChangedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsChangedNotification.ts deleted file mode 100644 index 23ed93a5ece..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsChangedNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Notification emitted when watched local skill files change. - * - * Treat this as an invalidation signal and re-run `skills/list` with the - * client's current parameters when refreshed skill metadata is needed. - */ -export type SkillsChangedNotification = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteParams.ts deleted file mode 100644 index 542eeec1c39..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteParams.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type SkillsConfigWriteParams = { - /** - * Path-based selector. - */ - path?: AbsolutePathBuf | null; - /** - * Name-based selector. - */ - name?: string | null; - enabled: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteResponse.ts deleted file mode 100644 index ba5231919bc..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsConfigWriteResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SkillsConfigWriteResponse = { effectiveEnabled: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListEntry.ts deleted file mode 100644 index 4b1197a26e4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListEntry.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SkillErrorInfo } from "./SkillErrorInfo.js"; -import type { SkillMetadata } from "./SkillMetadata.js"; - -export type SkillsListEntry = { - cwd: string; - skills: Array; - errors: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListExtraRootsForCwd.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListExtraRootsForCwd.ts deleted file mode 100644 index 00f6e857242..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListExtraRootsForCwd.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SkillsListExtraRootsForCwd = { cwd: string; extraUserRoots: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListParams.ts deleted file mode 100644 index a1d82190e44..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListParams.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd.js"; - -export type SkillsListParams = { - /** - * When empty, defaults to the current session working directory. - */ - cwds?: Array; - /** - * When true, bypass the skills cache and re-scan skills from disk. - */ - forceReload?: boolean; - /** - * Optional per-cwd extra roots to scan as user-scoped skills. - */ - perCwdExtraUserRoots?: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListResponse.ts deleted file mode 100644 index 61e4493b778..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SkillsListResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SkillsListEntry } from "./SkillsListEntry.js"; - -export type SkillsListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SortDirection.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SortDirection.ts deleted file mode 100644 index d8597a46ea7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SortDirection.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SortDirection = "asc" | "desc"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts deleted file mode 100644 index b361f8be921..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type SubagentMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TerminalInteractionNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TerminalInteractionNotification.ts deleted file mode 100644 index 17f49787df3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TerminalInteractionNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TerminalInteractionNotification = { - threadId: string; - turnId: string; - itemId: string; - processId: string; - stdin: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextElement.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextElement.ts deleted file mode 100644 index 0a4abd273af..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextElement.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ByteRange } from "./ByteRange.js"; - -export type TextElement = { - /** - * Byte range in the parent `text` buffer that this element occupies. - */ - byteRange: ByteRange; - /** - * Optional human-readable placeholder for the element, displayed in the UI. - */ - placeholder: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextPosition.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextPosition.ts deleted file mode 100644 index fb6c6457c7e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextPosition.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TextPosition = { - /** - * 1-based line number. - */ - line: number; - /** - * 1-based column number (in Unicode scalar values). - */ - column: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextRange.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextRange.ts deleted file mode 100644 index 6e061b5efd0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TextRange.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TextPosition } from "./TextPosition.js"; - -export type TextRange = { start: TextPosition; end: TextPosition }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Thread.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Thread.ts deleted file mode 100644 index a6c5fca1626..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Thread.ts +++ /dev/null @@ -1,79 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { GitInfo } from "./GitInfo.js"; -import type { SessionSource } from "./SessionSource.js"; -import type { ThreadStatus } from "./ThreadStatus.js"; -import type { Turn } from "./Turn.js"; - -export type Thread = { - id: string; - /** - * Source thread id when this thread was created by forking another thread. - */ - forkedFromId: string | null; - /** - * Usually the first user message in the thread, if available. - */ - preview: string; - /** - * Whether the thread is ephemeral and should not be materialized on disk. - */ - ephemeral: boolean; - /** - * Model provider used for this thread (for example, 'openai'). - */ - modelProvider: string; - /** - * Unix timestamp (in seconds) when the thread was created. - */ - createdAt: number; - /** - * Unix timestamp (in seconds) when the thread was last updated. - */ - updatedAt: number; - /** - * Current runtime status for the thread. - */ - status: ThreadStatus; - /** - * [UNSTABLE] Path to the thread on disk. - */ - path: string | null; - /** - * Working directory captured for the thread. - */ - cwd: AbsolutePathBuf; - /** - * Version of the CLI that created the thread. - */ - cliVersion: string; - /** - * Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.). - */ - source: SessionSource; - /** - * Optional random unique nickname assigned to an AgentControl-spawned sub-agent. - */ - agentNickname: string | null; - /** - * Optional role (agent_role) assigned to an AgentControl-spawned sub-agent. - */ - agentRole: string | null; - /** - * Optional Git metadata captured when the thread was created. - */ - gitInfo: GitInfo | null; - /** - * Optional user-facing thread title. - */ - name: string | null; - /** - * Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` - * (when `includeTurns` is true) responses. - * For all other responses and notifications returning a Thread, - * the turns field will be an empty list. - */ - turns: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadActiveFlag.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadActiveFlag.ts deleted file mode 100644 index 73c875a00d8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadActiveFlag.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionParams.ts deleted file mode 100644 index 336709464a0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type ThreadApproveGuardianDeniedActionParams = { - threadId: string; - /** - * Serialized `codex_protocol::protocol::GuardianAssessmentEvent`. - */ - event: JsonValue; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionResponse.ts deleted file mode 100644 index 856bb28cfb1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadApproveGuardianDeniedActionResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadApproveGuardianDeniedActionResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveParams.ts deleted file mode 100644 index 81d1d47eaf8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadArchiveParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveResponse.ts deleted file mode 100644 index b5954268e3e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchiveResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadArchiveResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchivedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchivedNotification.ts deleted file mode 100644 index a2e81a708bd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadArchivedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadArchivedNotification = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts deleted file mode 100644 index 0b8f1811274..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadBackgroundTerminalsCleanParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts deleted file mode 100644 index f531fe0e24d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadBackgroundTerminalsCleanResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadClosedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadClosedNotification.ts deleted file mode 100644 index 9efd8c21899..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadClosedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadClosedNotification = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartParams.ts deleted file mode 100644 index bdb894f295a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadCompactStartParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartResponse.ts deleted file mode 100644 index 3794feb270e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadCompactStartResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadCompactStartResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts deleted file mode 100644 index 3dcdceb26c3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Parameters for `thread/decrement_elicitation`. - */ -export type ThreadDecrementElicitationParams = { - /** - * Thread whose out-of-band elicitation counter should be decremented. - */ - threadId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts deleted file mode 100644 index d0f20a25456..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Response for `thread/decrement_elicitation`. - */ -export type ThreadDecrementElicitationResponse = { - /** - * Current out-of-band elicitation count after the decrement. - */ - count: bigint; - /** - * Whether timeout accounting remains paused after applying the decrement. - */ - paused: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts deleted file mode 100644 index 928b244589c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts +++ /dev/null @@ -1,63 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -import type { JsonValue } from "../serde_json/JsonValue.js"; -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ServiceTier } from "../ServiceTier.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; -import type { SandboxMode } from "./SandboxMode.js"; - -/** - * There are two ways to fork a thread: - * 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. - * 2. By path: load the thread from disk by path and fork it into a new thread. - * - * If using path, the thread_id param will be ignored. - * - * Prefer using thread_id whenever possible. - */ -export type ThreadForkParams = { - threadId: string; - /** - * [UNSTABLE] Specify the rollout path to fork from. - * If specified, the thread_id param will be ignored. - */ - path?: string | null; - /** - * Configuration overrides for the forked thread, if any. - */ - model?: string | null; - modelProvider?: string | null; - serviceTier?: ServiceTier | null; - cwd?: string | null; - approvalPolicy?: AskForApproval | null; - /** - * Override where approval requests are routed for review on this thread - * and subsequent turns. - */ - approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null; - /** - * Named profile selection for the forked thread. Cannot be combined with - * `sandbox`. Use bounded `modifications` for supported thread - * adjustments instead of replacing the full permissions profile. - */ - permissions?: PermissionProfileSelectionParams | null; - config?: { [key in string]?: JsonValue } | null; - baseInstructions?: string | null; - developerInstructions?: string | null; - ephemeral?: boolean; - /** - * When true, return only thread metadata and live fork state without - * populating `thread.turns`. This is useful when the client plans to call - * `thread/turns/list` immediately after forking. - */ - excludeTurns?: boolean; - /** - * If true, persist additional EventMsg variants to the rollout file. - * However, `thread/read`, `thread/resume`, and `thread/fork` still only - * return the limited form of thread history for scalability reasons. - */ - persistExtendedHistory: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts deleted file mode 100644 index 742aad989dd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; -import type { SandboxPolicy } from "./SandboxPolicy.js"; -import type { Thread } from "./Thread.js"; - -export type ThreadForkResponse = { - thread: Thread; - model: string; - modelProvider: string; - serviceTier: ServiceTier | null; - cwd: AbsolutePathBuf; - /** - * Instruction source files currently loaded for this thread. - */ - instructionSources: Array; - approvalPolicy: AskForApproval; - /** - * Reviewer currently used for approval requests on this thread. - */ - approvalsReviewer: ApprovalsReviewer; - /** - * Legacy sandbox policy retained for compatibility. Experimental clients - * should prefer `permissionProfile` when they need exact runtime - * permissions. - */ - sandbox: SandboxPolicy; - /** - * Full active permissions for this thread. `activePermissionProfile` - * carries display/provenance metadata for this runtime profile. - */ - permissionProfile: PermissionProfile | null; - /** - * Named or implicit built-in profile that produced the active - * permissions, when known. - */ - activePermissionProfile: ActivePermissionProfile | null; - reasoningEffort: ReasoningEffort | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts deleted file mode 100644 index 12605c385c4..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadGoalStatus } from "./ThreadGoalStatus.js"; - -export type ThreadGoal = { - threadId: string; - objective: string; - status: ThreadGoalStatus; - tokenBudget: number | null; - tokensUsed: number; - timeUsedSeconds: number; - createdAt: number; - updatedAt: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts deleted file mode 100644 index f12b4b8c126..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadGoalClearParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts deleted file mode 100644 index 3d17dd9925f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadGoalClearResponse = { cleared: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts deleted file mode 100644 index ecb15e4e77d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadGoalClearedNotification = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts deleted file mode 100644 index 334444e1a65..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadGoalGetParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts deleted file mode 100644 index 98820d18b52..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadGoal } from "./ThreadGoal.js"; - -export type ThreadGoalGetResponse = { goal: ThreadGoal | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts deleted file mode 100644 index 834aded532b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadGoalStatus } from "./ThreadGoalStatus.js"; - -export type ThreadGoalSetParams = { - threadId: string; - objective?: string | null; - status?: ThreadGoalStatus | null; - tokenBudget?: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts deleted file mode 100644 index 9b369f4a88e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadGoal } from "./ThreadGoal.js"; - -export type ThreadGoalSetResponse = { goal: ThreadGoal }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts deleted file mode 100644 index 7a4bf332fb0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadGoalStatus = "active" | "paused" | "budgetLimited" | "complete"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts deleted file mode 100644 index 80276692ecb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadGoal } from "./ThreadGoal.js"; - -export type ThreadGoalUpdatedNotification = { - threadId: string; - turnId: string | null; - goal: ThreadGoal; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts deleted file mode 100644 index 12208cc34ac..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Parameters for `thread/increment_elicitation`. - */ -export type ThreadIncrementElicitationParams = { - /** - * Thread whose out-of-band elicitation counter should be incremented. - */ - threadId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts deleted file mode 100644 index eed5c35dcbb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Response for `thread/increment_elicitation`. - */ -export type ThreadIncrementElicitationResponse = { - /** - * Current out-of-band elicitation count after the increment. - */ - count: bigint; - /** - * Whether timeout accounting is paused after applying the increment. - */ - paused: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsParams.ts deleted file mode 100644 index 143c73e5ef5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -export type ThreadInjectItemsParams = { - threadId: string; - /** - * Raw Responses API items to append to the thread's model-visible history. - */ - items: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsResponse.ts deleted file mode 100644 index 60dcf0d0b3d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadInjectItemsResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadInjectItemsResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadItem.ts deleted file mode 100644 index 233162b0cee..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadItem.ts +++ /dev/null @@ -1,156 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { MessagePhase } from "../MessagePhase.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { CollabAgentState } from "./CollabAgentState.js"; -import type { CollabAgentTool } from "./CollabAgentTool.js"; -import type { CollabAgentToolCallStatus } from "./CollabAgentToolCallStatus.js"; -import type { CommandAction } from "./CommandAction.js"; -import type { CommandExecutionSource } from "./CommandExecutionSource.js"; -import type { CommandExecutionStatus } from "./CommandExecutionStatus.js"; -import type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem.js"; -import type { DynamicToolCallStatus } from "./DynamicToolCallStatus.js"; -import type { FileUpdateChange } from "./FileUpdateChange.js"; -import type { HookPromptFragment } from "./HookPromptFragment.js"; -import type { McpToolCallError } from "./McpToolCallError.js"; -import type { McpToolCallResult } from "./McpToolCallResult.js"; -import type { McpToolCallStatus } from "./McpToolCallStatus.js"; -import type { MemoryCitation } from "./MemoryCitation.js"; -import type { PatchApplyStatus } from "./PatchApplyStatus.js"; -import type { UserInput } from "./UserInput.js"; -import type { WebSearchAction } from "./WebSearchAction.js"; - -export type ThreadItem = - | { type: "userMessage"; id: string; content: Array } - | { type: "hookPrompt"; id: string; fragments: Array } - | { - type: "agentMessage"; - id: string; - text: string; - phase: MessagePhase | null; - memoryCitation: MemoryCitation | null; - } - | { type: "plan"; id: string; text: string } - | { type: "reasoning"; id: string; summary: Array; content: Array } - | { - type: "commandExecution"; - id: string; - /** - * The command to be executed. - */ - command: string; - /** - * The command's working directory. - */ - cwd: AbsolutePathBuf; - /** - * Identifier for the underlying PTY process (when available). - */ - processId: string | null; - source: CommandExecutionSource; - status: CommandExecutionStatus; - /** - * A best-effort parsing of the command to understand the action(s) it will perform. - * This returns a list of CommandAction objects because a single shell command may - * be composed of many commands piped together. - */ - commandActions: Array; - /** - * The command's output, aggregated from stdout and stderr. - */ - aggregatedOutput: string | null; - /** - * The command's exit code. - */ - exitCode: number | null; - /** - * The duration of the command execution in milliseconds. - */ - durationMs: number | null; - } - | { type: "fileChange"; id: string; changes: Array; status: PatchApplyStatus } - | { - type: "mcpToolCall"; - id: string; - server: string; - tool: string; - status: McpToolCallStatus; - arguments: JsonValue; - mcpAppResourceUri?: string; - result: McpToolCallResult | null; - error: McpToolCallError | null; - /** - * The duration of the MCP tool call in milliseconds. - */ - durationMs: number | null; - } - | { - type: "dynamicToolCall"; - id: string; - namespace: string | null; - tool: string; - arguments: JsonValue; - status: DynamicToolCallStatus; - contentItems: Array | null; - success: boolean | null; - /** - * The duration of the dynamic tool call in milliseconds. - */ - durationMs: number | null; - } - | { - type: "collabAgentToolCall"; - /** - * Unique identifier for this collab tool call. - */ - id: string; - /** - * Name of the collab tool that was invoked. - */ - tool: CollabAgentTool; - /** - * Current status of the collab tool call. - */ - status: CollabAgentToolCallStatus; - /** - * Thread ID of the agent issuing the collab request. - */ - senderThreadId: string; - /** - * Thread ID of the receiving agent, when applicable. In case of spawn operation, - * this corresponds to the newly spawned agent. - */ - receiverThreadIds: Array; - /** - * Prompt text sent as part of the collab tool call, when available. - */ - prompt: string | null; - /** - * Model requested for the spawned agent, when applicable. - */ - model: string | null; - /** - * Reasoning effort requested for the spawned agent, when applicable. - */ - reasoningEffort: ReasoningEffort | null; - /** - * Last known status of the target agents, when available. - */ - agentsStates: { [key in string]?: CollabAgentState }; - } - | { type: "webSearch"; id: string; query: string; action: WebSearchAction | null } - | { type: "imageView"; id: string; path: AbsolutePathBuf } - | { - type: "imageGeneration"; - id: string; - status: string; - revisedPrompt: string | null; - result: string; - savedPath?: AbsolutePathBuf; - } - | { type: "enteredReviewMode"; id: string; review: string } - | { type: "exitedReviewMode"; id: string; review: string } - | { type: "contextCompaction"; id: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListParams.ts deleted file mode 100644 index 589101d632b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListParams.ts +++ /dev/null @@ -1,55 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SortDirection } from "./SortDirection.js"; -import type { ThreadSortKey } from "./ThreadSortKey.js"; -import type { ThreadSourceKind } from "./ThreadSourceKind.js"; - -export type ThreadListParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to a reasonable server-side value. - */ - limit?: number | null; - /** - * Optional sort key; defaults to created_at. - */ - sortKey?: ThreadSortKey | null; - /** - * Optional sort direction; defaults to descending (newest first). - */ - sortDirection?: SortDirection | null; - /** - * Optional provider filter; when set, only sessions recorded under these - * providers are returned. When present but empty, includes all providers. - */ - modelProviders?: Array | null; - /** - * Optional source filter; when set, only sessions from these source kinds - * are returned. When omitted or empty, defaults to interactive sources. - */ - sourceKinds?: Array | null; - /** - * Optional archived filter; when set to true, only archived threads are returned. - * If false or null, only non-archived threads are returned. - */ - archived?: boolean | null; - /** - * Optional cwd filter or filters; when set, only threads whose session cwd - * exactly matches one of these paths are returned. - */ - cwd?: string | Array | null; - /** - * If true, return from the state DB without scanning JSONL rollouts to - * repair thread metadata. Omitted or false preserves scan-and-repair - * behavior. - */ - useStateDbOnly?: boolean; - /** - * Optional substring filter for the extracted thread title. - */ - searchTerm?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListResponse.ts deleted file mode 100644 index 95815064359..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadListResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadListResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * if None, there are no more items to return. - */ - nextCursor: string | null; - /** - * Opaque cursor to pass as `cursor` when reversing `sortDirection`. - * This is only populated when the page contains at least one thread. - * Use it with the opposite `sortDirection`; for timestamp sorts it anchors - * at the start of the page timestamp so same-second updates are not skipped. - */ - backwardsCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListParams.ts deleted file mode 100644 index 7269540838d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadLoadedListParams = { - /** - * Opaque pagination cursor returned by a previous call. - */ - cursor?: string | null; - /** - * Optional page size; defaults to no limit. - */ - limit?: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListResponse.ts deleted file mode 100644 index 5555ac2d771..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadLoadedListResponse.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadLoadedListResponse = { - /** - * Thread ids for sessions currently loaded in memory. - */ - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last item. - * if None, there are no more items to return. - */ - nextCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts deleted file mode 100644 index 9eee31b8af7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadMemoryMode } from "../ThreadMemoryMode.js"; - -export type ThreadMemoryModeSetParams = { threadId: string; mode: ThreadMemoryMode }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts deleted file mode 100644 index 49b42fd9add..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadMemoryModeSetResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts deleted file mode 100644 index 391427c4224..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadMetadataGitInfoUpdateParams = { - /** - * Omit to leave the stored commit unchanged, set to `null` to clear it, - * or provide a non-empty string to replace it. - */ - sha?: string | null; - /** - * Omit to leave the stored branch unchanged, set to `null` to clear it, - * or provide a non-empty string to replace it. - */ - branch?: string | null; - /** - * Omit to leave the stored origin URL unchanged, set to `null` to clear it, - * or provide a non-empty string to replace it. - */ - originUrl?: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateParams.ts deleted file mode 100644 index d6a41f3bad7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadMetadataGitInfoUpdateParams } from "./ThreadMetadataGitInfoUpdateParams.js"; - -export type ThreadMetadataUpdateParams = { - threadId: string; - /** - * Patch the stored Git metadata for this thread. - * Omit a field to leave it unchanged, set it to `null` to clear it, or - * provide a string to replace the stored value. - */ - gitInfo?: ThreadMetadataGitInfoUpdateParams | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateResponse.ts deleted file mode 100644 index 17574bd2df3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMetadataUpdateResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadMetadataUpdateResponse = { thread: Thread }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadNameUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadNameUpdatedNotification.ts deleted file mode 100644 index 1bee8b50aa2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadNameUpdatedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadNameUpdatedNotification = { threadId: string; threadName?: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadParams.ts deleted file mode 100644 index 2159bd89d5e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadParams.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadReadParams = { - threadId: string; - /** - * When true, include turns and their items from rollout history. - */ - includeTurns: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadResponse.ts deleted file mode 100644 index 2c6e207f682..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadReadResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadReadResponse = { thread: Thread }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts deleted file mode 100644 index 83f253bffd0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk.js"; - -/** - * EXPERIMENTAL - append audio input to thread realtime. - */ -export type ThreadRealtimeAppendAudioParams = { threadId: string; audio: ThreadRealtimeAudioChunk }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts deleted file mode 100644 index 063e8cba783..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - response for appending realtime audio input. - */ -export type ThreadRealtimeAppendAudioResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts deleted file mode 100644 index 7be6e7670d3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - append text input to thread realtime. - */ -export type ThreadRealtimeAppendTextParams = { threadId: string; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts deleted file mode 100644 index 1fb9f0738fd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - response for appending realtime text input. - */ -export type ThreadRealtimeAppendTextResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAudioChunk.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAudioChunk.ts deleted file mode 100644 index 61f4414f422..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAudioChunk.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - thread realtime audio chunk. - */ -export type ThreadRealtimeAudioChunk = { - data: string; - sampleRate: number; - numChannels: number; - samplesPerChannel: number | null; - itemId: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeClosedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeClosedNotification.ts deleted file mode 100644 index 7f7e837e06f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeClosedNotification.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - emitted when thread realtime transport closes. - */ -export type ThreadRealtimeClosedNotification = { threadId: string; reason: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeErrorNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeErrorNotification.ts deleted file mode 100644 index 3c1e9d408a9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeErrorNotification.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - emitted when thread realtime encounters an error. - */ -export type ThreadRealtimeErrorNotification = { threadId: string; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeItemAddedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeItemAddedNotification.ts deleted file mode 100644 index 3195e4a02b8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeItemAddedNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { JsonValue } from "../serde_json/JsonValue.js"; - -/** - * EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend. - */ -export type ThreadRealtimeItemAddedNotification = { threadId: string; item: JsonValue }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts deleted file mode 100644 index b456d89c26e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - list voices supported by thread realtime. - */ -export type ThreadRealtimeListVoicesParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts deleted file mode 100644 index a83f67ed9c3..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RealtimeVoicesList } from "../RealtimeVoicesList.js"; - -/** - * EXPERIMENTAL - response for listing supported realtime voices. - */ -export type ThreadRealtimeListVoicesResponse = { voices: RealtimeVoicesList }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeOutputAudioDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeOutputAudioDeltaNotification.ts deleted file mode 100644 index 85946bd1b6f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeOutputAudioDeltaNotification.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk.js"; - -/** - * EXPERIMENTAL - streamed output audio emitted by thread realtime. - */ -export type ThreadRealtimeOutputAudioDeltaNotification = { - threadId: string; - audio: ThreadRealtimeAudioChunk; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeSdpNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeSdpNotification.ts deleted file mode 100644 index 38af1bc9d8c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeSdpNotification.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session. - */ -export type ThreadRealtimeSdpNotification = { threadId: string; sdp: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts deleted file mode 100644 index fc1878ebabd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RealtimeOutputModality } from "../RealtimeOutputModality.js"; -import type { RealtimeVoice } from "../RealtimeVoice.js"; -import type { ThreadRealtimeStartTransport } from "./ThreadRealtimeStartTransport.js"; - -/** - * EXPERIMENTAL - start a thread-scoped realtime session. - */ -export type ThreadRealtimeStartParams = { - threadId: string; - /** - * Selects text or audio output for the realtime session. Transport and voice stay - * independent so clients can choose how they connect separately from what the model emits. - */ - outputModality: RealtimeOutputModality; - prompt?: string | null; - realtimeSessionId?: string | null; - transport?: ThreadRealtimeStartTransport | null; - voice?: RealtimeVoice | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts deleted file mode 100644 index 56254564256..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - response for starting thread realtime. - */ -export type ThreadRealtimeStartResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartTransport.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartTransport.ts deleted file mode 100644 index 82802df1128..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartTransport.ts +++ /dev/null @@ -1,17 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - transport used by thread realtime. - */ -export type ThreadRealtimeStartTransport = - | { type: "websocket" } - | { - type: "webrtc"; - /** - * SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the - * realtime events data channel. - */ - sdp: string; - }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts deleted file mode 100644 index 730debc09ed..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { RealtimeConversationVersion } from "../RealtimeConversationVersion.js"; - -/** - * EXPERIMENTAL - emitted when thread realtime startup is accepted. - */ -export type ThreadRealtimeStartedNotification = { - threadId: string; - realtimeSessionId: string | null; - version: RealtimeConversationVersion; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts deleted file mode 100644 index a74f6d8b204..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - stop thread realtime. - */ -export type ThreadRealtimeStopParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts deleted file mode 100644 index c87f4402db5..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - response for stopping thread realtime. - */ -export type ThreadRealtimeStopResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDeltaNotification.ts deleted file mode 100644 index 0e6e0f4344a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDeltaNotification.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - flat transcript delta emitted whenever realtime - * transcript text changes. - */ -export type ThreadRealtimeTranscriptDeltaNotification = { - threadId: string; - role: string; - /** - * Live transcript delta from the realtime event. - */ - delta: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDoneNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDoneNotification.ts deleted file mode 100644 index eafdbe76743..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeTranscriptDoneNotification.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL - final transcript text emitted when realtime completes - * a transcript part. - */ -export type ThreadRealtimeTranscriptDoneNotification = { - threadId: string; - role: string; - /** - * Final complete text for the transcript part. - */ - text: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts deleted file mode 100644 index c04230b6722..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts +++ /dev/null @@ -1,73 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Personality } from "../Personality.js"; -import type { ResponseItem } from "../ResponseItem.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; -import type { SandboxMode } from "./SandboxMode.js"; - -/** - * There are three ways to resume a thread: - * 1. By thread_id: load the thread from disk by thread_id and resume it. - * 2. By history: instantiate the thread from memory and resume it. - * 3. By path: load the thread from disk by path and resume it. - * - * The precedence is: history > path > thread_id. - * If using history or path, the thread_id param will be ignored. - * - * Prefer using thread_id whenever possible. - */ -export type ThreadResumeParams = { - threadId: string; - /** - * [UNSTABLE] FOR CODEX CLOUD - DO NOT USE. - * If specified, the thread will be resumed with the provided history - * instead of loaded from disk. - */ - history?: Array | null; - /** - * [UNSTABLE] Specify the rollout path to resume from. - * If specified, the thread_id param will be ignored. - */ - path?: string | null; - /** - * Configuration overrides for the resumed thread, if any. - */ - model?: string | null; - modelProvider?: string | null; - serviceTier?: ServiceTier | null; - cwd?: string | null; - approvalPolicy?: AskForApproval | null; - /** - * Override where approval requests are routed for review on this thread - * and subsequent turns. - */ - approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null; - /** - * Named profile selection for the resumed thread. Cannot be combined - * with `sandbox`. Use bounded `modifications` for supported thread - * adjustments instead of replacing the full permissions profile. - */ - permissions?: PermissionProfileSelectionParams | null; - config?: { [key in string]?: JsonValue } | null; - baseInstructions?: string | null; - developerInstructions?: string | null; - personality?: Personality | null; - /** - * When true, return only thread metadata and live-resume state without - * populating `thread.turns`. This is useful when the client plans to call - * `thread/turns/list` immediately after resuming. - */ - excludeTurns?: boolean; - /** - * If true, persist additional EventMsg variants to the rollout file. - * However, `thread/read`, `thread/resume`, and `thread/fork` still only - * return the limited form of thread history for scalability reasons. - */ - persistExtendedHistory: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts deleted file mode 100644 index 9db70479b24..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; -import type { SandboxPolicy } from "./SandboxPolicy.js"; -import type { Thread } from "./Thread.js"; - -export type ThreadResumeResponse = { - thread: Thread; - model: string; - modelProvider: string; - serviceTier: ServiceTier | null; - cwd: AbsolutePathBuf; - /** - * Instruction source files currently loaded for this thread. - */ - instructionSources: Array; - approvalPolicy: AskForApproval; - /** - * Reviewer currently used for approval requests on this thread. - */ - approvalsReviewer: ApprovalsReviewer; - /** - * Legacy sandbox policy retained for compatibility. Experimental clients - * should prefer `permissionProfile` when they need exact runtime - * permissions. - */ - sandbox: SandboxPolicy; - /** - * Full active permissions for this thread. `activePermissionProfile` - * carries display/provenance metadata for this runtime profile. - */ - permissionProfile: PermissionProfile | null; - /** - * Named or implicit built-in profile that produced the active - * permissions, when known. - */ - activePermissionProfile: ActivePermissionProfile | null; - reasoningEffort: ReasoningEffort | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackParams.ts deleted file mode 100644 index afe1bad9ffb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadRollbackParams = { - threadId: string; - /** - * The number of turns to drop from the end of the thread. Must be >= 1. - * - * This only modifies the thread's history and does not revert local file changes - * that have been made by the agent. Clients are responsible for reverting these changes. - */ - numTurns: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackResponse.ts deleted file mode 100644 index 5f2d0227997..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRollbackResponse.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadRollbackResponse = { - /** - * The updated thread after applying the rollback, with `turns` populated. - * - * The ThreadItems stored in each Turn are lossy since we explicitly do not - * persist all agent interactions, such as command executions. This is the same - * behavior as `thread/resume`. - */ - thread: Thread; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameParams.ts deleted file mode 100644 index 17d12ee34ba..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadSetNameParams = { threadId: string; name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameResponse.ts deleted file mode 100644 index 09143d251cf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSetNameResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadSetNameResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandParams.ts deleted file mode 100644 index 7e7b11890e9..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadShellCommandParams = { - threadId: string; - /** - * Shell command string evaluated by the thread's configured shell. - * Unlike `command/exec`, this intentionally preserves shell syntax - * such as pipes, redirects, and quoting. This runs unsandboxed with full - * access rather than inheriting the thread sandbox policy. - */ - command: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandResponse.ts deleted file mode 100644 index 9c54b45839d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadShellCommandResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadShellCommandResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSortKey.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSortKey.ts deleted file mode 100644 index dbf1b6c40fd..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSortKey.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadSortKey = "created_at" | "updated_at"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSourceKind.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSourceKind.ts deleted file mode 100644 index 39b188796d6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadSourceKind.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadSourceKind = - | "cli" - | "vscode" - | "exec" - | "appServer" - | "subAgent" - | "subAgentReview" - | "subAgentCompact" - | "subAgentThreadSpawn" - | "subAgentOther" - | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts deleted file mode 100644 index 5d4d1856257..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts +++ /dev/null @@ -1,66 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Personality } from "../Personality.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { DynamicToolSpec } from "./DynamicToolSpec.js"; -import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; -import type { SandboxMode } from "./SandboxMode.js"; -import type { ThreadStartSource } from "./ThreadStartSource.js"; -import type { TurnEnvironmentParams } from "./TurnEnvironmentParams.js"; - -export type ThreadStartParams = { - model?: string | null; - modelProvider?: string | null; - serviceTier?: ServiceTier | null; - cwd?: string | null; - approvalPolicy?: AskForApproval | null; - /** - * Override where approval requests are routed for review on this thread - * and subsequent turns. - */ - approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null; - /** - * Named profile selection for this thread. Cannot be combined with - * `sandbox`. Use bounded `modifications` for supported turn/thread - * adjustments instead of replacing the full permissions profile. - */ - permissions?: PermissionProfileSelectionParams | null; - config?: { [key in string]?: JsonValue } | null; - serviceName?: string | null; - baseInstructions?: string | null; - developerInstructions?: string | null; - personality?: Personality | null; - ephemeral?: boolean | null; - sessionStartSource?: ThreadStartSource | null; - /** - * Optional sticky environments for this thread. - * - * Omitted selects the default environment when environment access is - * enabled. Empty disables environment access for turns that do not - * provide a turn override. Non-empty selects the first environment as the - * current turn environment. - */ - environments?: Array | null; - dynamicTools?: Array | null; - /** - * Test-only experimental field used to validate experimental gating and - * schema filtering behavior in a stable way. - */ - mockExperimentalField?: string | null; - /** - * If true, opt into emitting raw Responses API items on the event stream. - * This is for internal use only (e.g. Codex Cloud). - */ - experimentalRawEvents: boolean; - /** - * If true, persist additional EventMsg variants to the rollout file. - * However, `thread/read`, `thread/resume`, and `thread/fork` still only - * return the limited form of thread history for scalability reasons. - */ - persistExtendedHistory: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts deleted file mode 100644 index 019c189449b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; -import type { SandboxPolicy } from "./SandboxPolicy.js"; -import type { Thread } from "./Thread.js"; - -export type ThreadStartResponse = { - thread: Thread; - model: string; - modelProvider: string; - serviceTier: ServiceTier | null; - cwd: AbsolutePathBuf; - /** - * Instruction source files currently loaded for this thread. - */ - instructionSources: Array; - approvalPolicy: AskForApproval; - /** - * Reviewer currently used for approval requests on this thread. - */ - approvalsReviewer: ApprovalsReviewer; - /** - * Legacy sandbox policy retained for compatibility. Experimental clients - * should prefer `permissionProfile` when they need exact runtime - * permissions. - */ - sandbox: SandboxPolicy; - /** - * Full active permissions for this thread. `activePermissionProfile` - * carries display/provenance metadata for this runtime profile. - */ - permissionProfile: PermissionProfile | null; - /** - * Named or implicit built-in profile that produced the active - * permissions, when known. - */ - activePermissionProfile: ActivePermissionProfile | null; - reasoningEffort: ReasoningEffort | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartSource.ts deleted file mode 100644 index ea1b839c6ba..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadStartSource = "startup" | "clear"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartedNotification.ts deleted file mode 100644 index 6e56f09d565..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadStartedNotification = { thread: Thread }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatus.ts deleted file mode 100644 index bcc3b0ae8cb..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatus.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadActiveFlag } from "./ThreadActiveFlag.js"; - -export type ThreadStatus = - | { type: "notLoaded" } - | { type: "idle" } - | { type: "systemError" } - | { type: "active"; activeFlags: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatusChangedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatusChangedNotification.ts deleted file mode 100644 index 5ba79094297..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStatusChangedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadStatus } from "./ThreadStatus.js"; - -export type ThreadStatusChangedNotification = { threadId: string; status: ThreadStatus }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsage.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsage.ts deleted file mode 100644 index ca55ee9112f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsage.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TokenUsageBreakdown } from "./TokenUsageBreakdown.js"; - -export type ThreadTokenUsage = { - total: TokenUsageBreakdown; - last: TokenUsageBreakdown; - modelContextWindow: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsageUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsageUpdatedNotification.ts deleted file mode 100644 index 1881dcd5b97..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTokenUsageUpdatedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadTokenUsage } from "./ThreadTokenUsage.js"; - -export type ThreadTokenUsageUpdatedNotification = { - threadId: string; - turnId: string; - tokenUsage: ThreadTokenUsage; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListParams.ts deleted file mode 100644 index 1f603cfb3b8..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListParams.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SortDirection } from "./SortDirection.js"; - -export type ThreadTurnsListParams = { - threadId: string; - /** - * Opaque cursor to pass to the next call to continue after the last turn. - */ - cursor?: string | null; - /** - * Optional turn page size. - */ - limit?: number | null; - /** - * Optional turn pagination direction; defaults to descending. - */ - sortDirection?: SortDirection | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListResponse.ts deleted file mode 100644 index ad82d40fd01..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadTurnsListResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Turn } from "./Turn.js"; - -export type ThreadTurnsListResponse = { - data: Array; - /** - * Opaque cursor to pass to the next call to continue after the last turn. - * if None, there are no more turns to return. - */ - nextCursor: string | null; - /** - * Opaque cursor to pass as `cursor` when reversing `sortDirection`. - * This is only populated when the page contains at least one turn. - * Use it with the opposite `sortDirection` to include the anchor turn again - * and catch updates to that turn. - */ - backwardsCursor: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveParams.ts deleted file mode 100644 index 9b01abc9f87..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadUnarchiveParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveResponse.ts deleted file mode 100644 index 4971de78e44..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchiveResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Thread } from "./Thread.js"; - -export type ThreadUnarchiveResponse = { thread: Thread }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchivedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchivedNotification.ts deleted file mode 100644 index 34a712ee066..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnarchivedNotification.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadUnarchivedNotification = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeParams.ts deleted file mode 100644 index 0fd5aaef7ab..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadUnsubscribeParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeResponse.ts deleted file mode 100644 index a5fba38a1d7..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadUnsubscribeStatus } from "./ThreadUnsubscribeStatus.js"; - -export type ThreadUnsubscribeResponse = { status: ThreadUnsubscribeStatus }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeStatus.ts deleted file mode 100644 index 2970598dc1b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadUnsubscribeStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadUnsubscribeStatus = "notLoaded" | "notSubscribed" | "unsubscribed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TokenUsageBreakdown.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TokenUsageBreakdown.ts deleted file mode 100644 index 19ed7b1968e..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TokenUsageBreakdown.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TokenUsageBreakdown = { - totalTokens: number; - inputTokens: number; - cachedInputTokens: number; - outputTokens: number; - reasoningOutputTokens: number; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputAnswer.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputAnswer.ts deleted file mode 100644 index 87e581b7cac..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputAnswer.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL. Captures a user's answer to a request_user_input question. - */ -export type ToolRequestUserInputAnswer = { answers: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputOption.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputOption.ts deleted file mode 100644 index 6a92bc048da..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputOption.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * EXPERIMENTAL. Defines a single selectable option for request_user_input. - */ -export type ToolRequestUserInputOption = { label: string; description: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputParams.ts deleted file mode 100644 index df67d270b6b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ToolRequestUserInputQuestion } from "./ToolRequestUserInputQuestion.js"; - -/** - * EXPERIMENTAL. Params sent with a request_user_input event. - */ -export type ToolRequestUserInputParams = { - threadId: string; - turnId: string; - itemId: string; - questions: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputQuestion.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputQuestion.ts deleted file mode 100644 index 5c9d690dd8a..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputQuestion.ts +++ /dev/null @@ -1,16 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ToolRequestUserInputOption } from "./ToolRequestUserInputOption.js"; - -/** - * EXPERIMENTAL. Represents one request_user_input question and its required options. - */ -export type ToolRequestUserInputQuestion = { - id: string; - header: string; - question: string; - isOther: boolean; - isSecret: boolean; - options: Array | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputResponse.ts deleted file mode 100644 index 75511716001..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolRequestUserInputResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ToolRequestUserInputAnswer } from "./ToolRequestUserInputAnswer.js"; - -/** - * EXPERIMENTAL. Response payload mapping question ids to answers. - */ -export type ToolRequestUserInputResponse = { - answers: { [key in string]?: ToolRequestUserInputAnswer }; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolsV2.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolsV2.ts deleted file mode 100644 index 4adfc8dfe9c..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ToolsV2.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { WebSearchToolConfig } from "../WebSearchToolConfig.js"; - -export type ToolsV2 = { web_search: WebSearchToolConfig | null; view_image: boolean | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Turn.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Turn.ts deleted file mode 100644 index 9487af6c7c0..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Turn.ts +++ /dev/null @@ -1,33 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadItem } from "./ThreadItem.js"; -import type { TurnError } from "./TurnError.js"; -import type { TurnStatus } from "./TurnStatus.js"; - -export type Turn = { - id: string; - /** - * Only populated on a `thread/resume` or `thread/fork` response. - * For all other responses and notifications returning a Turn, - * the items field will be an empty list. - */ - items: Array; - status: TurnStatus; - /** - * Only populated when the Turn's status is failed. - */ - error: TurnError | null; - /** - * Unix timestamp (in seconds) when the turn started. - */ - startedAt: number | null; - /** - * Unix timestamp (in seconds) when the turn completed. - */ - completedAt: number | null; - /** - * Duration between turn start and completion in milliseconds, if known. - */ - durationMs: number | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnCompletedNotification.ts deleted file mode 100644 index da36e077684..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnCompletedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Turn } from "./Turn.js"; - -export type TurnCompletedNotification = { threadId: string; turn: Turn }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnDiffUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnDiffUpdatedNotification.ts deleted file mode 100644 index 0f4bf14b15f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnDiffUpdatedNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Notification that the turn-level unified diff has changed. - * Contains the latest aggregated diff across all file changes in the turn. - */ -export type TurnDiffUpdatedNotification = { threadId: string; turnId: string; diff: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnEnvironmentParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnEnvironmentParams.ts deleted file mode 100644 index c814b1334f6..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnEnvironmentParams.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; - -export type TurnEnvironmentParams = { environmentId: string; cwd: AbsolutePathBuf }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnError.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnError.ts deleted file mode 100644 index c87517026c2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnError.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CodexErrorInfo } from "./CodexErrorInfo.js"; - -export type TurnError = { - message: string; - codexErrorInfo: CodexErrorInfo | null; - additionalDetails: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptParams.ts deleted file mode 100644 index 1373415ec08..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptParams.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TurnInterruptParams = { threadId: string; turnId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptResponse.ts deleted file mode 100644 index 7ce6e35bd63..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnInterruptResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TurnInterruptResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStep.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStep.ts deleted file mode 100644 index 4064f46a67f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStep.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TurnPlanStepStatus } from "./TurnPlanStepStatus.js"; - -export type TurnPlanStep = { step: string; status: TurnPlanStepStatus }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStepStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStepStatus.ts deleted file mode 100644 index f6733a68853..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanStepStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TurnPlanStepStatus = "pending" | "inProgress" | "completed"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanUpdatedNotification.ts deleted file mode 100644 index fd3780bdf73..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnPlanUpdatedNotification.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TurnPlanStep } from "./TurnPlanStep.js"; - -export type TurnPlanUpdatedNotification = { - threadId: string; - turnId: string; - explanation: string | null; - plan: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts deleted file mode 100644 index d395ba607c2..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts +++ /dev/null @@ -1,89 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CollaborationMode } from "../CollaborationMode.js"; -import type { Personality } from "../Personality.js"; -import type { ReasoningEffort } from "../ReasoningEffort.js"; -import type { ReasoningSummary } from "../ReasoningSummary.js"; -import type { JsonValue } from "../serde_json/JsonValue.js"; -import type { ServiceTier } from "../ServiceTier.js"; -import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; -import type { SandboxPolicy } from "./SandboxPolicy.js"; -import type { TurnEnvironmentParams } from "./TurnEnvironmentParams.js"; -import type { UserInput } from "./UserInput.js"; - -export type TurnStartParams = { - threadId: string; - input: Array; - /** - * Optional turn-scoped Responses API client metadata. - */ - responsesapiClientMetadata?: { [key in string]?: string } | null; - /** - * Optional turn-scoped environments. - * - * Omitted uses the thread sticky environments. Empty disables - * environment access for this turn. Non-empty selects the first - * environment as the current turn environment for this turn. - */ - environments?: Array | null; - /** - * Override the working directory for this turn and subsequent turns. - */ - cwd?: string | null; - /** - * Override the approval policy for this turn and subsequent turns. - */ - approvalPolicy?: AskForApproval | null; - /** - * Override where approval requests are routed for review on this turn and - * subsequent turns. - */ - approvalsReviewer?: ApprovalsReviewer | null; - /** - * Override the sandbox policy for this turn and subsequent turns. - */ - sandboxPolicy?: SandboxPolicy | null; - /** - * Select a named permissions profile for this turn and subsequent turns. - * Cannot be combined with `sandboxPolicy`. Use bounded `modifications` - * for supported turn adjustments instead of replacing the full - * permissions profile. - */ - permissions?: PermissionProfileSelectionParams | null; - /** - * Override the model for this turn and subsequent turns. - */ - model?: string | null; - /** - * Override the service tier for this turn and subsequent turns. - */ - serviceTier?: ServiceTier | null; - /** - * Override the reasoning effort for this turn and subsequent turns. - */ - effort?: ReasoningEffort | null; - /** - * Override the reasoning summary for this turn and subsequent turns. - */ - summary?: ReasoningSummary | null; - /** - * Override the personality for this turn and subsequent turns. - */ - personality?: Personality | null; - /** - * Optional JSON Schema used to constrain the final assistant message for - * this turn. - */ - outputSchema?: JsonValue | null; - /** - * EXPERIMENTAL - Set a pre-set collaboration mode. - * Takes precedence over model, reasoning_effort, and developer instructions if set. - * - * For `collaboration_mode.settings.developer_instructions`, `null` means - * "use the built-in instructions for the selected mode". - */ - collaborationMode?: CollaborationMode | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartResponse.ts deleted file mode 100644 index 79e6fc98354..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartResponse.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Turn } from "./Turn.js"; - -export type TurnStartResponse = { turn: Turn }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartedNotification.ts deleted file mode 100644 index cf4b5a94d5d..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartedNotification.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Turn } from "./Turn.js"; - -export type TurnStartedNotification = { threadId: string; turn: Turn }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStatus.ts deleted file mode 100644 index 476922edc20..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TurnStatus = "completed" | "interrupted" | "failed" | "inProgress"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts deleted file mode 100644 index a2f7a2a0683..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { UserInput } from "./UserInput.js"; - -export type TurnSteerParams = { - threadId: string; - input: Array; - /** - * Optional turn-scoped Responses API client metadata. - */ - responsesapiClientMetadata?: { [key in string]?: string } | null; - /** - * Required active turn id precondition. The request fails when it does not - * match the currently active turn. - */ - expectedTurnId: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerResponse.ts deleted file mode 100644 index 1ed155c1429..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type TurnSteerResponse = { turnId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/UserInput.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/UserInput.ts deleted file mode 100644 index d8531d3f27b..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/UserInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { TextElement } from "./TextElement.js"; - -export type UserInput = - | { - type: "text"; - text: string; - /** - * UI-defined spans within `text` used to render or persist special elements. - */ - text_elements: Array; - } - | { type: "image"; url: string } - | { type: "localImage"; path: string } - | { type: "skill"; name: string; path: string } - | { type: "mention"; name: string; path: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WarningNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WarningNotification.ts deleted file mode 100644 index dc30ca05250..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WarningNotification.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WarningNotification = { - /** - * Optional thread target when the warning applies to a specific thread. - */ - threadId: string | null; - /** - * Concise warning message for the user. - */ - message: string; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WebSearchAction.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WebSearchAction.ts deleted file mode 100644 index 20801fb04c1..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WebSearchAction.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WebSearchAction = - | { type: "search"; query: string | null; queries: Array | null } - | { type: "openPage"; url: string | null } - | { type: "findInPage"; url: string | null; pattern: string | null } - | { type: "other" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupCompletedNotification.ts deleted file mode 100644 index 57deea42444..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupCompletedNotification.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { WindowsSandboxSetupMode } from "./WindowsSandboxSetupMode.js"; - -export type WindowsSandboxSetupCompletedNotification = { - mode: WindowsSandboxSetupMode; - success: boolean; - error: string | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupMode.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupMode.ts deleted file mode 100644 index a74bea42408..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupMode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WindowsSandboxSetupMode = "elevated" | "unelevated"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartParams.ts deleted file mode 100644 index 9fd8992a3cf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartParams.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -import type { WindowsSandboxSetupMode } from "./WindowsSandboxSetupMode.js"; - -export type WindowsSandboxSetupStartParams = { - mode: WindowsSandboxSetupMode; - cwd?: AbsolutePathBuf | null; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartResponse.ts deleted file mode 100644 index 1aec14ca473..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsSandboxSetupStartResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WindowsSandboxSetupStartResponse = { started: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsWorldWritableWarningNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsWorldWritableWarningNotification.ts deleted file mode 100644 index b61824c8b3f..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WindowsWorldWritableWarningNotification.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WindowsWorldWritableWarningNotification = { - samplePaths: Array; - extraCount: number; - failedScan: boolean; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WriteStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/WriteStatus.ts deleted file mode 100644 index 068eb3bdb99..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/WriteStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type WriteStatus = "ok" | "okOverridden"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts deleted file mode 100644 index 2db19d0fe30..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts +++ /dev/null @@ -1,470 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -export type { Account } from "./Account.js"; -export type { AccountLoginCompletedNotification } from "./AccountLoginCompletedNotification.js"; -export type { AccountRateLimitsUpdatedNotification } from "./AccountRateLimitsUpdatedNotification.js"; -export type { AccountUpdatedNotification } from "./AccountUpdatedNotification.js"; -export type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; -export type { ActivePermissionProfileModification } from "./ActivePermissionProfileModification.js"; -export type { AddCreditsNudgeCreditType } from "./AddCreditsNudgeCreditType.js"; -export type { AddCreditsNudgeEmailStatus } from "./AddCreditsNudgeEmailStatus.js"; -export type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPermissions.js"; -export type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermissions.js"; -export type { AdditionalPermissionProfile } from "./AdditionalPermissionProfile.js"; -export type { AgentMessageDeltaNotification } from "./AgentMessageDeltaNotification.js"; -export type { AnalyticsConfig } from "./AnalyticsConfig.js"; -export type { AppBranding } from "./AppBranding.js"; -export type { AppInfo } from "./AppInfo.js"; -export type { AppListUpdatedNotification } from "./AppListUpdatedNotification.js"; -export type { AppMetadata } from "./AppMetadata.js"; -export type { AppReview } from "./AppReview.js"; -export type { AppScreenshot } from "./AppScreenshot.js"; -export type { AppSummary } from "./AppSummary.js"; -export type { AppToolApproval } from "./AppToolApproval.js"; -export type { AppToolsConfig } from "./AppToolsConfig.js"; -export type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; -export type { AppsConfig } from "./AppsConfig.js"; -export type { AppsDefaultConfig } from "./AppsDefaultConfig.js"; -export type { AppsListParams } from "./AppsListParams.js"; -export type { AppsListResponse } from "./AppsListResponse.js"; -export type { AskForApproval } from "./AskForApproval.js"; -export type { AutoReviewDecisionSource } from "./AutoReviewDecisionSource.js"; -export type { ByteRange } from "./ByteRange.js"; -export type { CancelLoginAccountParams } from "./CancelLoginAccountParams.js"; -export type { CancelLoginAccountResponse } from "./CancelLoginAccountResponse.js"; -export type { CancelLoginAccountStatus } from "./CancelLoginAccountStatus.js"; -export type { ChatgptAuthTokensRefreshParams } from "./ChatgptAuthTokensRefreshParams.js"; -export type { ChatgptAuthTokensRefreshReason } from "./ChatgptAuthTokensRefreshReason.js"; -export type { ChatgptAuthTokensRefreshResponse } from "./ChatgptAuthTokensRefreshResponse.js"; -export type { CodexErrorInfo } from "./CodexErrorInfo.js"; -export type { CollabAgentState } from "./CollabAgentState.js"; -export type { CollabAgentStatus } from "./CollabAgentStatus.js"; -export type { CollabAgentTool } from "./CollabAgentTool.js"; -export type { CollabAgentToolCallStatus } from "./CollabAgentToolCallStatus.js"; -export type { CollaborationModeListParams } from "./CollaborationModeListParams.js"; -export type { CollaborationModeListResponse } from "./CollaborationModeListResponse.js"; -export type { CollaborationModeMask } from "./CollaborationModeMask.js"; -export type { CommandAction } from "./CommandAction.js"; -export type { CommandExecOutputDeltaNotification } from "./CommandExecOutputDeltaNotification.js"; -export type { CommandExecOutputStream } from "./CommandExecOutputStream.js"; -export type { CommandExecParams } from "./CommandExecParams.js"; -export type { CommandExecResizeParams } from "./CommandExecResizeParams.js"; -export type { CommandExecResizeResponse } from "./CommandExecResizeResponse.js"; -export type { CommandExecResponse } from "./CommandExecResponse.js"; -export type { CommandExecTerminalSize } from "./CommandExecTerminalSize.js"; -export type { CommandExecTerminateParams } from "./CommandExecTerminateParams.js"; -export type { CommandExecTerminateResponse } from "./CommandExecTerminateResponse.js"; -export type { CommandExecWriteParams } from "./CommandExecWriteParams.js"; -export type { CommandExecWriteResponse } from "./CommandExecWriteResponse.js"; -export type { CommandExecutionApprovalDecision } from "./CommandExecutionApprovalDecision.js"; -export type { CommandExecutionOutputDeltaNotification } from "./CommandExecutionOutputDeltaNotification.js"; -export type { CommandExecutionRequestApprovalParams } from "./CommandExecutionRequestApprovalParams.js"; -export type { CommandExecutionRequestApprovalResponse } from "./CommandExecutionRequestApprovalResponse.js"; -export type { CommandExecutionSource } from "./CommandExecutionSource.js"; -export type { CommandExecutionStatus } from "./CommandExecutionStatus.js"; -export type { CommandMigration } from "./CommandMigration.js"; -export type { Config } from "./Config.js"; -export type { ConfigBatchWriteParams } from "./ConfigBatchWriteParams.js"; -export type { ConfigEdit } from "./ConfigEdit.js"; -export type { ConfigLayer } from "./ConfigLayer.js"; -export type { ConfigLayerMetadata } from "./ConfigLayerMetadata.js"; -export type { ConfigLayerSource } from "./ConfigLayerSource.js"; -export type { ConfigReadParams } from "./ConfigReadParams.js"; -export type { ConfigReadResponse } from "./ConfigReadResponse.js"; -export type { ConfigRequirements } from "./ConfigRequirements.js"; -export type { ConfigRequirementsReadResponse } from "./ConfigRequirementsReadResponse.js"; -export type { ConfigValueWriteParams } from "./ConfigValueWriteParams.js"; -export type { ConfigWarningNotification } from "./ConfigWarningNotification.js"; -export type { ConfigWriteResponse } from "./ConfigWriteResponse.js"; -export type { ConfiguredHookHandler } from "./ConfiguredHookHandler.js"; -export type { ConfiguredHookMatcherGroup } from "./ConfiguredHookMatcherGroup.js"; -export type { ContextCompactedNotification } from "./ContextCompactedNotification.js"; -export type { CreditsSnapshot } from "./CreditsSnapshot.js"; -export type { DeprecationNoticeNotification } from "./DeprecationNoticeNotification.js"; -export type { DeviceKeyAlgorithm } from "./DeviceKeyAlgorithm.js"; -export type { DeviceKeyCreateParams } from "./DeviceKeyCreateParams.js"; -export type { DeviceKeyCreateResponse } from "./DeviceKeyCreateResponse.js"; -export type { DeviceKeyProtectionClass } from "./DeviceKeyProtectionClass.js"; -export type { DeviceKeyProtectionPolicy } from "./DeviceKeyProtectionPolicy.js"; -export type { DeviceKeyPublicParams } from "./DeviceKeyPublicParams.js"; -export type { DeviceKeyPublicResponse } from "./DeviceKeyPublicResponse.js"; -export type { DeviceKeySignParams } from "./DeviceKeySignParams.js"; -export type { DeviceKeySignPayload } from "./DeviceKeySignPayload.js"; -export type { DeviceKeySignResponse } from "./DeviceKeySignResponse.js"; -export type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem.js"; -export type { DynamicToolCallParams } from "./DynamicToolCallParams.js"; -export type { DynamicToolCallResponse } from "./DynamicToolCallResponse.js"; -export type { DynamicToolCallStatus } from "./DynamicToolCallStatus.js"; -export type { DynamicToolSpec } from "./DynamicToolSpec.js"; -export type { ErrorNotification } from "./ErrorNotification.js"; -export type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js"; -export type { ExperimentalFeature } from "./ExperimentalFeature.js"; -export type { ExperimentalFeatureEnablementSetParams } from "./ExperimentalFeatureEnablementSetParams.js"; -export type { ExperimentalFeatureEnablementSetResponse } from "./ExperimentalFeatureEnablementSetResponse.js"; -export type { ExperimentalFeatureListParams } from "./ExperimentalFeatureListParams.js"; -export type { ExperimentalFeatureListResponse } from "./ExperimentalFeatureListResponse.js"; -export type { ExperimentalFeatureStage } from "./ExperimentalFeatureStage.js"; -export type { ExternalAgentConfigDetectParams } from "./ExternalAgentConfigDetectParams.js"; -export type { ExternalAgentConfigDetectResponse } from "./ExternalAgentConfigDetectResponse.js"; -export type { ExternalAgentConfigImportCompletedNotification } from "./ExternalAgentConfigImportCompletedNotification.js"; -export type { ExternalAgentConfigImportParams } from "./ExternalAgentConfigImportParams.js"; -export type { ExternalAgentConfigImportResponse } from "./ExternalAgentConfigImportResponse.js"; -export type { ExternalAgentConfigMigrationItem } from "./ExternalAgentConfigMigrationItem.js"; -export type { ExternalAgentConfigMigrationItemType } from "./ExternalAgentConfigMigrationItemType.js"; -export type { FeedbackUploadParams } from "./FeedbackUploadParams.js"; -export type { FeedbackUploadResponse } from "./FeedbackUploadResponse.js"; -export type { FileChangeApprovalDecision } from "./FileChangeApprovalDecision.js"; -export type { FileChangeOutputDeltaNotification } from "./FileChangeOutputDeltaNotification.js"; -export type { FileChangePatchUpdatedNotification } from "./FileChangePatchUpdatedNotification.js"; -export type { FileChangeRequestApprovalParams } from "./FileChangeRequestApprovalParams.js"; -export type { FileChangeRequestApprovalResponse } from "./FileChangeRequestApprovalResponse.js"; -export type { FileSystemAccessMode } from "./FileSystemAccessMode.js"; -export type { FileSystemPath } from "./FileSystemPath.js"; -export type { FileSystemSandboxEntry } from "./FileSystemSandboxEntry.js"; -export type { FileSystemSpecialPath } from "./FileSystemSpecialPath.js"; -export type { FileUpdateChange } from "./FileUpdateChange.js"; -export type { FsChangedNotification } from "./FsChangedNotification.js"; -export type { FsCopyParams } from "./FsCopyParams.js"; -export type { FsCopyResponse } from "./FsCopyResponse.js"; -export type { FsCreateDirectoryParams } from "./FsCreateDirectoryParams.js"; -export type { FsCreateDirectoryResponse } from "./FsCreateDirectoryResponse.js"; -export type { FsGetMetadataParams } from "./FsGetMetadataParams.js"; -export type { FsGetMetadataResponse } from "./FsGetMetadataResponse.js"; -export type { FsReadDirectoryEntry } from "./FsReadDirectoryEntry.js"; -export type { FsReadDirectoryParams } from "./FsReadDirectoryParams.js"; -export type { FsReadDirectoryResponse } from "./FsReadDirectoryResponse.js"; -export type { FsReadFileParams } from "./FsReadFileParams.js"; -export type { FsReadFileResponse } from "./FsReadFileResponse.js"; -export type { FsRemoveParams } from "./FsRemoveParams.js"; -export type { FsRemoveResponse } from "./FsRemoveResponse.js"; -export type { FsUnwatchParams } from "./FsUnwatchParams.js"; -export type { FsUnwatchResponse } from "./FsUnwatchResponse.js"; -export type { FsWatchParams } from "./FsWatchParams.js"; -export type { FsWatchResponse } from "./FsWatchResponse.js"; -export type { FsWriteFileParams } from "./FsWriteFileParams.js"; -export type { FsWriteFileResponse } from "./FsWriteFileResponse.js"; -export type { GetAccountParams } from "./GetAccountParams.js"; -export type { GetAccountRateLimitsResponse } from "./GetAccountRateLimitsResponse.js"; -export type { GetAccountResponse } from "./GetAccountResponse.js"; -export type { GitInfo } from "./GitInfo.js"; -export type { GrantedPermissionProfile } from "./GrantedPermissionProfile.js"; -export type { GuardianApprovalReview } from "./GuardianApprovalReview.js"; -export type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewAction.js"; -export type { GuardianApprovalReviewStatus } from "./GuardianApprovalReviewStatus.js"; -export type { GuardianCommandSource } from "./GuardianCommandSource.js"; -export type { GuardianRiskLevel } from "./GuardianRiskLevel.js"; -export type { GuardianUserAuthorization } from "./GuardianUserAuthorization.js"; -export type { GuardianWarningNotification } from "./GuardianWarningNotification.js"; -export type { HookCompletedNotification } from "./HookCompletedNotification.js"; -export type { HookErrorInfo } from "./HookErrorInfo.js"; -export type { HookEventName } from "./HookEventName.js"; -export type { HookExecutionMode } from "./HookExecutionMode.js"; -export type { HookHandlerType } from "./HookHandlerType.js"; -export type { HookMetadata } from "./HookMetadata.js"; -export type { HookMigration } from "./HookMigration.js"; -export type { HookOutputEntry } from "./HookOutputEntry.js"; -export type { HookOutputEntryKind } from "./HookOutputEntryKind.js"; -export type { HookPromptFragment } from "./HookPromptFragment.js"; -export type { HookRunStatus } from "./HookRunStatus.js"; -export type { HookRunSummary } from "./HookRunSummary.js"; -export type { HookScope } from "./HookScope.js"; -export type { HookSource } from "./HookSource.js"; -export type { HookStartedNotification } from "./HookStartedNotification.js"; -export type { HooksListEntry } from "./HooksListEntry.js"; -export type { HooksListParams } from "./HooksListParams.js"; -export type { HooksListResponse } from "./HooksListResponse.js"; -export type { ItemCompletedNotification } from "./ItemCompletedNotification.js"; -export type { ItemGuardianApprovalReviewCompletedNotification } from "./ItemGuardianApprovalReviewCompletedNotification.js"; -export type { ItemGuardianApprovalReviewStartedNotification } from "./ItemGuardianApprovalReviewStartedNotification.js"; -export type { ItemStartedNotification } from "./ItemStartedNotification.js"; -export type { ListMcpServerStatusParams } from "./ListMcpServerStatusParams.js"; -export type { ListMcpServerStatusResponse } from "./ListMcpServerStatusResponse.js"; -export type { LoginAccountParams } from "./LoginAccountParams.js"; -export type { LoginAccountResponse } from "./LoginAccountResponse.js"; -export type { LogoutAccountResponse } from "./LogoutAccountResponse.js"; -export type { ManagedHooksRequirements } from "./ManagedHooksRequirements.js"; -export type { MarketplaceAddParams } from "./MarketplaceAddParams.js"; -export type { MarketplaceAddResponse } from "./MarketplaceAddResponse.js"; -export type { MarketplaceInterface } from "./MarketplaceInterface.js"; -export type { MarketplaceLoadErrorInfo } from "./MarketplaceLoadErrorInfo.js"; -export type { MarketplaceRemoveParams } from "./MarketplaceRemoveParams.js"; -export type { MarketplaceRemoveResponse } from "./MarketplaceRemoveResponse.js"; -export type { MarketplaceUpgradeErrorInfo } from "./MarketplaceUpgradeErrorInfo.js"; -export type { MarketplaceUpgradeParams } from "./MarketplaceUpgradeParams.js"; -export type { MarketplaceUpgradeResponse } from "./MarketplaceUpgradeResponse.js"; -export type { McpAuthStatus } from "./McpAuthStatus.js"; -export type { McpElicitationArrayType } from "./McpElicitationArrayType.js"; -export type { McpElicitationBooleanSchema } from "./McpElicitationBooleanSchema.js"; -export type { McpElicitationBooleanType } from "./McpElicitationBooleanType.js"; -export type { McpElicitationConstOption } from "./McpElicitationConstOption.js"; -export type { McpElicitationEnumSchema } from "./McpElicitationEnumSchema.js"; -export type { McpElicitationLegacyTitledEnumSchema } from "./McpElicitationLegacyTitledEnumSchema.js"; -export type { McpElicitationMultiSelectEnumSchema } from "./McpElicitationMultiSelectEnumSchema.js"; -export type { McpElicitationNumberSchema } from "./McpElicitationNumberSchema.js"; -export type { McpElicitationNumberType } from "./McpElicitationNumberType.js"; -export type { McpElicitationObjectType } from "./McpElicitationObjectType.js"; -export type { McpElicitationPrimitiveSchema } from "./McpElicitationPrimitiveSchema.js"; -export type { McpElicitationSchema } from "./McpElicitationSchema.js"; -export type { McpElicitationSingleSelectEnumSchema } from "./McpElicitationSingleSelectEnumSchema.js"; -export type { McpElicitationStringFormat } from "./McpElicitationStringFormat.js"; -export type { McpElicitationStringSchema } from "./McpElicitationStringSchema.js"; -export type { McpElicitationStringType } from "./McpElicitationStringType.js"; -export type { McpElicitationTitledEnumItems } from "./McpElicitationTitledEnumItems.js"; -export type { McpElicitationTitledMultiSelectEnumSchema } from "./McpElicitationTitledMultiSelectEnumSchema.js"; -export type { McpElicitationTitledSingleSelectEnumSchema } from "./McpElicitationTitledSingleSelectEnumSchema.js"; -export type { McpElicitationUntitledEnumItems } from "./McpElicitationUntitledEnumItems.js"; -export type { McpElicitationUntitledMultiSelectEnumSchema } from "./McpElicitationUntitledMultiSelectEnumSchema.js"; -export type { McpElicitationUntitledSingleSelectEnumSchema } from "./McpElicitationUntitledSingleSelectEnumSchema.js"; -export type { McpResourceReadParams } from "./McpResourceReadParams.js"; -export type { McpResourceReadResponse } from "./McpResourceReadResponse.js"; -export type { McpServerElicitationAction } from "./McpServerElicitationAction.js"; -export type { McpServerElicitationRequestParams } from "./McpServerElicitationRequestParams.js"; -export type { McpServerElicitationRequestResponse } from "./McpServerElicitationRequestResponse.js"; -export type { McpServerMigration } from "./McpServerMigration.js"; -export type { McpServerOauthLoginCompletedNotification } from "./McpServerOauthLoginCompletedNotification.js"; -export type { McpServerOauthLoginParams } from "./McpServerOauthLoginParams.js"; -export type { McpServerOauthLoginResponse } from "./McpServerOauthLoginResponse.js"; -export type { McpServerRefreshResponse } from "./McpServerRefreshResponse.js"; -export type { McpServerStartupState } from "./McpServerStartupState.js"; -export type { McpServerStatus } from "./McpServerStatus.js"; -export type { McpServerStatusDetail } from "./McpServerStatusDetail.js"; -export type { McpServerStatusUpdatedNotification } from "./McpServerStatusUpdatedNotification.js"; -export type { McpServerToolCallParams } from "./McpServerToolCallParams.js"; -export type { McpServerToolCallResponse } from "./McpServerToolCallResponse.js"; -export type { McpToolCallError } from "./McpToolCallError.js"; -export type { McpToolCallProgressNotification } from "./McpToolCallProgressNotification.js"; -export type { McpToolCallResult } from "./McpToolCallResult.js"; -export type { McpToolCallStatus } from "./McpToolCallStatus.js"; -export type { MemoryCitation } from "./MemoryCitation.js"; -export type { MemoryCitationEntry } from "./MemoryCitationEntry.js"; -export type { MemoryResetResponse } from "./MemoryResetResponse.js"; -export type { MergeStrategy } from "./MergeStrategy.js"; -export type { MigrationDetails } from "./MigrationDetails.js"; -export type { MockExperimentalMethodParams } from "./MockExperimentalMethodParams.js"; -export type { MockExperimentalMethodResponse } from "./MockExperimentalMethodResponse.js"; -export type { Model } from "./Model.js"; -export type { ModelAvailabilityNux } from "./ModelAvailabilityNux.js"; -export type { ModelListParams } from "./ModelListParams.js"; -export type { ModelListResponse } from "./ModelListResponse.js"; -export type { ModelProviderCapabilitiesReadParams } from "./ModelProviderCapabilitiesReadParams.js"; -export type { ModelProviderCapabilitiesReadResponse } from "./ModelProviderCapabilitiesReadResponse.js"; -export type { ModelRerouteReason } from "./ModelRerouteReason.js"; -export type { ModelReroutedNotification } from "./ModelReroutedNotification.js"; -export type { ModelUpgradeInfo } from "./ModelUpgradeInfo.js"; -export type { ModelVerification } from "./ModelVerification.js"; -export type { ModelVerificationNotification } from "./ModelVerificationNotification.js"; -export type { NetworkAccess } from "./NetworkAccess.js"; -export type { NetworkApprovalContext } from "./NetworkApprovalContext.js"; -export type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol.js"; -export type { NetworkDomainPermission } from "./NetworkDomainPermission.js"; -export type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js"; -export type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js"; -export type { NetworkRequirements } from "./NetworkRequirements.js"; -export type { NetworkUnixSocketPermission } from "./NetworkUnixSocketPermission.js"; -export type { NonSteerableTurnKind } from "./NonSteerableTurnKind.js"; -export type { OverriddenMetadata } from "./OverriddenMetadata.js"; -export type { PatchApplyStatus } from "./PatchApplyStatus.js"; -export type { PatchChangeKind } from "./PatchChangeKind.js"; -export type { PermissionGrantScope } from "./PermissionGrantScope.js"; -export type { PermissionProfile } from "./PermissionProfile.js"; -export type { PermissionProfileFileSystemPermissions } from "./PermissionProfileFileSystemPermissions.js"; -export type { PermissionProfileModificationParams } from "./PermissionProfileModificationParams.js"; -export type { PermissionProfileNetworkPermissions } from "./PermissionProfileNetworkPermissions.js"; -export type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; -export type { PermissionsRequestApprovalParams } from "./PermissionsRequestApprovalParams.js"; -export type { PermissionsRequestApprovalResponse } from "./PermissionsRequestApprovalResponse.js"; -export type { PlanDeltaNotification } from "./PlanDeltaNotification.js"; -export type { PluginAuthPolicy } from "./PluginAuthPolicy.js"; -export type { PluginAvailability } from "./PluginAvailability.js"; -export type { PluginDetail } from "./PluginDetail.js"; -export type { PluginInstallParams } from "./PluginInstallParams.js"; -export type { PluginInstallPolicy } from "./PluginInstallPolicy.js"; -export type { PluginInstallResponse } from "./PluginInstallResponse.js"; -export type { PluginInterface } from "./PluginInterface.js"; -export type { PluginListParams } from "./PluginListParams.js"; -export type { PluginListResponse } from "./PluginListResponse.js"; -export type { PluginMarketplaceEntry } from "./PluginMarketplaceEntry.js"; -export type { PluginReadParams } from "./PluginReadParams.js"; -export type { PluginReadResponse } from "./PluginReadResponse.js"; -export type { PluginShareDeleteParams } from "./PluginShareDeleteParams.js"; -export type { PluginShareDeleteResponse } from "./PluginShareDeleteResponse.js"; -export type { PluginShareListItem } from "./PluginShareListItem.js"; -export type { PluginShareListParams } from "./PluginShareListParams.js"; -export type { PluginShareListResponse } from "./PluginShareListResponse.js"; -export type { PluginShareSaveParams } from "./PluginShareSaveParams.js"; -export type { PluginShareSaveResponse } from "./PluginShareSaveResponse.js"; -export type { PluginSkillReadParams } from "./PluginSkillReadParams.js"; -export type { PluginSkillReadResponse } from "./PluginSkillReadResponse.js"; -export type { PluginSource } from "./PluginSource.js"; -export type { PluginSummary } from "./PluginSummary.js"; -export type { PluginUninstallParams } from "./PluginUninstallParams.js"; -export type { PluginUninstallResponse } from "./PluginUninstallResponse.js"; -export type { PluginsMigration } from "./PluginsMigration.js"; -export type { ProfileV2 } from "./ProfileV2.js"; -export type { RateLimitReachedType } from "./RateLimitReachedType.js"; -export type { RateLimitSnapshot } from "./RateLimitSnapshot.js"; -export type { RateLimitWindow } from "./RateLimitWindow.js"; -export type { RawResponseItemCompletedNotification } from "./RawResponseItemCompletedNotification.js"; -export type { ReasoningEffortOption } from "./ReasoningEffortOption.js"; -export type { ReasoningSummaryPartAddedNotification } from "./ReasoningSummaryPartAddedNotification.js"; -export type { ReasoningSummaryTextDeltaNotification } from "./ReasoningSummaryTextDeltaNotification.js"; -export type { ReasoningTextDeltaNotification } from "./ReasoningTextDeltaNotification.js"; -export type { RemoteControlClientConnectionAudience } from "./RemoteControlClientConnectionAudience.js"; -export type { RemoteControlClientEnrollmentAudience } from "./RemoteControlClientEnrollmentAudience.js"; -export type { RemoteControlConnectionStatus } from "./RemoteControlConnectionStatus.js"; -export type { RemoteControlStatusChangedNotification } from "./RemoteControlStatusChangedNotification.js"; -export type { RequestPermissionProfile } from "./RequestPermissionProfile.js"; -export type { ResidencyRequirement } from "./ResidencyRequirement.js"; -export type { ReviewDelivery } from "./ReviewDelivery.js"; -export type { ReviewStartParams } from "./ReviewStartParams.js"; -export type { ReviewStartResponse } from "./ReviewStartResponse.js"; -export type { ReviewTarget } from "./ReviewTarget.js"; -export type { SandboxMode } from "./SandboxMode.js"; -export type { SandboxPolicy } from "./SandboxPolicy.js"; -export type { SandboxWorkspaceWrite } from "./SandboxWorkspaceWrite.js"; -export type { SendAddCreditsNudgeEmailParams } from "./SendAddCreditsNudgeEmailParams.js"; -export type { SendAddCreditsNudgeEmailResponse } from "./SendAddCreditsNudgeEmailResponse.js"; -export type { ServerRequestResolvedNotification } from "./ServerRequestResolvedNotification.js"; -export type { SessionMigration } from "./SessionMigration.js"; -export type { SessionSource } from "./SessionSource.js"; -export type { SkillDependencies } from "./SkillDependencies.js"; -export type { SkillErrorInfo } from "./SkillErrorInfo.js"; -export type { SkillInterface } from "./SkillInterface.js"; -export type { SkillMetadata } from "./SkillMetadata.js"; -export type { SkillScope } from "./SkillScope.js"; -export type { SkillSummary } from "./SkillSummary.js"; -export type { SkillToolDependency } from "./SkillToolDependency.js"; -export type { SkillsChangedNotification } from "./SkillsChangedNotification.js"; -export type { SkillsConfigWriteParams } from "./SkillsConfigWriteParams.js"; -export type { SkillsConfigWriteResponse } from "./SkillsConfigWriteResponse.js"; -export type { SkillsListEntry } from "./SkillsListEntry.js"; -export type { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd.js"; -export type { SkillsListParams } from "./SkillsListParams.js"; -export type { SkillsListResponse } from "./SkillsListResponse.js"; -export type { SortDirection } from "./SortDirection.js"; -export type { SubagentMigration } from "./SubagentMigration.js"; -export type { TerminalInteractionNotification } from "./TerminalInteractionNotification.js"; -export type { TextElement } from "./TextElement.js"; -export type { TextPosition } from "./TextPosition.js"; -export type { TextRange } from "./TextRange.js"; -export type { Thread } from "./Thread.js"; -export type { ThreadActiveFlag } from "./ThreadActiveFlag.js"; -export type { ThreadApproveGuardianDeniedActionParams } from "./ThreadApproveGuardianDeniedActionParams.js"; -export type { ThreadApproveGuardianDeniedActionResponse } from "./ThreadApproveGuardianDeniedActionResponse.js"; -export type { ThreadArchiveParams } from "./ThreadArchiveParams.js"; -export type { ThreadArchiveResponse } from "./ThreadArchiveResponse.js"; -export type { ThreadArchivedNotification } from "./ThreadArchivedNotification.js"; -export type { ThreadBackgroundTerminalsCleanParams } from "./ThreadBackgroundTerminalsCleanParams.js"; -export type { ThreadBackgroundTerminalsCleanResponse } from "./ThreadBackgroundTerminalsCleanResponse.js"; -export type { ThreadClosedNotification } from "./ThreadClosedNotification.js"; -export type { ThreadCompactStartParams } from "./ThreadCompactStartParams.js"; -export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse.js"; -export type { ThreadDecrementElicitationParams } from "./ThreadDecrementElicitationParams.js"; -export type { ThreadDecrementElicitationResponse } from "./ThreadDecrementElicitationResponse.js"; -export type { ThreadForkParams } from "./ThreadForkParams.js"; -export type { ThreadForkResponse } from "./ThreadForkResponse.js"; -export type { ThreadGoal } from "./ThreadGoal.js"; -export type { ThreadGoalClearParams } from "./ThreadGoalClearParams.js"; -export type { ThreadGoalClearResponse } from "./ThreadGoalClearResponse.js"; -export type { ThreadGoalClearedNotification } from "./ThreadGoalClearedNotification.js"; -export type { ThreadGoalGetParams } from "./ThreadGoalGetParams.js"; -export type { ThreadGoalGetResponse } from "./ThreadGoalGetResponse.js"; -export type { ThreadGoalSetParams } from "./ThreadGoalSetParams.js"; -export type { ThreadGoalSetResponse } from "./ThreadGoalSetResponse.js"; -export type { ThreadGoalStatus } from "./ThreadGoalStatus.js"; -export type { ThreadGoalUpdatedNotification } from "./ThreadGoalUpdatedNotification.js"; -export type { ThreadIncrementElicitationParams } from "./ThreadIncrementElicitationParams.js"; -export type { ThreadIncrementElicitationResponse } from "./ThreadIncrementElicitationResponse.js"; -export type { ThreadInjectItemsParams } from "./ThreadInjectItemsParams.js"; -export type { ThreadInjectItemsResponse } from "./ThreadInjectItemsResponse.js"; -export type { ThreadItem } from "./ThreadItem.js"; -export type { ThreadListParams } from "./ThreadListParams.js"; -export type { ThreadListResponse } from "./ThreadListResponse.js"; -export type { ThreadLoadedListParams } from "./ThreadLoadedListParams.js"; -export type { ThreadLoadedListResponse } from "./ThreadLoadedListResponse.js"; -export type { ThreadMemoryModeSetParams } from "./ThreadMemoryModeSetParams.js"; -export type { ThreadMemoryModeSetResponse } from "./ThreadMemoryModeSetResponse.js"; -export type { ThreadMetadataGitInfoUpdateParams } from "./ThreadMetadataGitInfoUpdateParams.js"; -export type { ThreadMetadataUpdateParams } from "./ThreadMetadataUpdateParams.js"; -export type { ThreadMetadataUpdateResponse } from "./ThreadMetadataUpdateResponse.js"; -export type { ThreadNameUpdatedNotification } from "./ThreadNameUpdatedNotification.js"; -export type { ThreadReadParams } from "./ThreadReadParams.js"; -export type { ThreadReadResponse } from "./ThreadReadResponse.js"; -export type { ThreadRealtimeAppendAudioParams } from "./ThreadRealtimeAppendAudioParams.js"; -export type { ThreadRealtimeAppendAudioResponse } from "./ThreadRealtimeAppendAudioResponse.js"; -export type { ThreadRealtimeAppendTextParams } from "./ThreadRealtimeAppendTextParams.js"; -export type { ThreadRealtimeAppendTextResponse } from "./ThreadRealtimeAppendTextResponse.js"; -export type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk.js"; -export type { ThreadRealtimeClosedNotification } from "./ThreadRealtimeClosedNotification.js"; -export type { ThreadRealtimeErrorNotification } from "./ThreadRealtimeErrorNotification.js"; -export type { ThreadRealtimeItemAddedNotification } from "./ThreadRealtimeItemAddedNotification.js"; -export type { ThreadRealtimeListVoicesParams } from "./ThreadRealtimeListVoicesParams.js"; -export type { ThreadRealtimeListVoicesResponse } from "./ThreadRealtimeListVoicesResponse.js"; -export type { ThreadRealtimeOutputAudioDeltaNotification } from "./ThreadRealtimeOutputAudioDeltaNotification.js"; -export type { ThreadRealtimeSdpNotification } from "./ThreadRealtimeSdpNotification.js"; -export type { ThreadRealtimeStartParams } from "./ThreadRealtimeStartParams.js"; -export type { ThreadRealtimeStartResponse } from "./ThreadRealtimeStartResponse.js"; -export type { ThreadRealtimeStartTransport } from "./ThreadRealtimeStartTransport.js"; -export type { ThreadRealtimeStartedNotification } from "./ThreadRealtimeStartedNotification.js"; -export type { ThreadRealtimeStopParams } from "./ThreadRealtimeStopParams.js"; -export type { ThreadRealtimeStopResponse } from "./ThreadRealtimeStopResponse.js"; -export type { ThreadRealtimeTranscriptDeltaNotification } from "./ThreadRealtimeTranscriptDeltaNotification.js"; -export type { ThreadRealtimeTranscriptDoneNotification } from "./ThreadRealtimeTranscriptDoneNotification.js"; -export type { ThreadResumeParams } from "./ThreadResumeParams.js"; -export type { ThreadResumeResponse } from "./ThreadResumeResponse.js"; -export type { ThreadRollbackParams } from "./ThreadRollbackParams.js"; -export type { ThreadRollbackResponse } from "./ThreadRollbackResponse.js"; -export type { ThreadSetNameParams } from "./ThreadSetNameParams.js"; -export type { ThreadSetNameResponse } from "./ThreadSetNameResponse.js"; -export type { ThreadShellCommandParams } from "./ThreadShellCommandParams.js"; -export type { ThreadShellCommandResponse } from "./ThreadShellCommandResponse.js"; -export type { ThreadSortKey } from "./ThreadSortKey.js"; -export type { ThreadSourceKind } from "./ThreadSourceKind.js"; -export type { ThreadStartParams } from "./ThreadStartParams.js"; -export type { ThreadStartResponse } from "./ThreadStartResponse.js"; -export type { ThreadStartSource } from "./ThreadStartSource.js"; -export type { ThreadStartedNotification } from "./ThreadStartedNotification.js"; -export type { ThreadStatus } from "./ThreadStatus.js"; -export type { ThreadStatusChangedNotification } from "./ThreadStatusChangedNotification.js"; -export type { ThreadTokenUsage } from "./ThreadTokenUsage.js"; -export type { ThreadTokenUsageUpdatedNotification } from "./ThreadTokenUsageUpdatedNotification.js"; -export type { ThreadTurnsListParams } from "./ThreadTurnsListParams.js"; -export type { ThreadTurnsListResponse } from "./ThreadTurnsListResponse.js"; -export type { ThreadUnarchiveParams } from "./ThreadUnarchiveParams.js"; -export type { ThreadUnarchiveResponse } from "./ThreadUnarchiveResponse.js"; -export type { ThreadUnarchivedNotification } from "./ThreadUnarchivedNotification.js"; -export type { ThreadUnsubscribeParams } from "./ThreadUnsubscribeParams.js"; -export type { ThreadUnsubscribeResponse } from "./ThreadUnsubscribeResponse.js"; -export type { ThreadUnsubscribeStatus } from "./ThreadUnsubscribeStatus.js"; -export type { TokenUsageBreakdown } from "./TokenUsageBreakdown.js"; -export type { ToolRequestUserInputAnswer } from "./ToolRequestUserInputAnswer.js"; -export type { ToolRequestUserInputOption } from "./ToolRequestUserInputOption.js"; -export type { ToolRequestUserInputParams } from "./ToolRequestUserInputParams.js"; -export type { ToolRequestUserInputQuestion } from "./ToolRequestUserInputQuestion.js"; -export type { ToolRequestUserInputResponse } from "./ToolRequestUserInputResponse.js"; -export type { ToolsV2 } from "./ToolsV2.js"; -export type { Turn } from "./Turn.js"; -export type { TurnCompletedNotification } from "./TurnCompletedNotification.js"; -export type { TurnDiffUpdatedNotification } from "./TurnDiffUpdatedNotification.js"; -export type { TurnEnvironmentParams } from "./TurnEnvironmentParams.js"; -export type { TurnError } from "./TurnError.js"; -export type { TurnInterruptParams } from "./TurnInterruptParams.js"; -export type { TurnInterruptResponse } from "./TurnInterruptResponse.js"; -export type { TurnPlanStep } from "./TurnPlanStep.js"; -export type { TurnPlanStepStatus } from "./TurnPlanStepStatus.js"; -export type { TurnPlanUpdatedNotification } from "./TurnPlanUpdatedNotification.js"; -export type { TurnStartParams } from "./TurnStartParams.js"; -export type { TurnStartResponse } from "./TurnStartResponse.js"; -export type { TurnStartedNotification } from "./TurnStartedNotification.js"; -export type { TurnStatus } from "./TurnStatus.js"; -export type { TurnSteerParams } from "./TurnSteerParams.js"; -export type { TurnSteerResponse } from "./TurnSteerResponse.js"; -export type { UserInput } from "./UserInput.js"; -export type { WarningNotification } from "./WarningNotification.js"; -export type { WebSearchAction } from "./WebSearchAction.js"; -export type { WindowsSandboxSetupCompletedNotification } from "./WindowsSandboxSetupCompletedNotification.js"; -export type { WindowsSandboxSetupMode } from "./WindowsSandboxSetupMode.js"; -export type { WindowsSandboxSetupStartParams } from "./WindowsSandboxSetupStartParams.js"; -export type { WindowsSandboxSetupStartResponse } from "./WindowsSandboxSetupStartResponse.js"; -export type { WindowsWorldWritableWarningNotification } from "./WindowsWorldWritableWarningNotification.js"; -export type { WriteStatus } from "./WriteStatus.js"; diff --git a/extensions/codex/src/app-server/protocol-validators.ts b/extensions/codex/src/app-server/protocol-validators.ts index 05ce0c11045..bbcb2c92d9b 100644 --- a/extensions/codex/src/app-server/protocol-validators.ts +++ b/extensions/codex/src/app-server/protocol-validators.ts @@ -6,12 +6,14 @@ import threadResumeResponseSchema from "./protocol-generated/json/v2/ThreadResum import threadStartResponseSchema from "./protocol-generated/json/v2/ThreadStartResponse.json" with { type: "json" }; import turnCompletedNotificationSchema from "./protocol-generated/json/v2/TurnCompletedNotification.json" with { type: "json" }; import turnStartResponseSchema from "./protocol-generated/json/v2/TurnStartResponse.json" with { type: "json" }; -import type { v2 } from "./protocol-generated/typescript/index.js"; import type { CodexDynamicToolCallParams, + CodexErrorNotification, + CodexModelListResponse, CodexThreadResumeResponse, CodexThreadStartResponse, CodexTurn, + CodexTurnCompletedNotification, CodexTurnStartResponse, } from "./protocol.js"; @@ -28,14 +30,14 @@ const ajv = new AjvCtor({ const validateDynamicToolCallParams = ajv.compile( dynamicToolCallParamsSchema, ); -const validateErrorNotification = ajv.compile(errorNotificationSchema); -const validateModelListResponse = ajv.compile(modelListResponseSchema); +const validateErrorNotification = ajv.compile(errorNotificationSchema); +const validateModelListResponse = ajv.compile(modelListResponseSchema); const validateThreadResumeResponse = ajv.compile( threadResumeResponseSchema, ); const validateThreadStartResponse = ajv.compile(threadStartResponseSchema); -const validateTurnCompletedNotification = ajv.compile( +const validateTurnCompletedNotification = ajv.compile( turnCompletedNotificationSchema, ); const validateTurnStartResponse = ajv.compile(turnStartResponseSchema); @@ -62,11 +64,11 @@ export function readCodexDynamicToolCallParams( return readCodexShape(validateDynamicToolCallParams, value); } -export function readCodexErrorNotification(value: unknown): v2.ErrorNotification | undefined { +export function readCodexErrorNotification(value: unknown): CodexErrorNotification | undefined { return readCodexShape(validateErrorNotification, value); } -export function readCodexModelListResponse(value: unknown): v2.ModelListResponse | undefined { +export function readCodexModelListResponse(value: unknown): CodexModelListResponse | undefined { return readCodexShape(validateModelListResponse, value); } @@ -77,7 +79,7 @@ export function readCodexTurn(value: unknown): CodexTurn | undefined { export function readCodexTurnCompletedNotification( value: unknown, -): v2.TurnCompletedNotification | undefined { +): CodexTurnCompletedNotification | undefined { return readCodexShape( validateTurnCompletedNotification, normalizeTurnCompletedNotification(value), diff --git a/extensions/codex/src/app-server/protocol.ts b/extensions/codex/src/app-server/protocol.ts index 14805ba3cbf..a0bb0b4ffb6 100644 --- a/extensions/codex/src/app-server/protocol.ts +++ b/extensions/codex/src/app-server/protocol.ts @@ -1,21 +1,12 @@ -import type { - ClientRequest as GeneratedClientRequest, - InitializeParams as GeneratedInitializeParams, - InitializeResponse as GeneratedInitializeResponse, - ServiceTier as GeneratedServiceTier, - v2, -} from "./protocol-generated/typescript/index.js"; -import type { JsonValue as GeneratedJsonValue } from "./protocol-generated/typescript/serde_json/JsonValue.js"; - -export type JsonValue = GeneratedJsonValue; +export type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject; export type JsonObject = { [key: string]: JsonValue }; -export type CodexServiceTier = GeneratedServiceTier; +export type CodexServiceTier = string; -export type CodexAppServerRequestMethod = GeneratedClientRequest["method"]; +export type CodexAppServerRequestMethod = keyof CodexAppServerRequestResultMap | (string & {}); export type CodexAppServerRequestParams = M extends keyof CodexAppServerRequestParamsOverride ? CodexAppServerRequestParamsOverride[M] - : Extract["params"]; + : unknown; export type CodexAppServerRequestResult = M extends keyof CodexAppServerRequestResultMap @@ -40,44 +31,270 @@ export type RpcResponse = { export type RpcMessage = RpcRequest | RpcResponse; -export type CodexInitializeParams = GeneratedInitializeParams; - -export type CodexInitializeResponse = GeneratedInitializeResponse; - -export type CodexUserInput = v2.UserInput; - -export type CodexDynamicToolSpec = v2.DynamicToolSpec; - -export type CodexThreadStartParams = v2.ThreadStartParams & { - dynamicTools?: CodexDynamicToolSpec[] | null; +export type CodexInitializeParams = { + clientInfo: { + name: string; + title?: string; + version?: string; + }; + capabilities?: JsonObject; }; -export type CodexThreadResumeParams = v2.ThreadResumeParams; +export type CodexInitializeResponse = { + serverInfo?: { + name?: string; + version?: string; + }; + protocolVersion?: string; + userAgent?: string; +}; -export type CodexThreadStartResponse = v2.ThreadStartResponse; +export type CodexUserInput = + | { + type: "text"; + text: string; + text_elements?: JsonValue[]; + } + | { + type: "image"; + url: string; + } + | { + type: "localImage"; + path: string; + }; -export type CodexThreadResumeResponse = v2.ThreadResumeResponse; +export type CodexDynamicToolSpec = JsonObject & { + name: string; + description: string; + inputSchema: JsonValue; +}; -export type CodexTurnStartParams = v2.TurnStartParams; +export type CodexThreadStartParams = JsonObject & { + input?: CodexUserInput[]; + cwd?: string; + model?: string; + modelProvider?: string | null; + approvalPolicy?: string; + approvalsReviewer?: string | null; + sandbox?: CodexSandboxPolicy; + serviceTier?: CodexServiceTier | null; + dynamicTools?: CodexDynamicToolSpec[] | null; + developerInstructions?: string; + experimentalRawEvents?: boolean; + persistExtendedHistory?: boolean; +}; -export type CodexSandboxPolicy = v2.SandboxPolicy; +export type CodexThreadResumeParams = JsonObject & { + threadId: string; + model?: string; + modelProvider?: string | null; +}; -export type CodexTurnStartResponse = v2.TurnStartResponse; +export type CodexThreadStartResponse = { + thread: CodexThread; + model: string; + modelProvider?: string | null; +}; -export type CodexTurn = v2.Turn; +export type CodexThreadResumeResponse = { + thread: CodexThread; + model: string; + modelProvider?: string | null; +}; -export type CodexThreadItem = v2.ThreadItem; +export type CodexTurnStartParams = JsonObject & { + threadId: string; + input?: CodexUserInput[]; + cwd?: string; + model?: string; + approvalPolicy?: string; + approvalsReviewer?: string | null; + sandboxPolicy?: CodexSandboxPolicy; + serviceTier?: CodexServiceTier | null; + effort?: string | null; + collaborationMode?: { + mode: string; + settings: JsonObject & { + developer_instructions: string | null; + }; + } | null; +}; + +export type CodexSandboxPolicy = string | JsonObject; + +export type CodexTurnStartResponse = { + turn: CodexTurn; +}; + +export type CodexTurn = { + id: string; + threadId: string; + status?: string; + error?: CodexErrorNotification["error"]; + startedAt?: string | null; + completedAt?: string | null; + durationMs?: number | null; + items: CodexThreadItem[]; +}; + +export type CodexThread = { + id: string; + name?: string | null; + cwd?: string | null; +}; + +export type CodexThreadItem = { + id: string; + type: string; + title: string | null; + status: string | null; + name: string | null; + tool: string | null; + server: string | null; + command: string | null; + cwd: string | null; + query: string | null; + arguments?: JsonValue; + result?: JsonValue; + error?: CodexErrorNotification["error"]; + exitCode?: number | null; + durationMs?: number | null; + aggregatedOutput: string | null; + text: string; + contentItems?: CodexDynamicToolCallOutputContentItem[] | null; + changes: Array<{ path: string; kind: string }>; + [key: string]: unknown; +}; export type CodexServerNotification = { method: string; params?: JsonValue; }; -export type CodexDynamicToolCallParams = v2.DynamicToolCallParams; +export type CodexDynamicToolCallParams = { + namespace?: string | null; + threadId: string; + turnId: string; + callId: string; + tool: string; + arguments?: JsonValue; +}; -export type CodexDynamicToolCallResponse = v2.DynamicToolCallResponse; +export type CodexDynamicToolCallResponse = { + contentItems: CodexDynamicToolCallOutputContentItem[]; + success: boolean; +}; -export type CodexDynamicToolCallOutputContentItem = v2.DynamicToolCallOutputContentItem; +export type CodexDynamicToolCallOutputContentItem = + | { + type: "inputText"; + text: string; + } + | { + type: "inputImage"; + imageUrl: string; + } + | JsonObject; + +export type CodexErrorNotification = { + error: { + message?: string; + codexErrorInfo?: { + message?: string; + [key: string]: unknown; + }; + [key: string]: unknown; + }; + message?: string; +}; + +export type CodexTurnCompletedNotification = { + turn: CodexTurn; +}; + +export type CodexModel = { + id?: string; + model?: string; + displayName?: string | null; + description?: string | null; + hidden: boolean; + isDefault: boolean; + inputModalities: string[]; + supportedReasoningEfforts: CodexReasoningEffortOption[]; + defaultReasoningEffort?: string | null; +}; + +export type CodexReasoningEffortOption = { + reasoningEffort?: string | null; +}; + +export type CodexModelListResponse = { + data: CodexModel[]; + nextCursor?: string | null; +}; + +export type CodexGetAccountResponse = { + account?: JsonValue; + requiresOpenaiAuth?: boolean; +}; + +export type CodexChatgptAuthTokensRefreshResponse = { + accessToken: string; + chatgptAccountId: string; + chatgptPlanType: string | null; +}; + +export type CodexLoginAccountParams = + | { + type: "apiKey"; + apiKey: string; + } + | { + type: "chatgptAuthTokens"; + accessToken: string; + chatgptAccountId: string; + chatgptPlanType: string | null; + }; + +export type CodexPluginSummary = { + id?: string; + name?: string; + installed: boolean; + enabled: boolean; +}; + +export type CodexPluginDetail = { + summary: CodexPluginSummary; + marketplaceName?: string; + marketplacePath?: string | null; +}; + +export type CodexPluginMarketplaceEntry = { + name: string; + path?: string | null; + plugins: CodexPluginSummary[]; +}; + +export type CodexPluginListResponse = { + marketplaces: CodexPluginMarketplaceEntry[]; +}; + +export type CodexPluginReadResponse = { + plugin: CodexPluginDetail; +}; + +export type CodexMcpServerStatus = { + name: string; + tools: JsonObject; +}; + +export type CodexListMcpServerStatusResponse = { + data: CodexMcpServerStatus[]; + nextCursor?: string | null; +}; + +export type CodexRequestObject = Record; type CodexAppServerRequestParamsOverride = { "thread/start": CodexThreadStartParams; @@ -85,20 +302,20 @@ type CodexAppServerRequestParamsOverride = { type CodexAppServerRequestResultMap = { initialize: CodexInitializeResponse; - "account/rateLimits/read": v2.GetAccountRateLimitsResponse; - "account/read": v2.GetAccountResponse; - "feedback/upload": v2.FeedbackUploadResponse; - "mcpServerStatus/list": v2.ListMcpServerStatusResponse; - "model/list": v2.ModelListResponse; - "review/start": v2.ReviewStartResponse; - "skills/list": v2.SkillsListResponse; - "thread/compact/start": v2.ThreadCompactStartResponse; - "thread/list": v2.ThreadListResponse; + "account/rateLimits/read": JsonValue; + "account/read": CodexGetAccountResponse; + "feedback/upload": JsonValue; + "mcpServerStatus/list": CodexListMcpServerStatusResponse; + "model/list": CodexModelListResponse; + "review/start": JsonValue; + "skills/list": JsonValue; + "thread/compact/start": JsonValue; + "thread/list": JsonValue; "thread/resume": CodexThreadResumeResponse; "thread/start": CodexThreadStartResponse; - "turn/interrupt": v2.TurnInterruptResponse; + "turn/interrupt": JsonValue; "turn/start": CodexTurnStartResponse; - "turn/steer": v2.TurnSteerResponse; + "turn/steer": JsonValue; }; export function isJsonObject(value: JsonValue | undefined): value is JsonObject { diff --git a/extensions/deepseek/index.test.ts b/extensions/deepseek/index.test.ts index 07f9c36f833..9cc0ed8ecb7 100644 --- a/extensions/deepseek/index.test.ts +++ b/extensions/deepseek/index.test.ts @@ -16,6 +16,30 @@ type PayloadCapture = { payload?: Record; }; +const emptyUsage = { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + totalTokens: 0, + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, +}; + +const readToolCall = { type: "toolCall", id: "call_1", name: "read", arguments: {} }; +const readToolResult = { + role: "toolResult", + toolCallId: "call_1", + toolName: "read", + content: [{ type: "text", text: "ok" }], + isError: false, + timestamp: 3, +}; +const readTool = { + name: "read", + description: "Read data", + parameters: { type: "object", properties: {}, required: [], additionalProperties: false }, +}; + function deepSeekV4Model(id: "deepseek-v4-flash" | "deepseek-v4-pro"): OpenAICompletionsModel { return { provider: "deepseek", @@ -36,6 +60,49 @@ function deepSeekV4Model(id: "deepseek-v4-flash" | "deepseek-v4-pro"): OpenAICom } as OpenAICompletionsModel; } +function replayAssistantMessage(params: { + provider: string; + model: string; + content: Array>; + stopReason: "stop" | "toolUse"; +}) { + return { + role: "assistant", + api: "openai-completions", + provider: params.provider, + model: params.model, + content: params.content, + usage: emptyUsage, + stopReason: params.stopReason, + timestamp: 2, + }; +} + +function readToolReplayContext(assistantMessage: ReturnType) { + return { + messages: [{ role: "user", content: "hi", timestamp: 1 }, assistantMessage, readToolResult], + tools: [readTool], + } as Context; +} + +function deepSeekReasoningToolReplayContext() { + return readToolReplayContext( + replayAssistantMessage({ + provider: "deepseek", + model: "deepseek-v4-flash", + content: [ + { + type: "thinking", + thinking: "call reasoning", + thinkingSignature: "reasoning_content", + }, + readToolCall, + ], + stopReason: "toolUse", + }), + ); +} + function createPayloadCapturingStream(capture: PayloadCapture) { return ( streamModel: OpenAICompletionsModel, @@ -194,50 +261,7 @@ describe("deepseek provider plugin", () => { it("preserves replayed reasoning_content when DeepSeek V4 thinking is enabled", async () => { const capture: PayloadCapture = {}; const model = deepSeekV4Model("deepseek-v4-flash"); - const context = { - messages: [ - { role: "user", content: "hi", timestamp: 1 }, - { - role: "assistant", - api: "openai-completions", - provider: "deepseek", - model: "deepseek-v4-flash", - content: [ - { - type: "thinking", - thinking: "call reasoning", - thinkingSignature: "reasoning_content", - }, - { type: "toolCall", id: "call_1", name: "read", arguments: {} }, - ], - usage: { - input: 0, - output: 0, - cacheRead: 0, - cacheWrite: 0, - totalTokens: 0, - cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, - }, - stopReason: "toolUse", - timestamp: 2, - }, - { - role: "toolResult", - toolCallId: "call_1", - toolName: "read", - content: [{ type: "text", text: "ok" }], - isError: false, - timestamp: 3, - }, - ], - tools: [ - { - name: "read", - description: "Read data", - parameters: { type: "object", properties: {}, required: [], additionalProperties: false }, - }, - ], - } as Context; + const context = deepSeekReasoningToolReplayContext(); const baseStreamFn = createPayloadCapturingStream(capture); const wrapThinkingHigh = createDeepSeekV4ThinkingWrapper(baseStreamFn as never, "high"); @@ -267,43 +291,14 @@ describe("deepseek provider plugin", () => { it("adds blank reasoning_content for replayed tool calls from non-DeepSeek turns", async () => { const capture: PayloadCapture = {}; const model = deepSeekV4Model("deepseek-v4-pro"); - const context = { - messages: [ - { role: "user", content: "hi", timestamp: 1 }, - { - role: "assistant", - api: "openai-completions", - provider: "openai", - model: "gpt-5.4", - content: [{ type: "toolCall", id: "call_1", name: "read", arguments: {} }], - usage: { - input: 0, - output: 0, - cacheRead: 0, - cacheWrite: 0, - totalTokens: 0, - cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, - }, - stopReason: "toolUse", - timestamp: 2, - }, - { - role: "toolResult", - toolCallId: "call_1", - toolName: "read", - content: [{ type: "text", text: "ok" }], - isError: false, - timestamp: 3, - }, - ], - tools: [ - { - name: "read", - description: "Read data", - parameters: { type: "object", properties: {}, required: [], additionalProperties: false }, - }, - ], - } as Context; + const context = readToolReplayContext( + replayAssistantMessage({ + provider: "openai", + model: "gpt-5.4", + content: [readToolCall], + stopReason: "toolUse", + }), + ); const baseStreamFn = createPayloadCapturingStream(capture); const wrapThinkingHigh = createDeepSeekV4ThinkingWrapper(baseStreamFn as never, "high"); @@ -332,23 +327,12 @@ describe("deepseek provider plugin", () => { const context = { messages: [ { role: "user", content: "hi", timestamp: 1 }, - { - role: "assistant", - api: "openai-completions", + replayAssistantMessage({ provider: "openai", model: "gpt-5.4", content: [{ type: "text", text: "Hello." }], - usage: { - input: 0, - output: 0, - cacheRead: 0, - cacheWrite: 0, - totalTokens: 0, - cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, - }, stopReason: "stop", - timestamp: 2, - }, + }), { role: "user", content: "next", timestamp: 3 }, ], } as Context; @@ -368,50 +352,7 @@ describe("deepseek provider plugin", () => { it("strips replayed reasoning_content when DeepSeek V4 thinking is disabled", async () => { const capture: PayloadCapture = {}; const model = deepSeekV4Model("deepseek-v4-flash"); - const context = { - messages: [ - { role: "user", content: "hi", timestamp: 1 }, - { - role: "assistant", - api: "openai-completions", - provider: "deepseek", - model: "deepseek-v4-flash", - content: [ - { - type: "thinking", - thinking: "call reasoning", - thinkingSignature: "reasoning_content", - }, - { type: "toolCall", id: "call_1", name: "read", arguments: {} }, - ], - usage: { - input: 0, - output: 0, - cacheRead: 0, - cacheWrite: 0, - totalTokens: 0, - cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }, - }, - stopReason: "toolUse", - timestamp: 2, - }, - { - role: "toolResult", - toolCallId: "call_1", - toolName: "read", - content: [{ type: "text", text: "ok" }], - isError: false, - timestamp: 3, - }, - ], - tools: [ - { - name: "read", - description: "Read data", - parameters: { type: "object", properties: {}, required: [], additionalProperties: false }, - }, - ], - } as Context; + const context = deepSeekReasoningToolReplayContext(); const baseStreamFn = createPayloadCapturingStream(capture); const wrapThinkingNone = createDeepSeekV4ThinkingWrapper( diff --git a/extensions/discord/src/channel.test.ts b/extensions/discord/src/channel.test.ts index b9f1ea85d94..4f06904e645 100644 --- a/extensions/discord/src/channel.test.ts +++ b/extensions/discord/src/channel.test.ts @@ -173,33 +173,6 @@ describe("discordPlugin outbound", () => { }); }); - it("resolves bare allowlisted Discord user IDs as message-tool DM targets", async () => { - const resolveTarget = discordPlugin.messaging?.targetResolver?.resolveTarget; - if (!resolveTarget) { - throw new Error( - "Expected discordPlugin.messaging.targetResolver.resolveTarget to be defined", - ); - } - - await expect( - resolveTarget({ - cfg: { - channels: { - discord: { - allowFrom: ["1439091261670948987"], - }, - }, - } as OpenClawConfig, - input: "1439091261670948987", - normalized: "channel:1439091261670948987", - preferredKind: "channel", - }), - ).resolves.toMatchObject({ - to: "user:1439091261670948987", - kind: "user", - }); - }); - it("honors per-account replyToMode overrides", () => { const resolveReplyToMode = discordPlugin.threading?.resolveReplyToMode; if (!resolveReplyToMode) { diff --git a/extensions/discord/src/channel.ts b/extensions/discord/src/channel.ts index ce393579e9d..a9941ea9f0f 100644 --- a/extensions/discord/src/channel.ts +++ b/extensions/discord/src/channel.ts @@ -80,7 +80,6 @@ import { discordSetupAdapter } from "./setup-adapter.js"; import { createDiscordPluginBase, discordConfigAdapter } from "./shared.js"; import { collectDiscordStatusIssues } from "./status-issues.js"; import { parseDiscordTarget } from "./target-parsing.js"; -import { resolveDiscordTarget } from "./target-resolver.js"; const DISCORD_ACCOUNT_STARTUP_STAGGER_MS = 10_000; const discordMessageAdapter = createChannelMessageAdapterFromOutbound({ @@ -327,21 +326,6 @@ export const discordPlugin: ChannelPlugin targetResolver: { looksLikeId: looksLikeDiscordTargetId, hint: "", - resolveTarget: async ({ cfg, accountId, input, preferredKind }) => { - const target = await resolveDiscordTarget( - input, - { cfg, accountId: accountId ?? undefined }, - { defaultKind: preferredKind === "user" ? "user" : "channel" }, - ); - return target - ? { - to: target.normalized, - kind: target.kind, - display: target.raw, - source: "normalized", - } - : null; - }, }, }, approvalCapability: getDiscordApprovalCapability(), diff --git a/extensions/discord/src/normalize.ts b/extensions/discord/src/normalize.ts index b755fa27650..2a5dddf4822 100644 --- a/extensions/discord/src/normalize.ts +++ b/extensions/discord/src/normalize.ts @@ -31,9 +31,6 @@ export function normalizeDiscordOutboundTarget( } return { ok: true, to: `channel:${trimmed}` }; } - if (/^discord:(?:channel|user):/i.test(trimmed)) { - return { ok: true, to: normalizeDiscordMessagingTarget(trimmed) ?? trimmed }; - } return { ok: true, to: trimmed }; } diff --git a/extensions/discord/src/outbound-adapter.test.ts b/extensions/discord/src/outbound-adapter.test.ts index fc552152e79..96719ca5502 100644 --- a/extensions/discord/src/outbound-adapter.test.ts +++ b/extensions/discord/src/outbound-adapter.test.ts @@ -30,13 +30,6 @@ describe("normalizeDiscordOutboundTarget", () => { expect(normalizeDiscordOutboundTarget("channel:123")).toEqual({ ok: true, to: "channel:123" }); }); - it("normalizes provider-prefixed channel targets", () => { - expect(normalizeDiscordOutboundTarget("discord:channel:123")).toEqual({ - ok: true, - to: "channel:123", - }); - }); - it("passes through user: prefixed targets", () => { expect(normalizeDiscordOutboundTarget("user:123")).toEqual({ ok: true, to: "user:123" }); }); diff --git a/extensions/discord/src/outbound-session-route.test.ts b/extensions/discord/src/outbound-session-route.test.ts index 66cf2925fcf..1d492163df6 100644 --- a/extensions/discord/src/outbound-session-route.test.ts +++ b/extensions/discord/src/outbound-session-route.test.ts @@ -31,36 +31,4 @@ describe("resolveDiscordOutboundSessionRoute", () => { }); expect(route?.threadId).toBeUndefined(); }); - - it("routes provider-prefixed channel targets as channels", () => { - const route = resolveDiscordOutboundSessionRoute({ - cfg: {}, - agentId: "main", - target: "discord:channel:123", - }); - - expect(route).toMatchObject({ - sessionKey: "agent:main:discord:channel:123", - baseSessionKey: "agent:main:discord:channel:123", - chatType: "channel", - from: "discord:channel:123", - to: "channel:123", - }); - }); - - it("keeps legacy provider-prefixed numeric targets as direct messages", () => { - const route = resolveDiscordOutboundSessionRoute({ - cfg: {}, - agentId: "main", - target: "discord:123", - }); - - expect(route).toMatchObject({ - sessionKey: "agent:main:main", - baseSessionKey: "agent:main:main", - chatType: "direct", - from: "discord:123", - to: "user:123", - }); - }); }); diff --git a/extensions/discord/src/target-parsing.ts b/extensions/discord/src/target-parsing.ts index 2f73b6d9b74..b76ec3dc496 100644 --- a/extensions/discord/src/target-parsing.ts +++ b/extensions/discord/src/target-parsing.ts @@ -21,10 +21,6 @@ export function parseDiscordTarget( if (!trimmed) { return undefined; } - const providerPrefixedTarget = parseDiscordProviderPrefixedTarget(trimmed); - if (providerPrefixedTarget) { - return providerPrefixedTarget; - } const userTarget = parseMentionPrefixOrAtUserTarget({ raw: trimmed, mentionPattern: /^<@!?(\d+)>$/, @@ -51,19 +47,6 @@ export function parseDiscordTarget( return buildMessagingTarget("channel", trimmed, trimmed); } -function parseDiscordProviderPrefixedTarget(raw: string): DiscordTarget | undefined { - const match = /^discord:(channel|user):(.+)$/i.exec(raw); - if (!match) { - return undefined; - } - const kind = match[1]?.toLowerCase() as "channel" | "user" | undefined; - const id = match[2]?.trim(); - if (!kind || !id) { - return undefined; - } - return buildMessagingTarget(kind, id, `${kind}:${id}`); -} - export function resolveDiscordChannelId(raw: string): string { const target = parseDiscordTarget(raw, { defaultKind: "channel" }); return requireTargetKind({ platform: "Discord", target, kind: "channel" }); diff --git a/extensions/discord/src/targets.test.ts b/extensions/discord/src/targets.test.ts index 2ab69a5f10f..fbac86c248d 100644 --- a/extensions/discord/src/targets.test.ts +++ b/extensions/discord/src/targets.test.ts @@ -18,7 +18,6 @@ describe("parseDiscordTarget", () => { { input: "<@123>", id: "123", normalized: "user:123" }, { input: "<@!456>", id: "456", normalized: "user:456" }, { input: "user:789", id: "789", normalized: "user:789" }, - { input: "discord:user:789", id: "789", normalized: "user:789" }, { input: "discord:987", id: "987", normalized: "user:987" }, ] as const; for (const testCase of cases) { @@ -33,7 +32,6 @@ describe("parseDiscordTarget", () => { it("parses channel targets", () => { const cases = [ { input: "channel:555", id: "555", normalized: "channel:555" }, - { input: "discord:channel:555", id: "555", normalized: "channel:555" }, { input: "general", id: "general", normalized: "channel:general" }, ] as const; for (const testCase of cases) { @@ -227,10 +225,6 @@ describe("normalizeDiscordMessagingTarget", () => { it("defaults raw numeric ids to channels", () => { expect(normalizeDiscordMessagingTarget("123")).toBe("channel:123"); }); - - it("normalizes provider-prefixed channel targets as channels", () => { - expect(normalizeDiscordMessagingTarget("discord:channel:123")).toBe("channel:123"); - }); }); describe("discord group policy", () => { diff --git a/extensions/memory-core/src/memory/search-manager.test.ts b/extensions/memory-core/src/memory/search-manager.test.ts index f54d23c1a77..bca6bced6f3 100644 --- a/extensions/memory-core/src/memory/search-manager.test.ts +++ b/extensions/memory-core/src/memory/search-manager.test.ts @@ -73,14 +73,18 @@ function createManagerMock(params: { }; } -const mockPrimary = vi.hoisted(() => ({ - ...createManagerMock({ +function createQmdManagerInstanceMock() { + return createManagerMock({ backend: "qmd", provider: "qmd", model: "qmd", requestedProvider: "qmd", withMemorySourceCounts: true, - }), + }); +} + +const mockPrimary = vi.hoisted(() => ({ + ...createQmdManagerInstanceMock(), })); const fallbackManager = vi.hoisted(() => ({ @@ -193,6 +197,58 @@ async function createFailedQmdSearchHarness(params: { agentId: string; errorMess return { cfg, manager: requireManager(first), firstResult: first }; } +async function expectPendingQmdReplacement(params: { + agentId: string; + firstCfg: OpenClawConfig; + secondCfg: OpenClawConfig; + firstAvailability: { command: string; cwd: string }; + secondAvailability: { command: string; cwd: string }; +}) { + const firstPrimary = createQmdManagerInstanceMock(); + const secondPrimary = createQmdManagerInstanceMock(); + const firstGate = createDeferred(); + const secondGate = createDeferred(); + createQmdManagerMock + .mockImplementationOnce(async () => await firstGate.promise) + .mockImplementationOnce(async () => await secondGate.promise); + + const firstPromise = getMemorySearchManager({ + cfg: params.firstCfg, + agentId: params.agentId, + }); + await Promise.resolve(); + const secondPromise = getMemorySearchManager({ + cfg: params.secondCfg, + agentId: params.agentId, + }); + await vi.waitFor(() => { + expect(createQmdManagerMock).toHaveBeenCalledTimes(1); + }); + + firstGate.resolve(firstPrimary as unknown as QmdManagerInstance); + await vi.waitFor(() => { + expect(createQmdManagerMock).toHaveBeenCalledTimes(2); + }); + + secondGate.resolve(secondPrimary as unknown as QmdManagerInstance); + const [first, second] = await Promise.all([firstPromise, secondPromise]); + + requireManager(first); + requireManager(second); + expect(first.manager).not.toBe(second.manager); + expect(firstPrimary.close).toHaveBeenCalledTimes(1); + expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, { + command: params.firstAvailability.command, + env: process.env, + cwd: nativePath(params.firstAvailability.cwd), + }); + expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, { + command: params.secondAvailability.command, + env: process.env, + cwd: nativePath(params.secondAvailability.cwd), + }); +} + beforeEach(async () => { await closeAllMemorySearchManagers(); mockPrimary.search.mockClear(); @@ -544,60 +600,12 @@ describe("getMemorySearchManager caching", () => { const agentId = "pending-qmd-workspace-reload"; const firstCfg = createQmdCfg(agentId, "/tmp/workspace-a"); const secondCfg = createQmdCfg(agentId, "/tmp/workspace-b"); - const firstPrimary = createManagerMock({ - backend: "qmd", - provider: "qmd", - model: "qmd", - requestedProvider: "qmd", - withMemorySourceCounts: true, - }); - const secondPrimary = createManagerMock({ - backend: "qmd", - provider: "qmd", - model: "qmd", - requestedProvider: "qmd", - withMemorySourceCounts: true, - }); - const firstGate = createDeferred(); - const secondGate = createDeferred(); - createQmdManagerMock - .mockImplementationOnce(async () => await firstGate.promise) - .mockImplementationOnce(async () => await secondGate.promise); - - const firstPromise = getMemorySearchManager({ cfg: firstCfg, agentId }); - await Promise.resolve(); - const secondPromise = getMemorySearchManager({ cfg: secondCfg, agentId }); - await vi.waitFor( - () => { - expect(createQmdManagerMock).toHaveBeenCalledTimes(1); - }, - { interval: 1 }, - ); - - firstGate.resolve(firstPrimary as unknown as QmdManagerInstance); - await vi.waitFor( - () => { - expect(createQmdManagerMock).toHaveBeenCalledTimes(2); - }, - { interval: 1 }, - ); - - secondGate.resolve(secondPrimary as unknown as QmdManagerInstance); - const [first, second] = await Promise.all([firstPromise, secondPromise]); - - requireManager(first); - requireManager(second); - expect(first.manager).not.toBe(second.manager); - expect(firstPrimary.close).toHaveBeenCalledTimes(1); - expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, { - command: "qmd", - env: process.env, - cwd: nativePath("/tmp/workspace-a"), - }); - expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, { - command: "qmd", - env: process.env, - cwd: nativePath("/tmp/workspace-b"), + await expectPendingQmdReplacement({ + agentId, + firstCfg, + secondCfg, + firstAvailability: { command: "qmd", cwd: "/tmp/workspace-a" }, + secondAvailability: { command: "qmd", cwd: "/tmp/workspace-b" }, }); }); @@ -605,60 +613,12 @@ describe("getMemorySearchManager caching", () => { const agentId = "pending-qmd-config-reload"; const firstCfg = createQmdCfg(agentId, "/tmp/workspace", { command: "qmd" }); const secondCfg = createQmdCfg(agentId, "/tmp/workspace", { command: "qmd-alt" }); - const firstPrimary = createManagerMock({ - backend: "qmd", - provider: "qmd", - model: "qmd", - requestedProvider: "qmd", - withMemorySourceCounts: true, - }); - const secondPrimary = createManagerMock({ - backend: "qmd", - provider: "qmd", - model: "qmd", - requestedProvider: "qmd", - withMemorySourceCounts: true, - }); - const firstGate = createDeferred(); - const secondGate = createDeferred(); - createQmdManagerMock - .mockImplementationOnce(async () => await firstGate.promise) - .mockImplementationOnce(async () => await secondGate.promise); - - const firstPromise = getMemorySearchManager({ cfg: firstCfg, agentId }); - await Promise.resolve(); - const secondPromise = getMemorySearchManager({ cfg: secondCfg, agentId }); - await vi.waitFor( - () => { - expect(createQmdManagerMock).toHaveBeenCalledTimes(1); - }, - { interval: 1 }, - ); - - firstGate.resolve(firstPrimary as unknown as QmdManagerInstance); - await vi.waitFor( - () => { - expect(createQmdManagerMock).toHaveBeenCalledTimes(2); - }, - { interval: 1 }, - ); - - secondGate.resolve(secondPrimary as unknown as QmdManagerInstance); - const [first, second] = await Promise.all([firstPromise, secondPromise]); - - requireManager(first); - requireManager(second); - expect(first.manager).not.toBe(second.manager); - expect(firstPrimary.close).toHaveBeenCalledTimes(1); - expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(1, { - command: "qmd", - env: process.env, - cwd: nativePath("/tmp/workspace"), - }); - expect(checkQmdBinaryAvailability).toHaveBeenNthCalledWith(2, { - command: "qmd-alt", - env: process.env, - cwd: nativePath("/tmp/workspace"), + await expectPendingQmdReplacement({ + agentId, + firstCfg, + secondCfg, + firstAvailability: { command: "qmd", cwd: "/tmp/workspace" }, + secondAvailability: { command: "qmd-alt", cwd: "/tmp/workspace" }, }); }); diff --git a/extensions/qa-lab/src/mantis/crabbox-runtime.ts b/extensions/qa-lab/src/mantis/crabbox-runtime.ts new file mode 100644 index 00000000000..daeae7770bf --- /dev/null +++ b/extensions/qa-lab/src/mantis/crabbox-runtime.ts @@ -0,0 +1,208 @@ +import { spawn, type SpawnOptions } from "node:child_process"; +import path from "node:path"; +import { pathExists } from "openclaw/plugin-sdk/security-runtime"; + +export type CommandResult = { + stderr: string; + stdout: string; +}; + +export type CommandRunner = ( + command: string, + args: readonly string[], + options: SpawnOptions, +) => Promise; + +export type CrabboxInspect = { + host?: string; + id?: string; + provider?: string; + ready?: boolean; + slug?: string; + sshKey?: string; + sshPort?: string; + sshUser?: string; + state?: string; +}; + +function trimToValue(value: string | undefined) { + const trimmed = value?.trim(); + return trimmed && trimmed.length > 0 ? trimmed : undefined; +} + +export async function defaultCommandRunner( + command: string, + args: readonly string[], + options: SpawnOptions, +): Promise { + return new Promise((resolve, reject) => { + const child = spawn(command, args, { + ...options, + stdio: ["ignore", "pipe", "pipe"], + }); + let stdout = ""; + let stderr = ""; + child.stdout?.on("data", (chunk: Buffer) => { + const text = chunk.toString(); + stdout += text; + if (options.stdio === "inherit") { + process.stdout.write(text); + } + }); + child.stderr?.on("data", (chunk: Buffer) => { + const text = chunk.toString(); + stderr += text; + if (options.stdio === "inherit") { + process.stderr.write(text); + } + }); + child.on("error", reject); + child.on("close", (code, signal) => { + if (code === 0) { + resolve({ stdout, stderr }); + return; + } + const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`; + reject(new Error(`${command} ${args.join(" ")} failed with ${detail}`)); + }); + }); +} + +export async function resolveCrabboxBin(params: { + env: NodeJS.ProcessEnv; + envName: string; + explicit?: string; + repoRoot: string; +}) { + const configured = trimToValue(params.explicit) ?? trimToValue(params.env[params.envName]); + if (configured) { + return configured; + } + const sibling = path.resolve(params.repoRoot, "../crabbox/bin/crabbox"); + if (await pathExists(sibling)) { + return sibling; + } + return "crabbox"; +} + +export function extractLeaseId(output: string) { + return output.match(/\b(?:cbx_[a-f0-9]+|tbx_[A-Za-z0-9_-]+)\b/u)?.[0]; +} + +export function shellQuote(value: string) { + return `'${value.replaceAll("'", "'\\''")}'`; +} + +export async function runCommand(params: { + args: readonly string[]; + command: string; + cwd: string; + env: NodeJS.ProcessEnv; + runner: CommandRunner; + stdio?: "inherit" | "pipe"; +}) { + return params.runner(params.command, params.args, { + cwd: params.cwd, + env: params.env, + stdio: params.stdio ?? "pipe", + }); +} + +export async function warmupCrabbox(params: { + crabboxBin: string; + cwd: string; + env: NodeJS.ProcessEnv; + idleTimeout: string; + machineClass: string; + provider: string; + runner: CommandRunner; + ttl: string; +}) { + const result = await runCommand({ + command: params.crabboxBin, + args: [ + "warmup", + "--provider", + params.provider, + "--desktop", + "--browser", + "--class", + params.machineClass, + "--idle-timeout", + params.idleTimeout, + "--ttl", + params.ttl, + ], + cwd: params.cwd, + env: params.env, + runner: params.runner, + stdio: "inherit", + }); + const leaseId = extractLeaseId(`${result.stdout}\n${result.stderr}`); + if (!leaseId) { + throw new Error("Crabbox warmup did not print a lease id."); + } + return leaseId; +} + +export async function inspectCrabbox(params: { + crabboxBin: string; + cwd: string; + env: NodeJS.ProcessEnv; + leaseId: string; + provider: string; + runner: CommandRunner; +}) { + const result = await runCommand({ + command: params.crabboxBin, + args: ["inspect", "--provider", params.provider, "--id", params.leaseId, "--json"], + cwd: params.cwd, + env: params.env, + runner: params.runner, + }); + return JSON.parse(result.stdout) as CrabboxInspect; +} + +export async function stopCrabbox(params: { + crabboxBin: string; + cwd: string; + env: NodeJS.ProcessEnv; + leaseId: string; + provider: string; + runner: CommandRunner; +}) { + await runCommand({ + command: params.crabboxBin, + args: ["stop", "--provider", params.provider, params.leaseId], + cwd: params.cwd, + env: params.env, + runner: params.runner, + stdio: "inherit", + }); +} + +export function sshCommand(params: { inspect: CrabboxInspect }) { + const { host, sshKey, sshPort, sshUser } = params.inspect; + if (!host || !sshKey || !sshUser) { + throw new Error("Crabbox inspect output is missing SSH copy details."); + } + return { + host, + sshArgs: [ + "ssh", + "-i", + shellQuote(sshKey), + "-p", + sshPort ?? "22", + "-o", + "BatchMode=yes", + "-o", + "ConnectTimeout=15", + "-o", + "StrictHostKeyChecking=no", + "-o", + "UserKnownHostsFile=/dev/null", + ].join(" "), + sshUser, + }; +} diff --git a/extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts b/extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts index 4a67982146d..74a710aa8eb 100644 --- a/extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts +++ b/extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts @@ -1,10 +1,21 @@ -import { spawn, type SpawnOptions } from "node:child_process"; import fs from "node:fs/promises"; import path from "node:path"; import { pathToFileURL } from "node:url"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { pathExists } from "openclaw/plugin-sdk/security-runtime"; import { ensureRepoBoundDirectory, resolveRepoRelativeOutputDir } from "../cli-paths.js"; +import { + type CommandRunner, + type CrabboxInspect, + defaultCommandRunner, + inspectCrabbox, + resolveCrabboxBin, + runCommand, + shellQuote, + sshCommand, + stopCrabbox, + warmupCrabbox, +} from "./crabbox-runtime.js"; export type MantisDesktopBrowserSmokeOptions = { browserProfileArchiveEnv?: string; @@ -35,29 +46,6 @@ export type MantisDesktopBrowserSmokeResult = { videoPath?: string; }; -type CommandResult = { - stderr: string; - stdout: string; -}; - -type CommandRunner = ( - command: string, - args: readonly string[], - options: SpawnOptions, -) => Promise; - -type CrabboxInspect = { - host?: string; - id?: string; - provider?: string; - ready?: boolean; - slug?: string; - sshKey?: string; - sshPort?: string; - sshUser?: string; - state?: string; -}; - type MantisDesktopBrowserSmokeSummary = { artifacts: { reportPath: string; @@ -115,68 +103,6 @@ function defaultOutputDir(repoRoot: string, startedAt: Date) { return path.join(repoRoot, ".artifacts", "qa-e2e", "mantis", `desktop-browser-${stamp}`); } -async function defaultCommandRunner( - command: string, - args: readonly string[], - options: SpawnOptions, -): Promise { - return new Promise((resolve, reject) => { - const child = spawn(command, args, { - ...options, - stdio: ["ignore", "pipe", "pipe"], - }); - let stdout = ""; - let stderr = ""; - child.stdout?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stdout += text; - if (options.stdio === "inherit") { - process.stdout.write(text); - } - }); - child.stderr?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stderr += text; - if (options.stdio === "inherit") { - process.stderr.write(text); - } - }); - child.on("error", reject); - child.on("close", (code, signal) => { - if (code === 0) { - resolve({ stdout, stderr }); - return; - } - const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`; - reject(new Error(`${command} ${args.join(" ")} failed with ${detail}`)); - }); - }); -} - -async function resolveCrabboxBin(params: { - env: NodeJS.ProcessEnv; - explicit?: string; - repoRoot: string; -}) { - const configured = trimToValue(params.explicit) ?? trimToValue(params.env[CRABBOX_BIN_ENV]); - if (configured) { - return configured; - } - const sibling = path.resolve(params.repoRoot, "../crabbox/bin/crabbox"); - if (await pathExists(sibling)) { - return sibling; - } - return "crabbox"; -} - -function extractLeaseId(output: string) { - return output.match(/\b(?:cbx_[a-f0-9]+|tbx_[A-Za-z0-9_-]+)\b/u)?.[0]; -} - -function shellQuote(value: string) { - return `'${value.replaceAll("'", "'\\''")}'`; -} - function assertSafeEnvName(value: string, label: string) { if (!/^[A-Za-z_][A-Za-z0-9_]*$/u.test(value)) { throw new Error(`${label} must be an environment variable name.`); @@ -364,76 +290,6 @@ function renderReport(summary: MantisDesktopBrowserSmokeSummary) { return `${lines.join("\n")}\n`; } -async function runCommand(params: { - args: readonly string[]; - command: string; - cwd: string; - env: NodeJS.ProcessEnv; - runner: CommandRunner; - stdio?: "inherit" | "pipe"; -}) { - return params.runner(params.command, params.args, { - cwd: params.cwd, - env: params.env, - stdio: params.stdio ?? "pipe", - }); -} - -async function warmupCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - idleTimeout: string; - machineClass: string; - provider: string; - runner: CommandRunner; - ttl: string; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: [ - "warmup", - "--provider", - params.provider, - "--desktop", - "--browser", - "--class", - params.machineClass, - "--idle-timeout", - params.idleTimeout, - "--ttl", - params.ttl, - ], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); - const leaseId = extractLeaseId(`${result.stdout}\n${result.stderr}`); - if (!leaseId) { - throw new Error("Crabbox warmup did not print a lease id."); - } - return leaseId; -} - -async function inspectCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: ["inspect", "--provider", params.provider, "--id", params.leaseId, "--json"], - cwd: params.cwd, - env: params.env, - runner: params.runner, - }); - return JSON.parse(result.stdout) as CrabboxInspect; -} - async function copyRemoteArtifacts(params: { cwd: string; env: NodeJS.ProcessEnv; @@ -442,30 +298,13 @@ async function copyRemoteArtifacts(params: { remoteOutputDir: string; runner: CommandRunner; }) { - const { host, sshKey, sshPort, sshUser } = params.inspect; - if (!host || !sshKey || !sshUser) { - throw new Error("Crabbox inspect output is missing SSH copy details."); - } + const { host, sshArgs, sshUser } = sshCommand({ inspect: params.inspect }); await runCommand({ command: "rsync", args: [ "-az", "-e", - [ - "ssh", - "-i", - shellQuote(sshKey), - "-p", - sshPort ?? "22", - "-o", - "BatchMode=yes", - "-o", - "ConnectTimeout=15", - "-o", - "StrictHostKeyChecking=no", - "-o", - "UserKnownHostsFile=/dev/null", - ].join(" "), + sshArgs, "--exclude", "chrome-profile/**", `${sshUser}@${host}:${params.remoteOutputDir}/`, @@ -477,24 +316,6 @@ async function copyRemoteArtifacts(params: { }); } -async function stopCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - await runCommand({ - command: params.crabboxBin, - args: ["stop", "--provider", params.provider, params.leaseId], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); -} - export async function runMantisDesktopBrowserSmoke( opts: MantisDesktopBrowserSmokeOptions = {}, ): Promise { @@ -509,7 +330,12 @@ export async function runMantisDesktopBrowserSmoke( ); const summaryPath = path.join(outputDir, "mantis-desktop-browser-smoke-summary.json"); const reportPath = path.join(outputDir, "mantis-desktop-browser-smoke-report.md"); - const crabboxBin = await resolveCrabboxBin({ env, explicit: opts.crabboxBin, repoRoot }); + const crabboxBin = await resolveCrabboxBin({ + env, + envName: CRABBOX_BIN_ENV, + explicit: opts.crabboxBin, + repoRoot, + }); const provider = trimToValue(opts.provider) ?? trimToValue(env[CRABBOX_PROVIDER_ENV]) ?? DEFAULT_PROVIDER; const machineClass = diff --git a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts index 5d523b9983f..83c268b3f73 100644 --- a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts +++ b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts @@ -1,4 +1,3 @@ -import { spawn, type SpawnOptions } from "node:child_process"; import fs from "node:fs/promises"; import path from "node:path"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; @@ -8,6 +7,18 @@ import { acquireQaCredentialLease, startQaCredentialLeaseHeartbeat, } from "../live-transports/shared/credential-lease.runtime.js"; +import { + type CommandRunner, + type CrabboxInspect, + defaultCommandRunner, + inspectCrabbox, + resolveCrabboxBin, + runCommand, + shellQuote, + sshCommand, + stopCrabbox, + warmupCrabbox, +} from "./crabbox-runtime.js"; export type MantisSlackDesktopSmokeOptions = { alternateModel?: string; @@ -46,17 +57,6 @@ export type MantisSlackDesktopSmokeResult = { videoPath?: string; }; -type CommandResult = { - stderr: string; - stdout: string; -}; - -type CommandRunner = ( - command: string, - args: readonly string[], - options: SpawnOptions, -) => Promise; - type SlackGatewayCredentialPayload = { channelId: string; sutAppToken: string; @@ -68,18 +68,6 @@ type SlackGatewayCredentialLease = Awaited< >; type SlackGatewayCredentialHeartbeat = ReturnType; -type CrabboxInspect = { - host?: string; - id?: string; - provider?: string; - ready?: boolean; - slug?: string; - sshKey?: string; - sshPort?: string; - sshUser?: string; - state?: string; -}; - type MantisSlackDesktopSmokeSummary = { artifacts: { reportPath: string; @@ -218,44 +206,6 @@ function defaultOutputDir(repoRoot: string, startedAt: Date) { return path.join(repoRoot, ".artifacts", "qa-e2e", "mantis", `slack-desktop-${stamp}`); } -async function defaultCommandRunner( - command: string, - args: readonly string[], - options: SpawnOptions, -): Promise { - return new Promise((resolve, reject) => { - const child = spawn(command, args, { - ...options, - stdio: ["ignore", "pipe", "pipe"], - }); - let stdout = ""; - let stderr = ""; - child.stdout?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stdout += text; - if (options.stdio === "inherit") { - process.stdout.write(text); - } - }); - child.stderr?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stderr += text; - if (options.stdio === "inherit") { - process.stderr.write(text); - } - }); - child.on("error", reject); - child.on("close", (code, signal) => { - if (code === 0) { - resolve({ stdout, stderr }); - return; - } - const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`; - reject(new Error(`${command} ${args.join(" ")} failed with ${detail}`)); - }); - }); -} - async function readRemoteMetadata( outputDir: string, ): Promise { @@ -281,22 +231,6 @@ async function readRemoteMetadata( return undefined; } } -async function resolveCrabboxBin(params: { - env: NodeJS.ProcessEnv; - explicit?: string; - repoRoot: string; -}) { - const configured = trimToValue(params.explicit) ?? trimToValue(params.env[CRABBOX_BIN_ENV]); - if (configured) { - return configured; - } - const sibling = path.resolve(params.repoRoot, "../crabbox/bin/crabbox"); - if (await pathExists(sibling)) { - return sibling; - } - return "crabbox"; -} - function buildCrabboxEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv { const next = { ...env, @@ -411,14 +345,6 @@ async function prepareGatewayCredentialEnv(params: { }; } -function extractLeaseId(output: string) { - return output.match(/\b(?:cbx_[a-f0-9]+|tbx_[A-Za-z0-9_-]+)\b/u)?.[0]; -} - -function shellQuote(value: string) { - return `'${value.replaceAll("'", "'\\''")}'`; -} - function renderRemoteScript(params: { alternateModel: string; credentialRole: string; @@ -715,102 +641,6 @@ function renderReport(summary: MantisSlackDesktopSmokeSummary) { return `${lines.join("\n")}\n`; } -async function runCommand(params: { - args: readonly string[]; - command: string; - cwd: string; - env: NodeJS.ProcessEnv; - runner: CommandRunner; - stdio?: "inherit" | "pipe"; -}) { - return params.runner(params.command, params.args, { - cwd: params.cwd, - env: params.env, - stdio: params.stdio ?? "pipe", - }); -} - -async function warmupCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - idleTimeout: string; - machineClass: string; - provider: string; - runner: CommandRunner; - ttl: string; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: [ - "warmup", - "--provider", - params.provider, - "--desktop", - "--browser", - "--class", - params.machineClass, - "--idle-timeout", - params.idleTimeout, - "--ttl", - params.ttl, - ], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); - const leaseId = extractLeaseId(`${result.stdout}\n${result.stderr}`); - if (!leaseId) { - throw new Error("Crabbox warmup did not print a lease id."); - } - return leaseId; -} - -async function inspectCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: ["inspect", "--provider", params.provider, "--id", params.leaseId, "--json"], - cwd: params.cwd, - env: params.env, - runner: params.runner, - }); - return JSON.parse(result.stdout) as CrabboxInspect; -} - -function sshCommand(params: { inspect: CrabboxInspect }) { - const { host, sshKey, sshPort, sshUser } = params.inspect; - if (!host || !sshKey || !sshUser) { - throw new Error("Crabbox inspect output is missing SSH copy details."); - } - return { - host, - sshUser, - sshArgs: [ - "ssh", - "-i", - shellQuote(sshKey), - "-p", - sshPort ?? "22", - "-o", - "BatchMode=yes", - "-o", - "ConnectTimeout=15", - "-o", - "StrictHostKeyChecking=no", - "-o", - "UserKnownHostsFile=/dev/null", - ].join(" "), - }; -} - async function copyRemoteArtifacts(params: { cwd: string; env: NodeJS.ProcessEnv; @@ -849,24 +679,6 @@ async function copyRemoteArtifacts(params: { }).catch(() => ({ stdout: "", stderr: "" })); } -async function stopCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - await runCommand({ - command: params.crabboxBin, - args: ["stop", "--provider", params.provider, params.leaseId], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); -} - export async function runMantisSlackDesktopSmoke( opts: MantisSlackDesktopSmokeOptions = {}, ): Promise { @@ -882,7 +694,12 @@ export async function runMantisSlackDesktopSmoke( ); const summaryPath = path.join(outputDir, "mantis-slack-desktop-smoke-summary.json"); const reportPath = path.join(outputDir, "mantis-slack-desktop-smoke-report.md"); - const crabboxBin = await resolveCrabboxBin({ env, explicit: opts.crabboxBin, repoRoot }); + const crabboxBin = await resolveCrabboxBin({ + env, + envName: CRABBOX_BIN_ENV, + explicit: opts.crabboxBin, + repoRoot, + }); const provider = trimToValue(opts.provider) ?? trimToValue(env[CRABBOX_PROVIDER_ENV]) ?? DEFAULT_PROVIDER; const machineClass = diff --git a/extensions/qa-lab/src/mantis/visual-task.runtime.ts b/extensions/qa-lab/src/mantis/visual-task.runtime.ts index 64345ddb568..6183eed49a2 100644 --- a/extensions/qa-lab/src/mantis/visual-task.runtime.ts +++ b/extensions/qa-lab/src/mantis/visual-task.runtime.ts @@ -1,9 +1,18 @@ -import { spawn, type SpawnOptions } from "node:child_process"; import fs from "node:fs/promises"; import path from "node:path"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { pathExists, writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime"; import { ensureRepoBoundDirectory, resolveRepoRelativeOutputDir } from "../cli-paths.js"; +import { + type CommandRunner, + type CrabboxInspect, + defaultCommandRunner, + inspectCrabbox, + resolveCrabboxBin, + runCommand, + stopCrabbox, + warmupCrabbox, +} from "./crabbox-runtime.js"; export type MantisVisualTaskVisionMode = "image-describe" | "metadata"; @@ -56,24 +65,6 @@ export type MantisVisualTaskResult = { videoPath?: string; }; -type CommandResult = { - stderr: string; - stdout: string; -}; - -type CommandRunner = ( - command: string, - args: readonly string[], - options: SpawnOptions, -) => Promise; - -type CrabboxInspect = { - id?: string; - provider?: string; - slug?: string; - state?: string; -}; - type MantisVisualDriverResult = { browserUrl: string; error?: string; @@ -174,44 +165,6 @@ function resolveMantisOutputDir(repoRoot: string, outputDir: string | undefined, : (resolveRepoRelativeOutputDir(repoRoot, configured) ?? defaultOutputDir(repoRoot, startedAt)); } -async function defaultCommandRunner( - command: string, - args: readonly string[], - options: SpawnOptions, -): Promise { - return new Promise((resolve, reject) => { - const child = spawn(command, args, { - ...options, - stdio: ["ignore", "pipe", "pipe"], - }); - let stdout = ""; - let stderr = ""; - child.stdout?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stdout += text; - if (options.stdio === "inherit") { - process.stdout.write(text); - } - }); - child.stderr?.on("data", (chunk: Buffer) => { - const text = chunk.toString(); - stderr += text; - if (options.stdio === "inherit") { - process.stderr.write(text); - } - }); - child.on("error", reject); - child.on("close", (code, signal) => { - if (code === 0) { - resolve({ stdout, stderr }); - return; - } - const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`; - reject(new Error(`${command} ${args.join(" ")} failed with ${detail}`)); - }); - }); -} - async function nonEmptyFileExists(filePath: string) { try { const stat = await fs.stat(filePath); @@ -221,26 +174,6 @@ async function nonEmptyFileExists(filePath: string) { } } -async function resolveCrabboxBin(params: { - env: NodeJS.ProcessEnv; - explicit?: string; - repoRoot: string; -}) { - const configured = trimToValue(params.explicit) ?? trimToValue(params.env[CRABBOX_BIN_ENV]); - if (configured) { - return configured; - } - const sibling = path.resolve(params.repoRoot, "../crabbox/bin/crabbox"); - if (await pathExists(sibling)) { - return sibling; - } - return "crabbox"; -} - -function extractLeaseId(output: string) { - return output.match(/\b(?:cbx_[a-f0-9]+|tbx_[A-Za-z0-9_-]+)\b/u)?.[0]; -} - function normalizeVisionMode(value: string | undefined): MantisVisualTaskVisionMode { const normalized = trimToValue(value); if (normalized === undefined || normalized === "image-describe") { @@ -270,21 +203,6 @@ function buildVisionPrompt(prompt: string | undefined, expectText: string | unde return `${base}\n\nVisual assertion contract: return only valid JSON: {"visible": boolean, "evidence": string, "reason": string}. Set visible=true only when the exact text "${expectText}" is actually visible in the screenshot; text quoted in the prompt or a negative statement is not evidence.`; } -async function runCommand(params: { - args: readonly string[]; - command: string; - cwd: string; - env: NodeJS.ProcessEnv; - runner: CommandRunner; - stdio?: "inherit" | "pipe"; -}) { - return params.runner(params.command, params.args, { - cwd: params.cwd, - env: params.env, - stdio: params.stdio ?? "pipe", - }); -} - async function runCommandWithExternalOutput(params: { outputPath: string; buildArgs: (tempPath: string) => readonly string[]; @@ -323,79 +241,6 @@ async function runCommandWithExternalOutput(params: { } } -async function warmupCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - idleTimeout: string; - machineClass: string; - provider: string; - runner: CommandRunner; - ttl: string; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: [ - "warmup", - "--provider", - params.provider, - "--desktop", - "--browser", - "--class", - params.machineClass, - "--idle-timeout", - params.idleTimeout, - "--ttl", - params.ttl, - ], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); - const leaseId = extractLeaseId(`${result.stdout}\n${result.stderr}`); - if (!leaseId) { - throw new Error("Crabbox warmup did not print a lease id."); - } - return leaseId; -} - -async function inspectCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - const result = await runCommand({ - command: params.crabboxBin, - args: ["inspect", "--provider", params.provider, "--id", params.leaseId, "--json"], - cwd: params.cwd, - env: params.env, - runner: params.runner, - }); - return JSON.parse(result.stdout) as CrabboxInspect; -} - -async function stopCrabbox(params: { - crabboxBin: string; - cwd: string; - env: NodeJS.ProcessEnv; - leaseId: string; - provider: string; - runner: CommandRunner; -}) { - await runCommand({ - command: params.crabboxBin, - args: ["stop", "--provider", params.provider, params.leaseId], - cwd: params.cwd, - env: params.env, - runner: params.runner, - stdio: "inherit", - }); -} - function buildVisualDriverArgs(params: { browserUrl: string; crabboxBin: string; @@ -621,7 +466,12 @@ export async function runMantisVisualDriver( ); const resultPath = path.join(outputDir, "mantis-visual-task-driver-result.json"); const screenshotPath = path.join(outputDir, "visual-task.png"); - const crabboxBin = await resolveCrabboxBin({ env, explicit: opts.crabboxBin, repoRoot }); + const crabboxBin = await resolveCrabboxBin({ + env, + envName: CRABBOX_BIN_ENV, + explicit: opts.crabboxBin, + repoRoot, + }); const provider = trimToValue(opts.provider) ?? trimToValue(env.CRABBOX_RECORD_PROVIDER) ?? @@ -772,7 +622,12 @@ export async function runMantisVisualTask( const driverResultPath = path.join(outputDir, "mantis-visual-task-driver-result.json"); const screenshotPath = path.join(outputDir, "visual-task.png"); const videoPath = path.join(outputDir, "visual-task.mp4"); - const crabboxBin = await resolveCrabboxBin({ env, explicit: opts.crabboxBin, repoRoot }); + const crabboxBin = await resolveCrabboxBin({ + env, + envName: CRABBOX_BIN_ENV, + explicit: opts.crabboxBin, + repoRoot, + }); const provider = trimToValue(opts.provider) ?? trimToValue(env[CRABBOX_PROVIDER_ENV]) ?? DEFAULT_PROVIDER; const machineClass = diff --git a/extensions/telegram/src/bot-access.ts b/extensions/telegram/src/bot-access.ts index 724eac1a71f..c00236f054b 100644 --- a/extensions/telegram/src/bot-access.ts +++ b/extensions/telegram/src/bot-access.ts @@ -4,11 +4,6 @@ import { mergeDmAllowFromSources, type AllowlistMatch, } from "openclaw/plugin-sdk/allow-from"; -import { - parseAccessGroupAllowFromEntry, - resolveAccessGroupAllowFromMatches, -} from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; @@ -81,39 +76,6 @@ export const isSenderAllowed = (params: { return isSenderIdAllowed(allow, senderId, true); }; -export async function expandTelegramAllowFromWithAccessGroups(params: { - cfg?: OpenClawConfig; - allowFrom?: Array; - accountId?: string; - senderId?: string; -}): Promise { - const allowFrom = (params.allowFrom ?? []).map(String); - if (!params.senderId) { - return allowFrom; - } - const matched = await resolveAccessGroupAllowFromMatches({ - cfg: params.cfg, - allowFrom, - channel: "telegram", - accountId: params.accountId ?? "default", - senderId: params.senderId, - isSenderAllowed: (senderId, entries) => - isSenderAllowed({ - allow: normalizeAllowFrom(entries), - senderId, - }), - }); - if (matched.length === 0) { - return allowFrom; - } - const matchedGroups = new Set(matched); - const expanded = allowFrom.filter((entry) => { - const groupName = parseAccessGroupAllowFromEntry(entry); - return groupName == null || !matchedGroups.has(`accessGroup:${groupName}`); - }); - return Array.from(new Set([...expanded, params.senderId])); -} - export { firstDefined }; export const resolveSenderAllowMatch = (params: { diff --git a/extensions/telegram/src/bot-handlers.runtime.ts b/extensions/telegram/src/bot-handlers.runtime.ts index 6f9df50d1fe..84d7a61c45d 100644 --- a/extensions/telegram/src/bot-handlers.runtime.ts +++ b/extensions/telegram/src/bot-handlers.runtime.ts @@ -37,7 +37,6 @@ import { import { resolveTelegramAccount, resolveTelegramMediaRuntimeOptions } from "./accounts.js"; import { withTelegramApiErrorLogging } from "./api-logging.js"; import { - expandTelegramAllowFromWithAccessGroups, isSenderAllowed, normalizeDmAllowFromWithStore, type NormalizedAllowFrom, @@ -710,17 +709,14 @@ export const registerTelegramHandlers = ({ chatId: number; isGroup: boolean; isForum: boolean; - senderId?: string; messageThreadId?: number; groupAllowContext?: TelegramGroupAllowContext; }): Promise => { const groupAllowContext = params.groupAllowContext ?? (await resolveTelegramGroupAllowFromContext({ - cfg, chatId: params.chatId, accountId, - senderId: params.senderId, isGroup: params.isGroup, isForum: params.isForum, messageThreadId: params.messageThreadId, @@ -921,7 +917,6 @@ export const registerTelegramHandlers = ({ chatId, isGroup, isForum, - senderId, }); const senderAuthorization = authorizeTelegramEventSender({ chatId, @@ -1351,13 +1346,10 @@ export const registerTelegramHandlers = ({ isForum: callbackMessage.chat.is_forum, getChat, }); - const senderId = callback.from?.id ? String(callback.from.id) : ""; - const senderUsername = callback.from?.username ?? ""; const eventAuthContext = await resolveTelegramEventAuthorizationContext({ chatId, isGroup, isForum, - senderId, messageThreadId, }); const { resolvedThreadId, dmThreadId, storeAllowFrom, groupConfig } = eventAuthContext; @@ -1368,6 +1360,8 @@ export const registerTelegramHandlers = ({ ); return; } + const senderId = callback.from?.id ? String(callback.from.id) : ""; + const senderUsername = callback.from?.username ?? ""; const authorizationMode: TelegramEventAuthorizationMode = !isGroup || (!execApprovalButtonsEnabled && inlineButtonsScope === "allowlist") ? "callback-allowlist" @@ -1894,7 +1888,6 @@ export const registerTelegramHandlers = ({ chatId: event.chatId, isGroup: event.isGroup, isForum: event.isForum, - senderId: event.senderId, messageThreadId: event.messageThreadId, }); const { @@ -1910,14 +1903,8 @@ export const registerTelegramHandlers = ({ } = eventAuthContext; // For DMs, prefer per-DM/topic allowFrom (groupAllowOverride) over account-level allowFrom const dmAllowFrom = groupAllowOverride ?? allowFrom; - const expandedDmAllowFrom = await expandTelegramAllowFromWithAccessGroups({ - cfg, - allowFrom: dmAllowFrom, - accountId, - senderId: event.senderId, - }); const effectiveDmAllow = normalizeDmAllowFromWithStore({ - allowFrom: expandedDmAllowFrom, + allowFrom: dmAllowFrom, storeAllowFrom, dmPolicy, }); diff --git a/extensions/telegram/src/bot-message-context.ts b/extensions/telegram/src/bot-message-context.ts index d79b132709b..f7bdd20edc3 100644 --- a/extensions/telegram/src/bot-message-context.ts +++ b/extensions/telegram/src/bot-message-context.ts @@ -10,12 +10,7 @@ import { normalizeAccountId, resolveThreadSessionKeys } from "openclaw/plugin-sd import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { mergeTelegramAccountConfig, resolveDefaultTelegramAccountId } from "./accounts.js"; import { withTelegramApiErrorLogging } from "./api-logging.js"; -import { - expandTelegramAllowFromWithAccessGroups, - firstDefined, - normalizeAllowFrom, - normalizeDmAllowFromWithStore, -} from "./bot-access.js"; +import { firstDefined, normalizeAllowFrom, normalizeDmAllowFromWithStore } from "./bot-access.js"; import { resolveTelegramInboundBody } from "./bot-message-context.body.js"; import { buildTelegramInboundContextPayload, @@ -263,25 +258,13 @@ export const buildTelegramMessageContext = async ({ const groupAllowOverride = firstDefined(topicConfig?.allowFrom, groupConfig?.allowFrom); // For DMs, prefer per-DM/topic allowFrom (groupAllowOverride) over account-level allowFrom const dmAllowFrom = groupAllowOverride ?? allowFrom; - const expandedDmAllowFrom = await expandTelegramAllowFromWithAccessGroups({ - cfg: freshCfg, - allowFrom: dmAllowFrom, - accountId: account.accountId, - senderId, - }); const effectiveDmAllow = normalizeDmAllowFromWithStore({ - allowFrom: expandedDmAllowFrom, + allowFrom: dmAllowFrom, storeAllowFrom, dmPolicy: effectiveDmPolicy, }); // Group sender checks are explicit and must not inherit DM pairing-store entries. - const expandedGroupAllowFrom = await expandTelegramAllowFromWithAccessGroups({ - cfg: freshCfg, - allowFrom: groupAllowOverride ?? groupAllowFrom, - accountId: account.accountId, - senderId, - }); - const effectiveGroupAllow = normalizeAllowFrom(expandedGroupAllowFrom); + const effectiveGroupAllow = normalizeAllowFrom(groupAllowOverride ?? groupAllowFrom); const hasGroupAllowOverride = groupAllowOverride !== undefined; const senderUsername = msg.from?.username ?? ""; const baseAccess = evaluateTelegramGroupBaseAccess({ diff --git a/extensions/telegram/src/bot-message-dispatch.test.ts b/extensions/telegram/src/bot-message-dispatch.test.ts index 9b6c9d2b35a..b634ec9cb8f 100644 --- a/extensions/telegram/src/bot-message-dispatch.test.ts +++ b/extensions/telegram/src/bot-message-dispatch.test.ts @@ -924,24 +924,6 @@ describe("dispatchTelegramMessage draft streaming", () => { expect(deliverReplies).not.toHaveBeenCalled(); }); - it("waits for queued draft-lane partials before finalizing the Telegram reply", async () => { - const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 }); - dispatchReplyWithBufferedBlockDispatcher.mockImplementation( - async ({ dispatcherOptions, replyOptions }) => { - const pendingPartial = replyOptions?.onPartialReply?.({ text: "Working" }); - await dispatcherOptions.deliver({ text: "Done" }, { kind: "final" }); - await pendingPartial; - return { queuedFinal: true }; - }, - ); - - await dispatchWithContext({ context: createContext() }); - - expect(answerDraftStream.update).toHaveBeenNthCalledWith(1, "Working"); - expect(answerDraftStream.update).toHaveBeenNthCalledWith(2, "Done"); - expect(deliverReplies).not.toHaveBeenCalled(); - }); - it("keeps progress updates in a draft and sends the final answer normally", async () => { const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 }); dispatchReplyWithBufferedBlockDispatcher.mockImplementation( diff --git a/extensions/telegram/src/bot-native-commands.ts b/extensions/telegram/src/bot-native-commands.ts index e25c945e39d..00622c15603 100644 --- a/extensions/telegram/src/bot-native-commands.ts +++ b/extensions/telegram/src/bot-native-commands.ts @@ -53,11 +53,7 @@ import { } from "openclaw/plugin-sdk/text-runtime"; import { resolveTelegramAccount } from "./accounts.js"; import { withTelegramApiErrorLogging } from "./api-logging.js"; -import { - expandTelegramAllowFromWithAccessGroups, - isSenderAllowed, - normalizeDmAllowFromWithStore, -} from "./bot-access.js"; +import { isSenderAllowed, normalizeDmAllowFromWithStore } from "./bot-access.js"; import type { TelegramBotDeps } from "./bot-deps.js"; import type { TelegramMediaRef } from "./bot-message-context.js"; import type { TelegramMessageContextOptions } from "./bot-message-context.types.js"; @@ -493,13 +489,9 @@ async function resolveTelegramCommandAuth(params: { } = params; const { chatId, isGroup, isForum, messageThreadId, threadParams } = await resolveTelegramNativeCommandThreadContext({ msg, bot }); - const senderId = msg.from?.id ? String(msg.from.id) : ""; - const senderUsername = msg.from?.username ?? ""; const groupAllowContext = await resolveTelegramGroupAllowFromContext({ - cfg, chatId, accountId, - senderId, isGroup, isForum, messageThreadId, @@ -530,12 +522,8 @@ async function resolveTelegramCommandAuth(params: { } // For DMs, prefer per-DM/topic allowFrom (groupAllowOverride) over account-level allowFrom const dmAllowFrom = groupAllowOverride ?? allowFrom; - const expandedDmAllowFrom = await expandTelegramAllowFromWithAccessGroups({ - cfg, - allowFrom: dmAllowFrom, - accountId, - senderId, - }); + const senderId = msg.from?.id ? String(msg.from.id) : ""; + const senderUsername = msg.from?.username ?? ""; const commandsAllowFrom = cfg.commands?.allowFrom; const commandsAllowFromConfigured = commandsAllowFrom != null && @@ -639,7 +627,7 @@ async function resolveTelegramCommandAuth(params: { } const dmAllow = normalizeDmAllowFromWithStore({ - allowFrom: expandedDmAllowFrom, + allowFrom: dmAllowFrom, storeAllowFrom: isGroup ? [] : storeAllowFrom, dmPolicy: effectiveDmPolicy, }); diff --git a/extensions/telegram/src/bot.create-telegram-bot.test.ts b/extensions/telegram/src/bot.create-telegram-bot.test.ts index ae3a2ebc3ce..e1817bed49e 100644 --- a/extensions/telegram/src/bot.create-telegram-bot.test.ts +++ b/extensions/telegram/src/bot.create-telegram-bot.test.ts @@ -1584,60 +1584,6 @@ describe("createTelegramBot", () => { }, expectedReplyCount: 1, }, - { - name: "allows group messages from senders in accessGroup allowFrom when groupPolicy is 'allowlist'", - config: { - accessGroups: { - owners: { - type: "message.senders", - members: { - telegram: ["123456789"], - }, - }, - }, - channels: { - telegram: { - groupPolicy: "allowlist", - allowFrom: ["accessGroup:owners"], - groups: { "*": { requireMention: false } }, - }, - }, - }, - message: { - chat: { id: -100123456789, type: "group", title: "Test Group" }, - from: { id: 123456789, username: "testuser" }, - text: "hello", - date: 1736380800, - }, - expectedReplyCount: 1, - }, - { - name: "blocks group messages from senders outside accessGroup allowFrom when groupPolicy is 'allowlist'", - config: { - accessGroups: { - owners: { - type: "message.senders", - members: { - telegram: ["123456789"], - }, - }, - }, - channels: { - telegram: { - groupPolicy: "allowlist", - allowFrom: ["accessGroup:owners"], - groups: { "*": { requireMention: false } }, - }, - }, - }, - message: { - chat: { id: -100123456789, type: "group", title: "Test Group" }, - from: { id: 999999, username: "notallowed" }, - text: "hello", - date: 1736380800, - }, - expectedReplyCount: 0, - }, { name: "blocks group messages when allowFrom is configured with @username entries (numeric IDs required)", config: { @@ -2707,31 +2653,6 @@ describe("createTelegramBot", () => { }, expectedReplyCount: 1, }, - { - name: "allows direct messages with accessGroup allowFrom entries", - config: { - accessGroups: { - owners: { - type: "message.senders", - members: { - telegram: ["123456789"], - }, - }, - }, - channels: { - telegram: { - allowFrom: ["accessGroup:owners"], - }, - }, - }, - message: { - chat: { id: 777777777, type: "private" }, - from: { id: 123456789, username: "testuser" }, - text: "hello", - date: 1736380800, - }, - expectedReplyCount: 1, - }, { name: "falls back to direct message chat id when sender user id is missing", config: { diff --git a/extensions/telegram/src/bot/helpers.ts b/extensions/telegram/src/bot/helpers.ts index 31e62994786..f4440e4d0a3 100644 --- a/extensions/telegram/src/bot/helpers.ts +++ b/extensions/telegram/src/bot/helpers.ts @@ -1,7 +1,6 @@ import type { Chat, Message } from "@grammyjs/types"; import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound"; import type { - OpenClawConfig, TelegramAccountConfig, TelegramDirectConfig, TelegramGroupConfig, @@ -11,12 +10,7 @@ import type { import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; -import { - expandTelegramAllowFromWithAccessGroups, - firstDefined, - normalizeAllowFrom, - type NormalizedAllowFrom, -} from "../bot-access.js"; +import { firstDefined, normalizeAllowFrom, type NormalizedAllowFrom } from "../bot-access.js"; import { normalizeTelegramReplyToMessageId } from "../outbound-params.js"; import { resolveTelegramPreviewStreamMode } from "../preview-streaming.js"; import { @@ -174,10 +168,8 @@ export function withResolvedTelegramForumFlag( } export async function resolveTelegramGroupAllowFromContext(params: { - cfg?: OpenClawConfig; chatId: string | number; accountId?: string; - senderId?: string; isGroup?: boolean; isForum?: boolean; messageThreadId?: number | null; @@ -222,13 +214,7 @@ export async function resolveTelegramGroupAllowFromContext(params: { const groupAllowOverride = firstDefined(topicConfig?.allowFrom, groupConfig?.allowFrom); // Group sender access must remain explicit (groupAllowFrom/per-group allowFrom only). // DM pairing store entries are not a group authorization source. - const expandedGroupAllowFrom = await expandTelegramAllowFromWithAccessGroups({ - cfg: params.cfg, - allowFrom: groupAllowOverride ?? params.groupAllowFrom, - accountId, - senderId: params.senderId, - }); - const effectiveGroupAllow = normalizeAllowFrom(expandedGroupAllowFrom); + const effectiveGroupAllow = normalizeAllowFrom(groupAllowOverride ?? params.groupAllowFrom); const hasGroupAllowOverride = groupAllowOverride !== undefined; return { resolvedThreadId, diff --git a/extensions/telegram/src/polling-liveness.test.ts b/extensions/telegram/src/polling-liveness.test.ts index 27efc8b5ca9..b38b1bb886d 100644 --- a/extensions/telegram/src/polling-liveness.test.ts +++ b/extensions/telegram/src/polling-liveness.test.ts @@ -20,23 +20,19 @@ describe("TelegramPollingLivenessTracker", () => { ); }); - it("detects a polling stall while a recent non-polling API call is in flight", () => { + it("does not detect a polling stall while a recent non-polling API call is in flight", () => { let now = 0; const tracker = new TelegramPollingLivenessTracker({ now: () => now }); - tracker.noteGetUpdatesStarted({ offset: 9 }); - now = 60_000; const callId = tracker.noteApiCallStarted(); now = 120_001; - const stall = tracker.detectStall({ - thresholdMs: POLL_STALL_THRESHOLD_MS, - }); - expect(stall?.message).toContain("active getUpdates stuck"); - expect(stall?.message).toContain("inFlight=1 outcome=started startedAt=0"); - expect(stall?.message).toContain("offset=9"); - expect(stall?.message).toContain("apiElapsedMs=60001"); + expect( + tracker.detectStall({ + thresholdMs: POLL_STALL_THRESHOLD_MS, + }), + ).toBeNull(); tracker.noteApiCallFinished(callId); }); diff --git a/extensions/telegram/src/polling-liveness.ts b/extensions/telegram/src/polling-liveness.ts index 674a90f2185..b57237de020 100644 --- a/extensions/telegram/src/polling-liveness.ts +++ b/extensions/telegram/src/polling-liveness.ts @@ -10,12 +10,6 @@ type TelegramPollingStall = { message: string; }; -type TelegramPollingStallSnapshot = { - elapsedMs: number; - apiElapsedMs: number; - label: string; -}; - export class TelegramPollingLivenessTracker { #lastGetUpdatesAt: number; #lastApiActivityAt: number; @@ -97,9 +91,22 @@ export class TelegramPollingLivenessTracker { detectStall(params: { thresholdMs: number; now?: number }): TelegramPollingStall | null { const now = params.now ?? this.#now(); - const stall = this.#resolvePollingStallSnapshot(now); + const activeElapsed = + this.#inFlightGetUpdates > 0 && this.#lastGetUpdatesStartedAt != null + ? now - this.#lastGetUpdatesStartedAt + : 0; + const idleElapsed = + this.#inFlightGetUpdates > 0 + ? 0 + : now - (this.#lastGetUpdatesFinishedAt ?? this.#lastGetUpdatesAt); + const elapsed = this.#inFlightGetUpdates > 0 ? activeElapsed : idleElapsed; + const apiLivenessAt = + this.#latestInFlightApiStartedAt == null + ? this.#lastApiActivityAt + : Math.max(this.#lastApiActivityAt, this.#latestInFlightApiStartedAt); + const apiElapsed = now - apiLivenessAt; - if (stall.elapsedMs <= params.thresholdMs) { + if (elapsed <= params.thresholdMs || apiElapsed <= params.thresholdMs) { return null; } if (this.#stallDiagLoggedAt && now - this.#stallDiagLoggedAt < params.thresholdMs / 2) { @@ -107,8 +114,12 @@ export class TelegramPollingLivenessTracker { } this.#stallDiagLoggedAt = now; + const elapsedLabel = + this.#inFlightGetUpdates > 0 + ? `active getUpdates stuck for ${formatDurationPrecise(elapsed)}` + : `no completed getUpdates for ${formatDurationPrecise(elapsed)}`; return { - message: `Polling stall detected (${stall.label}); forcing restart. [diag ${this.formatDiagnosticFields("error")} apiElapsedMs=${stall.apiElapsedMs}]`, + message: `Polling stall detected (${elapsedLabel}); forcing restart. [diag ${this.formatDiagnosticFields("error")}]`, }; } @@ -127,28 +138,6 @@ export class TelegramPollingLivenessTracker { return newestStartedAt; } - #resolvePollingStallSnapshot(now: number): TelegramPollingStallSnapshot { - const activeElapsed = - this.#inFlightGetUpdates > 0 && this.#lastGetUpdatesStartedAt != null - ? now - this.#lastGetUpdatesStartedAt - : 0; - const idleElapsed = - this.#inFlightGetUpdates > 0 - ? 0 - : now - (this.#lastGetUpdatesFinishedAt ?? this.#lastGetUpdatesAt); - const elapsedMs = this.#inFlightGetUpdates > 0 ? activeElapsed : idleElapsed; - const apiLivenessAt = - this.#latestInFlightApiStartedAt == null - ? this.#lastApiActivityAt - : Math.max(this.#lastApiActivityAt, this.#latestInFlightApiStartedAt); - const apiElapsedMs = now - apiLivenessAt; - const label = - this.#inFlightGetUpdates > 0 - ? `active getUpdates stuck for ${formatDurationPrecise(elapsedMs)}` - : `no completed getUpdates for ${formatDurationPrecise(elapsedMs)}`; - return { elapsedMs, apiElapsedMs, label }; - } - #now(): number { return this.options.now?.() ?? Date.now(); } diff --git a/extensions/telegram/src/polling-session.test.ts b/extensions/telegram/src/polling-session.test.ts index 90de614f568..553fb750080 100644 --- a/extensions/telegram/src/polling-session.test.ts +++ b/extensions/telegram/src/polling-session.test.ts @@ -765,7 +765,7 @@ describe("TelegramPollingSession", () => { }); }); - it("triggers stall restart when getUpdates is stale despite recent non-getUpdates API success", async () => { + it("does not trigger stall restart when non-getUpdates API calls are active", async () => { const abort = new AbortController(); const botStop = vi.fn(async () => undefined); const runnerStop = vi.fn(async () => undefined); @@ -773,8 +773,9 @@ describe("TelegramPollingSession", () => { const resolveFirstTask = mockLongRunningPollingCycle(runnerStop); // t=0: lastGetUpdatesAt and lastApiActivityAt initialized - // t=150_001: watchdog fires (getUpdates stale for 150s). - // Right before watchdog, a sendMessage succeeds at t=150_001. + // t=150_001: watchdog fires (getUpdates stale for 150s) + // But right before watchdog, a sendMessage succeeds at t=150_001 + // All subsequent Date.now calls return the same value, giving apiIdle = 0. const watchdogHarness = installPollingStallWatchdogHarness(); const log = vi.fn(); @@ -788,19 +789,20 @@ describe("TelegramPollingSession", () => { const watchdog = await watchdogHarness.waitForWatchdog(); // Simulate a sendMessage call through the middleware before watchdog fires. - // This updates unrelated API liveness, but inbound getUpdates remains stale. + // This updates lastApiActivityAt, proving the network is alive. const apiMiddleware = getApiMiddleware(); if (apiMiddleware) { const fakePrev = vi.fn(async () => ({ ok: true })); await apiMiddleware(fakePrev, "sendMessage", { chat_id: 123, text: "hello" }); } - // Now fire the watchdog — getUpdates is stale (120s) even though API was just active. + // Now fire the watchdog — getUpdates is stale (120s) but API was just active watchdog?.(); - expect(runnerStop).toHaveBeenCalledTimes(1); - expect(botStop).toHaveBeenCalledTimes(1); - expect(log).toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); + // The watchdog should NOT have triggered a restart + expect(runnerStop).not.toHaveBeenCalled(); + expect(botStop).not.toHaveBeenCalled(); + expect(log).not.toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); // Clean up: abort to end the session abort.abort(); @@ -811,7 +813,7 @@ describe("TelegramPollingSession", () => { } }); - it("triggers stall restart while a recent non-getUpdates API call is in-flight", async () => { + it("does not trigger stall restart while a recent non-getUpdates API call is in-flight", async () => { const abort = new AbortController(); const botStop = vi.fn(async () => undefined); const runnerStop = vi.fn(async () => undefined); @@ -846,12 +848,13 @@ describe("TelegramPollingSession", () => { const sendPromise = apiMiddleware(slowPrev, "sendMessage", { chat_id: 123, text: "hello" }); // Fire the watchdog while sendMessage is still in-flight. - // API liveness is still recent, but inbound getUpdates is stale. + // The in-flight call started 60s ago, so API liveness is still recent. watchdog?.(); - expect(runnerStop).toHaveBeenCalledTimes(1); - expect(botStop).toHaveBeenCalledTimes(1); - expect(log).toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); + // The watchdog should NOT have triggered a restart + expect(runnerStop).not.toHaveBeenCalled(); + expect(botStop).not.toHaveBeenCalled(); + expect(log).not.toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); // Resolve the in-flight call to clean up resolveSendMessage?.({ ok: true }); @@ -917,7 +920,7 @@ describe("TelegramPollingSession", () => { } }); - it("triggers stall restart when getUpdates is stale despite newer in-flight non-getUpdates API activity", async () => { + it("does not trigger stall restart when a newer non-getUpdates API call starts while an older one is still in-flight", async () => { const abort = new AbortController(); const botStop = vi.fn(async () => undefined); const runnerStop = vi.fn(async () => undefined); @@ -962,13 +965,13 @@ describe("TelegramPollingSession", () => { { chat_id: 123, text: "newer" }, ); - // The older send is stale and the newer send started recently. - // Watchdog liveness must still follow getUpdates, not unrelated API calls. + // The older send is stale, but the newer send started just now. + // Watchdog liveness must follow the newest active non-getUpdates call. watchdog?.(); - expect(runnerStop).toHaveBeenCalledTimes(1); - expect(botStop).toHaveBeenCalledTimes(1); - expect(log).toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); + expect(runnerStop).not.toHaveBeenCalled(); + expect(botStop).not.toHaveBeenCalled(); + expect(log).not.toHaveBeenCalledWith(expect.stringContaining("Polling stall detected")); resolveFirstSend?.({ ok: true }); resolveSecondSend?.({ ok: true }); diff --git a/package.json b/package.json index 540f06a98fa..c8ec7aac25b 100644 --- a/package.json +++ b/package.json @@ -1302,10 +1302,10 @@ "audit:seams": "node scripts/audit-seams.mjs", "build": "node scripts/build-all.mjs", "build:ci-artifacts": "node scripts/build-all.mjs ciArtifacts", - "build:docker": "node scripts/tsdown-build.mjs && node scripts/check-cli-bootstrap-imports.mjs && node scripts/runtime-postbuild.mjs && node scripts/build-stamp.mjs && node scripts/runtime-postbuild-stamp.mjs && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/copy-export-html-templates.ts && node --import tsx scripts/write-build-info.ts && node --experimental-strip-types scripts/write-cli-startup-metadata.ts && node --import tsx scripts/write-cli-compat.ts", + "build:docker": "node scripts/tsdown-build.mjs && node scripts/check-cli-bootstrap-imports.mjs && node scripts/runtime-postbuild.mjs && node scripts/build-stamp.mjs && node scripts/runtime-postbuild-stamp.mjs && pnpm plugins:assets:copy && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/copy-export-html-templates.ts && node --import tsx scripts/write-build-info.ts && node --experimental-strip-types scripts/write-cli-startup-metadata.ts && node --import tsx scripts/write-cli-compat.ts", "build:plugin-sdk:dts": "node scripts/run-tsgo.mjs -p tsconfig.plugin-sdk.dts.json --declaration true", "build:plugin-sdk:strict-smoke": "pnpm build:plugin-sdk:dts && node --import tsx scripts/write-plugin-sdk-entry-dts.ts", - "build:strict-smoke": "pnpm canvas:a2ui:bundle && node scripts/tsdown-build.mjs && node scripts/check-cli-bootstrap-imports.mjs && node scripts/runtime-postbuild.mjs && node scripts/build-stamp.mjs && node scripts/runtime-postbuild-stamp.mjs && pnpm build:plugin-sdk:dts && node --import tsx scripts/write-plugin-sdk-entry-dts.ts && node scripts/check-plugin-sdk-exports.mjs", + "build:strict-smoke": "pnpm plugins:assets:build && node scripts/tsdown-build.mjs && node scripts/check-cli-bootstrap-imports.mjs && node scripts/runtime-postbuild.mjs && node scripts/build-stamp.mjs && node scripts/runtime-postbuild-stamp.mjs && pnpm build:plugin-sdk:dts && node --import tsx scripts/write-plugin-sdk-entry-dts.ts && node scripts/check-plugin-sdk-exports.mjs", "canon:check": "node scripts/canon.mjs check", "canon:check:json": "node scripts/canon.mjs check --json", "canon:enforce": "node scripts/canon.mjs enforce --json", @@ -1458,6 +1458,8 @@ "plugins:boundary-report:ci": "node --import tsx scripts/plugin-boundary-report.ts --summary --fail-on-cross-owner --fail-on-unclassified-unused-reserved --fail-on-eligible-compat", "plugins:boundary-report:json": "node --import tsx scripts/plugin-boundary-report.ts --json", "plugins:boundary-report:summary": "node --import tsx scripts/plugin-boundary-report.ts --summary", + "plugins:assets:build": "node scripts/bundled-plugin-assets.mjs --phase build", + "plugins:assets:copy": "node scripts/bundled-plugin-assets.mjs --phase copy", "plugins:inventory:check": "node scripts/generate-plugin-inventory-doc.mjs --check", "plugins:inventory:gen": "node scripts/generate-plugin-inventory-doc.mjs --write", "plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts", @@ -1737,6 +1739,7 @@ "zod": "^4.4.3" }, "devDependencies": { + "@a2ui/lit": "0.9.3", "@copilotkit/aimock": "1.17.0", "@grammyjs/types": "^3.26.0", "@lit-labs/signals": "^0.2.0", @@ -1787,7 +1790,7 @@ "fast-xml-parser": "5.7.0", "request": "npm:@cypress/request@3.0.10", "request-promise": "npm:@cypress/request-promise@5.0.0", - "basic-ftp": "5.3.1", + "basic-ftp": "6.0.1", "file-type": "22.0.1", "form-data": "2.5.4", "ip-address": "10.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e4cd7d92ce..82be38d46ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,7 +15,7 @@ overrides: fast-xml-parser: 5.7.0 request: npm:@cypress/request@3.0.10 request-promise: npm:@cypress/request-promise@5.0.0 - basic-ftp: 5.3.1 + basic-ftp: 6.0.1 file-type: 22.0.1 form-data: 2.5.4 ip-address: 10.2.0 @@ -225,6 +225,9 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: + '@a2ui/lit': + specifier: 0.9.3 + version: 0.9.3(signal-polyfill@0.2.2) '@copilotkit/aimock': specifier: 1.17.0 version: 1.17.0(vitest@4.1.5) @@ -450,6 +453,16 @@ importers: specifier: workspace:* version: link:../../packages/plugin-sdk + extensions/canvas: + dependencies: + typebox: + specifier: 1.1.37 + version: 1.1.37 + devDependencies: + '@openclaw/plugin-sdk': + specifier: workspace:* + version: link:../../packages/plugin-sdk + extensions/cerebras: devDependencies: '@openclaw/plugin-sdk': @@ -1684,6 +1697,17 @@ importers: packages: + '@a2ui/lit@0.9.3': + resolution: {integrity: sha512-9Z6LAPQ0w8Se+Atul1fKo/obJPLinSsP16h86xTjr8qRBQDmK6GFnT2fIkUJVALzVoADObidfIdmtbgosFDenA==} + peerDependencies: + '@a2ui/markdown-it': ^0.0.3 + peerDependenciesMeta: + '@a2ui/markdown-it': + optional: true + + '@a2ui/web_core@0.9.2': + resolution: {integrity: sha512-EOfhLOF7tnpPmNq4y116k3gxWdrXQW8h3dhKF0pC++21zLZnCSLSHl6zgQFG+kPeVAZb64t+sQiRXlnyS8+RBg==} + '@agentclientprotocol/claude-agent-acp@0.32.0': resolution: {integrity: sha512-3WIaD1bTmIciqHdeU97oeNajOG9H+ctloXnQ+R/T563C2CM8u1K7QsNqqgqR2F+Cn8NVBkXdHRvAMtUHglLzAw==} hasBin: true @@ -2823,6 +2847,9 @@ packages: resolution: {integrity: sha512-3NZJjeFm2BikwVRgA8osIVbgKhuL0CzphQOdrB8okXIC40qMRE4RRfHFN3G8/qTb/34RtB95mD4J/KW5MD+b8g==} engines: {node: '>=20'} + '@lit-labs/signals@0.1.3': + resolution: {integrity: sha512-P0yWgH5blwVyEwBg+WFspLzeu1i0ypJP1QB0l1Omr9qZLIPsUu0p4Fy2jshOg7oQyha5n163K3GJGeUhQQ682Q==} + '@lit-labs/signals@0.2.0': resolution: {integrity: sha512-68plyIbciumbwKaiilhLNyhz4Vg6/+nJwDufG2xxWA9r/fUw58jxLHCAlKs+q1CE5Lmh3cZ3ShyYKnOCebEpVA==} @@ -3707,6 +3734,9 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@preact/signals-core@1.14.1': + resolution: {integrity: sha512-vxPpfXqrwUe9lpjqfYNjAF/0RF/eFGeLgdJzdmIIZjpOnTmGmAB4BjWone562mJGMRP4frU6iZ6ei3PDsu52Ng==} + '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -4809,8 +4839,8 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - basic-ftp@5.3.1: - resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==} + basic-ftp@6.0.1: + resolution: {integrity: sha512-3ilxa3n4276wGQp/ImRAuz4ALdsj/2Wd3FqoZBZlajDYnByCZ0JMb4+26Rde0wGXIbM0G2HWSfr/Fi8b21KX8g==} engines: {node: '>=10.0.0'} bidi-js@1.0.3: @@ -5085,6 +5115,9 @@ packages: resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -7879,6 +7912,24 @@ packages: snapshots: + '@a2ui/lit@0.9.3(signal-polyfill@0.2.2)': + dependencies: + '@a2ui/web_core': 0.9.2 + '@lit-labs/signals': 0.1.3 + '@lit/context': 1.1.6 + lit: 3.3.2 + signal-utils: 0.21.1(signal-polyfill@0.2.2) + zod: 3.25.76 + transitivePeerDependencies: + - signal-polyfill + + '@a2ui/web_core@0.9.2': + dependencies: + '@preact/signals-core': 1.14.1 + date-fns: 4.1.0 + zod: 3.25.76 + zod-to-json-schema: 3.25.2(zod@3.25.76) + '@agentclientprotocol/claude-agent-acp@0.32.0(patch_hash=1fe782f9679d7a725cbe59e51d61419fbb25d4c463d186c43c95644770cb2b98)': dependencies: '@agentclientprotocol/sdk': 0.21.0(zod@4.4.3) @@ -9570,6 +9621,11 @@ snapshots: dependencies: '@types/node': 24.12.2 + '@lit-labs/signals@0.1.3': + dependencies: + lit: 3.3.2 + signal-polyfill: 0.2.2 + '@lit-labs/signals@0.2.0': dependencies: lit: 3.3.2 @@ -10403,6 +10459,8 @@ snapshots: '@polka/url@1.0.0-next.29': {} + '@preact/signals-core@1.14.1': {} + '@protobufjs/aspromise@1.1.2': {} '@protobufjs/base64@1.1.2': {} @@ -11649,7 +11707,7 @@ snapshots: base64-js@1.5.1: {} - basic-ftp@5.3.1: {} + basic-ftp@6.0.1: {} bidi-js@1.0.3: dependencies: @@ -11918,6 +11976,8 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' + date-fns@4.1.0: {} + debug@4.4.3: dependencies: ms: 2.1.3 @@ -12450,7 +12510,7 @@ snapshots: get-uri@6.0.5: dependencies: - basic-ftp: 5.3.1 + basic-ftp: 6.0.1 data-uri-to-buffer: 6.0.2 debug: 4.4.3 transitivePeerDependencies: @@ -12458,7 +12518,7 @@ snapshots: get-uri@8.0.0: dependencies: - basic-ftp: 5.3.1 + basic-ftp: 6.0.1 data-uri-to-buffer: 8.0.0 debug: 4.4.3 transitivePeerDependencies: @@ -15206,6 +15266,10 @@ snapshots: - bufferutil - utf-8-validate + zod-to-json-schema@3.25.2(zod@3.25.76): + dependencies: + zod: 3.25.76 + zod-to-json-schema@3.25.2(zod@4.4.3): dependencies: zod: 4.4.3 diff --git a/scripts/build-all.mjs b/scripts/build-all.mjs index 07e9dfc5105..377e3684853 100644 --- a/scripts/build-all.mjs +++ b/scripts/build-all.mjs @@ -11,7 +11,7 @@ const nodeBin = process.execPath; const WINDOWS_BUILD_MAX_OLD_SPACE_MB = 4096; const BUILD_CACHE_VERSION = 2; export const BUILD_ALL_STEPS = [ - { label: "canvas:a2ui:bundle", kind: "pnpm", pnpmArgs: ["canvas:a2ui:bundle"] }, + { label: "plugins:assets:build", kind: "pnpm", pnpmArgs: ["plugins:assets:build"] }, { label: "tsdown", kind: "node", args: ["scripts/tsdown-build.mjs"] }, { label: "check-cli-bootstrap-imports", @@ -53,13 +53,9 @@ export const BUILD_ALL_STEPS = [ args: ["scripts/check-plugin-sdk-exports.mjs"], }, { - label: "canvas-a2ui-copy", - kind: "node", - args: ["--import", "tsx", "scripts/canvas-a2ui-copy.ts"], - cache: { - inputs: ["scripts/canvas-a2ui-copy.ts", "src/canvas-host/a2ui"], - outputs: ["dist/canvas-host/a2ui/index.html", "dist/canvas-host/a2ui/a2ui.bundle.js"], - }, + label: "plugins:assets:copy", + kind: "pnpm", + pnpmArgs: ["plugins:assets:copy"], }, { label: "copy-hook-metadata", @@ -99,7 +95,7 @@ export const BUILD_ALL_STEPS = [ export const BUILD_ALL_PROFILES = { full: BUILD_ALL_STEPS.map((step) => step.label), ciArtifacts: [ - "canvas:a2ui:bundle", + "plugins:assets:build", "tsdown", "check-cli-bootstrap-imports", "runtime-postbuild", @@ -108,7 +104,7 @@ export const BUILD_ALL_PROFILES = { "build:plugin-sdk:dts", "write-plugin-sdk-entry-dts", "check-plugin-sdk-exports", - "canvas-a2ui-copy", + "plugins:assets:copy", "copy-hook-metadata", "copy-export-html-templates", "write-build-info", diff --git a/scripts/bundle-a2ui.mjs b/scripts/bundle-a2ui.mjs index 212e5a27aa7..ae2ea6439ed 100644 --- a/scripts/bundle-a2ui.mjs +++ b/scripts/bundle-a2ui.mjs @@ -1,223 +1,8 @@ #!/usr/bin/env node -import { spawnSync } from "node:child_process"; -import { createHash } from "node:crypto"; -import fs from "node:fs/promises"; -import path from "node:path"; -import { fileURLToPath, pathToFileURL } from "node:url"; -import { resolvePnpmRunner } from "./pnpm-runner.mjs"; - -const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); -const hashFile = path.join(rootDir, "src", "canvas-host", "a2ui", ".bundle.hash"); -const outputFile = path.join(rootDir, "src", "canvas-host", "a2ui", "a2ui.bundle.js"); -const a2uiRendererDir = path.join(rootDir, "vendor", "a2ui", "renderers", "lit"); -const a2uiAppDir = path.join(rootDir, "apps", "shared", "OpenClawKit", "Tools", "CanvasA2UI"); -const uiPackageFile = path.join(rootDir, "ui", "package.json"); -const repoInputPaths = [uiPackageFile, a2uiRendererDir, a2uiAppDir]; -const ignoredBundleHashInputPrefixes = ["vendor/a2ui/renderers/lit/dist"]; -const relativeRepoInputPaths = repoInputPaths.map((inputPath) => - normalizePath(path.relative(rootDir, inputPath)), -); - -function fail(message) { - console.error(message); - console.error("A2UI bundling failed. Re-run with: pnpm canvas:a2ui:bundle"); - console.error("If this persists, verify pnpm deps and try again."); - process.exit(1); -} - -async function pathExists(targetPath) { - try { - await fs.stat(targetPath); - return true; - } catch { - return false; - } -} - -function normalizePath(filePath) { - return filePath.split(path.sep).join("/"); -} - -export function isBundleHashInputPath(filePath, repoRoot = rootDir) { - const relativePath = normalizePath(path.relative(repoRoot, filePath)); - return !ignoredBundleHashInputPrefixes.some( - (ignoredPath) => relativePath === ignoredPath || relativePath.startsWith(`${ignoredPath}/`), - ); -} - -export function getLocalRolldownCliCandidates(repoRoot = rootDir) { - return [ - path.join(repoRoot, "node_modules", "rolldown", "bin", "cli.mjs"), - path.join(repoRoot, "node_modules", ".pnpm", "node_modules", "rolldown", "bin", "cli.mjs"), - path.join( - repoRoot, - "node_modules", - ".pnpm", - "rolldown@1.0.0-rc.12", - "node_modules", - "rolldown", - "bin", - "cli.mjs", - ), - ]; -} - -export function getBundleHashRepoInputPaths(repoRoot = rootDir) { - return [ - path.join(repoRoot, "ui", "package.json"), - path.join(repoRoot, "vendor", "a2ui", "renderers", "lit"), - path.join(repoRoot, "apps", "shared", "OpenClawKit", "Tools", "CanvasA2UI"), - ]; -} - -export function getBundleHashInputPaths(repoRoot = rootDir) { - return getBundleHashRepoInputPaths(repoRoot); -} - -export function compareNormalizedPaths(left, right) { - const normalizedLeft = normalizePath(left); - const normalizedRight = normalizePath(right); - if (normalizedLeft < normalizedRight) { - return -1; - } - if (normalizedLeft > normalizedRight) { - return 1; - } - return 0; -} - -async function walkFiles(entryPath, files) { - if (!isBundleHashInputPath(entryPath)) { - return; - } - const stat = await fs.stat(entryPath); - if (!stat.isDirectory()) { - files.push(entryPath); - return; - } - const entries = await fs.readdir(entryPath); - for (const entry of entries) { - await walkFiles(path.join(entryPath, entry), files); - } -} - -function listTrackedInputFiles() { - const result = spawnSync("git", ["ls-files", "--", ...relativeRepoInputPaths], { - cwd: rootDir, - encoding: "utf8", - stdio: ["ignore", "pipe", "pipe"], - }); - if (result.status !== 0) { - return null; - } - const trackedFiles = result.stdout - .split("\n") - .filter(Boolean) - .map((filePath) => path.join(rootDir, filePath)) - .filter((filePath) => isBundleHashInputPath(filePath)); - return trackedFiles; -} - -async function computeHash() { - let files = listTrackedInputFiles(); - if (!files) { - files = []; - for (const inputPath of getBundleHashRepoInputPaths(rootDir)) { - await walkFiles(inputPath, files); - } - } - files = [...new Set(files)].toSorted(compareNormalizedPaths); - - const hash = createHash("sha256"); - for (const filePath of files) { - hash.update(normalizePath(path.relative(rootDir, filePath))); - hash.update("\0"); - hash.update(await fs.readFile(filePath)); - hash.update("\0"); - } - return hash.digest("hex"); -} - -function runStep(command, args, options = {}) { - const result = spawnSync(command, args, { - cwd: rootDir, - stdio: "inherit", - env: process.env, - ...options, - }); - if (result.status !== 0) { - process.exit(result.status ?? 1); - } -} - -function runPnpm(pnpmArgs) { - const runner = resolvePnpmRunner({ - pnpmArgs, - nodeExecPath: process.execPath, - npmExecPath: process.env.npm_execpath, - comSpec: process.env.ComSpec, - platform: process.platform, - }); - runStep(runner.command, runner.args, { - shell: runner.shell, - windowsVerbatimArguments: runner.windowsVerbatimArguments, - }); -} - -async function main() { - const hasRendererDir = await pathExists(a2uiRendererDir); - const hasAppDir = await pathExists(a2uiAppDir); - const hasOutputFile = await pathExists(outputFile); - if (!hasRendererDir || !hasAppDir) { - if (hasOutputFile) { - console.log("A2UI sources missing; keeping prebuilt bundle."); - return; - } - if (process.env.OPENCLAW_SPARSE_PROFILE || process.env.OPENCLAW_A2UI_SKIP_MISSING === "1") { - console.error( - "A2UI sources missing; skipping bundle because OPENCLAW_A2UI_SKIP_MISSING=1 or OPENCLAW_SPARSE_PROFILE is set.", - ); - return; - } - fail(`A2UI sources missing and no prebuilt bundle found at: ${outputFile}`); - } - - const currentHash = await computeHash(); - if (await pathExists(hashFile)) { - const previousHash = (await fs.readFile(hashFile, "utf8")).trim(); - if (previousHash === currentHash && hasOutputFile) { - console.log("A2UI bundle up to date; skipping."); - return; - } - } - - runPnpm(["-s", "exec", "tsgo", "-p", path.join(a2uiRendererDir, "tsconfig.json")]); - - const localRolldownCliCandidates = getLocalRolldownCliCandidates(rootDir); - const localRolldownCli = ( - await Promise.all( - localRolldownCliCandidates.map(async (candidate) => - (await pathExists(candidate)) ? candidate : null, - ), - ) - ).find(Boolean); - - if (localRolldownCli) { - runStep(process.execPath, [ - localRolldownCli, - "-c", - path.join(a2uiAppDir, "rolldown.config.mjs"), - ]); - } else { - runPnpm(["-s", "exec", "rolldown", "-c", path.join(a2uiAppDir, "rolldown.config.mjs")]); - } - - await fs.writeFile(hashFile, `${currentHash}\n`, "utf8"); -} +import { pathToFileURL } from "node:url"; +import { runBundledPluginAssetHooks } from "./bundled-plugin-assets.mjs"; if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { - await main().catch((error) => { - fail(error instanceof Error ? error.message : String(error)); - }); + await runBundledPluginAssetHooks({ phase: "build", plugins: ["canvas"] }); } diff --git a/scripts/bundled-plugin-assets.mjs b/scripts/bundled-plugin-assets.mjs new file mode 100644 index 00000000000..4261a5eac94 --- /dev/null +++ b/scripts/bundled-plugin-assets.mjs @@ -0,0 +1,177 @@ +#!/usr/bin/env node + +import { spawnSync } from "node:child_process"; +import fs from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath, pathToFileURL } from "node:url"; + +const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const VALID_PHASES = new Set(["build", "copy"]); + +async function readJsonFile(filePath) { + return JSON.parse(await fs.readFile(filePath, "utf8")); +} + +async function pathExists(filePath) { + try { + await fs.stat(filePath); + return true; + } catch { + return false; + } +} + +function packagePluginAliases(packageName) { + if (typeof packageName !== "string") { + return []; + } + const aliases = [packageName]; + const unscopedName = packageName.split("/").at(-1); + if (unscopedName) { + aliases.push(unscopedName); + if (unscopedName.endsWith("-plugin")) { + aliases.push(unscopedName.slice(0, -"-plugin".length)); + } + } + return aliases; +} + +async function resolvePluginAliases(pluginDir, packageJson) { + const aliases = new Set([path.basename(pluginDir), ...packagePluginAliases(packageJson.name)]); + const manifestPath = path.join(pluginDir, "openclaw.plugin.json"); + if (await pathExists(manifestPath)) { + const manifest = await readJsonFile(manifestPath); + if (typeof manifest.id === "string" && manifest.id) { + aliases.add(manifest.id); + } + } + return aliases; +} + +function resolveAssetCommand(packageJson, phase) { + const assetScripts = packageJson.openclaw?.assetScripts; + if (!assetScripts || typeof assetScripts !== "object") { + return null; + } + const command = assetScripts[phase]; + return typeof command === "string" && command.trim() ? command.trim() : null; +} + +export async function readBundledPluginAssetHooks(options = {}) { + const repoRoot = options.rootDir ?? rootDir; + const phase = options.phase; + if (!VALID_PHASES.has(phase)) { + throw new Error(`Unsupported bundled plugin asset phase: ${String(phase)}`); + } + + const pluginFilters = new Set((options.plugins ?? []).filter(Boolean)); + const extensionsDir = path.join(repoRoot, "extensions"); + let entries; + try { + entries = await fs.readdir(extensionsDir, { withFileTypes: true }); + } catch { + return []; + } + + const hooks = []; + for (const entry of entries) { + if (!entry.isDirectory()) { + continue; + } + const pluginDir = path.join(extensionsDir, entry.name); + const packagePath = path.join(pluginDir, "package.json"); + if (!(await pathExists(packagePath))) { + continue; + } + + const packageJson = await readJsonFile(packagePath); + const aliases = await resolvePluginAliases(pluginDir, packageJson); + if (pluginFilters.size > 0 && ![...pluginFilters].some((plugin) => aliases.has(plugin))) { + continue; + } + + const command = resolveAssetCommand(packageJson, phase); + if (!command) { + continue; + } + + hooks.push({ + aliases: [...aliases].toSorted(), + command, + packageName: packageJson.name, + phase, + pluginDir, + pluginId: aliases.has(entry.name) ? entry.name : [...aliases][0], + }); + } + + return hooks.toSorted((left, right) => left.pluginDir.localeCompare(right.pluginDir)); +} + +export async function runBundledPluginAssetHooks(options = {}) { + const phase = options.phase; + const hooks = await readBundledPluginAssetHooks(options); + if (hooks.length === 0) { + const scope = options.plugins?.length ? ` for ${options.plugins.join(", ")}` : ""; + console.log(`No bundled plugin asset ${phase} hooks${scope}; skipping.`); + return; + } + + for (const hook of hooks) { + console.log(`[${hook.pluginId}] ${phase}: ${hook.command}`); + const result = spawnSync(hook.command, { + cwd: hook.pluginDir, + env: process.env, + shell: true, + stdio: "inherit", + }); + if (result.status !== 0) { + process.exit(result.status ?? 1); + } + } +} + +export function parseBundledPluginAssetArgs(argv) { + const args = [...argv]; + const plugins = []; + let phase = null; + + while (args.length > 0) { + const arg = args.shift(); + if (arg === "--phase") { + phase = args.shift() ?? null; + continue; + } + if (arg?.startsWith("--phase=")) { + phase = arg.slice("--phase=".length); + continue; + } + if (arg === "--plugin") { + const plugin = args.shift(); + if (plugin) { + plugins.push(plugin); + } + continue; + } + if (arg?.startsWith("--plugin=")) { + plugins.push(arg.slice("--plugin=".length)); + continue; + } + throw new Error(`Unknown bundled plugin asset argument: ${String(arg)}`); + } + + if (!VALID_PHASES.has(phase)) { + throw new Error(`Expected --phase ${[...VALID_PHASES].join("|")}`); + } + + return { phase, plugins }; +} + +if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) { + try { + await runBundledPluginAssetHooks(parseBundledPluginAssetArgs(process.argv.slice(2))); + } catch (error) { + console.error(error instanceof Error ? error.message : String(error)); + process.exit(1); + } +} diff --git a/scripts/check-codex-app-server-protocol.ts b/scripts/check-codex-app-server-protocol.ts index 1fb6741b1f5..2f5e75e0e6b 100644 --- a/scripts/check-codex-app-server-protocol.ts +++ b/scripts/check-codex-app-server-protocol.ts @@ -2,7 +2,6 @@ import fs from "node:fs/promises"; import path from "node:path"; import { generateExperimentalCodexAppServerProtocolSource, - normalizeGeneratedTypeScript, selectedCodexAppServerJsonSchemas, } from "./lib/codex-app-server-protocol-source.js"; @@ -76,7 +75,7 @@ const failures: string[] = []; const source = await generateExperimentalCodexAppServerProtocolSource(); try { - await compareGeneratedProtocolMirror(source.typescriptRoot, source.jsonRoot); + await compareGeneratedProtocolMirror(source.jsonRoot); for (const check of checks) { const filePath = path.join(source.typescriptRoot, check.file); @@ -112,35 +111,7 @@ console.log( `Codex app-server generated protocol matches OpenClaw bridge assumptions: ${source.codexRepo}`, ); -async function compareGeneratedProtocolMirror( - sourceTsRoot: string, - sourceJsonRoot: string, -): Promise { - const targetTsRoot = path.join(generatedRoot, "typescript"); - const sourceFiles = await listFiles(sourceTsRoot, ".ts"); - const targetFiles = await listFiles(targetTsRoot, ".ts"); - const sourceSet = new Set(sourceFiles); - const targetSet = new Set(targetFiles); - - for (const file of sourceFiles) { - if (!targetSet.has(file)) { - failures.push(`protocol-generated/typescript/${file}: missing local mirror`); - continue; - } - const source = normalizeGeneratedTypeScript( - await fs.readFile(path.join(sourceTsRoot, file), "utf8"), - ); - const target = await fs.readFile(path.join(targetTsRoot, file), "utf8"); - if (source !== target) { - failures.push(`protocol-generated/typescript/${file}: differs from normalized source schema`); - } - } - for (const file of targetFiles) { - if (!sourceSet.has(file)) { - failures.push(`protocol-generated/typescript/${file}: no longer present in source schema`); - } - } - +async function compareGeneratedProtocolMirror(sourceJsonRoot: string): Promise { for (const schema of selectedCodexAppServerJsonSchemas) { const sourcePath = path.join(sourceJsonRoot, schema); const targetPath = path.join(generatedRoot, "json", schema); @@ -169,20 +140,3 @@ async function compareGeneratedProtocolMirror( function normalizeJsonSchema(source: string): string { return JSON.stringify(JSON.parse(source)); } - -async function listFiles(root: string, suffix: string): Promise { - const files: string[] = []; - async function visit(dir: string): Promise { - const entries = await fs.readdir(dir, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - if (entry.isDirectory()) { - await visit(fullPath); - } else if (entry.isFile() && entry.name.endsWith(suffix)) { - files.push(path.relative(root, fullPath)); - } - } - } - await visit(root); - return files.toSorted(); -} diff --git a/scripts/ci-changed-scope.mjs b/scripts/ci-changed-scope.mjs index d2327cdcfa6..35bd17a9bcf 100644 --- a/scripts/ci-changed-scope.mjs +++ b/scripts/ci-changed-scope.mjs @@ -28,8 +28,7 @@ const EMPTY_SCOPE = { const DOCS_PATH_RE = /^(docs\/|.*\.mdx?$)/; const SKILLS_PYTHON_SCOPE_RE = /^(skills\/|skills\/pyproject\.toml$)/; const INSTALL_SMOKE_WORKFLOW_SCOPE_RE = /^\.github\/workflows\/install-smoke\.yml$/; -const MACOS_PROTOCOL_GEN_RE = - /^(apps\/macos\/Sources\/OpenClawProtocol\/|apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\/)/; +const NATIVE_PROTOCOL_GEN_RE = /^apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\//; const MACOS_NATIVE_RE = /^(apps\/macos\/|apps\/macos-mlx-tts\/|apps\/ios\/|apps\/shared\/|apps\/swabble\/|Swabble\/)/; const ANDROID_NATIVE_RE = /^(apps\/android\/|apps\/shared\/)/; @@ -57,8 +56,6 @@ const NODE_FAST_CI_ROUTING_SCOPE_RE = const NODE_FAST_SCOPE_RE = new RegExp( `${NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE.source}|${NODE_FAST_CI_ROUTING_SCOPE_RE.source}`, ); -const PROMPT_SNAPSHOT_SCOPE_RE = - /^(test\/helpers\/agents\/happy-path-prompt-snapshots\.ts$|test\/fixtures\/agents\/prompt-snapshots\/|test\/scripts\/prompt-snapshots\.test\.ts$|scripts\/generate-prompt-snapshots\.ts$|scripts\/sync-codex-model-prompt-fixture\.ts$|extensions\/codex\/(?:test-api\.ts$|src\/app-server\/)|src\/auto-reply\/|src\/plugin-sdk\/agent-harness(?:-runtime)?\.ts$|src\/agents\/(?:apply-patch|bash-tools|channel-tools|codex-native-web-search|openclaw-plugin-tools|openclaw-tools|pi-tools|session-tools|subagent|tool-|workspace-dir)\b|src\/utils\/message-channel\.ts$|src\/config\/types\.(?:models|openclaw)\.ts$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$)/; /** * @param {string[]} changedPaths @@ -107,11 +104,11 @@ export function detectChangedScope(changedPaths) { runChangedSmoke = true; } - if (!MACOS_PROTOCOL_GEN_RE.test(path) && MACOS_NATIVE_RE.test(path)) { + if (!NATIVE_PROTOCOL_GEN_RE.test(path) && MACOS_NATIVE_RE.test(path)) { runMacos = true; } - if (ANDROID_NATIVE_RE.test(path)) { + if (!NATIVE_PROTOCOL_GEN_RE.test(path) && ANDROID_NATIVE_RE.test(path)) { runAndroid = true; } @@ -154,17 +151,6 @@ export function detectChangedScope(changedPaths) { }; } -/** - * @param {string[]} changedPaths - * @returns {boolean} - */ -export function detectPromptSnapshotScope(changedPaths) { - if (!Array.isArray(changedPaths) || changedPaths.length === 0) { - return true; - } - return changedPaths.some((rawPath) => PROMPT_SNAPSHOT_SCOPE_RE.test(rawPath.trim())); -} - /** * @param {string[]} changedPaths * @returns {NodeFastScope} @@ -269,7 +255,6 @@ export function writeGitHubOutput( runFullInstallSmoke: scope.runChangedSmoke, }, nodeFastScope = { runFastOnly: false, runPluginContracts: false, runCiRouting: false }, - runPromptSnapshots = scope.runNode, ) { if (!outputPath) { throw new Error("GITHUB_OUTPUT is required"); @@ -298,7 +283,6 @@ export function writeGitHubOutput( "utf8", ); appendFileSync(outputPath, `run_control_ui_i18n=${scope.runControlUiI18n}\n`, "utf8"); - appendFileSync(outputPath, `run_prompt_snapshots=${runPromptSnapshots}\n`, "utf8"); } function isDirectRun() { @@ -336,7 +320,6 @@ if (isDirectRun()) { process.env.GITHUB_OUTPUT, detectInstallSmokeScope(changedPaths), detectNodeFastScope(changedPaths), - detectPromptSnapshotScope(changedPaths), ); } catch { writeGitHubOutput(FULL_SCOPE); diff --git a/scripts/ci-run-timings.mjs b/scripts/ci-run-timings.mjs index 3388fe86b13..74e9adbc34b 100644 --- a/scripts/ci-run-timings.mjs +++ b/scripts/ci-run-timings.mjs @@ -2,10 +2,6 @@ import { execFileSync } from "node:child_process"; -const DEFAULT_REPOSITORY = "openclaw/openclaw"; -const CI_WORKFLOW_ID = "ci.yml"; -const GH_MAX_BUFFER = 32 * 1024 * 1024; - function parseTime(value) { if (!value || value === "0001-01-01T00:00:00Z") { return null; @@ -22,36 +18,15 @@ function formatSeconds(value) { return value === null ? "" : `${value}s`; } -function normalizeRun(run) { - return { - ...run, - createdAt: run.createdAt ?? run.created_at, - databaseId: run.databaseId ?? run.id, - displayTitle: run.displayTitle ?? run.display_title, - event: run.event, - headSha: run.headSha ?? run.head_sha, - runStartedAt: run.runStartedAt ?? run.run_started_at, - status: run.status, - conclusion: run.conclusion, - updatedAt: run.updatedAt ?? run.updated_at, - }; -} - -function normalizeJob(job) { - return { - ...job, - completedAt: job.completedAt ?? job.completed_at, - runnerName: job.runnerName ?? job.runner_name, - startedAt: job.startedAt ?? job.started_at, - }; +function parseRunList(raw) { + const parsed = JSON.parse(raw); + return Array.isArray(parsed) ? parsed : []; } function collectRunTimingContext(run) { - const normalizedRun = normalizeRun(run); - const created = parseTime(normalizedRun.createdAt); - const runUpdated = parseTime(normalizedRun.updatedAt); - const jobs = (normalizedRun.jobs ?? []) - .map(normalizeJob) + const created = parseTime(run.createdAt); + const updated = parseTime(run.updatedAt); + const jobs = (run.jobs ?? []) .filter((job) => !job.name?.startsWith("matrix.")) .map((job) => { const started = parseTime(job.startedAt); @@ -67,18 +42,11 @@ function collectRunTimingContext(run) { }; }); - const completedTimes = jobs.map((job) => job.completed).filter((completed) => completed !== null); - const lastCompleted = completedTimes.length === 0 ? null : Math.max(...completedTimes); - const updated = - runUpdated !== null && lastCompleted !== null - ? Math.max(runUpdated, lastCompleted) - : (runUpdated ?? lastCompleted); - - return { created, jobs, run: normalizedRun, updated }; + return { created, jobs, updated }; } export function summarizeRunTimings(run, limit = 15) { - const { created, jobs, run: normalizedRun, updated } = collectRunTimingContext(run); + const { created, jobs, updated } = collectRunTimingContext(run); const byDuration = [...jobs] .filter((job) => job.durationSeconds !== null) .toSorted((left, right) => right.durationSeconds - left.durationSeconds) @@ -94,15 +62,15 @@ export function summarizeRunTimings(run, limit = 15) { return { byDuration, byQueue, - conclusion: normalizedRun.conclusion ?? "", - status: normalizedRun.status ?? "", + conclusion: run.conclusion ?? "", + status: run.status ?? "", wallSeconds: secondsBetween(created, updated), badJobs, }; } export function selectLatestMainPushCiRun(runs, headSha = null) { - const pushRuns = runs.map(normalizeRun).filter((run) => run.event === "push"); + const pushRuns = runs.filter((run) => run.event === "push"); if (headSha) { const matchingRun = pushRuns.find((run) => run.headSha === headSha); if (matchingRun) { @@ -112,37 +80,13 @@ export function selectLatestMainPushCiRun(runs, headSha = null) { return pushRuns[0] ?? null; } -function repositorySlug() { - return process.env.GITHUB_REPOSITORY || DEFAULT_REPOSITORY; -} - -function ghApiJson(path) { - return JSON.parse( - execFileSync("gh", ["api", path], { - encoding: "utf8", - maxBuffer: GH_MAX_BUFFER, - }), - ); -} - -function listMainCiRuns(limit) { - const runs = []; - const perPage = Math.max(1, Math.min(100, limit)); - for (let page = 1; runs.length < limit && page <= 10; page += 1) { - const data = ghApiJson( - `repos/${repositorySlug()}/actions/workflows/${CI_WORKFLOW_ID}/runs?branch=main&per_page=${perPage}&page=${page}&exclude_pull_requests=true`, - ); - const pageRuns = (data.workflow_runs ?? []).map(normalizeRun); - runs.push(...pageRuns); - if (pageRuns.length < perPage) { - break; - } - } - return runs.slice(0, limit); -} - function getLatestCiRunId() { - const runs = listMainCiRuns(1); + const raw = execFileSync( + "gh", + ["run", "list", "--branch", "main", "--workflow", "CI", "--limit", "1", "--json", "databaseId"], + { encoding: "utf8" }, + ); + const runs = JSON.parse(raw); const runId = runs[0]?.databaseId; if (!runId) { throw new Error("No CI runs found on main"); @@ -161,7 +105,23 @@ function getRemoteMainSha() { function getLatestMainPushCiRunId() { const headSha = getRemoteMainSha(); - const run = selectLatestMainPushCiRun(listMainCiRuns(40), headSha); + const raw = execFileSync( + "gh", + [ + "run", + "list", + "--branch", + "main", + "--workflow", + "CI", + "--limit", + "20", + "--json", + "databaseId,headSha,event,status,conclusion", + ], + { encoding: "utf8" }, + ); + const run = selectLatestMainPushCiRun(parseRunList(raw), headSha); if (!run?.databaseId) { throw new Error(`No push CI run found for origin/main ${headSha.slice(0, 10)}`); } @@ -169,30 +129,37 @@ function getLatestMainPushCiRunId() { } function listRecentSuccessfulCiRuns(limit) { - return listMainCiRuns(Math.max(limit * 12, 100)) + const raw = execFileSync( + "gh", + [ + "run", + "list", + "--branch", + "main", + "--workflow", + "CI", + "--limit", + String(Math.max(limit * 4, limit)), + "--json", + "databaseId,headSha,status,conclusion", + ], + { encoding: "utf8" }, + ); + return JSON.parse(raw) .filter((run) => run.status === "completed" && run.conclusion === "success") .slice(0, limit); } function loadRun(runId) { - const repository = repositorySlug(); - const run = normalizeRun(ghApiJson(`repos/${repository}/actions/runs/${runId}`)); - const jobs = []; - for (let page = 1; page <= 10; page += 1) { - const data = ghApiJson( - `repos/${repository}/actions/runs/${runId}/jobs?per_page=100&page=${page}`, - ); - const pageJobs = data.jobs ?? []; - jobs.push(...pageJobs.map(normalizeJob)); - if (pageJobs.length < 100) { - break; - } - } - return { - ...run, - createdAt: run.createdAt ?? run.runStartedAt, - jobs, - }; + return JSON.parse( + execFileSync( + "gh", + ["run", "view", runId, "--json", "status,conclusion,createdAt,updatedAt,jobs"], + { + encoding: "utf8", + }, + ), + ); } function summarizeJobs(run) { @@ -278,12 +245,7 @@ async function main() { process.argv.slice(2), ); if (recentLimit !== null) { - const runs = listRecentSuccessfulCiRuns(recentLimit); - if (runs.length === 0) { - console.log("No recent successful main CI runs found in the latest 100 runs."); - return; - } - for (const run of runs) { + for (const run of listRecentSuccessfulCiRuns(recentLimit)) { const summary = summarizeJobs(loadRun(run.databaseId)); console.log( [ diff --git a/scripts/ci-runner-labels.mjs b/scripts/ci-runner-labels.mjs deleted file mode 100644 index 1e242b68c2d..00000000000 --- a/scripts/ci-runner-labels.mjs +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env node - -import { appendFileSync } from "node:fs"; - -export const RUNNER_LABELS = { - runner_4vcpu_ubuntu: { - fallback: "ubuntu-24.04", - family: "ubuntu-2404", - primary: "blacksmith-4vcpu-ubuntu-2404", - }, - runner_8vcpu_ubuntu: { - fallback: "ubuntu-24.04", - family: "ubuntu-2404", - primary: "blacksmith-8vcpu-ubuntu-2404", - }, - runner_16vcpu_ubuntu: { - fallback: "ubuntu-24.04", - family: "ubuntu-2404", - primary: "blacksmith-16vcpu-ubuntu-2404", - }, - runner_16vcpu_windows: { - fallback: "windows-2025", - family: "windows-2025", - primary: "blacksmith-16vcpu-windows-2025", - }, - runner_6vcpu_macos: { - fallback: "macos-latest", - family: "macos-latest", - primary: "blacksmith-6vcpu-macos-latest", - }, - runner_12vcpu_macos: { - fallback: "macos-latest", - family: "macos-latest", - primary: "blacksmith-12vcpu-macos-latest", - }, -}; - -const DEFAULT_REPOSITORY = "openclaw/openclaw"; -const DEFAULT_QUEUE_THRESHOLD = 1; -const MAX_RUNS_TO_SCAN = 8; -const MAX_JOB_PAGES_PER_RUN = 2; - -function parseBoolean(value, fallback = false) { - if (value === undefined) { - return fallback; - } - const normalized = value.trim().toLowerCase(); - if (normalized === "1" || normalized === "true" || normalized === "yes") { - return true; - } - if (normalized === "0" || normalized === "false" || normalized === "no" || normalized === "") { - return false; - } - return fallback; -} - -function parsePositiveInteger(value, fallback) { - const parsed = Number.parseInt(value ?? "", 10); - return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback; -} - -export function selectRunnerLabels({ - canonicalRepository = true, - fallbackEnabled = true, - queuedCountsByLabel = {}, - queueThreshold = DEFAULT_QUEUE_THRESHOLD, -} = {}) { - const selected = {}; - for (const [outputName, label] of Object.entries(RUNNER_LABELS)) { - const queuedCount = queuedCountsByLabel[label.primary] ?? 0; - selected[outputName] = - !canonicalRepository || (fallbackEnabled && queuedCount >= queueThreshold) - ? label.fallback - : label.primary; - } - return selected; -} - -async function githubApi(path, token) { - const response = await fetch(`https://api.github.com/${path}`, { - headers: { - accept: "application/vnd.github+json", - authorization: `Bearer ${token}`, - "x-github-api-version": "2022-11-28", - }, - }); - if (!response.ok) { - throw new Error(`GitHub API ${path} failed: ${response.status} ${response.statusText}`); - } - return response.json(); -} - -async function collectQueuedBlacksmithJobs({ repository, token }) { - const [queuedRuns, inProgressRuns] = await Promise.all([ - githubApi( - `repos/${repository}/actions/runs?status=queued&per_page=${MAX_RUNS_TO_SCAN}&exclude_pull_requests=true`, - token, - ), - githubApi( - `repos/${repository}/actions/runs?status=in_progress&per_page=${MAX_RUNS_TO_SCAN}&exclude_pull_requests=true`, - token, - ), - ]); - const runsById = new Map(); - for (const run of [ - ...(queuedRuns.workflow_runs ?? []), - ...(inProgressRuns.workflow_runs ?? []), - ]) { - runsById.set(run.id, run); - } - - const counts = {}; - await Promise.all( - [...runsById.values()].map(async (run) => { - const runCounts = {}; - for (let page = 1; page <= MAX_JOB_PAGES_PER_RUN; page += 1) { - const jobs = await githubApi( - `repos/${repository}/actions/runs/${run.id}/jobs?per_page=100&page=${page}`, - token, - ); - for (const job of jobs.jobs ?? []) { - if (job.status !== "queued") { - continue; - } - for (const label of job.labels ?? []) { - if (typeof label === "string" && label.startsWith("blacksmith-")) { - runCounts[label] = (runCounts[label] ?? 0) + 1; - } - } - } - if ((jobs.jobs ?? []).length < 100) { - break; - } - } - for (const [label, count] of Object.entries(runCounts)) { - counts[label] = (counts[label] ?? 0) + count; - } - }), - ); - return counts; -} - -function writeOutputs(outputs) { - const outputPath = process.env.GITHUB_OUTPUT; - if (!outputPath) { - console.log(JSON.stringify(outputs, null, 2)); - return; - } - for (const [key, value] of Object.entries(outputs)) { - appendFileSync(outputPath, `${key}=${String(value)}\n`, "utf8"); - } -} - -async function main() { - const repository = process.env.GITHUB_REPOSITORY || DEFAULT_REPOSITORY; - const canonicalRepository = repository === DEFAULT_REPOSITORY; - const fallbackEnabled = parseBoolean(process.env.OPENCLAW_CI_BLACKSMITH_FALLBACK, true); - const queueThreshold = parsePositiveInteger( - process.env.OPENCLAW_CI_BLACKSMITH_QUEUE_FALLBACK_THRESHOLD, - DEFAULT_QUEUE_THRESHOLD, - ); - let queuedCountsByLabel = {}; - - if (canonicalRepository && fallbackEnabled && process.env.GITHUB_TOKEN) { - try { - queuedCountsByLabel = await collectQueuedBlacksmithJobs({ - repository, - token: process.env.GITHUB_TOKEN, - }); - } catch (error) { - const message = error instanceof Error ? error.message : String(error); - console.log(`::warning title=Blacksmith fallback probe failed::${message}`); - } - } - - const selected = selectRunnerLabels({ - canonicalRepository, - fallbackEnabled, - queuedCountsByLabel, - queueThreshold, - }); - - console.log( - JSON.stringify( - { - fallbackEnabled, - queueThreshold, - queuedCountsByLabel, - selected, - }, - null, - 2, - ), - ); - writeOutputs(selected); -} - -if (import.meta.url === `file://${process.argv[1]}`) { - await main(); -} diff --git a/scripts/e2e/lib/parallels-package-common.sh b/scripts/e2e/lib/parallels-package-common.sh index 6afdad8347f..cffd29f8c71 100644 --- a/scripts/e2e/lib/parallels-package-common.sh +++ b/scripts/e2e/lib/parallels-package-common.sh @@ -48,7 +48,7 @@ parallels_package_write_dist_inventory() { parallels_package_assert_no_generated_drift() { local drift - drift="$(git status --porcelain -- src/canvas-host/a2ui/.bundle.hash 2>/dev/null || true)" + drift="$(git status --porcelain -- ':(glob)extensions/*/src/host/**/.bundle.hash' 2>/dev/null || true)" if [[ -z "$drift" ]]; then return 0 fi diff --git a/scripts/e2e/parallels/package-artifact.ts b/scripts/e2e/parallels/package-artifact.ts index 787c331cdfe..eb5cae6dee2 100644 --- a/scripts/e2e/parallels/package-artifact.ts +++ b/scripts/e2e/parallels/package-artifact.ts @@ -105,9 +105,13 @@ async function ensureCurrentBuildUnlocked(input: { say("Build Control UI for current head"); run("pnpm", ["ui:build"]); } - const drift = run("git", ["status", "--porcelain", "--", "src/canvas-host/a2ui/.bundle.hash"], { - quiet: true, - }).stdout.trim(); + const drift = run( + "git", + ["status", "--porcelain", "--", ":(glob)extensions/*/src/host/**/.bundle.hash"], + { + quiet: true, + }, + ).stdout.trim(); if (drift) { die(`generated file drift after build; commit or revert before Parallels packaging:\n${drift}`); } diff --git a/scripts/lib/ci-node-test-plan.mjs b/scripts/lib/ci-node-test-plan.mjs index 8e040aa536c..37dfa50b9b0 100644 --- a/scripts/lib/ci-node-test-plan.mjs +++ b/scripts/lib/ci-node-test-plan.mjs @@ -304,22 +304,16 @@ const SPLIT_NODE_SHARDS = new Map([ ], requiresDist: false, }, - { - shardName: "core-runtime-cron", - configs: ["test/vitest/vitest.cron.config.ts"], - requiresDist: false, - runner: "blacksmith-4vcpu-ubuntu-2404", - }, { shardName: "core-runtime-shared", configs: [ "test/vitest/vitest.acp.config.ts", + "test/vitest/vitest.cron.config.ts", "test/vitest/vitest.shared-core.config.ts", "test/vitest/vitest.tasks.config.ts", "test/vitest/vitest.utils.config.ts", ], requiresDist: false, - runner: "blacksmith-4vcpu-ubuntu-2404", }, ], ], diff --git a/scripts/pre-commit/filter-staged-files.mjs b/scripts/pre-commit/filter-staged-files.mjs index 56681b80696..2206a0240ce 100644 --- a/scripts/pre-commit/filter-staged-files.mjs +++ b/scripts/pre-commit/filter-staged-files.mjs @@ -21,15 +21,15 @@ if (mode !== "lint" && mode !== "format") { } const lintExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"]); -const formatExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json", ".md", ".mdx"]); -const formatIgnoredPaths = new Set(["src/canvas-host/a2ui/a2ui.bundle.js"]); +const formatExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".md", ".mdx"]); +const formatIgnoredPathPatterns = [/^extensions\/[^/]+\/src\/host\/.+\/[^/]+\.bundle\.js$/u]; const shouldSelect = (filePath) => { const ext = path.extname(filePath).toLowerCase(); if (mode === "lint") { return lintExts.has(ext); } - if (formatIgnoredPaths.has(filePath)) { + if (formatIgnoredPathPatterns.some((pattern) => pattern.test(filePath))) { return false; } return formatExts.has(ext); diff --git a/scripts/prepush-ci.sh b/scripts/prepush-ci.sh index 8111b3acfeb..cd0796f8bff 100644 --- a/scripts/prepush-ci.sh +++ b/scripts/prepush-ci.sh @@ -17,7 +17,6 @@ run_step() { run_protocol_ci_mirror() { local targets=( "dist/protocol.schema.json" - "apps/macos/Sources/OpenClawProtocol/GatewayModels.swift" "apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift" ) local before after @@ -55,7 +54,7 @@ run_linux_ci_mirror() { run_step pnpm build:strict-smoke run_step pnpm lint:ui:no-raw-window-open run_protocol_ci_mirror - run_step pnpm canvas:a2ui:bundle + run_step pnpm plugins:assets:build run_step node scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts --maxWorkers=1 run_step env CI=true node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts --maxWorkers=1 diff --git a/scripts/protocol-gen-swift.ts b/scripts/protocol-gen-swift.ts index 5ae87a01210..12ae36baaa7 100644 --- a/scripts/protocol-gen-swift.ts +++ b/scripts/protocol-gen-swift.ts @@ -15,7 +15,6 @@ type JsonSchema = { const __dirname = path.dirname(fileURLToPath(import.meta.url)); const repoRoot = path.resolve(__dirname, ".."); const outPaths = [ - path.join(repoRoot, "apps", "macos", "Sources", "OpenClawProtocol", "GatewayModels.swift"), path.join( repoRoot, "apps", diff --git a/scripts/restart-mac.sh b/scripts/restart-mac.sh index ba1aab336b6..444c34c50ab 100755 --- a/scripts/restart-mac.sh +++ b/scripts/restart-mac.sh @@ -153,8 +153,8 @@ log "==> Killing existing OpenClaw instances" kill_all_openclaw stop_launch_agent -# Bundle Gateway-hosted Canvas A2UI assets. -run_step "bundle canvas a2ui" bash -lc "cd '${ROOT_DIR}' && pnpm canvas:a2ui:bundle" +# Bundle Gateway-hosted plugin assets. +run_step "bundle plugin assets" bash -lc "cd '${ROOT_DIR}' && pnpm plugins:assets:build" # 2) Rebuild into the same path the packager consumes (.build). run_step "clean build cache" bash -lc "cd '${ROOT_DIR}/apps/macos' && rm -rf .build .build-swift .swiftpm 2>/dev/null || true" diff --git a/scripts/run-additional-boundary-checks.mjs b/scripts/run-additional-boundary-checks.mjs index 468e7367589..b40d9a7fb99 100644 --- a/scripts/run-additional-boundary-checks.mjs +++ b/scripts/run-additional-boundary-checks.mjs @@ -3,6 +3,7 @@ import { spawn } from "node:child_process"; import { performance } from "node:perf_hooks"; export const BOUNDARY_CHECKS = [ + ["prompt:snapshots:check", "pnpm", ["prompt:snapshots:check"]], ["plugin-extension-boundary", "pnpm", ["run", "lint:plugins:no-extension-imports"]], ["lint:tmp:no-random-messaging", "pnpm", ["run", "lint:tmp:no-random-messaging"]], ["lint:tmp:channel-agnostic-boundaries", "pnpm", ["run", "lint:tmp:channel-agnostic-boundaries"]], @@ -56,13 +57,6 @@ export const BOUNDARY_CHECKS = [ ["lint:ui:no-raw-window-open", "pnpm", ["lint:ui:no-raw-window-open"]], ].map(([label, command, args]) => ({ label, command, args })); -export const PROMPT_SNAPSHOT_CHECK_LABEL = "prompt:snapshots:check"; -export const PROMPT_SNAPSHOT_CHECK = { - label: PROMPT_SNAPSHOT_CHECK_LABEL, - command: "pnpm", - args: ["prompt:snapshots:check"], -}; - export function resolveConcurrency(value, fallback = 4) { const parsed = Number.parseInt(String(value ?? ""), 10); if (!Number.isFinite(parsed) || parsed < 1) { @@ -101,21 +95,6 @@ export function selectChecksForShard(checks, shardSpec) { return checks.filter((_check, index) => index % shard.count === shard.index); } -export function shouldRunPromptSnapshots(value) { - return ( - String(value ?? "true") - .trim() - .toLowerCase() !== "false" - ); -} - -export function filterChecksForEnvironment(checks, env = process.env) { - if (shouldRunPromptSnapshots(env.OPENCLAW_RUN_PROMPT_SNAPSHOTS)) { - return checks; - } - return checks.filter((check) => check.label !== PROMPT_SNAPSHOT_CHECK_LABEL); -} - export function formatCommand({ command, args }) { return [command, ...args].join(" "); } @@ -256,7 +235,7 @@ if (import.meta.url === `file://${process.argv[1]}`) { process.env.OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY, ); const shard = parseShardSpec(resolveCliShardSpec(process.argv.slice(2), process.env)); - const checks = filterChecksForEnvironment(selectChecksForShard(BOUNDARY_CHECKS, shard)); + const checks = selectChecksForShard(BOUNDARY_CHECKS, shard); if (shard) { process.stdout.write( `Running ${checks.length}/${BOUNDARY_CHECKS.length} additional boundary checks (shard ${shard.label})\n`, diff --git a/scripts/run-node-watch-paths.mjs b/scripts/run-node-watch-paths.mjs index c04af8e25d9..c92fef8a3f3 100644 --- a/scripts/run-node-watch-paths.mjs +++ b/scripts/run-node-watch-paths.mjs @@ -9,10 +9,10 @@ export const runNodeConfigFiles = ["tsconfig.json", "package.json", "tsdown.conf export const runNodeWatchedPaths = [...runNodeSourceRoots, ...runNodeConfigFiles]; export const extensionRestartMetadataFiles = new Set(["openclaw.plugin.json", "package.json"]); -const ignoredRunNodeRepoPaths = new Set([ - "src/canvas-host/a2ui/.bundle.hash", - "src/canvas-host/a2ui/a2ui.bundle.js", -]); +const ignoredRunNodeRepoPathPatterns = [ + /^extensions\/[^/]+\/src\/host\/.+\/\.bundle\.hash$/u, + /^extensions\/[^/]+\/src\/host\/.+\/[^/]+\.bundle\.js$/u, +]; const extensionSourceFilePattern = /\.(?:[cm]?[jt]sx?)$/; export const normalizeRunNodePath = (filePath) => String(filePath ?? "").replaceAll("\\", "/"); @@ -41,7 +41,7 @@ const isRestartRelevantExtensionPath = (relativePath) => { const isRelevantRunNodePath = (repoPath, isRelevantBundledPluginPath) => { const normalizedPath = normalizeRunNodePath(repoPath).replace(/^\.\/+/, ""); - if (ignoredRunNodeRepoPaths.has(normalizedPath)) { + if (ignoredRunNodeRepoPathPatterns.some((pattern) => pattern.test(normalizedPath))) { return false; } if (runNodeConfigFiles.includes(normalizedPath)) { diff --git a/scripts/sync-codex-app-server-protocol.ts b/scripts/sync-codex-app-server-protocol.ts index 254b451b14d..cb82b068da3 100644 --- a/scripts/sync-codex-app-server-protocol.ts +++ b/scripts/sync-codex-app-server-protocol.ts @@ -14,16 +14,13 @@ const source = await generateExperimentalCodexAppServerProtocolSource(); try { await fs.rm(targetRoot, { recursive: true, force: true }); await fs.mkdir(targetRoot, { recursive: true }); - await fs.cp(source.typescriptRoot, path.join(targetRoot, "typescript"), { - recursive: true, - }); for (const schema of selectedCodexAppServerJsonSchemas) { await fs.mkdir(path.dirname(path.join(targetRoot, "json", schema)), { recursive: true }); const schemaSource = await fs.readFile(path.join(source.jsonRoot, schema), "utf8"); await fs.writeFile( path.join(targetRoot, "json", schema), - `${JSON.stringify(JSON.parse(schemaSource))}\n`, + `${JSON.stringify(JSON.parse(schemaSource), null, 2)}\n`, ); } } finally { diff --git a/scripts/test-projects.test-support.mjs b/scripts/test-projects.test-support.mjs index 18158070d81..22589fe73d1 100644 --- a/scripts/test-projects.test-support.mjs +++ b/scripts/test-projects.test-support.mjs @@ -347,7 +347,6 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([ ["scripts/run-oxlint.mjs", ["test/scripts/run-oxlint.test.ts"]], ["scripts/run-node.mjs", ["src/infra/run-node.test.ts"]], ["scripts/ci-run-timings.mjs", ["test/scripts/ci-run-timings.test.ts"]], - ["scripts/ci-runner-labels.mjs", ["test/scripts/ci-runner-labels.test.ts"]], ["scripts/test-extension-batch.mjs", ["test/scripts/test-extension.test.ts"]], ["scripts/lib/extension-test-plan.mjs", ["test/scripts/test-extension.test.ts"]], ["scripts/lib/vitest-batch-runner.mjs", ["test/scripts/test-extension.test.ts"]], @@ -375,6 +374,10 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([ ["scripts/blacksmith-testbox-state.mjs", ["test/scripts/blacksmith-testbox-state.test.ts"]], ["scripts/blacksmith-testbox-runner.mjs", ["test/scripts/blacksmith-testbox-runner.test.ts"]], ["scripts/testbox-sync-sanity.mjs", ["test/scripts/testbox-sync-sanity.test.ts"]], + ["scripts/bundled-plugin-assets.mjs", ["test/scripts/bundled-plugin-assets.test.ts"]], + ["scripts/bundle-a2ui.mjs", ["test/scripts/bundled-plugin-assets.test.ts"]], + ["extensions/canvas/scripts/bundle-a2ui.mjs", ["test/scripts/bundle-a2ui.test.ts"]], + ["extensions/canvas/scripts/copy-a2ui.mjs", ["src/scripts/canvas-a2ui-copy.test.ts"]], ]); const TOOLING_TEST_TARGETS = new Map([ ["test/scripts/barnacle-auto-response.test.ts", ["test/scripts/barnacle-auto-response.test.ts"]], @@ -495,10 +498,10 @@ const SOURCE_TEST_TARGETS = new Map([ ["src/auto-reply/reply/dispatch-acp-command-bypass.test.ts"], ], ]); -const GENERATED_CHANGED_TEST_TARGETS = new Set([ - "src/canvas-host/a2ui/.bundle.hash", - "src/canvas-host/a2ui/a2ui.bundle.js", -]); +const GENERATED_CHANGED_TEST_TARGET_PATTERNS = [ + /^extensions\/[^/]+\/src\/host\/.+\/\.bundle\.hash$/u, + /^extensions\/[^/]+\/src\/host\/.+\/[^/]+\.bundle\.js$/u, +]; const SOURCE_ROOTS_FOR_IMPORT_GRAPH = ["src", "extensions", "packages", "ui/src", "test"]; const IMPORTABLE_FILE_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"]; const IMPORT_SPECIFIER_PATTERN = @@ -940,7 +943,7 @@ function shouldUseBroadChangedTargets(env = process.env) { } function isRoutableChangedTarget(changedPath) { - if (GENERATED_CHANGED_TEST_TARGETS.has(changedPath)) { + if (GENERATED_CHANGED_TEST_TARGET_PATTERNS.some((pattern) => pattern.test(changedPath))) { return false; } if (changedPath.endsWith(".live.test.ts")) { diff --git a/src/agents/command/delivery.test.ts b/src/agents/command/delivery.test.ts index 8168d6722d9..2e82a135ead 100644 --- a/src/agents/command/delivery.test.ts +++ b/src/agents/command/delivery.test.ts @@ -216,22 +216,6 @@ describe("normalizeAgentCommandReplyPayloads", () => { }); it("reports successful requested delivery", async () => { - deliverOutboundPayloadsMock.mockResolvedValue([ - { - channel: "slack", - messageId: "m1", - }, - ]); - - const delivered = await deliverMediaReplyForTest({ - key: "agent:tester:slack:direct:alice", - agentId: "tester", - } as never); - - expect(delivered.deliverySucceeded).toBe(true); - }); - - it("does not report success when delivery claims no adapter result", async () => { deliverOutboundPayloadsMock.mockResolvedValue([]); const delivered = await deliverMediaReplyForTest({ @@ -239,7 +223,7 @@ describe("normalizeAgentCommandReplyPayloads", () => { agentId: "tester", } as never); - expect(delivered.deliverySucceeded).toBe(false); + expect(delivered.deliverySucceeded).toBe(true); }); it("does not report success when best-effort delivery records an error", async () => { diff --git a/src/agents/command/delivery.ts b/src/agents/command/delivery.ts index 5e334107a25..2cad2a18179 100644 --- a/src/agents/command/delivery.ts +++ b/src/agents/command/delivery.ts @@ -381,7 +381,7 @@ export async function deliverAgentCommandResult(params: { } if (deliver && deliveryChannel && !isInternalMessageChannel(deliveryChannel)) { if (deliveryTarget) { - const deliveryResults = await deliverOutboundPayloads({ + await deliverOutboundPayloads({ cfg, channel: deliveryChannel, to: deliveryTarget, @@ -395,7 +395,7 @@ export async function deliverAgentCommandResult(params: { onPayload: logPayload, deps: createOutboundSendDeps(deps), }); - deliverySucceeded = deliveryResults.length > 0 && !deliveryHadError; + deliverySucceeded = !deliveryHadError; } } diff --git a/src/agents/compaction.identifier-preservation.test.ts b/src/agents/compaction.identifier-preservation.test.ts index 92be73ef07f..957180c72a9 100644 --- a/src/agents/compaction.identifier-preservation.test.ts +++ b/src/agents/compaction.identifier-preservation.test.ts @@ -7,7 +7,6 @@ vi.mock("@mariozechner/pi-coding-agent", async () => { const actual = await vi.importActual("@mariozechner/pi-coding-agent"); return { ...actual, - estimateTokens: vi.fn((message: unknown) => Math.ceil(JSON.stringify(message).length / 4)), generateSummary: vi.fn(), }; }); diff --git a/src/agents/compaction.reserve-tokens-clamping.test.ts b/src/agents/compaction.reserve-tokens-clamping.test.ts deleted file mode 100644 index b23bbaf2aa9..00000000000 --- a/src/agents/compaction.reserve-tokens-clamping.test.ts +++ /dev/null @@ -1,154 +0,0 @@ -import type { AgentMessage } from "@mariozechner/pi-agent-core"; -import type { ExtensionContext } from "@mariozechner/pi-coding-agent"; -import { beforeEach, describe, expect, it, vi } from "vitest"; - -const piCodingAgentMocks = vi.hoisted(() => ({ - estimateTokens: vi.fn((message: unknown) => Math.ceil(JSON.stringify(message).length / 4)), - generateSummary: vi.fn(), -})); - -vi.mock("@mariozechner/pi-coding-agent", async () => { - const actual = await vi.importActual( - "@mariozechner/pi-coding-agent", - ); - return { - ...actual, - estimateTokens: piCodingAgentMocks.estimateTokens, - generateSummary: piCodingAgentMocks.generateSummary, - }; -}); - -const mockGenerateSummary = piCodingAgentMocks.generateSummary; - -let summarizeInStages: typeof import("./compaction.js").summarizeInStages; - -async function loadFreshCompactionModuleForTest() { - vi.resetModules(); - ({ summarizeInStages } = await import("./compaction.js")); -} - -function makeMessage(index: number, size = 1200): AgentMessage { - return { - role: "user", - content: `m${index}-${"x".repeat(size)}`, - timestamp: index, - }; -} - -describe("compaction reserveTokens clamping", () => { - beforeEach(async () => { - await loadFreshCompactionModuleForTest(); - mockGenerateSummary.mockReset(); - mockGenerateSummary.mockResolvedValue("summary"); - piCodingAgentMocks.estimateTokens.mockReset(); - piCodingAgentMocks.estimateTokens.mockImplementation((message: unknown) => - Math.ceil(JSON.stringify(message).length / 4), - ); - }); - - it("clamps reserveTokens when model maxTokens is smaller than requested", async () => { - // Simulate the exact bug scenario: large context window (1M) with - // reserveTokensFloor of 300K, but model output limit is only 128K. - // Without clamping, generateSummary would receive 300K and compute - // max_tokens = floor(0.8 * 300K) = 240K, exceeding the 128K model limit. - const model = { - provider: "anthropic", - model: "claude-sonnet-4-6", - contextWindow: 1_000_000, - maxTokens: 128_000, - } as unknown as NonNullable; - - await summarizeInStages({ - model, - apiKey: "test-key", // pragma: allowlist secret - reserveTokens: 300_000, - maxChunkTokens: 8000, - contextWindow: 1_000_000, - signal: new AbortController().signal, - messages: [makeMessage(1), makeMessage(2)], - }); - - expect(mockGenerateSummary).toHaveBeenCalled(); - // Third argument to generateSummary is reserveTokens. - // With maxTokens 128K, the clamp should be floor(128_000 / 0.8) = 160_000. - const passedReserveTokens = mockGenerateSummary.mock.calls[0][2]; - expect(passedReserveTokens).toBeLessThanOrEqual(Math.floor(128_000 / 0.8)); - expect(passedReserveTokens).toBe(160_000); - }); - - it("does not clamp when model maxTokens is large enough", async () => { - const model = { - provider: "anthropic", - model: "claude-opus-4-6", - contextWindow: 200_000, - maxTokens: 32_000, - } as unknown as NonNullable; - - // reserveTokens 4000 is well under floor(32_000 / 0.8) = 40_000 - await summarizeInStages({ - model, - apiKey: "test-key", // pragma: allowlist secret - reserveTokens: 4000, - maxChunkTokens: 8000, - contextWindow: 200_000, - signal: new AbortController().signal, - messages: [makeMessage(1), makeMessage(2)], - }); - - expect(mockGenerateSummary).toHaveBeenCalled(); - const passedReserveTokens = mockGenerateSummary.mock.calls[0][2]; - expect(passedReserveTokens).toBe(4000); - }); - - it("falls back to 128K default when model has no maxTokens field", async () => { - // Model without maxTokens defined — should default to 128_000 as the cap. - const model = { - provider: "anthropic", - model: "claude-3-opus", - contextWindow: 1_000_000, - } as unknown as NonNullable; - - await summarizeInStages({ - model, - apiKey: "test-key", // pragma: allowlist secret - reserveTokens: 300_000, - maxChunkTokens: 8000, - contextWindow: 1_000_000, - signal: new AbortController().signal, - messages: [makeMessage(1), makeMessage(2)], - }); - - expect(mockGenerateSummary).toHaveBeenCalled(); - // Fallback maxTokens is 128_000, so clamp = floor(128_000 / 0.8) = 160_000 - const passedReserveTokens = mockGenerateSummary.mock.calls[0][2]; - expect(passedReserveTokens).toBe(160_000); - }); - - it("clamps consistently across all chunks in staged summarization", async () => { - const model = { - provider: "anthropic", - model: "claude-sonnet-4-6", - contextWindow: 1_000_000, - maxTokens: 128_000, - } as unknown as NonNullable; - - // Use enough messages and small chunk size to force multiple chunks - await summarizeInStages({ - model, - apiKey: "test-key", // pragma: allowlist secret - reserveTokens: 300_000, - maxChunkTokens: 1000, - contextWindow: 1_000_000, - signal: new AbortController().signal, - messages: Array.from({ length: 4 }, (_, i) => makeMessage(i + 1)), - parts: 2, - minMessagesForSplit: 4, - }); - - expect(mockGenerateSummary.mock.calls.length).toBeGreaterThan(1); - const expectedClamp = Math.floor(128_000 / 0.8); - for (const call of mockGenerateSummary.mock.calls) { - expect(call[2]).toBeLessThanOrEqual(expectedClamp); - } - }); -}); diff --git a/src/agents/compaction.ts b/src/agents/compaction.ts index fe64bfc8f9e..888daf7bfec 100644 --- a/src/agents/compaction.ts +++ b/src/agents/compaction.ts @@ -319,22 +319,13 @@ async function summarizeChunks(params: { params.customInstructions, params.summarizationInstructions, ); - - // Clamp reserveTokens to the model's maxTokens output cap. - // generateSummary() uses Math.floor(0.8 * reserveTokens) as max_tokens for the API call. - // With large context windows (1M tokens), reserveTokensFloor can be 300K+, producing - // max_tokens of 240K+ which exceeds model output limits (e.g. 128K for Anthropic). - // By clamping reserveTokens here, we ensure the downstream max_tokens stays within bounds. - const modelMaxTokens = params.model.maxTokens ?? 128_000; - const clampedReserveTokens = Math.min(params.reserveTokens, Math.floor(modelMaxTokens / 0.8)); - for (const chunk of chunks) { summary = await retryAsync( () => generateSummary( chunk, params.model, - clampedReserveTokens, + params.reserveTokens, params.apiKey, params.headers, params.signal, diff --git a/src/agents/failover-error.ts b/src/agents/failover-error.ts index 94093acb7ca..abe215d1f6c 100644 --- a/src/agents/failover-error.ts +++ b/src/agents/failover-error.ts @@ -210,7 +210,7 @@ function normalizeDirectErrorSignal(err: unknown): FailoverSignal { }; } -export function hasSessionWriteLockTimeout(err: unknown, seen: Set = new Set()): boolean { +function hasSessionWriteLockTimeout(err: unknown, seen: Set = new Set()): boolean { if (isSessionWriteLockTimeoutError(err)) { return true; } diff --git a/src/agents/model-fallback.test.ts b/src/agents/model-fallback.test.ts index a588a1e8c43..3fe1ba7e22a 100644 --- a/src/agents/model-fallback.test.ts +++ b/src/agents/model-fallback.test.ts @@ -21,7 +21,6 @@ import { } from "./model-fallback.js"; import { classifyEmbeddedPiRunResultForModelFallback } from "./pi-embedded-runner/result-fallback-classifier.js"; import type { EmbeddedPiRunResult } from "./pi-embedded-runner/types.js"; -import { SessionWriteLockTimeoutError } from "./session-write-lock-error.js"; import { makeModelFallbackCfg } from "./test-helpers/model-fallback-config-fixture.js"; vi.mock("../infra/file-lock.js", () => ({ @@ -571,35 +570,6 @@ describe("runWithModelFallback", () => { } }); - it("fails fast on session write-lock timeouts instead of trying model fallbacks", async () => { - const cfg = makeCfg({ - agents: { - defaults: { - model: { - primary: "openai/gpt-5.4", - fallbacks: ["anthropic/claude-opus-4-6"], - }, - }, - }, - }); - const lockError = new SessionWriteLockTimeoutError({ - timeoutMs: 10_000, - owner: "pid=37121", - lockPath: "/tmp/openclaw/session.jsonl.lock", - }); - const run = vi.fn().mockRejectedValueOnce(lockError); - - await expect( - runWithModelFallback({ - cfg, - provider: "openai", - model: "gpt-5.4", - run, - }), - ).rejects.toBe(lockError); - expect(run).toHaveBeenCalledTimes(1); - }); - it("uses optional result classification to continue to configured fallbacks", async () => { const cfg = makeCfg({ agents: { diff --git a/src/agents/model-fallback.ts b/src/agents/model-fallback.ts index 06af7d8a337..7271831dbff 100644 --- a/src/agents/model-fallback.ts +++ b/src/agents/model-fallback.ts @@ -16,7 +16,6 @@ import { FailoverError, coerceToFailoverError, describeFailoverError, - hasSessionWriteLockTimeout, isFailoverError, isTimeoutError, } from "./failover-error.js"; @@ -1049,9 +1048,6 @@ export async function runWithModelFallback(params: { sessionId: params.sessionId, lane: params.lane, }) ?? err; - if (hasSessionWriteLockTimeout(normalized)) { - throw err; - } // LiveSessionModelSwitchError during fallback may point at a later // candidate that is already the active live-session selection. Jump diff --git a/src/agents/openclaw-gateway-tool.test.ts b/src/agents/openclaw-gateway-tool.test.ts index ff808104b96..2aa8716b326 100644 --- a/src/agents/openclaw-gateway-tool.test.ts +++ b/src/agents/openclaw-gateway-tool.test.ts @@ -4,7 +4,6 @@ import path from "node:path"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { __testing as restartTesting } from "../infra/restart.js"; import { withEnvAsync } from "../test-utils/env.js"; -import "./test-helpers/fast-core-tools.js"; import { createGatewayTool } from "./tools/gateway-tool.js"; import { callGatewayTool } from "./tools/gateway.js"; diff --git a/src/agents/openclaw-tools.subagents.scope.test.ts b/src/agents/openclaw-tools.subagents.scope.test.ts index fc233015064..23b3e4aa4a9 100644 --- a/src/agents/openclaw-tools.subagents.scope.test.ts +++ b/src/agents/openclaw-tools.subagents.scope.test.ts @@ -8,7 +8,6 @@ import { setSubagentsConfigOverride, } from "./openclaw-tools.subagents.test-harness.js"; import { addSubagentRunForTests, resetSubagentRegistryForTests } from "./subagent-registry.js"; -import "./test-helpers/fast-core-tools.js"; import { createPerSenderSessionConfig } from "./test-helpers/session-config.js"; import { createSubagentsTool } from "./tools/subagents-tool.js"; diff --git a/src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts b/src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts index b9ecf8d0502..a4bf1a2b057 100644 --- a/src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts +++ b/src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts @@ -1,7 +1,6 @@ import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { AgentRouteBinding } from "../config/types.agents.js"; import { emitAgentEvent } from "../infra/agent-events.js"; -import "./test-helpers/fast-core-tools.js"; import { getCallGatewayMock, getSessionsSpawnTool, diff --git a/src/agents/openclaw-tools.subagents.steer-failure-clears-suppression.test.ts b/src/agents/openclaw-tools.subagents.steer-failure-clears-suppression.test.ts index 7c4ee1461cd..43e560b11e9 100644 --- a/src/agents/openclaw-tools.subagents.steer-failure-clears-suppression.test.ts +++ b/src/agents/openclaw-tools.subagents.steer-failure-clears-suppression.test.ts @@ -11,7 +11,6 @@ import { listSubagentRunsForRequester, resetSubagentRegistryForTests, } from "./subagent-registry.js"; -import "./test-helpers/fast-core-tools.js"; import { createSubagentsTool } from "./tools/subagents-tool.js"; describe("openclaw-tools: subagents steer failure", () => { diff --git a/src/agents/openclaw-tools.ts b/src/agents/openclaw-tools.ts index 911248cc8d4..7d133a2a643 100644 --- a/src/agents/openclaw-tools.ts +++ b/src/agents/openclaw-tools.ts @@ -26,7 +26,6 @@ import type { SandboxFsBridge } from "./sandbox/fs-bridge.js"; import type { SpawnedToolContext } from "./spawned-context.js"; import type { ToolFsPolicy } from "./tool-fs-policy.js"; import { createAgentsListTool } from "./tools/agents-list-tool.js"; -import { createCanvasTool } from "./tools/canvas-tool.js"; import type { AnyAgentTool } from "./tools/common.js"; import { createCronTool } from "./tools/cron-tool.js"; import { createEmbeddedCallGateway } from "./tools/embedded-gateway-stub.js"; @@ -324,7 +323,6 @@ export function createOpenClawTools( ...(embedded ? [] : [ - createCanvasTool({ config: options?.config }), nodesTool, createCronTool({ agentSessionKey: options?.agentSessionKey, diff --git a/src/agents/openclaw-tools.tts-config.test.ts b/src/agents/openclaw-tools.tts-config.test.ts index a592fbedf6a..0b22af8ae52 100644 --- a/src/agents/openclaw-tools.tts-config.test.ts +++ b/src/agents/openclaw-tools.tts-config.test.ts @@ -37,10 +37,6 @@ vi.mock("./tools/agents-list-tool.js", () => ({ createAgentsListTool: () => mocks.stubTool("agents_list"), })); -vi.mock("./tools/canvas-tool.js", () => ({ - createCanvasTool: () => mocks.stubTool("canvas"), -})); - vi.mock("./tools/cron-tool.js", () => ({ createCronTool: (options: unknown) => { mocks.createCronToolOptions(options); diff --git a/src/agents/pi-embedded-runner/system-prompt.ts b/src/agents/pi-embedded-runner/system-prompt.ts index 0cc2e993a5b..1b3b5982ca8 100644 --- a/src/agents/pi-embedded-runner/system-prompt.ts +++ b/src/agents/pi-embedded-runner/system-prompt.ts @@ -53,7 +53,6 @@ export function buildEmbeddedSystemPrompt(params: { channel?: string; /** Supported message actions for the current channel (e.g., react, edit, unsend) */ channelActions?: string[]; - canvasRootDir?: string; }; messageToolHints?: string[]; sandboxInfo?: EmbeddedSandboxInfo; diff --git a/src/agents/pi-embedded-runner/tool-result-context-guard.test.ts b/src/agents/pi-embedded-runner/tool-result-context-guard.test.ts index b54d38ed35a..4f1f641dcd5 100644 --- a/src/agents/pi-embedded-runner/tool-result-context-guard.test.ts +++ b/src/agents/pi-embedded-runner/tool-result-context-guard.test.ts @@ -760,49 +760,4 @@ describe("installContextEngineLoopHook", () => { expect(retryResult).toBe(compactedView); expect(engine.assemble).toHaveBeenCalledTimes(1); }); - - it("clears the cached assembled view when the source history shrinks", async () => { - const agent = makeGuardableAgent(); - const compactedView = [makeUser("compacted")]; - const engine = makeMockEngine({ - assemble: async () => ({ messages: compactedView, estimatedTokens: 0 }), - }); - installHook(agent, engine); - - const { transformed: firstResult } = await callAfterInitialToolResult(agent, { - includeSecondUser: false, - firstResultText: "r", - }); - expect(firstResult).toBe(compactedView); - - const postResetMessages = [makeUser("fresh post-reset turn")]; - const postResetResult = await callTransform(agent, postResetMessages); - expect(postResetResult).toBe(postResetMessages); - }); - - it("clears the cached assembled view when assemble fails", async () => { - const agent = makeGuardableAgent(); - const compactedView = [makeUser("compacted")]; - const engine = makeMockEngine({ - assemble: async () => ({ messages: compactedView, estimatedTokens: 0 }), - }); - installHook(agent, engine); - - const { withNew, transformed: firstResult } = await callAfterInitialToolResult(agent, { - includeSecondUser: false, - firstResultText: "r", - }); - expect(firstResult).toBe(compactedView); - - const afterFailureMessages = [...withNew, makeUser("after failure")]; - engine.assemble.mockImplementationOnce(async () => { - throw new Error("engine assemble boom"); - }); - - const failureResult = await callTransform(agent, afterFailureMessages); - expect(failureResult).toBe(afterFailureMessages); - - const retryResult = await callTransform(agent, afterFailureMessages); - expect(retryResult).toBe(afterFailureMessages); - }); }); diff --git a/src/agents/pi-embedded-runner/tool-result-context-guard.ts b/src/agents/pi-embedded-runner/tool-result-context-guard.ts index 3815e53fb58..8331589ef25 100644 --- a/src/agents/pi-embedded-runner/tool-result-context-guard.ts +++ b/src/agents/pi-embedded-runner/tool-result-context-guard.ts @@ -250,25 +250,12 @@ export function installContextEngineLoopHook(params: { const originalTransformContext = mutableAgent.transformContext; let lastSeenLength: number | null = null; let lastAssembledView: AgentMessage[] | null = null; - let lastAssembledFromSourceLength: number | null = null; - - const clearAssembledCache = () => { - lastAssembledView = null; - lastAssembledFromSourceLength = null; - }; mutableAgent.transformContext = (async (messages: AgentMessage[], signal: AbortSignal) => { const transformed = originalTransformContext ? await originalTransformContext.call(mutableAgent, messages, signal) : messages; const sourceMessages = Array.isArray(transformed) ? transformed : messages; - if ( - lastAssembledFromSourceLength !== null && - sourceMessages.length < lastAssembledFromSourceLength - ) { - clearAssembledCache(); - lastSeenLength = null; - } // Seed the loop fence from the attempt's pre-prompt message count when available. // This keeps the first real post-tool-call iteration eligible for compaction even @@ -330,14 +317,12 @@ export function installContextEngineLoopHook(params: { }); if (assembled && Array.isArray(assembled.messages) && assembled.messages !== sourceMessages) { lastAssembledView = assembled.messages; - lastAssembledFromSourceLength = sourceMessages.length; return assembled.messages; } - clearAssembledCache(); + lastAssembledView = null; } catch { // Best-effort: any engine failure falls through to the raw source // messages so the tool loop still makes forward progress. - clearAssembledCache(); } return sourceMessages; diff --git a/src/agents/pi-embedded-subscribe.handlers.tools.test.ts b/src/agents/pi-embedded-subscribe.handlers.tools.test.ts index a85c32f1fc4..0580533a1f4 100644 --- a/src/agents/pi-embedded-subscribe.handlers.tools.test.ts +++ b/src/agents/pi-embedded-subscribe.handlers.tools.test.ts @@ -755,315 +755,6 @@ describe("handleToolExecutionEnd derived tool events", () => { ); }); - it("throttles high-frequency exec output update events", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - try { - const { ctx, onAgentEvent } = createTestContext(); - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-throttled-output", - args: { command: "yes" }, - } as never, - ); - - const update = (aggregated: string) => - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-throttled-output", - partialResult: { - details: { - aggregated, - }, - }, - } as never, - ); - - update("first"); - update("second"); - update("x".repeat(1024 * 1024)); - vi.setSystemTime(1_300); - update("third"); - - const commandOutputCalls = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { output?: string } }) - .filter((event) => event.stream === "command_output"); - - expect(commandOutputCalls.map((event) => event.data?.output)).toEqual(["first", "third"]); - } finally { - vi.useRealTimers(); - } - }); - - it("drops throttled exec output before emitting live events or callbacks", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - resetAgentEventsForTest(); - const events: Array<{ stream?: string; data?: Record }> = []; - registerAgentEventListener((evt) => { - events.push(evt as never); - }); - try { - const { ctx, onAgentEvent } = createTestContext(); - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-drop-suppressed-output", - args: { command: "yes" }, - } as never, - ); - - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-drop-suppressed-output", - partialResult: { details: { aggregated: "first" } }, - } as never, - ); - const emittedEventCount = events.length; - const callbackCount = onAgentEvent.mock.calls.length; - const itemStartedCount = ctx.state.itemStartedCount; - - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-drop-suppressed-output", - partialResult: { details: { aggregated: "x".repeat(1024 * 1024) } }, - } as never, - ); - - expect(events).toHaveLength(emittedEventCount); - expect(onAgentEvent).toHaveBeenCalledTimes(callbackCount); - expect(ctx.state.itemStartedCount).toBe(itemStartedCount); - } finally { - resetAgentEventsForTest(); - vi.useRealTimers(); - } - }); - - it("throttles exec output independently per tool call", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - try { - const { ctx, onAgentEvent } = createTestContext(); - - for (const toolCallId of ["tool-exec-per-tool-a", "tool-exec-per-tool-b"]) { - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId, - args: { command: "yes" }, - } as never, - ); - } - - for (const toolCallId of ["tool-exec-per-tool-a", "tool-exec-per-tool-b"]) { - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId, - partialResult: { details: { aggregated: `first-${toolCallId}` } }, - } as never, - ); - } - - const commandOutputCalls = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { output?: string } }) - .filter((event) => event.stream === "command_output"); - - expect(commandOutputCalls.map((event) => event.data?.output)).toEqual([ - "first-tool-exec-per-tool-a", - "first-tool-exec-per-tool-b", - ]); - } finally { - vi.useRealTimers(); - } - }); - - it("clears exec output throttle state when the tool ends", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - try { - const { ctx, onAgentEvent } = createTestContext(); - const toolCallId = "tool-exec-throttle-cleared"; - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId, - args: { command: "yes" }, - } as never, - ); - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId, - partialResult: { details: { aggregated: "first run output" } }, - } as never, - ); - await handleToolExecutionEnd( - ctx as never, - { - type: "tool_execution_end", - toolName: "exec", - toolCallId, - isError: false, - result: { details: { status: "completed", aggregated: "done" } }, - } as never, - ); - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId, - args: { command: "yes" }, - } as never, - ); - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId, - partialResult: { details: { aggregated: "second run output" } }, - } as never, - ); - - const commandOutputCalls = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { output?: string } }) - .filter((event) => event.stream === "command_output"); - - expect(commandOutputCalls.map((event) => event.data?.output)).toContain("second run output"); - } finally { - vi.useRealTimers(); - } - }); - - it("does not throttle exec update events that carry no output", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - try { - const { ctx, onAgentEvent } = createTestContext(); - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-no-output-updates", - args: { command: "sleep 1" }, - } as never, - ); - - for (let i = 0; i < 2; i += 1) { - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-no-output-updates", - partialResult: { details: { status: "running", pid: 1234 + i } }, - } as never, - ); - } - - const updateCallbacks = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { phase?: string } }) - .filter((event) => event.stream === "tool" && event.data?.phase === "update"); - - expect(updateCallbacks).toHaveLength(2); - } finally { - vi.useRealTimers(); - } - }); - - it("caps oversized exec update payloads that pass the throttle window", async () => { - vi.useFakeTimers(); - vi.setSystemTime(1_000); - resetAgentEventsForTest(); - const events: Array<{ stream?: string; data?: Record }> = []; - registerAgentEventListener((evt) => { - events.push(evt as never); - }); - try { - const { ctx, onAgentEvent } = createTestContext(); - const aggregated = `head-${"x".repeat(90 * 1024)}-tail`; - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-update-long-output", - args: { command: "yes" }, - } as never, - ); - - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-update-long-output", - partialResult: { details: { aggregated: "first" } }, - } as never, - ); - vi.setSystemTime(1_300); - handleToolExecutionUpdate( - ctx as never, - { - type: "tool_execution_update", - toolName: "exec", - toolCallId: "tool-exec-update-long-output", - partialResult: { details: { aggregated } }, - } as never, - ); - - const lastCommandOutput = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { output?: string } }) - .findLast((event) => event.stream === "command_output"); - expect(lastCommandOutput?.data?.output).toContain("live command output truncated"); - expect(lastCommandOutput?.data?.output).toContain("-tail"); - expect(lastCommandOutput?.data?.output).not.toContain("head-"); - - const updateEvent = events.findLast( - (evt) => evt.stream === "tool" && (evt.data as { phase?: string })?.phase === "update", - ); - const partialResult = updateEvent?.data?.partialResult as - | { details?: { aggregated?: string } } - | undefined; - expect(partialResult?.details?.aggregated).toContain("live command output truncated"); - expect(partialResult?.details?.aggregated).toContain("-tail"); - expect(partialResult?.details?.aggregated).not.toContain("head-"); - } finally { - resetAgentEventsForTest(); - vi.useRealTimers(); - } - }); - it("emits command output events for exec results", async () => { const { ctx, onAgentEvent } = createTestContext(); @@ -1489,108 +1180,6 @@ describe("control UI credential redaction (issue #72283)", () => { expect(lastOutput?.data?.output).toContain("OPENROUTER_API_KEY="); }); - it("caps live exec command output events without changing the tool result shape", async () => { - const events: Array<{ stream?: string; data?: Record }> = []; - registerAgentEventListener((evt) => { - events.push(evt as never); - }); - const { ctx, onAgentEvent } = createTestContext(); - const aggregated = `head-${"x".repeat(90 * 1024)}-tail`; - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-long-output", - args: { command: "yes" }, - } as never, - ); - - await handleToolExecutionEnd( - ctx as never, - { - type: "tool_execution_end", - toolName: "exec", - toolCallId: "tool-exec-long-output", - isError: false, - result: { - details: { - status: "completed", - aggregated, - exitCode: 0, - }, - }, - } as never, - ); - - const commandOutputCalls = onAgentEvent.mock.calls - .map((call) => call[0]) - .filter((arg: unknown) => (arg as { stream?: string })?.stream === "command_output"); - const lastOutput = commandOutputCalls.at(-1) as { data?: { output?: string } } | undefined; - expect(lastOutput?.data?.output).toContain("live command output truncated"); - expect(lastOutput?.data?.output).toContain("-tail"); - expect(lastOutput?.data?.output).not.toContain("head-"); - - const resultEvent = events.find( - (evt) => evt.stream === "tool" && (evt.data as { phase?: string })?.phase === "result", - ); - const result = resultEvent?.data?.result as { details?: { aggregated?: string } } | undefined; - expect(result?.details?.aggregated).toContain("live command output truncated"); - expect(result?.details?.aggregated).toContain("-tail"); - }); - - it("parses exec approval resolution from raw output even when live output is capped", async () => { - const { ctx, onAgentEvent } = createTestContext(); - const aggregated = `exec denied (user-denied): blocked by reviewer\n${"x".repeat( - 90 * 1024, - )}-tail`; - - await handleToolExecutionStart( - ctx as never, - { - type: "tool_execution_start", - toolName: "exec", - toolCallId: "tool-exec-denied-long-output", - args: { command: "rm -rf /tmp/example" }, - } as never, - ); - - await handleToolExecutionEnd( - ctx as never, - { - type: "tool_execution_end", - toolName: "exec", - toolCallId: "tool-exec-denied-long-output", - isError: true, - result: { - details: { - status: "failed", - aggregated, - exitCode: 1, - }, - }, - } as never, - ); - - const commandOutput = onAgentEvent.mock.calls - .map((call) => call[0] as { stream?: string; data?: { output?: string } }) - .findLast((event) => event.stream === "command_output"); - expect(commandOutput?.data?.output).toContain("live command output truncated"); - expect(commandOutput?.data?.output).not.toContain("exec denied"); - - expect(onAgentEvent).toHaveBeenCalledWith( - expect.objectContaining({ - stream: "approval", - data: expect.objectContaining({ - phase: "resolved", - status: "denied", - message: expect.stringContaining("blocked by reviewer"), - }), - }), - ); - }); - it("redacts details-only results before emitting the tool result event", async () => { const events: Array<{ stream?: string; data?: Record }> = []; registerAgentEventListener((evt) => { diff --git a/src/agents/pi-embedded-subscribe.handlers.tools.ts b/src/agents/pi-embedded-subscribe.handlers.tools.ts index 0a1135f74e6..3df28deeb87 100644 --- a/src/agents/pi-embedded-subscribe.handlers.tools.ts +++ b/src/agents/pi-embedded-subscribe.handlers.tools.ts @@ -20,7 +20,6 @@ import type { ExecApprovalDecision } from "../infra/exec-approvals.js"; import type { PluginHookAfterToolCallEvent } from "../plugins/types.js"; import { createLazyImportLoader } from "../shared/lazy-promise.js"; import { normalizeOptionalLowercaseString, readStringValue } from "../shared/string-coerce.js"; -import { truncateUtf16Safe } from "../utils.js"; import type { ApplyPatchSummary } from "./apply-patch.js"; import type { ExecToolDetails } from "./bash-tools.exec-types.js"; import { parseExecApprovalResultText } from "./exec-approval-result.js"; @@ -88,50 +87,11 @@ type ToolStartRecord = { /** Track tool execution start data for after_tool_call hook. */ const toolStartData = new Map(); -const EXEC_OUTPUT_DELTA_MIN_INTERVAL_MS = 250; -const LIVE_COMMAND_OUTPUT_MAX_CHARS = 64 * 1024; -type ExecOutputDeltaEmission = { - emittedAt: number; -}; -const execOutputDeltaEmissions = new Map(); function buildToolStartKey(runId: string, toolCallId: string): string { return `${runId}:${toolCallId}`; } -function buildExecOutputDeltaKey(runId: string, toolCallId: string): string { - return `${runId}:${toolCallId}`; -} - -function shouldEmitExecOutputDelta(params: { - runId: string; - toolCallId: string; - output: string; - now?: number; -}): boolean { - const key = buildExecOutputDeltaKey(params.runId, params.toolCallId); - const now = params.now ?? Date.now(); - const previous = execOutputDeltaEmissions.get(key); - if (!previous) { - execOutputDeltaEmissions.set(key, { - emittedAt: now, - }); - return true; - } - const elapsedMs = now - previous.emittedAt; - if (elapsedMs < EXEC_OUTPUT_DELTA_MIN_INTERVAL_MS) { - return false; - } - execOutputDeltaEmissions.set(key, { - emittedAt: now, - }); - return true; -} - -function clearExecOutputDeltaEmission(runId: string, toolCallId: string): void { - execOutputDeltaEmissions.delete(buildExecOutputDeltaKey(runId, toolCallId)); -} - export function countActiveToolExecutions(runId: string): number { const prefix = `${runId}:`; let count = 0; @@ -229,39 +189,6 @@ function readExecToolDetails(result: unknown): ExecToolDetails | null { return details as ExecToolDetails; } -function readExecOutputText(result: unknown): string | undefined { - const details = readToolResultDetailsRecord(result); - if (typeof details?.aggregated === "string") { - return details.aggregated; - } - return extractToolResultText(result); -} - -function limitLiveCommandOutput(output: string): string { - if (output.length <= LIVE_COMMAND_OUTPUT_MAX_CHARS) { - return output; - } - const tail = truncateUtf16Safe( - output.slice(-LIVE_COMMAND_OUTPUT_MAX_CHARS), - LIVE_COMMAND_OUTPUT_MAX_CHARS, - ); - return `[openclaw: live command output truncated to last ${tail.length} of ${output.length} chars]\n${tail}`; -} - -function limitExecToolResultForLiveEvent(result: unknown): unknown { - const details = readToolResultDetailsRecord(result); - if (!details || typeof details.aggregated !== "string") { - return result; - } - return { - ...(result as Record), - details: { - ...details, - aggregated: limitLiveCommandOutput(details.aggregated), - }, - }; -} - function readApplyPatchSummary(result: unknown): ApplyPatchSummary | null { const details = readToolResultDetailsRecord(result); const summary = @@ -814,23 +741,7 @@ export function handleToolExecutionUpdate( const toolName = normalizeToolName(evt.toolName); const toolCallId = evt.toolCallId; const partial = evt.partialResult; - if (isExecToolName(toolName)) { - const output = readExecOutputText(partial); - if ( - output && - !shouldEmitExecOutputDelta({ - runId: ctx.params.runId, - toolCallId, - output, - }) - ) { - return; - } - } const sanitized = sanitizeToolResult(partial); - const liveEventPartial = isExecToolName(toolName) - ? limitExecToolResultForLiveEvent(sanitized) - : sanitized; emitAgentEvent({ runId: ctx.params.runId, stream: "tool", @@ -838,7 +749,7 @@ export function handleToolExecutionUpdate( phase: "update", name: toolName, toolCallId, - partialResult: liveEventPartial, + partialResult: sanitized, }, }); const itemData: AgentItemEventData = { @@ -861,8 +772,11 @@ export function handleToolExecutionUpdate( }, }); if (isExecToolName(toolName)) { - const rawOutput = readExecOutputText(sanitized); - const output = rawOutput ? limitLiveCommandOutput(rawOutput) : undefined; + const execDetails = readExecToolDetails(sanitized); + const output = + execDetails && "aggregated" in execDetails + ? execDetails.aggregated + : extractToolResultText(sanitized); const commandData: AgentItemEventData = { itemId: buildCommandItemId(toolCallId), phase: "update", @@ -915,13 +829,9 @@ export async function handleToolExecutionEnd( const result = evt.result; const isToolError = isError || isToolResultError(result); const sanitizedResult = sanitizeToolResult(result); - const liveEventResult = isExecToolName(toolName) - ? limitExecToolResultForLiveEvent(sanitizedResult) - : sanitizedResult; const toolStartKey = buildToolStartKey(runId, toolCallId); const startData = toolStartData.get(toolStartKey); toolStartData.delete(toolStartKey); - clearExecOutputDeltaEmission(runId, toolCallId); const callSummary = ctx.state.toolMetaById.get(toolCallId); const completedMutatingAction = !isToolError && Boolean(callSummary?.mutatingAction); const meta = callSummary?.meta; @@ -1024,7 +934,7 @@ export async function handleToolExecutionEnd( toolCallId, meta, isError: isToolError, - result: liveEventResult, + result: sanitizedResult, }, }); const endedAt = Date.now(); @@ -1117,11 +1027,10 @@ export async function handleToolExecutionEnd( }), }); } else { - const rawOutput = + const output = execDetails && "aggregated" in execDetails ? execDetails.aggregated : extractToolResultText(sanitizedResult); - const output = rawOutput ? limitLiveCommandOutput(rawOutput) : undefined; const commandStatus = execDetails?.status === "failed" || isToolError ? "failed" : "completed"; emitTrackedItemEvent(ctx, { @@ -1166,8 +1075,8 @@ export async function handleToolExecutionEnd( data: outputData, }); - if (typeof rawOutput === "string") { - const parsedApprovalResult = parseExecApprovalResultText(rawOutput); + if (typeof output === "string") { + const parsedApprovalResult = parseExecApprovalResultText(output); if (parsedApprovalResult.kind === "denied") { const approvalData: AgentApprovalEventData = { phase: "resolved", diff --git a/src/agents/pi-tools.before-tool-call.integration.e2e.test.ts b/src/agents/pi-tools.before-tool-call.integration.e2e.test.ts index 1714aba80be..398e1fc9352 100644 --- a/src/agents/pi-tools.before-tool-call.integration.e2e.test.ts +++ b/src/agents/pi-tools.before-tool-call.integration.e2e.test.ts @@ -11,7 +11,7 @@ import { import { addTestHook, createMockPluginRegistry } from "../plugins/hooks.test-helpers.js"; import { patchPluginSessionExtension } from "../plugins/host-hook-state.js"; import { createEmptyPluginRegistry } from "../plugins/registry.js"; -import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../plugins/runtime.js"; +import { setActivePluginRegistry } from "../plugins/runtime.js"; import type { PluginHookRegistration } from "../plugins/types.js"; type ToolDefinitionAdapterModule = typeof import("./pi-tool-definition-adapter.js"); @@ -326,7 +326,6 @@ describe("before_tool_call hook deduplication (#15502)", () => { describe("before_tool_call hook integration for client tools", () => { beforeEach(() => { resetGlobalHookRunner(); - resetPluginRuntimeStateForTest(); resetDiagnosticSessionStateForTest(); installBeforeToolCallHook(); }); diff --git a/src/agents/subagent-registry.test.ts b/src/agents/subagent-registry.test.ts index 654f8511c4a..5a263580717 100644 --- a/src/agents/subagent-registry.test.ts +++ b/src/agents/subagent-registry.test.ts @@ -893,14 +893,6 @@ describe("subagent registry seam flow", () => { it("passes stored agentDir through swept context-engine cleanup paths", async () => { const now = Date.parse("2026-03-24T12:00:00Z"); - // Session-mode reaping now honors agents.defaults.subagents.archiveAfterMinutes - // (same knob run-mode uses for archiveAtMs). The default-config mock above sets - // archiveAfterMinutes: 0, which disables session-mode reaping; opt this test - // into a real retention window so the swept-cleanup path still fires. - mocks.getRuntimeConfig.mockReturnValueOnce({ - agents: { defaults: { subagents: { archiveAfterMinutes: 1 } } }, - session: { mainKey: "main", scope: "per-sender" as const }, - }); mod.addSubagentRunForTests({ runId: "run-session-swept-context-engine", childSessionKey: "agent:alt:session:child-session", diff --git a/src/agents/subagent-registry.ts b/src/agents/subagent-registry.ts index a9eb2da494f..e8dcec65420 100644 --- a/src/agents/subagent-registry.ts +++ b/src/agents/subagent-registry.ts @@ -36,7 +36,6 @@ import { reconcileOrphanedRestoredRuns, reconcileOrphanedRun, resolveAnnounceRetryDelayMs, - resolveArchiveAfterMs, resolveSubagentRunOrphanReason, resolveSubagentSessionStatus, safeRemoveAttachmentsDir, @@ -197,6 +196,8 @@ const LIFECYCLE_ERROR_RETRY_GRACE_MS = 15_000; * `timed out` completion right before the eventual success. */ const LIFECYCLE_TIMEOUT_RETRY_GRACE_MS = 15_000; +/** Absolute TTL for session-mode runs after cleanup completes (no archiveAtMs). */ +const SESSION_RUN_TTL_MS = 5 * 60_000; // 5 minutes /** Absolute TTL for orphaned pendingLifecycleError / pendingLifecycleTimeout entries. */ const PENDING_LIFECYCLE_TERMINAL_TTL_MS = 5 * 60_000; // 5 minutes /** Grace period before treating a "running" subagent without a live run context as stale. */ @@ -750,7 +751,6 @@ async function sweepSubagentRuns() { try { const now = Date.now(); const storeCache = new Map>(); - const sessionRetentionMs = resolveArchiveAfterMs(subagentRegistryDeps.getRuntimeConfig()); let mutated = false; for (const [runId, entry] of subagentRuns.entries()) { if (typeof entry.endedAt !== "number") { @@ -813,18 +813,12 @@ async function sweepSubagentRuns() { } } - // Session-mode runs have no archiveAtMs because the child session is retained - // independently — but the registry row itself still needs to be reaped after - // cleanup, otherwise `subagents list` and other registry-backed surfaces grow - // without bound. Honor the same `agents.defaults.subagents.archiveAfterMinutes` - // window run-mode uses for `archiveAtMs`, so operators get one consistent - // retention knob (default 60 minutes; 0 disables session-mode reaping). + // Session-mode runs have no archiveAtMs — apply absolute TTL after cleanup completes. // Use cleanupCompletedAt (not endedAt) to avoid interrupting deferred cleanup flows. if (!entry.archiveAtMs) { if ( - typeof sessionRetentionMs === "number" && typeof entry.cleanupCompletedAt === "number" && - now - entry.cleanupCompletedAt > sessionRetentionMs + now - entry.cleanupCompletedAt > SESSION_RUN_TTL_MS ) { clearPendingLifecycleError(runId); void notifyContextEngineSubagentEnded({ diff --git a/src/agents/system-prompt-params.test.ts b/src/agents/system-prompt-params.test.ts index f72f0e76047..a4215d3a869 100644 --- a/src/agents/system-prompt-params.test.ts +++ b/src/agents/system-prompt-params.test.ts @@ -3,7 +3,6 @@ import os from "node:os"; import path from "node:path"; import { describe, expect, it } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; -import { resolveStateDir } from "../config/paths.js"; import { buildSystemPromptParams } from "./system-prompt-params.js"; async function makeTempDir(label: string): Promise { @@ -102,12 +101,4 @@ describe("buildSystemPromptParams repo root", () => { expect(runtimeInfo.repoRoot).toBeUndefined(); }); - - it("includes the default profile canvas root in runtimeInfo", async () => { - const workspaceDir = await makeTempDir("canvas-root"); - - const { runtimeInfo } = buildParams({ workspaceDir }); - - expect(runtimeInfo.canvasRootDir).toBe(path.resolve(path.join(resolveStateDir(), "canvas"))); - }); }); diff --git a/src/agents/system-prompt-params.ts b/src/agents/system-prompt-params.ts index ec5c90b60f0..4e4138b3b17 100644 --- a/src/agents/system-prompt-params.ts +++ b/src/agents/system-prompt-params.ts @@ -1,9 +1,7 @@ import fs from "node:fs"; import path from "node:path"; -import { resolveStateDir } from "../config/paths.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import { findGitRoot } from "../infra/git-root.js"; -import { resolveHomeRelativePath } from "../infra/home-dir.js"; import { formatUserTime, resolveUserTimeFormat, @@ -25,7 +23,6 @@ type RuntimeInfoInput = { /** Supported message actions for the current channel (e.g., react, edit, unsend) */ channelActions?: string[]; repoRoot?: string; - canvasRootDir?: string; }; type SystemPromptRuntimeParams = { @@ -50,17 +47,11 @@ export function buildSystemPromptParams(params: { const userTimezone = resolveUserTimezone(params.config?.agents?.defaults?.userTimezone); const userTimeFormat = resolveUserTimeFormat(params.config?.agents?.defaults?.timeFormat); const userTime = formatUserTime(new Date(), userTimezone, userTimeFormat); - const stateDir = resolveStateDir(process.env); - const canvasRootDir = resolveCanvasRootDir({ - config: params.config, - stateDir, - }); return { runtimeInfo: { agentId: params.agentId, ...params.runtime, repoRoot, - canvasRootDir, }, userTimezone, userTime, @@ -68,18 +59,6 @@ export function buildSystemPromptParams(params: { }; } -function resolveCanvasRootDir(params: { config?: OpenClawConfig; stateDir: string }): string { - const configured = params.config?.canvasHost?.root?.trim(); - if (configured) { - return path.resolve( - resolveHomeRelativePath(configured, { - env: process.env, - }), - ); - } - return path.resolve(path.join(params.stateDir, "canvas")); -} - function resolveRepoRoot(params: { config?: OpenClawConfig; workspaceDir?: string; diff --git a/src/agents/system-prompt.test.ts b/src/agents/system-prompt.test.ts index 73cef69d7f3..4092ae00130 100644 --- a/src/agents/system-prompt.test.ts +++ b/src/agents/system-prompt.test.ts @@ -286,7 +286,6 @@ describe("buildAgentSystemPrompt", () => { workspaceDir: "/tmp/openclaw", runtimeInfo: { channel: "webchat", - canvasRootDir: "/Users/example/.openclaw-dev/canvas", }, }); @@ -300,7 +299,7 @@ describe("buildAgentSystemPrompt", () => { "Never use local filesystem paths or `file://...` URLs in `[embed ...]`.", ); expect(prompt).toContain( - "The active hosted embed root for this session is: `/Users/example/.openclaw-dev/canvas`.", + "The active hosted embed root is profile-scoped, not workspace-scoped.", ); expect(prompt).not.toContain('[embed content_type="html" title="Status"]...[/embed]'); }); @@ -1056,7 +1055,6 @@ describe("buildAgentSystemPrompt", () => { runtimeInfo: { channel: "telegram", capabilities: ["inlineButtons"], - canvasRootDir: "/tmp/canvas", }, contextFiles: [ { diff --git a/src/agents/system-prompt.ts b/src/agents/system-prompt.ts index 1078c7057ed..05e19e13f0e 100644 --- a/src/agents/system-prompt.ts +++ b/src/agents/system-prompt.ts @@ -378,11 +378,7 @@ function buildAssistantOutputDirectivesSection(isMinimal: boolean) { ]; } -function buildWebchatCanvasSection(params: { - isMinimal: boolean; - runtimeChannel?: string; - canvasRootDir?: string; -}) { +function buildWebchatCanvasSection(params: { isMinimal: boolean; runtimeChannel?: string }) { if (params.isMinimal || params.runtimeChannel !== "webchat") { return []; } @@ -394,9 +390,7 @@ function buildWebchatCanvasSection(params: { '- Use self-closing form for hosted embed documents: `[embed ref="cv_123" title="Status" height="320" /]`.', '- You may also use an explicit hosted URL: `[embed url="/__openclaw__/canvas/documents/cv_123/index.html" title="Status" height="320" /]`.', '- Never use local filesystem paths or `file://...` URLs in `[embed ...]`. Hosted embeds must point at `/__openclaw__/canvas/...` URLs or use `ref="..."`.', - params.canvasRootDir - ? `- The active hosted embed root for this session is: \`${sanitizeForPromptLiteral(params.canvasRootDir)}\`. If you manually stage a hosted embed file, write it there, not in the workspace.` - : "- The active hosted embed root is profile-scoped, not workspace-scoped. If you manually stage a hosted embed file, write it under the active profile embed root, not in the workspace.", + "- The active hosted embed root is profile-scoped, not workspace-scoped. If you manually stage a hosted embed file, write it under the active profile embed root, not in the workspace.", "- Quote all attribute values. Prefer `ref` for hosted documents unless you already have the full `/__openclaw__/canvas/documents//index.html` URL.", "", ]; @@ -603,7 +597,6 @@ export function buildAgentSystemPrompt(params: { channel?: string; capabilities?: string[]; repoRoot?: string; - canvasRootDir?: string; }; messageToolHints?: string[]; sandboxInfo?: EmbeddedSandboxInfo; @@ -1130,7 +1123,6 @@ export function buildAgentSystemPrompt(params: { ...buildWebchatCanvasSection({ isMinimal, runtimeChannel, - canvasRootDir: params.runtimeInfo?.canvasRootDir, }), ...buildMessagingSection({ isMinimal, diff --git a/src/agents/test-helpers/fast-core-tools.ts b/src/agents/test-helpers/fast-core-tools.ts deleted file mode 100644 index 13ccdee3d7d..00000000000 --- a/src/agents/test-helpers/fast-core-tools.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { vi } from "vitest"; -import { stubTool } from "./fast-tool-stubs.js"; - -vi.mock("../tools/canvas-tool.js", () => ({ - createCanvasTool: () => stubTool("canvas"), -})); diff --git a/src/agents/tool-catalog.ts b/src/agents/tool-catalog.ts index c47b0d491b2..dcb9950b3f2 100644 --- a/src/agents/tool-catalog.ts +++ b/src/agents/tool-catalog.ts @@ -208,10 +208,9 @@ const CORE_TOOL_DEFINITIONS: CoreToolDefinition[] = [ { id: "canvas", label: "canvas", - description: "Control canvases", + description: "Control node Canvas surfaces when the Canvas plugin is enabled", sectionId: "ui", profiles: [], - includeInOpenClawGroup: true, }, { id: "message", diff --git a/src/agents/tools/message-tool.test.ts b/src/agents/tools/message-tool.test.ts index 035728dd8c7..a29ead01f02 100644 --- a/src/agents/tools/message-tool.test.ts +++ b/src/agents/tools/message-tool.test.ts @@ -152,9 +152,6 @@ vi.mock("../../channels/plugins/message-tool-api.js", () => ({ vi.mock("./agents-list-tool.js", () => ({ createAgentsListTool: () => openClawToolsFactoryMocks.tool("agents"), })); -vi.mock("./canvas-tool.js", () => ({ - createCanvasTool: () => openClawToolsFactoryMocks.tool("canvas"), -})); vi.mock("./cron-tool.js", () => ({ createCronTool: () => openClawToolsFactoryMocks.tool("cron"), })); diff --git a/src/auto-reply/reply/session.test.ts b/src/auto-reply/reply/session.test.ts index 781a5373fe0..461ebef2f58 100644 --- a/src/auto-reply/reply/session.test.ts +++ b/src/auto-reply/reply/session.test.ts @@ -1407,36 +1407,6 @@ describe("initSessionState reset policy", () => { expect(result.sessionId).not.toBe(existingSessionId); }); - it("rotates sessionFile on daily reset when the stored path still points at the previous session id", async () => { - vi.setSystemTime(new Date(2026, 0, 18, 5, 0, 0)); - const root = await makeCaseDir("openclaw-reset-rotate-session-file-"); - const storePath = path.join(root, "sessions.json"); - const sessionKey = "agent:main:whatsapp:dm:s-rotate"; - const existingSessionId = "daily-rotate-old"; - const oldSessionFile = path.join(root, `${existingSessionId}.jsonl`); - - await writeSessionStoreFast(storePath, { - [sessionKey]: { - sessionId: existingSessionId, - updatedAt: new Date(2026, 0, 18, 3, 0, 0).getTime(), - sessionFile: oldSessionFile, - }, - }); - - const cfg = { session: { store: storePath } } as OpenClawConfig; - const result = await initSessionState({ - ctx: { Body: "hello", SessionKey: sessionKey }, - cfg, - commandAuthorized: true, - }); - - expect(result.isNewSession).toBe(true); - expect(result.sessionId).not.toBe(existingSessionId); - expect(result.sessionEntry.sessionFile).toBeTruthy(); - expect(path.basename(result.sessionEntry.sessionFile ?? "")).toBe(`${result.sessionId}.jsonl`); - expect(result.sessionEntry.sessionFile).not.toBe(oldSessionFile); - }); - it("drains stale system events when idle rollover creates a new session", async () => { vi.setSystemTime(new Date(2026, 0, 18, 5, 30, 0)); const root = await makeCaseDir("openclaw-reset-idle-system-events-"); diff --git a/src/canvas-host/a2ui/.bundle.hash b/src/canvas-host/a2ui/.bundle.hash deleted file mode 100644 index 1701217daf9..00000000000 --- a/src/canvas-host/a2ui/.bundle.hash +++ /dev/null @@ -1 +0,0 @@ -3fae45449ca71bedea4653a04ded2bdd63344f086fb8da0a6ff8800bc4c72bd4 diff --git a/src/canvas-host/a2ui/a2ui.bundle.js b/src/canvas-host/a2ui/a2ui.bundle.js deleted file mode 100644 index 6e5536560ee..00000000000 --- a/src/canvas-host/a2ui/a2ui.bundle.js +++ /dev/null @@ -1,14908 +0,0 @@ -var __defProp$1 = Object.defineProperty; -var __exportAll = (all, no_symbols) => { - let target = {}; - for (var name in all) __defProp$1(target, name, { - get: all[name], - enumerable: true - }); - if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" }); - return target; -}; -/** -* @license -* Copyright 2019 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const t$6 = globalThis, e$13 = t$6.ShadowRoot && (void 0 === t$6.ShadyCSS || t$6.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$8 = Symbol(), o$14 = /* @__PURE__ */ new WeakMap(); -var n$12 = class { - constructor(t, e, o) { - if (this._$cssResult$ = !0, o !== s$8) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t, this.t = e; - } - get styleSheet() { - let t = this.o; - const s = this.t; - if (e$13 && void 0 === t) { - const e = void 0 !== s && 1 === s.length; - e && (t = o$14.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$14.set(s, t)); - } - return t; - } - toString() { - return this.cssText; - } -}; -const r$11 = (t) => new n$12("string" == typeof t ? t : t + "", void 0, s$8), i$9 = (t, ...e) => { - return new n$12(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => { - if (!0 === t._$cssResult$) return t.cssText; - if ("number" == typeof t) return t; - throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); - })(s) + t[o + 1], t[0]), t, s$8); -}, S$1 = (s, o) => { - if (e$13) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet); - else for (const e of o) { - const o = document.createElement("style"), n = t$6.litNonce; - void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o); - } -}, c$6 = e$13 ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => { - let e = ""; - for (const s of t.cssRules) e += s.cssText; - return r$11(e); -})(t) : t; -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const { is: i$8, defineProperty: e$12, getOwnPropertyDescriptor: h$6, getOwnPropertyNames: r$10, getOwnPropertySymbols: o$13, getPrototypeOf: n$11 } = Object, a$1 = globalThis, c$5 = a$1.trustedTypes, l$4 = c$5 ? c$5.emptyScript : "", p$2 = a$1.reactiveElementPolyfillSupport, d$2 = (t, s) => t, u$3 = { - toAttribute(t, s) { - switch (s) { - case Boolean: - t = t ? l$4 : null; - break; - case Object: - case Array: t = null == t ? t : JSON.stringify(t); - } - return t; - }, - fromAttribute(t, s) { - let i = t; - switch (s) { - case Boolean: - i = null !== t; - break; - case Number: - i = null === t ? null : Number(t); - break; - case Object: - case Array: try { - i = JSON.parse(t); - } catch (t) { - i = null; - } - } - return i; - } -}, f$3 = (t, s) => !i$8(t, s), b$1 = { - attribute: !0, - type: String, - converter: u$3, - reflect: !1, - useDefault: !1, - hasChanged: f$3 -}; -Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); -var y$1 = class extends HTMLElement { - static addInitializer(t) { - this._$Ei(), (this.l ??= []).push(t); - } - static get observedAttributes() { - return this.finalize(), this._$Eh && [...this._$Eh.keys()]; - } - static createProperty(t, s = b$1) { - if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) { - const i = Symbol(), h = this.getPropertyDescriptor(t, i, s); - void 0 !== h && e$12(this.prototype, t, h); - } - } - static getPropertyDescriptor(t, s, i) { - const { get: e, set: r } = h$6(this.prototype, t) ?? { - get() { - return this[s]; - }, - set(t) { - this[s] = t; - } - }; - return { - get: e, - set(s) { - const h = e?.call(this); - r?.call(this, s), this.requestUpdate(t, h, i); - }, - configurable: !0, - enumerable: !0 - }; - } - static getPropertyOptions(t) { - return this.elementProperties.get(t) ?? b$1; - } - static _$Ei() { - if (this.hasOwnProperty(d$2("elementProperties"))) return; - const t = n$11(this); - t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); - } - static finalize() { - if (this.hasOwnProperty(d$2("finalized"))) return; - if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$2("properties"))) { - const t = this.properties, s = [...r$10(t), ...o$13(t)]; - for (const i of s) this.createProperty(i, t[i]); - } - const t = this[Symbol.metadata]; - if (null !== t) { - const s = litPropertyMetadata.get(t); - if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i); - } - this._$Eh = /* @__PURE__ */ new Map(); - for (const [t, s] of this.elementProperties) { - const i = this._$Eu(t, s); - void 0 !== i && this._$Eh.set(i, t); - } - this.elementStyles = this.finalizeStyles(this.styles); - } - static finalizeStyles(s) { - const i = []; - if (Array.isArray(s)) { - const e = new Set(s.flat(Infinity).reverse()); - for (const s of e) i.unshift(c$6(s)); - } else void 0 !== s && i.push(c$6(s)); - return i; - } - static _$Eu(t, s) { - const i = s.attribute; - return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0; - } - constructor() { - super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); - } - _$Ev() { - this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this)); - } - addController(t) { - (this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.(); - } - removeController(t) { - this._$EO?.delete(t); - } - _$E_() { - const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties; - for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]); - t.size > 0 && (this._$Ep = t); - } - createRenderRoot() { - const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); - return S$1(t, this.constructor.elementStyles), t; - } - connectedCallback() { - this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.()); - } - enableUpdating(t) {} - disconnectedCallback() { - this._$EO?.forEach((t) => t.hostDisconnected?.()); - } - attributeChangedCallback(t, s, i) { - this._$AK(t, i); - } - _$ET(t, s) { - const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i); - if (void 0 !== e && !0 === i.reflect) { - const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$3).toAttribute(s, i.type); - this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null; - } - } - _$AK(t, s) { - const i = this.constructor, e = i._$Eh.get(t); - if (void 0 !== e && this._$Em !== e) { - const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : u$3; - this._$Em = e; - const r = h.fromAttribute(s, t.type); - this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null; - } - } - requestUpdate(t, s, i, e = !1, h) { - if (void 0 !== t) { - const r = this.constructor; - if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? f$3)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return; - this.C(t, s, i); - } - !1 === this.isUpdatePending && (this._$ES = this._$EP()); - } - C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) { - i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t)); - } - async _$EP() { - this.isUpdatePending = !0; - try { - await this._$ES; - } catch (t) { - Promise.reject(t); - } - const t = this.scheduleUpdate(); - return null != t && await t, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - if (!this.isUpdatePending) return; - if (!this.hasUpdated) { - if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { - for (const [t, s] of this._$Ep) this[t] = s; - this._$Ep = void 0; - } - const t = this.constructor.elementProperties; - if (t.size > 0) for (const [s, i] of t) { - const { wrapped: t } = i, e = this[s]; - !0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e); - } - } - let t = !1; - const s = this._$AL; - try { - t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM(); - } catch (s) { - throw t = !1, this._$EM(), s; - } - t && this._$AE(s); - } - willUpdate(t) {} - _$AE(t) { - this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); - } - _$EM() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$ES; - } - shouldUpdate(t) { - return !0; - } - update(t) { - this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM(); - } - updated(t) {} - firstUpdated(t) {} -}; -y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$2("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$2("finalized")] = /* @__PURE__ */ new Map(), p$2?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.2"); -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const t$5 = globalThis, i$7 = (t) => t, s$7 = t$5.trustedTypes, e$11 = s$7 ? s$7.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, h$5 = "$lit$", o$12 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$10 = "?" + o$12, r$9 = `<${n$10}>`, l$3 = document, c$4 = () => l$3.createComment(""), a = (t) => null === t || "object" != typeof t && "function" != typeof t, u$2 = Array.isArray, d$1 = (t) => u$2(t) || "function" == typeof t?.[Symbol.iterator], f$2 = "[ \n\f\r]", v$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m$2 = />/g, p$1 = RegExp(`>|${f$2}(?:([^\\s"'>=/]+)(${f$2}*=${f$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = (t) => (i, ...s) => ({ - _$litType$: t, - strings: i, - values: s -}), b = x(1), w = x(2); -x(3); -const E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l$3.createTreeWalker(l$3, 129); -function V(t, i) { - if (!u$2(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return void 0 !== e$11 ? e$11.createHTML(i) : i; -} -const N = (t, i) => { - const s = t.length - 1, e = []; - let n, l = 2 === i ? "" : 3 === i ? "" : "", c = v$1; - for (let i = 0; i < s; i++) { - const s = t[i]; - let a, u, d = -1, f = 0; - for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v$1 ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m$2 : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("" === u[0] ? (c = n ?? v$1, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p$1 : "\"" === u[3] ? $ : g) : c === $ || c === g ? c = p$1 : c === _ || c === m$2 ? c = v$1 : (c = p$1, n = void 0); - const x = c === p$1 && t[i + 1].startsWith("/>") ? " " : ""; - l += c === v$1 ? s + r$9 : d >= 0 ? (e.push(a), s.slice(0, d) + h$5 + s.slice(d) + o$12 + x) : s + o$12 + (-2 === d ? i : x); - } - return [V(t, l + (t[s] || "") + (2 === i ? "" : 3 === i ? "" : "")), e]; -}; -var S = class S { - constructor({ strings: t, _$litType$: i }, e) { - let r; - this.parts = []; - let l = 0, a = 0; - const u = t.length - 1, d = this.parts, [f, v] = N(t, i); - if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) { - const t = this.el.content.firstChild; - t.replaceWith(...t.childNodes); - } - for (; null !== (r = P.nextNode()) && d.length < u;) { - if (1 === r.nodeType) { - if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h$5)) { - const i = v[a++], s = r.getAttribute(t).split(o$12), e = /([.?@])?(.*)/.exec(i); - d.push({ - type: 1, - index: l, - name: e[2], - strings: s, - ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H - }), r.removeAttribute(t); - } else t.startsWith(o$12) && (d.push({ - type: 6, - index: l - }), r.removeAttribute(t)); - if (y.test(r.tagName)) { - const t = r.textContent.split(o$12), i = t.length - 1; - if (i > 0) { - r.textContent = s$7 ? s$7.emptyScript : ""; - for (let s = 0; s < i; s++) r.append(t[s], c$4()), P.nextNode(), d.push({ - type: 2, - index: ++l - }); - r.append(t[i], c$4()); - } - } - } else if (8 === r.nodeType) if (r.data === n$10) d.push({ - type: 2, - index: l - }); - else { - let t = -1; - for (; -1 !== (t = r.data.indexOf(o$12, t + 1));) d.push({ - type: 7, - index: l - }), t += o$12.length - 1; - } - l++; - } - } - static createElement(t, i) { - const s = l$3.createElement("template"); - return s.innerHTML = t, s; - } -}; -function M$1(t, i, s = t, e) { - if (i === E) return i; - let h = void 0 !== e ? s._$Co?.[e] : s._$Cl; - const o = a(i) ? void 0 : i._$litDirective$; - return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M$1(t, h._$AS(t, i.values), h, e)), i; -} -var R = class { - constructor(t, i) { - this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i; - } - get parentNode() { - return this._$AM.parentNode; - } - get _$AU() { - return this._$AM._$AU; - } - u(t) { - const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l$3).importNode(i, !0); - P.currentNode = e; - let h = P.nextNode(), o = 0, n = 0, r = s[0]; - for (; void 0 !== r;) { - if (o === r.index) { - let i; - 2 === r.type ? i = new k(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new Z(h, this, t)), this._$AV.push(i), r = s[++n]; - } - o !== r?.index && (h = P.nextNode(), o++); - } - return P.currentNode = l$3, e; - } - p(t) { - let i = 0; - for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++; - } -}; -var k = class k { - get _$AU() { - return this._$AM?._$AU ?? this._$Cv; - } - constructor(t, i, s, e) { - this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0; - } - get parentNode() { - let t = this._$AA.parentNode; - const i = this._$AM; - return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t; - } - get startNode() { - return this._$AA; - } - get endNode() { - return this._$AB; - } - _$AI(t, i = this) { - t = M$1(this, t, i), a(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d$1(t) ? this.k(t) : this._(t); - } - O(t) { - return this._$AA.parentNode.insertBefore(t, this._$AB); - } - T(t) { - this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); - } - _(t) { - this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$3.createTextNode(t)), this._$AH = t; - } - $(t) { - const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s); - if (this._$AH?._$AD === e) this._$AH.p(i); - else { - const t = new R(e, this), s = t.u(this.options); - t.p(i), this.T(s), this._$AH = t; - } - } - _$AC(t) { - let i = C.get(t.strings); - return void 0 === i && C.set(t.strings, i = new S(t)), i; - } - k(t) { - u$2(this._$AH) || (this._$AH = [], this._$AR()); - const i = this._$AH; - let s, e = 0; - for (const h of t) e === i.length ? i.push(s = new k(this.O(c$4()), this.O(c$4()), this, this.options)) : s = i[e], s._$AI(h), e++; - e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e); - } - _$AR(t = this._$AA.nextSibling, s) { - for (this._$AP?.(!1, !0, s); t !== this._$AB;) { - const s = i$7(t).nextSibling; - i$7(t).remove(), t = s; - } - } - setConnected(t) { - void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t)); - } -}; -var H = class { - get tagName() { - return this.element.tagName; - } - get _$AU() { - return this._$AM._$AU; - } - constructor(t, i, s, e, h) { - this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A; - } - _$AI(t, i = this, s, e) { - const h = this.strings; - let o = !1; - if (void 0 === h) t = M$1(this, t, i, 0), o = !a(t) || t !== this._$AH && t !== E, o && (this._$AH = t); - else { - const e = t; - let n, r; - for (t = h[0], n = 0; n < h.length - 1; n++) r = M$1(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r; - } - o && !e && this.j(t); - } - j(t) { - t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? ""); - } -}; -var I = class extends H { - constructor() { - super(...arguments), this.type = 3; - } - j(t) { - this.element[this.name] = t === A ? void 0 : t; - } -}; -var L = class extends H { - constructor() { - super(...arguments), this.type = 4; - } - j(t) { - this.element.toggleAttribute(this.name, !!t && t !== A); - } -}; -var z = class extends H { - constructor(t, i, s, e, h) { - super(t, i, s, e, h), this.type = 5; - } - _$AI(t, i = this) { - if ((t = M$1(this, t, i, 0) ?? A) === E) return; - const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e); - e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t; - } - handleEvent(t) { - "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t); - } -}; -var Z = class { - constructor(t, i, s) { - this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t) { - M$1(this, t); - } -}; -const j$1 = { - M: h$5, - P: o$12, - A: n$10, - C: 1, - L: N, - R, - D: d$1, - V: M$1, - I: k, - H, - N: L, - U: z, - B: I, - F: Z -}, B = t$5.litHtmlPolyfillSupport; -B?.(S, k), (t$5.litHtmlVersions ??= []).push("3.3.2"); -const D = (t, i, s) => { - const e = s?.renderBefore ?? i; - let h = e._$litPart$; - if (void 0 === h) { - const t = s?.renderBefore ?? null; - e._$litPart$ = h = new k(i.insertBefore(c$4(), t), t, void 0, s ?? {}); - } - return h._$AI(t), h; -}; -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const s$6 = globalThis; -var i$6 = class extends y$1 { - constructor() { - super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; - } - createRenderRoot() { - const t = super.createRenderRoot(); - return this.renderOptions.renderBefore ??= t.firstChild, t; - } - update(t) { - const r = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(r, this.renderRoot, this.renderOptions); - } - connectedCallback() { - super.connectedCallback(), this._$Do?.setConnected(!0); - } - disconnectedCallback() { - super.disconnectedCallback(), this._$Do?.setConnected(!1); - } - render() { - return E; - } -}; -i$6._$litElement$ = !0, i$6["finalized"] = !0, s$6.litElementHydrateSupport?.({ LitElement: i$6 }); -const o$11 = s$6.litElementPolyfillSupport; -o$11?.({ LitElement: i$6 }); -(s$6.litElementVersions ??= []).push("4.2.2"); -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const t$4 = { - ATTRIBUTE: 1, - CHILD: 2, - PROPERTY: 3, - BOOLEAN_ATTRIBUTE: 4, - EVENT: 5, - ELEMENT: 6 -}, e$10 = (t) => (...e) => ({ - _$litDirective$: t, - values: e -}); -var i$5 = class { - constructor(t) {} - get _$AU() { - return this._$AM._$AU; - } - _$AT(t, e, i) { - this._$Ct = t, this._$AM = e, this._$Ci = i; - } - _$AS(t, e) { - return this.update(t, e); - } - update(t, e) { - return this.render(...e); - } -}; -/** -* @license -* Copyright 2020 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const { I: t$3 } = j$1, i$4 = (o) => o, r$8 = (o) => void 0 === o.strings, s$5 = () => document.createComment(""), v = (o, n, e) => { - const l = o._$AA.parentNode, d = void 0 === n ? o._$AB : n._$AA; - if (void 0 === e) e = new t$3(l.insertBefore(s$5(), d), l.insertBefore(s$5(), d), o, o.options); - else { - const t = e._$AB.nextSibling, n = e._$AM, c = n !== o; - if (c) { - let t; - e._$AQ?.(o), e._$AM = o, void 0 !== e._$AP && (t = o._$AU) !== n._$AU && e._$AP(t); - } - if (t !== d || c) { - let o = e._$AA; - for (; o !== t;) { - const t = i$4(o).nextSibling; - i$4(l).insertBefore(o, d), o = t; - } - } - } - return e; -}, u$1 = (o, t, i = o) => (o._$AI(t, i), o), m$1 = {}, p = (o, t = m$1) => o._$AH = t, M = (o) => o._$AH, h$4 = (o) => { - o._$AR(), o._$AA.remove(); -}; -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const u = (e, s, t) => { - const r = /* @__PURE__ */ new Map(); - for (let l = s; l <= t; l++) r.set(e[l], l); - return r; -}, c$2 = e$10(class extends i$5 { - constructor(e) { - if (super(e), e.type !== t$4.CHILD) throw Error("repeat() can only be used in text expressions"); - } - dt(e, s, t) { - let r; - void 0 === t ? t = s : void 0 !== s && (r = s); - const l = [], o = []; - let i = 0; - for (const s of e) l[i] = r ? r(s, i) : i, o[i] = t(s, i), i++; - return { - values: o, - keys: l - }; - } - render(e, s, t) { - return this.dt(e, s, t).values; - } - update(s, [t, r, c]) { - const d = M(s), { values: p$3, keys: a } = this.dt(t, r, c); - if (!Array.isArray(d)) return this.ut = a, p$3; - const h = this.ut ??= [], v$2 = []; - let m, y, x = 0, j = d.length - 1, k = 0, w = p$3.length - 1; - for (; x <= j && k <= w;) if (null === d[x]) x++; - else if (null === d[j]) j--; - else if (h[x] === a[k]) v$2[k] = u$1(d[x], p$3[k]), x++, k++; - else if (h[j] === a[w]) v$2[w] = u$1(d[j], p$3[w]), j--, w--; - else if (h[x] === a[w]) v$2[w] = u$1(d[x], p$3[w]), v(s, v$2[w + 1], d[x]), x++, w--; - else if (h[j] === a[k]) v$2[k] = u$1(d[j], p$3[k]), v(s, d[x], d[j]), j--, k++; - else if (void 0 === m && (m = u(a, k, w), y = u(h, x, j)), m.has(h[x])) if (m.has(h[j])) { - const e = y.get(a[k]), t = void 0 !== e ? d[e] : null; - if (null === t) { - const e = v(s, d[x]); - u$1(e, p$3[k]), v$2[k] = e; - } else v$2[k] = u$1(t, p$3[k]), v(s, d[x], t), d[e] = null; - k++; - } else h$4(d[j]), j--; - else h$4(d[x]), x++; - for (; k <= w;) { - const e = v(s, v$2[w + 1]); - u$1(e, p$3[k]), v$2[k++] = e; - } - for (; x <= j;) { - const e = d[x++]; - null !== e && h$4(e); - } - return this.ut = a, p(s, v$2), E; - } -}); -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -var s$4 = class extends Event { - constructor(s, t, e, o) { - super("context-request", { - bubbles: !0, - composed: !0 - }), this.context = s, this.contextTarget = t, this.callback = e, this.subscribe = o ?? !1; - } -}; -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -function n$7(n) { - return n; -} -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ var s$3 = class { - constructor(t, s, i, h) { - if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (t, s) => { - this.unsubscribe && (this.unsubscribe !== s && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = t, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(t, s)), this.unsubscribe = s; - }, this.host = t, void 0 !== s.context) { - const t = s; - this.context = t.context, this.callback = t.callback, this.subscribe = t.subscribe ?? !1; - } else this.context = s, this.callback = i, this.subscribe = h ?? !1; - this.host.addController(this); - } - hostConnected() { - this.dispatchRequest(); - } - hostDisconnected() { - this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0); - } - dispatchRequest() { - this.host.dispatchEvent(new s$4(this.context, this.host, this.t, this.subscribe)); - } -}; -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -var s$2 = class { - get value() { - return this.o; - } - set value(s) { - this.setValue(s); - } - setValue(s, t = !1) { - const i = t || !Object.is(s, this.o); - this.o = s, i && this.updateObservers(); - } - constructor(s) { - this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => { - for (const [s, { disposer: t }] of this.subscriptions) s(this.o, t); - }, void 0 !== s && (this.value = s); - } - addCallback(s, t, i) { - if (!i) return void s(this.value); - this.subscriptions.has(s) || this.subscriptions.set(s, { - disposer: () => { - this.subscriptions.delete(s); - }, - consumerHost: t - }); - const { disposer: h } = this.subscriptions.get(s); - s(this.value, h); - } - clearCallbacks() { - this.subscriptions.clear(); - } -}; -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ var e$8 = class extends Event { - constructor(t, s) { - super("context-provider", { - bubbles: !0, - composed: !0 - }), this.context = t, this.contextTarget = s; - } -}; -var i$3 = class extends s$2 { - constructor(s, e, i) { - super(void 0 !== e.context ? e.initialValue : i), this.onContextRequest = (t) => { - if (t.context !== this.context) return; - const s = t.contextTarget ?? t.composedPath()[0]; - s !== this.host && (t.stopPropagation(), this.addCallback(t.callback, s, t.subscribe)); - }, this.onProviderRequest = (s) => { - if (s.context !== this.context) return; - if ((s.contextTarget ?? s.composedPath()[0]) === this.host) return; - const e = /* @__PURE__ */ new Set(); - for (const [s, { consumerHost: i }] of this.subscriptions) e.has(s) || (e.add(s), i.dispatchEvent(new s$4(this.context, i, s, !0))); - s.stopPropagation(); - }, this.host = s, void 0 !== e.context ? this.context = e.context : this.context = e, this.attachListeners(), this.host.addController?.(this); - } - attachListeners() { - this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest); - } - hostConnected() { - this.host.dispatchEvent(new e$8(this.context, this.host)); - } -}; -/** -* @license -* Copyright 2022 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ function c$1({ context: c, subscribe: e }) { - return (o, n) => { - "object" == typeof n ? n.addInitializer((function() { - new s$3(this, { - context: c, - callback: (t) => { - o.set.call(this, t); - }, - subscribe: e - }); - })) : o.constructor.addInitializer(((o) => { - new s$3(o, { - context: c, - callback: (t) => { - o[n] = t; - }, - subscribe: e - }); - })); - }; -} -const eventInit = { - bubbles: true, - cancelable: true, - composed: true -}; -var StateEvent = class StateEvent extends CustomEvent { - static { - this.eventName = "a2uiaction"; - } - constructor(payload) { - super(StateEvent.eventName, { - detail: payload, - ...eventInit - }); - this.payload = payload; - } -}; -const opacityBehavior = ` - &:not([disabled]) { - cursor: pointer; - opacity: var(--opacity, 0); - transition: opacity var(--speed, 0.2s) cubic-bezier(0, 0, 0.3, 1); - - &:hover, - &:focus { - opacity: 1; - } - }`; -const behavior = ` - ${new Array(21).fill(0).map((_, idx) => { - return `.behavior-ho-${idx * 5} { - --opacity: ${idx / 20}; - ${opacityBehavior} - }`; -}).join("\n")} - - .behavior-o-s { - overflow: scroll; - } - - .behavior-o-a { - overflow: auto; - } - - .behavior-o-h { - overflow: hidden; - } - - .behavior-sw-n { - scrollbar-width: none; - } -`; -const border = ` - ${new Array(25).fill(0).map((_, idx) => { - return ` - .border-bw-${idx} { border-width: ${idx}px; } - .border-btw-${idx} { border-top-width: ${idx}px; } - .border-bbw-${idx} { border-bottom-width: ${idx}px; } - .border-blw-${idx} { border-left-width: ${idx}px; } - .border-brw-${idx} { border-right-width: ${idx}px; } - - .border-ow-${idx} { outline-width: ${idx}px; } - .border-br-${idx} { border-radius: ${idx * 4}px; overflow: hidden;}`; -}).join("\n")} - - .border-br-50pc { - border-radius: 50%; - } - - .border-bs-s { - border-style: solid; - } -`; -const shades = [ - 0, - 5, - 10, - 15, - 20, - 25, - 30, - 35, - 40, - 50, - 60, - 70, - 80, - 90, - 95, - 98, - 99, - 100 -]; -function merge(...classes) { - const styles = {}; - for (const clazz of classes) for (const [key, val] of Object.entries(clazz)) { - const prefix = key.split("-").with(-1, "").join("-"); - const existingKeys = Object.keys(styles).filter((key) => key.startsWith(prefix)); - for (const existingKey of existingKeys) delete styles[existingKey]; - styles[key] = val; - } - return styles; -} -function appendToAll(target, exclusions, ...classes) { - const updatedTarget = structuredClone(target); - for (const clazz of classes) for (const key of Object.keys(clazz)) { - const prefix = key.split("-").with(-1, "").join("-"); - for (const [tagName, classesToAdd] of Object.entries(updatedTarget)) { - if (exclusions.includes(tagName)) continue; - let found = false; - for (let t = 0; t < classesToAdd.length; t++) if (classesToAdd[t].startsWith(prefix)) { - found = true; - classesToAdd[t] = key; - } - if (!found) classesToAdd.push(key); - } - } - return updatedTarget; -} -function toProp(key) { - if (key.startsWith("nv")) return `--nv-${key.slice(2)}`; - return `--${key[0]}-${key.slice(1)}`; -} -const color = (src) => ` - ${src.map((key) => { - const inverseKey = getInverseKey(key); - return `.color-bc-${key} { border-color: light-dark(var(${toProp(key)}), var(${toProp(inverseKey)})); }`; -}).join("\n")} - - ${src.map((key) => { - const inverseKey = getInverseKey(key); - const vals = [`.color-bgc-${key} { background-color: light-dark(var(${toProp(key)}), var(${toProp(inverseKey)})); }`, `.color-bbgc-${key}::backdrop { background-color: light-dark(var(${toProp(key)}), var(${toProp(inverseKey)})); }`]; - for (let o = .1; o < 1; o += .1) vals.push(`.color-bbgc-${key}_${(o * 100).toFixed(0)}::backdrop { - background-color: light-dark(oklch(from var(${toProp(key)}) l c h / calc(alpha * ${o.toFixed(1)})), oklch(from var(${toProp(inverseKey)}) l c h / calc(alpha * ${o.toFixed(1)})) ); - } - `); - return vals.join("\n"); -}).join("\n")} - - ${src.map((key) => { - const inverseKey = getInverseKey(key); - return `.color-c-${key} { color: light-dark(var(${toProp(key)}), var(${toProp(inverseKey)})); }`; -}).join("\n")} - `; -const getInverseKey = (key) => { - const match = key.match(/^([a-z]+)(\d+)$/); - if (!match) return key; - const [, prefix, shadeStr] = match; - const target = 100 - parseInt(shadeStr, 10); - return `${prefix}${shades.reduce((prev, curr) => Math.abs(curr - target) < Math.abs(prev - target) ? curr : prev)}`; -}; -const keyFactory = (prefix) => { - return shades.map((v) => `${prefix}${v}`); -}; -const structuralStyles$1 = [ - behavior, - border, - [ - color(keyFactory("p")), - color(keyFactory("s")), - color(keyFactory("t")), - color(keyFactory("n")), - color(keyFactory("nv")), - color(keyFactory("e")), - ` - .color-bgc-transparent { - background-color: transparent; - } - - :host { - color-scheme: var(--color-scheme); - } - ` - ], - ` - .g-icon { - font-family: "Material Symbols Outlined", "Google Symbols"; - font-weight: normal; - font-style: normal; - font-display: optional; - font-size: 20px; - width: 1em; - height: 1em; - user-select: none; - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - -webkit-font-feature-settings: "liga"; - -webkit-font-smoothing: antialiased; - overflow: hidden; - - font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 48, - "ROND" 100; - - &.filled { - font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 48, - "ROND" 100; - } - - &.filled-heavy { - font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48, - "ROND" 100; - } - } -`, - ` - :host { - ${new Array(16).fill(0).map((_, idx) => { - return `--g-${idx + 1}: ${(idx + 1) * 4}px;`; - }).join("\n")} - } - - ${new Array(49).fill(0).map((_, index) => { - const idx = index - 24; - const lbl = idx < 0 ? `n${Math.abs(idx)}` : idx.toString(); - return ` - .layout-p-${lbl} { --padding: ${idx * 4}px; padding: var(--padding); } - .layout-pt-${lbl} { padding-top: ${idx * 4}px; } - .layout-pr-${lbl} { padding-right: ${idx * 4}px; } - .layout-pb-${lbl} { padding-bottom: ${idx * 4}px; } - .layout-pl-${lbl} { padding-left: ${idx * 4}px; } - - .layout-m-${lbl} { --margin: ${idx * 4}px; margin: var(--margin); } - .layout-mt-${lbl} { margin-top: ${idx * 4}px; } - .layout-mr-${lbl} { margin-right: ${idx * 4}px; } - .layout-mb-${lbl} { margin-bottom: ${idx * 4}px; } - .layout-ml-${lbl} { margin-left: ${idx * 4}px; } - - .layout-t-${lbl} { top: ${idx * 4}px; } - .layout-r-${lbl} { right: ${idx * 4}px; } - .layout-b-${lbl} { bottom: ${idx * 4}px; } - .layout-l-${lbl} { left: ${idx * 4}px; }`; - }).join("\n")} - - ${new Array(25).fill(0).map((_, idx) => { - return ` - .layout-g-${idx} { gap: ${idx * 4}px; }`; - }).join("\n")} - - ${new Array(8).fill(0).map((_, idx) => { - return ` - .layout-grd-col${idx + 1} { grid-template-columns: ${"1fr ".repeat(idx + 1).trim()}; }`; - }).join("\n")} - - .layout-pos-a { - position: absolute; - } - - .layout-pos-rel { - position: relative; - } - - .layout-dsp-none { - display: none; - } - - .layout-dsp-block { - display: block; - } - - .layout-dsp-grid { - display: grid; - } - - .layout-dsp-iflex { - display: inline-flex; - } - - .layout-dsp-flexvert { - display: flex; - flex-direction: column; - } - - .layout-dsp-flexhor { - display: flex; - flex-direction: row; - } - - .layout-fw-w { - flex-wrap: wrap; - } - - .layout-al-fs { - align-items: start; - } - - .layout-al-fe { - align-items: end; - } - - .layout-al-c { - align-items: center; - } - - .layout-as-n { - align-self: normal; - } - - .layout-js-c { - justify-self: center; - } - - .layout-sp-c { - justify-content: center; - } - - .layout-sp-ev { - justify-content: space-evenly; - } - - .layout-sp-bt { - justify-content: space-between; - } - - .layout-sp-s { - justify-content: start; - } - - .layout-sp-e { - justify-content: end; - } - - .layout-ji-e { - justify-items: end; - } - - .layout-r-none { - resize: none; - } - - .layout-fs-c { - field-sizing: content; - } - - .layout-fs-n { - field-sizing: none; - } - - .layout-flx-0 { - flex: 0 0 auto; - } - - .layout-flx-1 { - flex: 1 0 auto; - } - - .layout-c-s { - contain: strict; - } - - /** Widths **/ - - ${new Array(10).fill(0).map((_, idx) => { - const weight = (idx + 1) * 10; - return `.layout-w-${weight} { width: ${weight}%; max-width: ${weight}%; }`; - }).join("\n")} - - ${new Array(16).fill(0).map((_, idx) => { - return `.layout-wp-${idx} { width: ${idx * 4}px; }`; - }).join("\n")} - - /** Heights **/ - - ${new Array(10).fill(0).map((_, idx) => { - const height = (idx + 1) * 10; - return `.layout-h-${height} { height: ${height}%; }`; - }).join("\n")} - - ${new Array(16).fill(0).map((_, idx) => { - return `.layout-hp-${idx} { height: ${idx * 4}px; }`; - }).join("\n")} - - .layout-el-cv { - & img, - & video { - width: 100%; - height: 100%; - object-fit: cover; - margin: 0; - } - } - - .layout-ar-sq { - aspect-ratio: 1 / 1; - } - - .layout-ex-fb { - margin: calc(var(--padding) * -1) 0 0 calc(var(--padding) * -1); - width: calc(100% + var(--padding) * 2); - height: calc(100% + var(--padding) * 2); - } -`, - ` - ${new Array(21).fill(0).map((_, idx) => { - return `.opacity-el-${idx * 5} { opacity: ${idx / 20}; }`; - }).join("\n")} -`, - ` - :host { - --default-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - --default-font-family-mono: "Courier New", Courier, monospace; - } - - .typography-f-s { - font-family: var(--font-family, var(--default-font-family)); - font-optical-sizing: auto; - font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0; - } - - .typography-f-sf { - font-family: var(--font-family-flex, var(--default-font-family)); - font-optical-sizing: auto; - } - - .typography-f-c { - font-family: var(--font-family-mono, var(--default-font-family)); - font-optical-sizing: auto; - font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0; - } - - .typography-v-r { - font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 100; - } - - .typography-ta-s { - text-align: start; - } - - .typography-ta-c { - text-align: center; - } - - .typography-fs-n { - font-style: normal; - } - - .typography-fs-i { - font-style: italic; - } - - .typography-sz-ls { - font-size: 11px; - line-height: 16px; - } - - .typography-sz-lm { - font-size: 12px; - line-height: 16px; - } - - .typography-sz-ll { - font-size: 14px; - line-height: 20px; - } - - .typography-sz-bs { - font-size: 12px; - line-height: 16px; - } - - .typography-sz-bm { - font-size: 14px; - line-height: 20px; - } - - .typography-sz-bl { - font-size: 16px; - line-height: 24px; - } - - .typography-sz-ts { - font-size: 14px; - line-height: 20px; - } - - .typography-sz-tm { - font-size: 16px; - line-height: 24px; - } - - .typography-sz-tl { - font-size: 22px; - line-height: 28px; - } - - .typography-sz-hs { - font-size: 24px; - line-height: 32px; - } - - .typography-sz-hm { - font-size: 28px; - line-height: 36px; - } - - .typography-sz-hl { - font-size: 32px; - line-height: 40px; - } - - .typography-sz-ds { - font-size: 36px; - line-height: 44px; - } - - .typography-sz-dm { - font-size: 45px; - line-height: 52px; - } - - .typography-sz-dl { - font-size: 57px; - line-height: 64px; - } - - .typography-ws-p { - white-space: pre-line; - } - - .typography-ws-nw { - white-space: nowrap; - } - - .typography-td-none { - text-decoration: none; - } - - /** Weights **/ - - ${new Array(9).fill(0).map((_, idx) => { - const weight = (idx + 1) * 100; - return `.typography-w-${weight} { font-weight: ${weight}; }`; - }).join("\n")} -` -].flat(Infinity).join("\n"); -var guards_exports = /* @__PURE__ */ __exportAll({ - isComponentArrayReference: () => isComponentArrayReference, - isObject: () => isObject$1, - isPath: () => isPath, - isResolvedAudioPlayer: () => isResolvedAudioPlayer, - isResolvedButton: () => isResolvedButton, - isResolvedCard: () => isResolvedCard, - isResolvedCheckbox: () => isResolvedCheckbox, - isResolvedColumn: () => isResolvedColumn, - isResolvedDateTimeInput: () => isResolvedDateTimeInput, - isResolvedDivider: () => isResolvedDivider, - isResolvedIcon: () => isResolvedIcon, - isResolvedImage: () => isResolvedImage, - isResolvedList: () => isResolvedList, - isResolvedModal: () => isResolvedModal, - isResolvedMultipleChoice: () => isResolvedMultipleChoice, - isResolvedRow: () => isResolvedRow, - isResolvedSlider: () => isResolvedSlider, - isResolvedTabs: () => isResolvedTabs, - isResolvedText: () => isResolvedText, - isResolvedTextField: () => isResolvedTextField, - isResolvedVideo: () => isResolvedVideo, - isValueMap: () => isValueMap -}); -function isValueMap(value) { - return isObject$1(value) && "key" in value; -} -function isPath(key, value) { - return key === "path" && typeof value === "string"; -} -function isObject$1(value) { - return typeof value === "object" && value !== null && !Array.isArray(value); -} -function isComponentArrayReference(value) { - if (!isObject$1(value)) return false; - return "explicitList" in value || "template" in value; -} -function isStringValue(value) { - return isObject$1(value) && ("path" in value || "literal" in value && typeof value.literal === "string" || "literalString" in value); -} -function isNumberValue(value) { - return isObject$1(value) && ("path" in value || "literal" in value && typeof value.literal === "number" || "literalNumber" in value); -} -function isBooleanValue(value) { - return isObject$1(value) && ("path" in value || "literal" in value && typeof value.literal === "boolean" || "literalBoolean" in value); -} -function isAnyComponentNode(value) { - if (!isObject$1(value)) return false; - if (!("id" in value && "type" in value && "properties" in value)) return false; - return true; -} -function isResolvedAudioPlayer(props) { - return isObject$1(props) && "url" in props && isStringValue(props.url); -} -function isResolvedButton(props) { - return isObject$1(props) && "child" in props && isAnyComponentNode(props.child) && "action" in props; -} -function isResolvedCard(props) { - if (!isObject$1(props)) return false; - if (!("child" in props)) if (!("children" in props)) return false; - else return Array.isArray(props.children) && props.children.every(isAnyComponentNode); - return isAnyComponentNode(props.child); -} -function isResolvedCheckbox(props) { - return isObject$1(props) && "label" in props && isStringValue(props.label) && "value" in props && isBooleanValue(props.value); -} -function isResolvedColumn(props) { - return isObject$1(props) && "children" in props && Array.isArray(props.children) && props.children.every(isAnyComponentNode); -} -function isResolvedDateTimeInput(props) { - return isObject$1(props) && "value" in props && isStringValue(props.value); -} -function isResolvedDivider(props) { - return isObject$1(props); -} -function isResolvedImage(props) { - return isObject$1(props) && "url" in props && isStringValue(props.url); -} -function isResolvedIcon(props) { - return isObject$1(props) && "name" in props && isStringValue(props.name); -} -function isResolvedList(props) { - return isObject$1(props) && "children" in props && Array.isArray(props.children) && props.children.every(isAnyComponentNode); -} -function isResolvedModal(props) { - return isObject$1(props) && "entryPointChild" in props && isAnyComponentNode(props.entryPointChild) && "contentChild" in props && isAnyComponentNode(props.contentChild); -} -function isResolvedMultipleChoice(props) { - return isObject$1(props) && "selections" in props; -} -function isResolvedRow(props) { - return isObject$1(props) && "children" in props && Array.isArray(props.children) && props.children.every(isAnyComponentNode); -} -function isResolvedSlider(props) { - return isObject$1(props) && "value" in props && isNumberValue(props.value); -} -function isResolvedTabItem(item) { - return isObject$1(item) && "title" in item && isStringValue(item.title) && "child" in item && isAnyComponentNode(item.child); -} -function isResolvedTabs(props) { - return isObject$1(props) && "tabItems" in props && Array.isArray(props.tabItems) && props.tabItems.every(isResolvedTabItem); -} -function isResolvedText(props) { - return isObject$1(props) && "text" in props && isStringValue(props.text); -} -function isResolvedTextField(props) { - return isObject$1(props) && "label" in props && isStringValue(props.label); -} -function isResolvedVideo(props) { - return isObject$1(props) && "url" in props && isStringValue(props.url); -} -/** -* Processes and consolidates A2UIProtocolMessage objects into a structured, -* hierarchical model of UI surfaces. -*/ -var A2uiMessageProcessor = class A2uiMessageProcessor { - static { - this.DEFAULT_SURFACE_ID = "@default"; - } - #mapCtor = Map; - #arrayCtor = Array; - #setCtor = Set; - #objCtor = Object; - #surfaces; - constructor(opts = { - mapCtor: Map, - arrayCtor: Array, - setCtor: Set, - objCtor: Object - }) { - this.opts = opts; - this.#arrayCtor = opts.arrayCtor; - this.#mapCtor = opts.mapCtor; - this.#setCtor = opts.setCtor; - this.#objCtor = opts.objCtor; - this.#surfaces = new opts.mapCtor(); - } - getSurfaces() { - return this.#surfaces; - } - clearSurfaces() { - this.#surfaces.clear(); - } - processMessages(messages) { - for (const message of messages) { - if (message.beginRendering) this.#handleBeginRendering(message.beginRendering, message.beginRendering.surfaceId); - if (message.surfaceUpdate) this.#handleSurfaceUpdate(message.surfaceUpdate, message.surfaceUpdate.surfaceId); - if (message.dataModelUpdate) this.#handleDataModelUpdate(message.dataModelUpdate, message.dataModelUpdate.surfaceId); - if (message.deleteSurface) this.#handleDeleteSurface(message.deleteSurface); - } - } - /** - * Retrieves the data for a given component node and a relative path string. - * This correctly handles the special `.` path, which refers to the node's - * own data context. - */ - getData(node, relativePath, surfaceId = A2uiMessageProcessor.DEFAULT_SURFACE_ID) { - const surface = this.#getOrCreateSurface(surfaceId); - if (!surface) return null; - let finalPath; - if (relativePath === "." || relativePath === "") finalPath = node.dataContextPath ?? "/"; - else finalPath = this.resolvePath(relativePath, node.dataContextPath); - return this.#getDataByPath(surface.dataModel, finalPath); - } - setData(node, relativePath, value, surfaceId = A2uiMessageProcessor.DEFAULT_SURFACE_ID) { - if (!node) { - console.warn("No component node set"); - return; - } - const surface = this.#getOrCreateSurface(surfaceId); - if (!surface) return; - let finalPath; - if (relativePath === "." || relativePath === "") finalPath = node.dataContextPath ?? "/"; - else finalPath = this.resolvePath(relativePath, node.dataContextPath); - this.#setDataByPath(surface.dataModel, finalPath, value); - } - resolvePath(path, dataContextPath) { - if (path.startsWith("/")) return path; - if (dataContextPath && dataContextPath !== "/") return dataContextPath.endsWith("/") ? `${dataContextPath}${path}` : `${dataContextPath}/${path}`; - return `/${path}`; - } - #parseIfJsonString(value) { - if (typeof value !== "string") return value; - const trimmedValue = value.trim(); - if (trimmedValue.startsWith("{") && trimmedValue.endsWith("}") || trimmedValue.startsWith("[") && trimmedValue.endsWith("]")) try { - return JSON.parse(value); - } catch (e) { - console.warn(`Failed to parse potential JSON string: "${value.substring(0, 50)}..."`, e); - return value; - } - return value; - } - /** - * Converts a specific array format [{key: "...", value_string: "..."}, ...] - * into a standard Map. It also attempts to parse any string values that - * appear to be stringified JSON. - */ - #convertKeyValueArrayToMap(arr) { - const map = new this.#mapCtor(); - for (const item of arr) { - if (!isObject$1(item) || !("key" in item)) continue; - const key = item.key; - const valueKey = this.#findValueKey(item); - if (!valueKey) continue; - let value = item[valueKey]; - if (valueKey === "valueMap" && Array.isArray(value)) value = this.#convertKeyValueArrayToMap(value); - else if (typeof value === "string") value = this.#parseIfJsonString(value); - this.#setDataByPath(map, key, value); - } - return map; - } - #setDataByPath(root, path, value) { - if (Array.isArray(value) && (value.length === 0 || isObject$1(value[0]) && "key" in value[0])) if (value.length === 1 && isObject$1(value[0]) && value[0].key === ".") { - const item = value[0]; - const valueKey = this.#findValueKey(item); - if (valueKey) { - value = item[valueKey]; - if (valueKey === "valueMap" && Array.isArray(value)) value = this.#convertKeyValueArrayToMap(value); - else if (typeof value === "string") value = this.#parseIfJsonString(value); - } else value = this.#convertKeyValueArrayToMap(value); - } else value = this.#convertKeyValueArrayToMap(value); - const segments = this.#normalizePath(path).split("/").filter((s) => s); - if (segments.length === 0) { - if (value instanceof Map || isObject$1(value)) { - if (!(value instanceof Map) && isObject$1(value)) value = new this.#mapCtor(Object.entries(value)); - root.clear(); - for (const [key, v] of value.entries()) root.set(key, v); - } else console.error("Cannot set root of DataModel to a non-Map value."); - return; - } - let current = root; - for (let i = 0; i < segments.length - 1; i++) { - const segment = segments[i]; - let target; - if (current instanceof Map) target = current.get(segment); - else if (Array.isArray(current) && /^\d+$/.test(segment)) target = current[parseInt(segment, 10)]; - if (target === void 0 || typeof target !== "object" || target === null) { - target = new this.#mapCtor(); - if (current instanceof this.#mapCtor) current.set(segment, target); - else if (Array.isArray(current)) current[parseInt(segment, 10)] = target; - } - current = target; - } - const finalSegment = segments[segments.length - 1]; - const storedValue = value; - if (current instanceof this.#mapCtor) current.set(finalSegment, storedValue); - else if (Array.isArray(current) && /^\d+$/.test(finalSegment)) current[parseInt(finalSegment, 10)] = storedValue; - } - /** - * Normalizes a path string into a consistent, slash-delimited format. - * Converts bracket notation and dot notation in a two-pass. - * e.g., "bookRecommendations[0].title" -> "/bookRecommendations/0/title" - * e.g., "book.0.title" -> "/book/0/title" - */ - #normalizePath(path) { - return "/" + path.replace(/\[(\d+)\]/g, ".$1").split(".").filter((s) => s.length > 0).join("/"); - } - #getDataByPath(root, path) { - const segments = this.#normalizePath(path).split("/").filter((s) => s); - let current = root; - for (const segment of segments) { - if (current === void 0 || current === null) return null; - if (current instanceof Map) current = current.get(segment); - else if (Array.isArray(current) && /^\d+$/.test(segment)) current = current[parseInt(segment, 10)]; - else if (isObject$1(current)) current = current[segment]; - else return null; - } - return current; - } - #getOrCreateSurface(surfaceId) { - let surface = this.#surfaces.get(surfaceId); - if (!surface) { - surface = new this.#objCtor({ - rootComponentId: null, - componentTree: null, - dataModel: new this.#mapCtor(), - components: new this.#mapCtor(), - styles: new this.#objCtor() - }); - this.#surfaces.set(surfaceId, surface); - } - return surface; - } - #handleBeginRendering(message, surfaceId) { - const surface = this.#getOrCreateSurface(surfaceId); - surface.rootComponentId = message.root; - surface.styles = message.styles ?? {}; - this.#rebuildComponentTree(surface); - } - #handleSurfaceUpdate(message, surfaceId) { - const surface = this.#getOrCreateSurface(surfaceId); - for (const component of message.components) surface.components.set(component.id, component); - this.#rebuildComponentTree(surface); - } - #handleDataModelUpdate(message, surfaceId) { - const surface = this.#getOrCreateSurface(surfaceId); - const path = message.path ?? "/"; - this.#setDataByPath(surface.dataModel, path, message.contents); - this.#rebuildComponentTree(surface); - } - #handleDeleteSurface(message) { - this.#surfaces.delete(message.surfaceId); - } - /** - * Starts at the root component of the surface and builds out the tree - * recursively. This process involves resolving all properties of the child - * components, and expanding on any explicit children lists or templates - * found in the structure. - * - * @param surface The surface to be built. - */ - #rebuildComponentTree(surface) { - if (!surface.rootComponentId) { - surface.componentTree = null; - return; - } - const visited = new this.#setCtor(); - surface.componentTree = this.#buildNodeRecursive(surface.rootComponentId, surface, visited, "/", ""); - } - /** Finds a value key in a map. */ - #findValueKey(value) { - return Object.keys(value).find((k) => k.startsWith("value")); - } - /** - * Builds out the nodes recursively. - */ - #buildNodeRecursive(baseComponentId, surface, visited, dataContextPath, idSuffix = "") { - const fullId = `${baseComponentId}${idSuffix}`; - const { components } = surface; - if (!components.has(baseComponentId)) return null; - if (visited.has(fullId)) throw new Error(`Circular dependency for component "${fullId}".`); - visited.add(fullId); - const componentData = components.get(baseComponentId); - const componentProps = componentData.component ?? {}; - const componentType = Object.keys(componentProps)[0]; - const unresolvedProperties = componentProps[componentType]; - const resolvedProperties = new this.#objCtor(); - if (isObject$1(unresolvedProperties)) for (const [key, value] of Object.entries(unresolvedProperties)) resolvedProperties[key] = this.#resolvePropertyValue(value, surface, visited, dataContextPath, idSuffix, key); - visited.delete(fullId); - const baseNode = { - id: fullId, - dataContextPath, - weight: componentData.weight ?? "initial" - }; - switch (componentType) { - case "Text": - if (!isResolvedText(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Text", - properties: resolvedProperties - }); - case "Image": - if (!isResolvedImage(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Image", - properties: resolvedProperties - }); - case "Icon": - if (!isResolvedIcon(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Icon", - properties: resolvedProperties - }); - case "Video": - if (!isResolvedVideo(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Video", - properties: resolvedProperties - }); - case "AudioPlayer": - if (!isResolvedAudioPlayer(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "AudioPlayer", - properties: resolvedProperties - }); - case "Row": - if (!isResolvedRow(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Row", - properties: resolvedProperties - }); - case "Column": - if (!isResolvedColumn(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Column", - properties: resolvedProperties - }); - case "List": - if (!isResolvedList(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "List", - properties: resolvedProperties - }); - case "Card": - if (!isResolvedCard(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Card", - properties: resolvedProperties - }); - case "Tabs": - if (!isResolvedTabs(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Tabs", - properties: resolvedProperties - }); - case "Divider": - if (!isResolvedDivider(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Divider", - properties: resolvedProperties - }); - case "Modal": - if (!isResolvedModal(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Modal", - properties: resolvedProperties - }); - case "Button": - if (!isResolvedButton(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Button", - properties: resolvedProperties - }); - case "CheckBox": - if (!isResolvedCheckbox(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "CheckBox", - properties: resolvedProperties - }); - case "TextField": - if (!isResolvedTextField(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "TextField", - properties: resolvedProperties - }); - case "DateTimeInput": - if (!isResolvedDateTimeInput(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "DateTimeInput", - properties: resolvedProperties - }); - case "MultipleChoice": - if (!isResolvedMultipleChoice(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "MultipleChoice", - properties: resolvedProperties - }); - case "Slider": - if (!isResolvedSlider(resolvedProperties)) throw new Error(`Invalid data; expected ${componentType}`); - return new this.#objCtor({ - ...baseNode, - type: "Slider", - properties: resolvedProperties - }); - default: return new this.#objCtor({ - ...baseNode, - type: componentType, - properties: resolvedProperties - }); - } - } - /** - * Recursively resolves an individual property value. If a property indicates - * a child node (a string that matches a component ID), an explicitList of - * children, or a template, these will be built out here. - */ - #resolvePropertyValue(value, surface, visited, dataContextPath, idSuffix = "", propertyKey = null) { - const isComponentIdReferenceKey = (key) => key === "child" || key.endsWith("Child"); - if (typeof value === "string" && propertyKey && isComponentIdReferenceKey(propertyKey) && surface.components.has(value)) return this.#buildNodeRecursive(value, surface, visited, dataContextPath, idSuffix); - if (isComponentArrayReference(value)) { - if (value.explicitList) return value.explicitList.map((id) => this.#buildNodeRecursive(id, surface, visited, dataContextPath, idSuffix)); - if (value.template) { - const fullDataPath = this.resolvePath(value.template.dataBinding, dataContextPath); - const data = this.#getDataByPath(surface.dataModel, fullDataPath); - const template = value.template; - if (Array.isArray(data)) return data.map((_, index) => { - const newSuffix = `:${[...dataContextPath.split("/").filter((segment) => /^\d+$/.test(segment)), index].join(":")}`; - const childDataContextPath = `${fullDataPath}/${index}`; - return this.#buildNodeRecursive(template.componentId, surface, visited, childDataContextPath, newSuffix); - }); - if (data instanceof this.#mapCtor) return Array.from(data.keys(), (key) => { - const newSuffix = `:${key}`; - const childDataContextPath = `${fullDataPath}/${key}`; - return this.#buildNodeRecursive(template.componentId, surface, visited, childDataContextPath, newSuffix); - }); - return new this.#arrayCtor(); - } - } - if (Array.isArray(value)) return value.map((item) => this.#resolvePropertyValue(item, surface, visited, dataContextPath, idSuffix, propertyKey)); - if (isObject$1(value)) { - const newObj = new this.#objCtor(); - for (const [key, propValue] of Object.entries(value)) { - let propertyValue = propValue; - if (isPath(key, propValue) && dataContextPath !== "/") { - propertyValue = propValue.replace(/^\.?\/item/, "").replace(/^\.?\/text/, "").replace(/^\.?\/label/, "").replace(/^\.?\//, ""); - newObj[key] = propertyValue; - continue; - } - newObj[key] = this.#resolvePropertyValue(propertyValue, surface, visited, dataContextPath, idSuffix, key); - } - return newObj; - } - return value; - } -}; -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { - enumerable: true, - configurable: true, - writable: true, - value -}) : obj[key] = value; -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) throw TypeError("Cannot " + msg); -}; -var __privateIn = (member, obj) => { - if (Object(obj) !== obj) throw TypeError("Cannot use the \"in\" operator on this value"); - return member.has(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateMethod = (obj, member, method) => { - __accessCheck(obj, member, "access private method"); - return method; -}; -/** -* @license -* Copyright Google LLC All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -function defaultEquals(a, b) { - return Object.is(a, b); -} -/** -* @license -* Copyright Google LLC All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -let activeConsumer = null; -let inNotificationPhase = false; -let epoch = 1; -const SIGNAL = /* @__PURE__ */ Symbol("SIGNAL"); -function setActiveConsumer(consumer) { - const prev = activeConsumer; - activeConsumer = consumer; - return prev; -} -function getActiveConsumer() { - return activeConsumer; -} -function isInNotificationPhase() { - return inNotificationPhase; -} -const REACTIVE_NODE = { - version: 0, - lastCleanEpoch: 0, - dirty: false, - producerNode: void 0, - producerLastReadVersion: void 0, - producerIndexOfThis: void 0, - nextProducerIndex: 0, - liveConsumerNode: void 0, - liveConsumerIndexOfThis: void 0, - consumerAllowSignalWrites: false, - consumerIsAlwaysLive: false, - producerMustRecompute: () => false, - producerRecomputeValue: () => {}, - consumerMarkedDirty: () => {}, - consumerOnSignalRead: () => {} -}; -function producerAccessed(node) { - if (inNotificationPhase) throw new Error(typeof ngDevMode !== "undefined" && ngDevMode ? `Assertion error: signal read during notification phase` : ""); - if (activeConsumer === null) return; - activeConsumer.consumerOnSignalRead(node); - const idx = activeConsumer.nextProducerIndex++; - assertConsumerNode(activeConsumer); - if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) { - if (consumerIsLive(activeConsumer)) { - const staleProducer = activeConsumer.producerNode[idx]; - producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]); - } - } - if (activeConsumer.producerNode[idx] !== node) { - activeConsumer.producerNode[idx] = node; - activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0; - } - activeConsumer.producerLastReadVersion[idx] = node.version; -} -function producerIncrementEpoch() { - epoch++; -} -function producerUpdateValueVersion(node) { - if (!node.dirty && node.lastCleanEpoch === epoch) return; - if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) { - node.dirty = false; - node.lastCleanEpoch = epoch; - return; - } - node.producerRecomputeValue(node); - node.dirty = false; - node.lastCleanEpoch = epoch; -} -function producerNotifyConsumers(node) { - if (node.liveConsumerNode === void 0) return; - const prev = inNotificationPhase; - inNotificationPhase = true; - try { - for (const consumer of node.liveConsumerNode) if (!consumer.dirty) consumerMarkDirty(consumer); - } finally { - inNotificationPhase = prev; - } -} -function producerUpdatesAllowed() { - return (activeConsumer == null ? void 0 : activeConsumer.consumerAllowSignalWrites) !== false; -} -function consumerMarkDirty(node) { - var _a; - node.dirty = true; - producerNotifyConsumers(node); - (_a = node.consumerMarkedDirty) == null || _a.call(node.wrapper ?? node); -} -function consumerBeforeComputation(node) { - node && (node.nextProducerIndex = 0); - return setActiveConsumer(node); -} -function consumerAfterComputation(node, prevConsumer) { - setActiveConsumer(prevConsumer); - if (!node || node.producerNode === void 0 || node.producerIndexOfThis === void 0 || node.producerLastReadVersion === void 0) return; - if (consumerIsLive(node)) for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); - while (node.producerNode.length > node.nextProducerIndex) { - node.producerNode.pop(); - node.producerLastReadVersion.pop(); - node.producerIndexOfThis.pop(); - } -} -function consumerPollProducersForChange(node) { - assertConsumerNode(node); - for (let i = 0; i < node.producerNode.length; i++) { - const producer = node.producerNode[i]; - const seenVersion = node.producerLastReadVersion[i]; - if (seenVersion !== producer.version) return true; - producerUpdateValueVersion(producer); - if (seenVersion !== producer.version) return true; - } - return false; -} -function producerAddLiveConsumer(node, consumer, indexOfThis) { - var _a; - assertProducerNode(node); - assertConsumerNode(node); - if (node.liveConsumerNode.length === 0) { - (_a = node.watched) == null || _a.call(node.wrapper); - for (let i = 0; i < node.producerNode.length; i++) node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i); - } - node.liveConsumerIndexOfThis.push(indexOfThis); - return node.liveConsumerNode.push(consumer) - 1; -} -function producerRemoveLiveConsumerAtIndex(node, idx) { - var _a; - assertProducerNode(node); - assertConsumerNode(node); - if (typeof ngDevMode !== "undefined" && ngDevMode && idx >= node.liveConsumerNode.length) throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`); - if (node.liveConsumerNode.length === 1) { - (_a = node.unwatched) == null || _a.call(node.wrapper); - for (let i = 0; i < node.producerNode.length; i++) producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); - } - const lastIdx = node.liveConsumerNode.length - 1; - node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx]; - node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx]; - node.liveConsumerNode.length--; - node.liveConsumerIndexOfThis.length--; - if (idx < node.liveConsumerNode.length) { - const idxProducer = node.liveConsumerIndexOfThis[idx]; - const consumer = node.liveConsumerNode[idx]; - assertConsumerNode(consumer); - consumer.producerIndexOfThis[idxProducer] = idx; - } -} -function consumerIsLive(node) { - var _a; - return node.consumerIsAlwaysLive || (((_a = node == null ? void 0 : node.liveConsumerNode) == null ? void 0 : _a.length) ?? 0) > 0; -} -function assertConsumerNode(node) { - node.producerNode ?? (node.producerNode = []); - node.producerIndexOfThis ?? (node.producerIndexOfThis = []); - node.producerLastReadVersion ?? (node.producerLastReadVersion = []); -} -function assertProducerNode(node) { - node.liveConsumerNode ?? (node.liveConsumerNode = []); - node.liveConsumerIndexOfThis ?? (node.liveConsumerIndexOfThis = []); -} -/** -* @license -* Copyright Google LLC All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -function computedGet(node) { - producerUpdateValueVersion(node); - producerAccessed(node); - if (node.value === ERRORED) throw node.error; - return node.value; -} -function createComputed(computation) { - const node = Object.create(COMPUTED_NODE); - node.computation = computation; - const computed = () => computedGet(node); - computed[SIGNAL] = node; - return computed; -} -const UNSET = /* @__PURE__ */ Symbol("UNSET"); -const COMPUTING = /* @__PURE__ */ Symbol("COMPUTING"); -const ERRORED = /* @__PURE__ */ Symbol("ERRORED"); -const COMPUTED_NODE = { - ...REACTIVE_NODE, - value: UNSET, - dirty: true, - error: null, - equal: defaultEquals, - producerMustRecompute(node) { - return node.value === UNSET || node.value === COMPUTING; - }, - producerRecomputeValue(node) { - if (node.value === COMPUTING) throw new Error("Detected cycle in computations."); - const oldValue = node.value; - node.value = COMPUTING; - const prevConsumer = consumerBeforeComputation(node); - let newValue; - let wasEqual = false; - try { - newValue = node.computation.call(node.wrapper); - wasEqual = oldValue !== UNSET && oldValue !== ERRORED && node.equal.call(node.wrapper, oldValue, newValue); - } catch (err) { - newValue = ERRORED; - node.error = err; - } finally { - consumerAfterComputation(node, prevConsumer); - } - if (wasEqual) { - node.value = oldValue; - return; - } - node.value = newValue; - node.version++; - } -}; -/** -* @license -* Copyright Google LLC All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -function defaultThrowError() { - throw new Error(); -} -let throwInvalidWriteToSignalErrorFn = defaultThrowError; -function throwInvalidWriteToSignalError() { - throwInvalidWriteToSignalErrorFn(); -} -/** -* @license -* Copyright Google LLC All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -function createSignal(initialValue) { - const node = Object.create(SIGNAL_NODE); - node.value = initialValue; - const getter = () => { - producerAccessed(node); - return node.value; - }; - getter[SIGNAL] = node; - return getter; -} -function signalGetFn() { - producerAccessed(this); - return this.value; -} -function signalSetFn(node, newValue) { - if (!producerUpdatesAllowed()) throwInvalidWriteToSignalError(); - if (!node.equal.call(node.wrapper, node.value, newValue)) { - node.value = newValue; - signalValueChanged(node); - } -} -const SIGNAL_NODE = { - ...REACTIVE_NODE, - equal: defaultEquals, - value: void 0 -}; -function signalValueChanged(node) { - node.version++; - producerIncrementEpoch(); - producerNotifyConsumers(node); -} -/** -* @license -* Copyright 2024 Bloomberg Finance L.P. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -const NODE = Symbol("node"); -var Signal; -((Signal2) => { - var _a, _brand, _b, _brand2; - class State { - constructor(initialValue, options = {}) { - __privateAdd(this, _brand); - __publicField(this, _a); - const node = createSignal(initialValue)[SIGNAL]; - this[NODE] = node; - node.wrapper = this; - if (options) { - const equals = options.equals; - if (equals) node.equal = equals; - node.watched = options[Signal2.subtle.watched]; - node.unwatched = options[Signal2.subtle.unwatched]; - } - } - get() { - if (!(0, Signal2.isState)(this)) throw new TypeError("Wrong receiver type for Signal.State.prototype.get"); - return signalGetFn.call(this[NODE]); - } - set(newValue) { - if (!(0, Signal2.isState)(this)) throw new TypeError("Wrong receiver type for Signal.State.prototype.set"); - if (isInNotificationPhase()) throw new Error("Writes to signals not permitted during Watcher callback"); - const ref = this[NODE]; - signalSetFn(ref, newValue); - } - } - _a = NODE; - _brand = /* @__PURE__ */ new WeakSet(); - Signal2.isState = (s) => typeof s === "object" && __privateIn(_brand, s); - Signal2.State = State; - class Computed { - constructor(computation, options) { - __privateAdd(this, _brand2); - __publicField(this, _b); - const node = createComputed(computation)[SIGNAL]; - node.consumerAllowSignalWrites = true; - this[NODE] = node; - node.wrapper = this; - if (options) { - const equals = options.equals; - if (equals) node.equal = equals; - node.watched = options[Signal2.subtle.watched]; - node.unwatched = options[Signal2.subtle.unwatched]; - } - } - get() { - if (!(0, Signal2.isComputed)(this)) throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get"); - return computedGet(this[NODE]); - } - } - _b = NODE; - _brand2 = /* @__PURE__ */ new WeakSet(); - Signal2.isComputed = (c) => typeof c === "object" && __privateIn(_brand2, c); - Signal2.Computed = Computed; - ((subtle2) => { - var _a2, _brand3, _assertSignals, assertSignals_fn; - function untrack(cb) { - let output; - let prevActiveConsumer = null; - try { - prevActiveConsumer = setActiveConsumer(null); - output = cb(); - } finally { - setActiveConsumer(prevActiveConsumer); - } - return output; - } - subtle2.untrack = untrack; - function introspectSources(sink) { - var _a3; - if (!(0, Signal2.isComputed)(sink) && !(0, Signal2.isWatcher)(sink)) throw new TypeError("Called introspectSources without a Computed or Watcher argument"); - return ((_a3 = sink[NODE].producerNode) == null ? void 0 : _a3.map((n) => n.wrapper)) ?? []; - } - subtle2.introspectSources = introspectSources; - function introspectSinks(signal) { - var _a3; - if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) throw new TypeError("Called introspectSinks without a Signal argument"); - return ((_a3 = signal[NODE].liveConsumerNode) == null ? void 0 : _a3.map((n) => n.wrapper)) ?? []; - } - subtle2.introspectSinks = introspectSinks; - function hasSinks(signal) { - if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) throw new TypeError("Called hasSinks without a Signal argument"); - const liveConsumerNode = signal[NODE].liveConsumerNode; - if (!liveConsumerNode) return false; - return liveConsumerNode.length > 0; - } - subtle2.hasSinks = hasSinks; - function hasSources(signal) { - if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isWatcher)(signal)) throw new TypeError("Called hasSources without a Computed or Watcher argument"); - const producerNode = signal[NODE].producerNode; - if (!producerNode) return false; - return producerNode.length > 0; - } - subtle2.hasSources = hasSources; - class Watcher { - constructor(notify) { - __privateAdd(this, _brand3); - __privateAdd(this, _assertSignals); - __publicField(this, _a2); - let node = Object.create(REACTIVE_NODE); - node.wrapper = this; - node.consumerMarkedDirty = notify; - node.consumerIsAlwaysLive = true; - node.consumerAllowSignalWrites = false; - node.producerNode = []; - this[NODE] = node; - } - watch(...signals) { - if (!(0, Signal2.isWatcher)(this)) throw new TypeError("Called unwatch without Watcher receiver"); - __privateMethod(this, _assertSignals, assertSignals_fn).call(this, signals); - const node = this[NODE]; - node.dirty = false; - const prev = setActiveConsumer(node); - for (const signal of signals) producerAccessed(signal[NODE]); - setActiveConsumer(prev); - } - unwatch(...signals) { - if (!(0, Signal2.isWatcher)(this)) throw new TypeError("Called unwatch without Watcher receiver"); - __privateMethod(this, _assertSignals, assertSignals_fn).call(this, signals); - const node = this[NODE]; - assertConsumerNode(node); - for (let i = node.producerNode.length - 1; i >= 0; i--) if (signals.includes(node.producerNode[i].wrapper)) { - producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); - const lastIdx = node.producerNode.length - 1; - node.producerNode[i] = node.producerNode[lastIdx]; - node.producerIndexOfThis[i] = node.producerIndexOfThis[lastIdx]; - node.producerNode.length--; - node.producerIndexOfThis.length--; - node.nextProducerIndex--; - if (i < node.producerNode.length) { - const idxConsumer = node.producerIndexOfThis[i]; - const producer = node.producerNode[i]; - assertProducerNode(producer); - producer.liveConsumerIndexOfThis[idxConsumer] = i; - } - } - } - getPending() { - if (!(0, Signal2.isWatcher)(this)) throw new TypeError("Called getPending without Watcher receiver"); - return this[NODE].producerNode.filter((n) => n.dirty).map((n) => n.wrapper); - } - } - _a2 = NODE; - _brand3 = /* @__PURE__ */ new WeakSet(); - _assertSignals = /* @__PURE__ */ new WeakSet(); - assertSignals_fn = function(signals) { - for (const signal of signals) if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) throw new TypeError("Called watch/unwatch without a Computed or State argument"); - }; - Signal2.isWatcher = (w) => __privateIn(_brand3, w); - subtle2.Watcher = Watcher; - function currentComputed() { - var _a3; - return (_a3 = getActiveConsumer()) == null ? void 0 : _a3.wrapper; - } - subtle2.currentComputed = currentComputed; - subtle2.watched = Symbol("watched"); - subtle2.unwatched = Symbol("unwatched"); - })(Signal2.subtle || (Signal2.subtle = {})); -})(Signal || (Signal = {})); -/** -* equality check here is always false so that we can dirty the storage -* via setting to _anything_ -* -* -* This is for a pattern where we don't *directly* use signals to back the values used in collections -* so that instanceof checks and getters and other native features "just work" without having -* to do nested proxying. -* -* (though, see deep.ts for nested / deep behavior) -*/ -const createStorage = (initial = null) => new Signal.State(initial, { equals: () => false }); -const ARRAY_GETTER_METHODS = new Set([ - Symbol.iterator, - "concat", - "entries", - "every", - "filter", - "find", - "findIndex", - "flat", - "flatMap", - "forEach", - "includes", - "indexOf", - "join", - "keys", - "lastIndexOf", - "map", - "reduce", - "reduceRight", - "slice", - "some", - "values" -]); -const ARRAY_WRITE_THEN_READ_METHODS = new Set([ - "fill", - "push", - "unshift" -]); -function convertToInt(prop) { - if (typeof prop === "symbol") return null; - const num = Number(prop); - if (isNaN(num)) return null; - return num % 1 === 0 ? num : null; -} -var SignalArray = class SignalArray { - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - */ - /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - static from(iterable, mapfn, thisArg) { - return mapfn ? new SignalArray(Array.from(iterable, mapfn, thisArg)) : new SignalArray(Array.from(iterable)); - } - static of(...arr) { - return new SignalArray(arr); - } - constructor(arr = []) { - let clone = arr.slice(); - let self = this; - let boundFns = /* @__PURE__ */ new Map(); - /** - Flag to track whether we have *just* intercepted a call to `.push()` or - `.unshift()`, since in those cases (and only those cases!) the `Array` - itself checks `.length` to return from the function call. - */ - let nativelyAccessingLengthFromPushOrUnshift = false; - return new Proxy(clone, { - get(target, prop) { - let index = convertToInt(prop); - if (index !== null) { - self.#readStorageFor(index); - self.#collection.get(); - return target[index]; - } - if (prop === "length") { - if (nativelyAccessingLengthFromPushOrUnshift) nativelyAccessingLengthFromPushOrUnshift = false; - else self.#collection.get(); - return target[prop]; - } - if (ARRAY_WRITE_THEN_READ_METHODS.has(prop)) nativelyAccessingLengthFromPushOrUnshift = true; - if (ARRAY_GETTER_METHODS.has(prop)) { - let fn = boundFns.get(prop); - if (fn === void 0) { - fn = (...args) => { - self.#collection.get(); - return target[prop](...args); - }; - boundFns.set(prop, fn); - } - return fn; - } - return target[prop]; - }, - set(target, prop, value) { - target[prop] = value; - let index = convertToInt(prop); - if (index !== null) { - self.#dirtyStorageFor(index); - self.#collection.set(null); - } else if (prop === "length") self.#collection.set(null); - return true; - }, - getPrototypeOf() { - return SignalArray.prototype; - } - }); - } - #collection = createStorage(); - #storages = /* @__PURE__ */ new Map(); - #readStorageFor(index) { - let storage = this.#storages.get(index); - if (storage === void 0) { - storage = createStorage(); - this.#storages.set(index, storage); - } - storage.get(); - } - #dirtyStorageFor(index) { - const storage = this.#storages.get(index); - if (storage) storage.set(null); - } -}; -Object.setPrototypeOf(SignalArray.prototype, Array.prototype); -var SignalMap = class { - collection = createStorage(); - storages = /* @__PURE__ */ new Map(); - vals; - readStorageFor(key) { - const { storages } = this; - let storage = storages.get(key); - if (storage === void 0) { - storage = createStorage(); - storages.set(key, storage); - } - storage.get(); - } - dirtyStorageFor(key) { - const storage = this.storages.get(key); - if (storage) storage.set(null); - } - constructor(existing) { - this.vals = existing ? new Map(existing) : /* @__PURE__ */ new Map(); - } - get(key) { - this.readStorageFor(key); - return this.vals.get(key); - } - has(key) { - this.readStorageFor(key); - return this.vals.has(key); - } - entries() { - this.collection.get(); - return this.vals.entries(); - } - keys() { - this.collection.get(); - return this.vals.keys(); - } - values() { - this.collection.get(); - return this.vals.values(); - } - forEach(fn) { - this.collection.get(); - this.vals.forEach(fn); - } - get size() { - this.collection.get(); - return this.vals.size; - } - [Symbol.iterator]() { - this.collection.get(); - return this.vals[Symbol.iterator](); - } - get [Symbol.toStringTag]() { - return this.vals[Symbol.toStringTag]; - } - set(key, value) { - this.dirtyStorageFor(key); - this.collection.set(null); - this.vals.set(key, value); - return this; - } - delete(key) { - this.dirtyStorageFor(key); - this.collection.set(null); - return this.vals.delete(key); - } - clear() { - this.storages.forEach((s) => s.set(null)); - this.collection.set(null); - this.vals.clear(); - } -}; -Object.setPrototypeOf(SignalMap.prototype, Map.prototype); -/** -* Create a reactive Object, backed by Signals, using a Proxy. -* This allows dynamic creation and deletion of signals using the object primitive -* APIs that most folks are familiar with -- the only difference is instantiation. -* ```js -* const obj = new SignalObject({ foo: 123 }); -* -* obj.foo // 123 -* obj.foo = 456 -* obj.foo // 456 -* obj.bar = 2 -* obj.bar // 2 -* ``` -*/ -const SignalObject = class SignalObjectImpl { - static fromEntries(entries) { - return new SignalObjectImpl(Object.fromEntries(entries)); - } - #storages = /* @__PURE__ */ new Map(); - #collection = createStorage(); - constructor(obj = {}) { - let proto = Object.getPrototypeOf(obj); - let descs = Object.getOwnPropertyDescriptors(obj); - let clone = Object.create(proto); - for (let prop in descs) Object.defineProperty(clone, prop, descs[prop]); - let self = this; - return new Proxy(clone, { - get(target, prop, receiver) { - self.#readStorageFor(prop); - return Reflect.get(target, prop, receiver); - }, - has(target, prop) { - self.#readStorageFor(prop); - return prop in target; - }, - ownKeys(target) { - self.#collection.get(); - return Reflect.ownKeys(target); - }, - set(target, prop, value, receiver) { - let result = Reflect.set(target, prop, value, receiver); - self.#dirtyStorageFor(prop); - self.#dirtyCollection(); - return result; - }, - deleteProperty(target, prop) { - if (prop in target) { - delete target[prop]; - self.#dirtyStorageFor(prop); - self.#dirtyCollection(); - } - return true; - }, - getPrototypeOf() { - return SignalObjectImpl.prototype; - } - }); - } - #readStorageFor(key) { - let storage = this.#storages.get(key); - if (storage === void 0) { - storage = createStorage(); - this.#storages.set(key, storage); - } - storage.get(); - } - #dirtyStorageFor(key) { - const storage = this.#storages.get(key); - if (storage) storage.set(null); - } - #dirtyCollection() { - this.#collection.set(null); - } -}; -var SignalSet = class { - collection = createStorage(); - storages = /* @__PURE__ */ new Map(); - vals; - storageFor(key) { - const storages = this.storages; - let storage = storages.get(key); - if (storage === void 0) { - storage = createStorage(); - storages.set(key, storage); - } - return storage; - } - dirtyStorageFor(key) { - const storage = this.storages.get(key); - if (storage) storage.set(null); - } - constructor(existing) { - this.vals = new Set(existing); - } - has(value) { - this.storageFor(value).get(); - return this.vals.has(value); - } - entries() { - this.collection.get(); - return this.vals.entries(); - } - keys() { - this.collection.get(); - return this.vals.keys(); - } - values() { - this.collection.get(); - return this.vals.values(); - } - forEach(fn) { - this.collection.get(); - this.vals.forEach(fn); - } - get size() { - this.collection.get(); - return this.vals.size; - } - [Symbol.iterator]() { - this.collection.get(); - return this.vals[Symbol.iterator](); - } - get [Symbol.toStringTag]() { - return this.vals[Symbol.toStringTag]; - } - add(value) { - this.dirtyStorageFor(value); - this.collection.set(null); - this.vals.add(value); - return this; - } - delete(value) { - this.dirtyStorageFor(value); - this.collection.set(null); - return this.vals.delete(value); - } - clear() { - this.storages.forEach((s) => s.set(null)); - this.collection.set(null); - this.vals.clear(); - } -}; -Object.setPrototypeOf(SignalSet.prototype, Set.prototype); -function create() { - return new A2uiMessageProcessor({ - arrayCtor: SignalArray, - mapCtor: SignalMap, - objCtor: SignalObject, - setCtor: SignalSet - }); -} -const Data = { - createSignalA2uiMessageProcessor: create, - A2uiMessageProcessor, - Guards: guards_exports -}; -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const t$1 = (t) => (e, o) => { - void 0 !== o ? o.addInitializer(() => { - customElements.define(t, e); - }) : customElements.define(t, e); -}; -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const o$9 = { - attribute: !0, - type: String, - converter: u$3, - reflect: !1, - hasChanged: f$3 -}, r$7 = (t = o$9, e, r) => { - const { kind: n, metadata: i } = r; - let s = globalThis.litPropertyMetadata.get(i); - if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) { - const { name: o } = r; - return { - set(r) { - const n = e.get.call(this); - e.set.call(this, r), this.requestUpdate(o, n, t, !0, r); - }, - init(e) { - return void 0 !== e && this.C(o, void 0, t, e), e; - } - }; - } - if ("setter" === n) { - const { name: o } = r; - return function(r) { - const n = this[o]; - e.call(this, r), this.requestUpdate(o, n, t, !0, r); - }; - } - throw Error("Unsupported decorator location: " + n); -}; -function n$6(t) { - return (e, o) => "object" == typeof o ? r$7(t, e, o) : ((t, e, o) => { - const r = e.hasOwnProperty(o); - return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0; - })(t, e, o); -} -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ function r$6(r) { - return n$6({ - ...r, - state: !0, - attribute: !1 - }); -} -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -const e$6 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c); -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ function e$5(e, r) { - return (n, s, i) => { - const o = (t) => t.renderRoot?.querySelector(e) ?? null; - if (r) { - const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => { - const t = Symbol(); - return { - get() { - return this[t]; - }, - set(e) { - this[t] = e; - } - }; - })(); - return e$6(n, s, { get() { - let t = e.call(this); - return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t; - } }); - } - return e$6(n, s, { get() { - return o(this); - } }); - }; -} -/** -* @license -* Copyright 2023 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ let i$2 = !1; -const s$1 = new Signal.subtle.Watcher(() => { - i$2 || (i$2 = !0, queueMicrotask(() => { - i$2 = !1; - for (const t of s$1.getPending()) t.get(); - s$1.watch(); - })); -}), h$3 = Symbol("SignalWatcherBrand"), e$3 = new FinalizationRegistry((i) => { - i.unwatch(...Signal.subtle.introspectSources(i)); -}), n$4 = /* @__PURE__ */ new WeakMap(); -function o$7(i) { - return !0 === i[h$3] ? (console.warn("SignalWatcher should not be applied to the same class more than once."), i) : class extends i { - constructor() { - super(...arguments), this._$St = /* @__PURE__ */ new Map(), this._$So = new Signal.State(0), this._$Si = !1; - } - _$Sl() { - var t, i; - const s = [], h = []; - this._$St.forEach((t, i) => { - ((null == t ? void 0 : t.beforeUpdate) ? s : h).push(i); - }); - const e = null === (t = this.h) || void 0 === t ? void 0 : t.getPending().filter((t) => t !== this._$Su && !this._$St.has(t)); - s.forEach((t) => t.get()), null === (i = this._$Su) || void 0 === i || i.get(), e.forEach((t) => t.get()), h.forEach((t) => t.get()); - } - _$Sv() { - this.isUpdatePending || queueMicrotask(() => { - this.isUpdatePending || this._$Sl(); - }); - } - _$S_() { - if (void 0 !== this.h) return; - this._$Su = new Signal.Computed(() => { - this._$So.get(), super.performUpdate(); - }); - const i = this.h = new Signal.subtle.Watcher(function() { - const t = n$4.get(this); - void 0 !== t && (!1 === t._$Si && (new Set(this.getPending()).has(t._$Su) ? t.requestUpdate() : t._$Sv()), this.watch()); - }); - n$4.set(i, this), e$3.register(this, i), i.watch(this._$Su), i.watch(...Array.from(this._$St).map(([t]) => t)); - } - _$Sp() { - if (void 0 === this.h) return; - let i = !1; - this.h.unwatch(...Signal.subtle.introspectSources(this.h).filter((t) => { - var s; - const h = !0 !== (null === (s = this._$St.get(t)) || void 0 === s ? void 0 : s.manualDispose); - return h && this._$St.delete(t), i || (i = !h), h; - })), i || (this._$Su = void 0, this.h = void 0, this._$St.clear()); - } - updateEffect(i, s) { - var h; - this._$S_(); - const e = new Signal.Computed(() => { - i(); - }); - return this.h.watch(e), this._$St.set(e, s), null !== (h = null == s ? void 0 : s.beforeUpdate) && void 0 !== h && h ? Signal.subtle.untrack(() => e.get()) : this.updateComplete.then(() => Signal.subtle.untrack(() => e.get())), () => { - this._$St.delete(e), this.h.unwatch(e), !1 === this.isConnected && this._$Sp(); - }; - } - performUpdate() { - this.isUpdatePending && (this._$S_(), this._$Si = !0, this._$So.set(this._$So.get() + 1), this._$Si = !1, this._$Sl()); - } - connectedCallback() { - super.connectedCallback(), this.requestUpdate(); - } - disconnectedCallback() { - super.disconnectedCallback(), queueMicrotask(() => { - !1 === this.isConnected && this._$Sp(); - }); - } - }; -} -/** -* @license -* Copyright 2017 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const s = (i, t) => { - const e = i._$AN; - if (void 0 === e) return !1; - for (const i of e) i._$AO?.(t, !1), s(i, t); - return !0; -}, o$6 = (i) => { - let t, e; - do { - if (void 0 === (t = i._$AM)) break; - e = t._$AN, e.delete(i), i = t; - } while (0 === e?.size); -}, r$3 = (i) => { - for (let t; t = i._$AM; i = t) { - let e = t._$AN; - if (void 0 === e) t._$AN = e = /* @__PURE__ */ new Set(); - else if (e.has(i)) break; - e.add(i), c(t); - } -}; -function h$2(i) { - void 0 !== this._$AN ? (o$6(this), this._$AM = i, r$3(this)) : this._$AM = i; -} -function n$3(i, t = !1, e = 0) { - const r = this._$AH, h = this._$AN; - if (void 0 !== h && 0 !== h.size) if (t) if (Array.isArray(r)) for (let i = e; i < r.length; i++) s(r[i], !1), o$6(r[i]); - else null != r && (s(r, !1), o$6(r)); - else s(this, i); -} -const c = (i) => { - i.type == t$4.CHILD && (i._$AP ??= n$3, i._$AQ ??= h$2); -}; -var f = class extends i$5 { - constructor() { - super(...arguments), this._$AN = void 0; - } - _$AT(i, t, e) { - super._$AT(i, t, e), r$3(this), this.isConnected = i._$AU; - } - _$AO(i, t = !0) { - i !== this.isConnected && (this.isConnected = i, i ? this.reconnected?.() : this.disconnected?.()), t && (s(this, i), o$6(this)); - } - setValue(t) { - if (r$8(this._$Ct)) this._$Ct._$AI(t, this); - else { - const i = [...this._$Ct._$AH]; - i[this._$Ci] = t, this._$Ct._$AI(i, this, 0); - } - } - disconnected() {} - reconnected() {} -}; -/** -* @license -* Copyright 2023 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -let o$5 = !1; -const n$2 = new Signal.subtle.Watcher(async () => { - o$5 || (o$5 = !0, queueMicrotask(() => { - o$5 = !1; - for (const i of n$2.getPending()) i.get(); - n$2.watch(); - })); -}); -var r$2 = class extends f { - _$S_() { - var i, t; - void 0 === this._$Sm && (this._$Sj = new Signal.Computed(() => { - var i; - const t = null === (i = this._$SW) || void 0 === i ? void 0 : i.get(); - return this.setValue(t), t; - }), this._$Sm = null !== (t = null === (i = this._$Sk) || void 0 === i ? void 0 : i.h) && void 0 !== t ? t : n$2, this._$Sm.watch(this._$Sj), Signal.subtle.untrack(() => { - var i; - return null === (i = this._$Sj) || void 0 === i ? void 0 : i.get(); - })); - } - _$Sp() { - void 0 !== this._$Sm && (this._$Sm.unwatch(this._$SW), this._$Sm = void 0); - } - render(i) { - return Signal.subtle.untrack(() => i.get()); - } - update(i, [t]) { - var o, n; - return null !== (o = this._$Sk) && void 0 !== o || (this._$Sk = null === (n = i.options) || void 0 === n ? void 0 : n.host), t !== this._$SW && void 0 !== this._$SW && this._$Sp(), this._$SW = t, this._$S_(), Signal.subtle.untrack(() => this._$SW.get()); - } - disconnected() { - this._$Sp(); - } - reconnected() { - this._$S_(); - } -}; -const h$1 = e$10(r$2), m = (o) => (t, ...m) => o(t, ...m.map((o) => o instanceof Signal.State || o instanceof Signal.Computed ? h$1(o) : o)); -m(b); -m(w); -Signal.State; -Signal.Computed; -/** -* @license -* Copyright 2021 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ -function* o$3(o, f) { - if (void 0 !== o) { - let i = 0; - for (const t of o) yield f(t, i++); - } -} -let pending = false; -let watcher = new Signal.subtle.Watcher(() => { - if (!pending) { - pending = true; - queueMicrotask(() => { - pending = false; - flushPending(); - }); - } -}); -function flushPending() { - for (const signal of watcher.getPending()) signal.get(); - watcher.watch(); -} -/** -* ⚠️ WARNING: Nothing unwatches ⚠️ -* This will produce a memory leak. -*/ -function effect(cb) { - let c = new Signal.Computed(() => cb()); - watcher.watch(c); - c.get(); - return () => { - watcher.unwatch(c); - }; -} -const themeContext = n$7("A2UITheme"); -const structuralStyles = r$11(structuralStyles$1); -var ComponentRegistry = class { - constructor() { - this.registry = /* @__PURE__ */ new Map(); - } - register(typeName, constructor, tagName) { - if (!/^[a-zA-Z0-9]+$/.test(typeName)) throw new Error(`[Registry] Invalid typeName '${typeName}'. Must be alphanumeric.`); - this.registry.set(typeName, constructor); - const actualTagName = tagName || `a2ui-custom-${typeName.toLowerCase()}`; - const existingName = customElements.getName(constructor); - if (existingName) { - if (existingName !== actualTagName) throw new Error(`Component ${typeName} is already registered as ${existingName}, but requested as ${actualTagName}.`); - return; - } - if (!customElements.get(actualTagName)) customElements.define(actualTagName, constructor); - } - get(typeName) { - return this.registry.get(typeName); - } -}; -const componentRegistry = new ComponentRegistry(); -var __runInitializers$19 = function(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - return useValue ? value : void 0; -}; -var __esDecorate$19 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { - get: descriptor.get, - set: descriptor.set - } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -let Root = (() => { - let _classDecorators = [t$1("a2ui-root")]; - let _classDescriptor; - let _classExtraInitializers = []; - let _classThis; - let _classSuper = o$7(i$6); - let _instanceExtraInitializers = []; - let _surfaceId_decorators; - let _surfaceId_initializers = []; - let _surfaceId_extraInitializers = []; - let _component_decorators; - let _component_initializers = []; - let _component_extraInitializers = []; - let _theme_decorators; - let _theme_initializers = []; - let _theme_extraInitializers = []; - let _childComponents_decorators; - let _childComponents_initializers = []; - let _childComponents_extraInitializers = []; - let _processor_decorators; - let _processor_initializers = []; - let _processor_extraInitializers = []; - let _dataContextPath_decorators; - let _dataContextPath_initializers = []; - let _dataContextPath_extraInitializers = []; - let _enableCustomElements_decorators; - let _enableCustomElements_initializers = []; - let _enableCustomElements_extraInitializers = []; - let _set_weight_decorators; - var Root = class extends _classSuper { - static { - _classThis = this; - } - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; - _surfaceId_decorators = [n$6()]; - _component_decorators = [n$6()]; - _theme_decorators = [c$1({ context: themeContext })]; - _childComponents_decorators = [n$6({ attribute: false })]; - _processor_decorators = [n$6({ attribute: false })]; - _dataContextPath_decorators = [n$6()]; - _enableCustomElements_decorators = [n$6()]; - _set_weight_decorators = [n$6()]; - __esDecorate$19(this, null, _surfaceId_decorators, { - kind: "accessor", - name: "surfaceId", - static: false, - private: false, - access: { - has: (obj) => "surfaceId" in obj, - get: (obj) => obj.surfaceId, - set: (obj, value) => { - obj.surfaceId = value; - } - }, - metadata: _metadata - }, _surfaceId_initializers, _surfaceId_extraInitializers); - __esDecorate$19(this, null, _component_decorators, { - kind: "accessor", - name: "component", - static: false, - private: false, - access: { - has: (obj) => "component" in obj, - get: (obj) => obj.component, - set: (obj, value) => { - obj.component = value; - } - }, - metadata: _metadata - }, _component_initializers, _component_extraInitializers); - __esDecorate$19(this, null, _theme_decorators, { - kind: "accessor", - name: "theme", - static: false, - private: false, - access: { - has: (obj) => "theme" in obj, - get: (obj) => obj.theme, - set: (obj, value) => { - obj.theme = value; - } - }, - metadata: _metadata - }, _theme_initializers, _theme_extraInitializers); - __esDecorate$19(this, null, _childComponents_decorators, { - kind: "accessor", - name: "childComponents", - static: false, - private: false, - access: { - has: (obj) => "childComponents" in obj, - get: (obj) => obj.childComponents, - set: (obj, value) => { - obj.childComponents = value; - } - }, - metadata: _metadata - }, _childComponents_initializers, _childComponents_extraInitializers); - __esDecorate$19(this, null, _processor_decorators, { - kind: "accessor", - name: "processor", - static: false, - private: false, - access: { - has: (obj) => "processor" in obj, - get: (obj) => obj.processor, - set: (obj, value) => { - obj.processor = value; - } - }, - metadata: _metadata - }, _processor_initializers, _processor_extraInitializers); - __esDecorate$19(this, null, _dataContextPath_decorators, { - kind: "accessor", - name: "dataContextPath", - static: false, - private: false, - access: { - has: (obj) => "dataContextPath" in obj, - get: (obj) => obj.dataContextPath, - set: (obj, value) => { - obj.dataContextPath = value; - } - }, - metadata: _metadata - }, _dataContextPath_initializers, _dataContextPath_extraInitializers); - __esDecorate$19(this, null, _enableCustomElements_decorators, { - kind: "accessor", - name: "enableCustomElements", - static: false, - private: false, - access: { - has: (obj) => "enableCustomElements" in obj, - get: (obj) => obj.enableCustomElements, - set: (obj, value) => { - obj.enableCustomElements = value; - } - }, - metadata: _metadata - }, _enableCustomElements_initializers, _enableCustomElements_extraInitializers); - __esDecorate$19(this, null, _set_weight_decorators, { - kind: "setter", - name: "weight", - static: false, - private: false, - access: { - has: (obj) => "weight" in obj, - set: (obj, value) => { - obj.weight = value; - } - }, - metadata: _metadata - }, null, _instanceExtraInitializers); - __esDecorate$19(null, _classDescriptor = { value: _classThis }, _classDecorators, { - kind: "class", - name: _classThis.name, - metadata: _metadata - }, null, _classExtraInitializers); - Root = _classThis = _classDescriptor.value; - if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { - enumerable: true, - configurable: true, - writable: true, - value: _metadata - }); - } - #surfaceId_accessor_storage = (__runInitializers$19(this, _instanceExtraInitializers), __runInitializers$19(this, _surfaceId_initializers, null)); - get surfaceId() { - return this.#surfaceId_accessor_storage; - } - set surfaceId(value) { - this.#surfaceId_accessor_storage = value; - } - #component_accessor_storage = (__runInitializers$19(this, _surfaceId_extraInitializers), __runInitializers$19(this, _component_initializers, null)); - get component() { - return this.#component_accessor_storage; - } - set component(value) { - this.#component_accessor_storage = value; - } - #theme_accessor_storage = (__runInitializers$19(this, _component_extraInitializers), __runInitializers$19(this, _theme_initializers, void 0)); - get theme() { - return this.#theme_accessor_storage; - } - set theme(value) { - this.#theme_accessor_storage = value; - } - #childComponents_accessor_storage = (__runInitializers$19(this, _theme_extraInitializers), __runInitializers$19(this, _childComponents_initializers, null)); - get childComponents() { - return this.#childComponents_accessor_storage; - } - set childComponents(value) { - this.#childComponents_accessor_storage = value; - } - #processor_accessor_storage = (__runInitializers$19(this, _childComponents_extraInitializers), __runInitializers$19(this, _processor_initializers, null)); - get processor() { - return this.#processor_accessor_storage; - } - set processor(value) { - this.#processor_accessor_storage = value; - } - #dataContextPath_accessor_storage = (__runInitializers$19(this, _processor_extraInitializers), __runInitializers$19(this, _dataContextPath_initializers, "")); - get dataContextPath() { - return this.#dataContextPath_accessor_storage; - } - set dataContextPath(value) { - this.#dataContextPath_accessor_storage = value; - } - #enableCustomElements_accessor_storage = (__runInitializers$19(this, _dataContextPath_extraInitializers), __runInitializers$19(this, _enableCustomElements_initializers, false)); - get enableCustomElements() { - return this.#enableCustomElements_accessor_storage; - } - set enableCustomElements(value) { - this.#enableCustomElements_accessor_storage = value; - } - set weight(weight) { - this.#weight = weight; - this.style.setProperty("--weight", `${weight}`); - } - get weight() { - return this.#weight; - } - #weight = (__runInitializers$19(this, _enableCustomElements_extraInitializers), 1); - static { - this.styles = [structuralStyles, i$9` - :host { - display: flex; - flex-direction: column; - gap: 8px; - max-height: 80%; - } - `]; - } - /** - * Holds the cleanup function for our effect. - * We need this to stop the effect when the component is disconnected. - */ - #lightDomEffectDisposer = null; - willUpdate(changedProperties) { - if (changedProperties.has("childComponents")) { - if (this.#lightDomEffectDisposer) this.#lightDomEffectDisposer(); - this.#lightDomEffectDisposer = effect(() => { - const allChildren = this.childComponents ?? null; - D(this.renderComponentTree(allChildren), this, { host: this }); - }); - } - } - /** - * Clean up the effect when the component is removed from the DOM. - */ - disconnectedCallback() { - super.disconnectedCallback(); - if (this.#lightDomEffectDisposer) this.#lightDomEffectDisposer(); - } - /** - * Turns the SignalMap into a renderable TemplateResult for Lit. - */ - renderComponentTree(components) { - if (!components) return A; - if (!Array.isArray(components)) return A; - return b` ${o$3(components, (component) => { - if (this.enableCustomElements) { - const elCtor = componentRegistry.get(component.type) || customElements.get(component.type); - if (elCtor) { - const node = component; - const el = new elCtor(); - el.id = node.id; - if (node.slotName) el.slot = node.slotName; - el.component = node; - el.weight = node.weight ?? "initial"; - el.processor = this.processor; - el.surfaceId = this.surfaceId; - el.dataContextPath = node.dataContextPath ?? "/"; - for (const [prop, val] of Object.entries(component.properties)) el[prop] = val; - return b`${el}`; - } - } - switch (component.type) { - case "List": { - const node = component; - const childComponents = node.properties.children; - return b``; - } - case "Card": { - const node = component; - let childComponents = node.properties.children; - if (!childComponents && node.properties.child) childComponents = [node.properties.child]; - return b``; - } - case "Column": { - const node = component; - return b``; - } - case "Row": { - const node = component; - return b``; - } - case "Image": { - const node = component; - return b``; - } - case "Icon": { - const node = component; - return b``; - } - case "AudioPlayer": { - const node = component; - return b``; - } - case "Button": { - const node = component; - return b``; - } - case "Text": { - const node = component; - return b``; - } - case "CheckBox": { - const node = component; - return b``; - } - case "DateTimeInput": { - const node = component; - return b``; - } - case "Divider": { - const node = component; - return b``; - } - case "MultipleChoice": { - const node = component; - return b``; - } - case "Slider": { - const node = component; - return b``; - } - case "TextField": { - const node = component; - return b``; - } - case "Video": { - const node = component; - return b``; - } - case "Tabs": { - const node = component; - const titles = []; - const childComponents = []; - if (node.properties.tabItems) for (const item of node.properties.tabItems) { - titles.push(item.title); - childComponents.push(item.child); - } - return b``; - } - case "Modal": { - const node = component; - const childComponents = [node.properties.entryPointChild, node.properties.contentChild]; - node.properties.entryPointChild.slotName = "entry"; - return b``; - } - default: return this.renderCustomComponent(component); - } - })}`; - } - renderCustomComponent(component) { - if (!this.enableCustomElements) return; - const node = component; - const elCtor = componentRegistry.get(component.type) || customElements.get(component.type); - if (!elCtor) return b`Unknown element ${component.type}`; - const el = new elCtor(); - el.id = node.id; - if (node.slotName) el.slot = node.slotName; - el.component = node; - el.weight = node.weight ?? "initial"; - el.processor = this.processor; - el.surfaceId = this.surfaceId; - el.dataContextPath = node.dataContextPath ?? "/"; - for (const [prop, val] of Object.entries(component.properties)) el[prop] = val; - return b`${el}`; - } - render() { - return b``; - } - static { - __runInitializers$19(_classThis, _classExtraInitializers); - } - }; - return _classThis; -})(); -/** -* @license -* Copyright 2018 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const e$2 = e$10(class extends i$5 { - constructor(t) { - if (super(t), t.type !== t$4.ATTRIBUTE || "class" !== t.name || t.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); - } - render(t) { - return " " + Object.keys(t).filter((s) => t[s]).join(" ") + " "; - } - update(s, [i]) { - if (void 0 === this.st) { - this.st = /* @__PURE__ */ new Set(), void 0 !== s.strings && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((t) => "" !== t))); - for (const t in i) i[t] && !this.nt?.has(t) && this.st.add(t); - return this.render(i); - } - const r = s.element.classList; - for (const t of this.st) t in i || (r.remove(t), this.st.delete(t)); - for (const t in i) { - const s = !!i[t]; - s === this.st.has(t) || this.nt?.has(t) || (s ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t))); - } - return E; - } -}); -/** -* @license -* Copyright 2018 Google LLC -* SPDX-License-Identifier: BSD-3-Clause -*/ const n$1 = "important", i = " !" + n$1, o$2 = e$10(class extends i$5 { - constructor(t) { - if (super(t), t.type !== t$4.ATTRIBUTE || "style" !== t.name || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."); - } - render(t) { - return Object.keys(t).reduce((e, r) => { - const s = t[r]; - return null == s ? e : e + `${r = r.includes("-") ? r : r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`; - }, ""); - } - update(e, [r]) { - const { style: s } = e.element; - if (void 0 === this.ft) return this.ft = new Set(Object.keys(r)), this.render(r); - for (const t of this.ft) null == r[t] && (this.ft.delete(t), t.includes("-") ? s.removeProperty(t) : s[t] = null); - for (const t in r) { - const e = r[t]; - if (null != e) { - this.ft.add(t); - const r = "string" == typeof e && e.endsWith(i); - t.includes("-") || r ? s.setProperty(t, r ? e.slice(0, -11) : e, r ? n$1 : "") : s[t] = e; - } - } - return E; - } -}); -var __esDecorate$18 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { - get: descriptor.get, - set: descriptor.set - } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -var __runInitializers$18 = function(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - return useValue ? value : void 0; -}; -(() => { - let _classDecorators = [t$1("a2ui-audioplayer")]; - let _classDescriptor; - let _classExtraInitializers = []; - let _classThis; - let _classSuper = Root; - let _url_decorators; - let _url_initializers = []; - let _url_extraInitializers = []; - var Audio = class extends _classSuper { - static { - _classThis = this; - } - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; - _url_decorators = [n$6()]; - __esDecorate$18(this, null, _url_decorators, { - kind: "accessor", - name: "url", - static: false, - private: false, - access: { - has: (obj) => "url" in obj, - get: (obj) => obj.url, - set: (obj, value) => { - obj.url = value; - } - }, - metadata: _metadata - }, _url_initializers, _url_extraInitializers); - __esDecorate$18(null, _classDescriptor = { value: _classThis }, _classDecorators, { - kind: "class", - name: _classThis.name, - metadata: _metadata - }, null, _classExtraInitializers); - Audio = _classThis = _classDescriptor.value; - if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { - enumerable: true, - configurable: true, - writable: true, - value: _metadata - }); - } - #url_accessor_storage = __runInitializers$18(this, _url_initializers, null); - get url() { - return this.#url_accessor_storage; - } - set url(value) { - this.#url_accessor_storage = value; - } - static { - this.styles = [structuralStyles, i$9` - * { - box-sizing: border-box; - } - - :host { - display: block; - flex: var(--weight); - min-height: 0; - overflow: auto; - } - - audio { - display: block; - width: 100%; - } - `]; - } - #renderAudio() { - if (!this.url) return A; - if (this.url && typeof this.url === "object") { - if ("literalString" in this.url) return b`