mindwire 0.1.2 → 0.1.3

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.
@@ -32,6 +32,8 @@ export interface ContainerHandle {
32
32
  containerId: string;
33
33
  /** The ephemeral host port the in-container daemon is published to, on the base machine's loopback. */
34
34
  hostPort: number;
35
+ /** Bearer token generated for the daemon in this container. */
36
+ token: string;
35
37
  /** Tear down: `docker rm -f` the container if we created it and `stopOnExit` is set. Idempotent. */
36
38
  stop(): Promise<void>;
37
39
  }
@@ -29,16 +29,23 @@ export interface EnsureDaemonConfig {
29
29
  agent: string;
30
30
  /** `AGENT_CWD` — working directory agents run in, inside the sandbox. */
31
31
  agentCwd: string;
32
- /** Explicit path to a Linux `mindwired` to deploy (else resolved from the platform package). */
32
+ /**
33
+ * Explicit path to a Linux `mindwired` to deploy (else downloaded from the matching GitHub Release).
34
+ * `{arch}` is expanded to the destination architecture (`amd64` or `arm64`), allowing a development
35
+ * launcher to build both artifacts without guessing the sandbox architecture in advance.
36
+ */
33
37
  daemonBin?: string;
34
38
  /** Redeploy when the running daemon's version differs from `desiredVersion`. Off by default. */
35
39
  autoUpdate?: boolean;
40
+ /** Redeploy even when the reported version matches. Intended only for a locally built development daemon. */
41
+ forceDeploy?: boolean;
36
42
  /** Version to reconcile against. Defaults to {@link SDK_VERSION} (the bundled binary's version). */
37
43
  desiredVersion?: string;
38
44
  /** Destination label carried on every {@link EnsureEvent} (e.g. `"ssh"`/`"docker"`/`"oblien"`). */
39
45
  target?: string;
40
46
  /** Receives a step {@link EnsureEvent} at each phase. A throwing callback can't abort provisioning. */
41
47
  onLog?: (e: EnsureEvent) => void;
48
+ token?: string;
42
49
  }
43
50
  /**
44
51
  * A progress event emitted at each phase of the ensure cycle (and, one-shot, by the `local`/`remote`
@@ -70,10 +77,11 @@ export interface EnsureEvent {
70
77
  }
71
78
  /**
72
79
  * Make sure a healthy `mindwired` of the desired version is reachable at `127.0.0.1:<port>` inside the
73
- * sandbox, deploying it if absent (or redeploying if stale and `autoUpdate` is set). Idempotent: a
74
- * healthy, current daemon (e.g. an image that autostarts it, or a reused sandbox) is a no-op.
80
+ * sandbox, deploying it if absent (or redeploying if stale and `autoUpdate` is set). `forceDeploy`
81
+ * deliberately replaces even a version match for local source development. Otherwise a healthy,
82
+ * current daemon (e.g. an image that autostarts it, or a reused sandbox) is a no-op.
75
83
  */
76
- export declare function ensureDaemon(host: SandboxHost, cfg: EnsureDaemonConfig): Promise<void>;
84
+ export declare function ensureDaemon(host: SandboxHost, cfg: EnsureDaemonConfig): Promise<string>;
77
85
  /**
78
86
  * Resolve a Linux `mindwired` on the host running the SDK: an explicit `daemonBin`, else download the
79
87
  * SDK-matched release binary, verify its checksum, and return its local cache path for upload.
@@ -19,10 +19,12 @@ export interface OblienConfig {
19
19
  agentCwd?: string;
20
20
  /** Loopback port the in-workspace daemon listens on. */
21
21
  port?: number;
22
- /** Explicit path to a Linux `mindwired` to deploy (else resolved from the platform package). */
22
+ /** Explicit local Linux `mindwired` to deploy. `{arch}` expands to the workspace architecture. */
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;
26
+ /** Replace even a healthy version match. Use only with a locally built development daemon. */
27
+ forceDeploy?: boolean;
26
28
  /** On `close()`, tear the workspace down (delete one we created / stop one we reused). */
27
29
  stopOnExit?: boolean;
28
30
  /** Image for a new workspace. Ideally one that already runs `mindwired` and ships the target agent CLI. */
@@ -37,6 +39,8 @@ export interface OblienConfig {
37
39
  memoryMb?: number;
38
40
  /** Disk (MB) for a new workspace. */
39
41
  diskMb?: number;
42
+ /** Called as soon as the workspace identity is known, before daemon installation begins. */
43
+ onWorkspace?: (workspaceId: string) => void | Promise<void>;
40
44
  /** Lifecycle: `temporary` (auto-reaped) or `permanent`. */
41
45
  mode?: "temporary" | "permanent";
42
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindwire",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "devDependencies": {