diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 0a7dfcf8..87467e58 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -892,12 +892,13 @@ were deleted from the workspace, and `SkillsManager::new` no longer installs anything into `CODEX_HOME/skills/.system`. The legacy cache path remains only so stale bundled samples can be removed when bundled skills are disabled. -The dead skill mutation/notification edge is gone too. `skills/config/write`, -`skills/changed`, and `EventMsg::SkillsUpdateAvailable` no longer exist in the -shared protocol, generated schemas, app-server dispatch, core event handling, -TUI refresh reactions, or docs. The fake live-reload/developer-message skill -tests were deleted rather than repaired into a new compatibility lie. Only the -inert `skills/list` projection remains for legacy callers. +The dead skill list/mutation/notification edge is gone too. `skills/list`, +`skills/config/write`, `skills/changed`, `Op::ListSkills`, +`EventMsg::ListSkillsResponse`, and `EventMsg::SkillsUpdateAvailable` no longer +exist in the shared protocols, generated schemas, app-server dispatch, core +handlers, TUI slash/startup/list/manage-skill surfaces, docs, or test helpers. +The fake live-reload/developer-message and skill-list tests were deleted rather +than repaired into new compatibility lies. That husk has now been cut from `codex-core`. The root core crate no longer exports `plugins`, no longer depends on `codex-core-plugins` or `codex-plugin`, diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 2e4193ae..6f51b007 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 7a308c83..b8557676 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -280,7 +280,7 @@ rejected_paths: reason: making Epiphany cleaner inside Codex still preserves the wrong organ; Codex must be starved down to OpenAI subscription auth/model transport, while Epiphany data and subsystem communication move to typed CultCache/CultNet. current_status: - summary: The Codex starvation pass has five typing receipts, forty-six processor/foundation cuts, a real physical extraction in `epiphany-codex-bridge`, a root `epiphany-state-model` crate for durable Epiphany state, a source-grounded Codex auth spine inventory, the native `epiphany-openai-adapter` document boundary, a buildable Codex auth/model wrapper in `epiphany-openai-codex-spine`, the first native runtime caller in `epiphany-openai-runtime`, native heartbeat launch planning/job opening in `epiphany-core`, native state-update contract/validation/application in `epiphany-core`, native exact retrieval path matching in `epiphany-core`, and the route-facing mutation/view/coordinator projection services in `epiphany-codex-bridge`. `codex-protocol` no longer defines the durable `Epiphany*` state structs; it re-exports the native model for legacy rollout/API compatibility while `epiphany-core` imports the native model directly. `epiphany-core` now has no direct vendored Codex dependency: pressure derivation accepts native `EpiphanyTokenUsageSnapshot`, Codex rollout replay moved to `codex-core::epiphany_rollout`, and exact retrieval search uses Epiphany-owned workspace walking/path scoring instead of `codex-file-search`. The bridge owns Codex-facing Epiphany adapters for scene, jobs, context/planning/graph query, retrieval/indexing projection, result projection, runtime-spine result adaptation, launch/prompt doctrine, mutation document mechanics, mutation service update/promote/role-accept/reorient-accept/role-launch/reorient-launch/job-launch/job-interrupt application, live-state projection, pressure/pre-compaction rendering, freshness/reorientation projection, CRRC/coordinator/role-board projection, watcher invalidation adaptation, full `thread/epiphany/view` response construction, freshness/context/graph-query response construction, role/reorient result response construction, distill/propose patch-response construction, coordinator status/view construction, and acceptance/evidence signal helpers. Vendored app-server no longer retains root Epiphany modules; `codex_message_processor.rs` still contains route dispatch, JSON-RPC response shaping, watcher registration/snapshotting calls, and notification emission, but its root no longer imports the evacuated Epiphany policy/protocol registry or owns the watcher invalidation manager. Codex product surfaces for apps, skills, plugins, marketplace, and external agent config import are now inert in the app-server compatibility path: list routes return empty lists, mutation/detail/import routes report disabled, `externalAgentConfig/detect` returns no import candidates, helper/import modules and stale implementation-shape tests were deleted, runtime feature enablement no longer supports `apps` or `plugins`, config writes no longer emit plugin-toggle analytics, plugin/skill cache invalidation on config writes is gone, plugin startup warmups and app-list refreshes were removed, and app-server no longer directly depends on `codex-plugin`, `codex-chatgpt`, or `codex-core-plugins`. `Config::to_mcp_config` now keeps user-declared MCP servers but no longer accepts `PluginsManager`, folds plugin MCP servers into the runtime, enables Codex apps, enables skill MCP dependency install, or advertises plugin capability summaries; `TurnContext::apps_enabled()` now returns false so model turns cannot awaken Codex Apps through ChatGPT auth or feature flags; session startup and per-turn context no longer load skills, turns receive an empty `SkillLoadOutcome`, internal `Op::ListSkills` returns empty compatibility entries without loading config layers, plugin roots, skill files, or conversion helpers, the Codex skill watcher has been collapsed to a no-op marker with no file watcher, skill-root registration, cache-clear task, or `SkillsUpdateAvailable` session listener, model turns no longer run skill mention collection, skill env-var prompts, skill MCP dependency installation, skill instruction injection, or implicit skill invocation analytics from shell tools, and the turn prompt/router path no longer loads plugin/app capability summaries, injects available-skill/available-plugin/plugin instruction fragments, parses plugin/app mentions, records app/plugin invocation telemetry, or filters MCP tools through Codex app connectors. Skill mutation/notification is gone from the app-server edge too: `skills/config/write`, `skills/changed`, `EventMsg::SkillsUpdateAvailable`, the disabled handler, TUI refresh reactions, and fake live-reload/developer-message tests were deleted; only inert `skills/list` compatibility projection remains. The TUI app connector product path is also deleted: no `/apps` slash command, app-link view, connector AppEvent variants, app connector cache/popup/refresh loop, app mention insertion, `app://` mention codec support, stale app-popup tests, or TUI browser-opening shim remains. The `app/list` route and `app/list/updated` notification are gone from app-server protocol, generated schemas, app-server dispatch, test helpers, and docs; `AppInfo`/app-list metadata schema structs are deleted; the orphaned `codex-connectors` crate and `core::connectors` shim are deleted from the workspace; Codex app analytics no longer tracks `codex_app_mentioned` / `codex_app_used` facts, events, reducer arms, client APIs, or dedupe cache state; `[apps.*]`, `Feature::Apps`, `include_apps_instructions`, app config/read schemas, app managed requirements, app prompt tests, and app file-MCP tests are gone; `Feature::Plugins`, `Feature::RemotePlugin`, `plugin://` structured mentions, plugin instruction tags, and stale plugin popup snapshots are gone too; `[plugins]` / `[marketplaces]`, `PluginConfig`, `MarketplaceConfig`, marketplace edit helpers, stale plugin/external-agent README route claims, and generated schema entries are removed from config; and the bundled `codex-skills` sample-skill crate plus embedded imagegen/openai-docs/plugin-creator/skill-creator/skill-installer payloads are deleted from the workspace. Live MCP tool approval is named `McpToolApproval`, not `AppToolApproval`, and remains under MCP server config; live structured tool mentions are MCP/skill-shaped only. `codex_message_processor.rs` is about 9,637 lines; root `message_processor.rs` is about 1,292 lines after the external-agent/config-product cuts; `epiphany_read_routes.rs` is about 579 lines after the full view and read-response extractions; `epiphany_mutation_routes.rs` is about 694 lines after route-load/notification helper cuts and product-surface starvation; `epiphany_state_helpers.rs` is down to a 19-line rollout-state loader; and `codex_thread.rs` is about 1,425 lines after state-update law moved native. `epiphany-openai-adapter` defines CultCache `DatabaseEntry` request/event/receipt/auth-status documents with no Codex app-server or generic JSON dependency. `epiphany-openai-codex-spine` owns all direct Codex auth/model-transport imports for the native OpenAI path: it exposes `default_codex_home` and `auth_manager`, projects `AuthManager` / `CodexAuth` into typed `EpiphanyOpenAiAdapterStatus`, maps typed `EpiphanyOpenAiModelRequest` into Codex API `ResponsesApiRequest`, resolves auth/provider through keeper Codex crates, opens HTTP Responses streams through `codex-api`, maps deltas / completion into typed stream events and receipts, and no longer directly depends on `codex-app-server-protocol` just to name auth mode. `epiphany-openai-runtime` no longer depends directly on `codex-login`; it writes OpenAI status/request/stream-event/receipt records plus runtime sessions/jobs/results/events into `epiphany-core::runtime_spine_cache`, can emit the assistant text artifact for legacy result consumers, is now the default executor for startup-only repo birth specialists, and now has `run-worker` to load a durable `EpiphanyRuntimeWorkerLaunchRequest`, call the typed OpenAI runtime through the spine, persist typed `EpiphanyRuntimeRoleWorkerResult` / `EpiphanyRuntimeReorientWorkerResult` documents, and complete the original heartbeat/specialist runtime job without Codex worker execution; `codex exec` survives only as explicit fallback in repo-birth startup. `epiphany-mvp-coordinator` now invokes `epiphany-openai-runtime run-worker` for launched runtime job ids and no longer creates a second coordinator-owned shadow runtime job/result as a compensator. `epiphany-core::plan_runtime_spine_heartbeat_launch` validates launch contracts/conflicts and projects durable job bindings/runtime links; `epiphany-core::open_runtime_spine_heartbeat_job` owns the initialize-runtime/ensure-session/create-job sequence and now persists `EpiphanyRuntimeWorkerLaunchRequest` CultCache records keyed by runtime job id, with indexed kind/contract fields plus MessagePack-encoded typed launch documents instead of discarding work intent after queue receipt creation; `roleResult` and `reorientResult` now prefer typed worker result documents and fall back only to generic job summaries for older receipts; `epiphany-core::EpiphanyStateUpdate`, `epiphany_state_update_validation_errors`, and `apply_epiphany_state_update` own state-update document shape and mutation law while `codex-core` calls them for compatibility. Vendored `CodexThread::epiphany_launch_job` is now mostly revision check, persistence validation, launch request handoff, and rollout/session writeback for the compatibility route. Vendored `codex-core` no longer has `epiphany_distillation`, `epiphany_promotion`, `epiphany_proposal`, or `epiphany_retrieval` husk modules; it re-exports native surfaces from `epiphany-core` directly, and now owns only the real Codex rollout adapter because it is a host seam. `epiphany-runtime-spine` advertises OpenAI adapter status/model-request/stream-event/receipt CultNet schemas and mutation contracts, so the native caller now has a real storage route instead of only JSON-RPC. MCP itself is correctly JSON at its protocol edge; the target is typed Epiphany intent/result/receipt wrappers around MCP, not replacing MCP JSON. The current OpenAI spine still pulls `codex-api` and a large transport dependency stack, so its next cut is dependency starvation after richer live callers move. + summary: The Codex starvation pass has five typing receipts, forty-seven processor/foundation cuts, a real physical extraction in `epiphany-codex-bridge`, a root `epiphany-state-model` crate for durable Epiphany state, a source-grounded Codex auth spine inventory, the native `epiphany-openai-adapter` document boundary, a buildable Codex auth/model wrapper in `epiphany-openai-codex-spine`, the first native runtime caller in `epiphany-openai-runtime`, native heartbeat launch planning/job opening in `epiphany-core`, native state-update contract/validation/application in `epiphany-core`, native exact retrieval path matching in `epiphany-core`, and the route-facing mutation/view/coordinator projection services in `epiphany-codex-bridge`. `codex-protocol` no longer defines the durable `Epiphany*` state structs; it re-exports the native model for legacy rollout/API compatibility while `epiphany-core` imports the native model directly. `epiphany-core` now has no direct vendored Codex dependency: pressure derivation accepts native `EpiphanyTokenUsageSnapshot`, Codex rollout replay moved to `codex-core::epiphany_rollout`, and exact retrieval search uses Epiphany-owned workspace walking/path scoring instead of `codex-file-search`. The bridge owns Codex-facing Epiphany adapters for scene, jobs, context/planning/graph query, retrieval/indexing projection, result projection, runtime-spine result adaptation, launch/prompt doctrine, mutation document mechanics, mutation service update/promote/role-accept/reorient-accept/role-launch/reorient-launch/job-launch/job-interrupt application, live-state projection, pressure/pre-compaction rendering, freshness/reorientation projection, CRRC/coordinator/role-board projection, watcher invalidation adaptation, full `thread/epiphany/view` response construction, freshness/context/graph-query response construction, role/reorient result response construction, distill/propose patch-response construction, coordinator status/view construction, and acceptance/evidence signal helpers. Vendored app-server no longer retains root Epiphany modules; `codex_message_processor.rs` still contains route dispatch, JSON-RPC response shaping, watcher registration/snapshotting calls, and notification emission, but its root no longer imports the evacuated Epiphany policy/protocol registry or owns the watcher invalidation manager. Codex product surfaces for apps, skills, plugins, marketplace, and external agent config import are now inert in the app-server compatibility path: list routes return empty lists, mutation/detail/import routes report disabled, `externalAgentConfig/detect` returns no import candidates, helper/import modules and stale implementation-shape tests were deleted, runtime feature enablement no longer supports `apps` or `plugins`, config writes no longer emit plugin-toggle analytics, plugin/skill cache invalidation on config writes is gone, plugin startup warmups and app-list refreshes were removed, and app-server no longer directly depends on `codex-plugin`, `codex-chatgpt`, or `codex-core-plugins`. `Config::to_mcp_config` now keeps user-declared MCP servers but no longer accepts `PluginsManager`, folds plugin MCP servers into the runtime, enables Codex apps, enables skill MCP dependency install, or advertises plugin capability summaries; `TurnContext::apps_enabled()` now returns false so model turns cannot awaken Codex Apps through ChatGPT auth or feature flags; session startup and per-turn context no longer load skills, turns receive an empty `SkillLoadOutcome`, internal `Op::ListSkills` is gone from `codex-protocol` / `codex-core` / TUI command routing, the Codex skill watcher has been collapsed to a no-op marker with no file watcher, skill-root registration, cache-clear task, or `SkillsUpdateAvailable` session listener, model turns no longer run skill mention collection, skill env-var prompts, skill MCP dependency installation, skill instruction injection, or implicit skill invocation analytics from shell tools, and the turn prompt/router path no longer loads plugin/app capability summaries, injects available-skill/available-plugin/plugin instruction fragments, parses plugin/app mentions, records app/plugin invocation telemetry, or filters MCP tools through Codex app connectors. Skill mutation/list/notification is gone from the app-server edge too: `skills/list`, `skills/config/write`, `skills/changed`, `Op::ListSkills`, `EventMsg::ListSkillsResponse`, `EventMsg::SkillsUpdateAvailable`, the app-server handlers, TUI slash/startup/list/manage-skill surfaces, generated schema entries, core skill-list suite, and fake live-reload/developer-message tests were deleted. The TUI app connector product path is also deleted: no `/apps` slash command, app-link view, connector AppEvent variants, app connector cache/popup/refresh loop, app mention insertion, `app://` mention codec support, stale app-popup tests, or TUI browser-opening shim remains. The `app/list` route and `app/list/updated` notification are gone from app-server protocol, generated schemas, app-server dispatch, test helpers, and docs; `AppInfo`/app-list metadata schema structs are deleted; the orphaned `codex-connectors` crate and `core::connectors` shim are deleted from the workspace; Codex app analytics no longer tracks `codex_app_mentioned` / `codex_app_used` facts, events, reducer arms, client APIs, or dedupe cache state; `[apps.*]`, `Feature::Apps`, `include_apps_instructions`, app config/read schemas, app managed requirements, app prompt tests, and app file-MCP tests are gone; `Feature::Plugins`, `Feature::RemotePlugin`, `plugin://` structured mentions, plugin instruction tags, and stale plugin popup snapshots are gone too; `[plugins]` / `[marketplaces]`, `PluginConfig`, `MarketplaceConfig`, marketplace edit helpers, stale plugin/external-agent README route claims, and generated schema entries are removed from config; and the bundled `codex-skills` sample-skill crate plus embedded imagegen/openai-docs/plugin-creator/skill-creator/skill-installer payloads are deleted from the workspace. Live MCP tool approval is named `McpToolApproval`, not `AppToolApproval`, and remains under MCP server config; live structured tool mentions are MCP/skill-shaped only. `codex_message_processor.rs` is about 9,637 lines; root `message_processor.rs` is about 1,292 lines after the external-agent/config-product cuts; `epiphany_read_routes.rs` is about 579 lines after the full view and read-response extractions; `epiphany_mutation_routes.rs` is about 694 lines after route-load/notification helper cuts and product-surface starvation; `epiphany_state_helpers.rs` is down to a 19-line rollout-state loader; and `codex_thread.rs` is about 1,425 lines after state-update law moved native. `epiphany-openai-adapter` defines CultCache `DatabaseEntry` request/event/receipt/auth-status documents with no Codex app-server or generic JSON dependency. `epiphany-openai-codex-spine` owns all direct Codex auth/model-transport imports for the native OpenAI path: it exposes `default_codex_home` and `auth_manager`, projects `AuthManager` / `CodexAuth` into typed `EpiphanyOpenAiAdapterStatus`, maps typed `EpiphanyOpenAiModelRequest` into Codex API `ResponsesApiRequest`, resolves auth/provider through keeper Codex crates, opens HTTP Responses streams through `codex-api`, maps deltas / completion into typed stream events and receipts, and no longer directly depends on `codex-app-server-protocol` just to name auth mode. `epiphany-openai-runtime` no longer depends directly on `codex-login`; it writes OpenAI status/request/stream-event/receipt records plus runtime sessions/jobs/results/events into `epiphany-core::runtime_spine_cache`, can emit the assistant text artifact for legacy result consumers, is now the default executor for startup-only repo birth specialists, and now has `run-worker` to load a durable `EpiphanyRuntimeWorkerLaunchRequest`, call the typed OpenAI runtime through the spine, persist typed `EpiphanyRuntimeRoleWorkerResult` / `EpiphanyRuntimeReorientWorkerResult` documents, and complete the original heartbeat/specialist runtime job without Codex worker execution; `codex exec` survives only as explicit fallback in repo-birth startup. `epiphany-mvp-coordinator` now invokes `epiphany-openai-runtime run-worker` for launched runtime job ids and no longer creates a second coordinator-owned shadow runtime job/result as a compensator. `epiphany-core::plan_runtime_spine_heartbeat_launch` validates launch contracts/conflicts and projects durable job bindings/runtime links; `epiphany-core::open_runtime_spine_heartbeat_job` owns the initialize-runtime/ensure-session/create-job sequence and now persists `EpiphanyRuntimeWorkerLaunchRequest` CultCache records keyed by runtime job id, with indexed kind/contract fields plus MessagePack-encoded typed launch documents instead of discarding work intent after queue receipt creation; `roleResult` and `reorientResult` now prefer typed worker result documents and fall back only to generic job summaries for older receipts; `epiphany-core::EpiphanyStateUpdate`, `epiphany_state_update_validation_errors`, and `apply_epiphany_state_update` own state-update document shape and mutation law while `codex-core` calls them for compatibility. Vendored `CodexThread::epiphany_launch_job` is now mostly revision check, persistence validation, launch request handoff, and rollout/session writeback for the compatibility route. Vendored `codex-core` no longer has `epiphany_distillation`, `epiphany_promotion`, `epiphany_proposal`, or `epiphany_retrieval` husk modules; it re-exports native surfaces from `epiphany-core` directly, and now owns only the real Codex rollout adapter because it is a host seam. `epiphany-runtime-spine` advertises OpenAI adapter status/model-request/stream-event/receipt CultNet schemas and mutation contracts, so the native caller now has a real storage route instead of only JSON-RPC. MCP itself is correctly JSON at its protocol edge; the target is typed Epiphany intent/result/receipt wrappers around MCP, not replacing MCP JSON. The current OpenAI spine still pulls `codex-api` and a large transport dependency stack, so its next cut is dependency starvation after richer live callers move. latest_cut: > Codex Apps no longer have privileged MCP/runtime treatment in the keeper path. MCP exposure is now uniform: small tool sets are direct, large or @@ -377,10 +377,11 @@ current_status: skill payloads are installed into `CODEX_HOME/skills/.system`; the old cache path remains only so stale cached samples can be removed. The dead skill mutation/notification surface is also gone: - `skills/config/write`, `skills/changed`, `EventMsg::SkillsUpdateAvailable`, - app-server disabled/notification handlers, TUI refresh reactions, generated - schema entries, and stale live-reload/developer-message tests were deleted; - only inert `skills/list` compatibility projection remains. + `skills/list`, `skills/config/write`, `skills/changed`, `Op::ListSkills`, + `EventMsg::ListSkillsResponse`, `EventMsg::SkillsUpdateAvailable`, + app-server handlers, TUI slash/startup/list/manage-skill surfaces, generated + schema entries, core skill-list suite, and stale live-reload/developer-message + tests were deleted. MCP remains JSON-RPC at the edge; user-declared MCP servers are the only runtime MCP authority. next_action: Continue starving coordinator/runtime execution and operator surfaces off app-server JSON-RPC and out of `codex_message_processor.rs`; keep the vestigial Codex organ narrowed to subscription auth/model transport. diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json index 2542f142..4967ab77 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -437,30 +437,6 @@ }, "title": "Thread/injectItemsRequest" }, - { - "type": "object", - "required": [ - "id", - "method", - "params" - ], - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "type": "string", - "enum": [ - "skills/list" - ], - "title": "Skills/listRequestMethod" - }, - "params": { - "$ref": "#/definitions/SkillsListParams" - } - }, - "title": "Skills/listRequest" - }, { "type": "object", "required": [ @@ -4543,16 +4519,8 @@ } ] }, - "summary": { - "description": "Override the reasoning summary for this turn and subsequent turns.", - "anyOf": [ - { - "$ref": "#/definitions/ReasoningSummary" - }, - { - "type": "null" - } - ] + "threadId": { + "type": "string" }, "cwd": { "description": "Override the working directory for this turn and subsequent turns.", @@ -4572,18 +4540,11 @@ } ] }, - "serviceTier": { - "description": "Override the service tier for this turn and subsequent turns.", + "summary": { + "description": "Override the reasoning summary for this turn and subsequent turns.", "anyOf": [ { - "anyOf": [ - { - "$ref": "#/definitions/ServiceTier" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/ReasoningSummary" }, { "type": "null" @@ -4628,8 +4589,23 @@ } ] }, - "threadId": { - "type": "string" + "serviceTier": { + "description": "Override the service tier for this turn and subsequent turns.", + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] }, "sandboxPolicy": { "description": "Override the sandbox policy for this turn and subsequent turns.", @@ -5828,51 +5804,6 @@ } } }, - "SkillsListExtraRootsForCwd": { - "type": "object", - "required": [ - "cwd", - "extraUserRoots" - ], - "properties": { - "cwd": { - "type": "string" - }, - "extraUserRoots": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SkillsListParams": { - "type": "object", - "properties": { - "cwds": { - "description": "When empty, defaults to the current session working directory.", - "type": "array", - "items": { - "type": "string" - } - }, - "forceReload": { - "description": "When true, bypass the skills cache and re-scan skills from disk.", - "type": "boolean" - }, - "perCwdExtraUserRoots": { - "description": "Optional per-cwd extra roots to scan as user-scoped skills.", - "default": null, - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/SkillsListExtraRootsForCwd" - } - } - } - }, "SortDirection": { "type": "string", "enum": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 3e2e9762..b66d7183 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -793,30 +793,6 @@ }, "title": "Thread/injectItemsRequest" }, - { - "type": "object", - "required": [ - "id", - "method", - "params" - ], - "properties": { - "id": { - "$ref": "#/definitions/v2/RequestId" - }, - "method": { - "type": "string", - "enum": [ - "skills/list" - ], - "title": "Skills/listRequestMethod" - }, - "params": { - "$ref": "#/definitions/v2/SkillsListParams" - } - }, - "title": "Skills/listRequest" - }, { "type": "object", "required": [ @@ -8929,53 +8905,6 @@ } } }, - "SkillsListExtraRootsForCwd": { - "type": "object", - "required": [ - "cwd", - "extraUserRoots" - ], - "properties": { - "cwd": { - "type": "string" - }, - "extraUserRoots": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SkillsListParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListParams", - "type": "object", - "properties": { - "cwds": { - "description": "When empty, defaults to the current session working directory.", - "type": "array", - "items": { - "type": "string" - } - }, - "forceReload": { - "description": "When true, bypass the skills cache and re-scan skills from disk.", - "type": "boolean" - }, - "perCwdExtraUserRoots": { - "description": "Optional per-cwd extra roots to scan as user-scoped skills.", - "default": null, - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/v2/SkillsListExtraRootsForCwd" - } - } - } - }, "DeviceKeyProtectionPolicy": { "description": "Protection policy for creating or loading a controller-local device key.", "type": "string", @@ -9866,16 +9795,8 @@ } ] }, - "summary": { - "description": "Override the reasoning summary for this turn and subsequent turns.", - "anyOf": [ - { - "$ref": "#/definitions/v2/ReasoningSummary" - }, - { - "type": "null" - } - ] + "threadId": { + "type": "string" }, "cwd": { "description": "Override the working directory for this turn and subsequent turns.", @@ -9895,18 +9816,11 @@ } ] }, - "serviceTier": { - "description": "Override the service tier for this turn and subsequent turns.", + "summary": { + "description": "Override the reasoning summary for this turn and subsequent turns.", "anyOf": [ { - "anyOf": [ - { - "$ref": "#/definitions/v2/ServiceTier" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/v2/ReasoningSummary" }, { "type": "null" @@ -9951,8 +9865,23 @@ } ] }, - "threadId": { - "type": "string" + "serviceTier": { + "description": "Override the service tier for this turn and subsequent turns.", + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/v2/ServiceTier" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] }, "sandboxPolicy": { "description": "Override the sandbox policy for this turn and subsequent turns.", @@ -16222,227 +16151,6 @@ "title": "ThreadInjectItemsResponse", "type": "object" }, - "SkillDependencies": { - "type": "object", - "required": [ - "tools" - ], - "properties": { - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/v2/SkillToolDependency" - } - } - } - }, - "SkillErrorInfo": { - "type": "object", - "required": [ - "message", - "path" - ], - "properties": { - "message": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "SkillInterface": { - "type": "object", - "properties": { - "brandColor": { - "type": [ - "string", - "null" - ] - }, - "defaultPrompt": { - "type": [ - "string", - "null" - ] - }, - "displayName": { - "type": [ - "string", - "null" - ] - }, - "iconLarge": { - "anyOf": [ - { - "$ref": "#/definitions/v2/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "iconSmall": { - "anyOf": [ - { - "$ref": "#/definitions/v2/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "shortDescription": { - "type": [ - "string", - "null" - ] - } - } - }, - "SkillMetadata": { - "type": "object", - "required": [ - "description", - "enabled", - "name", - "path", - "scope" - ], - "properties": { - "dependencies": { - "anyOf": [ - { - "$ref": "#/definitions/v2/SkillDependencies" - }, - { - "type": "null" - } - ] - }, - "description": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "interface": { - "anyOf": [ - { - "$ref": "#/definitions/v2/SkillInterface" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - }, - "path": { - "$ref": "#/definitions/v2/AbsolutePathBuf" - }, - "scope": { - "$ref": "#/definitions/v2/SkillScope" - }, - "shortDescription": { - "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", - "type": [ - "string", - "null" - ] - } - } - }, - "SkillScope": { - "type": "string", - "enum": [ - "user", - "repo", - "system", - "admin" - ] - }, - "SkillToolDependency": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "command": { - "type": [ - "string", - "null" - ] - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "transport": { - "type": [ - "string", - "null" - ] - }, - "type": { - "type": "string" - }, - "url": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - } - }, - "SkillsListEntry": { - "type": "object", - "required": [ - "cwd", - "errors", - "skills" - ], - "properties": { - "cwd": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/v2/SkillErrorInfo" - } - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/definitions/v2/SkillMetadata" - } - } - } - }, - "SkillsListResponse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListResponse", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/v2/SkillsListEntry" - } - } - } - }, "DeviceKeyAlgorithm": { "description": "Device-key algorithm reported at enrollment and signing boundaries.", "type": "string", diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 110f403d..5af858f4 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -4331,53 +4331,6 @@ } } }, - "SkillsListExtraRootsForCwd": { - "type": "object", - "required": [ - "cwd", - "extraUserRoots" - ], - "properties": { - "cwd": { - "type": "string" - }, - "extraUserRoots": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SkillsListParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListParams", - "type": "object", - "properties": { - "cwds": { - "description": "When empty, defaults to the current session working directory.", - "type": "array", - "items": { - "type": "string" - } - }, - "forceReload": { - "description": "When true, bypass the skills cache and re-scan skills from disk.", - "type": "boolean" - }, - "perCwdExtraUserRoots": { - "description": "Optional per-cwd extra roots to scan as user-scoped skills.", - "default": null, - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/SkillsListExtraRootsForCwd" - } - } - } - }, "DeviceKeyProtectionPolicy": { "description": "Protection policy for creating or loading a controller-local device key.", "type": "string", @@ -5268,16 +5221,8 @@ } ] }, - "summary": { - "description": "Override the reasoning summary for this turn and subsequent turns.", - "anyOf": [ - { - "$ref": "#/definitions/ReasoningSummary" - }, - { - "type": "null" - } - ] + "threadId": { + "type": "string" }, "cwd": { "description": "Override the working directory for this turn and subsequent turns.", @@ -5297,18 +5242,11 @@ } ] }, - "serviceTier": { - "description": "Override the service tier for this turn and subsequent turns.", + "summary": { + "description": "Override the reasoning summary for this turn and subsequent turns.", "anyOf": [ { - "anyOf": [ - { - "$ref": "#/definitions/ServiceTier" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/ReasoningSummary" }, { "type": "null" @@ -5353,8 +5291,23 @@ } ] }, - "threadId": { - "type": "string" + "serviceTier": { + "description": "Override the service tier for this turn and subsequent turns.", + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] }, "sandboxPolicy": { "description": "Override the sandbox policy for this turn and subsequent turns.", @@ -11624,227 +11577,6 @@ "title": "ThreadInjectItemsResponse", "type": "object" }, - "SkillDependencies": { - "type": "object", - "required": [ - "tools" - ], - "properties": { - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillToolDependency" - } - } - } - }, - "SkillErrorInfo": { - "type": "object", - "required": [ - "message", - "path" - ], - "properties": { - "message": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "SkillInterface": { - "type": "object", - "properties": { - "brandColor": { - "type": [ - "string", - "null" - ] - }, - "defaultPrompt": { - "type": [ - "string", - "null" - ] - }, - "displayName": { - "type": [ - "string", - "null" - ] - }, - "iconLarge": { - "anyOf": [ - { - "$ref": "#/definitions/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "iconSmall": { - "anyOf": [ - { - "$ref": "#/definitions/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "shortDescription": { - "type": [ - "string", - "null" - ] - } - } - }, - "SkillMetadata": { - "type": "object", - "required": [ - "description", - "enabled", - "name", - "path", - "scope" - ], - "properties": { - "dependencies": { - "anyOf": [ - { - "$ref": "#/definitions/SkillDependencies" - }, - { - "type": "null" - } - ] - }, - "description": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "interface": { - "anyOf": [ - { - "$ref": "#/definitions/SkillInterface" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - }, - "path": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "scope": { - "$ref": "#/definitions/SkillScope" - }, - "shortDescription": { - "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", - "type": [ - "string", - "null" - ] - } - } - }, - "SkillScope": { - "type": "string", - "enum": [ - "user", - "repo", - "system", - "admin" - ] - }, - "SkillToolDependency": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "command": { - "type": [ - "string", - "null" - ] - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "transport": { - "type": [ - "string", - "null" - ] - }, - "type": { - "type": "string" - }, - "url": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - } - }, - "SkillsListEntry": { - "type": "object", - "required": [ - "cwd", - "errors", - "skills" - ], - "properties": { - "cwd": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillErrorInfo" - } - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillMetadata" - } - } - } - }, - "SkillsListResponse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListResponse", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillsListEntry" - } - } - } - }, "DeviceKeyAlgorithm": { "description": "Device-key algorithm reported at enrollment and signing boundaries.", "type": "string", @@ -15060,6 +14792,94 @@ } } }, + "InitializeCapabilities": { + "description": "Client-declared capabilities negotiated during initialize.", + "type": "object", + "properties": { + "experimentalApi": { + "description": "Opt into receiving experimental API methods and fields.", + "default": false, + "type": "boolean" + }, + "optOutNotificationMethods": { + "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + }, + "InitializeParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InitializeParams", + "type": "object", + "required": [ + "clientInfo" + ], + "properties": { + "capabilities": { + "anyOf": [ + { + "$ref": "#/definitions/InitializeCapabilities" + }, + { + "type": "null" + } + ] + }, + "clientInfo": { + "$ref": "#/definitions/ClientInfo" + } + } + }, + "FuzzyFileSearchSessionCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FuzzyFileSearchSessionCompletedNotification", + "type": "object", + "required": [ + "sessionId" + ], + "properties": { + "sessionId": { + "type": "string" + } + } + }, + "FuzzyFileSearchSessionUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FuzzyFileSearchSessionUpdatedNotification", + "type": "object", + "required": [ + "files", + "query", + "sessionId" + ], + "properties": { + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/FuzzyFileSearchResult" + } + }, + "query": { + "type": "string" + }, + "sessionId": { + "type": "string" + } + } + }, + "FuzzyFileSearchMatchType": { + "type": "string", + "enum": [ + "file", + "directory" + ] + }, "FuzzyFileSearchParams": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "FuzzyFileSearchParams", @@ -15107,29 +14927,6 @@ } } }, - "InitializeParams": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InitializeParams", - "type": "object", - "required": [ - "clientInfo" - ], - "properties": { - "capabilities": { - "anyOf": [ - { - "$ref": "#/definitions/InitializeCapabilities" - }, - { - "type": "null" - } - ] - }, - "clientInfo": { - "$ref": "#/definitions/ClientInfo" - } - } - }, "FuzzyFileSearchResult": { "description": "Superset of [`codex_file_search::FileMatch`]", "type": "object", @@ -15171,71 +14968,6 @@ } } }, - "InitializeCapabilities": { - "description": "Client-declared capabilities negotiated during initialize.", - "type": "object", - "properties": { - "experimentalApi": { - "description": "Opt into receiving experimental API methods and fields.", - "default": false, - "type": "boolean" - }, - "optOutNotificationMethods": { - "description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - } - } - }, - "FuzzyFileSearchMatchType": { - "type": "string", - "enum": [ - "file", - "directory" - ] - }, - "FuzzyFileSearchSessionCompletedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "FuzzyFileSearchSessionCompletedNotification", - "type": "object", - "required": [ - "sessionId" - ], - "properties": { - "sessionId": { - "type": "string" - } - } - }, - "FuzzyFileSearchSessionUpdatedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "FuzzyFileSearchSessionUpdatedNotification", - "type": "object", - "required": [ - "files", - "query", - "sessionId" - ], - "properties": { - "files": { - "type": "array", - "items": { - "$ref": "#/definitions/FuzzyFileSearchResult" - } - }, - "query": { - "type": "string" - }, - "sessionId": { - "type": "string" - } - } - }, "ClientRequest": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ClientRequest", @@ -15675,30 +15407,6 @@ }, "title": "Thread/injectItemsRequest" }, - { - "type": "object", - "required": [ - "id", - "method", - "params" - ], - "properties": { - "id": { - "$ref": "#/definitions/RequestId" - }, - "method": { - "type": "string", - "enum": [ - "skills/list" - ], - "title": "Skills/listRequestMethod" - }, - "params": { - "$ref": "#/definitions/SkillsListParams" - } - }, - "title": "Skills/listRequest" - }, { "type": "object", "required": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListParams.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListParams.json deleted file mode 100644 index 8d6cd2cf..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListParams.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListParams", - "type": "object", - "properties": { - "cwds": { - "description": "When empty, defaults to the current session working directory.", - "type": "array", - "items": { - "type": "string" - } - }, - "forceReload": { - "description": "When true, bypass the skills cache and re-scan skills from disk.", - "type": "boolean" - }, - "perCwdExtraUserRoots": { - "description": "Optional per-cwd extra roots to scan as user-scoped skills.", - "default": null, - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/SkillsListExtraRootsForCwd" - } - } - }, - "definitions": { - "SkillsListExtraRootsForCwd": { - "type": "object", - "required": [ - "cwd", - "extraUserRoots" - ], - "properties": { - "cwd": { - "type": "string" - }, - "extraUserRoots": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListResponse.json deleted file mode 100644 index 57f81a76..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/SkillsListResponse.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SkillsListResponse", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillsListEntry" - } - } - }, - "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.", - "type": "string" - }, - "SkillDependencies": { - "type": "object", - "required": [ - "tools" - ], - "properties": { - "tools": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillToolDependency" - } - } - } - }, - "SkillErrorInfo": { - "type": "object", - "required": [ - "message", - "path" - ], - "properties": { - "message": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "SkillInterface": { - "type": "object", - "properties": { - "brandColor": { - "type": [ - "string", - "null" - ] - }, - "defaultPrompt": { - "type": [ - "string", - "null" - ] - }, - "displayName": { - "type": [ - "string", - "null" - ] - }, - "iconLarge": { - "anyOf": [ - { - "$ref": "#/definitions/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "iconSmall": { - "anyOf": [ - { - "$ref": "#/definitions/AbsolutePathBuf" - }, - { - "type": "null" - } - ] - }, - "shortDescription": { - "type": [ - "string", - "null" - ] - } - } - }, - "SkillMetadata": { - "type": "object", - "required": [ - "description", - "enabled", - "name", - "path", - "scope" - ], - "properties": { - "dependencies": { - "anyOf": [ - { - "$ref": "#/definitions/SkillDependencies" - }, - { - "type": "null" - } - ] - }, - "description": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "interface": { - "anyOf": [ - { - "$ref": "#/definitions/SkillInterface" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - }, - "path": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "scope": { - "$ref": "#/definitions/SkillScope" - }, - "shortDescription": { - "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", - "type": [ - "string", - "null" - ] - } - } - }, - "SkillScope": { - "type": "string", - "enum": [ - "user", - "repo", - "system", - "admin" - ] - }, - "SkillToolDependency": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "command": { - "type": [ - "string", - "null" - ] - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "transport": { - "type": [ - "string", - "null" - ] - }, - "type": { - "type": "string" - }, - "url": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - } - }, - "SkillsListEntry": { - "type": "object", - "required": [ - "cwd", - "errors", - "skills" - ], - "properties": { - "cwd": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillErrorInfo" - } - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/definitions/SkillMetadata" - } - } - } - } - } -} \ No newline at end of file diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json index e5e81f68..de22b3f6 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/TurnStartParams.json @@ -29,16 +29,8 @@ } ] }, - "summary": { - "description": "Override the reasoning summary for this turn and subsequent turns.", - "anyOf": [ - { - "$ref": "#/definitions/ReasoningSummary" - }, - { - "type": "null" - } - ] + "threadId": { + "type": "string" }, "cwd": { "description": "Override the working directory for this turn and subsequent turns.", @@ -58,18 +50,11 @@ } ] }, - "serviceTier": { - "description": "Override the service tier for this turn and subsequent turns.", + "summary": { + "description": "Override the reasoning summary for this turn and subsequent turns.", "anyOf": [ { - "anyOf": [ - { - "$ref": "#/definitions/ServiceTier" - }, - { - "type": "null" - } - ] + "$ref": "#/definitions/ReasoningSummary" }, { "type": "null" @@ -114,8 +99,23 @@ } ] }, - "threadId": { - "type": "string" + "serviceTier": { + "description": "Override the service tier for this turn and subsequent turns.", + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] }, "sandboxPolicy": { "description": "Override the sandbox policy for this turn and subsequent turns.", diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts index 847b06ad..2e183ea5 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts @@ -39,7 +39,6 @@ import type { McpServerToolCallParams } from "./v2/McpServerToolCallParams"; import type { ModelListParams } from "./v2/ModelListParams"; import type { ReviewStartParams } from "./v2/ReviewStartParams"; import type { SendAddCreditsNudgeEmailParams } from "./v2/SendAddCreditsNudgeEmailParams"; -import type { SkillsListParams } from "./v2/SkillsListParams"; import type { ThreadApproveGuardianDeniedActionParams } from "./v2/ThreadApproveGuardianDeniedActionParams"; import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams"; import type { ThreadCompactStartParams } from "./v2/ThreadCompactStartParams"; @@ -65,4 +64,4 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta /** * 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/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "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/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": "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": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "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": "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, }; +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/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "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/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": "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": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "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": "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, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillDependencies.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillDependencies.ts deleted file mode 100644 index e2dd4f42..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/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"; - -export type SkillDependencies = { tools: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillErrorInfo.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillErrorInfo.ts deleted file mode 100644 index 6eaf035d..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/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/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillInterface.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillInterface.ts deleted file mode 100644 index 2361afcf..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillInterface.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"; - -export type SkillInterface = { displayName?: string, shortDescription?: string, iconSmall?: AbsolutePathBuf, iconLarge?: AbsolutePathBuf, brandColor?: string, defaultPrompt?: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts deleted file mode 100644 index e43484d1..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.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"; -import type { SkillDependencies } from "./SkillDependencies"; -import type { SkillInterface } from "./SkillInterface"; -import type { SkillScope } from "./SkillScope"; - -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/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts deleted file mode 100644 index 997006f5..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/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/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillToolDependency.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillToolDependency.ts deleted file mode 100644 index a5da45e1..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillToolDependency.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 SkillToolDependency = { type: string, value: string, description?: string, transport?: string, command?: string, url?: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListEntry.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListEntry.ts deleted file mode 100644 index 3f46c98a..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListEntry.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 { SkillErrorInfo } from "./SkillErrorInfo"; -import type { SkillMetadata } from "./SkillMetadata"; - -export type SkillsListEntry = { cwd: string, skills: Array, errors: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListExtraRootsForCwd.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListExtraRootsForCwd.ts deleted file mode 100644 index c18cd4ba..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/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/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts deleted file mode 100644 index ad714a32..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.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 { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd"; - -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/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListResponse.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListResponse.ts deleted file mode 100644 index a27c288a..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/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"; - -export type SkillsListResponse = { data: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 7b91bfa4..94a08291 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -245,16 +245,6 @@ export type { SendAddCreditsNudgeEmailParams } from "./SendAddCreditsNudgeEmailP export type { SendAddCreditsNudgeEmailResponse } from "./SendAddCreditsNudgeEmailResponse"; export type { ServerRequestResolvedNotification } from "./ServerRequestResolvedNotification"; export type { SessionSource } from "./SessionSource"; -export type { SkillDependencies } from "./SkillDependencies"; -export type { SkillErrorInfo } from "./SkillErrorInfo"; -export type { SkillInterface } from "./SkillInterface"; -export type { SkillMetadata } from "./SkillMetadata"; -export type { SkillScope } from "./SkillScope"; -export type { SkillToolDependency } from "./SkillToolDependency"; -export type { SkillsListEntry } from "./SkillsListEntry"; -export type { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd"; -export type { SkillsListParams } from "./SkillsListParams"; -export type { SkillsListResponse } from "./SkillsListResponse"; export type { SortDirection } from "./SortDirection"; export type { TerminalInteractionNotification } from "./TerminalInteractionNotification"; export type { TextElement } from "./TextElement"; diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs index 19ccefeb..4e32bb34 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs @@ -435,10 +435,6 @@ client_request_definitions! { params: v2::ThreadInjectItemsParams, response: v2::ThreadInjectItemsResponse, }, - SkillsList => "skills/list" { - params: v2::SkillsListParams, - response: v2::SkillsListResponse, - }, DeviceKeyCreate => "device/key/create" { params: v2::DeviceKeyCreateParams, response: v2::DeviceKeyCreateResponse, diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs index 5e1f9ea7..9e6a77e6 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -109,11 +109,6 @@ use codex_protocol::protocol::RealtimeVoice; use codex_protocol::protocol::RealtimeVoicesList; use codex_protocol::protocol::ReviewDecision as CoreReviewDecision; use codex_protocol::protocol::SessionSource as CoreSessionSource; -use codex_protocol::protocol::SkillDependencies as CoreSkillDependencies; -use codex_protocol::protocol::SkillInterface as CoreSkillInterface; -use codex_protocol::protocol::SkillMetadata as CoreSkillMetadata; -use codex_protocol::protocol::SkillScope as CoreSkillScope; -use codex_protocol::protocol::SkillToolDependency as CoreSkillToolDependency; use codex_protocol::protocol::SubAgentSource as CoreSubAgentSource; use codex_protocol::protocol::TokenUsage as CoreTokenUsage; use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo; @@ -5456,199 +5451,6 @@ pub struct ThreadTurnsListResponse { pub backwards_cursor: Option, } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillsListParams { - /// When empty, defaults to the current session working directory. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub cwds: Vec, - - /// When true, bypass the skills cache and re-scan skills from disk. - #[serde(default, skip_serializing_if = "std::ops::Not::not")] - pub force_reload: bool, - - /// Optional per-cwd extra roots to scan as user-scoped skills. - #[serde(default)] - #[ts(optional = nullable)] - pub per_cwd_extra_user_roots: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillsListExtraRootsForCwd { - pub cwd: PathBuf, - pub extra_user_roots: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillsListResponse { - pub data: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "snake_case")] -#[ts(rename_all = "snake_case")] -#[ts(export_to = "v2/")] -pub enum SkillScope { - User, - Repo, - System, - Admin, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillMetadata { - pub name: String, - pub description: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - /// Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description. - pub short_description: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub interface: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub dependencies: Option, - pub path: AbsolutePathBuf, - pub scope: SkillScope, - pub enabled: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillInterface { - #[ts(optional)] - pub display_name: Option, - #[ts(optional)] - pub short_description: Option, - #[ts(optional)] - pub icon_small: Option, - #[ts(optional)] - pub icon_large: Option, - #[ts(optional)] - pub brand_color: Option, - #[ts(optional)] - pub default_prompt: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillDependencies { - pub tools: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillToolDependency { - #[serde(rename = "type")] - #[ts(rename = "type")] - pub r#type: String, - pub value: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub description: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub transport: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub command: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub url: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillErrorInfo { - pub path: PathBuf, - pub message: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct SkillsListEntry { - pub cwd: PathBuf, - pub skills: Vec, - pub errors: Vec, -} - -impl From for SkillMetadata { - fn from(value: CoreSkillMetadata) -> Self { - Self { - name: value.name, - description: value.description, - short_description: value.short_description, - interface: value.interface.map(SkillInterface::from), - dependencies: value.dependencies.map(SkillDependencies::from), - path: value.path, - scope: value.scope.into(), - enabled: true, - } - } -} - -impl From for SkillInterface { - fn from(value: CoreSkillInterface) -> Self { - Self { - display_name: value.display_name, - short_description: value.short_description, - brand_color: value.brand_color, - default_prompt: value.default_prompt, - icon_small: value.icon_small, - icon_large: value.icon_large, - } - } -} - -impl From for SkillDependencies { - fn from(value: CoreSkillDependencies) -> Self { - Self { - tools: value - .tools - .into_iter() - .map(SkillToolDependency::from) - .collect(), - } - } -} - -impl From for SkillToolDependency { - fn from(value: CoreSkillToolDependency) -> Self { - Self { - r#type: value.r#type, - value: value.value, - description: value.description, - transport: value.transport, - command: value.command, - url: value.url, - } - } -} - -impl From for SkillScope { - fn from(value: CoreSkillScope) -> Self { - match value { - CoreSkillScope::User => Self::User, - CoreSkillScope::Repo => Self::Repo, - CoreSkillScope::System => Self::System, - CoreSkillScope::Admin => Self::Admin, - } - } -} - #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -10733,46 +10535,6 @@ mod tests { ); } - #[test] - fn skills_list_params_serialization_uses_force_reload() { - assert_eq!( - serde_json::to_value(SkillsListParams { - cwds: Vec::new(), - force_reload: false, - per_cwd_extra_user_roots: None, - }) - .unwrap(), - json!({ - "perCwdExtraUserRoots": null, - }), - ); - - assert_eq!( - serde_json::to_value(SkillsListParams { - cwds: vec![PathBuf::from("/repo")], - force_reload: true, - per_cwd_extra_user_roots: Some(vec![SkillsListExtraRootsForCwd { - cwd: PathBuf::from("/repo"), - extra_user_roots: vec![ - PathBuf::from("/shared/skills"), - PathBuf::from("/tmp/x") - ], - }]), - }) - .unwrap(), - json!({ - "cwds": ["/repo"], - "forceReload": true, - "perCwdExtraUserRoots": [ - { - "cwd": "/repo", - "extraUserRoots": ["/shared/skills", "/tmp/x"], - } - ], - }), - ); - } - #[test] fn codex_error_info_serializes_http_status_code_in_camel_case() { let value = CodexErrorInfo::ResponseTooManyFailedAttempts { diff --git a/vendor/codex/codex-rs/app-server/README.md b/vendor/codex/codex-rs/app-server/README.md index 14de33d5..5471b050 100644 --- a/vendor/codex/codex-rs/app-server/README.md +++ b/vendor/codex/codex-rs/app-server/README.md @@ -199,7 +199,6 @@ Experimental Epiphany retrieval: - `experimentalFeature/list` — list feature flags with stage metadata (`beta`, `underDevelopment`, `stable`, etc.), enabled/default-enabled state, and cursor pagination. For non-beta flags, `displayName`/`description`/`announcement` are `null`. - `experimentalFeature/enablement/set` — patch the in-memory process-wide runtime feature enablement for supported feature keys. For each feature, precedence is: cloud requirements > --enable > config.toml > experimentalFeature/enablement/set (new) > code default. - `collaborationMode/list` — list available collaboration mode presets (experimental, no pagination). This response omits built-in developer instructions; clients should either pass `settings.developer_instructions: null` when setting a mode to use Codex's built-in instructions, or provide their own instructions explicitly. -- `skills/list` — list skills for one or more `cwd` values (optional `forceReload`). - `device/key/create` — create or load a controller-local device signing key for an account/client binding. This local-key API is available only over local transports such as stdio and in-process; remote transports reject it. Hardware-backed providers are the target protection class; an OS-protected non-extractable fallback is allowed only with `protectionPolicy: "allow_os_protected_nonextractable"` and returns the reported `protectionClass`. - `device/key/public` — return a device key's SPKI DER public key as base64 plus its `algorithm` and `protectionClass`. - `device/key/sign` — sign one of the accepted structured payload variants with a controller-local device key. The only accepted payload today is `remoteControlClientConnection`, which binds a server-issued `/client` websocket challenge to the enrolled controller device without signing the bearer token itself; this is intentionally not an arbitrary-byte signing API. @@ -1235,78 +1234,6 @@ The client must respond with content items. Use `inputText` for text and `inputI } ``` -## Skills - -Invoke a skill by including `$` in the text input. Add a `skill` input item (recommended) so the backend injects full skill instructions instead of relying on the model to resolve the name. - -```json -{ - "method": "turn/start", - "id": 101, - "params": { - "threadId": "thread-1", - "input": [ - { - "type": "text", - "text": "$skill-creator Add a new skill for triaging flaky CI." - }, - { - "type": "skill", - "name": "skill-creator", - "path": "/Users/me/.codex/skills/skill-creator/SKILL.md" - } - ] - } -} -``` - -If you omit the `skill` item, the model will still parse the `$` marker and try to locate the skill, which can add latency. - -Example: - -``` -$skill-creator Add a new skill for triaging flaky CI and include step-by-step usage. -``` - -Use `skills/list` to fetch the available skills (optionally scoped by `cwds`, with `forceReload`). -You can also add `perCwdExtraUserRoots` to scan additional absolute paths as `user` scope for specific `cwd` entries. -Entries whose `cwd` is not present in `cwds` are ignored. -`skills/list` returns the current compatibility skill projection for each requested `cwd`. - -```json -{ "method": "skills/list", "id": 25, "params": { - "cwds": ["/Users/me/project", "/Users/me/other-project"], - "forceReload": true, - "perCwdExtraUserRoots": [ - { - "cwd": "/Users/me/project", - "extraUserRoots": ["/Users/me/shared-skills"] - } - ] -} } -{ "id": 25, "result": { - "data": [{ - "cwd": "/Users/me/project", - "skills": [ - { - "name": "skill-creator", - "description": "Create or update a Codex skill", - "enabled": true, - "interface": { - "displayName": "Skill Creator", - "shortDescription": "Create or update a Codex skill", - "iconSmall": "icon.svg", - "iconLarge": "icon-large.svg", - "brandColor": "#111111", - "defaultPrompt": "Add a new skill for triaging flaky CI." - } - } - ], - "errors": [] - }] -} } -``` - ## Auth endpoints The JSON-RPC auth/account surface exposes request/response methods plus server-initiated notifications (no `id`). Use these to determine auth state, start or cancel logins, logout, and inspect ChatGPT rate limits. diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs index 103dfd4a..9c12121a 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs @@ -113,8 +113,6 @@ use codex_app_server_protocol::SendAddCreditsNudgeEmailParams; use codex_app_server_protocol::SendAddCreditsNudgeEmailResponse; use codex_app_server_protocol::ServerNotification; use codex_app_server_protocol::ServerRequestResolvedNotification; -use codex_app_server_protocol::SkillsListParams; -use codex_app_server_protocol::SkillsListResponse; use codex_app_server_protocol::SortDirection; use codex_app_server_protocol::Thread; use codex_app_server_protocol::ThreadApproveGuardianDeniedActionParams; @@ -993,10 +991,6 @@ impl CodexMessageProcessor { ) .await; } - ClientRequest::SkillsList { request_id, params } => { - self.skills_list(to_connection_request_id(request_id), params) - .await; - } ClientRequest::TurnStart { request_id, params } => { self.turn_start( to_connection_request_id(request_id), @@ -6302,12 +6296,6 @@ impl CodexMessageProcessor { self.finalize_thread_teardown(thread_id).await; } - async fn skills_list(&self, request_id: ConnectionRequestId, _params: SkillsListParams) { - self.outgoing - .send_response(request_id, SkillsListResponse { data: Vec::new() }) - .await; - } - async fn turn_start( &self, request_id: ConnectionRequestId, diff --git a/vendor/codex/codex-rs/app-server/tests/common/mcp_process.rs b/vendor/codex/codex-rs/app-server/tests/common/mcp_process.rs index 5126acc2..0bc43e98 100644 --- a/vendor/codex/codex-rs/app-server/tests/common/mcp_process.rs +++ b/vendor/codex/codex-rs/app-server/tests/common/mcp_process.rs @@ -54,7 +54,6 @@ use codex_app_server_protocol::RequestId; use codex_app_server_protocol::ReviewStartParams; use codex_app_server_protocol::SendAddCreditsNudgeEmailParams; use codex_app_server_protocol::ServerRequest; -use codex_app_server_protocol::SkillsListParams; use codex_app_server_protocol::ThreadArchiveParams; use codex_app_server_protocol::ThreadCompactStartParams; use codex_app_server_protocol::ThreadForkParams; @@ -525,15 +524,6 @@ impl McpProcess { self.send_request("mcpServer/tool/call", params).await } - /// Send a `skills/list` JSON-RPC request. - pub async fn send_skills_list_request( - &mut self, - params: SkillsListParams, - ) -> anyhow::Result { - let params = Some(serde_json::to_value(params)?); - self.send_request("skills/list", params).await - } - /// Send an `mcpServerStatus/list` JSON-RPC request. pub async fn send_list_mcp_server_status_request( &mut self, diff --git a/vendor/codex/codex-rs/core/src/session/handlers.rs b/vendor/codex/codex-rs/core/src/session/handlers.rs index 572f8b7d..55b587b6 100644 --- a/vendor/codex/codex-rs/core/src/session/handlers.rs +++ b/vendor/codex/codex-rs/core/src/session/handlers.rs @@ -39,7 +39,6 @@ use codex_protocol::protocol::EventMsg; use codex_protocol::protocol::GuardianAssessmentEvent; use codex_protocol::protocol::GuardianAssessmentStatus; use codex_protocol::protocol::InterAgentCommunication; -use codex_protocol::protocol::ListSkillsResponseEvent; use codex_protocol::protocol::McpServerRefreshConfig; use codex_protocol::protocol::Op; use codex_protocol::protocol::RealtimeConversationListVoicesResponseEvent; @@ -47,7 +46,6 @@ use codex_protocol::protocol::RealtimeVoicesList; use codex_protocol::protocol::ReviewDecision; use codex_protocol::protocol::ReviewRequest; use codex_protocol::protocol::RolloutItem; -use codex_protocol::protocol::SkillsListEntry; use codex_protocol::protocol::ThreadMemoryMode; use codex_protocol::protocol::ThreadNameUpdatedEvent; use codex_protocol::protocol::ThreadRolledBackEvent; @@ -67,7 +65,6 @@ use codex_protocol::user_input::UserInput; use codex_rmcp_client::ElicitationAction; use codex_rmcp_client::ElicitationResponse; use serde_json::Value; -use std::path::PathBuf; use std::sync::Arc; use tracing::debug; use tracing::info; @@ -547,31 +544,6 @@ pub async fn list_mcp_tools(sess: &Session, config: &Arc, sub_id: String sess.send_event_raw(event).await; } -pub async fn list_skills(sess: &Session, sub_id: String, cwds: Vec, _force_reload: bool) { - let default_cwd = { - let state = sess.state.lock().await; - state.session_configuration.cwd.to_path_buf() - }; - let cwds = if cwds.is_empty() { - vec![default_cwd] - } else { - cwds - }; - let skills = cwds - .into_iter() - .map(|cwd| SkillsListEntry { - cwd, - skills: Vec::new(), - errors: Vec::new(), - }) - .collect(); - let event = Event { - id: sub_id, - msg: EventMsg::ListSkillsResponse(ListSkillsResponseEvent { skills }), - }; - sess.send_event_raw(event).await; -} - pub async fn undo(sess: &Arc, sub_id: String) { let turn_context = sess.new_default_turn_with_sub_id(sub_id).await; sess.spawn_task(turn_context, Vec::new(), UndoTask::new()) @@ -1129,10 +1101,6 @@ pub(super) async fn submission_loop( reload_user_config(&sess).await; false } - Op::ListSkills { cwds, force_reload } => { - list_skills(&sess, sub.id.clone(), cwds, force_reload).await; - false - } Op::Undo => { undo(&sess, sub.id.clone()).await; false diff --git a/vendor/codex/codex-rs/core/src/session/turn.rs b/vendor/codex/codex-rs/core/src/session/turn.rs index daa58e3d..13069671 100644 --- a/vendor/codex/codex-rs/core/src/session/turn.rs +++ b/vendor/codex/codex-rs/core/src/session/turn.rs @@ -1150,7 +1150,6 @@ pub(super) fn realtime_text_for_event(msg: &EventMsg) -> Option { | EventMsg::TurnDiff(_) | EventMsg::GetHistoryEntryResponse(_) | EventMsg::McpListToolsResponse(_) - | EventMsg::ListSkillsResponse(_) | EventMsg::RealtimeConversationListVoicesResponse(_) | EventMsg::PlanUpdate(_) | EventMsg::TurnAborted(_) diff --git a/vendor/codex/codex-rs/core/tests/suite/mod.rs b/vendor/codex/codex-rs/core/tests/suite/mod.rs index 73e18725..acc3eae9 100644 --- a/vendor/codex/codex-rs/core/tests/suite/mod.rs +++ b/vendor/codex/codex-rs/core/tests/suite/mod.rs @@ -86,7 +86,6 @@ mod shell_command; mod shell_serialization; mod shell_snapshot; mod skill_approval; -mod skills; mod spawn_agent_description; mod sqlite_state; mod stream_error_allows_next_turn; diff --git a/vendor/codex/codex-rs/core/tests/suite/skills.rs b/vendor/codex/codex-rs/core/tests/suite/skills.rs deleted file mode 100644 index 015f4ef0..00000000 --- a/vendor/codex/codex-rs/core/tests/suite/skills.rs +++ /dev/null @@ -1,406 +0,0 @@ -#![cfg(not(target_os = "windows"))] -#![allow(clippy::unwrap_used, clippy::expect_used)] - -use anyhow::Result; -use codex_core::ThreadManager; -use codex_exec_server::CreateDirectoryOptions; -use codex_exec_server::EnvironmentManager; -use codex_exec_server::ExecServerRuntimePaths; -use codex_exec_server::ExecutorFileSystem; -use codex_login::CodexAuth; -use codex_models_manager::collaboration_mode_presets::CollaborationModesConfig; -use codex_protocol::protocol::AskForApproval; -use codex_protocol::protocol::Op; -use codex_protocol::protocol::SandboxPolicy; -use codex_protocol::protocol::SessionSource; -use codex_protocol::user_input::UserInput; -use codex_utils_absolute_path::AbsolutePathBuf; -use core_test_support::load_default_config_for_test; -use core_test_support::responses::ev_assistant_message; -use core_test_support::responses::ev_completed; -use core_test_support::responses::ev_response_created; -use core_test_support::responses::mount_sse_once; -use core_test_support::responses::sse; -use core_test_support::responses::start_mock_server; -use core_test_support::skip_if_no_network; -use core_test_support::test_codex::test_codex; -use pretty_assertions::assert_eq; -use std::fs; -use std::path::Path; -use std::sync::Arc; -use tempfile::TempDir; - -async fn write_repo_skill( - cwd: AbsolutePathBuf, - fs: Arc, - name: &str, - description: &str, - body: &str, -) -> Result<()> { - let skill_dir = cwd.join(".agents").join("skills").join(name); - fs.create_directory( - &skill_dir, - CreateDirectoryOptions { recursive: true }, - /*sandbox*/ None, - ) - .await?; - let contents = format!("---\nname: {name}\ndescription: {description}\n---\n\n{body}\n"); - let path = skill_dir.join("SKILL.md"); - fs.write_file(&path, contents.into_bytes(), /*sandbox*/ None) - .await?; - Ok(()) -} - -fn write_home_skill(codex_home: &Path, dir: &str, name: &str, description: &str) -> Result<()> { - let skill_dir = codex_home.join("skills").join(dir); - fs::create_dir_all(&skill_dir)?; - let contents = format!("---\nname: {name}\ndescription: {description}\n---\n\n# Body\n"); - fs::write(skill_dir.join("SKILL.md"), contents)?; - Ok(()) -} - -fn system_skill_md_path(home: impl AsRef, name: &str) -> std::path::PathBuf { - home.as_ref() - .join("skills") - .join(".system") - .join(name) - .join("SKILL.md") -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn user_turn_includes_skill_instructions() -> Result<()> { - skip_if_no_network!(Ok(())); - - let server = start_mock_server().await; - let skill_body = "skill body"; - let mut builder = test_codex().with_workspace_setup(move |cwd, fs| async move { - write_repo_skill(cwd, fs, "demo", "demo skill", skill_body).await - }); - let test = builder.build_remote_aware(&server).await?; - - let skill_path = test - .config - .cwd - .join(".agents/skills/demo/SKILL.md") - .canonicalize() - .unwrap_or_else(|_| test.config.cwd.join(".agents/skills/demo/SKILL.md")) - .to_path_buf(); - - let mock = mount_sse_once( - &server, - sse(vec![ - ev_response_created("resp-1"), - ev_assistant_message("msg-1", "done"), - ev_completed("resp-1"), - ]), - ) - .await; - - let session_model = test.session_configured.model.clone(); - test.codex - .submit(Op::UserTurn { - environments: None, - items: vec![ - UserInput::Text { - text: "please use $demo".to_string(), - text_elements: Vec::new(), - }, - UserInput::Skill { - name: "demo".to_string(), - path: skill_path.clone(), - }, - ], - final_output_json_schema: None, - cwd: test.config.cwd.to_path_buf(), - approval_policy: AskForApproval::Never, - approvals_reviewer: None, - sandbox_policy: SandboxPolicy::DangerFullAccess, - model: session_model, - effort: None, - summary: None, - service_tier: None, - collaboration_mode: None, - personality: None, - }) - .await?; - - core_test_support::wait_for_event(test.codex.as_ref(), |event| { - matches!(event, codex_protocol::protocol::EventMsg::TurnComplete(_)) - }) - .await; - - let request = mock.single_request(); - let user_texts = request.message_input_texts("user"); - let skill_path_str = skill_path.to_string_lossy(); - assert!( - user_texts.iter().any(|text| { - text.contains("\ndemo") - && text.contains("") - && text.contains(skill_body) - && text.contains(skill_path_str.as_ref()) - }), - "expected skill instructions in user input, got {user_texts:?}" - ); - - Ok(()) -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn list_skills_includes_repo_and_home_skills_remote_aware() -> Result<()> { - skip_if_no_network!(Ok(())); - - let server = start_mock_server().await; - let mut builder = test_codex() - .with_pre_build_hook(|home| { - write_home_skill(home, "home-demo", "home-demo", "from home") - .expect("write home skill"); - }) - .with_workspace_setup(|cwd, fs| async move { - write_repo_skill(cwd, fs, "repo-demo", "from repo", "# Body").await - }); - let test = builder.build_remote_aware(&server).await?; - - test.codex - .submit(Op::ListSkills { - cwds: Vec::new(), - force_reload: true, - }) - .await?; - let response = - core_test_support::wait_for_event_match(test.codex.as_ref(), |event| match event { - codex_protocol::protocol::EventMsg::ListSkillsResponse(response) => { - Some(response.clone()) - } - _ => None, - }) - .await; - - let cwd = test.config.cwd.as_path(); - let skills = response - .skills - .iter() - .find(|entry| entry.cwd.as_path() == cwd) - .map(|entry| entry.skills.clone()) - .unwrap_or_default(); - - let repo_skill = skills - .iter() - .find(|skill| skill.name == "repo-demo") - .expect("expected repo skill"); - assert_eq!(repo_skill.scope, codex_protocol::protocol::SkillScope::Repo); - let repo_path = repo_skill.path.to_string_lossy().replace('\\', "/"); - assert!( - repo_path.ends_with("/.agents/skills/repo-demo/SKILL.md"), - "unexpected repo skill path: {repo_path}" - ); - - let home_skill = skills - .iter() - .find(|skill| skill.name == "home-demo") - .expect("expected home skill"); - assert_eq!(home_skill.scope, codex_protocol::protocol::SkillScope::User); - let home_path = home_skill.path.to_string_lossy().replace('\\', "/"); - assert!( - home_path.ends_with("/skills/home-demo/SKILL.md"), - "unexpected home skill path: {home_path}" - ); - - Ok(()) -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn list_skills_skips_cwd_roots_when_environment_disabled() -> Result<()> { - let codex_home = TempDir::new()?; - let cwd = TempDir::new()?; - write_home_skill( - codex_home.path(), - "home-disabled", - "home-disabled", - "from home", - )?; - let repo_skill_dir = cwd - .path() - .join(".agents") - .join("skills") - .join("repo-disabled"); - fs::create_dir_all(&repo_skill_dir)?; - fs::write( - repo_skill_dir.join("SKILL.md"), - "---\nname: repo-disabled\ndescription: from repo\n---\n\n# Body\n", - )?; - let mut config = load_default_config_for_test(&codex_home).await; - config.cwd = AbsolutePathBuf::from_absolute_path_checked(cwd.path())?; - - let thread_manager = ThreadManager::new( - &config, - codex_core::test_support::auth_manager_from_auth(CodexAuth::from_api_key("dummy")), - SessionSource::Exec, - CollaborationModesConfig::default(), - Arc::new(EnvironmentManager::new( - codex_exec_server::EnvironmentManagerArgs { - exec_server_url: Some("none".to_string()), - local_runtime_paths: ExecServerRuntimePaths::new( - std::env::current_exe()?, - /*codex_linux_sandbox_exe*/ None, - )?, - }, - )), - /*analytics_events_client*/ None, - ); - let new_thread = thread_manager.start_thread(config.clone()).await?; - let cwd = config.cwd.to_path_buf(); - - new_thread - .thread - .submit(Op::ListSkills { - cwds: vec![cwd.clone()], - force_reload: true, - }) - .await?; - let response = - core_test_support::wait_for_event_match(new_thread.thread.as_ref(), |event| match event { - codex_protocol::protocol::EventMsg::ListSkillsResponse(response) => { - Some(response.clone()) - } - _ => None, - }) - .await; - - assert_eq!(response.skills.len(), 1); - assert_eq!(response.skills[0].cwd, cwd); - assert_eq!(response.skills[0].errors.len(), 0); - assert!( - response.skills[0] - .skills - .iter() - .any(|skill| skill.name == "home-disabled") - ); - assert!( - response.skills[0] - .skills - .iter() - .all(|skill| skill.name != "repo-disabled") - ); - - Ok(()) -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn skill_load_errors_surface_in_session_configured() -> Result<()> { - skip_if_no_network!(Ok(())); - - let server = start_mock_server().await; - let mut builder = test_codex().with_pre_build_hook(|home| { - let skill_dir = home.join("skills").join("broken"); - fs::create_dir_all(&skill_dir).unwrap(); - fs::write(skill_dir.join("SKILL.md"), "not yaml").unwrap(); - }); - let test = builder.build(&server).await?; - - test.codex - .submit(Op::ListSkills { - cwds: Vec::new(), - force_reload: false, - }) - .await?; - let response = - core_test_support::wait_for_event_match(test.codex.as_ref(), |event| match event { - codex_protocol::protocol::EventMsg::ListSkillsResponse(response) => { - Some(response.clone()) - } - _ => None, - }) - .await; - - let cwd = test.cwd_path(); - let (skills, errors) = response - .skills - .iter() - .find(|entry| entry.cwd.as_path() == cwd) - .map(|entry| (entry.skills.clone(), entry.errors.clone())) - .unwrap_or_default(); - - assert!( - skills.iter().all(|skill| { - !skill - .path - .to_string_lossy() - .ends_with("skills/broken/SKILL.md") - }), - "expected broken skill not loaded, got {skills:?}" - ); - assert_eq!(errors.len(), 1, "expected one load error"); - let error_path = errors[0].path.to_string_lossy(); - assert!( - error_path.ends_with("skills/broken/SKILL.md"), - "unexpected error path: {error_path}" - ); - - Ok(()) -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn list_skills_includes_system_cache_entries() -> Result<()> { - skip_if_no_network!(Ok(())); - - const SYSTEM_SKILL_NAME: &str = "skill-creator"; - - let server = start_mock_server().await; - let mut builder = test_codex().with_pre_build_hook(|home| { - let system_skill_path = system_skill_md_path(home, SYSTEM_SKILL_NAME); - assert!( - !system_skill_path.exists(), - "expected embedded system skills not yet installed, but {system_skill_path:?} exists" - ); - }); - let test = builder.build(&server).await?; - - let system_skill_path = system_skill_md_path(test.codex_home_path(), SYSTEM_SKILL_NAME); - assert!( - system_skill_path.exists(), - "expected embedded system skills installed to {system_skill_path:?}" - ); - let system_skill_contents = fs::read_to_string(&system_skill_path)?; - let expected_name_line = format!("name: {SYSTEM_SKILL_NAME}"); - assert!( - system_skill_contents.contains(&expected_name_line), - "expected embedded system skill file, got:\n{system_skill_contents}" - ); - - test.codex - .submit(Op::ListSkills { - cwds: Vec::new(), - force_reload: true, - }) - .await?; - let response = - core_test_support::wait_for_event_match(test.codex.as_ref(), |event| match event { - codex_protocol::protocol::EventMsg::ListSkillsResponse(response) => { - Some(response.clone()) - } - _ => None, - }) - .await; - - let cwd = test.cwd_path(); - let (skills, _errors) = response - .skills - .iter() - .find(|entry| entry.cwd.as_path() == cwd) - .map(|entry| (entry.skills.clone(), entry.errors.clone())) - .unwrap_or_default(); - - let skill = skills - .iter() - .find(|skill| skill.name == SYSTEM_SKILL_NAME) - .expect("expected system skill to be present"); - assert_eq!(skill.scope, codex_protocol::protocol::SkillScope::System); - let path_str = skill.path.to_string_lossy().replace('\\', "/"); - let expected_path_suffix = format!("/skills/.system/{SYSTEM_SKILL_NAME}/SKILL.md"); - assert!( - path_str.ends_with(&expected_path_suffix), - "unexpected skill path: {path_str}" - ); - - Ok(()) -} diff --git a/vendor/codex/codex-rs/docs/protocol_v1.md b/vendor/codex/codex-rs/docs/protocol_v1.md index e4dc56a6..9fe76a80 100644 --- a/vendor/codex/codex-rs/docs/protocol_v1.md +++ b/vendor/codex/codex-rs/docs/protocol_v1.md @@ -70,7 +70,6 @@ For complete documentation of the `Op` and `EventMsg` variants, refer to [protoc - `Op::Interrupt` – Interrupts a running turn - `Op::ExecApproval` – Approve or deny code execution - `Op::UserInputAnswer` – Provide answers for a `request_user_input` tool call - - `Op::ListSkills` – Request skills for one or more cwd values (optionally `force_reload`) - `Op::UserTurn` and `Op::OverrideTurnContext` accept an optional `personality` override that updates the model’s communication style Valid `personality` values are `friendly`, `pragmatic`, and `none`. When `none` is selected, the personality placeholder is replaced with an empty string. @@ -86,7 +85,6 @@ Valid `personality` values are `friendly`, `pragmatic`, and `none`. When `none` - `EventMsg::Error` – A turn stopped with an error - `EventMsg::Warning` – A non-fatal warning that the client should surface to the user - `EventMsg::TurnComplete` – Contains a `response_id` bookmark for last `response_id` executed by the turn. This can be used to continue the turn at a later point in time, perhaps with additional user input. - - `EventMsg::ListSkillsResponse` – Response payload with per-cwd skill entries (`cwd`, `skills`, `errors`) ### UserInput items diff --git a/vendor/codex/codex-rs/mcp-server/src/codex_tool_runner.rs b/vendor/codex/codex-rs/mcp-server/src/codex_tool_runner.rs index e0ed2d17..78c5a7fa 100644 --- a/vendor/codex/codex-rs/mcp-server/src/codex_tool_runner.rs +++ b/vendor/codex/codex-rs/mcp-server/src/codex_tool_runner.rs @@ -340,7 +340,6 @@ async fn run_codex_tool_session_inner( | EventMsg::McpToolCallBegin(_) | EventMsg::McpToolCallEnd(_) | EventMsg::McpListToolsResponse(_) - | EventMsg::ListSkillsResponse(_) | EventMsg::RealtimeConversationListVoicesResponse(_) | EventMsg::ExecCommandBegin(_) | EventMsg::TerminalInteraction(_) diff --git a/vendor/codex/codex-rs/protocol/src/protocol.rs b/vendor/codex/codex-rs/protocol/src/protocol.rs index 10141719..81df1061 100644 --- a/vendor/codex/codex-rs/protocol/src/protocol.rs +++ b/vendor/codex/codex-rs/protocol/src/protocol.rs @@ -732,19 +732,6 @@ pub enum Op { /// enable/disable state) without restarting the thread. ReloadUserConfig, - /// Request the list of skills for the provided `cwd` values or the session default. - ListSkills { - /// Working directories to scope repo skills discovery. - /// - /// When empty, the session default working directory is used. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - cwds: Vec, - - /// When true, recompute skills even if a cached result exists. - #[serde(default, skip_serializing_if = "std::ops::Not::not")] - force_reload: bool, - }, - /// Request the agent to summarize the current conversation context. /// The agent will use its existing context (either conversation history or previous response id) /// to generate a summary which will be returned as an AgentMessage event. @@ -893,7 +880,6 @@ impl Op { Self::ListMcpTools => "list_mcp_tools", Self::RefreshMcpServers { .. } => "refresh_mcp_servers", Self::ReloadUserConfig => "reload_user_config", - Self::ListSkills { .. } => "list_skills", Self::Compact => "compact", Self::DropMemories => "drop_memories", Self::UpdateMemories => "update_memories", @@ -1668,9 +1654,6 @@ pub enum EventMsg { /// List of MCP tools available to the agent. McpListToolsResponse(McpListToolsResponseEvent), - /// List of skills available to the agent. - ListSkillsResponse(ListSkillsResponseEvent), - /// List of voices supported by realtime conversation streams. RealtimeConversationListVoicesResponse(RealtimeConversationListVoicesResponseEvent), @@ -3564,12 +3547,6 @@ impl fmt::Display for McpAuthStatus { } } -/// Response payload for `Op::ListSkills`. -#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)] -pub struct ListSkillsResponseEvent { - pub skills: Vec, -} - #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)] pub struct RealtimeConversationListVoicesResponseEvent { pub voices: RealtimeVoicesList, @@ -3679,19 +3656,6 @@ pub struct SkillToolDependency { pub url: Option, } -#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)] -pub struct SkillErrorInfo { - pub path: PathBuf, - pub message: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS)] -pub struct SkillsListEntry { - pub cwd: PathBuf, - pub skills: Vec, - pub errors: Vec, -} - #[derive(Debug, Clone, Deserialize, Serialize, JsonSchema, TS, PartialEq, Eq)] pub struct SessionNetworkProxyRuntime { pub http_addr: String, diff --git a/vendor/codex/codex-rs/rollout/src/policy.rs b/vendor/codex/codex-rs/rollout/src/policy.rs index cfc234de..af58beec 100644 --- a/vendor/codex/codex-rs/rollout/src/policy.rs +++ b/vendor/codex/codex-rs/rollout/src/policy.rs @@ -166,7 +166,6 @@ fn event_msg_persistence_mode(ev: &EventMsg) -> Option { | EventMsg::RealtimeConversationListVoicesResponse(_) | EventMsg::McpStartupUpdate(_) | EventMsg::McpStartupComplete(_) - | EventMsg::ListSkillsResponse(_) | EventMsg::PlanUpdate(_) | EventMsg::ShutdownComplete | EventMsg::DeprecationNotice(_) diff --git a/vendor/codex/codex-rs/tui/src/app.rs b/vendor/codex/codex-rs/tui/src/app.rs index c52da4cd..2bbbeaeb 100644 --- a/vendor/codex/codex-rs/tui/src/app.rs +++ b/vendor/codex/codex-rs/tui/src/app.rs @@ -90,8 +90,6 @@ use codex_app_server_protocol::RequestId; use codex_app_server_protocol::SendAddCreditsNudgeEmailParams; use codex_app_server_protocol::ServerNotification; use codex_app_server_protocol::ServerRequest; -use codex_app_server_protocol::SkillsListParams; -use codex_app_server_protocol::SkillsListResponse; use codex_app_server_protocol::ThreadItem; use codex_app_server_protocol::ThreadLoadedListParams; use codex_app_server_protocol::ThreadMemoryMode; @@ -121,14 +119,12 @@ use codex_protocol::openai_models::ReasoningEffort as ReasoningEffortConfig; use codex_protocol::protocol::AskForApproval; use codex_protocol::protocol::FinalOutput; use codex_protocol::protocol::GetHistoryEntryResponseEvent; -use codex_protocol::protocol::ListSkillsResponseEvent; #[cfg(test)] use codex_protocol::protocol::McpAuthStatus; use codex_protocol::protocol::Op; use codex_protocol::protocol::RateLimitSnapshot; use codex_protocol::protocol::SandboxPolicy; use codex_protocol::protocol::SessionSource; -use codex_protocol::protocol::SkillErrorInfo; use codex_protocol::protocol::TokenUsage; use codex_terminal_detection::user_agent; use codex_utils_absolute_path::AbsolutePathBuf; @@ -387,86 +383,6 @@ fn rollout_path_is_resumable(rollout_path: &Path) -> bool { std::fs::metadata(rollout_path).is_ok_and(|metadata| metadata.is_file() && metadata.len() > 0) } -fn errors_for_cwd(cwd: &Path, response: &ListSkillsResponseEvent) -> Vec { - response - .skills - .iter() - .find(|entry| entry.cwd.as_path() == cwd) - .map(|entry| entry.errors.clone()) - .unwrap_or_default() -} - -fn list_skills_response_to_core(response: SkillsListResponse) -> ListSkillsResponseEvent { - ListSkillsResponseEvent { - skills: response - .data - .into_iter() - .map(|entry| codex_protocol::protocol::SkillsListEntry { - cwd: entry.cwd, - skills: entry - .skills - .into_iter() - .map(|skill| codex_protocol::protocol::SkillMetadata { - name: skill.name, - description: skill.description, - short_description: skill.short_description, - interface: skill.interface.map(|interface| { - codex_protocol::protocol::SkillInterface { - display_name: interface.display_name, - short_description: interface.short_description, - icon_small: interface.icon_small, - icon_large: interface.icon_large, - brand_color: interface.brand_color, - default_prompt: interface.default_prompt, - } - }), - dependencies: skill.dependencies.map(|dependencies| { - codex_protocol::protocol::SkillDependencies { - tools: dependencies - .tools - .into_iter() - .map(|tool| codex_protocol::protocol::SkillToolDependency { - r#type: tool.r#type, - value: tool.value, - description: tool.description, - transport: tool.transport, - command: tool.command, - url: tool.url, - }) - .collect(), - } - }), - path: skill.path, - scope: match skill.scope { - codex_app_server_protocol::SkillScope::User => { - codex_protocol::protocol::SkillScope::User - } - codex_app_server_protocol::SkillScope::Repo => { - codex_protocol::protocol::SkillScope::Repo - } - codex_app_server_protocol::SkillScope::System => { - codex_protocol::protocol::SkillScope::System - } - codex_app_server_protocol::SkillScope::Admin => { - codex_protocol::protocol::SkillScope::Admin - } - }, - enabled: skill.enabled, - }) - .collect(), - errors: entry - .errors - .into_iter() - .map(|error| codex_protocol::protocol::SkillErrorInfo { - path: error.path, - message: error.message, - }) - .collect(), - }) - .collect(), - } -} - #[derive(Debug, Clone, PartialEq, Eq)] struct SessionSummary { usage_line: Option, @@ -898,7 +814,6 @@ impl App { tokio::pin!(tui_events); tui.frame_requester().schedule_frame(); - app.refresh_startup_skills(&app_server); // Kick off a non-blocking rate-limit prefetch so the first `/status` // already has data, without delaying the initial frame render. if requires_openai_auth && has_chatgpt_account { diff --git a/vendor/codex/codex-rs/tui/src/app/background_requests.rs b/vendor/codex/codex-rs/tui/src/app/background_requests.rs index 3f391ea8..91284f75 100644 --- a/vendor/codex/codex-rs/tui/src/app/background_requests.rs +++ b/vendor/codex/codex-rs/tui/src/app/background_requests.rs @@ -59,25 +59,6 @@ impl App { }); } - /// Starts the initial skills refresh without delaying the first interactive frame. - /// - /// Startup only needs skill metadata to populate skill mentions and the skills UI; the prompt can be - /// rendered before that metadata arrives. The result is routed through the normal app event queue so - /// the same response handler updates the chat widget and emits invalid `SKILL.md` warnings once the - /// app-server RPC finishes. User-initiated skills refreshes still use the blocking app command path so - /// callers that explicitly asked for fresh skill state do not race ahead of their own refresh. - pub(super) fn refresh_startup_skills(&mut self, app_server: &AppServerSession) { - let request_handle = app_server.request_handle(); - let app_event_tx = self.app_event_tx.clone(); - let cwd = self.config.cwd.to_path_buf(); - tokio::spawn(async move { - let result = fetch_skills_list(request_handle, cwd) - .await - .map_err(|err| format!("{err:#}")); - app_event_tx.send(AppEvent::SkillsListLoaded { result }); - }); - } - pub(super) fn submit_feedback( &mut self, app_server: &AppServerSession, @@ -311,26 +292,6 @@ pub(super) async fn send_add_credits_nudge_email( Ok(response.status) } -pub(super) async fn fetch_skills_list( - request_handle: AppServerRequestHandle, - cwd: PathBuf, -) -> Result { - let request_id = RequestId::String(format!("startup-skills-list-{}", Uuid::new_v4())); - // Use the cloneable request handle so startup can issue this RPC from a background task without - // extending a borrow of `AppServerSession` across the first frame render. - request_handle - .request_typed(ClientRequest::SkillsList { - request_id, - params: SkillsListParams { - cwds: vec![cwd], - force_reload: true, - per_cwd_extra_user_roots: None, - }, - }) - .await - .wrap_err("skills/list failed in TUI") -} - pub(super) fn build_feedback_upload_params( origin_thread_id: Option, rollout_path: Option, diff --git a/vendor/codex/codex-rs/tui/src/app/event_dispatch.rs b/vendor/codex/codex-rs/tui/src/app/event_dispatch.rs index 5d3fc5b5..296fd0ad 100644 --- a/vendor/codex/codex-rs/tui/src/app/event_dispatch.rs +++ b/vendor/codex/codex-rs/tui/src/app/event_dispatch.rs @@ -280,12 +280,6 @@ impl App { AppEvent::McpInventoryLoaded { result, detail } => { self.handle_mcp_inventory_result(result, detail); } - AppEvent::SkillsListLoaded { result } => { - self.handle_skills_list_result( - result.map_err(|err| color_eyre::eyre::eyre!(err)), - "failed to load skills on startup", - ); - } AppEvent::StartFileSearch(query) => { self.file_search.on_user_query(query); } @@ -1153,39 +1147,6 @@ impl App { .handle_start_side(tui, app_server, parent_thread_id, user_message) .await; } - AppEvent::OpenSkillsList => { - self.chat_widget.open_skills_list(); - } - AppEvent::OpenManageSkillsPopup => { - self.chat_widget.open_manage_skills_popup(); - } - AppEvent::SetSkillEnabled { path, enabled } => { - let edits = [ConfigEdit::SetSkillConfig { - path: path.to_path_buf(), - enabled, - }]; - match ConfigEditsBuilder::new(&self.config.codex_home) - .with_edits(edits) - .apply() - .await - { - Ok(()) => { - self.chat_widget.update_skill_enabled(path, enabled); - if let Err(err) = self.refresh_in_memory_config_from_disk().await { - tracing::warn!( - error = %err, - "failed to refresh config after skill toggle" - ); - } - } - Err(err) => { - let path_display = path.display(); - self.chat_widget.add_error_message(format!( - "Failed to update skill config for {path_display}: {err}" - )); - } - } - } AppEvent::OpenPermissionsPopup => { self.chat_widget.open_permissions_popup(); } @@ -1205,9 +1166,6 @@ impl App { self.chat_widget .submit_user_message_with_mode(text, collaboration_mode); } - AppEvent::ManageSkillsClosed => { - self.chat_widget.handle_manage_skills_closed(); - } AppEvent::FullScreenApprovalRequest(request) => match request { ApprovalRequest::ApplyPatch { cwd, changes, .. } => { let _ = tui.enter_alt_screen(); diff --git a/vendor/codex/codex-rs/tui/src/app/startup_prompts.rs b/vendor/codex/codex-rs/tui/src/app/startup_prompts.rs index c5bc541a..dce73807 100644 --- a/vendor/codex/codex-rs/tui/src/app/startup_prompts.rs +++ b/vendor/codex/codex-rs/tui/src/app/startup_prompts.rs @@ -5,27 +5,6 @@ use super::*; -pub(super) fn emit_skill_load_warnings(app_event_tx: &AppEventSender, errors: &[SkillErrorInfo]) { - if errors.is_empty() { - return; - } - - let error_count = errors.len(); - app_event_tx.send(AppEvent::InsertHistoryCell(Box::new( - crate::history_cell::new_warning_event(format!( - "Skipped loading {error_count} skill(s) due to invalid SKILL.md files." - )), - ))); - - for error in errors { - let path = error.path.display(); - let message = error.message.as_str(); - app_event_tx.send(AppEvent::InsertHistoryCell(Box::new( - crate::history_cell::new_warning_event(format!("{path}: {message}")), - ))); - } -} - pub(super) fn emit_project_config_warnings(app_event_tx: &AppEventSender, config: &Config) { let mut disabled_folders = Vec::new(); @@ -51,7 +30,7 @@ pub(super) fn emit_project_config_warnings(app_event_tx: &AppEventSender, config let mut message = concat!( "Project-local config, hooks, and exec policies are disabled in the following folders ", - "until the project is trusted, but skills still load.\n", + "until the project is trusted.\n", ) .to_string(); for (index, (folder, reason)) in disabled_folders.iter().enumerate() { diff --git a/vendor/codex/codex-rs/tui/src/app/thread_routing.rs b/vendor/codex/codex-rs/tui/src/app/thread_routing.rs index 241695cc..849c27ff 100644 --- a/vendor/codex/codex-rs/tui/src/app/thread_routing.rs +++ b/vendor/codex/codex-rs/tui/src/app/thread_routing.rs @@ -592,19 +592,6 @@ impl App { } Ok(true) } - AppCommandView::ListSkills { cwds, force_reload } => { - self.handle_skills_list_result( - app_server - .skills_list(codex_app_server_protocol::SkillsListParams { - cwds: cwds.to_vec(), - force_reload, - per_cwd_extra_user_roots: None, - }) - .await, - "failed to refresh skills", - ); - Ok(true) - } AppCommandView::Compact => { app_server.thread_compact_start(thread_id).await?; Ok(true) @@ -682,21 +669,6 @@ impl App { } } - pub(super) fn handle_skills_list_result( - &mut self, - result: Result, - failure_message: &str, - ) { - match result { - Ok(response) => self.handle_skills_list_response(response), - Err(err) => { - tracing::warn!("{failure_message}: {err:#}"); - self.chat_widget - .add_error_message(format!("{failure_message}: {err:#}")); - } - } - } - pub(super) async fn try_resolve_app_server_request( &mut self, app_server: &AppServerSession, @@ -1271,15 +1243,6 @@ impl App { waiting_for_initial_session_configured && primary_thread_id.is_some() } - #[allow(clippy::too_many_arguments)] - pub(super) fn handle_skills_list_response(&mut self, response: SkillsListResponse) { - let response = list_skills_response_to_core(response); - let cwd = self.chat_widget.config_ref().cwd.clone(); - let errors = errors_for_cwd(&cwd, &response); - emit_skill_load_warnings(&self.app_event_tx, &errors); - self.chat_widget.handle_skills_list_response(response); - } - pub(super) async fn handle_thread_rollback_response( &mut self, thread_id: ThreadId, diff --git a/vendor/codex/codex-rs/tui/src/app_command.rs b/vendor/codex/codex-rs/tui/src/app_command.rs index e2a4aa73..a5801f4b 100644 --- a/vendor/codex/codex-rs/tui/src/app_command.rs +++ b/vendor/codex/codex-rs/tui/src/app_command.rs @@ -90,10 +90,6 @@ pub(crate) enum AppCommandView<'a> { response: &'a RequestPermissionsResponse, }, ReloadUserConfig, - ListSkills { - cwds: &'a [PathBuf], - force_reload: bool, - }, Compact, SetThreadName { name: &'a str, @@ -238,10 +234,6 @@ impl AppCommand { Self(Op::RequestPermissionsResponse { id, response }) } - pub(crate) fn list_skills(cwds: Vec, force_reload: bool) -> Self { - Self(Op::ListSkills { cwds, force_reload }) - } - pub(crate) fn compact() -> Self { Self(Op::Compact) } @@ -365,10 +357,6 @@ impl AppCommand { AppCommandView::RequestPermissionsResponse { id, response } } Op::ReloadUserConfig => AppCommandView::ReloadUserConfig, - Op::ListSkills { cwds, force_reload } => AppCommandView::ListSkills { - cwds, - force_reload: *force_reload, - }, Op::Compact => AppCommandView::Compact, Op::SetThreadName { name } => AppCommandView::SetThreadName { name }, Op::Shutdown => AppCommandView::Shutdown, diff --git a/vendor/codex/codex-rs/tui/src/app_event.rs b/vendor/codex/codex-rs/tui/src/app_event.rs index 474fcaf6..6a12c742 100644 --- a/vendor/codex/codex-rs/tui/src/app_event.rs +++ b/vendor/codex/codex-rs/tui/src/app_event.rs @@ -14,14 +14,12 @@ use codex_app_server_protocol::AddCreditsNudgeCreditType; use codex_app_server_protocol::AddCreditsNudgeEmailStatus; use codex_app_server_protocol::McpServerStatus; use codex_app_server_protocol::McpServerStatusDetail; -use codex_app_server_protocol::SkillsListResponse; use codex_file_search::FileMatch; use codex_protocol::ThreadId; use codex_protocol::openai_models::ModelPreset; use codex_protocol::protocol::GetHistoryEntryResponseEvent; use codex_protocol::protocol::Op; use codex_protocol::protocol::RateLimitSnapshot; -use codex_utils_absolute_path::AbsolutePathBuf; use codex_utils_approval_presets::ApprovalPreset; use crate::bottom_pane::ApprovalRequest; @@ -204,15 +202,6 @@ pub(crate) enum AppEvent { detail: McpServerStatusDetail, }, - /// Result of the startup skills refresh that runs after the first frame is scheduled. - /// - /// This event is startup-only. Interactive skills refreshes are handled synchronously through the app - /// command path because those callers expect the visible skill state to be current when their command - /// completes. - SkillsListLoaded { - result: Result, - }, - InsertHistoryCell(Box), /// Apply rollback semantics to local transcript cells. @@ -430,21 +419,6 @@ pub(crate) enum AppEvent { /// Re-open the approval presets popup. OpenApprovalsPopup, - /// Open the skills list popup. - OpenSkillsList, - - /// Open the skills enable/disable picker. - OpenManageSkillsPopup, - - /// Enable or disable a skill by path. - SetSkillEnabled { - path: AbsolutePathBuf, - enabled: bool, - }, - - /// Notify that the manage skills popup was closed. - ManageSkillsClosed, - /// Re-open the permissions presets popup. OpenPermissionsPopup, diff --git a/vendor/codex/codex-rs/tui/src/app_event_sender.rs b/vendor/codex/codex-rs/tui/src/app_event_sender.rs index af95fd7d..7cf644bd 100644 --- a/vendor/codex/codex-rs/tui/src/app_event_sender.rs +++ b/vendor/codex/codex-rs/tui/src/app_event_sender.rs @@ -1,5 +1,3 @@ -use std::path::PathBuf; - use crate::app_command::AppCommand; use codex_protocol::ThreadId; use codex_protocol::approvals::ElicitationAction; @@ -57,12 +55,6 @@ impl AppEventSender { )); } - pub(crate) fn list_skills(&self, cwds: Vec, force_reload: bool) { - self.send(AppEvent::CodexOp( - AppCommand::list_skills(cwds, force_reload).into_core(), - )); - } - #[cfg_attr(target_os = "linux", allow(dead_code))] pub(crate) fn realtime_conversation_audio(&self, params: ConversationAudioParams) { self.send(AppEvent::CodexOp( diff --git a/vendor/codex/codex-rs/tui/src/app_server_session.rs b/vendor/codex/codex-rs/tui/src/app_server_session.rs index 12ce9276..9b2c0744 100644 --- a/vendor/codex/codex-rs/tui/src/app_server_session.rs +++ b/vendor/codex/codex-rs/tui/src/app_server_session.rs @@ -27,8 +27,6 @@ use codex_app_server_protocol::RequestId; use codex_app_server_protocol::ReviewDelivery; use codex_app_server_protocol::ReviewStartParams; use codex_app_server_protocol::ReviewStartResponse; -use codex_app_server_protocol::SkillsListParams; -use codex_app_server_protocol::SkillsListResponse; use codex_app_server_protocol::Thread; use codex_app_server_protocol::ThreadApproveGuardianDeniedActionParams; use codex_app_server_protocol::ThreadApproveGuardianDeniedActionResponse; @@ -777,17 +775,6 @@ impl AppServerSession { .wrap_err("review/start failed in TUI") } - pub(crate) async fn skills_list( - &mut self, - params: SkillsListParams, - ) -> Result { - let request_id = self.next_request_id(); - self.client - .request_typed(ClientRequest::SkillsList { request_id, params }) - .await - .wrap_err("skills/list failed in TUI") - } - pub(crate) async fn reload_user_config(&mut self) -> Result<()> { let request_id = self.next_request_id(); let _: ConfigWriteResponse = self diff --git a/vendor/codex/codex-rs/tui/src/bottom_pane/chat_composer.rs b/vendor/codex/codex-rs/tui/src/bottom_pane/chat_composer.rs index 4da7010d..ea0deb30 100644 --- a/vendor/codex/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/vendor/codex/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -1469,13 +1469,6 @@ impl ChatComposer { cmd }); if let Some(cmd) = selected_cmd { - if cmd == SlashCommand::Skills { - self.stage_selected_slash_command_history(cmd); - self.textarea.set_text_clearing_elements(""); - self.is_bash_mode = false; - return (InputResult::Command(cmd), true); - } - let selected_command_text = format!("/{}", cmd.command()); let starts_with_cmd = first_line.trim_start().starts_with(&selected_command_text); diff --git a/vendor/codex/codex-rs/tui/src/bottom_pane/mod.rs b/vendor/codex/codex-rs/tui/src/bottom_pane/mod.rs index 632df384..32d35d0f 100644 --- a/vendor/codex/codex-rs/tui/src/bottom_pane/mod.rs +++ b/vendor/codex/codex-rs/tui/src/bottom_pane/mod.rs @@ -80,7 +80,6 @@ mod list_selection_view; mod memories_settings_view; pub(crate) mod prompt_args; mod skill_popup; -mod skills_toggle_view; pub(crate) mod slash_commands; pub(crate) use footer::CollaborationModeIndicator; pub(crate) use list_selection_view::SelectionViewParams; @@ -95,8 +94,6 @@ pub(crate) use feedback_view::feedback_disabled_params; pub(crate) use feedback_view::feedback_selection_params; pub(crate) use feedback_view::feedback_success_cell; pub(crate) use feedback_view::feedback_upload_consent_params; -pub(crate) use skills_toggle_view::SkillsToggleItem; -pub(crate) use skills_toggle_view::SkillsToggleView; pub(crate) use status_line_setup::StatusLineItem; pub(crate) use status_line_setup::StatusLineSetupView; pub(crate) use status_surface_preview::StatusSurfacePreviewData; diff --git a/vendor/codex/codex-rs/tui/src/bottom_pane/skills_toggle_view.rs b/vendor/codex/codex-rs/tui/src/bottom_pane/skills_toggle_view.rs deleted file mode 100644 index 85c014f6..00000000 --- a/vendor/codex/codex-rs/tui/src/bottom_pane/skills_toggle_view.rs +++ /dev/null @@ -1,435 +0,0 @@ -use codex_utils_absolute_path::AbsolutePathBuf; -use crossterm::event::KeyCode; -use crossterm::event::KeyEvent; -use crossterm::event::KeyModifiers; -use ratatui::buffer::Buffer; -use ratatui::layout::Constraint; -use ratatui::layout::Layout; -use ratatui::layout::Rect; -use ratatui::style::Stylize; -use ratatui::text::Line; -use ratatui::widgets::Block; -use ratatui::widgets::Widget; - -use crate::app_event::AppEvent; -use crate::app_event_sender::AppEventSender; -use crate::key_hint; -use crate::render::Insets; -use crate::render::RectExt as _; -use crate::render::renderable::ColumnRenderable; -use crate::render::renderable::Renderable; -use crate::skills_helpers::match_skill; -use crate::skills_helpers::truncate_skill_name; -use crate::style::user_message_style; - -use super::CancellationEvent; -use super::bottom_pane_view::BottomPaneView; -use super::popup_consts::MAX_POPUP_ROWS; -use super::scroll_state::ScrollState; -use super::selection_popup_common::GenericDisplayRow; -use super::selection_popup_common::render_rows_single_line; - -const SEARCH_PLACEHOLDER: &str = "Type to search skills"; -const SEARCH_PROMPT_PREFIX: &str = "> "; - -pub(crate) struct SkillsToggleItem { - pub name: String, - pub skill_name: String, - pub description: String, - pub enabled: bool, - pub path: AbsolutePathBuf, -} - -pub(crate) struct SkillsToggleView { - items: Vec, - state: ScrollState, - complete: bool, - app_event_tx: AppEventSender, - header: Box, - footer_hint: Line<'static>, - search_query: String, - filtered_indices: Vec, -} - -impl SkillsToggleView { - pub(crate) fn new(items: Vec, app_event_tx: AppEventSender) -> Self { - let mut header = ColumnRenderable::new(); - header.push(Line::from("Enable/Disable Skills".bold())); - header.push(Line::from( - "Turn skills on or off. Your changes are saved automatically.".dim(), - )); - - let mut view = Self { - items, - state: ScrollState::new(), - complete: false, - app_event_tx, - header: Box::new(header), - footer_hint: skills_toggle_hint_line(), - search_query: String::new(), - filtered_indices: Vec::new(), - }; - view.apply_filter(); - view - } - - fn visible_len(&self) -> usize { - self.filtered_indices.len() - } - - fn max_visible_rows(len: usize) -> usize { - MAX_POPUP_ROWS.min(len.max(1)) - } - - fn apply_filter(&mut self) { - // Filter + sort while preserving the current selection when possible. - let previously_selected = self - .state - .selected_idx - .and_then(|visible_idx| self.filtered_indices.get(visible_idx).copied()); - - let filter = self.search_query.trim(); - if filter.is_empty() { - self.filtered_indices = (0..self.items.len()).collect(); - } else { - let mut matches: Vec<(usize, i32)> = Vec::new(); - for (idx, item) in self.items.iter().enumerate() { - let display_name = item.name.as_str(); - if let Some((_indices, score)) = match_skill(filter, display_name, &item.skill_name) - { - matches.push((idx, score)); - } - } - - matches.sort_by(|a, b| { - a.1.cmp(&b.1).then_with(|| { - let an = self.items[a.0].name.as_str(); - let bn = self.items[b.0].name.as_str(); - an.cmp(bn) - }) - }); - - self.filtered_indices = matches.into_iter().map(|(idx, _score)| idx).collect(); - } - - let len = self.filtered_indices.len(); - self.state.selected_idx = previously_selected - .and_then(|actual_idx| { - self.filtered_indices - .iter() - .position(|idx| *idx == actual_idx) - }) - .or_else(|| (len > 0).then_some(0)); - - let visible = Self::max_visible_rows(len); - self.state.clamp_selection(len); - self.state.ensure_visible(len, visible); - } - - fn build_rows(&self) -> Vec { - self.filtered_indices - .iter() - .enumerate() - .filter_map(|(visible_idx, actual_idx)| { - self.items.get(*actual_idx).map(|item| { - let is_selected = self.state.selected_idx == Some(visible_idx); - let prefix = if is_selected { '›' } else { ' ' }; - let marker = if item.enabled { 'x' } else { ' ' }; - let item_name = truncate_skill_name(&item.name); - let name = format!("{prefix} [{marker}] {item_name}"); - GenericDisplayRow { - name, - description: Some(item.description.clone()), - ..Default::default() - } - }) - }) - .collect() - } - - fn move_up(&mut self) { - let len = self.visible_len(); - self.state.move_up_wrap(len); - let visible = Self::max_visible_rows(len); - self.state.ensure_visible(len, visible); - } - - fn move_down(&mut self) { - let len = self.visible_len(); - self.state.move_down_wrap(len); - let visible = Self::max_visible_rows(len); - self.state.ensure_visible(len, visible); - } - - fn toggle_selected(&mut self) { - let Some(idx) = self.state.selected_idx else { - return; - }; - let Some(actual_idx) = self.filtered_indices.get(idx).copied() else { - return; - }; - let Some(item) = self.items.get_mut(actual_idx) else { - return; - }; - - item.enabled = !item.enabled; - self.app_event_tx.send(AppEvent::SetSkillEnabled { - path: item.path.clone(), - enabled: item.enabled, - }); - } - - fn close(&mut self) { - if self.complete { - return; - } - self.complete = true; - self.app_event_tx.send(AppEvent::ManageSkillsClosed); - self.app_event_tx - .list_skills(Vec::new(), /*force_reload*/ true); - } - - fn rows_width(total_width: u16) -> u16 { - total_width.saturating_sub(2) - } - - fn rows_height(&self, rows: &[GenericDisplayRow]) -> u16 { - rows.len().clamp(1, MAX_POPUP_ROWS).try_into().unwrap_or(1) - } -} - -impl BottomPaneView for SkillsToggleView { - fn handle_key_event(&mut self, key_event: KeyEvent) { - match key_event { - KeyEvent { - code: KeyCode::Up, .. - } - | KeyEvent { - code: KeyCode::Char('p'), - modifiers: KeyModifiers::CONTROL, - .. - } - | KeyEvent { - code: KeyCode::Char('\u{0010}'), - modifiers: KeyModifiers::NONE, - .. - } /* ^P */ => self.move_up(), - KeyEvent { - code: KeyCode::Down, - .. - } - | KeyEvent { - code: KeyCode::Char('n'), - modifiers: KeyModifiers::CONTROL, - .. - } - | KeyEvent { - code: KeyCode::Char('\u{000e}'), - modifiers: KeyModifiers::NONE, - .. - } /* ^N */ => self.move_down(), - KeyEvent { - code: KeyCode::Backspace, - .. - } => { - self.search_query.pop(); - self.apply_filter(); - } - KeyEvent { - code: KeyCode::Char(' '), - modifiers: KeyModifiers::NONE, - .. - } - | KeyEvent { - code: KeyCode::Enter, - modifiers: KeyModifiers::NONE, - .. - } => self.toggle_selected(), - KeyEvent { - code: KeyCode::Esc, .. - } => { - self.on_ctrl_c(); - } - KeyEvent { - code: KeyCode::Char(c), - modifiers, - .. - } if !modifiers.contains(KeyModifiers::CONTROL) - && !modifiers.contains(KeyModifiers::ALT) => - { - self.search_query.push(c); - self.apply_filter(); - } - _ => {} - } - } - - fn is_complete(&self) -> bool { - self.complete - } - - fn on_ctrl_c(&mut self) -> CancellationEvent { - self.close(); - CancellationEvent::Handled - } -} - -impl Renderable for SkillsToggleView { - fn desired_height(&self, width: u16) -> u16 { - let rows = self.build_rows(); - let rows_height = self.rows_height(&rows); - - let mut height = self.header.desired_height(width.saturating_sub(4)); - height = height.saturating_add(rows_height + 3); - height = height.saturating_add(2); - height.saturating_add(1) - } - - fn render(&self, area: Rect, buf: &mut Buffer) { - if area.height == 0 || area.width == 0 { - return; - } - - // Reserve the footer line for the key-hint row. - let [content_area, footer_area] = - Layout::vertical([Constraint::Fill(1), Constraint::Length(1)]).areas(area); - - Block::default() - .style(user_message_style()) - .render(content_area, buf); - - let header_height = self - .header - .desired_height(content_area.width.saturating_sub(4)); - let rows = self.build_rows(); - let rows_width = Self::rows_width(content_area.width); - let rows_height = self.rows_height(&rows); - let [header_area, _, search_area, list_area] = Layout::vertical([ - Constraint::Max(header_height), - Constraint::Max(1), - Constraint::Length(2), - Constraint::Length(rows_height), - ]) - .areas(content_area.inset(Insets::vh(/*v*/ 1, /*h*/ 2))); - - self.header.render(header_area, buf); - - // Render the search prompt as two lines to mimic the composer. - if search_area.height >= 2 { - let [placeholder_area, input_area] = - Layout::vertical([Constraint::Length(1), Constraint::Length(1)]).areas(search_area); - Line::from(SEARCH_PLACEHOLDER.dim()).render(placeholder_area, buf); - let line = if self.search_query.is_empty() { - Line::from(vec![SEARCH_PROMPT_PREFIX.dim()]) - } else { - Line::from(vec![ - SEARCH_PROMPT_PREFIX.dim(), - self.search_query.clone().into(), - ]) - }; - line.render(input_area, buf); - } else if search_area.height > 0 { - let query_span = if self.search_query.is_empty() { - SEARCH_PLACEHOLDER.dim() - } else { - self.search_query.clone().into() - }; - Line::from(query_span).render(search_area, buf); - } - - if list_area.height > 0 { - let render_area = Rect { - x: list_area.x.saturating_sub(2), - y: list_area.y, - width: rows_width.max(1), - height: list_area.height, - }; - render_rows_single_line( - render_area, - buf, - &rows, - &self.state, - render_area.height as usize, - "no matches", - ); - } - - let hint_area = Rect { - x: footer_area.x + 2, - y: footer_area.y, - width: footer_area.width.saturating_sub(2), - height: footer_area.height, - }; - self.footer_hint.clone().dim().render(hint_area, buf); - } -} - -fn skills_toggle_hint_line() -> Line<'static> { - Line::from(vec![ - "Press ".into(), - key_hint::plain(KeyCode::Char(' ')).into(), - " or ".into(), - key_hint::plain(KeyCode::Enter).into(), - " to toggle; ".into(), - key_hint::plain(KeyCode::Esc).into(), - " to close".into(), - ]) -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::app_event::AppEvent; - use crate::test_support::PathBufExt; - use crate::test_support::test_path_buf; - use insta::assert_snapshot; - use ratatui::layout::Rect; - use tokio::sync::mpsc::unbounded_channel; - - fn render_lines(view: &SkillsToggleView, width: u16) -> String { - let height = view.desired_height(width); - let area = Rect::new(0, 0, width, height); - let mut buf = Buffer::empty(area); - view.render(area, &mut buf); - - let lines: Vec = (0..area.height) - .map(|row| { - let mut line = String::new(); - for col in 0..area.width { - let symbol = buf[(area.x + col, area.y + row)].symbol(); - if symbol.is_empty() { - line.push(' '); - } else { - line.push_str(symbol); - } - } - line - }) - .collect(); - lines.join("\n") - } - - #[test] - fn renders_basic_popup() { - let (tx_raw, _rx) = unbounded_channel::(); - let tx = AppEventSender::new(tx_raw); - let items = vec![ - SkillsToggleItem { - name: "Repo Scout".to_string(), - skill_name: "repo_scout".to_string(), - description: "Summarize the repo layout".to_string(), - enabled: true, - path: test_path_buf("/tmp/skills/repo_scout.toml").abs(), - }, - SkillsToggleItem { - name: "Changelog Writer".to_string(), - skill_name: "changelog_writer".to_string(), - description: "Draft release notes".to_string(), - enabled: false, - path: test_path_buf("/tmp/skills/changelog_writer.toml").abs(), - }, - ]; - let view = SkillsToggleView::new(items, tx); - assert_snapshot!("skills_toggle_basic", render_lines(&view, /*width*/ 72)); - } -} diff --git a/vendor/codex/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__skills_toggle_view__tests__skills_toggle_basic.snap b/vendor/codex/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__skills_toggle_view__tests__skills_toggle_basic.snap deleted file mode 100644 index e5984581..00000000 --- a/vendor/codex/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__skills_toggle_view__tests__skills_toggle_basic.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tui/src/bottom_pane/skills_toggle_view.rs -expression: "render_lines(&view, 72)" ---- - - Enable/Disable Skills - Turn skills on or off. Your changes are saved automatically. - - Type to search skills - > -› [x] Repo Scout Summarize the repo layout - [ ] Changelog Writer Draft release notes - - Press space or enter to toggle; esc to close diff --git a/vendor/codex/codex-rs/tui/src/chatwidget.rs b/vendor/codex/codex-rs/tui/src/chatwidget.rs index f7823d9f..cac03a22 100644 --- a/vendor/codex/codex-rs/tui/src/chatwidget.rs +++ b/vendor/codex/codex-rs/tui/src/chatwidget.rs @@ -180,7 +180,6 @@ use codex_protocol::protocol::GuardianAssessmentEvent; use codex_protocol::protocol::GuardianAssessmentStatus; use codex_protocol::protocol::ImageGenerationBeginEvent; use codex_protocol::protocol::ImageGenerationEndEvent; -use codex_protocol::protocol::ListSkillsResponseEvent; #[cfg(test)] use codex_protocol::protocol::McpListToolsResponseEvent; #[cfg(test)] @@ -801,7 +800,6 @@ pub(crate) struct ChatWidget { pending_collab_spawn_requests: HashMap, suppressed_exec_calls: HashSet, skills_all: Vec, - skills_initial_state: Option>, last_unified_wait: Option, unified_exec_wait_streak: Option, turn_sleep_inhibitor: SleepInhibitor, @@ -2148,7 +2146,6 @@ impl ChatWidget { self.bump_active_cell_revision(); } self.saw_copy_source_this_turn = false; - self.refresh_skills_for_current_cwd(/*force_reload*/ true); if let Some(user_message) = self.initial_user_message.take() { if self.suppress_initial_user_message_submit { self.initial_user_message = Some(user_message); @@ -5075,7 +5072,6 @@ impl ChatWidget { active_cell_revision: 0, config, skills_all: Vec::new(), - skills_initial_state: None, current_collaboration_mode, active_collaboration_mask, has_chatgpt_account, @@ -6562,10 +6558,6 @@ impl ChatWidget { } } - pub(crate) fn handle_skills_list_response(&mut self, response: ListSkillsResponseEvent) { - self.on_list_skills(response); - } - fn on_mcp_server_elicitation_request( &mut self, request_id: codex_protocol::mcp::RequestId, @@ -7014,7 +7006,6 @@ impl ChatWidget { EventMsg::WebSearchEnd(ev) => self.on_web_search_end(ev), EventMsg::GetHistoryEntryResponse(ev) => self.handle_history_entry_response(ev), EventMsg::McpListToolsResponse(ev) => self.on_list_mcp_tools(ev), - EventMsg::ListSkillsResponse(ev) => self.on_list_skills(ev), EventMsg::ShutdownComplete => self.on_shutdown_complete(), EventMsg::TurnDiff(TurnDiffEvent { unified_diff }) => self.on_turn_diff(unified_diff), EventMsg::DeprecationNotice(ev) => self.on_deprecation_notice(ev), @@ -10371,13 +10362,6 @@ impl ChatWidget { self.bottom_pane.clear_esc_backtrack_hint(); } - fn refresh_skills_for_current_cwd(&mut self, force_reload: bool) { - self.submit_op(AppCommand::list_skills( - vec![self.config.cwd.to_path_buf()], - force_reload, - )); - } - /// Forward a command directly to codex. pub(crate) fn submit_op(&mut self, op: T) -> bool where @@ -10413,10 +10397,6 @@ impl ChatWidget { )); } - fn on_list_skills(&mut self, ev: ListSkillsResponseEvent) { - self.set_skills_from_response(&ev); - } - pub(crate) fn open_review_popup(&mut self) { let mut items: Vec = Vec::new(); diff --git a/vendor/codex/codex-rs/tui/src/chatwidget/skills.rs b/vendor/codex/codex-rs/tui/src/chatwidget/skills.rs index ce9a90d8..f4d0ed05 100644 --- a/vendor/codex/codex-rs/tui/src/chatwidget/skills.rs +++ b/vendor/codex/codex-rs/tui/src/chatwidget/skills.rs @@ -2,145 +2,12 @@ use std::collections::HashMap; use std::collections::HashSet; use super::ChatWidget; -use crate::app_event::AppEvent; -use crate::bottom_pane::SelectionItem; -use crate::bottom_pane::SelectionViewParams; -use crate::bottom_pane::SkillsToggleItem; -use crate::bottom_pane::SkillsToggleView; -use crate::bottom_pane::popup_consts::standard_popup_hint_line; -use crate::skills_helpers::skill_description; -use crate::skills_helpers::skill_display_name; -use codex_core_skills::model::SkillDependencies; -use codex_core_skills::model::SkillInterface; use codex_core_skills::model::SkillMetadata; -use codex_core_skills::model::SkillToolDependency; use codex_protocol::parse_command::ParsedCommand; -use codex_protocol::protocol::ListSkillsResponseEvent; -use codex_protocol::protocol::SkillMetadata as ProtocolSkillMetadata; -use codex_protocol::protocol::SkillsListEntry; -use codex_utils_absolute_path::AbsolutePathBuf; const TOOL_MENTION_SIGIL: char = '$'; impl ChatWidget { - pub(crate) fn open_skills_list(&mut self) { - self.insert_str("$"); - } - - pub(crate) fn open_skills_menu(&mut self) { - let items = vec![ - SelectionItem { - name: "List skills".to_string(), - description: Some("Tip: press $ to open this list directly.".to_string()), - actions: vec![Box::new(|tx| { - tx.send(AppEvent::OpenSkillsList); - })], - dismiss_on_select: true, - ..Default::default() - }, - SelectionItem { - name: "Enable/Disable Skills".to_string(), - description: Some("Enable or disable skills.".to_string()), - actions: vec![Box::new(|tx| { - tx.send(AppEvent::OpenManageSkillsPopup); - })], - dismiss_on_select: true, - ..Default::default() - }, - ]; - - self.bottom_pane.show_selection_view(SelectionViewParams { - title: Some("Skills".to_string()), - subtitle: Some("Choose an action".to_string()), - footer_hint: Some(standard_popup_hint_line()), - items, - ..Default::default() - }); - } - - pub(crate) fn open_manage_skills_popup(&mut self) { - if self.skills_all.is_empty() { - self.add_info_message("No skills available.".to_string(), /*hint*/ None); - return; - } - - let mut initial_state = HashMap::new(); - for skill in &self.skills_all { - initial_state.insert(skill.path.clone(), skill.enabled); - } - self.skills_initial_state = Some(initial_state); - - let items: Vec = self - .skills_all - .iter() - .map(|skill| { - let core_skill = protocol_skill_to_core(skill); - let display_name = skill_display_name(&core_skill); - let description = skill_description(&core_skill).to_string(); - let name = core_skill.name.clone(); - let path = core_skill.path_to_skills_md; - SkillsToggleItem { - name: display_name, - skill_name: name, - description, - enabled: skill.enabled, - path, - } - }) - .collect(); - - let view = SkillsToggleView::new(items, self.app_event_tx.clone()); - self.bottom_pane.show_view(Box::new(view)); - } - - pub(crate) fn update_skill_enabled(&mut self, path: AbsolutePathBuf, enabled: bool) { - for skill in &mut self.skills_all { - if skill.path == path { - skill.enabled = enabled; - } - } - self.set_skills(Some(enabled_skills_for_mentions(&self.skills_all))); - } - - pub(crate) fn handle_manage_skills_closed(&mut self) { - let Some(initial_state) = self.skills_initial_state.take() else { - return; - }; - let mut current_state = HashMap::new(); - for skill in &self.skills_all { - current_state.insert(skill.path.clone(), skill.enabled); - } - - let mut enabled_count = 0; - let mut disabled_count = 0; - for (path, was_enabled) in initial_state { - let Some(is_enabled) = current_state.get(&path) else { - continue; - }; - if was_enabled != *is_enabled { - if *is_enabled { - enabled_count += 1; - } else { - disabled_count += 1; - } - } - } - - if enabled_count == 0 && disabled_count == 0 { - return; - } - self.add_info_message( - format!("{enabled_count} skills enabled, {disabled_count} skills disabled"), - /*hint*/ None, - ); - } - - pub(crate) fn set_skills_from_response(&mut self, response: &ListSkillsResponseEvent) { - let skills = skills_for_cwd(&self.config.cwd, &response.skills); - self.skills_all = skills; - self.set_skills(Some(enabled_skills_for_mentions(&self.skills_all))); - } - pub(crate) fn annotate_skill_reads_in_parsed_cmd( &self, mut parsed_cmd: Vec, @@ -171,61 +38,6 @@ impl ChatWidget { } } -fn skills_for_cwd( - cwd: &AbsolutePathBuf, - skills_entries: &[SkillsListEntry], -) -> Vec { - skills_entries - .iter() - .find(|entry| entry.cwd.as_path() == cwd.as_path()) - .map(|entry| entry.skills.clone()) - .unwrap_or_default() -} - -fn enabled_skills_for_mentions(skills: &[ProtocolSkillMetadata]) -> Vec { - skills - .iter() - .filter(|skill| skill.enabled) - .map(protocol_skill_to_core) - .collect() -} - -fn protocol_skill_to_core(skill: &ProtocolSkillMetadata) -> SkillMetadata { - SkillMetadata { - name: skill.name.clone(), - description: skill.description.clone(), - short_description: skill.short_description.clone(), - interface: skill.interface.clone().map(|interface| SkillInterface { - display_name: interface.display_name, - short_description: interface.short_description, - icon_small: interface.icon_small, - icon_large: interface.icon_large, - brand_color: interface.brand_color, - default_prompt: interface.default_prompt, - }), - dependencies: skill - .dependencies - .clone() - .map(|dependencies| SkillDependencies { - tools: dependencies - .tools - .into_iter() - .map(|tool| SkillToolDependency { - r#type: tool.r#type, - value: tool.value, - description: tool.description, - transport: tool.transport, - command: tool.command, - url: tool.url, - }) - .collect(), - }), - policy: None, - path_to_skills_md: skill.path.clone(), - scope: skill.scope, - } -} - pub(crate) fn collect_tool_mentions( text: &str, mention_paths: &HashMap, diff --git a/vendor/codex/codex-rs/tui/src/chatwidget/slash_dispatch.rs b/vendor/codex/codex-rs/tui/src/chatwidget/slash_dispatch.rs index c3d1170e..84df75ea 100644 --- a/vendor/codex/codex-rs/tui/src/chatwidget/slash_dispatch.rs +++ b/vendor/codex/codex-rs/tui/src/chatwidget/slash_dispatch.rs @@ -316,9 +316,6 @@ impl ChatWidget { SlashCommand::Mention => { self.insert_str("@"); } - SlashCommand::Skills => { - self.open_skills_menu(); - } SlashCommand::Status => { if self.should_prefetch_rate_limits() { let request_id = self.next_status_refresh_request_id; @@ -749,7 +746,6 @@ impl ChatWidget { | SlashCommand::Exit | SlashCommand::Logout | SlashCommand::Mention - | SlashCommand::Skills | SlashCommand::Title | SlashCommand::Statusline | SlashCommand::Theme => QueueDrain::Stop, diff --git a/vendor/codex/codex-rs/tui/src/chatwidget/tests/helpers.rs b/vendor/codex/codex-rs/tui/src/chatwidget/tests/helpers.rs index 51606891..2ec32ac4 100644 --- a/vendor/codex/codex-rs/tui/src/chatwidget/tests/helpers.rs +++ b/vendor/codex/codex-rs/tui/src/chatwidget/tests/helpers.rs @@ -222,7 +222,6 @@ pub(super) async fn make_chatwidget_manual( pending_collab_spawn_requests: HashMap::new(), suppressed_exec_calls: HashSet::new(), skills_all: Vec::new(), - skills_initial_state: None, last_unified_wait: None, unified_exec_wait_streak: None, turn_sleep_inhibitor: SleepInhibitor::new(prevent_idle_sleep), diff --git a/vendor/codex/codex-rs/tui/src/skills_helpers.rs b/vendor/codex/codex-rs/tui/src/skills_helpers.rs index 730acdca..5403ffc2 100644 --- a/vendor/codex/codex-rs/tui/src/skills_helpers.rs +++ b/vendor/codex/codex-rs/tui/src/skills_helpers.rs @@ -1,9 +1,4 @@ use codex_core_skills::model::SkillMetadata; -use codex_utils_fuzzy_match::fuzzy_match; - -use crate::text_formatting::truncate_text; - -pub(crate) const SKILL_NAME_TRUNCATE_LEN: usize = 21; pub(crate) fn skill_display_name(skill: &SkillMetadata) -> String { if let Some(display_name) = skill @@ -23,32 +18,3 @@ pub(crate) fn skill_display_name(skill: &SkillMetadata) -> String { skill.name.clone() } - -pub(crate) fn skill_description(skill: &SkillMetadata) -> &str { - skill - .interface - .as_ref() - .and_then(|interface| interface.short_description.as_deref()) - .or(skill.short_description.as_deref()) - .unwrap_or(&skill.description) -} - -pub(crate) fn truncate_skill_name(name: &str) -> String { - truncate_text(name, SKILL_NAME_TRUNCATE_LEN) -} - -pub(crate) fn match_skill( - filter: &str, - display_name: &str, - skill_name: &str, -) -> Option<(Option>, i32)> { - if let Some((indices, score)) = fuzzy_match(display_name, filter) { - return Some((Some(indices), score)); - } - if display_name != skill_name - && let Some((_indices, score)) = fuzzy_match(skill_name, filter) - { - return Some((None, score)); - } - None -} diff --git a/vendor/codex/codex-rs/tui/src/slash_command.rs b/vendor/codex/codex-rs/tui/src/slash_command.rs index 4f7ba782..c9f1100d 100644 --- a/vendor/codex/codex-rs/tui/src/slash_command.rs +++ b/vendor/codex/codex-rs/tui/src/slash_command.rs @@ -22,7 +22,6 @@ pub enum SlashCommand { SandboxReadRoot, Experimental, Memories, - Skills, Review, Rename, New, @@ -84,7 +83,6 @@ impl SlashCommand { SlashCommand::Copy => "copy last response as markdown", SlashCommand::Diff => "show git diff (including untracked files)", SlashCommand::Mention => "mention a file", - SlashCommand::Skills => "use skills to improve how Codex performs specific tasks", SlashCommand::Status => "show current session configuration and token usage", SlashCommand::DebugConfig => "show config layers and requirement sources for debugging", SlashCommand::Title => "configure which items appear in the terminal title", @@ -177,7 +175,6 @@ impl SlashCommand { | SlashCommand::Copy | SlashCommand::Rename | SlashCommand::Mention - | SlashCommand::Skills | SlashCommand::Status | SlashCommand::DebugConfig | SlashCommand::Ps