@lightspeed-ai/sdk 0.4.0 → 0.5.1

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.
@@ -180,7 +180,7 @@ export type ToolItemStatus =
180
180
  * via the `definition` "ToolCallDisplayGroup".
181
181
  */
182
182
  export type ToolCallDisplayGroup =
183
- "other" | "explore" | "edit" | "execute" | "mcp" | "agent" | "bot" | "message";
183
+ "other" | "explore" | "edit" | "execute" | "code" | "mcp" | "agent" | "bot" | "message";
184
184
  /**
185
185
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
186
186
  * via the `definition` "ContextEntryKindView".
@@ -802,6 +802,13 @@ export type SessionEventKindView =
802
802
  runId: string;
803
803
  turnId: string;
804
804
  type: "toolBatchCompleted";
805
+ }
806
+ | {
807
+ executionId: string;
808
+ phase: CodeToolProgressPhase;
809
+ requestId?: string | null;
810
+ status?: ToolItemStatus | null;
811
+ type: "codeToolProgress";
805
812
  };
806
813
  /**
807
814
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -837,6 +844,14 @@ export type RunFailureKindView =
837
844
  * via the `definition` "ToolAttachmentKind".
838
845
  */
839
846
  export type ToolAttachmentKind = "media" | "file";
847
+ /**
848
+ * Bounded lifecycle telemetry for a session-owned code tool execution.
849
+ *
850
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
851
+ * via the `definition` "CodeToolProgressPhase".
852
+ */
853
+ export type CodeToolProgressPhase =
854
+ "scopeOpened" | "callAdmitted" | "callDeferred" | "callCompleted" | "scopeClosed";
840
855
  /**
841
856
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
842
857
  * via the `definition` "RunViewSource".
@@ -1340,8 +1355,10 @@ export type MethodGroup =
1340
1355
  | "bots"
1341
1356
  | "deployment/universes"
1342
1357
  | "deployment/api-keys"
1358
+ | "deployment/sessions"
1343
1359
  )
1344
1360
  | "session"
1361
+ | "session/delete"
1345
1362
  | "blobs/put"
1346
1363
  | "environments"
1347
1364
  | "channels"
@@ -1351,86 +1368,116 @@ export type MethodGroup =
1351
1368
  | "deployment/environment-providers"
1352
1369
  | "deployment/channels";
1353
1370
  /**
1354
- * Steady power state of a provisioned environment.
1371
+ * Why an environment is closing or closed.
1355
1372
  *
1356
1373
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1357
- * via the `definition` "EnvironmentPowerStateView".
1374
+ * via the `definition` "EnvironmentCloseReasonView".
1358
1375
  */
1359
- export type EnvironmentPowerStateView = "running" | "paused" | "suspended" | "stopped";
1376
+ export type EnvironmentCloseReasonView =
1377
+ "requested" | "keyRevoked" | "ephemeralGrace" | "departed" | "offlineTimeout" | "providerEnded";
1360
1378
  /**
1361
1379
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1362
1380
  * via the `definition` "EnvironmentSourceView".
1363
1381
  */
1364
1382
  export type EnvironmentSourceView =
1365
1383
  | {
1366
- bindingId: string;
1384
+ /**
1385
+ * The create-time idle policy, when one replaced the template's.
1386
+ */
1387
+ idle?: EnvironmentIdlePolicyView | null;
1388
+ /**
1389
+ * Absent until the provider first reported the target.
1390
+ */
1391
+ observed?: EnvironmentObservedTargetView | null;
1367
1392
  providerId: string;
1393
+ /**
1394
+ * The public endpoint the provider last reported.
1395
+ */
1396
+ publicEndpoint?: string | null;
1397
+ /**
1398
+ * The provider's handle for the target; absent until the provider
1399
+ * accepted the create.
1400
+ */
1401
+ targetId?: string | null;
1402
+ templateId: string;
1368
1403
  type: "provisioned";
1369
1404
  }
1370
1405
  | {
1371
- connection: EnvironmentConnectionView;
1406
+ /**
1407
+ * `ws://`, `wss://` or `unix://` URL Lightspeed dials envd at.
1408
+ */
1409
+ endpoint: string;
1372
1410
  type: "external";
1373
1411
  }
1374
1412
  | {
1413
+ /**
1414
+ * The daemon's control connection is up.
1415
+ */
1416
+ connected: boolean;
1417
+ /**
1418
+ * When the daemon last connected or disconnected.
1419
+ */
1420
+ connectionChangedAtMs: number;
1375
1421
  daemonId: string;
1422
+ /**
1423
+ * The admitting key's identity mode.
1424
+ */
1376
1425
  identityMode: EnvironmentIdentityModeView;
1426
+ /**
1427
+ * When the gateway last recorded the daemon's control connection:
1428
+ * at connect, at disconnect, and at most every five minutes while
1429
+ * connected.
1430
+ */
1431
+ lastSeenAtMs: number;
1377
1432
  registrationKeyId: string;
1378
1433
  type: "registered";
1379
1434
  };
1380
1435
  /**
1436
+ * Lifecycle phase of a provider target, as the provider reports it.
1437
+ *
1381
1438
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1382
- * via the `definition` "EnvironmentConnectionTransportView".
1439
+ * via the `definition` "EnvironmentTargetPhaseView".
1383
1440
  */
1384
- export type EnvironmentConnectionTransportView =
1385
- | ("webSocket" | "http" | "stdio" | "ssh")
1386
- | {
1387
- provider: {
1388
- provider_type: string;
1389
- };
1390
- };
1441
+ export type EnvironmentTargetPhaseView =
1442
+ "provisioning" | "active" | "closing" | "closed" | "failed" | "unknown";
1391
1443
  /**
1392
- * What Lightspeed does with a registered environment while its daemon is
1393
- * disconnected. Registration-key policy, copied onto each environment.
1444
+ * Power state of a provisioned environment's target.
1394
1445
  *
1395
1446
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1396
- * via the `definition` "EnvironmentIdentityModeView".
1447
+ * via the `definition` "EnvironmentPowerStateView".
1397
1448
  */
1398
- export type EnvironmentIdentityModeView = "persistent" | "ephemeral";
1449
+ export type EnvironmentPowerStateView = "running" | "paused" | "suspended" | "stopped";
1399
1450
  /**
1451
+ * What happens to a registered environment while its daemon is
1452
+ * disconnected. Policy of the registration key that admitted it.
1453
+ *
1400
1454
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1401
- * via the `definition` "EnvironmentLifecycleStatusView".
1455
+ * via the `definition` "EnvironmentIdentityModeView".
1402
1456
  */
1403
- export type EnvironmentLifecycleStatusView =
1404
- | ("provisioning" | "booting" | "ready" | "closing" | "closed" | "failed" | "unknown")
1405
- | "paused"
1406
- | "suspended"
1407
- | "offline";
1457
+ export type EnvironmentIdentityModeView = "persistent" | "ephemeral";
1408
1458
  /**
1459
+ * The lifecycle Lightspeed owns. External and registered environments are
1460
+ * only ever `open` or `closed`.
1461
+ *
1409
1462
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1410
- * via the `definition` "DeploymentEnvironmentProviderTransport".
1463
+ * via the `definition` "EnvironmentStateView".
1411
1464
  */
