@leaflow/sdk 0.14.0 → 0.14.2

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.
@@ -421,6 +421,10 @@ export interface paths {
421
421
  * Run a command on an instance
422
422
  * @description Runs one command over SSH and returns what it wrote. **This is not a shell.** There is no terminal, no standard input and no way to answer a prompt: a command that waits for input produces nothing and is killed at the timeout. Chain steps with `&&`, or write a script and run that.
423
423
  *
424
+ * **A command that fails is still a 200.** Its failure is its own result, not this endpoint's: read `exit_code` for what it exited with and `stderr` for what it said, and decide from those. A `grep` that matches nothing exits 1 and is a perfectly successful call.
425
+ *
426
+ * The status therefore answers a different question — did the command run at all. A non-2xx means it did not, and nothing about the instance was changed by this request: it was suspended, not running or had no floating IP; or it refused the platform key; or the connection could not be opened. Retrying is meaningful in those cases and is not for a non-zero `exit_code`.
427
+ *
424
428
  * Three conditions must hold; the instance is unreachable otherwise:
425
429
  *
426
430
  * - it is `running`
@@ -523,6 +527,8 @@ export interface paths {
523
527
  *
524
528
  * A soft reboot has no effect once the system is unresponsive. Set `force` to reboot forcibly: a forced reboot does not wait for the operating system to shut down, so **unwritten data is lost**.
525
529
  *
530
+ * A forced reboot is accepted while the instance is already `rebooting`, which is the way out of a soft reboot the instance never carried out. Every other endpoint refuses an instance in a transient state, and a second soft reboot is refused as well.
531
+ *
526
532
  * An instance suspended by the platform must be unsuspended first.
527
533
  *
528
534
  * This endpoint returns immediately and the `status` it returns is the transient `rebooting`. Poll the instance until it settles at `running`.
@@ -1560,7 +1566,7 @@ export interface components {
1560
1566
  CommandResultResponseBody: {
1561
1567
  /**
1562
1568
  * Format: int64
1563
- * @description Null when the command was killed rather than finishing on its own, which includes the timeout
1569
+ * @description What the command exited with, 0 being success. Any other value is the command's own verdict and still arrives as a 200. Null when it was killed rather than exiting on its own, which includes the timeout — null is the absence of a verdict, not a successful one
1564
1570
  */
1565
1571
  exit_code: number | null;
1566
1572
  stderr: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {