diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 48774a9..4865ea3 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -7,6 +7,8 @@ on: permissions: contents: read pull-requests: write + # semgrep exchanges the job's OIDC token for short-lived model credentials. + id-token: write jobs: scan: diff --git a/.github/workflows/vuln-remediation.yml b/.github/workflows/vuln-remediation.yml index e7b1ea9..8ead8df 100644 --- a/.github/workflows/vuln-remediation.yml +++ b/.github/workflows/vuln-remediation.yml @@ -8,6 +8,8 @@ on: permissions: contents: write pull-requests: write + # vuln-remediation exchanges the job's OIDC token for short-lived model credentials. + id-token: write jobs: remediate: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9800444..8316a6d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.28.0" + ".": "0.29.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c18063..369cc4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [0.29.0](https://github.com/kernel/hypeman-ts/compare/v0.28.0...v0.29.0) (2026-11-09) + + +### Features + +* Add Windows hypervisor primitives ([a0b69e9](https://github.com/kernel/hypeman-ts/commit/a0b69e995022e8f39d2df180f7b71cdd9dc5231d)) +* Integrate vendor VFIO vGPUs into the instance lifecycle ([2222034](https://github.com/kernel/hypeman-ts/commit/2222034d8980f9052f1b29774d3417bcbce8b05b)) +* Place vGPU profiles the driver hides from creatable lists ([e7f429c](https://github.com/kernel/hypeman-ts/commit/e7f429c3dcf2021f62ee13ef5f036da064d668d3)) +* Update Hypeman build toolchains to Go 1.26.10 ([26e9bdb](https://github.com/kernel/hypeman-ts/commit/26e9bdb59bd86802771ffde0289e2f96b0ffebc4)) + ## [0.28.0](https://github.com/kernel/hypeman-ts/compare/v0.27.0...v0.28.0) (2026-09-01) diff --git a/package-lock.json b/package-lock.json index 3e92bd1..d9de5e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@onkernel/hypeman", - "version": "0.28.0", + "version": "0.29.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@onkernel/hypeman", - "version": "0.28.0", + "version": "0.29.0", "license": "Apache-2.0", "dependencies": { "dockerode": "^4.0.10", diff --git a/package.json b/package.json index 566ce5b..7f7e185 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/hypeman", - "version": "0.28.0", + "version": "0.29.0", "description": "The official TypeScript library for the Hypeman API", "author": "Hypeman <>", "types": "dist/index.d.ts", diff --git a/src/resources/instances/instances.ts b/src/resources/instances/instances.ts index 0e9feee..d10c0f7 100644 --- a/src/resources/instances/instances.ts +++ b/src/resources/instances/instances.ts @@ -624,7 +624,12 @@ export namespace Instance { */ export interface GPU { /** - * mdev device UUID + * sysfs path of the assigned vGPU device + */ + device_path?: string; + + /** + * mdev device UUID (mdev hosts only) */ mdev_uuid?: string; @@ -747,7 +752,8 @@ export interface InstanceStats { memory_vms_bytes: number; /** - * Total network bytes received by the VM (from TAP interface) + * Total network bytes received by the VM (from TAP interface). Always 0 for macOS + * guests, which use NAT with no per-instance interface. */ network_rx_bytes: number; @@ -1140,15 +1146,16 @@ export interface InstanceCreateParams { network?: InstanceCreateParams.Network; /** - * Writable overlay disk size (human-readable format like "10GB", "50G") + * Writable overlay disk size (human-readable format like "10GB", "50G"). Omit this + * field for macOS guests, which clone the image's complete boot disk instead. */ overlay_size?: string; /** - * Target platform as os/arch[/variant] (e.g. "linux/amd64"), matching Docker - * --platform. Omit for the host platform. Not a fixed enum: the os/arch[/variant] - * grammar is validated server-side and invalid values return 400 invalid_platform. - * Only os "linux" with arch amd64 or arm64 is accepted today. + * Target platform as os/arch[/variant]. Linux container guests support amd64 and + * arm64. Experimental darwin/arm64 guests require an offline-imported macOS disk + * image and vz on Apple silicon. Omit to use the cached native image or host + * platform. */ platform?: string; @@ -1158,7 +1165,9 @@ export interface InstanceCreateParams { restart_policy?: RestartPolicy; /** - * Base memory size (human-readable format like "1GB", "512MB", "2G") + * Base memory size (human-readable format like "1GB", "512MB", "2G"). macOS guests + * default to their image's memory; explicit sizes must be at least 4 GiB in whole + * MiB and within VZ host limits. */ size?: string; @@ -1197,7 +1206,8 @@ export interface InstanceCreateParams { ttl?: string; /** - * Number of virtual CPUs + * Number of virtual CPUs. macOS guests default to their image's vCPUs; explicit + * counts must be at least 2 and within VZ host limits. */ vcpus?: number; @@ -1424,7 +1434,7 @@ export interface InstanceLogsParams { * - vmm: Cloud Hypervisor VMM logs (hypervisor stdout+stderr) * - hypeman: Hypeman operations log (actions taken on this instance) */ - source?: 'app' | 'vmm' | 'hypeman'; + source?: 'app' | 'vmm' | 'hypeman' | 'swtpm'; /** * Number of lines to return from end diff --git a/src/resources/resources.ts b/src/resources/resources.ts index 7b407b2..296d563 100644 --- a/src/resources/resources.ts +++ b/src/resources/resources.ts @@ -67,7 +67,9 @@ export interface DiskBreakdown { */ export interface GPUProfile { /** - * Number of instances that can be created with this profile + * Number of additional instances of this profile the host can take if only this + * profile is added. Counts for different profiles are not additive: an instance of + * one profile can reduce availability of others on the same GPU. */ available: number; @@ -86,18 +88,31 @@ export interface GPUProfile { * GPU resource status. Null if no GPUs available. */ export interface GPUResourceStatus { + /** + * Free slots eligible for placement, matching admission control (excludes + * quarantined VFs; 0 while VF health state is unavailable) + */ + allocatable_slots: number; + /** * GPU mode (vgpu for SR-IOV/mdev, passthrough for whole GPU) */ mode: 'vgpu' | 'passthrough'; + /** + * VFs quarantined after guest driver init failures (vGPU mode only). May overlap + * used_slots until the affected instance releases its VF. + */ + quarantined_slots: number; + /** * Total slots (VFs for vGPU, physical GPUs for passthrough) */ total_slots: number; /** - * Slots currently in use + * Slots currently in use. Includes quarantined VFs that are still assigned, so + * this can overlap quarantined_slots. */ used_slots: number; @@ -106,6 +121,13 @@ export interface GPUResourceStatus { */ devices?: Array; + /** + * Present when allocatable_slots is 0 because the VF health state could not be + * read or written rather than because the host is full. vGPU placement is refused + * until the state file is repaired or the next write succeeds. + */ + placement_disabled_reason?: string; + /** * Available vGPU profiles (only in vGPU mode) */ diff --git a/src/version.ts b/src/version.ts index 3e76cc4..bef2b64 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.28.0'; // x-release-please-version +export const VERSION = '0.29.0'; // x-release-please-version