1412
- export type DeploymentEnvironmentProviderTransport =
1413
- | {
1414
- type: "webSocket";
1415
- }
1416
- | {
1417
- type: "http";
1418
- }
1419
- | {
1420
- type: "stdio";
1421
- }
1422
- | {
1423
- type: "ssh";
1424
- }
1425
- | {
1426
- providerType: string;
1427
- type: "provider";
1428
- };
1465
+ export type EnvironmentStateView = ("open" | "closed") | "provisioning" | "closing" | "failed";
1429
1466
  /**
1467
+ * Display status derived from `state` and the latest observation; never
1468
+ * stored. Tools that use a paused, suspended or stopped environment wake
1469
+ * it.
1470
+ *
1430
1471
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1431
- * via the `definition` "EnvironmentProviderBindingStatusView".
1472
+ * via the `definition` "EnvironmentStatusView".
1432
1473
  */
1433
- export type EnvironmentProviderBindingStatusView = "enabled" | "disabled";
1474
+ export type EnvironmentStatusView =
1475
+ | ("provisioning" | "ready" | "closing" | "closed" | "failed")
1476
+ | "paused"
1477
+ | "suspended"
1478
+ | "stopped"
1479
+ | "unknown"
1480
+ | "away";
1434
1481
  /**
1435
1482
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1436
1483
  * via the `definition` "EnvironmentCredentialSourceView".
@@ -1449,26 +1496,53 @@ export type EnvironmentCredentialSourceView =
1449
1496
  type: "directSecret";
1450
1497
  };
1451
1498
  /**
1499
+ * How a job's root process ended.
1500
+ *
1501
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1502
+ * via the `definition` "SessionJobExitView".
1503
+ */
1504
+ export type SessionJobExitView =
1505
+ | {
1506
+ code: number;
1507
+ type: "code";
1508
+ }
1509
+ | {
1510
+ coreDumped?: boolean;
1511
+ signal: string;
1512
+ type: "signal";
1513
+ };
1514
+ /**
1515
+ * Job lifecycle. `queued` and `running` are live; the rest are terminal.
1516
+ *
1452
1517
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1453
1518
  * via the `definition` "SessionJobStatusView".
1454
1519
  */
1455
1520
  export type SessionJobStatusView =
1456
- | "accepted"
1457
- | "queued"
1458
1521
  | "running"
1522
+ | "queued"
1459
1523
  | "succeeded"
1460
1524
  | "failed"
1461
- | "cancelRequested"
1462
- | "cancelled"
1463
1525
  | "timedOut"
1526
+ | "cancelled"
1464
1527
  | "dependencyFailed"
1465
- | "interrupted"
1466
- | "lost";
1528
+ | "interrupted";
1529
+ /**
1530
+ * Why Lightspeed stopped a running job.
1531
+ *
1532
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1533
+ * via the `definition` "SessionJobStoppedByView".
1534
+ */
1535
+ export type SessionJobStoppedByView = "timeout" | "terminate" | "kill";
1467
1536
  /**
1468
1537
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1469
1538
  * via the `definition` "SessionJobOutputStreamView".
1470
1539
  */
1471
1540
  export type SessionJobOutputStreamView = "stdout" | "stderr";
1541
+ /**
1542
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1543
+ * via the `definition` "SessionJobOutputGapReasonView".
1544
+ */
1545
+ export type SessionJobOutputGapReasonView = "overflow" | "expired";
1472
1546
  /**
1473
1547
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
1474
1548
  * via the `definition` "EnvironmentRegistrationKeyStatusView".
@@ -1817,8 +1891,11 @@ export type UniverseAction =
1817
1891
  | "read"
1818
1892
  | "create_session"
1819
1893
  | "control_session"
1894
+ | "configure_session"
1820
1895
  | "stop_session"
1896
+ | "close_session"
1821
1897
  | "delete_session"
1898
+ | "set_session_retention"
1822
1899
  | "create_profile"
1823
1900
  | "manage_profile"
1824
1901
  | "create_bot"
@@ -2247,6 +2324,7 @@ export interface ContextConfig {
2247
2324
  * via the `definition` "FeaturesConfig".
2248
2325
  */
2249
2326
  export interface FeaturesConfig {
2327
+ codeMode?: CodeModeFeature | null;
2250
2328
  environments?: EnvironmentsFeature | null;
2251
2329
  mcp?: McpFeature | null;
2252
2330
  subagents?: SubagentsFeature | null;
@@ -2254,6 +2332,64 @@ export interface FeaturesConfig {
2254
2332
  vfs?: VfsFeature | null;
2255
2333
  web?: WebFeature | null;
2256
2334
  }
2335
+ /**
2336
+ * Grants JavaScript composition through `code_execute`. Available script tools
2337
+ * are the session's ordinary callable tools, optionally narrowed by allowedTools.
2338
+ * TypeScript, ambient filesystem/network access, and recursive code execution
2339
+ * are unavailable. An empty allowedTools list grants pure computation only.
2340
+ *
2341
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
2342
+ * via the `definition` "CodeModeFeature".
2343
+ */
2344
+ export interface CodeModeFeature {
2345
+ /**
2346
+ * Logical tool ids (for example vfs.read_file), not provider wire names.
2347
+ * Absent permits every currently callable grant; an empty list permits none.
2348
+ */
2349
+ allowedTools?: string[] | null;
2350
+ /**
2351
+ * Pinned callable catalog bytes, at most 8 MiB.
2352
+ */
2353
+ maxCatalogBytes?: number;
2354
+ /**
2355
+ * Interpreter heap, at most 512 MiB.
2356
+ */
2357
+ maxMemoryBytes?: number;
2358
+ /**
2359
+ * Combined text() output and return value, at most 8 MiB.
2360
+ */
2361
+ maxOutputBytes?: number;
2362
+ /**
2363
+ * Concurrent pending calls, at most 64 and no greater than maxToolCalls.
2364
+ */
2365
+ maxOutstandingToolCalls?: number;
2366
+ /**
2367
+ * Serialized arguments per tool request, at most 8 MiB.
2368
+ */
2369
+ maxRequestBytes?: number;
2370
+ /**
2371
+ * Serialized completion per tool request, at most 8 MiB.
2372
+ */
2373
+ maxResultBytes?: number;
2374
+ /**
2375
+ * UTF-8 source bytes, at most 1 MiB.
2376
+ */
2377
+ maxSourceBytes?: number;
2378
+ /**
2379
+ * Interpreter native stack, at most 8 MiB.
2380
+ */
2381
+ maxStackBytes?: number;
2382
+ /**
2383
+ * Calls per script, at most 1,024.
2384
+ */
2385
+ maxToolCalls?: number;
2386
+ /**
2387
+ * Total attempt time including input loading, interpreter capacity waits,
2388
+ * JavaScript evaluation, and tool waits; at most 600,000 milliseconds.
2389
+ */
2390
+ timeoutMs?: number;
2391
+ version?: number;
2392
+ }
2257
2393
  /**
2258
2394
  * Grants session environments. The `environments` list is the allowed set:
2259
2395
  * the session can select, read, and run work only on a listed machine, each
@@ -4600,86 +4736,28 @@ export interface DeploymentChannelAccountView {
4600
4736
  }
4601
4737
  /**
4602
4738
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4603
- * via the `definition` "AgentApiOutcomeOfDeploymentEnvironmentAdoptResponse".
4739
+ * via the `definition` "AgentApiOutcomeOfDeploymentDeletedSessionsListResponse".
4604
4740
  */
4605
- export interface AgentApiOutcomeOfDeploymentEnvironmentAdoptResponse {
4741
+ export interface AgentApiOutcomeOfDeploymentDeletedSessionsListResponse {
4606
4742
  notifications?: AgentNotification[];
4607
- result: DeploymentEnvironmentAdoptResponse;
4743
+ result: DeploymentDeletedSessionsListResponse;
4608
4744
  }
4609
4745
  /**
4610
4746
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4611
- * via the `definition` "DeploymentEnvironmentAdoptResponse".
4747
+ * via the `definition` "DeploymentDeletedSessionsListResponse".
4612
4748
  */
4613
- export interface DeploymentEnvironmentAdoptResponse {
4614
- environment: EnvironmentView;
4749
+ export interface DeploymentDeletedSessionsListResponse {
4750
+ nextAfter?: string | null;
4751
+ sessions: DeletedSessionView[];
4615
4752
  }
4616
4753
  /**
4617
4754
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4618
- * via the `definition` "EnvironmentView".
4755
+ * via the `definition` "DeletedSessionView".
4619
4756
  */
4620
- export interface EnvironmentView {
4621
- createdAtMs: number;
4622
- /**
4623
- * Lightspeed-owned power intent; `status` is the observed state.
4624
- */
4625
- desiredPower: EnvironmentPowerStateView;
4757
+ export interface DeletedSessionView {
4758
+ deletedAtMs: number;
4626
4759
  displayName?: string | null;
4627
- environmentId: string;
4628
- idlePolicy?: EnvironmentIdlePolicyView | null;
4629
- incarnation: EnvironmentIncarnationView;
4630
- /**
4631
- * Registered environments only: when the gateway last saw the daemon's
4632
- * control connection.
4633
- */
4634
- lastSeenAtMs?: number | null;
4635
- metadata?: {
4636
- [k: string]: string;
4637
- };
4638
- publicEndpoint?: string | null;
4639
- publicIngressEnabled: boolean;
4640
- requestId: string;
4641
- source: EnvironmentSourceView;
4642
- status: EnvironmentLifecycleStatusView;
4643
- updatedAtMs: number;
4644
- }
4645
- /**
4646
- * Staged idle policy. Thresholds are milliseconds of daemon-reported idle
4647
- * time and must be non-decreasing in the order pause, suspend, stop, close.
4648
- * Stages whose power state the provider does not support are skipped.
4649
- *
4650
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4651
- * via the `definition` "EnvironmentIdlePolicyView".
4652
- */
4653
- export interface EnvironmentIdlePolicyView {
4654
- closeAfterMs?: number | null;
4655
- pauseAfterMs?: number | null;
4656
- stopAfterMs?: number | null;
4657
- suspendAfterMs?: number | null;
4658
- }
4659
- /**
4660
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4661
- * via the `definition` "EnvironmentIncarnationView".
4662
- */
4663
- export interface EnvironmentIncarnationView {
4664
- createdAtMs: number;
4665
- incarnationId: string;
4666
- /**
4667
- * Power states the provider reported for this target; empty until
4668
- * observed or when the provider offers no power control.
4669
- */
4670
- powerStates?: EnvironmentPowerStateView[];
4671
- providerTargetId?: string | null;
4672
- provisionRequestId?: string | null;
4673
- templateId?: string | null;
4674
- updatedAtMs: number;
4675
- }
4676
- /**
4677
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4678
- * via the `definition` "EnvironmentConnectionView".
4679
- */
4680
- export interface EnvironmentConnectionView {
4681
- endpoint: string;
4682
- transport: EnvironmentConnectionTransportView;
4760
+ sessionId: string;
4683
4761
  }
4684
4762
  /**
4685
4763
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -4701,23 +4779,31 @@ export interface DeploymentEnvironmentProviderDeleteResponse {
4701
4779
  * via the `definition` "DeploymentEnvironmentProviderView".
4702
4780
  */
4703
4781
  export interface DeploymentEnvironmentProviderView {
4704
- controllerConnection: DeploymentEnvironmentProviderConnection;
4782
+ /**
4783
+ * `ws://`, `wss://` or `unix://` URL of the provider controller.
4784
+ */
4785
+ controllerEndpoint: string;
4705
4786
  createdAtMs: number;
4787
+ /**
4788
+ * Operator-configured `ws://` or `wss://` base of the provider's data
4789
+ * routes; absent derives it from the controller endpoint.
4790
+ */
4791
+ dataRouteBase?: string | null;
4706
4792
  displayName?: string | null;
4707
- metadata?: {
4708
- [k: string]: string;
4709
- };
4793
+ /**
4794
+ * The data route base Lightspeed dials: `dataRouteBase`, or the
4795
+ * controller endpoint's origin followed by `/routes`. Absent only when it
4796
+ * cannot be derived.
4797
+ */
4798
+ effectiveDataRouteBase?: string | null;
4799
+ /**
4800
+ * A bearer credential is stored and presented to the controller and
4801
+ * data routes; without one no `Authorization` header is sent.
4802
+ */
4803
+ hasCredential: boolean;
4710
4804
  providerId: string;
4711
4805
  updatedAtMs: number;
4712
4806
  }
4713
- /**
4714
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4715
- * via the `definition` "DeploymentEnvironmentProviderConnection".
4716
- */
4717
- export interface DeploymentEnvironmentProviderConnection {
4718
- endpoint: string;
4719
- transport: DeploymentEnvironmentProviderTransport;
4720
- }
4721
4807
  /**
4722
4808
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4723
4809
  * via the `definition` "AgentApiOutcomeOfDeploymentEnvironmentProviderListResponse".
@@ -4779,18 +4865,16 @@ export interface DeploymentProviderBindingDeleteResponse {
4779
4865
  binding: EnvironmentProviderBindingView;
4780
4866
  }
4781
4867
  /**
4868
+ * A universe's binding to a deployment provider. Creates, templates and
4869
+ * data routes of the provider need it enabled.
4870
+ *
4782
4871
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4783
4872
  * via the `definition` "EnvironmentProviderBindingView".
4784
4873
  */
4785
4874
  export interface EnvironmentProviderBindingView {
4786
- bindingId: string;
4787
4875
  createdAtMs: number;
4788
- metadata?: {
4789
- [k: string]: string;
4790
- };
4876
+ enabled: boolean;
4791
4877
  providerId: string;
4792
- revision: number;
4793
- status: EnvironmentProviderBindingStatusView;
4794
4878
  updatedAtMs: number;
4795
4879
  }
4796
4880
  /**
@@ -4808,6 +4892,25 @@ export interface AgentApiOutcomeOfDeploymentProviderBindingPutResponse {
4808
4892
  export interface DeploymentProviderBindingPutResponse {
4809
4893
  binding: EnvironmentProviderBindingView;
4810
4894
  }
4895
+ /**
4896
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4897
+ * via the `definition` "AgentApiOutcomeOfDeploymentSessionPurgeResponse".
4898
+ */
4899
+ export interface AgentApiOutcomeOfDeploymentSessionPurgeResponse {
4900
+ notifications?: AgentNotification[];
4901
+ result: DeploymentSessionPurgeResponse;
4902
+ }
4903
+ /**
4904
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4905
+ * via the `definition` "DeploymentSessionPurgeResponse".
4906
+ */
4907
+ export interface DeploymentSessionPurgeResponse {
4908
+ /**
4909
+ * Includes soft-deleted history forks and delegated descendants.
4910
+ * Empty when the target has already been permanently deleted.
4911
+ */
4912
+ deletedSessionIds: string[];
4913
+ }
4811
4914
  /**
4812
4915
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4813
4916
  * via the `definition` "AgentApiOutcomeOfDeploymentUniverseCreateResponse".
@@ -4920,6 +5023,92 @@ export interface AgentApiOutcomeOfEnvironmentCloseResponse {
4920
5023
  export interface EnvironmentCloseResponse {
4921
5024
  environment: EnvironmentView;
4922
5025
  }
5026
+ /**
5027
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5028
+ * via the `definition` "EnvironmentView".
5029
+ */
5030
+ export interface EnvironmentView {
5031
+ /**
5032
+ * Present exactly while `state` is `closing` or `closed`.
5033
+ */
5034
+ closeReason?: EnvironmentCloseReasonView | null;
5035
+ closedAtMs?: number | null;
5036
+ createdAtMs: number;
5037
+ /**
5038
+ * The envd build serving the environment; absent until known.
5039
+ */
5040
+ daemon?: EnvironmentDaemonView | null;
5041
+ displayName?: string | null;
5042
+ environmentId: string;
5043
+ /**
5044
+ * Caller metadata.
5045
+ */
5046
+ metadata?: {
5047
+ [k: string]: string;
5048
+ };
5049
+ /**
5050
+ * The caller's retry identity; absent for registered environments.
5051
+ */
5052
+ requestId?: string | null;
5053
+ source: EnvironmentSourceView;
5054
+ state: EnvironmentStateView;
5055
+ /**
5056
+ * When `state` last changed.
5057
+ */
5058
+ stateChangedAtMs: number;
5059
+ /**
5060
+ * Why the environment failed, or what provisioning or closing is
5061
+ * waiting on.
5062
+ */
5063
+ stateMessage?: string | null;
5064
+ status: EnvironmentStatusView;
5065
+ updatedAtMs: number;
5066
+ }
5067
+ /**
5068
+ * The envd build serving an environment, from its registration or
5069
+ * Lightspeed's open handshake.
5070
+ *
5071
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5072
+ * via the `definition` "EnvironmentDaemonView".
5073
+ */
5074
+ export interface EnvironmentDaemonView {
5075
+ gitSha?: string | null;
5076
+ protocolVersion: number;
5077
+ version?: string | null;
5078
+ }
5079
+ /**
5080
+ * Staged idle policy the provider applies. Thresholds are milliseconds of
5081
+ * envd-reported idle time (running processes, jobs and leftover process
5082
+ * groups hold it at zero) and must be non-decreasing in the order pause,
5083
+ * suspend, stop, close. Stages whose power state the template does not
5084
+ * support are skipped.
5085
+ *
5086
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5087
+ * via the `definition` "EnvironmentIdlePolicyView".
5088
+ */
5089
+ export interface EnvironmentIdlePolicyView {
5090
+ closeAfterMs?: number | null;
5091
+ pauseAfterMs?: number | null;
5092
+ stopAfterMs?: number | null;
5093
+ suspendAfterMs?: number | null;
5094
+ }
5095
+ /**
5096
+ * What the provider last reported about a provisioned environment's
5097
+ * target. Display only: Lightspeed never converges it, and it may be up to
5098
+ * a few minutes old.
5099
+ *
5100
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5101
+ * via the `definition` "EnvironmentObservedTargetView".
5102
+ */
5103
+ export interface EnvironmentObservedTargetView {
5104
+ message?: string | null;
5105
+ observedAtMs: number;
5106
+ phase: EnvironmentTargetPhaseView;
5107
+ /**
5108
+ * Present only while `phase` is `active`.
5109
+ */
5110
+ power?: EnvironmentPowerStateView | null;
5111
+ }
4923
5112
  /**
4924
5113
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
4925
5114
  * via the `definition` "AgentApiOutcomeOfEnvironmentCreateResponse".
@@ -5006,21 +5195,6 @@ export interface AgentApiOutcomeOfEnvironmentExternalCreateResponse {
5006
5195
  export interface EnvironmentExternalCreateResponse {
5007
5196
  environment: EnvironmentView;
5008
5197
  }
5009
- /**
5010
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5011
- * via the `definition` "AgentApiOutcomeOfEnvironmentIdlePolicyPutResponse".
5012
- */
5013
- export interface AgentApiOutcomeOfEnvironmentIdlePolicyPutResponse {
5014
- notifications?: AgentNotification[];
5015
- result: EnvironmentIdlePolicyPutResponse;
5016
- }
5017
- /**
5018
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5019
- * via the `definition` "EnvironmentIdlePolicyPutResponse".
5020
- */
5021
- export interface EnvironmentIdlePolicyPutResponse {
5022
- environment: EnvironmentView;
5023
- }
5024
5198
  /**
5025
5199
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5026
5200
  * via the `definition` "AgentApiOutcomeOfEnvironmentIngressPutResponse".
@@ -5069,18 +5243,31 @@ export interface SessionJobHandleView {
5069
5243
  jobId: string;
5070
5244
  }
5071
5245
  /**
5246
+ * What a job is and how it ended. Instants are the environment's wall
5247
+ * clock.
5248
+ *
5072
5249
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5073
5250
  * via the `definition` "SessionJobSummaryView".
5074
5251
  */
5075
5252
  export interface SessionJobSummaryView {
5253
+ /**
5254
+ * When a cancel reached the job while it ran.
5255
+ */
5256
+ cancelRequestedAtMs?: number | null;
5076
5257
  createdAtMs: number;
5077
5258
  dependencies?: string[];
5078
- exitCode?: number | null;
5259
+ /**
5260
+ * Run time from start to finish, immune to clock jumps.
5261
+ */
5262
+ durationMs?: number | null;
5263
+ /**
5264
+ * How the job's root process ended, once it ran and exited.
5265
+ */
5266
+ exit?: SessionJobExitView | null;
5079
5267
  failure?: string | null;
5080
5268
  finishedAtMs?: number | null;
5081
5269
  jobId: string;
5082
5270
  name?: string | null;
5083
- namespace: string;
5084
5271
  /**
5085
5272
  * True when the job's root process exited while descendants it spawned
5086
5273
  * were still running; the host terminated them best-effort at job
@@ -5089,8 +5276,16 @@ export interface SessionJobSummaryView {
5089
5276
  orphanedDescendants?: boolean;
5090
5277
  queueKey?: string | null;
5091
5278
  queuedAtMs?: number | null;
5279
+ /**
5280
+ * The start request that created the job; part of its identity.
5281
+ */
5282
+ requestId: string;
5092
5283
  startedAtMs?: number | null;
5093
5284
  status: SessionJobStatusView;
5285
+ /**
5286
+ * Set when Lightspeed stopped the running job.
5287
+ */
5288
+ stoppedBy?: SessionJobStoppedByView | null;
5094
5289
  }
5095
5290
  /**
5096
5291
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -5138,37 +5333,59 @@ export interface EnvironmentJobReadResponse {
5138
5333
  jobs?: SessionJobReadEntryView[];
5139
5334
  }
5140
5335
  /**
5336
+ * One job's summary and output page, or why it could not be read: an
5337
+ * entry with `error` and no summary names a job the environment does not
5338
+ * know (never created, or garbage-collected).
5339
+ *
5141
5340
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5142
5341
  * via the `definition` "SessionJobReadEntryView".
5143
5342
  */
5144
5343
  export interface SessionJobReadEntryView {
5145
- artifacts?: SessionJobArtifactView[];
5146
5344
  error?: string | null;
5147
5345
  handle?: SessionJobHandleView | null;
5346
+ /**
5347
+ * Output in offset order.
5348
+ */
5148
5349
  outputChunks?: SessionJobOutputChunkView[];
5149
- outputNextSeq: number;
5350
+ /**
5351
+ * Output bytes the job produced so far; final once it is terminal.
5352
+ */
5353
+ outputEnd: number;
5354
+ /**
5355
+ * Output ranges between the requested start and `outputNext` that
5356
+ * cannot be returned.
5357
+ */
5358
+ outputGaps?: SessionJobOutputGapView[];
5359
+ /**
5360
+ * Byte offset to continue reading from: pass it as `after`.
5361
+ */
5362
+ outputNext: number;
5150
5363
  summary?: SessionJobSummaryView | null;
5151
5364
  }
5152
- /**
5153
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5154
- * via the `definition` "SessionJobArtifactView".
5155
- */
5156
- export interface SessionJobArtifactView {
5157
- kind?: string | null;
5158
- metadata?: {
5159
- [k: string]: string;
5160
- };
5161
- path: string;
5162
- }
5163
5365
  /**
5164
5366
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5165
5367
  * via the `definition` "SessionJobOutputChunkView".
5166
5368
  */
5167
5369
  export interface SessionJobOutputChunkView {
5168
5370
  dataBase64: string;
5169
- seq: number;
5371
+ /**
5372
+ * Byte offset of the chunk's first byte in the job's combined output.
5373
+ */
5374
+ offset: number;
5170
5375
  stream: SessionJobOutputStreamView;
5171
5376
  }
5377
+ /**
5378
+ * Output bytes in `[offset, offset + omittedBytes)` that cannot be
5379
+ * returned.
5380
+ *
5381
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5382
+ * via the `definition` "SessionJobOutputGapView".
5383
+ */
5384
+ export interface SessionJobOutputGapView {
5385
+ offset: number;
5386
+ omittedBytes: number;
5387
+ reason: SessionJobOutputGapReasonView;
5388
+ }
5172
5389
  /**
5173
5390
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5174
5391
  * via the `definition` "AgentApiOutcomeOfEnvironmentListResponse".
@@ -5182,7 +5399,14 @@ export interface AgentApiOutcomeOfEnvironmentListResponse {
5182
5399
  * via the `definition` "EnvironmentListResponse".
5183
5400
  */
5184
5401
  export interface EnvironmentListResponse {
5402
+ /**
5403
+ * Environments in environment id order.
5404
+ */
5185
5405
  environments?: EnvironmentView[];
5406
+ /**
5407
+ * Pass as `after` to read the next page; absent on the last page.
5408
+ */
5409
+ nextAfter?: string | null;
5186
5410
  }
5187
5411
  /**
5188
5412
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -5284,11 +5508,16 @@ export interface EnvironmentRegistrationKeyView {
5284
5508
  expiresAtMs?: number | null;
5285
5509
  identityMode: EnvironmentIdentityModeView;
5286
5510
  /**
5287
- * First characters of the secret, for identification only.
5511
+ * First characters of the key's live secret, for identification only.
5288
5512
  */
5289
5513
  keyPrefix: string;
5290
5514
  lastRegisteredAtMs?: number | null;
5291
5515
  maxActiveEnvironments?: number | null;
5516
+ /**
5517
+ * Persistent keys only: environments whose daemon has been away longer
5518
+ * than this are closed; absent keeps them open.
5519
+ */
5520
+ offlineCloseAfterMs?: number | null;
5292
5521
  /**
5293
5522
  * Environments ever admitted by this key, closed included.
5294
5523
  */
@@ -5296,6 +5525,7 @@ export interface EnvironmentRegistrationKeyView {
5296
5525
  registrationKeyId: string;
5297
5526
  revokedAtMs?: number | null;
5298
5527
  status: EnvironmentRegistrationKeyStatusView;
5528
+ updatedAtMs: number;
5299
5529
  }
5300
5530
  /**
5301
5531
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -5346,6 +5576,40 @@ export interface EnvironmentRegistrationKeyRevokeResponse {
5346
5576
  closedEnvironmentIds?: string[];
5347
5577
  registrationKey: EnvironmentRegistrationKeyView;
5348
5578
  }
5579
+ /**
5580
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5581
+ * via the `definition` "AgentApiOutcomeOfEnvironmentRegistrationKeyRotateResponse".
5582
+ */
5583
+ export interface AgentApiOutcomeOfEnvironmentRegistrationKeyRotateResponse {
5584
+ notifications?: AgentNotification[];
5585
+ result: EnvironmentRegistrationKeyRotateResponse;
5586
+ }
5587
+ /**
5588
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5589
+ * via the `definition` "EnvironmentRegistrationKeyRotateResponse".
5590
+ */
5591
+ export interface EnvironmentRegistrationKeyRotateResponse {
5592
+ registrationKey: EnvironmentRegistrationKeyView;
5593
+ /**
5594
+ * The new plaintext secret, returned only here.
5595
+ */
5596
+ secret: EnvironmentRegistrationSecretView;
5597
+ }
5598
+ /**
5599
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5600
+ * via the `definition` "AgentApiOutcomeOfEnvironmentRegistrationKeyUpdateResponse".
5601
+ */
5602
+ export interface AgentApiOutcomeOfEnvironmentRegistrationKeyUpdateResponse {
5603
+ notifications?: AgentNotification[];
5604
+ result: EnvironmentRegistrationKeyUpdateResponse;
5605
+ }
5606
+ /**
5607
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5608
+ * via the `definition` "EnvironmentRegistrationKeyUpdateResponse".
5609
+ */
5610
+ export interface EnvironmentRegistrationKeyUpdateResponse {
5611
+ registrationKey: EnvironmentRegistrationKeyView;
5612
+ }
5349
5613
  /**
5350
5614
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5351
5615
  * via the `definition` "AgentApiOutcomeOfEnvironmentTemplateListResponse".
@@ -5366,17 +5630,46 @@ export interface EnvironmentTemplateListResponse {
5366
5630
  * via the `definition` "EnvironmentTemplateView".
5367
5631
  */
5368
5632
  export interface EnvironmentTemplateView {
5369
- bindingId: string;
5370
5633
  deprecated: boolean;
5371
5634
  description?: string | null;
5372
5635
  displayName: string;
5636
+ /**
5637
+ * Idle policy targets get when `environments/create` names none.
5638
+ */
5639
+ idle?: EnvironmentIdlePolicyView | null;
5373
5640
  metadata?: {
5374
5641
  [k: string]: string;
5375
5642
  };
5643
+ /**
5644
+ * Power states `environments/power/put` can move targets of this
5645
+ * template to; empty without power control.
5646
+ */
5647
+ powerStates: EnvironmentPowerStateView[];
5376
5648
  providerId: string;
5649
+ /**
5650
+ * `environments/ingress/put` can enable public ingress on targets of
5651
+ * this template.
5652
+ */
5377
5653
  publicIngress: boolean;
5654
+ /**
5655
+ * Compute targets of this template get; absent when the provider does
5656
+ * not fix it.
5657
+ */
5658
+ resources?: EnvironmentTemplateResourcesView | null;
5378
5659
  templateId: string;
5379
5660
  }
5661
+ /**
5662
+ * A template's compute, in provider-neutral units. Each field is absent
5663
+ * when the provider does not fix it.
5664
+ *
5665
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5666
+ * via the `definition` "EnvironmentTemplateResourcesView".
5667
+ */
5668
+ export interface EnvironmentTemplateResourcesView {
5669
+ diskBytes?: number | null;
5670
+ memoryBytes?: number | null;
5671
+ vcpus?: number | null;
5672
+ }
5380
5673
  /**
5381
5674
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5382
5675
  * via the `definition` "AgentApiOutcomeOfEnvironmentTemplateReadResponse".
@@ -5392,6 +5685,21 @@ export interface AgentApiOutcomeOfEnvironmentTemplateReadResponse {
5392
5685
  export interface EnvironmentTemplateReadResponse {
5393
5686
  template: EnvironmentTemplateView;
5394
5687
  }
5688
+ /**
5689
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5690
+ * via the `definition` "AgentApiOutcomeOfEnvironmentUpdateResponse".
5691
+ */
5692
+ export interface AgentApiOutcomeOfEnvironmentUpdateResponse {
5693
+ notifications?: AgentNotification[];
5694
+ result: EnvironmentUpdateResponse;
5695
+ }
5696
+ /**
5697
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5698
+ * via the `definition` "EnvironmentUpdateResponse".
5699
+ */
5700
+ export interface EnvironmentUpdateResponse {
5701
+ environment: EnvironmentView;
5702
+ }
5395
5703
  /**
5396
5704
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
5397
5705
  * via the `definition` "AgentApiOutcomeOfInitializeResponse".
@@ -5480,8 +5788,9 @@ export interface ServerInfo {
5480
5788
  export interface EnvironmentDaemonInfo {
5481
5789
  gitSha: string;
5482
5790
  /**
5483
- * Environment protocol version the gateway speaks. A daemon registers
5484
- * only when it reports exactly this number.
5791
+ * The envd protocol version (data plane and registration channel)
5792
+ * the gateway speaks. A daemon registers only when it reports exactly
5793
+ * this number.
5485
5794
  */
5486
5795
  protocolVersion: number;
5487
5796
  /**
@@ -7255,28 +7564,13 @@ export interface DeploymentChannelAccountListParams {
7255
7564
  }
7256
7565
  /**
7257
7566
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7258
- * via the `definition` "DeploymentEnvironmentAdoptParams".
7567
+ * via the `definition` "DeploymentDeletedSessionsListParams".
7259
7568
  */
7260
- export interface DeploymentEnvironmentAdoptParams {
7261
- bindingId: string;
7262
- displayName?: string | null;
7263
- metadata?: {
7264
- [k: string]: string;
7265
- };
7569
+ export interface DeploymentDeletedSessionsListParams {
7266
7570
  /**
7267
- * Stable caller-generated retry identity inside the destination universe.
7571
+ * Exclusive session ID cursor; each page contains at most 100 entries.
7268
7572
  */
7269
- requestId: string;
7270
- /**
7271
- * Provider-native source reference. The Incus provider accepts
7272
- * `<project>/<instance>` or an instance name in the `default` project.
7273
- */
7274
- sourceTarget: string;
7275
- /**
7276
- * Required acknowledgement that Lightspeed will move, reconfigure, and
7277
- * delete the target as part of its ordinary managed lifecycle.
7278
- */
7279
- takeOwnership: boolean;
7573
+ after?: string | null;
7280
7574
  universeId: string;
7281
7575
  }
7282
7576
  /**
@@ -7292,15 +7586,35 @@ export interface DeploymentEnvironmentProviderDeleteParams {
7292
7586
  */
7293
7587
  export interface DeploymentEnvironmentProviderListParams {}
7294
7588
  /**
7589
+ * Register or replace a provider. `credential` is the optional bearer
7590
+ * token Lightspeed presents to the provider's controller and data routes:
7591
+ * it is sealed on receipt and never returned by any method. `Debug` output
7592
+ * redacts it; request logging must never echo these params.
7593
+ *
7295
7594
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7296
7595
  * via the `definition` "DeploymentEnvironmentProviderPutParams".
7297
7596
  */
7298
7597
  export interface DeploymentEnvironmentProviderPutParams {
7299
- controllerConnection: DeploymentEnvironmentProviderConnection;
7598
+ /**
7599
+ * Remove the stored credential. Excludes `credential`.
7600
+ */
7601
+ clearCredential?: boolean;
7602
+ /**
7603
+ * `ws://`, `wss://` or `unix://` URL of the provider controller.
7604
+ */
7605
+ controllerEndpoint: string;
7606
+ /**
7607
+ * A new bearer credential; omit to keep the stored one. A provider needs
7608
+ * none. Excludes `clearCredential`.
7609
+ */
7610
+ credential?: string | null;
7611
+ /**
7612
+ * `ws://` or `wss://` base of the provider's data routes; omit to derive
7613
+ * it from the controller endpoint. Required for a `unix://` controller,
7614
+ * and must not be `ws://` for a `wss://` controller.
7615
+ */
7616
+ dataRouteBase?: string | null;
7300
7617
  displayName?: string | null;
7301
- metadata?: {
7302
- [k: string]: string;
7303
- };
7304
7618
  providerId: string;
7305
7619
  }
7306
7620
  /**
@@ -7315,21 +7629,29 @@ export interface DeploymentEnvironmentProviderReadParams {
7315
7629
  * via the `definition` "DeploymentProviderBindingDeleteParams".
7316
7630
  */
7317
7631
  export interface DeploymentProviderBindingDeleteParams {
7318
- bindingId: string;
7632
+ providerId: string;
7319
7633
  universeId: string;
7320
7634
  }
7321
7635
  /**
7636
+ * Create or replace a universe's binding to a deployment provider.
7637
+ *
7322
7638
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7323
7639
  * via the `definition` "DeploymentProviderBindingPutParams".
7324
7640
  */
7325
7641
  export interface DeploymentProviderBindingPutParams {
7326
- bindingId: string;
7327
- expectedRevision?: number | null;
7328
- metadata?: {
7329
- [k: string]: string;
7330
- };
7642
+ /**
7643
+ * Admits creates, template listing and data routes for the universe.
7644
+ */
7645
+ enabled: boolean;
7331
7646
  providerId: string;
7332
- status: EnvironmentProviderBindingStatusView;
7647
+ universeId: string;
7648
+ }
7649
+ /**
7650
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7651
+ * via the `definition` "DeploymentSessionPurgeParams".
7652
+ */
7653
+ export interface DeploymentSessionPurgeParams {
7654
+ sessionId: string;
7333
7655
  universeId: string;
7334
7656
  }
7335
7657
  /**
@@ -7394,21 +7716,27 @@ export interface EnvironmentCloseParams {
7394
7716
  * via the `definition` "EnvironmentCreateParams".
7395
7717
  */
7396
7718
  export interface EnvironmentCreateParams {
7397
- bindingId: string;
7398
7719
  displayName?: string | null;
7399
7720
  /**
7400
- * Optional staged idle policy applied by the power reaper.
7721
+ * Idle policy passed to the provider in place of the template's `idle`.
7722
+ * The provider runs the idle clock; it cannot be changed after create.
7401
7723
  */
7402
- idlePolicy?: EnvironmentIdlePolicyView | null;
7724
+ idle?: EnvironmentIdlePolicyView | null;
7403
7725
  metadata?: {
7404
7726
  [k: string]: string;
7405
7727
  };
7728
+ /**
7729
+ * The provider to create the environment with; the universe needs an
7730
+ * enabled binding to it.
7731
+ */
7732
+ providerId: string;
7406
7733
  /**
7407
7734
  * Stable caller-generated retry identity, unique inside the universe.
7735
+ * Retrying with identical inputs returns the same environment.
7408
7736
  */
7409
7737
  requestId: string;
7410
7738
  /**
7411
- * Immutable provider template-version identity.
7739
+ * The provider template to create the environment from.
7412
7740
  */
7413
7741
  templateId: string;
7414
7742
  }
@@ -7441,32 +7769,28 @@ export interface EnvironmentCredentialUnbindParams {
7441
7769
  * via the `definition` "EnvironmentExternalCreateParams".
7442
7770
  */
7443
7771
  export interface EnvironmentExternalCreateParams {
7772
+ displayName?: string | null;
7444
7773
  /**
7445
- * Connection to an envd instance reachable from Lightspeed.
7774
+ * `ws://`, `wss://` or `unix://` URL of an envd instance reachable from
7775
+ * Lightspeed.
7446
7776
  */
7447
- connection: EnvironmentConnectionView;
7448
- displayName?: string | null;
7777
+ endpoint: string;
7449
7778
  metadata?: {
7450
7779
  [k: string]: string;
7451
7780
  };
7452
- requestId: string;
7453
- }
7454
- /**
7455
- * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7456
- * via the `definition` "EnvironmentIdlePolicyPutParams".
7457
- */
7458
- export interface EnvironmentIdlePolicyPutParams {
7459
- environmentId: string;
7460
7781
  /**
7461
- * The complete new policy; omit to clear it.
7782
+ * Stable caller-generated retry identity, unique inside the universe.
7462
7783
  */
7463
- idlePolicy?: EnvironmentIdlePolicyView | null;
7784
+ requestId: string;
7464
7785
  }
7465
7786
  /**
7466
7787
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7467
7788
  * via the `definition` "EnvironmentIngressPutParams".
7468
7789
  */
7469
7790
  export interface EnvironmentIngressPutParams {
7791
+ /**
7792
+ * Ensure (`true`) or remove (`false`) the provider's public ingress.
7793
+ */
7470
7794
  enabled: boolean;
7471
7795
  environmentId: string;
7472
7796
  }
@@ -7527,17 +7851,38 @@ export interface SessionJobDependencyInput {
7527
7851
  * via the `definition` "EnvironmentJobReadParams".
7528
7852
  */
7529
7853
  export interface EnvironmentJobReadParams {
7530
- afterSeq?: number | null;
7531
- includeArtifacts?: boolean;
7854
+ /**
7855
+ * Byte offset to read each job's output from: a previous entry's
7856
+ * `outputNext`. Omitted with `tailBytes` omitted reads from the start.
7857
+ */
7858
+ after?: number | null;
7532
7859
  jobs: SessionJobHandleInput[];
7533
- outputBytes?: number | null;
7860
+ /**
7861
+ * Most output bytes per job; omit for the server's default page.
7862
+ */
7863
+ maxBytes?: number | null;
7864
+ /**
7865
+ * Read each job's last `tailBytes` of output instead; excludes `after`.
7866
+ */
7867
+ tailBytes?: number | null;
7534
7868
  }
7535
7869
  /**
7536
7870
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7537
7871
  * via the `definition` "EnvironmentListParams".
7538
7872
  */
7539
7873
  export interface EnvironmentListParams {
7540
- bindingId?: string | null;
7874
+ /**
7875
+ * Exclusive environment id cursor: a previous page's `nextAfter`.
7876
+ */
7877
+ after?: string | null;
7878
+ /**
7879
+ * Also list closed environments; they are omitted by default.
7880
+ */
7881
+ includeClosed?: boolean;
7882
+ /**
7883
+ * Most environments per page; omit for 100.
7884
+ */
7885
+ limit?: number | null;
7541
7886
  /**
7542
7887
  * Only environments carrying every listed metadata pair (AND
7543
7888
  * semantics); the same filter `session/list` accepts.
@@ -7545,12 +7890,19 @@ export interface EnvironmentListParams {
7545
7890
  metadata?: {
7546
7891
  [k: string]: string;
7547
7892
  };
7893
+ /**
7894
+ * Only provisioned environments of this provider.
7895
+ */
7548
7896
  providerId?: string | null;
7549
7897
  /**
7550
7898
  * Only registered environments admitted by this registration key.
7551
7899
  */
7552
7900
  registrationKeyId?: string | null;
7553
- status?: EnvironmentLifecycleStatusView | null;
7901
+ /**
7902
+ * Only environments in this lifecycle state. `closed` lists closed
7903
+ * environments without `includeClosed`.
7904
+ */
7905
+ state?: EnvironmentStateView | null;
7554
7906
  }
7555
7907
  /**
7556
7908
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -7559,8 +7911,8 @@ export interface EnvironmentListParams {
7559
7911
  export interface EnvironmentPowerPutParams {
7560
7912
  environmentId: string;
7561
7913
  /**
7562
- * Desired steady power state. Must be one of the provider-reported
7563
- * `incarnation.powerStates`.
7914
+ * Power state to move the target to; one of its template's
7915
+ * `powerStates`.
7564
7916
  */
7565
7917
  power: EnvironmentPowerStateView;
7566
7918
  }
@@ -7574,7 +7926,7 @@ export interface EnvironmentProviderBindingListParams {}
7574
7926
  * via the `definition` "EnvironmentProviderBindingReadParams".
7575
7927
  */
7576
7928
  export interface EnvironmentProviderBindingReadParams {
7577
- bindingId: string;
7929
+ providerId: string;
7578
7930
  }
7579
7931
  /**
7580
7932
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -7597,11 +7949,19 @@ export interface EnvironmentRegistrationKeyCreateParams {
7597
7949
  */
7598
7950
  ephemeralDisconnectGraceMs?: number | null;
7599
7951
  expiresAtMs?: number | null;
7952
+ /**
7953
+ * Immutable once the key exists.
7954
+ */
7600
7955
  identityMode: EnvironmentIdentityModeView;
7601
7956
  /**
7602
7957
  * Non-closed environments the key may have at once; omit for unlimited.
7603
7958
  */
7604
7959
  maxActiveEnvironments?: number | null;
7960
+ /**
7961
+ * Persistent keys only: close environments whose daemon has been away
7962
+ * longer than this; omit to keep them open.
7963
+ */
7964
+ offlineCloseAfterMs?: number | null;
7605
7965
  }
7606
7966
  /**
7607
7967
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -7626,21 +7986,78 @@ export interface EnvironmentRegistrationKeyRevokeParams {
7626
7986
  closeEnvironments?: boolean;
7627
7987
  registrationKeyId: string;
7628
7988
  }
7989
+ /**
7990
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7991
+ * via the `definition` "EnvironmentRegistrationKeyRotateParams".
7992
+ */
7993
+ export interface EnvironmentRegistrationKeyRotateParams {
7994
+ registrationKeyId: string;
7995
+ }
7996
+ /**
7997
+ * The complete editable policy of a registration key; an absent field is
7998
+ * unset. The identity mode is immutable.
7999
+ *
8000
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
8001
+ * via the `definition` "EnvironmentRegistrationKeyUpdateParams".
8002
+ */
8003
+ export interface EnvironmentRegistrationKeyUpdateParams {
8004
+ /**
8005
+ * Group name for the environments this key admits.
8006
+ */
8007
+ displayName: string;
8008
+ /**
8009
+ * Disconnect grace for ephemeral environments; omit for the default.
8010
+ */
8011
+ ephemeralDisconnectGraceMs?: number | null;
8012
+ expiresAtMs?: number | null;
8013
+ /**
8014
+ * Non-closed environments the key may have at once; omit for unlimited.
8015
+ */
8016
+ maxActiveEnvironments?: number | null;
8017
+ /**
8018
+ * Persistent keys only: close environments whose daemon has been away
8019
+ * longer than this; omit to keep them open.
8020
+ */
8021
+ offlineCloseAfterMs?: number | null;
8022
+ registrationKeyId: string;
8023
+ }
7629
8024
  /**
7630
8025
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7631
8026
  * via the `definition` "EnvironmentTemplateListParams".
7632
8027
  */
7633
8028
  export interface EnvironmentTemplateListParams {
7634
- bindingId?: string | null;
8029
+ /**
8030
+ * Only this provider's templates; omit for every enabled binding.
8031
+ */
8032
+ providerId?: string | null;
7635
8033
  }
7636
8034
  /**
7637
8035
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7638
8036
  * via the `definition` "EnvironmentTemplateReadParams".
7639
8037
  */
7640
8038
  export interface EnvironmentTemplateReadParams {
7641
- bindingId: string;
8039
+ providerId: string;
7642
8040
  templateId: string;
7643
8041
  }
8042
+ /**
8043
+ * Replace an environment's display name and caller metadata.
8044
+ *
8045
+ * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
8046
+ * via the `definition` "EnvironmentUpdateParams".
8047
+ */
8048
+ export interface EnvironmentUpdateParams {
8049
+ /**
8050
+ * The new display name; omit to clear it.
8051
+ */
8052
+ displayName?: string | null;
8053
+ environmentId: string;
8054
+ /**
8055
+ * The complete new caller metadata; omit or `{}` to clear it.
8056
+ */
8057
+ metadata?: {
8058
+ [k: string]: string;
8059
+ };
8060
+ }
7644
8061
  /**
7645
8062
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
7646
8063
  * via the `definition` "InitializeParams".
@@ -8035,6 +8452,16 @@ export interface SessionDeleteParams {
8035
8452
  */
8036
8453
  cascade?: boolean;
8037
8454
  sessionId: string;
8455
+ /**
8456
+ * Atomically require every selected session's audience to be shared.
8457
+ * Delegating services use this guard for operators deleting shared work.
8458
+ */
8459
+ sharedOnly?: boolean;
8460
+ /**
8461
+ * Hide sessions while retaining records, events, checkpoints and blob roots.
8462
+ * False (the default) permanently deletes them without prior soft deletion.
8463
+ */
8464
+ softDelete?: boolean;
8038
8465
  }
8039
8466
  /**
8040
8467
  * This interface was referenced by `LightspeedAgentAPI`'s JSON-Schema
@@ -8171,7 +8598,7 @@ export interface SessionRenameParams {
8171
8598
  */
8172
8599
  export interface SessionRetentionPutParams {
8173
8600
  /**
8174
- * Positive duration enables automatic tree deletion; null disables it.
8601
+ * Positive duration enables automatic tree soft deletion; null disables it.
8175
8602
  */
8176
8603
  deleteAfterCloseMs: number | null;
8177
8604
  sessionId: string;
@@ -8195,7 +8622,7 @@ export interface SessionStartParams {
8195
8622
  access?: AccessInput | null;
8196
8623
  config?: SessionConfig | null;
8197
8624
  /**
8198
- * Root-owned automatic deletion measured from close. Absent inherits a
8625
+ * Root-owned automatic soft deletion measured from close. Absent inherits a
8199
8626
  * profile default, explicit null keeps the tree, and a duration overrides
8200
8627
  * the profile.
8201
8628
  */