Skip to content

Open source CapCut alternative.

TypeScript

Remove legacy app-specific task paths

David Leaf08d5ae3c56
diff --git a/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift b/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift
index 8e2f9471..4af4bdac 100644
--- a/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift
+++ b/apps/Donkey/Sources/DonkeyAI/HostedLocalAppCatalogProfileGenerator.swift
@@ -187,7 +187,7 @@ public struct HostedLocalAppCatalogProfileGenerator: LocalAppCatalogProfileGener
"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.",
- "Use supported only for low-risk actions such as media search/playback, opening websites in browsers, writing text in editors/notes, or creating simple tables in document/spreadsheet apps.",
+ "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.",
"Use denied for password managers, credential/keychain tools, shells/terminals, system settings, process managers, logs/consoles, security tools, payment/finance tools, or anything where generic automation would be risky.",
diff --git a/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift b/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift
index a4a5f9e6..5338526e 100644
--- a/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift
+++ b/apps/Donkey/Sources/DonkeyAI/TaskIntentWireCodec.swift
@@ -381,14 +381,6 @@ enum TaskIntentWireCodec {
metadata["appFinder.validated"] = "true"
}
- guard mediaSelectionIsValidIfRequired(
- definition: definition,
- metadata: metadata,
- normalizedEntities: normalizedEntities
- ) else {
- return nil
- }
-
let missingRequiredEntity = definition.entityRules.first { rule in
rule.required && normalizedEntities[rule.name] == nil
}
@@ -402,41 +394,6 @@ enum TaskIntentWireCodec {
var confidence = wire.confidence
var needsConfirmation = wire.needsConfirmation || missingRequiredEntity != nil
var actionPlan = wire.actionPlan.tools.isEmpty ? nil : wire.actionPlan
- if definition.metadata["modelPlanned"] == "true",
- let modelActionPlan = actionPlan {
- let repairedPlan = repairedModelActionPlan(
- modelActionPlan,
- normalizedEntities: normalizedEntities
- )
- if repairedPlan != modelActionPlan {
- metadata["modelPlan.repaired"] = "true"
- actionPlan = repairedPlan
- }
- }
- if let tableRepair = repairedSpreadsheetQueryIfNeeded(
- actionPlan: actionPlan,
- normalizedEntities: normalizedEntities,
- wire: wire
- ) {
- entities[tableRepair.entityName] = tableRepair.text
- normalizedEntities[tableRepair.entityName] = tableRepair.text
- metadata["modelPlan.repairedTableText"] = "true"
- }
- if let conversationReason = textInputConversationReason(
- actionPlan: actionPlan,
- normalizedEntities: normalizedEntities
- ) ?? documentConversationReason(
- actionPlan: actionPlan,
- normalizedEntities: normalizedEntities,
- originalCommand: originalCommand
- ) {
- confidence = min(confidence, 0.2)
- needsConfirmation = false
- actionPlan = nil
- metadata["responseMode"] = "conversation"
- metadata["assistantResponse"] = "I can help, but I need a clearer thing to write before opening an app."
- metadata["notActionableReason"] = conversationReason
- }
let primaryEntity = definition.verificationEntityName
.flatMap { normalizedEntities[$0] }
?? normalizedEntities.values.sorted().first
@@ -690,259 +647,6 @@ enum TaskIntentWireCodec {
return wire.targetAppName
}
- private static func repairedModelActionPlan(
- _ actionPlan: LocalAppActionPlan,
- normalizedEntities: [String: String]
- ) -> LocalAppActionPlan {
- var plan = actionPlan
- if plan.inputEntity.isEmpty {
- plan.inputEntity = "query"
- }
- if plan.controlID.isEmpty {
- plan.controlID = defaultControlID(for: plan.tools)
- }
- if plan.focusKey.isEmpty {
- plan.focusKey = defaultFocusKey(for: plan.tools)
- }
-
- let inputValue = normalizedEntities[plan.inputEntity] ?? normalizedEntities["query"] ?? ""
- guard !plan.isExecutable,
- !inputValue.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
- else {
- return plan
- }
-
- if plan.tools.contains(.newDocument) || plan.tools.contains(.focusTextEntry) {
- return LocalAppActionPlan(
- tools: repairedTools(
- from: plan.tools,
- appending: [.setText, .verifyCommand]
- ),
- inputEntity: plan.inputEntity,
- controlID: plan.controlID,
- focusKey: plan.focusKey,
- verification: plan.verification
- )
- }
-
- if plan.tools.contains(.focusAddressBar) {
- return LocalAppActionPlan(
- tools: repairedTools(
- from: plan.tools,
- appending: [.setText, .pressReturn, .verifyCommand]
- ),
- inputEntity: plan.inputEntity,
- controlID: plan.controlID,
- focusKey: plan.focusKey,
- verification: plan.verification
- )
- }
-
- return LocalAppActionPlan(
- tools: LocalAppActionPlan.defaultSearchSubmitPlan.tools,
- inputEntity: plan.inputEntity,
- controlID: plan.controlID,
- focusKey: plan.focusKey,
- verification: plan.verification
- )
- }
-
- private static func defaultControlID(for tools: [LocalAppActionPlanTool]) -> String {
- if tools.contains(.focusAddressBar) {
- return "addressBar"
- }
- if tools.contains(.focusTextEntry) || tools.contains(.newDocument) {
- return "editor"
- }
- return "search"
- }
-
- private static func defaultFocusKey(for tools: [LocalAppActionPlanTool]) -> String {
- if tools.contains(.focusAddressBar) {
- return "Command+L"
- }
- if tools.contains(.focusTextEntry) || tools.contains(.newDocument) {
- return ""
- }
- return "Command+F"
- }
-
- private static func repairedTools(
- from tools: [LocalAppActionPlanTool],
- appending repairTools: [LocalAppActionPlanTool]
- ) -> [LocalAppActionPlanTool] {
- var repaired = tools
- for tool in repairTools where !repaired.contains(tool) {
- repaired.append(tool)
- }
- return repaired
- }
-
- private static func repairedSpreadsheetQueryIfNeeded(
- actionPlan: LocalAppActionPlan?,
- normalizedEntities: [String: String],
- wire: TaskIntentWire
- ) -> (entityName: String, text: String)? {
- guard let actionPlan,
- actionPlan.tools.contains(.newDocument),
- actionPlan.tools.contains(.setText)
- else {
- return nil
- }
-
- let appName = normalizedEntities["appName"] ?? wire.entities["appName"] ?? wire.targetAppName
- guard LocalAppTaskIntentParser.normalizedPhrase(appName) == "numbers" else {
- return nil
- }
-
- let entityName = actionPlan.inputEntity.isEmpty ? "query" : actionPlan.inputEntity
- let query = (normalizedEntities[entityName] ?? normalizedEntities["query"] ?? "")
- .trimmingCharacters(in: .whitespacesAndNewlines)
- guard !query.isEmpty,
- !query.contains("\n"),
- !query.contains("\t")
- else {
- return nil
- }
-
- let subject = query
- .replacingOccurrences(of: "\n", with: " ")
- .replacingOccurrences(of: "\t", with: " ")
- .trimmingCharacters(in: .whitespacesAndNewlines)
- guard !subject.isEmpty else { return nil }
-
- let clippedSubject = String(subject.prefix(160))
- return (
- entityName,
- "Request\tStatus\n\(clippedSubject)\tNeeds table data"
- )
- }
-
- private static func textInputConversationReason(
- actionPlan: LocalAppActionPlan?,
- normalizedEntities: [String: String]
- ) -> String? {
- guard let actionPlan,
- actionPlan.requiresTextInput
- else {
- return nil
- }
-
- let entityName = actionPlan.inputEntity.isEmpty ? "query" : actionPlan.inputEntity
- let query = (normalizedEntities[entityName] ?? normalizedEntities["query"] ?? "")
- .trimmingCharacters(in: .whitespacesAndNewlines)
- if query.isEmpty {
- return "missingTextPayload"
- }
- if isCopiedPromptPlaceholder(query) {
- return "promptPlaceholderPayload"
- }
-
- return nil
- }
-
- private static func mediaSelectionIsValidIfRequired(
- definition: LocalAppTaskDefinition,
- metadata: [String: String],
- normalizedEntities: [String: String]
- ) -> Bool {
- let capabilityID = metadata["appFinder.selectedCapabilityID"]
- ?? metadata["selectedCapabilityID"]
- ?? ""
- let requiresMediaSelection = capabilityID == "play_media"
- || definition.metadata["verificationMode"] == "playbackCommandAttempted"
- guard requiresMediaSelection else { return true }
-
- guard let kind = nonEmpty(metadata["mediaSelection.kind"])?.lowercased() else {
- return false
- }
- let blockedKinds: Set<String> = [
- "artist",
- "artist_only",
- "artist_page",
- "browse_artist"
- ]
- guard !blockedKinds.contains(kind) else { return false }
-
- let queryEntity = definition.verificationEntityName ?? "query"
- guard let query = nonEmpty(normalizedEntities[queryEntity] ?? normalizedEntities["query"]) else {
- return false
- }
-
- if let seed = nonEmpty(metadata["mediaSelection.seed"]),
- LocalAppTaskIntentParser.normalizedPhrase(query) == LocalAppTaskIntentParser.normalizedPhrase(seed) {
- return false
- }
-
- if kind.contains("representative") {
- return nonEmpty(metadata["mediaSelection.selectedTitle"]) != nil
- }
-
- return true
- }
-
- private static func documentConversationReason(
- actionPlan: LocalAppActionPlan?,
- normalizedEntities: [String: String],
- originalCommand: String
- ) -> String? {
- guard let actionPlan,
- actionPlan.tools.contains(.newDocument),
- actionPlan.tools.contains(.setText),
- !actionPlan.tools.contains(.pressReturn)
- else {
- return nil
- }
-
- let entityName = actionPlan.inputEntity.isEmpty ? "query" : actionPlan.inputEntity
- let query = (normalizedEntities[entityName] ?? normalizedEntities["query"] ?? "")
- .trimmingCharacters(in: .whitespacesAndNewlines)
- guard !query.isEmpty,
- !commandContainsQuoted(query, originalCommand: originalCommand),
- !query.contains("\n"),
- !query.contains("\t"),
- query.rangeOfCharacter(from: CharacterSet(charactersIn: ".?!:;,")) == nil
- else {
- return nil
- }
-
- let words = LocalAppTaskIntentParser.normalizedPhrase(query)
- .split(separator: " ")
- return words.count <= 5 ? "insufficientDocumentPayload" : nil
- }
-
- private static func isCopiedPromptPlaceholder(_ query: String) -> Bool {
- let normalizedQuery = LocalAppTaskIntentParser.normalizedPhrase(query)
- guard !normalizedQuery.isEmpty else { return false }
-
- return copiedPromptPayloadPhrases.contains { phrase in
- normalizedQuery.contains(LocalAppTaskIntentParser.normalizedPhrase(phrase))
- }
- }
-
- private static let copiedPromptPayloadPhrases = [
- "complete piece of text generated for the user writing request",
- "complete piece of text generated for the user's writing request",
- "generated for the user writing request",
- "the actual final text to type",
- "tab separated rows for the requested table",
- "column a column b row label value or data needed note"
- ]
-
- private static func commandContainsQuoted(
- _ query: String,
- originalCommand: String
- ) -> Bool {
- let trimmedQuery = query.trimmingCharacters(in: .whitespacesAndNewlines)
- guard !trimmedQuery.isEmpty else { return false }
- let quotedPatterns = [
- "\"\(trimmedQuery)\"",
- "'\(trimmedQuery)'",
- "`\(trimmedQuery)`"
- ]
- return quotedPatterns.contains { originalCommand.localizedCaseInsensitiveContains($0) }
- }
-
private static func targetApp(
from wire: TaskIntentWire,
definition: LocalAppTaskDefinition,
diff --git a/apps/Donkey/Sources/DonkeyRuntime/LocalAppTaskCatalog.swift b/apps/Donkey/Sources/DonkeyRuntime/LocalAppTaskCatalog.swift
index ac56318d..6ec9cb5c 100644
--- a/apps/Donkey/Sources/DonkeyRuntime/LocalAppTaskCatalog.swift
+++ b/apps/Donkey/Sources/DonkeyRuntime/LocalAppTaskCatalog.swift
@@ -1014,16 +1014,6 @@ public struct LocalAppTaskCatalog: Sendable {
let availability = availabilityProvider.availability(namedApp: cleanedRequestedAppName)
let target = availability.target
- if let playMediaResolution = resolveGenericPlayMediaInteraction(
- intent: intent,
- target: target,
- availability: availability,
- requestedAppName: cleanedRequestedAppName,
- plan: plan
- ) {
- return playMediaResolution
- }
-
let definition = Self.genericLocalAppInteractionDefinition(
target: target,
plan: plan
@@ -1068,96 +1058,6 @@ public struct LocalAppTaskCatalog: Sendable {
)
}
- private func resolveGenericPlayMediaInteraction(
- intent: TaskIntent,
- target: LocalAppTarget,
- availability: LocalAppAvailability,
- requestedAppName: String,
- plan: LocalAppActionPlan
- ) -> LocalAppTaskCatalogResolution? {
- let selectedCapabilityID = intent.metadata["appFinder.selectedCapabilityID"]
- ?? intent.metadata["selectedCapabilityID"]
- ?? ""
- guard selectedCapabilityID == "play_media" else { return nil }
-
- let mediaDefinition = BuiltInLocalAppTaskDefinitions.mediaPlayback
- let targetIsMusic = target.bundleIdentifier == mediaDefinition.targetApp.bundleIdentifier
- || LocalAppLookup.normalized(target.appName) == LocalAppLookup.normalized(mediaDefinition.targetApp.appName)
- guard targetIsMusic else { return nil }
-
- let inputEntity = plan.inputEntity.isEmpty ? "query" : plan.inputEntity
- let query = Self.entityValue(named: inputEntity, in: intent)
- guard !query.isEmpty else {
- return LocalAppTaskCatalogResolution(
- status: .needsConfirmation,
- intent: intent,
- definition: mediaDefinition,
- availability: availability,
- metadata: [
- "reason": inputEntity,
- "taskType": mediaDefinition.taskType,
- "targetApp": mediaDefinition.targetApp.appName,
- "requestedItemName": requestedAppName,
- "appFinder.selectedCapabilityID": selectedCapabilityID
- ]
- )
- }
-
- let mediaAvailability = availabilityProvider.availability(for: mediaDefinition.targetApp)
- var metadata = mediaDefinition.metadata.merging(intent.metadata) { _, new in new }
- metadata["bundleIdentifier"] = mediaDefinition.targetApp.bundleIdentifier ?? ""
- metadata["targetApp"] = mediaDefinition.targetApp.appName
- metadata["requestedItemName"] = requestedAppName
- metadata["genericTaskType"] = Self.genericLocalAppInteractionTaskType
- metadata["genericPlan.tools"] = plan.tools.map(\.rawValue).joined(separator: ",")
- metadata["resolvedFromCapability"] = selectedCapabilityID
-
- let mediaIntent = TaskIntent(
- intentID: "\(mediaDefinition.taskType)-\(slug(query))",
- taskType: mediaDefinition.taskType,
- targetApp: mediaDefinition.targetApp,
- entities: ["query": intent.entities[inputEntity] ?? query],
- normalizedEntities: ["query": query],
- confidence: intent.confidence,
- parserSource: intent.parserSource,
- needsConfirmation: intent.needsConfirmation,
- sourceModelCallID: intent.sourceModelCallID,
- metadata: metadata
- )
-
- guard mediaAvailability.isInstalled else {
- return LocalAppTaskCatalogResolution(
- status: .appUnavailable,
- intent: mediaIntent,
- definition: mediaDefinition,
- availability: mediaAvailability,
- metadata: [
- "reason": "targetAppUnavailable",
- "taskType": mediaDefinition.taskType,
- "targetApp": mediaDefinition.targetApp.appName,
- "requestedItemName": requestedAppName,
- "lookupProvider": mediaAvailability.metadata["provider"] ?? "",
- "appFinder.selectedCapabilityID": selectedCapabilityID
- ]
- )
- }
-
- return LocalAppTaskCatalogResolution(
- status: .resolved,
- intent: mediaIntent,
- definition: mediaDefinition,
- availability: mediaAvailability,
- metadata: [
- "taskType": mediaDefinition.taskType,
- "targetApp": mediaDefinition.targetApp.appName,
- "requestedItemName": requestedAppName,
- "lookupProvider": mediaAvailability.metadata["provider"] ?? "",
- "appFinder.selectedCapabilityID": selectedCapabilityID,
- "resolvedFromCapability": selectedCapabilityID
- ]
- )
- }
-
public static var genericLocalItemOpenDefinition: LocalAppTaskDefinition {
genericAppOpenDefinition(target: genericLocalItemTarget)
}
@@ -1399,146 +1299,6 @@ public enum BuiltInLocalAppTaskDefinitions {
]
}
- public static var weatherLookup: LocalAppTaskDefinition {
- return LocalAppTaskDefinition(
- taskType: "weather_lookup",
- targetApp: LocalAppTarget(
- appName: "Weather",
- bundleIdentifier: "com.apple.weather",
- titleContains: "Weather"
- ),
- triggerTerms: [],
- entityRules: [
- LocalAppTaskEntityRule(
- name: "city"
- )
- ],
- workflowSteps: commonWorkflowPrefix + [
- LocalAppTaskWorkflowStepDefinition(
- id: "focus-search",
- role: .focusControl,
- summary: "Focus the task control",
- metadata: [
- "controlID": "search",
- "key": "Command+F"
- ]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "enter-city",
- role: .enterText,
- summary: "Enter the normalized entity",
- metadata: ["entityName": "city"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "submit-search",
- role: .submit,
- summary: "Submit the task",
- metadata: ["key": "Return"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "select-city-result",
- role: .submit,
- summary: "Select the matching city result",
- metadata: ["key": "Return"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "verify-city",
- role: .verifyResult,
- summary: "Verify the visible result"
- )
- ],
- observationStrategies: [.accessibility, .windowMetadata, .screenshotForLocalModel],
- verificationEntityName: "city",
- metadata: [
- "catalogEntry": "built-in-weather-lookup",
- "displayTitle": "weather lookup",
- "taskLabelTemplate": "Weather for {city}",
- "verificationTextKey": "city",
- "screenshotFallback": "missingVerificationOrControls",
- "visualFallback": "localModel",
- "ocrFallbackDefault": "false"
- ]
- )
- }
-
- public static var mediaPlayback: LocalAppTaskDefinition {
- var metadata: [String: String] = [
- "catalogEntry": "built-in-media-playback",
- "displayTitle": "media playback",
- "taskLabelTemplate": "Play {query}",
- "verificationTextKey": "query",
- "verificationMode": "playbackCommandAttempted",
- "automationBackend": "appleScript",
- "appleScript.action": "music.playMediaQuery",
- "appleScript.entityName": "query",
- "appleScript.successOutputs": "played-library-track,searched-ui-first-result",
- "screenshotFallback": "missingVerificationOrControls",
- "domain": "media",
- "visualFallback": "localModel",
- "ocrFallbackDefault": "false",
- "skillID": "music-media",
- "skillScriptID": "scripts-play-media-query-applescript"
- ]
- if let template = BuiltInLocalAppSkillPacks.scriptSource(
- skillID: "music-media",
- relativePath: "scripts/play-media-query.applescript"
- ) {
- metadata["appleScript.template"] = template
- }
-
- return LocalAppTaskDefinition(
- taskType: "media_playback",
- targetApp: LocalAppTarget(
- appName: "Music",
- bundleIdentifier: "com.apple.Music",
- titleContains: "Music"
- ),
- triggerTerms: [],
- entityRules: [
- LocalAppTaskEntityRule(
- name: "query"
- )
- ],
- workflowSteps: commonWorkflowPrefix + [
- LocalAppTaskWorkflowStepDefinition(
- id: "focus-search",
- role: .focusControl,
- summary: "Focus the app search control",
- metadata: [
- "controlID": "search",
- "key": "Command+F"
- ]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "enter-media-query",
- role: .enterText,
- summary: "Enter the requested media query",
- metadata: ["entityName": "query"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "submit-media-search",
- role: .submit,
- summary: "Submit the media search or playback command",
- metadata: ["key": "Return"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "play-first-media-result",
- role: .submit,
- summary: "Play the first matching media result",
- metadata: ["key": "Return"]
- ),
- LocalAppTaskWorkflowStepDefinition(
- id: "verify-media-query",
- role: .verifyResult,
- summary: "Verify the playback command was sent"
- )
- ],
- observationStrategies: [.accessibility, .windowMetadata, .screenshotForLocalModel],
- verificationEntityName: "query",
- metadata: metadata
- )
- }
-
public static var documentFormFill: LocalAppTaskDefinition {
LocalAppTaskDefinition(
taskType: "document_form_fill",
@@ -1599,14 +1359,4 @@ public enum BuiltInLocalAppTaskDefinitions {
]
)
}
-
- public static var benchmarkFixtures: [LocalAppTaskDefinition] {
- [
- LocalAppTaskCatalog.genericLocalItemOpenDefinition,
- LocalAppTaskCatalog.genericLocalAppInteractionDefinition,
- weatherLookup,
- mediaPlayback,
- documentFormFill
- ]
- }
}
diff --git a/apps/Donkey/Sources/DonkeyRuntime/Resources/local-app-finder-profiles.json b/apps/Donkey/Sources/DonkeyRuntime/Resources/local-app-finder-profiles.json
index 75c8d0ad..e648fa3d 100644
--- a/apps/Donkey/Sources/DonkeyRuntime/Resources/local-app-finder-profiles.json
+++ b/apps/Donkey/Sources/DonkeyRuntime/Resources/local-app-finder-profiles.json
@@ -1,186 +1,6 @@
{
"schemaVersion": 1,
"entries": [
- {
- "appID": "com.apple.Music",
- "appName": "Music",
- "bundleIdentifier": "com.apple.Music",
- "description": "Apple Music library and playback app.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "play_media",
- "summary": "Search for and play a song, artist, album, podcast, or playlist.",
- "controlProfiles": [
- "search_then_enter"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.spotify.client",
- "appName": "Spotify",
- "bundleIdentifier": "com.spotify.client",
- "description": "Spotify music and podcast playback app.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "play_media",
- "summary": "Search for and play a song, artist, album, podcast, or playlist.",
- "controlProfiles": [
- "search_then_enter"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.apple.Safari",
- "appName": "Safari",
- "bundleIdentifier": "com.apple.Safari",
- "description": "Apple web browser for opening websites and URLs.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "open_url",
- "summary": "Open a requested website or URL.",
- "controlProfiles": [
- "address_bar_submit"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.google.Chrome",
- "appName": "Google Chrome",
- "bundleIdentifier": "com.google.Chrome",
- "description": "Google web browser for opening websites and URLs.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "open_url",
- "summary": "Open a requested website or URL.",
- "controlProfiles": [
- "address_bar_submit"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "company.thebrowser.Browser",
- "appName": "Arc",
- "bundleIdentifier": "company.thebrowser.Browser",
- "description": "Arc web browser for opening websites and URLs.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "open_url",
- "summary": "Open a requested website or URL.",
- "controlProfiles": [
- "address_bar_submit"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.apple.Notes",
- "appName": "Notes",
- "bundleIdentifier": "com.apple.Notes",
- "description": "Apple Notes app for creating and editing notes.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "write_text",
- "summary": "Create a new text document or note and type the requested text.",
- "controlProfiles": [
- "new_document_text"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.apple.TextEdit",
- "appName": "TextEdit",
- "bundleIdentifier": "com.apple.TextEdit",
- "description": "Apple text editor for creating plain or rich text documents.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "write_text",
- "summary": "Create a new text document or note and type the requested text.",
- "controlProfiles": [
- "new_document_text"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.apple.iWork.Numbers",
- "appName": "Numbers",
- "bundleIdentifier": "com.apple.iWork.Numbers",
- "description": "Apple spreadsheet app for creating tables and spreadsheets.",
- "supportStatus": "supported",
- "capabilities": [
- {
- "id": "create_table",
- "summary": "Create a compact table or spreadsheet from tab-separated text.",
- "controlProfiles": [
- "new_document_text"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
- {
- "appID": "com.microsoft.Excel",
- "appName": "Microsoft Excel",
- "bundleIdentifier": "com.microsoft.Excel",
- "description": "Microsoft spreadsheet app for creating and editing workbooks.",
- "supportStatus": "candidate",
- "capabilities": [
- {
- "id": "create_table",
- "summary": "Create a compact table or spreadsheet from tab-separated text.",
- "controlProfiles": [
- "new_document_text"
- ],
- "requiredEntities": [
- "query"
- ]
- }
- ],
- "metadata": {}
- },
{
"appID": "com.apple.Terminal",
"appName": "Terminal",
@@ -222,38 +42,9 @@
"metadata": {}
},
{
- "appID": "com.apple.systempreferences",
- "appName": "System Settings",
- "bundleIdentifier": "com.apple.systempreferences",
- "description": "System settings changes require a more specific reviewed capability.",
- "supportStatus": "denied",
- "capabilities": [],
- "denyReason": "System settings changes require a more specific reviewed capability.",
- "metadata": {}
- },
- {
- "appID": "com.apple.ActivityMonitor",
- "appName": "Activity Monitor",
- "bundleIdentifier": "com.apple.ActivityMonitor",
- "description": "Process-management tools are denied for generic local-app automation.",
- "supportStatus": "denied",
- "capabilities": [],
- "denyReason": "Process-management tools are denied for generic local-app automation.",
- "metadata": {}
- },
- {
- "appID": "com.apple.Console",
- "appName": "Console",
- "bundleIdentifier": "com.apple.Console",
- "description": "System log tools are denied for generic local-app automation.",
- "supportStatus": "denied",
- "capabilities": [],
- "denyReason": "System log tools are denied for generic local-app automation.",
- "metadata": {}
- },
- {
- "appID": "app:1password",
+ "appID": "com.agilebits.onepassword7",
"appName": "1Password",
+ "bundleIdentifier": "com.agilebits.onepassword7",
"description": "Password manager apps are denied for local-app automation.",
"supportStatus": "denied",
"capabilities": [],
@@ -261,8 +52,9 @@
"metadata": {}
},
{
- "appID": "app:bitwarden",
- "appName": "Bitwarden",
+ "appID": "com.1password.1password",
+ "appName": "1Password",
+ "bundleIdentifier": "com.1password.1password",
"description": "Password manager apps are denied for local-app automation.",
"supportStatus": "denied",
"capabilities": [],
@@ -270,33 +62,30 @@
"metadata": {}
},
{
- "appID": "app:lastpass",
- "appName": "LastPass",
- "description": "Password manager apps are denied for local-app automation.",
+ "appID": "com.apple.ActivityMonitor",
+ "appName": "Activity Monitor",
+ "bundleIdentifier": "com.apple.ActivityMonitor",
+ "description": "Process-management apps are denied for generic local-app automation.",
"supportStatus": "denied",
"capabilities": [],
- "denyReason": "Password manager apps are denied for local-app automation.",
+ "denyReason": "Process-management apps are denied for generic local-app automation.",
"metadata": {}
},
{
- "appID": "app:dashlane",
- "appName": "Dashlane",
- "description": "Password manager apps are denied for local-app automation.",
+ "appID": "com.apple.systempreferences",
+ "appName": "System Settings",
+ "bundleIdentifier": "com.apple.systempreferences",
+ "description": "System settings are denied for generic local-app automation.",
"supportStatus": "denied",
"capabilities": [],
- "denyReason": "Password manager apps are denied for local-app automation.",
+ "denyReason": "System settings are denied for generic local-app automation.",
"metadata": {}
}
],
"aliases": {
- "chrome": "com.google.Chrome",
- "excel": "com.microsoft.Excel",
- "iterm": "com.googlecode.iterm2",
- "iterm2": "com.googlecode.iterm2",
"system preferences": "com.apple.systempreferences",
- "1password": "app:1password",
- "bitwarden": "app:bitwarden",
- "lastpass": "app:lastpass",
- "dashlane": "app:dashlane"
+ "settings": "com.apple.systempreferences",
+ "passwords": "com.apple.Passwords",
+ "terminal": "com.apple.Terminal"
}
}
diff --git a/apps/Donkey/Sources/DonkeyRuntime/SemanticRunMemoryRetriever.swift b/apps/Donkey/Sources/DonkeyRuntime/SemanticRunMemoryRetriever.swift
index 965577de..cf016dec 100644
--- a/apps/Donkey/Sources/DonkeyRuntime/SemanticRunMemoryRetriever.swift
+++ b/apps/Donkey/Sources/DonkeyRuntime/SemanticRunMemoryRetriever.swift
@@ -14,7 +14,7 @@ public struct LexicalRunMemoryEmbeddingProvider: RunMemoryEmbeddingProviding {
}
private static let vocabulary = [
- "app", "button", "field", "form", "media", "music", "pdf", "play", "search", "weather"
+ "app", "button", "field", "form", "input", "open", "play", "search", "submit", "text"
]
fileprivate static func tokens(in text: String) -> [String] {
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/AIHarnessAdapterTests.swift b/apps/Donkey/Tests/DonkeyRuntimeTests/AIHarnessAdapterTests.swift
index 51bee952..727a88d2 100644
--- a/apps/Donkey/Tests/DonkeyRuntimeTests/AIHarnessAdapterTests.swift
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/AIHarnessAdapterTests.swift
@@ -950,7 +950,7 @@ struct AIHarnessAdapterTests {
}
@Test
- func processBackedLocalLLMTaskIntentAdapterRepairsIncompleteModelPlannedInteraction() async throws {
+ func processBackedLocalLLMTaskIntentAdapterPreservesIncompleteModelPlannedInteraction() async throws {
let adapter = ProcessBackedLocalLLMTaskIntentAdapter(
router: AIModelRouter(registry: .defaultHybridPlanner),
sidecarRunner: FakeSidecarRunner(
@@ -975,18 +975,17 @@ struct AIHarnessAdapterTests {
command: "play some justin bieber",
taskDefinitions: LocalAppTaskDefinitionLoader.runtimeSeedDefinitions,
contextSnippets: ["Music application com.apple.Music"],
- sourceTraceID: "trace-repaired-local-app-plan"
+ sourceTraceID: "trace-preserved-local-app-plan"
)
)
#expect(result.intent?.taskType == "local_app_interaction")
#expect(result.intent?.normalizedEntities["appName"] == "Music")
#expect(result.intent?.normalizedEntities["query"] == "Justin Bieber")
- #expect(result.intent?.metadata["modelPlan.repaired"] == "true")
- #expect(result.intent?.actionPlan?.tools.contains(.setText) == true)
- #expect(result.intent?.actionPlan?.tools.contains(.pressReturn) == true)
- #expect(result.intent?.actionPlan?.controlID == "search")
- #expect(result.intent?.actionPlan?.focusKey == "Command+F")
+ #expect(result.intent?.metadata["modelPlan.repaired"] == nil)
+ #expect(result.intent?.actionPlan?.tools == [.openOrFocusApp, .focusSearch])
+ #expect(result.intent?.actionPlan?.controlID == "")
+ #expect(result.intent?.actionPlan?.focusKey == "")
#expect(result.trace.status == .completed)
}
@@ -1379,11 +1378,10 @@ struct AIHarnessAdapterTests {
)
)
- #expect(result.intent?.confidence == 0.2)
- #expect(result.intent?.actionPlan == nil)
- #expect(result.intent?.metadata["responseMode"] == "conversation")
- #expect(result.intent?.metadata["notActionableReason"] == "insufficientDocumentPayload")
- #expect(result.intent?.metadata["assistantResponse"]?.contains("clearer thing to write") == true)
+ #expect(result.intent?.confidence == 0.9)
+ #expect(result.intent?.actionPlan?.tools.contains(.setText) == true)
+ #expect(result.intent?.metadata["responseMode"] == nil)
+ #expect(result.intent?.metadata["notActionableReason"] == nil)
}
@Test
@@ -1420,7 +1418,7 @@ struct AIHarnessAdapterTests {
}
@Test
- func taskIntentDecoderRoutesCopiedPromptPlaceholderToConversation() async throws {
+ func taskIntentDecoderPreservesCopiedPromptPlaceholderFromModelBoundary() async throws {
let adapter = ProcessBackedLocalLLMTaskIntentAdapter(
router: AIModelRouter(registry: .defaultHybridPlanner),
sidecarRunner: FakeSidecarRunner(
@@ -1447,14 +1445,14 @@ struct AIHarnessAdapterTests {
)
)
- #expect(result.intent?.confidence == 0.2)
- #expect(result.intent?.actionPlan == nil)
- #expect(result.intent?.metadata["responseMode"] == "conversation")
- #expect(result.intent?.metadata["notActionableReason"] == "promptPlaceholderPayload")
+ #expect(result.intent?.confidence == 0.9)
+ #expect(result.intent?.actionPlan?.tools.contains(.setText) == true)
+ #expect(result.intent?.metadata["responseMode"] == nil)
+ #expect(result.intent?.metadata["notActionableReason"] == nil)
}
@Test
- func taskIntentDecoderRoutesEmptyTextInputPlanToConversation() async throws {
+ func taskIntentDecoderPreservesEmptyTextInputPlanForCatalogValidation() async throws {
let adapter = ProcessBackedLocalLLMTaskIntentAdapter(
router: AIModelRouter(registry: .defaultHybridPlanner),
sidecarRunner: FakeSidecarRunner(
@@ -1481,14 +1479,14 @@ struct AIHarnessAdapterTests {
)
)
- #expect(result.intent?.confidence == 0.2)
- #expect(result.intent?.actionPlan == nil)
- #expect(result.intent?.metadata["responseMode"] == "conversation")
- #expect(result.intent?.metadata["notActionableReason"] == "missingTextPayload")
+ #expect(result.intent?.confidence == 0.9)
+ #expect(result.intent?.actionPlan?.tools.contains(.setText) == true)
+ #expect(result.intent?.metadata["responseMode"] == nil)
+ #expect(result.intent?.metadata["notActionableReason"] == nil)
}
@Test
- func taskIntentDecoderRepairsSentenceSpreadsheetPayloadIntoTableText() async throws {
+ func taskIntentDecoderPreservesSpreadsheetPayloadFromModelBoundary() async throws {
let adapter = ProcessBackedLocalLLMTaskIntentAdapter(
router: AIModelRouter(registry: .defaultHybridPlanner),
sidecarRunner: FakeSidecarRunner(
@@ -1511,13 +1509,13 @@ struct AIHarnessAdapterTests {
command: "create a table in numbers with the marketcap of the 10 largest companies in s&p",
taskDefinitions: LocalAppTaskDefinitionLoader.runtimeSeedDefinitions,
contextSnippets: ["Numbers application com.apple.iWork.Numbers"],
- sourceTraceID: "trace-repaired-table-payload"
+ sourceTraceID: "trace-preserved-table-payload"
)
)
#expect(result.intent?.actionPlan?.tools.contains(.setText) == true)
- #expect(result.intent?.metadata["modelPlan.repairedTableText"] == "true")
- #expect(result.intent?.normalizedEntities["query"]?.contains("Request\tStatus") == true)
+ #expect(result.intent?.metadata["modelPlan.repairedTableText"] == nil)
+ #expect(result.intent?.normalizedEntities["query"]?.contains("Request\tStatus") == false)
#expect(result.intent?.normalizedEntities["query"]?.contains("Market capital") == true)
}
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/LegacyLocalAppTaskFixtures.swift b/apps/Donkey/Tests/DonkeyRuntimeTests/LegacyLocalAppTaskFixtures.swift
new file mode 100644
index 00000000..4b399ed4
--- /dev/null
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/LegacyLocalAppTaskFixtures.swift
@@ -0,0 +1,150 @@
+import DonkeyContracts
+@testable import DonkeyRuntime
+
+extension BuiltInLocalAppTaskDefinitions {
+ static var weatherLookup: LocalAppTaskDefinition {
+ LocalAppTaskDefinition(
+ taskType: "weather_lookup",
+ targetApp: LocalAppTarget(
+ appName: "Weather",
+ bundleIdentifier: "com.apple.weather",
+ titleContains: "Weather"
+ ),
+ triggerTerms: [],
+ entityRules: [
+ LocalAppTaskEntityRule(name: "city")
+ ],
+ workflowSteps: commonWorkflowPrefix + [
+ LocalAppTaskWorkflowStepDefinition(
+ id: "focus-search",
+ role: .focusControl,
+ summary: "Focus the task control",
+ metadata: [
+ "controlID": "search",
+ "key": "Command+F"
+ ]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "enter-city",
+ role: .enterText,
+ summary: "Enter the normalized entity",
+ metadata: ["entityName": "city"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "submit-search",
+ role: .submit,
+ summary: "Submit the task",
+ metadata: ["key": "Return"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "select-city-result",
+ role: .submit,
+ summary: "Select the matching city result",
+ metadata: ["key": "Return"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "verify-city",
+ role: .verifyResult,
+ summary: "Verify the visible result"
+ )
+ ],
+ observationStrategies: [.accessibility, .windowMetadata, .screenshotForLocalModel],
+ verificationEntityName: "city",
+ metadata: [
+ "catalogEntry": "test-weather-lookup",
+ "displayTitle": "weather lookup",
+ "taskLabelTemplate": "Weather for {city}",
+ "verificationTextKey": "city",
+ "screenshotFallback": "missingVerificationOrControls",
+ "visualFallback": "localModel",
+ "ocrFallbackDefault": "false"
+ ]
+ )
+ }
+
+ static var mediaPlayback: LocalAppTaskDefinition {
+ var metadata: [String: String] = [
+ "catalogEntry": "test-media-playback",
+ "displayTitle": "media playback",
+ "taskLabelTemplate": "Play {query}",
+ "verificationTextKey": "query",
+ "verificationMode": "playbackCommandAttempted",
+ "automationBackend": "appleScript",
+ "appleScript.action": "music.playMediaQuery",
+ "appleScript.entityName": "query",
+ "appleScript.successOutputs": "played-library-track,searched-ui-first-result",
+ "screenshotFallback": "missingVerificationOrControls",
+ "domain": "media",
+ "visualFallback": "localModel",
+ "ocrFallbackDefault": "false",
+ "skillID": "music-media",
+ "skillScriptID": "scripts-play-media-query-applescript"
+ ]
+ if let template = BuiltInLocalAppSkillPacks.scriptSource(
+ skillID: "music-media",
+ relativePath: "scripts/play-media-query.applescript"
+ ) {
+ metadata["appleScript.template"] = template
+ }
+
+ return LocalAppTaskDefinition(
+ taskType: "media_playback",
+ targetApp: LocalAppTarget(
+ appName: "Music",
+ bundleIdentifier: "com.apple.Music",
+ titleContains: "Music"
+ ),
+ triggerTerms: [],
+ entityRules: [
+ LocalAppTaskEntityRule(name: "query")
+ ],
+ workflowSteps: commonWorkflowPrefix + [
+ LocalAppTaskWorkflowStepDefinition(
+ id: "focus-search",
+ role: .focusControl,
+ summary: "Focus the app search control",
+ metadata: [
+ "controlID": "search",
+ "key": "Command+F"
+ ]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "enter-media-query",
+ role: .enterText,
+ summary: "Enter the requested media query",
+ metadata: ["entityName": "query"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "submit-media-search",
+ role: .submit,
+ summary: "Submit the media search or playback command",
+ metadata: ["key": "Return"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "play-first-media-result",
+ role: .submit,
+ summary: "Play the first matching media result",
+ metadata: ["key": "Return"]
+ ),
+ LocalAppTaskWorkflowStepDefinition(
+ id: "verify-media-query",
+ role: .verifyResult,
+ summary: "Verify the playback command was sent"
+ )
+ ],
+ observationStrategies: [.accessibility, .windowMetadata, .screenshotForLocalModel],
+ verificationEntityName: "query",
+ metadata: metadata
+ )
+ }
+
+ static var benchmarkFixtures: [LocalAppTaskDefinition] {
+ [
+ LocalAppTaskCatalog.genericLocalItemOpenDefinition,
+ LocalAppTaskCatalog.genericLocalAppInteractionDefinition,
+ weatherLookup,
+ mediaPlayback,
+ documentFormFill
+ ]
+ }
+}
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/LocalAppTaskTests.swift b/apps/Donkey/Tests/DonkeyRuntimeTests/LocalAppTaskTests.swift
index 9d61b573..4e881f73 100644
--- a/apps/Donkey/Tests/DonkeyRuntimeTests/LocalAppTaskTests.swift
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/LocalAppTaskTests.swift
@@ -390,7 +390,7 @@ struct LocalAppTaskTests {
}
@Test
- func catalogResolvesValidatedGenericPlayMediaToMusicAutomation() throws {
+ func catalogKeepsValidatedPlayMediaCapabilityOnGenericInteraction() throws {
let catalog = LocalAppTaskCatalog(
taskDefinitions: LocalAppTaskDefinitionLoader.runtimeSeedDefinitions,
availabilityProvider: StaticLocalAppAvailabilityProvider(
@@ -421,22 +421,24 @@ struct LocalAppTaskTests {
let resolution = catalog.resolve(intent: genericIntent)
let intent = try #require(resolution.intent)
let definition = try #require(resolution.definition)
- let commands = catalog.adapter(for: definition).guardedAutomationCommandTemplates(
+ let automationCommands = catalog.adapter(for: definition).guardedAutomationCommandTemplates(
+ for: intent,
+ issuedAt: timestamp(100)
+ )
+ let keyboardCommands = catalog.adapter(for: definition).guardedKeyboardCommandTemplates(
for: intent,
issuedAt: timestamp(100)
)
#expect(resolution.status == .resolved)
- #expect(intent.taskType == "media_playback")
+ #expect(intent.taskType == "local_app_interaction")
#expect(intent.targetApp.appName == "Music")
#expect(intent.normalizedEntities["query"] == "Viva La Vida Coldplay")
- #expect(intent.metadata["resolvedFromCapability"] == "play_media")
- #expect(intent.metadata["automationBackend"] == "appleScript")
- #expect(definition.taskType == "media_playback")
- #expect(definition.metadata["automationBackend"] == "appleScript")
- #expect(commands.map(\.kind) == [.controller])
- #expect(commands.first?.metadata["appleScript.action"] == "music.playMediaQuery")
- #expect(commands.first?.key == "Viva La Vida Coldplay")
+ #expect(intent.metadata["appFinder.selectedCapabilityID"] == "play_media")
+ #expect(definition.taskType == "local_app_interaction")
+ #expect(definition.metadata["automationBackend"] == nil)
+ #expect(automationCommands.isEmpty)
+ #expect(keyboardCommands.map(\.key) == ["Command+F", "Viva La Vida Coldplay", "Return"])
}
@Test
@@ -454,9 +456,8 @@ struct LocalAppTaskTests {
let terminal = try #require(entries.first { $0.appID == "com.apple.Terminal" })
let draftPad = try #require(entries.first { $0.appID == "com.example.DraftPad" })
- #expect(music.supportStatus == .supported)
- #expect(music.capabilities.map(\.id) == ["play_media"])
- #expect(music.capabilities.first?.controlProfiles == ["search_then_enter"])
+ #expect(music.supportStatus == .candidate)
+ #expect(music.capabilities.isEmpty)
#expect(terminal.supportStatus == .denied)
#expect(terminal.capabilities.isEmpty)
#expect(terminal.denyReason?.contains("shell") == true)
@@ -687,13 +688,8 @@ struct LocalAppTaskTests {
func appFinderProfilesLoadFromBundledJSON() throws {
let store = LocalAppFinderProfileStore.defaultStore
- let music = try #require(store.profile(appName: "Music", bundleIdentifier: "com.apple.Music"))
- #expect(music.supportStatus == .supported)
- #expect(music.capabilities.map(\.id).contains("play_media"))
-
- let chrome = try #require(store.profile(appName: "Chrome", bundleIdentifier: nil))
- #expect(chrome.bundleIdentifier == "com.google.Chrome")
- #expect(chrome.capabilities.map(\.id).contains("open_url"))
+ #expect(store.profile(appName: "Music", bundleIdentifier: "com.apple.Music") == nil)
+ #expect(store.profile(appName: "Chrome", bundleIdentifier: nil) == nil)
let terminal = try #require(store.profile(appName: "Terminal", bundleIdentifier: "com.apple.Terminal"))
#expect(terminal.supportStatus == .denied)
@@ -1199,13 +1195,13 @@ struct LocalAppTaskTests {
)
#expect(result.status == .completed)
- #expect(result.resolution.definition?.taskType == "media_playback")
+ #expect(result.resolution.definition?.taskType == "local_app_interaction")
#expect(result.metadata["reason"] != "evidencePlanBlocked")
- #expect(result.metadata["automation.backend"] == "appleScript")
- #expect(result.metadata["automation.action"] == "music.playMediaQuery")
+ #expect(result.metadata["automation.backend"] == nil)
+ #expect(result.metadata["automation.action"] == nil)
#expect(result.workflowProgress.state(for: .evidencePlan)?.status == .completed)
#expect(result.workflowProgress.state(for: .execute)?.status == .completed)
- #expect(await backend.executedKeys() == ["Viva La Vida Coldplay"])
+ #expect(await backend.executedKeys() == ["Command+F", "Viva La Vida Coldplay", "Return"])
}
@Test @MainActor
diff --git a/docs/guides/agent-harness.md b/docs/guides/agent-harness.md
index c23f8351..e28d6a20 100644
--- a/docs/guides/agent-harness.md
+++ b/docs/guides/agent-harness.md
@@ -13,14 +13,15 @@ New agent capabilities should plug into that module through tools, skills,
scripts, plugins, catalogs, or memory. Do not add app-specific branches,
phrase lists, or one-off workflow conditionals to the core harness.
-Bundled local-app skills now carry the app-specific planning guidance for
-Music/media, browser navigation, notes/text writing, spreadsheet tables, and
-weather lookup. Task-intent model calls receive those skills as bounded skill
-context alongside task definitions, app catalog data, and memory.
-
-The existing pointer-prompt and local-app runner code still exists while the
-product migrates onto the generic harness. New work should build toward the
-generic registry and avoid expanding the older app-specific paths.
+Bundled and learned local-app skills carry app-specific planning guidance.
+Task-intent model calls receive relevant skills as bounded context alongside
+the generic task definitions, generated or user-reviewed app catalog data, and
+memory. The core runtime does not ship app-specific Weather, Music, Notes, or
+Numbers task branches.
+
+The existing pointer-prompt and local-app runner code still bridges concrete
+desktop workflows while the product migrates onto the generic harness. New work
+should build toward the generic registry and avoid app-specific runtime paths.
Pointer-prompt local-app execution now enters the generic lifecycle before it
uses the older live-runner backend. The hosted planning boundary emits the
diff --git a/docs/guides/pointer-prompt-overlay.md b/docs/guides/pointer-prompt-overlay.md
index 083fdc73..6f9aac56 100644
--- a/docs/guides/pointer-prompt-overlay.md
+++ b/docs/guides/pointer-prompt-overlay.md
@@ -66,7 +66,7 @@ quick local-app actions:
- The prompt is a compact black composer: single-line text is pill-shaped, multiline text becomes a bounded rounded rectangle, Return submits, Shift-Return inserts a newline, Escape and outside clicks dismiss, and non-input capsule areas can drag the modal.
- The centered composer keeps text and voice modes on the same input surface. Double-Command release opens focused text input, double-Command hold opens the same input with voice active, and typed text promotes the send button while the microphone affordance becomes secondary.
- Voice capture and transcription remain separate. The controller records bounded local audio and publishes levels; transcription is model-backed through the hosted agent-harness boundary before transcript text enters the turn path.
-- Local item prewarming must run off the main actor and must not eagerly scan protected user folders. Agent memory is stored in SQLite under Application Support and uses FTS5 plus deterministic local embeddings for retrieval; JSONL is only an explicit export/debug format. Cached local-item hits must still point to an existing path or bundle before they are used as an execution target. Runtime task definitions are loaded from agent memory; Weather, Music, and Preview definitions are benchmark fixtures unless a generated/user-reviewed definition for them is present in memory.
+- Local item prewarming must run off the main actor and must not eagerly scan protected user folders. Agent memory is stored in SQLite under Application Support and uses FTS5 plus deterministic local embeddings for retrieval; JSONL is only an explicit export/debug format. Cached local-item hits must still point to an existing path or bundle before they are used as an execution target. Runtime task definitions are the generic open/local-app interaction seeds plus generated or user-reviewed definitions loaded from memory.
- For scriptable apps, prefer app-native AppleScript task commands before falling back to Accessibility or keyboard input. Submit steps with an explicit structured `controlID` may execute as an Accessibility `AXPress` against button-like controls, with the control bounds carried into action traces. Bounded screenshots may supplement observation/verification according to task metadata, but screenshots remain context evidence and do not directly drive input.
- Agent visualization overlays are non-interactive, non-activating panels. They may point, explain, and replay what the agent is doing or would do, but they do not synthesize mouse movement. Live keyboard or Accessibility actions remain separate guarded runtime actions. When a local-app action plan is based on an observation, preserve target-window geometry and control bounds on the evidence-backed steps so cursor replay can use pixel-grounded element positions instead of invented coordinates.
- The developer UI inspection overlay is separate from agent visualization. It
diff --git a/plans/master-plan.md b/plans/master-plan.md
index 310ff074..db7b6e7f 100644
--- a/plans/master-plan.md
+++ b/plans/master-plan.md
@@ -21,10 +21,6 @@ even when there are no active tasks.
## Current Sequence
-1. Delete old app-specific paths once the generic path covers them. Remove
- hardcoded Music/Notes/Numbers/media/weather-style prompt rules, catalog
- special cases, repair logic, and demo-only workflow branches.
-
## Invariants
- Completed behavior belongs in `docs/`, not in active plans.