@shardflux/sdk 0.8.0 → 0.9.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.
- package/CHANGELOG.md +199 -0
- package/README.md +235 -6
- package/dist/account.d.ts +469 -0
- package/dist/account.js +620 -0
- package/dist/cell.d.ts +197 -8
- package/dist/cell.js +449 -31
- package/dist/client.d.ts +76 -5
- package/dist/client.js +114 -6
- package/dist/errors.d.ts +62 -3
- package/dist/errors.js +65 -1
- package/dist/executions.d.ts +120 -0
- package/dist/executions.js +99 -0
- package/dist/feedback.d.ts +67 -0
- package/dist/feedback.js +39 -0
- package/dist/generated/app-api.d.ts +12323 -8072
- package/dist/generated/cell-api.d.ts +463 -8
- package/dist/http.d.ts +7 -1
- package/dist/http.js +26 -7
- package/dist/index.d.ts +17 -6
- package/dist/index.js +5 -1
- package/dist/lifecycle.d.ts +27 -2
- package/dist/lifecycle.js +5 -0
- package/dist/progress.js +4 -2
- package/dist/templates.js +2 -2
- package/dist/tools.d.ts +28 -1
- package/dist/tools.js +153 -21
- package/dist/version-check.d.ts +101 -0
- package/dist/version-check.js +191 -0
- package/dist/workspace.d.ts +77 -5
- package/dist/workspace.js +164 -12
- package/package.json +1 -1
|
@@ -66,8 +66,20 @@ export interface paths {
|
|
|
66
66
|
get?: never;
|
|
67
67
|
put?: never;
|
|
68
68
|
/**
|
|
69
|
-
* Start a command (idempotent by session_id)
|
|
69
|
+
* Start a command (idempotent by session_id), or run an execution of a file-first workspace
|
|
70
70
|
* @description Requires tool `exec`. argv is executed directly (no shell).
|
|
71
|
+
*
|
|
72
|
+
* On a file-first workspace (contracts §29.2) this runs an execution:
|
|
73
|
+
* `execution_id` is required (the idempotency key), and the call
|
|
74
|
+
* answers when the command ended with an `ExecutionResult` (`201`
|
|
75
|
+
* when this call ran it; `200` when the execution already existed:
|
|
76
|
+
* its recorded result, after waiting for it if it was still running;
|
|
77
|
+
* a client that gives up waiting retries with the same id or polls
|
|
78
|
+
* `GET /executions/{execution_id}`). Refusals before anything ran
|
|
79
|
+
* leave the id unused: `409 workspace_busy` (`execution_in_progress`),
|
|
80
|
+
* `503 service_unavailable` (`no_execution_host`: no host with
|
|
81
|
+
* protocol feature `file_first` has room; retry), secret resolution
|
|
82
|
+
* errors as for processful starts.
|
|
71
83
|
*/
|
|
72
84
|
post: operations["execStart"];
|
|
73
85
|
delete?: never;
|
|
@@ -198,6 +210,33 @@ export interface paths {
|
|
|
198
210
|
patch?: never;
|
|
199
211
|
trace?: never;
|
|
200
212
|
};
|
|
213
|
+
"/v1/workspaces/{workspace_id}/executions/{execution_id}": {
|
|
214
|
+
parameters: {
|
|
215
|
+
query?: never;
|
|
216
|
+
header?: never;
|
|
217
|
+
path: {
|
|
218
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
219
|
+
execution_id: components["parameters"]["ExecutionId"];
|
|
220
|
+
};
|
|
221
|
+
cookie?: never;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* An execution of a file-first workspace (contracts §29.2)
|
|
225
|
+
* @description Requires tool `exec`. `200` with the result once the execution
|
|
226
|
+
* ended (`succeeded`, `failed` or `lost`), `202` with `state` `queued`
|
|
227
|
+
* or `running` (no output yet) while it runs; `404 not_found` for an
|
|
228
|
+
* unknown id. Results are kept 7 days. Processful workspaces: `409
|
|
229
|
+
* conflict`, `details.reason not_supported_for_mode`.
|
|
230
|
+
*/
|
|
231
|
+
get: operations["executionGet"];
|
|
232
|
+
put?: never;
|
|
233
|
+
post?: never;
|
|
234
|
+
delete?: never;
|
|
235
|
+
options?: never;
|
|
236
|
+
head?: never;
|
|
237
|
+
patch?: never;
|
|
238
|
+
trace?: never;
|
|
239
|
+
};
|
|
201
240
|
"/v1/workspaces/{workspace_id}/pty": {
|
|
202
241
|
parameters: {
|
|
203
242
|
query?: never;
|
|
@@ -431,6 +470,72 @@ export interface paths {
|
|
|
431
470
|
patch?: never;
|
|
432
471
|
trace?: never;
|
|
433
472
|
};
|
|
473
|
+
"/v1/workspaces/{workspace_id}/files/search": {
|
|
474
|
+
parameters: {
|
|
475
|
+
query?: never;
|
|
476
|
+
header?: never;
|
|
477
|
+
path: {
|
|
478
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
479
|
+
};
|
|
480
|
+
cookie?: never;
|
|
481
|
+
};
|
|
482
|
+
get?: never;
|
|
483
|
+
put?: never;
|
|
484
|
+
/**
|
|
485
|
+
* Search file contents under a directory (bounded; read-only)
|
|
486
|
+
* @description Walks `path` (default `/`), skipping `exclude` globs, files above
|
|
487
|
+
* `max_file_bytes`, binary files (a NUL byte in the first 8 KiB) and
|
|
488
|
+
* symbolic links, and returns matching lines in path order until
|
|
489
|
+
* `max_matches` or the time budget. `truncated` says whether the walk
|
|
490
|
+
* stopped early. Served from disk while the workspace sleeps
|
|
491
|
+
* (contracts §26.4). A workspace whose host predates search: `409
|
|
492
|
+
* conflict`, `details.reason host_feature_unavailable`,
|
|
493
|
+
* `details.feature file_search`, not retryable (contracts §26.7).
|
|
494
|
+
* Tool `files`.
|
|
495
|
+
*/
|
|
496
|
+
post: operations["fileSearch"];
|
|
497
|
+
delete?: never;
|
|
498
|
+
options?: never;
|
|
499
|
+
head?: never;
|
|
500
|
+
patch?: never;
|
|
501
|
+
trace?: never;
|
|
502
|
+
};
|
|
503
|
+
"/v1/workspaces/{workspace_id}/files/patch": {
|
|
504
|
+
parameters: {
|
|
505
|
+
query?: never;
|
|
506
|
+
header?: never;
|
|
507
|
+
path: {
|
|
508
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
509
|
+
};
|
|
510
|
+
cookie?: never;
|
|
511
|
+
};
|
|
512
|
+
get?: never;
|
|
513
|
+
put?: never;
|
|
514
|
+
/**
|
|
515
|
+
* Apply text edits to a file atomically, optionally requiring its current revision
|
|
516
|
+
* @description Exactly one of `edits` (each `old_text` must occur exactly once unless
|
|
517
|
+
* `replace_all`; applied in order) or `content` (replace the whole file).
|
|
518
|
+
* With `expected_revision` the file must currently have that revision
|
|
519
|
+
* (`absent`: it must not exist) or the call fails with `409 conflict`,
|
|
520
|
+
* `details.reason revision_mismatch`, `details.current_revision`
|
|
521
|
+
* (`absent` for a missing file). An existing file keeps its mode and
|
|
522
|
+
* owner. Edits that do not apply: `422 validation_failed`,
|
|
523
|
+
* `details.reason edit_not_found` or `edit_ambiguous`, `details.index`.
|
|
524
|
+
* Acknowledged after the file and its parent directory were fsync'd.
|
|
525
|
+
* Send `Idempotency-Key` to make a retry a no-op. Limits: request body
|
|
526
|
+
* up to 7 MiB (`413 payload_too_large`), files up to 64 MiB, a symlink
|
|
527
|
+
* target is refused. A workspace whose host predates patches: `409
|
|
528
|
+
* conflict`, `details.reason host_feature_unavailable`,
|
|
529
|
+
* `details.feature file_patch`, not retryable (contracts §26.7).
|
|
530
|
+
* Tool `files`.
|
|
531
|
+
*/
|
|
532
|
+
post: operations["filePatch"];
|
|
533
|
+
delete?: never;
|
|
534
|
+
options?: never;
|
|
535
|
+
head?: never;
|
|
536
|
+
patch?: never;
|
|
537
|
+
trace?: never;
|
|
538
|
+
};
|
|
434
539
|
"/v1/workspaces/{workspace_id}/files/move": {
|
|
435
540
|
parameters: {
|
|
436
541
|
query?: never;
|
|
@@ -547,6 +652,35 @@ export interface paths {
|
|
|
547
652
|
patch?: never;
|
|
548
653
|
trace?: never;
|
|
549
654
|
};
|
|
655
|
+
"/v1/workspaces/{workspace_id}/wake-hint": {
|
|
656
|
+
parameters: {
|
|
657
|
+
query?: never;
|
|
658
|
+
header?: never;
|
|
659
|
+
path: {
|
|
660
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
661
|
+
};
|
|
662
|
+
cookie?: never;
|
|
663
|
+
};
|
|
664
|
+
get?: never;
|
|
665
|
+
put?: never;
|
|
666
|
+
/**
|
|
667
|
+
* Announce an imminent tool call so a parked workspace is restored ahead of it
|
|
668
|
+
* @description Best effort and cheap: returns immediately. If the workspace is
|
|
669
|
+
* hibernated its host starts restoring it now (contracts §25.5); frozen
|
|
670
|
+
* and resident workspaces need nothing. A hint not followed by a tool
|
|
671
|
+
* call within `WAKE_HINT_HOLD_SECONDS` (default 60) is released. A
|
|
672
|
+
* suspended workspace answers `409 workspace_not_running` (resume it
|
|
673
|
+
* through the application API). A host that predates wake hints does
|
|
674
|
+
* not park: `resident` (contracts §26.7). Not subject to the tool gate
|
|
675
|
+
* and not tool activity; any tool the token grants authorizes it.
|
|
676
|
+
*/
|
|
677
|
+
post: operations["workspaceWakeHint"];
|
|
678
|
+
delete?: never;
|
|
679
|
+
options?: never;
|
|
680
|
+
head?: never;
|
|
681
|
+
patch?: never;
|
|
682
|
+
trace?: never;
|
|
683
|
+
};
|
|
550
684
|
"/v1/workspaces/{workspace_id}/keepalive": {
|
|
551
685
|
parameters: {
|
|
552
686
|
query?: never;
|
|
@@ -702,9 +836,82 @@ export interface components {
|
|
|
702
836
|
/** Format: int64 */
|
|
703
837
|
kill_grace_ms?: number;
|
|
704
838
|
secret_refs?: components["schemas"]["SecretRefs"];
|
|
839
|
+
/** @description File-first workspaces (required there, refused otherwise) — the execution's idempotency key. */
|
|
840
|
+
execution_id?: components["schemas"]["ExecutionIdValue"];
|
|
841
|
+
/**
|
|
842
|
+
* Format: int64
|
|
843
|
+
* @description File-first workspaces — stdout and stderr are each captured up to this many bytes.
|
|
844
|
+
* @default 1048576
|
|
845
|
+
*/
|
|
846
|
+
output_limit_bytes?: number;
|
|
705
847
|
};
|
|
706
848
|
/** @description Names of customer secrets (contracts §17) to inject as environment variables NAME=value of this process only. The cell resolves them at session start through the API with the caller's tool token (permission-checked and audited by the API); values are never logged, persisted or returned by the cell. Any name the caller may not use (unknown, not permitted for this workspace/project/tool) refuses the whole start with 403 forbidden (details.reason secret_not_available, details.names); nothing is started. A name that is also a key of `env` is refused (422 validation_failed). Requires a workspace tool token (browser stream tickets cannot resolve secrets: 403, details.reason secret_refs_require_tool_token). Resolution failures: 401 (token revoked/expired), 409 stale_epoch, 429 rate_limited, 503 dependency_unavailable. A retried start with the same session_id re-resolves the names; if a value changed since the first start the host refuses the different request (409 conflict). */
|
|
707
849
|
SecretRefs: string[];
|
|
850
|
+
/** @description A caller-chosen execution id (8..128 characters), unique per workspace. */
|
|
851
|
+
ExecutionIdValue: string;
|
|
852
|
+
/**
|
|
853
|
+
* @description queued/running: in progress. succeeded: the command ran to its end
|
|
854
|
+
* (any exit code; see exit_code, timed_out) and the files it changed
|
|
855
|
+
* were published as tree_revision. failed: the execution could not run
|
|
856
|
+
* the command or its result could not be published (error); nothing
|
|
857
|
+
* was published. lost: the execution's host or cell stopped answering
|
|
858
|
+
* (no heartbeat for EXECUTION_LEASE_SECONDS), the host restarted, or the
|
|
859
|
+
* workspace was deleted; nothing was published. After failed or lost,
|
|
860
|
+
* retry with a new execution_id.
|
|
861
|
+
* @enum {string}
|
|
862
|
+
*/
|
|
863
|
+
ExecutionState: "queued" | "running" | "succeeded" | "failed" | "lost";
|
|
864
|
+
ExecutionChange: {
|
|
865
|
+
/** @description Guest path (under /home/user). */
|
|
866
|
+
path: string;
|
|
867
|
+
/** @enum {string} */
|
|
868
|
+
change: "added" | "modified" | "deleted";
|
|
869
|
+
/**
|
|
870
|
+
* @description The new entry's type (deleted: the removed entry's).
|
|
871
|
+
* @enum {string}
|
|
872
|
+
*/
|
|
873
|
+
type: "file" | "directory" | "symlink";
|
|
874
|
+
};
|
|
875
|
+
ExecutionResult: {
|
|
876
|
+
execution_id: string;
|
|
877
|
+
state: components["schemas"]["ExecutionState"];
|
|
878
|
+
/**
|
|
879
|
+
* Format: int64
|
|
880
|
+
* @description The tree revision the command ran on.
|
|
881
|
+
*/
|
|
882
|
+
base_revision: number;
|
|
883
|
+
/**
|
|
884
|
+
* Format: int64
|
|
885
|
+
* @description The tree revision after the execution (succeeded) — base_revision + 1 when it changed files, else base_revision; null otherwise.
|
|
886
|
+
*/
|
|
887
|
+
tree_revision: number | null;
|
|
888
|
+
/** @description The command's exit status (-1 when terminated by a signal); null unless succeeded. */
|
|
889
|
+
exit_code: number | null;
|
|
890
|
+
term_signal: number | null;
|
|
891
|
+
/** @description The command ran past timeout_ms and was killed. */
|
|
892
|
+
timed_out: boolean;
|
|
893
|
+
/** @description Standard output (base64), at most output_limit_bytes. */
|
|
894
|
+
stdout: string;
|
|
895
|
+
/** @description Standard error (base64), at most output_limit_bytes. */
|
|
896
|
+
stderr: string;
|
|
897
|
+
stdout_truncated: boolean;
|
|
898
|
+
stderr_truncated: boolean;
|
|
899
|
+
/** @description Entries the execution added, modified or deleted under /home/user, sorted by path (at most 10000). */
|
|
900
|
+
changed: components["schemas"]["ExecutionChange"][];
|
|
901
|
+
changed_truncated: boolean;
|
|
902
|
+
/** @description Milliseconds and counts: queue_ms, run_ms, publish_ms, total_ms, and the host's (materialize_ms, boot_ms, exec_ms, collect_ms, blobs_fetched, blobs_uploaded, vm_seconds, ...). */
|
|
903
|
+
timings: {
|
|
904
|
+
[key: string]: number;
|
|
905
|
+
};
|
|
906
|
+
/** @description failed / lost: the ErrorBody.error shape {code (an ErrorCode), message, retryable, details.reason}; reason names the cause: a host refusal (blob_missing, blob_corrupt, exec_failed_to_start, template_missing, layout_unsupported, guest_feature_unavailable, tree_invalid, ...), no_execution_host, lease_expired, host_unreachable, host_restarted, workspace_deleted, tree_moved, result_invalid. retryable: a new execution_id may succeed. */
|
|
907
|
+
error?: {
|
|
908
|
+
[key: string]: unknown;
|
|
909
|
+
} | null;
|
|
910
|
+
/** Format: date-time */
|
|
911
|
+
created_at: string;
|
|
912
|
+
/** Format: date-time */
|
|
913
|
+
finished_at: string | null;
|
|
914
|
+
};
|
|
708
915
|
ExecSession: {
|
|
709
916
|
session_id: string;
|
|
710
917
|
state: components["schemas"]["SessionState"];
|
|
@@ -860,6 +1067,93 @@ export interface components {
|
|
|
860
1067
|
uid?: number;
|
|
861
1068
|
gid?: number;
|
|
862
1069
|
symlink_target?: string;
|
|
1070
|
+
/** @description SHA-256 of the content (regular files; only when requested or returned by a write/patch). */
|
|
1071
|
+
revision?: string;
|
|
1072
|
+
};
|
|
1073
|
+
/** @description A content SHA-256, or `absent` for a path that must not exist. */
|
|
1074
|
+
FileRevision: string;
|
|
1075
|
+
FileSearchRequest: {
|
|
1076
|
+
/** @default / */
|
|
1077
|
+
path?: components["schemas"]["GuestPath"];
|
|
1078
|
+
pattern: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* @description RE2 syntax when true; a literal substring otherwise.
|
|
1081
|
+
* @default false
|
|
1082
|
+
*/
|
|
1083
|
+
regex?: boolean;
|
|
1084
|
+
/** @default false */
|
|
1085
|
+
case_insensitive?: boolean;
|
|
1086
|
+
/** @description Glob patterns (`*`, `**`, `?`, `[...]`), gitignore-style: a pattern without `/` matches the name at any depth (`*.go`); one with `/` matches the path relative to `path` (`src/**\/*.ts`). A file must match one when given. */
|
|
1087
|
+
include?: string[];
|
|
1088
|
+
/** @description Glob patterns skipped (files and whole directories). Default: ["**\/.git/**", "**\/node_modules/**"]; send [] to search everything. */
|
|
1089
|
+
exclude?: string[];
|
|
1090
|
+
/** @default 200 */
|
|
1091
|
+
max_matches?: number;
|
|
1092
|
+
/**
|
|
1093
|
+
* Format: int64
|
|
1094
|
+
* @default 1048576
|
|
1095
|
+
*/
|
|
1096
|
+
max_file_bytes?: number;
|
|
1097
|
+
/** @default 0 */
|
|
1098
|
+
context_lines?: number;
|
|
1099
|
+
};
|
|
1100
|
+
FileSearchMatch: {
|
|
1101
|
+
path: string;
|
|
1102
|
+
/** @description 1-based. */
|
|
1103
|
+
line: number;
|
|
1104
|
+
/** @description 1-based byte column of the first match on the line. */
|
|
1105
|
+
column: number;
|
|
1106
|
+
/** @description The line, without its newline, truncated to 1000 bytes. */
|
|
1107
|
+
text: string;
|
|
1108
|
+
before?: string[];
|
|
1109
|
+
after?: string[];
|
|
1110
|
+
};
|
|
1111
|
+
FileSearchResult: {
|
|
1112
|
+
matches: components["schemas"]["FileSearchMatch"][];
|
|
1113
|
+
/** @description true when the walk stopped early (see stop_reason). */
|
|
1114
|
+
truncated: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* @description Why the walk stopped early: max_matches reached, the 10 s budget, or 4 MiB of results.
|
|
1117
|
+
* @enum {string}
|
|
1118
|
+
*/
|
|
1119
|
+
stop_reason?: "max_matches" | "budget" | "max_bytes";
|
|
1120
|
+
/** Format: int64 */
|
|
1121
|
+
files_scanned: number;
|
|
1122
|
+
};
|
|
1123
|
+
FileEdit: {
|
|
1124
|
+
old_text: string;
|
|
1125
|
+
new_text: string;
|
|
1126
|
+
/** @default false */
|
|
1127
|
+
replace_all?: boolean;
|
|
1128
|
+
};
|
|
1129
|
+
FilePatchRequest: {
|
|
1130
|
+
path: components["schemas"]["GuestPath"];
|
|
1131
|
+
edits?: components["schemas"]["FileEdit"][];
|
|
1132
|
+
/** @description Replace the whole file (UTF-8 text) instead of edits. */
|
|
1133
|
+
content?: string;
|
|
1134
|
+
expected_revision?: components["schemas"]["FileRevision"];
|
|
1135
|
+
/** @default false */
|
|
1136
|
+
create_parents?: boolean;
|
|
1137
|
+
/** @description Permission bits for a new file (an existing file keeps its mode). */
|
|
1138
|
+
mode?: string;
|
|
1139
|
+
};
|
|
1140
|
+
FilePatchResult: {
|
|
1141
|
+
path: string;
|
|
1142
|
+
revision: string;
|
|
1143
|
+
previous_revision: components["schemas"]["FileRevision"];
|
|
1144
|
+
/** Format: int64 */
|
|
1145
|
+
bytes_written: number;
|
|
1146
|
+
durable: boolean;
|
|
1147
|
+
/** @description Number of replaced occurrences (edits). */
|
|
1148
|
+
replacements?: number;
|
|
1149
|
+
file?: components["schemas"]["FileInfo"];
|
|
1150
|
+
};
|
|
1151
|
+
WakeHintResult: {
|
|
1152
|
+
/**
|
|
1153
|
+
* @description What the host found when the hint arrived (contracts §25.1).
|
|
1154
|
+
* @enum {string}
|
|
1155
|
+
*/
|
|
1156
|
+
residency: "resident" | "frozen" | "hibernated" | "restoring";
|
|
863
1157
|
};
|
|
864
1158
|
FileList: {
|
|
865
1159
|
entries: components["schemas"]["FileInfo"][];
|
|
@@ -916,6 +1210,8 @@ export interface components {
|
|
|
916
1210
|
/** @description The file and its parent directory were fsync'd before this reply. */
|
|
917
1211
|
durable: boolean;
|
|
918
1212
|
file?: components["schemas"]["FileInfo"];
|
|
1213
|
+
/** @description The file's revision after the write (equals sha256 for a replace; the whole file's hash after an append). */
|
|
1214
|
+
revision?: string;
|
|
919
1215
|
};
|
|
920
1216
|
MkdirRequest: {
|
|
921
1217
|
path: components["schemas"]["GuestPath"];
|
|
@@ -1088,6 +1384,9 @@ export interface components {
|
|
|
1088
1384
|
WorkspaceId: string;
|
|
1089
1385
|
SessionId: components["schemas"]["SessionIdValue"];
|
|
1090
1386
|
FilePath: components["schemas"]["GuestPath"];
|
|
1387
|
+
ExecutionId: components["schemas"]["ExecutionIdValue"];
|
|
1388
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
1389
|
+
IfMatch: string;
|
|
1091
1390
|
};
|
|
1092
1391
|
requestBodies: never;
|
|
1093
1392
|
headers: never;
|
|
@@ -1171,22 +1470,22 @@ export interface operations {
|
|
|
1171
1470
|
};
|
|
1172
1471
|
};
|
|
1173
1472
|
responses: {
|
|
1174
|
-
/** @description The session already existed; nothing was run again. */
|
|
1473
|
+
/** @description The session already existed; nothing was run again (processful), or the recorded result of an existing execution (file-first). */
|
|
1175
1474
|
200: {
|
|
1176
1475
|
headers: {
|
|
1177
1476
|
[name: string]: unknown;
|
|
1178
1477
|
};
|
|
1179
1478
|
content: {
|
|
1180
|
-
"application/json": components["schemas"]["ExecSession"];
|
|
1479
|
+
"application/json": components["schemas"]["ExecSession"] | components["schemas"]["ExecutionResult"];
|
|
1181
1480
|
};
|
|
1182
1481
|
};
|
|
1183
|
-
/** @description Session created and started. */
|
|
1482
|
+
/** @description Session created and started (processful), or the execution ran (file-first, ExecutionResult). */
|
|
1184
1483
|
201: {
|
|
1185
1484
|
headers: {
|
|
1186
1485
|
[name: string]: unknown;
|
|
1187
1486
|
};
|
|
1188
1487
|
content: {
|
|
1189
|
-
"application/json": components["schemas"]["ExecSession"];
|
|
1488
|
+
"application/json": components["schemas"]["ExecSession"] | components["schemas"]["ExecutionResult"];
|
|
1190
1489
|
};
|
|
1191
1490
|
};
|
|
1192
1491
|
default: components["responses"]["Error"];
|
|
@@ -1327,6 +1626,39 @@ export interface operations {
|
|
|
1327
1626
|
default: components["responses"]["Error"];
|
|
1328
1627
|
};
|
|
1329
1628
|
};
|
|
1629
|
+
executionGet: {
|
|
1630
|
+
parameters: {
|
|
1631
|
+
query?: never;
|
|
1632
|
+
header?: never;
|
|
1633
|
+
path: {
|
|
1634
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
1635
|
+
execution_id: components["parameters"]["ExecutionId"];
|
|
1636
|
+
};
|
|
1637
|
+
cookie?: never;
|
|
1638
|
+
};
|
|
1639
|
+
requestBody?: never;
|
|
1640
|
+
responses: {
|
|
1641
|
+
/** @description The execution ended. */
|
|
1642
|
+
200: {
|
|
1643
|
+
headers: {
|
|
1644
|
+
[name: string]: unknown;
|
|
1645
|
+
};
|
|
1646
|
+
content: {
|
|
1647
|
+
"application/json": components["schemas"]["ExecutionResult"];
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
/** @description The execution is queued or running. */
|
|
1651
|
+
202: {
|
|
1652
|
+
headers: {
|
|
1653
|
+
[name: string]: unknown;
|
|
1654
|
+
};
|
|
1655
|
+
content: {
|
|
1656
|
+
"application/json": components["schemas"]["ExecutionResult"];
|
|
1657
|
+
};
|
|
1658
|
+
};
|
|
1659
|
+
default: components["responses"]["Error"];
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1330
1662
|
ptyOpen: {
|
|
1331
1663
|
parameters: {
|
|
1332
1664
|
query?: never;
|
|
@@ -1563,6 +1895,12 @@ export interface operations {
|
|
|
1563
1895
|
headers: {
|
|
1564
1896
|
/** @description File size when the read started. */
|
|
1565
1897
|
"X-File-Size"?: number;
|
|
1898
|
+
/** @description SHA-256 of the whole file's content, for files of 16 MiB or less (contracts §26.2). */
|
|
1899
|
+
"X-File-Revision"?: string;
|
|
1900
|
+
/** @description disk: read from the suspended or hibernated workspace's disk (contracts §26.4). */
|
|
1901
|
+
"X-Served-From"?: "guest" | "disk";
|
|
1902
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
1903
|
+
"X-Tree-Revision"?: number;
|
|
1566
1904
|
[name: string]: unknown;
|
|
1567
1905
|
};
|
|
1568
1906
|
content: {
|
|
@@ -1573,6 +1911,8 @@ export interface operations {
|
|
|
1573
1911
|
206: {
|
|
1574
1912
|
headers: {
|
|
1575
1913
|
"Content-Range"?: string;
|
|
1914
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
1915
|
+
"X-Tree-Revision"?: number;
|
|
1576
1916
|
[name: string]: unknown;
|
|
1577
1917
|
};
|
|
1578
1918
|
content: {
|
|
@@ -1593,6 +1933,8 @@ export interface operations {
|
|
|
1593
1933
|
};
|
|
1594
1934
|
header?: {
|
|
1595
1935
|
"Idempotency-Key"?: string;
|
|
1936
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
1937
|
+
"If-Match"?: components["parameters"]["IfMatch"];
|
|
1596
1938
|
};
|
|
1597
1939
|
path: {
|
|
1598
1940
|
workspace_id: components["parameters"]["WorkspaceId"];
|
|
@@ -1608,6 +1950,8 @@ export interface operations {
|
|
|
1608
1950
|
/** @description Written and fsync'd. */
|
|
1609
1951
|
200: {
|
|
1610
1952
|
headers: {
|
|
1953
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
1954
|
+
"X-Tree-Revision"?: number;
|
|
1611
1955
|
[name: string]: unknown;
|
|
1612
1956
|
};
|
|
1613
1957
|
content: {
|
|
@@ -1623,7 +1967,10 @@ export interface operations {
|
|
|
1623
1967
|
path: components["parameters"]["FilePath"];
|
|
1624
1968
|
recursive?: boolean;
|
|
1625
1969
|
};
|
|
1626
|
-
header?:
|
|
1970
|
+
header?: {
|
|
1971
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
1972
|
+
"If-Match"?: components["parameters"]["IfMatch"];
|
|
1973
|
+
};
|
|
1627
1974
|
path: {
|
|
1628
1975
|
workspace_id: components["parameters"]["WorkspaceId"];
|
|
1629
1976
|
};
|
|
@@ -1634,6 +1981,8 @@ export interface operations {
|
|
|
1634
1981
|
/** @description Removed. */
|
|
1635
1982
|
204: {
|
|
1636
1983
|
headers: {
|
|
1984
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
1985
|
+
"X-Tree-Revision"?: number;
|
|
1637
1986
|
[name: string]: unknown;
|
|
1638
1987
|
};
|
|
1639
1988
|
content?: never;
|
|
@@ -1645,6 +1994,8 @@ export interface operations {
|
|
|
1645
1994
|
parameters: {
|
|
1646
1995
|
query: {
|
|
1647
1996
|
path: components["parameters"]["FilePath"];
|
|
1997
|
+
/** @description Include `revision` (SHA-256 of the content) for a regular file of up to 256 MiB. Omitted when the workspace's host predates revisions (contracts §26.7). */
|
|
1998
|
+
revision?: boolean;
|
|
1648
1999
|
};
|
|
1649
2000
|
header?: never;
|
|
1650
2001
|
path: {
|
|
@@ -1657,6 +2008,10 @@ export interface operations {
|
|
|
1657
2008
|
/** @description File info. */
|
|
1658
2009
|
200: {
|
|
1659
2010
|
headers: {
|
|
2011
|
+
/** @description disk: read from the suspended or hibernated workspace's disk (contracts §26.4). */
|
|
2012
|
+
"X-Served-From"?: "guest" | "disk";
|
|
2013
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2014
|
+
"X-Tree-Revision"?: number;
|
|
1660
2015
|
[name: string]: unknown;
|
|
1661
2016
|
};
|
|
1662
2017
|
content: {
|
|
@@ -1683,6 +2038,10 @@ export interface operations {
|
|
|
1683
2038
|
/** @description Entries. */
|
|
1684
2039
|
200: {
|
|
1685
2040
|
headers: {
|
|
2041
|
+
/** @description disk: read from the suspended or hibernated workspace's disk (contracts §26.4). */
|
|
2042
|
+
"X-Served-From"?: "guest" | "disk";
|
|
2043
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2044
|
+
"X-Tree-Revision"?: number;
|
|
1686
2045
|
[name: string]: unknown;
|
|
1687
2046
|
};
|
|
1688
2047
|
content: {
|
|
@@ -1695,7 +2054,10 @@ export interface operations {
|
|
|
1695
2054
|
fileMkdir: {
|
|
1696
2055
|
parameters: {
|
|
1697
2056
|
query?: never;
|
|
1698
|
-
header?:
|
|
2057
|
+
header?: {
|
|
2058
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
2059
|
+
"If-Match"?: components["parameters"]["IfMatch"];
|
|
2060
|
+
};
|
|
1699
2061
|
path: {
|
|
1700
2062
|
workspace_id: components["parameters"]["WorkspaceId"];
|
|
1701
2063
|
};
|
|
@@ -1710,6 +2072,8 @@ export interface operations {
|
|
|
1710
2072
|
/** @description Directory info. */
|
|
1711
2073
|
200: {
|
|
1712
2074
|
headers: {
|
|
2075
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2076
|
+
"X-Tree-Revision"?: number;
|
|
1713
2077
|
[name: string]: unknown;
|
|
1714
2078
|
};
|
|
1715
2079
|
content: {
|
|
@@ -1719,7 +2083,7 @@ export interface operations {
|
|
|
1719
2083
|
default: components["responses"]["Error"];
|
|
1720
2084
|
};
|
|
1721
2085
|
};
|
|
1722
|
-
|
|
2086
|
+
fileSearch: {
|
|
1723
2087
|
parameters: {
|
|
1724
2088
|
query?: never;
|
|
1725
2089
|
header?: never;
|
|
@@ -1728,6 +2092,72 @@ export interface operations {
|
|
|
1728
2092
|
};
|
|
1729
2093
|
cookie?: never;
|
|
1730
2094
|
};
|
|
2095
|
+
requestBody: {
|
|
2096
|
+
content: {
|
|
2097
|
+
"application/json": components["schemas"]["FileSearchRequest"];
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
2100
|
+
responses: {
|
|
2101
|
+
/** @description Matches. */
|
|
2102
|
+
200: {
|
|
2103
|
+
headers: {
|
|
2104
|
+
"X-Served-From"?: "guest" | "disk";
|
|
2105
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2106
|
+
"X-Tree-Revision"?: number;
|
|
2107
|
+
[name: string]: unknown;
|
|
2108
|
+
};
|
|
2109
|
+
content: {
|
|
2110
|
+
"application/json": components["schemas"]["FileSearchResult"];
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
default: components["responses"]["Error"];
|
|
2114
|
+
};
|
|
2115
|
+
};
|
|
2116
|
+
filePatch: {
|
|
2117
|
+
parameters: {
|
|
2118
|
+
query?: never;
|
|
2119
|
+
header?: {
|
|
2120
|
+
"Idempotency-Key"?: string;
|
|
2121
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
2122
|
+
"If-Match"?: components["parameters"]["IfMatch"];
|
|
2123
|
+
};
|
|
2124
|
+
path: {
|
|
2125
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
2126
|
+
};
|
|
2127
|
+
cookie?: never;
|
|
2128
|
+
};
|
|
2129
|
+
requestBody: {
|
|
2130
|
+
content: {
|
|
2131
|
+
"application/json": components["schemas"]["FilePatchRequest"];
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
responses: {
|
|
2135
|
+
/** @description Patched and fsync'd. */
|
|
2136
|
+
200: {
|
|
2137
|
+
headers: {
|
|
2138
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2139
|
+
"X-Tree-Revision"?: number;
|
|
2140
|
+
[name: string]: unknown;
|
|
2141
|
+
};
|
|
2142
|
+
content: {
|
|
2143
|
+
"application/json": components["schemas"]["FilePatchResult"];
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
default: components["responses"]["Error"];
|
|
2147
|
+
};
|
|
2148
|
+
};
|
|
2149
|
+
fileMove: {
|
|
2150
|
+
parameters: {
|
|
2151
|
+
query?: never;
|
|
2152
|
+
header?: {
|
|
2153
|
+
/** @description File-first workspaces only (ignored otherwise): the tree revision the call applies to, e.g. `7` or `"7"`. Another current revision fails the call with 409 conflict, details.reason tree_revision_mismatch, details.current_tree_revision. */
|
|
2154
|
+
"If-Match"?: components["parameters"]["IfMatch"];
|
|
2155
|
+
};
|
|
2156
|
+
path: {
|
|
2157
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
2158
|
+
};
|
|
2159
|
+
cookie?: never;
|
|
2160
|
+
};
|
|
1731
2161
|
requestBody: {
|
|
1732
2162
|
content: {
|
|
1733
2163
|
"application/json": components["schemas"]["MoveRequest"];
|
|
@@ -1737,6 +2167,8 @@ export interface operations {
|
|
|
1737
2167
|
/** @description Info of the destination. */
|
|
1738
2168
|
200: {
|
|
1739
2169
|
headers: {
|
|
2170
|
+
/** @description File-first workspaces: the tree revision served or produced (contracts §29.2). */
|
|
2171
|
+
"X-Tree-Revision"?: number;
|
|
1740
2172
|
[name: string]: unknown;
|
|
1741
2173
|
};
|
|
1742
2174
|
content: {
|
|
@@ -1879,6 +2311,29 @@ export interface operations {
|
|
|
1879
2311
|
default: components["responses"]["Error"];
|
|
1880
2312
|
};
|
|
1881
2313
|
};
|
|
2314
|
+
workspaceWakeHint: {
|
|
2315
|
+
parameters: {
|
|
2316
|
+
query?: never;
|
|
2317
|
+
header?: never;
|
|
2318
|
+
path: {
|
|
2319
|
+
workspace_id: components["parameters"]["WorkspaceId"];
|
|
2320
|
+
};
|
|
2321
|
+
cookie?: never;
|
|
2322
|
+
};
|
|
2323
|
+
requestBody?: never;
|
|
2324
|
+
responses: {
|
|
2325
|
+
/** @description Hint accepted. */
|
|
2326
|
+
202: {
|
|
2327
|
+
headers: {
|
|
2328
|
+
[name: string]: unknown;
|
|
2329
|
+
};
|
|
2330
|
+
content: {
|
|
2331
|
+
"application/json": components["schemas"]["WakeHintResult"];
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
default: components["responses"]["Error"];
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
1882
2337
|
workspaceKeepalive: {
|
|
1883
2338
|
parameters: {
|
|
1884
2339
|
query?: never;
|