Skip to content

Retarget update-models skill to packages/ai; add Fable 5 coverage - #19

Merged
rgarcia merged 1 commit into
mainfrom
hypeship/update-models-skill-packages-ai
Jun 11, 2026
Merged

Retarget update-models skill to packages/ai; add Fable 5 coverage#19
rgarcia merged 1 commit into
mainfrom
hypeship/update-models-skill-packages-ai

Conversation

@rgarcia

@rgarcia rgarcia commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Repoint the update-models skill at packages/ai (@onkernel/cua-ai) instead of the older cua-cli + cua-* adapter stack. packages/ai is 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.
  • Add a CUA support annotation for claude-fable-5 in packages/ai/src/models.ts (and the supported-models.md snapshot). It is already in pi-ai's registry, so no override is needed.
  • claude-opus-4-8 is already covered by the existing claude-opus-4 family 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 as runtime_compatible: false.

What changed

  • .agents/skills/update-models/SKILL.md — model enumeration, decision rules, and the "Updating CUA Support" section now target packages/ai/src/models.ts (CUA_MODEL_ANNOTATIONS / CUA_MODEL_OVERRIDES, listCuaModels() / getCuaModel()), packages/ai/src/providers/<provider>/ for adapter/action changes, and npm run example:quickstart / npm test --workspace @onkernel/cua-ai for verification.
  • .agents/skills/update-models/reference/provider-doc-drift.tsLOCAL_FILES now point at the packages/ai provider files that hold each provider's action vocabulary.
  • .agents/skills/update-models/reference/discover-models.tsclaude-opus-4-8 and claude-fable-5 added 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

  • Ran the discovery probe across all five providers. claude-fable-5 and claude-opus-4-8 both pass the computer-use smoke test on the computer_20251124 / computer-use-2025-11-24 pair and are present in pi-ai's registry.
  • Confirmed listCuaModels("anthropic") now lists both, and getCuaModel("anthropic:claude-fable-5") resolves.
  • Ran the retargeted drift checker; all four packages/ai local files resolve and produce non-empty action lists.

Test plan

  • npm run typecheck (exit 0)
  • npm test --workspace @onkernel/cua-ai (87 passed)
  • listCuaModels / getCuaModel resolve Fable 5 and Opus 4.8
  • provider-doc-drift.ts reads 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 of cua-cli and the legacy cua-* 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 at CUA_MODEL_ANNOTATIONS, packages/ai/src/providers/, and related docs.

Anthropic computer-use coverage is extended with a claude-fable-5 family annotation in packages/ai/src/models.ts and the supported-models.md snapshot. discover-models.ts maps claude-fable-5 and claude-opus-4-8 to the newer computer_20251124 / computer-use-2025-11-24 runtime pair so discovery does not mark them runtime_compatible: false (Opus 4.8 remains covered by the existing claude-opus-4 family match).

Reviewed by Cursor Bugbot for commit 536162e. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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.

Create PR

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.

Comment thread .agents/skills/update-models/reference/provider-doc-drift.ts
@firetiger-agent

Copy link
Copy Markdown

Created a monitoring plan for this PR.

What this PR does: Updates the @onkernel/cua-ai SDK to recognize claude-fable-5 as a supported computer-use model, and retargets the internal update-models agent skill to the packages/ai source layout (no runtime behavior change for existing models).

Intended effect:

  • getCuaModel("anthropic:claude-fable-5") resolution: baseline — call returns undefined (unsupported); confirmed if it returns a valid model object post-publish
  • listCuaModels("anthropic") output: baseline — Fable 5 absent from the list; confirmed if Fable 5 appears after package adoption
  • update-models drift checker: retargeted to packages/ai provider files; confirmed if all four providers return non-empty action lists on next agent run

Risks:

  • getCuaModel returns undefined for fable-5 — if pi-ai's registry doesn't carry the ID and no override exists, calls to getCuaModel("anthropic:claude-fable-5") return undefined; alert if any consuming code throws on first use
  • Drift checker empty-action false positive — if a retargeted packages/ai file path was stale, provider-doc-drift.ts reports an empty action list; alert if any provider shows zero actions on the next skill run
  • Family match wider than intended — the claude-fable-5 family matcher will accept any claude-fable-5-* dated snapshot; this is by design but alert if an unexpected variant resolves and causes a pi-ai registry miss

Status updates will be posted automatically on this PR as monitoring progresses.

View monitor

@rgarcia
rgarcia merged commit df4799a into main Jun 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant