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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.8.0"
}
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [0.8.0](https://github.com/dedalus-labs/dedalus-typescript/compare/v0.7.0...v0.8.0) (2026-11-11)


### ⚠ BREAKING CHANGES

* **api:** 4 breaking changes to the SDK surface.
- Property `policy.cpu` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `policy.memory` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `autoresizing_update.cpu` type changed from `enum(on | off)` to `autoresizing_switch`.
- Property `autoresizing_update.memory` type changed from `enum(on | off)` to `autoresizing_switch`.

### Features

* **api:** share autoresizing switch type ([21f2575](https://github.com/dedalus-labs/dedalus-typescript/commit/21f2575562281cefdff05195ad8b3575d4f240d2))
* **api:** update property policy.cpu (+4 more changes) ([55b7452](https://github.com/dedalus-labs/dedalus-typescript/commit/55b7452825854b8f9fb061db253a77f3317adb6c))


### Chores

* **api:** update generated SDK content ([f92eb32](https://github.com/dedalus-labs/dedalus-typescript/commit/f92eb32ac021fbd472a09146c1c25ecba93bd818))
* **api:** update generated SDK content ([4e4b87c](https://github.com/dedalus-labs/dedalus-typescript/commit/4e4b87cba9cd6b857834ac6f2dd4ad4db4acb0d8))

## [0.7.0](https://github.com/dedalus-labs/dedalus-typescript/compare/v0.6.0...v0.7.0) (2026-11-06)


Expand Down
10 changes: 5 additions & 5 deletions generation-provenance.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"source_spec_sha": "9f8d54f123e81b8bc7252f855c52ecbf7cc8ae42",
"source_spec_sha256": "c0b2db893e3017c5c83c14375e6085581584641f617ee7ea1305ab80e9b50421",
"source_spec_sha": "f5b640b324aafb001a8da6facd807f13197630bb",
"source_spec_sha256": "a717ed108ea8bbb6b9c0b70255a07da7e9a01224c6941546089084e02097a632",
"generator_version": "0.38.0",
"build_version": "0.1.16",
"configuration_sha256": "10d2f59b8a69dce627060e1104eac425cec104dd90d3177c08a29a902cb48875",
"build_version": "0.1.19",
"configuration_sha256": "477d944077da8e1163423c505fe3f773cce14eda953aa934fe91582d04e4e915",
"operation_count": 31,
"generated_commit": "3a034582d4d7ca55b23c7d91494acff4ed16439f",
"generated_commit": "f92eb32ac021fbd472a09146c1c25ecba93bd818",
"download_sha256": null,
"integration_base": "scalar-next",
"published_package": false
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dedalus",
"version": "0.7.0",
"version": "0.8.0",
"description": "Create, run, and manage Dedalus Machines.",
"author": "Dedalus",
"repository": {
Expand Down
81 changes: 29 additions & 52 deletions scalar-sdk.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,8 @@
"required": true,
"deprecated": false,
"type": {
"kind": "enum",
"values": [
"on",
"off"
],
"names": [
"On",
"Off"
],
"deprecations": [
false,
false
]
"kind": "ref",
"name": "autoresizing_switch"
}
},
{
Expand Down Expand Up @@ -294,19 +283,8 @@
"required": true,
"deprecated": false,
"type": {
"kind": "enum",
"values": [
"on",
"off"
],
"names": [
"On",
"Off"
],
"deprecations": [
false,
false
]
"kind": "ref",
"name": "autoresizing_switch"
}
},
{
Expand Down Expand Up @@ -370,19 +348,8 @@
"required": false,
"deprecated": false,
"type": {
"kind": "enum",
"values": [
"on",
"off"
],
"names": [
"On",
"Off"
],
"deprecations": [
false,
false
]
"kind": "ref",
"name": "autoresizing_switch"
}
},
{
Expand Down Expand Up @@ -414,19 +381,8 @@
"required": false,
"deprecated": false,
"type": {
"kind": "enum",
"values": [
"on",
"off"
],
"names": [
"On",
"Off"
],
"deprecations": [
false,
false
]
"kind": "ref",
"name": "autoresizing_switch"
}
},
{
Expand Down Expand Up @@ -3180,6 +3136,27 @@
"additionalProperties": false
}
},
{
"name": "autoresizing_switch",
"source": "autoresizing_switch",
"publicAliases": [],
"deprecated": false,
"type": {
"kind": "enum",
"values": [
"on",
"off"
],
"names": [
"On",
"Off"
],
"deprecations": [
false,
false
]
}
},
{
"name": "CreateResponseHeaders",
"source": "CreateResponseHeaders",
Expand Down
9 changes: 4 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { APIPromise, type APIResponseProps } from './api-promise';
import { PagePromise, type AbstractPage, type CursorPageParams, CursorPageResponse } from './core/pagination';
import * as Pagination from './core/pagination';
import * as Errors from './error';
import { uuid4 } from './internal/utils/uuid';
import { uuid7 } from './internal/utils/uuid7';
import { validatePositiveInteger, isAbsoluteURL, safeJSON, isEmptyObj } from './internal/utils/values';
import { sleep } from './internal/utils/sleep';
import { castToError, isAbortError } from './internal/errors';
Expand Down Expand Up @@ -38,6 +38,7 @@ import {
type CreateParams,
type UpdateParams,
type LifecycleStatus,
type AutoresizingSwitch,
type MachineListItemsCursorPage,
type MachineRetrieveResponse,
type MachineResizeResponse,
Expand Down Expand Up @@ -337,10 +338,7 @@ export class Dedalus {
}

protected defaultIdempotencyKey(): string {
// @custom start
// Use the API's UUIDv7 format. Automatic retries reuse this value.
return `${Date.now().toString(16).padStart(12, '0')}7${uuid4().replace(/-/g, '').slice(13)}`;
// @custom end
return uuid7().replace(/-/g, '');
}

protected makeStatusError(
Expand Down Expand Up @@ -1200,6 +1198,7 @@ export declare namespace Dedalus {
type CreateParams as CreateParams,
type UpdateParams as UpdateParams,
type LifecycleStatus as LifecycleStatus,
type AutoresizingSwitch as AutoresizingSwitch,
type MachineListItemsCursorPage as MachineListItemsCursorPage,
type MachineRetrieveResponse as MachineRetrieveResponse,
type MachineResizeResponse as MachineResizeResponse,
Expand Down
29 changes: 29 additions & 0 deletions src/internal/utils/uuid7.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec by Scalar. See README.md for details.

/**
* A time-ordered (version 7) UUID per RFC 9562: a 48-bit Unix millisecond timestamp, then the
* version and variant bits, with every other bit random.
*/
export const uuid7 = function (): string {
const { crypto } = globalThis as any;
const bytes = new Uint8Array(16);
if (crypto?.getRandomValues) {
crypto.getRandomValues(bytes);
} else {
for (let i = 0; i < bytes.length; i++) bytes[i] = (Math.random() * 0x100) & 0xff;
}
// A clock set before 1970 writes a zero timestamp rather than wrapping to the far future.
const ms = Math.max(0, Date.now());
// Bitwise operators work on 32 bits, so the timestamp's top 16 bits are split off arithmetically.
const high = Math.floor(ms / 0x100000000);
bytes[0] = (high >>> 8) & 0xff;
bytes[1] = high & 0xff;
bytes[2] = (ms >>> 24) & 0xff;
bytes[3] = (ms >>> 16) & 0xff;
bytes[4] = (ms >>> 8) & 0xff;
bytes[5] = ms & 0xff;
bytes[6] = (bytes[6]! & 0x0f) | 0x70;
bytes[8] = (bytes[8]! & 0x3f) | 0x80;
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
};
1 change: 1 addition & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
CreateParams,
UpdateParams,
LifecycleStatus,
AutoresizingSwitch,
MachineListParams,
MachineListItemsCursorPage,
MachineCreateParams,
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
CreateParams,
UpdateParams,
LifecycleStatus,
AutoresizingSwitch,
MachineListParams,
MachineListItemsCursorPage,
MachineCreateParams,
Expand Down
9 changes: 5 additions & 4 deletions src/resources/machines/autoresizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { APIResource } from '../../resource';
import { APIPromise } from '../../api-promise';
import type { RequestOptions } from '../../internal/request-options';
import { path as __scalarPath } from '../../internal/utils/path';
import type * as MachinesAPI from './machines';

export class Autoresizing extends APIResource {
/**
Expand Down Expand Up @@ -49,7 +50,7 @@ export interface Policy {
/**
* Permit automatic CPU growth independently of RAM.
*/
cpu: 'on' | 'off';
cpu: MachinesAPI.AutoresizingSwitch;
cpu_limit_source: 'plan' | 'configured' | 'platform';
/**
* Configured CPU growth limit in 0.25-vCPU steps. Null uses the plan limit.
Expand All @@ -74,7 +75,7 @@ export interface Policy {
/**
* Permit automatic RAM growth. Automatic shrink remains internal.
*/
memory: 'on' | 'off';
memory: MachinesAPI.AutoresizingSwitch;
memory_limit_source: 'plan' | 'configured' | 'platform';
/**
* Configured RAM growth limit in MiB. Null uses the plan limit.
Expand Down Expand Up @@ -104,7 +105,7 @@ export interface AutoresizingUpdateParams {
/**
* Body param
*/
cpu?: 'on' | 'off';
cpu?: MachinesAPI.AutoresizingSwitch;
/**
* Body param
* @format double
Expand All @@ -115,7 +116,7 @@ export interface AutoresizingUpdateParams {
/**
* Body param
*/
memory?: 'on' | 'off';
memory?: MachinesAPI.AutoresizingSwitch;
/**
* Body param
* @format int64
Expand Down
1 change: 1 addition & 0 deletions src/resources/machines/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
CreateParams,
UpdateParams,
LifecycleStatus,
AutoresizingSwitch,
MachineListParams,
MachineListItemsCursorPage,
MachineCreateParams,
Expand Down
3 changes: 3 additions & 0 deletions src/resources/machines/machines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ export namespace LifecycleStatus {
}
}

export type AutoresizingSwitch = 'on' | 'off';

export interface MachineListParams extends CursorPageParams {}

export type MachineListItemsCursorPage = CursorPage<MachineListItem>;
Expand Down Expand Up @@ -640,6 +642,7 @@ export declare namespace Machines {
type CreateParams as CreateParams,
type UpdateParams as UpdateParams,
type LifecycleStatus as LifecycleStatus,
type AutoresizingSwitch as AutoresizingSwitch,
type MachineListItemsCursorPage as MachineListItemsCursorPage,
type MachineRetrieveResponse as MachineRetrieveResponse,
type MachineResizeResponse as MachineResizeResponse,
Expand Down
9 changes: 5 additions & 4 deletions src/resources/organization/autoresizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { APIResource } from '../../resource';
import { APIPromise } from '../../api-promise';
import type { RequestOptions } from '../../internal/request-options';
import type * as MachinesAPI from '../machines/machines';

export class Autoresizing extends APIResource {
/**
Expand Down Expand Up @@ -41,7 +42,7 @@ export interface Policy {
/**
* Permit automatic CPU growth independently of RAM.
*/
cpu: 'on' | 'off';
cpu: MachinesAPI.AutoresizingSwitch;
cpu_limit_source: 'plan' | 'configured' | 'platform';
/**
* Configured CPU growth limit in 0.25-vCPU steps. Null uses the plan limit.
Expand All @@ -66,7 +67,7 @@ export interface Policy {
/**
* Permit automatic RAM growth. Automatic shrink remains internal.
*/
memory: 'on' | 'off';
memory: MachinesAPI.AutoresizingSwitch;
memory_limit_source: 'plan' | 'configured' | 'platform';
/**
* Configured RAM growth limit in MiB. Null uses the plan limit.
Expand All @@ -76,14 +77,14 @@ export interface Policy {
}

export interface AutoresizingUpdateParams {
cpu?: 'on' | 'off';
cpu?: MachinesAPI.AutoresizingSwitch;
/**
* @format double
* @minimum 0.25
* @multipleOf 0.25
*/
cpu_max_vcpu?: number | null;
memory?: 'on' | 'off';
memory?: MachinesAPI.AutoresizingSwitch;
/**
* @format int64
* @minimum 256
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// File generated from our OpenAPI spec by Scalar. See README.md for details.

export const VERSION = '0.7.0'; // x-release-please-version
export const VERSION = '0.8.0'; // x-release-please-version
Loading