nativemind_copilot 1.1.1
nativemind_copilot: ^1.1.1 copied to clipboard
The NativeMind copilot for Flutter: agent panel, decisions and spending policy, voice and attachments, protocol client, OAuth / MCP connect screens.
nativemind_copilot #
The NativeMind copilot for Flutter: an agent panel (NmCopilotPanel under NmCopilotScope with an
NmCopilotController), engines (cloud providers, on-device models, hybrid), voice and attachment ports, approvals
and the AI loupe. Part of the NativeMind framework.
Built on nativemind_core: about 0.9 MB of assets (test/size_test.dart checks it); the only plugin is flutter_llama
(on-device models) — keep this package out of apps or editions that must not ship native model code. Extra languages:
add nativemind_translations and call NmTranslations.install(). Customisation:
doc/customisation.md. Upgrading from 0.x or from nativemind_widgets/ai.dart:
doc/migration-1.0.md.
Install #
dependencies:
nativemind_copilot: ^1.1.0
import 'package:nativemind_copilot/nativemind_copilot.dart';
Register NmCopilot.delegate with the app's localizations delegates.
Voice and attachments #
Ports with web implementations in this package (package:web, no plugins; stubs elsewhere) and fakes for tests:
| Port | Web implementation | Default for the platform | Fake |
|---|---|---|---|
NmVoiceInput |
NmWebSpeechInput (SpeechRecognition / webkitSpeechRecognition, partial results), or NmServerVoiceInput over NmWebAudioRecorder (MediaRecorder, level meter via NmAudioRecorderControls) |
nmDefaultVoiceInput(engine) |
NmFakeVoiceInput |
NmAudioRecorder |
NmWebAudioRecorder |
nmDefaultAudioRecorder() |
— |
NmSpeechOutput |
NmWebSpeechOutput (speechSynthesis, voice for the locale) |
nmDefaultSpeechOutput() |
NmFakeSpeechOutput |
NmAttachmentPicker |
NmWebAttachmentPicker (hidden <input type=file>, camera via capture) |
nmDefaultAttachmentPicker() |
NmFakeAttachmentPicker |
The defaults return null off the web. Native implementations (Android, iOS, desktop) live in the separate package
nativemind_copilot_media, so this package stays without media plugins. When the server cannot transcribe, pass
onNoTranscript to NmServerVoiceInput and the recording comes back as an audio attachment draft. With attachments on,
NmCopilotPanel takes files dropped on the page and pasted images on the web (NmAttachmentDropTarget, feature flag
dropFiles); nmPasteDraft(images: true) reads an image from the web clipboard.
Voice assistant mode. Set NmCopilotConfig(voiceAssistant: NmVoiceAssistantConfig(enabled: true)) and the panel
header gets a «Voice mode» button (feature flag voiceAssistant) with a status bar above the composer (slot
NmCopilotBuilders.voiceAssistantBar). NmVoiceAssistantController runs the loop: listen → send the finished utterance
(autoSend) → think → say a short version of the reply (markdown and links removed, cut at a sentence within
maxSpokenChars) → listen again (relisten); silenceTimeout pauses it. While it speaks it keeps listening: a stop word
(«стоп», «подожди», «stop», «wait», «หยุด» …), new speech or «Stop» silences it at once — the copilot's turn is never
cancelled — and new speech becomes the next message. Without a voice input the mode is unavailable; without speech output
replies stay text; a refused microphone turns it off with a hint. Input and output default to the copilot's voice
input and the platform defaults above.
NmCopilotConfig(
engine: engine,
attachments: NmAttachmentPolicy(enabled: true, picker: nmDefaultAttachmentPicker()),
voice: NmVoiceConfig(mode: NmVoiceMode.device, input: nmDefaultVoiceInput(engine)),
voiceAssistant: const NmVoiceAssistantConfig(enabled: true),
)
Authors #
The copilot was written with AI assistants in 2026 (SDD flows sdd-nativemind-copilot, sdd-nativemind-widgets-*);
it contains no handmade code — 0 % handmade, see PROVENANCE.md. The handmade parts of the framework
are in nativemind_core, nativemind_vpn, nativemind_sound, nativemind_sound_generator, nativemind_deals and
nativemind_call.
Links #
- pub.dev: nativemind_copilot · publisher framework.nativemind.net
- Source: gitlab.com/nativemind/widgets.nativemind.net,
flutter/nativemind_copilot; server side:js/copilot-server, protocolprotocol/openapi.yaml - CHANGELOG.md · NOTICE
License #
NativeMindNONC (see LICENSE), as the whole NativeMind framework. flutter_llama and downloaded models keep their own
licenses (see NOTICE).