verify-sdk
This skill should be used to "verify SDK behavior", "check an SDK change against the feature map", "run the SDK feature map", "maintain the SDK feature map", or "run the daily SDK map pass". It holds the maintained map of what the OpenHands SDK does in-process (agent loop, LLMs, conversations, events, condensers, skills, plugins, MCP, hooks, sub-agents, critic, security, tools, workspaces, settings, observability, ACP), the control-sdk driver its recipes use, and sdk-map (check, owners, baseline, run, report).
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 1.4k
- Forks
- 767
01 前言 Front Matter
- name
- verify-sdk
- triggers
- [ "/verify-sdk", "sdk feature map" ]
- description
- This skill should be used to "verify SDK behavior", "check an SDK change against the feature map", "run the SDK feature map", "maintain the SDK feature map", or "run the daily SDK map pass". It holds the maintained map of what the OpenHands SDK does in-process (agent loop, LLMs, conversations, events, condensers, skills, plugins, MCP, hooks, sub-agents, critic, security, tools, workspaces, settings, observability, ACP), the control-sdk driver its recipes use, and sdk-map (check, owners, baseline, run, report).
02 资源文件 152
- 参考文档programs/S01/echo_parallel_finish.json337 B
- 参考文档programs/S01/finish_on_last.json111 B
- 脚本programs/S01/loop.py26.6 KB
- 参考文档programs/S01/max_iterations.json202 B
- 参考文档programs/S01/repeat_error.json176 B
- 参考文档programs/S01/repeat_ls.json285 B
- 参考文档programs/S01/run_to_finish.json145 B
- 脚本programs/S01/sleeper.py2.9 KB
- 参考文档programs/S01/step_errors.json376 B
- 脚本programs/S02/api_compliance.py1.8 KB
- 脚本programs/S02/conversation_stats.py3.9 KB
- 脚本programs/S02/fake_provider.py18.2 KB
- 脚本programs/S02/format_messages.py2.9 KB
- 脚本programs/S02/live_llm.py1.5 KB
- 脚本programs/S02/llm_calls.py18.7 KB
- 脚本programs/S02/provider_run.py7.7 KB
- 脚本programs/S03/live_switch.py1.3 KB
- 脚本programs/S03/profiles.py10.5 KB
- 脚本programs/S03/routing.py13.7 KB
- 脚本programs/S03/subscription.py4.2 KB
- 脚本programs/S03/switching.py13.4 KB
- 脚本programs/S04/control.py11.2 KB
- 脚本programs/S04/lifecycle.py19.0 KB
- 脚本programs/S04/secret_env.py4.4 KB
- 脚本programs/S04/views.py17.9 KB
- 脚本programs/S05/damaged_log.py1.5 KB
- 脚本programs/S05/event_log.py1.7 KB
- 脚本programs/S05/event_types.py2.5 KB
- 脚本programs/S05/reload_events.py3.8 KB
- 脚本programs/S05/system_prompt_blocks.py1.5 KB
- 参考文档programs/S05/write_and_read.json345 B
- 脚本programs/S06/condense.py19.4 KB
- 脚本programs/S06/context_prompt.py5.2 KB
- 脚本programs/S06/memory.py3.7 KB
- 脚本programs/S06/prompt_variants.py5.0 KB
- 脚本programs/S06/recorder.py1.6 KB
- 脚本programs/S07/agentskills.py9.2 KB
- 脚本programs/S07/installed.py3.7 KB
- 脚本programs/S07/live_invoke.py1.6 KB
- 脚本programs/S07/path_rules.py2.7 KB
- 脚本programs/S07/public.py3.9 KB
- 脚本programs/S07/recorder.py1.6 KB
- 脚本programs/S07/sources.py5.2 KB
- 脚本programs/S07/triggers.py3.8 KB
- 脚本programs/S08/attach.py9.8 KB
- 脚本programs/S08/build.py6.8 KB
- 脚本programs/S08/layouts.py7.5 KB
- 脚本programs/S08/market.py15.2 KB
- 脚本programs/S08/recorder.py1.6 KB
- 脚本programs/S08/store.py8.7 KB
- 脚本programs/S09/client.py16.3 KB
- 脚本programs/S09/conversation.py7.2 KB
- 脚本programs/S09/live_mcp.py1.6 KB
- 脚本programs/S09/mcp_server.py7.2 KB
- 脚本programs/S09/recorder.py1.9 KB
- 脚本programs/S10/blocked_prompt.py3.6 KB
- 脚本programs/S10/config_forms.py6.9 KB
- 脚本programs/S10/hooked_run.py9.2 KB
- 脚本programs/S10/hooks/add_context.sh155 B
- 脚本programs/S10/hooks/async_sleeper.sh146 B
- 脚本programs/S10/hooks/deny_secret_prompt.sh248 B
- 脚本programs/S10/hooks/fail_soft.sh114 B
- 脚本programs/S10/hooks/guard_terminal.sh493 B
- 脚本programs/S10/hooks/record.sh135 B
- 脚本programs/S10/hooks/require_done.sh204 B
- 脚本programs/S10/llm_hooks.py4.6 KB
- 参考文档programs/S10/marketplace/.plugin/marketplace.json342 B
- 参考文档programs/S10/marketplace/plugins/attached-hooks/.plugin/plugin.json116 B
- 参考文档programs/S10/marketplace/plugins/attached-hooks/hooks/hooks.json287 B
- 参考文档programs/S10/marketplace/plugins/runtime-hooks/.plugin/plugin.json115 B
- 参考文档programs/S10/marketplace/plugins/runtime-hooks/hooks/hooks.json285 B
- 脚本programs/S10/plugin_hooks.py2.7 KB
- 脚本programs/S11/builtins.py2.0 KB
- 脚本programs/S11/delegate.py5.0 KB
- 脚本programs/S11/registry.py8.5 KB
- 脚本programs/S11/s11_helpers.py1.8 KB
- 脚本programs/S11/scope.py3.5 KB
- 脚本programs/S11/task_confirmation.py4.8 KB
- 脚本programs/S11/task_lifecycle.py7.2 KB
- 脚本programs/S11/workspace_agents.py3.2 KB
- 脚本programs/S12/critic_objects.py11.9 KB
- 脚本programs/S12/refinement_run.py9.7 KB
- 脚本programs/S13/analyzers.py15.8 KB
- 脚本programs/S13/confirmation_flow.py9.0 KB
- 脚本programs/S13/live_risk.py2.3 KB
- 脚本programs/S13/secrets_run.py14.9 KB
- 脚本programs/S14/file_editor.py4.4 KB
- 脚本programs/S14/presets.py7.1 KB
- 参考文档programs/S14/search_and_patch.json1.2 KB
- 脚本programs/S14/search.py3.9 KB
- 脚本programs/S14/terminal.py7.0 KB
- 脚本programs/S14/toolkit.py4.4 KB
- 脚本programs/S15/browse.py6.4 KB
- 脚本programs/S15/browser_setup.py10.1 KB
- 脚本programs/S15/site.py3.6 KB
- 脚本programs/S16/fake_openai.py1.8 KB
- 脚本programs/S16/oracle.py3.4 KB
- 脚本programs/S16/planning.py6.9 KB
- 参考文档programs/S16/task_tracker.json937 B
- 脚本programs/S16/tom.py3.6 KB
- 脚本programs/S16/workflow.py6.7 KB
- 脚本programs/S17/client_tools.py9.8 KB
- 脚本programs/S17/custom_tools.py19.8 KB
- 脚本programs/S17/mytools.py9.3 KB
- 脚本programs/S18/cloud_local.py6.5 KB
- 脚本programs/S18/local_workspace.py6.2 KB
- 脚本programs/S18/remote_workspace.py16.9 KB
- 脚本programs/S18/servers.py8.7 KB
- 脚本programs/S19/acp_catalog.py3.5 KB
- 脚本programs/S19/agent_profiles.py10.9 KB
- 脚本programs/S19/agent_settings.py19.9 KB
- 脚本programs/S19/credential_binding.py4.8 KB
- 脚本programs/S19/persisted_baselines.py3.2 KB
- 脚本programs/S20/automation_env.py5.5 KB
- 脚本programs/S20/logging_setup.py4.1 KB
- 脚本programs/S20/otlp.py5.0 KB
- 脚本programs/S20/traced_conversation.py11.3 KB
- 脚本programs/S21/acp_conversation.py30.1 KB
- 脚本programs/S21/acp_traced.py3.6 KB
- 脚本programs/S21/fake_acp.py16.6 KB
- 脚本programs/S21/live_handshake.py3.1 KB
- 脚本programs/sdk_verify.py9.5 KB
- 参考文档references/adaptation.md3.0 KB
- 参考文档references/daily.md4.3 KB
- 参考文档references/feature-map/README.md12.1 KB
- 参考文档references/feature-map/S01-agent-loop.md31.3 KB
- 参考文档references/feature-map/S02-llm-core.md35.6 KB
- 参考文档references/feature-map/S03-llm-routing-profiles.md33.3 KB
- 参考文档references/feature-map/S04-local-conversation.md38.6 KB
- 参考文档references/feature-map/S05-events.md18.4 KB
- 参考文档references/feature-map/S06-context-condensers.md29.3 KB
- 参考文档references/feature-map/S07-skills.md30.9 KB
- 参考文档references/feature-map/S08-plugins-marketplace.md38.4 KB
- 参考文档references/feature-map/S09-mcp.md25.2 KB
- 参考文档references/feature-map/S10-hooks.md26.9 KB
- 参考文档references/feature-map/S11-subagents-delegation.md27.8 KB
- 参考文档references/feature-map/S12-critic.md18.6 KB
- 参考文档references/feature-map/S13-security-confirmation.md33.7 KB
- 参考文档references/feature-map/S14-core-tools.md35.9 KB
- 参考文档references/feature-map/S15-browser.md25.6 KB
- 参考文档references/feature-map/S16-planning-workflow-tools.md27.0 KB
- 参考文档references/feature-map/S17-custom-and-client-tools.md30.5 KB
- 参考文档references/feature-map/S18-workspace-backends.md30.7 KB
- 参考文档references/feature-map/S19-settings.md33.1 KB
- 参考文档references/feature-map/S20-observability.md25.5 KB
- 参考文档references/feature-map/S21-acp-agent.md35.9 KB
- 参考文档references/maintenance.md6.9 KB
- 参考文档references/recipes.md3.7 KB
- 脚本scripts/control_sdk.py29.0 KB
- 脚本scripts/control-sdk775 B
- 脚本scripts/sdk_map.py41.9 KB
- 脚本scripts/sdk-map323 B
03 SKILL.md 正文
Verify the OpenHands SDK in-process
The "user" here is a Python program that imports openhands.sdk and runs an
agent in its own process. This skill proves that program's view of the SDK:
each recipe builds an agent with the public API, runs it, and checks what came
out (state, files, events, payloads), with a scripted model where the model
cannot matter and a real one where it can. It never reruns the unit tests: CI
does that on every PR, and each row links them on its Unit: line. The agent
server is a separate surface with its own skill,
verify-agent-server; what the server adds
on top of the SDK belongs there.
Launch
There is no server. Prepare the checkout once, then start a run per scenario:
uv sync --dev
export PATH="$PWD/.agents/skills/verify-sdk/scripts:$PATH"
export SDK_VERIFY_RUN=$(control-sdk new --field run) # scripted
export SDK_VERIFY_RUN=$(control-sdk new --llm deepseek-flash --field run) # live
A run has its own HOME, OH_PERSISTENCE_DIR, conversation store, workspace
and tmux server, and drops the caller's LLM_* and OH_* variables, so it
never touches a developer's ~/.openhands. Live runs read DEEPSEEK_API_KEY
when a model is called; without it they exit 3 and report blocked.
Doctor
sdk-map check is the read-only health check: it validates the map's
structure and IDs, the index counts, the baseline line, and that every path
the map cites still exists. Run it first and whenever a recipe surprises you.
For the environment, uv run python -c "import openhands.sdk, openhands.tools, openhands.workspace" must succeed.
Drive
control-sdk does one thing per command and prints JSON; --check FIELD OP VALUE asserts on it and --field PATH prints one value for the shell:
CID=$(control-sdk conversation new --script S05/write_and_read.json --field id)
control-sdk conversation send "$CID" --text "write notes.txt" --run --check execution_status eq finished
control-sdk conversation events "$CID" --kind ActionEvent --check count eq 4
control-sdk program S05/reload_events --arg "$CID" --check roundtrip_equal eq true
control-sdk exec --model-env -- python examples/01_standalone_sdk/01_hello_world.py
Conversations persist in the run, so each command resumes the one before.
Programs under programs/ are short scripts like the examples
that print one JSON result. references/recipes.md
explains scripts, programs, live runs and conventions.
Each family file in the map lists its
sub-features and a Driving it section of bullets, each naming the IDs it
proves and carrying sh blocks. Run them literally from the repository root,
or let the tool replay them:
sdk-map run --file S05 # one family
sdk-map run --file S05 --only S05.event-base # the bullets that name these IDs
sdk-map run --all --out "$SDK_VERIFY_HOME/full" # the whole map
A bullet passes when every block it ran exits 0; exit 3 means blocked. A block
that needs a real model (a live run, --model-env, an example script or the
integration runner) runs only with DEEPSEEK_API_KEY set and is skipped whole
otherwise. An integration run passes only when its results.json shows every
requested test succeeded, because the runner exits 0 on failed tests. Each
block runs in its own process group, which is killed when the block ends or
times out.
Evidence
sdk-map run writes one ledger row per sub-feature to <out>/ledger.jsonl
and each bullet's transcript to <out>/transcripts/. <out> is a new
directory under $SDK_VERIFY_HOME (default $TMPDIR/sdk-verify) unless
--out names one. sdk-map report --runs <out> [...] renders the latest
result per sub-feature, fail first; --baseline <earlier run> lists what
changed since then.
Proof standards: drive the public API a program uses, not internal setters
or the unit tests; assert state, files and events, never a model's wording; a
scripted model (TestLLM) through the real agent loop is the deterministic
proof, a live run, example or integration run the real-model one, and a row
says which it got (scripted, live, example, integration). Unreachable
is blocked with the missing prerequisite, never a pass.
Cleanup
Recipes write into their run's workspace, under $SDK_VERIFY_HOME (default
$TMPDIR/sdk-verify), never the checkout. Keep the run directories while the
evidence matters; git status should show nothing a recipe created.
Workflows
- Verify a change or a PR:
sdk-map owners --changed origin/main...HEADmaps the changed paths to the families whoseSource:lines own them, and lists product paths no family claims (a map gap). Run those families withsdk-map run, withDEEPSEEK_API_KEYset for the live bullets, and report per the agent-server report contract. - Run the daily pass: follow references/daily.md:
sdk-map check, the families changed since theMaintenance baselineline (sdk-map ownerswith no arguments), and nothing else: families nothing in the range touched wait for the weekly pass, and a pass with no new commits onmainstops early. - Maintain the map (periodic or weekly): follow references/maintenance.md: a frozen BASE/TARGET, a PR-intent ledger, a source wave, a full replay with a model key, and at most one PR of proven corrections.
Triage what you find
- Map drift: the map describes something the SDK no longer does by design. Fix the entry with current source and a passing recipe.
- Harness gap: the SDK works but no recipe shows it yet. Write the program
or
control-sdkstep that does; adding unit tests to the product is a separate PR. - Product bug: the SDK is broken. Keep the transcript, search existing
issues, and file it in this repository; mark the bullet's expected result
with
Known failure (reproduced <date>, #<issue>). Never rewrite an expected result to bless broken behavior, and never fix product code inside a pass. - Blocked: name the missing prerequisite (key, Docker, Chromium, account, interactive login) and the command attempted.
See references/adaptation.md for where these ideas come from.
04 同仓库更多 Skills
only
The one component in a fixed location this format discovers.
never
Must never be discovered; the manifest is rejected first.
good
Loads while its broken sibling is skipped.
broken
暂无简介
ok
Loads despite the two non-fatal manifest violations.
still-here
Loads while the whole MCP component is disabled.