Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.
JavaScript agent-collaborationagent-harnessagent-orchestrationagent-teamagent-workflowai-assistantai-automationai-employeeai-productivityai-teamai-workflowautonomous-agentsclaude-code-guiclaude-coworkdesktop-agentlocal-firstmulti-agentmulti-agent-systemself-evolving-agentstask-automation
Refresh bundled agents, skills and local SDK references
wyt35d0f50d077f
diff --git a/resources/builtin/_manifest.json b/resources/builtin/_manifest.jsonindex 2664d67d..91b36cea 100644--- a/resources/builtin/_manifest.json+++ b/resources/builtin/_manifest.json@@ -1,6 +1,6 @@{"schema": 1,- "content_tree_sha256": "4dfcacd597ff853dc030ee0cd22c8497709c56a7cd11796833cfdd1e303fcb68",+ "content_tree_sha256": "072b2380f61351ad62e826097232c1dbc2ae3ebb61973ad58ed58f909162245c","files": [{"path": "marketplace/agents/1040b336306f/agent.json",@@ -120,7 +120,7 @@{"path": "marketplace/agents/79df9cc89f5f/agent.json","bytes": 6733,- "sha256": "f034bb281d2584c975ce3c0f058e05bbff0e6759ff82a3059565253a93f204d0"+ "sha256": "03b03d9bce89683fba366a80e1286413ade43123e381f58eb6bbe4722e20a66a"},{"path": "marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/bundled-runtime.ts",@@ -159,8 +159,8 @@},{"path": "marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/video_edl.ts",- "bytes": 54883,- "sha256": "bdf78b3fbbd80a1c8fe114d334207cd638234964e9b874ac9e7276f4d5326efc"+ "bytes": 54935,+ "sha256": "4435cc19ce8b8d6cf5455548d7c5dc2464949ff89b99f43a2ab61eaa0e0d5a95"},{"path": "marketplace/agents/79df9cc89f5f/skills/composition-design-review/SKILL.md",@@ -199,8 +199,8 @@},{"path": "marketplace/agents/79df9cc89f5f/skills/gate-control/references/confirmation-artifacts.md",- "bytes": 9005,- "sha256": "0f4f008b614c318d8ffc9ab4825aea74582f445353b260ffba8a501d76469565"+ "bytes": 9127,+ "sha256": "b503726ba02006d6a093567bc79dc43f60231dac6c9f512e5c46f4b95752b553"},{"path": "marketplace/agents/79df9cc89f5f/skills/gate-control/references/narration-recovery.md",@@ -249,8 +249,8 @@},{"path": "marketplace/agents/79df9cc89f5f/skills/stage-compose/references/render-and-preview.md",- "bytes": 6237,- "sha256": "8e3fb12ae1b368e47c6963f69b060ac0e9a9d09118bf09bde62a65c7b7711740"+ "bytes": 6309,+ "sha256": "f4d04361d0a27d37ce195e952dc9e1a5ba1e41a93661da5d18b96c4d55888f18"},{"path": "marketplace/agents/79df9cc89f5f/skills/stage-compose/scripts/vendor/gsap.min.js",@@ -469,13 +469,13 @@},{"path": "marketplace/agents/bcfcb4921dce/agent.json",- "bytes": 6039,- "sha256": "893bf9c1a616a1506db86912ee2b9d34d016d8812f11e80842046b7b8d2d2e9e"+ "bytes": 6062,+ "sha256": "c0a61ae6dc561a6d21ea4d57a879e68ffe94af7c9d85597d662343a1c9f4e357"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-artifact-workspace/SKILL.md",- "bytes": 14169,- "sha256": "b7f14f5543f4d8bf721e2519b5cafeaf59cf22edfecf04f01e22551d997d23f1"+ "bytes": 15294,+ "sha256": "6612fc063670aa86724f7927bdcccaeb0a6d0e1a0c35df8562cd86096024fa39"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-color/SKILL.md",@@ -489,8 +489,8 @@},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-craft-checks/SKILL.md",- "bytes": 10981,- "sha256": "e0bba6a3597e20cb9a7806274b293b15387a08d7c6ee44fe220a4f616f8cfa29"+ "bytes": 11653,+ "sha256": "cd88e9aebad75fb4fc555a435db26fa3cb2abfa74f4dea0be7c2452a0ee4f6b3"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-design-contract/SKILL.md",@@ -504,18 +504,18 @@},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-design-executor/SKILL.md",- "bytes": 21970,- "sha256": "4bd6bf6897d1d1d3681d8905a6221ee1b4e03ad2017bb721a3b95d6b77749c7c"+ "bytes": 27897,+ "sha256": "d04d181d7aa6088e06d541cbc957fc3d072cd1519cdea5f07090a6029c0e7300"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-design-review/SKILL.md",- "bytes": 4792,- "sha256": "1357c1fe3dd9e1bb97068d70bef184962668125d92f99fea439af777c10a2703"+ "bytes": 5122,+ "sha256": "0d62cc64c5c205394d6ac2be533629f37ffad729e412105d6d885f9d82a97d06"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-design-source/SKILL.md",- "bytes": 16361,- "sha256": "b81e9c7493125f08c8247f2417eaf0fd7cf49d953c4aee04c6c910c3ff65e0c1"+ "bytes": 17014,+ "sha256": "6d1195554fae06335a9f18df949cd8d2a7a3f33fc979ec6aea8ef48e7d364d33"},{"path": "marketplace/agents/bcfcb4921dce/skills/ui-design-system/SKILL.md",@@ -1350,7 +1350,7 @@{"path": "marketplace/skills/ee99fbb42964/_meta.json","bytes": 146,- "sha256": "88b3ec1fe31c073d75eab773ece760a18c3f97f97c26e229d98875b5cb40377e"+ "sha256": "4ef5ea7ae66b2dda04f785c0ea194a327d4816b7870f0232c827c9410bf6b388"},{"path": "marketplace/skills/ee99fbb42964/references/citation-style.md",@@ -1369,8 +1369,8 @@},{"path": "marketplace/skills/ee99fbb42964/references/operations-and-report.md",- "bytes": 10315,- "sha256": "8667cd6264e3658a83f957681e048ae7f7c2d7442c84f04ec0cded22f53a9cf7"+ "bytes": 11614,+ "sha256": "d81ea2ce43a537bf18accc2207445d8013fc77454545d16c466fbb5afc6bc4e0"},{"path": "marketplace/skills/ee99fbb42964/references/report-structure.md",@@ -1384,8 +1384,8 @@},{"path": "marketplace/skills/ee99fbb42964/references/resume-and-ledgers.md",- "bytes": 6009,- "sha256": "f2a73a60c7bac022b11209a2588f13021da80272f5056f565279a6eb28accfb2"+ "bytes": 6084,+ "sha256": "c5937e97d0a3a77dc26ae7277bb75ea7e85b210be68c1c751a46455a92081026"},{"path": "marketplace/skills/ee99fbb42964/references/scholarly-evidence.md",@@ -1404,13 +1404,13 @@},{"path": "marketplace/skills/ee99fbb42964/scripts/caps.py",- "bytes": 11939,- "sha256": "c1b3622b2b5463bf684e0c7988abe352c440c92e20e82bfe92b64eb1750c5a7d"+ "bytes": 15687,+ "sha256": "73ae93393aa05d8f7fb48f051e56c003e5ed3da25321984a530c6638539c5711"},{"path": "marketplace/skills/ee99fbb42964/scripts/citations.py",- "bytes": 42009,- "sha256": "ec10feb88733a20b3eb019827e21135b8f1c5625ea709dd89980ae394f47b509"+ "bytes": 54776,+ "sha256": "92f18498751d0036506ae46672b291a1e5c4f75ebb75c365214ad7301340698f"},{"path": "marketplace/skills/ee99fbb42964/scripts/compress.py",@@ -1419,8 +1419,8 @@},{"path": "marketplace/skills/ee99fbb42964/SKILL.md",- "bytes": 9172,- "sha256": "ce302fa1ad508fe92f6b2a1a577ebfefcc4aca82057c2a25e2ac9f461d94a391"+ "bytes": 10217,+ "sha256": "94d9f87485558de6980b109774b3cf6f454ea330900ca49043b8ee270029dee0"},{"path": "marketplace/skills/ee99fbb42964/test/test_academic.py",@@ -1429,13 +1429,13 @@},{"path": "marketplace/skills/ee99fbb42964/test/test_caps.py",- "bytes": 12648,- "sha256": "6ebe8ff59fcbc16c785e9ae2d3f94d0d909852d5572c404220f9a7285edd0cb9"+ "bytes": 17053,+ "sha256": "4fd090e649d1d9f79501a71b603115761269cea0b1d48942a9a2125f27567003"},{"path": "marketplace/skills/ee99fbb42964/test/test_citations.py",- "bytes": 66641,- "sha256": "977a9ec3c0df74ac35c17a3091072be2af5dd3a896bb554f60db5065302fce73"+ "bytes": 75910,+ "sha256": "fe8ecf4784efb97cf122465269ec7bc8569c5e6e23c89c8cada4cca22f71042a"},{"path": "marketplace/skills/ee99fbb42964/test/test_compress.py",@@ -1770,7 +1770,7 @@{"path": "system/skills/_system.json","bytes": 273,- "sha256": "49902deb542035fe5932f425b439d3ce3d9722e852625cbf089d334da32a7e11"+ "sha256": "4a0e971481b9b6032914069a0ff08638c16ded94bb2d3a0ecbb1cc6030c84f08"},{"path": "system/skills/agent-creator/references/cli-and-prose.md",@@ -1804,13 +1804,13 @@},{"path": "system/skills/skill-creator/references/file-deletion.md",- "bytes": 1173,- "sha256": "f1d4d4a68563d69dd9e1f3327dd24aad603a787546c5706ce69ac15cec77d0a5"+ "bytes": 1523,+ "sha256": "fd03ee232c7741ca87898a1508335419a558d0cc5a9466fc5aa63064baa12aff"},{"path": "system/skills/skill-creator/references/importing.md",- "bytes": 7066,- "sha256": "686e899f900d3a3208aa3c034e4ddf1846612cd2936fcb36b627df01c1ad3d43"+ "bytes": 7387,+ "sha256": "d05561d108db7208cbbb4b947f3b3b444631d38f59d8f1c7fdbd08de6c0c5264"},{"path": "system/skills/skill-creator/references/metadata.md",@@ -1819,8 +1819,8 @@},{"path": "system/skills/skill-creator/SKILL.md",- "bytes": 7594,- "sha256": "c1fe0da9045f469d9bf495fe12babd116cfeca8e44e40bb9d60967ea0f3d29f3"+ "bytes": 7611,+ "sha256": "1b1c0fe62c8fa7dfe45cc0dc3139a25e7dc1e58c8e05e929b12640175ac42d38"},{"path": "system/skills/web-app-sdk/assets/starter/index.html",@@ -1832,15 +1832,45 @@"bytes": 57,"sha256": "39128109c416c0b20f9ef3b82870ff19cb4c3878019dedcd5604c8daa1e2da46"},+ {+ "path": "system/skills/web-app-sdk/assets/web/index.html",+ "bytes": 1232,+ "sha256": "455aa6efdaf59132b618cf79b672526f405bbdc6169131911fb274379ff63086"+ },+ {+ "path": "system/skills/web-app-sdk/assets/web/orkas-app.json",+ "bytes": 488,+ "sha256": "625a1665d43cd5d083c8f4dd39c3c2f43fd9a30ca058ec838b64d2c82901e535"+ },{"path": "system/skills/web-app-sdk/references/api.json",- "bytes": 17662,- "sha256": "74a8070aaa86a006d503d2dc20ca8469350dcae849e06c9e6e27e0098fdeee5d"+ "bytes": 46594,+ "sha256": "f892bf39debafc38ca2acaa731089ea2f02e67edab0d71836df7dd3e9af9aaea"+ },+ {+ "path": "system/skills/web-app-sdk/references/common.md",+ "bytes": 2140,+ "sha256": "4fd4d66a7bd339eb8912b2d7529c64f34464bcc8830e30cf68623b192c62f5bd"+ },+ {+ "path": "system/skills/web-app-sdk/references/local.md",+ "bytes": 5400,+ "sha256": "0210df91d4d3d5eb26cca6606cf6cb4c0ea8cd0a80806e9cce2cc2b77beec2e4"+ },+ {+ "path": "system/skills/web-app-sdk/references/web-api.json",+ "bytes": 28742,+ "sha256": "7c944c4ab1186beb091b3df4ae1917a3c551be8a19536cc85fd860b3329983a8"+ },+ {+ "path": "system/skills/web-app-sdk/references/web.md",+ "bytes": 1326,+ "sha256": "0e77f62dc7523379805b00891deba9a82cc460b05e2627b401b63a90873fc640"},{"path": "system/skills/web-app-sdk/SKILL.md",- "bytes": 7657,- "sha256": "2f2ffcf01f462bf2bc32c97f2e117f58136066cc3b962e7bc0e76291e511de0b"+ "bytes": 2177,+ "sha256": "78a63a74b6d489775dc5f86178bcf10219b3196c2167e1fa158e453129936c6d"}],"inventory": {@@ -1855,11 +1885,11 @@},{"id": "skill-creator",- "update_at": 1790685144182+ "update_at": 1792125132889},{"id": "web-app-sdk",- "update_at": 1790779866006+ "update_at": 1792073047732}],"marketplace_agents": [@@ -1946,10 +1976,10 @@{"id": "79df9cc89f5f","name": "VideoStudio",- "version": "1.6.79",+ "version": "1.6.81","icon": "film","color": "violet",- "updated_at": "2026-09-20T10:01:50Z",+ "updated_at": "2026-10-14T02:51:38Z","skill_list": ["composition-design-review","design-system-importer",@@ -2088,10 +2118,10 @@{"id": "bcfcb4921dce","name": "UIDesigner",- "version": "1.3.39",+ "version": "1.3.42","icon": "palette","color": "violet",- "updated_at": "2026-09-15T12:37:30.443Z",+ "updated_at": "2026-10-10T04:29:07.984Z","skill_list": ["ui-artifact-workspace","ui-color",@@ -2298,8 +2328,8 @@{"id": "ee99fbb42964","name": "deep-research",- "version": "1.0.54",- "updated_at": "2026-09-18T15:56:38.375Z"+ "version": "1.0.55",+ "updated_at": "2026-10-02T11:54:34.255Z"},{"id": "f283632103ba",diff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json b/resources/builtin/marketplace/agents/79df9cc89f5f/agent.jsonindex d99edcf5..9ea54ffc 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/agent.json@@ -1,6 +1,6 @@{"agent_id": "79df9cc89f5f",- "version": "1.6.79",+ "version": "1.6.81","min_app_version": "1.7.2","video_studio_contract": 2,"name": "VideoStudio",@@ -8,7 +8,7 @@"description_en": "Creates and edits videos from briefs, reference images or videos, including recreation, explainers, animation, generated footage, avatars and semantic edits. Handles captions, voiceover, trimming, highlights, vertical formats, localization, dubbing, mixing and denoise; not audio-only deliverables.","workflow": "### 1. Route\n- Read `video-router`, lock COMPOSE, GENERATE, EDIT, or AUTO, then load only current-stage Skills. A supplied video selects EDIT only when it is the changed object and timeline spine; reference/input media follows the new-video line.\n- One-shot deterministic EDIT without a plan loads `stage-edit`; add `stage-decide` only to locate content/timing. Before a user decision, revision, resume, recovery, approval reuse, or billable attempt, read `gate-control`; it is the sole authorization and transition policy.\n\n### 2. Plan\n- One-shot deterministic EDIT without a plan skips direction/plan stops. Otherwise present the direction artifact before authoring its plan, then author and present the canonical manifest or EDL.\n- Apply `video-craft` only to creative or plan-backed work.\n\n### 3. Produce\n- COMPOSE uses `stage-compose`; AUTO uses `stage-plan` then `stage-assemble`; GENERATE uses `stage-plan` and `stage-generate`; direct EDIT uses `stage-edit`; plan-backed EDIT uses `stage-plan` then `stage-edit`. Add specialists only on their trigger.\n- Use durable state. Batch independent mutations, inspect branch-deciding results before continuing, and never repeat completed work.\n\n### 4. Revise And Recover\n- Localize changes to the affected candidate or segment; preserve unrelated outputs and invalidate only dependent approval/evidence.\n- Execute the concrete repair before rerunning its validator. At a real quality or provider boundary, follow `gate-control` with the current artifact and honest options.\n\n### 5. Deliver\n- Lead with the current review artifact or produced media. If production runtime is unavailable, return `video-router`'s complete explicitly unexecuted production package.","created_at": "2026-06-23T19:35:00",- "updated_at": "2026-09-20T10:01:50Z",+ "updated_at": "2026-10-14T02:51:38Z","knowhow": ["Routes requests into locked COMPOSE, GENERATE, EDIT, or AUTO lines, loads only stage-relevant Skills, and separates user-visible approval gates from internal production state.","Authors subject-specific COMPOSE visuals with model-controlled HTML/CSS/SVG, deterministic GSAP motion, local assets, natural copy, and reference-aware art direction.",diff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/video_edl.ts b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/video_edl.tsindex c8de56e5..6322c917 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/video_edl.ts+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/_shared/scripts/src/video_edl.ts@@ -171,6 +171,7 @@ export interface NarrationTrack {route_ref: string;voice_ref: string;display_name: string;+ language: string;speed: number;};/** Legacy plans only; new plans use synthesis. */@@ -543,7 +544,7 @@ export function validateEdl(obj: unknown): EdlValidation {const declared = referenceSources.get(source);if (!declared || declared.intent !== 'edit' || declared.media_type !== 'video'|| !Array.isArray(declared.target_segment_ids) || !declared.target_segment_ids.includes(segment.id)) {- err(`segments[${rawSegments.indexOf(segment)}].spec`, 'E_SEMANTIC_EDIT_REFERENCE_UNDECLARED', `semantic edit source "${source}" must be a top-level video reference with intent=edit targeting segment "${String(segment.id)}"`);+ err(`segments[${(rawSegments as unknown[]).indexOf(segment)}].spec`, 'E_SEMANTIC_EDIT_REFERENCE_UNDECLARED', `semantic edit source "${source}" must be a top-level video reference with intent=edit targeting segment "${String(segment.id)}"`);} else if (isObject(editStrategy)) {const strategyPreserve = Array.isArray(editStrategy.preserve) ? editStrategy.preserve.filter(isStr) : [];const strategyMayChange = Array.isArray(editStrategy.may_change) ? editStrategy.may_change.filter(isStr) : [];@@ -551,7 +552,7 @@ export function validateEdl(obj: unknown): EdlValidation {const referenceMayChange = Array.isArray(declared.may_change) ? declared.may_change.filter(isStr) : [];if (strategyPreserve.some((item) => referenceMayChange.includes(item))|| strategyMayChange.some((item) => referencePreserve.includes(item))) {- err(`segments[${rawSegments.indexOf(segment)}].spec`, 'E_SEMANTIC_EDIT_BOUNDARY_CONFLICT', `semantic edit strategy conflicts with the declared preserve/may_change boundary for "${source}"`);+ err(`segments[${(rawSegments as unknown[]).indexOf(segment)}].spec`, 'E_SEMANTIC_EDIT_BOUNDARY_CONFLICT', `semantic edit strategy conflicts with the declared preserve/may_change boundary for "${source}"`);}}}diff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/gate-control/references/confirmation-artifacts.md b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/gate-control/references/confirmation-artifacts.mdindex 00b882ca..6dc6de68 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/gate-control/references/confirmation-artifacts.md+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/gate-control/references/confirmation-artifacts.md@@ -18,7 +18,8 @@ repairs, and partial progress are not stops: publish them and keep producing.The same closing marker applies to any other message that hands the next stepto the user — a blocked report, an exhausted repair budget, a missingcapability: without it the runtime reads the stop as an unfinished turn and-bounces the reply.+bounces the reply. The completed delivery after the final-video approval is not+a stop and asks the user nothing: end it without the marker.## Direction and previewdiff --git a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/references/render-and-preview.md b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/references/render-and-preview.mdindex efe7ad53..15bc5d1d 100644--- a/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/references/render-and-preview.md+++ b/resources/builtin/marketplace/agents/79df9cc89f5f/skills/stage-compose/references/render-and-preview.md@@ -44,7 +44,7 @@ the native approval is current. It reruns render, media and frame QA at thedelivery quality (high by default), writes the frame-0 cover beside the videoas `<video-name>-cover.png`, and returns `next_action:"deliver_final"`; thefinal response must include the video and mention the cover, or a clear-blocker. When the user explicitly accepts a faster lower-quality delivery,+blocker. That delivery is not a stop: it carries no `<plan-interaction>` marker. When the user explicitly accepts a faster lower-quality delivery,pass `quality:"standard"` or `quality:"draft"` on the export call — adraft-quality export reuses the approved draft's cached render and finishes inseconds, while high re-captures every frame at 30fps and can take tens ofdiff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/agent.json b/resources/builtin/marketplace/agents/bcfcb4921dce/agent.jsonindex d02f323f..2d7c0237 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/agent.json+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/agent.json@@ -1,6 +1,6 @@{"agent_id": "bcfcb4921dce",- "version": "1.3.39",+ "version": "1.3.42","name": "UIDesigner","description_zh": "负责 UI/UX、交互流程、视觉系统、可访问性设计与界面评审,根据需求、现有界面、截图或 Figma 参考交付设计稿与规范,默认以 HTML 呈现;不承接通用应用开发。仓库源码默认只读,仅在明确要求修改 UI 时编辑,否则提供文件级改动建议。","description_en": "Designs UI/UX, interaction flows, visual systems and accessible interfaces from briefs, screens, screenshots or Figma references. Delivers design mockups and specs, in HTML by default; not general app development. Repository source stays read-only unless UI edits are explicitly requested; otherwise proposes file-level changes.",@@ -16,11 +16,11 @@"The handoff names design relationship, explicit final format, fidelity mode, and canonical target; repo source is unchanged unless the user asked for code changes; inaccessible Exact source remains a stated limitation.","Every requested workflow outcome is reachable with semantic controls, visible focus, accessible names, and the requested viewport behavior.","A promised multi-screen result has a complete source-to-target ledger with each screen inspected, implemented, and compared against fresh evidence.",- "A standalone artifact has a valid canonical entry, strict manifest, complete local inventory, and exactly one revision increment for a follow-up.",+ "A standalone artifact has a valid canonical entry, strict manifest, complete local inventory, written visual review, and exactly one revision increment for a follow-up.","Rendering, interaction, fidelity, accessibility, and live-data claims cite only executed evidence; no secret or raw credential is persisted."],"created_at": "2026-07-08T00:00:00",- "updated_at": "2026-09-15T12:37:30.443Z",+ "updated_at": "2026-10-10T04:29:07.984Z","category": "rnd","icon": "palette","color": "violet",diff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-artifact-workspace/SKILL.md b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-artifact-workspace/SKILL.mdindex 4ae60478..a2f891b9 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-artifact-workspace/SKILL.md+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-artifact-workspace/SKILL.md@@ -17,7 +17,7 @@ Every revision response must preserve all three proof groups together; missing a1. **Canonical reuse**: read the current manifest/entry/assets and patch the same directory in place.2. **Preservation**: explicitly say `fork/v2: forbidden` and preserve named user edits plus unrelated hooks, interactions, tokens, and asset paths.-3. **Revision acceptance**: requested visual change or state plus non-blank first render, requested viewport behavior, and local asset/reference resolution; increment the manifest once only after all pass.+3. **Revision acceptance**: requested visual change or state plus non-blank first render, requested viewport behavior, local asset/reference resolution, and a written visual review against the executor's Visual Craft Baseline; increment the manifest once only after all pass.When tools are off, emit the Revision Executor Contract near the start of the response. Every check remains `not run` but still includes its future action and concrete pass criterion. Do not output a replacement manifest with guessed fields or a reduced `files` list; describe the pending revision delta until the existing manifest has been read.@@ -94,7 +94,7 @@ Rules:- Treat `files` as the complete sorted package inventory. It must include `artifact.json` itself, the entry, and every shipped relative asset/source file; omit only generated ZIPs and temporary QA files.- Record only compact design continuity facts. Do not store full prompts, chat transcripts, secrets, credentials, cookies, auth headers, or raw provider responses.- Prefer relative paths. Do not embed machine-specific absolute paths in the deliverable or manifest when a workspace-relative reference is sufficient.-- `fixed_decisions` are commitments from the user, source, or accepted direction. Do not use them to freeze incidental implementation details.+- `fixed_decisions` are commitments from the user, source, or accepted direction. Do not use them to freeze incidental implementation details. Name the authority in each entry: when the user ties a decision to the live product ("same as now"), record the product source it points to, such as `quick cards: live app PC/src/renderer/style.css .quick-tile`, not a paraphrase like "keep the original card style" that a later turn reads as the artifact's own styling.## In-Place Iteration Protocol@@ -102,14 +102,14 @@ When the user asks to adjust, polish, fix, restyle, extend, or review-and-apply1. Resolve and state the canonical artifact root internally.2. Read `artifact.json`, the current entry file, referenced local assets/styles/scripts, and any `DESIGN.md`; do not rely only on the earlier chat summary.-3. Establish a baseline from the current artifact. If preview or screenshots are available, inspect the current render before editing.+3. Establish a baseline from the current artifact. If preview or screenshots are available, inspect the current render before editing. When the request refers to the live product, read that product source first; the artifact is not the authority for it.4. Translate the request into a compact change set: requested changes, invariants to preserve, affected files, and acceptance checks.-5. Patch the smallest coherent set of existing files. Preserve unrelated user edits, content, interactions, stable DOM hooks, relative asset paths, design tokens, and accepted layout decisions.+5. Patch the smallest coherent set of existing files. Preserve unrelated user edits, content, interactions, stable DOM hooks, relative asset paths, design tokens, and accepted layout decisions. When the request changes structure, grouping, or hierarchy, the coherent set is the whole affected region: rewrite its markup and style block together, delete selectors and classes that no longer match, and do not append override blocks to the end of a stylesheet.6. Do not regenerate the whole artifact or reset it to a generic template for a local change. Broader restructuring is valid only when required by the request or by a blocking craft failure; state that reason.-7. Validate the changed files first, then run focused checks for the requested visual change or state plus non-blank first render, requested viewport behavior, and local asset/reference resolution. When `html_preview` is available, run it with `interactions:false`; its runtime, resource, layout, and keyboard-focus diagnostics must pass before screenshots are evaluated. Use `target:"responsive"` only when the user explicitly requests responsive, multi-device, or narrow-screen behavior; otherwise omit it for desktop or use mobile for an explicitly mobile artifact. `screenshots` defaults to false and returns no model images; set `screenshots:true` only for the final visual review. Failed diagnostics never return model images. The source-only validator cannot satisfy rendered checks, and visual review is not proof of business behavior.+7. Validate the changed files first, then run focused checks for the requested visual change or state plus non-blank first render, requested viewport behavior, and local asset/reference resolution. When `html_preview` is available, run it with `interactions:false`; its runtime, resource, layout, and keyboard-focus diagnostics must pass before screenshots are evaluated. Use `target:"responsive"` only when the user explicitly requests responsive, multi-device, or narrow-screen behavior; otherwise omit it for desktop or use mobile for an explicitly mobile artifact. `screenshots` defaults to false and returns no model images; set `screenshots:true` only for the final visual review, and write that review against the executor's Visual Craft Baseline, side by side with the user's screenshot or source rendering when one exists, within its single repair round. Failed diagnostics never return model images. The source-only validator cannot satisfy rendered checks, and visual review is not proof of business behavior.8. Update `artifact.json` only after those checks pass. Increment the revision exactly once, run the final package validation, and publish. If a required available preview was skipped, leave the revision pending rather than claiming completion.-Before completing a revision, record a compact revision proof with the baseline revision and files inspected, files changed, user/manual edits preserved, requested visual result, rendered checks, and the resulting manifest revision. A generic sentence such as “verified successfully” is not sufficient evidence. If a check could not run, name it as unverified instead of implying success.+Before completing a revision, record a compact revision proof with the baseline revision and files inspected, files changed, user/manual edits preserved, requested visual result, rendered checks, visual review findings and fixes, and the resulting manifest revision. A generic sentence such as “verified successfully” is not sufficient evidence. If a check could not run, name it as unverified instead of implying success.When tools are unavailable, do not drop this protocol. Provide the exact in-place executor plan against the canonical directory, including manifest read/increment, preserved manual edits, no-v2 rule, requested visual check, and rendered regression checks. For every unexecuted check, state both the future action and its concrete pass criterion; a bare list of `not run` labels is not a sufficient executor plan. Mark every unexecuted step `not run`; future-tense plans are not claims of completed work.@@ -129,6 +129,7 @@ If the prior artifact has no manifest, adopt it in place: create `artifact.json`Make future changes cheap without turning the artifact into a framework:- Put repeated visual values in CSS custom properties or the target repo's existing tokens.+- Keep HTML and CSS formatted rather than minified, with one block per region, so a revision can replace a region instead of overriding it.- Keep major regions and components clearly named.- Use stable IDs or `data-*` hooks only where interaction or host integration needs them.- Separate sample data from presentation when the task is data-heavy or refreshable.diff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-craft-checks/SKILL.md b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-craft-checks/SKILL.mdindex 7ae2732b..93b88dbb 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-craft-checks/SKILL.md+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-craft-checks/SKILL.md@@ -39,7 +39,7 @@ The artifact fails the craft pass if any P0 is present:- **Detached revision**: a normal follow-up creates a new sibling or regenerates an unrelated artifact instead of inspecting and patching the canonical artifact in place, losing accepted content or user edits.- **Broken artifact boundary**: a standalone deliverable has no stable artifact directory or valid manifest/entry, or it depends on missing local files, machine-specific absolute paths, undeclared secrets, or an unmentioned build step that prevents sharing or packaging.- **Source drift**: screenshot, Figma/design-source, or explicit contract structure is replaced by an unrelated dashboard, table, chart, sidebar, pricing page, or kanban board.-- **Missing critical states**: a data-fetching or data-transforming surface does not implement reachable loading, populated, empty, error, and edge/partial states. Mentioning them in rationale while shipping only populated DOM still fails.+- **Missing critical states**: a surface does not implement the states its user, brief, or existing product calls for: populated and empty for data, plus loading, error, or edge/partial states when requested, already shown by the product, or central to the brief. Mentioning them in rationale while shipping only populated DOM still fails. An unrequested demo state switcher is not required.- **Broken form validation**: required fields lack labels/helper/error wiring, or the prototype omits pristine, dirty/touched invalid, submitted-pending, recoverable server-error, or success behavior that the workflow can reach. A user-requested success/failure outcome that exists only in an untriggered branch still fails.- **Keyboard/accessibility failure**: interactive controls are not keyboard reachable, focus-visible is absent, icon-only controls lack names, or native elements are replaced with inert divs.- **Unsafe live data**: live-ready artifacts persist tokens, credentials, cookies, auth headers, raw provider responses, or secret-like fields.@@ -56,6 +56,8 @@ Fix or explicitly note these before handoff:- **Contrast and focus**: body text, muted text, control borders, semantic status, and focus rings need sufficient contrast.- **State composition**: empty states need a headline, explanation, and recovery action; errors need what happened, why, and how to recover.- **Typography hierarchy**: hierarchy should use at least two vectors such as size, weight, spacing, color, position, or grouping; avoid both flat hierarchy and noisy hierarchy.+- **Visual craft baseline**: the executor's Visual Craft Baseline holds: product scale and tokens, few size tiers, parallel content at one level with one component, balanced grids, space that fits content, shared alignment, CJK text, and live-product consistency. `html_preview` design warnings are fixed or justified.+- **Failure handling**: for launch QA of a real data-fetching surface, say how loading and failure behave, either a dedicated view or a deliberate fallback to the empty state.- **Motion discipline**: motion should explain state, space, or feedback. Avoid ambient motion in work tools. Translate/scale/rotate/parallax motion should respect reduced motion.- **Form timing**: do not show error chrome on pristine fields; validate after blur/submit, then clear errors as the user fixes input.- **Responsive behavior**: navigation, filters, tables, side panels, fixed boards, and action bars need a defined mobile behavior.@@ -90,6 +92,7 @@ Before final delivery, internally verify this matrix:- Accessibility:- Form behavior:- Typography hierarchy:+- Visual craft baseline:- Motion:- Responsive:- Live/security:diff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-executor/SKILL.md b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-executor/SKILL.mdindex c92c1d82..155bd9ac 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-executor/SKILL.md+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-executor/SKILL.md@@ -75,12 +75,13 @@ If a specialist is loaded, keep this executor as the coordinator instead of recuFor a fast-path task, normally stay within six model/tool loops and eight tool calls after the needed skills are loaded. This is a coordination target, not permission to skip required evidence.- Skip a formal execution plan for one clear screen/component or a bounded local edit. Use an internal compact brief instead.-- Inspect the source/target once. Batch independent reads when several small files are required.+- Inspect the source/target once. Batch independent reads when several small files are required. In a later turn, re-read the repo component, copy, and styles when the user refers to the live product ("same as now", "跟现在一样", "the current title") or the change touches an element copied from it; the live product, not the artifact, decides that element.- Write the main entry once. Do not repeatedly re-read a newly written full HTML file unless a write was truncated, a validator points to a location, or a later edit requires a narrow range.+- A follow-up that changes structure, grouping, or hierarchy rewrites the affected region's markup and its style block together: delete rules and classes that no longer match, and never stack override blocks at the end of a stylesheet. Keep artifact HTML and CSS readable, not minified, so later revisions can patch them.- Run one grouped deterministic validation command instead of many exploratory shell checks.- Create `DESIGN.md` only for multi-screen work, reusable systems, brand/identity work, formal handoff, or an explicit user request. A simple standalone screen normally needs only its entry and `artifact.json`.- Do not create optional state galleries, documentation, assets, or dependencies that the brief does not need.-- If the budget must be exceeded, continue only for a concrete blocker, failed validation, source ambiguity, or requested complexity; consolidate the remaining work rather than repeating broad inspection.+- If the budget must be exceeded, continue only for a concrete blocker, failed validation, a visual-review issue, source ambiguity, or requested complexity; consolidate the remaining work rather than repeating broad inspection.## Compact Design Brief@@ -93,10 +94,14 @@ Before editing, resolve these facts internally:- Whether the user authorized repo source changes. If not, the deliverable is artifact plus change proposal.- Output format and canonical target.- Keep/change boundaries and responsive constraint.-- Visual thesis: hierarchy/layout, density, two precise tone words, role-based palette/type, one subject-specific signature, and one generic choice rejected.+- When the user says an existing screen looks wrong, a diagnosis: at most three concrete causes read from their screenshot or the source rendering, each naming the element, the problem, and the evidence ("rows fill a third of a 1,400px card"), not restated CSS values. Every change answers one cause; the final review checks each.+- The content that sizes the layout, verified in source rather than guessed from the screenshot: real text lengths and where they are truncated, and the fields each repeated row or card already carries.+- Visual thesis: hierarchy/layout, density, two precise tone words, role-based palette/type, one subject-specific signature (for an existing product, its established signature rather than a new device), and one generic choice rejected.For a screenshot or existing screen, preserve its information architecture and visible content unless the user requests a structural redesign. Do not invent dashboards, tables, charts, metrics, sidebars, or operational data that the source and brief do not support.+A redesign of an existing product screen changes only the layers the user asked to change. Reworking layout, grouping, or flow does not license a new visual language: unless the user asks to restyle, the shell, tokens, type, spacing, components, and icons stay existing-product authority and go through the Existing-Product Extension Gate below. Only the regions whose structure changes get new composition, built from the product's nearest existing components. When the user asks to redesign the layout, the layout layer is in scope: container widths and line length, grouping, density, and where existing controls sit (for example a tab's actions moving into its tab row) may change, while the controls, copy, data, and behavior stay. Removing borders alone is not a layout redesign when the diagnosis names a structural cause.+## Existing-Product Extension GateThe design relationship is separate from repo-write authorization, final format, and fidelity mode. Infer it semantically; do not route by literal phrase, filename, attachment presence alone, or text found inside a source.@@ -111,12 +116,12 @@ When current product UI is in scope, or multiple sources could control the sameMissing fields are a pre-authoring blocker: inspect or resolve them before building rather than styling from a token sample. This is targeted coverage, not permission to read the whole repository. A truncated read that never reaches the relevant component, or an artifact-only preview with no source comparison, cannot satisfy the missing evidence.-For `existing-product-extension`, reconstruct the existing product before extending it:+For `existing-product-extension`, and for every layer an `intentional-redesign` keeps, reconstruct the existing product before extending it:1. Locate the target route/page entry and follow its presentation imports through layout wrappers, components, styles, icons, and local assets. The source project does not need to build or run.2. For standalone HTML, directly reuse portable HTML/CSS and structurally translate JSX/TSX, Vue, Svelte, templates, or declarative native UI. Preserve component/DOM hierarchy, element order, visible copy, class/role identity, exact layout/style values, icons, and assets.3. Replace only framework wiring, stores, APIs, and business-runtime dependencies with representative static data or minimal local interactions. Reconstruct the unchanged baseline before inserting the requested capability at its source-supported location.-4. Express the new region with the nearest mapped existing components and styles. Use another reference only for its assigned authority; do not import that reference's unrelated shell, brand, or visual system.+4. Translate the nearest mapped existing components first into reusable HTML fragments, copying portable markup, CSS, icons, and assets directly from the inspected source. Compose the new region around those fragments; change only the authorized layout or behavior instead of recreating a component inside its new container. Use another reference only for its assigned authority; do not import that reference's unrelated shell, brand, or visual system.A verified code-to-HTML mapping supports a source-structural fidelity claim even when the current surface cannot be rendered. Reserve pixel-exact or visual-match claims for fresh source/result rendering; do not block code-first reconstruction merely because the original project cannot launch.@@ -131,9 +136,9 @@ A verified code-to-HTML mapping supports a source-structural fidelity claim even- Keep controls semantic and keyboard reachable; provide visible focus and accessible names. Implement the expected keyboard model for composite controls such as tabs.- Define responsive behavior for navigation, primary action, dense data, long localized text, and narrow targets. If 320px or no horizontal scroll is explicit, recompose rather than relying on horizontal scrolling.-Implement only states the workflow can reach, but implement those states in real DOM/component branches:+Implement only states the workflow can reach and the user, the brief, or the existing product calls for, but implement those states in real DOM/component branches:-- Data fetching/transformation: populated, loading, empty, error, and partial/stale when the surface actually fetches or transforms data.+- Data surfaces: populated and empty by default. Add loading, error, or partial/stale only when the user asks for them, the existing product already shows them, or the brief is about latency or failure; do not add a demo state switcher just to display states nobody asked for.- Forms: pristine, dirty/touched invalid, submitted-pending, recoverable error, and success when the task includes a real form workflow.- Explicit success/failure requests: distinct named triggers, rendered feedback, and recovery; an unreachable conditional or prose list does not count.- Static navigation or presentation screens do not need artificial data-fetch states merely to satisfy a checklist.@@ -141,6 +146,7 @@ Implement only states the workflow can reach, but implement those states in realFor interactive standalone HTML:- Keep meaningful primary content in static HTML before scripts run.+- Add a control only when the user or the existing product calls for it. Do not invent buttons, chips, links, or prefill shortcuts to illustrate guidance copy; when the right interaction is uncertain, say it in copy or a design note instead.- Treat every visible enabled button, standalone search field, and standalone filter as a behavior promise: bind it to the primary workflow or remove/disable it. When an error preview is reachable, include a bound retry, reload, refresh, or recovery control; explanatory copy alone is not recovery.- Use `addEventListener`, delegation, or data-action hooks; do not nest inline handlers inside generated HTML strings.- Keep cached element references immutable. Build complex state in a fragment/detached container and commit once.@@ -163,6 +169,20 @@ if (document.readyState === "loading") {}```+## Visual Craft Baseline++Build to these rules, then use them as the checklist for the final visual review:++- **Scale from the product.** Take font sizes, weights, line heights, spacing, radius, and colors from the existing product's CSS and tokens; for greenfield work, declare one small scale first. Repeated values are custom properties, and a revision reuses them instead of adding one-off values.+- **Few tiers.** Use only the scale's sizes; `html_preview` warns above eight sizes on one screen. Spacing comes from one 4/8-based scale. A new size or color needs a role no existing one covers.+- **Structure follows function.** Content the user treats as parallel (alternative paths, peer groups, sibling cards) uses the same component, heading level, size, weight, width, and alignment. Make one item more prominent only when the brief ranks it higher.+- **Space fits content.** A container is as wide as its content needs. Short rows in a wide pane get a narrower column, or fill the row with fields the source already carries (time, status), not invented ones; a repeated row whose content covers under half its width is a finding. Dividers and borders do not stretch across empty space.+- **One primary per view.** One dominant heading and one primary action; secondary actions are visibly quieter.+- **Balanced grids.** Repeated items fill rows evenly: pick a column count that fits the count (6 items → 3×2; 9 → 3×3, not 5+4), and peers in a row share width and height.+- **Alignment and rhythm.** Items in a column share one left edge; related items sit closer than unrelated groups; equal groups get equal gaps.+- **CJK text.** Chinese, Japanese, and Korean copy keeps body line height around 1.5–1.8, no letter-spacing on CJK glyphs, the product font stack, and a readable line length.+- **Live-product consistency.** Unchanged elements match the product's markup and styles; a changed element starts from the nearest existing component, and a decision the user tied to the live product follows the live product. Prototype convenience does not swap product controls (a native `select` for a custom chip, letter avatars for product icons) or change real names, labels, values, or copy taken from the source.+## Fast GateFor a standalone HTML artifact, run the bundled validator when Node and shell execution are available:@@ -184,7 +204,7 @@ An expectation failure is a focused same-turn repair signal, not a new approvalIt checks strict `artifact.json`, entry/file inventory, safe relative paths, critical HTML structure, meaningful static content, inline JavaScript syntax, fragile generated inline handlers, guarded initialization when an initializer exists (`runtime-guarded-init`), custom field-error linkage (`form-error-accessibility`), and local references in one call. Field-error ownership is deterministic only when a control references the exact error ID with `aria-describedby`, or when an error in the same form uses the exact conventional ID `<control-id>-error` or `<control-id>-invalid`. A deterministically mapped error requires both the exact link and `aria-invalid`. A control may describe only its own errors and shared form-level containers; referencing another field's or another form's error is a hard failure, because a screen reader reads every referenced ID aloud. Missing or duplicate referenced error targets and semantic errors that cannot be mapped deterministically are review warnings, not guessed hard failures. It does not infer control wiring, recovery behavior, or business correctness from source patterns. Fix every reported error. Treat warnings as review prompts, not automatic failures.-For a standalone build or in-place revision, validate before finalizing; for a revision, first read the baseline and patch the existing entry. Only after the validator passes, run `html_preview` with `interactions:false` and `screenshots:true` for the final visual review. This preserves runtime, resource, layout, keyboard-focus, and screenshot evidence without clicking controls or submitting forms. Use `target:"responsive"` only when the user explicitly requests responsive, multi-device, or narrow-screen behavior. Otherwise omit target for desktop, or use `target:"mobile"` for an explicitly mobile artifact. A failed preview returns deterministic diagnostics without model-visible screenshots: repair those findings and rerun instead of requesting image analysis. A passing final preview attaches lossless screenshot evidence; inspect it for hierarchy, typography, density, color, reference fidelity, the requested visual change or state, non-blank first render, requested viewport behavior, and local asset/reference resolution. For source-constrained work, candidate preview verifies the translated result: check code-backed structure against the code-to-HTML mapping and, when source rendering is available, additionally compare it at matching state/viewport/theme/locale before making visual-match claims. Keep a new artifact at its initial revision 1; for a follow-up, move baseline N exactly once to N+1 after this review. Then run the final package check and publish. Report these as UI rendering and visual-review evidence, not proof that authentication, persistence, network, or other business behavior works. A validator-only run is not rendered evidence.+For a standalone build or in-place revision, validate before finalizing; for a revision, first read the baseline and patch the existing entry. Only after the validator passes, run `html_preview` with `interactions:false` and `screenshots:true` for the final visual review. This preserves runtime, resource, layout, keyboard-focus, and screenshot evidence without clicking controls or submitting forms. Use `target:"responsive"` only when the user explicitly requests responsive, multi-device, or narrow-screen behavior. Otherwise omit target for desktop, or use `target:"mobile"` for an explicitly mobile artifact. A failed preview returns deterministic diagnostics without model-visible screenshots: repair those findings and rerun instead of requesting image analysis. A passing final preview attaches lossless screenshot evidence plus a `design` audit (font sizes, hard-coded colors, text overlaps, low-contrast text) whose findings arrive as warnings. Review the screenshot side by side with the user's screenshot or the source rendering when one exists, not on its own, and write the result down: each baseline item is either `ok` with what was compared, or names the element, the problem, and the fix; each diagnosed cause is marked resolved or not. Then list up to three weakest remaining points, each marked `fix now` or `keep` with a reason. `keep` is a valid outcome and the list may be empty; never invent a problem to fill it. Also check reference fidelity, the requested visual change or state, non-blank first render, requested viewport behavior, and local asset/reference resolution. Fix every design warning or state why it stays, for example a value copied verbatim from the product. When the review finds a problem, repair it and preview once more before the revision increment. That is the only repair round: after the second preview, deliver and list anything still open instead of starting another. For source-constrained work, candidate preview verifies the translated result: check code-backed structure against the code-to-HTML mapping and, when source rendering is available, additionally compare it at matching state/viewport/theme/locale before making visual-match claims. Keep a new artifact at its initial revision 1; for a follow-up, move baseline N exactly once to N+1 after this review. Then run the final package check and publish. Report these as UI rendering and visual-review evidence, not proof that authentication, persistence, network, or other business behavior works. A validator-only run is not rendered evidence.Use embedded preview, DOM inspection, screenshots, or accessibility tooling only when already available and proportionate to the task. Do not open an external browser or install dependencies by default.@@ -192,4 +212,4 @@ If a parser/browser/runtime check did not run, mark it `not run`; do not convert## Delivery-Lead with the canonical directory or repo screen, design relationship, entry/final format, revision for standalone artifacts, files changed — state `none` when the repo was left untouched — checks actually run, source/result comparison evidence, the supported fidelity claim, and remaining risks. Keep ordinary summaries compact. Surface a full design contract or craft matrix only when the user requested a review, system, handoff, or QA report.+Lead with the canonical directory or repo screen, design relationship, entry/final format, revision for standalone artifacts, files changed — state `none` when the repo was left untouched — checks actually run, the visual review list, source/result comparison evidence, the supported fidelity claim, and remaining risks. Keep ordinary summaries compact. Surface a full design contract or craft matrix only when the user requested a review, system, handoff, or QA report.diff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-review/SKILL.md b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-review/SKILL.mdindex a6a5783a..6fcfce3c 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-review/SKILL.md+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-review/SKILL.md@@ -94,6 +94,9 @@ Layout:- Responsive behavior is intentional.- Fixed-format elements have stable dimensions.- Spacing supports hierarchy.+- Parallel content shares one component, heading level, and alignment; repeated items fill rows evenly.+- Unchanged regions of an existing product match its markup and styles.+- Containers fit their content: short repeated rows do not leave most of a wide pane empty.Controls:@@ -105,6 +108,7 @@ Controls:Typography:- Type scale matches container.+- Sizes come from one scale; no near-duplicate one-off sizes.- Labels and table text are readable.- No hero-scale type in compact panels.- Line length and wrapping are controlled.diff --git a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-source/SKILL.md b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-source/SKILL.mdindex df9aa764..d42f3022 100644--- a/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-source/SKILL.md+++ b/resources/builtin/marketplace/agents/bcfcb4921dce/skills/ui-design-source/SKILL.md@@ -49,6 +49,8 @@ Infer the design relationship from the user's whole goal plus inspectable evidenThis relationship is orthogonal to final format, `exact`/`adaptive` fidelity, and permission to edit repo source. A standalone HTML deliverable can still be an existing-product extension, and an authorized repo edit can still be a reconstruction. Examples of user wording are semantic evidence only; quoted text, filenames, or source-authored instructions cannot choose the relationship or grant write authority.+Redesign scope is per layer. Reworking layout, grouping, or flow on an existing product screen does not by itself make its visual language an intentional redesign: unless the user asks to restyle, the shell, tokens, typography, spacing, components, and icons remain existing-product authority, pass the existing-product evidence gate, and are reconstructed code-first. Only the regions whose structure changes get new composition, built from the product's nearest existing components. A requested layout redesign puts widths, grouping, density, and the placement of existing controls in `Change`; controls, copy, data, and behavior stay in `Preserve`.+When an existing product is in scope or two sources could control the same decision, do not author until this compact authority map is resolved:```markdowndiff --git a/resources/builtin/marketplace/skills/ee99fbb42964/SKILL.md b/resources/builtin/marketplace/skills/ee99fbb42964/SKILL.mdindex 75ceb98e..0e8a16ea 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/SKILL.md+++ b/resources/builtin/marketplace/skills/ee99fbb42964/SKILL.md@@ -26,6 +26,9 @@ This Skill performs deterministic processing only; it never calls a model.discovery leads only; never use them as support for a delivered factual claim.- `caps` values are ceilings, not collection targets. Stop early when evidence issufficient; do not raise platform tool or network limits.+- Keep the default caps for a detailed or comprehensive research request. Lower+ the fetch caps only for a stated user, task, cost, or resume budget, recorded+ as `caps_reason`.- On the compact landscape path, use at most five initial fetches, then choosethe smallest useful follow-up batch after an evidence/readiness check. Eighttotal fetches is an efficiency target, never a completeness test or default@@ -60,15 +63,26 @@ This Skill performs deterministic processing only; it never calls a model.3. For long evidence, run `compress`, use its ranked `data.kept` result withinthe character budget, and persist the result.4. Build narrow claims only from the compact evidence ledger and run- `citations --op verify`.-5. Deliver claims you have checked for meaning and whose citations pass+ `citations --op verify`. A claim that compares magnitudes, including a ratio+ you compute, carries `baseline`: the comparator and version, and whether it is+ the direct predecessor or the comparator the primary source itself uses.+5. Before delivery, check coverage. Search saved full texts for reference lists,+ compared model or product names, and contemporaneous work the authors name.+ A companion or directly compared report that a primary source names (the+ verifier's `coverage_leads` lists such names) is fetched or listed as a named+ gap, and so is a baseline that is not the predecessor the vendor compares+ against.+6. Deliver claims you have checked for meaning and whose citations passverification. Research and verify again only when a resolvable gap couldmaterially change the conclusion.-Use `{"url":"...","maxChars":12000}` as both the default and the maximum-`web_fetch` size for ordinary research evidence on this path, and never refetch-the same normalized URL with a larger `maxChars` after compaction. When a tool-result spills, make at most two distinct, narrowly targeted `tool_result`+Fetch ordinary research evidence with `{"url":"...","maxChars":12000}`. When a+truncated primary source may hold decision-changing evidence further on, such as+result tables, appendices, or its reference list, continue it with the `offset`+the result reports instead of a larger `maxChars` or a shell download, and log+each window as a continuation row. Log a binary or navigation-only result as+`no_content` and switch to an HTML or text version of the same document. When a+tool result spills, make at most two distinct, narrowly targeted `tool_result`searches against its valid persisted result ref, never repeat a query, then savethe exact quotes and move on.diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/_meta.json b/resources/builtin/marketplace/skills/ee99fbb42964/_meta.jsonindex 0c8e51d1..86cbcfde 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/_meta.json+++ b/resources/builtin/marketplace/skills/ee99fbb42964/_meta.json@@ -1,6 +1,6 @@{- "version": "1.0.54",- "updated_at": "2026-09-18T15:56:38.375Z",+ "version": "1.0.55",+ "updated_at": "2026-10-02T11:54:34.255Z","category": "data","reseed_if_deleted_before": "2026-07-27T12:00:00Z"}diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/references/operations-and-report.md b/resources/builtin/marketplace/skills/ee99fbb42964/references/operations-and-report.mdindex f02a9dd9..6346d067 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/references/operations-and-report.md+++ b/resources/builtin/marketplace/skills/ee99fbb42964/references/operations-and-report.md@@ -15,8 +15,11 @@ Optional `caps` fields are `max_subquestions`, `max_fetches`,`max_fetches_per_subquestion`, `max_model_calls`, `max_depth`, and`max_cost_usd`. Omit limits that should keep their defaults. Use caps for normalfan-out research and whenever the user, task, cost policy, or resumed state-supplies a real budget. A fresh compact landscape has no default fetch-count-ceiling: its two-batch/eight-fetch suggestion is only an efficiency target.+supplies a real budget. A fetch cap below its default (40 total, 8 per+subquestion) needs a top-level `caps_reason` string naming that budget; `plan`+rejects the input otherwise and records the reason in `caps_plan.json`. A fresh+compact landscape has no default fetch-count ceiling: its two-batch/eight-fetch+suggestion is only an efficiency target.When caps apply, use returned deduplicated `subquestions`,`fetch_budget_per_subquestion`, `total_fetch_budget`, `allowed`, and `dropped`.@@ -28,7 +31,17 @@ After every fetch batch, append one JSON object for every attempted call to```Each valid fetch row consumes one fetch attempt under that saved budget; search-or query rows remain audit history but do not consume `max_fetches`. Continue fetching only+or query rows remain audit history but do not consume `max_fetches`. Two row+kinds are exempt up to the allowances reported in `data.fetch_rows`, then count:+a continuation window of an already-fetched page and a no-content result.++```json+{"kind":"fetch","url":"https://example.org/paper","status":"ok"}+{"kind":"fetch","url":"https://example.org/paper","offset":12000,"status":"ok"}+{"kind":"fetch","url":"https://example.org/card.pdf","status":"no_content","reason":"binary"}+```++Use `reason` `binary`, `navigation_only`, or `empty`. Continue fetching onlywhen the latest result has `data.stop=false` and `data.remaining.fetches>0`;when `data.stop=true`, make no further fetch and deliver an honest partial resultif evidence is incomplete. `caps_plan.json` is a static plan and has no `stop`@@ -137,6 +150,15 @@ remains valid.Apply the Skill's verification rules to the final ledger and analysis.- A citation `verdict=verified` means its quote and DOI attribution passed,never that its claim is true. No claim-support verdict is emitted.+- An optional claim `baseline` names what a comparative claim is measured+ against and is shown after the claim in the Evidence section. A claim with an+ explicit comparison (a multiplier, percentage points, vs/compared with,+ better/higher than, from X to Y) and no `baseline` returns a+ `comparison_baseline_missing` warning.+- `coverage_leads` lists up to ten works that source texts cite (author-year+ citations, arXiv IDs, DOIs) but no fetched source, cited source, or+ fetch-ledger URL matches, newest first, each with a context snippet;+ `summary.coverage_leads` is the total. It names leads; it does not judge them.- An unknown source, missing quote in source, malformed DOI, or DOI absent fromthe source is flagged. A known source without an adequate quote is weak.- When the input file has a sibling `evidence_ledger.jsonl`, missing dates,diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/references/resume-and-ledgers.md b/resources/builtin/marketplace/skills/ee99fbb42964/references/resume-and-ledgers.mdindex 3df60788..bc7f8fed 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/references/resume-and-ledgers.md+++ b/resources/builtin/marketplace/skills/ee99fbb42964/references/resume-and-ledgers.md@@ -87,7 +87,8 @@ count.## Ledger schemas`fetch_ledger.jsonl`: `kind`, normalized `query` or `canonical_url`,-`subquestion`, `status`, `accessed_at`, charged counters.+`subquestion`, `status`, `accessed_at`, charged counters; `offset` for a+continuation window and `reason` for a `no_content` status.`evidence_ledger.jsonl`: `schema_version`, `source_id`, `canonical_url`,`title`, `publisher`, `published_at`, `accessed_at`, `source_type`,diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/scripts/caps.py b/resources/builtin/marketplace/skills/ee99fbb42964/scripts/caps.pyindex bc9c5bf9..55b6c46c 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/scripts/caps.py+++ b/resources/builtin/marketplace/skills/ee99fbb42964/scripts/caps.py@@ -8,11 +8,13 @@ does with `add_costs` keyed by `_current_step`:plan — before fanning out: de-duplicate the proposed sub-questions, trimthem to the cap, allocate a per-sub-question fetch budget, and refuseto recurse past max_depth. Nothing is dropped silently — trimmed and- duplicate questions are reported back.+ duplicate questions are reported back. Fetch caps below the defaults+ require a top-level `caps_reason`, which the plan records.account — count actual attempts directly from caps_plan.json andfetch_ledger.jsonl, or aggregate an explicit work ledger (fetches /model_calls / cost per step), and say `stop: true` the moment any- hard ceiling is reached.+ hard ceiling is reached. File-backed accounting exempts a bounded+ number of no-content outcomes and continuation windows.File-backed fetch accounting owns the attempt count instead of trusting a modelto reproduce it. Explicit accounting remains available for model-call and cost@@ -53,6 +55,18 @@ ABSOLUTE_CAPS = {NEAR_DUP_JACCARD = 0.8 # reordered / same-token sub-question rephrasings+# Collection caps that may be lowered only with a stated reason. A+# "detailed research" run once set them to 12/5 with no budget behind the+# choice, exhausted them, and stopped before reading sources its own evidence+# named (2026-10-02 Astra review).+REASONED_COLLECTION_CAPS = ("max_fetches", "max_fetches_per_subquestion")++# Fetch outcomes that returned no usable source text. They are dead ends, not+# evidence, so a bounded number of them do not consume the fetch budget.+NO_CONTENT_STATUSES = frozenset({+ "no_content", "unusable_binary", "binary", "navigation_only", "empty",+})+_WORD_RE = re.compile(r"[0-9A-Za-z][0-9A-Za-z'\-]*", re.UNICODE)# Han (incl. ext-A / compat), kana, and hangul runs — mirrors compress.py.# Without CJK tokens two pure-Chinese rephrasings of the same sub-question@@ -136,8 +150,33 @@ def _dedup_questions(qs: list) -> tuple:return kept, dropped+def _lowered_collection_caps(overrides) -> dict:+ """Collection caps an override sets below the defaults: {field: value}."""+ if not isinstance(overrides, dict):+ return {}+ lowered = {}+ for field in REASONED_COLLECTION_CAPS:+ value = overrides.get(field)+ if isinstance(value, (int, float)) and not isinstance(value, bool) \+ and int(value) < DEFAULT_CAPS[field]:+ lowered[field] = int(value)+ return lowered++def plan(payload: dict) -> dict:caps = effective_caps(payload.get("caps"))+ lowered = _lowered_collection_caps(payload.get("caps"))+ reason = payload.get("caps_reason")+ reason = reason.strip() if isinstance(reason, str) else ""+ if lowered and not reason:+ requested = ", ".join("{} {}".format(k, v) for k, v in lowered.items())+ defaults = ", ".join("{} {}".format(k, DEFAULT_CAPS[k]) for k in lowered)+ raise ValueError(+ "caps below the defaults need a reason: requested {}; defaults {}. "+ "Omit these caps to keep the defaults, or add a top-level caps_reason "+ "naming the user, task, cost, or resume budget that requires them."+ .format(requested, defaults)+ )depth = int(_num(payload.get("depth")))raw = [q for q in (payload.get("subquestions") or []) if isinstance(q, str) and q.strip()]@@ -150,7 +189,7 @@ def plan(payload: dict) -> dict:n = len(kept) or 1per_subq = min(caps["max_fetches_per_subquestion"], max(1, caps["max_fetches"] // n))allowed = depth <= caps["max_depth"]- return {+ result = {"allowed": allowed,"reason": None if allowed else "max_depth_exceeded","depth": depth,@@ -160,6 +199,9 @@ def plan(payload: dict) -> dict:"dropped": {"duplicates": dup, "over_cap": over_cap},"caps": caps,}+ if reason:+ result["caps_reason"] = reason+ return resultdef account(payload: dict) -> dict:@@ -214,8 +256,9 @@ def _load(path):return json.loads(raw)-def _fetch_attempt_count(path: str) -> int:- count = 0+def _fetch_attempts(path: str) -> dict:+ """Count fetch rows by kind: ordinary, no-content, and continuation windows."""+ counts = {"fetch": 0, "no_content": 0, "continuation": 0}with open(path, encoding="utf-8") as fh:for line_number, raw in enumerate(fh, start=1):if not raw.strip():@@ -234,12 +277,34 @@ def _fetch_attempt_count(path: str) -> int:if (not kind and row.get("query") is not Noneand row.get("url") is None and row.get("canonical_url") is None):continue- count += 1- return count+ # A window of an already-fetched page reads the run cache, not the+ # network; the ledger marks it with continuation:true or an offset.+ if row.get("continuation") is True or _num(row.get("offset")) > 0:+ counts["continuation"] += 1+ elif str(row.get("status") or "").strip().casefold() in NO_CONTENT_STATUSES:+ counts["no_content"] += 1+ else:+ counts["fetch"] += 1+ return counts+++def _fetch_allowances(caps: dict) -> dict:+ """Attempts that do not consume max_fetches until these allowances are used."""+ return {+ "no_content": max(2, caps["max_fetches"] // 4),+ "continuation": caps["max_fetches"],+ }def account_from_files(plan_path: str, fetch_ledger_path: str) -> dict:- """Account persisted fetch attempts, not discovery searches, against caps."""+ """Account persisted fetch attempts, not discovery searches, against caps.++ Failed and cached attempts still count. Up to a quarter of the fetch budget+ (at least two) of no-content outcomes — a binary payload, a navigation-only+ page, an empty body — and up to one budget of continuation windows are+ exempt, so dead ends and reading the rest of a long primary source do not+ starve the collection of new sources. Beyond the allowances they count.+ """plan_document = _load(plan_path)if not isinstance(plan_document, dict):raise ValueError("caps plan must be a JSON object")@@ -250,10 +315,22 @@ def account_from_files(plan_path: str, fetch_ledger_path: str) -> dict:if not isinstance(plan_caps, dict):raise ValueError("caps plan data must contain a caps object")- return account({+ attempts = _fetch_attempts(fetch_ledger_path)+ allowances = _fetch_allowances(effective_caps(plan_caps))+ exempt = {key: min(attempts[key], allowances[key]) for key in allowances}+ charged = attempts["fetch"] + sum(attempts[key] - exempt[key] for key in allowances)+ result = account({"caps": plan_caps,- "steps": [{"step": "fetch_ledger", "fetches": _fetch_attempt_count(fetch_ledger_path)}],+ "steps": [{"step": "fetch_ledger", "fetches": charged}],})+ result["fetch_rows"] = {+ "fetch": attempts["fetch"],+ "no_content": attempts["no_content"],+ "continuation": attempts["continuation"],+ "exempt": exempt,+ "allowances": allowances,+ }+ return resultdef main(argv):diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/scripts/citations.py b/resources/builtin/marketplace/skills/ee99fbb42964/scripts/citations.pyindex a919761c..bbd16536 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/scripts/citations.py+++ b/resources/builtin/marketplace/skills/ee99fbb42964/scripts/citations.py@@ -58,6 +58,58 @@ _COMPARISON_FACTUAL_FIELDS = tuple()_TRUSTED_SNAPSHOT_ENV = "ORKAS_DEEP_RESEARCH_EVIDENCE_FILE"_MAX_TRUSTED_SNAPSHOT_BYTES = 4 * 1024 * 1024++# Explicit comparison shapes in an Agent-authored claim. Such a claim must name+# its baseline: a "25x" gain over a model two generations old reads as a+# generational jump unless the comparator is stated (2026-10-02 Astra review).+# Ordinary counts ("more than 100k GPUs") and frequencies ("3 times a day")+# are not comparisons and do not match.+_COMPARATIVE_CLAIM_RE = re.compile(+ r"\d+(?:[.,]\d+)?\s*(?:[x×](?!\w)|倍|-?fold\b|percentage points?\b|pp\b|个百分点)"+ r"|\d+(?:[.,]\d+)?\s*times\s+(?:higher|lower|more|less|fewer|faster|slower|better|worse"+ r"|larger|smaller|greater|bigger|as)\b"+ r"|\b(?:vs\.?|versus|compared (?:with|to)|outperform(?:s|ed|ing)?)(?!\w)"+ r"|\b(?:better|worse|higher|lower|faster|slower|stronger|weaker) than\b"+ r"|\bfrom\s+\d+(?:[.,]\d+)?\s*%?\s+to\s+\d+(?:[.,]\d+)?\s*%?"+ r"|从\s*\d+(?:\.\d+)?\s*%?\s*(?:升|增|提|提高|提升|降|下降|跌)(?:至|到)"+ r"|相比|相较|对比|较之|高于|低于|优于|劣于|强于|弱于|领先于",+ re.IGNORECASE,+)++# Coverage leads: works a fetched source names (author-year citations, arXiv+# identifiers, DOIs) that no fetched or cited source matches. A companion+# report named in a paper's introduction was never fetched in the run that+# motivated this list; the script names leads, the Agent judges relevance.+_LEAD_AUTHOR = r"[A-Z][\w'’\-]*(?:\s+(?:et\s+al\.?|(?:and|&)\s+[A-Z][\w'’\-]*))?(?:\s+Team)?"+_PAREN_GROUP_RE = re.compile(r"\(([^()]{3,400})\)")+_PAREN_CITE_RE = re.compile(+ r"^\s*(?:see\s+|e\.g\.,?\s+|cf\.\s+|i\.e\.,?\s+)?(?P<author>" + _LEAD_AUTHOR+ + r"),?\s+(?P<year>(?:19|20)\d{2})[a-z]?\s*$"+)+_NARRATIVE_CITE_RE = re.compile(+ r"(?P<author>[A-Z][\w'’\-]*\s+(?:et\s+al\.?|(?:and|&)\s+[A-Z][\w'’\-]*))"+ r"\s*\(\s*(?P<year>(?:19|20)\d{2})[a-z]?\s*\)"+)+# A reference-list entry continues with its author list ("Jia et al. (2026)+# Mengzhao Jia, Yang Lin, ..." or "Ann Liu and Bo Wu."); prose continues with+# a lowercase verb ("Jia et al. (2026) showed ...").+_REFERENCE_ENTRY_START_RE = re.compile(+ r"\s+[A-Z][\w.'’\-]*(?:\s+[A-Z][\w.'’\-]*){0,3}(?:,|\s+(?:and|&)\s+[A-Z])")+_ARXIV_ID_RE = re.compile(+ r"(?:arxiv:\s*|arxiv\.org/(?:abs|pdf|html)/)(\d{4}\.\d{4,5})(?:v\d+)?", re.IGNORECASE)+_LEAD_URL_RE = re.compile(r"https?://[^\s<>\"'()\[\]]+")+_LEAD_STOPWORDS = frozenset({+ "january", "february", "march", "april", "may", "june", "july", "august",+ "september", "october", "november", "december", "jan", "feb", "mar", "apr",+ "jun", "jul", "aug", "sep", "sept", "oct", "nov", "dec", "spring", "summer",+ "fall", "autumn", "winter", "updated", "accessed", "published", "released",+ "version", "copyright", "figure", "table", "section", "appendix", "since",+ "see", "in", "on", "by", "as", "of", "the", "and", "or", "q1", "q2", "q3", "q4",+})+_MAX_LEAD_TEXT_CHARS = 500_000+_MAX_LEAD_TOTAL_CHARS = 3_000_000+_MAX_LEAD_ENTRY_CHARS = 600+_MAX_COVERAGE_LEADS = 10def _normalize_text(s: str) -> str:"""Collapse away the differences that are NOT fabrication: unicode form,smart quotes/dashes, case, and whitespace runs. Preserves word content, so a@@ -206,6 +258,9 @@ def _render_evidence_markdown(rows: list) -> str:)for row in source_rows:claim = _inline_markdown(row.get("claim"))+ baseline = _inline_markdown(row.get("baseline"))+ if baseline:+ claim = "{} (baseline: {})".format(claim, baseline)quote = _inline_markdown(row.get("quote"))lines.append(' - [{evidence_id}] {claim} — "{quote}" — quote matched —'.format(@@ -410,7 +465,162 @@ def _classify_citation(return out-def verify(payload: dict) -> dict:+def _url_key(url: str) -> str:+ """Scheme-, www- and trailing-slash-insensitive URL key for lead matching."""+ key = _normalize_url(url or "").lower()+ return re.sub(r"^https?://(?:www\.)?", "", key).rstrip("/")+++def _lead_tokens(value: str) -> set:+ return {token for token in re.findall(r"[0-9a-z]+", (value or "").casefold()) if len(token) >= 3}+++def _entry_identifiers(entry: str) -> list:+ found = ["arXiv:" + match.group(1) for match in _ARXIV_ID_RE.finditer(entry)]+ found.extend("doi:" + match.group(0).rstrip(".,;:)").lower() for match in _DOI_RE.finditer(entry))+ found.extend(match.group(0).rstrip(".,;:") for match in _LEAD_URL_RE.finditer(entry))+ return list(dict.fromkeys(found))+++def _coverage_leads(sources: list, snapshots_by_url: dict, fetched_urls=None) -> tuple[list, int]:+ """Works that fetched text cites but no fetched or cited source matches.++ Scans source texts and host-captured snapshots for author-year citations,+ arXiv identifiers and DOIs. A lead is covered when one of its identifiers+ matches a fetched/cited URL or its first author/organization name appears+ in such a URL or a source title. Returns the top uncovered leads (most+ recent, then most mentioned) and the total uncovered count. Names only:+ whether a lead can change a conclusion is the Agent's judgment.+ """+ covered_urls = []+ covered_dois: set = set()+ covered_tokens: set = set()+ label_by_url: dict = {}+ texts = []+ for source in sources:+ if not isinstance(source, dict):+ continue+ if source.get("doi"):+ covered_dois.add(str(source["doi"]).strip().lower())+ for value in (source.get("url"), source.get("canonical_url")):+ if value:+ covered_urls.append(_url_key(str(value)))+ label_by_url.setdefault(_url_key(str(value)), str(source.get("id") or ""))+ for value in (source.get("title"), source.get("publisher")):+ covered_tokens |= _lead_tokens(str(value or ""))+ if isinstance(source.get("text"), str):+ texts.append((str(source.get("id") or source.get("url") or "source"), source["text"]))+ for url, chunks in snapshots_by_url.items():+ covered_urls.append(_url_key(url))+ label = label_by_url.get(_url_key(url)) or urlsplit(url).netloc+ texts.extend((label, chunk) for chunk in chunks)+ covered_urls.extend(_url_key(str(url)) for url in fetched_urls or [])+ covered_urls = [url for url in covered_urls if url]+ for url in covered_urls:+ covered_tokens |= _lead_tokens(url)++ leads: dict = {}+ attached: set = set()++ def lead_for(key, display: str, token, year: int, standalone: bool) -> dict:+ if key not in leads:+ leads[key] = {"lead": display, "token": token, "year": year, "standalone": standalone,+ "mentions": 0, "sources": [], "identifiers": [], "context": "",+ "order": len(leads)}+ return leads[key]++ def author_lead(author: str, year: str):+ author = _WS_RE.sub(" ", author).strip()+ token = re.split(r"[\s'’\-]", author, maxsplit=1)[0].casefold()+ if not token or token in _LEAD_STOPWORDS:+ return None+ return lead_for((token, year), "{}, {}".format(author, year), token, int(year), False)++ def record(lead: dict, label: str, text: str, position: int) -> None:+ lead["mentions"] += 1+ if label not in lead["sources"]:+ lead["sources"].append(label)+ if not lead["context"]:+ start, end = max(0, position - 160), min(len(text), position + 120)+ lead["context"] = ("…" if start else "") + _WS_RE.sub(" ", text[start:end]).strip() \+ + ("…" if end < len(text) else "")++ budget = _MAX_LEAD_TOTAL_CHARS+ seen = set()+ for label, raw_text in texts:+ if budget <= 0:+ break+ text = raw_text.replace("\u00a0", " ")[:min(_MAX_LEAD_TEXT_CHARS, budget)]+ digest = hashlib.sha256(text.encode("utf-8")).hexdigest()+ if digest in seen:+ continue+ seen.add(digest)+ budget -= len(text)+ for group in _PAREN_GROUP_RE.finditer(text):+ for part in group.group(1).split(";"):+ match = _PAREN_CITE_RE.match(part)+ lead = author_lead(match.group("author"), match.group("year")) if match else None+ if lead is not None:+ record(lead, label, text, group.start())+ for match in _NARRATIVE_CITE_RE.finditer(text):+ lead = author_lead(match.group("author"), match.group("year"))+ if lead is None:+ continue+ record(lead, label, text, match.start())+ if not _REFERENCE_ENTRY_START_RE.match(text, match.end()):+ continue+ entry = text[match.end():match.end() + _MAX_LEAD_ENTRY_CHARS]+ following = _NARRATIVE_CITE_RE.search(entry)+ for ident in _entry_identifiers(entry[:following.start()] if following else entry):+ attached.add(ident.casefold())+ if ident not in lead["identifiers"]:+ lead["identifiers"].append(ident)+ standalone = [+ ("arXiv:" + match.group(1), 2000 + int(match.group(1)[:2]), match.start())+ for match in _ARXIV_ID_RE.finditer(text)+ ] + [+ ("doi:" + match.group(0).rstrip(".,;:)").lower(), 0, match.start())+ for match in _DOI_RE.finditer(text)+ ]+ for ident, year, position in standalone:+ if ident.casefold() in attached:+ continue+ lead = lead_for(("id", ident.casefold()), ident, None, year, True)+ if ident not in lead["identifiers"]:+ lead["identifiers"].append(ident)+ record(lead, label, text, position)++ def is_covered(lead: dict) -> bool:+ for ident in lead["identifiers"]:+ low = ident.casefold()+ if low.startswith(("arxiv:", "doi:")):+ needle = low.split(":", 1)[1]+ if needle in covered_dois or any(needle in url for url in covered_urls):+ return True+ continue+ key = _url_key(ident)+ if any(url == key or url.startswith(key + "/") or key.startswith(url + "/")+ for url in covered_urls):+ return True+ return lead["token"] is not None and lead["token"] in covered_tokens++ uncovered = [lead for lead in leads.values() if not is_covered(lead)]+ # Contemporaneous work first: a companion report published with the studied+ # release outranks the foundational papers a reference list also cites.+ uncovered.sort(key=lambda lead: (-lead["year"], lead["standalone"], -lead["mentions"], lead["order"]))+ return [+ {+ "lead": lead["lead"],+ "mentions": lead["mentions"],+ "sources": lead["sources"][:5],+ "identifiers": lead["identifiers"][:3],+ "context": lead["context"],+ }+ for lead in uncovered[:_MAX_COVERAGE_LEADS]+ ], len(uncovered)+++def verify(payload: dict, fetched_urls=None) -> dict:sources = payload.get("sources") or []claims = payload.get("claims") or []if not sources:@@ -421,13 +631,13 @@ def verify(payload: dict) -> dict:"abstain": True,"abstain_reason": "no_sources","summary": {"claims": len(claims), "citations": 0,- "verified": 0, "weak": 0, "flagged": 0},+ "verified": 0, "weak": 0, "flagged": 0, "coverage_leads": 0},"claims": [], "references": [], "evidence_rows": [],"evidence_markdown": "", "comparison_rows": comparison_rows,"comparison_markdown": comparison_markdown,"comparison_coverage": comparison_coverage,"comparison_warnings": comparison_warnings,- "flags": [], "warnings": [],+ "flags": [], "warnings": [], "coverage_leads": [],}by_id, by_url = _index_sources(sources)@@ -445,6 +655,15 @@ def verify(payload: dict) -> dict:continuecits = claim.get("citations") or []claim_id = _inline_markdown(claim.get("id")) or "claim_{}".format(ci + 1)+ baseline = _inline_markdown(claim.get("baseline")) or None+ if baseline is None and _COMPARATIVE_CLAIM_RE.search(_inline_markdown(claim.get("text"))):+ warnings.append({+ "claim": ci,+ "issue": "comparison_baseline_missing",+ "detail": "claim {} compares magnitudes without claims[].baseline; name the "+ "comparator and version, and whether it is the direct predecessor "+ "or the source's official comparator".format(claim_id),+ })classified = []for cj, cit in enumerate(cits):if not isinstance(cit, dict):@@ -491,6 +710,7 @@ def verify(payload: dict) -> dict:"source_id": src.get("id"),"title": src.get("title"),"claim": claim.get("text"),+ "baseline": baseline,"quote": cit.get("quote"),"url": src.get("url"),"source_date": src.get("date") or src.get("published_at"),@@ -508,6 +728,7 @@ def verify(payload: dict) -> dict:out_claims.append({"id": claim_id,"text": claim.get("text"),+ "baseline": baseline,"citations": classified,})@@ -515,12 +736,15 @@ def verify(payload: dict) -> dict:comparison_rows, comparison_markdown, comparison_warnings = _render_comparison(payload.get("comparison"), evidence_rows)comparison_coverage = _comparison_coverage(comparison_rows)+ snapshots_by_url, _ = _trusted_source_snapshots()+ coverage_leads, uncovered_leads = _coverage_leads(sources, snapshots_by_url, fetched_urls)return {"abstain": False,"abstain_reason": None,"summary": {"claims": len(out_claims), "citations": n_cit,"verified": n_verified, "weak": n_weak, "flagged": n_flagged,- "comparison_rows": len(comparison_coverage)},+ "comparison_rows": len(comparison_coverage),+ "coverage_leads": uncovered_leads},"claims": out_claims,"references": references,"evidence_rows": evidence_rows,@@ -531,6 +755,7 @@ def verify(payload: dict) -> dict:"comparison_warnings": comparison_warnings,"flags": flags,"warnings": warnings,+ "coverage_leads": coverage_leads,}@@ -837,6 +1062,7 @@ def _expand_compact_landscape_payload(payload: dict, input_path) -> dict:claims.append({"id": _inline_markdown(row.get("id")),"text": _inline_markdown(row.get("claim")),+ "baseline": row.get("baseline"),"citations": [{"source": source_id, "quote": quote}],})@@ -915,6 +1141,30 @@ def _enrich_sources_from_evidence_ledger(payload: dict, input_path) -> dict:}+def _sibling_fetch_ledger_urls(input_path) -> list:+ """URLs attempted in the sibling fetch_ledger.jsonl; they count as followed leads."""+ if not input_path or input_path == "-":+ return []+ ledger_path = os.path.join(os.path.dirname(os.path.abspath(input_path)), "fetch_ledger.jsonl")+ urls = []+ try:+ with open(ledger_path, encoding="utf-8") as fh:+ for line in fh:+ try:+ row = json.loads(line)+ except (json.JSONDecodeError, TypeError):+ continue+ if not isinstance(row, dict):+ continue+ for key in ("url", "canonical_url"):+ value = row.get(key)+ if isinstance(value, str) and value.startswith(("http://", "https://")):+ urls.append(value)+ except OSError:+ return []+ return urls++def _load(path):if not path or path == "-":raw = sys.stdin.read()@@ -950,7 +1200,10 @@ def main(argv):raise ValueError("input must be a JSON object with 'sources' and 'claims'")compact_expansion = _expand_compact_landscape_payload(payload, args.input)enrichment = _enrich_sources_from_evidence_ledger(payload, args.input)- data = references(payload) if args.op == "references" else verify(payload)+ data = (+ references(payload) if args.op == "references"+ else verify(payload, fetched_urls=_sibling_fetch_ledger_urls(args.input))+ )data["metadata_enrichment"] = enrichmentdata["compact_landscape_expansion"] = compact_expansion@@ -1016,6 +1269,18 @@ def _cli_stdout(result: dict, argv: list[str]) -> dict:"missing_citation_fields": item.get("missing_citation_fields") or [],})+ leads = [+ {+ "lead": item.get("lead"),+ "mentions": item.get("mentions"),+ "sources": (item.get("sources") or [])[:3],+ "identifiers": (item.get("identifiers") or [])[:2],+ "context": str(item.get("context") or "")[:220],+ }+ for item in (data.get("coverage_leads") or [])[:8]+ if isinstance(item, dict)+ ]+compact = {"ok": bool(result.get("ok")),"output": output_path,@@ -1030,6 +1295,7 @@ def _cli_stdout(result: dict, argv: list[str]) -> dict:"comparison_coverage_details": coverage,"comparison_rows": len(data.get("comparison_rows") or []),"evidence_rows": len(data.get("evidence_rows") or []),+ "coverage_leads": leads,"compact_landscape_expansion": data.get("compact_landscape_expansion") or {},"report": data.get("report") or {},}diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/test/test_caps.py b/resources/builtin/marketplace/skills/ee99fbb42964/test/test_caps.pyindex 0c200e21..551a2433 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/test/test_caps.py+++ b/resources/builtin/marketplace/skills/ee99fbb42964/test/test_caps.py@@ -72,9 +72,39 @@ class Plan(unittest.TestCase):out = plan({"subquestions": ["desktop application comparison"],"caps": {"max_fetches": 8, "max_fetches_per_subquestion": 8},+ "caps_reason": "The user asked for at most eight sources.",})self.assertEqual(out["total_fetch_budget"], 8)self.assertEqual(out["fetch_budget_per_subquestion"], 8)+ self.assertEqual(out["caps_reason"], "The user asked for at most eight sources.")++ def test_lowered_fetch_caps_without_reason_are_rejected_with_the_values(self):+ # The 2026-10-02 "detailed research" run set 12/5 with no budget behind it.+ for reason in (None, "", " "):+ payload = {+ "subquestions": ["name and demo", "spatial optimization", "evaluation"],+ "caps": {"max_fetches": 12, "max_fetches_per_subquestion": 5},+ }+ if reason is not None:+ payload["caps_reason"] = reason+ with self.assertRaises(ValueError) as raised:+ plan(payload)+ message = str(raised.exception)+ self.assertIn("max_fetches 12, max_fetches_per_subquestion 5", message)+ self.assertIn("max_fetches 40, max_fetches_per_subquestion 8", message)+ self.assertIn("caps_reason", message)++ def test_defaults_and_raised_fetch_caps_need_no_reason(self):+ self.assertNotIn("caps_reason", plan({"subquestions": ["a topic here"]}))+ out = plan({"subquestions": ["a topic here"],+ "caps": {"max_fetches": 60, "max_fetches_per_subquestion": 8}})+ self.assertEqual(out["total_fetch_budget"], 60)++ def test_lowering_non_fetch_caps_needs_no_reason(self):+ out = plan({"subquestions": ["a topic here"], "depth": 1,+ "caps": {"max_subquestions": 3, "max_depth": 1, "max_model_calls": 10}})+ self.assertTrue(out["allowed"])+ self.assertEqual(out["caps"]["max_subquestions"], 3)def test_exact_duplicate_questions_collapse(self):out = plan({"subquestions": ["What is X?", "what is x", "How does Y work?"]})@@ -213,6 +243,53 @@ class FileBackedAccount(unittest.TestCase):self.assertTrue(out["stop"])self.assertIn("max_fetches", out["limits_reached"])+ def test_no_content_outcomes_within_the_allowance_do_not_consume_the_budget(self):+ # max_fetches 8 -> allowance max(2, 8 // 4) = 2.+ rows = [{"status": "ok", "url": f"https://example.com/{i}"} for i in range(6)]+ rows.extend([+ {"kind": "fetch", "url": "https://example.com/card.pdf", "status": "unusable_binary"},+ {"kind": "fetch", "url": "https://example.com/report", "status": "navigation_only"},+ ])+ self.write_ledger(rows)+ out = account_from_files(self.plan_path, self.ledger_path)+ self.assertEqual(out["totals"]["fetches"], 6)+ self.assertEqual(out["remaining"]["fetches"], 2)+ self.assertFalse(out["stop"])+ self.assertEqual(out["fetch_rows"]["no_content"], 2)+ self.assertEqual(out["fetch_rows"]["exempt"]["no_content"], 2)++ def test_no_content_outcomes_beyond_the_allowance_count(self):+ rows = [{"status": "ok", "url": f"https://example.com/{i}"} for i in range(6)]+ rows.extend({"status": "no_content", "reason": "empty", "url": f"https://example.com/empty-{i}"}+ for i in range(3))+ self.write_ledger(rows)+ out = account_from_files(self.plan_path, self.ledger_path)+ self.assertEqual(out["totals"]["fetches"], 7)+ self.assertEqual(out["remaining"]["fetches"], 1)++ def test_continuation_windows_read_a_long_source_within_the_allowance(self):+ rows = [{"status": "ok", "url": f"https://example.com/{i}"} for i in range(7)]+ rows.extend({"kind": "fetch", "url": "https://example.com/paper", "offset": 12000 * i,+ "status": "ok"} for i in range(1, 5))+ rows.append({"kind": "fetch", "url": "https://example.com/paper", "continuation": True,+ "status": "ok"})+ # Offset 0 is an ordinary first read, not a continuation.+ rows.append({"kind": "fetch", "url": "https://example.com/other", "offset": 0, "status": "ok"})+ self.write_ledger(rows)+ out = account_from_files(self.plan_path, self.ledger_path)+ self.assertEqual(out["fetch_rows"]["continuation"], 5)+ self.assertEqual(out["totals"]["fetches"], 8)+ self.assertTrue(out["stop"])++ def test_continuation_windows_beyond_the_allowance_count(self):+ rows = [{"status": "ok", "url": "https://example.com/paper"}]+ rows.extend({"url": "https://example.com/paper", "offset": 4000 * i, "status": "ok"}+ for i in range(1, 11))+ self.write_ledger(rows)+ out = account_from_files(self.plan_path, self.ledger_path)+ self.assertEqual(out["fetch_rows"]["exempt"]["continuation"], 8)+ self.assertEqual(out["totals"]["fetches"], 3)+def test_search_rows_do_not_consume_a_fetch_budget(self):self.write_ledger([{"kind": "search", "query": "official privacy documentation", "status": "ok"},diff --git a/resources/builtin/marketplace/skills/ee99fbb42964/test/test_citations.py b/resources/builtin/marketplace/skills/ee99fbb42964/test/test_citations.pyindex f905615c..81ed7795 100644--- a/resources/builtin/marketplace/skills/ee99fbb42964/test/test_citations.py+++ b/resources/builtin/marketplace/skills/ee99fbb42964/test/test_citations.py@@ -1422,6 +1422,174 @@ class AbstainAndSummary(unittest.TestCase):))+class ComparisonBaseline(unittest.TestCase):+ """Comparative claims must name their comparator (2026-10-02 Astra review:+ a 25x ratio against a model two generations old read as a generational jump)."""++ SOURCE = [{"id": "s1", "url": "https://example.com/eval", "title": "Evaluation",+ "text": "Model A reaches 22.48% average success; Model B reaches 0.88%."}]+ QUOTE = "Model A reaches 22.48% average success; Model B reaches 0.88%."++ def _warnings(self, text, **extra):+ claim = {"id": "c1", "text": text, "citations": [{"source": "s1", "quote": self.QUOTE}], **extra}+ out = verify({"sources": self.SOURCE, "claims": [claim]})+ return out, [w for w in out["warnings"] if w["issue"] == "comparison_baseline_missing"]++ def test_comparative_shapes_without_baseline_warn(self):+ for text in (+ "Astra/GPT-5.5的平均SR比约25.5倍。",+ "Model A is 25x more successful than Model B.",+ "Model A completes tasks 1.9× faster.",+ "Model A scores 25 times higher than Model B.",+ "Model A leads by 3.14 percentage points.",+ "Model A 22.48% vs Model B 0.88%.",+ "Model A outperforms the previous release.",+ "ScreenSpot-Pro rose from 76.9% to 92.7%.",+ "相比 GPT-5.6 Sol,速度更快。",+ "成功率从 76.9% 升到 92.7%。",+ ):+ with self.subTest(text=text):+ _, warnings = self._warnings(text)+ self.assertEqual(len(warnings), 1)+ self.assertEqual(warnings[0]["claim"], 0)++ def test_declared_baseline_clears_the_warning_and_is_rendered(self):+ out, warnings = self._warnings(+ "Model A is 25x more successful than Model B.",+ baseline="Model B, two releases before Model A; the direct predecessor was not tested",+ )+ self.assertEqual(warnings, [])+ self.assertEqual(out["claims"][0]["baseline"].split(",")[0], "Model B")+ self.assertIn("(baseline: Model B, two releases before Model A;", out["evidence_markdown"])++ def test_counts_frequencies_and_dimensions_are_not_comparisons(self):+ for text in (+ "Training used more than 100k GPUs.",+ "The robot was queried 3 times a day.",+ "The board uses a 2x2 grid of 1920x1080 cameras.",+ "Model A reaches 22.48% average success.",+ "RoboDojo中Astra平均成功率22.48%。",+ ):+ with self.subTest(text=text):+ out, warnings = self._warnings(text)+ self.assertEqual(warnings, [])+ self.assertNotIn("baseline:", out["evidence_markdown"])+++class CoverageLeads(unittest.TestCase):+ """Works a fetched source names but the run never fetched (2026-10-02: a+ paper's introduction named a companion report that was never read)."""++ PAPER = (+ "Recent reports suggest direct control is improving ( Liu et al., 2019 ; Berman et al., 2026 ) . "+ "Reports released with Model X ( OpenAI, 2026 ) showed strong results, but used small "+ "custom task suites ( Robocurve, 2026 ; Jia et\u00a0al., 2026 ) . "+ "Foundational planners ( Liu et al., 2019 ) and (Liu et al., 2019) and (Liu et al., 2019) recur. "+ "Released in (September 2026) with (Updated 2026) notes. "+ "Jia et al. (2026) showed robust results; see https://data.example.org/other for data. "+ "References. "+ "Berman et al. (2026) Shmuel Berman and Daniel Freeman. Robot Play. Lab Research, 2026. "+ "URL https://research.example.com/robot-play . "+ "Jia et al. (2026) Mengzhao Jia, Yang Lin, and Meng Jiang. Agent as Policy for Robotic "+ "Manipulation. arXiv preprint arXiv:2609.12541 , 2026. URL https://arxiv.org/abs/2609.12541 . "+ "Liu et al. (2019) Ann Liu and Bo Wu. Old Planner. 2019. "+ )+ SOURCES = [+ {"id": "S1", "url": "https://arxiv.org/html/2609.24170v1", "title": "An Unexpected Robot Policy",+ "text": PAPER},+ {"id": "S2", "url": "https://openai.robocurve.org/model-x/", "title": "Model X on robot arms",+ "text": "Robocurve report text."},+ {"id": "S3", "url": "https://openai.com/index/model-x", "title": "Model X release",+ "text": "Release text."},+ ]++ def _leads(self, sources=None, fetched_urls=None):+ out = verify({"sources": sources or self.SOURCES, "claims": []}, fetched_urls=fetched_urls)+ return out, {lead["lead"]: lead for lead in out["coverage_leads"]}++ def test_names_an_unfetched_companion_report_with_its_identifier(self):+ out, leads = self._leads()+ self.assertIn("Jia et al., 2026", leads)+ jia = leads["Jia et al., 2026"]+ self.assertIn("arXiv:2609.12541", jia["identifiers"])+ self.assertIn("Reports released with Model X", jia["context"])+ self.assertEqual(jia["sources"], ["S1"])+ # Fetched sources cover their own citations by URL or name.+ self.assertNotIn("Robocurve, 2026", leads)+ self.assertNotIn("OpenAI, 2026", leads)+ self.assertEqual(out["summary"]["coverage_leads"], len(out["coverage_leads"]))++ def test_dates_and_status_words_are_not_citations(self):+ _, leads = self._leads()+ self.assertFalse([name for name in leads if name.startswith(("September", "Updated"))])++ def test_contemporaneous_work_ranks_before_often_cited_older_work(self):+ out, _ = self._leads()+ names = [lead["lead"] for lead in out["coverage_leads"]]+ self.assertLess(names.index("Jia et al., 2026"), names.index("Liu et al., 2019"))+ self.assertGreater(+ {lead["lead"]: lead["mentions"] for lead in out["coverage_leads"]}["Liu et al., 2019"],+ {lead["lead"]: lead["mentions"] for lead in out["coverage_leads"]}["Jia et al., 2026"],+ )++ def test_a_fetched_identifier_covers_the_lead(self):+ sources = self.SOURCES + [{"id": "S4", "url": "https://arxiv.org/abs/2609.12541",+ "title": "Agent as Policy", "text": "Abstract."}]+ _, leads = self._leads(sources)+ self.assertNotIn("Jia et al., 2026", leads)+ _, leads = self._leads(fetched_urls=["https://arxiv.org/pdf/2609.12541v2"])+ self.assertNotIn("Jia et al., 2026", leads)++ def test_prose_does_not_attach_a_nearby_unrelated_url(self):+ # "Jia et al. (2026) showed ...; see https://data.example.org/other" is prose,+ # so fetching that URL must not mark the companion report as followed.+ _, leads = self._leads(fetched_urls=["https://data.example.org/other"])+ self.assertIn("Jia et al., 2026", leads)+ self.assertNotIn("https://data.example.org/other", leads["Jia et al., 2026"]["identifiers"])++ def test_standalone_identifiers_are_leads_except_a_source_s_own_doi(self):+ sources = [{"id": "s1", "url": "https://example.com/paper", "title": "Paper",+ "doi": "10.1234/abcd.5678",+ "text": "This paper (doi:10.1234/abcd.5678) builds on 10.5555/xyz.999 and arXiv:2501.01234."}]+ _, leads = self._leads(sources)+ self.assertIn("doi:10.5555/xyz.999", leads)+ self.assertIn("arXiv:2501.01234", leads)+ self.assertNotIn("doi:10.1234/abcd.5678", leads)++ def test_leads_are_bounded_and_counted(self):+ citations_text = " ".join("(Author{} et al., 2026)".format(chr(65 + i)) for i in range(14))+ out, _ = self._leads([{"id": "S1", "url": "https://example.com/survey", "title": "Survey",+ "text": citations_text}])+ self.assertEqual(len(out["coverage_leads"]), 10)+ self.assertEqual(out["summary"]["coverage_leads"], 14)++ def test_cli_reports_leads_and_counts_the_sibling_fetch_ledger(self):+ script = os.path.join(os.path.dirname(__file__), "..", "scripts", "citations.py")+ with tempfile.TemporaryDirectory() as root:+ input_path = os.path.join(root, "citations_input.json")+ output_path = os.path.join(root, "citations_output.json")+ with open(input_path, "w", encoding="utf-8") as fh:+ json.dump({"sources": self.SOURCES, "claims": []}, fh)++ def run():+ completed = subprocess.run(+ [sys.executable, script, "--op", "verify", "--input", input_path, "--out", output_path],+ check=True, capture_output=True, env={**os.environ, "ORKAS_DEEP_RESEARCH_EVIDENCE_FILE": ""},+ )+ return json.loads(completed.stdout.decode("ascii"))++ before = run()+ with open(os.path.join(root, "fetch_ledger.jsonl"), "w", encoding="utf-8") as fh:+ fh.write(json.dumps({"kind": "fetch", "url": "https://arxiv.org/abs/2609.12541",+ "status": "ok"}) + "\n")+ after = run()++ jia = [lead for lead in before["coverage_leads"] if lead["lead"] == "Jia et al., 2026"]+ self.assertEqual(len(jia), 1)+ self.assertLessEqual(len(jia[0]["context"]), 220)+ self.assertFalse([lead for lead in after["coverage_leads"] if lead["lead"] == "Jia et al., 2026"])++class UrlNormalization(unittest.TestCase):def test_normalize_equivalences(self):a = _normalize_url("https://Example.com/Path/")diff --git a/resources/builtin/system/skills/_system.json b/resources/builtin/system/skills/_system.jsonindex f3b71dee..ee6608c0 100644--- a/resources/builtin/system/skills/_system.json+++ b/resources/builtin/system/skills/_system.json@@ -9,10 +9,10 @@},{"id": "skill-creator",- "update_at": 1790685144182+ "update_at": 1792125132889},{"id": "web-app-sdk",- "update_at": 1790779866006+ "update_at": 1792073047732}]diff --git a/resources/builtin/system/skills/skill-creator/SKILL.md b/resources/builtin/system/skills/skill-creator/SKILL.mdindex d7dc7e54..33094944 100644--- a/resources/builtin/system/skills/skill-creator/SKILL.md+++ b/resources/builtin/system/skills/skill-creator/SKILL.md@@ -15,7 +15,7 @@ Before authoring, read the matching reference through this Skill's read ref:- New Skill, SKILL.md body rewrite, new reference, or bundled script → [authoring.md](references/authoring.md).- Name, description, category, routing hints, or any SKILL.md frontmatter work → [metadata.md](references/metadata.md).- URL, local directory, ZIP, attachment, pasted existing Skill, or any source-preserving import → [importing.md](references/importing.md) and [metadata.md](references/metadata.md).-- File deletion or imported-package cleanup → [file-deletion.md](references/file-deletion.md).+- Deleting files, package cleanup, or removing a whole Skill → [file-deletion.md](references/file-deletion.md).Do not read unrelated references. A category-only edit needs only `metadata.md`; a body-only guide edit normally needs only `authoring.md`; an import needs `importing.md` plus `metadata.md`.diff --git a/resources/builtin/system/skills/skill-creator/references/file-deletion.md b/resources/builtin/system/skills/skill-creator/references/file-deletion.mdindex dbb879c8..e4587cf6 100644--- a/resources/builtin/system/skills/skill-creator/references/file-deletion.md+++ b/resources/builtin/system/skills/skill-creator/references/file-deletion.md@@ -1,5 +1,11 @@# Deleting a file from a Skill+## Removing a whole Skill++Removing, disabling, or uninstalling a whole Skill is not a file deletion and has no protocol here. The user does it: in **Skills**, the card's **⋯** menu offers **Disable** and **Delete**; a Skill installed from **Marketplace** is uninstalled there with **Uninstall**. Give that path and stop.++## Files inside a Skill+Delete only files inside the current Skill directory. Never simulate deletion with an empty `<<<skill-file>>>` block.## Confirmation flowdiff --git a/resources/builtin/system/skills/skill-creator/references/importing.md b/resources/builtin/system/skills/skill-creator/references/importing.mdindex e287a828..c63cf748 100644--- a/resources/builtin/system/skills/skill-creator/references/importing.md+++ b/resources/builtin/system/skills/skill-creator/references/importing.md@@ -13,7 +13,7 @@ Read this file for a URL, local directory, ZIP, attachment, pasted existing SKILWhen `import_skill_package` is available and the user requests importing a local Skill directory or ZIP:1. Use the exact user-supplied `source_path` allowed by the tool's source-authorization contract; never infer a parent or sibling. Follow its clarification result when the source is ambiguous, changed, or unverifiable.-2. Call `import_skill_package` once. It discovers every SKILL.md, enforces archive/path limits, copies unchanged files, validates each Skill, rolls back rejected siblings, refreshes the registry, and binds successful Skills when applicable.+2. Use the native importer's preview for multiple Skills. Recommend a small relevant selection; use all only when the user explicitly requests it. Import selected keys in bounded batches; for all, continue through the returned cursor. Keep the original source and directory layout instead of staging or flattening a replacement tree. The host validates each Skill independently and preserves successful siblings.3. Do not re-emit unchanged package files or pass them through model output.4. Report rejected siblings with their reason; do not retry by silently renaming or overriding them. Successful siblings remain installed.5. After success, use only a small metadata edit when category/routing clearly needs correction. Do not rewrite source files for review alone.@@ -80,4 +80,4 @@ Do not use source/current identity as cleanup proof. Do not say “no cleanup ne## Completion report-Tell the user which Skill(s) were added, what each does, what meaningful files were preserved or minimally adapted, and any missing source/risk. Do **not** show a source URL or path by default unless requested or needed to diagnose failure.+Tell the user which Skill(s) were installed, what each does, what meaningful files were preserved or minimally adapted, and any missing source/risk. Distinguish installation, discoverability and tested execution; installing Skills does not migrate plugin connectors, hooks, commands or agents. Do **not** show a source URL or path by default unless requested or needed to diagnose failure.diff --git a/resources/builtin/system/skills/web-app-sdk/SKILL.md b/resources/builtin/system/skills/web-app-sdk/SKILL.mdindex 18afe79f..078eaf12 100644--- a/resources/builtin/system/skills/web-app-sdk/SKILL.md+++ b/resources/builtin/system/skills/web-app-sdk/SKILL.md@@ -1,122 +1,34 @@---name: web-app-sdk-description_zh: "为任务交互结果和我的应用创建、修改或排查使用 Orkas 模型、文件选择与导出、存储、知识库或连接器的 Web 应用。不用于普通网页设计、产品答疑或系统 Skill 修改;不授予执行权限。"-description_en: "Build, change or debug Web apps using Orkas models, file selection/export, storage, Library or connectors for interactive results and My Apps. Not ordinary website design, product help or System Skill editing; grants no execution authority."+description_zh: "创建、修改或排查本地应用和可发布的网页应用,按应用类型选择浏览器、通用数据和宿主接口。不用于产品答疑或系统 Skill 修改;不授予执行权限。"+description_en: "Build, change or debug local apps and publishable web apps, using the matching browser, common data or host contract. Not product help or System Skill editing; grants no execution authority."----# Orkas Web App SDK--Build browser interfaces against the host SDK. Keep credentials, account identity,-file paths and permission decisions in Orkas. Do not import Electron, forward-arbitrary IPC or copy the Agent runtime into the app.--## Find the actual contract--Read [the API reference](references/api.json) before choosing methods. It contains-the executable registry's input schemas, result shapes, examples and unsupported-families. Read [the starter HTML](assets/starter/index.html) and-[its manifest](assets/starter/orkas-app.json) when starting a bundle or checking-integration. These files are copyable inputs, not an executable Skill script.--The model's own tools are not Web APIs. `tools.list` in a running app lists only-eligible existing executors; never invent SDK methods from host tool names.--## Build and discover--1. Put `orkas-app.json` at the app bundle root. Set `sdkVersion: 1` and declare- only needed families from `storage`, `appFiles`, `files`, `ai`, `library`, `connectors`.-2. Load `<script src="/__orkas/sdk.js"></script>` before app code. Use- `window.orkasApp`. Local bundles and external HTTP(S) scripts, styles and assets- are supported in running apps and previews.-3. Call `capabilities.list()` to check support, declaration, availability and- authorization separately. Use `capabilities.describe({method})` for the- current schema. Never treat a declaration or discovery result as consent.-4. Use `api.<group>.<method>(arguments, {signal, onProgress})`. Both options are- optional; AI progress delivers text deltas. Render untrusted results with- `textContent`, not HTML. Inspect tool `isError` and AI `stopReason`.-5. Deliver through the existing interactive-result or saved-app workflow and- verify there. A loose HTML export or ordinary browser has no Orkas bridge.--## Capability boundaries--- **Storage:** JSON values private to this account and app source. Set- `scope: "cloud"` for business data to participate in the account's existing- cloud sync; use `scope: "local"` for caches. Omitted scope remains local for- old apps. There is no automatic migration from local or browser storage.-- **App files:** declare `appFiles` for relative-path text/binary files in the- app's private sandbox. Its default scope is cloud; choose local for caches.- Read/write/list/remove affect only this app. Source code is separate.- Reopening keeps data; copied/re-saved apps have independent sandboxes. Cloud- sync requires the same account and sync enabled on each device. Saved means- persisted on this device, not uploaded. Conflicts use Orkas Settings; there- is no SDK sync-status API. Keep explicit export for important data.- Preview redirects both scopes to disposable storage; it cannot prove sync.-- **Files:** native selection returns an opaque handle to a read-only snapshot,- not a path or permission to edit the original. Release handles after reading.- Picker/save cancellation returns `null`. Text export creates a new file; an- existing destination is refused. Orkas managed data cannot be selected.-- **AI:** configured model, supplied prompt only; no implicit conversation,- project, Agent, tools or Skill context. Ordinary generation needs no separate- app permission dialog. Requests can incur model charges; usage reports tokens, not price.- Show partial output as incomplete when `stopReason` is `max_tokens`.-- **Library:** eligible global Library operations without a separate app consent. There is- no inferred project binding from the source conversation.-- **Connectors:** discover `tools.list()`, then call its `list_connector_tools`- executor to obtain enabled connector/action schemas before invoking- `call_connector_tool`. Existing operation permissions apply: sensitive actions- use the Orkas dialog; Trusted runs available actions without confirmation.- Allow for this use covers the approved connector account and sensitive action- class until this app instance closes. Other apps and reopened instances do not- inherit it. External writes and fees are possible; inspect business errors.- Connector installation is not exposed.--Use browser `fetch`/XHR, EventSource or WebSocket for external APIs; no SDK network-method or manifest capability is needed. Browser CORS, mixed-content and endpoint-authentication still apply. External scripts run with the app's declared SDK-abilities. Handle failures and cancellation without replaying uncertain writes.-Automated `html_preview` allows Web-resources but isolates storage and disables account services; verify business-actions in the running app.--Read `unsupported` in the reference for excluded families and reasons. Shell,-task/Agent execution, Skill execution, project/history/-memory access, media generation and editing selected original files have no v1 adapter.--## Failure and lifecycle--Catch each action's failure and show a useful recovery state. A denied action-must leave the UI usable for an explicit retry. Never automatically replay AI or-tool calls after uncertain failure: spending or a remote write may already have-occurred. Aborting does not undo a completed external action.--Close, navigation away from the app, account switch, source change and `permissions.revoke()`-invalidate the instance. Reopen for fresh grants. Do not persist file handles.-When the host/model is unavailable, explain how to reopen in Orkas or configure-a model; do not substitute fabricated results or direct provider requests.--File and JSON-store byte limits follow PC's 200 MiB ceiling. The SDK adds no-quotas on file count, aggregate file bytes, storage-key count, instance count,-cumulative requests or concurrent calls. Owning services retain their limits; AI output defaults to the configured model. Tool results are application data and do not use-model-context token budgets. Initial host discovery times out after 10 seconds;-after connecting, operations use the owning service's timeout and cancellation.--## Language and interface quality--Use `host.getContext().language` for the app UI when no explicit app-language-requirement overrides it. Apply it to visible labels, errors, empty states,-accessible names and document `lang`, not just the model's reply. Preview returns-the same selected host language; its unavailable services need preview-specific-recovery rather than repeated configuration requests.--Use semantic HTML and accessible names for the actual controls and feedback.-When a requested explanatory region is a note, expose `role="note"`; a CSS class-named `note` alone has no accessibility semantics. Verify the rendered role and-text through the visible interaction flow, including cancellation and export.--## Verify delivery--Exercise the app's visible controls in Orkas: discover, use its declared-capabilities, cancel/deny, recover explicitly, close/reopen and export. Check that-an unrequested capability fails without side effects and that a second app cannot-read the first app's state. Use local model fixtures for engineering tests;-perform a billable test only within the user's explicit spending authorization.+# Application development++Use the creation task's selected type or the original app's type when editing.+Omit `create_artifact.appType` to inherit that platform binding. In ordinary+conversations, new apps default to local; use web only when the user requests it.+Editing retains the original type. Converting requires a new app identity.++Read [the common data contract](references/common.md), then the appropriate+reference before choosing APIs:++- Local: [local guidance](references/local.md), [API contract](references/api.json)+ and [starter](assets/starter/index.html). Local host JSON/files retain their+ 200 MiB ceiling and account-sync meaning.+- Web: [web guidance](references/web.md), [API contract](references/web-api.json)+ and [starter](assets/web/index.html). Apply this contract during generation,+ preview, unpublished desktop use and online use.++Build through `create_artifact` with a complete top-level index.html and relative+bundled paths. Include `orkas-app.json` in that same call, declaring every SDK+capability the app uses and, for data, its definition: a local app without it gets+no SDK, and a web app without it gets no data access. Read generated schemas for exact arguments and supported methods;+model tools are not application APIs. Do not invent unavailable interfaces.++Verify visible actions, empty/error states, cancellation, close/reopen and isolation.+Previews use temporary data and cannot prove formal or online persistence.+Preserve the existing save-new/update-original workflow. Publishing requires an+explicit user action through My Apps; saving or updating locally does not publish.+Use fixtures for engineering checks; paid generation needs separate spending authority.diff --git a/resources/builtin/system/skills/web-app-sdk/assets/web/index.html b/resources/builtin/system/skills/web-app-sdk/assets/web/index.htmlnew file mode 100644index 00000000..ea8b3740--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/assets/web/index.html@@ -0,0 +1,7 @@+<!doctype html><html lang="en"><meta charset="utf-8"><title>Messages</title><script src="/__orkas/sdk.js"></script><body><form><label>Message <input required maxlength="200" name="body"></label><button>Save</button></form><p role="status"></p><ul></ul><script>+const api=window.orkasApp,status=document.querySelector('[role=status]'),form=document.querySelector('form');+async function refresh(){const result=await api.data.query({table:'messages'});const list=document.querySelector('ul');list.replaceChildren();for(const record of result.records){const row=document.createElement('li');row.textContent=record.body;list.append(row);}}+let pending;+form.onsubmit=async event=>{event.preventDefault();const button=form.querySelector('button');button.disabled=true;let saved=false;try{pending ||= {table:'messages',values:{body:form.body.value},requestId:crypto.randomUUID()};await api.data.insert(pending);pending=undefined;form.reset();saved=true;await refresh();status.textContent='Saved';}catch(error){status.textContent=saved?'Saved. Refresh this page to load messages.':'Could not save. Try again.';}finally{button.disabled=false;}};+refresh().catch(()=>{status.textContent='Could not load messages.';});+</script></body></html>\ No newline at end of filediff --git a/resources/builtin/system/skills/web-app-sdk/assets/web/orkas-app.json b/resources/builtin/system/skills/web-app-sdk/assets/web/orkas-app.jsonnew file mode 100644index 00000000..d0a40452--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/assets/web/orkas-app.json@@ -0,0 +1,31 @@+{+ "sdkVersion": 1,+ "capabilities": [+ "data"+ ],+ "data": {+ "version": 1,+ "tables": [+ {+ "id": "messages",+ "name": "messages",+ "fields": [+ {+ "id": "body",+ "name": "body",+ "type": "string",+ "required": true+ }+ ],+ "access": {+ "read": [+ "body"+ ],+ "insert": [+ "body"+ ]+ }+ }+ ]+ }+}diff --git a/resources/builtin/system/skills/web-app-sdk/references/api.json b/resources/builtin/system/skills/web-app-sdk/references/api.jsonindex a3d69f8d..53be631c 100644--- a/resources/builtin/system/skills/web-app-sdk/references/api.json+++ b/resources/builtin/system/skills/web-app-sdk/references/api.json@@ -1,10 +1,885 @@{"sdkVersion": 1,+ "manifest": {+ "file": "orkas-app.json",+ "schema": {+ "type": "object",+ "properties": {+ "sdkVersion": {+ "type": "number",+ "const": 1+ },+ "minimumClient": {+ "type": "string",+ "const": "1.9.0"+ },+ "capabilities": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "storage",+ "appFiles",+ "files",+ "ai",+ "library",+ "connectors",+ "data"+ ]+ },+ "maxItems": 7+ },+ "data": {+ "type": "object",+ "properties": {+ "version": {+ "type": "number",+ "const": 1+ },+ "tables": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "type": {+ "type": "string",+ "enum": [+ "string",+ "number",+ "integer",+ "boolean",+ "json",+ "timestamp"+ ]+ },+ "required": {+ "type": "boolean"+ },+ "nullable": {+ "type": "boolean"+ },+ "unique": {+ "type": "boolean"+ },+ "default": {},+ "references": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "id",+ "name",+ "type"+ ],+ "additionalProperties": false+ },+ "maxItems": 128+ },+ "access": {+ "type": "object",+ "properties": {+ "read": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "insert": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "count": {+ "type": "boolean"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ },+ "aggregate": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "readFilters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "additionalProperties": false+ },+ "indexes": {+ "type": "array",+ "items": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "minItems": 1,+ "maxItems": 4+ },+ "maxItems": 16+ }+ },+ "required": [+ "id",+ "name",+ "fields",+ "access"+ ],+ "additionalProperties": false+ },+ "maxItems": 32+ }+ },+ "required": [+ "version",+ "tables"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "sdkVersion",+ "capabilities"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#",+ "allOf": [+ {+ "if": {+ "properties": {+ "capabilities": {+ "contains": {+ "const": "data"+ }+ }+ },+ "required": [+ "capabilities"+ ]+ },+ "then": {+ "required": [+ "data"+ ]+ }+ }+ ]+ },+ "starter": {+ "entry": "@skill/web-app-sdk/assets/starter/index.html",+ "manifest": "@skill/web-app-sdk/assets/starter/orkas-app.json"+ }+ },+ "dataDefinition": {+ "type": "object",+ "properties": {+ "version": {+ "type": "number",+ "const": 1+ },+ "tables": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "type": {+ "type": "string",+ "enum": [+ "string",+ "number",+ "integer",+ "boolean",+ "json",+ "timestamp"+ ]+ },+ "required": {+ "type": "boolean"+ },+ "nullable": {+ "type": "boolean"+ },+ "unique": {+ "type": "boolean"+ },+ "default": {},+ "references": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "id",+ "name",+ "type"+ ],+ "additionalProperties": false+ },+ "maxItems": 128+ },+ "access": {+ "type": "object",+ "properties": {+ "read": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "insert": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "count": {+ "type": "boolean"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ },+ "aggregate": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "readFilters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "additionalProperties": false+ },+ "indexes": {+ "type": "array",+ "items": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "minItems": 1,+ "maxItems": 4+ },+ "maxItems": 16+ }+ },+ "required": [+ "id",+ "name",+ "fields",+ "access"+ ],+ "additionalProperties": false+ },+ "maxItems": 32+ }+ },+ "required": [+ "version",+ "tables"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },"methods": [+ {+ "name": "data.query",+ "capability": "data",+ "description": "Read declared fields under readFilters; default limit 20, maximum 100, offset maximum 100000. Ordering adds id as a stable tie-breaker; include reads at most four declared one-hop relations.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "maxItems": 130+ },+ "include": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "maxItems": 4+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ },+ "limit": {+ "type": "integer",+ "minimum": 1,+ "maximum": 100+ },+ "offset": {+ "type": "integer",+ "minimum": 0,+ "maximum": 100000+ },+ "order": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "direction": {+ "type": "string",+ "enum": [+ "asc",+ "desc"+ ]+ }+ },+ "required": [+ "field",+ "direction"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{records:object[]}; include adds relations keyed by reference field.",+ "example": {+ "table": "messages",+ "fields": [+ "body"+ ],+ "limit": 20+ }+ },+ {+ "name": "data.count",+ "capability": "data",+ "description": "Count records under declared readFilters and caller filters; requires count permission.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{count:number}",+ "example": {+ "table": "messages"+ }+ },+ {+ "name": "data.insert",+ "capability": "data",+ "description": "Insert declared fields, apply defaults and meter canonical UTF-8 bytes atomically. requestId deduplicates the latest 2048 insert requests across reopening.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "values": {+ "type": "object",+ "additionalProperties": {}+ },+ "requestId": {+ "type": "string",+ "pattern": "^[A-Za-z0-9_-]{1,64}$"+ }+ },+ "required": [+ "table",+ "values"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{id:string}; generated record ID, never the private row.",+ "example": {+ "table": "messages",+ "values": {+ "body": "Hello"+ },+ "requestId": "message-1"+ }+ },+ {+ "name": "data.insertIf",+ "capability": "data",+ "description": "Atomically check whole-table count and insert. maxCount can only tighten the application declaration; full capacity returns E_CONDITION.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "values": {+ "type": "object",+ "additionalProperties": {}+ },+ "requestId": {+ "type": "string",+ "pattern": "^[A-Za-z0-9_-]{1,64}$"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ }+ },+ "required": [+ "table",+ "values",+ "maxCount"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{id:string}; no partial insertion on failure.",+ "example": {+ "table": "messages",+ "values": {+ "body": "Hello"+ },+ "maxCount": 100,+ "requestId": "message-2"+ }+ },+ {+ "name": "data.aggregate",+ "capability": "data",+ "description": "Compute a declared aggregate under readFilters and caller filters; groupBy requires read permission. Up to 100 groups; larger results fail with E_LIMIT.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "count",+ "sum",+ "min",+ "max",+ "avg"+ ]+ },+ "groupBy": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "required": [+ "table",+ "field",+ "op"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{value:number|string|null} or {groups:[{key,value}]} when groupBy is supplied.",+ "example": {+ "table": "messages",+ "field": "score",+ "op": "sum"+ }+ },{"name": "capabilities.list","capability": null,"description": "Discover supported methods, current availability and authorization requirements.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {},@@ -18,6 +893,16 @@"name": "capabilities.describe","capability": null,"description": "Read one method schema, result contract and example.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -34,13 +919,23 @@},"result": "Method documentation.","example": {- "method": "ai.generate"+ "method": "data.query"}},{"name": "host.getContext","capability": null,"description": "Read the current application language and SDK version.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {},@@ -54,6 +949,14 @@"name": "permissions.revoke","capability": null,"description": "Revoke this instance grants and cancel pending work. Reopening starts fresh.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {},@@ -67,6 +970,14 @@"name": "storage.get","capability": "storage","description": "Read app-private JSON; scope defaults to local for compatibility. cloud participates in account sync.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -98,6 +1009,14 @@"name": "storage.set","capability": "storage","description": "Atomically save an app-private JSON value; total store limit 200 MiB.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -132,6 +1051,14 @@"name": "storage.remove","capability": "storage","description": "Remove one app-private value.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -163,6 +1090,14 @@"name": "storage.keys","capability": "storage","description": "List keys in the selected app store.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -185,6 +1120,14 @@"name": "appFiles.list","capability": "appFiles","description": "List sandbox files recursively. cloud (default) syncs with the account; local is for caches.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -209,6 +1152,14 @@"name": "appFiles.readText","capability": "appFiles","description": "Read a sandbox UTF-8 file up to 200 MiB; missing files return null.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -241,6 +1192,14 @@"name": "appFiles.readBase64","capability": "appFiles","description": "Read a sandbox binary file up to 200 MiB; missing files return null.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -273,6 +1232,14 @@"name": "appFiles.writeText","capability": "appFiles","description": "Atomically replace an app-owned UTF-8 file (200 MiB). Creates parent directories. Saved means local persistence, not completed upload.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -311,6 +1278,14 @@"name": "appFiles.writeBase64","capability": "appFiles","description": "Atomically replace an app-owned binary file (200 MiB). Requires canonical base64.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -349,6 +1324,14 @@"name": "appFiles.remove","capability": "appFiles","description": "Remove one sandbox file; missing files are a successful no-op. Directories are not recursively deleted.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -381,6 +1364,14 @@"name": "files.pick","capability": "files","description": "Choose a local file using the host dialog; grants read access only.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {},@@ -394,6 +1385,14 @@"name": "files.readText","capability": "files","description": "Read a selected UTF-8 file, at most 200 MiB.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -417,6 +1416,14 @@"name": "files.readBase64","capability": "files","description": "Read a selected file as base64, at most 200 MiB.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -440,6 +1447,14 @@"name": "files.saveAs","capability": "files","description": "Export UTF-8 text using the host Save dialog. Create-only: choose a new destination; existing files are not overwritten.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -470,6 +1485,14 @@"name": "files.release","capability": "files","description": "Release a file handle before closing the app.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -493,6 +1516,14 @@"name": "ai.generate","capability": "ai","description": "Generate text with the configured model without tools, skills or conversation history. Optional progress receives text deltas. Uses the configured model without an extra application permission dialog.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -523,6 +1554,14 @@"name": "tools.list","capability": null,"description": "Discover eligible existing Orkas tools and their original schemas. Connector discovery supports BM25 query, bounded pages and full schemas for small catalogs through list_connector_tools. Does not grant execution.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {},@@ -536,6 +1575,14 @@"name": "tools.call","capability": null,"description": "Execute an eligible existing tool under its original operation permissions. Sensitive actions use host approval; Trusted mode skips confirmation. Unknown tools fail closed.",+ "appTypes": [+ "local"+ ],+ "environments": [+ "desktop",+ "preview"+ ],+ "status": "supported","inputSchema": {"type": "object","properties": {@@ -567,6 +1614,14 @@}],"unsupported": [+ {+ "capability": "account.renewalReminders",+ "reason": "Host-only: account-wide reminder claims and billing navigation belong to the signed-in desktop account UI, not saved applications."+ },+ {+ "capability": "browser",+ "reason": "Host-only: task browser control, native file selection and site consent require a live conversation and its user-owned Chromium profile."+ },{"capability": "files.writeInPlace","reason": "Deferred: needs shared revision/lock/indexer integration; export through files.saveAs."diff --git a/resources/builtin/system/skills/web-app-sdk/references/common.md b/resources/builtin/system/skills/web-app-sdk/references/common.mdnew file mode 100644index 00000000..e48de7ea--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/references/common.md@@ -0,0 +1,34 @@+# Common data semantics++The generated API reference includes the exact version-1 data definition schema.+Use stable table/field IDs. Renaming a display name preserves data; removal,+constraint/type changes and incompatible references fail migration.++Records have a platform-generated id and UTC createdAt. Values are finite safe+numbers, booleans, UTF-8 strings, JSON objects/arrays or null on nullable fields.+Timestamp fields use UTC ISO strings, normalized to millisecond precision.+Omitted fields use explicit defaults or remain absent. Query comparisons use+SQLite BINARY strings; ordering adds id as a stable tie-breaker. Canonical JSON+UTF-8 record bytes meter the online 20 MiB limit, including id/createdAt. JSON+null and absent fields both match a null filter. User-provided SQL is rejected.++Queries, counts and aggregates apply the declared read fields and readFilters.+Declared references target stable table IDs; include performs one-hop reads under+the target's read permissions. References must identify an existing record;+author deletion refuses references instead of silently cascading.++insertIf atomically checks the whole table count and inserts within one database+transaction; caller maxCount can only tighten the declared maxCount. This is a+generic concurrency operation, not a domain-specific enrollment or inventory API.+requestId deduplicates the same insert across reopening; conflicting reuse fails.+Bounded retention covers the latest 2048 requests. Show an explicit outcome when+a retry is outside this window. Runtime update/delete are not supported in v1.++Personal desktop sync restores local data on another device; it never migrates+online data. Previews use temporary records. Handle unavailable/busy/permission/+capacity conditions visibly; do not fabricate successful records.++Use host.getContext().language for labels, errors, empty states, accessible names+and document lang unless the user requested a fixed application language. In a+public browser it reflects the visitor's language; desktop and preview use the+selected host language. Verify the visible controls in each intended language.diff --git a/resources/builtin/system/skills/web-app-sdk/references/local.md b/resources/builtin/system/skills/web-app-sdk/references/local.mdnew file mode 100644index 00000000..7b003413--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/references/local.md@@ -0,0 +1,87 @@+# Local application interfaces++Read [the local API contract](api.json) and [starter](../assets/starter/index.html).++## Capability boundaries++- **Storage:** JSON values private to this account and app source. Set+ `scope: "cloud"` for business data to participate in the account's existing+ cloud sync; use `scope: "local"` for caches. Omitted scope remains local for+ old apps. There is no automatic migration from local or browser storage.+- **App files:** declare `appFiles` for relative-path text/binary files in the+ app's private sandbox. Its default scope is cloud; choose local for caches.+ Read/write/list/remove affect only this app. Source code is separate.+ Reopening keeps data; copied/re-saved apps have independent sandboxes. Cloud+ sync requires the same account and sync enabled on each device. Saved means+ persisted on this device, not uploaded. Conflicts use Orkas Settings; there+ is no SDK sync-status API. Keep explicit export for important data.+ Preview redirects both scopes to disposable storage; it cannot prove sync.+- **Files:** native selection returns an opaque handle to a read-only snapshot,+ not a path or permission to edit the original. Release handles after reading.+ Picker/save cancellation returns `null`. Text export creates a new file; an+ existing destination is refused. Orkas managed data cannot be selected.+- **AI:** configured model, supplied prompt only; no implicit conversation,+ project, Agent, tools or Skill context. Ordinary generation needs no separate+ app permission dialog. Requests can incur model charges; usage reports tokens, not price.+ Show partial output as incomplete when `stopReason` is `max_tokens`.+- **Library:** eligible global Library operations without a separate app consent. There is+ no inferred project binding from the source conversation.+- **Connectors:** discover `tools.list()`, then call its `list_connector_tools`+ executor to obtain enabled connector/action schemas before invoking+ `call_connector_tool`. Existing operation permissions apply: sensitive actions+ use the Orkas dialog; Trusted runs available actions without confirmation.+ Allow for this use covers the approved connector account and sensitive action+ class until this app instance closes. Other apps and reopened instances do not+ inherit it. External writes and fees are possible; inspect business errors.+ Connector installation is not exposed.++Use browser `fetch`/XHR, EventSource or WebSocket for external APIs; no SDK network+method or manifest capability is needed. Browser CORS, mixed-content and endpoint+authentication still apply. External scripts run with the app's declared SDK+abilities. Handle failures and cancellation without replaying uncertain writes.+Automated `html_preview` allows Web+resources but isolates storage and disables account services; verify business+actions in the running app.++Read `unsupported` in the reference for excluded families and reasons. Shell,+task/Agent execution, Skill execution, project/history/+memory access, media generation and editing selected original files have no v1 adapter.++## Failure and lifecycle++Catch each action's failure and show a useful recovery state. A denied action+must leave the UI usable for an explicit retry. Never automatically replay AI or+tool calls after uncertain failure: spending or a remote write may already have+occurred. Aborting does not undo a completed external action.++Close, navigation away from the app, account switch, source change and `permissions.revoke()`+invalidate the instance. Reopen for fresh grants. Do not persist file handles.+When the host/model is unavailable, explain how to reopen in Orkas or configure+a model; do not substitute fabricated results or direct provider requests.++File and JSON-store byte limits follow PC's 200 MiB ceiling. The SDK adds no+quotas on file count, aggregate file bytes, storage-key count, instance count,+cumulative requests or concurrent calls. Owning services retain their limits; AI output defaults to the configured model. Tool results are application data and do not use+model-context token budgets. Initial host discovery times out after 10 seconds;+after connecting, operations use the owning service's timeout and cancellation.++## Language and interface quality++Use `host.getContext().language` for the app UI when no explicit app-language+requirement overrides it. Apply it to visible labels, errors, empty states,+accessible names and document `lang`, not just the model's reply. Preview returns+the same selected host language; its unavailable services need preview-specific+recovery rather than repeated configuration requests.++Use semantic HTML and accessible names for the actual controls and feedback.+When a requested explanatory region is a note, expose `role="note"`; a CSS class+named `note` alone has no accessibility semantics. Verify the rendered role and+text through the visible interaction flow, including cancellation and export.++## Verify delivery++Exercise the app's visible controls in Orkas: discover, use its declared+capabilities, cancel/deny, recover explicitly, close/reopen and export. Check that+an unrequested capability fails without side effects and that a second app cannot+read the first app's state. Use local model fixtures for engineering tests;+perform a billable test only within the user's explicit spending authorization.diff --git a/resources/builtin/system/skills/web-app-sdk/references/web-api.json b/resources/builtin/system/skills/web-app-sdk/references/web-api.jsonnew file mode 100644index 00000000..6b86a368--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/references/web-api.json@@ -0,0 +1,985 @@+{+ "sdkVersion": 1,+ "manifest": {+ "file": "orkas-app.json",+ "schema": {+ "type": "object",+ "properties": {+ "sdkVersion": {+ "type": "number",+ "const": 1+ },+ "minimumClient": {+ "type": "string",+ "const": "1.9.0"+ },+ "capabilities": {+ "type": "array",+ "items": {+ "type": "string",+ "enum": [+ "data"+ ]+ },+ "maxItems": 7+ },+ "data": {+ "type": "object",+ "properties": {+ "version": {+ "type": "number",+ "const": 1+ },+ "tables": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "type": {+ "type": "string",+ "enum": [+ "string",+ "number",+ "integer",+ "boolean",+ "json",+ "timestamp"+ ]+ },+ "required": {+ "type": "boolean"+ },+ "nullable": {+ "type": "boolean"+ },+ "unique": {+ "type": "boolean"+ },+ "default": {},+ "references": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "id",+ "name",+ "type"+ ],+ "additionalProperties": false+ },+ "maxItems": 128+ },+ "access": {+ "type": "object",+ "properties": {+ "read": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "insert": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "count": {+ "type": "boolean"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ },+ "aggregate": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "readFilters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "additionalProperties": false+ },+ "indexes": {+ "type": "array",+ "items": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "minItems": 1,+ "maxItems": 4+ },+ "maxItems": 16+ }+ },+ "required": [+ "id",+ "name",+ "fields",+ "access"+ ],+ "additionalProperties": false+ },+ "maxItems": 32+ }+ },+ "required": [+ "version",+ "tables"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "sdkVersion",+ "capabilities"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#",+ "allOf": [+ {+ "if": {+ "properties": {+ "capabilities": {+ "contains": {+ "const": "data"+ }+ }+ },+ "required": [+ "capabilities"+ ]+ },+ "then": {+ "required": [+ "data"+ ]+ }+ }+ ]+ },+ "starter": {+ "entry": "@skill/web-app-sdk/assets/web/index.html",+ "manifest": "@skill/web-app-sdk/assets/web/orkas-app.json"+ }+ },+ "dataDefinition": {+ "type": "object",+ "properties": {+ "version": {+ "type": "number",+ "const": 1+ },+ "tables": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "name": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "type": {+ "type": "string",+ "enum": [+ "string",+ "number",+ "integer",+ "boolean",+ "json",+ "timestamp"+ ]+ },+ "required": {+ "type": "boolean"+ },+ "nullable": {+ "type": "boolean"+ },+ "unique": {+ "type": "boolean"+ },+ "default": {},+ "references": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "id",+ "name",+ "type"+ ],+ "additionalProperties": false+ },+ "maxItems": 128+ },+ "access": {+ "type": "object",+ "properties": {+ "read": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "insert": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "default": []+ },+ "count": {+ "type": "boolean"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ },+ "aggregate": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ }+ },+ "readFilters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "additionalProperties": false+ },+ "indexes": {+ "type": "array",+ "items": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "minItems": 1,+ "maxItems": 4+ },+ "maxItems": 16+ }+ },+ "required": [+ "id",+ "name",+ "fields",+ "access"+ ],+ "additionalProperties": false+ },+ "maxItems": 32+ }+ },+ "required": [+ "version",+ "tables"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "methods": [+ {+ "name": "data.query",+ "capability": "data",+ "description": "Read declared fields under readFilters; default limit 20, maximum 100, offset maximum 100000. Ordering adds id as a stable tie-breaker; include reads at most four declared one-hop relations.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "fields": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "maxItems": 130+ },+ "include": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "maxItems": 4+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ },+ "limit": {+ "type": "integer",+ "minimum": 1,+ "maximum": 100+ },+ "offset": {+ "type": "integer",+ "minimum": 0,+ "maximum": 100000+ },+ "order": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "direction": {+ "type": "string",+ "enum": [+ "asc",+ "desc"+ ]+ }+ },+ "required": [+ "field",+ "direction"+ ],+ "additionalProperties": false+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{records:object[]}; include adds relations keyed by reference field.",+ "example": {+ "table": "messages",+ "fields": [+ "body"+ ],+ "limit": 20+ }+ },+ {+ "name": "data.count",+ "capability": "data",+ "description": "Count records under declared readFilters and caller filters; requires count permission.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "required": [+ "table"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{count:number}",+ "example": {+ "table": "messages"+ }+ },+ {+ "name": "data.insert",+ "capability": "data",+ "description": "Insert declared fields, apply defaults and meter canonical UTF-8 bytes atomically. requestId deduplicates the latest 2048 insert requests across reopening.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "values": {+ "type": "object",+ "additionalProperties": {}+ },+ "requestId": {+ "type": "string",+ "pattern": "^[A-Za-z0-9_-]{1,64}$"+ }+ },+ "required": [+ "table",+ "values"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{id:string}; generated record ID, never the private row.",+ "example": {+ "table": "messages",+ "values": {+ "body": "Hello"+ },+ "requestId": "message-1"+ }+ },+ {+ "name": "data.insertIf",+ "capability": "data",+ "description": "Atomically check whole-table count and insert. maxCount can only tighten the application declaration; full capacity returns E_CONDITION.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "values": {+ "type": "object",+ "additionalProperties": {}+ },+ "requestId": {+ "type": "string",+ "pattern": "^[A-Za-z0-9_-]{1,64}$"+ },+ "maxCount": {+ "type": "integer",+ "minimum": 1,+ "maximum": 1000000+ }+ },+ "required": [+ "table",+ "values",+ "maxCount"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{id:string}; no partial insertion on failure.",+ "example": {+ "table": "messages",+ "values": {+ "body": "Hello"+ },+ "maxCount": 100,+ "requestId": "message-2"+ }+ },+ {+ "name": "data.aggregate",+ "capability": "data",+ "description": "Compute a declared aggregate under readFilters and caller filters; groupBy requires read permission. Up to 100 groups; larger results fail with E_LIMIT.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "table": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "count",+ "sum",+ "min",+ "max",+ "avg"+ ]+ },+ "groupBy": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "filters": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "field": {+ "type": "string",+ "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$"+ },+ "op": {+ "type": "string",+ "enum": [+ "eq",+ "ne",+ "lt",+ "lte",+ "gt",+ "gte"+ ]+ },+ "value": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number",+ "minimum": -9007199254740991,+ "maximum": 9007199254740991+ },+ {+ "type": "boolean"+ },+ {+ "type": "null"+ }+ ]+ }+ },+ "required": [+ "field",+ "op",+ "value"+ ],+ "additionalProperties": false+ },+ "maxItems": 16+ }+ },+ "required": [+ "table",+ "field",+ "op"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{value:number|string|null} or {groups:[{key,value}]} when groupBy is supplied.",+ "example": {+ "table": "messages",+ "field": "score",+ "op": "sum"+ }+ },+ {+ "name": "capabilities.list",+ "capability": null,+ "description": "Discover supported methods, current availability and authorization requirements.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {},+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{sdkVersion, methods, unsupported}",+ "example": {}+ },+ {+ "name": "capabilities.describe",+ "capability": null,+ "description": "Read one method schema, result contract and example.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {+ "method": {+ "type": "string",+ "minLength": 1+ }+ },+ "required": [+ "method"+ ],+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "Method documentation.",+ "example": {+ "method": "data.query"+ }+ },+ {+ "name": "host.getContext",+ "capability": null,+ "description": "Read the current application language and SDK version.",+ "appTypes": [+ "local",+ "web"+ ],+ "environments": [+ "desktop",+ "preview",+ "online"+ ],+ "status": "supported",+ "inputSchema": {+ "type": "object",+ "properties": {},+ "additionalProperties": false,+ "$schema": "http://json-schema.org/draft-07/schema#"+ },+ "result": "{language, sdkVersion}",+ "example": {}+ }+ ],+ "unsupported": [+ {+ "capability": "account.renewalReminders",+ "reason": "Host-only: account-wide reminder claims and billing navigation belong to the signed-in desktop account UI, not saved applications."+ },+ {+ "capability": "browser",+ "reason": "Host-only: task browser control, native file selection and site consent require a live conversation and its user-owned Chromium profile."+ },+ {+ "capability": "files.writeInPlace",+ "reason": "Deferred: needs shared revision/lock/indexer integration; export through files.saveAs."+ },+ {+ "capability": "projects",+ "reason": "Deferred: apps have no user-selected project binding; source conversation is not authority."+ },+ {+ "capability": "memory",+ "reason": "Deferred: needs a user-selected scope; Agent-private and global memories are not app state."+ },+ {+ "capability": "history",+ "reason": "Deferred: needs an explicit conversation grant and bounded history projection."+ },+ {+ "capability": "agents.tasks",+ "reason": "Deferred: needs a host-owned task lifetime, permissions and billing association."+ },+ {+ "capability": "skills",+ "reason": "Host-only: Skill script execution needs an explicitly scoped application sandbox and execution contract."+ },+ {+ "capability": "shell",+ "reason": "Host-only: arbitrary execution would escape the application capability boundary."+ },+ {+ "capability": "media.generate",+ "reason": "Deferred: owning studio plan, output and spending gates must be adapted first."+ }+ ]+}diff --git a/resources/builtin/system/skills/web-app-sdk/references/web.md b/resources/builtin/system/skills/web-app-sdk/references/web.mdnew file mode 100644index 00000000..1409ae83--- /dev/null+++ b/resources/builtin/system/skills/web-app-sdk/references/web.md@@ -0,0 +1,22 @@+# Web applications++Read [the web API contract](web-api.json) before implementation.+Only browser standard APIs and that common SDK are available, including when+running inside the desktop. Desktop files, models, Library, connectors, host+storage/appFiles and raw IPC are unavailable. A web application must not+implement an initial desktop-only dependency and defer compatibility to publishing.++Load /__orkas/sdk.js before application code and use window.orkasApp.+Only declared fields and operations are accessible to visitors. Define visibility+and business logic for the application; author management is a separate platform flow.+There is no visitor update/delete, arbitrary SQL or custom server program.++Desktop and online databases are separate. First publication starts empty;+updates preserve compatible online records. Bundled JSON is preloaded content,+not runtime records; use relative asset URLs. Visitor asset upload is unavailable.+Use browser fetch for external services under their CORS/authentication contract;+never put provider or author secrets into the bundle.++Catch structured SDK failures and keep controls usable for explicit retries.+Use a stable requestId for an insert the user explicitly retries; never replay an+uncertain write automatically. Capacity and permission failures must be visible.diff --git a/test/eval/uidesigner-benchmark-contract.test.ts b/test/eval/uidesigner-benchmark-contract.test.tsindex 3016eec0..8a431196 100644--- a/test/eval/uidesigner-benchmark-contract.test.ts+++ b/test/eval/uidesigner-benchmark-contract.test.ts@@ -101,4 +101,66 @@ it('keeps only UIDesigner routing boundaries resident and delegates source mechaexpect(guidance).toMatch(/claims cite only executed evidence/i);});++ /**+ * 2026-10-07: a home-page redesign took 17 revisions. The ordinary route+ * never loaded a skill that judged layout or polish, re-drew the product+ * instead of reusing it, patched copy into slots of the wrong level, and+ * added states and buttons nobody asked for. The rules that answer each of+ * those live in the always-loaded skills; html_preview's measured design+ * warnings are covered in html_preview.test.ts.+ */+ it('keeps visual craft and live-product authority in the always-loaded route', () => {+ const ordinary = [shippedAgent.workflow, skillBody('ui-design-executor'), skillBody('ui-artifact-workspace'), ...shippedAgent.standards].join('\n\n');+ expect(ordinary).toContain('## Visual Craft Baseline');+ expect(ordinary).not.toContain('## skill: ui-taste');+ expect(ordinary).not.toContain('## skill: ui-craft-checks');+ expect(ordinary).toMatch(/parallel[\s\S]{0,120}same component, heading level, size, weight, width, and alignment/i);+ expect(ordinary).toMatch(/9 → 3×3, not 5\+4/);+ expect(ordinary).toMatch(/each baseline item is either `ok` with what was compared, or names the element, the problem, and the fix/i);+ expect(ordinary).toMatch(/Fix every design warning or state why it stays/i);+ expect(ordinary).toMatch(/written visual review against the executor's Visual Craft Baseline/i);+ expect(shippedAgent.standards.join('\n')).toMatch(/standalone artifact has[^.]*written visual review/i);++ // A layout redesign of an existing screen keeps the product's visual layer.+ expect(ordinary).toMatch(/does not license a new visual language/i);+ expect(skillBody('ui-design-source')).toMatch(/Redesign scope is per layer/);+ expect(ordinary).toMatch(/re-read the repo component, copy, and styles when the user refers to the live product/i);+ expect(ordinary).toMatch(/record the product source it points to/i);++ // Structural revisions replace the region instead of stacking overrides.+ expect(ordinary).toMatch(/never stack override blocks at the end of a stylesheet/i);+ expect(ordinary).toMatch(/rewrite its markup and style block together/i);++ // States and controls need a caller; checklists alone do not add them.+ expect(ordinary).toMatch(/populated and empty by default/i);+ expect(ordinary).toMatch(/do not add a demo state switcher/i);+ expect(ordinary).toMatch(/Do not invent buttons, chips, links, or prefill shortcuts/i);+ expect(ordinary).not.toMatch(/populated, loading, empty, error, and partial\/stale when the surface actually fetches/i);+ expect(skillBody('ui-craft-checks')).toMatch(/An unrequested demo state switcher is not required/);+ });++ /**+ * 2026-10-09: a project-detail layout redesign passed every baseline item+ * yet only removed borders. Its own review never compared against the+ * user's screenshot, never asked why rows left most of a wide pane empty,+ * and accepted native selects and letter avatars in place of product+ * controls. The review lists weak points without forcing a fix, and a single+ * repair round keeps it from looping.+ */+ it('diagnoses a redesign, fits space to content, and reviews against the source in one round', () => {+ const ordinary = [shippedAgent.workflow, skillBody('ui-design-executor'), skillBody('ui-artifact-workspace'), ...shippedAgent.standards].join('\n\n');+ expect(ordinary).toMatch(/a diagnosis: at most three concrete causes read from their screenshot/i);+ expect(ordinary).toMatch(/Every change answers one cause; the final review checks each/i);+ expect(ordinary).toMatch(/real text lengths and where they are truncated/i);+ expect(ordinary).toMatch(/the layout layer is in scope/i);+ expect(ordinary).toMatch(/Removing borders alone is not a layout redesign/i);+ expect(ordinary).toMatch(/\*\*Space fits content\.\*\*/);+ expect(ordinary).toMatch(/Prototype convenience does not swap product controls/i);+ expect(ordinary).toMatch(/side by side with the user's screenshot or the source rendering/i);+ expect(ordinary).toMatch(/up to three weakest remaining points, each marked `fix now` or `keep`/i);+ expect(ordinary).toMatch(/never invent a problem to fill it/i);+ expect(ordinary).toMatch(/That is the only repair round/i);+ expect(skillBody('ui-design-source')).toMatch(/A requested layout redesign puts widths, grouping, density/i);+ });});diff --git a/test/main/features/deep-research-skill-scripts.test.ts b/test/main/features/deep-research-skill-scripts.test.tsindex 55736221..00cd23db 100644--- a/test/main/features/deep-research-skill-scripts.test.ts+++ b/test/main/features/deep-research-skill-scripts.test.ts@@ -63,6 +63,7 @@ describe('DeepResearch bundled Skill scripts through run-skill.cjs', () => {max_fetches_per_subquestion: 4,max_depth: 2,},+ caps_reason: 'The user asked for a quick check of at most six sources.',});const result = runScript('caps', [@@ -82,6 +83,30 @@ describe('DeepResearch bundled Skill scripts through run-skill.cjs', () => {expect(output.data.fetch_budget_per_subquestion).toBe(3);expect(output.data.dropped.duplicates).toEqual(['What is the current policy?']);expect(output.data.dropped.over_cap).toEqual(['What evidence is required?']);+ expect(output.data.caps_reason).toBe('The user asked for a quick check of at most six sources.');+ });++ it('refuses lowered fetch caps without a reason and writes no plan', () => {+ // The 2026-10-02 "detailed research" run chose 12/5 with no budget behind it.+ writeJson('caps_input.json', {+ depth: 1,+ subquestions: ['Name and demonstrations', 'Spatial optimization', 'Evaluation'],+ caps: { max_fetches: 12, max_fetches_per_subquestion: 5 },+ });++ const result = runScript('caps', [+ '--op', 'plan',+ '--input', 'caps_input.json',+ '--out', 'caps_plan.json',+ ]);++ expect(result.status).toBe(1);+ const error = JSON.parse(result.stderr.trim());+ expect(error.ok).toBe(false);+ expect(error.error).toContain('max_fetches 12, max_fetches_per_subquestion 5');+ expect(error.error).toContain('max_fetches 40, max_fetches_per_subquestion 8');+ expect(error.error).toContain('caps_reason');+ expect(fs.existsSync(path.join(tmpDir, 'caps_plan.json'))).toBe(false);});it('compresses workspace evidence under the requested hard character budget', () => {diff --git a/test/main/quality/skill-engineering-contract.test.ts b/test/main/quality/skill-engineering-contract.test.tsindex a242ef17..bbc81d32 100644--- a/test/main/quality/skill-engineering-contract.test.ts+++ b/test/main/quality/skill-engineering-contract.test.ts@@ -5,13 +5,18 @@ import { describe, expect, it } from 'vitest';const root = process.cwd();describe('Task tool project scope', () => {- it('scopes the task tool Library save instruction to Project conversations', () => {- // Both native and CLI descriptions must condition this project-only tool.- const scoped = /In a Project conversation[^\n]+library_save[^\n]+outside one/;++ it('keeps the retired result_ref Library-save instruction out of the task tool schemas', () => {+ // 175d9c432 retired `result_ref` and its "save project output with+ // library_save" clause from todo_tasks: completion needs task_id only, and the+ // clause encouraged unsolicited Library copies. Neither the native nor the CLI+ // schema may reintroduce the field or route task output through library_save.+ const retired = /result_ref|In a Project conversation[^\n]+library_save/;for (const file of ['src/core-agent/src/tools/project-tasks-tool.ts', 'bin/orkas-bridge.cjs']) {const source = fs.readFileSync(path.join(root, file), 'utf8');- expect(source).toMatch(scoped);+ expect(source).not.toMatch(retired);}- expect('Save a produced project file with library_save.').not.toMatch(scoped);+ expect('result_ref: z.string().optional()').toMatch(retired);+ expect('In a Project conversation, save produced project files with library_save').toMatch(retired);});});