@archildata/api-types 0.0.78 → 0.0.79

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.
Files changed (2) hide show
  1. package/index.d.ts +61 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2030,7 +2030,7 @@ export interface components {
2030
2030
  readonly managed?: boolean;
2031
2031
  };
2032
2032
  SandboxTimeoutRequest: {
2033
- /** @description Seconds from now until a running sandbox expires, capped at 24 hours after its session started, and the lifetime budget for its next powered-on session. */
2033
+ /** @description Seconds from now until a running sandbox expires, capped at the plan's session ceiling (24 hours at most) after its session started, and the lifetime budget for its next powered-on session. Held to the plan's session ceiling and to what is left of its sandbox allowance (403). */
2034
2034
  timeout?: number;
2035
2035
  /** @description Seconds without a direct process connection before the sandbox pauses. Zero disables idle expiry. */
2036
2036
  idle_ttl_seconds?: number;
@@ -2043,7 +2043,7 @@ export interface components {
2043
2043
  status: components["schemas"]["SandboxState"];
2044
2044
  vcpu_count: number;
2045
2045
  mem_size_mib: number;
2046
- /** @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. Defaults to 24 hours. The timeout endpoint can move the deadline, but no session runs longer than 24 hours. */
2046
+ /** @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. Defaults to 24 hours, or to the longest session the plan allows; a start, resume or fork lowers a stored value the plan no longer allows. The timeout endpoint can move the deadline, but no session runs longer than 24 hours. */
2047
2047
  max_ttl_seconds: number;
2048
2048
  /** @description Seconds without a direct process connection before the sandbox pauses, preserving memory and processes for resume. Zero disables idle expiry. */
2049
2049
  idle_ttl_seconds: number;
@@ -2259,7 +2259,7 @@ export interface components {
2259
2259
  /** @description Archil disks mounted inside the guest for the first session; `start` can replace them for later sessions. Inherited by forks. A sandbox with mounts must be stopped before it can be forked. */
2260
2260
  mounts?: components["schemas"]["SandboxMount"][];
2261
2261
  /**
2262
- * @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume.
2262
+ * @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. An omitted value is lowered to the longest session the plan allows for the sandbox's size (its session ceiling, then the remaining monthly allowance); an explicit value past that is refused with 403 (`sandbox_ttl_limit_exceeded` or `allowance_insufficient`).
2263
2263
  * @default 86400
2264
2264
  */
2265
2265
  max_ttl_seconds: number;
@@ -3339,6 +3339,42 @@ export interface components {
3339
3339
  "application/json": components["schemas"]["ErrorResponse"];
3340
3340
  };
3341
3341
  };
3342
+ /**
3343
+ * @description The account's plan has used its serverless tool call allowance for
3344
+ * the month. `code` is `allowance_exhausted`; `data` carries the
3345
+ * `feature`, the `limit` the plan grants, the `remaining` balance and
3346
+ * `nextResetAt` (Unix seconds). Paid plans are never refused.
3347
+ */
3348
+ ToolCallAllowanceExhausted: {
3349
+ headers: {
3350
+ [name: string]: unknown;
3351
+ };
3352
+ content: {
3353
+ "application/json": components["schemas"]["ErrorResponse"];
3354
+ };
3355
+ };
3356
+ /**
3357
+ * @description The account's plan cannot cover this sandbox session. `code` is
3358
+ * `sandbox_ttl_limit_exceeded` (an explicit `max_ttl_seconds` is
3359
+ * longer than the plan's ceiling; `data.limit` is the ceiling in
3360
+ * minutes), `allowance_insufficient` (the session's vCPU-hours or
3361
+ * GiB-hours, allocation × timeout, exceed what is left of the month's
3362
+ * allowance; `data` carries `feature`, `limit`, `remaining`,
3363
+ * `requested` and `nextResetAt`) or `allowance_exhausted` (an
3364
+ * allowance is used up). A timeout the caller did not choose is
3365
+ * lowered to fit the plan rather than refused; a fork is judged as
3366
+ * one launch of the source's shape, and the fitted timeout applies to
3367
+ * the child and to the resumed source alike. Paid plans are never
3368
+ * refused.
3369
+ */
3370
+ SandboxPlanLimit: {
3371
+ headers: {
3372
+ [name: string]: unknown;
3373
+ };
3374
+ content: {
3375
+ "application/json": components["schemas"]["ErrorResponse"];
3376
+ };
3377
+ };
3342
3378
  };
3343
3379
  parameters: {
3344
3380
  /** @description Start of the window, inclusive: an RFC 3339 timestamp, or a YYYY-MM-DD date taken at midnight in `timezone`. Defaults to seven days (hourly: 24 hours) before `end`. Not with `for`. */
@@ -4828,6 +4864,7 @@ export interface operations {
4828
4864
  };
4829
4865
  400: components["responses"]["ValidationError"];
4830
4866
  401: components["responses"]["Unauthorized"];
4867
+ 403: components["responses"]["ToolCallAllowanceExhausted"];
4831
4868
  404: components["responses"]["NotFound"];
4832
4869
  500: components["responses"]["InternalError"];
4833
4870
  /** @description Command timed out */
@@ -4927,6 +4964,7 @@ export interface operations {
4927
4964
  };
4928
4965
  400: components["responses"]["ValidationError"];
4929
4966
  401: components["responses"]["Unauthorized"];
4967
+ 403: components["responses"]["ToolCallAllowanceExhausted"];
4930
4968
  404: components["responses"]["NotFound"];
4931
4969
  500: components["responses"]["InternalError"];
4932
4970
  /** @description Command timed out */
@@ -5125,6 +5163,7 @@ export interface operations {
5125
5163
  };
5126
5164
  400: components["responses"]["ValidationError"];
5127
5165
  401: components["responses"]["Unauthorized"];
5166
+ 403: components["responses"]["SandboxPlanLimit"];
5128
5167
  404: components["responses"]["NotFound"];
5129
5168
  /** @description The requested sandbox name already exists in the account, or the requested `image_id` has no finished build yet */
5130
5169
  409: {
@@ -5521,6 +5560,7 @@ export interface operations {
5521
5560
  };
5522
5561
  400: components["responses"]["ValidationError"];
5523
5562
  401: components["responses"]["Unauthorized"];
5563
+ 403: components["responses"]["SandboxPlanLimit"];
5524
5564
  404: components["responses"]["NotFound"];
5525
5565
  /** @description The source cannot be paused or its fork checkpoint is unavailable */
5526
5566
  409: {
@@ -5570,6 +5610,7 @@ export interface operations {
5570
5610
  };
5571
5611
  400: components["responses"]["ValidationError"];
5572
5612
  401: components["responses"]["Unauthorized"];
5613
+ 403: components["responses"]["SandboxPlanLimit"];
5573
5614
  404: components["responses"]["NotFound"];
5574
5615
  /** @description The sandbox is not paused, is shutting down, or a cold start is already in progress */
5575
5616
  409: {
@@ -5688,6 +5729,22 @@ export interface operations {
5688
5729
  };
5689
5730
  400: components["responses"]["ValidationError"];
5690
5731
  401: components["responses"]["Unauthorized"];
5732
+ /**
5733
+ * @description The account's plan cannot cover the new session timeout: it is
5734
+ * longer than the plan's ceiling (`sandbox_ttl_limit_exceeded`), or
5735
+ * the sandbox's allocation over it exceeds what is left of the
5736
+ * month's allowance (`allowance_insufficient`, `allowance_exhausted`).
5737
+ * `data` carries the `feature`, `limit`, `remaining` and
5738
+ * `nextResetAt`. Paid plans are never refused.
5739
+ */
5740
+ 403: {
5741
+ headers: {
5742
+ [name: string]: unknown;
5743
+ };
5744
+ content: {
5745
+ "application/json": components["schemas"]["ErrorResponse"];
5746
+ };
5747
+ };
5691
5748
  404: components["responses"]["NotFound"];
5692
5749
  /** @description The sandbox is transitioning or its timeout changed concurrently */
5693
5750
  409: {
@@ -5741,6 +5798,7 @@ export interface operations {
5741
5798
  };
5742
5799
  400: components["responses"]["ValidationError"];
5743
5800
  401: components["responses"]["Unauthorized"];
5801
+ 403: components["responses"]["SandboxPlanLimit"];
5744
5802
  404: components["responses"]["NotFound"];
5745
5803
  /** @description The previous VM is stopping or pausing, or a resume is already in progress */
5746
5804
  409: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.78",
3
+ "version": "0.0.79",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",