@leaflow/sdk 0.14.1 → 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`
@@ -1562,7 +1566,7 @@ export interface components {
1562
1566
  CommandResultResponseBody: {
1563
1567
  /**
1564
1568
  * Format: int64
1565
- * @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
1566
1570
  */
1567
1571
  exit_code: number | null;
1568
1572
  stderr: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {