ghostdock 0.0.18 → 0.0.19
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/dist/cli-reference.md +51 -51
- package/dist/cli.md +6 -6
- package/dist/index.js +146 -111
- package/package.json +1 -1
package/dist/cli-reference.md
CHANGED
|
@@ -147,7 +147,7 @@ ghostdock images add-compose --name <string> [flags]
|
|
|
147
147
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
148
148
|
| `--name <string>` | Image name, unique in the organization. Required. |
|
|
149
149
|
| `--files <object>` | Compose files by file name. Must include docker-compose.yml/yaml or compose.yml/yaml. (JSON object) |
|
|
150
|
-
| `--reference <string>` | A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/
|
|
150
|
+
| `--reference <string>` | A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/headless-compose:ubuntu-26.04. |
|
|
151
151
|
| `--override <string>` | With reference: a Compose file merged into it (services, environment, labels). |
|
|
152
152
|
|
|
153
153
|
MCP tool: `images_add_compose`.
|
|
@@ -547,7 +547,7 @@ ghostdock projects publish [path] [flags]
|
|
|
547
547
|
| `--display-name <value>` | Optional display name. |
|
|
548
548
|
| `--tag <value>` | Optional caller tag (git SHA or free-form label) stored on the deployment. |
|
|
549
549
|
| `--auto-stop-interval-minutes <value>` | Same as `sandboxes create`. Omit for the 20-minute default. Pass -1 to keep it running. 0 is rejected. |
|
|
550
|
-
| `--auto-delete-
|
|
550
|
+
| `--auto-delete-after-days <value>` | Same as `sandboxes create`: days stopped before the record is deleted (0–365). Omit for the 14-day default. Pass 0 to delete the record when it stops. |
|
|
551
551
|
| `--resources <value>` | Same as `sandboxes create`: JSON { cpu, memoryGiB, diskGiB }. |
|
|
552
552
|
| `--environment <value>` | Same as `sandboxes create --environment`: JSON { organization, bindings, local }. Required after awaiting_configuration. |
|
|
553
553
|
| `--auto-wake <value>` | Same as `sandboxes urls create --auto-wake`. Default true for the minted URL. |
|
|
@@ -575,10 +575,10 @@ ghostdock projects redeploy <project-id> [flags]
|
|
|
575
575
|
| `--tag <string>` | Optional caller tag stored on the new deployment. Metadata only. |
|
|
576
576
|
| `--resources <object>` | Compute sizing. For image/dockerfile/compose: layered on platform defaults when omitted. For snapshot: optional override applied via resize after create. (JSON object) |
|
|
577
577
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup. |
|
|
578
|
-
| `--
|
|
578
|
+
| `--lifecycle <string>` | What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only. |
|
|
579
|
+
| `--auto-delete-after-days <integer>` | Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it. |
|
|
579
580
|
| `--sandbox-provider-id <string>` | Configured sandbox-provider instance id from providers list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new sandboxes and has it is used. When no provider fits, the call fails with a not-configured error. |
|
|
580
581
|
| `--environment <object>` | Environment to give this sandbox. organization: names of organization entries (from env list) to export under their own names. bindings: remap org entries onto slot names ({ name: slot, organization: orgEntryName }). local: sandbox-only variables/secrets to create with the sandbox (kind required for each). Both land as ordinary process environment variables ($NAME / process.env.NAME); a local entry overrides an organization entry of the same name. When booting from an organization snapshot, omit organization/bindings/local to keep manifest env defaults, but still supply every name in requiredEnvironment (via organization, bindings, or local). Otherwise a sandbox gets nothing unless listed here. (JSON object) |
|
|
581
|
-
| `--ephemeral` | Mark the sandbox ephemeral: every stop destroys the machine and the next start boots fresh, while the record, URLs, and settings stay. Omit to use the image label ghostdock.ephemeral, or false when that label is absent. Does not change idle-stop or auto-delete. |
|
|
582
582
|
| `--auto-wake` | Same as urls[].autoWake on sandboxes create. Default true for the minted URL. |
|
|
583
583
|
| `--public` | Same as urls[].public on sandboxes create. Default true for the minted URL. |
|
|
584
584
|
|
|
@@ -843,7 +843,7 @@ Containers of a sandbox’s Docker engine.
|
|
|
843
843
|
|
|
844
844
|
### `ghostdock sandboxes containers list`
|
|
845
845
|
|
|
846
|
-
List the containers of a sandbox, running or not. Each with state, health, restart policy, ports, Compose project and service,
|
|
846
|
+
List the containers of a sandbox, running or not. Each with state, health, restart policy, ports, Compose project and service, its lock (locked, and whether a person or its ghostdock.lock label decided), ghostdock.* labels, and which one is the default. A stopped sandbox lists none (it is not started for this).
|
|
847
847
|
|
|
848
848
|
```
|
|
849
849
|
ghostdock sandboxes containers list <sandbox-id> [flags]
|
|
@@ -856,12 +856,12 @@ ghostdock sandboxes containers list <sandbox-id> [flags]
|
|
|
856
856
|
|
|
857
857
|
MCP tool: `sandboxes_containers_list`.
|
|
858
858
|
|
|
859
|
-
### `ghostdock sandboxes containers
|
|
859
|
+
### `ghostdock sandboxes containers lock`
|
|
860
860
|
|
|
861
|
-
|
|
861
|
+
Lock a container against removal. A locked container cannot be removed, renamed or recreated through Docker (docker rm, compose down, a compose up that would recreate it) until it is unlocked here; start, stop and restart still work. It also pauses the sandbox’s auto-delete. An ephemeral sandbox’s stop still wipes it. Never starts the sandbox: a stopped one gets the lock at its next start.
|
|
862
862
|
|
|
863
863
|
```
|
|
864
|
-
ghostdock sandboxes containers
|
|
864
|
+
ghostdock sandboxes containers lock <sandbox-id> <container> [flags]
|
|
865
865
|
```
|
|
866
866
|
|
|
867
867
|
| Argument | Description |
|
|
@@ -869,19 +869,15 @@ ghostdock sandboxes containers logs <sandbox-id> <container> [flags]
|
|
|
869
869
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
870
870
|
| `<container>` | Container, by name. Required. |
|
|
871
871
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
872
|
-
| `--tail <integer>` | The last N lines (at most 5000). |
|
|
873
|
-
| `--after <string>` | Only lines after this time: the time of the last line already read. |
|
|
874
|
-
| `--follow` | Keep printing new lines until Ctrl-C. |
|
|
875
|
-
| `--timestamps` | Put each line's time in front of it. |
|
|
876
872
|
|
|
877
|
-
MCP tool: `
|
|
873
|
+
MCP tool: `sandboxes_containers_lock`.
|
|
878
874
|
|
|
879
|
-
### `ghostdock sandboxes containers
|
|
875
|
+
### `ghostdock sandboxes containers logs`
|
|
880
876
|
|
|
881
|
-
|
|
877
|
+
Read a container’s output, as docker logs does. Oldest first, each line with its stream (stdout, stderr) and time. The last tail lines (default 200), or with after only the lines after that time: pass the last line’s time to follow. truncated says lines were left out. A stopped sandbox has none (it is not started for this).
|
|
882
878
|
|
|
883
879
|
```
|
|
884
|
-
ghostdock sandboxes containers
|
|
880
|
+
ghostdock sandboxes containers logs <sandbox-id> <container> [flags]
|
|
885
881
|
```
|
|
886
882
|
|
|
887
883
|
| Argument | Description |
|
|
@@ -889,9 +885,12 @@ ghostdock sandboxes containers protection <sandbox-id> <container> --protected <
|
|
|
889
885
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
890
886
|
| `<container>` | Container, by name. Required. |
|
|
891
887
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
892
|
-
| `--
|
|
888
|
+
| `--tail <integer>` | The last N lines (at most 5000). |
|
|
889
|
+
| `--after <string>` | Only lines after this time: the time of the last line already read. |
|
|
890
|
+
| `--follow` | Keep printing new lines until Ctrl-C. |
|
|
891
|
+
| `--timestamps` | Put each line's time in front of it. |
|
|
893
892
|
|
|
894
|
-
MCP tool: `
|
|
893
|
+
MCP tool: `sandboxes_containers_logs`.
|
|
895
894
|
|
|
896
895
|
### `ghostdock sandboxes containers restart`
|
|
897
896
|
|
|
@@ -927,7 +926,7 @@ MCP tool: `sandboxes_containers_start`.
|
|
|
927
926
|
|
|
928
927
|
### `ghostdock sandboxes containers stop`
|
|
929
928
|
|
|
930
|
-
Stop a container, as docker stop does. It gets its own stop signal, then a kill after its own stop timeout. It stays stopped while the sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped).
|
|
929
|
+
Stop a container, as docker stop does. It gets its own stop signal, then a kill after its own stop timeout. It stays stopped while the sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped). A lock does not block it. note says when it was the default container or the last one running: then SSH, commands and files have nowhere to land until one runs.
|
|
931
930
|
|
|
932
931
|
```
|
|
933
932
|
ghostdock sandboxes containers stop <sandbox-id> <container> [flags]
|
|
@@ -941,9 +940,25 @@ ghostdock sandboxes containers stop <sandbox-id> <container> [flags]
|
|
|
941
940
|
|
|
942
941
|
MCP tool: `sandboxes_containers_stop`.
|
|
943
942
|
|
|
943
|
+
### `ghostdock sandboxes containers unlock`
|
|
944
|
+
|
|
945
|
+
Unlock a container so Docker can remove or recreate it. Also one its image locked with the ghostdock.lock label. Never starts the sandbox: a stopped one gets it at its next start, and an overdue auto-delete it held goes ahead.
|
|
946
|
+
|
|
947
|
+
```
|
|
948
|
+
ghostdock sandboxes containers unlock <sandbox-id> <container> [flags]
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
| Argument | Description |
|
|
952
|
+
| --- | --- |
|
|
953
|
+
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
954
|
+
| `<container>` | Container, by name. Required. |
|
|
955
|
+
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
956
|
+
|
|
957
|
+
MCP tool: `sandboxes_containers_unlock`.
|
|
958
|
+
|
|
944
959
|
### `ghostdock sandboxes create`
|
|
945
960
|
|
|
946
|
-
Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Returns once the
|
|
961
|
+
Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Every source but a snapshot becomes a Compose project in the sandbox, run once with docker compose up -d; after that Docker is the truth. Returns once the project is up, with `boot`: how long the sandbox (VM) and the project's compose up took, each in ms, and the images it pulled. Idle-stop and auto-delete apply (defaults 20 minutes / 14 days). Read the sandboxes skill (`ghostdock skills get sandboxes`) for sources, manifests, lifecycle and providers.
|
|
947
962
|
|
|
948
963
|
```
|
|
949
964
|
ghostdock sandboxes create --source <object> [flags]
|
|
@@ -953,14 +968,15 @@ ghostdock sandboxes create --source <object> [flags]
|
|
|
953
968
|
| --- | --- |
|
|
954
969
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
955
970
|
| `--display-name <string>` | Display name for the sandbox. Optional. |
|
|
956
|
-
| `--source <object>` | What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images list / images get — images add OCI bookmarks, images add-dockerfile, and images add-compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose"
|
|
971
|
+
| `--source <object>` | What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images list / images get — images add OCI bookmarks, images add-dockerfile, and images add-compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose" runs the given inline files with docker compose up -d (must include docker-compose.yml/yaml or compose.yml/yaml; ghostdock.* service labels parsed for manifest). Every source but a snapshot becomes a Compose project in /srv/ghostdock/<sandbox name>, run once; an image is one service named after it, a Dockerfile the service app. A Compose project that needs extra files is not accepted here — use `ghostdock sandboxes build --kind compose`. "compose" also takes a published Compose project instead of files ({ reference: "oci://…", override? }): it runs through include:, the override merged into it. Image, dockerfile, and compose sources never appear in snapshots list. Published static sites use sites publish (CDN), not a snapshot. (JSON object) Required. |
|
|
972
|
+
| `--restart <string>` | Restart policy of the service an image or a Dockerfile becomes, Docker's names: unless-stopped (default), always, on-failure, or no (it does not come back after the sandbox sleeps). Not for Compose: its files set restart:. |
|
|
957
973
|
| `--resources <object>` | Compute sizing. For image/dockerfile/compose: layered on platform defaults when omitted. For snapshot: optional override applied via resize after create. (JSON object) |
|
|
958
974
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup. |
|
|
959
|
-
| `--
|
|
975
|
+
| `--lifecycle <string>` | What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only. |
|
|
976
|
+
| `--auto-delete-after-days <integer>` | Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it. |
|
|
960
977
|
| `--sandbox-provider-id <string>` | Configured sandbox-provider instance id from providers list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new sandboxes and has it is used. When no provider fits, the call fails with a not-configured error. |
|
|
961
978
|
| `--environment <object>` | Environment to give this sandbox. organization: names of organization entries (from env list) to export under their own names. bindings: remap org entries onto slot names ({ name: slot, organization: orgEntryName }). local: sandbox-only variables/secrets to create with the sandbox (kind required for each). Both land as ordinary process environment variables ($NAME / process.env.NAME); a local entry overrides an organization entry of the same name. When booting from an organization snapshot, omit organization/bindings/local to keep manifest env defaults, but still supply every name in requiredEnvironment (via organization, bindings, or local). Otherwise a sandbox gets nothing unless listed here. (JSON object) |
|
|
962
|
-
| `--
|
|
963
|
-
| `--image-base <string>` | How the disk is made for one of Ghostdock's VM images: auto (default) clones the host's image base, a disk with the image already on it, when there is one; off always starts from an empty disk that pulls the image. For tests and comparisons; other images always start empty. |
|
|
979
|
+
| `--image-base <string>` | How the disk is made for one of Ghostdock's platform images: auto (default) clones the host's image base, a disk with the image already on it, when there is one; off always starts from an empty disk that pulls the image. For tests and comparisons; other images always start empty. |
|
|
964
980
|
| `--urls <array>` | Changes to the image’s or snapshot’s URLs, keyed by port. Omit for the image URLs as they are; otherwise you get the image URLs plus yours: an entry on the same port replaces that URL completely (omitted fields take their defaults), and { port, remove: true } drops it; removing a port the image does not declare does nothing. A required port cannot be removed. TCP URLs are always public. (JSON array) |
|
|
965
981
|
| `--mcps <array>` | Changes to the image’s or snapshot’s MCP exposures, keyed by name. Omit for the image MCPs as they are; otherwise you get the image MCPs plus yours: an entry with the same name replaces that MCP completely, and { name, remove: true } drops it; removing a name the image does not declare does nothing. A required MCP (requiredMcps) cannot be removed. (JSON array) |
|
|
966
982
|
|
|
@@ -986,7 +1002,7 @@ MCP tool: `sandboxes_default_container`.
|
|
|
986
1002
|
|
|
987
1003
|
### `ghostdock sandboxes delete`
|
|
988
1004
|
|
|
989
|
-
Permanently delete a sandbox and its files.
|
|
1005
|
+
Permanently delete a sandbox and its files. Refused while it has locked containers (sandbox_has_locked_containers, naming them) unless deleteLocked is true.
|
|
990
1006
|
|
|
991
1007
|
```
|
|
992
1008
|
ghostdock sandboxes delete <sandbox-id> [flags]
|
|
@@ -996,6 +1012,7 @@ ghostdock sandboxes delete <sandbox-id> [flags]
|
|
|
996
1012
|
| --- | --- |
|
|
997
1013
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
998
1014
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1015
|
+
| `--delete-locked` | Delete it with its locked containers. Without it, a locked container refuses the delete. |
|
|
999
1016
|
|
|
1000
1017
|
MCP tool: `sandboxes_delete`.
|
|
1001
1018
|
|
|
@@ -1079,7 +1096,7 @@ Files inside a sandbox.
|
|
|
1079
1096
|
|
|
1080
1097
|
### `ghostdock sandboxes files list`
|
|
1081
1098
|
|
|
1082
|
-
List the files in a sandbox directory (
|
|
1099
|
+
List the files in a sandbox directory. Default: the container's start folder (its dir).
|
|
1083
1100
|
|
|
1084
1101
|
```
|
|
1085
1102
|
ghostdock sandboxes files list <sandbox-id> [flags]
|
|
@@ -1090,7 +1107,7 @@ ghostdock sandboxes files list <sandbox-id> [flags]
|
|
|
1090
1107
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1091
1108
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1092
1109
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
1093
|
-
| `--path <string>` | Directory to list
|
|
1110
|
+
| `--path <string>` | Directory to list: absolute, or relative to the container's start folder (its dir: the login user's home, else WORKDIR, else /). Defaults to that folder. |
|
|
1094
1111
|
| `--start` | Start the container first when it is not running, without asking. |
|
|
1095
1112
|
|
|
1096
1113
|
MCP tool: `sandboxes_files_list`.
|
|
@@ -1105,7 +1122,7 @@ ghostdock sandboxes files read <path> --sandbox-id <string> [flags]
|
|
|
1105
1122
|
|
|
1106
1123
|
| Argument | Description |
|
|
1107
1124
|
| --- | --- |
|
|
1108
|
-
| `<path>` | File path
|
|
1125
|
+
| `<path>` | File path: absolute, or relative to the container's start folder (for example src/App.vue). Required. |
|
|
1109
1126
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1110
1127
|
| `--sandbox-id <string>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1111
1128
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
@@ -1115,7 +1132,7 @@ MCP tool: `sandboxes_files_read`.
|
|
|
1115
1132
|
|
|
1116
1133
|
### `ghostdock sandboxes files upload`
|
|
1117
1134
|
|
|
1118
|
-
Upload local files or directories to a sandbox
|
|
1135
|
+
Upload local files or directories to a sandbox's container, into its start folder (the login user's home, else WORKDIR, else /).
|
|
1119
1136
|
|
|
1120
1137
|
```
|
|
1121
1138
|
ghostdock sandboxes files upload <sandbox-id> [path] [flags]
|
|
@@ -1134,7 +1151,7 @@ MCP tool: `sandboxes_files_upload`.
|
|
|
1134
1151
|
|
|
1135
1152
|
### `ghostdock sandboxes list`
|
|
1136
1153
|
|
|
1137
|
-
List the sandboxes of an organization,
|
|
1154
|
+
List the sandboxes of an organization, with their lifecycle and deadlines. Each has a name (e.g. quiet-harbor), unique in the organization, that every sandbox tool accepts as sandboxId.
|
|
1138
1155
|
|
|
1139
1156
|
```
|
|
1140
1157
|
ghostdock sandboxes list [flags]
|
|
@@ -1249,24 +1266,6 @@ ghostdock sandboxes resize-disk <sandbox-id> --disk-gib <number> [flags]
|
|
|
1249
1266
|
|
|
1250
1267
|
MCP tool: `sandboxes_resize_disk`.
|
|
1251
1268
|
|
|
1252
|
-
### `ghostdock sandboxes set-boot`
|
|
1253
|
-
|
|
1254
|
-
Register a command that starts now and again after every restart. For example bun dev. On Compose it runs after the stack; on a Dockerfile it replaces the image CMD. Snapshots cannot register one. Read the sandbox-boot skill (`ghostdock skills get sandbox-boot`).
|
|
1255
|
-
|
|
1256
|
-
```
|
|
1257
|
-
ghostdock sandboxes set-boot <sandbox-id> --command <string> [flags]
|
|
1258
|
-
```
|
|
1259
|
-
|
|
1260
|
-
| Argument | Description |
|
|
1261
|
-
| --- | --- |
|
|
1262
|
-
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1263
|
-
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1264
|
-
| `--command <string>` | Command to start, e.g. bun dev. Required. |
|
|
1265
|
-
| `--cwd <string>` | Directory to run it in. Default /. |
|
|
1266
|
-
| `--start` | Also start it now, not only after restarts. Default true. |
|
|
1267
|
-
|
|
1268
|
-
MCP tool: `sandboxes_set_boot`.
|
|
1269
|
-
|
|
1270
1269
|
### `ghostdock sandboxes shells`
|
|
1271
1270
|
|
|
1272
1271
|
Shell sessions that keep cwd and environment between commands.
|
|
@@ -1302,7 +1301,7 @@ ghostdock sandboxes shells create <sandbox-id> [flags]
|
|
|
1302
1301
|
| `<sandbox-id>` | Sandbox name (e.g. quiet-harbor) or id, from sandboxes list or sandboxes create. Names are unique within the organization. Required. |
|
|
1303
1302
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1304
1303
|
| `--container <string>` | Container to work in, by name, from sandboxes containers list. Default: the sandbox’s default container, else the one running container. With several running and no default the call fails and lists them. |
|
|
1305
|
-
| `--session-id <string>` | Id for the new session: a slug
|
|
1304
|
+
| `--session-id <string>` | Id for the new session: a slug. Omit to generate one. |
|
|
1306
1305
|
| `--start` | Start the container first when it is not running, without asking. |
|
|
1307
1306
|
|
|
1308
1307
|
MCP tool: `sandboxes_shells_create`.
|
|
@@ -1447,7 +1446,7 @@ MCP tool: `sandboxes_tools_list`.
|
|
|
1447
1446
|
|
|
1448
1447
|
### `ghostdock sandboxes update`
|
|
1449
1448
|
|
|
1450
|
-
Change a sandbox’s display name, idle-stop or
|
|
1449
|
+
Change a sandbox’s display name, idle-stop interval or lifecycle. Omit a field to keep it; null resets it to the platform default. Ephemeral is chosen at create only.
|
|
1451
1450
|
|
|
1452
1451
|
```
|
|
1453
1452
|
ghostdock sandboxes update <sandbox-id> [flags]
|
|
@@ -1459,7 +1458,8 @@ ghostdock sandboxes update <sandbox-id> [flags]
|
|
|
1459
1458
|
| `--org <string>` | Organization id or slug, from organizations list. Ids survive renames; slugs change when the organization is renamed. Defaults to GHOSTDOCK_ORG, then `organizations use`. |
|
|
1460
1459
|
| `--display-name <string>` | New display name. Null clears it; omit to keep it. |
|
|
1461
1460
|
| `--auto-stop-interval-minutes <number>` | Minutes of inactivity before the platform worker idle-stops the sandbox. -1 always on. 0 is rejected. Null resets to the platform default. Provider-native timers are optional backup. |
|
|
1462
|
-
| `--
|
|
1461
|
+
| `--lifecycle <string>` | auto_delete: the record goes autoDeleteAfterDays after the sandbox stops. keep: never removed automatically. |
|
|
1462
|
+
| `--auto-delete-after-days <integer>` | Days stopped before the record is deleted (0–365; 0 deletes it when it stops). Null writes the platform default. Not with keep. |
|
|
1463
1463
|
|
|
1464
1464
|
MCP tool: `sandboxes_update`.
|
|
1465
1465
|
|
package/dist/cli.md
CHANGED
|
@@ -799,11 +799,12 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
799
799
|
| `ghostdock sandboxes commands logs <command-id> --sandbox-id <string> --session-id <string> [flags]` | Get a page of a shell command’s stdout and stderr. |
|
|
800
800
|
| `ghostdock sandboxes commands run <sandbox-id> --command <string> [flags]` | Run a shell command in a sandbox. |
|
|
801
801
|
| `ghostdock sandboxes containers list <sandbox-id> [flags]` | List the containers of a sandbox, running or not. |
|
|
802
|
+
| `ghostdock sandboxes containers lock <sandbox-id> <container> [flags]` | Lock a container against removal. |
|
|
802
803
|
| `ghostdock sandboxes containers logs <sandbox-id> <container> [flags]` | Read a container’s output, as docker logs does. |
|
|
803
|
-
| `ghostdock sandboxes containers protection <sandbox-id> <container> --protected <value> [flags]` | Switch a container’s deletion protection on or off. |
|
|
804
804
|
| `ghostdock sandboxes containers restart <sandbox-id> <container> [flags]` | Restart a container, as docker restart does (stopping as docker stop does). |
|
|
805
805
|
| `ghostdock sandboxes containers start <sandbox-id> <container> [flags]` | Start a stopped container, as docker start does. |
|
|
806
806
|
| `ghostdock sandboxes containers stop <sandbox-id> <container> [flags]` | Stop a container, as docker stop does. |
|
|
807
|
+
| `ghostdock sandboxes containers unlock <sandbox-id> <container> [flags]` | Unlock a container so Docker can remove or recreate it. |
|
|
807
808
|
| `ghostdock sandboxes create --source <object> [flags]` | Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. |
|
|
808
809
|
| `ghostdock sandboxes default-container <sandbox-id> [flags]` | Show, set or clear the sandbox’s default container. |
|
|
809
810
|
| `ghostdock sandboxes delete <sandbox-id> [flags]` | Permanently delete a sandbox and its files. |
|
|
@@ -811,17 +812,16 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
811
812
|
| `ghostdock sandboxes env get <sandbox-id> [flags]` | Get a sandbox’s environment: selections, bindings and local entries. |
|
|
812
813
|
| `ghostdock sandboxes env select <sandbox-id> --environment <array> [flags]` | Replace the organization entries a sandbox exports. |
|
|
813
814
|
| `ghostdock sandboxes env set <name> --sandbox-id <string> --value <string> [flags]` | Create or replace one of a sandbox’s own variables or secrets. |
|
|
814
|
-
| `ghostdock sandboxes files list <sandbox-id> [flags]` | List the files in a sandbox directory
|
|
815
|
+
| `ghostdock sandboxes files list <sandbox-id> [flags]` | List the files in a sandbox directory. |
|
|
815
816
|
| `ghostdock sandboxes files read <path> --sandbox-id <string> [flags]` | Read a file from a sandbox: utf8 text, or base64 for small binaries. |
|
|
816
|
-
| `ghostdock sandboxes files upload <sandbox-id> [path] [flags]` | Upload local files or directories to a sandbox
|
|
817
|
-
| `ghostdock sandboxes list [flags]` | List the sandboxes of an organization,
|
|
817
|
+
| `ghostdock sandboxes files upload <sandbox-id> [path] [flags]` | Upload local files or directories to a sandbox's container, into its start… |
|
|
818
|
+
| `ghostdock sandboxes list [flags]` | List the sandboxes of an organization, with their lifecycle and deadlines. |
|
|
818
819
|
| `ghostdock sandboxes mcps create <sandbox-id> --name <string> --port <integer> [flags]` | Expose an MCP server running in a sandbox. |
|
|
819
820
|
| `ghostdock sandboxes mcps delete <mcp-id>` | Delete an MCP endpoint of a sandbox. |
|
|
820
821
|
| `ghostdock sandboxes mcps list <sandbox-id> [flags]` | List the MCP endpoints a sandbox exposes (name, port, path, autoWake). |
|
|
821
822
|
| `ghostdock sandboxes mcps update <mcp-id> [flags]` | Change an MCP endpoint’s name, port, path or autoWake setting. |
|
|
822
823
|
| `ghostdock sandboxes resize <sandbox-id> [flags]` | Change a sandbox’s CPU and/or memory. |
|
|
823
824
|
| `ghostdock sandboxes resize-disk <sandbox-id> --disk-gib <number> [flags]` | Grow a sandbox’s disk. |
|
|
824
|
-
| `ghostdock sandboxes set-boot <sandbox-id> --command <string> [flags]` | Register a command that starts now and again after every restart. |
|
|
825
825
|
| `ghostdock sandboxes shells close <session-id> --sandbox-id <string> [flags]` | Close a shell session. |
|
|
826
826
|
| `ghostdock sandboxes shells create <sandbox-id> [flags]` | Open a shell session that keeps cwd and environment between commands. |
|
|
827
827
|
| `ghostdock sandboxes ssh get <sandbox-id> [flags]` | Get temporary SSH access to a sandbox (command and token, 60 minutes). |
|
|
@@ -832,7 +832,7 @@ or read [`cli-reference.md`](cli-reference.md) for every command's full descript
|
|
|
832
832
|
| `ghostdock sandboxes storage list <sandbox-id> [flags]` | List a sandbox’s volumes and sandbox folders. |
|
|
833
833
|
| `ghostdock sandboxes tools call <name> --sandbox-id <string> --arguments <object> [flags]` | Call a tool on an MCP server inside a sandbox. |
|
|
834
834
|
| `ghostdock sandboxes tools list <sandbox-id> [flags]` | List the tools of the MCP servers a sandbox exposes. |
|
|
835
|
-
| `ghostdock sandboxes update <sandbox-id> [flags]` | Change a sandbox’s display name, idle-stop or
|
|
835
|
+
| `ghostdock sandboxes update <sandbox-id> [flags]` | Change a sandbox’s display name, idle-stop interval or lifecycle. |
|
|
836
836
|
| `ghostdock sandboxes urls create <sandbox-id> --port <integer> [flags]` | Expose a sandbox port as a URL. |
|
|
837
837
|
| `ghostdock sandboxes urls delete <url-id>` | Delete a sandbox URL. |
|
|
838
838
|
| `ghostdock sandboxes urls list <sandbox-id> [flags]` | List the URLs that expose a sandbox’s ports, with protocol, access and title. |
|
package/dist/index.js
CHANGED
|
@@ -606,7 +606,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
606
606
|
"sandboxes",
|
|
607
607
|
"create"
|
|
608
608
|
],
|
|
609
|
-
description: "Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Returns once the
|
|
609
|
+
description: "Create a sandbox from a snapshot, OCI image, Dockerfile or Compose files. Inline content only: for a directory or ZIP (Dockerfile COPY/ADD, Compose build files) use `ghostdock sandboxes build`. Snapshots and catalog images can require environment entries, URL ports and MCP names (requiredEnvironment / requiredUrls / requiredMcps); a missing environment entry fails with its names (missingEnvironment), and removing a required URL or MCP fails with them (missingUrls / missingMcps). Every source but a snapshot becomes a Compose project in the sandbox, run once with docker compose up -d; after that Docker is the truth. Returns once the project is up, with `boot`: how long the sandbox (VM) and the project's compose up took, each in ms, and the images it pulled. Idle-stop and auto-delete apply (defaults 20 minutes / 14 days). Read the sandboxes skill for sources, manifests, lifecycle and providers.",
|
|
610
610
|
inputSchema: {
|
|
611
611
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
612
612
|
type: "object",
|
|
@@ -744,7 +744,17 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
744
744
|
additionalProperties: false
|
|
745
745
|
}
|
|
746
746
|
],
|
|
747
|
-
description: 'What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images_list / images_get — images_add OCI bookmarks, images_add_dockerfile, and images_add_compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose"
|
|
747
|
+
description: 'What the sandbox boots from. Required. "image" boots an org catalog row by id ({ id } from images_list / images_get — images_add OCI bookmarks, images_add_dockerfile, and images_add_compose rows) or any OCI ref ({ ref }); "dockerfile" builds inline Dockerfile text only (ghostdock.* LABEL lines parsed for manifest; this tool has no build directory, so COPY/ADD of local files fails — use the CLI `ghostdock sandboxes build --kind dockerfile` with a directory or ZIP); "compose" runs the given inline files with docker compose up -d (must include docker-compose.yml/yaml or compose.yml/yaml; ghostdock.* service labels parsed for manifest). Every source but a snapshot becomes a Compose project in /srv/ghostdock/<sandbox name>, run once; an image is one service named after it, a Dockerfile the service app. A Compose project that needs extra files is not accepted here — use `ghostdock sandboxes build --kind compose`. "compose" also takes a published Compose project instead of files ({ reference: "oci://…", override? }): it runs through include:, the override merged into it. Image, dockerfile, and compose sources never appear in snapshots_list. Published static sites use sites_publish (CDN), not a snapshot.'
|
|
748
|
+
},
|
|
749
|
+
restart: {
|
|
750
|
+
description: "Restart policy of the service an image or a Dockerfile becomes, Docker's names: unless-stopped (default), always, on-failure, or no (it does not come back after the sandbox sleeps). Not for Compose: its files set restart:.",
|
|
751
|
+
type: "string",
|
|
752
|
+
enum: [
|
|
753
|
+
"no",
|
|
754
|
+
"always",
|
|
755
|
+
"unless-stopped",
|
|
756
|
+
"on-failure"
|
|
757
|
+
]
|
|
748
758
|
},
|
|
749
759
|
resources: {
|
|
750
760
|
type: "object",
|
|
@@ -769,9 +779,20 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
769
779
|
description: "Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup.",
|
|
770
780
|
type: "number"
|
|
771
781
|
},
|
|
772
|
-
|
|
773
|
-
description: "
|
|
774
|
-
type: "
|
|
782
|
+
lifecycle: {
|
|
783
|
+
description: "What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only.",
|
|
784
|
+
type: "string",
|
|
785
|
+
enum: [
|
|
786
|
+
"ephemeral",
|
|
787
|
+
"auto_delete",
|
|
788
|
+
"keep"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
autoDeleteAfterDays: {
|
|
792
|
+
description: "Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it.",
|
|
793
|
+
type: "integer",
|
|
794
|
+
minimum: 0,
|
|
795
|
+
maximum: 365
|
|
775
796
|
},
|
|
776
797
|
sandboxProviderId: {
|
|
777
798
|
description: "Configured sandbox-provider instance id from providers_list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new sandboxes and has it is used. When no provider fits, the call fails with a not-configured error.",
|
|
@@ -859,12 +880,8 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
859
880
|
},
|
|
860
881
|
additionalProperties: false
|
|
861
882
|
},
|
|
862
|
-
ephemeral: {
|
|
863
|
-
description: "Mark the sandbox ephemeral: every stop destroys the machine and the next start boots fresh, while the record, URLs, and settings stay. Omit to use the image label ghostdock.ephemeral, or false when that label is absent. Does not change idle-stop or auto-delete.",
|
|
864
|
-
type: "boolean"
|
|
865
|
-
},
|
|
866
883
|
imageBase: {
|
|
867
|
-
description: "How the disk is made for one of Ghostdock's
|
|
884
|
+
description: "How the disk is made for one of Ghostdock's platform images: auto (default) clones the host's image base, a disk with the image already on it, when there is one; off always starts from an empty disk that pulls the image. For tests and comparisons; other images always start empty.",
|
|
868
885
|
type: "string",
|
|
869
886
|
enum: [
|
|
870
887
|
"auto",
|
|
@@ -1012,7 +1029,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
1012
1029
|
"sandboxes",
|
|
1013
1030
|
"list"
|
|
1014
1031
|
],
|
|
1015
|
-
description: "List the sandboxes of an organization,
|
|
1032
|
+
description: "List the sandboxes of an organization, with their lifecycle and deadlines. Each has a name (e.g. quiet-harbor), unique in the organization, that every sandbox tool accepts as sandboxId.",
|
|
1016
1033
|
inputSchema: {
|
|
1017
1034
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
1018
1035
|
type: "object",
|
|
@@ -4515,7 +4532,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
4515
4532
|
}
|
|
4516
4533
|
},
|
|
4517
4534
|
reference: {
|
|
4518
|
-
description: "A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/
|
|
4535
|
+
description: "A published Compose project instead of files, e.g. oci://docker.io/ghostdockhq/headless-compose:ubuntu-26.04.",
|
|
4519
4536
|
type: "string",
|
|
4520
4537
|
minLength: 1,
|
|
4521
4538
|
maxLength: 512,
|
|
@@ -4672,7 +4689,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
4672
4689
|
cliArgs: [
|
|
4673
4690
|
"sandboxId"
|
|
4674
4691
|
],
|
|
4675
|
-
description: "Upload small files or a base64 ZIP to a sandbox. For directories or large ZIPs, use `ghostdock sandboxes files upload`.",
|
|
4692
|
+
description: "Upload small files or a base64 ZIP to a sandbox's container. A relative path lands in the container's start folder (its dir: the login user's home, else WORKDIR, else /), an absolute one where it says; the answer names the absolute paths written and that folder (root). For directories or large ZIPs, use `ghostdock sandboxes files upload`.",
|
|
4676
4693
|
inputSchema: {
|
|
4677
4694
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4678
4695
|
type: "object",
|
|
@@ -4755,7 +4772,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
4755
4772
|
cliArgs: [
|
|
4756
4773
|
"sandboxId"
|
|
4757
4774
|
],
|
|
4758
|
-
description: "List the files in a sandbox directory (
|
|
4775
|
+
description: "List the files in a sandbox directory. Default: the container's start folder (its dir).",
|
|
4759
4776
|
inputSchema: {
|
|
4760
4777
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4761
4778
|
type: "object",
|
|
@@ -4778,7 +4795,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
4778
4795
|
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"
|
|
4779
4796
|
},
|
|
4780
4797
|
path: {
|
|
4781
|
-
description: "Directory to list
|
|
4798
|
+
description: "Directory to list: absolute, or relative to the container's start folder (its dir: the login user's home, else WORKDIR, else /). Defaults to that folder.",
|
|
4782
4799
|
type: "string",
|
|
4783
4800
|
minLength: 1
|
|
4784
4801
|
}
|
|
@@ -4866,7 +4883,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
4866
4883
|
path: {
|
|
4867
4884
|
type: "string",
|
|
4868
4885
|
minLength: 1,
|
|
4869
|
-
description: "File path
|
|
4886
|
+
description: "File path: absolute, or relative to the container's start folder (for example src/App.vue)."
|
|
4870
4887
|
}
|
|
4871
4888
|
},
|
|
4872
4889
|
required: [
|
|
@@ -6082,7 +6099,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6082
6099
|
cliArgs: [
|
|
6083
6100
|
"sandboxId"
|
|
6084
6101
|
],
|
|
6085
|
-
description: "List the containers of a sandbox, running or not. Each with state, health, restart policy, ports, Compose project and service,
|
|
6102
|
+
description: "List the containers of a sandbox, running or not. Each with state, health, restart policy, ports, Compose project and service, its lock (locked, and whether a person or its ghostdock.lock label decided), ghostdock.* labels, and which one is the default. A stopped sandbox lists none (it is not started for this).",
|
|
6086
6103
|
inputSchema: {
|
|
6087
6104
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6088
6105
|
type: "object",
|
|
@@ -6166,18 +6183,18 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6166
6183
|
}
|
|
6167
6184
|
},
|
|
6168
6185
|
{
|
|
6169
|
-
id: "
|
|
6170
|
-
name: "
|
|
6186
|
+
id: "sandboxes_containers_lock",
|
|
6187
|
+
name: "sandboxes_containers_lock",
|
|
6171
6188
|
cli: [
|
|
6172
6189
|
"sandboxes",
|
|
6173
6190
|
"containers",
|
|
6174
|
-
"
|
|
6191
|
+
"lock"
|
|
6175
6192
|
],
|
|
6176
6193
|
cliArgs: [
|
|
6177
6194
|
"sandboxId",
|
|
6178
6195
|
"container"
|
|
6179
6196
|
],
|
|
6180
|
-
description: "
|
|
6197
|
+
description: "Lock a container against removal. A locked container cannot be removed, renamed or recreated through Docker (docker rm, compose down, a compose up that would recreate it) until it is unlocked here; start, stop and restart still work. It also pauses the sandbox’s auto-delete. An ephemeral sandbox’s stop still wipes it. Never starts the sandbox: a stopped one gets the lock at its next start.",
|
|
6181
6198
|
inputSchema: {
|
|
6182
6199
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6183
6200
|
type: "object",
|
|
@@ -6198,17 +6215,63 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6198
6215
|
maxLength: 255,
|
|
6199
6216
|
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
|
|
6200
6217
|
description: "Container, by name."
|
|
6218
|
+
}
|
|
6219
|
+
},
|
|
6220
|
+
required: [
|
|
6221
|
+
"organization",
|
|
6222
|
+
"sandboxId",
|
|
6223
|
+
"container"
|
|
6224
|
+
],
|
|
6225
|
+
additionalProperties: false
|
|
6226
|
+
},
|
|
6227
|
+
outputSchema: {
|
|
6228
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6229
|
+
type: "object",
|
|
6230
|
+
propertyNames: {
|
|
6231
|
+
type: "string"
|
|
6232
|
+
},
|
|
6233
|
+
additionalProperties: {}
|
|
6234
|
+
}
|
|
6235
|
+
},
|
|
6236
|
+
{
|
|
6237
|
+
id: "sandboxes_containers_unlock",
|
|
6238
|
+
name: "sandboxes_containers_unlock",
|
|
6239
|
+
cli: [
|
|
6240
|
+
"sandboxes",
|
|
6241
|
+
"containers",
|
|
6242
|
+
"unlock"
|
|
6243
|
+
],
|
|
6244
|
+
cliArgs: [
|
|
6245
|
+
"sandboxId",
|
|
6246
|
+
"container"
|
|
6247
|
+
],
|
|
6248
|
+
description: "Unlock a container so Docker can remove or recreate it. Also one its image locked with the ghostdock.lock label. Never starts the sandbox: a stopped one gets it at its next start, and an overdue auto-delete it held goes ahead.",
|
|
6249
|
+
inputSchema: {
|
|
6250
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6251
|
+
type: "object",
|
|
6252
|
+
properties: {
|
|
6253
|
+
organization: {
|
|
6254
|
+
type: "string",
|
|
6255
|
+
minLength: 1,
|
|
6256
|
+
description: "Organization id or slug, from organizations_list. Ids survive renames; slugs change when the organization is renamed."
|
|
6201
6257
|
},
|
|
6202
|
-
|
|
6203
|
-
type: "
|
|
6204
|
-
|
|
6258
|
+
sandboxId: {
|
|
6259
|
+
type: "string",
|
|
6260
|
+
minLength: 1,
|
|
6261
|
+
description: "Sandbox name (e.g. quiet-harbor) or id, from sandboxes_list or sandboxes_create. Names are unique within the organization."
|
|
6262
|
+
},
|
|
6263
|
+
container: {
|
|
6264
|
+
type: "string",
|
|
6265
|
+
minLength: 1,
|
|
6266
|
+
maxLength: 255,
|
|
6267
|
+
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
|
|
6268
|
+
description: "Container, by name."
|
|
6205
6269
|
}
|
|
6206
6270
|
},
|
|
6207
6271
|
required: [
|
|
6208
6272
|
"organization",
|
|
6209
6273
|
"sandboxId",
|
|
6210
|
-
"container"
|
|
6211
|
-
"protected"
|
|
6274
|
+
"container"
|
|
6212
6275
|
],
|
|
6213
6276
|
additionalProperties: false
|
|
6214
6277
|
},
|
|
@@ -6284,7 +6347,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6284
6347
|
"sandboxId",
|
|
6285
6348
|
"container"
|
|
6286
6349
|
],
|
|
6287
|
-
description: "Stop a container, as docker stop does. It gets its own stop signal, then a kill after its own stop timeout. It stays stopped while the sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped).
|
|
6350
|
+
description: "Stop a container, as docker stop does. It gets its own stop signal, then a kill after its own stop timeout. It stays stopped while the sandbox sleeps and wakes, as Docker keeps a stopped container stopped, unless its restart policy is always. On a stopped sandbox it does nothing (note sandbox_stopped). A lock does not block it. note says when it was the default container or the last one running: then SSH, commands and files have nowhere to land until one runs.",
|
|
6288
6351
|
inputSchema: {
|
|
6289
6352
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6290
6353
|
type: "object",
|
|
@@ -6827,7 +6890,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6827
6890
|
pattern: "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"
|
|
6828
6891
|
},
|
|
6829
6892
|
sessionId: {
|
|
6830
|
-
description: "Id for the new session: a slug
|
|
6893
|
+
description: "Id for the new session: a slug. Omit to generate one.",
|
|
6831
6894
|
type: "string",
|
|
6832
6895
|
minLength: 1
|
|
6833
6896
|
}
|
|
@@ -6902,62 +6965,6 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6902
6965
|
additionalProperties: {}
|
|
6903
6966
|
}
|
|
6904
6967
|
},
|
|
6905
|
-
{
|
|
6906
|
-
id: "sandboxes_set_boot",
|
|
6907
|
-
name: "sandboxes_set_boot",
|
|
6908
|
-
cli: [
|
|
6909
|
-
"sandboxes",
|
|
6910
|
-
"set-boot"
|
|
6911
|
-
],
|
|
6912
|
-
cliArgs: [
|
|
6913
|
-
"sandboxId"
|
|
6914
|
-
],
|
|
6915
|
-
description: "Register a command that starts now and again after every restart. For example bun dev. On Compose it runs after the stack; on a Dockerfile it replaces the image CMD. Snapshots cannot register one. Read the sandbox-boot skill.",
|
|
6916
|
-
inputSchema: {
|
|
6917
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6918
|
-
type: "object",
|
|
6919
|
-
properties: {
|
|
6920
|
-
organization: {
|
|
6921
|
-
type: "string",
|
|
6922
|
-
minLength: 1,
|
|
6923
|
-
description: "Organization id or slug, from organizations_list. Ids survive renames; slugs change when the organization is renamed."
|
|
6924
|
-
},
|
|
6925
|
-
sandboxId: {
|
|
6926
|
-
type: "string",
|
|
6927
|
-
minLength: 1,
|
|
6928
|
-
description: "Sandbox name (e.g. quiet-harbor) or id, from sandboxes_list or sandboxes_create. Names are unique within the organization."
|
|
6929
|
-
},
|
|
6930
|
-
command: {
|
|
6931
|
-
type: "string",
|
|
6932
|
-
minLength: 1,
|
|
6933
|
-
description: "Command to start, e.g. bun dev."
|
|
6934
|
-
},
|
|
6935
|
-
cwd: {
|
|
6936
|
-
description: "Directory to run it in. Default /.",
|
|
6937
|
-
type: "string",
|
|
6938
|
-
minLength: 1
|
|
6939
|
-
},
|
|
6940
|
-
start: {
|
|
6941
|
-
description: "Also start it now, not only after restarts. Default true.",
|
|
6942
|
-
type: "boolean"
|
|
6943
|
-
}
|
|
6944
|
-
},
|
|
6945
|
-
required: [
|
|
6946
|
-
"organization",
|
|
6947
|
-
"sandboxId",
|
|
6948
|
-
"command"
|
|
6949
|
-
],
|
|
6950
|
-
additionalProperties: false
|
|
6951
|
-
},
|
|
6952
|
-
outputSchema: {
|
|
6953
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6954
|
-
type: "object",
|
|
6955
|
-
propertyNames: {
|
|
6956
|
-
type: "string"
|
|
6957
|
-
},
|
|
6958
|
-
additionalProperties: {}
|
|
6959
|
-
}
|
|
6960
|
-
},
|
|
6961
6968
|
{
|
|
6962
6969
|
id: "sandboxes_update",
|
|
6963
6970
|
name: "sandboxes_update",
|
|
@@ -6968,7 +6975,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
6968
6975
|
cliArgs: [
|
|
6969
6976
|
"sandboxId"
|
|
6970
6977
|
],
|
|
6971
|
-
description: "Change a sandbox’s display name, idle-stop or
|
|
6978
|
+
description: "Change a sandbox’s display name, idle-stop interval or lifecycle. Omit a field to keep it; null resets it to the platform default. Ephemeral is chosen at create only.",
|
|
6972
6979
|
inputSchema: {
|
|
6973
6980
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
6974
6981
|
type: "object",
|
|
@@ -7005,11 +7012,21 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7005
7012
|
}
|
|
7006
7013
|
]
|
|
7007
7014
|
},
|
|
7008
|
-
|
|
7009
|
-
description: "
|
|
7015
|
+
lifecycle: {
|
|
7016
|
+
description: "auto_delete: the record goes autoDeleteAfterDays after the sandbox stops. keep: never removed automatically.",
|
|
7017
|
+
type: "string",
|
|
7018
|
+
enum: [
|
|
7019
|
+
"auto_delete",
|
|
7020
|
+
"keep"
|
|
7021
|
+
]
|
|
7022
|
+
},
|
|
7023
|
+
autoDeleteAfterDays: {
|
|
7024
|
+
description: "Days stopped before the record is deleted (0–365; 0 deletes it when it stops). Null writes the platform default. Not with keep.",
|
|
7010
7025
|
anyOf: [
|
|
7011
7026
|
{
|
|
7012
|
-
type: "
|
|
7027
|
+
type: "integer",
|
|
7028
|
+
minimum: 0,
|
|
7029
|
+
maximum: 365
|
|
7013
7030
|
},
|
|
7014
7031
|
{
|
|
7015
7032
|
type: "null"
|
|
@@ -7263,7 +7280,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7263
7280
|
cliArgs: [
|
|
7264
7281
|
"sandboxId"
|
|
7265
7282
|
],
|
|
7266
|
-
description: "Permanently delete a sandbox and its files.",
|
|
7283
|
+
description: "Permanently delete a sandbox and its files. Refused while it has locked containers (sandbox_has_locked_containers, naming them) unless deleteLocked is true.",
|
|
7267
7284
|
inputSchema: {
|
|
7268
7285
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7269
7286
|
type: "object",
|
|
@@ -7277,6 +7294,10 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7277
7294
|
type: "string",
|
|
7278
7295
|
minLength: 1,
|
|
7279
7296
|
description: "Sandbox name (e.g. quiet-harbor) or id, from sandboxes_list or sandboxes_create. Names are unique within the organization."
|
|
7297
|
+
},
|
|
7298
|
+
deleteLocked: {
|
|
7299
|
+
description: "Delete it with its locked containers. Without it, a locked container refuses the delete.",
|
|
7300
|
+
type: "boolean"
|
|
7280
7301
|
}
|
|
7281
7302
|
},
|
|
7282
7303
|
required: [
|
|
@@ -7321,7 +7342,7 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7321
7342
|
minLength: 1
|
|
7322
7343
|
},
|
|
7323
7344
|
directory: {
|
|
7324
|
-
description: "Sandbox directory to upload when files/zip are omitted. Defaults to dist.",
|
|
7345
|
+
description: "Sandbox directory to upload when files/zip are omitted: absolute, or relative to the container's start folder (its dir). Defaults to dist there.",
|
|
7325
7346
|
type: "string",
|
|
7326
7347
|
minLength: 1
|
|
7327
7348
|
},
|
|
@@ -7695,9 +7716,20 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7695
7716
|
description: "Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup.",
|
|
7696
7717
|
type: "number"
|
|
7697
7718
|
},
|
|
7698
|
-
|
|
7699
|
-
description: "
|
|
7700
|
-
type: "
|
|
7719
|
+
lifecycle: {
|
|
7720
|
+
description: "What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only.",
|
|
7721
|
+
type: "string",
|
|
7722
|
+
enum: [
|
|
7723
|
+
"ephemeral",
|
|
7724
|
+
"auto_delete",
|
|
7725
|
+
"keep"
|
|
7726
|
+
]
|
|
7727
|
+
},
|
|
7728
|
+
autoDeleteAfterDays: {
|
|
7729
|
+
description: "Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it.",
|
|
7730
|
+
type: "integer",
|
|
7731
|
+
minimum: 0,
|
|
7732
|
+
maximum: 365
|
|
7701
7733
|
},
|
|
7702
7734
|
sandboxProviderId: {
|
|
7703
7735
|
description: "Configured sandbox-provider instance id from providers_list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new sandboxes and has it is used. When no provider fits, the call fails with a not-configured error.",
|
|
@@ -7785,10 +7817,6 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
7785
7817
|
},
|
|
7786
7818
|
additionalProperties: false
|
|
7787
7819
|
},
|
|
7788
|
-
ephemeral: {
|
|
7789
|
-
description: "Mark the sandbox ephemeral: every stop destroys the machine and the next start boots fresh, while the record, URLs, and settings stay. Omit to use the image label ghostdock.ephemeral, or false when that label is absent. Does not change idle-stop or auto-delete.",
|
|
7790
|
-
type: "boolean"
|
|
7791
|
-
},
|
|
7792
7820
|
autoWake: {
|
|
7793
7821
|
description: "Same as urls[].autoWake on sandboxes_create. Default true for the minted URL (sandboxes_urls_create defaults false).",
|
|
7794
7822
|
type: "boolean"
|
|
@@ -8165,9 +8193,20 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
8165
8193
|
description: "Minutes of inactivity before the platform worker idle-stops the sandbox. -1 means always on. 0 is rejected. Omit for the platform default. Provider-native timers are optional backup.",
|
|
8166
8194
|
type: "number"
|
|
8167
8195
|
},
|
|
8168
|
-
|
|
8169
|
-
description: "
|
|
8170
|
-
type: "
|
|
8196
|
+
lifecycle: {
|
|
8197
|
+
description: "What may make the sandbox disappear on its own. ephemeral: every stop wipes the VM and its disk, and the next start runs its Compose project again (edits in the project folder kept, everything else gone; locks too). auto_delete (default): a stop keeps the disk, and the record goes autoDeleteAfterDays after the stop. keep: never removed automatically. Omit for the image label ghostdock.ephemeral, else auto_delete. ephemeral is chosen here only.",
|
|
8198
|
+
type: "string",
|
|
8199
|
+
enum: [
|
|
8200
|
+
"ephemeral",
|
|
8201
|
+
"auto_delete",
|
|
8202
|
+
"keep"
|
|
8203
|
+
]
|
|
8204
|
+
},
|
|
8205
|
+
autoDeleteAfterDays: {
|
|
8206
|
+
description: "Days the sandbox stays stopped before the platform worker deletes the record (0–365; 0 deletes it when it stops). Omit for the platform default (14). Not with keep. A container a person locked holds it.",
|
|
8207
|
+
type: "integer",
|
|
8208
|
+
minimum: 0,
|
|
8209
|
+
maximum: 365
|
|
8171
8210
|
},
|
|
8172
8211
|
sandboxProviderId: {
|
|
8173
8212
|
description: "Configured sandbox-provider instance id from providers_list (not the provider kind). Omit to use the organization default (the org choice, else the platform default); if that provider lacks a capability this create needs, the first listed provider that accepts new sandboxes and has it is used. When no provider fits, the call fails with a not-configured error.",
|
|
@@ -8255,10 +8294,6 @@ var GENERATED_TOOL_CATALOG = [
|
|
|
8255
8294
|
},
|
|
8256
8295
|
additionalProperties: false
|
|
8257
8296
|
},
|
|
8258
|
-
ephemeral: {
|
|
8259
|
-
description: "Mark the sandbox ephemeral: every stop destroys the machine and the next start boots fresh, while the record, URLs, and settings stay. Omit to use the image label ghostdock.ephemeral, or false when that label is absent. Does not change idle-stop or auto-delete.",
|
|
8260
|
-
type: "boolean"
|
|
8261
|
-
},
|
|
8262
8297
|
autoWake: {
|
|
8263
8298
|
description: "Same as urls[].autoWake on sandboxes_create. Default true for the minted URL.",
|
|
8264
8299
|
type: "boolean"
|
|
@@ -9201,7 +9236,7 @@ function dockerContextName(orgSlug, sandboxName) {
|
|
|
9201
9236
|
return `ghostdock-${orgSlug}-${sandboxName}`;
|
|
9202
9237
|
}
|
|
9203
9238
|
// package.json
|
|
9204
|
-
var version = "0.0.
|
|
9239
|
+
var version = "0.0.19";
|
|
9205
9240
|
var package_default = {
|
|
9206
9241
|
name: "ghostdock",
|
|
9207
9242
|
description: "Ghostdock CLI — device login and agent tool invocation from the command line",
|
|
@@ -12242,7 +12277,7 @@ async function runPublishAuto(options, log = console.log, error = printError) {
|
|
|
12242
12277
|
form.append("displayName", options.displayName);
|
|
12243
12278
|
appendOptional(form, "tag", options.tag);
|
|
12244
12279
|
appendOptional(form, "autoStopIntervalMinutes", options.autoStopIntervalMinutes);
|
|
12245
|
-
appendOptional(form, "
|
|
12280
|
+
appendOptional(form, "autoDeleteAfterDays", options.autoDeleteAfterDays);
|
|
12246
12281
|
appendOptional(form, "resources", options.resources);
|
|
12247
12282
|
appendOptional(form, "environment", options.environment);
|
|
12248
12283
|
appendOptional(form, "autoWake", options.autoWake);
|
|
@@ -12312,9 +12347,9 @@ var publishAutoCommand = defineCommand({
|
|
|
12312
12347
|
type: "string",
|
|
12313
12348
|
description: "Same as `sandboxes create`. Omit for the 20-minute default. Pass -1 to keep it running. 0 is rejected."
|
|
12314
12349
|
},
|
|
12315
|
-
"auto-delete-
|
|
12350
|
+
"auto-delete-after-days": {
|
|
12316
12351
|
type: "string",
|
|
12317
|
-
description: "Same as `sandboxes create
|
|
12352
|
+
description: "Same as `sandboxes create`: days stopped before the record is deleted (0–365). Omit for the 14-day default. Pass 0 to delete the record when it stops."
|
|
12318
12353
|
},
|
|
12319
12354
|
resources: {
|
|
12320
12355
|
type: "string",
|
|
@@ -12364,7 +12399,7 @@ var publishAutoCommand = defineCommand({
|
|
|
12364
12399
|
displayName: args["display-name"],
|
|
12365
12400
|
tag: args.tag,
|
|
12366
12401
|
autoStopIntervalMinutes: args["auto-stop-interval-minutes"],
|
|
12367
|
-
|
|
12402
|
+
autoDeleteAfterDays: args["auto-delete-after-days"],
|
|
12368
12403
|
resources: args.resources,
|
|
12369
12404
|
environment: args.environment,
|
|
12370
12405
|
autoWake: args["auto-wake"],
|
|
@@ -13611,7 +13646,7 @@ async function runSandboxUpload(options, log = console.log, error = printError,
|
|
|
13611
13646
|
const result = await withContainerPick(call, () => withContainerStart(call, send, options.start === true, pickers, notice), pickers, notice);
|
|
13612
13647
|
const count = `${result.written.length} file${result.written.length === 1 ? "" : "s"}`;
|
|
13613
13648
|
printResult(result, () => [
|
|
13614
|
-
eventLine("done", result.container ? `Uploaded ${count} to ${result.
|
|
13649
|
+
eventLine("done", result.container ? `Uploaded ${count} to ${result.root} in ${result.container} (${options.sandboxId}).` : `Uploaded ${count} to ${result.root} in ${options.sandboxId}.`)
|
|
13615
13650
|
], log);
|
|
13616
13651
|
return 0;
|
|
13617
13652
|
} catch (err) {
|
|
@@ -13626,7 +13661,7 @@ async function runSandboxUpload(options, log = console.log, error = printError,
|
|
|
13626
13661
|
var sandboxUploadCommand = defineCommand({
|
|
13627
13662
|
meta: {
|
|
13628
13663
|
name: "upload",
|
|
13629
|
-
description: "Upload local files or directories to a sandbox
|
|
13664
|
+
description: "Upload local files or directories to a sandbox's container, into its start folder (the login user's home, else WORKDIR, else /)."
|
|
13630
13665
|
},
|
|
13631
13666
|
args: {
|
|
13632
13667
|
"sandbox-id": {
|