Open source CapCut alternative.
TypeScript
Skip unchanged nightly builds
David Lebc42e586eb2f
diff --git a/.claude/settings.json b/.claude/settings.jsonnew file mode 100644index 00000000..79f2b770--- /dev/null+++ b/.claude/settings.json@@ -0,0 +1,7 @@+{+ "permissions": {+ "allow": [+ "Bash(awk:*)"+ ]+ }+}diff --git a/.claude/settings.local.json b/.claude/settings.local.jsonindex d2d7dc24..c21ba0cd 100644--- a/.claude/settings.local.json+++ b/.claude/settings.local.json@@ -24,7 +24,10 @@"Bash(rm -f /tmp/spotify-agent-turn*.jpg)","Bash(node -e \"const p=require\\('./package.json'\\); console.log\\(Object.keys\\(p.scripts||{}\\).join\\(', '\\)\\)\")","Bash(npx tsc *)",- "Bash(pkill -9 -f \"swift-test|swift-build|swiftpm-testing-helper|swift test|swift build\")"+ "Bash(pkill -9 -f \"swift-test|swift-build|swiftpm-testing-helper|swift test|swift build\")",+ "Bash(python3 -)",+ "Bash(python3 -c \"import json; json.load\\(open\\('.claude/settings.json'\\)\\); json.load\\(open\\('.claude/settings.local.json'\\)\\); print\\('both valid JSON'\\)\")",+ "Bash(python3 -c \"import json;print\\(len\\(json.load\\(open\\('.claude/settings.local.json'\\)\\)['permissions']['allow']\\)\\)\")"]}}diff --git a/.github/workflows/nightly-donkey-build.yml b/.github/workflows/nightly-donkey-build.ymlindex 2225fe71..561276cc 100644--- a/.github/workflows/nightly-donkey-build.yml+++ b/.github/workflows/nightly-donkey-build.yml@@ -24,7 +24,39 @@ jobs:fetch-depth: 0ref: ${{ github.event.repository.default_branch }}+ - name: Fetch tags+ run: git fetch --tags --force origin++ - name: Check for nightly changes+ id: changes+ env:+ TAG: nightly+ run: |+ target_sha="$(git rev-parse HEAD)"+ previous_sha=""+ should_build=true++ if previous_sha="$(git rev-parse -q --verify "${TAG}^{commit}")"; then+ if [[ "$previous_sha" == "$target_sha" ]]; then+ should_build=false+ fi+ fi++ {+ echo "target_sha=$target_sha"+ echo "previous_sha=$previous_sha"+ echo "should_build=$should_build"+ } >> "$GITHUB_OUTPUT"++ - name: Skip unchanged nightly build+ if: steps.changes.outputs.should_build != 'true'+ run: |+ echo "The nightly tag already points at ${TARGET_SHA}; skipping package and publish steps."+ env:+ TARGET_SHA: ${{ steps.changes.outputs.target_sha }}+- name: Prepare nightly values+ if: steps.changes.outputs.should_build == 'true'id: nightlyrun: |version="$(python3 - <<'PY'@@ -44,26 +76,30 @@ jobs:echo "version=$version"echo "build=$build"echo "tag=nightly"- echo "target_sha=$(git rev-parse HEAD)"+ echo "target_sha=${{ steps.changes.outputs.target_sha }}"echo "built_at=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"} >> "$GITHUB_OUTPUT"- name: Install packaging dependencies+ if: steps.changes.outputs.should_build == 'true'run: |if ! command -v magick >/dev/null 2>&1; thenbrew install imagemagickfi- name: Package Donkey+ if: steps.changes.outputs.should_build == 'true'env:DONKEY_APP_VERSION: ${{ steps.nightly.outputs.version }}DONKEY_APP_BUILD: ${{ steps.nightly.outputs.build }}run: ./scripts/package-donkey-app.sh- name: Generate checksum+ if: steps.changes.outputs.should_build == 'true'run: shasum -a 256 dist/Donkey.dmg > dist/Donkey.dmg.sha256- name: Publish nightly prerelease+ if: steps.changes.outputs.should_build == 'true'env:GH_TOKEN: ${{ github.token }}TAG: ${{ steps.nightly.outputs.tag }}diff --git a/apps/Donkey/Sources/DonkeyAI/DebugUIInspectionHostedAdapter.swift b/apps/Donkey/Sources/DonkeyAI/DebugUIInspectionHostedAdapter.swiftindex fdc19da2..a23e35de 100644--- a/apps/Donkey/Sources/DonkeyAI/DebugUIInspectionHostedAdapter.swift+++ b/apps/Donkey/Sources/DonkeyAI/DebugUIInspectionHostedAdapter.swift@@ -113,7 +113,7 @@ public struct HostedDebugUIInspectionAnalyzer: DebugUIInspectionAnalyzing {let width = max(1, Int(pixelSize.width.rounded()))let height = max(1, Int(pixelSize.height.rounded()))return """- You are a read-only macOS UI inspection model. Return bounding boxes for visible visual controls that are likely clickable or otherwise user-interactable. Return ONLY valid JSON.+ You are a read-only macOS UI inspection model. Return bounding boxes for visible visual controls that are likely clickable or otherwise user-interactable.The attached screenshot coordinate space is exactly \(width) pixels wide by \(height) pixels high.@@ -126,9 +126,6 @@ public struct HostedDebugUIInspectionAnalyzer: DebugUIInspectionAnalyzing {Do not return an empty elements array unless the screenshot is blank or contains no visible UI. For a normal macOS desktop screenshot, return the visible controls you can identify.Do not click, type, scroll, drag, navigate, call tools, or propose actions. This is visual inspection only.-- Return exactly:- {"coordinate_space":{"width":\(width),"height":\(height)},"elements":[{"id":"stable_unique_id","type":"button","label":"Save","description":"Saves current document","bbox":{"x":120,"y":340,"width":88,"height":32},"confidence":0.98,"visual_style":{"overlay_color":"#3B82F6","border_color":"#60A5FA","label_color":"#FFFFFF"}}]}"""}@@ -200,15 +197,25 @@ public struct HostedDebugUIInspectionAnalyzer: DebugUIInspectionAnalyzing {.string("visual_style")]),"properties": .object([- "id": .object(["type": .string("string")]),+ "id": .object([+ "type": .string("string"),+ "description": .string("Stable unique identifier for this control.")+ ]),"type": .object(["type": .string("string"),"enum": .array(DebugUIElementType.allCases.map { .string($0.rawValue) })]),- "label": .object(["type": .string("string")]),- "description": .object(["type": .string("string")]),+ "label": .object([+ "type": .string("string"),+ "description": .string("Human-readable label; infer one for icon-only controls.")+ ]),+ "description": .object([+ "type": .string("string"),+ "description": .string("Brief description of what the control does.")+ ]),"bbox": .object(["type": .string("object"),+ "description": .string("Bounding box in screenshot pixel coordinates, origin top-left, tightly fitting the control."),"additionalProperties": .bool(false),"required": .array([.string("x"),@@ -226,10 +233,12 @@ public struct HostedDebugUIInspectionAnalyzer: DebugUIInspectionAnalyzing {"confidence": .object(["type": .string("number"),"minimum": .number(0),- "maximum": .number(1)+ "maximum": .number(1),+ "description": .string("Detection confidence from 0 to 1.")]),"visual_style": .object(["type": .string("object"),+ "description": .string("Hex colors for rendering this control's overlay."),"additionalProperties": .bool(false),"required": .array([.string("overlay_color"),@@ -237,9 +246,18 @@ public struct HostedDebugUIInspectionAnalyzer: DebugUIInspectionAnalyzing {.string("label_color")]),"properties": .object([- "overlay_color": .object(["type": .string("string")]),- "border_color": .object(["type": .string("string")]),- "label_color": .object(["type": .string("string")])+ "overlay_color": .object([+ "type": .string("string"),+ "description": .string("Hex color for the overlay fill, e.g. #3B82F6.")+ ]),+ "border_color": .object([+ "type": .string("string"),+ "description": .string("Hex color for the overlay border, e.g. #60A5FA.")+ ]),+ "label_color": .object([+ "type": .string("string"),+ "description": .string("Hex color for the label text, e.g. #FFFFFF.")+ ])])])])diff --git a/apps/Donkey/Sources/DonkeyAI/HostedAppleScriptGenerationAdapter.swift b/apps/Donkey/Sources/DonkeyAI/HostedAppleScriptGenerationAdapter.swiftindex b387f9d9..467b3609 100644--- a/apps/Donkey/Sources/DonkeyAI/HostedAppleScriptGenerationAdapter.swift+++ b/apps/Donkey/Sources/DonkeyAI/HostedAppleScriptGenerationAdapter.swift@@ -195,10 +195,8 @@ public struct HostedAppleScriptGenerationAdapter: Sendable {private static let instructions = ["You generate AppleScript for Donkey's guarded local-app harness.",- "Return strict JSON only.","Generate only a small AppleScript for one bounded operation or a very small sequence inside the requested target app.","Do not build a full automation pipeline; Donkey handles observation, clicking, recovery, and verification as separate harness steps.",- "Set canGenerate false when the task is not doable with a small target-app AppleScript using the provided entities and allowed actions.","Use only the provided entities and allowed actions.","Do not use shell commands, System Events, keystrokes, key codes, file deletion, quitting apps, network calls, credential access, or unrelated applications.","Prefer app dictionary commands and return a concise structured text result with key=value fields when possible.",diff --git a/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift b/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swiftindex 4af4bdac..916489ba 100644--- a/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift+++ b/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift@@ -184,9 +184,8 @@ public struct HostedLocalAppCatalogProfileGenerator: LocalAppCatalogProfileGenerprivate static let instructions = ["Generate local app catalog profiles for Donkey's guarded local-app task-intent boundary.",- "Return strict JSON only with an entries array and metadata object.","Return one entry for each input application. Preserve the input appID, appName, and bundleIdentifier exactly; use an empty string when bundleIdentifier is absent.",- "Supported means the app has a safe generic workflow through one of these control profiles only: search_then_enter, address_bar_submit, new_document_text.",+ "Supported means the app has a safe generic workflow through one of the allowed control profiles only.","Use supported only for low-risk actions that fit one allowed profile with a clear user payload, such as search-and-submit, address-bar submission, or creating a new text-like document.","Use candidate when the app might be automatable but a safe generic workflow is uncertain.","Use unsupported when it is not meaningfully controllable through the allowed profiles.",@@ -205,6 +204,7 @@ public struct HostedLocalAppCatalogProfileGenerator: LocalAppCatalogProfileGener"summary": ["type": "string"],"controlProfiles": ["type": "array",+ "description": "Allowed generic control profiles this capability supports.","items": ["type": "string","enum": [diff --git a/apps/Donkey/Sources/DonkeyAI/HostedPlannerHintAdapter.swift b/apps/Donkey/Sources/DonkeyAI/HostedPlannerHintAdapter.swiftindex 956fe69a..539e01d4 100644--- a/apps/Donkey/Sources/DonkeyAI/HostedPlannerHintAdapter.swift+++ b/apps/Donkey/Sources/DonkeyAI/HostedPlannerHintAdapter.swift@@ -316,7 +316,7 @@ public struct HostedPlannerHintAdapter: Sendable {)}- private static let instructions = "Return strict JSON with a planner hint and memoryWriteProposals. Hints are advisory and never direct input. Leave memoryWriteProposals empty unless a source-linked target memory should be proposed."+ private static let instructions = "Provide a planner hint and memoryWriteProposals. Hints are advisory and never direct input. Leave memoryWriteProposals empty unless a source-linked target memory should be proposed."private func promptText(for request: PlannerHintAdapterRequest) -> String {[diff --git a/apps/Donkey/Sources/DonkeyAI/HostedTaskIntentParsingAdapter.swift b/apps/Donkey/Sources/DonkeyAI/HostedTaskIntentParsingAdapter.swiftindex fc443d8e..522fd3a6 100644--- a/apps/Donkey/Sources/DonkeyAI/HostedTaskIntentParsingAdapter.swift+++ b/apps/Donkey/Sources/DonkeyAI/HostedTaskIntentParsingAdapter.swift@@ -393,36 +393,14 @@ public struct HostedTaskIntentParsingAdapter: TaskIntentParsingAdapter {}private static let instructions = [- "You are the first model boundary for Donkey's generic agent harness. Decide how the harness should handle the user turn before any tool-specific executor is selected.",- "Return strict JSON only using the generic harness planning schema.",- "Donkey is a capable Mac agent that can operate any application and item on the Mac. Default to acting: be broad in what you accept and specific in what you do. For an under-specified but low-risk, reversible request, choose reasonable, concrete specifics yourself and proceed — do not ask the user to fill in details you can sensibly decide.",- "First decide whether Command should be answered conversationally, should ask a clarification, or should use a supported tool path. Prefer acting via a tool path over clarification whenever the action is safe and reversible.",- "Choose conversation for greetings, questions, brainstorming, explanations, status requests, malformed requests, or any turn that does not require external action.",- "Choose guidance when the user wants to be SHOWN where something is or how to do something without Donkey changing any state (e.g. \"show me where X is\", \"how do I X\", \"point me to X\"). Set route guidance, targetAppName to the app, needsConfirmation false, and list the on-screen controls to point at, in order, in metadata.guidanceTargets as a JSON array of objects, each {\"label\": \"...\", \"query\": \"...\"} (label is shown to the user, query is the control's on-screen text). Set metadata.assistantResponse to a brief, natural spoken narration of what you are pointing at (this is shown to the user). Do not plan any acting tools for guidance.",- "Choose clarification only when acting could be destructive, irreversible, costly, or sent/shared externally AND the user's intent is genuinely ambiguous, or when a required target is unknown and cannot be reasonably inferred. Never ask for clarification merely because a request is casual, broad, or under-specified (for example \"play some coldplay\", \"open my notes\", \"make it bigger\") — resolve those by picking concrete specifics and acting.",- "Choose localAppTask whenever the user wants Donkey to operate a local app or item and you can identify the action and a target app or item. If payload specifics are under-specified (which song, which note, which result), pick concrete, reasonable defaults and proceed rather than requiring the user to supply every detail.",- "Always fill structuredIntent, ambiguityRisk, contextNeeds, planSteps, verificationCriteria, fallbacks, clarificationPolicy, and metadata.",- "If Command is conversation, set structuredIntent.route conversation, taskType \"none\", targetAppName \"none\", empty entities and normalizedEntities, confidence 0, needsConfirmation false, no planSteps with toolName values, and metadata.responseMode \"conversation\" with metadata.assistantResponse containing a brief natural-language reply.",- "If Command genuinely needs clarification (only per the narrow criteria above), set structuredIntent.route clarification, taskType \"none\", targetAppName \"none\" unless a target is already known, needsConfirmation true, ambiguityRisk.shouldAskBeforeActing true, clarificationPolicy.shouldAsk true, and include one specific question naming exactly what you need.",- "For supported local app actions, set structuredIntent.route localAppTask, choose only a provided taskType and target app, and fill entities and normalizedEntities with the concrete values needed by required entity rules.",- "Use the generic local_app_interaction task type for executable local app requests that need a model-planned app workflow and do not have a more specific provided task type.",- "Use ambiguityRisk to classify the action. Set structuredIntent.needsConfirmation true, ambiguityRisk.shouldAskBeforeActing true, and clarificationPolicy.shouldAsk true with a specific question ONLY for genuinely dangerous, destructive, irreversible, costly, or externally-sent actions whose intent is ambiguous. For safe, reversible actions — including broad or casual ones — set needsConfirmation false and act.",- "When a request is broad or casual but the action is low-risk and reversible, resolve the vagueness yourself with a concrete, specific choice and act: set structuredIntent.route localAppTask and structuredIntent.needsConfirmation false. Use loaded app skill guidance to make the choice when present (for example pick a representative song for \"play some coldplay\"). Do not treat resolvable vagueness as a missing required detail.",- "Use contextNeeds for app lookup, memory lookup, screen observation, element discovery, or skill lookup needed before or during execution.",- "Use planSteps for the generic harness plan. Each executable step must name one available toolName, with toolInputs filled from structured entities and tool schemas. Keep inputEntity/controlID/focusKey for local UI compatibility when those tools need them. Non-executable reasoning steps should use an empty toolName.",- "Use verificationCriteria for what proves success, fallbacks for safe recovery choices, and clarificationPolicy for when Donkey should stop and ask.",- "Apply App skill guidance for app-specific workflows, control strategies, required metadata, and output shapes. Do not invent app-specific behavior that is absent from task definitions, catalog data, memory, or loaded skill guidance.",- "When App finder catalog JSON is non-empty and you use local_app_interaction, choose the target app only from a catalog entry with supportStatus supported and a matching capability. Set metadata.appFinder.selectedAppID to the exact appID, metadata.appFinder.selectedCapabilityID to the capability id, and metadata.appFinder.controlProfile to one declared control profile. Never select candidate, unsupported, or denied entries for execution.",- "For local_app_interaction, select the most likely local app, set targetAppName and entities.appName to the human app name, set entities.goal, and when text must be entered set entities.query plus normalizedEntities.query.",- "For local_app_interaction, use available local UI tools for UI workflows and available skill tools for skill-backed workflows. When a loaded app skill provides a validated script for the selected capability, prefer skill.load then skill.script.execute with structured toolInputs over repeated screenshot-driven keyboard fallback.",- "When automation.applescript.generate is available and a supported app action is better handled through AppleScript than UI input, use it only for a small doable target-app operation, not a full automation pipeline. Plan dynamic AppleScript as separate steps: automation.applescript.generate, automation.applescript.validate, automation.applescript.execute, then app.observe and an app.verifyCommand or app.verifyVisibleText step. Use the same stable toolInputs.scriptArtifactID on generate, validate, and execute. The generate step should include targetApp, bundleIdentifier when known, goal, entities as JSON text, allowedActions, and verification. Never put script source in planner output; the child generation tool creates the source artifact. If AppleScript is not clearly doable for that small operation, use observation, Accessibility, screenshot, or UI tools instead.",- "Use agent.path.visualize only when you have grounded app/window/control/action evidence for every pointer waypoint. It is visual-only: it must describe the AI path with stepsJSON and must never replace real AX, AppleScript, keyboard, or guarded coordinate actions.",- "Use ui.clickTarget when the intended action is to click or submit a visible control by Accessibility or AI visual evidence instead of pressing Return. Put the semantic or observed visual target id in controlID.",- "Verification may be a set of verifier steps. Use app.verifyCommand for guarded command evidence, app.verifyVisibleText for observed result text, and include both when both kinds of evidence are needed.",- "When ui.setText is present, entities.query and normalizedEntities.query must be non-empty, the step inputEntity should usually be query, and controlID/focusKey should describe the guarded UI strategy.",- "For every other task type, planSteps should not contain executable toolName values.",- "If no supported capability fits, set structuredIntent.route conversation and taskType \"none\" with a helpful conversational assistantResponse rather than a generic local-action failure.",- "Do not invent task types, unsupported entities, unsupported tools, app scripts, or direct input outside the schema."+ "You are the first model boundary for Donkey's generic agent harness: decide how the harness should handle the user turn before any tool-specific executor is selected. Fill every field per the schema and its field descriptions.",+ "Donkey is a capable Mac agent that can operate any application and item on the Mac. Default to acting: be broad in what you accept and specific in what you do, and prefer acting via a tool path over clarification whenever the action is safe and reversible. For an under-specified but low-risk, reversible request, resolve the vagueness yourself with concrete, reasonable specifics and proceed — use loaded app skill guidance to choose (for example a representative song for \"play some coldplay\") — rather than asking for details you can sensibly decide.",+ "Apply App skill guidance for app-specific workflows, control strategies, required metadata, and output shapes. Do not invent task types, entities, tools, app scripts, or app-specific behavior absent from task definitions, catalog data, memory, or loaded skill guidance. If no supported capability fits, use route conversation with a helpful assistantResponse rather than a generic local-action failure.",+ "Build planSteps as the generic harness plan: each executable step names one available toolName with toolInputs filled from structured entities and the tool schema; non-executable reasoning steps use an empty toolName. Only localAppTask carries executable steps.",+ "For local_app_interaction, prefer a loaded app skill's validated script (skill.load then skill.script.execute with structured toolInputs) over repeated screenshot-driven keyboard fallback.",+ "When automation.applescript.generate is available and a supported app action is better handled through AppleScript than UI input, use it only for a small doable target-app operation, not a full pipeline. Plan separate steps — automation.applescript.generate, automation.applescript.validate, automation.applescript.execute, then app.observe and an app.verifyCommand or app.verifyVisibleText step — reusing one stable toolInputs.scriptArtifactID across generate/validate/execute. The generate step includes targetApp, bundleIdentifier when known, goal, entities as JSON text, allowedActions, and verification. Never put script source in planner output. If AppleScript is not clearly doable, use observation, Accessibility, screenshot, or UI tools instead.",+ "Use ui.clickTarget (semantic or observed visual target id in controlID) to click or submit a visible control instead of pressing Return. When ui.setText is present, entities.query and normalizedEntities.query must be non-empty and inputEntity is usually query. Use agent.path.visualize only with grounded app/window/control/action evidence for every waypoint; it is visual-only (describe the AI path with stepsJSON) and never replaces real AX, AppleScript, keyboard, or guarded coordinate actions.",+ "Verification may be several verifier steps: app.verifyCommand for guarded command evidence, app.verifyVisibleText for observed result text; include both when both kinds of evidence are needed."].joined(separator: " ")private static func repairMetadata(diff --git a/apps/Donkey/Sources/DonkeyAI/LocalGeneratePlannerHintAdapter.swift b/apps/Donkey/Sources/DonkeyAI/LocalGeneratePlannerHintAdapter.swiftindex 1d3557e9..83736d0d 100644--- a/apps/Donkey/Sources/DonkeyAI/LocalGeneratePlannerHintAdapter.swift+++ b/apps/Donkey/Sources/DonkeyAI/LocalGeneratePlannerHintAdapter.swift@@ -135,7 +135,7 @@ public struct LocalGeneratePlannerHintAdapter: Sendable {private func promptText(for request: PlannerHintAdapterRequest) -> String {[- "Return strict JSON with a planner hint and memoryWriteProposals. Hints are advisory and never direct input.",+ "Provide a planner hint and memoryWriteProposals. Hints are advisory and never direct input.","goal: \(request.context.userGoal)","target: \(request.context.targetID)","runtime: \(request.context.runtimeProfile)",diff --git a/apps/Donkey/Sources/DonkeyAI/LocalTaskFollowUpResolver.swift b/apps/Donkey/Sources/DonkeyAI/LocalTaskFollowUpResolver.swiftindex 809dad79..86f084c5 100644--- a/apps/Donkey/Sources/DonkeyAI/LocalTaskFollowUpResolver.swift+++ b/apps/Donkey/Sources/DonkeyAI/LocalTaskFollowUpResolver.swift@@ -386,7 +386,7 @@ public struct HostedTaskFollowUpResolver: UserQueryFollowUpResolving {)}- private static let instructions = "Decide whether the current turn continues one of the candidate Donkey task threads. Return strict JSON only. Set isFollowUp false and taskID empty when the turn should start a new task."+ private static let instructions = "Decide whether the current turn continues one of the candidate Donkey task threads. Set isFollowUp false and taskID empty when the turn should start a new task."private static func schema(for candidates: [UserQueryFollowUpCandidate]) -> RemoteInferenceJSONValue {.object([diff --git a/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift b/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swiftindex af657c35..fdb60902 100644--- a/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift+++ b/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift@@ -159,15 +159,29 @@ enum TaskIntentWireCodec {"properties": ["id": ["type": "string"],"summary": ["type": "string"],- "toolName": ["type": "string", "enum": toolNames],- "inputEntity": ["type": "string"],- "controlID": ["type": "string"],+ "toolName": [+ "type": "string",+ "enum": toolNames,+ "description": "One available tool name for an executable step; empty string for a non-executable reasoning step."+ ],+ "inputEntity": [+ "type": "string",+ "description": "Entity key feeding this step (usually query when text is entered); empty when unused."+ ],+ "controlID": [+ "type": "string",+ "description": "Semantic or observed visual target id for click/submit tools; empty when unused."+ ],"focusKey": ["type": "string"],"toolInputs": ["type": "object",- "additionalProperties": ["type": "string"]+ "additionalProperties": ["type": "string"],+ "description": "Inputs for the tool, filled from structured entities and the tool's schema."],- "expectedObservation": ["type": "string"]+ "expectedObservation": [+ "type": "string",+ "description": "What the harness should observe after this step."+ ]]]@@ -175,7 +189,14 @@ enum TaskIntentWireCodec {"type": "object","additionalProperties": false,"required": [- "structuredIntent"+ "structuredIntent",+ "ambiguityRisk",+ "contextNeeds",+ "planSteps",+ "verificationCriteria",+ "fallbacks",+ "clarificationPolicy",+ "metadata"],"properties": ["structuredIntent": [@@ -183,23 +204,34 @@ enum TaskIntentWireCodec {"additionalProperties": false,"required": ["route",- "taskType"+ "taskType",+ "needsConfirmation"],"properties": ["route": ["type": "string",- "enum": ["localAppTask", "conversation", "clarification", "guidance"]+ "enum": ["localAppTask", "conversation", "clarification", "guidance"],+ "description": "How the harness should handle the turn. localAppTask: operate a local app or item — the default for any safe, identifiable action, including broad or casual ones you resolve by choosing concrete specifics. conversation: greetings, questions, explanations, status, malformed input, or any turn needing no external action. guidance: SHOW where something is or how to do it without changing any state. clarification: only when acting would be destructive, irreversible, costly, or sent/shared externally AND intent is genuinely ambiguous, or a required target is unknown and cannot be inferred."+ ],+ "goal": [+ "type": "string",+ "description": "Concise restatement of what the user wants."+ ],+ "taskType": [+ "type": "string",+ "enum": taskTypes,+ "description": "Provided task type to execute, or \"none\" for conversation, guidance, or clarification. Use local_app_interaction for an executable local-app request that needs a model-planned workflow and has no more specific provided task type."],- "goal": ["type": "string"],- "taskType": ["type": "string", "enum": taskTypes],"targetAppName": targetAppNameSchema,"entities": ["type": "object",- "additionalProperties": ["type": "string"]+ "additionalProperties": ["type": "string"],+ "description": "Concrete values required by the task's entity rules. For local_app_interaction set appName (human app name) and goal, plus query when text must be entered."],"normalizedEntities": ["type": "object",- "additionalProperties": ["type": "string"]+ "additionalProperties": ["type": "string"],+ "description": "Normalized form of entities; mirror query here when text input is needed."],"confidence": ["type": "number", "minimum": 0, "maximum": 1],"needsConfirmation": [@@ -231,28 +263,35 @@ enum TaskIntentWireCodec {"maxItems": 8,"items": ["type": "string"]],- "shouldAskBeforeActing": ["type": "boolean"]+ "shouldAskBeforeActing": [+ "type": "boolean",+ "description": "True only for dangerous, destructive, irreversible, costly, or externally-sent actions whose intent is ambiguous; false for safe, reversible actions, including broad or casual ones."+ ]]],"contextNeeds": ["type": "array","maxItems": 8,- "items": ["type": "string"]+ "items": ["type": "string"],+ "description": "Lookups needed before or during execution: app lookup, memory lookup, screen observation, element discovery, or skill lookup."],"planSteps": ["type": "array","maxItems": 12,- "items": planStepSchema+ "items": planStepSchema,+ "description": "Generic harness plan. Empty for conversation, guidance, and clarification — those routes carry no executable steps."],"verificationCriteria": ["type": "array","maxItems": 8,- "items": ["type": "string"]+ "items": ["type": "string"],+ "description": "What proves the task succeeded."],"fallbacks": ["type": "array","maxItems": 8,- "items": ["type": "string"]+ "items": ["type": "string"],+ "description": "Safe recovery choices if the primary plan fails."],"clarificationPolicy": ["type": "object",@@ -263,18 +302,23 @@ enum TaskIntentWireCodec {"policy"],"properties": [- "shouldAsk": ["type": "boolean"],+ "shouldAsk": [+ "type": "boolean",+ "description": "True only when route is clarification."+ ],"questions": ["type": "array","maxItems": 4,- "items": ["type": "string"]+ "items": ["type": "string"],+ "description": "When asking, exactly one specific question naming what you need; otherwise empty."],"policy": ["type": "string"]]],"metadata": ["type": "object",- "additionalProperties": ["type": "string"]+ "additionalProperties": ["type": "string"],+ "description": "Free-form string map. conversation: set responseMode=\"conversation\" and assistantResponse=<brief natural-language reply>. guidance: set assistantResponse=<brief spoken narration> and guidanceTargets=<JSON array of {\"label\":\"...\",\"query\":\"...\"} controls to point at, in order; label is shown to the user, query is the control's on-screen text>. local_app_interaction with a non-empty app finder catalog: set appFinder.selectedAppID, appFinder.selectedCapabilityID, and appFinder.controlProfile from a catalog entry whose supportStatus is supported (never candidate, unsupported, or denied)."]]]diff --git a/apps/Donkey/Sources/DonkeyAI/VisionActionPlanner.swift b/apps/Donkey/Sources/DonkeyAI/VisionActionPlanner.swiftindex c005fffd..313801e7 100644--- a/apps/Donkey/Sources/DonkeyAI/VisionActionPlanner.swift+++ b/apps/Donkey/Sources/DonkeyAI/VisionActionPlanner.swift@@ -122,7 +122,7 @@ public enum VisionActionPlanner {Look at the history and the screenshot: if you just clicked a text field, the next action should be "type", not another click. Do not get stuck repeating the same step.If you clicked something and the screenshot looks unchanged, your click MISSED — do not repeat the same coordinate; re-locate the target and aim at its exact visual center.CLICK PRECISELY: set x,y to the exact visual CENTER of the intended control, not above/below/beside it.- Keep "reason" to one short sentence. Return ONLY the JSON object, nothing else.+ Keep "reason" to one short sentence."""return RemoteInferenceResponseCreateRequest(input: .array([diff --git a/docs/guides/releasing-donkey.md b/docs/guides/releasing-donkey.mdindex 99d94286..62a97fa2 100644--- a/docs/guides/releasing-donkey.md+++ b/docs/guides/releasing-donkey.md@@ -9,8 +9,8 @@ GitHub UI, and the workflow builds the latest default-branch code into therelease artifact.Nightly prereleases use a separate `Nightly Donkey Build` GitHub Actions-workflow. It builds the latest default-branch code on a schedule and publishes-the result to the moving `nightly` prerelease.+workflow. It builds changed default-branch code on a schedule and publishes the+result to the moving `nightly` prerelease.## Release Boundaries@@ -97,9 +97,12 @@ links must keep using the immutable numeric tag.## Nightly BuildsThe `Nightly Donkey Build` workflow runs nightly at 09:00 UTC and can also be-started manually from GitHub Actions. It builds the default branch, packages-`dist/Donkey.dmg`, generates `dist/Donkey.dmg.sha256`, moves the `nightly` tag-to that commit, and creates or updates the `Donkey Nightly Build` prerelease.+started manually from GitHub Actions. It compares the default-branch commit to+the current `nightly` tag before installing packaging dependencies. If the tag+already points at the default-branch commit, the workflow skips packaging and+publishing. When the default branch has changed, it packages `dist/Donkey.dmg`,+generates `dist/Donkey.dmg.sha256`, moves the `nightly` tag to that commit, and+creates or updates the `Donkey Nightly Build` prerelease.Nightly builds are intentionally separate from production releases: