@theagenticguy/microvms 0.9.0 → 0.10.0

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/index.d.ts CHANGED
@@ -64,6 +64,11 @@ export declare class AgentVm {
64
64
  * uploaded `buildArtifact`'s bytes. Several minutes, server-side.
65
65
  */
66
66
  buildImage(options: AgentImageOptions, size?: SizeClass | undefined | null): Promise<Image>
67
+ /**
68
+ * Hands the VM off to another process; see `Sandbox.detach`. The adopter passes the
69
+ * same agents to `AgentVm.adopt`.
70
+ */
71
+ detach(): Promise<Detached>
67
72
  /**
68
73
  * Launches with egress and waits for the daemon to answer.
69
74
  *
@@ -213,6 +218,28 @@ export declare class CostReport {
213
218
  toJson(): string
214
219
  }
215
220
 
221
+ /**
222
+ * What another process needs to adopt a VM handed off by `sandbox.detach()`.
223
+ *
224
+ * Pass the fields to `Sandbox.adopt(region, microvmId, endpoint, agentToken, port)`. The
225
+ * token is a method rather than a getter so it is never read by accident, and it is absent
226
+ * from `toString()`; `JSON.stringify` of the instance carries nothing.
227
+ */
228
+ export declare class Detached {
229
+ get microvmId(): string
230
+ get endpoint(): string
231
+ /** The region the VM runs in, ready to pass to `Sandbox.adopt`. */
232
+ get region(): Region
233
+ /** The daemon port the endpoint's proxy tokens are minted for. */
234
+ get port(): number
235
+ /** The VM's bearer credential; store it only privately. */
236
+ agentToken(): string
237
+ /** Every field, token included, for a private encrypted store. */
238
+ toObject(): DetachedObject
239
+ /** The record without its secret. */
240
+ toString(): string
241
+ }
242
+
216
243
  /**
217
244
  * Seconds, plus how we know them.
218
245
  *
@@ -698,6 +725,20 @@ export declare class Sandbox {
698
725
  static fromName(region: Region, name: string, registry: NameRegistry, port?: number | undefined | null): Promise<Sandbox>
699
726
  /** Whether this sandbox was built by `adopt` rather than by its own launch. */
700
727
  adopted(): Promise<boolean>
728
+ /**
729
+ * Hands the VM off to another process and resolves with what that process adopts it
730
+ * with.
731
+ *
732
+ * For a workflow whose steps run in different processes: the launching step calls this
733
+ * instead of dropping the sandbox (which warns that a live VM was abandoned), persists
734
+ * the record privately, and a later step calls `Sandbox.adopt` with it. The VM keeps
735
+ * running and no AWS call is made. Afterwards this sandbox is inert: `run`,
736
+ * `waitUntilRunning`, `suspend`, `resume`, and `terminate` are refused. Rejects with
737
+ * `ERR_PRECONDITION` without a live VM or when already detached.
738
+ */
739
+ detach(): Promise<Detached>
740
+ /** Whether `detach()` handed this sandbox's VM to another process. */
741
+ isDetached(): Promise<boolean>
701
742
  /** The VM id, once launched. */
702
743
  microvmId(): Promise<string | null>
703
744
  /** The proxy endpoint, once launched. */
@@ -734,10 +775,23 @@ export declare class Sandbox {
734
775
  * after the caller's artifact upload: a rejection AWS raises costs the upload first.
735
776
  */
736
777
  buildImage(options: BuildImageOptions, size?: SizeClass | undefined | null, runHookTimeout?: RunHookTimeout | undefined | null, buildHookTimeout?: BuildHookTimeout | undefined | null): Promise<Image>
778
+ /**
779
+ * Builds or reuses the content-addressed image for a task: one call from build inputs
780
+ * to a ready image.
781
+ *
782
+ * The name is `<namePrefix>-<hash12>` over the daemon, the Dockerfile, the build
783
+ * context, the base image and the size class. A ready image is returned with
784
+ * `reused: true` and no upload; a running build is waited out; a failed image — or any
785
+ * image under `force` — is deleted and rebuilt; an absent one is uploaded to
786
+ * `s3://<s3Bucket>/<s3KeyPrefix>/<name>/artifact.zip`, created, and waited for. When a
787
+ * concurrent caller creates the name first, this call waits for that build and returns
788
+ * it with `reused: true`. Every local check runs before the first AWS call.
789
+ */
790
+ ensureImage(options: EnsureImageOptions, size?: SizeClass | undefined | null): Promise<EnsuredImage>
737
791
  /**
738
792
  * The artifact bytes to upload to `codeArtifactUri`.
739
793
  *
740
- * The upload is the caller's: S3 is not in the core's dependency set. Takes the same
794
+ * The upload is the caller's on this path (`ensureImage` uploads for itself). Takes the same
741
795
  * options as [`Self::build_image`] so the bytes a caller puts in the bucket are the bytes
742
796
  * the build will receive.
743
797
  */
@@ -821,6 +875,16 @@ export declare class Session {
821
875
  agentToken(): Promise<string>
822
876
  /** The endpoint this session addresses. */
823
877
  endpoint(): Promise<string>
878
+ /**
879
+ * The launch's egress posture: `"open"`, `"unsealed"`, `"best-effort"`, or `"sealed"`.
880
+ *
881
+ * The value the CLI envelope's `egressPosture` reports for the same launch options, and
882
+ * what `egressPostureFor` answers before the launch. A session that does not hold its
883
+ * launch options (`Session.direct`, `Session.attach`, an adopted sandbox) reports
884
+ * `"unsealed"`. Advertise network isolation only for `"sealed"`. Async like `endpoint()`,
885
+ * because a sandbox-held session is read under the sandbox's lock.
886
+ */
887
+ egressPosture(): Promise<string>
824
888
  /** The port the proxy token is scoped to. */
825
889
  port(): Promise<number>
826
890
  /** Unauthenticated liveness. */
@@ -875,6 +939,22 @@ export declare class Session {
875
939
  exec(execId: string): Promise<ExecHandle>
876
940
  /** Start, wait, ack. The one-shot shape, for when output is all you want. */
877
941
  runSync(command: string | Array<string>, options?: ExecOptions | undefined | null): Promise<ExecResult>
942
+ /**
943
+ * Start, stream, and collect one command: exactly one `ExecResult` back (BIND-6..10).
944
+ *
945
+ * With `onOutput`, each output chunk (a `StreamEvent` of kind `"output"`) is handed to it
946
+ * as it arrives. The result then comes from the ack that follows the terminal `exit`
947
+ * event, or, when the stream ends without one, from a wait and ack. When `timeoutSec +
948
+ * clientGraceSec` passes first (or, with no `timeoutSec`, the VM's maximum lifetime), the
949
+ * process group is killed and the exec waited for and acked within `clientGraceSec` once
950
+ * more; if that fails too the result is synthesized with `posixExitCode` 124.
951
+ *
952
+ * A throwing `onOutput` stops delivery; the exec is still waited for and acked so nothing
953
+ * is left behind, and then the promise rejects with the callback's message. `shell: true`
954
+ * runs `/bin/sh -c`; for bash semantics pass `shell: "bash"` with a script string, or
955
+ * `["bash", "-c", script]` for a daemon that predates named shells.
956
+ */
957
+ runToCompletion(command: string | string[], options?: CompletionRequest | undefined | null, onOutput?: ((chunk: StreamEvent) => unknown) | undefined | null): Promise<ExecResult>
878
958
  /** Signals an exec's whole process group. Returns whether anything was signalled. */
879
959
  kill(execId: string): Promise<boolean>
880
960
  /**
@@ -969,6 +1049,16 @@ export declare class SizeClass {
969
1049
  * readings differ in both memory and rate, and neither has been measured.
970
1050
  */
971
1051
  static fromBaselineMib(mib: number): SizeClass
1052
+ /**
1053
+ * The smallest class whose baseline covers a resource request (BIND-14).
1054
+ *
1055
+ * `cpus` in vCPUs and `memoryMib` in MiB, each a request; `undefined` or zero is no
1056
+ * requirement on that axis, and with none on either the answer is `defaultClass()`.
1057
+ * Chosen by baseline, the billed and always-present figure. Throws `ERR_INVALID_ARG`
1058
+ * naming the largest class when no class covers the request, or for a CPU figure that is
1059
+ * not a finite non-negative number.
1060
+ */
1061
+ static fromRequest(cpus?: number | undefined | null, memoryMib?: number | undefined | null): SizeClass
972
1062
  /**
973
1063
  * The platform's default, 2048 MiB. Not the smallest — a 0.5 GB baseline fixes the
974
1064
  * guest's always-present ceiling at 2 GB, which OOM-kills a real test suite, and the
@@ -1087,6 +1177,16 @@ export interface AgentSpecInput {
1087
1177
  cliVersion?: string
1088
1178
  }
1089
1179
 
1180
+ /**
1181
+ * The base a task Dockerfile pairs with: the managed base's `name`, so `baseImageArn` is
1182
+ * unchanged, and the Dockerfile's first `FROM` as `dockerRef`, digest pin included.
1183
+ *
1184
+ * `buildImage` refuses a Dockerfile whose first `FROM` is not the base's `dockerRef`; a base
1185
+ * derived from that Dockerfile passes by construction. Throws `ERR_INVALID_ARG` for a
1186
+ * Dockerfile with no `FROM`.
1187
+ */
1188
+ export declare function baseImageFromDockerfile(dockerfile: string): BaseImageInput
1189
+
1090
1190
  /**
1091
1191
  * The platform's managed base image, paired with the Dockerfile `FROM` it goes with.
1092
1192
  *
@@ -1129,8 +1229,8 @@ export interface BuildImageOptions {
1129
1229
  /** The daemon binary's bytes, zipped into the artifact. */
1130
1230
  binary: Uint8Array
1131
1231
  /**
1132
- * Where the artifact is uploaded to. This client does not upload — S3 is not in the
1133
- * core's dependency set — so the caller puts the bytes there and passes the URI.
1232
+ * Where the artifact is uploaded to. `buildImage` does not upload: the caller puts the
1233
+ * bytes there and passes the URI. `ensureImage` is the path that uploads for itself.
1134
1234
  */
1135
1235
  codeArtifactUri: string
1136
1236
  /** The build role, which must grant logs on `/aws/lambda-microvms/*`. */
@@ -1169,6 +1269,40 @@ export declare function buildUnpricedReason(): string
1169
1269
  /** The warm-pool argument, with its own counter-argument attached. */
1170
1270
  export declare function compareResidency(size: SizeClass, holdSeconds: number, cycles?: number | undefined | null, rates?: RateTable | undefined | null): ResidencyComparison
1171
1271
 
1272
+ /**
1273
+ * How `runToCompletion` should start and collect a command.
1274
+ *
1275
+ * The `ExecOptions` a completed run can use (no `stdin`, which nothing would write, and no
1276
+ * `timeout`, which `clientGraceSec` replaces), plus the client grace.
1277
+ */
1278
+ export interface CompletionRequest {
1279
+ /**
1280
+ * `true` runs a single script string under `/bin/sh -c`; a string such as `"bash"` runs
1281
+ * it under that shell, resolved by the daemon in the guest. See `ExecOptions.shell`.
1282
+ */
1283
+ shell?: boolean | string
1284
+ cwd?: string
1285
+ env?: Record<string, string>
1286
+ /** A numeric uid, or a name the daemon resolves in the guest. See `ExecOptions.user`. */
1287
+ user?: number | string
1288
+ /** A numeric gid, or a name the daemon resolves in the guest. */
1289
+ group?: number | string
1290
+ /**
1291
+ * The daemon's own kill deadline for the child. The client deadline is this plus
1292
+ * `clientGraceSec`.
1293
+ */
1294
+ timeoutSec?: number
1295
+ /** The idempotency key. Omitted, one is minted. */
1296
+ execId?: string
1297
+ /** Start the child's environment from the image's `ENV`. See `ExecOptions.inheritImageEnv`. */
1298
+ inheritImageEnv?: boolean
1299
+ /**
1300
+ * How long past `timeoutSec` the client waits before it kills, and how long it then
1301
+ * waits for the killed exec's result. Defaults to the core's 60 seconds.
1302
+ */
1303
+ clientGraceSec?: number
1304
+ }
1305
+
1172
1306
  /**
1173
1307
  * The core crate's version, for a `doctor` or `manifest` command to report.
1174
1308
  *
@@ -1190,6 +1324,77 @@ export declare function costConstants(): string
1190
1324
  /** The managed base every `docs/PLATFORM.md` measurement from 2026-08-06 onward used. */
1191
1325
  export declare function defaultBaseImage(): BaseImageInput
1192
1326
 
1327
+ /** `Detached` as a plain object, token included, for a private store. */
1328
+ export interface DetachedObject {
1329
+ microvmId: string
1330
+ endpoint: string
1331
+ region: string
1332
+ port: number
1333
+ agentToken: string
1334
+ }
1335
+
1336
+ /**
1337
+ * The egress posture `sandbox.run` with these options would report, without launching.
1338
+ *
1339
+ * One of `"open"`, `"unsealed"`, `"best-effort"`, or `"sealed"`: the value the launched
1340
+ * session's `egressPosture()` and the CLI envelope's `egressPosture` carry. Throws the launch's
1341
+ * own `ERR_INVALID_ARG` for options it would refuse. No AWS call and no credentials, so a
1342
+ * harness can decide before a build whether a no-network task is satisfiable.
1343
+ *
1344
+ * Only `"sealed"` is network isolation, and no option answers it: isolation needs a VPC
1345
+ * egress connector and separately verified VPC routing without an internet gateway or NAT
1346
+ * gateway. Omitting `egress` is `"unsealed"`; `denyEgress` is `"best-effort"`. Without a
1347
+ * `region`, each connector ARN is checked against the region it names.
1348
+ */
1349
+ export declare function egressPostureFor(egress?: boolean | undefined | null, connectors?: Array<string> | undefined | null, denyEgress?: boolean | undefined | null, region?: Region | undefined | null): string
1350
+
1351
+ /** What `ensureImage` returns: the ready image and how this call got it. */
1352
+ export interface EnsuredImage {
1353
+ /** The ready image; pass `image.identifier` to `run`. */
1354
+ image: Image
1355
+ /**
1356
+ * True when this call's own create did not build the image: it was ready, a build
1357
+ * already running was waited out, or a concurrent caller won the create race.
1358
+ */
1359
+ reused: boolean
1360
+ /** `s3://<bucket>/<prefix>/<name>/artifact.zip`, whether or not this call uploaded it. */
1361
+ artifactUri: string
1362
+ /** Whether this call uploaded the artifact. */
1363
+ uploaded: boolean
1364
+ /** What reading the build context skipped, one line each. */
1365
+ warnings: Array<string>
1366
+ }
1367
+
1368
+ /**
1369
+ * Everything `ensureImage` needs besides the size class.
1370
+ *
1371
+ * `baseImage` defaults to `baseImageFromDockerfile(dockerfile)`; `waitTimeoutSeconds` is
1372
+ * the build wait, 45 minutes by default. `contextDir` is read as `docker build` reads a
1373
+ * context: `Dockerfile.dockerignore`, else `.dockerignore`, is honoured, and symlinks are
1374
+ * skipped with a line in the result's `warnings`.
1375
+ */
1376
+ export interface EnsureImageOptions {
1377
+ /** The image name's stem; the name is `<namePrefix>-<hash12>`. */
1378
+ namePrefix: string
1379
+ /** The daemon binary's bytes. */
1380
+ binary: Uint8Array
1381
+ /** The Dockerfile, usually `wrapDockerfile(task)`. */
1382
+ dockerfile: string
1383
+ /** The directory the Dockerfile's `COPY` lines read, or omitted for none. */
1384
+ contextDir?: string
1385
+ /** The artifact bucket, in the sandbox's region. */
1386
+ s3Bucket: string
1387
+ /** A key prefix inside the bucket, or omitted for the bucket root. */
1388
+ s3KeyPrefix?: string
1389
+ /** The build role. */
1390
+ buildRoleArn: string
1391
+ baseImage?: BaseImageInput
1392
+ /** Delete what exists under the name and build afresh. */
1393
+ force?: boolean
1394
+ tags?: Record<string, string>
1395
+ waitTimeoutSeconds?: number
1396
+ }
1397
+
1193
1398
  /**
1194
1399
  * Every `ERR_*` code this library can raise, for a caller building an exhaustive switch.
1195
1400
  *
@@ -1209,12 +1414,23 @@ export declare function estimateRun(size: SizeClass, options?: PlanUsageOptions
1209
1414
 
1210
1415
  /** How an exec should be started. Every field optional; the defaults are the daemon's. */
1211
1416
  export interface ExecOptions {
1212
- /** A single script string rather than an argv. Requires `shell: true`. */
1213
- shell?: boolean
1417
+ /**
1418
+ * `true` runs a single script string under `/bin/sh -c`; a string such as `"bash"`
1419
+ * runs it under that shell, resolved by the daemon in the guest, and a shell the guest
1420
+ * does not have is refused (`unknown_shell`) before anything starts.
1421
+ */
1422
+ shell?: boolean | string
1214
1423
  cwd?: string
1215
1424
  env?: Record<string, string>
1216
- user?: number
1217
- group?: number
1425
+ /**
1426
+ * A numeric uid, or a name the daemon resolves against the guest's `/etc/passwd`. An
1427
+ * unknown name is refused (`unknown_user`) before anything starts. A user with a passwd
1428
+ * row gets `HOME`, `USER` and `LOGNAME` from it, beneath the launch environment and
1429
+ * `env`.
1430
+ */
1431
+ user?: number | string
1432
+ /** A numeric gid, or a name the daemon resolves against the guest's `/etc/group`. */
1433
+ group?: number | string
1218
1434
  /** The daemon's own kill deadline for the child, distinct from a client-side `wait`. */
1219
1435
  timeoutSec?: number
1220
1436
  /** Whether to open a stdin pipe. Writing without this is a 409. */
@@ -1233,6 +1449,12 @@ export interface ExecOptions {
1233
1449
  * guarantee for callers who rely on it.
1234
1450
  */
1235
1451
  reapGroupOnExit?: boolean
1452
+ /**
1453
+ * Start the child's environment from the image's `ENV` (minus `AGENTD_*`, never the
1454
+ * token), beneath everything else (AGENTD-11). Off by default, which keeps the child's environment
1455
+ * exactly the launch environment plus `env`.
1456
+ */
1457
+ inheritImageEnv?: boolean
1236
1458
  }
1237
1459
 
1238
1460
  /**
@@ -1271,6 +1493,22 @@ export interface ExecResult {
1271
1493
  * exec, since neither is a success.
1272
1494
  */
1273
1495
  ok: boolean
1496
+ /**
1497
+ * The exit code a POSIX shell would report (BIND-6): 124 when a deadline ended the
1498
+ * command (the daemon's, or `runToCompletion`'s client deadline), 128 plus the signal
1499
+ * for any other signal death, otherwise `exitCode`. `null` only for a running exec.
1500
+ */
1501
+ posixExitCode?: number
1502
+ /**
1503
+ * Human-readable annotations, one per condition that changes how the output reads
1504
+ * (BIND-7). Empty for a clean result; append them to stderr as they are.
1505
+ */
1506
+ notes: Array<string>
1507
+ /**
1508
+ * True when `runToCompletion` synthesized this result because nothing came back after
1509
+ * its client-deadline kill (BIND-10): `posixExitCode` is 124 and the output is unknown.
1510
+ */
1511
+ synthesized: boolean
1274
1512
  }
1275
1513
 
1276
1514
  /**
@@ -1372,6 +1610,12 @@ export interface Health {
1372
1610
  * VM's identity.
1373
1611
  */
1374
1612
  identitySteps: Array<IdentityStep>
1613
+ /**
1614
+ * How many variables the daemon's image-environment snapshot holds, or `null` when it
1615
+ * holds none. `null` is also what a daemon built before `inheritImageEnv` reports, and
1616
+ * such a daemon ignores that option. The values are never reported.
1617
+ */
1618
+ imageEnvKeys?: number
1375
1619
  }
1376
1620
 
1377
1621
  /** One lifecycle-hook invocation, as the daemon observed it. */
@@ -1585,6 +1829,42 @@ export interface PlanUsageOptions {
1585
1829
  label?: string
1586
1830
  }
1587
1831
 
1832
+ /**
1833
+ * Whether a harness can launch in `region` (default: `$AWS_REGION`, `$AWS_DEFAULT_REGION`,
1834
+ * then us-east-1), checked before it queues work.
1835
+ *
1836
+ * Three checks: the region resolves (advisory when `Region.unlisted`), the credential chain
1837
+ * resolves credentials (no AWS call), and one `ListManagedMicrovmImages` page answers in that
1838
+ * region, the only AWS operation, free and read-only. A check after a failure is reported
1839
+ * with `ran: false` and makes no call. Nothing billable, nothing mutating. It does not check
1840
+ * roles, the artifact bucket, quotas, or VPC connectors. Never rejects; read `report.ok`.
1841
+ */
1842
+ export declare function preflight(region?: Region | undefined | null): Promise<PreflightReport>
1843
+
1844
+ /** One line of a preflight report. */
1845
+ export interface PreflightCheck {
1846
+ /** `"region"`, `"credentials"`, or `"service"`. */
1847
+ name: string
1848
+ ok: boolean
1849
+ /** Whether a failure decides the report's `ok`. An unlisted region's line is advisory. */
1850
+ fatal: boolean
1851
+ /** False when an earlier check's failure kept this one from running (and calling AWS). */
1852
+ ran: boolean
1853
+ detail: string
1854
+ /** What to do about a failure; empty on a pass. */
1855
+ remedy: string
1856
+ }
1857
+
1858
+ /** What `preflight` found: three checks and whether a launch could proceed. */
1859
+ export interface PreflightReport {
1860
+ /** True exactly when no fatal check failed or was skipped. */
1861
+ ok: boolean
1862
+ /** The region checked, absent when none resolved. */
1863
+ region?: string
1864
+ /** `region`, `credentials`, and `service`, in that order. */
1865
+ checks: Array<PreflightCheck>
1866
+ }
1867
+
1588
1868
  /**
1589
1869
  * What `wait()` resolves to.
1590
1870
  *
@@ -1657,6 +1937,58 @@ export interface PromptOptions {
1657
1937
  reapGroupOnExit?: boolean
1658
1938
  }
1659
1939
 
1940
+ /**
1941
+ * The `agentd` daemon binary for `options.version` (default: this client's own).
1942
+ *
1943
+ * Answered from `options.binary` or `$MICROVM_AGENTD` when either names a file, else the
1944
+ * version's cache entry, else the GitHub release asset, verified by `gh attestation
1945
+ * verify` or, when `gh` cannot download, by the release's `SHA256SUMS`. A fetch that
1946
+ * cannot be verified rejects with `ERR_PRECONDITION` (on `err.cause.message`), and so does
1947
+ * any binary that is not an aarch64 ELF.
1948
+ */
1949
+ export declare function provisionAgentd(options?: ProvisionOptions | undefined | null): Promise<Buffer>
1950
+
1951
+ /** `provisionAgentd`, answering with the bytes and how they got here. */
1952
+ export declare function provisionAgentdReport(options?: ProvisionOptions | undefined | null): Promise<ProvisionedAgentd>
1953
+
1954
+ /** A provisioned `agentd` binary and how it got here: `provisionAgentdReport()`'s answer. */
1955
+ export interface ProvisionedAgentd {
1956
+ /** The binary itself, an aarch64 ELF. */
1957
+ data: Buffer
1958
+ /** Where the binary is on disk: the cache entry, or the caller's own path. */
1959
+ path: string
1960
+ /** `"caller-supplied"`, `"cache"`, or `"fetched"`. */
1961
+ source: string
1962
+ /**
1963
+ * For a caller-supplied binary, `"argument"` (the `binary` option) or `"env"`
1964
+ * (`$MICROVM_AGENTD`).
1965
+ */
1966
+ suppliedBy?: string
1967
+ /**
1968
+ * `"attestation"` (`gh attestation verify`, provenance) or `"checksum"` (the release's
1969
+ * `SHA256SUMS`, integrity), when fetched or when the cache entry was installed. Absent
1970
+ * for a caller-supplied binary.
1971
+ */
1972
+ verification?: string
1973
+ /** The release version provisioned for, without a leading `v`. */
1974
+ version: string
1975
+ /** The lowercase hex SHA-256 of `data`. */
1976
+ sha256: string
1977
+ }
1978
+
1979
+ /** What to provision. Every field is optional. */
1980
+ export interface ProvisionOptions {
1981
+ /** The release version, with or without a leading `v`. Defaults to `coreVersion()`. */
1982
+ version?: string
1983
+ /**
1984
+ * The state directory the cache lives under. Defaults to the CLI's
1985
+ * (`$MICROVM_STATE_DIR`, else `~/.microvm/runs`), so every surface shares one cache.
1986
+ */
1987
+ stateDir?: string
1988
+ /** A binary the caller manages. Outranks `$MICROVM_AGENTD`; must be an aarch64 ELF. */
1989
+ binary?: string
1990
+ }
1991
+
1660
1992
  /** Everything a launch needs. */
1661
1993
  export interface RunOptions {
1662
1994
  /** The image to launch, or omitted for the one `buildImage` built. */
@@ -1964,3 +2296,28 @@ export interface WaitForStateOptions {
1964
2296
 
1965
2297
  /** Every daemon-status class, as `err.cause.cause.message` names them. */
1966
2298
  export declare function wireKinds(): Array<string>
2299
+
2300
+ /**
2301
+ * A task Dockerfile with the agentd stanza appended, ready for `buildImage`.
2302
+ *
2303
+ * The result is the task text, a newline if it lacked one, `USER root` when the task's last
2304
+ * `USER` is anyone else, then the stanza the default Dockerfile uses: `COPY agentd /agentd`,
2305
+ * the chmod, `ENV AGENTD_PORT`, `EXPOSE`, `ENTRYPOINT []` and `CMD ["/agentd"]`. Pass the
2306
+ * result to `buildImage` with `baseImage: baseImageFromDockerfile(result)`.
2307
+ *
2308
+ * Throws `ERR_INVALID_ARG` for a task with no `FROM`, one that ends inside a line
2309
+ * continuation or an unterminated heredoc (either would swallow the stanza), a keepalive the
2310
+ * client cannot tolerate, a port of 0, a workdir that is not one absolute path, or
2311
+ * `inheritWorkdir` with nothing to inherit.
2312
+ */
2313
+ export declare function wrapDockerfile(taskDockerfile: string, options?: WrapDockerfileOptions | undefined | null): string
2314
+
2315
+ /** What `wrapDockerfile` takes besides the task text. Every field is optional. */
2316
+ export interface WrapDockerfileOptions {
2317
+ /** The agent port the stanza names, 9000 by default. It must match the sandbox's. */
2318
+ port?: number
2319
+ /** A working directory for the stanza to create and set, as the default Dockerfile does. */
2320
+ workdir?: string
2321
+ /** Refuse a result with no `WORKDIR` anywhere, because the exec would inherit `/`. */
2322
+ inheritWorkdir?: boolean
2323
+ }
package/index.js CHANGED
@@ -89,8 +89,8 @@ function requireNative() {
89
89
  try {
90
90
  const binding = require('@theagenticguy/microvms-android-arm64')
91
91
  const bindingPackageVersion = require('@theagenticguy/microvms-android-arm64/package.json').version
92
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
92
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
94
  }
95
95
  return binding
96
96
  } catch (e) {
@@ -105,8 +105,8 @@ function requireNative() {
105
105
  try {
106
106
  const binding = require('@theagenticguy/microvms-android-arm-eabi')
107
107
  const bindingPackageVersion = require('@theagenticguy/microvms-android-arm-eabi/package.json').version
108
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
108
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
110
110
  }
111
111
  return binding
112
112
  } catch (e) {
@@ -126,8 +126,8 @@ function requireNative() {
126
126
  try {
127
127
  const binding = require('@theagenticguy/microvms-win32-x64-gnu')
128
128
  const bindingPackageVersion = require('@theagenticguy/microvms-win32-x64-gnu/package.json').version
129
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
129
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
131
  }
132
132
  return binding
133
133
  } catch (e) {
@@ -142,8 +142,8 @@ function requireNative() {
142
142
  try {
143
143
  const binding = require('@theagenticguy/microvms-win32-x64-msvc')
144
144
  const bindingPackageVersion = require('@theagenticguy/microvms-win32-x64-msvc/package.json').version
145
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
145
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
147
147
  }
148
148
  return binding
149
149
  } catch (e) {
@@ -159,8 +159,8 @@ function requireNative() {
159
159
  try {
160
160
  const binding = require('@theagenticguy/microvms-win32-ia32-msvc')
161
161
  const bindingPackageVersion = require('@theagenticguy/microvms-win32-ia32-msvc/package.json').version
162
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
162
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
164
  }
165
165
  return binding
166
166
  } catch (e) {
@@ -175,8 +175,8 @@ function requireNative() {
175
175
  try {
176
176
  const binding = require('@theagenticguy/microvms-win32-arm64-msvc')
177
177
  const bindingPackageVersion = require('@theagenticguy/microvms-win32-arm64-msvc/package.json').version
178
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
178
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
180
180
  }
181
181
  return binding
182
182
  } catch (e) {
@@ -194,8 +194,8 @@ function requireNative() {
194
194
  try {
195
195
  const binding = require('@theagenticguy/microvms-darwin-universal')
196
196
  const bindingPackageVersion = require('@theagenticguy/microvms-darwin-universal/package.json').version
197
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
197
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
199
199
  }
200
200
  return binding
201
201
  } catch (e) {
@@ -210,8 +210,8 @@ function requireNative() {
210
210
  try {
211
211
  const binding = require('@theagenticguy/microvms-darwin-x64')
212
212
  const bindingPackageVersion = require('@theagenticguy/microvms-darwin-x64/package.json').version
213
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
213
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
215
215
  }
216
216
  return binding
217
217
  } catch (e) {
@@ -226,8 +226,8 @@ function requireNative() {
226
226
  try {
227
227
  const binding = require('@theagenticguy/microvms-darwin-arm64')
228
228
  const bindingPackageVersion = require('@theagenticguy/microvms-darwin-arm64/package.json').version
229
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
229
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
231
231
  }
232
232
  return binding
233
233
  } catch (e) {
@@ -246,8 +246,8 @@ function requireNative() {
246
246
  try {
247
247
  const binding = require('@theagenticguy/microvms-freebsd-x64')
248
248
  const bindingPackageVersion = require('@theagenticguy/microvms-freebsd-x64/package.json').version
249
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
249
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
251
251
  }
252
252
  return binding
253
253
  } catch (e) {
@@ -262,8 +262,8 @@ function requireNative() {
262
262
  try {
263
263
  const binding = require('@theagenticguy/microvms-freebsd-arm64')
264
264
  const bindingPackageVersion = require('@theagenticguy/microvms-freebsd-arm64/package.json').version
265
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
265
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
267
267
  }
268
268
  return binding
269
269
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('@theagenticguy/microvms-linux-x64-musl')
285
285
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-x64-musl/package.json').version
286
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -299,8 +299,8 @@ function requireNative() {
299
299
  try {
300
300
  const binding = require('@theagenticguy/microvms-linux-x64-gnu')
301
301
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-x64-gnu/package.json').version
302
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
302
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
304
304
  }
305
305
  return binding
306
306
  } catch (e) {
@@ -317,8 +317,8 @@ function requireNative() {
317
317
  try {
318
318
  const binding = require('@theagenticguy/microvms-linux-arm64-musl')
319
319
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm64-musl/package.json').version
320
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
320
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
322
322
  }
323
323
  return binding
324
324
  } catch (e) {
@@ -333,8 +333,8 @@ function requireNative() {
333
333
  try {
334
334
  const binding = require('@theagenticguy/microvms-linux-arm64-gnu')
335
335
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm64-gnu/package.json').version
336
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
336
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
338
338
  }
339
339
  return binding
340
340
  } catch (e) {
@@ -351,8 +351,8 @@ function requireNative() {
351
351
  try {
352
352
  const binding = require('@theagenticguy/microvms-linux-arm-musleabihf')
353
353
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm-musleabihf/package.json').version
354
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
354
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
356
356
  }
357
357
  return binding
358
358
  } catch (e) {
@@ -367,8 +367,8 @@ function requireNative() {
367
367
  try {
368
368
  const binding = require('@theagenticguy/microvms-linux-arm-gnueabihf')
369
369
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-arm-gnueabihf/package.json').version
370
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
370
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
372
372
  }
373
373
  return binding
374
374
  } catch (e) {
@@ -385,8 +385,8 @@ function requireNative() {
385
385
  try {
386
386
  const binding = require('@theagenticguy/microvms-linux-loong64-musl')
387
387
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-loong64-musl/package.json').version
388
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
388
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
390
  }
391
391
  return binding
392
392
  } catch (e) {
@@ -401,8 +401,8 @@ function requireNative() {
401
401
  try {
402
402
  const binding = require('@theagenticguy/microvms-linux-loong64-gnu')
403
403
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-loong64-gnu/package.json').version
404
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
404
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
406
406
  }
407
407
  return binding
408
408
  } catch (e) {
@@ -419,8 +419,8 @@ function requireNative() {
419
419
  try {
420
420
  const binding = require('@theagenticguy/microvms-linux-riscv64-musl')
421
421
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-riscv64-musl/package.json').version
422
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
422
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
424
  }
425
425
  return binding
426
426
  } catch (e) {
@@ -435,8 +435,8 @@ function requireNative() {
435
435
  try {
436
436
  const binding = require('@theagenticguy/microvms-linux-riscv64-gnu')
437
437
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-riscv64-gnu/package.json').version
438
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
438
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
440
440
  }
441
441
  return binding
442
442
  } catch (e) {
@@ -452,8 +452,8 @@ function requireNative() {
452
452
  try {
453
453
  const binding = require('@theagenticguy/microvms-linux-ppc64-gnu')
454
454
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-ppc64-gnu/package.json').version
455
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
455
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
457
457
  }
458
458
  return binding
459
459
  } catch (e) {
@@ -468,8 +468,8 @@ function requireNative() {
468
468
  try {
469
469
  const binding = require('@theagenticguy/microvms-linux-s390x-gnu')
470
470
  const bindingPackageVersion = require('@theagenticguy/microvms-linux-s390x-gnu/package.json').version
471
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
471
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
473
473
  }
474
474
  return binding
475
475
  } catch (e) {
@@ -488,8 +488,8 @@ function requireNative() {
488
488
  try {
489
489
  const binding = require('@theagenticguy/microvms-openharmony-arm64')
490
490
  const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-arm64/package.json').version
491
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
491
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
493
493
  }
494
494
  return binding
495
495
  } catch (e) {
@@ -504,8 +504,8 @@ function requireNative() {
504
504
  try {
505
505
  const binding = require('@theagenticguy/microvms-openharmony-x64')
506
506
  const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-x64/package.json').version
507
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
507
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
509
509
  }
510
510
  return binding
511
511
  } catch (e) {
@@ -520,8 +520,8 @@ function requireNative() {
520
520
  try {
521
521
  const binding = require('@theagenticguy/microvms-openharmony-arm')
522
522
  const bindingPackageVersion = require('@theagenticguy/microvms-openharmony-arm/package.json').version
523
- if (bindingPackageVersion !== '0.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
- throw new Error(`Native binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
523
+ if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
+ throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
525
525
  }
526
526
  return binding
527
527
  } catch (e) {
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
661
661
  if (!candidateFailed) {
662
662
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
663
663
  const bindingPackageVersion = require('@theagenticguy/microvms-wasm32-wasi/package.json').version
664
- if (bindingPackageVersion !== '0.9.0') {
665
- throw new Error(`WASI binding package version mismatch, expected 0.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
664
+ if (bindingPackageVersion !== '0.10.0') {
665
+ throw new Error(`WASI binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
666
666
  }
667
667
  }
668
668
  wasiBinding = require('@theagenticguy/microvms-wasm32-wasi')
@@ -784,6 +784,7 @@ module.exports.BearerToken = nativeBinding.BearerToken
784
784
  module.exports.BuildHookTimeout = nativeBinding.BuildHookTimeout
785
785
  module.exports.ControlPlane = nativeBinding.ControlPlane
786
786
  module.exports.CostReport = nativeBinding.CostReport
787
+ module.exports.Detached = nativeBinding.Detached
787
788
  module.exports.Duration = nativeBinding.Duration
788
789
  module.exports.EstimatedUsd = nativeBinding.EstimatedUsd
789
790
  module.exports.ExecHandle = nativeBinding.ExecHandle
@@ -803,11 +804,13 @@ module.exports.SizeClass = nativeBinding.SizeClass
803
804
  module.exports.Total = nativeBinding.Total
804
805
  module.exports.Unpriced = nativeBinding.Unpriced
805
806
  module.exports.agentConstants = nativeBinding.agentConstants
807
+ module.exports.baseImageFromDockerfile = nativeBinding.baseImageFromDockerfile
806
808
  module.exports.buildUnpricedReason = nativeBinding.buildUnpricedReason
807
809
  module.exports.compareResidency = nativeBinding.compareResidency
808
810
  module.exports.coreVersion = nativeBinding.coreVersion
809
811
  module.exports.costConstants = nativeBinding.costConstants
810
812
  module.exports.defaultBaseImage = nativeBinding.defaultBaseImage
813
+ module.exports.egressPostureFor = nativeBinding.egressPostureFor
811
814
  module.exports.errorCodes = nativeBinding.errorCodes
812
815
  module.exports.estimateRun = nativeBinding.estimateRun
813
816
  module.exports.GapPolicy = nativeBinding.GapPolicy
@@ -815,7 +818,11 @@ module.exports.installAgentAccess = nativeBinding.installAgentAccess
815
818
  module.exports.installedAgents = nativeBinding.installedAgents
816
819
  module.exports.mintBedrockToken = nativeBinding.mintBedrockToken
817
820
  module.exports.mintBedrockTokenWithCredentials = nativeBinding.mintBedrockTokenWithCredentials
821
+ module.exports.preflight = nativeBinding.preflight
818
822
  module.exports.promptAgent = nativeBinding.promptAgent
823
+ module.exports.provisionAgentd = nativeBinding.provisionAgentd
824
+ module.exports.provisionAgentdReport = nativeBinding.provisionAgentdReport
819
825
  module.exports.runReport = nativeBinding.runReport
820
826
  module.exports.sessionConstants = nativeBinding.sessionConstants
821
827
  module.exports.wireKinds = nativeBinding.wireKinds
828
+ module.exports.wrapDockerfile = nativeBinding.wrapDockerfile
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theagenticguy/microvms",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Node.js and TypeScript client for AWS Lambda MicroVMs",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Laith Al-Saadoon",