yaver 0.2.0 copy "yaver: ^0.2.0" to clipboard
yaver: ^0.2.0 copied to clipboard

Yaver SDK — embed P2P AI agent connectivity into your Flutter & Dart apps. Create tasks, stream output, manage devices, and transcribe speech.

Yaver SDK for Flutter & Dart #

Embed Yaver's P2P AI agent connectivity into your Flutter and Dart apps. Control any AI coding agent (Claude Code, Codex, Aider, etc.) running on your dev machine — from a Flutter app on any platform.

Install #

dependencies:
  yaver: ^0.2.0
flutter pub add yaver

Quick Start #

import 'package:yaver/yaver.dart';

final client = YaverClient('http://localhost:18080', 'your-auth-token');

// Create a task
final task = await client.createTask('Fix the login bug');

// Stream output as it arrives
await for (final chunk in client.streamOutput(task.id)) {
  stdout.write(chunk);
}

Features #

Task Management #

// Create with options
final task = await client.createTask(
  'Refactor the auth module',
  CreateTaskOptions(model: 'sonnet', runner: 'claude'),
);

// List, stop, delete
final tasks = await client.listTasks();
await client.stopTask(task.id);
await client.deleteTask(task.id);

// Follow-up messages
await client.continueTask(task.id, 'Also update the tests');

Image Attachments #

import 'dart:convert';
import 'dart:io';

final bytes = await File('screenshot.png').readAsBytes();
final task = await client.createTask(
  'What is wrong with this UI?',
  CreateTaskOptions(images: [
    ImageAttachment(
      base64: base64Encode(bytes),
      mimeType: 'image/png',
      filename: 'screenshot.png',
    ),
  ]),
);

Speech-to-Text #

import 'dart:io';

final audioBytes = await File('recording.m4a').readAsBytes();
final result = await transcribe(
  audioBytes,
  SpeechProvider.openai,
  'sk-your-openai-key',
);
print(result.text); // transcribed text

Auth & Devices #

final auth = YaverAuthClient('your-auth-token');

final user = await auth.validateToken();
print('Hello, ${user.fullName}');

final devices = await auth.listDevices();
for (final d in devices) {
  print('${d.name} — ${d.isOnline ? "online" : "offline"}');
}

Agent Info & Health #

final rtt = await client.ping();
print('RTT: ${rtt}ms');

final info = await client.info();
print('${info.hostname} running v${info.agentVersion}');

API Reference #

YaverClient #

Method Description
health() Check agent reachability
ping() Measure round-trip time (ms)
info() Get agent hostname, version, platform
createTask(prompt, opts?) Create a new task (supports images)
getTask(taskId) Get task details
listTasks() List all tasks
stopTask(taskId) Stop a running task
deleteTask(taskId) Delete a task
continueTask(taskId, message, images?) Send follow-up message
streamOutput(taskId) Stream output as a Stream<String>
clean(days) Remove old tasks/images/logs

YaverAuthClient #

Method Description
validateToken() Verify auth token, get user info
listDevices() List registered devices
getSettings() Get user preferences
saveSettings(settings) Update user preferences

transcribe() #

Cloud speech-to-text via OpenAI, Deepgram, or AssemblyAI.

License #

MIT

0
likes
0
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

Yaver SDK — embed P2P AI agent connectivity into your Flutter & Dart apps. Create tasks, stream output, manage devices, and transcribe speech.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on yaver