Retarget update-models skill to packages/ai; add Fable 5 coverage - #19
Merged
Conversation
The update-models skill still pointed at the older cua-cli + cua-* adapter stack for the model list and adapter constants. Repoint it at packages/ai (@onkernel/cua-ai), which is the source of truth for computer-use model support: CUA_MODEL_ANNOTATIONS / CUA_MODEL_OVERRIDES, listCuaModels()/getCuaModel(), the provider modules under src/providers/, and the supported-models snapshot. Also wire in newly released Anthropic models confirmed via the discovery smoke tests: - claude-fable-5: add a CUA support annotation (already in pi-ai's registry, so no override needed). - claude-opus-4-8: already covered by the claude-opus-4 family match; add it (and fable-5) to the discovery script's newer-tool/beta runtime-pair list so they are not falsely flagged as runtime mismatches.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Anthropic drift checker false alarms
- Updated Anthropic drift extraction to normalize native doc/example action names to canonical local actions and to avoid tool-version/header drift alarms when the local adapter file intentionally does not declare dated tool versions.
Or push these changes by commenting:
@cursor push d6e892c522
Preview (d6e892c522)
diff --git a/.agents/skills/update-models/reference/provider-doc-drift.ts b/.agents/skills/update-models/reference/provider-doc-drift.ts
--- a/.agents/skills/update-models/reference/provider-doc-drift.ts
+++ b/.agents/skills/update-models/reference/provider-doc-drift.ts
@@ -52,6 +52,24 @@
yutori: /\b(left_click|double_click|triple_click|right_click|scroll|type|key_press|hover|drag|wait|refresh|go_back|go_forward|goto_url|mouse_move|middle_click|mouse_down|mouse_up|hold_key|extract_elements|find|set_element_value|execute_js)\b/g,
};
+const LOCAL_ACTION_REGEXES: Record<Provider, RegExp> = {
+ ...ACTION_REGEXES,
+ anthropic: /\b(click|double_click|mouse_down|mouse_up|type|keypress|scroll|move|drag|wait|screenshot|goto|cursor_position)\b/g,
+};
+
+const ANTHROPIC_ACTION_ALIASES: Record<string, string> = {
+ key: "keypress",
+ hold_key: "keypress",
+ left_click: "click",
+ right_click: "click",
+ middle_click: "click",
+ triple_click: "click",
+ left_click_drag: "drag",
+ mouse_move: "move",
+ left_mouse_down: "mouse_down",
+ left_mouse_up: "mouse_up",
+};
+
function parseArgs(argv: string[]): Args {
const out: Args = { examples: "", out: "" };
for (let i = 0; i < argv.length; i++) {
@@ -99,15 +117,17 @@
const localText = await readFile(LOCAL_FILES[provider], "utf8").catch((err) => `/* failed to read local file: ${err.message} */`);
const example = examples?.by_provider?.[provider] ?? {};
- const documentedActions = unique(extractAll(docText, ACTION_REGEXES[provider]));
- const localActions = unique(extractAll(localText, ACTION_REGEXES[provider]));
- const exampleActions: string[] = example.action_names ?? [];
+ const documentedActions = unique(normalizeActions(provider, extractAll(docText, ACTION_REGEXES[provider])));
+ const localActions = unique(normalizeActions(provider, extractAll(localText, LOCAL_ACTION_REGEXES[provider])));
+ const exampleActions = unique(normalizeActions(provider, example.action_names ?? []));
const documentedToolVersions = unique(extractAll(docText, /computer_\d{8}/g));
const localToolVersions = unique(extractAll(localText, /computer_\d{8}/g));
const exampleToolVersions: string[] = example.tool_versions ?? [];
const documentedBetaHeaders = unique(extractAll(docText, /computer-use-\d{4}-\d{2}-\d{2}/g));
const localBetaHeaders = unique(extractAll(localText, /computer-use-\d{4}-\d{2}-\d{2}/g));
const exampleBetaHeaders: string[] = example.beta_headers ?? [];
+ const localTracksToolVersions = provider !== "anthropic" || localToolVersions.length > 0;
+ const localTracksBetaHeaders = provider !== "anthropic" || localBetaHeaders.length > 0;
return {
provider,
@@ -115,11 +135,15 @@
documented_tool_versions: sorted(documentedToolVersions),
example_tool_versions: sorted(exampleToolVersions),
local_tool_versions: sorted(localToolVersions),
- newer_tool_versions: sorted(difference(new Set([...documentedToolVersions, ...exampleToolVersions]), new Set(localToolVersions))),
+ newer_tool_versions: localTracksToolVersions
+ ? sorted(difference(new Set([...documentedToolVersions, ...exampleToolVersions]), new Set(localToolVersions)))
+ : [],
documented_beta_headers: sorted(documentedBetaHeaders),
example_beta_headers: sorted(exampleBetaHeaders),
local_beta_headers: sorted(localBetaHeaders),
- newer_beta_headers: sorted(difference(new Set([...documentedBetaHeaders, ...exampleBetaHeaders]), new Set(localBetaHeaders))),
+ newer_beta_headers: localTracksBetaHeaders
+ ? sorted(difference(new Set([...documentedBetaHeaders, ...exampleBetaHeaders]), new Set(localBetaHeaders)))
+ : [],
documented_actions: sorted(documentedActions),
example_repo_actions: sorted(exampleActions),
repo_supported_actions: sorted(localActions),
@@ -146,6 +170,10 @@
notes.push("OpenAI's GA computer tool is currently undated (`computer`); drift usually appears as action-shape changes or preview deprecations.");
}
if (provider === "anthropic") {
+ if (localToolVersions.length === 0) {
+ notes.push("Anthropic tool versions and computer-use beta headers are selected by pi-ai at runtime, so this local adapter file only tracks canonical action support.");
+ return notes;
+ }
const newest = sorted(new Set([...documentedToolVersions, ...exampleToolVersions])).at(-1);
if (newest && !localToolVersions.includes(newest)) {
notes.push(`Anthropic docs/examples mention ${newest}, which is not in local constants.`);
@@ -167,6 +195,11 @@
return values;
}
+function normalizeActions(provider: Provider, actions: string[]): string[] {
+ if (provider !== "anthropic") return actions;
+ return actions.map((action) => ANTHROPIC_ACTION_ALIASES[action] ?? action);
+}
+
function difference(a: Set<string>, b: Set<string>): string[] {
return [...a].filter((value) => !b.has(value));
}You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 536162e. Configure here.
|
Created a monitoring plan for this PR. What this PR does: Updates the Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
update-modelsskill atpackages/ai(@onkernel/cua-ai) instead of the oldercua-cli+cua-*adapter stack.packages/aiis the source of truth for computer-use model support, and the skill's prose, the drift checker's local-file map, and the verification commands now reference it.claude-fable-5inpackages/ai/src/models.ts(and thesupported-models.mdsnapshot). It is already in pi-ai's registry, so no override is needed.claude-opus-4-8is already covered by the existingclaude-opus-4family match — no model-list change. Both new IDs are added to the discovery script's newer tool/beta runtime-pair list so they aren't falsely flagged asruntime_compatible: false.What changed
.agents/skills/update-models/SKILL.md— model enumeration, decision rules, and the "Updating CUA Support" section now targetpackages/ai/src/models.ts(CUA_MODEL_ANNOTATIONS/CUA_MODEL_OVERRIDES,listCuaModels()/getCuaModel()),packages/ai/src/providers/<provider>/for adapter/action changes, andnpm run example:quickstart/npm test --workspace @onkernel/cua-aifor verification..agents/skills/update-models/reference/provider-doc-drift.ts—LOCAL_FILESnow point at thepackages/aiprovider files that hold each provider's action vocabulary..agents/skills/update-models/reference/discover-models.ts—claude-opus-4-8andclaude-fable-5added to the newer Anthropic tool/beta runtime pair.packages/ai/src/models.ts,packages/ai/docs/supported-models.md— Fable 5 annotation + doc snapshot.How it was verified
claude-fable-5andclaude-opus-4-8both pass the computer-use smoke test on thecomputer_20251124/computer-use-2025-11-24pair and are present in pi-ai's registry.listCuaModels("anthropic")now lists both, andgetCuaModel("anthropic:claude-fable-5")resolves.packages/ailocal files resolve and produce non-empty action lists.Test plan
npm run typecheck(exit 0)npm test --workspace @onkernel/cua-ai(87 passed)listCuaModels/getCuaModelresolve Fable 5 and Opus 4.8provider-doc-drift.tsreads the retargeted local files🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to skill/docs, model annotations, and discovery/drift tooling; no auth, payment, or core runtime routing logic beyond listing new Anthropic models.
Overview
The update-models agent skill now treats
packages/ai(@onkernel/cua-ai) as the source of truth instead ofcua-cliand the legacycua-*adapter packages. Enumeration, decision rules, adapter edit paths, drift-check local files, and verification steps (listCuaModels/getCuaModel,npm test --workspace @onkernel/cua-ai,example:quickstart) all point atCUA_MODEL_ANNOTATIONS,packages/ai/src/providers/, and related docs.Anthropic computer-use coverage is extended with a
claude-fable-5family annotation inpackages/ai/src/models.tsand thesupported-models.mdsnapshot.discover-models.tsmapsclaude-fable-5andclaude-opus-4-8to the newercomputer_20251124/computer-use-2025-11-24runtime pair so discovery does not mark themruntime_compatible: false(Opus 4.8 remains covered by the existingclaude-opus-4family match).Reviewed by Cursor Bugbot for commit 536162e. Bugbot is set up for automated code reviews on this repo. Configure here.