nativemind_copilot 1.4.0
nativemind_copilot: ^1.4.0 copied to clipboard
The NativeMind copilot for Flutter: agent panel, decisions and spending policy, voice and attachments, protocol client, OAuth / MCP connect screens.
1.4.0 #
Additive (SDD consilium.nativemind.net flows/sdd-consilium-design-oauth: the OAuth consent page and «Connected apps» in
the look of the Konsilium OAuth prototype). Every new constructor parameter and field is optional and keeps the 1.3.0
look and behaviour when unset. Needs nativemind_core ^1.7.0 (NmStickyActionBar).
- New widgets (
lib/src/ui/connect/nm_consent_parts.dart):NmConnectPair(the app's initial on its colour ↔ the service's mark, a lock / tick / cross between;NmConnectPairState),NmClientBadges(verified / not verified and where the browser returns, «on this computer · localhost:PORT»),NmConsentAccount(«Signed in as» + Switch),NmConsentTechDetails(collapsible key → value in monospace),NmConsentOutcome. NmConsentScope(id, label, {description, required = true, icon, code}): a scope with a description orrequired: falseswitches the list to rows with «required» or a switch.NmConsentRequest(…, {clientInitial, clientColor, local, denied, techDetails, warning}).NmOAuthConsent(…, {body, account, note, onScopesChanged, stickyActions, showPair, outcome, serviceInitial}): a product block slot (body:) between the account and the rights, «It won't be able to», a note, technical details, «Allow read only» when every optional scope is off, Deny / Allow in anNmStickyActionBar(stickyActions, needs a bounded height).NmConsentPhase.granted,.denied,.invalidClient(withoutcome). Note: an exhaustiveswitchoverNmConsentPhasewithout a default in an app must add these cases.NmConnectedApp(…, {clientInitial, clientColor, local, redirectHost, lang, details})andNmConnectedApps(…, {onEdit, actionsBuilder, showTitle = true, empty}): the card shows the tile, the badges, the language, a product block and «Change» / product actions.- 20 new texts (
consentVerified…connectedEdit) in en, ru, th, zh, hi; they get an English default in the abstract class (tool/gen_text_keys.dartadditive14), sonativemind_translationskeeps compiling. - Japanese (
copilot_ja.arb, every key); the delegate's languages are en, ru, th, hi, zh, ja.
1.3.0 #
Additive (SDD dropexpired.net flows/sdd-dropexpired-nativemind-framework): gaps found while moving the dropexpired.net agent panel to the framework, kept generic. No existing constructor, signature or default changed; every new option is optional and keeps the 1.2.0 behaviour when unset.
NmCopilotPreviewBar({required onOpen, maxLines = 1, placeholder}): the collapsed bar of a phone layout. It shows the first words of the latest agent reply as it streams («The agent is working…» before the first text) and opens the full panel on tap. It reads theNmCopilotScopecontroller.NmCopilotPreviewBar.replyOf(turn)gives the line.NmCopilotDecisionCard(acceptLabel:, declineLabel:): button labels. Null keeps the library texts.NmCopilotChangeRow(undoKey:): the key of the Undo button. Null keepsKey('copilot-change-undo').NmCopilotController.adopt(conversationId, {turns = const []}): continues an existing conversation without sending anything and without calling the engine. The given turns are shown and the next message goes to that conversation. Use it instead ofcontinueAnswer(text: '').NmCopilotIssue.details(default{}; also incopyWith): the error's details, e.g. plan limit numbers. A turn that failed on a thrownNmCopilotErrornow passes its details to its issue; before, onlylastErrorhad them.nmIssueFromErrorfills the field. The library wording does not read it, so the rendering is unchanged. Anissuebuilder slot can read it.NmCopilotConfig:stepLabelBuilder,strategyLabelBuilder,memoryKeyLabelsBuilderandsuggestionsBuilderreceive aBuildContext(labels in the user's language). When one is set, it is used instead of the fixedstepLabel/NmStrategy.label/memoryKeyLabels/suggestions. The resolversstepLabelOf,strategyLabelOf,memoryKeyLabelsOfandsuggestionsOfare for custom designs.
Additive (SDD pbn.nativemind.net flows/sdd-pbn-feedbacks, F2): gaps found while moving the PBN agent panel to the copilot engine. Same rule: nothing existing changes; without the new options and data the panel renders as in 1.2.0.
- Composer lock.
NmCopilotController.lock(String hint)/unlock()/locked: the input, send button and suggestion chips are disabled and the composer showshintinstead of its placeholder (canSendis false,lockedHintis the hint). Programmaticask/sendstill work. - Resumable conversation stream. A new optional engine interface
NmConversationStreamEngine(watchConversation(conversationId, {lastEventId})→NmConversationEvent(turnId, event, {userText})), implemented next toNmCopilotEngine— the engine interface itself is unchanged.NmCopilotController.resume(conversationId, {afterSeq})follows it (watching,lastEventId,stopWatching());NmCopilotConfig.resumeConversationsdoes it on its own for started, opened and adopted conversations;resumeRetryDelay(2 s) paces the resubscribe after a drop, from the last id. Turns started on another device appear; replays are dropped by event id; a turn whose ownsendstream ends or drops (retryable) afterturngoes on over the conversation stream; conversation events that arrive before the turn's id is known are held for it.receive(event)applies a pushed event. - Activity line. The
activityevent (NmActivityEvent(text, {phase, stepKey, at})) setsNmAgentTurn.activity(NmTurnActivity) while the turn runs: shown as the running step's detail whenstepKeymatches a running step, else as the live row (instead of «The agent is working…»); cleared when the turn ends. - Skipped steps.
NmTurnStep.skipped(protocolstate: "skipped"): a faded row with the Fuguearrow-skipglyph and «Skipped». The step'sstatestayswait, so theNmTurnStepStateenum is unchanged (no break of exhaustive switches). - Elapsed seconds.
NmTurnStep.startedAtandNmAgentTurn.startedAt(turn.startedAt/NmTurnEvent.startedAt): the running step and the live row show «12 s», ticking (NmCopilotElapsed, also public). - Error code.
NmTurnStep.detailCode: the tooltip of a step's detail line (and in its semantics label). - Follow-ups and cancellation over the protocol. The
actionsevent (NmActionsEvent) setsNmAgentTurn.actions(rendered since 1.2 and routed toconfig.onAction); thecancelledevent (NmCancelledEvent) ends a turn as cancelled (e.g. stopped on another device). nmDecisionFromJson/nmDecisionToJsoncarrynote.- New texts
stepSkipped,elapsedSecondsin the 5 languages; as additive keys they have an English default inNmCopilotL10n, so translation classes compiled against earlier versions still compile (tool/gen_text_keys.dartnow also gives additive keys with placeholders a default). - Compatibility notes: the new events extend
NmUnknownEvent(notNmCopilotEventdirectly), so exhaustive switches over the sealed event type written for 1.2 stay exhaustive and 1.2-style handlers keep ignoring them; the wire namesactivity,actionsandcancelledused to decode to a plainNmUnknownEventand still match it. New members ofNmCopilotController(lock,unlock,locked,resume,stopWatching,watching,lastEventId,receive) were chosen not to clash with known subclasses (lock(String)matches an existing PBN override).
1.2.0 #
Additive (SDD widgets.nativemind.net flows/sdd-nativemind-widgets-liendeed; carried from the LienDeed apps'
ld_copilot, with the product names made options). Includes the unpublished 1.1.1 maintenance release below.
NmSelectedModelProvider: the on-device provider for the model picked inNmModelManager, read on every request.nmManagedHybrid(models:, tools:, prompt:, remote:): on the device with the selected model, and the cloud when the platform has no on-device models, no model is selected, or it does not fit.NmMeteredEngine: wraps an engine for metered guests, with a soft prompt after N answers and a callback with the server's reason when a guest turn is refused (limitCode, defaultACCOUNT_REQUIRED).nmPresetForDevice(desktop:, ramBytes:): the default open chat model for a device.
1.1.1 #
Maintenance release, no API or behaviour change. Checked with Flutter 3.50.0 (stable, Dart 3.14): analyzer clean
apart from the SDK deprecation of package:flutter/material.dart / cupertino.dart in favour of material_ui /
cupertino_ui, which stays: moving would require Flutter 3.47+ and break apps on 3.32–3.44. Dependency
constraints and the SDK floor are unchanged; every dependency resolves to its latest compatible version.
example/example.dart: a runnable example for pub.dev.- Shorter pubspec description (pub.dev shows up to 180 characters).
homepageremoved: widgets.nativemind.net is not online;repositorystays.
1.1.0 #
Additive (SDD consilium.nativemind.net flows/sdd-konsilium-nativemind-framework, specification §1): no existing signature changed, every new field and flag defaults to the old behaviour.
-
Default voice-mode stop words cover every panel language (the words the «say stop» hint names: ru, en, th, hi, zh, ja, ko, ar, he, bn, km, lo, my, de, fr, it, pt, es, uk, sw).
-
Web voice (package:web, no plugins; stubs off the web):
NmWebAudioRecorder(MediaRecorder, AnalyserNode level) with the new optional interfaceNmAudioRecorderControls(cancel,level);NmWebSpeechInput(SpeechRecognition / webkitSpeechRecognition, partial results,continuous, locale). -
Speech output: the
NmSpeechOutputport,NmWebSpeechOutput(speechSynthesis,rate,voiceName, a voice for the locale) andNmFakeSpeechOutput. -
Defaults:
nmDefaultVoiceInput(engine),nmDefaultAudioRecorder(),nmDefaultSpeechOutput(),nmDefaultAttachmentPicker()— the browser implementations on the web, null elsewhere (native ones: the separate packagenativemind_copilot_media). -
NmServerVoiceInput(onNoTranscript: …): a recording without transcript comes back as an audio draft (nmAudioDraft). -
Web attachments:
NmWebAttachmentPicker(files / images / camera, several at once,acceptFiles);nmPasteDraft(images: true)reads an image from the web clipboard;NmAttachmentDropTarget(drop files, paste images; transparent off the web).NmCopilotPanelwraps itself in it when attachments are on (NmCopilotFeatures.dropFiles);NmCopilotComposer(attachments: …)can share the panel's attachment list. -
Voice assistant mode (#F77):
NmVoiceAssistantConfig(NmCopilotConfig.voiceAssistant, defaultNmVoiceAssistantConfig.off),NmVoiceAssistantPhase,NmVoiceAssistantReason,NmVoiceAssistantController(listen → send → think → speak briefly → listen; stop words and new speech interrupt the speech, never the turn; silence pauses),NmVoiceAssistantBar, the header button (NmCopilotFeatures.voiceAssistant), the slotNmCopilotBuilders.voiceAssistantBar; helpersnmSpokenText,nmIsStopPhrase,nmHasStopWord. -
Strings
voiceMode*andattachDropHintin en, ru, th, hi, zh. In the abstractNmCopilotL10nthey have an English default (tool/gen_text_keys.dart), so language classes built for 1.0 (nativemind_translations ≤ 1.0.2) still compile.
1.0.1 #
- Docs: README (install, handmade authors and roles, links), migration guide, PROVENANCE.
- pubspec:
repositoryfield so README links resolve on pub.dev.
1.0.0 #
Major release of the NativeMind framework (SDD flows/sdd-widgets-handmade, task 3.1). Guide: doc/migration-1.0.md.
- Removed (deprecated since 0.1.0 / 0.2.0 «removed in 0.2.0»):
- the 0.3 widgets of
src/legacy/:NmAgentChat,NmChatAttachAction,NmAgentPanel,NmAgentMessageBubble,NmAgentApprovalCard,NmAgentJobSteps,NmCostFormatter,NmAgentController,NmAgentBubble,NmAgentToolTrace,NmAgentResultCard,NmAgentConfirmCard,NmAgentSuggestions,NmCopilotSheet,NmCopilotSheetController,NmCopilotResult; - the 0.4 conversation widgets:
NmAgentStepCard,NmAgentDecisionCard,NmAgentTurnView,NmAgentConversationPanel,NmAgentLauncherand theNmAutonomyTiptypedef they used; - the 0.4 names
NmAiandNmAiL10n(useNmCopilotandNmCopilotL10n).
- the 0.3 widgets of
- Kept: the 0.3 models (
NmAgentMessage,NmAgentRole,NmAgentAction,NmAgentApproval,NmAgentJobStep,nmAgentNeedsApproval) andNmAgentConversationController(the contractNmCopilotControllerimplements). - Requires
nativemind_core^1.0.0.flutter_llamacomes from pub.dev (^1.2.0); the local path override was removed. - License: NativeMindNONC (part of the NativeMind framework).
0.2.0 #
- Prototype engine (
NmPrototypeEngine): the tool loop withNmCopilotToolandNmPromptLayers; OpenAI-compatible and Anthropic providers with streaming, tool calls and image parts; the insecure-keys guard. - On-device models:
NmLocalLlmProviderover flutter_llama 1.2 (open models only);NmModelManagerwithNmModelPicker(download, fit check, selection);NmHybridEngine: device first, the cloud when the device cannot.
- Voice port
NmVoiceInput:- states idle / listening / transcribing / denied / unavailable;
NmServerVoiceInputoverengine.transcribe;- a fake for tests;
- the composer mic (hidden when not configured).
- Attachments port
NmAttachmentPicker:- paste and links without plugins;
NmAttachmentPolicylimits;- chips with progress, remove, and 413 / 415 errors;
- thumbnails in the user turn.
- Native recorders and pickers are not in this package.
- Web: the stream client no longer passes JS interop tear-offs (fixes a dart2js crash).
- Requires
nativemind_core0.1.1 (the image, camera and clipboard-paste icons) andflutter_llama1.2.0.
0.1.0 #
- Package created (copilot moved out of nativemind_widgets).
- Depends on
nativemind_coreinstead ofnativemind_widgets(light: essential icons, no plugins). - 23 extra languages via
nativemind_translations.