mindwire 0.1.15 → 0.1.19
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 +17 -3
- package/dist/index.cjs +193 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +192 -29
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +3 -1
- package/dist/service.d.ts +24 -0
- package/dist/surfaces.d.ts +1 -1
- package/dist/target/docker.d.ts +1 -1
- package/dist/target/host.d.ts +1 -1
- package/dist/target/oblien.d.ts +2 -2
- package/dist/target/ssh.d.ts +1 -1
- package/dist/types.d.ts +68 -1
- package/dist/workspace.d.ts +89 -2
- package/package.json +2 -2
package/dist/run.d.ts
CHANGED
|
@@ -57,7 +57,9 @@ export declare class Run {
|
|
|
57
57
|
* after completion; the daemon steers or resumes the conversation. Read the chat's latest
|
|
58
58
|
* run after replying to a completed run. Requires the agent's `respond` capability.
|
|
59
59
|
*/
|
|
60
|
-
respond(input?: RespondInput
|
|
60
|
+
respond(input?: RespondInput & {
|
|
61
|
+
gitAuth?: import("./workspace.js").ProjectAuth;
|
|
62
|
+
}): Promise<void>;
|
|
61
63
|
/**
|
|
62
64
|
* Steer a follow-up message into the running turn without cancelling it. Requires the agent's
|
|
63
65
|
* `input` capability.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Mindwire } from "./client.js";
|
|
2
|
+
export interface ServiceUpdateState {
|
|
3
|
+
idle: boolean;
|
|
4
|
+
updating: boolean;
|
|
5
|
+
activeOperations: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ServiceUpdateLease {
|
|
8
|
+
id: string;
|
|
9
|
+
/** Terminate only this leased process, not every mindwired process on the host. */
|
|
10
|
+
pid: number;
|
|
11
|
+
expiresAt: string;
|
|
12
|
+
}
|
|
13
|
+
/** Installer coordination; requires health.serviceUpdateVersion >= 1. */
|
|
14
|
+
export declare class ServiceApi {
|
|
15
|
+
private readonly client;
|
|
16
|
+
constructor(client: Mindwire);
|
|
17
|
+
updateStatus(): Promise<ServiceUpdateState>;
|
|
18
|
+
/** Download first. Acquire immediately before replacement; busy work returns 409.
|
|
19
|
+
* Admission stays closed until release, process exit, or the one-minute expiry. */
|
|
20
|
+
acquireUpdate(): Promise<ServiceUpdateLease>;
|
|
21
|
+
releaseUpdate(id: string): Promise<{
|
|
22
|
+
ok: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
package/dist/surfaces.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export interface SurfaceAction {
|
|
|
103
103
|
deltaY?: number;
|
|
104
104
|
keys?: string[];
|
|
105
105
|
text?: string;
|
|
106
|
-
/** Physical US keyboard text (printable ASCII,
|
|
106
|
+
/** Physical US keyboard text (printable ASCII, up to 4096 bytes), preserving the clipboard. */
|
|
107
107
|
textMode?: "keyboard";
|
|
108
108
|
}
|
|
109
109
|
export interface SurfaceActionRequest {
|
package/dist/target/docker.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface DockerConfig {
|
|
|
52
52
|
agentCwd?: string;
|
|
53
53
|
/** Explicit path to a Linux `mindwired` to deploy (else resolved from the platform package). */
|
|
54
54
|
daemonBin?: string;
|
|
55
|
-
/**
|
|
55
|
+
/** Upgrade an older daemon when idle; requires its service update capability. */
|
|
56
56
|
autoUpdate?: boolean;
|
|
57
57
|
/** On `close()`, stop + remove a container we created (attached containers are left running). */
|
|
58
58
|
stopOnExit?: boolean;
|
package/dist/target/host.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface EnsureDaemonConfig {
|
|
|
35
35
|
* development launcher to build artifacts without guessing the sandbox platform in advance.
|
|
36
36
|
*/
|
|
37
37
|
daemonBin?: string;
|
|
38
|
-
/**
|
|
38
|
+
/** Upgrade an older service when idle. Requires serviceUpdateVersion >= 1. Off by default. */
|
|
39
39
|
autoUpdate?: boolean;
|
|
40
40
|
/** Redeploy even when the reported version matches. Intended only for a locally built development daemon. */
|
|
41
41
|
forceDeploy?: boolean;
|
package/dist/target/oblien.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export interface OblienConfig {
|
|
|
21
21
|
port?: number;
|
|
22
22
|
/** Explicit local `mindwired` to deploy. `{os}`/`{arch}` expand to the workspace platform. */
|
|
23
23
|
daemonBin?: string;
|
|
24
|
-
/**
|
|
24
|
+
/** Upgrade an older daemon when idle; requires its service update capability. Off by default. */
|
|
25
25
|
autoUpdate?: boolean;
|
|
26
|
-
/** Replace even a healthy version match. Use only with a
|
|
26
|
+
/** Replace even a healthy version match while idle. Use only with a local development binary. */
|
|
27
27
|
forceDeploy?: boolean;
|
|
28
28
|
/** On `close()`, tear the workspace down (delete one we created / stop one we reused). */
|
|
29
29
|
stopOnExit?: boolean;
|
package/dist/target/ssh.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface SshOptions {
|
|
|
28
28
|
agentCwd?: string;
|
|
29
29
|
/** Explicit local `mindwired` to deploy; `{os}`/`{arch}` expand to the destination platform. Otherwise downloaded from GitHub Releases. */
|
|
30
30
|
daemonBin?: string;
|
|
31
|
-
/**
|
|
31
|
+
/** Upgrade an older daemon when idle; requires its service update capability. */
|
|
32
32
|
autoUpdate?: boolean;
|
|
33
33
|
/** On `close()`, tear the tunnel down and end the SSH connection. Defaults to `true`. */
|
|
34
34
|
stopOnExit?: boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ export interface Capabilities {
|
|
|
275
275
|
cancel: boolean;
|
|
276
276
|
persistent: boolean;
|
|
277
277
|
models: boolean;
|
|
278
|
+
authLogout?: boolean;
|
|
278
279
|
/**
|
|
279
280
|
* Client hint: image attachments are delivered as true vision content (the model sees the image),
|
|
280
281
|
* not just a path it must open with a Read tool. Attachments themselves are ungated.
|
|
@@ -382,6 +383,8 @@ export interface Field {
|
|
|
382
383
|
presentation?: "segmented" | "menu" | (string & {});
|
|
383
384
|
/** Text keyboard hint. */
|
|
384
385
|
inputMode?: "url" | (string & {});
|
|
386
|
+
minimum?: number;
|
|
387
|
+
maximum?: number;
|
|
385
388
|
}
|
|
386
389
|
export interface Section {
|
|
387
390
|
title: string;
|
|
@@ -431,6 +434,10 @@ export interface ModelInfo {
|
|
|
431
434
|
outputModalities?: string[];
|
|
432
435
|
/** Capability flags from the catalog. */
|
|
433
436
|
reasoning?: boolean;
|
|
437
|
+
/** Reasoning levels reported by the installed harness for this exact model. */
|
|
438
|
+
reasoningEfforts?: Option[];
|
|
439
|
+
defaultReasoningEffort?: string;
|
|
440
|
+
default?: boolean;
|
|
434
441
|
toolCall?: boolean;
|
|
435
442
|
attachment?: boolean;
|
|
436
443
|
/** Per-million-token pricing when known. */
|
|
@@ -591,6 +598,8 @@ export interface AuthMethod {
|
|
|
591
598
|
export interface AuthState {
|
|
592
599
|
method: string;
|
|
593
600
|
status: "needs_input" | "pending" | "complete" | "error" | (string & {});
|
|
601
|
+
/** Echo as `_flowId` in step inputs, or use auth.poll/auth.cancel. */
|
|
602
|
+
flowId?: string;
|
|
594
603
|
url?: string;
|
|
595
604
|
code?: string;
|
|
596
605
|
message?: string;
|
|
@@ -600,6 +609,8 @@ export interface AuthState {
|
|
|
600
609
|
}
|
|
601
610
|
/** The resting state: is the agent authenticated, and via which method. */
|
|
602
611
|
export interface AuthStatus {
|
|
612
|
+
/** Explicit workspace sign-out, persisted until a connection completes. */
|
|
613
|
+
signedOut?: boolean;
|
|
603
614
|
configured: boolean;
|
|
604
615
|
method?: string;
|
|
605
616
|
detail?: string;
|
|
@@ -787,6 +798,47 @@ export interface DeleteResult {
|
|
|
787
798
|
export interface Catalog {
|
|
788
799
|
version: string;
|
|
789
800
|
agents: CatalogEntry[];
|
|
801
|
+
harnessPolicyVersion?: number;
|
|
802
|
+
harnessCompatibility?: HarnessCatalog;
|
|
803
|
+
}
|
|
804
|
+
/** Published independently of daemon releases. Entries approve exact CLI/daemon combinations. */
|
|
805
|
+
export interface HarnessCatalog {
|
|
806
|
+
schemaVersion: number;
|
|
807
|
+
revision: number;
|
|
808
|
+
harnesses: Record<string, {
|
|
809
|
+
releases: Array<{
|
|
810
|
+
version: string;
|
|
811
|
+
daemon: HarnessDaemonRange[];
|
|
812
|
+
}>;
|
|
813
|
+
excluded?: Array<{
|
|
814
|
+
min: string;
|
|
815
|
+
maxExclusive: string;
|
|
816
|
+
daemon: HarnessDaemonRange[];
|
|
817
|
+
reason: string;
|
|
818
|
+
}>;
|
|
819
|
+
}>;
|
|
820
|
+
}
|
|
821
|
+
export interface HarnessDaemonRange {
|
|
822
|
+
min: string;
|
|
823
|
+
maxExclusive?: string;
|
|
824
|
+
}
|
|
825
|
+
/** GET /agent/software. Version selection is enforced by the daemon, never by a client. */
|
|
826
|
+
export interface HarnessSoftware {
|
|
827
|
+
policyVersion: number;
|
|
828
|
+
installedVersion: string;
|
|
829
|
+
recommendedVersion?: string;
|
|
830
|
+
latestVersion?: string;
|
|
831
|
+
compatibility: "supported" | "untested" | "incompatible" | "not_installed" | (string & {});
|
|
832
|
+
managed: boolean;
|
|
833
|
+
updateAvailable: boolean;
|
|
834
|
+
requiresDaemonUpdate: boolean;
|
|
835
|
+
requiredDaemonVersion?: string;
|
|
836
|
+
message?: string;
|
|
837
|
+
catalogRevision: number;
|
|
838
|
+
catalogSource: "bundled" | "cached" | "remote" | (string & {});
|
|
839
|
+
catalogStale: boolean;
|
|
840
|
+
/** Missing shared tools; run setup even if the CLI itself is already installed. */
|
|
841
|
+
missingDependencies?: string[];
|
|
790
842
|
}
|
|
791
843
|
/** `GET /agent` — everything the client needs to render one agent's screen. */
|
|
792
844
|
export interface AgentInfo {
|
|
@@ -798,6 +850,7 @@ export interface AgentInfo {
|
|
|
798
850
|
authMethods: AuthMethod[];
|
|
799
851
|
authStatus: AuthStatus;
|
|
800
852
|
installedVersion: string;
|
|
853
|
+
software?: HarnessSoftware;
|
|
801
854
|
configured: boolean;
|
|
802
855
|
configPath: string;
|
|
803
856
|
/**
|
|
@@ -836,7 +889,11 @@ export interface SetupStatus {
|
|
|
836
889
|
/** The shared job's operation, including when another client started it. Older daemons omit it. */
|
|
837
890
|
operation?: "setup" | "update";
|
|
838
891
|
/** Current step phase, reported by the daemon rather than inferred from elapsed time. */
|
|
839
|
-
stage?: "checking" | "waiting" | "installing" | "verifying" | (string & {});
|
|
892
|
+
stage?: "checking" | "waiting" | "installing" | "resolving" | "downloading" | "configuring" | "verifying" | (string & {});
|
|
893
|
+
/** Ordered tool names in this job. Count successful steps for step progress, not download percent. */
|
|
894
|
+
plan?: string[];
|
|
895
|
+
/** ISO 8601 start time of the shared job, preserved when clients reconnect. */
|
|
896
|
+
startedAt?: string;
|
|
840
897
|
}
|
|
841
898
|
/** `GET /notify/config` — the token is never returned. */
|
|
842
899
|
export interface NotifyConfigStatus {
|
|
@@ -925,11 +982,21 @@ export interface Health {
|
|
|
925
982
|
workspaceMetadataVersion?: number;
|
|
926
983
|
/** Durable project creation/clone operations; absent on older daemons. */
|
|
927
984
|
projectOperationsVersion?: number;
|
|
985
|
+
/** Workspace/project GitHub bindings and operation/run credential forwarding. */
|
|
986
|
+
gitAccessVersion?: number;
|
|
987
|
+
/** Durable Git writes: v2 adds branches; v3 adds repository-scoped commit author setup. */
|
|
988
|
+
gitOperationsVersion?: number;
|
|
928
989
|
/** Persistent profile/chat mutes enforced before every notification delivery. */
|
|
929
990
|
notificationPreferencesVersion?: number;
|
|
991
|
+
harnessPolicyVersion?: number;
|
|
930
992
|
ok: boolean;
|
|
931
993
|
agent: string;
|
|
932
994
|
version: string;
|
|
995
|
+
/** Atomic idle admission for service replacement. */
|
|
996
|
+
serviceUpdateVersion?: number;
|
|
997
|
+
/** Container placement supplies the sandbox boundary; approval policy is independent. */
|
|
998
|
+
workspaceIsolationVersion?: number;
|
|
999
|
+
workspaceIsolation?: "direct" | "container";
|
|
933
1000
|
}
|
|
934
1001
|
/**
|
|
935
1002
|
* `GET /stats` — the daemon **process's** own resource snapshot, straight from the Go runtime. It is
|
package/dist/workspace.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Mindwire } from "./client.js";
|
|
2
|
-
/** Write-only credentials
|
|
3
|
-
export type ProjectAuth = {
|
|
2
|
+
/** Write-only credentials. Never persisted in operation snapshots or conversation state. */
|
|
3
|
+
export type ProjectAuth = ({
|
|
4
4
|
kind: "token";
|
|
5
5
|
token: string;
|
|
6
6
|
username?: string;
|
|
@@ -9,7 +9,65 @@ export type ProjectAuth = {
|
|
|
9
9
|
privateKey: string;
|
|
10
10
|
} | {
|
|
11
11
|
kind: "gh";
|
|
12
|
+
}) & {
|
|
13
|
+
connectionId?: string;
|
|
14
|
+
expiresAt?: string;
|
|
15
|
+
readOnly?: boolean;
|
|
12
16
|
};
|
|
17
|
+
export interface GitConnection {
|
|
18
|
+
id: string;
|
|
19
|
+
login: string;
|
|
20
|
+
mode: "token" | "oblienApp" | "sshKey" | "ghCli" | "native";
|
|
21
|
+
lifetime: "run" | "workspace";
|
|
22
|
+
}
|
|
23
|
+
export interface GitAccessState {
|
|
24
|
+
default?: GitConnection;
|
|
25
|
+
storedConnectionIds: string[];
|
|
26
|
+
storedConnections: GitConnection[];
|
|
27
|
+
activeOperations: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ProjectGitState {
|
|
30
|
+
connection?: GitConnection;
|
|
31
|
+
inherited: boolean;
|
|
32
|
+
stored: boolean;
|
|
33
|
+
repoUrl?: string;
|
|
34
|
+
}
|
|
35
|
+
export type GitAction = "stage" | "unstage" | "discard" | "commit" | "fetch" | "pull" | "push" | "switch_branch" | "create_branch";
|
|
36
|
+
export interface GitIdentity {
|
|
37
|
+
name: string;
|
|
38
|
+
email: string;
|
|
39
|
+
}
|
|
40
|
+
export interface GitOperationRequest {
|
|
41
|
+
/** Stable ID. Reuse this exact intent after a lost acknowledgement. */
|
|
42
|
+
id: string;
|
|
43
|
+
action: GitAction;
|
|
44
|
+
/** Literal repository-relative paths, required for stage/unstage/discard. */
|
|
45
|
+
paths?: string[];
|
|
46
|
+
/** Required for commit. Uses the existing author unless identity is explicitly supplied. */
|
|
47
|
+
message?: string;
|
|
48
|
+
/** Literal branch name for switch_branch/create_branch; requires gitOperationsVersion >= 2. */
|
|
49
|
+
branch?: string;
|
|
50
|
+
/** switch_branch only: branch is a remote tracking name, e.g. origin/feature. */
|
|
51
|
+
remote?: boolean;
|
|
52
|
+
/** Commit only; requires gitOperationsVersion >= 3. Saves attribution in this repository,
|
|
53
|
+
* then commits under the same durable lock. Never changes global Git configuration. */
|
|
54
|
+
identity?: GitIdentity;
|
|
55
|
+
/** Write-only, for network operations only. Never part of an operation snapshot. */
|
|
56
|
+
auth?: ProjectAuth;
|
|
57
|
+
}
|
|
58
|
+
export interface GitOperation extends Omit<GitOperationRequest, "auth"> {
|
|
59
|
+
projectId: string;
|
|
60
|
+
/** Canonical repository root resolved by the daemon. */
|
|
61
|
+
path: string;
|
|
62
|
+
status: "queued" | "running" | "cancelling" | "succeeded" | "failed" | "cancelled" | "interrupted";
|
|
63
|
+
output?: string;
|
|
64
|
+
error?: string;
|
|
65
|
+
/** git_identity_required asks the client to collect a name/email before a new commit intent. */
|
|
66
|
+
errorCode?: "git_identity_required" | (string & {});
|
|
67
|
+
createdAt: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
sequence: number;
|
|
70
|
+
}
|
|
13
71
|
export interface ProjectRequest {
|
|
14
72
|
/** Stable idempotency key. Keep the same ID if the acknowledgement is lost. */
|
|
15
73
|
id: string;
|
|
@@ -20,6 +78,7 @@ export interface ProjectRequest {
|
|
|
20
78
|
repoUrl?: string;
|
|
21
79
|
branch?: string;
|
|
22
80
|
auth?: ProjectAuth;
|
|
81
|
+
gitConnection?: GitConnection;
|
|
23
82
|
}
|
|
24
83
|
export interface ProjectRemoveRequest {
|
|
25
84
|
/** Stable idempotency key for this confirmed removal. */
|
|
@@ -76,6 +135,8 @@ export interface WorkspaceProject extends WorkspaceRecord {
|
|
|
76
135
|
name: string;
|
|
77
136
|
path: string;
|
|
78
137
|
repoUrl?: string;
|
|
138
|
+
/** Omit on edits to preserve; explicitly null restores the workspace default. */
|
|
139
|
+
gitConnection?: GitConnection | null;
|
|
79
140
|
}
|
|
80
141
|
/** Chat membership; transcript content continues to come from /chats/:id/messages. */
|
|
81
142
|
export interface WorkspaceChat extends WorkspaceRecord {
|
|
@@ -132,6 +193,7 @@ export declare class WorkspaceCollection<T extends WorkspaceRecord> {
|
|
|
132
193
|
/** Workspace metadata is shared by all harnesses; withAgent() never scopes these requests. */
|
|
133
194
|
export declare class WorkspaceApi {
|
|
134
195
|
private readonly mw;
|
|
196
|
+
readonly git: GitAccessApi;
|
|
135
197
|
readonly operations: ProjectOperationsApi;
|
|
136
198
|
readonly agents: WorkspaceCollection<WorkspaceAgent>;
|
|
137
199
|
readonly projects: WorkspaceCollection<WorkspaceProject>;
|
|
@@ -151,3 +213,28 @@ export declare class WorkspaceApi {
|
|
|
151
213
|
/** Import legacy metadata before replacing a local cache. Safe to repeat after interruption. */
|
|
152
214
|
import(records: WorkspaceImport): Promise<WorkspaceSnapshot>;
|
|
153
215
|
}
|
|
216
|
+
/** Account preferences and authenticated Git on the daemon hosting each repository. */
|
|
217
|
+
export declare class GitAccessApi {
|
|
218
|
+
private readonly mw;
|
|
219
|
+
constructor(mw: Mindwire);
|
|
220
|
+
state(): Promise<GitAccessState>;
|
|
221
|
+
setDefault(connection: GitConnection | null, auth?: ProjectAuth): Promise<GitAccessState>;
|
|
222
|
+
forget(connectionId: string): Promise<GitAccessState>;
|
|
223
|
+
project(projectId: string): Promise<ProjectGitState>;
|
|
224
|
+
setProject(projectId: string, connection: GitConnection | null, expectedRevision: number, auth?: ProjectAuth): Promise<WorkspaceSnapshot>;
|
|
225
|
+
/** Compatibility call. Prefer start() and operation()/watch() for reconnectable writes. */
|
|
226
|
+
run(projectId: string, operation: "fetch" | "pull" | "push", auth?: ProjectAuth): Promise<{
|
|
227
|
+
output: string;
|
|
228
|
+
}>;
|
|
229
|
+
/** Requires health.gitOperationsVersion >= 1 (>= 2 for branch changes). Acceptance persists before Git runs;
|
|
230
|
+
* disconnecting only detaches the client. The same ID/intent never runs twice.
|
|
231
|
+
*/
|
|
232
|
+
start(projectId: string, request: GitOperationRequest): Promise<GitOperation>;
|
|
233
|
+
operations(projectId: string, activeOnly?: boolean): Promise<GitOperation[]>;
|
|
234
|
+
operation(id: string): Promise<GitOperation>;
|
|
235
|
+
cancel(id: string): Promise<GitOperation>;
|
|
236
|
+
/** Current snapshot followed by state changes. Aborting observation never cancels the operation. */
|
|
237
|
+
watch(id: string, opts?: {
|
|
238
|
+
signal?: AbortSignal;
|
|
239
|
+
}): AsyncGenerator<GitOperation>;
|
|
240
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindwire",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"devDependencies": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dev": "tsup --watch",
|
|
67
67
|
"typecheck": "tsc --noEmit",
|
|
68
68
|
"test": "bun test",
|
|
69
|
-
"test:e2e": "RUN_E2E=1 RUN_DOCKER_E2E=1 bun test test/e2e",
|
|
69
|
+
"test:e2e": "bun run build && RUN_E2E=1 RUN_DOCKER_E2E=1 bun test test/e2e",
|
|
70
70
|
"clean": "rm -rf dist"
|
|
71
71
|
},
|
|
72
72
|
"sideEffects": false,
|