mindwire 0.1.42 → 0.1.43

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.
@@ -4,6 +4,15 @@ export interface SurfaceGeometry {
4
4
  height: number;
5
5
  revision: number;
6
6
  }
7
+ /** Actual remote cursor. The base64 PNG changes only with its shape, not its position. */
8
+ export interface SurfaceCursor {
9
+ id: string;
10
+ width: number;
11
+ height: number;
12
+ hotspotX: number;
13
+ hotspotY: number;
14
+ png: string;
15
+ }
7
16
  export interface SurfaceProblem {
8
17
  code: string;
9
18
  message: string;
@@ -33,6 +42,7 @@ export interface SurfaceSnapshot {
33
42
  workspaceId: string;
34
43
  kind: "desktop";
35
44
  provider: "oblien" | "macos";
45
+ desktopId?: string;
36
46
  version: number;
37
47
  revision: number;
38
48
  instanceId: string;
@@ -45,6 +55,7 @@ export interface SurfaceSnapshot {
45
55
  os?: string;
46
56
  capabilities: SurfaceCapabilities;
47
57
  geometry?: SurfaceGeometry;
58
+ cursor?: SurfaceCursor;
48
59
  controller?: SurfaceController;
49
60
  authorizationExpiresAt?: string;
50
61
  error?: SurfaceProblem;
@@ -70,8 +81,10 @@ export interface SurfaceBinding {
70
81
  registryId: string;
71
82
  workspaceId: string;
72
83
  gatewayToken?: string;
84
+ desktopId?: string;
73
85
  connection: {
74
86
  expires_at: string;
87
+ session_id?: string;
75
88
  ssh: {
76
89
  host: string;
77
90
  port: number;
@@ -91,6 +104,7 @@ export interface SurfaceSession {
91
104
  surfaceId: string;
92
105
  actor: "user" | "agent";
93
106
  name: string;
107
+ desktopId?: string;
94
108
  chatId?: string;
95
109
  runId?: string;
96
110
  mode: "view" | "control";
@@ -101,6 +115,7 @@ export interface SurfaceOpenRequest {
101
115
  requestId: string;
102
116
  name?: string;
103
117
  mode: "view" | "control";
118
+ desktopId?: string;
104
119
  }
105
120
  export interface SurfaceControlRequest {
106
121
  action: "acquire" | "takeover" | "release" | "renew";
@@ -136,7 +151,7 @@ export interface SurfaceReceipt {
136
151
  sessionId: string;
137
152
  surfaceId: string;
138
153
  kind: string;
139
- status: "dispatching" | "dispatched" | "outcome_unknown";
154
+ status: "dispatching" | "dispatched" | "outcome_unknown" | "cancelled";
140
155
  createdAt: string;
141
156
  error?: SurfaceProblem;
142
157
  /** Transient clipboard output, not stored in the receipt. */
@@ -167,6 +182,7 @@ export interface SurfaceToolAction {
167
182
  sessionId?: string;
168
183
  receiptId?: string;
169
184
  status?: string;
185
+ desktopId?: string;
170
186
  capture?: {
171
187
  id: string;
172
188
  artifactId: string;
@@ -174,10 +190,86 @@ export interface SurfaceToolAction {
174
190
  height: number;
175
191
  };
176
192
  }
177
- /** Workspace-scoped API. One controller is shared by every harness and app client. */
193
+ /** Private workspace runtime authorization, never an account/session credential. */
194
+ export interface DesktopRuntimeBinding {
195
+ registryId: string;
196
+ workspaceId: string;
197
+ gatewayToken: string;
198
+ expiresAt?: string;
199
+ }
200
+ export interface DesktopResolution {
201
+ width: number;
202
+ height: number;
203
+ }
204
+ export interface SavedDesktop {
205
+ id: string;
206
+ name: string;
207
+ state: string;
208
+ managed: boolean;
209
+ available: boolean;
210
+ resolution?: DesktopResolution;
211
+ mode?: string;
212
+ can_resize?: boolean;
213
+ can_delete?: boolean;
214
+ deletion_pending?: boolean;
215
+ created_at?: string;
216
+ updated_at?: string;
217
+ error?: string;
218
+ }
219
+ export interface DesktopCatalog {
220
+ success: boolean;
221
+ projectId?: string;
222
+ sessions: SavedDesktop[];
223
+ capabilities: {
224
+ mode: "virtual" | "console";
225
+ max_sessions: number;
226
+ can_create: boolean;
227
+ resolution?: {
228
+ min: DesktopResolution;
229
+ max: DesktopResolution;
230
+ default: DesktopResolution;
231
+ };
232
+ };
233
+ }
234
+ export interface SavedDesktopResult {
235
+ success: boolean;
236
+ session: SavedDesktop;
237
+ }
238
+ export interface CreateSavedDesktop {
239
+ /** Reuse the same ID and body after an interrupted response. */
240
+ requestId: string;
241
+ projectId?: string;
242
+ name: string;
243
+ resolution?: DesktopResolution;
244
+ }
245
+ export interface UpdateSavedDesktop {
246
+ name?: string;
247
+ resolution?: DesktopResolution;
248
+ }
249
+ /** One controller per saved desktop, shared by every harness and app client. */
178
250
  export declare class SurfacesApi {
179
251
  private readonly mw;
180
- constructor(mw: Mindwire);
252
+ private readonly desktopId?;
253
+ constructor(mw: Mindwire, desktopId?: string | undefined);
254
+ /** Select a saved display for status, events, captures and input receipts. */
255
+ desktop(id: string): SurfacesApi;
256
+ private scoped;
257
+ bindRuntime(binding: DesktopRuntimeBinding): Promise<{
258
+ configured: boolean;
259
+ }>;
260
+ listDesktops(projectId?: string): Promise<DesktopCatalog>;
261
+ createDesktop(request: CreateSavedDesktop): Promise<SavedDesktopResult>;
262
+ ensureProjectDesktop(projectId: string): Promise<SavedDesktopResult>;
263
+ getDesktop(id: string): Promise<SavedDesktopResult>;
264
+ updateDesktop(id: string, request: UpdateSavedDesktop): Promise<SavedDesktopResult>;
265
+ startDesktop(id: string): Promise<SavedDesktopResult>;
266
+ /** Stops this desktop's apps; keeps its profile and files. */
267
+ stopDesktop(id: string): Promise<SavedDesktopResult>;
268
+ /** Deletes the desktop's private profile. Closing a viewer uses close(), never this method. */
269
+ deleteDesktop(id: string): Promise<{
270
+ success: boolean;
271
+ session?: SavedDesktop;
272
+ }>;
181
273
  list(): Promise<SurfaceSnapshot[]>;
182
274
  status(refresh?: boolean): Promise<SurfaceSnapshot>;
183
275
  bind(binding: SurfaceBinding): Promise<SurfaceSnapshot>;
package/dist/types.d.ts CHANGED
@@ -851,10 +851,12 @@ export interface HarnessSoftware {
851
851
  installedVersion: string;
852
852
  recommendedVersion?: string;
853
853
  latestVersion?: string;
854
- compatibility: "supported" | "untested" | "incompatible" | "not_installed" | (string & {});
854
+ compatibility: "supported" | "untested" | "incompatible" | "unavailable" | "not_installed" | (string & {});
855
855
  managed: boolean;
856
856
  updateAvailable: boolean;
857
857
  requiresDaemonUpdate: boolean;
858
+ /** An explicitly requested update can repair this damaged managed installation. */
859
+ repairAvailable?: boolean;
858
860
  requiredDaemonVersion?: string;
859
861
  message?: string;
860
862
  catalogRevision: number;
@@ -1006,6 +1008,8 @@ export interface Health {
1006
1008
  localDesktopVersion?: number;
1007
1009
  /** Workspace registry protocol version; absent on daemons predating workspace metadata. */
1008
1010
  workspaceMetadataVersion?: number;
1011
+ /** Durable project folders, membership and ordering, with conditional edits. */
1012
+ projectLibraryVersion?: number;
1009
1013
  /** Durable project creation/clone operations; absent on older daemons. */
1010
1014
  projectOperationsVersion?: number;
1011
1015
  /** Project-relative icons and authenticated image previews. */
@@ -211,6 +211,32 @@ export interface WorkspaceImport {
211
211
  id: string;
212
212
  })[];
213
213
  }
214
+ export interface ProjectFolder {
215
+ id: string;
216
+ name: string;
217
+ }
218
+ /** Daemon-owned grouping and manual order; all IDs refer to this workspace. */
219
+ export interface ProjectLibrary {
220
+ version: number;
221
+ revision: number;
222
+ folders: ProjectFolder[];
223
+ membership: Record<string, string>;
224
+ order: string[];
225
+ }
226
+ /** Partial atomic edit. On 409, read the current library before deciding how to rebase. */
227
+ export interface ProjectLibraryEdit {
228
+ expectedRevision: number;
229
+ folders?: ProjectFolder[];
230
+ deleteFolders?: string[];
231
+ placements?: {
232
+ projectId: string;
233
+ folderId: string | null;
234
+ }[];
235
+ order?: string[];
236
+ folderOrder?: string[];
237
+ /** Migration only: existing daemon organization always wins. */
238
+ importIfEmpty?: boolean;
239
+ }
214
240
  export interface WorkspaceSnapshot {
215
241
  version: number;
216
242
  workspaceId: string;
@@ -231,6 +257,8 @@ export interface WorkspaceSnapshot {
231
257
  agent: string;
232
258
  message: string;
233
259
  }[];
260
+ /** Present on full snapshots, or when organization changed in a delta. */
261
+ projectLibrary?: ProjectLibrary;
234
262
  }
235
263
  export declare class WorkspaceCollection<T extends WorkspaceRecord> {
236
264
  private readonly mw;
@@ -257,6 +285,8 @@ export declare class WorkspaceApi {
257
285
  snapshot(options?: {
258
286
  refresh?: boolean;
259
287
  }): Promise<WorkspaceSnapshot>;
288
+ library(): Promise<ProjectLibrary>;
289
+ editLibrary(edit: ProjectLibraryEdit): Promise<ProjectLibrary>;
260
290
  /** Read the saved icon, or preview a candidate relative path within the project. Requires projectIconsVersion >= 1. */
261
291
  projectIcon(projectId: string, path?: string): Promise<ProjectIcon>;
262
292
  /** Start an operation owned by the daemon. The same ID/payload returns the existing operation. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindwire",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "bin": {