mindwire 0.1.29 → 0.1.32

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/types.d.ts CHANGED
@@ -992,6 +992,8 @@ export interface Health {
992
992
  workspaceMetadataVersion?: number;
993
993
  /** Durable project creation/clone operations; absent on older daemons. */
994
994
  projectOperationsVersion?: number;
995
+ /** Project-relative icons and authenticated image previews. */
996
+ projectIconsVersion?: number;
995
997
  /** Workspace/project GitHub bindings and operation/run credential forwarding. */
996
998
  gitAccessVersion?: number;
997
999
  /** Durable Git writes: v2 adds branches; v3 adds repository-scoped commit author setup. */
package/dist/version.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export declare const SDK_VERSION: string;
2
+ export declare function versionAtLeast(actual: string | undefined, desired: string): boolean;
@@ -32,7 +32,7 @@ export interface ProjectGitState {
32
32
  stored: boolean;
33
33
  repoUrl?: string;
34
34
  }
35
- export type GitAction = "stage" | "unstage" | "discard" | "commit" | "fetch" | "pull" | "push" | "switch_branch" | "create_branch" | "restore_commit";
35
+ export type GitAction = "stage" | "unstage" | "discard" | "commit" | "fetch" | "pull" | "push" | "switch_branch" | "create_branch" | "restore_commit" | "rename_branch" | "delete_branch";
36
36
  export interface GitIdentity {
37
37
  name: string;
38
38
  email: string;
@@ -61,10 +61,16 @@ export interface GitOperationRequest {
61
61
  paths?: string[];
62
62
  /** Required for commit. Uses the existing author unless identity is explicitly supplied. */
63
63
  message?: string;
64
- /** Literal branch name for switch_branch/create_branch; requires gitOperationsVersion >= 2. */
64
+ /** Literal branch name: switch/create require v2; local rename/delete require v5 and expectedTip. */
65
65
  branch?: string;
66
66
  /** switch_branch only: branch is a remote tracking name, e.g. origin/feature. */
67
67
  remote?: boolean;
68
+ /** rename_branch only: a new local name. Never overwrites another branch. Requires v5. */
69
+ newName?: string;
70
+ /** rename_branch/delete_branch: full selected branch tip, guarding stale confirmation. Requires v5. */
71
+ expectedTip?: string;
72
+ /** delete_branch only: explicit confirmation to delete unmerged commits. Checked-out branches stay protected. */
73
+ force?: boolean;
68
74
  /** Commit only; requires gitOperationsVersion >= 3. Saves attribution in this repository,
69
75
  * then commits under the same durable lock. Never changes global Git configuration. */
70
76
  identity?: GitIdentity;
@@ -85,7 +91,7 @@ export interface GitOperation extends Omit<GitOperationRequest, "auth"> {
85
91
  output?: string;
86
92
  error?: string;
87
93
  /** git_identity_required asks the client to collect a name/email before a new commit intent. */
88
- errorCode?: "git_identity_required" | "git_restore_dirty" | "git_restore_changed" | "git_restore_in_progress" | "git_restore_commit_unavailable" | "git_restore_local_files" | (string & {});
94
+ errorCode?: "git_identity_required" | "git_restore_dirty" | "git_restore_changed" | "git_branch_changed" | "git_branch_in_use" | "git_branch_unmerged" | "git_restore_in_progress" | "git_restore_commit_unavailable" | "git_restore_local_files" | (string & {});
89
95
  createdAt: string;
90
96
  updatedAt: string;
91
97
  sequence: number;
@@ -159,6 +165,15 @@ export interface WorkspaceProject extends WorkspaceRecord {
159
165
  repoUrl?: string;
160
166
  /** Omit on edits to preserve; explicitly null restores the workspace default. */
161
167
  gitConnection?: GitConnection | null;
168
+ /** Project-relative SVG/PNG/JPEG/GIF file. Omit to preserve, null to reset. Requires projectIconsVersion >= 1. */
169
+ iconPath?: string | null;
170
+ }
171
+ export interface ProjectIcon {
172
+ path: string;
173
+ mediaType: string;
174
+ /** Base64-encoded bytes, capped at 1 MiB; served only through the authenticated workspace connection. */
175
+ content: string;
176
+ etag: string;
162
177
  }
163
178
  /** Chat membership; transcript content continues to come from /chats/:id/messages. */
164
179
  export interface WorkspaceChat extends WorkspaceRecord {
@@ -234,6 +249,8 @@ export declare class WorkspaceApi {
234
249
  snapshot(options?: {
235
250
  refresh?: boolean;
236
251
  }): Promise<WorkspaceSnapshot>;
252
+ /** Read the saved icon, or preview a candidate relative path within the project. Requires projectIconsVersion >= 1. */
253
+ projectIcon(projectId: string, path?: string): Promise<ProjectIcon>;
237
254
  /** Start an operation owned by the daemon. The same ID/payload returns the existing operation. */
238
255
  createProject(request: ProjectRequest): Promise<ProjectOperation>;
239
256
  /** Permanently remove the confirmed project's directory and membership.
@@ -273,7 +290,7 @@ export declare class GitAccessApi {
273
290
  run(projectId: string, operation: "fetch" | "pull" | "push", auth?: ProjectAuth): Promise<{
274
291
  output: string;
275
292
  }>;
276
- /** Requires health.gitOperationsVersion >= 1 (>= 2 for branches, >= 4 for restore_commit). Acceptance persists before Git runs;
293
+ /** Requires health.gitOperationsVersion >= 1 (>= 2 for switch/create, >= 4 for restore_commit, >= 5 for rename/delete). Acceptance persists before Git runs;
277
294
  * disconnecting only detaches the client. The same ID/intent never runs twice.
278
295
  */
279
296
  start(projectId: string, request: GitOperationRequest): Promise<GitOperation>;
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "mindwire",
3
- "version": "0.1.29",
3
+ "version": "0.1.32",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
- "bin": { "mindwire": "./dist/cli.js" },
6
+ "bin": {
7
+ "mindwire": "./dist/cli.js"
8
+ },
7
9
  "devDependencies": {
8
10
  "@types/node": "26.1.1",
9
11
  "@types/qrcode": "^1.5.5",
12
+ "@types/ws": "^8.18.1",
10
13
  "tsup": "8.5.1",
11
14
  "typedoc": "^0.28.20",
12
15
  "typedoc-plugin-markdown": "^4.12.0",
@@ -75,6 +78,7 @@
75
78
  "type": "module",
76
79
  "types": "./dist/index.d.ts",
77
80
  "dependencies": {
78
- "qrcode": "^1.5.4"
81
+ "qrcode": "^1.5.4",
82
+ "ws": "^8.18.3"
79
83
  }
80
84
  }