mindwire 0.1.13 → 0.1.14
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 +102 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +102 -20
- package/dist/index.js.map +1 -1
- package/dist/surfaces.d.ts +177 -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 +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
}
|
|
20
|
+
export interface SurfaceController {
|
|
21
|
+
sessionId: string;
|
|
22
|
+
actor: "user" | "agent";
|
|
23
|
+
name: string;
|
|
24
|
+
runId?: string;
|
|
25
|
+
chatId?: string;
|
|
26
|
+
generation: number;
|
|
27
|
+
expiresAt: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SurfaceSnapshot {
|
|
30
|
+
id: string;
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
kind: "desktop";
|
|
33
|
+
provider: "oblien";
|
|
34
|
+
version: number;
|
|
35
|
+
revision: number;
|
|
36
|
+
instanceId: string;
|
|
37
|
+
state: string;
|
|
38
|
+
observedAt?: string;
|
|
39
|
+
supported: boolean;
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
available: boolean;
|
|
42
|
+
credentials: boolean;
|
|
43
|
+
os?: string;
|
|
44
|
+
capabilities: SurfaceCapabilities;
|
|
45
|
+
geometry?: SurfaceGeometry;
|
|
46
|
+
controller?: SurfaceController;
|
|
47
|
+
authorizationExpiresAt?: string;
|
|
48
|
+
error?: SurfaceProblem;
|
|
49
|
+
}
|
|
50
|
+
/** Write-only, desktop-only, expiring provider grant. Never pass a user's session JWT. */
|
|
51
|
+
export interface SurfaceBinding {
|
|
52
|
+
registryId: string;
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
gatewayToken?: string;
|
|
55
|
+
connection: {
|
|
56
|
+
expires_at: string;
|
|
57
|
+
ssh: {
|
|
58
|
+
host: string;
|
|
59
|
+
port: number;
|
|
60
|
+
username: string;
|
|
61
|
+
password: string;
|
|
62
|
+
host_key_fingerprint: string;
|
|
63
|
+
};
|
|
64
|
+
vnc: {
|
|
65
|
+
host: string;
|
|
66
|
+
port: number;
|
|
67
|
+
authentication: "none";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface SurfaceSession {
|
|
72
|
+
id: string;
|
|
73
|
+
surfaceId: string;
|
|
74
|
+
actor: "user" | "agent";
|
|
75
|
+
name: string;
|
|
76
|
+
chatId?: string;
|
|
77
|
+
runId?: string;
|
|
78
|
+
mode: "view" | "control";
|
|
79
|
+
createdAt: string;
|
|
80
|
+
controller?: SurfaceController;
|
|
81
|
+
}
|
|
82
|
+
export interface SurfaceOpenRequest {
|
|
83
|
+
requestId: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
mode: "view" | "control";
|
|
86
|
+
}
|
|
87
|
+
export interface SurfaceControlRequest {
|
|
88
|
+
action: "acquire" | "takeover" | "release" | "renew";
|
|
89
|
+
generation?: number;
|
|
90
|
+
}
|
|
91
|
+
export interface SurfaceAction {
|
|
92
|
+
kind: "pointer" | "click" | "drag" | "scroll" | "key" | "text" | "clipboard_read" | "clipboard_write" | "release";
|
|
93
|
+
x?: number;
|
|
94
|
+
y?: number;
|
|
95
|
+
toX?: number;
|
|
96
|
+
toY?: number;
|
|
97
|
+
buttons?: number;
|
|
98
|
+
button?: "left" | "middle" | "right";
|
|
99
|
+
count?: number;
|
|
100
|
+
deltaX?: number;
|
|
101
|
+
deltaY?: number;
|
|
102
|
+
keys?: string[];
|
|
103
|
+
text?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface SurfaceActionRequest {
|
|
106
|
+
/** Reuse this ID to inspect/recover an uncertain acknowledgement. Do not replay with a new ID. */
|
|
107
|
+
requestId: string;
|
|
108
|
+
sessionId: string;
|
|
109
|
+
controlGeneration: number;
|
|
110
|
+
frameId?: string;
|
|
111
|
+
geometryRevision?: number;
|
|
112
|
+
action: SurfaceAction;
|
|
113
|
+
}
|
|
114
|
+
export interface SurfaceReceipt {
|
|
115
|
+
id: string;
|
|
116
|
+
sessionId: string;
|
|
117
|
+
surfaceId: string;
|
|
118
|
+
kind: string;
|
|
119
|
+
status: "dispatching" | "dispatched" | "outcome_unknown";
|
|
120
|
+
createdAt: string;
|
|
121
|
+
error?: SurfaceProblem;
|
|
122
|
+
/** Transient clipboard output, not stored in the receipt. */
|
|
123
|
+
text?: string;
|
|
124
|
+
}
|
|
125
|
+
export interface SurfaceCapture {
|
|
126
|
+
id: string;
|
|
127
|
+
surfaceId: string;
|
|
128
|
+
artifactId: string;
|
|
129
|
+
mime: string;
|
|
130
|
+
geometry: SurfaceGeometry;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ArtifactContent {
|
|
134
|
+
id: string;
|
|
135
|
+
chatId?: string;
|
|
136
|
+
mime: string;
|
|
137
|
+
bytes: number;
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
/** Base64 bytes, compatible with every existing daemon transport. */
|
|
142
|
+
data: string;
|
|
143
|
+
}
|
|
144
|
+
export interface SurfaceToolAction {
|
|
145
|
+
surfaceId: string;
|
|
146
|
+
operation: string;
|
|
147
|
+
sessionId?: string;
|
|
148
|
+
receiptId?: string;
|
|
149
|
+
status?: string;
|
|
150
|
+
capture?: {
|
|
151
|
+
id: string;
|
|
152
|
+
artifactId: string;
|
|
153
|
+
width: number;
|
|
154
|
+
height: number;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/** Workspace-scoped API. One controller is shared by every harness and app client. */
|
|
158
|
+
export declare class SurfacesApi {
|
|
159
|
+
private readonly mw;
|
|
160
|
+
constructor(mw: Mindwire);
|
|
161
|
+
list(): Promise<SurfaceSnapshot[]>;
|
|
162
|
+
status(refresh?: boolean): Promise<SurfaceSnapshot>;
|
|
163
|
+
bind(binding: SurfaceBinding): Promise<SurfaceSnapshot>;
|
|
164
|
+
open(request: SurfaceOpenRequest): Promise<SurfaceSession>;
|
|
165
|
+
control(id: string, request: SurfaceControlRequest): Promise<SurfaceSession>;
|
|
166
|
+
close(id: string): Promise<{
|
|
167
|
+
closed: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
capture(id: string): Promise<SurfaceCapture>;
|
|
170
|
+
action(request: SurfaceActionRequest): Promise<SurfaceReceipt>;
|
|
171
|
+
receipt(id: string): Promise<SurfaceReceipt>;
|
|
172
|
+
artifact(id: string): Promise<ArtifactContent>;
|
|
173
|
+
/** Every connection starts with the current snapshot, then revisions. Never replays input. */
|
|
174
|
+
watch(opts?: {
|
|
175
|
+
signal?: AbortSignal;
|
|
176
|
+
}): AsyncGenerator<SurfaceSnapshot>;
|
|
177
|
+
}
|
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;
|
|
@@ -521,6 +522,8 @@ export interface MCPServer {
|
|
|
521
522
|
bearerTokenEnvVar?: string;
|
|
522
523
|
/** HTTP transport: literal headers sent with each request. */
|
|
523
524
|
httpHeaders?: Record<string, string>;
|
|
525
|
+
/** Codex's native approval behavior for this MCP server. */
|
|
526
|
+
defaultToolsApprovalMode?: "auto" | "prompt" | "writes" | "approve";
|
|
524
527
|
}
|
|
525
528
|
/**
|
|
526
529
|
* One registered custom OpenAI-compatible LLM provider — a base URL + model ids an agent loads on every
|
|
@@ -825,6 +828,8 @@ export interface SetupStatus {
|
|
|
825
828
|
steps: StepResult[];
|
|
826
829
|
/** The shared job's operation, including when another client started it. Older daemons omit it. */
|
|
827
830
|
operation?: "setup" | "update";
|
|
831
|
+
/** Current step phase, reported by the daemon rather than inferred from elapsed time. */
|
|
832
|
+
stage?: "checking" | "waiting" | "installing" | "verifying" | (string & {});
|
|
828
833
|
}
|
|
829
834
|
/** `GET /notify/config` — the token is never returned. */
|
|
830
835
|
export interface NotifyConfigStatus {
|
|
@@ -908,6 +913,7 @@ export interface NotifyChannelTestResult {
|
|
|
908
913
|
}
|
|
909
914
|
/** `GET /healthz` — the daemon's liveness probe. */
|
|
910
915
|
export interface Health {
|
|
916
|
+
surfaceProtocolVersion?: number;
|
|
911
917
|
/** Workspace registry protocol version; absent on daemons predating workspace metadata. */
|
|
912
918
|
workspaceMetadataVersion?: number;
|
|
913
919
|
/** Durable project creation/clone operations; absent on older daemons. */
|