mindwire 0.1.13 → 0.1.15
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/dist/client.d.ts +2 -0
- package/dist/index.cjs +117 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +117 -24
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +3 -2
- package/dist/surfaces.d.ts +181 -0
- package/dist/target/host.d.ts +5 -3
- package/dist/target/oblien.d.ts +1 -1
- package/dist/target/ssh.d.ts +1 -1
- package/dist/types.d.ts +16 -1
- package/dist/workspace.d.ts +4 -0
- package/package.json +1 -1
package/dist/run.d.ts
CHANGED
|
@@ -53,8 +53,9 @@ export declare class Run {
|
|
|
53
53
|
/** Cancel the in-flight turn (kills the underlying agent process). */
|
|
54
54
|
cancel(): Promise<void>;
|
|
55
55
|
/**
|
|
56
|
-
* Answer a
|
|
57
|
-
*
|
|
56
|
+
* Answer a pending permission, question or plan. Message-mode questions remain answerable
|
|
57
|
+
* after completion; the daemon steers or resumes the conversation. Read the chat's latest
|
|
58
|
+
* run after replying to a completed run. Requires the agent's `respond` capability.
|
|
58
59
|
*/
|
|
59
60
|
respond(input?: RespondInput): Promise<void>;
|
|
60
61
|
/**
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { Mindwire } from "./client.js";
|
|
2
|
+
export interface SurfaceGeometry {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
revision: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SurfaceProblem {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SurfaceCapabilities {
|
|
12
|
+
view: boolean;
|
|
13
|
+
capture: boolean;
|
|
14
|
+
pointer: boolean;
|
|
15
|
+
keyboard: boolean;
|
|
16
|
+
text: boolean;
|
|
17
|
+
clipboardRead: boolean;
|
|
18
|
+
clipboardWrite: boolean;
|
|
19
|
+
keyboardText?: boolean;
|
|
20
|
+
extendedKeys?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SurfaceController {
|
|
23
|
+
sessionId: string;
|
|
24
|
+
actor: "user" | "agent";
|
|
25
|
+
name: string;
|
|
26
|
+
runId?: string;
|
|
27
|
+
chatId?: string;
|
|
28
|
+
generation: number;
|
|
29
|
+
expiresAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SurfaceSnapshot {
|
|
32
|
+
id: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
kind: "desktop";
|
|
35
|
+
provider: "oblien";
|
|
36
|
+
version: number;
|
|
37
|
+
revision: number;
|
|
38
|
+
instanceId: string;
|
|
39
|
+
state: string;
|
|
40
|
+
observedAt?: string;
|
|
41
|
+
supported: boolean;
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
available: boolean;
|
|
44
|
+
credentials: boolean;
|
|
45
|
+
os?: string;
|
|
46
|
+
capabilities: SurfaceCapabilities;
|
|
47
|
+
geometry?: SurfaceGeometry;
|
|
48
|
+
controller?: SurfaceController;
|
|
49
|
+
authorizationExpiresAt?: string;
|
|
50
|
+
error?: SurfaceProblem;
|
|
51
|
+
}
|
|
52
|
+
/** Write-only, desktop-only, expiring provider grant. Never pass a user's session JWT. */
|
|
53
|
+
export interface SurfaceBinding {
|
|
54
|
+
registryId: string;
|
|
55
|
+
workspaceId: string;
|
|
56
|
+
gatewayToken?: string;
|
|
57
|
+
connection: {
|
|
58
|
+
expires_at: string;
|
|
59
|
+
ssh: {
|
|
60
|
+
host: string;
|
|
61
|
+
port: number;
|
|
62
|
+
username: string;
|
|
63
|
+
password: string;
|
|
64
|
+
host_key_fingerprint: string;
|
|
65
|
+
};
|
|
66
|
+
vnc: {
|
|
67
|
+
host: string;
|
|
68
|
+
port: number;
|
|
69
|
+
authentication: "none";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export interface SurfaceSession {
|
|
74
|
+
id: string;
|
|
75
|
+
surfaceId: string;
|
|
76
|
+
actor: "user" | "agent";
|
|
77
|
+
name: string;
|
|
78
|
+
chatId?: string;
|
|
79
|
+
runId?: string;
|
|
80
|
+
mode: "view" | "control";
|
|
81
|
+
createdAt: string;
|
|
82
|
+
controller?: SurfaceController;
|
|
83
|
+
}
|
|
84
|
+
export interface SurfaceOpenRequest {
|
|
85
|
+
requestId: string;
|
|
86
|
+
name?: string;
|
|
87
|
+
mode: "view" | "control";
|
|
88
|
+
}
|
|
89
|
+
export interface SurfaceControlRequest {
|
|
90
|
+
action: "acquire" | "takeover" | "release" | "renew";
|
|
91
|
+
generation?: number;
|
|
92
|
+
}
|
|
93
|
+
export interface SurfaceAction {
|
|
94
|
+
kind: "pointer" | "click" | "drag" | "scroll" | "key" | "text" | "clipboard_read" | "clipboard_write" | "release";
|
|
95
|
+
x?: number;
|
|
96
|
+
y?: number;
|
|
97
|
+
toX?: number;
|
|
98
|
+
toY?: number;
|
|
99
|
+
buttons?: number;
|
|
100
|
+
button?: "left" | "middle" | "right";
|
|
101
|
+
count?: number;
|
|
102
|
+
deltaX?: number;
|
|
103
|
+
deltaY?: number;
|
|
104
|
+
keys?: string[];
|
|
105
|
+
text?: string;
|
|
106
|
+
/** Physical US keyboard text (printable ASCII, <=4096 bytes), preserving the clipboard. */
|
|
107
|
+
textMode?: "keyboard";
|
|
108
|
+
}
|
|
109
|
+
export interface SurfaceActionRequest {
|
|
110
|
+
/** Reuse this ID to inspect/recover an uncertain acknowledgement. Do not replay with a new ID. */
|
|
111
|
+
requestId: string;
|
|
112
|
+
sessionId: string;
|
|
113
|
+
controlGeneration: number;
|
|
114
|
+
frameId?: string;
|
|
115
|
+
geometryRevision?: number;
|
|
116
|
+
action: SurfaceAction;
|
|
117
|
+
}
|
|
118
|
+
export interface SurfaceReceipt {
|
|
119
|
+
id: string;
|
|
120
|
+
sessionId: string;
|
|
121
|
+
surfaceId: string;
|
|
122
|
+
kind: string;
|
|
123
|
+
status: "dispatching" | "dispatched" | "outcome_unknown";
|
|
124
|
+
createdAt: string;
|
|
125
|
+
error?: SurfaceProblem;
|
|
126
|
+
/** Transient clipboard output, not stored in the receipt. */
|
|
127
|
+
text?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface SurfaceCapture {
|
|
130
|
+
id: string;
|
|
131
|
+
surfaceId: string;
|
|
132
|
+
artifactId: string;
|
|
133
|
+
mime: string;
|
|
134
|
+
geometry: SurfaceGeometry;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ArtifactContent {
|
|
138
|
+
id: string;
|
|
139
|
+
chatId?: string;
|
|
140
|
+
mime: string;
|
|
141
|
+
bytes: number;
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
createdAt: string;
|
|
145
|
+
/** Base64 bytes, compatible with every existing daemon transport. */
|
|
146
|
+
data: string;
|
|
147
|
+
}
|
|
148
|
+
export interface SurfaceToolAction {
|
|
149
|
+
surfaceId: string;
|
|
150
|
+
operation: string;
|
|
151
|
+
sessionId?: string;
|
|
152
|
+
receiptId?: string;
|
|
153
|
+
status?: string;
|
|
154
|
+
capture?: {
|
|
155
|
+
id: string;
|
|
156
|
+
artifactId: string;
|
|
157
|
+
width: number;
|
|
158
|
+
height: number;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/** Workspace-scoped API. One controller is shared by every harness and app client. */
|
|
162
|
+
export declare class SurfacesApi {
|
|
163
|
+
private readonly mw;
|
|
164
|
+
constructor(mw: Mindwire);
|
|
165
|
+
list(): Promise<SurfaceSnapshot[]>;
|
|
166
|
+
status(refresh?: boolean): Promise<SurfaceSnapshot>;
|
|
167
|
+
bind(binding: SurfaceBinding): Promise<SurfaceSnapshot>;
|
|
168
|
+
open(request: SurfaceOpenRequest): Promise<SurfaceSession>;
|
|
169
|
+
control(id: string, request: SurfaceControlRequest): Promise<SurfaceSession>;
|
|
170
|
+
close(id: string): Promise<{
|
|
171
|
+
closed: boolean;
|
|
172
|
+
}>;
|
|
173
|
+
capture(id: string): Promise<SurfaceCapture>;
|
|
174
|
+
action(request: SurfaceActionRequest): Promise<SurfaceReceipt>;
|
|
175
|
+
receipt(id: string): Promise<SurfaceReceipt>;
|
|
176
|
+
artifact(id: string): Promise<ArtifactContent>;
|
|
177
|
+
/** Every connection starts with the current snapshot, then revisions. Never replays input. */
|
|
178
|
+
watch(opts?: {
|
|
179
|
+
signal?: AbortSignal;
|
|
180
|
+
}): AsyncGenerator<SurfaceSnapshot>;
|
|
181
|
+
}
|
package/dist/target/host.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export interface EnsureDaemonConfig {
|
|
|
30
30
|
/** `AGENT_CWD` — working directory agents run in, inside the sandbox. */
|
|
31
31
|
agentCwd: string;
|
|
32
32
|
/**
|
|
33
|
-
* Explicit path to a
|
|
34
|
-
* `{arch}`
|
|
35
|
-
* launcher to build
|
|
33
|
+
* Explicit path to a `mindwired` to deploy (else downloaded from the matching GitHub Release).
|
|
34
|
+
* `{os}` and `{arch}` expand to the destination (`linux`/`darwin` and `amd64`/`arm64`), allowing a
|
|
35
|
+
* development launcher to build artifacts without guessing the sandbox platform in advance.
|
|
36
36
|
*/
|
|
37
37
|
daemonBin?: string;
|
|
38
38
|
/** Redeploy when the running daemon's version differs from `desiredVersion`. Off by default. */
|
|
@@ -70,6 +70,8 @@ export interface EnsureEvent {
|
|
|
70
70
|
version?: string;
|
|
71
71
|
/** Target architecture the daemon was resolved for (on `upload`). */
|
|
72
72
|
arch?: "amd64" | "arm64";
|
|
73
|
+
/** Destination operating system (on `download` / `upload`). */
|
|
74
|
+
platform?: "linux" | "darwin";
|
|
73
75
|
/** Size of the uploaded daemon binary in bytes (on `upload`). */
|
|
74
76
|
bytes?: number;
|
|
75
77
|
/** Error message (on `error`). */
|
package/dist/target/oblien.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface OblienConfig {
|
|
|
19
19
|
agentCwd?: string;
|
|
20
20
|
/** Loopback port the in-workspace daemon listens on. */
|
|
21
21
|
port?: number;
|
|
22
|
-
/** Explicit local
|
|
22
|
+
/** Explicit local `mindwired` to deploy. `{os}`/`{arch}` expand to the workspace platform. */
|
|
23
23
|
daemonBin?: string;
|
|
24
24
|
/** Redeploy the daemon when the running version differs from the SDK's bundled binary. Off by default. */
|
|
25
25
|
autoUpdate?: boolean;
|
package/dist/target/ssh.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface SshOptions {
|
|
|
26
26
|
agentType?: string;
|
|
27
27
|
/** `AGENT_CWD` — working directory agents run in, on the remote. Defaults to `/root`. */
|
|
28
28
|
agentCwd?: string;
|
|
29
|
-
/** Explicit
|
|
29
|
+
/** Explicit local `mindwired` to deploy; `{os}`/`{arch}` expand to the destination platform. Otherwise downloaded from GitHub Releases. */
|
|
30
30
|
daemonBin?: string;
|
|
31
31
|
/** Redeploy when the running daemon's version differs from the SDK's bundled binary. */
|
|
32
32
|
autoUpdate?: boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type ToolKind = "file_edit" | "file_read" | "shell" | "search" | "web_sea
|
|
|
28
28
|
* apply_patch/shell).
|
|
29
29
|
*/
|
|
30
30
|
export interface ToolAction {
|
|
31
|
+
surface?: import("./surfaces.js").SurfaceToolAction;
|
|
31
32
|
kind: ToolKind;
|
|
32
33
|
/** Short human label (e.g. the command or the path). */
|
|
33
34
|
title?: string;
|
|
@@ -234,6 +235,12 @@ export interface Interaction {
|
|
|
234
235
|
/** Whether approval feedback is accepted for all actions, or only a rejection. */
|
|
235
236
|
feedback?: "always" | "rejection";
|
|
236
237
|
needsResponse?: boolean;
|
|
238
|
+
/** Async questions use native user messages and remain answerable after turn completion. */
|
|
239
|
+
responseMode?: "message";
|
|
240
|
+
/** Daemon run to address with respond, including when the form is in history. */
|
|
241
|
+
runId?: string;
|
|
242
|
+
/** Accepted answer, saved after acknowledgement. */
|
|
243
|
+
response?: RespondInput;
|
|
237
244
|
meta?: Record<string, unknown>;
|
|
238
245
|
}
|
|
239
246
|
/**
|
|
@@ -241,7 +248,8 @@ export interface Interaction {
|
|
|
241
248
|
* ties the answer to the pending request. `decision` must be an offered action ID. For a form,
|
|
242
249
|
* `answers` maps every required question ID to its selected option IDs and optional feedback.
|
|
243
250
|
* Legacy single-question clients may send `options` and `text` at the top level. Incomplete
|
|
244
|
-
* answers return 400; stale or
|
|
251
|
+
* answers return 400; stale or concurrent submissions return 409. Message-mode forms
|
|
252
|
+
* remain answerable after completion, and retrying the same accepted answer is idempotent.
|
|
245
253
|
*/
|
|
246
254
|
export interface RespondInput {
|
|
247
255
|
interactionId?: string;
|
|
@@ -521,6 +529,8 @@ export interface MCPServer {
|
|
|
521
529
|
bearerTokenEnvVar?: string;
|
|
522
530
|
/** HTTP transport: literal headers sent with each request. */
|
|
523
531
|
httpHeaders?: Record<string, string>;
|
|
532
|
+
/** Codex's native approval behavior for this MCP server. */
|
|
533
|
+
defaultToolsApprovalMode?: "auto" | "prompt" | "writes" | "approve";
|
|
524
534
|
}
|
|
525
535
|
/**
|
|
526
536
|
* One registered custom OpenAI-compatible LLM provider — a base URL + model ids an agent loads on every
|
|
@@ -825,6 +835,8 @@ export interface SetupStatus {
|
|
|
825
835
|
steps: StepResult[];
|
|
826
836
|
/** The shared job's operation, including when another client started it. Older daemons omit it. */
|
|
827
837
|
operation?: "setup" | "update";
|
|
838
|
+
/** Current step phase, reported by the daemon rather than inferred from elapsed time. */
|
|
839
|
+
stage?: "checking" | "waiting" | "installing" | "verifying" | (string & {});
|
|
828
840
|
}
|
|
829
841
|
/** `GET /notify/config` — the token is never returned. */
|
|
830
842
|
export interface NotifyConfigStatus {
|
|
@@ -908,10 +920,13 @@ export interface NotifyChannelTestResult {
|
|
|
908
920
|
}
|
|
909
921
|
/** `GET /healthz` — the daemon's liveness probe. */
|
|
910
922
|
export interface Health {
|
|
923
|
+
surfaceProtocolVersion?: number;
|
|
911
924
|
/** Workspace registry protocol version; absent on daemons predating workspace metadata. */
|
|
912
925
|
workspaceMetadataVersion?: number;
|
|
913
926
|
/** Durable project creation/clone operations; absent on older daemons. */
|
|
914
927
|
projectOperationsVersion?: number;
|
|
928
|
+
/** Persistent profile/chat mutes enforced before every notification delivery. */
|
|
929
|
+
notificationPreferencesVersion?: number;
|
|
915
930
|
ok: boolean;
|
|
916
931
|
agent: string;
|
|
917
932
|
version: string;
|
package/dist/workspace.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export interface WorkspaceAgent extends WorkspaceRecord {
|
|
|
69
69
|
name: string;
|
|
70
70
|
agentType: string;
|
|
71
71
|
agentTypeName?: string;
|
|
72
|
+
/** Mutes this profile's current and future chats across notification channels. Omit to preserve; false to clear. */
|
|
73
|
+
notificationsMuted?: boolean;
|
|
72
74
|
}
|
|
73
75
|
export interface WorkspaceProject extends WorkspaceRecord {
|
|
74
76
|
name: string;
|
|
@@ -82,6 +84,8 @@ export interface WorkspaceChat extends WorkspaceRecord {
|
|
|
82
84
|
title: string;
|
|
83
85
|
titleIsUserSet?: boolean;
|
|
84
86
|
sessionId?: string;
|
|
87
|
+
/** Mutes this chat. False clears its own mute but never overrides a muted parent profile. Omit to preserve. */
|
|
88
|
+
notificationsMuted?: boolean;
|
|
85
89
|
}
|
|
86
90
|
export type WorkspaceKind = "agents" | "projects" | "chats";
|
|
87
91
|
export type WorkspaceInput<T extends WorkspaceRecord> = Omit<T, "id" | "workspaceId" | "revision" | "createdAt"> & {
|