Classroom index | Originals and full outcomes
02B | Four operations
Read-only historical evidence. Original commands are never executed by the archive. Original published teaching history, with additional privacy-only redactions of ambient context and device metadata. No new run.
ConversationStateUpdateEvent
{
"id": "58387367-36e4-407c-a02c-b79ddc5fd8ba",
"timestamp": "2026-10-17T16:32:30.406404",
"source": "environment",
"key": "agent",
"value": {
"llm": {
"model": "openhands/deepseek-v4-flash",
"api_key": null,
"auth_type": "api_key",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 2,
"retry_multiplier": 8.0,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 120,
"stream_idle_timeout": 120.0,
"max_message_chars": 30000,
"max_output_tokens": 16384,
"api_mode": "auto",
"capability_overrides": {},
"stream": false,
"drop_params": true,
"disable_stop_word": false,
"caching_prompt": true,
"log_completions": false,
"log_completions_folder": "logs/completions",
"native_tool_calling": true,
"reasoning_effort": "none",
"enable_encrypted_reasoning": true,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"usage_id": "default",
"litellm_extra_body": {},
"is_subscription": false
},
"tools": [
{
"name": "terminal",
"params": {}
},
{
"name": "file_editor",
"params": {}
}
],
"mcp_config": {
"workshop-github": {
"transport": "stdio",
"command": "/Users/instructor/Code/odsc-workshop/.workshop-venv/bin/python",
"args": [
"/Users/instructor/Code/odsc-workshop/workshops/odsc-2026/labs/tools/github_mcp_server.py"
],
"env": {
"WORKSHOP_MCP_MODE": "[REDACTED]"
},
"enabled": true
}
},
"include_default_tools": [
"FinishTool",
"ThinkTool"
],
"agent_context": {
"skills": [
{
"name": "autodocs",
"content": "[REDACTED: unrelated ambient skill definition]",
"trigger": {
"type": "keyword",
"keywords": [
"autodocs",
"openwiki",
"repo docs",
"documentation automation",
"generate wiki",
"update wiki",
"gitnexus docs",
"agent docs"
]
},
"source": "/Users/instructor/.openhands/plugins/installed/autodocs/skills/autodocs/SKILL.md",
"inputs": [],
"is_agentskills_format": true,
"version": "1.0.0",
"description": "Generate and maintain durable repository documentation for humans and future coding agents. Use when asked to plan, initialize, update, repair, or automate repo docs, including OpenWiki-style docs and optional GitNexus-enriched docs.",
"disable_model_invocation": false
},
{
"name": "autodocs:init",
"content": "[REDACTED: unrelated ambient skill definition]",
"trigger": {
"type": "keyword",
"keywords": [
"/autodocs:init"
]
},
"source": "/Users/instructor/.openhands/plugins/installed/autodocs/commands/init.md",
"inputs": [],
"is_agentskills_format": false,
"version": "1.0.0",
"description": "Initialize durable repository documentation for the current repository",
"disable_model_invocation": false
},
{
"name": "autodocs:plan",
"content": "[REDACTED: unrelated ambient skill definition]",
"trigger": {
"type": "keyword",
"keywords": [
"/autodocs:plan"
]
},
"source": "/Users/instructor/.openhands/plugins/installed/autodocs/commands/plan.md",
"inputs": [],
"is_agentskills_format": false,
"version": "1.0.0",
"description": "Plan durable repository documentation without editing files",
"disable_model_invocation": false
},
{
"name": "autodocs:update",
"content": "[REDACTED: unrelated ambient skill definition]",
"trigger": {
"type": "keyword",
"keywords": [
"/autodocs:update"
]
},
"source": "/Users/instructor/.openhands/plugins/installed/autodocs/commands/update.md",
"inputs": [],
"is_agentskills_format": false,
"version": "1.0.0",
"description": "Update existing durable repository documentation from recent repository changes",
"disable_model_invocation": false
}
],
"load_user_skills": false,
"load_public_skills": false,
"marketplace_path": "marketplaces/default.json",
"registered_marketplaces": [],
"load_project_skills": false,
"load_memory": true,
"disabled_skills": [],
"current_datetime": "2026-10-17T16:32:30.349576-05:00"
},
"system_prompt_filename": "system_prompt.j2",
"security_policy_filename": "security_policy.j2",
"system_prompt_kwargs": {
"llm_security_analyzer": true
},
"condenser": {
"llm": {
"model": "openhands/deepseek-v4-flash",
"api_key": null,
"auth_type": "api_key",
"openrouter_site_url": "https://docs.all-hands.dev/",
"openrouter_app_name": "OpenHands",
"num_retries": 2,
"retry_multiplier": 8.0,
"retry_min_wait": 8,
"retry_max_wait": 64,
"timeout": 120,
"stream_idle_timeout": 120.0,
"max_message_chars": 30000,
"max_output_tokens": 16384,
"api_mode": "auto",
"capability_overrides": {},
"stream": false,
"drop_params": true,
"disable_stop_word": false,
"caching_prompt": true,
"log_completions": false,
"log_completions_folder": "logs/completions",
"native_tool_calling": true,
"reasoning_effort": "none",
"enable_encrypted_reasoning": true,
"prompt_cache_retention": "24h",
"extended_thinking_budget": 200000,
"usage_id": "condenser",
"litellm_extra_body": {},
"is_subscription": false
},
"max_size": 240,
"max_tokens": 1000000,
"keep_first": 2,
"minimum_progress": 0.1,
"hard_context_reset_max_retries": 5,
"hard_context_reset_context_scaling": 0.8,
"kind": "LLMSummarizingCondenser"
},
"tool_concurrency_limit": 1,
"kind": "Agent"
},
"kind": "ConversationStateUpdateEvent"
}SystemPromptEvent
{
"id": "1cb881c9-315a-48af-baca-c7a97cdbaa9b",
"timestamp": "2026-10-17T16:32:33.151735",
"source": "agent",
"parent_id": "__root__",
"system_prompt": {
"cache_prompt": false,
"type": "text",
"text": "[REDACTED: ambient system/context, private source hash retained by instructor]"
},
"tools": [
{
"description": "Execute a shell command in the terminal within a persistent shell session.\n\n\n### Command Execution\n* One command at a time: You can only execute one shell command at a time.\n If you need to run multiple commands sequentially, use `&&` or `;`.\n* Persistent session: Environment variables, virtual environments, and\n working directory changes persist across commands.\n* Soft timeout: Commands pause for confirmation after 10 seconds without\n new output unless you provide a longer `timeout`.\n* Shell options: Do NOT use `set -e`, `set -eu`, or `set -euo pipefail`.\n The runtime may not support them reliably.\n\n### Long-running Commands\n* For commands that may run indefinitely, run them in the background and\n redirect output to a file, e.g. `python3 app.py > server.log 2>&1 &`.\n* For long-running commands, set the `timeout` parameter accordingly.\n* If a command returns exit code `-1`, it hit the soft timeout and is\n still running. With `is_input=true`, you can:\n - Send empty `command` to retrieve additional logs\n - Send text to STDIN of the running process\n - Send control commands like `C-c`, `C-d`, or `C-z`\n - Send navigation keys like `UP`, `DOWN`, `LEFT`, `RIGHT`, `TAB`,\n `ESC`, `BS`, `HOME`, `END`, `PGUP`, and `PGDN`\n - Send any `C-<letter>` Ctrl sequence such as `C-a`, `C-e`, or `C-l`\n\n### Best Practices\n* Verify a parent directory exists before creating files or directories.\n* Prefer absolute paths and avoid excessive use of `cd`.\n\n### Output Handling\n* Large output may be truncated before being returned.\n\n### Terminal Reset\n* Set `reset=true` to create a fresh terminal session if the current one\n becomes unresponsive.\n* Resetting the terminal clears environment variables, working directory\n changes, and running processes.",
"action_type": "TerminalAction",
"observation_type": "TerminalObservation",
"annotations": {
"title": "terminal",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
},
"kind": "TerminalTool",
"title": "terminal"
},
{
"description": "Custom editing tool for viewing, creating and editing files in plain-text format\n* State is persistent across command calls and discussions with the user\n* If `path` is a text file, `view` displays the result of applying `cat -n`. If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep\n* The `create` command cannot be used if the specified `path` already exists as a file\n* If a `command` generates a long output, it will be truncated and marked with `<response clipped>`\n* The `undo_edit` command will revert the last edit made to the file at `path`\n* This tool can be used for creating and editing files in plain-text format.\n\n\nBefore using this tool:\n1. Use the view tool to understand the file's contents and context\n2. Verify the directory path is correct (only applicable when creating new files):\n - Use the view tool to verify the parent directory exists and is the correct location\n\nWhen making edits:\n - Ensure the edit results in idiomatic, correct code\n - Do not leave the code in a broken state\n - Always use absolute file paths (starting with /)\n\nCRITICAL REQUIREMENTS FOR USING THIS TOOL:\n\n1. EXACT MATCHING: The `old_str` parameter must match EXACTLY one or more consecutive lines from the file, including all whitespace and indentation. The tool will fail if `old_str` matches multiple locations or doesn't match exactly with the file content.\n\n2. UNIQUENESS: The `old_str` must uniquely identify a single instance in the file:\n - Include sufficient context before and after the change point (3-5 lines recommended)\n - If not unique, the replacement will not be performed\n\n3. REPLACEMENT: The `new_str` parameter should contain the edited lines that replace the `old_str`. Both strings must be different.\n\nRemember: when making multiple file edits in a row to the same file, you should prefer to send all edits in a single message with multiple calls to this tool, rather than multiple messages with a single call each.\n\n\nYour current working directory is: /Users/instructor/Code/odsc-runs/session-20261017-163134-615d65/w2-primitive\nWhen exploring project structure, start with this directory instead of the root filesystem.",
"action_type": "FileEditorAction",
"observation_type": "FileEditorObservation",
"annotations": {
"title": "file_editor",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false
},
"kind": "FileEditorTool",
"title": "file_editor"
},
{
"description": "Signals the completion of the current task or conversation.\n\nUse this tool when:\n- You have successfully completed the user's requested task\n- You cannot proceed further due to technical limitations or missing information\n\nThe message should include:\n- A clear summary of actions taken and their results\n- Any next steps for the user\n- Explanation if you're unable to complete the task\n- Any follow-up questions if more information is needed\n",
"action_type": "FinishAction",
"observation_type": "FinishObservation",
"annotations": {
"title": "finish",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"kind": "FinishTool",
"title": "finish"
},
{
"description": "Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed.\n\nCommon use cases:\n1. When exploring a repository and discovering the source of a bug, call this tool to brainstorm several unique ways of fixing the bug, and assess which change(s) are likely to be simplest and most effective.\n2. After receiving test results, use this tool to brainstorm ways to fix failing tests.\n3. When planning a complex refactoring, use this tool to outline different approaches and their tradeoffs.\n4. When designing a new feature, use this tool to think through architecture decisions and implementation details.\n5. When debugging a complex issue, use this tool to organize your thoughts and hypotheses.\n\nThe tool simply logs your thought process for better transparency and does not execute any code or make changes.",
"action_type": "ThinkAction",
"observation_type": "ThinkObservation",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"kind": "ThinkTool",
"title": "think"
},
{
"description": "Invoke a skill by name.\n\nThis is the only supported way to invoke a skill listed in\n`<available_skills>`. Call it with the `<name>` shown in that block; the\nskill's full content is rendered (including any dynamic context) and\nreturned as the tool result.\n",
"action_type": "InvokeSkillAction",
"observation_type": "InvokeSkillObservation",
"annotations": {
"title": "invoke_skill",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"kind": "InvokeSkillTool",
"title": "invoke_skill"
},
{
"description": "Ask a saved vision-capable LLM profile to inspect an image from the latest user message and return a text answer.\n\nUse this when the current model cannot understand images, the latest user message includes an image, and visual details are needed to answer. The current model should pass the image_index shown in the user message and a specific question for the vision model. The cost of this vision model call is tracked in the same conversation stats.\n\nAvailable vision-capable profiles:\n- Claude-Opus-5.5\n- Cliff-Flash-Test\n- GPT5-6\n- KimiK3\n- OH-Opus-5\n- OH-Sonnet\n- Sonnnet\n- Workshop-DeepSeek\n- claude-fable-5\n- claude-opus-4-6\n- claude-opus-4-7\n- claude-opus-4-8\n- claude-sonnet-4-5\n- claude-sonnet-4-6\n- deepseek-v4-flash\n- gpt-5.4\n- gpt-5.5\n- gpt-5.6\n- gpt-5.6-sol\n- p02-cheap\n- p02-cheap-copy\n- p02-frontier\n- p02-mid",
"action_type": "VisionInspectAction",
"observation_type": "VisionInspectObservation",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
},
"kind": "VisionInspectTool",
"title": "inspect_image_with_vision"
},
{
"description": "Get a pull request's title, description, status, counts, branches, and citation URL.",
"action_type": "MCPToolAction",
"observation_type": "MCPToolObservation",
"meta": {
"_fastmcp": {
"tags": []
}
},
"mcp_tool": {
"name": "get_pull_request",
"description": "Get a pull request's title, description, status, counts, branches, and citation URL.",
"inputSchema": {
"properties": {
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"pull_number": {
"type": "integer"
}
},
"required": [
"owner",
"repo",
"pull_number"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"_fastmcp": {
"tags": []
}
}
},
"kind": "MCPToolDefinition",
"title": "get_pull_request"
},
{
"description": "List every changed file with change counts and a directly citable GitHub blob URL.",
"action_type": "MCPToolAction",
"observation_type": "MCPToolObservation",
"meta": {
"_fastmcp": {
"tags": []
}
},
"mcp_tool": {
"name": "list_pull_request_files",
"description": "List every changed file with change counts and a directly citable GitHub blob URL.",
"inputSchema": {
"properties": {
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"pull_number": {
"type": "integer"
}
},
"required": [
"owner",
"repo",
"pull_number"
],
"type": "object"
},
"outputSchema": {
"description": "Generic wrapper for non-object return types.",
"properties": {
"result": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
}
},
"required": [
"result"
],
"type": "object",
"x-fastmcp-wrap-result": true
},
"_meta": {
"_fastmcp": {
"tags": []
}
}
},
"kind": "MCPToolDefinition",
"title": "list_pull_request_files"
},
{
"description": "List pull-request commits with their messages and directly citable GitHub URLs.",
"action_type": "MCPToolAction",
"observation_type": "MCPToolObservation",
"meta": {
"_fastmcp": {
"tags": []
}
},
"mcp_tool": {
"name": "list_pull_request_commits",
"description": "List pull-request commits with their messages and directly citable GitHub URLs.",
"inputSchema": {
"properties": {
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"pull_number": {
"type": "integer"
}
},
"required": [
"owner",
"repo",
"pull_number"
],
"type": "object"
},
"outputSchema": {
"description": "Generic wrapper for non-object return types.",
"properties": {
"result": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
}
},
"required": [
"result"
],
"type": "object",
"x-fastmcp-wrap-result": true
},
"_meta": {
"_fastmcp": {
"tags": []
}
}
},
"kind": "MCPToolDefinition",
"title": "list_pull_request_commits"
},
{
"description": "Read one UTF-8 text file at a revision and return its content and citation URL.",
"action_type": "MCPToolAction",
"observation_type": "MCPToolObservation",
"meta": {
"_fastmcp": {
"tags": []
}
},
"mcp_tool": {
"name": "get_file_at_revision",
"description": "Read one UTF-8 text file at a revision and return its content and citation URL.",
"inputSchema": {
"properties": {
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"path": {
"type": "string"
},
"revision": {
"type": "string"
}
},
"required": [
"owner",
"repo",
"path",
"revision"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"_fastmcp": {
"tags": []
}
}
},
"kind": "MCPToolDefinition",
"title": "get_file_at_revision"
}
],
"dynamic_context": {
"cache_prompt": false,
"type": "text",
"text": "[REDACTED: ambient system/context, private source hash retained by instructor]"
},
"kind": "SystemPromptEvent"
}You
Inspect OpenHands/OpenHands pull request #16860 using public GitHub evidence.
Write five short bullets, targeting 200 words and never exceeding 280 words.
Include the allow-list change; two important implementation files selected from
src/utils/skill-enablement.ts, src/hooks/use-skill-enablement.ts,
src/hooks/use-migrate-enabled-skills.ts, src/api/agent-server-adapter.ts;
the test runner; the new test files; and remaining uncertainty.
Provide the PR link and at least two direct file or commit links attached to
supported claims. Do not modify any files. Count words before finishing.
Explicitly attribute Vitest, lint, and translation results to the upstream PR
report. State whether you personally ran any tests. Your final answer must
contain the complete explanation, not a reference to hidden analysis.
Full event evidence
{
"id": "25ef7ea8-40b5-4a32-8bbf-d8daf3cc6638",
"timestamp": "2026-10-17T16:32:33.158444",
"source": "user",
"parent_id": "1cb881c9-315a-48af-baca-c7a97cdbaa9b",
"llm_message": {
"role": "user",
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "Inspect OpenHands/OpenHands pull request #16860 using public GitHub evidence.\nWrite five short bullets, targeting 200 words and never exceeding 280 words.\nInclude the allow-list change; two important implementation files selected from\nsrc/utils/skill-enablement.ts, src/hooks/use-skill-enablement.ts,\nsrc/hooks/use-migrate-enabled-skills.ts, src/api/agent-server-adapter.ts;\nthe test runner; the new test files; and remaining uncertainty.\nProvide the PR link and at least two direct file or commit links attached to\nsupported claims. Do not modify any files. Count words before finishing.\nExplicitly attribute Vitest, lint, and translation results to the upstream PR\nreport. State whether you personally ran any tests. Your final answer must\ncontain the complete explanation, not a reference to hidden analysis."
}
],
"thinking_blocks": []
},
"activated_skills": [],
"extended_content": [],
"kind": "MessageEvent"
}ConversationStateUpdateEvent
{
"id": "d70e8a8e-573d-4941-addf-479004208bc3",
"timestamp": "2026-10-17T16:32:33.160831",
"source": "environment",
"parent_id": "25ef7ea8-40b5-4a32-8bbf-d8daf3cc6638",
"key": "last_user_message_id",
"value": "25ef7ea8-40b5-4a32-8bbf-d8daf3cc6638",
"kind": "ConversationStateUpdateEvent"
}ConversationStateUpdateEvent
{
"id": "bf3fde3a-b95d-4ad8-821d-4c62fc7ef63f",
"timestamp": "2026-10-17T16:32:33.166925",
"source": "environment",
"parent_id": "25ef7ea8-40b5-4a32-8bbf-d8daf3cc6638",
"key": "execution_status",
"value": "running",
"kind": "ConversationStateUpdateEvent"
}Tool request: get_pull_request
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "7760fd5f-fb4e-4c37-b248-21f3eae776d2",
"timestamp": "2026-10-17T16:32:35.294051",
"source": "agent",
"parent_id": "25ef7ea8-40b5-4a32-8bbf-d8daf3cc6638",
"thought": [],
"reasoning_content": null,
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
},
"tool_name": "get_pull_request",
"tool_call_id": "call_89461e1d7c8c4e5fb768ae6d",
"tool_call": {
"id": "call_89461e1d7c8c4e5fb768ae6d",
"name": "get_pull_request",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"pull_number\": 16860, \"summary\": \"Fetch OpenHands PR #16860 details\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272753-hmjSwzr2c4j0Ma9FGc4r",
"security_risk": "UNKNOWN",
"summary": "Fetch OpenHands PR #16860 details",
"kind": "ActionEvent"
}Tool request: list_pull_request_files
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "1395a3e6-cd6a-4ccf-ae3d-44f5dd677da5",
"timestamp": "2026-10-17T16:32:35.301979",
"source": "agent",
"parent_id": "7760fd5f-fb4e-4c37-b248-21f3eae776d2",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
},
"tool_name": "list_pull_request_files",
"tool_call_id": "call_bb57522c541c466ca57a74f8",
"tool_call": {
"id": "call_bb57522c541c466ca57a74f8",
"name": "list_pull_request_files",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"pull_number\": 16860, \"summary\": \"List files changed in PR #16860\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272753-hmjSwzr2c4j0Ma9FGc4r",
"security_risk": "UNKNOWN",
"summary": "List files changed in PR #16860",
"kind": "ActionEvent"
}Tool request: list_pull_request_commits
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "32efdd79-4b5b-4b85-a91b-c63a9163debb",
"timestamp": "2026-10-17T16:32:35.306052",
"source": "agent",
"parent_id": "1395a3e6-cd6a-4ccf-ae3d-44f5dd677da5",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"pull_number": 16860
},
"kind": "MCPToolAction"
},
"tool_name": "list_pull_request_commits",
"tool_call_id": "call_3a59d606c5264e3b80305576",
"tool_call": {
"id": "call_3a59d606c5264e3b80305576",
"name": "list_pull_request_commits",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"pull_number\": 16860, \"summary\": \"List commits in PR #16860\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272753-hmjSwzr2c4j0Ma9FGc4r",
"security_risk": "UNKNOWN",
"summary": "List commits in PR #16860",
"kind": "ActionEvent"
}Tool result: get_pull_request
[Tool 'get_pull_request' executed.]
{"number":16860,"title":"feat(skills): replace the all-on skill catalog with an explicit allow-list","body":"HUMAN:\r\n\r\nEnable a set of reccomanded skills as default and not the whole package. \r\n\r\nAGENT:\r\n\r\nPhases 1 and 2 of the plan in #16302. Phase 0 (the `defaultEnabled` catalog flag and `DEFAULT_ENABLED_SKILL_NAMES`) shipped in OpenHands/extensions#485 and is already on `@openhands/extensions@0.18.0`, which this repo pins.\r\n\r\nEvidence below is a real run of the Customize page against the change, not just unit tests: 59 catalog skills render, 11 on, 48 off, and `add-javadoc` — the skill from the issue report — is among the 48.\r\n\r\n---\r\n\r\n## Why\r\n\r\nNothing is installed today. The whole `@openhands/extensions` catalog is baked into the bundle at build time and merged into `agent_context.skills` for every conversation, with `disabled_skills` as the only escape hatch. All-on-with-a-deny-list means every catalog addition is on by default for everyone, which is how @rbren ended up opted into javadoc and bitbucket skills. The cost isn't disk — it's ~60 skill bodies and 60 trigger sets competing in every system prompt.\r\n\r\n## Summary\r\n\r\n- `enabled_skills`: an allow-list **over the bundled catalog only**, defaulting to the 11 entries the catalog flags `defaultEnabled`. `disabled_skills` keeps its job for user- and project-authored skills, which are discovered at runtime from `.agents/skills/` and should be on the moment they appear. `src/utils/skill-enablement.ts` is the single place that decides which list a skill belongs to.\r\n- A one-shot migration at the app root (`useMigrateEnabledSkills`): a workspace whose deny-list names a catalog skill keeps everything else on (behaviour preserved); a fresh one gets the curated default; one that already has `enabled_skills` is untouched. Both branches persist an **explicit** list, which is what stops a later `defaultEnabled` addition from switching itself on. `undefined` is the \"never migrated\" sentinel, so it is deliberately kept out of `DEFAULT_SETTINGS` and out of the `use-settings` coercions.\r\n- A skill the opening message invokes by name (`/standup-digest:setup`, or `/<skill-name>` from the \"Use skill\" button) is loaded for that conversation whatever the lists say. Automation preset cards fill the input with exactly that command, and 18 of the catalog's 24 slash commands belong to skills that are off by default — without this the card would silently do nothing. Only the leading token counts.\r\n- Customize gets a \"Recommended\" badge and a matching facet; the Customize page and the conversation drawer, which each carried their own copy of the hydrate/auto-save/toggle logic, now share `useSkillEnablement` so one surface can't write a preference the other can't see.\r\n\r\n## Issue Number\r\n\r\nFixes #16302\r\n\r\n## How to Test\r\n\r\n```\r\nnpm ci\r\nVITE_FRONTEND_PORT=5199 npm run dev:mock\r\n# open http://localhost:5199/skills\r\n```\r\n\r\nExpect 59 skill cards with 11 enabled and 48 disabled, a `RECOMMENDATION` facet next to `STATE`, \"Recommended\" pills on the 11, and the notice under the page description. `add-javadoc` and the `bitbucket*` skills — the ones reported in #16302 — start off; toggling one on writes `enabled_skills`, not `disabled_skills` (visible in the PATCH `misc_settings_diff.app_preferences`).\r\n\r\nFor the migration: seed `disabled_skills` with a catalog name before first load and confirm the persisted `enabled_skills` is the whole catalog minus that name, not the curated default.\r\n\r\nAutomated:\r\n\r\n- `npx vitest run` → 5064 passed. One unrelated pre-existing failure, `dev-with-automation` SIGHUP cleanup, which fails the same way on an untouched `main`.\r\n- `npm run lint` and `npm run check-translation-completeness` clean; the 4 new keys are translated for all 15 locales.\r\n- New: `__tests__/utils/skill-enablement.test.ts` (resolve / deny-veto / every migration branch), `__tests__/hooks/use-migrate-enabled-skills.test.tsx` (one-shot, cloud skip, no write over a failed settings load), plus route and facet cases.\r\n- The two adapter tests that asserted `add-javadoc` reaches the agent context now assert the opposite — that flip **is** the fix.\r\n\r\n## Video/Screenshots\r\n\r\nCustomize → Skills, default state after the change. `STATE` reads Enabled 11 / Disabled 48; `add-javadoc` and `agent-creator` are off, `add-skill` / `agent-canvas-environment` / `agent-memory` are on and badged:\r\n\r\n\r\n\r\nThe new `RECOMMENDATION` facet, narrowed to Recommended — 11 results, all enabled:\r\n\r\n\r\n\r\n## Type\r\n\r\n- [ ] Bug fix\r\n- [x] Feature\r\n- [ ] Refactor\r\n- [ ] Breaking change\r\n- [ ] Docs / chore\r\n\r\n## Notes\r\n\r\nDeviations from the plan in the issue, worth a look at review:\r\n\r\n- **No `Core` tier.** The shaped spec asked for mutually exclusive `Core` / `Recommended` tags, which forces `core` to secretly mean \"core **and** default-on\". Grepping every catalog name against `src/` (minus i18n), exactly one skill is referenced by Canvas code — `add-skill`, via `/add-skill` and the restart banner — and disabling it degrades that flow rather than breaking Canvas. So: one flag, no locked toggles. If something genuinely unremovable appears later, the lock is a Canvas-side const and a union in one resolver.\r\n- **The deny-list still wins over the allow-list.** Only matters before the migration lands: until then a pre-existing \"I turned this off\" lives in `disabled_skills` alone, and the allow-list fallback would otherwise switch it back on. Post-migration the two lists are disjoint and the clause is a no-op.\r\n- **A shared hook, rather than only touching `skills-settings.tsx`** as the plan said. `conversation-overview-skills-panel.tsx` runs the same logic; leaving it on the deny-list would have made its catalog toggles silently no-op.\r\n- **Cloud is untouched**, per the plan: it creates conversations from its own server-side catalog and never reads `agent_context`, so both the migration and the allow-list UI are gated to local. Cloud keeps today's deny-list behaviour.\r\n- **Install/download is out of scope** and the spec's \"Installation and updates\" section doesn't apply: catalog skills are bundled, never downloaded, so there is no enable-time install, no uninstall, and neither failure mode exists. (Real install/uninstall exists for a different system — git-sourced plugins in `plugins-management-service.ts`.)\r\n\r\nOne unrelated, pre-existing test is flaky across both E2E suites: `mock-llm-automation.spec.ts:376 › step 2: create automation and dispatch run via the UI` (\"Created automation ID was not reported after 30000ms\", Playwright exit 124). It fails identically on `main` — [run 32388224354](https://github.com/OpenHands/OpenHands/actions/runs/32388224354), 2026-08-20, before this branch existed — and it alternates between the two suites run to run: `mock-llm-docker-e2e` green and `mock-llm-e2e` red on one commit, the reverse on the next. It uses a plain-English prompt against `openhands-automation`, which is default-enabled, so the allow-list does not touch it.\r\n\r\nBoth suites have since gone green at least once on this branch, and the `preset automation → slash command conversation › direct slash command from home page triggers skill activation` spec — the one this change actually broke — has passed in every run since the fix.\r\n\r\nThe first CI run caught a real regression this way: the mock-LLM E2E `preset automation → slash command conversation` spec came back with `activated_skills=[]`, which is what surfaced the automation-card dependency on catalog skills. Fixed in `fix(skills): load a catalog skill the opening slash command invokes`.\r\n\r\nFollow-ups, phase 3 in the plan, each its own issue:\r\n\r\n- Per-workspace scoping — needs a metadata bag on `LocalWorkspace`, which is an SDK `WorkspacesClient` schema change first. Phases 1–2 are app-global and fix the reported problem.\r\n- Cloud parity — the cloud catalog and conversation-create path need their own filtering.\r\n- The agent-profile `disabled_skills` deny-list is a second, independent list the adapter never consults; which one wins is unresolved.\r\n\r\n\r\n\r\n\n<!-- AGENT_CANVAS_DOCKER_START -->\n---\n**🐳 Docker images for this PR**\n\n• **GHCR package:** https://github.com/OpenHands/OpenHands/pkgs/container/agent-canvas\n\n| Component | Value |\n|---|---|\n| **Image** | `ghcr.io/openhands/agent-canvas` |\n| **Architectures** | amd64, arm64 |\n| **Agent Server** | `ghcr.io/openhands/agent-server:1.42.1-python` |\n| **Automation** | `openhands-automation==1.8.0` |\n| **Commit** | `fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c` |\n\n**Pull (multi-arch manifest)**\n```bash\n# Multi-arch manifest — Docker automatically pulls the correct architecture\ndocker pull ghcr.io/openhands/agent-canvas:sha-fae6ad8\n```\n\n**Run**\n```bash\ndocker run -it --rm \\\n -p 8000:8000 \\\n ghcr.io/openhands/agent-canvas:sha-fae6ad8\n```\n\n**All tags pushed for this build**\n```\nghcr.io/openhands/agent-canvas:sha-fae6ad8-amd64\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist-amd64\nghcr.io/openhands/agent-canvas:pr-16860-amd64\nghcr.io/openhands/agent-canvas:sha-fae6ad8-arm64\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist-arm64\nghcr.io/openhands/agent-canvas:pr-16860-arm64\nghcr.io/openhands/agent-canvas:sha-fae6ad8\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist\nghcr.io/openhands/agent-canvas:pr-16860\n```\n\n**About Multi-Architecture Support**\n- Each tag (e.g., `sha-fae6ad8`) is a **multi-arch manifest** supporting both **amd64** and **arm64**\n- Docker automatically pulls the correct architecture for your platform\n- Individual architecture tags (e.g., `sha-fae6ad8-amd64`) are also available if needed\n<!-- AGENT_CANVAS_DOCKER_END -->\r\n\r\n\r\n","state":"closed","merged_at":"2026-08-24T18:53:41Z","html_url":"https://github.com/OpenHands/OpenHands/pull/16860","base":"main","head":"vasco/skills-enabled-allowlist","changed_files":21,"commits":6,"additions":1128,"deletions":156}Full event evidence
{
"id": "0c010251-bb8a-48c5-b5cc-368f6caf65f9",
"timestamp": "2026-10-17T16:32:35.638158",
"source": "environment",
"parent_id": "32efdd79-4b5b-4b85-a91b-c63a9163debb",
"tool_name": "get_pull_request",
"tool_call_id": "call_89461e1d7c8c4e5fb768ae6d",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_pull_request' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"number\":16860,\"title\":\"feat(skills): replace the all-on skill catalog with an explicit allow-list\",\"body\":\"HUMAN:\\r\\n\\r\\nEnable a set of reccomanded skills as default and not the whole package. \\r\\n\\r\\nAGENT:\\r\\n\\r\\nPhases 1 and 2 of the plan in #16302. Phase 0 (the `defaultEnabled` catalog flag and `DEFAULT_ENABLED_SKILL_NAMES`) shipped in OpenHands/extensions#485 and is already on `@openhands/extensions@0.18.0`, which this repo pins.\\r\\n\\r\\nEvidence below is a real run of the Customize page against the change, not just unit tests: 59 catalog skills render, 11 on, 48 off, and `add-javadoc` — the skill from the issue report — is among the 48.\\r\\n\\r\\n---\\r\\n\\r\\n## Why\\r\\n\\r\\nNothing is installed today. The whole `@openhands/extensions` catalog is baked into the bundle at build time and merged into `agent_context.skills` for every conversation, with `disabled_skills` as the only escape hatch. All-on-with-a-deny-list means every catalog addition is on by default for everyone, which is how @rbren ended up opted into javadoc and bitbucket skills. The cost isn't disk — it's ~60 skill bodies and 60 trigger sets competing in every system prompt.\\r\\n\\r\\n## Summary\\r\\n\\r\\n- `enabled_skills`: an allow-list **over the bundled catalog only**, defaulting to the 11 entries the catalog flags `defaultEnabled`. `disabled_skills` keeps its job for user- and project-authored skills, which are discovered at runtime from `.agents/skills/` and should be on the moment they appear. `src/utils/skill-enablement.ts` is the single place that decides which list a skill belongs to.\\r\\n- A one-shot migration at the app root (`useMigrateEnabledSkills`): a workspace whose deny-list names a catalog skill keeps everything else on (behaviour preserved); a fresh one gets the curated default; one that already has `enabled_skills` is untouched. Both branches persist an **explicit** list, which is what stops a later `defaultEnabled` addition from switching itself on. `undefined` is the \\\"never migrated\\\" sentinel, so it is deliberately kept out of `DEFAULT_SETTINGS` and out of the `use-settings` coercions.\\r\\n- A skill the opening message invokes by name (`/standup-digest:setup`, or `/<skill-name>` from the \\\"Use skill\\\" button) is loaded for that conversation whatever the lists say. Automation preset cards fill the input with exactly that command, and 18 of the catalog's 24 slash commands belong to skills that are off by default — without this the card would silently do nothing. Only the leading token counts.\\r\\n- Customize gets a \\\"Recommended\\\" badge and a matching facet; the Customize page and the conversation drawer, which each carried their own copy of the hydrate/auto-save/toggle logic, now share `useSkillEnablement` so one surface can't write a preference the other can't see.\\r\\n\\r\\n## Issue Number\\r\\n\\r\\nFixes #16302\\r\\n\\r\\n## How to Test\\r\\n\\r\\n```\\r\\nnpm ci\\r\\nVITE_FRONTEND_PORT=5199 npm run dev:mock\\r\\n# open http://localhost:5199/skills\\r\\n```\\r\\n\\r\\nExpect 59 skill cards with 11 enabled and 48 disabled, a `RECOMMENDATION` facet next to `STATE`, \\\"Recommended\\\" pills on the 11, and the notice under the page description. `add-javadoc` and the `bitbucket*` skills — the ones reported in #16302 — start off; toggling one on writes `enabled_skills`, not `disabled_skills` (visible in the PATCH `misc_settings_diff.app_preferences`).\\r\\n\\r\\nFor the migration: seed `disabled_skills` with a catalog name before first load and confirm the persisted `enabled_skills` is the whole catalog minus that name, not the curated default.\\r\\n\\r\\nAutomated:\\r\\n\\r\\n- `npx vitest run` → 5064 passed. One unrelated pre-existing failure, `dev-with-automation` SIGHUP cleanup, which fails the same way on an untouched `main`.\\r\\n- `npm run lint` and `npm run check-translation-completeness` clean; the 4 new keys are translated for all 15 locales.\\r\\n- New: `__tests__/utils/skill-enablement.test.ts` (resolve / deny-veto / every migration branch), `__tests__/hooks/use-migrate-enabled-skills.test.tsx` (one-shot, cloud skip, no write over a failed settings load), plus route and facet cases.\\r\\n- The two adapter tests that asserted `add-javadoc` reaches the agent context now assert the opposite — that flip **is** the fix.\\r\\n\\r\\n## Video/Screenshots\\r\\n\\r\\nCustomize → Skills, default state after the change. `STATE` reads Enabled 11 / Disabled 48; `add-javadoc` and `agent-creator` are off, `add-skill` / `agent-canvas-environment` / `agent-memory` are on and badged:\\r\\n\\r\\n\\r\\n\\r\\nThe new `RECOMMENDATION` facet, narrowed to Recommended — 11 results, all enabled:\\r\\n\\r\\n\\r\\n\\r\\n## Type\\r\\n\\r\\n- [ ] Bug fix\\r\\n- [x] Feature\\r\\n- [ ] Refactor\\r\\n- [ ] Breaking change\\r\\n- [ ] Docs / chore\\r\\n\\r\\n## Notes\\r\\n\\r\\nDeviations from the plan in the issue, worth a look at review:\\r\\n\\r\\n- **No `Core` tier.** The shaped spec asked for mutually exclusive `Core` / `Recommended` tags, which forces `core` to secretly mean \\\"core **and** default-on\\\". Grepping every catalog name against `src/` (minus i18n), exactly one skill is referenced by Canvas code — `add-skill`, via `/add-skill` and the restart banner — and disabling it degrades that flow rather than breaking Canvas. So: one flag, no locked toggles. If something genuinely unremovable appears later, the lock is a Canvas-side const and a union in one resolver.\\r\\n- **The deny-list still wins over the allow-list.** Only matters before the migration lands: until then a pre-existing \\\"I turned this off\\\" lives in `disabled_skills` alone, and the allow-list fallback would otherwise switch it back on. Post-migration the two lists are disjoint and the clause is a no-op.\\r\\n- **A shared hook, rather than only touching `skills-settings.tsx`** as the plan said. `conversation-overview-skills-panel.tsx` runs the same logic; leaving it on the deny-list would have made its catalog toggles silently no-op.\\r\\n- **Cloud is untouched**, per the plan: it creates conversations from its own server-side catalog and never reads `agent_context`, so both the migration and the allow-list UI are gated to local. Cloud keeps today's deny-list behaviour.\\r\\n- **Install/download is out of scope** and the spec's \\\"Installation and updates\\\" section doesn't apply: catalog skills are bundled, never downloaded, so there is no enable-time install, no uninstall, and neither failure mode exists. (Real install/uninstall exists for a different system — git-sourced plugins in `plugins-management-service.ts`.)\\r\\n\\r\\nOne unrelated, pre-existing test is flaky across both E2E suites: `mock-llm-automation.spec.ts:376 › step 2: create automation and dispatch run via the UI` (\\\"Created automation ID was not reported after 30000ms\\\", Playwright exit 124). It fails identically on `main` — [run 32388224354](https://github.com/OpenHands/OpenHands/actions/runs/32388224354), 2026-08-20, before this branch existed — and it alternates between the two suites run to run: `mock-llm-docker-e2e` green and `mock-llm-e2e` red on one commit, the reverse on the next. It uses a plain-English prompt against `openhands-automation`, which is default-enabled, so the allow-list does not touch it.\\r\\n\\r\\nBoth suites have since gone green at least once on this branch, and the `preset automation → slash command conversation › direct slash command from home page triggers skill activation` spec — the one this change actually broke — has passed in every run since the fix.\\r\\n\\r\\nThe first CI run caught a real regression this way: the mock-LLM E2E `preset automation → slash command conversation` spec came back with `activated_skills=[]`, which is what surfaced the automation-card dependency on catalog skills. Fixed in `fix(skills): load a catalog skill the opening slash command invokes`.\\r\\n\\r\\nFollow-ups, phase 3 in the plan, each its own issue:\\r\\n\\r\\n- Per-workspace scoping — needs a metadata bag on `LocalWorkspace`, which is an SDK `WorkspacesClient` schema change first. Phases 1–2 are app-global and fix the reported problem.\\r\\n- Cloud parity — the cloud catalog and conversation-create path need their own filtering.\\r\\n- The agent-profile `disabled_skills` deny-list is a second, independent list the adapter never consults; which one wins is unresolved.\\r\\n\\r\\n\\r\\n\\r\\n\\n<!-- AGENT_CANVAS_DOCKER_START -->\\n---\\n**🐳 Docker images for this PR**\\n\\n• **GHCR package:** https://github.com/OpenHands/OpenHands/pkgs/container/agent-canvas\\n\\n| Component | Value |\\n|---|---|\\n| **Image** | `ghcr.io/openhands/agent-canvas` |\\n| **Architectures** | amd64, arm64 |\\n| **Agent Server** | `ghcr.io/openhands/agent-server:1.42.1-python` |\\n| **Automation** | `openhands-automation==1.8.0` |\\n| **Commit** | `fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c` |\\n\\n**Pull (multi-arch manifest)**\\n```bash\\n# Multi-arch manifest — Docker automatically pulls the correct architecture\\ndocker pull ghcr.io/openhands/agent-canvas:sha-fae6ad8\\n```\\n\\n**Run**\\n```bash\\ndocker run -it --rm \\\\\\n -p 8000:8000 \\\\\\n ghcr.io/openhands/agent-canvas:sha-fae6ad8\\n```\\n\\n**All tags pushed for this build**\\n```\\nghcr.io/openhands/agent-canvas:sha-fae6ad8-amd64\\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist-amd64\\nghcr.io/openhands/agent-canvas:pr-16860-amd64\\nghcr.io/openhands/agent-canvas:sha-fae6ad8-arm64\\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist-arm64\\nghcr.io/openhands/agent-canvas:pr-16860-arm64\\nghcr.io/openhands/agent-canvas:sha-fae6ad8\\nghcr.io/openhands/agent-canvas:vasco-skills-enabled-allowlist\\nghcr.io/openhands/agent-canvas:pr-16860\\n```\\n\\n**About Multi-Architecture Support**\\n- Each tag (e.g., `sha-fae6ad8`) is a **multi-arch manifest** supporting both **amd64** and **arm64**\\n- Docker automatically pulls the correct architecture for your platform\\n- Individual architecture tags (e.g., `sha-fae6ad8-amd64`) are also available if needed\\n<!-- AGENT_CANVAS_DOCKER_END -->\\r\\n\\r\\n\\r\\n\",\"state\":\"closed\",\"merged_at\":\"2026-08-24T18:53:41Z\",\"html_url\":\"https://github.com/OpenHands/OpenHands/pull/16860\",\"base\":\"main\",\"head\":\"vasco/skills-enabled-allowlist\",\"changed_files\":21,\"commits\":6,\"additions\":1128,\"deletions\":156}"
}
],
"is_error": false,
"tool_name": "get_pull_request",
"kind": "MCPToolObservation"
},
"action_id": "7760fd5f-fb4e-4c37-b248-21f3eae776d2",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: list_pull_request_files
[Tool 'list_pull_request_files' executed.]
[{"filename":".github/pr-assets/pr-16860-01-skills-default.png","status":"added","additions":0,"deletions":0,"changes":0,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/.github%2Fpr-assets%2Fpr-16860-01-skills-default.png"},{"filename":".github/pr-assets/pr-16860-02-recommended-facet.png","status":"added","additions":0,"deletions":0,"changes":0,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/.github%2Fpr-assets%2Fpr-16860-02-recommended-facet.png"},{"filename":"__tests__/components/features/skills/skill-filter.test.ts","status":"modified","additions":65,"deletions":19,"changes":84,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fcomponents%2Ffeatures%2Fskills%2Fskill-filter.test.ts"},{"filename":"__tests__/components/modals/skills/skill-modal.test.tsx","status":"modified","additions":35,"deletions":4,"changes":39,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fcomponents%2Fmodals%2Fskills%2Fskill-modal.test.tsx"},{"filename":"__tests__/hooks/use-migrate-enabled-skills.test.tsx","status":"added","additions":102,"deletions":0,"changes":102,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fhooks%2Fuse-migrate-enabled-skills.test.tsx"},{"filename":"__tests__/routes/skills-settings.test.tsx","status":"modified","additions":133,"deletions":0,"changes":133,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Froutes%2Fskills-settings.test.tsx"},{"filename":"__tests__/utils/skill-enablement.test.ts","status":"added","additions":161,"deletions":0,"changes":161,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Futils%2Fskill-enablement.test.ts"},{"filename":"src/api/agent-server-adapter.test.ts","status":"modified","additions":73,"deletions":4,"changes":77,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fagent-server-adapter.test.ts"},{"filename":"src/api/agent-server-adapter.ts","status":"modified","additions":42,"deletions":10,"changes":52,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fagent-server-adapter.ts"},{"filename":"src/api/settings-service/settings-service.api.ts","status":"modified","additions":3,"deletions":1,"changes":4,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fsettings-service%2Fsettings-service.api.ts"},{"filename":"src/components/features/conversation-panel/skills-modal.tsx","status":"modified","additions":12,"deletions":3,"changes":15,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fconversation-panel%2Fskills-modal.tsx"},{"filename":"src/components/features/conversation/conversation-overview-skills-panel.tsx","status":"modified","additions":10,"deletions":51,"changes":61,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fconversation%2Fconversation-overview-skills-panel.tsx"},{"filename":"src/components/features/skills/build-skill-pills.tsx","status":"modified","additions":18,"deletions":0,"changes":18,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fskills%2Fbuild-skill-pills.tsx"},{"filename":"src/components/features/skills/skill-filter.ts","status":"modified","additions":53,"deletions":16,"changes":69,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fskills%2Fskill-filter.ts"},{"filename":"src/hooks/use-migrate-enabled-skills.ts","status":"added","additions":43,"deletions":0,"changes":43,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fhooks%2Fuse-migrate-enabled-skills.ts"},{"filename":"src/hooks/use-skill-enablement.ts","status":"added","additions":160,"deletions":0,"changes":160,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fhooks%2Fuse-skill-enablement.ts"},{"filename":"src/i18n/translation.json","status":"modified","additions":68,"deletions":0,"changes":68,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fi18n%2Ftranslation.json"},{"filename":"src/routes/root-layout.tsx","status":"modified","additions":3,"deletions":0,"changes":3,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Froutes%2Froot-layout.tsx"},{"filename":"src/routes/skills-settings.tsx","status":"modified","additions":16,"deletions":48,"changes":64,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Froutes%2Fskills-settings.tsx"},{"filename":"src/types/settings.ts","status":"modified","additions":7,"deletions":0,"changes":7,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Ftypes%2Fsettings.ts"},{"filename":"src/utils/skill-enablement.ts","status":"added","additions":124,"deletions":0,"changes":124,"blob_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Futils%2Fskill-enablement.ts"}]Full event evidence
{
"id": "24116b82-0298-44af-a966-e84c42f4c701",
"timestamp": "2026-10-17T16:32:36.018551",
"source": "environment",
"parent_id": "0c010251-bb8a-48c5-b5cc-368f6caf65f9",
"tool_name": "list_pull_request_files",
"tool_call_id": "call_bb57522c541c466ca57a74f8",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'list_pull_request_files' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "[{\"filename\":\".github/pr-assets/pr-16860-01-skills-default.png\",\"status\":\"added\",\"additions\":0,\"deletions\":0,\"changes\":0,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/.github%2Fpr-assets%2Fpr-16860-01-skills-default.png\"},{\"filename\":\".github/pr-assets/pr-16860-02-recommended-facet.png\",\"status\":\"added\",\"additions\":0,\"deletions\":0,\"changes\":0,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/.github%2Fpr-assets%2Fpr-16860-02-recommended-facet.png\"},{\"filename\":\"__tests__/components/features/skills/skill-filter.test.ts\",\"status\":\"modified\",\"additions\":65,\"deletions\":19,\"changes\":84,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fcomponents%2Ffeatures%2Fskills%2Fskill-filter.test.ts\"},{\"filename\":\"__tests__/components/modals/skills/skill-modal.test.tsx\",\"status\":\"modified\",\"additions\":35,\"deletions\":4,\"changes\":39,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fcomponents%2Fmodals%2Fskills%2Fskill-modal.test.tsx\"},{\"filename\":\"__tests__/hooks/use-migrate-enabled-skills.test.tsx\",\"status\":\"added\",\"additions\":102,\"deletions\":0,\"changes\":102,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Fhooks%2Fuse-migrate-enabled-skills.test.tsx\"},{\"filename\":\"__tests__/routes/skills-settings.test.tsx\",\"status\":\"modified\",\"additions\":133,\"deletions\":0,\"changes\":133,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Froutes%2Fskills-settings.test.tsx\"},{\"filename\":\"__tests__/utils/skill-enablement.test.ts\",\"status\":\"added\",\"additions\":161,\"deletions\":0,\"changes\":161,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__%2Futils%2Fskill-enablement.test.ts\"},{\"filename\":\"src/api/agent-server-adapter.test.ts\",\"status\":\"modified\",\"additions\":73,\"deletions\":4,\"changes\":77,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fagent-server-adapter.test.ts\"},{\"filename\":\"src/api/agent-server-adapter.ts\",\"status\":\"modified\",\"additions\":42,\"deletions\":10,\"changes\":52,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fagent-server-adapter.ts\"},{\"filename\":\"src/api/settings-service/settings-service.api.ts\",\"status\":\"modified\",\"additions\":3,\"deletions\":1,\"changes\":4,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fapi%2Fsettings-service%2Fsettings-service.api.ts\"},{\"filename\":\"src/components/features/conversation-panel/skills-modal.tsx\",\"status\":\"modified\",\"additions\":12,\"deletions\":3,\"changes\":15,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fconversation-panel%2Fskills-modal.tsx\"},{\"filename\":\"src/components/features/conversation/conversation-overview-skills-panel.tsx\",\"status\":\"modified\",\"additions\":10,\"deletions\":51,\"changes\":61,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fconversation%2Fconversation-overview-skills-panel.tsx\"},{\"filename\":\"src/components/features/skills/build-skill-pills.tsx\",\"status\":\"modified\",\"additions\":18,\"deletions\":0,\"changes\":18,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fskills%2Fbuild-skill-pills.tsx\"},{\"filename\":\"src/components/features/skills/skill-filter.ts\",\"status\":\"modified\",\"additions\":53,\"deletions\":16,\"changes\":69,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fcomponents%2Ffeatures%2Fskills%2Fskill-filter.ts\"},{\"filename\":\"src/hooks/use-migrate-enabled-skills.ts\",\"status\":\"added\",\"additions\":43,\"deletions\":0,\"changes\":43,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fhooks%2Fuse-migrate-enabled-skills.ts\"},{\"filename\":\"src/hooks/use-skill-enablement.ts\",\"status\":\"added\",\"additions\":160,\"deletions\":0,\"changes\":160,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fhooks%2Fuse-skill-enablement.ts\"},{\"filename\":\"src/i18n/translation.json\",\"status\":\"modified\",\"additions\":68,\"deletions\":0,\"changes\":68,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Fi18n%2Ftranslation.json\"},{\"filename\":\"src/routes/root-layout.tsx\",\"status\":\"modified\",\"additions\":3,\"deletions\":0,\"changes\":3,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Froutes%2Froot-layout.tsx\"},{\"filename\":\"src/routes/skills-settings.tsx\",\"status\":\"modified\",\"additions\":16,\"deletions\":48,\"changes\":64,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Froutes%2Fskills-settings.tsx\"},{\"filename\":\"src/types/settings.ts\",\"status\":\"modified\",\"additions\":7,\"deletions\":0,\"changes\":7,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Ftypes%2Fsettings.ts\"},{\"filename\":\"src/utils/skill-enablement.ts\",\"status\":\"added\",\"additions\":124,\"deletions\":0,\"changes\":124,\"blob_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src%2Futils%2Fskill-enablement.ts\"}]"
}
],
"is_error": false,
"tool_name": "list_pull_request_files",
"kind": "MCPToolObservation"
},
"action_id": "1395a3e6-cd6a-4ccf-ae3d-44f5dd677da5",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: list_pull_request_commits
[Tool 'list_pull_request_commits' executed.]
[{"sha":"b28af79ef06f6aedb449b56888ebe9b727c48939","message":"feat(skills): allow-list bundled catalog skills instead of shipping all of them\n\nEvery skill in the `@openhands/extensions` catalog is baked into the bundle at\nbuild time and merged into `agent_context.skills` for every conversation, with\n`disabled_skills` as the only way out. That deny-list means each catalog\naddition is on by default for everyone — the reported symptom in #16302, where\na user found themselves opted into javadoc and bitbucket skills. The cost is\nnot disk but ~60 skill bodies and trigger sets competing in every system\nprompt.\n\nIntroduce `enabled_skills`, an allow-list over the bundled catalog, defaulting\nto the entries the catalog now flags `defaultEnabled` (OpenHands/extensions#485).\n`disabled_skills` keeps its job for user- and project-authored skills, which are\ndiscovered at runtime and should be on the moment they appear.\n\n`undefined` is the \"never migrated\" sentinel, so it is deliberately kept out of\n`DEFAULT_SETTINGS` and out of the `use-settings` coercions. A one-shot migration\nat the app root converts each workspace once: one that had switched catalog\nskills off keeps everything else on, a fresh one gets the curated default, and\nboth persist an explicit list so a later `defaultEnabled` addition cannot switch\nitself on. It skips cloud, which creates conversations from its own server-side\ncatalog and never reads the field.","html_url":"https://github.com/OpenHands/OpenHands/commit/b28af79ef06f6aedb449b56888ebe9b727c48939"},{"sha":"0a76cb9b97e45f3abfbaa6c5b893e7baac89f250","message":"feat(skills): surface the allow-list in Customize\n\nBoth skill surfaces — the Customize page and the conversation drawer — held\ntheir own copy of the hydrate / auto-save / toggle logic against\n`disabled_skills`. The two lists behind enablement are not symmetric, so a\nshared `useSkillEnablement` hook now owns the decision of which list a given\nskill belongs to: leaving it in two places would let one surface write a\npreference the other cannot see. Re-enabling a catalog skill also drops it from\nan unmigrated deny-list, where a stale entry would otherwise veto it.\n\nCards carry a \"Recommended\" badge for the catalog's `defaultEnabled` entries,\nand a matching facet filters by it. The facet hides itself when nothing\ndiscriminates, which is what keeps it off cloud, where the allow-list does not\napply and toggles stay on the deny-list.\n\nThe filter helpers now take enablement as a predicate rather than a deny-set:\nresolving two lists is the caller's concern, not the filter's.\n\nA notice on the page states that changes reach new conversations only.","html_url":"https://github.com/OpenHands/OpenHands/commit/0a76cb9b97e45f3abfbaa6c5b893e7baac89f250"},{"sha":"e5c848586bed65324d126314691f661e185b5139","message":"docs(skills): add PR screenshots for the skill allow-list","html_url":"https://github.com/OpenHands/OpenHands/commit/e5c848586bed65324d126314691f661e185b5139"},{"sha":"8b8b31b8b7465b4a790f487d2bf956f259db8c37","message":"fix(skills): load a catalog skill the opening slash command invokes\n\nThe allow-list broke automation presets, caught by the mock-LLM E2E\n`preset automation → slash command conversation` spec: the conversation came\nback with `activated_skills=[]`.\n\nAn automation card fills the chat input with its skill's own command — the\nfirst entry of the skill's `triggers`, via `findAutomationCommand` — and 18 of\nthe catalog's 24 slash commands belong to skills that are off by default. So\nthe command reached the agent as a bare string with none of the instructions\nbehind it, and the card looked like it did nothing.\n\nNaming a command is a stronger signal than either stored list, so an invoked\nskill is loaded for that conversation whatever the lists say, and without\nchanging them. Only the leading token counts: matching a `/word` anywhere in\nprose would re-admit most of the catalog through the back door, which is the\nbehaviour the allow-list exists to remove. `/<skill-name>` is indexed too,\nsince that is what the detail modal's \"Use skill\" button inserts.","html_url":"https://github.com/OpenHands/OpenHands/commit/8b8b31b8b7465b4a790f487d2bf956f259db8c37"},{"sha":"304d02c5d4a6a808296cb974bb99f2fe23bc8b7d","message":"refactor(skills): share one enablement rule and trim the commentary\n\n`isSkillEnabled` was dead in production while `useSkillEnablement` re-implemented\nit, so the rule lived in two places. Both callers now build it once through\n`buildSkillEnablementFilter`, which also keeps the per-skill check off the\nresolve path in the Customize render loop.\n\nFixes a race the split introduced: the toggle surfaces persisted their hydrated\nstate on mount, which for an unmigrated workspace wrote the curated default and\ncould land after — and so undo — the migration that had just preserved the\nworkspace's own set. The save now runs only when the lists actually change,\nwhich also drops a redundant PATCH per page visit.\n\n`CATALOG_SKILL_NAMES` and `RECOMMENDED_SKILL_NAMES` were exported but unused\noutside their module; the first is now what the cloud branch hydrates from and\nthe second is private. `findInvokedCatalogSkills` returned an array that could\nonly ever hold one entry, so it is singular. Both toggle surfaces called\n`setEnabled` through a wrapper that added nothing.","html_url":"https://github.com/OpenHands/OpenHands/commit/304d02c5d4a6a808296cb974bb99f2fe23bc8b7d"},{"sha":"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c","message":"fix(skills): list only enabled skills in the conversation Skills modal\n\n\"Show Available Skills\" read the raw catalog and filtered nothing, so it\nreported all 59 bundled skills as available while the agent had 11. The claim\nwas already loose before the allow-list — a skill on the deny-list still\nappeared — but going from a handful of exceptions to 48 makes it wrong.\n\nThe modal is read-only, so it takes the same rule through a new\n`useSkillEnabledFilter` rather than the toggle hook, and the settings-to-lists\nmapping (including the cloud carve-out) is now shared by both.\n\nThe slash-command menu deliberately keeps listing every command: invoking one\nby name loads its skill for that conversation.","html_url":"https://github.com/OpenHands/OpenHands/commit/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"}]Full event evidence
{
"id": "d1496ff5-2510-4ae0-8b20-9723c339eee8",
"timestamp": "2026-10-17T16:32:36.396879",
"source": "environment",
"parent_id": "24116b82-0298-44af-a966-e84c42f4c701",
"tool_name": "list_pull_request_commits",
"tool_call_id": "call_3a59d606c5264e3b80305576",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'list_pull_request_commits' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "[{\"sha\":\"b28af79ef06f6aedb449b56888ebe9b727c48939\",\"message\":\"feat(skills): allow-list bundled catalog skills instead of shipping all of them\\n\\nEvery skill in the `@openhands/extensions` catalog is baked into the bundle at\\nbuild time and merged into `agent_context.skills` for every conversation, with\\n`disabled_skills` as the only way out. That deny-list means each catalog\\naddition is on by default for everyone — the reported symptom in #16302, where\\na user found themselves opted into javadoc and bitbucket skills. The cost is\\nnot disk but ~60 skill bodies and trigger sets competing in every system\\nprompt.\\n\\nIntroduce `enabled_skills`, an allow-list over the bundled catalog, defaulting\\nto the entries the catalog now flags `defaultEnabled` (OpenHands/extensions#485).\\n`disabled_skills` keeps its job for user- and project-authored skills, which are\\ndiscovered at runtime and should be on the moment they appear.\\n\\n`undefined` is the \\\"never migrated\\\" sentinel, so it is deliberately kept out of\\n`DEFAULT_SETTINGS` and out of the `use-settings` coercions. A one-shot migration\\nat the app root converts each workspace once: one that had switched catalog\\nskills off keeps everything else on, a fresh one gets the curated default, and\\nboth persist an explicit list so a later `defaultEnabled` addition cannot switch\\nitself on. It skips cloud, which creates conversations from its own server-side\\ncatalog and never reads the field.\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/b28af79ef06f6aedb449b56888ebe9b727c48939\"},{\"sha\":\"0a76cb9b97e45f3abfbaa6c5b893e7baac89f250\",\"message\":\"feat(skills): surface the allow-list in Customize\\n\\nBoth skill surfaces — the Customize page and the conversation drawer — held\\ntheir own copy of the hydrate / auto-save / toggle logic against\\n`disabled_skills`. The two lists behind enablement are not symmetric, so a\\nshared `useSkillEnablement` hook now owns the decision of which list a given\\nskill belongs to: leaving it in two places would let one surface write a\\npreference the other cannot see. Re-enabling a catalog skill also drops it from\\nan unmigrated deny-list, where a stale entry would otherwise veto it.\\n\\nCards carry a \\\"Recommended\\\" badge for the catalog's `defaultEnabled` entries,\\nand a matching facet filters by it. The facet hides itself when nothing\\ndiscriminates, which is what keeps it off cloud, where the allow-list does not\\napply and toggles stay on the deny-list.\\n\\nThe filter helpers now take enablement as a predicate rather than a deny-set:\\nresolving two lists is the caller's concern, not the filter's.\\n\\nA notice on the page states that changes reach new conversations only.\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/0a76cb9b97e45f3abfbaa6c5b893e7baac89f250\"},{\"sha\":\"e5c848586bed65324d126314691f661e185b5139\",\"message\":\"docs(skills): add PR screenshots for the skill allow-list\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/e5c848586bed65324d126314691f661e185b5139\"},{\"sha\":\"8b8b31b8b7465b4a790f487d2bf956f259db8c37\",\"message\":\"fix(skills): load a catalog skill the opening slash command invokes\\n\\nThe allow-list broke automation presets, caught by the mock-LLM E2E\\n`preset automation → slash command conversation` spec: the conversation came\\nback with `activated_skills=[]`.\\n\\nAn automation card fills the chat input with its skill's own command — the\\nfirst entry of the skill's `triggers`, via `findAutomationCommand` — and 18 of\\nthe catalog's 24 slash commands belong to skills that are off by default. So\\nthe command reached the agent as a bare string with none of the instructions\\nbehind it, and the card looked like it did nothing.\\n\\nNaming a command is a stronger signal than either stored list, so an invoked\\nskill is loaded for that conversation whatever the lists say, and without\\nchanging them. Only the leading token counts: matching a `/word` anywhere in\\nprose would re-admit most of the catalog through the back door, which is the\\nbehaviour the allow-list exists to remove. `/<skill-name>` is indexed too,\\nsince that is what the detail modal's \\\"Use skill\\\" button inserts.\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/8b8b31b8b7465b4a790f487d2bf956f259db8c37\"},{\"sha\":\"304d02c5d4a6a808296cb974bb99f2fe23bc8b7d\",\"message\":\"refactor(skills): share one enablement rule and trim the commentary\\n\\n`isSkillEnabled` was dead in production while `useSkillEnablement` re-implemented\\nit, so the rule lived in two places. Both callers now build it once through\\n`buildSkillEnablementFilter`, which also keeps the per-skill check off the\\nresolve path in the Customize render loop.\\n\\nFixes a race the split introduced: the toggle surfaces persisted their hydrated\\nstate on mount, which for an unmigrated workspace wrote the curated default and\\ncould land after — and so undo — the migration that had just preserved the\\nworkspace's own set. The save now runs only when the lists actually change,\\nwhich also drops a redundant PATCH per page visit.\\n\\n`CATALOG_SKILL_NAMES` and `RECOMMENDED_SKILL_NAMES` were exported but unused\\noutside their module; the first is now what the cloud branch hydrates from and\\nthe second is private. `findInvokedCatalogSkills` returned an array that could\\nonly ever hold one entry, so it is singular. Both toggle surfaces called\\n`setEnabled` through a wrapper that added nothing.\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/304d02c5d4a6a808296cb974bb99f2fe23bc8b7d\"},{\"sha\":\"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\",\"message\":\"fix(skills): list only enabled skills in the conversation Skills modal\\n\\n\\\"Show Available Skills\\\" read the raw catalog and filtered nothing, so it\\nreported all 59 bundled skills as available while the agent had 11. The claim\\nwas already loose before the allow-list — a skill on the deny-list still\\nappeared — but going from a handful of exceptions to 48 makes it wrong.\\n\\nThe modal is read-only, so it takes the same rule through a new\\n`useSkillEnabledFilter` rather than the toggle hook, and the settings-to-lists\\nmapping (including the cloud carve-out) is now shared by both.\\n\\nThe slash-command menu deliberately keeps listing every command: invoking one\\nby name loads its skill for that conversation.\",\"html_url\":\"https://github.com/OpenHands/OpenHands/commit/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\"}]"
}
],
"is_error": false,
"tool_name": "list_pull_request_commits",
"kind": "MCPToolObservation"
},
"action_id": "32efdd79-4b5b-4b85-a91b-c63a9163debb",
"extended_content": [],
"kind": "ObservationEvent"
}ConversationStateUpdateEvent
{
"id": "f09cd863-c53c-4218-911b-4c811ea88d91",
"timestamp": "2026-10-17T16:32:35.279440",
"source": "environment",
"parent_id": "d1496ff5-2510-4ae0-8b20-9723c339eee8",
"key": "stats",
"value": {
"usage_to_metrics": {
"default": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.00097256,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 9928,
"completion_tokens": 400,
"cache_read_tokens": 7168,
"cache_write_tokens": 0,
"reasoning_tokens": 45,
"context_window": 1000000,
"per_turn_token": 10328,
"response_id": ""
}
},
"condenser": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
}
}
},
"kind": "ConversationStateUpdateEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/utils/skill-enablement.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "cf1c8431-efcc-4251-87ea-645b727c9c13",
"timestamp": "2026-10-17T16:32:40.687607",
"source": "agent",
"parent_id": "d1496ff5-2510-4ae0-8b20-9723c339eee8",
"thought": [],
"reasoning_content": null,
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/utils/skill-enablement.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_43c3dedf3f2645d6b36bcc8c",
"tool_call": {
"id": "call_43c3dedf3f2645d6b36bcc8c",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"path\": \"src/utils/skill-enablement.ts\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"summary\": \"Read allow-list utility at merge commit\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272756-NZR4ruFauGlIbJZL5hwa",
"security_risk": "UNKNOWN",
"summary": "Read allow-list utility at merge commit",
"kind": "ActionEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/hooks/use-skill-enablement.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "86f08123-911b-4e7f-8e64-4688d46a9c77",
"timestamp": "2026-10-17T16:32:40.693002",
"source": "agent",
"parent_id": "cf1c8431-efcc-4251-87ea-645b727c9c13",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/hooks/use-skill-enablement.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_4e263428640c4c03ab1f07fd",
"tool_call": {
"id": "call_4e263428640c4c03ab1f07fd",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"path\": \"src/hooks/use-skill-enablement.ts\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"summary\": \"Read shared toggle hook at merge commit\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272756-NZR4ruFauGlIbJZL5hwa",
"security_risk": "UNKNOWN",
"summary": "Read shared toggle hook at merge commit",
"kind": "ActionEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/hooks/use-migrate-enabled-skills.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "66234c42-5f3e-4138-b599-d747705c1dbb",
"timestamp": "2026-10-17T16:32:40.695381",
"source": "agent",
"parent_id": "86f08123-911b-4e7f-8e64-4688d46a9c77",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/hooks/use-migrate-enabled-skills.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_3f77a682da8745ff95ebd7be",
"tool_call": {
"id": "call_3f77a682da8745ff95ebd7be",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"path\": \"src/hooks/use-migrate-enabled-skills.ts\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"summary\": \"Read migration hook at merge commit\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272756-NZR4ruFauGlIbJZL5hwa",
"security_risk": "UNKNOWN",
"summary": "Read migration hook at merge commit",
"kind": "ActionEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/api/agent-server-adapter.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "8e006827-f516-43d1-9d5e-3c9d4fd212c3",
"timestamp": "2026-10-17T16:32:40.697886",
"source": "agent",
"parent_id": "66234c42-5f3e-4138-b599-d747705c1dbb",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/api/agent-server-adapter.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_118337413b2944edae5f9f7f",
"tool_call": {
"id": "call_118337413b2944edae5f9f7f",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"repo\": \"OpenHands\", \"path\": \"src/api/agent-server-adapter.ts\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"summary\": \"Read adapter at merge commit\", \"security_risk\": \"LOW\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272756-NZR4ruFauGlIbJZL5hwa",
"security_risk": "UNKNOWN",
"summary": "Read adapter at merge commit",
"kind": "ActionEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"src/utils/skill-enablement.ts","sha":"22f9c5441127215781ae8c32dae1631725d92375","content":"import {\n DEFAULT_ENABLED_SKILL_NAMES,\n SKILLS_CATALOG,\n} from \"@openhands/extensions/skills\";\n\n/** Every skill bundled from `@openhands/extensions`, in catalog order. */\nexport const CATALOG_SKILL_NAMES: readonly string[] = SKILLS_CATALOG.map(\n (entry) => entry.name,\n);\n\nconst CATALOG_SKILL_NAME_SET = new Set(CATALOG_SKILL_NAMES);\nconst RECOMMENDED_SKILL_NAME_SET = new Set(DEFAULT_ENABLED_SKILL_NAMES);\n\nexport function isCatalogSkill(name: string): boolean {\n return CATALOG_SKILL_NAME_SET.has(name);\n}\n\nexport function isRecommendedSkill(name: string): boolean {\n return RECOMMENDED_SKILL_NAME_SET.has(name);\n}\n\n/**\n * The two persisted lists. They cover different populations: `enabledSkills`\n * allow-lists the bundled catalog, whose every future addition would otherwise\n * be on for everyone (#16302), while `disabledSkills` keeps denying user- and\n * project-authored skills, which should be on the moment they appear.\n *\n * `undefined` means \"never migrated\" and must survive settings hydration.\n */\nexport interface SkillEnablement {\n enabledSkills?: string[];\n disabledSkills?: string[];\n}\n\nexport function resolveEnabledCatalogSkills(\n enablement: SkillEnablement,\n): string[] {\n return enablement.enabledSkills ?? [...DEFAULT_ENABLED_SKILL_NAMES];\n}\n\n/**\n * The one rule for \"will this skill be loaded\", resolved once per caller so\n * per-skill checks stay cheap.\n *\n * The deny-list still wins over the allow-list, which only matters before the\n * migration runs: until then a pre-existing \"I turned this off\" lives in the\n * deny-list alone.\n */\nexport function buildSkillEnablementFilter(\n enablement: SkillEnablement,\n): (skillName: string) => boolean {\n const enabled = new Set(resolveEnabledCatalogSkills(enablement));\n const disabled = new Set(enablement.disabledSkills ?? []);\n\n return (skillName) => {\n if (disabled.has(skillName)) return false;\n return !isCatalogSkill(skillName) || enabled.has(skillName);\n };\n}\n\n/**\n * One-shot conversion from \"all catalog skills on, minus a deny-list\" to an\n * explicit allow-list; `undefined` once already migrated.\n *\n * A fresh workspace is migrated too, even though the resolver's fallback would\n * give it the same set: persisting an explicit list is what stops a later\n * `defaultEnabled` catalog addition from switching itself on.\n */\nexport function migrateSkillEnablement(\n enablement: SkillEnablement,\n): { enabled_skills: string[]; disabled_skills: string[] } | undefined {\n if (enablement.enabledSkills !== undefined) return undefined;\n\n const disabled = new Set(enablement.disabledSkills ?? []);\n // A deny-list naming a catalog skill is the only evidence that this\n // workspace predates the allow-list; one holding local names alone says\n // nothing about the catalog.\n const isExistingWorkspace = [...disabled].some(isCatalogSkill);\n\n return {\n enabled_skills: isExistingWorkspace\n ? CATALOG_SKILL_NAMES.filter((name) => !disabled.has(name))\n : [...DEFAULT_ENABLED_SKILL_NAMES],\n // Catalog names move to the allow-list; a leftover deny entry would veto\n // a skill the user later switches back on.\n disabled_skills: [...disabled].filter((name) => !isCatalogSkill(name)),\n };\n}\n\nexport function toSkillEnablement(settings: {\n enabled_skills?: string[];\n disabled_skills?: string[];\n}): SkillEnablement {\n return {\n enabledSkills: settings.enabled_skills,\n disabledSkills: settings.disabled_skills,\n };\n}\n\n// Both forms a user can send: the commands a skill declares in its own\n// `triggers` (what an automation card fills in — see `findAutomationCommand`),\n// and `/<skill-name>`, which the detail modal's \"Use skill\" button inserts.\nconst CATALOG_SKILL_BY_SLASH_COMMAND = new Map(\n SKILLS_CATALOG.flatMap((entry) =>\n [\n `/${entry.name}`,\n ...(entry.triggers ?? []).filter((trigger) => trigger.startsWith(\"/\")),\n ].map((command) => [command.toLowerCase(), entry.name] as const),\n ),\n);\n\n/**\n * The catalog skill a message invokes by name, if any.\n *\n * 18 of the catalog's 24 slash commands belong to skills that are off by\n * default, so without this an automation card would send its command with none\n * of the instructions behind it. Only the leading token counts: matching a\n * `/word` anywhere in prose would re-admit most of the catalog.\n */\nexport function findInvokedCatalogSkill(query?: string): string | undefined {\n const firstToken = query?.trim().split(/\\s+/, 1)[0];\n if (!firstToken?.startsWith(\"/\")) return undefined;\n return CATALOG_SKILL_BY_SLASH_COMMAND.get(firstToken.toLowerCase());\n}\n","truncated":false,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/utils/skill-enablement.ts"}Full event evidence
{
"id": "5bbd33a6-f1e9-4c11-bc6e-d9ad5f83af97",
"timestamp": "2026-10-17T16:32:40.938526",
"source": "environment",
"parent_id": "8e006827-f516-43d1-9d5e-3c9d4fd212c3",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_43c3dedf3f2645d6b36bcc8c",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"src/utils/skill-enablement.ts\",\"sha\":\"22f9c5441127215781ae8c32dae1631725d92375\",\"content\":\"import {\\n DEFAULT_ENABLED_SKILL_NAMES,\\n SKILLS_CATALOG,\\n} from \\\"@openhands/extensions/skills\\\";\\n\\n/** Every skill bundled from `@openhands/extensions`, in catalog order. */\\nexport const CATALOG_SKILL_NAMES: readonly string[] = SKILLS_CATALOG.map(\\n (entry) => entry.name,\\n);\\n\\nconst CATALOG_SKILL_NAME_SET = new Set(CATALOG_SKILL_NAMES);\\nconst RECOMMENDED_SKILL_NAME_SET = new Set(DEFAULT_ENABLED_SKILL_NAMES);\\n\\nexport function isCatalogSkill(name: string): boolean {\\n return CATALOG_SKILL_NAME_SET.has(name);\\n}\\n\\nexport function isRecommendedSkill(name: string): boolean {\\n return RECOMMENDED_SKILL_NAME_SET.has(name);\\n}\\n\\n/**\\n * The two persisted lists. They cover different populations: `enabledSkills`\\n * allow-lists the bundled catalog, whose every future addition would otherwise\\n * be on for everyone (#16302), while `disabledSkills` keeps denying user- and\\n * project-authored skills, which should be on the moment they appear.\\n *\\n * `undefined` means \\\"never migrated\\\" and must survive settings hydration.\\n */\\nexport interface SkillEnablement {\\n enabledSkills?: string[];\\n disabledSkills?: string[];\\n}\\n\\nexport function resolveEnabledCatalogSkills(\\n enablement: SkillEnablement,\\n): string[] {\\n return enablement.enabledSkills ?? [...DEFAULT_ENABLED_SKILL_NAMES];\\n}\\n\\n/**\\n * The one rule for \\\"will this skill be loaded\\\", resolved once per caller so\\n * per-skill checks stay cheap.\\n *\\n * The deny-list still wins over the allow-list, which only matters before the\\n * migration runs: until then a pre-existing \\\"I turned this off\\\" lives in the\\n * deny-list alone.\\n */\\nexport function buildSkillEnablementFilter(\\n enablement: SkillEnablement,\\n): (skillName: string) => boolean {\\n const enabled = new Set(resolveEnabledCatalogSkills(enablement));\\n const disabled = new Set(enablement.disabledSkills ?? []);\\n\\n return (skillName) => {\\n if (disabled.has(skillName)) return false;\\n return !isCatalogSkill(skillName) || enabled.has(skillName);\\n };\\n}\\n\\n/**\\n * One-shot conversion from \\\"all catalog skills on, minus a deny-list\\\" to an\\n * explicit allow-list; `undefined` once already migrated.\\n *\\n * A fresh workspace is migrated too, even though the resolver's fallback would\\n * give it the same set: persisting an explicit list is what stops a later\\n * `defaultEnabled` catalog addition from switching itself on.\\n */\\nexport function migrateSkillEnablement(\\n enablement: SkillEnablement,\\n): { enabled_skills: string[]; disabled_skills: string[] } | undefined {\\n if (enablement.enabledSkills !== undefined) return undefined;\\n\\n const disabled = new Set(enablement.disabledSkills ?? []);\\n // A deny-list naming a catalog skill is the only evidence that this\\n // workspace predates the allow-list; one holding local names alone says\\n // nothing about the catalog.\\n const isExistingWorkspace = [...disabled].some(isCatalogSkill);\\n\\n return {\\n enabled_skills: isExistingWorkspace\\n ? CATALOG_SKILL_NAMES.filter((name) => !disabled.has(name))\\n : [...DEFAULT_ENABLED_SKILL_NAMES],\\n // Catalog names move to the allow-list; a leftover deny entry would veto\\n // a skill the user later switches back on.\\n disabled_skills: [...disabled].filter((name) => !isCatalogSkill(name)),\\n };\\n}\\n\\nexport function toSkillEnablement(settings: {\\n enabled_skills?: string[];\\n disabled_skills?: string[];\\n}): SkillEnablement {\\n return {\\n enabledSkills: settings.enabled_skills,\\n disabledSkills: settings.disabled_skills,\\n };\\n}\\n\\n// Both forms a user can send: the commands a skill declares in its own\\n// `triggers` (what an automation card fills in — see `findAutomationCommand`),\\n// and `/<skill-name>`, which the detail modal's \\\"Use skill\\\" button inserts.\\nconst CATALOG_SKILL_BY_SLASH_COMMAND = new Map(\\n SKILLS_CATALOG.flatMap((entry) =>\\n [\\n `/${entry.name}`,\\n ...(entry.triggers ?? []).filter((trigger) => trigger.startsWith(\\\"/\\\")),\\n ].map((command) => [command.toLowerCase(), entry.name] as const),\\n ),\\n);\\n\\n/**\\n * The catalog skill a message invokes by name, if any.\\n *\\n * 18 of the catalog's 24 slash commands belong to skills that are off by\\n * default, so without this an automation card would send its command with none\\n * of the instructions behind it. Only the leading token counts: matching a\\n * `/word` anywhere in prose would re-admit most of the catalog.\\n */\\nexport function findInvokedCatalogSkill(query?: string): string | undefined {\\n const firstToken = query?.trim().split(/\\\\s+/, 1)[0];\\n if (!firstToken?.startsWith(\\\"/\\\")) return undefined;\\n return CATALOG_SKILL_BY_SLASH_COMMAND.get(firstToken.toLowerCase());\\n}\\n\",\"truncated\":false,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/utils/skill-enablement.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "cf1c8431-efcc-4251-87ea-645b727c9c13",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"src/hooks/use-skill-enablement.ts","sha":"02734bc17e3e2c2fe9e6ce095ea5efcdd608d501","content":"import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useSaveSettings } from \"#/hooks/mutation/use-save-settings\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport type { Settings, SkillInfo } from \"#/types/settings\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport {\n buildSkillEnablementFilter,\n CATALOG_SKILL_NAMES,\n isCatalogSkill,\n resolveEnabledCatalogSkills,\n type SkillEnablement,\n} from \"#/utils/skill-enablement\";\n\n/**\n * Settings → the two lists. Cloud creates conversations from its own\n * server-side catalog and never reads `enabled_skills`, so the catalog stays\n * deny-list governed there.\n */\nfunction readSkillEnablement(\n settings: Settings | undefined,\n usesCatalogAllowList: boolean,\n): SkillEnablement {\n return {\n enabledSkills: usesCatalogAllowList\n ? settings?.enabled_skills\n : [...CATALOG_SKILL_NAMES],\n disabledSkills: settings?.disabled_skills ?? [],\n };\n}\n\n/** Read-only view of the rule, for surfaces that list skills without toggling. */\nexport function useSkillEnabledFilter(): (skill: SkillInfo) => boolean {\n const { backend } = useActiveBackend();\n const { data: settings } = useSettings();\n const usesCatalogAllowList = backend.kind !== \"cloud\";\n\n return React.useMemo(() => {\n const isEnabled = buildSkillEnablementFilter(\n readSkillEnablement(settings, usesCatalogAllowList),\n );\n return (skill: SkillInfo) => isEnabled(skill.name);\n }, [\n settings?.enabled_skills,\n settings?.disabled_skills,\n usesCatalogAllowList,\n ]);\n}\n\nexport interface SkillEnablementController {\n isEnabled: (skill: SkillInfo) => boolean;\n setEnabled: (skillName: string, enabled: boolean) => void;\n}\n\n/** Stable form of both lists, so an unchanged set can skip the save. */\nfunction snapshot(enablement: SkillEnablement): string {\n return JSON.stringify([\n [...resolveEnabledCatalogSkills(enablement)].sort(),\n [...(enablement.disabledSkills ?? [])].sort(),\n ]);\n}\n\n/** Same array reference when the membership already matches, to skip a save. */\nfunction withMembership(\n list: string[],\n name: string,\n present: boolean,\n): string[] {\n if (list.includes(name) === present) return list;\n return present ? [...list, name] : list.filter((entry) => entry !== name);\n}\n\n/**\n * Shared toggle state for every surface that switches skills on and off.\n *\n * Which of the two lists a skill belongs to is decided here alone, so one\n * surface cannot write a preference another cannot see.\n */\nexport function useSkillEnablement(): SkillEnablementController {\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const usesCatalogAllowList = backend.kind !== \"cloud\";\n const { data: settings, isLoading: settingsLoading } = useSettings();\n const { mutate: saveSettings } = useSaveSettings();\n\n const [enablement, setEnablement] = React.useState<SkillEnablement>({});\n const savedRef = React.useRef<string | null>(null);\n\n React.useEffect(() => {\n if (settingsLoading || !settings) return;\n const hydrated = readSkillEnablement(settings, usesCatalogAllowList);\n savedRef.current = snapshot(hydrated);\n setEnablement(hydrated);\n }, [\n settingsLoading,\n settings?.enabled_skills,\n settings?.disabled_skills,\n usesCatalogAllowList,\n ]);\n\n React.useEffect(() => {\n // Writing the hydrated value straight back would race the one-shot\n // migration and could narrow a workspace it had just preserved.\n const next = snapshot(enablement);\n if (savedRef.current === null || savedRef.current === next) return;\n savedRef.current = next;\n\n const disabledSkills = enablement.disabledSkills ?? [];\n saveSettings(\n usesCatalogAllowList\n ? {\n enabled_skills: resolveEnabledCatalogSkills(enablement),\n disabled_skills: disabledSkills,\n }\n : { disabled_skills: disabledSkills },\n {\n onError: (error) => {\n displayErrorToast(\n retrieveAxiosErrorMessage(error) || t(I18nKey.ERROR$GENERIC),\n );\n },\n },\n );\n }, [enablement, usesCatalogAllowList, saveSettings, t]);\n\n const isEnabled = React.useMemo(() => {\n const enabled = buildSkillEnablementFilter(enablement);\n return (skill: SkillInfo) => enabled(skill.name);\n }, [enablement]);\n\n const setEnabled = React.useCallback(\n (skillName: string, enabled: boolean) => {\n setEnablement((previous) => {\n const allowListed = usesCatalogAllowList && isCatalogSkill(skillName);\n return {\n enabledSkills: allowListed\n ? withMembership(\n resolveEnabledCatalogSkills(previous),\n skillName,\n enabled,\n )\n : previous.enabledSkills,\n // A catalog skill switched back on also leaves the deny-list, where\n // an unmigrated workspace may still hold it.\n disabledSkills: withMembership(\n previous.disabledSkills ?? [],\n skillName,\n !enabled && !allowListed,\n ),\n };\n });\n },\n [usesCatalogAllowList],\n );\n\n return { isEnabled, setEnabled };\n}\n","truncated":false,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/hooks/use-skill-enablement.ts"}Full event evidence
{
"id": "ae37ac4f-e72a-4d0a-a821-2524b49f2b19",
"timestamp": "2026-10-17T16:32:41.183892",
"source": "environment",
"parent_id": "5bbd33a6-f1e9-4c11-bc6e-d9ad5f83af97",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_4e263428640c4c03ab1f07fd",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"src/hooks/use-skill-enablement.ts\",\"sha\":\"02734bc17e3e2c2fe9e6ce095ea5efcdd608d501\",\"content\":\"import React from \\\"react\\\";\\nimport { useTranslation } from \\\"react-i18next\\\";\\nimport { useActiveBackend } from \\\"#/contexts/active-backend-context\\\";\\nimport { useSaveSettings } from \\\"#/hooks/mutation/use-save-settings\\\";\\nimport { useSettings } from \\\"#/hooks/query/use-settings\\\";\\nimport { I18nKey } from \\\"#/i18n/declaration\\\";\\nimport type { Settings, SkillInfo } from \\\"#/types/settings\\\";\\nimport { displayErrorToast } from \\\"#/utils/custom-toast-handlers\\\";\\nimport { retrieveAxiosErrorMessage } from \\\"#/utils/retrieve-axios-error-message\\\";\\nimport {\\n buildSkillEnablementFilter,\\n CATALOG_SKILL_NAMES,\\n isCatalogSkill,\\n resolveEnabledCatalogSkills,\\n type SkillEnablement,\\n} from \\\"#/utils/skill-enablement\\\";\\n\\n/**\\n * Settings → the two lists. Cloud creates conversations from its own\\n * server-side catalog and never reads `enabled_skills`, so the catalog stays\\n * deny-list governed there.\\n */\\nfunction readSkillEnablement(\\n settings: Settings | undefined,\\n usesCatalogAllowList: boolean,\\n): SkillEnablement {\\n return {\\n enabledSkills: usesCatalogAllowList\\n ? settings?.enabled_skills\\n : [...CATALOG_SKILL_NAMES],\\n disabledSkills: settings?.disabled_skills ?? [],\\n };\\n}\\n\\n/** Read-only view of the rule, for surfaces that list skills without toggling. */\\nexport function useSkillEnabledFilter(): (skill: SkillInfo) => boolean {\\n const { backend } = useActiveBackend();\\n const { data: settings } = useSettings();\\n const usesCatalogAllowList = backend.kind !== \\\"cloud\\\";\\n\\n return React.useMemo(() => {\\n const isEnabled = buildSkillEnablementFilter(\\n readSkillEnablement(settings, usesCatalogAllowList),\\n );\\n return (skill: SkillInfo) => isEnabled(skill.name);\\n }, [\\n settings?.enabled_skills,\\n settings?.disabled_skills,\\n usesCatalogAllowList,\\n ]);\\n}\\n\\nexport interface SkillEnablementController {\\n isEnabled: (skill: SkillInfo) => boolean;\\n setEnabled: (skillName: string, enabled: boolean) => void;\\n}\\n\\n/** Stable form of both lists, so an unchanged set can skip the save. */\\nfunction snapshot(enablement: SkillEnablement): string {\\n return JSON.stringify([\\n [...resolveEnabledCatalogSkills(enablement)].sort(),\\n [...(enablement.disabledSkills ?? [])].sort(),\\n ]);\\n}\\n\\n/** Same array reference when the membership already matches, to skip a save. */\\nfunction withMembership(\\n list: string[],\\n name: string,\\n present: boolean,\\n): string[] {\\n if (list.includes(name) === present) return list;\\n return present ? [...list, name] : list.filter((entry) => entry !== name);\\n}\\n\\n/**\\n * Shared toggle state for every surface that switches skills on and off.\\n *\\n * Which of the two lists a skill belongs to is decided here alone, so one\\n * surface cannot write a preference another cannot see.\\n */\\nexport function useSkillEnablement(): SkillEnablementController {\\n const { t } = useTranslation(\\\"openhands\\\");\\n const { backend } = useActiveBackend();\\n const usesCatalogAllowList = backend.kind !== \\\"cloud\\\";\\n const { data: settings, isLoading: settingsLoading } = useSettings();\\n const { mutate: saveSettings } = useSaveSettings();\\n\\n const [enablement, setEnablement] = React.useState<SkillEnablement>({});\\n const savedRef = React.useRef<string | null>(null);\\n\\n React.useEffect(() => {\\n if (settingsLoading || !settings) return;\\n const hydrated = readSkillEnablement(settings, usesCatalogAllowList);\\n savedRef.current = snapshot(hydrated);\\n setEnablement(hydrated);\\n }, [\\n settingsLoading,\\n settings?.enabled_skills,\\n settings?.disabled_skills,\\n usesCatalogAllowList,\\n ]);\\n\\n React.useEffect(() => {\\n // Writing the hydrated value straight back would race the one-shot\\n // migration and could narrow a workspace it had just preserved.\\n const next = snapshot(enablement);\\n if (savedRef.current === null || savedRef.current === next) return;\\n savedRef.current = next;\\n\\n const disabledSkills = enablement.disabledSkills ?? [];\\n saveSettings(\\n usesCatalogAllowList\\n ? {\\n enabled_skills: resolveEnabledCatalogSkills(enablement),\\n disabled_skills: disabledSkills,\\n }\\n : { disabled_skills: disabledSkills },\\n {\\n onError: (error) => {\\n displayErrorToast(\\n retrieveAxiosErrorMessage(error) || t(I18nKey.ERROR$GENERIC),\\n );\\n },\\n },\\n );\\n }, [enablement, usesCatalogAllowList, saveSettings, t]);\\n\\n const isEnabled = React.useMemo(() => {\\n const enabled = buildSkillEnablementFilter(enablement);\\n return (skill: SkillInfo) => enabled(skill.name);\\n }, [enablement]);\\n\\n const setEnabled = React.useCallback(\\n (skillName: string, enabled: boolean) => {\\n setEnablement((previous) => {\\n const allowListed = usesCatalogAllowList && isCatalogSkill(skillName);\\n return {\\n enabledSkills: allowListed\\n ? withMembership(\\n resolveEnabledCatalogSkills(previous),\\n skillName,\\n enabled,\\n )\\n : previous.enabledSkills,\\n // A catalog skill switched back on also leaves the deny-list, where\\n // an unmigrated workspace may still hold it.\\n disabledSkills: withMembership(\\n previous.disabledSkills ?? [],\\n skillName,\\n !enabled && !allowListed,\\n ),\\n };\\n });\\n },\\n [usesCatalogAllowList],\\n );\\n\\n return { isEnabled, setEnabled };\\n}\\n\",\"truncated\":false,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/hooks/use-skill-enablement.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "86f08123-911b-4e7f-8e64-4688d46a9c77",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"src/hooks/use-migrate-enabled-skills.ts","sha":"e2a6300819aebe2f078728480a31b15cafe4fa7a","content":"import { useEffect, useRef } from \"react\";\nimport { isNoBackend } from \"#/api/backend-registry/active-store\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useSaveSettings } from \"#/hooks/mutation/use-save-settings\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport {\n migrateSkillEnablement,\n toSkillEnablement,\n} from \"#/utils/skill-enablement\";\n\n/**\n * Move a workspace to an explicit `enabled_skills` allow-list, once.\n *\n * It runs at the app root, not on the Customize page: until it has run the\n * resolver falls back to the curated default, which would silently drop\n * catalog skills an existing workspace had switched on. Local only — cloud\n * never reads the field.\n */\nexport function useMigrateEnabledSkills(): void {\n const { backend } = useActiveBackend();\n const isLocal = backend.kind === \"local\" && !isNoBackend(backend);\n const { data: settings, isLoading, isError } = useSettings();\n const { mutate: saveSettings } = useSaveSettings();\n\n // One attempt per backend: the save invalidates the settings query, so\n // without this the refetch would re-enter before the write is visible.\n const migratedBackendRef = useRef<string | null>(null);\n\n useEffect(() => {\n migratedBackendRef.current = null;\n }, [backend.id]);\n\n useEffect(() => {\n if (!isLocal || isLoading || isError || !settings) return;\n if (migratedBackendRef.current === backend.id) return;\n\n migratedBackendRef.current = backend.id;\n const migrated = migrateSkillEnablement(toSkillEnablement(settings));\n // Silent on failure: the resolver's fallback keeps the session working and\n // the next app load retries.\n if (migrated) saveSettings(migrated);\n }, [isLocal, isLoading, isError, settings, backend.id, saveSettings]);\n}\n","truncated":false,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/hooks/use-migrate-enabled-skills.ts"}Full event evidence
{
"id": "1de69eac-0465-442e-af8d-d5368e102f49",
"timestamp": "2026-10-17T16:32:41.396435",
"source": "environment",
"parent_id": "ae37ac4f-e72a-4d0a-a821-2524b49f2b19",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_3f77a682da8745ff95ebd7be",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"src/hooks/use-migrate-enabled-skills.ts\",\"sha\":\"e2a6300819aebe2f078728480a31b15cafe4fa7a\",\"content\":\"import { useEffect, useRef } from \\\"react\\\";\\nimport { isNoBackend } from \\\"#/api/backend-registry/active-store\\\";\\nimport { useActiveBackend } from \\\"#/contexts/active-backend-context\\\";\\nimport { useSaveSettings } from \\\"#/hooks/mutation/use-save-settings\\\";\\nimport { useSettings } from \\\"#/hooks/query/use-settings\\\";\\nimport {\\n migrateSkillEnablement,\\n toSkillEnablement,\\n} from \\\"#/utils/skill-enablement\\\";\\n\\n/**\\n * Move a workspace to an explicit `enabled_skills` allow-list, once.\\n *\\n * It runs at the app root, not on the Customize page: until it has run the\\n * resolver falls back to the curated default, which would silently drop\\n * catalog skills an existing workspace had switched on. Local only — cloud\\n * never reads the field.\\n */\\nexport function useMigrateEnabledSkills(): void {\\n const { backend } = useActiveBackend();\\n const isLocal = backend.kind === \\\"local\\\" && !isNoBackend(backend);\\n const { data: settings, isLoading, isError } = useSettings();\\n const { mutate: saveSettings } = useSaveSettings();\\n\\n // One attempt per backend: the save invalidates the settings query, so\\n // without this the refetch would re-enter before the write is visible.\\n const migratedBackendRef = useRef<string | null>(null);\\n\\n useEffect(() => {\\n migratedBackendRef.current = null;\\n }, [backend.id]);\\n\\n useEffect(() => {\\n if (!isLocal || isLoading || isError || !settings) return;\\n if (migratedBackendRef.current === backend.id) return;\\n\\n migratedBackendRef.current = backend.id;\\n const migrated = migrateSkillEnablement(toSkillEnablement(settings));\\n // Silent on failure: the resolver's fallback keeps the session working and\\n // the next app load retries.\\n if (migrated) saveSettings(migrated);\\n }, [isLocal, isLoading, isError, settings, backend.id, saveSettings]);\\n}\\n\",\"truncated\":false,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/hooks/use-migrate-enabled-skills.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "66234c42-5f3e-4138-b599-d747705c1dbb",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"src/api/agent-server-adapter.ts","sha":"eb99c0389af52ff681e4a8ed96378128bc50741a","content":"import { ACP_SETTINGS_KEYS } from \"@openhands/typescript-client\";\nimport { ServerClient } from \"@openhands/typescript-client/clients\";\nimport { SKILLS_CATALOG } from \"@openhands/extensions/skills\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { ExecutionStatus } from \"#/types/agent-server/core\";\nimport { AgentKind, Settings, SettingsValue } from \"#/types/settings\";\nimport {\n getAcpPreferredDefaultModel,\n getAcpProvider,\n resolveEffectiveAcpModel,\n} from \"#/constants/acp-providers\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport {\n getCachedAgentServerInfo,\n isAgentServerToolAvailable,\n} from \"./agent-server-compatibility\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getEffectiveLocalBackend } from \"./backend-registry/active-store\";\nimport { buildAuthHeaders } from \"./backend-registry/auth\";\nimport {\n GetHooksResponse,\n PluginSpec,\n AppConversation,\n AppConversationPage,\n RuntimeConversationStats,\n SandboxStatus,\n} from \"./conversation-service/agent-server-conversation-service.types\";\nimport { combineUsageMetrics } from \"#/utils/conversation-metrics\";\nimport {\n buildSkillEnablementFilter,\n findInvokedCatalogSkill,\n toSkillEnablement,\n type SkillEnablement,\n} from \"#/utils/skill-enablement\";\nimport SettingsService from \"./settings-service/settings-service.api\";\nimport { getStoredConversationMetadata } from \"./conversation-metadata-store\";\nimport LLMSubscriptionService from \"./llm-subscription-service\";\nimport {\n LLM_AUTH_TYPE_SUBSCRIPTION,\n OPENAI_SUBSCRIPTION_VENDOR,\n isSubscriptionLlmConfig,\n} from \"#/constants/llm-subscription\";\nimport {\n CANVAS_UI_CLIENT_TOOL,\n CANVAS_UI_CLIENT_TOOL_NAME,\n LEGACY_CANVAS_UI_TOOL_NAME,\n type ClientToolSpec,\n} from \"./canvas-ui-client-tool\";\nimport {\n LAUNCH_CHILD_CONVERSATION_CLIENT_TOOL,\n LAUNCH_CHILD_CONVERSATION_TOOL_NAME,\n} from \"./launch-child-conversation-client-tool\";\n\nexport interface DirectConversationInfo {\n id: string;\n title?: string | null;\n created_at: string;\n updated_at: string;\n execution_status?: string | null;\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\n sandbox_status?: string | null;\n metrics?: {\n accumulated_cost?: number | null;\n max_budget_per_task?: number | null;\n accumulated_token_usage?: {\n prompt_tokens?: number;\n completion_tokens?: number;\n cache_read_tokens?: number;\n cache_write_tokens?: number;\n context_window?: number;\n per_turn_token?: number;\n } | null;\n } | null;\n /**\n * Raw per-usage-id LLM stats from the agent-server. Search/list responses\n * often carry real usage here even when `metrics` above comes back unset;\n * {@link toAppConversation} combines this as a fallback in that case.\n */\n stats?: RuntimeConversationStats | null;\n agent?: {\n /**\n * Pydantic discriminator from the SDK union: ``\"ACPAgent\"`` for ACP CLI\n * subprocesses (model lives on the subprocess via ``acp_model``),\n * ``\"Agent\"`` for direct litellm. Read by {@link toAppConversation}.\n */\n kind?: string | null;\n acp_model?: string | null;\n /**\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\n */\n acp_server?: string | null;\n llm?: {\n model?: string | null;\n } | null;\n } | null;\n current_model_id?: string | null;\n current_model_name?: string | null;\n workspace?: {\n working_dir?: string | null;\n } | null;\n /**\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\n * ``ACP_SERVER_TAG_KEY`` (\"acpserver\") — but the field is typed as a\n * generic record so future readers don't need another wire-shape change.\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\n * values are opaque strings.\n */\n tags?: Record<string, string> | null;\n launched_agent_profile?: {\n agent_profile_id: string;\n revision: number;\n } | null;\n}\n\nconst DEFAULT_TOOL_NAMES = [\"terminal\", \"file_editor\", \"task_tracker\"];\nconst BROWSER_TOOL_SET_NAME = \"browser_tool_set\";\nconst TASK_TOOL_SET_NAME = \"task_tool_set\";\n\nfunction browserToolsEnabled() {\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \"false\";\n}\n\n/**\n * Shape of the runtime services info served by Agent Canvas backends in\n * `/server_info.runtime_services`. All URLs are written from the agent's point of\n * view, not the browser's. The block is rendered into the agent's system prompt\n * via `AgentContext.system_message_suffix` so the agent knows what's reachable\n * from inside its sandbox without having to probe.\n */\nexport interface RuntimeServicesInfo {\n mode?: string;\n agent_host_alias?: string;\n services?: {\n agent_server?: { description?: string; url_from_agent?: string };\n ingress?: { description?: string; url_from_agent?: string };\n frontend?: {\n kind?: \"vite\" | \"static\";\n description?: string;\n url_from_agent?: string;\n };\n // `vite` is the legacy key name for the frontend entry, accepted for\n // one release while older dev-stack launchers may still emit it.\n vite?: { description?: string; url_from_agent?: string };\n automation?: {\n description?: string;\n url_from_agent?: string;\n api_prefix?: string;\n docs_url?: string;\n openapi_url?: string;\n auth_env_var?: string;\n };\n };\n}\n\nexport function parseRuntimeServicesInfo(\n value: unknown,\n): RuntimeServicesInfo | null {\n if (typeof value === \"string\") {\n const raw = value.trim();\n if (!raw) return null;\n try {\n return parseRuntimeServicesInfo(JSON.parse(raw));\n } catch {\n return null;\n }\n }\n\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return null;\n }\n\n const parsed = value as RuntimeServicesInfo;\n if (!parsed.services || typeof parsed.services !== \"object\") return null;\n return parsed;\n}\n\nexport async function fetchBackendRuntimeServicesInfo(): Promise<RuntimeServicesInfo | null> {\n let clientOptions: ReturnType<typeof getAgentServerClientOptions>;\n try {\n clientOptions = getAgentServerClientOptions({ timeout: 3000 });\n } catch {\n return null;\n }\n\n const cached = parseRuntimeServicesInfo(\n getCachedAgentServerInfo({ host: clientOptions.host })?.runtime_services,\n );\n if (cached) return cached;\n\n try {\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\n return parseRuntimeServicesInfo(\n (serverInfo as { runtime_services?: unknown }).runtime_services,\n );\n } catch {\n return null;\n }\n}\n\n/**\n * Return the deployment mode from the runtime services info, e.g. \"docker\",\n * \"dev:automation\", etc. Returns `null` when no runtime info is supplied.\n */\nexport function getDeploymentMode(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | null {\n return runtimeServicesInfo?.mode ?? null;\n}\n\n/**\n * Render the runtime services info into a markdown block suitable for\n * appending to the system prompt via `AgentContext.system_message_suffix`.\n *\n * Returns `undefined` when no runtime info is available, so callers can safely\n * omit the field when the selected backend does not advertise runtime services.\n */\nexport function buildRuntimeServicesSystemSuffix(\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n): string | undefined {\n const info = parseRuntimeServicesInfo(runtimeServicesInfo);\n if (!info?.services) return undefined;\n\n const lines: string[] = [];\n lines.push(\"<RUNTIME_SERVICES>\");\n if (info.mode) {\n lines.push(\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\n );\n } else {\n lines.push(\"You are running inside an agent-canvas dev stack.\");\n }\n lines.push(\n \"The following services are reachable from your sandbox. URLs are written\",\n \"from your point of view (i.e., as you should curl/fetch them).\",\n \"\",\n );\n\n const { agent_server, ingress, automation } = info.services;\n const { frontend } = info.services;\n\n if (agent_server?.url_from_agent) {\n lines.push(\n `* Agent Server (you): ${agent_server.url_from_agent}`,\n ` ${agent_server.description ?? \"The agent-server hosting your tool calls.\"}`,\n );\n }\n if (ingress?.url_from_agent) {\n lines.push(\n `* Ingress: ${ingress.url_from_agent}`,\n ` ${ingress.description ?? \"Unified entry point for browser-facing traffic.\"}`,\n );\n }\n if (frontend?.url_from_agent) {\n lines.push(\n `* Frontend: ${frontend.url_from_agent}`,\n ` ${frontend.description ?? \"Frontend dev server.\"}`,\n );\n }\n if (automation?.url_from_agent) {\n lines.push(\n `* Automation backend: ${automation.url_from_agent}`,\n ` ${automation.description ?? \"OpenHands Automations service.\"}`,\n );\n if (automation.docs_url) {\n lines.push(` Docs: ${automation.docs_url}`);\n }\n if (automation.openapi_url) {\n lines.push(` OpenAPI: ${automation.openapi_url}`);\n }\n if (automation.auth_env_var) {\n // X-Session-API-Key is the local convention shared by the agent-server\n // and automation backend (see openhands-automation auth.py).\n lines.push(\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\n );\n }\n } else {\n lines.push(\n \"* Automation backend: not running in this dev mode (skip /api/automation calls).\",\n );\n }\n\n // Anchor the \"don't guess\" warning to the actual agent-server URL for\n // this stack instead of a hardcoded port. The agent-server listens on\n // different ports across dev modes, and baking the wrong port into the\n // system prompt is exactly the kind of confusion this block is meant to\n // prevent.\n const agentServerUrl = agent_server?.url_from_agent;\n lines.push(\n \"\",\n \"Trust this block over guessing: do not assume any other URLs are running.\",\n );\n if (agentServerUrl) {\n lines.push(\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\n \"you are running inside of — NOT the automation backend.\",\n );\n }\n lines.push(\"</RUNTIME_SERVICES>\");\n\n return lines.join(\"\\n\");\n}\n\nexport function toConversationUrl(conversationId: string): string {\n // Local-format conversation URL — points at whichever local agent-server\n // is actually serving the conversation (the bundled one when the active\n // selection is cloud).\n const { host } = getAgentServerClientOptions();\n return `${host}/api/conversations/${conversationId}`;\n}\n\n// TODO(i18n): extract \"Conversation\" once we add CONVERSATION$DEFAULT_TITLE\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\n// fallback inside this pure adapter rather than fanning out to display sites.\nexport function getDefaultConversationTitle(conversationId: string): string {\n return `Conversation ${conversationId.slice(0, 5)}`;\n}\n\nexport function toAppConversation(\n info: DirectConversationInfo,\n): AppConversation {\n const metadata = getStoredConversationMetadata(info.id);\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\n // runtime model fields when available, then the configured ``acp_model`` that\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\n // switching, so surfacing this string is display-only.\n const isAcp = info.agent?.kind === \"ACPAgent\";\n // Only surface ``acp_server`` for ACP conversations even if the wire\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\n // conversation — the chip is identity info for the ACP CLI subprocess,\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\n // picker and degrade the chip to a generic \"ACP\" (#1571).\n const acpServer = isAcp\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\n : null;\n return {\n id: info.id,\n created_by_user_id: null,\n selected_repository: metadata?.selected_repository ?? null,\n selected_branch: metadata?.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? null,\n selected_workspace: metadata?.selected_workspace ?? null,\n active_profile: metadata?.active_profile ?? null,\n title: info.title?.trim()\n ? info.title\n : getDefaultConversationTitle(info.id),\n trigger: null,\n pr_number: [],\n agent_kind: isAcp ? \"acp\" : \"openhands\",\n acp_server: acpServer,\n tags: info.tags ?? null,\n launched_agent_profile: info.launched_agent_profile ?? null,\n // Chip path: omit ``providerDefault`` so that when no concrete model\n // resolves, the chip falls back to the provider display name in\n // ConversationCardFooter rather than a registry default the session may\n // not actually be running.\n llm_model: isAcp\n ? resolveEffectiveAcpModel({\n runtimeName: info.current_model_name,\n runtimeId: info.current_model_id,\n configured: info.agent?.acp_model,\n sdkLlm: info.agent?.llm?.model,\n })\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\n metrics: info.metrics\n ? {\n accumulated_cost: info.metrics.accumulated_cost ?? null,\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\n accumulated_token_usage: info.metrics.accumulated_token_usage\n ? {\n prompt_tokens:\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\n completion_tokens:\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\n cache_read_tokens:\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\n cache_write_tokens:\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\n context_window:\n info.metrics.accumulated_token_usage.context_window ?? 0,\n per_turn_token:\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\n }\n : null,\n }\n : combineUsageMetrics(info.stats),\n created_at: info.created_at,\n updated_at: info.updated_at,\n execution_status:\n (info.execution_status as AppConversation[\"execution_status\"]) ??\n ExecutionStatus.IDLE,\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\n conversation_url: toConversationUrl(info.id),\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\n sandbox_id: null,\n workspace: {\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\n },\n public: false,\n sub_conversation_ids: [],\n };\n}\n\nexport function toConversationPage(data: {\n items: DirectConversationInfo[];\n next_page_id?: string | null;\n}): AppConversationPage {\n return {\n items: data.items.map(toAppConversation),\n next_page_id: data.next_page_id ?? null,\n };\n}\n\ntype SettingsRecord = Record<string, unknown>;\n\ninterface AgentToolSpec {\n name: string;\n params: SettingsRecord;\n}\n\ntype AgentSettingsPayload = SettingsRecord & {\n llm?: SettingsRecord;\n agent_context: SettingsRecord;\n tools?: AgentToolSpec[];\n};\n\ninterface LocalWorkspacePayload {\n kind: \"LocalWorkspace\";\n working_dir: string;\n}\n\ninterface InitialMessagePayload {\n role: \"user\";\n content: Array<{ type: \"text\"; text: string }>;\n run: true;\n}\n\ntype ConversationSettingsPayload = SettingsRecord & {\n workspace: LocalWorkspacePayload;\n initial_message?: InitialMessagePayload;\n};\n\nexport const ACP_SERVER_TAG_KEY = \"acpserver\";\nexport const CLIENT_SOURCE_TAG_KEY = \"clientsource\";\nexport const AGENT_CANVAS_SOURCE = \"agentcanvas\";\n\nexport const AUTOMATION_TRIGGER_TAG_KEY = \"automationtrigger\";\nexport const AUTOMATION_ID_TAG_KEY = \"automationid\";\nexport const AUTOMATION_NAME_TAG_KEY = \"automationname\";\nexport const AUTOMATION_RUN_ID_TAG_KEY = \"automationrunid\";\n\n/**\n * Tag keys stamped on conversations created by automation runs (see the SDK's\n * `RemoteWorkspace.default_conversation_tags`). The presence of any of these\n * marks a conversation as automation-born.\n */\nexport const AUTOMATION_TAG_KEYS: readonly string[] = [\n AUTOMATION_TRIGGER_TAG_KEY,\n AUTOMATION_ID_TAG_KEY,\n AUTOMATION_NAME_TAG_KEY,\n AUTOMATION_RUN_ID_TAG_KEY,\n];\n\n/**\n * Conversation tag keys that must not appear as generic chips / hovercard\n * rows. Each is either already surfaced by a first-class UI source or is\n * internal routing data:\n * - ``acpserver`` → ACP provider chip\n * - ``clientsource`` → telemetry attribution\n * - ``title`` → conversation card heading\n * - git / repo / branch / workspace stamps → repo-branch metadata + directory\n * footer / hovercard rows (``selected_repository``, ``selected_branch``,\n * ``git_provider``, ``workspace.working_dir``)\n * - ``automationid`` / ``automationrunid`` → raw UUIDs consumed by the\n * conversation panel's automation filter (chip noise), while\n * ``automationname`` / ``automationtrigger`` stay visible\n */\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\n ACP_SERVER_TAG_KEY,\n CLIENT_SOURCE_TAG_KEY,\n AUTOMATION_ID_TAG_KEY,\n AUTOMATION_RUN_ID_TAG_KEY,\n \"title\",\n \"git_provider\",\n \"repo_name\",\n \"repo\",\n \"repository\",\n \"selected_branch\",\n \"branch\",\n \"archiveworkspacepath\",\n \"workspace\",\n \"working_dir\",\n]);\n\n/**\n * High-signal tag keys shown first in the chip row (before A–Z). Automations\n * often stamp ``origin``; remaining free-form tags sort alphabetically.\n */\nexport const PRIORITY_CONVERSATION_TAG_KEYS: readonly string[] = [\"origin\"];\n\n/**\n * User-facing subset of a conversation's server-side tags: everything except\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries.\n * Priority keys come first (in {@link PRIORITY_CONVERSATION_TAG_KEYS} order);\n * the rest sort A–Z so chip order doesn't shuffle between refetches.\n */\nexport function getDisplayConversationTags(\n tags: Record<string, string> | null | undefined,\n): Array<[string, string]> {\n if (!tags) {\n return [];\n }\n // Both the reserved-key check and the priority lookup must see the same\n // normalized key: a cloud backend can stamp ``Origin`` / `` origin``, and\n // ranking those off the raw key would silently drop them out of first place.\n const priorityRank = (key: string): number => {\n const index = PRIORITY_CONVERSATION_TAG_KEYS.indexOf(\n key.trim().toLowerCase(),\n );\n return index === -1 ? Number.POSITIVE_INFINITY : index;\n };\n\n return Object.entries(tags)\n .filter(\n ([key, value]) =>\n !RESERVED_CONVERSATION_TAG_KEYS.has(key.trim().toLowerCase()) &&\n typeof value === \"string\" &&\n value.trim().length > 0,\n )\n .sort(([a], [b]) => {\n const aRank = priorityRank(a);\n const bRank = priorityRank(b);\n if (aRank !== bRank) {\n return aRank - bRank;\n }\n return a.localeCompare(b);\n });\n}\n\nconst FERNET_TOKEN_PREFIX = \"gAAAAA\";\n\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\n \"schema_version\",\n \"agent_settings\",\n \"workspace\",\n \"conversation_id\",\n \"initial_message\",\n \"plugins\",\n]);\n\nfunction toRecord(value: unknown): SettingsRecord {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return {};\n }\n\n return structuredClone(value as SettingsRecord);\n}\n\nfunction normalizeSecretString(value: unknown): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction hasEncryptedString(value: unknown): boolean {\n if (typeof value === \"string\") {\n return value.startsWith(FERNET_TOKEN_PREFIX);\n }\n if (Array.isArray(value)) {\n return value.some(hasEncryptedString);\n }\n if (isPlainRecord(value)) {\n return Object.values(value).some(hasEncryptedString);\n }\n return false;\n}\n\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\n if (!isPlainRecord(mcpConfig)) {\n return false;\n }\n\n return Object.values(mcpConfig).some(hasEncryptedString);\n}\n\nfunction getConversationConfirmationPolicy(\n conversationSettings: SettingsRecord,\n) {\n if (conversationSettings.confirmation_mode !== true) {\n return { kind: \"NeverConfirm\" };\n }\n\n if (conversationSettings.security_analyzer === \"llm\") {\n return { kind: \"ConfirmRisky\", threshold: \"HIGH\", confirm_unknown: true };\n }\n\n return { kind: \"AlwaysConfirm\" };\n}\n\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\n switch (conversationSettings.security_analyzer) {\n case \"llm\":\n return { kind: \"LLMSecurityAnalyzer\" };\n case \"pattern\":\n return { kind: \"PatternSecurityAnalyzer\" };\n case \"policy_rail\":\n return { kind: \"PolicyRailSecurityAnalyzer\" };\n default:\n return undefined;\n }\n}\n\nfunction isToolRecord(\n value: unknown,\n): value is { name: string; params?: unknown } {\n return (\n !!value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n typeof (value as { name?: unknown }).name === \"string\"\n );\n}\n\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\n if (name === BROWSER_TOOL_SET_NAME) {\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\n }\n\n if (name === TASK_TOOL_SET_NAME) {\n return (\n agentSettings.enable_sub_agents === true &&\n isAgentServerToolAvailable(name)\n );\n }\n\n return true;\n}\n\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\n const tools = new Map<string, AgentToolSpec>();\n\n for (const name of DEFAULT_TOOL_NAMES) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\n if (shouldIncludeTool(name, agentSettings)) {\n tools.set(name, { name, params: {} });\n }\n }\n\n const configuredTools = agentSettings.tools;\n if (\n Array.isArray(configuredTools) &&\n configuredTools.every((tool) => isToolRecord(tool))\n ) {\n for (const tool of configuredTools) {\n if (shouldIncludeTool(tool.name, agentSettings)) {\n tools.set(tool.name, {\n name: tool.name,\n params: toRecord(tool.params),\n });\n }\n }\n }\n\n return Array.from(tools.values());\n}\n\nfunction buildInitialMessage(\n query?: string,\n conversationInstructions?: string,\n): InitialMessagePayload | null {\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\n Boolean,\n );\n if (parts.length === 0) {\n return null;\n }\n\n return {\n role: \"user\",\n content: [{ type: \"text\", text: parts.join(\"\\n\\n\") }],\n run: true,\n };\n}\n\n/**\n * Shape of a bundled skill entry passed to the agent-server SDK via\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\n * the server uses for trigger matching, activation, and system-prompt\n * injection.\n */\ninterface BundledSkill {\n name: string;\n content: string;\n trigger: { type: \"keyword\"; keywords: string[] } | null;\n source: string;\n description: string | null;\n is_agentskills_format: true;\n license?: string;\n compatibility?: string;\n}\n\n/**\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\n * shape so the agent-server can perform trigger matching, skill activation,\n * and system-prompt injection without cloning the extensions repo.\n *\n * The SDK discriminates triggers via `{ type: \"keyword\", keywords: [...] }`.\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\n */\nfunction buildBundledSkills(): BundledSkill[] {\n return SKILLS_CATALOG.map((entry) => {\n const trigger: BundledSkill[\"trigger\"] =\n entry.triggers?.length > 0\n ? { type: \"keyword\", keywords: entry.triggers }\n : null;\n\n // Use the absolute path to the skill's SKILL.md so the Python\n // agent-server can resolve bundled resources (scripts/, references/).\n // Falls back to \"public\" in library builds where the path isn't known.\n const source = __EXTENSIONS_SKILLS_DIR__\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\n : \"public\";\n\n return {\n name: entry.name,\n content: entry.content,\n trigger,\n source,\n description: entry.description ?? null,\n is_agentskills_format: true as const,\n ...(entry.license ? { license: entry.license } : {}),\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\n };\n });\n}\n\nfunction buildAgentContext(\n agentSettings: SettingsRecord,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n enablement: SkillEnablement = {},\n invokedCatalogSkill?: string,\n): SettingsRecord {\n const runtimeServicesSuffix =\n buildRuntimeServicesSystemSuffix(runtimeServicesInfo);\n const existingContext = toRecord(agentSettings.agent_context);\n\n // Merge bundled public skills with any skills already present in the\n // agent context (e.g. user-defined skills set via the settings API).\n const existingSkills = Array.isArray(existingContext.skills)\n ? (existingContext.skills as SettingsRecord[])\n : [];\n const disabledSkills = enablement.disabledSkills ?? [];\n const disabledSkillNames = new Set(disabledSkills);\n const isSkillEnabled = buildSkillEnablementFilter(enablement);\n\n // The bundled catalog is allow-listed, not deny-listed: it is a build-time\n // snapshot of ~60 skills, so a deny-list puts every future addition into\n // every system prompt (OpenHands#16302). Skills the agent context already\n // carries are user-authored and stay opt-out. A skill the opening message\n // invokes by name overrides both, for this conversation only.\n const mergedSkills = [\n ...existingSkills.filter(\n (skill) =>\n typeof skill.name !== \"string\" || !disabledSkillNames.has(skill.name),\n ),\n ...buildBundledSkills().filter(\n (skill) =>\n skill.name === invokedCatalogSkill || isSkillEnabled(skill.name),\n ),\n ];\n\n return {\n ...existingContext,\n // Public skills are bundled at build time from the @openhands/extensions\n // npm package and passed directly in agent_context.skills. Setting\n // load_public_skills to false tells the agent-server SDK to skip its own\n // extensions-repo clone — the frontend is the sole source of public\n // skills now.\n //\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\n // because bundled skills have no clone latency. Users who previously set\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\n skills: mergedSkills,\n load_public_skills: false,\n load_user_skills: true,\n load_project_skills: true,\n // The backend also auto-loads user/project skills; the deny-list must\n // travel with the context so those skills are excluded from the system\n // prompt too. The allow-list has no counterpart to send: the backend\n // loads no catalog skills of its own (`load_public_skills` is false).\n disabled_skills: disabledSkills,\n ...(runtimeServicesSuffix\n ? { system_message_suffix: runtimeServicesSuffix }\n : {}),\n };\n}\n\nfunction isAcpAgent(settings: Settings): boolean {\n const agentSettings = toRecord(settings.agent_settings);\n return agentSettings.agent_kind === \"acp\";\n}\n\nfunction getAcpServerTag(settings: Settings): string | undefined {\n const agentSettings = toRecord(settings.agent_settings);\n const value = agentSettings.acp_server;\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\n const cmd = agentSettings.acp_command;\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\n const noCommand = cmd === undefined;\n if (!isEmpty && !noCommand) {\n return cmd;\n }\n\n const serverKey =\n typeof agentSettings.acp_server === \"string\"\n ? agentSettings.acp_server\n : undefined;\n const provider = getAcpProvider(serverKey);\n return provider ? [...provider.default_command] : cmd;\n}\n\nfunction buildConfiguredAcpAgentSettings(\n settings: Settings,\n runtimeServicesInfo?: RuntimeServicesInfo | null,\n query?: string,\n): AgentSettingsPayload {\n const agentSettings = toRecord(settings.agent_settings);\n const payload: AgentSettingsPayload = {\n agent_kind: \"acp\",\n agent_context: buildAgentContext(\n agentSettings,\n runtimeServicesInfo,\n toSkillEnablement(settings),\n findInvokedCatalogSkill(query),\n ),\n };\n\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\n // backend so concurrent same-provider conversations don't race on a shared\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\n\n for (const key of ACP_SETTINGS_KEYS) {\n // ``acp_model`` is resolved separately below so a saved ``null`` still\n // falls back to the provider's default rather than being dropped.\n if (key === \"acp_model\") continue;\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\n if (key === \"acp_env\") continue;\n const value =\n key === \"acp_command\"\n ? resolveAcpCommand(agentSettings)\n : agentSettings[key];\n if (value !== undefined && value !== null) {\n payload[key] = value;\n }\n }\n\n // ``mcp_config`` is a","truncated":true,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.ts"}Full event evidence
{
"id": "b2e34d6f-e2c4-4332-ab53-496cafc306f7",
"timestamp": "2026-10-17T16:32:41.717368",
"source": "environment",
"parent_id": "1de69eac-0465-442e-af8d-d5368e102f49",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_118337413b2944edae5f9f7f",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"src/api/agent-server-adapter.ts\",\"sha\":\"eb99c0389af52ff681e4a8ed96378128bc50741a\",\"content\":\"import { ACP_SETTINGS_KEYS } from \\\"@openhands/typescript-client\\\";\\nimport { ServerClient } from \\\"@openhands/typescript-client/clients\\\";\\nimport { SKILLS_CATALOG } from \\\"@openhands/extensions/skills\\\";\\nimport { DEFAULT_SETTINGS } from \\\"#/services/settings\\\";\\nimport { ExecutionStatus } from \\\"#/types/agent-server/core\\\";\\nimport { AgentKind, Settings, SettingsValue } from \\\"#/types/settings\\\";\\nimport {\\n getAcpPreferredDefaultModel,\\n getAcpProvider,\\n resolveEffectiveAcpModel,\\n} from \\\"#/constants/acp-providers\\\";\\nimport { getAgentServerClientOptions } from \\\"./agent-server-client-options\\\";\\nimport {\\n getCachedAgentServerInfo,\\n isAgentServerToolAvailable,\\n} from \\\"./agent-server-compatibility\\\";\\nimport { getAgentServerWorkingDir } from \\\"./agent-server-config\\\";\\nimport { getEffectiveLocalBackend } from \\\"./backend-registry/active-store\\\";\\nimport { buildAuthHeaders } from \\\"./backend-registry/auth\\\";\\nimport {\\n GetHooksResponse,\\n PluginSpec,\\n AppConversation,\\n AppConversationPage,\\n RuntimeConversationStats,\\n SandboxStatus,\\n} from \\\"./conversation-service/agent-server-conversation-service.types\\\";\\nimport { combineUsageMetrics } from \\\"#/utils/conversation-metrics\\\";\\nimport {\\n buildSkillEnablementFilter,\\n findInvokedCatalogSkill,\\n toSkillEnablement,\\n type SkillEnablement,\\n} from \\\"#/utils/skill-enablement\\\";\\nimport SettingsService from \\\"./settings-service/settings-service.api\\\";\\nimport { getStoredConversationMetadata } from \\\"./conversation-metadata-store\\\";\\nimport LLMSubscriptionService from \\\"./llm-subscription-service\\\";\\nimport {\\n LLM_AUTH_TYPE_SUBSCRIPTION,\\n OPENAI_SUBSCRIPTION_VENDOR,\\n isSubscriptionLlmConfig,\\n} from \\\"#/constants/llm-subscription\\\";\\nimport {\\n CANVAS_UI_CLIENT_TOOL,\\n CANVAS_UI_CLIENT_TOOL_NAME,\\n LEGACY_CANVAS_UI_TOOL_NAME,\\n type ClientToolSpec,\\n} from \\\"./canvas-ui-client-tool\\\";\\nimport {\\n LAUNCH_CHILD_CONVERSATION_CLIENT_TOOL,\\n LAUNCH_CHILD_CONVERSATION_TOOL_NAME,\\n} from \\\"./launch-child-conversation-client-tool\\\";\\n\\nexport interface DirectConversationInfo {\\n id: string;\\n title?: string | null;\\n created_at: string;\\n updated_at: string;\\n execution_status?: string | null;\\n /** Cloud-only sandbox lifecycle state. Omitted / null for local agent-server conversations. */\\n sandbox_status?: string | null;\\n metrics?: {\\n accumulated_cost?: number | null;\\n max_budget_per_task?: number | null;\\n accumulated_token_usage?: {\\n prompt_tokens?: number;\\n completion_tokens?: number;\\n cache_read_tokens?: number;\\n cache_write_tokens?: number;\\n context_window?: number;\\n per_turn_token?: number;\\n } | null;\\n } | null;\\n /**\\n * Raw per-usage-id LLM stats from the agent-server. Search/list responses\\n * often carry real usage here even when `metrics` above comes back unset;\\n * {@link toAppConversation} combines this as a fallback in that case.\\n */\\n stats?: RuntimeConversationStats | null;\\n agent?: {\\n /**\\n * Pydantic discriminator from the SDK union: ``\\\"ACPAgent\\\"`` for ACP CLI\\n * subprocesses (model lives on the subprocess via ``acp_model``),\\n * ``\\\"Agent\\\"`` for direct litellm. Read by {@link toAppConversation}.\\n */\\n kind?: string | null;\\n acp_model?: string | null;\\n /**\\n * ACP CLI identity (``claude-code`` / ``codex`` / ``gemini-cli``) from the\\n * SDK's ``ACPAgent.acp_server`` (#3692). Preferred fallback when the\\n * ``acpserver`` tag is absent — e.g. a profile launch doesn't stamp the tag\\n * client-side and the server may not repopulate it. Read by {@link toAppConversation}.\\n */\\n acp_server?: string | null;\\n llm?: {\\n model?: string | null;\\n } | null;\\n } | null;\\n current_model_id?: string | null;\\n current_model_name?: string | null;\\n workspace?: {\\n working_dir?: string | null;\\n } | null;\\n /**\\n * Arbitrary string-keyed conversation tags surfaced by the agent-server\\n * (see ``ConversationInfo.tags``). Canvas only consumes one key today —\\n * ``ACP_SERVER_TAG_KEY`` (\\\"acpserver\\\") — but the field is typed as a\\n * generic record so future readers don't need another wire-shape change.\\n * Keys are constrained to ``^[a-z0-9]+$`` by the agent-server validator;\\n * values are opaque strings.\\n */\\n tags?: Record<string, string> | null;\\n launched_agent_profile?: {\\n agent_profile_id: string;\\n revision: number;\\n } | null;\\n}\\n\\nconst DEFAULT_TOOL_NAMES = [\\\"terminal\\\", \\\"file_editor\\\", \\\"task_tracker\\\"];\\nconst BROWSER_TOOL_SET_NAME = \\\"browser_tool_set\\\";\\nconst TASK_TOOL_SET_NAME = \\\"task_tool_set\\\";\\n\\nfunction browserToolsEnabled() {\\n return import.meta.env.VITE_ENABLE_BROWSER_TOOLS !== \\\"false\\\";\\n}\\n\\n/**\\n * Shape of the runtime services info served by Agent Canvas backends in\\n * `/server_info.runtime_services`. All URLs are written from the agent's point of\\n * view, not the browser's. The block is rendered into the agent's system prompt\\n * via `AgentContext.system_message_suffix` so the agent knows what's reachable\\n * from inside its sandbox without having to probe.\\n */\\nexport interface RuntimeServicesInfo {\\n mode?: string;\\n agent_host_alias?: string;\\n services?: {\\n agent_server?: { description?: string; url_from_agent?: string };\\n ingress?: { description?: string; url_from_agent?: string };\\n frontend?: {\\n kind?: \\\"vite\\\" | \\\"static\\\";\\n description?: string;\\n url_from_agent?: string;\\n };\\n // `vite` is the legacy key name for the frontend entry, accepted for\\n // one release while older dev-stack launchers may still emit it.\\n vite?: { description?: string; url_from_agent?: string };\\n automation?: {\\n description?: string;\\n url_from_agent?: string;\\n api_prefix?: string;\\n docs_url?: string;\\n openapi_url?: string;\\n auth_env_var?: string;\\n };\\n };\\n}\\n\\nexport function parseRuntimeServicesInfo(\\n value: unknown,\\n): RuntimeServicesInfo | null {\\n if (typeof value === \\\"string\\\") {\\n const raw = value.trim();\\n if (!raw) return null;\\n try {\\n return parseRuntimeServicesInfo(JSON.parse(raw));\\n } catch {\\n return null;\\n }\\n }\\n\\n if (!value || typeof value !== \\\"object\\\" || Array.isArray(value)) {\\n return null;\\n }\\n\\n const parsed = value as RuntimeServicesInfo;\\n if (!parsed.services || typeof parsed.services !== \\\"object\\\") return null;\\n return parsed;\\n}\\n\\nexport async function fetchBackendRuntimeServicesInfo(): Promise<RuntimeServicesInfo | null> {\\n let clientOptions: ReturnType<typeof getAgentServerClientOptions>;\\n try {\\n clientOptions = getAgentServerClientOptions({ timeout: 3000 });\\n } catch {\\n return null;\\n }\\n\\n const cached = parseRuntimeServicesInfo(\\n getCachedAgentServerInfo({ host: clientOptions.host })?.runtime_services,\\n );\\n if (cached) return cached;\\n\\n try {\\n const serverInfo = await new ServerClient(clientOptions).getServerInfo();\\n return parseRuntimeServicesInfo(\\n (serverInfo as { runtime_services?: unknown }).runtime_services,\\n );\\n } catch {\\n return null;\\n }\\n}\\n\\n/**\\n * Return the deployment mode from the runtime services info, e.g. \\\"docker\\\",\\n * \\\"dev:automation\\\", etc. Returns `null` when no runtime info is supplied.\\n */\\nexport function getDeploymentMode(\\n runtimeServicesInfo?: RuntimeServicesInfo | null,\\n): string | null {\\n return runtimeServicesInfo?.mode ?? null;\\n}\\n\\n/**\\n * Render the runtime services info into a markdown block suitable for\\n * appending to the system prompt via `AgentContext.system_message_suffix`.\\n *\\n * Returns `undefined` when no runtime info is available, so callers can safely\\n * omit the field when the selected backend does not advertise runtime services.\\n */\\nexport function buildRuntimeServicesSystemSuffix(\\n runtimeServicesInfo?: RuntimeServicesInfo | null,\\n): string | undefined {\\n const info = parseRuntimeServicesInfo(runtimeServicesInfo);\\n if (!info?.services) return undefined;\\n\\n const lines: string[] = [];\\n lines.push(\\\"<RUNTIME_SERVICES>\\\");\\n if (info.mode) {\\n lines.push(\\n `You are running inside an agent-canvas dev stack started in '${info.mode}' mode.`,\\n );\\n } else {\\n lines.push(\\\"You are running inside an agent-canvas dev stack.\\\");\\n }\\n lines.push(\\n \\\"The following services are reachable from your sandbox. URLs are written\\\",\\n \\\"from your point of view (i.e., as you should curl/fetch them).\\\",\\n \\\"\\\",\\n );\\n\\n const { agent_server, ingress, automation } = info.services;\\n const { frontend } = info.services;\\n\\n if (agent_server?.url_from_agent) {\\n lines.push(\\n `* Agent Server (you): ${agent_server.url_from_agent}`,\\n ` ${agent_server.description ?? \\\"The agent-server hosting your tool calls.\\\"}`,\\n );\\n }\\n if (ingress?.url_from_agent) {\\n lines.push(\\n `* Ingress: ${ingress.url_from_agent}`,\\n ` ${ingress.description ?? \\\"Unified entry point for browser-facing traffic.\\\"}`,\\n );\\n }\\n if (frontend?.url_from_agent) {\\n lines.push(\\n `* Frontend: ${frontend.url_from_agent}`,\\n ` ${frontend.description ?? \\\"Frontend dev server.\\\"}`,\\n );\\n }\\n if (automation?.url_from_agent) {\\n lines.push(\\n `* Automation backend: ${automation.url_from_agent}`,\\n ` ${automation.description ?? \\\"OpenHands Automations service.\\\"}`,\\n );\\n if (automation.docs_url) {\\n lines.push(` Docs: ${automation.docs_url}`);\\n }\\n if (automation.openapi_url) {\\n lines.push(` OpenAPI: ${automation.openapi_url}`);\\n }\\n if (automation.auth_env_var) {\\n // X-Session-API-Key is the local convention shared by the agent-server\\n // and automation backend (see openhands-automation auth.py).\\n lines.push(\\n ` Auth: header 'X-Session-API-Key: $${automation.auth_env_var}'`,\\n );\\n }\\n } else {\\n lines.push(\\n \\\"* Automation backend: not running in this dev mode (skip /api/automation calls).\\\",\\n );\\n }\\n\\n // Anchor the \\\"don't guess\\\" warning to the actual agent-server URL for\\n // this stack instead of a hardcoded port. The agent-server listens on\\n // different ports across dev modes, and baking the wrong port into the\\n // system prompt is exactly the kind of confusion this block is meant to\\n // prevent.\\n const agentServerUrl = agent_server?.url_from_agent;\\n lines.push(\\n \\\"\\\",\\n \\\"Trust this block over guessing: do not assume any other URLs are running.\\\",\\n );\\n if (agentServerUrl) {\\n lines.push(\\n `In particular, ${agentServerUrl} inside your sandbox is the Agent Server`,\\n \\\"you are running inside of — NOT the automation backend.\\\",\\n );\\n }\\n lines.push(\\\"</RUNTIME_SERVICES>\\\");\\n\\n return lines.join(\\\"\\\\n\\\");\\n}\\n\\nexport function toConversationUrl(conversationId: string): string {\\n // Local-format conversation URL — points at whichever local agent-server\\n // is actually serving the conversation (the bundled one when the active\\n // selection is cloud).\\n const { host } = getAgentServerClientOptions();\\n return `${host}/api/conversations/${conversationId}`;\\n}\\n\\n// TODO(i18n): extract \\\"Conversation\\\" once we add CONVERSATION$DEFAULT_TITLE\\n// with `{{shortId}}` interpolation. Kept as a literal for now to keep the\\n// fallback inside this pure adapter rather than fanning out to display sites.\\nexport function getDefaultConversationTitle(conversationId: string): string {\\n return `Conversation ${conversationId.slice(0, 5)}`;\\n}\\n\\nexport function toAppConversation(\\n info: DirectConversationInfo,\\n): AppConversation {\\n const metadata = getStoredConversationMetadata(info.id);\\n // ACPAgent conversations carry a sentinel ``llm`` on older SDKs. Prefer the\\n // runtime model fields when available, then the configured ``acp_model`` that\\n // Canvas saves for built-in providers. ``agent_kind`` still gates model\\n // switching, so surfacing this string is display-only.\\n const isAcp = info.agent?.kind === \\\"ACPAgent\\\";\\n // Only surface ``acp_server`` for ACP conversations even if the wire\\n // payload accidentally carries an ``acpserver`` tag on an OpenHands\\n // conversation — the chip is identity info for the ACP CLI subprocess,\\n // and showing it on a non-ACP conversation would be a lie. Fall back to the\\n // agent's own ``acp_server`` (#3692) when the tag is missing — a profile\\n // launch doesn't stamp the tag, so tag-only reads would drop the ACP model\\n // picker and degrade the chip to a generic \\\"ACP\\\" (#1571).\\n const acpServer = isAcp\\n ? (info.tags?.[ACP_SERVER_TAG_KEY] ?? info.agent?.acp_server ?? null)\\n : null;\\n return {\\n id: info.id,\\n created_by_user_id: null,\\n selected_repository: metadata?.selected_repository ?? null,\\n selected_branch: metadata?.selected_branch ?? null,\\n git_provider: metadata?.git_provider ?? null,\\n selected_workspace: metadata?.selected_workspace ?? null,\\n active_profile: metadata?.active_profile ?? null,\\n title: info.title?.trim()\\n ? info.title\\n : getDefaultConversationTitle(info.id),\\n trigger: null,\\n pr_number: [],\\n agent_kind: isAcp ? \\\"acp\\\" : \\\"openhands\\\",\\n acp_server: acpServer,\\n tags: info.tags ?? null,\\n launched_agent_profile: info.launched_agent_profile ?? null,\\n // Chip path: omit ``providerDefault`` so that when no concrete model\\n // resolves, the chip falls back to the provider display name in\\n // ConversationCardFooter rather than a registry default the session may\\n // not actually be running.\\n llm_model: isAcp\\n ? resolveEffectiveAcpModel({\\n runtimeName: info.current_model_name,\\n runtimeId: info.current_model_id,\\n configured: info.agent?.acp_model,\\n sdkLlm: info.agent?.llm?.model,\\n })\\n : (info.agent?.llm?.model ?? DEFAULT_SETTINGS.llm_model),\\n metrics: info.metrics\\n ? {\\n accumulated_cost: info.metrics.accumulated_cost ?? null,\\n max_budget_per_task: info.metrics.max_budget_per_task ?? null,\\n accumulated_token_usage: info.metrics.accumulated_token_usage\\n ? {\\n prompt_tokens:\\n info.metrics.accumulated_token_usage.prompt_tokens ?? 0,\\n completion_tokens:\\n info.metrics.accumulated_token_usage.completion_tokens ?? 0,\\n cache_read_tokens:\\n info.metrics.accumulated_token_usage.cache_read_tokens ?? 0,\\n cache_write_tokens:\\n info.metrics.accumulated_token_usage.cache_write_tokens ?? 0,\\n context_window:\\n info.metrics.accumulated_token_usage.context_window ?? 0,\\n per_turn_token:\\n info.metrics.accumulated_token_usage.per_turn_token ?? 0,\\n }\\n : null,\\n }\\n : combineUsageMetrics(info.stats),\\n created_at: info.created_at,\\n updated_at: info.updated_at,\\n execution_status:\\n (info.execution_status as AppConversation[\\\"execution_status\\\"]) ??\\n ExecutionStatus.IDLE,\\n sandbox_status: (info.sandbox_status as SandboxStatus | null) ?? null,\\n conversation_url: toConversationUrl(info.id),\\n session_api_key: getAgentServerClientOptions().apiKey ?? null,\\n sandbox_id: null,\\n workspace: {\\n working_dir: info.workspace?.working_dir ?? getAgentServerWorkingDir(),\\n },\\n public: false,\\n sub_conversation_ids: [],\\n };\\n}\\n\\nexport function toConversationPage(data: {\\n items: DirectConversationInfo[];\\n next_page_id?: string | null;\\n}): AppConversationPage {\\n return {\\n items: data.items.map(toAppConversation),\\n next_page_id: data.next_page_id ?? null,\\n };\\n}\\n\\ntype SettingsRecord = Record<string, unknown>;\\n\\ninterface AgentToolSpec {\\n name: string;\\n params: SettingsRecord;\\n}\\n\\ntype AgentSettingsPayload = SettingsRecord & {\\n llm?: SettingsRecord;\\n agent_context: SettingsRecord;\\n tools?: AgentToolSpec[];\\n};\\n\\ninterface LocalWorkspacePayload {\\n kind: \\\"LocalWorkspace\\\";\\n working_dir: string;\\n}\\n\\ninterface InitialMessagePayload {\\n role: \\\"user\\\";\\n content: Array<{ type: \\\"text\\\"; text: string }>;\\n run: true;\\n}\\n\\ntype ConversationSettingsPayload = SettingsRecord & {\\n workspace: LocalWorkspacePayload;\\n initial_message?: InitialMessagePayload;\\n};\\n\\nexport const ACP_SERVER_TAG_KEY = \\\"acpserver\\\";\\nexport const CLIENT_SOURCE_TAG_KEY = \\\"clientsource\\\";\\nexport const AGENT_CANVAS_SOURCE = \\\"agentcanvas\\\";\\n\\nexport const AUTOMATION_TRIGGER_TAG_KEY = \\\"automationtrigger\\\";\\nexport const AUTOMATION_ID_TAG_KEY = \\\"automationid\\\";\\nexport const AUTOMATION_NAME_TAG_KEY = \\\"automationname\\\";\\nexport const AUTOMATION_RUN_ID_TAG_KEY = \\\"automationrunid\\\";\\n\\n/**\\n * Tag keys stamped on conversations created by automation runs (see the SDK's\\n * `RemoteWorkspace.default_conversation_tags`). The presence of any of these\\n * marks a conversation as automation-born.\\n */\\nexport const AUTOMATION_TAG_KEYS: readonly string[] = [\\n AUTOMATION_TRIGGER_TAG_KEY,\\n AUTOMATION_ID_TAG_KEY,\\n AUTOMATION_NAME_TAG_KEY,\\n AUTOMATION_RUN_ID_TAG_KEY,\\n];\\n\\n/**\\n * Conversation tag keys that must not appear as generic chips / hovercard\\n * rows. Each is either already surfaced by a first-class UI source or is\\n * internal routing data:\\n * - ``acpserver`` → ACP provider chip\\n * - ``clientsource`` → telemetry attribution\\n * - ``title`` → conversation card heading\\n * - git / repo / branch / workspace stamps → repo-branch metadata + directory\\n * footer / hovercard rows (``selected_repository``, ``selected_branch``,\\n * ``git_provider``, ``workspace.working_dir``)\\n * - ``automationid`` / ``automationrunid`` → raw UUIDs consumed by the\\n * conversation panel's automation filter (chip noise), while\\n * ``automationname`` / ``automationtrigger`` stay visible\\n */\\nexport const RESERVED_CONVERSATION_TAG_KEYS: ReadonlySet<string> = new Set([\\n ACP_SERVER_TAG_KEY,\\n CLIENT_SOURCE_TAG_KEY,\\n AUTOMATION_ID_TAG_KEY,\\n AUTOMATION_RUN_ID_TAG_KEY,\\n \\\"title\\\",\\n \\\"git_provider\\\",\\n \\\"repo_name\\\",\\n \\\"repo\\\",\\n \\\"repository\\\",\\n \\\"selected_branch\\\",\\n \\\"branch\\\",\\n \\\"archiveworkspacepath\\\",\\n \\\"workspace\\\",\\n \\\"working_dir\\\",\\n]);\\n\\n/**\\n * High-signal tag keys shown first in the chip row (before A–Z). Automations\\n * often stamp ``origin``; remaining free-form tags sort alphabetically.\\n */\\nexport const PRIORITY_CONVERSATION_TAG_KEYS: readonly string[] = [\\\"origin\\\"];\\n\\n/**\\n * User-facing subset of a conversation's server-side tags: everything except\\n * {@link RESERVED_CONVERSATION_TAG_KEYS}, as stable ``[key, value]`` entries.\\n * Priority keys come first (in {@link PRIORITY_CONVERSATION_TAG_KEYS} order);\\n * the rest sort A–Z so chip order doesn't shuffle between refetches.\\n */\\nexport function getDisplayConversationTags(\\n tags: Record<string, string> | null | undefined,\\n): Array<[string, string]> {\\n if (!tags) {\\n return [];\\n }\\n // Both the reserved-key check and the priority lookup must see the same\\n // normalized key: a cloud backend can stamp ``Origin`` / `` origin``, and\\n // ranking those off the raw key would silently drop them out of first place.\\n const priorityRank = (key: string): number => {\\n const index = PRIORITY_CONVERSATION_TAG_KEYS.indexOf(\\n key.trim().toLowerCase(),\\n );\\n return index === -1 ? Number.POSITIVE_INFINITY : index;\\n };\\n\\n return Object.entries(tags)\\n .filter(\\n ([key, value]) =>\\n !RESERVED_CONVERSATION_TAG_KEYS.has(key.trim().toLowerCase()) &&\\n typeof value === \\\"string\\\" &&\\n value.trim().length > 0,\\n )\\n .sort(([a], [b]) => {\\n const aRank = priorityRank(a);\\n const bRank = priorityRank(b);\\n if (aRank !== bRank) {\\n return aRank - bRank;\\n }\\n return a.localeCompare(b);\\n });\\n}\\n\\nconst FERNET_TOKEN_PREFIX = \\\"gAAAAA\\\";\\n\\nconst CONVERSATION_SETTINGS_METADATA_KEYS = new Set([\\n \\\"schema_version\\\",\\n \\\"agent_settings\\\",\\n \\\"workspace\\\",\\n \\\"conversation_id\\\",\\n \\\"initial_message\\\",\\n \\\"plugins\\\",\\n]);\\n\\nfunction toRecord(value: unknown): SettingsRecord {\\n if (!value || typeof value !== \\\"object\\\" || Array.isArray(value)) {\\n return {};\\n }\\n\\n return structuredClone(value as SettingsRecord);\\n}\\n\\nfunction normalizeSecretString(value: unknown): string | undefined {\\n if (typeof value !== \\\"string\\\") {\\n return undefined;\\n }\\n\\n const trimmed = value.trim();\\n return trimmed.length > 0 ? trimmed : undefined;\\n}\\n\\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\\n return !!value && typeof value === \\\"object\\\" && !Array.isArray(value);\\n}\\n\\nfunction hasEncryptedString(value: unknown): boolean {\\n if (typeof value === \\\"string\\\") {\\n return value.startsWith(FERNET_TOKEN_PREFIX);\\n }\\n if (Array.isArray(value)) {\\n return value.some(hasEncryptedString);\\n }\\n if (isPlainRecord(value)) {\\n return Object.values(value).some(hasEncryptedString);\\n }\\n return false;\\n}\\n\\nfunction hasEncryptedMcpSecrets(mcpConfig: unknown): boolean {\\n if (!isPlainRecord(mcpConfig)) {\\n return false;\\n }\\n\\n return Object.values(mcpConfig).some(hasEncryptedString);\\n}\\n\\nfunction getConversationConfirmationPolicy(\\n conversationSettings: SettingsRecord,\\n) {\\n if (conversationSettings.confirmation_mode !== true) {\\n return { kind: \\\"NeverConfirm\\\" };\\n }\\n\\n if (conversationSettings.security_analyzer === \\\"llm\\\") {\\n return { kind: \\\"ConfirmRisky\\\", threshold: \\\"HIGH\\\", confirm_unknown: true };\\n }\\n\\n return { kind: \\\"AlwaysConfirm\\\" };\\n}\\n\\nfunction getConversationSecurityAnalyzer(conversationSettings: SettingsRecord) {\\n switch (conversationSettings.security_analyzer) {\\n case \\\"llm\\\":\\n return { kind: \\\"LLMSecurityAnalyzer\\\" };\\n case \\\"pattern\\\":\\n return { kind: \\\"PatternSecurityAnalyzer\\\" };\\n case \\\"policy_rail\\\":\\n return { kind: \\\"PolicyRailSecurityAnalyzer\\\" };\\n default:\\n return undefined;\\n }\\n}\\n\\nfunction isToolRecord(\\n value: unknown,\\n): value is { name: string; params?: unknown } {\\n return (\\n !!value &&\\n typeof value === \\\"object\\\" &&\\n !Array.isArray(value) &&\\n typeof (value as { name?: unknown }).name === \\\"string\\\"\\n );\\n}\\n\\nfunction shouldIncludeTool(name: string, agentSettings: SettingsRecord) {\\n if (name === BROWSER_TOOL_SET_NAME) {\\n return browserToolsEnabled() && isAgentServerToolAvailable(name);\\n }\\n\\n if (name === TASK_TOOL_SET_NAME) {\\n return (\\n agentSettings.enable_sub_agents === true &&\\n isAgentServerToolAvailable(name)\\n );\\n }\\n\\n return true;\\n}\\n\\nfunction getAgentTools(agentSettings: SettingsRecord): AgentToolSpec[] {\\n const tools = new Map<string, AgentToolSpec>();\\n\\n for (const name of DEFAULT_TOOL_NAMES) {\\n if (shouldIncludeTool(name, agentSettings)) {\\n tools.set(name, { name, params: {} });\\n }\\n }\\n\\n for (const name of [BROWSER_TOOL_SET_NAME, TASK_TOOL_SET_NAME]) {\\n if (shouldIncludeTool(name, agentSettings)) {\\n tools.set(name, { name, params: {} });\\n }\\n }\\n\\n const configuredTools = agentSettings.tools;\\n if (\\n Array.isArray(configuredTools) &&\\n configuredTools.every((tool) => isToolRecord(tool))\\n ) {\\n for (const tool of configuredTools) {\\n if (shouldIncludeTool(tool.name, agentSettings)) {\\n tools.set(tool.name, {\\n name: tool.name,\\n params: toRecord(tool.params),\\n });\\n }\\n }\\n }\\n\\n return Array.from(tools.values());\\n}\\n\\nfunction buildInitialMessage(\\n query?: string,\\n conversationInstructions?: string,\\n): InitialMessagePayload | null {\\n const parts = [query?.trim(), conversationInstructions?.trim()].filter(\\n Boolean,\\n );\\n if (parts.length === 0) {\\n return null;\\n }\\n\\n return {\\n role: \\\"user\\\",\\n content: [{ type: \\\"text\\\", text: parts.join(\\\"\\\\n\\\\n\\\") }],\\n run: true,\\n };\\n}\\n\\n/**\\n * Shape of a bundled skill entry passed to the agent-server SDK via\\n * `agent_context.skills`. Mirrors the SDK's `Skill` model fields that\\n * the server uses for trigger matching, activation, and system-prompt\\n * injection.\\n */\\ninterface BundledSkill {\\n name: string;\\n content: string;\\n trigger: { type: \\\"keyword\\\"; keywords: string[] } | null;\\n source: string;\\n description: string | null;\\n is_agentskills_format: true;\\n license?: string;\\n compatibility?: string;\\n}\\n\\n/**\\n * Convert the bundled `SKILLS_CATALOG` entries into the SDK `Skill` JSON\\n * shape so the agent-server can perform trigger matching, skill activation,\\n * and system-prompt injection without cloning the extensions repo.\\n *\\n * The SDK discriminates triggers via `{ type: \\\"keyword\\\", keywords: [...] }`.\\n * Skills with no triggers get `trigger: null` (always-active / on-demand).\\n */\\nfunction buildBundledSkills(): BundledSkill[] {\\n return SKILLS_CATALOG.map((entry) => {\\n const trigger: BundledSkill[\\\"trigger\\\"] =\\n entry.triggers?.length > 0\\n ? { type: \\\"keyword\\\", keywords: entry.triggers }\\n : null;\\n\\n // Use the absolute path to the skill's SKILL.md so the Python\\n // agent-server can resolve bundled resources (scripts/, references/).\\n // Falls back to \\\"public\\\" in library builds where the path isn't known.\\n const source = __EXTENSIONS_SKILLS_DIR__\\n ? `${__EXTENSIONS_SKILLS_DIR__}/${entry.name}/SKILL.md`\\n : \\\"public\\\";\\n\\n return {\\n name: entry.name,\\n content: entry.content,\\n trigger,\\n source,\\n description: entry.description ?? null,\\n is_agentskills_format: true as const,\\n ...(entry.license ? { license: entry.license } : {}),\\n ...(entry.compatibility ? { compatibility: entry.compatibility } : {}),\\n };\\n });\\n}\\n\\nfunction buildAgentContext(\\n agentSettings: SettingsRecord,\\n runtimeServicesInfo?: RuntimeServicesInfo | null,\\n enablement: SkillEnablement = {},\\n invokedCatalogSkill?: string,\\n): SettingsRecord {\\n const runtimeServicesSuffix =\\n buildRuntimeServicesSystemSuffix(runtimeServicesInfo);\\n const existingContext = toRecord(agentSettings.agent_context);\\n\\n // Merge bundled public skills with any skills already present in the\\n // agent context (e.g. user-defined skills set via the settings API).\\n const existingSkills = Array.isArray(existingContext.skills)\\n ? (existingContext.skills as SettingsRecord[])\\n : [];\\n const disabledSkills = enablement.disabledSkills ?? [];\\n const disabledSkillNames = new Set(disabledSkills);\\n const isSkillEnabled = buildSkillEnablementFilter(enablement);\\n\\n // The bundled catalog is allow-listed, not deny-listed: it is a build-time\\n // snapshot of ~60 skills, so a deny-list puts every future addition into\\n // every system prompt (OpenHands#16302). Skills the agent context already\\n // carries are user-authored and stay opt-out. A skill the opening message\\n // invokes by name overrides both, for this conversation only.\\n const mergedSkills = [\\n ...existingSkills.filter(\\n (skill) =>\\n typeof skill.name !== \\\"string\\\" || !disabledSkillNames.has(skill.name),\\n ),\\n ...buildBundledSkills().filter(\\n (skill) =>\\n skill.name === invokedCatalogSkill || isSkillEnabled(skill.name),\\n ),\\n ];\\n\\n return {\\n ...existingContext,\\n // Public skills are bundled at build time from the @openhands/extensions\\n // npm package and passed directly in agent_context.skills. Setting\\n // load_public_skills to false tells the agent-server SDK to skip its own\\n // extensions-repo clone — the frontend is the sole source of public\\n // skills now.\\n //\\n // Migration: the former VITE_LOAD_PUBLIC_SKILLS env var was removed\\n // because bundled skills have no clone latency. Users who previously set\\n // VITE_LOAD_PUBLIC_SKILLS=false to avoid clone delays no longer need it.\\n skills: mergedSkills,\\n load_public_skills: false,\\n load_user_skills: true,\\n load_project_skills: true,\\n // The backend also auto-loads user/project skills; the deny-list must\\n // travel with the context so those skills are excluded from the system\\n // prompt too. The allow-list has no counterpart to send: the backend\\n // loads no catalog skills of its own (`load_public_skills` is false).\\n disabled_skills: disabledSkills,\\n ...(runtimeServicesSuffix\\n ? { system_message_suffix: runtimeServicesSuffix }\\n : {}),\\n };\\n}\\n\\nfunction isAcpAgent(settings: Settings): boolean {\\n const agentSettings = toRecord(settings.agent_settings);\\n return agentSettings.agent_kind === \\\"acp\\\";\\n}\\n\\nfunction getAcpServerTag(settings: Settings): string | undefined {\\n const agentSettings = toRecord(settings.agent_settings);\\n const value = agentSettings.acp_server;\\n return typeof value === \\\"string\\\" && value.length > 0 ? value : undefined;\\n}\\n\\nfunction resolveAcpCommand(agentSettings: SettingsRecord): unknown {\\n const cmd = agentSettings.acp_command;\\n const isEmpty = Array.isArray(cmd) && cmd.length === 0;\\n const noCommand = cmd === undefined;\\n if (!isEmpty && !noCommand) {\\n return cmd;\\n }\\n\\n const serverKey =\\n typeof agentSettings.acp_server === \\\"string\\\"\\n ? agentSettings.acp_server\\n : undefined;\\n const provider = getAcpProvider(serverKey);\\n return provider ? [...provider.default_command] : cmd;\\n}\\n\\nfunction buildConfiguredAcpAgentSettings(\\n settings: Settings,\\n runtimeServicesInfo?: RuntimeServicesInfo | null,\\n query?: string,\\n): AgentSettingsPayload {\\n const agentSettings = toRecord(settings.agent_settings);\\n const payload: AgentSettingsPayload = {\\n agent_kind: \\\"acp\\\",\\n agent_context: buildAgentContext(\\n agentSettings,\\n runtimeServicesInfo,\\n toSkillEnablement(settings),\\n findInvokedCatalogSkill(query),\\n ),\\n };\\n\\n // TODO(#1019): set ``acp_isolate_data_dir: true`` here for a containerized\\n // backend so concurrent same-provider conversations don't race on a shared\\n // HOME. The SDK supports it (software-agent-sdk#3492), but the released\\n // ``@openhands/typescript-client`` (1.24.3) doesn't surface it on\\n // ``ACPAgentSettings`` yet, so sending it risks a validation error on older\\n // servers. Cloud grouping isolation is separate (agent-canvas#1016).\\n\\n for (const key of ACP_SETTINGS_KEYS) {\\n // ``acp_model`` is resolved separately below so a saved ``null`` still\\n // falls back to the provider's default rather than being dropped.\\n if (key === \\\"acp_model\\\") continue;\\n // ``acp_env`` is deprecated — provider creds now route via ``request.secrets``.\\n if (key === \\\"acp_env\\\") continue;\\n const value =\\n key === \\\"acp_command\\\"\\n ? resolveAcpCommand(agentSettings)\\n : agentSettings[key];\\n if (value !== undefined && value !== null) {\\n payload[key] = value;\\n }\\n }\\n\\n // ``mcp_config`` is a\",\"truncated\":true,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "8e006827-f516-43d1-9d5e-3c9d4fd212c3",
"extended_content": [],
"kind": "ObservationEvent"
}ConversationStateUpdateEvent
{
"id": "aeb6ac3f-aafb-405b-84d1-479f54002aa6",
"timestamp": "2026-10-17T16:32:40.684405",
"source": "environment",
"parent_id": "b2e34d6f-e2c4-4332-ab53-496cafc306f7",
"key": "stats",
"value": {
"usage_to_metrics": {
"default": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0030963799999999997,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 26894,
"completion_tokens": 1260,
"cache_read_tokens": 12544,
"cache_write_tokens": 0,
"reasoning_tokens": 247,
"context_window": 1000000,
"per_turn_token": 17826,
"response_id": ""
}
},
"condenser": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
}
}
},
"kind": "ConversationStateUpdateEvent"
}Tool request: get_file_at_revision
{}Full event evidence
{
"id": "0574729b-539c-427b-bfe8-019fa2e452e8",
"timestamp": "2026-10-17T16:32:46.752706",
"source": "agent",
"parent_id": "b2e34d6f-e2c4-4332-ab53-496cafc306f7",
"thought": [],
"reasoning_content": null,
"thinking_blocks": [],
"tool_name": "get_file_at_revision",
"tool_call_id": "call_e6b98aa73f0141ed80c37a7e",
"tool_call": {
"id": "call_e6b98aa73f0141ed80c37a7e",
"name": "get_file_at_revision",
"arguments": "{\"owner\":\"OpenHands\",\"path\":\"src/api/agent-server-adapter.test.ts\",\"revision\":\"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\",\"security_risk\":\"LOW\",\"summary\":\"Read adapter test to verify flipped add-javadoc assertions\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272761-dbqp1xSJeb72Bl0rL80h",
"security_risk": "UNKNOWN",
"kind": "ActionEvent"
}AgentErrorEvent
Full event evidence
{
"id": "46332cfb-e86b-48b6-a8d5-d8bb5e248645",
"timestamp": "2026-10-17T16:32:46.754566",
"source": "agent",
"parent_id": "0574729b-539c-427b-bfe8-019fa2e452e8",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_e6b98aa73f0141ed80c37a7e",
"error": "Error validating tool 'get_file_at_revision': 1 validation error for MCPGetFileAtRevisionAction\nrepo\n Field required [type=missing, input_value={'owner': 'OpenHands', 'p...f87aac36abe321e72fbb2c'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.14/v/missing. Parameters provided: ['owner', 'path', 'revision']",
"classification": {
"kind": "agent_action",
"retryable": true,
"user_action": "retry"
},
"kind": "AgentErrorEvent"
}Tool request: get_file_at_revision
{}Full event evidence
{
"id": "e7ccd624-3635-40bc-bbcc-104aaec12404",
"timestamp": "2026-10-17T16:32:46.756011",
"source": "agent",
"parent_id": "46332cfb-e86b-48b6-a8d5-d8bb5e248645",
"thought": [],
"thinking_blocks": [],
"tool_name": "get_file_at_revision",
"tool_call_id": "call_7fafbf8150f9481da804917a",
"tool_call": {
"id": "call_7fafbf8150f9481da804917a",
"name": "get_file_at_revision",
"arguments": "{\"owner\":\"OpenHands\",\"path\":\"__tests__/utils/skill-enablement.test.ts\",\"revision\":\"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\",\"security_risk\":\"LOW\",\"summary\":\"View skill-enablement unit test coverage\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272761-dbqp1xSJeb72Bl0rL80h",
"security_risk": "UNKNOWN",
"kind": "ActionEvent"
}AgentErrorEvent
Full event evidence
{
"id": "15d440e9-f57b-41ab-b4e9-53e36d4748b5",
"timestamp": "2026-10-17T16:32:46.757039",
"source": "agent",
"parent_id": "e7ccd624-3635-40bc-bbcc-104aaec12404",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_7fafbf8150f9481da804917a",
"error": "Error validating tool 'get_file_at_revision': 1 validation error for MCPGetFileAtRevisionAction\nrepo\n Field required [type=missing, input_value={'owner': 'OpenHands', 'p...f87aac36abe321e72fbb2c'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.14/v/missing. Parameters provided: ['owner', 'path', 'revision']",
"classification": {
"kind": "agent_action",
"retryable": true,
"user_action": "retry"
},
"kind": "AgentErrorEvent"
}ConversationStateUpdateEvent
{
"id": "b59e69fc-5f28-48a2-945b-1e768a6e099b",
"timestamp": "2026-10-17T16:32:46.751793",
"source": "environment",
"parent_id": "15d440e9-f57b-41ab-b4e9-53e36d4748b5",
"key": "stats",
"value": {
"usage_to_metrics": {
"default": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.00625474,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 57066,
"completion_tokens": 2152,
"cache_read_tokens": 29440,
"cache_write_tokens": 0,
"reasoning_tokens": 788,
"context_window": 1000000,
"per_turn_token": 31064,
"response_id": ""
}
},
"condenser": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
}
}
},
"kind": "ConversationStateUpdateEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "__tests__/utils/skill-enablement.test.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "e693c976-ec0d-481f-af73-f47ce5825239",
"timestamp": "2026-10-17T16:32:48.513607",
"source": "agent",
"parent_id": "15d440e9-f57b-41ab-b4e9-53e36d4748b5",
"thought": [],
"reasoning_content": null,
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "__tests__/utils/skill-enablement.test.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_4bb3af84b8684222b7ca3115",
"tool_call": {
"id": "call_4bb3af84b8684222b7ca3115",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"path\": \"__tests__/utils/skill-enablement.test.ts\", \"repo\": \"OpenHands\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"security_risk\": \"LOW\", \"summary\": \"View skill-enablement unit test coverage\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272766-vNEo3eZKQLlZqhrQwYWi",
"security_risk": "UNKNOWN",
"summary": "View skill-enablement unit test coverage",
"kind": "ActionEvent"
}Tool request: get_file_at_revision
{
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/api/agent-server-adapter.test.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
}Full event evidence
{
"id": "31f0e586-ba3a-4fff-ab2a-710feb04aa1d",
"timestamp": "2026-10-17T16:32:48.517607",
"source": "agent",
"parent_id": "e693c976-ec0d-481f-af73-f47ce5825239",
"thought": [],
"thinking_blocks": [],
"action": {
"data": {
"owner": "OpenHands",
"repo": "OpenHands",
"path": "src/api/agent-server-adapter.test.ts",
"revision": "fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c"
},
"kind": "MCPToolAction"
},
"tool_name": "get_file_at_revision",
"tool_call_id": "call_3deb06f140534cdf9705056c",
"tool_call": {
"id": "call_3deb06f140534cdf9705056c",
"name": "get_file_at_revision",
"arguments": "{\"owner\": \"OpenHands\", \"path\": \"src/api/agent-server-adapter.test.ts\", \"repo\": \"OpenHands\", \"revision\": \"fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c\", \"security_risk\": \"LOW\", \"summary\": \"Verify flipped add-javadoc adapter assertions\"}",
"origin": "completion"
},
"llm_response_id": "gen-1792272766-vNEo3eZKQLlZqhrQwYWi",
"security_risk": "UNKNOWN",
"summary": "Verify flipped add-javadoc adapter assertions",
"kind": "ActionEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"__tests__/utils/skill-enablement.test.ts","sha":"93e782101808069af88b1867288820cc5bb8f4ea","content":"import { describe, expect, it } from \"vitest\";\nimport {\n DEFAULT_ENABLED_SKILL_NAMES,\n SKILLS_CATALOG,\n} from \"@openhands/extensions/skills\";\nimport {\n buildSkillEnablementFilter,\n findInvokedCatalogSkill,\n isCatalogSkill,\n isRecommendedSkill,\n migrateSkillEnablement,\n resolveEnabledCatalogSkills,\n toSkillEnablement,\n} from \"#/utils/skill-enablement\";\n\n// Two anchors from the bundled catalog: `add-skill` carries `defaultEnabled`,\n// `add-javadoc` is the language-specific kind of skill OpenHands#16302 asked\n// not to be opted into.\nconst RECOMMENDED = \"add-skill\";\nconst OPTIONAL = \"add-javadoc\";\nconst LOCAL = \"house-rules\";\n\ndescribe(\"catalog membership\", () => {\n it(\"recognises bundled skills and ignores locally authored ones\", () => {\n expect(isCatalogSkill(RECOMMENDED)).toBe(true);\n expect(isCatalogSkill(OPTIONAL)).toBe(true);\n expect(isCatalogSkill(LOCAL)).toBe(false);\n });\n\n it(\"marks only the catalog's default-enabled entries as recommended\", () => {\n expect(isRecommendedSkill(RECOMMENDED)).toBe(true);\n expect(isRecommendedSkill(OPTIONAL)).toBe(false);\n expect(DEFAULT_ENABLED_SKILL_NAMES.length).toBeLessThan(\n SKILLS_CATALOG.length,\n );\n });\n});\n\ndescribe(\"resolveEnabledCatalogSkills\", () => {\n it(\"falls back to the curated default when nothing is persisted\", () => {\n expect(resolveEnabledCatalogSkills({})).toEqual([\n ...DEFAULT_ENABLED_SKILL_NAMES,\n ]);\n });\n\n it(\"uses the persisted allow-list verbatim, empty list included\", () => {\n expect(resolveEnabledCatalogSkills({ enabledSkills: [OPTIONAL] })).toEqual([\n OPTIONAL,\n ]);\n expect(resolveEnabledCatalogSkills({ enabledSkills: [] })).toEqual([]);\n });\n});\n\ndescribe(\"buildSkillEnablementFilter\", () => {\n it(\"keeps user- and project-authored skills on unless denied\", () => {\n expect(buildSkillEnablementFilter({ enabledSkills: [] })(LOCAL)).toBe(true);\n expect(buildSkillEnablementFilter({ disabledSkills: [LOCAL] })(LOCAL)).toBe(\n false,\n );\n });\n\n it(\"requires a catalog skill to be on the allow-list\", () => {\n expect(buildSkillEnablementFilter({})(OPTIONAL)).toBe(false);\n expect(buildSkillEnablementFilter({})(RECOMMENDED)).toBe(true);\n expect(\n buildSkillEnablementFilter({ enabledSkills: [OPTIONAL] })(OPTIONAL),\n ).toBe(true);\n });\n\n it(\"lets an unmigrated deny-list veto a default-enabled skill\", () => {\n // Until the migration runs, an existing \"I turned this off\" lives in the\n // deny-list alone; the allow-list fallback must not switch it back on.\n expect(\n buildSkillEnablementFilter({ disabledSkills: [RECOMMENDED] })(\n RECOMMENDED,\n ),\n ).toBe(false);\n });\n});\n\ndescribe(\"migrateSkillEnablement\", () => {\n it(\"does nothing once an allow-list is persisted\", () => {\n expect(migrateSkillEnablement({ enabledSkills: [] })).toBeUndefined();\n expect(\n migrateSkillEnablement({ enabledSkills: [RECOMMENDED] }),\n ).toBeUndefined();\n });\n\n it(\"preserves an existing workspace's all-on-minus-deny-list set\", () => {\n const migrated = migrateSkillEnablement({ disabledSkills: [OPTIONAL] });\n\n expect(migrated?.enabled_skills).toHaveLength(SKILLS_CATALOG.length - 1);\n expect(migrated?.enabled_skills).not.toContain(OPTIONAL);\n expect(migrated?.enabled_skills).toContain(RECOMMENDED);\n // The catalog name has moved to the allow-list; a leftover deny entry\n // would veto the skill if the user switched it back on later.\n expect(migrated?.disabled_skills).toEqual([]);\n });\n\n it(\"keeps local deny entries, which the allow-list does not cover\", () => {\n const migrated = migrateSkillEnablement({\n disabledSkills: [OPTIONAL, LOCAL],\n });\n\n expect(migrated?.disabled_skills).toEqual([LOCAL]);\n });\n\n it(\"gives a fresh workspace the curated default\", () => {\n expect(migrateSkillEnablement({})?.enabled_skills).toEqual([\n ...DEFAULT_ENABLED_SKILL_NAMES,\n ]);\n // A deny-list naming only local skills says nothing about the catalog.\n expect(\n migrateSkillEnablement({ disabledSkills: [LOCAL] })?.enabled_skills,\n ).toEqual([...DEFAULT_ENABLED_SKILL_NAMES]);\n });\n\n it(\"persists the set even for a fresh workspace\", () => {\n // Without an explicit write, a catalog addition marked `defaultEnabled`\n // would switch itself on in a workspace that never asked for it.\n expect(migrateSkillEnablement({})).toBeDefined();\n });\n});\n\ndescribe(\"toSkillEnablement\", () => {\n it(\"keeps an absent allow-list undefined, the unmigrated sentinel\", () => {\n expect(toSkillEnablement({ disabled_skills: [LOCAL] })).toEqual({\n enabledSkills: undefined,\n disabledSkills: [LOCAL],\n });\n });\n});\n\ndescribe(\"findInvokedCatalogSkill\", () => {\n it(\"resolves a skill's own slash command, which is what automation cards send\", () => {\n expect(findInvokedCatalogSkill(\"/standup-digest:setup\")).toBe(\n \"slack-standup-digest\",\n );\n expect(findInvokedCatalogSkill(\"/codereview please look at src/\")).toBe(\n \"code-review\",\n );\n });\n\n it(\"resolves `/<skill-name>`, which the Use skill button inserts\", () => {\n expect(findInvokedCatalogSkill(`/${OPTIONAL} MyClass.java`)).toBe(OPTIONAL);\n });\n\n it(\"only counts the leading token\", () => {\n // Matching a `/word` anywhere in prose would re-admit most of the catalog.\n expect(\n findInvokedCatalogSkill(\"what would /standup-digest:setup do?\"),\n ).toBeUndefined();\n });\n\n it(\"ignores an empty, absent, or unknown command\", () => {\n expect(findInvokedCatalogSkill(undefined)).toBeUndefined();\n expect(findInvokedCatalogSkill(\" \")).toBeUndefined();\n expect(findInvokedCatalogSkill(\"just a message\")).toBeUndefined();\n expect(findInvokedCatalogSkill(\"/not-a-real-skill\")).toBeUndefined();\n });\n});\n","truncated":false,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__/utils/skill-enablement.test.ts"}Full event evidence
{
"id": "462f7656-cc83-4dc2-8c5c-d4183d3df831",
"timestamp": "2026-10-17T16:32:49.788824",
"source": "environment",
"parent_id": "31f0e586-ba3a-4fff-ab2a-710feb04aa1d",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_4bb3af84b8684222b7ca3115",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"__tests__/utils/skill-enablement.test.ts\",\"sha\":\"93e782101808069af88b1867288820cc5bb8f4ea\",\"content\":\"import { describe, expect, it } from \\\"vitest\\\";\\nimport {\\n DEFAULT_ENABLED_SKILL_NAMES,\\n SKILLS_CATALOG,\\n} from \\\"@openhands/extensions/skills\\\";\\nimport {\\n buildSkillEnablementFilter,\\n findInvokedCatalogSkill,\\n isCatalogSkill,\\n isRecommendedSkill,\\n migrateSkillEnablement,\\n resolveEnabledCatalogSkills,\\n toSkillEnablement,\\n} from \\\"#/utils/skill-enablement\\\";\\n\\n// Two anchors from the bundled catalog: `add-skill` carries `defaultEnabled`,\\n// `add-javadoc` is the language-specific kind of skill OpenHands#16302 asked\\n// not to be opted into.\\nconst RECOMMENDED = \\\"add-skill\\\";\\nconst OPTIONAL = \\\"add-javadoc\\\";\\nconst LOCAL = \\\"house-rules\\\";\\n\\ndescribe(\\\"catalog membership\\\", () => {\\n it(\\\"recognises bundled skills and ignores locally authored ones\\\", () => {\\n expect(isCatalogSkill(RECOMMENDED)).toBe(true);\\n expect(isCatalogSkill(OPTIONAL)).toBe(true);\\n expect(isCatalogSkill(LOCAL)).toBe(false);\\n });\\n\\n it(\\\"marks only the catalog's default-enabled entries as recommended\\\", () => {\\n expect(isRecommendedSkill(RECOMMENDED)).toBe(true);\\n expect(isRecommendedSkill(OPTIONAL)).toBe(false);\\n expect(DEFAULT_ENABLED_SKILL_NAMES.length).toBeLessThan(\\n SKILLS_CATALOG.length,\\n );\\n });\\n});\\n\\ndescribe(\\\"resolveEnabledCatalogSkills\\\", () => {\\n it(\\\"falls back to the curated default when nothing is persisted\\\", () => {\\n expect(resolveEnabledCatalogSkills({})).toEqual([\\n ...DEFAULT_ENABLED_SKILL_NAMES,\\n ]);\\n });\\n\\n it(\\\"uses the persisted allow-list verbatim, empty list included\\\", () => {\\n expect(resolveEnabledCatalogSkills({ enabledSkills: [OPTIONAL] })).toEqual([\\n OPTIONAL,\\n ]);\\n expect(resolveEnabledCatalogSkills({ enabledSkills: [] })).toEqual([]);\\n });\\n});\\n\\ndescribe(\\\"buildSkillEnablementFilter\\\", () => {\\n it(\\\"keeps user- and project-authored skills on unless denied\\\", () => {\\n expect(buildSkillEnablementFilter({ enabledSkills: [] })(LOCAL)).toBe(true);\\n expect(buildSkillEnablementFilter({ disabledSkills: [LOCAL] })(LOCAL)).toBe(\\n false,\\n );\\n });\\n\\n it(\\\"requires a catalog skill to be on the allow-list\\\", () => {\\n expect(buildSkillEnablementFilter({})(OPTIONAL)).toBe(false);\\n expect(buildSkillEnablementFilter({})(RECOMMENDED)).toBe(true);\\n expect(\\n buildSkillEnablementFilter({ enabledSkills: [OPTIONAL] })(OPTIONAL),\\n ).toBe(true);\\n });\\n\\n it(\\\"lets an unmigrated deny-list veto a default-enabled skill\\\", () => {\\n // Until the migration runs, an existing \\\"I turned this off\\\" lives in the\\n // deny-list alone; the allow-list fallback must not switch it back on.\\n expect(\\n buildSkillEnablementFilter({ disabledSkills: [RECOMMENDED] })(\\n RECOMMENDED,\\n ),\\n ).toBe(false);\\n });\\n});\\n\\ndescribe(\\\"migrateSkillEnablement\\\", () => {\\n it(\\\"does nothing once an allow-list is persisted\\\", () => {\\n expect(migrateSkillEnablement({ enabledSkills: [] })).toBeUndefined();\\n expect(\\n migrateSkillEnablement({ enabledSkills: [RECOMMENDED] }),\\n ).toBeUndefined();\\n });\\n\\n it(\\\"preserves an existing workspace's all-on-minus-deny-list set\\\", () => {\\n const migrated = migrateSkillEnablement({ disabledSkills: [OPTIONAL] });\\n\\n expect(migrated?.enabled_skills).toHaveLength(SKILLS_CATALOG.length - 1);\\n expect(migrated?.enabled_skills).not.toContain(OPTIONAL);\\n expect(migrated?.enabled_skills).toContain(RECOMMENDED);\\n // The catalog name has moved to the allow-list; a leftover deny entry\\n // would veto the skill if the user switched it back on later.\\n expect(migrated?.disabled_skills).toEqual([]);\\n });\\n\\n it(\\\"keeps local deny entries, which the allow-list does not cover\\\", () => {\\n const migrated = migrateSkillEnablement({\\n disabledSkills: [OPTIONAL, LOCAL],\\n });\\n\\n expect(migrated?.disabled_skills).toEqual([LOCAL]);\\n });\\n\\n it(\\\"gives a fresh workspace the curated default\\\", () => {\\n expect(migrateSkillEnablement({})?.enabled_skills).toEqual([\\n ...DEFAULT_ENABLED_SKILL_NAMES,\\n ]);\\n // A deny-list naming only local skills says nothing about the catalog.\\n expect(\\n migrateSkillEnablement({ disabledSkills: [LOCAL] })?.enabled_skills,\\n ).toEqual([...DEFAULT_ENABLED_SKILL_NAMES]);\\n });\\n\\n it(\\\"persists the set even for a fresh workspace\\\", () => {\\n // Without an explicit write, a catalog addition marked `defaultEnabled`\\n // would switch itself on in a workspace that never asked for it.\\n expect(migrateSkillEnablement({})).toBeDefined();\\n });\\n});\\n\\ndescribe(\\\"toSkillEnablement\\\", () => {\\n it(\\\"keeps an absent allow-list undefined, the unmigrated sentinel\\\", () => {\\n expect(toSkillEnablement({ disabled_skills: [LOCAL] })).toEqual({\\n enabledSkills: undefined,\\n disabledSkills: [LOCAL],\\n });\\n });\\n});\\n\\ndescribe(\\\"findInvokedCatalogSkill\\\", () => {\\n it(\\\"resolves a skill's own slash command, which is what automation cards send\\\", () => {\\n expect(findInvokedCatalogSkill(\\\"/standup-digest:setup\\\")).toBe(\\n \\\"slack-standup-digest\\\",\\n );\\n expect(findInvokedCatalogSkill(\\\"/codereview please look at src/\\\")).toBe(\\n \\\"code-review\\\",\\n );\\n });\\n\\n it(\\\"resolves `/<skill-name>`, which the Use skill button inserts\\\", () => {\\n expect(findInvokedCatalogSkill(`/${OPTIONAL} MyClass.java`)).toBe(OPTIONAL);\\n });\\n\\n it(\\\"only counts the leading token\\\", () => {\\n // Matching a `/word` anywhere in prose would re-admit most of the catalog.\\n expect(\\n findInvokedCatalogSkill(\\\"what would /standup-digest:setup do?\\\"),\\n ).toBeUndefined();\\n });\\n\\n it(\\\"ignores an empty, absent, or unknown command\\\", () => {\\n expect(findInvokedCatalogSkill(undefined)).toBeUndefined();\\n expect(findInvokedCatalogSkill(\\\" \\\")).toBeUndefined();\\n expect(findInvokedCatalogSkill(\\\"just a message\\\")).toBeUndefined();\\n expect(findInvokedCatalogSkill(\\\"/not-a-real-skill\\\")).toBeUndefined();\\n });\\n});\\n\",\"truncated\":false,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__/utils/skill-enablement.test.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "e693c976-ec0d-481f-af73-f47ce5825239",
"extended_content": [],
"kind": "ObservationEvent"
}Tool result: get_file_at_revision
[Tool 'get_file_at_revision' executed.]
{"path":"src/api/agent-server-adapter.test.ts","sha":"42f8ac9dde7b83de543c9f751100729a6e83f136","content":"import { describe, expect, it } from \"vitest\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \"#/constants/child-conversation\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport type { Settings } from \"#/types/settings\";\nimport {\n AGENT_CANVAS_SOURCE,\n CLIENT_SOURCE_TAG_KEY,\n buildStartConversationRequest,\n} from \"./agent-server-adapter\";\n\nconst encryptedValue = \"gAAAAAencrypted-mcp-header\";\n\nfunction makeSettings(agentSettings: Settings[\"agent_settings\"]): Settings {\n return {\n ...DEFAULT_SETTINGS,\n agent_settings: agentSettings,\n conversation_settings: {\n confirmation_mode: false,\n security_analyzer: null,\n max_iterations: 20,\n },\n };\n}\n\nfunction getAgentContextSkillNames(\n payload: ReturnType<typeof buildStartConversationRequest>,\n): Array<string | undefined> {\n const agentSettings = payload.agent_settings as\n | {\n agent_context?: {\n skills?: Array<{ name?: string }>;\n };\n }\n | undefined;\n return agentSettings?.agent_context?.skills?.map((skill) => skill.name) ?? [];\n}\n\ndescribe(\"buildStartConversationRequest\", () => {\n it(\"marks OpenHands start requests as encrypted when MCP headers are encrypted\", () => {\n const agentSettings = {\n agent_kind: \"openhands\",\n llm: {\n model: \"litellm_proxy/openai/gpt-5.5\",\n api_key: \"gAAAAAencrypted-llm-api-key\",\n },\n mcp_config: {\n linear: {\n url: \"https://mcp.linear.app/mcp\",\n transport: \"http\",\n headers: {\n Authorization: encryptedValue,\n },\n },\n },\n };\n const settings = makeSettings(agentSettings);\n\n const payload = buildStartConversationRequest({\n settings,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: settings.conversation_settings!,\n secretsEncrypted: true,\n });\n\n expect(payload.agent_settings!.agent_kind).toBe(\"openhands\");\n expect(payload.agent_settings!.mcp_config).toEqual(\n agentSettings.mcp_config,\n );\n expect(payload.secrets_encrypted).toBe(true);\n });\n\n it(\"marks ACP start requests as encrypted when MCP headers are encrypted\", () => {\n const agentSettings = {\n agent_kind: \"acp\",\n acp_server: \"codex\",\n acp_command: [\"codex-acp\"],\n acp_model: \"gpt-5.5/medium\",\n mcp_config: {\n linear: {\n url: \"https://mcp.linear.app/mcp\",\n transport: \"http\",\n headers: {\n Authorization: encryptedValue,\n },\n },\n },\n };\n const settings = makeSettings(agentSettings);\n\n const payload = buildStartConversationRequest({\n settings,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: settings.conversation_settings!,\n secretsEncrypted: true,\n });\n\n expect(payload.agent_settings!.agent_kind).toBe(\"acp\");\n expect(payload.agent_settings!.mcp_config).toEqual(\n agentSettings.mcp_config,\n );\n expect(payload.secrets_encrypted).toBe(true);\n });\n\n it(\"keeps ACP start requests unencrypted when no encrypted MCP values are present\", () => {\n const agentSettings = {\n agent_kind: \"acp\",\n acp_server: \"codex\",\n acp_command: [\"codex-acp\"],\n acp_model: \"gpt-5.5/medium\",\n mcp_config: {\n publicDocs: {\n url: \"https://docs.example.com/mcp\",\n transport: \"http\",\n },\n },\n };\n const settings = makeSettings(agentSettings);\n\n const payload = buildStartConversationRequest({\n settings,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: settings.conversation_settings!,\n secretsEncrypted: true,\n });\n\n expect(payload.agent_settings!.agent_kind).toBe(\"acp\");\n expect(payload.secrets_encrypted).toBeUndefined();\n });\n\n it(\"ships only allow-listed catalog skills to a OpenHands conversation context\", () => {\n const settings = makeSettings({\n agent_kind: \"openhands\",\n llm: {\n model: \"litellm_proxy/openai/gpt-5.5\",\n api_key: \"sk-test\",\n },\n agent_context: {\n skills: [\n { name: \"disabled-custom\", content: \"disabled\" },\n { name: \"enabled-custom\", content: \"enabled\" },\n ],\n },\n });\n settings.disabled_skills = [\"agent-memory\", \"disabled-custom\"];\n\n const payload = buildStartConversationRequest({ settings });\n const skillNames = getAgentContextSkillNames(payload);\n\n // `agent-memory` is default-enabled, so this asserts the deny-list still\n // wins over the allow-list — the case that matters before the one-shot\n // migration has run.\n expect(skillNames).not.toContain(\"agent-memory\");\n expect(skillNames).not.toContain(\"disabled-custom\");\n // Skills already on the agent context are user-authored and stay opt-out.\n expect(skillNames).toContain(\"enabled-custom\");\n // No `enabled_skills` on the settings means the curated default applies:\n // `add-skill` is flagged `defaultEnabled` in the catalog, `add-javadoc` is\n // not, and shipping every catalog skill is what OpenHands#16302 reported.\n expect(skillNames).toContain(\"add-skill\");\n expect(skillNames).not.toContain(\"add-javadoc\");\n\n expect(payload.agent_settings?.agent_context?.disabled_skills).toEqual([\n \"agent-memory\",\n \"disabled-custom\",\n ]);\n });\n\n it(\"ships only allow-listed catalog skills to a ACP conversation context\", () => {\n const settings = makeSettings({\n agent_kind: \"acp\",\n acp_server: \"codex\",\n acp_command: [\"codex-acp\"],\n acp_model: \"gpt-5.5/medium\",\n agent_context: {\n skills: [\n { name: \"disabled-custom\", content: \"disabled\" },\n { name: \"enabled-custom\", content: \"enabled\" },\n ],\n },\n });\n settings.disabled_skills = [\"agent-memory\", \"disabled-custom\"];\n\n const payload = buildStartConversationRequest({ settings });\n const skillNames = getAgentContextSkillNames(payload);\n\n // `agent-memory` is default-enabled, so this asserts the deny-list still\n // wins over the allow-list — the case that matters before the one-shot\n // migration has run.\n expect(skillNames).not.toContain(\"agent-memory\");\n expect(skillNames).not.toContain(\"disabled-custom\");\n // Skills already on the agent context are user-authored and stay opt-out.\n expect(skillNames).toContain(\"enabled-custom\");\n // No `enabled_skills` on the settings means the curated default applies:\n // `add-skill` is flagged `defaultEnabled` in the catalog, `add-javadoc` is\n // not, and shipping every catalog skill is what OpenHands#16302 reported.\n expect(skillNames).toContain(\"add-skill\");\n expect(skillNames).not.toContain(\"add-javadoc\");\n\n expect(payload.agent_settings?.agent_context?.disabled_skills).toEqual([\n \"agent-memory\",\n \"disabled-custom\",\n ]);\n });\n\n it(\"loads a catalog skill the opening slash command invokes\", () => {\n // An automation card fills the chat input with the skill's own command\n // (`findAutomationCommand`), and 18 of the catalog's 24 slash commands\n // belong to skills that are off by default — without this the card would\n // silently do nothing.\n const settings = makeSettings({\n agent_kind: \"openhands\",\n llm: { model: \"litellm_proxy/openai/gpt-5.5\", api_key: \"sk-test\" },\n });\n\n const payload = buildStartConversationRequest({\n settings,\n query: \"/standup-digest:setup\",\n });\n\n expect(getAgentContextSkillNames(payload)).toContain(\n \"slack-standup-digest\",\n );\n });\n\n it(\"does not admit a skill named mid-sentence rather than invoked\", () => {\n const settings = makeSettings({\n agent_kind: \"openhands\",\n llm: { model: \"litellm_proxy/openai/gpt-5.5\", api_key: \"sk-test\" },\n });\n\n const payload = buildStartConversationRequest({\n settings,\n query: \"tell me what /standup-digest:setup would do\",\n });\n\n expect(getAgentContextSkillNames(payload)).not.toContain(\n \"slack-standup-digest\",\n );\n });\n\n it(\"lets an invoked skill override a stored deny entry for that conversation\", () => {\n const settings = makeSettings({\n agent_kind: \"openhands\",\n llm: { model: \"litellm_proxy/openai/gpt-5.5\", api_key: \"sk-test\" },\n });\n settings.disabled_skills = [\"slack-standup-digest\"];\n\n const payload = buildStartConversationRequest({\n settings,\n query: \"/standup-digest:setup\",\n });\n\n expect(getAgentContextSkillNames(payload)).toContain(\n \"slack-standup-digest\",\n );\n });\n});\n\ndescribe(\"buildStartConversationRequest — agentProfileId path\", () => {\n it(\"sends agent_profile_id and omits agent_settings (mutually exclusive)\", () => {\n const settings = makeSettings({\n agent_kind: \"openhands\",\n llm: { model: \"litellm_proxy/openai/gpt-5.5\", api_key: \"sk-test\" },\n });\n\n const payload = buildStartConversationRequest({\n settings,\n agentProfileId: \"profile-xyz\",\n agentProfileKind: \"openhands\",\n });\n\n expect(payload.agent_profile_id).toBe(\"profile-xyz\");\n expect(payload.agent_settings).toBeUndefined();\n expect(payload.client_tools.map((tool) => tool.name)).toEqual([\n CANVAS_UI_CLIENT_TOOL_NAME,\n LAUNCH_CHILD_CONVERSATION_TOOL_NAME,\n ]);\n });\n\n it(\"suppresses the ACP server tag when launching from a profile\", () => {\n const agentSettings = {\n agent_kind: \"acp\",\n acp_server: \"codex\",\n acp_command: [\"codex-acp\"],\n acp_model: \"gpt-5.5/medium\",\n };\n\n // Without a profile the ACP server tag is stamped from settings...\n expect(\n buildStartConversationRequest({ settings: makeSettings(agentSettings) })\n .tags,\n ).toBeDefined();\n\n // ...but a profile launch resolves the server server-side, so the tag\n // (which may not match the launched profile) is omitted while the client\n // source telemetry tag is still stamped.\n const payload = buildStartConversationRequest({\n settings: makeSettings(agentSettings),\n agentProfileId: \"profile-xyz\",\n });\n expect(payload.tags).toEqual({\n [CLIENT_SOURCE_TAG_KEY]: AGENT_CANVAS_SOURCE,\n });\n });\n\n it(\"suppresses secrets_encrypted when launching from a profile\", () => {\n const agentSettings = {\n agent_kind: \"openhands\",\n llm: {\n model: \"litellm_proxy/openai/gpt-5.5\",\n api_key: \"gAAAAAencrypted-llm-api-key\",\n },\n mcp_config: {\n mcpServers: {\n linear: {\n url: \"https://mcp.linear.app/mcp\",\n transport: \"http\",\n headers: { Authorization: encryptedValue },\n },\n },\n },\n };\n const settings = makeSettings(agentSettings);\n\n // Same inputs without a profile would set secrets_encrypted (covered\n // above); the profile path defers secret resolution to the server.\n const payload = buildStartConversationRequest({\n settings,\n encryptedAgentSettings: agentSettings,\n encryptedConversationSettings: settings.conversation_settings!,\n secretsEncrypted: true,\n agentProfileId: \"profile-xyz\",\n });\n\n expect(payload.secrets_encrypted).toBeUndefined();\n });\n});\n","truncated":false,"html_url":"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.test.ts"}Full event evidence
{
"id": "c9271318-6448-4721-8c00-358e68d8337b",
"timestamp": "2026-10-17T16:32:50.045963",
"source": "environment",
"parent_id": "462f7656-cc83-4dc2-8c5c-d4183d3df831",
"tool_name": "get_file_at_revision",
"tool_call_id": "call_3deb06f140534cdf9705056c",
"observation": {
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "[Tool 'get_file_at_revision' executed.]"
},
{
"cache_prompt": false,
"type": "text",
"text": "{\"path\":\"src/api/agent-server-adapter.test.ts\",\"sha\":\"42f8ac9dde7b83de543c9f751100729a6e83f136\",\"content\":\"import { describe, expect, it } from \\\"vitest\\\";\\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \\\"#/constants/canvas-ui\\\";\\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \\\"#/constants/child-conversation\\\";\\nimport { DEFAULT_SETTINGS } from \\\"#/services/settings\\\";\\nimport type { Settings } from \\\"#/types/settings\\\";\\nimport {\\n AGENT_CANVAS_SOURCE,\\n CLIENT_SOURCE_TAG_KEY,\\n buildStartConversationRequest,\\n} from \\\"./agent-server-adapter\\\";\\n\\nconst encryptedValue = \\\"gAAAAAencrypted-mcp-header\\\";\\n\\nfunction makeSettings(agentSettings: Settings[\\\"agent_settings\\\"]): Settings {\\n return {\\n ...DEFAULT_SETTINGS,\\n agent_settings: agentSettings,\\n conversation_settings: {\\n confirmation_mode: false,\\n security_analyzer: null,\\n max_iterations: 20,\\n },\\n };\\n}\\n\\nfunction getAgentContextSkillNames(\\n payload: ReturnType<typeof buildStartConversationRequest>,\\n): Array<string | undefined> {\\n const agentSettings = payload.agent_settings as\\n | {\\n agent_context?: {\\n skills?: Array<{ name?: string }>;\\n };\\n }\\n | undefined;\\n return agentSettings?.agent_context?.skills?.map((skill) => skill.name) ?? [];\\n}\\n\\ndescribe(\\\"buildStartConversationRequest\\\", () => {\\n it(\\\"marks OpenHands start requests as encrypted when MCP headers are encrypted\\\", () => {\\n const agentSettings = {\\n agent_kind: \\\"openhands\\\",\\n llm: {\\n model: \\\"litellm_proxy/openai/gpt-5.5\\\",\\n api_key: \\\"gAAAAAencrypted-llm-api-key\\\",\\n },\\n mcp_config: {\\n linear: {\\n url: \\\"https://mcp.linear.app/mcp\\\",\\n transport: \\\"http\\\",\\n headers: {\\n Authorization: encryptedValue,\\n },\\n },\\n },\\n };\\n const settings = makeSettings(agentSettings);\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n encryptedAgentSettings: agentSettings,\\n encryptedConversationSettings: settings.conversation_settings!,\\n secretsEncrypted: true,\\n });\\n\\n expect(payload.agent_settings!.agent_kind).toBe(\\\"openhands\\\");\\n expect(payload.agent_settings!.mcp_config).toEqual(\\n agentSettings.mcp_config,\\n );\\n expect(payload.secrets_encrypted).toBe(true);\\n });\\n\\n it(\\\"marks ACP start requests as encrypted when MCP headers are encrypted\\\", () => {\\n const agentSettings = {\\n agent_kind: \\\"acp\\\",\\n acp_server: \\\"codex\\\",\\n acp_command: [\\\"codex-acp\\\"],\\n acp_model: \\\"gpt-5.5/medium\\\",\\n mcp_config: {\\n linear: {\\n url: \\\"https://mcp.linear.app/mcp\\\",\\n transport: \\\"http\\\",\\n headers: {\\n Authorization: encryptedValue,\\n },\\n },\\n },\\n };\\n const settings = makeSettings(agentSettings);\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n encryptedAgentSettings: agentSettings,\\n encryptedConversationSettings: settings.conversation_settings!,\\n secretsEncrypted: true,\\n });\\n\\n expect(payload.agent_settings!.agent_kind).toBe(\\\"acp\\\");\\n expect(payload.agent_settings!.mcp_config).toEqual(\\n agentSettings.mcp_config,\\n );\\n expect(payload.secrets_encrypted).toBe(true);\\n });\\n\\n it(\\\"keeps ACP start requests unencrypted when no encrypted MCP values are present\\\", () => {\\n const agentSettings = {\\n agent_kind: \\\"acp\\\",\\n acp_server: \\\"codex\\\",\\n acp_command: [\\\"codex-acp\\\"],\\n acp_model: \\\"gpt-5.5/medium\\\",\\n mcp_config: {\\n publicDocs: {\\n url: \\\"https://docs.example.com/mcp\\\",\\n transport: \\\"http\\\",\\n },\\n },\\n };\\n const settings = makeSettings(agentSettings);\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n encryptedAgentSettings: agentSettings,\\n encryptedConversationSettings: settings.conversation_settings!,\\n secretsEncrypted: true,\\n });\\n\\n expect(payload.agent_settings!.agent_kind).toBe(\\\"acp\\\");\\n expect(payload.secrets_encrypted).toBeUndefined();\\n });\\n\\n it(\\\"ships only allow-listed catalog skills to a OpenHands conversation context\\\", () => {\\n const settings = makeSettings({\\n agent_kind: \\\"openhands\\\",\\n llm: {\\n model: \\\"litellm_proxy/openai/gpt-5.5\\\",\\n api_key: \\\"sk-test\\\",\\n },\\n agent_context: {\\n skills: [\\n { name: \\\"disabled-custom\\\", content: \\\"disabled\\\" },\\n { name: \\\"enabled-custom\\\", content: \\\"enabled\\\" },\\n ],\\n },\\n });\\n settings.disabled_skills = [\\\"agent-memory\\\", \\\"disabled-custom\\\"];\\n\\n const payload = buildStartConversationRequest({ settings });\\n const skillNames = getAgentContextSkillNames(payload);\\n\\n // `agent-memory` is default-enabled, so this asserts the deny-list still\\n // wins over the allow-list — the case that matters before the one-shot\\n // migration has run.\\n expect(skillNames).not.toContain(\\\"agent-memory\\\");\\n expect(skillNames).not.toContain(\\\"disabled-custom\\\");\\n // Skills already on the agent context are user-authored and stay opt-out.\\n expect(skillNames).toContain(\\\"enabled-custom\\\");\\n // No `enabled_skills` on the settings means the curated default applies:\\n // `add-skill` is flagged `defaultEnabled` in the catalog, `add-javadoc` is\\n // not, and shipping every catalog skill is what OpenHands#16302 reported.\\n expect(skillNames).toContain(\\\"add-skill\\\");\\n expect(skillNames).not.toContain(\\\"add-javadoc\\\");\\n\\n expect(payload.agent_settings?.agent_context?.disabled_skills).toEqual([\\n \\\"agent-memory\\\",\\n \\\"disabled-custom\\\",\\n ]);\\n });\\n\\n it(\\\"ships only allow-listed catalog skills to a ACP conversation context\\\", () => {\\n const settings = makeSettings({\\n agent_kind: \\\"acp\\\",\\n acp_server: \\\"codex\\\",\\n acp_command: [\\\"codex-acp\\\"],\\n acp_model: \\\"gpt-5.5/medium\\\",\\n agent_context: {\\n skills: [\\n { name: \\\"disabled-custom\\\", content: \\\"disabled\\\" },\\n { name: \\\"enabled-custom\\\", content: \\\"enabled\\\" },\\n ],\\n },\\n });\\n settings.disabled_skills = [\\\"agent-memory\\\", \\\"disabled-custom\\\"];\\n\\n const payload = buildStartConversationRequest({ settings });\\n const skillNames = getAgentContextSkillNames(payload);\\n\\n // `agent-memory` is default-enabled, so this asserts the deny-list still\\n // wins over the allow-list — the case that matters before the one-shot\\n // migration has run.\\n expect(skillNames).not.toContain(\\\"agent-memory\\\");\\n expect(skillNames).not.toContain(\\\"disabled-custom\\\");\\n // Skills already on the agent context are user-authored and stay opt-out.\\n expect(skillNames).toContain(\\\"enabled-custom\\\");\\n // No `enabled_skills` on the settings means the curated default applies:\\n // `add-skill` is flagged `defaultEnabled` in the catalog, `add-javadoc` is\\n // not, and shipping every catalog skill is what OpenHands#16302 reported.\\n expect(skillNames).toContain(\\\"add-skill\\\");\\n expect(skillNames).not.toContain(\\\"add-javadoc\\\");\\n\\n expect(payload.agent_settings?.agent_context?.disabled_skills).toEqual([\\n \\\"agent-memory\\\",\\n \\\"disabled-custom\\\",\\n ]);\\n });\\n\\n it(\\\"loads a catalog skill the opening slash command invokes\\\", () => {\\n // An automation card fills the chat input with the skill's own command\\n // (`findAutomationCommand`), and 18 of the catalog's 24 slash commands\\n // belong to skills that are off by default — without this the card would\\n // silently do nothing.\\n const settings = makeSettings({\\n agent_kind: \\\"openhands\\\",\\n llm: { model: \\\"litellm_proxy/openai/gpt-5.5\\\", api_key: \\\"sk-test\\\" },\\n });\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n query: \\\"/standup-digest:setup\\\",\\n });\\n\\n expect(getAgentContextSkillNames(payload)).toContain(\\n \\\"slack-standup-digest\\\",\\n );\\n });\\n\\n it(\\\"does not admit a skill named mid-sentence rather than invoked\\\", () => {\\n const settings = makeSettings({\\n agent_kind: \\\"openhands\\\",\\n llm: { model: \\\"litellm_proxy/openai/gpt-5.5\\\", api_key: \\\"sk-test\\\" },\\n });\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n query: \\\"tell me what /standup-digest:setup would do\\\",\\n });\\n\\n expect(getAgentContextSkillNames(payload)).not.toContain(\\n \\\"slack-standup-digest\\\",\\n );\\n });\\n\\n it(\\\"lets an invoked skill override a stored deny entry for that conversation\\\", () => {\\n const settings = makeSettings({\\n agent_kind: \\\"openhands\\\",\\n llm: { model: \\\"litellm_proxy/openai/gpt-5.5\\\", api_key: \\\"sk-test\\\" },\\n });\\n settings.disabled_skills = [\\\"slack-standup-digest\\\"];\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n query: \\\"/standup-digest:setup\\\",\\n });\\n\\n expect(getAgentContextSkillNames(payload)).toContain(\\n \\\"slack-standup-digest\\\",\\n );\\n });\\n});\\n\\ndescribe(\\\"buildStartConversationRequest — agentProfileId path\\\", () => {\\n it(\\\"sends agent_profile_id and omits agent_settings (mutually exclusive)\\\", () => {\\n const settings = makeSettings({\\n agent_kind: \\\"openhands\\\",\\n llm: { model: \\\"litellm_proxy/openai/gpt-5.5\\\", api_key: \\\"sk-test\\\" },\\n });\\n\\n const payload = buildStartConversationRequest({\\n settings,\\n agentProfileId: \\\"profile-xyz\\\",\\n agentProfileKind: \\\"openhands\\\",\\n });\\n\\n expect(payload.agent_profile_id).toBe(\\\"profile-xyz\\\");\\n expect(payload.agent_settings).toBeUndefined();\\n expect(payload.client_tools.map((tool) => tool.name)).toEqual([\\n CANVAS_UI_CLIENT_TOOL_NAME,\\n LAUNCH_CHILD_CONVERSATION_TOOL_NAME,\\n ]);\\n });\\n\\n it(\\\"suppresses the ACP server tag when launching from a profile\\\", () => {\\n const agentSettings = {\\n agent_kind: \\\"acp\\\",\\n acp_server: \\\"codex\\\",\\n acp_command: [\\\"codex-acp\\\"],\\n acp_model: \\\"gpt-5.5/medium\\\",\\n };\\n\\n // Without a profile the ACP server tag is stamped from settings...\\n expect(\\n buildStartConversationRequest({ settings: makeSettings(agentSettings) })\\n .tags,\\n ).toBeDefined();\\n\\n // ...but a profile launch resolves the server server-side, so the tag\\n // (which may not match the launched profile) is omitted while the client\\n // source telemetry tag is still stamped.\\n const payload = buildStartConversationRequest({\\n settings: makeSettings(agentSettings),\\n agentProfileId: \\\"profile-xyz\\\",\\n });\\n expect(payload.tags).toEqual({\\n [CLIENT_SOURCE_TAG_KEY]: AGENT_CANVAS_SOURCE,\\n });\\n });\\n\\n it(\\\"suppresses secrets_encrypted when launching from a profile\\\", () => {\\n const agentSettings = {\\n agent_kind: \\\"openhands\\\",\\n llm: {\\n model: \\\"litellm_proxy/openai/gpt-5.5\\\",\\n api_key: \\\"gAAAAAencrypted-llm-api-key\\\",\\n },\\n mcp_config: {\\n mcpServers: {\\n linear: {\\n url: \\\"https://mcp.linear.app/mcp\\\",\\n transport: \\\"http\\\",\\n headers: { Authorization: encryptedValue },\\n },\\n },\\n },\\n };\\n const settings = makeSettings(agentSettings);\\n\\n // Same inputs without a profile would set secrets_encrypted (covered\\n // above); the profile path defers secret resolution to the server.\\n const payload = buildStartConversationRequest({\\n settings,\\n encryptedAgentSettings: agentSettings,\\n encryptedConversationSettings: settings.conversation_settings!,\\n secretsEncrypted: true,\\n agentProfileId: \\\"profile-xyz\\\",\\n });\\n\\n expect(payload.secrets_encrypted).toBeUndefined();\\n });\\n});\\n\",\"truncated\":false,\"html_url\":\"https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.test.ts\"}"
}
],
"is_error": false,
"tool_name": "get_file_at_revision",
"kind": "MCPToolObservation"
},
"action_id": "31f0e586-ba3a-4fff-ab2a-710feb04aa1d",
"extended_content": [],
"kind": "ObservationEvent"
}ConversationStateUpdateEvent
{
"id": "8898500a-6ce9-4dee-9603-20da5ca1b531",
"timestamp": "2026-10-17T16:32:48.512768",
"source": "environment",
"parent_id": "c9271318-6448-4721-8c00-358e68d8337b",
"key": "stats",
"value": {
"usage_to_metrics": {
"default": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.00855304,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 87796,
"completion_tokens": 2511,
"cache_read_tokens": 59392,
"cache_write_tokens": 0,
"reasoning_tokens": 810,
"context_window": 1000000,
"per_turn_token": 31089,
"response_id": ""
}
},
"condenser": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
}
}
},
"kind": "ConversationStateUpdateEvent"
}ConversationStateUpdateEvent
{
"id": "06936fe4-8071-478f-afae-b9850a978f2d",
"timestamp": "2026-10-17T16:33:16.689921",
"source": "environment",
"parent_id": "c9271318-6448-4721-8c00-358e68d8337b",
"key": "stats",
"value": {
"usage_to_metrics": {
"default": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.012532129999999999,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 124349,
"completion_tokens": 6279,
"cache_read_tokens": 89856,
"cache_write_tokens": 0,
"reasoning_tokens": 3594,
"context_window": 1000000,
"per_turn_token": 40321,
"response_id": ""
}
},
"condenser": {
"model_name": "openhands/deepseek-v4-flash",
"accumulated_cost": 0.0,
"max_budget_per_task": null,
"accumulated_token_usage": {
"model": "openhands/deepseek-v4-flash",
"prompt_tokens": 0,
"completion_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0,
"context_window": 0,
"per_turn_token": 0,
"response_id": ""
}
}
}
},
"kind": "ConversationStateUpdateEvent"
}Agent
All public evidence gathered. Here is the verified report.
---
**OpenHands/OpenHands #16860 — "feat(skills): replace the all-on skill catalog with an explicit allow-list"** (merged 2026-08-24) — https://github.com/OpenHands/OpenHands/pull/16860
1. **The allow-list change:** reverts the all-59-catalog-skills-on default behind an explicit `enabled_skills` allow-list over the bundled catalog, defaulting to the 11 entries `@openhands/extensions@0.18.0` flags `defaultEnabled` (shipped via OpenHands/extensions#485). `add-javadoc` and `bitbucket*` — #16302's offenders — start off. `undefined` remains the "never migrated" sentinel.
2. **Two implementations:** `src/utils/skill-enablement.ts` is the single decision point — `buildSkillEnablementFilter` (deny-list still vetoes pre-migration), one-shot `migrateSkillEnablement`, and `findInvokedCatalogSkill` so an opening `/command` loads its skill. [`src/api/agent-server-adapter.ts`](https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.ts) filters bundled skills through that rule in `buildAgentContext` and sets `load_public_skills: false`.
3. **Test runner:** Vitest (`npx vitest run`) — 5064 passed per the upstream PR report, one pre-existing unrelated `dev-with-automation` SIGHUP failure that fails identically on untouched `main`. All Vitest, `npm run lint`, and `npm run check-translation-completeness` results (clean; 4 new keys translated for 15 locales) are attributed to the PR report — **I did not run any tests**.
4. **New test files:** [`__tests__/utils/skill-enablement.test.ts`](https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__/utils/skill-enablement.test.ts) (resolver, deny-veto, every migration branch, leading-token invocation) and `__tests__/hooks/use-migrate-enabled-skills.test.tsx` (one-shot, cloud skip, no write over a failed load). The adapter tests now assert `add-javadoc` is *absent* — the flip is the fix.
5. **Remaining uncertainty:** cloud is untouched (own server-side catalog); the agent-profile `disabled_skills` deny-list is a second list the adapter never consults; per-workspace scoping is deferred to phase 3 (needs an SDK `WorkspacesClient` schema change).
Word count: 223. No files were modified.
Full event evidence
{
"id": "fc651925-f2c7-4b7a-b782-534b56dddbb7",
"timestamp": "2026-10-17T16:33:16.693631",
"source": "agent",
"parent_id": "c9271318-6448-4721-8c00-358e68d8337b",
"llm_message": {
"role": "assistant",
"content": [
{
"cache_prompt": false,
"type": "text",
"text": "All public evidence gathered. Here is the verified report.\n\n---\n\n**OpenHands/OpenHands #16860 — \"feat(skills): replace the all-on skill catalog with an explicit allow-list\"** (merged 2026-08-24) — https://github.com/OpenHands/OpenHands/pull/16860\n\n1. **The allow-list change:** reverts the all-59-catalog-skills-on default behind an explicit `enabled_skills` allow-list over the bundled catalog, defaulting to the 11 entries `@openhands/extensions@0.18.0` flags `defaultEnabled` (shipped via OpenHands/extensions#485). `add-javadoc` and `bitbucket*` — #16302's offenders — start off. `undefined` remains the \"never migrated\" sentinel.\n2. **Two implementations:** `src/utils/skill-enablement.ts` is the single decision point — `buildSkillEnablementFilter` (deny-list still vetoes pre-migration), one-shot `migrateSkillEnablement`, and `findInvokedCatalogSkill` so an opening `/command` loads its skill. [`src/api/agent-server-adapter.ts`](https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/src/api/agent-server-adapter.ts) filters bundled skills through that rule in `buildAgentContext` and sets `load_public_skills: false`.\n3. **Test runner:** Vitest (`npx vitest run`) — 5064 passed per the upstream PR report, one pre-existing unrelated `dev-with-automation` SIGHUP failure that fails identically on untouched `main`. All Vitest, `npm run lint`, and `npm run check-translation-completeness` results (clean; 4 new keys translated for 15 locales) are attributed to the PR report — **I did not run any tests**.\n4. **New test files:** [`__tests__/utils/skill-enablement.test.ts`](https://github.com/OpenHands/OpenHands/blob/fae6ad8a0ccaaa5ec8f87aac36abe321e72fbb2c/__tests__/utils/skill-enablement.test.ts) (resolver, deny-veto, every migration branch, leading-token invocation) and `__tests__/hooks/use-migrate-enabled-skills.test.tsx` (one-shot, cloud skip, no write over a failed load). The adapter tests now assert `add-javadoc` is *absent* — the flip is the fix.\n5. **Remaining uncertainty:** cloud is untouched (own server-side catalog); the agent-profile `disabled_skills` deny-list is a second list the adapter never consults; per-workspace scoping is deferred to phase 3 (needs an SDK `WorkspacesClient` schema change).\n\nWord count: 223. No files were modified."
}
],
"reasoning_content": null,
"thinking_blocks": []
},
"llm_response_id": "gen-1792272770-LI6F4UWiphpFsvENvOU9",
"activated_skills": [],
"extended_content": [],
"kind": "MessageEvent"
}ConversationStateUpdateEvent
{
"id": "2f0536e5-e5b8-4bb1-b2a2-b5cf8bb1a349",
"timestamp": "2026-10-17T16:33:16.694683",
"source": "environment",
"parent_id": "fc651925-f2c7-4b7a-b782-534b56dddbb7",
"key": "execution_status",
"value": "finished",
"kind": "ConversationStateUpdateEvent"
}