@lightspeed-ai/sdk 0.4.0 → 0.5.0

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.
@@ -139,7 +139,7 @@
139
139
  },
140
140
  {
141
141
  "const": "environment_not_ready",
142
- "description": "The environment exists but is not reachable yet: it is still\nprovisioning/booting, or it was powered down and a wake (desired\npower `running`) has been initiated by this request. Distinct from\n`Rejected` so clients retry with backoff instead of failing —\npolling and automation callers lean on this for wake-on-use.",
142
+ "description": "The environment exists but is not reachable yet: it is still\nprovisioning, its provider is waking or booting it after a data\nroute dial, or its registered daemon is reconnecting. Distinct from\n`Rejected` so clients retry with backoff instead of failing —\npolling and automation callers lean on this for wake-on-use.",
143
143
  "type": "string"
144
144
  },
145
145
  {
@@ -1067,7 +1067,7 @@
1067
1067
  ],
1068
1068
  "type": "object"
1069
1069
  },
1070
- "AgentApiOutcomeOfDeploymentEnvironmentAdoptResponse": {
1070
+ "AgentApiOutcomeOfDeploymentDeletedSessionsListResponse": {
1071
1071
  "properties": {
1072
1072
  "notifications": {
1073
1073
  "items": {
@@ -1076,7 +1076,7 @@
1076
1076
  "type": "array"
1077
1077
  },
1078
1078
  "result": {
1079
- "$ref": "#/definitions/DeploymentEnvironmentAdoptResponse"
1079
+ "$ref": "#/definitions/DeploymentDeletedSessionsListResponse"
1080
1080
  }
1081
1081
  },
1082
1082
  "required": [
@@ -1186,6 +1186,23 @@
1186
1186
  ],
1187
1187
  "type": "object"
1188
1188
  },
1189
+ "AgentApiOutcomeOfDeploymentSessionPurgeResponse": {
1190
+ "properties": {
1191
+ "notifications": {
1192
+ "items": {
1193
+ "$ref": "#/definitions/AgentNotification"
1194
+ },
1195
+ "type": "array"
1196
+ },
1197
+ "result": {
1198
+ "$ref": "#/definitions/DeploymentSessionPurgeResponse"
1199
+ }
1200
+ },
1201
+ "required": [
1202
+ "result"
1203
+ ],
1204
+ "type": "object"
1205
+ },
1189
1206
  "AgentApiOutcomeOfDeploymentUniverseCreateResponse": {
1190
1207
  "properties": {
1191
1208
  "notifications": {
@@ -1356,23 +1373,6 @@
1356
1373
  ],
1357
1374
  "type": "object"
1358
1375
  },
1359
- "AgentApiOutcomeOfEnvironmentIdlePolicyPutResponse": {
1360
- "properties": {
1361
- "notifications": {
1362
- "items": {
1363
- "$ref": "#/definitions/AgentNotification"
1364
- },
1365
- "type": "array"
1366
- },
1367
- "result": {
1368
- "$ref": "#/definitions/EnvironmentIdlePolicyPutResponse"
1369
- }
1370
- },
1371
- "required": [
1372
- "result"
1373
- ],
1374
- "type": "object"
1375
- },
1376
1376
  "AgentApiOutcomeOfEnvironmentIngressPutResponse": {
1377
1377
  "properties": {
1378
1378
  "notifications": {
@@ -1594,6 +1594,40 @@
1594
1594
  ],
1595
1595
  "type": "object"
1596
1596
  },
1597
+ "AgentApiOutcomeOfEnvironmentRegistrationKeyRotateResponse": {
1598
+ "properties": {
1599
+ "notifications": {
1600
+ "items": {
1601
+ "$ref": "#/definitions/AgentNotification"
1602
+ },
1603
+ "type": "array"
1604
+ },
1605
+ "result": {
1606
+ "$ref": "#/definitions/EnvironmentRegistrationKeyRotateResponse"
1607
+ }
1608
+ },
1609
+ "required": [
1610
+ "result"
1611
+ ],
1612
+ "type": "object"
1613
+ },
1614
+ "AgentApiOutcomeOfEnvironmentRegistrationKeyUpdateResponse": {
1615
+ "properties": {
1616
+ "notifications": {
1617
+ "items": {
1618
+ "$ref": "#/definitions/AgentNotification"
1619
+ },
1620
+ "type": "array"
1621
+ },
1622
+ "result": {
1623
+ "$ref": "#/definitions/EnvironmentRegistrationKeyUpdateResponse"
1624
+ }
1625
+ },
1626
+ "required": [
1627
+ "result"
1628
+ ],
1629
+ "type": "object"
1630
+ },
1597
1631
  "AgentApiOutcomeOfEnvironmentTemplateListResponse": {
1598
1632
  "properties": {
1599
1633
  "notifications": {
@@ -1628,6 +1662,23 @@
1628
1662
  ],
1629
1663
  "type": "object"
1630
1664
  },
1665
+ "AgentApiOutcomeOfEnvironmentUpdateResponse": {
1666
+ "properties": {
1667
+ "notifications": {
1668
+ "items": {
1669
+ "$ref": "#/definitions/AgentNotification"
1670
+ },
1671
+ "type": "array"
1672
+ },
1673
+ "result": {
1674
+ "$ref": "#/definitions/EnvironmentUpdateResponse"
1675
+ }
1676
+ },
1677
+ "required": [
1678
+ "result"
1679
+ ],
1680
+ "type": "object"
1681
+ },
1631
1682
  "AgentApiOutcomeOfInitializeResponse": {
1632
1683
  "properties": {
1633
1684
  "notifications": {
@@ -7261,6 +7312,110 @@
7261
7312
  ],
7262
7313
  "type": "object"
7263
7314
  },
7315
+ "CodeModeFeature": {
7316
+ "additionalProperties": false,
7317
+ "description": "Grants JavaScript composition through `code_execute`. Available script tools\nare the session's ordinary callable tools, optionally narrowed by allowedTools.\nTypeScript, ambient filesystem/network access, and recursive code execution\nare unavailable. An empty allowedTools list grants pure computation only.",
7318
+ "properties": {
7319
+ "allowedTools": {
7320
+ "description": "Logical tool ids (for example vfs.read_file), not provider wire names.\nAbsent permits every currently callable grant; an empty list permits none.",
7321
+ "items": {
7322
+ "type": "string"
7323
+ },
7324
+ "type": [
7325
+ "array",
7326
+ "null"
7327
+ ]
7328
+ },
7329
+ "maxCatalogBytes": {
7330
+ "default": 1048576,
7331
+ "description": "Pinned callable catalog bytes, at most 8 MiB.",
7332
+ "format": "uint64",
7333
+ "minimum": 0,
7334
+ "type": "integer"
7335
+ },
7336
+ "maxMemoryBytes": {
7337
+ "default": 67108864,
7338
+ "description": "Interpreter heap, at most 512 MiB.",
7339
+ "format": "uint64",
7340
+ "minimum": 0,
7341
+ "type": "integer"
7342
+ },
7343
+ "maxOutputBytes": {
7344
+ "default": 1048576,
7345
+ "description": "Combined text() output and return value, at most 8 MiB.",
7346
+ "format": "uint64",
7347
+ "minimum": 0,
7348
+ "type": "integer"
7349
+ },
7350
+ "maxOutstandingToolCalls": {
7351
+ "default": 16,
7352
+ "description": "Concurrent pending calls, at most 64 and no greater than maxToolCalls.",
7353
+ "format": "uint32",
7354
+ "minimum": 0,
7355
+ "type": "integer"
7356
+ },
7357
+ "maxRequestBytes": {
7358
+ "default": 1048576,
7359
+ "description": "Serialized arguments per tool request, at most 8 MiB.",
7360
+ "format": "uint64",
7361
+ "minimum": 0,
7362
+ "type": "integer"
7363
+ },
7364
+ "maxResultBytes": {
7365
+ "default": 1048576,
7366
+ "description": "Serialized completion per tool request, at most 8 MiB.",
7367
+ "format": "uint64",
7368
+ "minimum": 0,
7369
+ "type": "integer"
7370
+ },
7371
+ "maxSourceBytes": {
7372
+ "default": 262144,
7373
+ "description": "UTF-8 source bytes, at most 1 MiB.",
7374
+ "format": "uint64",
7375
+ "minimum": 0,
7376
+ "type": "integer"
7377
+ },
7378
+ "maxStackBytes": {
7379
+ "default": 1048576,
7380
+ "description": "Interpreter native stack, at most 8 MiB.",
7381
+ "format": "uint64",
7382
+ "minimum": 0,
7383
+ "type": "integer"
7384
+ },
7385
+ "maxToolCalls": {
7386
+ "default": 128,
7387
+ "description": "Calls per script, at most 1,024.",
7388
+ "format": "uint32",
7389
+ "minimum": 0,
7390
+ "type": "integer"
7391
+ },
7392
+ "timeoutMs": {
7393
+ "default": 60000,
7394
+ "description": "Total attempt time including input loading, interpreter capacity waits,\nJavaScript evaluation, and tool waits; at most 600,000 milliseconds.",
7395
+ "format": "uint64",
7396
+ "minimum": 0,
7397
+ "type": "integer"
7398
+ },
7399
+ "version": {
7400
+ "default": 1,
7401
+ "format": "uint32",
7402
+ "minimum": 0,
7403
+ "type": "integer"
7404
+ }
7405
+ },
7406
+ "type": "object"
7407
+ },
7408
+ "CodeToolProgressPhase": {
7409
+ "description": "Bounded lifecycle telemetry for a session-owned code tool execution.",
7410
+ "enum": [
7411
+ "scopeOpened",
7412
+ "callAdmitted",
7413
+ "callDeferred",
7414
+ "callCompleted",
7415
+ "scopeClosed"
7416
+ ],
7417
+ "type": "string"
7418
+ },
7264
7419
  "CompactionPolicy": {
7265
7420
  "oneOf": [
7266
7421
  {
@@ -8238,6 +8393,28 @@
8238
8393
  ],
8239
8394
  "type": "object"
8240
8395
  },
8396
+ "DeletedSessionView": {
8397
+ "properties": {
8398
+ "deletedAtMs": {
8399
+ "format": "int64",
8400
+ "type": "integer"
8401
+ },
8402
+ "displayName": {
8403
+ "type": [
8404
+ "string",
8405
+ "null"
8406
+ ]
8407
+ },
8408
+ "sessionId": {
8409
+ "type": "string"
8410
+ }
8411
+ },
8412
+ "required": [
8413
+ "sessionId",
8414
+ "deletedAtMs"
8415
+ ],
8416
+ "type": "object"
8417
+ },
8241
8418
  "DeploymentApiKeyCreateParams": {
8242
8419
  "additionalProperties": false,
8243
8420
  "properties": {
@@ -8510,71 +8687,43 @@
8510
8687
  ],
8511
8688
  "type": "object"
8512
8689
  },
8513
- "DeploymentEnvironmentAdoptParams": {
8690
+ "DeploymentDeletedSessionsListParams": {
8691
+ "additionalProperties": false,
8514
8692
  "properties": {
8515
- "bindingId": {
8516
- "type": "string"
8517
- },
8518
- "displayName": {
8693
+ "after": {
8694
+ "default": null,
8695
+ "description": "Exclusive session ID cursor; each page contains at most 100 entries.",
8519
8696
  "type": [
8520
8697
  "string",
8521
8698
  "null"
8522
8699
  ]
8523
8700
  },
8524
- "metadata": {
8525
- "additionalProperties": {
8526
- "type": "string"
8527
- },
8528
- "type": "object"
8529
- },
8530
- "requestId": {
8531
- "description": "Stable caller-generated retry identity inside the destination universe.",
8532
- "type": "string"
8533
- },
8534
- "sourceTarget": {
8535
- "description": "Provider-native source reference. The Incus provider accepts\n`<project>/<instance>` or an instance name in the `default` project.",
8536
- "type": "string"
8537
- },
8538
- "takeOwnership": {
8539
- "description": "Required acknowledgement that Lightspeed will move, reconfigure, and\ndelete the target as part of its ordinary managed lifecycle.",
8540
- "type": "boolean"
8541
- },
8542
8701
  "universeId": {
8543
8702
  "type": "string"
8544
8703
  }
8545
8704
  },
8546
8705
  "required": [
8547
- "universeId",
8548
- "requestId",
8549
- "bindingId",
8550
- "sourceTarget",
8551
- "takeOwnership"
8552
- ],
8553
- "type": "object"
8554
- },
8555
- "DeploymentEnvironmentAdoptResponse": {
8556
- "properties": {
8557
- "environment": {
8558
- "$ref": "#/definitions/EnvironmentView"
8559
- }
8560
- },
8561
- "required": [
8562
- "environment"
8706
+ "universeId"
8563
8707
  ],
8564
8708
  "type": "object"
8565
8709
  },
8566
- "DeploymentEnvironmentProviderConnection": {
8710
+ "DeploymentDeletedSessionsListResponse": {
8567
8711
  "properties": {
8568
- "endpoint": {
8569
- "type": "string"
8712
+ "nextAfter": {
8713
+ "type": [
8714
+ "string",
8715
+ "null"
8716
+ ]
8570
8717
  },
8571
- "transport": {
8572
- "$ref": "#/definitions/DeploymentEnvironmentProviderTransport"
8718
+ "sessions": {
8719
+ "items": {
8720
+ "$ref": "#/definitions/DeletedSessionView"
8721
+ },
8722
+ "type": "array"
8573
8723
  }
8574
8724
  },
8575
8725
  "required": [
8576
- "endpoint",
8577
- "transport"
8726
+ "sessions"
8578
8727
  ],
8579
8728
  "type": "object"
8580
8729
  },
@@ -8618,21 +8767,35 @@
8618
8767
  "type": "object"
8619
8768
  },
8620
8769
  "DeploymentEnvironmentProviderPutParams": {
8770
+ "description": "Register or replace a provider. `credential` is the optional bearer\ntoken Lightspeed presents to the provider's controller and data routes:\nit is sealed on receipt and never returned by any method. `Debug` output\nredacts it; request logging must never echo these params.",
8621
8771
  "properties": {
8622
- "controllerConnection": {
8623
- "$ref": "#/definitions/DeploymentEnvironmentProviderConnection"
8772
+ "clearCredential": {
8773
+ "description": "Remove the stored credential. Excludes `credential`.",
8774
+ "type": "boolean"
8624
8775
  },
8625
- "displayName": {
8776
+ "controllerEndpoint": {
8777
+ "description": "`ws://`, `wss://` or `unix://` URL of the provider controller.",
8778
+ "type": "string"
8779
+ },
8780
+ "credential": {
8781
+ "description": "A new bearer credential; omit to keep the stored one. A provider needs\nnone. Excludes `clearCredential`.",
8626
8782
  "type": [
8627
8783
  "string",
8628
8784
  "null"
8629
8785
  ]
8630
8786
  },
8631
- "metadata": {
8632
- "additionalProperties": {
8633
- "type": "string"
8634
- },
8635
- "type": "object"
8787
+ "dataRouteBase": {
8788
+ "description": "`ws://` or `wss://` base of the provider's data routes; omit to derive\nit from the controller endpoint. Required for a `unix://` controller,\nand must not be `ws://` for a `wss://` controller.",
8789
+ "type": [
8790
+ "string",
8791
+ "null"
8792
+ ]
8793
+ },
8794
+ "displayName": {
8795
+ "type": [
8796
+ "string",
8797
+ "null"
8798
+ ]
8636
8799
  },
8637
8800
  "providerId": {
8638
8801
  "type": "string"
@@ -8640,7 +8803,7 @@
8640
8803
  },
8641
8804
  "required": [
8642
8805
  "providerId",
8643
- "controllerConnection"
8806
+ "controllerEndpoint"
8644
8807
  ],
8645
8808
  "type": "object"
8646
8809
  },
@@ -8677,82 +8840,22 @@
8677
8840
  ],
8678
8841
  "type": "object"
8679
8842
  },
8680
- "DeploymentEnvironmentProviderTransport": {
8681
- "oneOf": [
8682
- {
8683
- "properties": {
8684
- "type": {
8685
- "const": "webSocket",
8686
- "type": "string"
8687
- }
8688
- },
8689
- "required": [
8690
- "type"
8691
- ],
8692
- "type": "object"
8843
+ "DeploymentEnvironmentProviderView": {
8844
+ "properties": {
8845
+ "controllerEndpoint": {
8846
+ "description": "`ws://`, `wss://` or `unix://` URL of the provider controller.",
8847
+ "type": "string"
8693
8848
  },
8694
- {
8695
- "properties": {
8696
- "type": {
8697
- "const": "http",
8698
- "type": "string"
8699
- }
8700
- },
8701
- "required": [
8702
- "type"
8703
- ],
8704
- "type": "object"
8849
+ "createdAtMs": {
8850
+ "format": "int64",
8851
+ "type": "integer"
8705
8852
  },
8706
- {
8707
- "properties": {
8708
- "type": {
8709
- "const": "stdio",
8710
- "type": "string"
8711
- }
8712
- },
8713
- "required": [
8714
- "type"
8715
- ],
8716
- "type": "object"
8717
- },
8718
- {
8719
- "properties": {
8720
- "type": {
8721
- "const": "ssh",
8722
- "type": "string"
8723
- }
8724
- },
8725
- "required": [
8726
- "type"
8727
- ],
8728
- "type": "object"
8729
- },
8730
- {
8731
- "properties": {
8732
- "providerType": {
8733
- "type": "string"
8734
- },
8735
- "type": {
8736
- "const": "provider",
8737
- "type": "string"
8738
- }
8739
- },
8740
- "required": [
8741
- "type",
8742
- "providerType"
8743
- ],
8744
- "type": "object"
8745
- }
8746
- ]
8747
- },
8748
- "DeploymentEnvironmentProviderView": {
8749
- "properties": {
8750
- "controllerConnection": {
8751
- "$ref": "#/definitions/DeploymentEnvironmentProviderConnection"
8752
- },
8753
- "createdAtMs": {
8754
- "format": "int64",
8755
- "type": "integer"
8853
+ "dataRouteBase": {
8854
+ "description": "Operator-configured `ws://` or `wss://` base of the provider's data\nroutes; absent derives it from the controller endpoint.",
8855
+ "type": [
8856
+ "string",
8857
+ "null"
8858
+ ]
8756
8859
  },
8757
8860
  "displayName": {
8758
8861
  "type": [
@@ -8760,11 +8863,16 @@
8760
8863
  "null"
8761
8864
  ]
8762
8865
  },
8763
- "metadata": {
8764
- "additionalProperties": {
8765
- "type": "string"
8766
- },
8767
- "type": "object"
8866
+ "effectiveDataRouteBase": {
8867
+ "description": "The data route base Lightspeed dials: `dataRouteBase`, or the\ncontroller endpoint's origin followed by `/routes`. Absent only when it\ncannot be derived.",
8868
+ "type": [
8869
+ "string",
8870
+ "null"
8871
+ ]
8872
+ },
8873
+ "hasCredential": {
8874
+ "description": "A bearer credential is stored and presented to the controller and\ndata routes; without one no `Authorization` header is sent.",
8875
+ "type": "boolean"
8768
8876
  },
8769
8877
  "providerId": {
8770
8878
  "type": "string"
@@ -8776,7 +8884,8 @@
8776
8884
  },
8777
8885
  "required": [
8778
8886
  "providerId",
8779
- "controllerConnection",
8887
+ "controllerEndpoint",
8888
+ "hasCredential",
8780
8889
  "createdAtMs",
8781
8890
  "updatedAtMs"
8782
8891
  ],
@@ -8784,7 +8893,7 @@
8784
8893
  },
8785
8894
  "DeploymentProviderBindingDeleteParams": {
8786
8895
  "properties": {
8787
- "bindingId": {
8896
+ "providerId": {
8788
8897
  "type": "string"
8789
8898
  },
8790
8899
  "universeId": {
@@ -8793,7 +8902,7 @@
8793
8902
  },
8794
8903
  "required": [
8795
8904
  "universeId",
8796
- "bindingId"
8905
+ "providerId"
8797
8906
  ],
8798
8907
  "type": "object"
8799
8908
  },
@@ -8809,39 +8918,23 @@
8809
8918
  "type": "object"
8810
8919
  },
8811
8920
  "DeploymentProviderBindingPutParams": {
8921
+ "description": "Create or replace a universe's binding to a deployment provider.",
8812
8922
  "properties": {
8813
- "bindingId": {
8814
- "type": "string"
8815
- },
8816
- "expectedRevision": {
8817
- "format": "uint64",
8818
- "minimum": 0,
8819
- "type": [
8820
- "integer",
8821
- "null"
8822
- ]
8823
- },
8824
- "metadata": {
8825
- "additionalProperties": {
8826
- "type": "string"
8827
- },
8828
- "type": "object"
8923
+ "enabled": {
8924
+ "description": "Admits creates, template listing and data routes for the universe.",
8925
+ "type": "boolean"
8829
8926
  },
8830
8927
  "providerId": {
8831
8928
  "type": "string"
8832
8929
  },
8833
- "status": {
8834
- "$ref": "#/definitions/EnvironmentProviderBindingStatusView"
8835
- },
8836
8930
  "universeId": {
8837
8931
  "type": "string"
8838
8932
  }
8839
8933
  },
8840
8934
  "required": [
8841
8935
  "universeId",
8842
- "bindingId",
8843
8936
  "providerId",
8844
- "status"
8937
+ "enabled"
8845
8938
  ],
8846
8939
  "type": "object"
8847
8940
  },
@@ -8856,6 +8949,37 @@
8856
8949
  ],
8857
8950
  "type": "object"
8858
8951
  },
8952
+ "DeploymentSessionPurgeParams": {
8953
+ "additionalProperties": false,
8954
+ "properties": {
8955
+ "sessionId": {
8956
+ "type": "string"
8957
+ },
8958
+ "universeId": {
8959
+ "type": "string"
8960
+ }
8961
+ },
8962
+ "required": [
8963
+ "universeId",
8964
+ "sessionId"
8965
+ ],
8966
+ "type": "object"
8967
+ },
8968
+ "DeploymentSessionPurgeResponse": {
8969
+ "properties": {
8970
+ "deletedSessionIds": {
8971
+ "description": "Includes soft-deleted history forks and delegated descendants.\nEmpty when the target has already been permanently deleted.",
8972
+ "items": {
8973
+ "type": "string"
8974
+ },
8975
+ "type": "array"
8976
+ }
8977
+ },
8978
+ "required": [
8979
+ "deletedSessionIds"
8980
+ ],
8981
+ "type": "object"
8982
+ },
8859
8983
  "DeploymentUniverseCreateParams": {
8860
8984
  "properties": {
8861
8985
  "slug": {
@@ -9097,77 +9221,61 @@
9097
9221
  ],
9098
9222
  "type": "object"
9099
9223
  },
9100
- "EnvironmentCloseResponse": {
9101
- "properties": {
9102
- "environment": {
9103
- "$ref": "#/definitions/EnvironmentView"
9104
- }
9105
- },
9106
- "required": [
9107
- "environment"
9108
- ],
9109
- "type": "object"
9110
- },
9111
- "EnvironmentConnectionTransportView": {
9224
+ "EnvironmentCloseReasonView": {
9225
+ "description": "Why an environment is closing or closed.",
9112
9226
  "oneOf": [
9113
9227
  {
9114
- "enum": [
9115
- "webSocket",
9116
- "http",
9117
- "stdio",
9118
- "ssh"
9119
- ],
9228
+ "const": "requested",
9229
+ "description": "`environments/close`.",
9120
9230
  "type": "string"
9121
9231
  },
9122
9232
  {
9123
- "additionalProperties": false,
9124
- "properties": {
9125
- "provider": {
9126
- "properties": {
9127
- "provider_type": {
9128
- "type": "string"
9129
- }
9130
- },
9131
- "required": [
9132
- "provider_type"
9133
- ],
9134
- "type": "object"
9135
- }
9136
- },
9137
- "required": [
9138
- "provider"
9139
- ],
9140
- "type": "object"
9233
+ "const": "keyRevoked",
9234
+ "description": "Its registration key was revoked with `closeEnvironments`.",
9235
+ "type": "string"
9236
+ },
9237
+ {
9238
+ "const": "ephemeralGrace",
9239
+ "description": "Its ephemeral daemon stayed away longer than the key's disconnect\ngrace.",
9240
+ "type": "string"
9241
+ },
9242
+ {
9243
+ "const": "departed",
9244
+ "description": "Its ephemeral daemon said goodbye.",
9245
+ "type": "string"
9246
+ },
9247
+ {
9248
+ "const": "offlineTimeout",
9249
+ "description": "Its persistent daemon stayed away longer than the key's\n`offlineCloseAfterMs`.",
9250
+ "type": "string"
9251
+ },
9252
+ {
9253
+ "const": "providerEnded",
9254
+ "description": "The provider reported the target closed or gone.",
9255
+ "type": "string"
9141
9256
  }
9142
9257
  ]
9143
9258
  },
9144
- "EnvironmentConnectionView": {
9259
+ "EnvironmentCloseResponse": {
9145
9260
  "properties": {
9146
- "endpoint": {
9147
- "type": "string"
9148
- },
9149
- "transport": {
9150
- "$ref": "#/definitions/EnvironmentConnectionTransportView"
9261
+ "environment": {
9262
+ "$ref": "#/definitions/EnvironmentView"
9151
9263
  }
9152
9264
  },
9153
9265
  "required": [
9154
- "endpoint",
9155
- "transport"
9266
+ "environment"
9156
9267
  ],
9157
9268
  "type": "object"
9158
9269
  },
9159
9270
  "EnvironmentCreateParams": {
9160
9271
  "properties": {
9161
- "bindingId": {
9162
- "type": "string"
9163
- },
9164
9272
  "displayName": {
9165
9273
  "type": [
9166
9274
  "string",
9167
9275
  "null"
9168
9276
  ]
9169
9277
  },
9170
- "idlePolicy": {
9278
+ "idle": {
9171
9279
  "anyOf": [
9172
9280
  {
9173
9281
  "$ref": "#/definitions/EnvironmentIdlePolicyView"
@@ -9176,7 +9284,7 @@
9176
9284
  "type": "null"
9177
9285
  }
9178
9286
  ],
9179
- "description": "Optional staged idle policy applied by the power reaper."
9287
+ "description": "Idle policy passed to the provider in place of the template's `idle`.\nThe provider runs the idle clock; it cannot be changed after create."
9180
9288
  },
9181
9289
  "metadata": {
9182
9290
  "additionalProperties": {
@@ -9184,18 +9292,22 @@
9184
9292
  },
9185
9293
  "type": "object"
9186
9294
  },
9295
+ "providerId": {
9296
+ "description": "The provider to create the environment with; the universe needs an\nenabled binding to it.",
9297
+ "type": "string"
9298
+ },
9187
9299
  "requestId": {
9188
- "description": "Stable caller-generated retry identity, unique inside the universe.",
9300
+ "description": "Stable caller-generated retry identity, unique inside the universe.\nRetrying with identical inputs returns the same environment.",
9189
9301
  "type": "string"
9190
9302
  },
9191
9303
  "templateId": {
9192
- "description": "Immutable provider template-version identity.",
9304
+ "description": "The provider template to create the environment from.",
9193
9305
  "type": "string"
9194
9306
  }
9195
9307
  },
9196
9308
  "required": [
9197
9309
  "requestId",
9198
- "bindingId",
9310
+ "providerId",
9199
9311
  "templateId"
9200
9312
  ],
9201
9313
  "type": "object"
@@ -9378,7 +9490,7 @@
9378
9490
  "type": "string"
9379
9491
  },
9380
9492
  "protocolVersion": {
9381
- "description": "Environment protocol version the gateway speaks. A daemon registers\nonly when it reports exactly this number.",
9493
+ "description": "The envd protocol version (data plane and registration channel)\nthe gateway speaks. A daemon registers only when it reports exactly\nthis number.",
9382
9494
  "format": "uint32",
9383
9495
  "minimum": 0,
9384
9496
  "type": "integer"
@@ -9402,22 +9514,44 @@
9402
9514
  ],
9403
9515
  "type": "object"
9404
9516
  },
9405
- "EnvironmentExternalCreateParams": {
9517
+ "EnvironmentDaemonView": {
9518
+ "description": "The envd build serving an environment, from its registration or\nLightspeed's open handshake.",
9406
9519
  "properties": {
9407
- "connection": {
9408
- "allOf": [
9409
- {
9410
- "$ref": "#/definitions/EnvironmentConnectionView"
9411
- }
9412
- ],
9413
- "description": "Connection to an envd instance reachable from Lightspeed."
9520
+ "gitSha": {
9521
+ "type": [
9522
+ "string",
9523
+ "null"
9524
+ ]
9525
+ },
9526
+ "protocolVersion": {
9527
+ "format": "uint32",
9528
+ "minimum": 0,
9529
+ "type": "integer"
9414
9530
  },
9531
+ "version": {
9532
+ "type": [
9533
+ "string",
9534
+ "null"
9535
+ ]
9536
+ }
9537
+ },
9538
+ "required": [
9539
+ "protocolVersion"
9540
+ ],
9541
+ "type": "object"
9542
+ },
9543
+ "EnvironmentExternalCreateParams": {
9544
+ "properties": {
9415
9545
  "displayName": {
9416
9546
  "type": [
9417
9547
  "string",
9418
9548
  "null"
9419
9549
  ]
9420
9550
  },
9551
+ "endpoint": {
9552
+ "description": "`ws://`, `wss://` or `unix://` URL of an envd instance reachable from\nLightspeed.",
9553
+ "type": "string"
9554
+ },
9421
9555
  "metadata": {
9422
9556
  "additionalProperties": {
9423
9557
  "type": "string"
@@ -9425,12 +9559,13 @@
9425
9559
  "type": "object"
9426
9560
  },
9427
9561
  "requestId": {
9562
+ "description": "Stable caller-generated retry identity, unique inside the universe.",
9428
9563
  "type": "string"
9429
9564
  }
9430
9565
  },
9431
9566
  "required": [
9432
9567
  "requestId",
9433
- "connection"
9568
+ "endpoint"
9434
9569
  ],
9435
9570
  "type": "object"
9436
9571
  },
@@ -9446,55 +9581,23 @@
9446
9581
  "type": "object"
9447
9582
  },
9448
9583
  "EnvironmentIdentityModeView": {
9449
- "description": "What Lightspeed does with a registered environment while its daemon is\ndisconnected. Registration-key policy, copied onto each environment.",
9584
+ "description": "What happens to a registered environment while its daemon is\ndisconnected. Policy of the registration key that admitted it.",
9450
9585
  "oneOf": [
9451
9586
  {
9452
9587
  "const": "persistent",
9453
- "description": "Stays offline until explicitly closed.",
9588
+ "description": "Stays open: tools wait up to two minutes for the daemon to reconnect.\nClosed explicitly, or after the key's `offlineCloseAfterMs`.",
9454
9589
  "type": "string"
9455
9590
  },
9456
9591
  {
9457
9592
  "const": "ephemeral",
9458
- "description": "Closed once the daemon has been away longer than the key's\ndisconnect grace.",
9593
+ "description": "Unusable while disconnected; closed once the daemon has been away\nlonger than the key's disconnect grace, or at once when it says\ngoodbye.",
9459
9594
  "type": "string"
9460
9595
  }
9461
9596
  ]
9462
9597
  },
9463
- "EnvironmentIdlePolicyPutParams": {
9464
- "properties": {
9465
- "environmentId": {
9466
- "type": "string"
9467
- },
9468
- "idlePolicy": {
9469
- "anyOf": [
9470
- {
9471
- "$ref": "#/definitions/EnvironmentIdlePolicyView"
9472
- },
9473
- {
9474
- "type": "null"
9475
- }
9476
- ],
9477
- "description": "The complete new policy; omit to clear it."
9478
- }
9479
- },
9480
- "required": [
9481
- "environmentId"
9482
- ],
9483
- "type": "object"
9484
- },
9485
- "EnvironmentIdlePolicyPutResponse": {
9486
- "properties": {
9487
- "environment": {
9488
- "$ref": "#/definitions/EnvironmentView"
9489
- }
9490
- },
9491
- "required": [
9492
- "environment"
9493
- ],
9494
- "type": "object"
9495
- },
9496
9598
  "EnvironmentIdlePolicyView": {
9497
- "description": "Staged idle policy. Thresholds are milliseconds of daemon-reported idle\ntime and must be non-decreasing in the order pause, suspend, stop, close.\nStages whose power state the provider does not support are skipped.",
9599
+ "additionalProperties": false,
9600
+ "description": "Staged idle policy the provider applies. Thresholds are milliseconds of\nenvd-reported idle time (running processes, jobs and leftover process\ngroups hold it at zero) and must be non-decreasing in the order pause,\nsuspend, stop, close. Stages whose power state the template does not\nsupport are skipped.",
9498
9601
  "properties": {
9499
9602
  "closeAfterMs": {
9500
9603
  "format": "uint64",
@@ -9531,64 +9634,19 @@
9531
9634
  },
9532
9635
  "type": "object"
9533
9636
  },
9534
- "EnvironmentIncarnationView": {
9637
+ "EnvironmentIngressPutParams": {
9535
9638
  "properties": {
9536
- "createdAtMs": {
9537
- "format": "int64",
9538
- "type": "integer"
9639
+ "enabled": {
9640
+ "description": "Ensure (`true`) or remove (`false`) the provider's public ingress.",
9641
+ "type": "boolean"
9539
9642
  },
9540
- "incarnationId": {
9643
+ "environmentId": {
9541
9644
  "type": "string"
9542
- },
9543
- "powerStates": {
9544
- "description": "Power states the provider reported for this target; empty until\nobserved or when the provider offers no power control.",
9545
- "items": {
9546
- "$ref": "#/definitions/EnvironmentPowerStateView"
9547
- },
9548
- "type": "array"
9549
- },
9550
- "providerTargetId": {
9551
- "type": [
9552
- "string",
9553
- "null"
9554
- ]
9555
- },
9556
- "provisionRequestId": {
9557
- "type": [
9558
- "string",
9559
- "null"
9560
- ]
9561
- },
9562
- "templateId": {
9563
- "type": [
9564
- "string",
9565
- "null"
9566
- ]
9567
- },
9568
- "updatedAtMs": {
9569
- "format": "int64",
9570
- "type": "integer"
9571
9645
  }
9572
9646
  },
9573
9647
  "required": [
9574
- "incarnationId",
9575
- "createdAtMs",
9576
- "updatedAtMs"
9577
- ],
9578
- "type": "object"
9579
- },
9580
- "EnvironmentIngressPutParams": {
9581
- "properties": {
9582
- "enabled": {
9583
- "type": "boolean"
9584
- },
9585
- "environmentId": {
9586
- "type": "string"
9587
- }
9588
- },
9589
- "required": [
9590
- "environmentId",
9591
- "enabled"
9648
+ "environmentId",
9649
+ "enabled"
9592
9650
  ],
9593
9651
  "type": "object"
9594
9652
  },
@@ -9687,7 +9745,8 @@
9687
9745
  },
9688
9746
  "EnvironmentJobReadParams": {
9689
9747
  "properties": {
9690
- "afterSeq": {
9748
+ "after": {
9749
+ "description": "Byte offset to read each job's output from: a previous entry's\n`outputNext`. Omitted with `tailBytes` omitted reads from the start.",
9691
9750
  "format": "uint64",
9692
9751
  "minimum": 0,
9693
9752
  "type": [
@@ -9695,18 +9754,24 @@
9695
9754
  "null"
9696
9755
  ]
9697
9756
  },
9698
- "includeArtifacts": {
9699
- "default": false,
9700
- "type": "boolean"
9701
- },
9702
9757
  "jobs": {
9703
9758
  "items": {
9704
9759
  "$ref": "#/definitions/SessionJobHandleInput"
9705
9760
  },
9706
9761
  "type": "array"
9707
9762
  },
9708
- "outputBytes": {
9709
- "format": "uint",
9763
+ "maxBytes": {
9764
+ "description": "Most output bytes per job; omit for the server's default page.",
9765
+ "format": "uint64",
9766
+ "minimum": 0,
9767
+ "type": [
9768
+ "integer",
9769
+ "null"
9770
+ ]
9771
+ },
9772
+ "tailBytes": {
9773
+ "description": "Read each job's last `tailBytes` of output instead; excludes `after`.",
9774
+ "format": "uint64",
9710
9775
  "minimum": 0,
9711
9776
  "type": [
9712
9777
  "integer",
@@ -9731,45 +9796,29 @@
9731
9796
  },
9732
9797
  "type": "object"
9733
9798
  },
9734
- "EnvironmentLifecycleStatusView": {
9735
- "oneOf": [
9736
- {
9737
- "enum": [
9738
- "provisioning",
9739
- "booting",
9740
- "ready",
9741
- "closing",
9742
- "closed",
9743
- "failed",
9744
- "unknown"
9745
- ],
9746
- "type": "string"
9747
- },
9748
- {
9749
- "const": "paused",
9750
- "description": "Execution frozen; wakes on next use.",
9751
- "type": "string"
9752
- },
9753
- {
9754
- "const": "suspended",
9755
- "description": "Execution state saved to disk; wakes on next use.",
9756
- "type": "string"
9757
- },
9758
- {
9759
- "const": "offline",
9760
- "description": "Powered off; provisioned environments wake on next use when the\nprovider supports power control.",
9761
- "type": "string"
9762
- }
9763
- ]
9764
- },
9765
9799
  "EnvironmentListParams": {
9766
9800
  "properties": {
9767
- "bindingId": {
9801
+ "after": {
9802
+ "description": "Exclusive environment id cursor: a previous page's `nextAfter`.",
9768
9803
  "type": [
9769
9804
  "string",
9770
9805
  "null"
9771
9806
  ]
9772
9807
  },
9808
+ "includeClosed": {
9809
+ "description": "Also list closed environments; they are omitted by default.",
9810
+ "type": "boolean"
9811
+ },
9812
+ "limit": {
9813
+ "description": "Most environments per page; omit for 100.",
9814
+ "format": "uint32",
9815
+ "maximum": 500,
9816
+ "minimum": 1,
9817
+ "type": [
9818
+ "integer",
9819
+ "null"
9820
+ ]
9821
+ },
9773
9822
  "metadata": {
9774
9823
  "additionalProperties": {
9775
9824
  "type": "string"
@@ -9778,6 +9827,7 @@
9778
9827
  "type": "object"
9779
9828
  },
9780
9829
  "providerId": {
9830
+ "description": "Only provisioned environments of this provider.",
9781
9831
  "type": [
9782
9832
  "string",
9783
9833
  "null"
@@ -9790,15 +9840,16 @@
9790
9840
  "null"
9791
9841
  ]
9792
9842
  },
9793
- "status": {
9843
+ "state": {
9794
9844
  "anyOf": [
9795
9845
  {
9796
- "$ref": "#/definitions/EnvironmentLifecycleStatusView"
9846
+ "$ref": "#/definitions/EnvironmentStateView"
9797
9847
  },
9798
9848
  {
9799
9849
  "type": "null"
9800
9850
  }
9801
- ]
9851
+ ],
9852
+ "description": "Only environments in this lifecycle state. `closed` lists closed\nenvironments without `includeClosed`."
9802
9853
  }
9803
9854
  },
9804
9855
  "type": "object"
@@ -9807,14 +9858,56 @@
9807
9858
  "properties": {
9808
9859
  "environments": {
9809
9860
  "default": [],
9861
+ "description": "Environments in environment id order.",
9810
9862
  "items": {
9811
9863
  "$ref": "#/definitions/EnvironmentView"
9812
9864
  },
9813
9865
  "type": "array"
9866
+ },
9867
+ "nextAfter": {
9868
+ "description": "Pass as `after` to read the next page; absent on the last page.",
9869
+ "type": [
9870
+ "string",
9871
+ "null"
9872
+ ]
9814
9873
  }
9815
9874
  },
9816
9875
  "type": "object"
9817
9876
  },
9877
+ "EnvironmentObservedTargetView": {
9878
+ "description": "What the provider last reported about a provisioned environment's\ntarget. Display only: Lightspeed never converges it, and it may be up to\na few minutes old.",
9879
+ "properties": {
9880
+ "message": {
9881
+ "type": [
9882
+ "string",
9883
+ "null"
9884
+ ]
9885
+ },
9886
+ "observedAtMs": {
9887
+ "format": "int64",
9888
+ "type": "integer"
9889
+ },
9890
+ "phase": {
9891
+ "$ref": "#/definitions/EnvironmentTargetPhaseView"
9892
+ },
9893
+ "power": {
9894
+ "anyOf": [
9895
+ {
9896
+ "$ref": "#/definitions/EnvironmentPowerStateView"
9897
+ },
9898
+ {
9899
+ "type": "null"
9900
+ }
9901
+ ],
9902
+ "description": "Present only while `phase` is `active`."
9903
+ }
9904
+ },
9905
+ "required": [
9906
+ "phase",
9907
+ "observedAtMs"
9908
+ ],
9909
+ "type": "object"
9910
+ },
9818
9911
  "EnvironmentPowerPutParams": {
9819
9912
  "properties": {
9820
9913
  "environmentId": {
@@ -9826,7 +9919,7 @@
9826
9919
  "$ref": "#/definitions/EnvironmentPowerStateView"
9827
9920
  }
9828
9921
  ],
9829
- "description": "Desired steady power state. Must be one of the provider-reported\n`incarnation.powerStates`."
9922
+ "description": "Power state to move the target to; one of its template's\n`powerStates`."
9830
9923
  }
9831
9924
  },
9832
9925
  "required": [
@@ -9847,7 +9940,7 @@
9847
9940
  "type": "object"
9848
9941
  },
9849
9942
  "EnvironmentPowerStateView": {
9850
- "description": "Steady power state of a provisioned environment.",
9943
+ "description": "Power state of a provisioned environment's target.",
9851
9944
  "oneOf": [
9852
9945
  {
9853
9946
  "enum": [
@@ -9909,12 +10002,12 @@
9909
10002
  },
9910
10003
  "EnvironmentProviderBindingReadParams": {
9911
10004
  "properties": {
9912
- "bindingId": {
10005
+ "providerId": {
9913
10006
  "type": "string"
9914
10007
  }
9915
10008
  },
9916
10009
  "required": [
9917
- "bindingId"
10010
+ "providerId"
9918
10011
  ],
9919
10012
  "type": "object"
9920
10013
  },
@@ -9929,49 +10022,27 @@
9929
10022
  ],
9930
10023
  "type": "object"
9931
10024
  },
9932
- "EnvironmentProviderBindingStatusView": {
9933
- "enum": [
9934
- "enabled",
9935
- "disabled"
9936
- ],
9937
- "type": "string"
9938
- },
9939
10025
  "EnvironmentProviderBindingView": {
10026
+ "description": "A universe's binding to a deployment provider. Creates, templates and\ndata routes of the provider need it enabled.",
9940
10027
  "properties": {
9941
- "bindingId": {
9942
- "type": "string"
9943
- },
9944
10028
  "createdAtMs": {
9945
10029
  "format": "int64",
9946
10030
  "type": "integer"
9947
10031
  },
9948
- "metadata": {
9949
- "additionalProperties": {
9950
- "type": "string"
9951
- },
9952
- "type": "object"
10032
+ "enabled": {
10033
+ "type": "boolean"
9953
10034
  },
9954
10035
  "providerId": {
9955
10036
  "type": "string"
9956
10037
  },
9957
- "revision": {
9958
- "format": "uint64",
9959
- "minimum": 0,
9960
- "type": "integer"
9961
- },
9962
- "status": {
9963
- "$ref": "#/definitions/EnvironmentProviderBindingStatusView"
9964
- },
9965
10038
  "updatedAtMs": {
9966
10039
  "format": "int64",
9967
10040
  "type": "integer"
9968
10041
  }
9969
10042
  },
9970
10043
  "required": [
9971
- "bindingId",
9972
10044
  "providerId",
9973
- "status",
9974
- "revision",
10045
+ "enabled",
9975
10046
  "createdAtMs",
9976
10047
  "updatedAtMs"
9977
10048
  ],
@@ -10022,7 +10093,12 @@
10022
10093
  ]
10023
10094
  },
10024
10095
  "identityMode": {
10025
- "$ref": "#/definitions/EnvironmentIdentityModeView"
10096
+ "allOf": [
10097
+ {
10098
+ "$ref": "#/definitions/EnvironmentIdentityModeView"
10099
+ }
10100
+ ],
10101
+ "description": "Immutable once the key exists."
10026
10102
  },
10027
10103
  "maxActiveEnvironments": {
10028
10104
  "description": "Non-closed environments the key may have at once; omit for unlimited.",
@@ -10032,6 +10108,15 @@
10032
10108
  "integer",
10033
10109
  "null"
10034
10110
  ]
10111
+ },
10112
+ "offlineCloseAfterMs": {
10113
+ "description": "Persistent keys only: close environments whose daemon has been away\nlonger than this; omit to keep them open.",
10114
+ "format": "uint64",
10115
+ "minimum": 0,
10116
+ "type": [
10117
+ "integer",
10118
+ "null"
10119
+ ]
10035
10120
  }
10036
10121
  },
10037
10122
  "required": [
@@ -10131,6 +10216,37 @@
10131
10216
  ],
10132
10217
  "type": "object"
10133
10218
  },
10219
+ "EnvironmentRegistrationKeyRotateParams": {
10220
+ "properties": {
10221
+ "registrationKeyId": {
10222
+ "type": "string"
10223
+ }
10224
+ },
10225
+ "required": [
10226
+ "registrationKeyId"
10227
+ ],
10228
+ "type": "object"
10229
+ },
10230
+ "EnvironmentRegistrationKeyRotateResponse": {
10231
+ "properties": {
10232
+ "registrationKey": {
10233
+ "$ref": "#/definitions/EnvironmentRegistrationKeyView"
10234
+ },
10235
+ "secret": {
10236
+ "allOf": [
10237
+ {
10238
+ "$ref": "#/definitions/EnvironmentRegistrationSecretView"
10239
+ }
10240
+ ],
10241
+ "description": "The new plaintext secret, returned only here."
10242
+ }
10243
+ },
10244
+ "required": [
10245
+ "registrationKey",
10246
+ "secret"
10247
+ ],
10248
+ "type": "object"
10249
+ },
10134
10250
  "EnvironmentRegistrationKeyStatusView": {
10135
10251
  "enum": [
10136
10252
  "active",
@@ -10139,6 +10255,68 @@
10139
10255
  ],
10140
10256
  "type": "string"
10141
10257
  },
10258
+ "EnvironmentRegistrationKeyUpdateParams": {
10259
+ "description": "The complete editable policy of a registration key; an absent field is\nunset. The identity mode is immutable.",
10260
+ "properties": {
10261
+ "displayName": {
10262
+ "description": "Group name for the environments this key admits.",
10263
+ "type": "string"
10264
+ },
10265
+ "ephemeralDisconnectGraceMs": {
10266
+ "description": "Disconnect grace for ephemeral environments; omit for the default.",
10267
+ "format": "uint64",
10268
+ "minimum": 0,
10269
+ "type": [
10270
+ "integer",
10271
+ "null"
10272
+ ]
10273
+ },
10274
+ "expiresAtMs": {
10275
+ "format": "int64",
10276
+ "type": [
10277
+ "integer",
10278
+ "null"
10279
+ ]
10280
+ },
10281
+ "maxActiveEnvironments": {
10282
+ "description": "Non-closed environments the key may have at once; omit for unlimited.",
10283
+ "format": "uint32",
10284
+ "minimum": 0,
10285
+ "type": [
10286
+ "integer",
10287
+ "null"
10288
+ ]
10289
+ },
10290
+ "offlineCloseAfterMs": {
10291
+ "description": "Persistent keys only: close environments whose daemon has been away\nlonger than this; omit to keep them open.",
10292
+ "format": "uint64",
10293
+ "minimum": 0,
10294
+ "type": [
10295
+ "integer",
10296
+ "null"
10297
+ ]
10298
+ },
10299
+ "registrationKeyId": {
10300
+ "type": "string"
10301
+ }
10302
+ },
10303
+ "required": [
10304
+ "registrationKeyId",
10305
+ "displayName"
10306
+ ],
10307
+ "type": "object"
10308
+ },
10309
+ "EnvironmentRegistrationKeyUpdateResponse": {
10310
+ "properties": {
10311
+ "registrationKey": {
10312
+ "$ref": "#/definitions/EnvironmentRegistrationKeyView"
10313
+ }
10314
+ },
10315
+ "required": [
10316
+ "registrationKey"
10317
+ ],
10318
+ "type": "object"
10319
+ },
10142
10320
  "EnvironmentRegistrationKeyView": {
10143
10321
  "properties": {
10144
10322
  "activeEnvironmentCount": {
@@ -10172,7 +10350,7 @@
10172
10350
  "$ref": "#/definitions/EnvironmentIdentityModeView"
10173
10351
  },
10174
10352
  "keyPrefix": {
10175
- "description": "First characters of the secret, for identification only.",
10353
+ "description": "First characters of the key's live secret, for identification only.",
10176
10354
  "type": "string"
10177
10355
  },
10178
10356
  "lastRegisteredAtMs": {
@@ -10190,6 +10368,15 @@
10190
10368
  "null"
10191
10369
  ]
10192
10370
  },
10371
+ "offlineCloseAfterMs": {
10372
+ "description": "Persistent keys only: environments whose daemon has been away longer\nthan this are closed; absent keeps them open.",
10373
+ "format": "uint64",
10374
+ "minimum": 0,
10375
+ "type": [
10376
+ "integer",
10377
+ "null"
10378
+ ]
10379
+ },
10193
10380
  "registeredEnvironmentCount": {
10194
10381
  "description": "Environments ever admitted by this key, closed included.",
10195
10382
  "format": "uint64",
@@ -10208,6 +10395,10 @@
10208
10395
  },
10209
10396
  "status": {
10210
10397
  "$ref": "#/definitions/EnvironmentRegistrationKeyStatusView"
10398
+ },
10399
+ "updatedAtMs": {
10400
+ "format": "int64",
10401
+ "type": "integer"
10211
10402
  }
10212
10403
  },
10213
10404
  "required": [
@@ -10219,7 +10410,8 @@
10219
10410
  "status",
10220
10411
  "registeredEnvironmentCount",
10221
10412
  "activeEnvironmentCount",
10222
- "createdAtMs"
10413
+ "createdAtMs",
10414
+ "updatedAtMs"
10223
10415
  ],
10224
10416
  "type": "object"
10225
10417
  },
@@ -10248,13 +10440,50 @@
10248
10440
  "EnvironmentSourceView": {
10249
10441
  "oneOf": [
10250
10442
  {
10443
+ "description": "A target a deployment provider created from a template. The provider\nowns its power, idle policy and ingress.",
10251
10444
  "properties": {
10252
- "bindingId": {
10253
- "type": "string"
10445
+ "idle": {
10446
+ "anyOf": [
10447
+ {
10448
+ "$ref": "#/definitions/EnvironmentIdlePolicyView"
10449
+ },
10450
+ {
10451
+ "type": "null"
10452
+ }
10453
+ ],
10454
+ "description": "The create-time idle policy, when one replaced the template's."
10455
+ },
10456
+ "observed": {
10457
+ "anyOf": [
10458
+ {
10459
+ "$ref": "#/definitions/EnvironmentObservedTargetView"
10460
+ },
10461
+ {
10462
+ "type": "null"
10463
+ }
10464
+ ],
10465
+ "description": "Absent until the provider first reported the target."
10254
10466
  },
10255
10467
  "providerId": {
10256
10468
  "type": "string"
10257
10469
  },
10470
+ "publicEndpoint": {
10471
+ "description": "The public endpoint the provider last reported.",
10472
+ "type": [
10473
+ "string",
10474
+ "null"
10475
+ ]
10476
+ },
10477
+ "targetId": {
10478
+ "description": "The provider's handle for the target; absent until the provider\naccepted the create.",
10479
+ "type": [
10480
+ "string",
10481
+ "null"
10482
+ ]
10483
+ },
10484
+ "templateId": {
10485
+ "type": "string"
10486
+ },
10258
10487
  "type": {
10259
10488
  "const": "provisioned",
10260
10489
  "type": "string"
@@ -10263,14 +10492,15 @@
10263
10492
  "required": [
10264
10493
  "type",
10265
10494
  "providerId",
10266
- "bindingId"
10495
+ "templateId"
10267
10496
  ],
10268
10497
  "type": "object"
10269
10498
  },
10270
10499
  {
10271
10500
  "properties": {
10272
- "connection": {
10273
- "$ref": "#/definitions/EnvironmentConnectionView"
10501
+ "endpoint": {
10502
+ "description": "`ws://`, `wss://` or `unix://` URL Lightspeed dials envd at.",
10503
+ "type": "string"
10274
10504
  },
10275
10505
  "type": {
10276
10506
  "const": "external",
@@ -10279,18 +10509,37 @@
10279
10509
  },
10280
10510
  "required": [
10281
10511
  "type",
10282
- "connection"
10512
+ "endpoint"
10283
10513
  ],
10284
10514
  "type": "object"
10285
10515
  },
10286
10516
  {
10287
10517
  "description": "An envd that dialed the gateway outbound and was admitted by a\nregistration key. The key is the environment's group; the daemon id\nis derived from the daemon's public key and is its identity.",
10288
10518
  "properties": {
10519
+ "connected": {
10520
+ "description": "The daemon's control connection is up.",
10521
+ "type": "boolean"
10522
+ },
10523
+ "connectionChangedAtMs": {
10524
+ "description": "When the daemon last connected or disconnected.",
10525
+ "format": "int64",
10526
+ "type": "integer"
10527
+ },
10289
10528
  "daemonId": {
10290
10529
  "type": "string"
10291
10530
  },
10292
10531
  "identityMode": {
10293
- "$ref": "#/definitions/EnvironmentIdentityModeView"
10532
+ "allOf": [
10533
+ {
10534
+ "$ref": "#/definitions/EnvironmentIdentityModeView"
10535
+ }
10536
+ ],
10537
+ "description": "The admitting key's identity mode."
10538
+ },
10539
+ "lastSeenAtMs": {
10540
+ "description": "When the gateway last recorded the daemon's control connection:\nat connect, at disconnect, and at most every five minutes while\nconnected.",
10541
+ "format": "int64",
10542
+ "type": "integer"
10294
10543
  },
10295
10544
  "registrationKeyId": {
10296
10545
  "type": "string"
@@ -10304,15 +10553,98 @@
10304
10553
  "type",
10305
10554
  "registrationKeyId",
10306
10555
  "daemonId",
10307
- "identityMode"
10556
+ "identityMode",
10557
+ "connected",
10558
+ "connectionChangedAtMs",
10559
+ "lastSeenAtMs"
10308
10560
  ],
10309
10561
  "type": "object"
10310
10562
  }
10311
10563
  ]
10312
10564
  },
10565
+ "EnvironmentStateView": {
10566
+ "description": "The lifecycle Lightspeed owns. External and registered environments are\nonly ever `open` or `closed`.",
10567
+ "oneOf": [
10568
+ {
10569
+ "enum": [
10570
+ "open",
10571
+ "closed"
10572
+ ],
10573
+ "type": "string"
10574
+ },
10575
+ {
10576
+ "const": "provisioning",
10577
+ "description": "The provider is creating the target; the environment opens after\nLightspeed's first handshake with its envd.",
10578
+ "type": "string"
10579
+ },
10580
+ {
10581
+ "const": "closing",
10582
+ "description": "The provider is removing the target.",
10583
+ "type": "string"
10584
+ },
10585
+ {
10586
+ "const": "failed",
10587
+ "description": "Provisioning or the provider failed; `stateMessage` says why.",
10588
+ "type": "string"
10589
+ }
10590
+ ]
10591
+ },
10592
+ "EnvironmentStatusView": {
10593
+ "description": "Display status derived from `state` and the latest observation; never\nstored. Tools that use a paused, suspended or stopped environment wake\nit.",
10594
+ "oneOf": [
10595
+ {
10596
+ "enum": [
10597
+ "provisioning",
10598
+ "ready",
10599
+ "closing",
10600
+ "closed",
10601
+ "failed"
10602
+ ],
10603
+ "type": "string"
10604
+ },
10605
+ {
10606
+ "const": "paused",
10607
+ "description": "Execution frozen with RAM resident.",
10608
+ "type": "string"
10609
+ },
10610
+ {
10611
+ "const": "suspended",
10612
+ "description": "Execution state saved to disk.",
10613
+ "type": "string"
10614
+ },
10615
+ {
10616
+ "const": "stopped",
10617
+ "description": "Powered off with disk retained.",
10618
+ "type": "string"
10619
+ },
10620
+ {
10621
+ "const": "unknown",
10622
+ "description": "Open, but the provider's latest observation is inconclusive.",
10623
+ "type": "string"
10624
+ },
10625
+ {
10626
+ "const": "away",
10627
+ "description": "Registered, open, and its daemon is not connected.",
10628
+ "type": "string"
10629
+ }
10630
+ ]
10631
+ },
10632
+ "EnvironmentTargetPhaseView": {
10633
+ "description": "Lifecycle phase of a provider target, as the provider reports it.",
10634
+ "enum": [
10635
+ "provisioning",
10636
+ "active",
10637
+ "closing",
10638
+ "closed",
10639
+ "failed",
10640
+ "unknown"
10641
+ ],
10642
+ "type": "string"
10643
+ },
10313
10644
  "EnvironmentTemplateListParams": {
10314
10645
  "properties": {
10315
- "bindingId": {
10646
+ "providerId": {
10647
+ "description": "Only this provider's templates; omit for every enabled binding.",
10316
10648
  "type": [
10317
10649
  "string",
10318
10650
  "null"
@@ -10337,7 +10669,7 @@
10337
10669
  },
10338
10670
  "EnvironmentTemplateReadParams": {
10339
10671
  "properties": {
10340
- "bindingId": {
10672
+ "providerId": {
10341
10673
  "type": "string"
10342
10674
  },
10343
10675
  "templateId": {
@@ -10345,7 +10677,7 @@
10345
10677
  }
10346
10678
  },
10347
10679
  "required": [
10348
- "bindingId",
10680
+ "providerId",
10349
10681
  "templateId"
10350
10682
  ],
10351
10683
  "type": "object"
@@ -10361,11 +10693,38 @@
10361
10693
  ],
10362
10694
  "type": "object"
10363
10695
  },
10364
- "EnvironmentTemplateView": {
10696
+ "EnvironmentTemplateResourcesView": {
10697
+ "description": "A template's compute, in provider-neutral units. Each field is absent\nwhen the provider does not fix it.",
10365
10698
  "properties": {
10366
- "bindingId": {
10367
- "type": "string"
10699
+ "diskBytes": {
10700
+ "format": "uint64",
10701
+ "minimum": 0,
10702
+ "type": [
10703
+ "integer",
10704
+ "null"
10705
+ ]
10706
+ },
10707
+ "memoryBytes": {
10708
+ "format": "uint64",
10709
+ "minimum": 0,
10710
+ "type": [
10711
+ "integer",
10712
+ "null"
10713
+ ]
10368
10714
  },
10715
+ "vcpus": {
10716
+ "format": "uint32",
10717
+ "minimum": 0,
10718
+ "type": [
10719
+ "integer",
10720
+ "null"
10721
+ ]
10722
+ }
10723
+ },
10724
+ "type": "object"
10725
+ },
10726
+ "EnvironmentTemplateView": {
10727
+ "properties": {
10369
10728
  "deprecated": {
10370
10729
  "type": "boolean"
10371
10730
  },
@@ -10378,18 +10737,48 @@
10378
10737
  "displayName": {
10379
10738
  "type": "string"
10380
10739
  },
10740
+ "idle": {
10741
+ "anyOf": [
10742
+ {
10743
+ "$ref": "#/definitions/EnvironmentIdlePolicyView"
10744
+ },
10745
+ {
10746
+ "type": "null"
10747
+ }
10748
+ ],
10749
+ "description": "Idle policy targets get when `environments/create` names none."
10750
+ },
10381
10751
  "metadata": {
10382
10752
  "additionalProperties": {
10383
10753
  "type": "string"
10384
10754
  },
10385
10755
  "type": "object"
10386
10756
  },
10757
+ "powerStates": {
10758
+ "description": "Power states `environments/power/put` can move targets of this\ntemplate to; empty without power control.",
10759
+ "items": {
10760
+ "$ref": "#/definitions/EnvironmentPowerStateView"
10761
+ },
10762
+ "type": "array"
10763
+ },
10387
10764
  "providerId": {
10388
10765
  "type": "string"
10389
10766
  },
10390
10767
  "publicIngress": {
10768
+ "description": "`environments/ingress/put` can enable public ingress on targets of\nthis template.",
10391
10769
  "type": "boolean"
10392
10770
  },
10771
+ "resources": {
10772
+ "anyOf": [
10773
+ {
10774
+ "$ref": "#/definitions/EnvironmentTemplateResourcesView"
10775
+ },
10776
+ {
10777
+ "type": "null"
10778
+ }
10779
+ ],
10780
+ "description": "Compute targets of this template get; absent when the provider does\nnot fix it."
10781
+ },
10393
10782
  "templateId": {
10394
10783
  "type": "string"
10395
10784
  }
@@ -10397,28 +10786,18 @@
10397
10786
  "required": [
10398
10787
  "templateId",
10399
10788
  "providerId",
10400
- "bindingId",
10401
10789
  "displayName",
10402
10790
  "publicIngress",
10403
- "deprecated"
10791
+ "deprecated",
10792
+ "powerStates"
10404
10793
  ],
10405
10794
  "type": "object"
10406
10795
  },
10407
- "EnvironmentView": {
10796
+ "EnvironmentUpdateParams": {
10797
+ "description": "Replace an environment's display name and caller metadata.",
10408
10798
  "properties": {
10409
- "createdAtMs": {
10410
- "format": "int64",
10411
- "type": "integer"
10412
- },
10413
- "desiredPower": {
10414
- "allOf": [
10415
- {
10416
- "$ref": "#/definitions/EnvironmentPowerStateView"
10417
- }
10418
- ],
10419
- "description": "Lightspeed-owned power intent; `status` is the observed state."
10420
- },
10421
10799
  "displayName": {
10800
+ "description": "The new display name; omit to clear it.",
10422
10801
  "type": [
10423
10802
  "string",
10424
10803
  "null"
@@ -10427,50 +10806,108 @@
10427
10806
  "environmentId": {
10428
10807
  "type": "string"
10429
10808
  },
10430
- "idlePolicy": {
10809
+ "metadata": {
10810
+ "additionalProperties": {
10811
+ "type": "string"
10812
+ },
10813
+ "description": "The complete new caller metadata; omit or `{}` to clear it.",
10814
+ "type": "object"
10815
+ }
10816
+ },
10817
+ "required": [
10818
+ "environmentId"
10819
+ ],
10820
+ "type": "object"
10821
+ },
10822
+ "EnvironmentUpdateResponse": {
10823
+ "properties": {
10824
+ "environment": {
10825
+ "$ref": "#/definitions/EnvironmentView"
10826
+ }
10827
+ },
10828
+ "required": [
10829
+ "environment"
10830
+ ],
10831
+ "type": "object"
10832
+ },
10833
+ "EnvironmentView": {
10834
+ "properties": {
10835
+ "closeReason": {
10431
10836
  "anyOf": [
10432
10837
  {
10433
- "$ref": "#/definitions/EnvironmentIdlePolicyView"
10838
+ "$ref": "#/definitions/EnvironmentCloseReasonView"
10434
10839
  },
10435
10840
  {
10436
10841
  "type": "null"
10437
10842
  }
10438
- ]
10843
+ ],
10844
+ "description": "Present exactly while `state` is `closing` or `closed`."
10439
10845
  },
10440
- "incarnation": {
10441
- "$ref": "#/definitions/EnvironmentIncarnationView"
10846
+ "closedAtMs": {
10847
+ "format": "int64",
10848
+ "type": [
10849
+ "integer",
10850
+ "null"
10851
+ ]
10442
10852
  },
10443
- "lastSeenAtMs": {
10444
- "description": "Registered environments only: when the gateway last saw the daemon's\ncontrol connection.",
10853
+ "createdAtMs": {
10445
10854
  "format": "int64",
10855
+ "type": "integer"
10856
+ },
10857
+ "daemon": {
10858
+ "anyOf": [
10859
+ {
10860
+ "$ref": "#/definitions/EnvironmentDaemonView"
10861
+ },
10862
+ {
10863
+ "type": "null"
10864
+ }
10865
+ ],
10866
+ "description": "The envd build serving the environment; absent until known."
10867
+ },
10868
+ "displayName": {
10446
10869
  "type": [
10447
- "integer",
10870
+ "string",
10448
10871
  "null"
10449
10872
  ]
10450
10873
  },
10874
+ "environmentId": {
10875
+ "type": "string"
10876
+ },
10451
10877
  "metadata": {
10452
10878
  "additionalProperties": {
10453
10879
  "type": "string"
10454
10880
  },
10881
+ "description": "Caller metadata.",
10455
10882
  "type": "object"
10456
10883
  },
10457
- "publicEndpoint": {
10884
+ "requestId": {
10885
+ "description": "The caller's retry identity; absent for registered environments.",
10458
10886
  "type": [
10459
10887
  "string",
10460
10888
  "null"
10461
10889
  ]
10462
10890
  },
10463
- "publicIngressEnabled": {
10464
- "type": "boolean"
10465
- },
10466
- "requestId": {
10467
- "type": "string"
10468
- },
10469
10891
  "source": {
10470
10892
  "$ref": "#/definitions/EnvironmentSourceView"
10471
10893
  },
10894
+ "state": {
10895
+ "$ref": "#/definitions/EnvironmentStateView"
10896
+ },
10897
+ "stateChangedAtMs": {
10898
+ "description": "When `state` last changed.",
10899
+ "format": "int64",
10900
+ "type": "integer"
10901
+ },
10902
+ "stateMessage": {
10903
+ "description": "Why the environment failed, or what provisioning or closing is\nwaiting on.",
10904
+ "type": [
10905
+ "string",
10906
+ "null"
10907
+ ]
10908
+ },
10472
10909
  "status": {
10473
- "$ref": "#/definitions/EnvironmentLifecycleStatusView"
10910
+ "$ref": "#/definitions/EnvironmentStatusView"
10474
10911
  },
10475
10912
  "updatedAtMs": {
10476
10913
  "format": "int64",
@@ -10479,12 +10916,10 @@
10479
10916
  },
10480
10917
  "required": [
10481
10918
  "environmentId",
10482
- "requestId",
10483
10919
  "source",
10920
+ "state",
10484
10921
  "status",
10485
- "desiredPower",
10486
- "incarnation",
10487
- "publicIngressEnabled",
10922
+ "stateChangedAtMs",
10488
10923
  "createdAtMs",
10489
10924
  "updatedAtMs"
10490
10925
  ],
@@ -10630,6 +11065,16 @@
10630
11065
  "additionalProperties": false,
10631
11066
  "description": "Capability grants. An absent feature is not granted; `{}` grants it with\ndefaults. Every block carries a behavior `version` that pins semantics.",
10632
11067
  "properties": {
11068
+ "codeMode": {
11069
+ "anyOf": [
11070
+ {
11071
+ "$ref": "#/definitions/CodeModeFeature"
11072
+ },
11073
+ {
11074
+ "type": "null"
11075
+ }
11076
+ ]
11077
+ },
10633
11078
  "environments": {
10634
11079
  "anyOf": [
10635
11080
  {
@@ -11998,7 +12443,8 @@
11998
12443
  "mcp",
11999
12444
  "bots",
12000
12445
  "deployment/universes",
12001
- "deployment/api-keys"
12446
+ "deployment/api-keys",
12447
+ "deployment/sessions"
12002
12448
  ],
12003
12449
  "type": "string"
12004
12450
  },
@@ -12007,6 +12453,11 @@
12007
12453
  "description": "`session/*`, `blobs/read` and `blobs/has`.",
12008
12454
  "type": "string"
12009
12455
  },
12456
+ {
12457
+ "const": "session/delete",
12458
+ "description": "Destructive session operations and deletion retention.",
12459
+ "type": "string"
12460
+ },
12010
12461
  {
12011
12462
  "const": "blobs/put",
12012
12463
  "description": "`blobs/put` alone, so connectors can upload attachments without\nreading sessions.",
@@ -12039,7 +12490,7 @@
12039
12490
  },
12040
12491
  {
12041
12492
  "const": "deployment/environment-providers",
12042
- "description": "Environment providers, their bindings and adoption.",
12493
+ "description": "Environment providers and their universe bindings.",
12043
12494
  "type": "string"
12044
12495
  },
12045
12496
  {
@@ -13892,6 +14343,14 @@
13892
14343
  },
13893
14344
  "sessionId": {
13894
14345
  "type": "string"
14346
+ },
14347
+ "sharedOnly": {
14348
+ "description": "Atomically require every selected session's audience to be shared.\nDelegating services use this guard for operators deleting shared work.",
14349
+ "type": "boolean"
14350
+ },
14351
+ "softDelete": {
14352
+ "description": "Hide sessions while retaining records, events, checkpoints and blob roots.\nFalse (the default) permanently deletes them without prior soft deletion.",
14353
+ "type": "boolean"
13895
14354
  }
13896
14355
  },
13897
14356
  "required": [
@@ -15344,6 +15803,43 @@
15344
15803
  "batchId"
15345
15804
  ],
15346
15805
  "type": "object"
15806
+ },
15807
+ {
15808
+ "description": "Progress of a code tool execution. This preserves the contiguous session\nevent cursor without projecting internal scope bindings or payloads as\nconversational tool calls.",
15809
+ "properties": {
15810
+ "executionId": {
15811
+ "type": "string"
15812
+ },
15813
+ "phase": {
15814
+ "$ref": "#/definitions/CodeToolProgressPhase"
15815
+ },
15816
+ "requestId": {
15817
+ "type": [
15818
+ "string",
15819
+ "null"
15820
+ ]
15821
+ },
15822
+ "status": {
15823
+ "anyOf": [
15824
+ {
15825
+ "$ref": "#/definitions/ToolItemStatus"
15826
+ },
15827
+ {
15828
+ "type": "null"
15829
+ }
15830
+ ]
15831
+ },
15832
+ "type": {
15833
+ "const": "codeToolProgress",
15834
+ "type": "string"
15835
+ }
15836
+ },
15837
+ "required": [
15838
+ "type",
15839
+ "executionId",
15840
+ "phase"
15841
+ ],
15842
+ "type": "object"
15347
15843
  }
15348
15844
  ]
15349
15845
  },
@@ -15485,29 +15981,6 @@
15485
15981
  ],
15486
15982
  "type": "object"
15487
15983
  },
15488
- "SessionJobArtifactView": {
15489
- "properties": {
15490
- "kind": {
15491
- "type": [
15492
- "string",
15493
- "null"
15494
- ]
15495
- },
15496
- "metadata": {
15497
- "additionalProperties": {
15498
- "type": "string"
15499
- },
15500
- "type": "object"
15501
- },
15502
- "path": {
15503
- "type": "string"
15504
- }
15505
- },
15506
- "required": [
15507
- "path"
15508
- ],
15509
- "type": "object"
15510
- },
15511
15984
  "SessionJobCancelEntryView": {
15512
15985
  "properties": {
15513
15986
  "error": {
@@ -15570,6 +16043,49 @@
15570
16043
  ],
15571
16044
  "type": "string"
15572
16045
  },
16046
+ "SessionJobExitView": {
16047
+ "description": "How a job's root process ended.",
16048
+ "oneOf": [
16049
+ {
16050
+ "description": "Normal exit with this status code.",
16051
+ "properties": {
16052
+ "code": {
16053
+ "format": "int32",
16054
+ "type": "integer"
16055
+ },
16056
+ "type": {
16057
+ "const": "code",
16058
+ "type": "string"
16059
+ }
16060
+ },
16061
+ "required": [
16062
+ "type",
16063
+ "code"
16064
+ ],
16065
+ "type": "object"
16066
+ },
16067
+ {
16068
+ "description": "Killed by this signal, named like `SIGSEGV`.",
16069
+ "properties": {
16070
+ "coreDumped": {
16071
+ "type": "boolean"
16072
+ },
16073
+ "signal": {
16074
+ "type": "string"
16075
+ },
16076
+ "type": {
16077
+ "const": "signal",
16078
+ "type": "string"
16079
+ }
16080
+ },
16081
+ "required": [
16082
+ "type",
16083
+ "signal"
16084
+ ],
16085
+ "type": "object"
16086
+ }
16087
+ ]
16088
+ },
15573
16089
  "SessionJobHandleInput": {
15574
16090
  "properties": {
15575
16091
  "environmentId": {
@@ -15605,7 +16121,8 @@
15605
16121
  "dataBase64": {
15606
16122
  "type": "string"
15607
16123
  },
15608
- "seq": {
16124
+ "offset": {
16125
+ "description": "Byte offset of the chunk's first byte in the job's combined output.",
15609
16126
  "format": "uint64",
15610
16127
  "minimum": 0,
15611
16128
  "type": "integer"
@@ -15615,12 +16132,50 @@
15615
16132
  }
15616
16133
  },
15617
16134
  "required": [
15618
- "seq",
16135
+ "offset",
15619
16136
  "stream",
15620
16137
  "dataBase64"
15621
16138
  ],
15622
16139
  "type": "object"
15623
16140
  },
16141
+ "SessionJobOutputGapReasonView": {
16142
+ "oneOf": [
16143
+ {
16144
+ "const": "overflow",
16145
+ "description": "Dropped from the middle because the job's retained output exceeded\nits cap; the head and the newest bytes are kept.",
16146
+ "type": "string"
16147
+ },
16148
+ {
16149
+ "const": "expired",
16150
+ "description": "Released after it was delivered.",
16151
+ "type": "string"
16152
+ }
16153
+ ]
16154
+ },
16155
+ "SessionJobOutputGapView": {
16156
+ "description": "Output bytes in `[offset, offset + omittedBytes)` that cannot be\nreturned.",
16157
+ "properties": {
16158
+ "offset": {
16159
+ "format": "uint64",
16160
+ "minimum": 0,
16161
+ "type": "integer"
16162
+ },
16163
+ "omittedBytes": {
16164
+ "format": "uint64",
16165
+ "minimum": 0,
16166
+ "type": "integer"
16167
+ },
16168
+ "reason": {
16169
+ "$ref": "#/definitions/SessionJobOutputGapReasonView"
16170
+ }
16171
+ },
16172
+ "required": [
16173
+ "offset",
16174
+ "omittedBytes",
16175
+ "reason"
16176
+ ],
16177
+ "type": "object"
16178
+ },
15624
16179
  "SessionJobOutputStreamView": {
15625
16180
  "enum": [
15626
16181
  "stdout",
@@ -15629,13 +16184,8 @@
15629
16184
  "type": "string"
15630
16185
  },
15631
16186
  "SessionJobReadEntryView": {
16187
+ "description": "One job's summary and output page, or why it could not be read: an\nentry with `error` and no summary names a job the environment does not\nknow (never created, or garbage-collected).",
15632
16188
  "properties": {
15633
- "artifacts": {
15634
- "items": {
15635
- "$ref": "#/definitions/SessionJobArtifactView"
15636
- },
15637
- "type": "array"
15638
- },
15639
16189
  "error": {
15640
16190
  "type": [
15641
16191
  "string",
@@ -15653,12 +16203,27 @@
15653
16203
  ]
15654
16204
  },
15655
16205
  "outputChunks": {
16206
+ "description": "Output in offset order.",
15656
16207
  "items": {
15657
16208
  "$ref": "#/definitions/SessionJobOutputChunkView"
15658
16209
  },
15659
16210
  "type": "array"
15660
16211
  },
15661
- "outputNextSeq": {
16212
+ "outputEnd": {
16213
+ "description": "Output bytes the job produced so far; final once it is terminal.",
16214
+ "format": "uint64",
16215
+ "minimum": 0,
16216
+ "type": "integer"
16217
+ },
16218
+ "outputGaps": {
16219
+ "description": "Output ranges between the requested start and `outputNext` that\ncannot be returned.",
16220
+ "items": {
16221
+ "$ref": "#/definitions/SessionJobOutputGapView"
16222
+ },
16223
+ "type": "array"
16224
+ },
16225
+ "outputNext": {
16226
+ "description": "Byte offset to continue reading from: pass it as `after`.",
15662
16227
  "format": "uint64",
15663
16228
  "minimum": 0,
15664
16229
  "type": "integer"
@@ -15675,7 +16240,8 @@
15675
16240
  }
15676
16241
  },
15677
16242
  "required": [
15678
- "outputNextSeq"
16243
+ "outputNext",
16244
+ "outputEnd"
15679
16245
  ],
15680
16246
  "type": "object"
15681
16247
  },
@@ -15795,26 +16361,84 @@
15795
16361
  "type": "object"
15796
16362
  },
15797
16363
  "SessionJobStatusView": {
15798
- "enum": [
15799
- "accepted",
15800
- "queued",
15801
- "running",
15802
- "succeeded",
15803
- "failed",
15804
- "cancelRequested",
15805
- "cancelled",
15806
- "timedOut",
15807
- "dependencyFailed",
15808
- "interrupted",
15809
- "lost"
15810
- ],
15811
- "type": "string"
16364
+ "description": "Job lifecycle. `queued` and `running` are live; the rest are terminal.",
16365
+ "oneOf": [
16366
+ {
16367
+ "enum": [
16368
+ "running"
16369
+ ],
16370
+ "type": "string"
16371
+ },
16372
+ {
16373
+ "const": "queued",
16374
+ "description": "Waiting for dependencies or its queue.",
16375
+ "type": "string"
16376
+ },
16377
+ {
16378
+ "const": "succeeded",
16379
+ "description": "Exited with code 0.",
16380
+ "type": "string"
16381
+ },
16382
+ {
16383
+ "const": "failed",
16384
+ "description": "Exited otherwise, or could not start.",
16385
+ "type": "string"
16386
+ },
16387
+ {
16388
+ "const": "timedOut",
16389
+ "description": "Its timeout expired and it was stopped.",
16390
+ "type": "string"
16391
+ },
16392
+ {
16393
+ "const": "cancelled",
16394
+ "description": "Stopped or never started because of a cancel.",
16395
+ "type": "string"
16396
+ },
16397
+ {
16398
+ "const": "dependencyFailed",
16399
+ "description": "A dependency did not finish as the dependency policy requires.",
16400
+ "type": "string"
16401
+ },
16402
+ {
16403
+ "const": "interrupted",
16404
+ "description": "The environment daemon stopped while the job was queued or running.",
16405
+ "type": "string"
16406
+ }
16407
+ ]
16408
+ },
16409
+ "SessionJobStoppedByView": {
16410
+ "description": "Why Lightspeed stopped a running job.",
16411
+ "oneOf": [
16412
+ {
16413
+ "const": "timeout",
16414
+ "description": "Its timeout expired: terminate, a grace period, then kill.",
16415
+ "type": "string"
16416
+ },
16417
+ {
16418
+ "const": "terminate",
16419
+ "description": "A cancel without `force`: terminate, a grace period, then kill.",
16420
+ "type": "string"
16421
+ },
16422
+ {
16423
+ "const": "kill",
16424
+ "description": "A cancel with `force`: killed at once.",
16425
+ "type": "string"
16426
+ }
16427
+ ]
15812
16428
  },
15813
16429
  "SessionJobSummaryView": {
16430
+ "description": "What a job is and how it ended. Instants are the environment's wall\nclock.",
15814
16431
  "properties": {
16432
+ "cancelRequestedAtMs": {
16433
+ "description": "When a cancel reached the job while it ran.",
16434
+ "format": "int64",
16435
+ "type": [
16436
+ "integer",
16437
+ "null"
16438
+ ]
16439
+ },
15815
16440
  "createdAtMs": {
15816
- "format": "uint64",
15817
- "minimum": 0,
16441
+ "format": "int64",
15818
16442
  "type": "integer"
15819
16443
  },
15820
16444
  "dependencies": {
@@ -15823,13 +16447,26 @@
15823
16447
  },
15824
16448
  "type": "array"
15825
16449
  },
15826
- "exitCode": {
15827
- "format": "int32",
16450
+ "durationMs": {
16451
+ "description": "Run time from start to finish, immune to clock jumps.",
16452
+ "format": "uint64",
16453
+ "minimum": 0,
15828
16454
  "type": [
15829
16455
  "integer",
15830
16456
  "null"
15831
16457
  ]
15832
16458
  },
16459
+ "exit": {
16460
+ "anyOf": [
16461
+ {
16462
+ "$ref": "#/definitions/SessionJobExitView"
16463
+ },
16464
+ {
16465
+ "type": "null"
16466
+ }
16467
+ ],
16468
+ "description": "How the job's root process ended, once it ran and exited."
16469
+ },
15833
16470
  "failure": {
15834
16471
  "type": [
15835
16472
  "string",
@@ -15837,8 +16474,7 @@
15837
16474
  ]
15838
16475
  },
15839
16476
  "finishedAtMs": {
15840
- "format": "uint64",
15841
- "minimum": 0,
16477
+ "format": "int64",
15842
16478
  "type": [
15843
16479
  "integer",
15844
16480
  "null"
@@ -15853,9 +16489,6 @@
15853
16489
  "null"
15854
16490
  ]
15855
16491
  },
15856
- "namespace": {
15857
- "type": "string"
15858
- },
15859
16492
  "orphanedDescendants": {
15860
16493
  "description": "True when the job's root process exited while descendants it spawned\nwere still running; the host terminated them best-effort at job\ncompletion.",
15861
16494
  "type": "boolean"
@@ -15867,16 +16500,18 @@
15867
16500
  ]
15868
16501
  },
15869
16502
  "queuedAtMs": {
15870
- "format": "uint64",
15871
- "minimum": 0,
16503
+ "format": "int64",
15872
16504
  "type": [
15873
16505
  "integer",
15874
16506
  "null"
15875
16507
  ]
15876
16508
  },
16509
+ "requestId": {
16510
+ "description": "The start request that created the job; part of its identity.",
16511
+ "type": "string"
16512
+ },
15877
16513
  "startedAtMs": {
15878
- "format": "uint64",
15879
- "minimum": 0,
16514
+ "format": "int64",
15880
16515
  "type": [
15881
16516
  "integer",
15882
16517
  "null"
@@ -15884,11 +16519,22 @@
15884
16519
  },
15885
16520
  "status": {
15886
16521
  "$ref": "#/definitions/SessionJobStatusView"
16522
+ },
16523
+ "stoppedBy": {
16524
+ "anyOf": [
16525
+ {
16526
+ "$ref": "#/definitions/SessionJobStoppedByView"
16527
+ },
16528
+ {
16529
+ "type": "null"
16530
+ }
16531
+ ],
16532
+ "description": "Set when Lightspeed stopped the running job."
15887
16533
  }
15888
16534
  },
15889
16535
  "required": [
15890
- "namespace",
15891
16536
  "jobId",
16537
+ "requestId",
15892
16538
  "status",
15893
16539
  "createdAtMs"
15894
16540
  ],
@@ -16184,7 +16830,7 @@
16184
16830
  "additionalProperties": false,
16185
16831
  "properties": {
16186
16832
  "deleteAfterCloseMs": {
16187
- "description": "Positive duration enables automatic tree deletion; null disables it.",
16833
+ "description": "Positive duration enables automatic tree soft deletion; null disables it.",
16188
16834
  "format": "uint64",
16189
16835
  "minimum": 1,
16190
16836
  "type": [
@@ -16289,7 +16935,7 @@
16289
16935
  ]
16290
16936
  },
16291
16937
  "deleteAfterCloseMs": {
16292
- "description": "Root-owned automatic deletion measured from close. Absent inherits a\nprofile default, explicit null keeps the tree, and a duration overrides\nthe profile.",
16938
+ "description": "Root-owned automatic soft deletion measured from close. Absent inherits a\nprofile default, explicit null keeps the tree, and a duration overrides\nthe profile.",
16293
16939
  "format": "uint64",
16294
16940
  "maximum": 3153600000000,
16295
16941
  "minimum": 1,
@@ -17005,6 +17651,11 @@
17005
17651
  "description": "Runs or controls a process.",
17006
17652
  "type": "string"
17007
17653
  },
17654
+ {
17655
+ "const": "code",
17656
+ "description": "Orchestrates tool calls in a code-mode script.",
17657
+ "type": "string"
17658
+ },
17008
17659
  {
17009
17660
  "const": "mcp",
17010
17661
  "description": "Calls a tool on an MCP server, through the builtin bridge or a\nprovider-native MCP block.",
@@ -17679,8 +18330,11 @@
17679
18330
  "read",
17680
18331
  "create_session",
17681
18332
  "control_session",
18333
+ "configure_session",
17682
18334
  "stop_session",
18335
+ "close_session",
17683
18336
  "delete_session",
18337
+ "set_session_retention",
17684
18338
  "create_profile",
17685
18339
  "manage_profile",
17686
18340
  "create_bot",