Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions projects/start-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

### Fixed

- **`hardwareRequirements.ram` is documented in bytes, which is what StartOS
actually compares it against.** Its TSDoc claimed megabytes and its
`@example` showed `ram: 8192`, so packages following it declared an 8 KiB
floor that every machine satisfies and that therefore gated nothing. The
example now writes the value as `8 * 1024 ** 3`, and the packaging guide's
manifest page gained a Minimum RAM section covering the unit and the fact
that raising a floor on a published package cuts smaller hosts off from
updates. The same example's device filter is corrected too — it still showed
the `devices` / `pattern` / `patternDescription` shape replaced by `device`
and `DeviceFilter` in 2.0.0
- **Package template cleanup.** Dropped the `alerts` manifest block, removed in
2.0.0, that the template still scaffolded, and the `hello-world` guard job
from `release.yml` / `tagAndRelease.yml`. Its workflows are now identical to
Expand Down
15 changes: 15 additions & 0 deletions projects/start-sdk/docs/src/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,21 @@ The registry stores a version's variants together and disambiguates them **by ha
>
> In particular an `nvidia` variant must carry an NVIDIA `device` filter, not `[]` — `nvidiaContainer: true` wires up the GPU runtime but does **not** set a hardware requirement, so without the filter the NVIDIA variant is indistinguishable from the CPU fallback and one of the two fails to publish.

#### Minimum RAM

`hardwareRequirements.ram` is the memory floor below which StartOS will not offer the package. **It is compared against the host's total RAM in bytes.** StartOS records `MemTotal` in bytes and the check is a raw comparison against the number you declare — nothing in the SDK or the OS converts units on your behalf.

```typescript
hardwareRequirements: {
ram: 8 * 1024 ** 3, // 8 GiB
},
```

> [!WARNING]
> A value that reads as megabytes — `ram: 8192` — declares **8 KiB**, which every machine satisfies, so the requirement silently gates nothing. Write the byte count as an explicit power-of-two expression, so the unit is visible where the value is.

Leave it unset when the service has no hard floor. Bear in mind that a box failing the check is not offered the package at all, so **raising the floor on an already-published package cuts existing installs below it off from further updates** — call that out in the release notes when you do it.

### Virtual Networking (VPN / kernel tun interfaces)

For services that bring up their own kernel tunnel interface — VPNs, WireGuard, or any `tun`-class workload — set `virtualNetworking: true` at the manifest top level:
Expand Down
22 changes: 12 additions & 10 deletions shared-libs/ts-modules/start-core/lib/types/ManifestTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,22 @@ export type SDKManifest = {
*/
readonly dependencies: Record<string, ManifestDependency>
/**
* @description (optional) A set of hardware requirements for this service. If the user's machine
* does not meet these requirements, they will not be able to install this service.
* @property {object[]} devices - List of required devices (display or processor).
* `pattern` refers to a regular expression that at least one device of the specified class must match
* `patternDescription` is what will be displayed to the user about what kind of device is required
* @property {number} ram - Minimum RAM requirement (in megabytes MB)
* @description (optional) A set of hardware requirements for this service. A machine that does
* not meet them is not offered this service at all — so tightening a requirement on an
* already-published package cuts hosts below it off from further updates.
* @property {object[]} device - Device filters; at least one device of the given `class` must
* match each filter. `product` and `vendor` are regular expressions (`null` matches any), and
* `description` is what the user is shown about the hardware required.
* @property {number} ram - Minimum RAM, **in bytes**, compared against the host's total RAM.
* No unit conversion is applied, so write it as a power-of-two expression: a bare `8192`
* declares 8 KiB, which every machine satisfies, and gates nothing.
* @example
* ```
hardwareRequirements: {
devices: [
{ class: 'display', pattern: 'CometLake', patternDescription: 'A CometLake (10th generation) Intel Integrated GPU' },
{ class: 'processor', pattern: 'i[3579]-10[0-9]{3}U CPU', patternDescription: 'A 10th Generation Intel i-Series processor' },
device: [
{ class: 'display', product: null, vendor: null, driver: 'nvidia', description: 'An NVIDIA GPU' },
],
ram: 8192,
ram: 8 * 1024 ** 3, // 8 GiB
},
* ```
*/
Expand Down
Loading