Skip to content

feat: add native tool routing contract#33

Draft
SebastianBoehler wants to merge 5 commits into
mainfrom
issue-30-native-tool-routing
Draft

feat: add native tool routing contract#33
SebastianBoehler wants to merge 5 commits into
mainfrom
issue-30-native-tool-routing

Conversation

@SebastianBoehler

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared Dart native-tool router with capability gating and explicit unsupported-device responses.
  • Expose the Port native device control tools to Flutter agent #30 device-control tools in the StudyOS tool catalog and route local/cloud tool execution through the shared native runner.
  • Add Android implementations for device status, flashlight, installed-app launch, YouTube search, and settings-panel opening.
  • Add the same native-tool contract metadata on iOS with explicit unsupported responses, and reserve create_reminder as inactive contract surface for the follow-up Port native reminder creation to Flutter agent #31 stack.

Refs #30. Leaves #31 for a stacked PR.

Validation

  • git diff --check
  • git diff --cached --check

Could not run Dart/Flutter tests or Android Kotlin compilation in this runtime because dart, flutter, java, and JAVA_HOME are not available. The Android Gradle attempt failed before compilation with missing Java.

Follow-up

  • Stack Port native reminder creation to Flutter agent #31 by enabling create_reminder in the active native tool catalog and implementing it behind the existing executeNativeTool method.
  • Run flutter test, flutter analyze, and Android/iOS smoke checks on a development machine with the mobile toolchains installed.

@linuscooper

Copy link
Copy Markdown
Contributor

Consider the following if judged to be changeworthy:

  • Native tools were added to studyOsTools but cloudToolDefinitions() and _localSystemPrompt() still advertise all of them on every platform. Fetch getCapabilities() once at prompt-build time and filter the tool list there so unsupported tools are never advertised
  • Change executeNativeTool(name,args) -> String to a structured result (payload + message) and add an error enum distinguishing missingPermission, unsupportedPlatform, invalidArguments, nativeError,..,, replacing the single native_tool_failed code
  • Dedupe Kotlin executors. AndroidNativeToolExecutor and AndroidLiteRtToolExecutor implement the same Tools.java actions under different names. Have one delegate to the other or share a core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants