mindwire 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/{chunk-WXOV2P3V.js → chunk-DDXMDQOM.js} +3 -3
- package/dist/{chunk-WXOV2P3V.js.map → chunk-DDXMDQOM.js.map} +1 -1
- package/dist/{chunk-KPTSQJVM.js → chunk-PCBZ5RU5.js} +218 -36
- package/dist/chunk-PCBZ5RU5.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/client.d.ts +12 -3
- package/dist/{connection-change-SCRLUU6Q.js → connection-change-4FVOAA4K.js} +3 -3
- package/dist/{connection-change-SCRLUU6Q.js.map → connection-change-4FVOAA4K.js.map} +1 -1
- package/dist/{controller-IY3EWUJX.js → controller-NYTBXYAN.js} +4 -4
- package/dist/{controller-IY3EWUJX.js.map → controller-NYTBXYAN.js.map} +1 -1
- package/dist/{controller-handoff-TRI2D6LB.js → controller-handoff-IDV2S7DI.js} +3 -3
- package/dist/{controller-handoff-TRI2D6LB.js.map → controller-handoff-IDV2S7DI.js.map} +1 -1
- package/dist/embedded.d.ts +17 -1
- package/dist/index.cjs +215 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +214 -32
- package/dist/index.js.map +1 -1
- package/dist/target/index.d.ts +8 -2
- package/dist/types.d.ts +77 -0
- package/dist/voice.d.ts +37 -0
- package/package.json +1 -1
- package/dist/chunk-KPTSQJVM.js.map +0 -1
package/dist/target/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface TargetHandle {
|
|
|
35
35
|
getToken?: TokenGetter;
|
|
36
36
|
/** Release destination-owned resources (per the factory's `stopOnExit`). Idempotent. */
|
|
37
37
|
stop(): Promise<void>;
|
|
38
|
+
/** Local process liveness when this target owns a daemon; remote targets use health(). */
|
|
39
|
+
isAlive?(): boolean;
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
40
42
|
* A destination for the mindwire daemon. Given a {@link ConnectSpec}, provision (or reuse) the
|
|
@@ -48,6 +50,10 @@ export interface Target {
|
|
|
48
50
|
readonly name: string;
|
|
49
51
|
connect(spec: ConnectSpec): Promise<TargetHandle>;
|
|
50
52
|
}
|
|
53
|
+
export interface LocalTarget extends Target {
|
|
54
|
+
/** v1 supports a private environment, separate host auth source, and an owned daemon lifetime. */
|
|
55
|
+
readonly profileVersion: number;
|
|
56
|
+
}
|
|
51
57
|
/**
|
|
52
58
|
* The default destination: an **embedded** daemon on loopback. On a server runtime (Node/Bun/Deno)
|
|
53
59
|
* `connect()` auto-spawns the bundled `mindwired` on a free `127.0.0.1` port and points the SDK at it,
|
|
@@ -55,9 +61,9 @@ export interface Target {
|
|
|
55
61
|
*
|
|
56
62
|
* Embedded daemons are memoized by config (see embedded.ts): two zero-config `local()` clients share
|
|
57
63
|
* one loopback daemon (one environment), while `local({ cwd })` / `local({ statePath })` isolate into
|
|
58
|
-
* their own.
|
|
64
|
+
* their own. Shared targets stay alive until host exit. With `shared: false`, close() stops the owned daemon.
|
|
59
65
|
*/
|
|
60
|
-
export declare function local(opts?: EmbeddedOptions):
|
|
66
|
+
export declare function local(opts?: EmbeddedOptions): LocalTarget;
|
|
61
67
|
/** Options for {@link remote}. */
|
|
62
68
|
export interface RemoteOptions {
|
|
63
69
|
/** Bearer token for the daemon, if it requires one. */
|
package/dist/types.d.ts
CHANGED
|
@@ -265,6 +265,59 @@ export type Support = "none" | "native" | "emulated";
|
|
|
265
265
|
export type Protocol = "cli" | "http" | "persistent";
|
|
266
266
|
/** How an agent emits a turn's output. */
|
|
267
267
|
export type OutputMode = "structured_json" | "terminal";
|
|
268
|
+
/** Voice exposed by the harness itself, independently of model input modalities. */
|
|
269
|
+
export interface VoiceCapability {
|
|
270
|
+
mode: "conversation" | "dictation" | "none";
|
|
271
|
+
support: Support;
|
|
272
|
+
remote: boolean;
|
|
273
|
+
detail?: string;
|
|
274
|
+
}
|
|
275
|
+
export interface VoiceStatus {
|
|
276
|
+
capability: VoiceCapability;
|
|
277
|
+
available: boolean;
|
|
278
|
+
code?: string;
|
|
279
|
+
detail?: string;
|
|
280
|
+
voices?: string[];
|
|
281
|
+
}
|
|
282
|
+
export interface VoiceOptions {
|
|
283
|
+
clientId: string;
|
|
284
|
+
voice?: string;
|
|
285
|
+
}
|
|
286
|
+
export interface VoiceAudio {
|
|
287
|
+
/** Base64 PCM16 little-endian. Input batches are at most 500 ms. */
|
|
288
|
+
data: string;
|
|
289
|
+
sampleRate: number;
|
|
290
|
+
channels: number;
|
|
291
|
+
}
|
|
292
|
+
export interface VoiceEvent {
|
|
293
|
+
type: "connecting" | "ready" | "audio" | "transcript" | "listening" | "error" | "closed" | "heartbeat";
|
|
294
|
+
audio?: VoiceAudio;
|
|
295
|
+
text?: string;
|
|
296
|
+
role?: string;
|
|
297
|
+
itemId?: string;
|
|
298
|
+
final?: boolean;
|
|
299
|
+
}
|
|
300
|
+
/** A native action, settings selector, or command/skill. Route by kind; never send controls as text. */
|
|
301
|
+
export interface HarnessCommand {
|
|
302
|
+
name: string;
|
|
303
|
+
label: string;
|
|
304
|
+
description?: string;
|
|
305
|
+
kind: "settings" | "compact" | "prompt" | "new_chat" | "history" | "rename";
|
|
306
|
+
aliases?: string[];
|
|
307
|
+
argumentHint?: string;
|
|
308
|
+
acceptsArguments?: boolean;
|
|
309
|
+
settingCanons?: string[];
|
|
310
|
+
requiresIdle?: boolean;
|
|
311
|
+
requiresSession?: boolean;
|
|
312
|
+
}
|
|
313
|
+
export interface CommandCatalog {
|
|
314
|
+
commands: HarnessCommand[];
|
|
315
|
+
warning?: string;
|
|
316
|
+
}
|
|
317
|
+
export interface CommandInvocation {
|
|
318
|
+
name: string;
|
|
319
|
+
arguments?: string;
|
|
320
|
+
}
|
|
268
321
|
/** Per-agent feature matrix. The core switches on some fields; the client reads the rest as UI hints. */
|
|
269
322
|
export interface Capabilities {
|
|
270
323
|
protocol: Protocol;
|
|
@@ -278,12 +331,18 @@ export interface Capabilities {
|
|
|
278
331
|
cancel: boolean;
|
|
279
332
|
persistent: boolean;
|
|
280
333
|
models: boolean;
|
|
334
|
+
/** Native commands and settings selectors, discovered on demand. */
|
|
335
|
+
commands?: boolean;
|
|
281
336
|
authLogout?: boolean;
|
|
282
337
|
/**
|
|
283
338
|
* Client hint: image attachments are delivered as true vision content (the model sees the image),
|
|
284
339
|
* not just a path it must open with a Read tool. Attachments themselves are ungated.
|
|
285
340
|
*/
|
|
286
341
|
imageInput: boolean;
|
|
342
|
+
/** Supports native audio for models whose inputModalities include audio; otherwise sends the original file. */
|
|
343
|
+
audioInput?: boolean;
|
|
344
|
+
/** Native voice interface exposed by the harness; unrelated to model audio files. */
|
|
345
|
+
voice?: VoiceCapability;
|
|
287
346
|
/** User-in-loop ingress — each gates its route: answer an interaction, inject a follow-up, soft-stop. */
|
|
288
347
|
respond: boolean;
|
|
289
348
|
input: boolean;
|
|
@@ -597,6 +656,12 @@ export interface AuthMethod {
|
|
|
597
656
|
/** Reuses the settings `Field` shape. */
|
|
598
657
|
fields?: Field[];
|
|
599
658
|
sections?: AuthSection[];
|
|
659
|
+
/** A native connection offered for explicit reuse. Contains display metadata, never credentials. */
|
|
660
|
+
existing?: ExistingAuthConnection;
|
|
661
|
+
}
|
|
662
|
+
export interface ExistingAuthConnection {
|
|
663
|
+
name: string;
|
|
664
|
+
model?: string;
|
|
600
665
|
}
|
|
601
666
|
/** The current step of an in-progress auth flow. */
|
|
602
667
|
export interface AuthState {
|
|
@@ -682,6 +747,8 @@ export interface UserInput {
|
|
|
682
747
|
error?: string;
|
|
683
748
|
}
|
|
684
749
|
export interface Message {
|
|
750
|
+
/** Explicit command selected by the user, when the native transcript or receipt identifies it. */
|
|
751
|
+
command?: CommandInvocation;
|
|
685
752
|
id: string;
|
|
686
753
|
chatId: string;
|
|
687
754
|
/** `"system"` marks a non-conversational boundary such as a compaction marker. */
|
|
@@ -711,12 +778,20 @@ export interface MessagePage {
|
|
|
711
778
|
hasMore: boolean;
|
|
712
779
|
/** Pass as `before` to read the preceding page. */
|
|
713
780
|
before?: string;
|
|
781
|
+
/** Opaque revision covering native files, fork ancestors and daemon history. */
|
|
782
|
+
revision?: string;
|
|
783
|
+
/** True when `ifRevision` still matches. Keep the existing messages and cursor. */
|
|
784
|
+
notModified?: boolean;
|
|
714
785
|
}
|
|
715
786
|
/**
|
|
716
787
|
* Per-turn parameters distinct from the agent's sticky settings (persisted via `setConfig`). Passed
|
|
717
788
|
* to {@link Mindwire.turn}; every field is optional, so a bare `{ chatId, message }` turn is unchanged.
|
|
718
789
|
*/
|
|
719
790
|
export interface TurnOptions {
|
|
791
|
+
/** Execute a prompt/skill advertised by commands(); controls use compact() or setConfig(). */
|
|
792
|
+
command?: CommandInvocation;
|
|
793
|
+
/** Explicit native voice conversation. Prefer the client.voice.start helper. */
|
|
794
|
+
voice?: VoiceOptions;
|
|
720
795
|
/**
|
|
721
796
|
* Per-turn setting OVERRIDES addressed by canonical key (see {@link Field.canon}). Resolved
|
|
722
797
|
* canon→the selected agent's key and filtered to declared non-secret keys server-side; overrides
|
|
@@ -1019,6 +1094,8 @@ export interface NotifyChannelTestResult {
|
|
|
1019
1094
|
}
|
|
1020
1095
|
/** `GET /healthz` — the daemon's liveness probe. */
|
|
1021
1096
|
export interface Health {
|
|
1097
|
+
/** Host connection reuse through the native authentication methods API. */
|
|
1098
|
+
nativeAuthSource?: boolean;
|
|
1022
1099
|
historyPageVersion?: number;
|
|
1023
1100
|
surfaceProtocolVersion?: number;
|
|
1024
1101
|
/** Opt-in Mac Screen Sharing through the existing paired SSH connection. */
|
package/dist/voice.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AgentScoped, Mindwire } from "./client.js";
|
|
2
|
+
import type { Http } from "./http.js";
|
|
3
|
+
import { Run } from "./run.js";
|
|
4
|
+
import type { ProjectAuth } from "./workspace.js";
|
|
5
|
+
import type { VoiceAudio, VoiceEvent, VoiceStatus } from "./types.js";
|
|
6
|
+
/** Harness-native voice; independent from a coding model's audio-file modalities. */
|
|
7
|
+
export declare class VoiceApi {
|
|
8
|
+
private readonly client;
|
|
9
|
+
constructor(client: Mindwire);
|
|
10
|
+
status(scoped?: AgentScoped): Promise<VoiceStatus>;
|
|
11
|
+
/** Start in an idle chat. Keep requestId/clientId when retrying a lost receipt. */
|
|
12
|
+
start(input: AgentScoped & {
|
|
13
|
+
chatId: string;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
voice?: string;
|
|
16
|
+
requestId?: string;
|
|
17
|
+
clientId?: string;
|
|
18
|
+
gitAuth?: ProjectAuth;
|
|
19
|
+
}): Promise<VoiceSession>;
|
|
20
|
+
}
|
|
21
|
+
/** Ephemeral PCM stream. Ending voice leaves any started coding task running. */
|
|
22
|
+
export declare class VoiceSession {
|
|
23
|
+
private readonly http;
|
|
24
|
+
readonly run: Run;
|
|
25
|
+
readonly clientId: string;
|
|
26
|
+
private sequence;
|
|
27
|
+
private sending;
|
|
28
|
+
private ended;
|
|
29
|
+
private streaming;
|
|
30
|
+
constructor(http: Http, run: Run, clientId: string);
|
|
31
|
+
private get path();
|
|
32
|
+
/** Await each ordered batch. No automatic audio replay after a network failure. */
|
|
33
|
+
appendAudio(audio: VoiceAudio, signal?: AbortSignal): Promise<void>;
|
|
34
|
+
/** Subscribe before sending audio; wait for ready. Breaking the loop ends voice. */
|
|
35
|
+
stream(signal?: AbortSignal): AsyncGenerator<VoiceEvent>;
|
|
36
|
+
stop(): Promise<void>;
|
|
37
|
+
}
|