···11+{
22+ "lexicon": 1,
33+ "id": "io.pocketenv.file.getFiles",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "parameters": {
88+ "type": "params",
99+ "properties": {
1010+ "limit": {
1111+ "type": "integer",
1212+ "description": "The maximum number of files to return.",
1313+ "minimum": 1
1414+ },
1515+ "offset": {
1616+ "type": "integer",
1717+ "description": "The number of files to skip before starting to collect the result set.",
1818+ "minimum": 0
1919+ }
2020+ }
2121+ },
2222+ "output": {
2323+ "encoding": "application/json",
2424+ "schema": {
2525+ "type": "object",
2626+ "properties": {
2727+ "files": {
2828+ "type": "array",
2929+ "items": {
3030+ "type": "ref",
3131+ "ref": "io.pocketenv.file.defs#fileView"
3232+ }
3333+ },
3434+ "total": {
3535+ "type": "integer",
3636+ "description": "The total number of files available.",
3737+ "minimum": 0
3838+ }
3939+ }
4040+ }
4141+ }
4242+ }
4343+ }
4444+}
+131
apps/api/lexicons/sandbox/defs.json
···178178 "ref": "io.pocketenv.user.defs#userViewBasic"
179179 }
180180 }
181181+ },
182182+ "sandboxDetailsPref": {
183183+ "type": "object",
184184+ "properties": {
185185+ "name": {
186186+ "type": "string",
187187+ "description": "The name of the sandbox",
188188+ "minLength": 1
189189+ },
190190+ "description": {
191191+ "type": "string",
192192+ "description": "A description for the sandbox"
193193+ },
194194+ "topics": {
195195+ "type": "array",
196196+ "description": "A list of topics/tags to associate with the sandbox",
197197+ "items": {
198198+ "type": "string",
199199+ "maxLength": 50
200200+ }
201201+ },
202202+ "repo": {
203203+ "type": "string",
204204+ "description": "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.",
205205+ "format": "uri"
206206+ },
207207+ "vcpus": {
208208+ "type": "integer",
209209+ "description": "The number of virtual CPUs to allocate for the sandbox",
210210+ "minimum": 1
211211+ },
212212+ "memory": {
213213+ "type": "integer",
214214+ "description": "The amount of memory (in GB) to allocate for the sandbox",
215215+ "minimum": 1
216216+ },
217217+ "disk": {
218218+ "type": "integer",
219219+ "description": "The amount of disk space (in GB) to allocate for the sandbox",
220220+ "minimum": 3
221221+ },
222222+ "readme": {
223223+ "type": "string",
224224+ "description": "A URI to a README for the sandbox.",
225225+ "format": "uri"
226226+ }
227227+ }
228228+ },
229229+ "secretPref": {
230230+ "type": "object",
231231+ "properties": {
232232+ "name": {
233233+ "type": "string",
234234+ "description": "The name of the secret",
235235+ "minLength": 1
236236+ },
237237+ "value": {
238238+ "type": "string",
239239+ "description": "The value of the secret. This will be encrypted at rest and redacted in any API responses."
240240+ }
241241+ }
242242+ },
243243+ "variablePref": {
244244+ "type": "object",
245245+ "description": "A variable to add to the sandbox",
246246+ "properties": {
247247+ "name": {
248248+ "type": "string",
249249+ "description": "The name of the variable",
250250+ "minLength": 1
251251+ },
252252+ "value": {
253253+ "type": "string",
254254+ "description": "The value of the variable. This will be visible in API responses and should not contain sensitive information."
255255+ }
256256+ }
257257+ },
258258+ "filePref": {
259259+ "type": "object",
260260+ "description": "A file to add to the sandbox",
261261+ "properties": {
262262+ "name": {
263263+ "type": "string",
264264+ "description": "The name of the file",
265265+ "minLength": 1
266266+ },
267267+ "content": {
268268+ "type": "string",
269269+ "description": "The content of the file."
270270+ },
271271+ "encrypt": {
272272+ "type": "boolean",
273273+ "description": "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information."
274274+ },
275275+ "path": {
276276+ "type": "string",
277277+ "description": "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox."
278278+ }
279279+ }
280280+ },
281281+ "volumePref": {
282282+ "type": "object",
283283+ "description": "A volume to add to the sandbox",
284284+ "properties": {
285285+ "name": {
286286+ "type": "string",
287287+ "description": "The name of the volume",
288288+ "minLength": 1
289289+ },
290290+ "path": {
291291+ "type": "string",
292292+ "description": "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc."
293293+ },
294294+ "readOnly": {
295295+ "type": "boolean",
296296+ "description": "Whether the volume should be mounted as read-only"
297297+ }
298298+ }
299299+ },
300300+ "preferences": {
301301+ "type": "array",
302302+ "items": {
303303+ "type": "union",
304304+ "refs": [
305305+ "#sandboxDetailsPref",
306306+ "#secretPref",
307307+ "#variablePref",
308308+ "#filePref",
309309+ "#volumePref"
310310+ ]
311311+ }
181312 }
182313 }
183314}
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.file.getFiles"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ parameters {
99+ type = "params"
1010+ properties {
1111+ ["limit"] = new IntegerType {
1212+ type = "integer"
1313+ description = "The maximum number of files to return."
1414+ minimum = 1
1515+ }
1616+ ["offset"] = new IntegerType {
1717+ type = "integer"
1818+ description = "The number of files to skip before starting to collect the result set."
1919+ minimum = 0
2020+ }
2121+ }
2222+ }
2323+ output {
2424+ encoding = "application/json"
2525+ schema = new ObjectType {
2626+ type = "object"
2727+ properties {
2828+ ["files"] = new Array {
2929+ type = "array"
3030+ items = new Ref {
3131+ ref = "io.pocketenv.file.defs#fileView"
3232+ }
3333+ }
3434+ ["total"] = new IntegerType {
3535+ type = "integer"
3636+ description = "The total number of files available."
3737+ minimum = 0
3838+ }
3939+ }
4040+ }
4141+ }
4242+ }
4343+}
+135
apps/api/pkl/defs/sandbox/defs.pkl
···181181 }
182182 }
183183 }
184184+ ["sandboxDetailsPref"] = new ObjectType {
185185+ type = "object"
186186+ properties {
187187+ ["name"] = new StringType {
188188+ type = "string"
189189+ description = "The name of the sandbox"
190190+ minLength = 1
191191+ }
192192+ ["description"] = new StringType {
193193+ type = "string"
194194+ description = "A description for the sandbox"
195195+ }
196196+ ["topics"] = new Array {
197197+ type = "array"
198198+ description = "A list of topics/tags to associate with the sandbox"
199199+ items = new StringType {
200200+ type = "string"
201201+ maxLength = 50
202202+ }
203203+ }
204204+ ["repo"] = new StringType {
205205+ type = "string"
206206+ description =
207207+ "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo."
208208+ format = "uri"
209209+ }
210210+ ["vcpus"] = new IntegerType {
211211+ type = "integer"
212212+ description = "The number of virtual CPUs to allocate for the sandbox"
213213+ minimum = 1
214214+ }
215215+ ["memory"] = new IntegerType {
216216+ type = "integer"
217217+ description = "The amount of memory (in GB) to allocate for the sandbox"
218218+ minimum = 1
219219+ }
220220+ ["disk"] = new IntegerType {
221221+ type = "integer"
222222+ description = "The amount of disk space (in GB) to allocate for the sandbox"
223223+ minimum = 3
224224+ }
225225+ ["readme"] = new StringType {
226226+ type = "string"
227227+ description = "A URI to a README for the sandbox."
228228+ format = "uri"
229229+ }
230230+ }
231231+ }
232232+ ["secretPref"] = new ObjectType {
233233+ type = "object"
234234+ properties {
235235+ ["name"] = new StringType {
236236+ type = "string"
237237+ description = "The name of the secret"
238238+ minLength = 1
239239+ }
240240+ ["value"] = new StringType {
241241+ type = "string"
242242+ description = "The value of the secret. This will be encrypted at rest and redacted in any API responses."
243243+ }
244244+ }
245245+ }
246246+ ["variablePref"] = new ObjectType {
247247+ type = "object"
248248+ properties {
249249+ ["name"] = new StringType {
250250+ type = "string"
251251+ description = "The name of the variable"
252252+ minLength = 1
253253+ }
254254+ ["value"] = new StringType {
255255+ type = "string"
256256+ description = "The value of the variable. This will be visible in API responses and should not contain sensitive information."
257257+ }
258258+ }
259259+ description = "A variable to add to the sandbox"
260260+ }
261261+ ["filePref"] = new ObjectType {
262262+ type = "object"
263263+ properties {
264264+ ["name"] = new StringType {
265265+ type = "string"
266266+ description = "The name of the file"
267267+ minLength = 1
268268+ }
269269+ ["content"] = new StringType {
270270+ type = "string"
271271+ description = "The content of the file."
272272+ }
273273+ ["encrypt"] = new BooleanType {
274274+ type = "boolean"
275275+ description =
276276+ "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information."
277277+ }
278278+ ["path"] = new StringType {
279279+ type = "string"
280280+ description =
281281+ "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox."
282282+ }
283283+ }
284284+ description = "A file to add to the sandbox"
285285+ }
286286+ ["volumePref"] = new ObjectType {
287287+ type = "object"
288288+ properties {
289289+ ["name"] = new StringType {
290290+ type = "string"
291291+ description = "The name of the volume"
292292+ minLength = 1
293293+ }
294294+ ["path"] = new StringType {
295295+ type = "string"
296296+ description =
297297+ "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc."
298298+ }
299299+ ["readOnly"] = new BooleanType {
300300+ type = "boolean"
301301+ description = "Whether the volume should be mounted as read-only"
302302+ }
303303+ }
304304+ description = "A volume to add to the sandbox"
305305+ }
306306+ ["preferences"] = new Array {
307307+ type = "array"
308308+ items = new Union {
309309+ type = "union"
310310+ refs = List(
311311+ "#sandboxDetailsPref",
312312+ "#secretPref",
313313+ "#variablePref",
314314+ "#filePref",
315315+ "#volumePref"
316316+ )
317317+ }
318318+ }
184319}
+27
apps/api/pkl/defs/sandbox/getPreferences.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.getPreferences"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get sandbox preferences"
99+ parameters {
1010+ type = "params"
1111+ required = List("id")
1212+ properties {
1313+ ["id"] = new StringType {
1414+ type = "string"
1515+ description = "The sandbox ID or URI to retrieve"
1616+ }
1717+ }
1818+ }
1919+ output {
2020+ encoding = "application/json"
2121+ schema = new Ref {
2222+ type = "ref"
2323+ ref = "io.pocketenv.sandbox.defs#preferences"
2424+ }
2525+ }
2626+ }
2727+}
···11-amends "../../schema/lexicon.pkl"
22-33-lexicon = 1
44-id = "io.pocketenv.sandbox.updateSandboxSettings"
55-defs = new Mapping<String, Procedure> {
66- ["main"] {
77- type = "procedure"
88- description = "Update sandbox settings"
99- input {
1010- encoding = "application/json"
1111- schema {
1212- type = "object"
1313- properties {
1414- ["name"] = new StringType {
1515- type = "string"
1616- description = "The name of the sandbox"
1717- minLength = 1
1818- }
1919- ["description"] = new StringType {
2020- type = "string"
2121- description = "A description for the sandbox"
2222- }
2323- ["topics"] = new Array {
2424- type = "array"
2525- description = "A list of topics/tags to associate with the sandbox"
2626- items = new StringType {
2727- type = "string"
2828- maxLength = 50
2929- }
3030- }
3131- ["repo"] = new StringType {
3232- type = "string"
3333- description =
3434- "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo."
3535- format = "uri"
3636- }
3737- ["vcpus"] = new IntegerType {
3838- type = "integer"
3939- description = "The number of virtual CPUs to allocate for the sandbox"
4040- minimum = 1
4141- }
4242- ["memory"] = new IntegerType {
4343- type = "integer"
4444- description = "The amount of memory (in GB) to allocate for the sandbox"
4545- minimum = 1
4646- }
4747- ["disk"] = new IntegerType {
4848- type = "integer"
4949- description = "The amount of disk space (in GB) to allocate for the sandbox"
5050- minimum = 3
5151- }
5252- ["readme"] = new StringType {
5353- type = "string"
5454- description = "A URI to a README for the sandbox."
5555- format = "uri"
5656- }
5757- ["secrets"] = new Ref {
5858- type = "ref"
5959- ref = "io.pocketenv.secret.defs#secrets"
6060- description = "A list of secrets to add to the sandbox"
6161- }
6262- ["variables"] = new Ref {
6363- type = "ref"
6464- ref = "io.pocketenv.variable.defs#variables"
6565- description = "A list of environment variables to add to the sandbox"
6666- }
6767- ["files"] = new Ref {
6868- type = "ref"
6969- ref = "io.pocketenv.file.defs#file"
7070- description = "A list of files to add to the sandbox"
7171- }
7272- ["volumes"] = new Ref {
7373- type = "ref"
7474- ref = "io.pocketenv.volume.defs#volumes"
7575- description = "A list of volumes to add to the sandbox"
7676- }
7777- }
7878- }
7979- }
8080- output {
8181- encoding = "application/json"
8282- schema = new Ref {
8383- type = "ref"
8484- ref = "io.pocketenv.sandbox.defs#profileViewDetailed"
8585- }
8686- }
8787- }
8888-}
···33lexicon = 1
44id = "io.pocketenv.variable.defs"
55defs = new Mapping<String, StringType | Array | ObjectType> {
66+ ["variableView"] = new ObjectType {
77+ type = "object"
88+ properties {
99+ ["id"] = new StringType {
1010+ type = "string"
1111+ description = "Unique identifier of the environment variable."
1212+ }
1313+ ["name"] = new StringType {
1414+ type = "string"
1515+ description = "Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc."
1616+ }
1717+ ["value"] = new StringType {
1818+ type = "string"
1919+ description =
2020+ "Value of the environment variable. This will be visible in API responses and should not contain sensitive information."
2121+ }
2222+ }
2323+ }
624 ["variable"] = new ObjectType {
725 type = "object"
826 required = List("name", "value")
+19
apps/api/pkl/defs/variable/deleteVariable.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.variable.deleteVariable"
55+defs = new Mapping<String, Procedure> {
66+ ["main"] {
77+ type = "procedure"
88+ parameters {
99+ type = "params"
1010+ required = List("id")
1111+ properties {
1212+ ["id"] = new StringType {
1313+ type = "string"
1414+ description = "The ID of the environment variable to delete"
1515+ }
1616+ }
1717+ }
1818+ }
1919+}
+43
apps/api/pkl/defs/variable/getVariables.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.variable.getVariables"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ parameters {
99+ type = "params"
1010+ properties {
1111+ ["limit"] = new IntegerType {
1212+ type = "integer"
1313+ description = "The maximum number of variables to return."
1414+ minimum = 1
1515+ }
1616+ ["offset"] = new IntegerType {
1717+ type = "integer"
1818+ description = "The number of variables to skip before starting to collect the result set."
1919+ minimum = 0
2020+ }
2121+ }
2222+ }
2323+ output {
2424+ encoding = "application/json"
2525+ schema = new ObjectType {
2626+ type = "object"
2727+ properties {
2828+ ["variables"] = new Array {
2929+ type = "array"
3030+ items = new Ref {
3131+ ref = "io.pocketenv.variable.defs#variableView"
3232+ }
3333+ }
3434+ ["total"] = new IntegerType {
3535+ type = "integer"
3636+ description = "The total number of variables available."
3737+ minimum = 0
3838+ }
3939+ }
4040+ }
4141+ }
4242+ }
4343+}
···33lexicon = 1
44id = "io.pocketenv.volume.defs"
55defs = new Mapping<String, Array | ObjectType | StringType | BooleanType> {
66+ ["volumeView"] = new ObjectType {
77+ type = "object"
88+ properties {
99+ ["id"] = new StringType {
1010+ type = "string"
1111+ description = "Unique identifier of the volume."
1212+ }
1313+ ["name"] = new StringType {
1414+ type = "string"
1515+ description = "Name of the volume, e.g. 'data-volume', 'logs', etc."
1616+ }
1717+ }
1818+ }
619 ["volumes"] = new Array {
720 type = "array"
821 items = new Ref {
···1932 type = "string"
2033 description = "Name of the volume, e.g. 'data-volume', 'logs', etc."
2134 }
2222- ["path"] = new StringType {
2323- type = "string"
2424- description =
2525- "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc."
2626- }
2727- ["readOnly"] = new BooleanType {
2828- type = "boolean"
2929- description = "Whether the volume should be mounted as read-only"
3030- }
3135 }
3236 }
3337}
+19
apps/api/pkl/defs/volume/deleteVolume.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.volume.deleteVolume"
55+defs = new Mapping<String, Procedure> {
66+ ["main"] {
77+ type = "procedure"
88+ parameters {
99+ type = "params"
1010+ required = List("id")
1111+ properties {
1212+ ["id"] = new StringType {
1313+ type = "string"
1414+ description = "The ID of the volume to delete."
1515+ }
1616+ }
1717+ }
1818+ }
1919+}
+43
apps/api/pkl/defs/volume/getVolumes.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.volume.getVolumes"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ parameters {
99+ type = "params"
1010+ properties {
1111+ ["limit"] = new IntegerType {
1212+ type = "integer"
1313+ description = "The maximum number of volumes to return."
1414+ minimum = 1
1515+ }
1616+ ["offset"] = new IntegerType {
1717+ type = "integer"
1818+ description = "The number of volumes to skip before starting to collect the result set."
1919+ minimum = 0
2020+ }
2121+ }
2222+ }
2323+ output {
2424+ encoding = "application/json"
2525+ schema = new ObjectType {
2626+ type = "object"
2727+ properties {
2828+ ["volumes"] = new Array {
2929+ type = "array"
3030+ items = new Ref {
3131+ ref = "io.pocketenv.volume.defs#volumeView"
3232+ }
3333+ }
3434+ ["total"] = new IntegerType {
3535+ type = "integer"
3636+ description = "The total number of volumes available."
3737+ minimum = 0
3838+ }
3939+ }
4040+ }
4141+ }
4242+ }
4343+}
+208
apps/api/src/lexicon/index.ts
···1212import type * as IoPocketenvActorGetActorSandboxes from "./types/io/pocketenv/actor/getActorSandboxes";
1313import type * as IoPocketenvActorGetProfile from "./types/io/pocketenv/actor/getProfile";
1414import type * as IoPocketenvActorGetTerminalToken from "./types/io/pocketenv/actor/getTerminalToken";
1515+import type * as IoPocketenvFileAddFile from "./types/io/pocketenv/file/addFile";
1616+import type * as IoPocketenvFileDeleteFile from "./types/io/pocketenv/file/deleteFile";
1717+import type * as IoPocketenvFileGetFiles from "./types/io/pocketenv/file/getFiles";
1518import type * as IoPocketenvSandboxClaimSandbox from "./types/io/pocketenv/sandbox/claimSandbox";
1619import type * as IoPocketenvSandboxCreateSandbox from "./types/io/pocketenv/sandbox/createSandbox";
1720import type * as IoPocketenvSandboxDeleteSandbox from "./types/io/pocketenv/sandbox/deleteSandbox";
2121+import type * as IoPocketenvSandboxGetPreferences from "./types/io/pocketenv/sandbox/getPreferences";
1822import type * as IoPocketenvSandboxGetSandbox from "./types/io/pocketenv/sandbox/getSandbox";
1923import type * as IoPocketenvSandboxGetSandboxes from "./types/io/pocketenv/sandbox/getSandboxes";
2424+import type * as IoPocketenvSandboxPutPreferences from "./types/io/pocketenv/sandbox/putPreferences";
2025import type * as IoPocketenvSandboxStartSandbox from "./types/io/pocketenv/sandbox/startSandbox";
2126import type * as IoPocketenvSandboxStopSandbox from "./types/io/pocketenv/sandbox/stopSandbox";
2227import type * as IoPocketenvSandboxUpdateSandboxSettings from "./types/io/pocketenv/sandbox/updateSandboxSettings";
2828+import type * as IoPocketenvSecretAddSecret from "./types/io/pocketenv/secret/addSecret";
2929+import type * as IoPocketenvSecretDeleteSecret from "./types/io/pocketenv/secret/deleteSecret";
3030+import type * as IoPocketenvSecretGetSecrets from "./types/io/pocketenv/secret/getSecrets";
3131+import type * as IoPocketenvVariableAddVariable from "./types/io/pocketenv/variable/addVariable";
3232+import type * as IoPocketenvVariableDeleteVariable from "./types/io/pocketenv/variable/deleteVariable";
3333+import type * as IoPocketenvVariableGetVariables from "./types/io/pocketenv/variable/getVariables";
3434+import type * as IoPocketenvVolumeAddVolume from "./types/io/pocketenv/volume/addVolume";
3535+import type * as IoPocketenvVolumeDeleteVolume from "./types/io/pocketenv/volume/deleteVolume";
3636+import type * as IoPocketenvVolumeGetVolumes from "./types/io/pocketenv/volume/getVolumes";
23372438export function createServer(options?: XrpcOptions): Server {
2539 return new Server(options);
···5266export class IoPocketenvNS {
5367 _server: Server;
5468 actor: IoPocketenvActorNS;
6969+ file: IoPocketenvFileNS;
5570 sandbox: IoPocketenvSandboxNS;
7171+ secret: IoPocketenvSecretNS;
7272+ variable: IoPocketenvVariableNS;
7373+ volume: IoPocketenvVolumeNS;
56745775 constructor(server: Server) {
5876 this._server = server;
5977 this.actor = new IoPocketenvActorNS(server);
7878+ this.file = new IoPocketenvFileNS(server);
6079 this.sandbox = new IoPocketenvSandboxNS(server);
8080+ this.secret = new IoPocketenvSecretNS(server);
8181+ this.variable = new IoPocketenvVariableNS(server);
8282+ this.volume = new IoPocketenvVolumeNS(server);
6183 }
6284}
6385···102124 }
103125}
104126127127+export class IoPocketenvFileNS {
128128+ _server: Server;
129129+130130+ constructor(server: Server) {
131131+ this._server = server;
132132+ }
133133+134134+ addFile<AV extends AuthVerifier>(
135135+ cfg: ConfigOf<
136136+ AV,
137137+ IoPocketenvFileAddFile.Handler<ExtractAuth<AV>>,
138138+ IoPocketenvFileAddFile.HandlerReqCtx<ExtractAuth<AV>>
139139+ >,
140140+ ) {
141141+ const nsid = "io.pocketenv.file.addFile"; // @ts-ignore
142142+ return this._server.xrpc.method(nsid, cfg);
143143+ }
144144+145145+ deleteFile<AV extends AuthVerifier>(
146146+ cfg: ConfigOf<
147147+ AV,
148148+ IoPocketenvFileDeleteFile.Handler<ExtractAuth<AV>>,
149149+ IoPocketenvFileDeleteFile.HandlerReqCtx<ExtractAuth<AV>>
150150+ >,
151151+ ) {
152152+ const nsid = "io.pocketenv.file.deleteFile"; // @ts-ignore
153153+ return this._server.xrpc.method(nsid, cfg);
154154+ }
155155+156156+ getFiles<AV extends AuthVerifier>(
157157+ cfg: ConfigOf<
158158+ AV,
159159+ IoPocketenvFileGetFiles.Handler<ExtractAuth<AV>>,
160160+ IoPocketenvFileGetFiles.HandlerReqCtx<ExtractAuth<AV>>
161161+ >,
162162+ ) {
163163+ const nsid = "io.pocketenv.file.getFiles"; // @ts-ignore
164164+ return this._server.xrpc.method(nsid, cfg);
165165+ }
166166+}
167167+105168export class IoPocketenvSandboxNS {
106169 _server: Server;
107170···142205 return this._server.xrpc.method(nsid, cfg);
143206 }
144207208208+ getPreferences<AV extends AuthVerifier>(
209209+ cfg: ConfigOf<
210210+ AV,
211211+ IoPocketenvSandboxGetPreferences.Handler<ExtractAuth<AV>>,
212212+ IoPocketenvSandboxGetPreferences.HandlerReqCtx<ExtractAuth<AV>>
213213+ >,
214214+ ) {
215215+ const nsid = "io.pocketenv.sandbox.getPreferences"; // @ts-ignore
216216+ return this._server.xrpc.method(nsid, cfg);
217217+ }
218218+145219 getSandbox<AV extends AuthVerifier>(
146220 cfg: ConfigOf<
147221 AV,
···164238 return this._server.xrpc.method(nsid, cfg);
165239 }
166240241241+ putPreferences<AV extends AuthVerifier>(
242242+ cfg: ConfigOf<
243243+ AV,
244244+ IoPocketenvSandboxPutPreferences.Handler<ExtractAuth<AV>>,
245245+ IoPocketenvSandboxPutPreferences.HandlerReqCtx<ExtractAuth<AV>>
246246+ >,
247247+ ) {
248248+ const nsid = "io.pocketenv.sandbox.putPreferences"; // @ts-ignore
249249+ return this._server.xrpc.method(nsid, cfg);
250250+ }
251251+167252 startSandbox<AV extends AuthVerifier>(
168253 cfg: ConfigOf<
169254 AV,
···194279 >,
195280 ) {
196281 const nsid = "io.pocketenv.sandbox.updateSandboxSettings"; // @ts-ignore
282282+ return this._server.xrpc.method(nsid, cfg);
283283+ }
284284+}
285285+286286+export class IoPocketenvSecretNS {
287287+ _server: Server;
288288+289289+ constructor(server: Server) {
290290+ this._server = server;
291291+ }
292292+293293+ addSecret<AV extends AuthVerifier>(
294294+ cfg: ConfigOf<
295295+ AV,
296296+ IoPocketenvSecretAddSecret.Handler<ExtractAuth<AV>>,
297297+ IoPocketenvSecretAddSecret.HandlerReqCtx<ExtractAuth<AV>>
298298+ >,
299299+ ) {
300300+ const nsid = "io.pocketenv.secret.addSecret"; // @ts-ignore
301301+ return this._server.xrpc.method(nsid, cfg);
302302+ }
303303+304304+ deleteSecret<AV extends AuthVerifier>(
305305+ cfg: ConfigOf<
306306+ AV,
307307+ IoPocketenvSecretDeleteSecret.Handler<ExtractAuth<AV>>,
308308+ IoPocketenvSecretDeleteSecret.HandlerReqCtx<ExtractAuth<AV>>
309309+ >,
310310+ ) {
311311+ const nsid = "io.pocketenv.secret.deleteSecret"; // @ts-ignore
312312+ return this._server.xrpc.method(nsid, cfg);
313313+ }
314314+315315+ getSecrets<AV extends AuthVerifier>(
316316+ cfg: ConfigOf<
317317+ AV,
318318+ IoPocketenvSecretGetSecrets.Handler<ExtractAuth<AV>>,
319319+ IoPocketenvSecretGetSecrets.HandlerReqCtx<ExtractAuth<AV>>
320320+ >,
321321+ ) {
322322+ const nsid = "io.pocketenv.secret.getSecrets"; // @ts-ignore
323323+ return this._server.xrpc.method(nsid, cfg);
324324+ }
325325+}
326326+327327+export class IoPocketenvVariableNS {
328328+ _server: Server;
329329+330330+ constructor(server: Server) {
331331+ this._server = server;
332332+ }
333333+334334+ addVariable<AV extends AuthVerifier>(
335335+ cfg: ConfigOf<
336336+ AV,
337337+ IoPocketenvVariableAddVariable.Handler<ExtractAuth<AV>>,
338338+ IoPocketenvVariableAddVariable.HandlerReqCtx<ExtractAuth<AV>>
339339+ >,
340340+ ) {
341341+ const nsid = "io.pocketenv.variable.addVariable"; // @ts-ignore
342342+ return this._server.xrpc.method(nsid, cfg);
343343+ }
344344+345345+ deleteVariable<AV extends AuthVerifier>(
346346+ cfg: ConfigOf<
347347+ AV,
348348+ IoPocketenvVariableDeleteVariable.Handler<ExtractAuth<AV>>,
349349+ IoPocketenvVariableDeleteVariable.HandlerReqCtx<ExtractAuth<AV>>
350350+ >,
351351+ ) {
352352+ const nsid = "io.pocketenv.variable.deleteVariable"; // @ts-ignore
353353+ return this._server.xrpc.method(nsid, cfg);
354354+ }
355355+356356+ getVariables<AV extends AuthVerifier>(
357357+ cfg: ConfigOf<
358358+ AV,
359359+ IoPocketenvVariableGetVariables.Handler<ExtractAuth<AV>>,
360360+ IoPocketenvVariableGetVariables.HandlerReqCtx<ExtractAuth<AV>>
361361+ >,
362362+ ) {
363363+ const nsid = "io.pocketenv.variable.getVariables"; // @ts-ignore
364364+ return this._server.xrpc.method(nsid, cfg);
365365+ }
366366+}
367367+368368+export class IoPocketenvVolumeNS {
369369+ _server: Server;
370370+371371+ constructor(server: Server) {
372372+ this._server = server;
373373+ }
374374+375375+ addVolume<AV extends AuthVerifier>(
376376+ cfg: ConfigOf<
377377+ AV,
378378+ IoPocketenvVolumeAddVolume.Handler<ExtractAuth<AV>>,
379379+ IoPocketenvVolumeAddVolume.HandlerReqCtx<ExtractAuth<AV>>
380380+ >,
381381+ ) {
382382+ const nsid = "io.pocketenv.volume.addVolume"; // @ts-ignore
383383+ return this._server.xrpc.method(nsid, cfg);
384384+ }
385385+386386+ deleteVolume<AV extends AuthVerifier>(
387387+ cfg: ConfigOf<
388388+ AV,
389389+ IoPocketenvVolumeDeleteVolume.Handler<ExtractAuth<AV>>,
390390+ IoPocketenvVolumeDeleteVolume.HandlerReqCtx<ExtractAuth<AV>>
391391+ >,
392392+ ) {
393393+ const nsid = "io.pocketenv.volume.deleteVolume"; // @ts-ignore
394394+ return this._server.xrpc.method(nsid, cfg);
395395+ }
396396+397397+ getVolumes<AV extends AuthVerifier>(
398398+ cfg: ConfigOf<
399399+ AV,
400400+ IoPocketenvVolumeGetVolumes.Handler<ExtractAuth<AV>>,
401401+ IoPocketenvVolumeGetVolumes.HandlerReqCtx<ExtractAuth<AV>>
402402+ >,
403403+ ) {
404404+ const nsid = "io.pocketenv.volume.getVolumes"; // @ts-ignore
197405 return this._server.xrpc.method(nsid, cfg);
198406 }
199407}
+582-7
apps/api/src/lexicon/lexicons.ts
···207207 },
208208 },
209209 },
210210+ IoPocketenvFileAddFile: {
211211+ lexicon: 1,
212212+ id: "io.pocketenv.file.addFile",
213213+ defs: {
214214+ main: {
215215+ type: "procedure",
216216+ input: {
217217+ encoding: "application/json",
218218+ schema: {
219219+ type: "object",
220220+ required: ["file"],
221221+ properties: {
222222+ file: {
223223+ type: "ref",
224224+ ref: "lex:io.pocketenv.file.defs#file",
225225+ },
226226+ },
227227+ },
228228+ },
229229+ },
230230+ },
231231+ },
210232 IoPocketenvFileDefs: {
211233 lexicon: 1,
212234 id: "io.pocketenv.file.defs",
···233255 type: "ref",
234256 description: "A file to add to the sandbox",
235257 ref: "lex:io.pocketenv.file.defs#file",
258258+ },
259259+ },
260260+ },
261261+ },
262262+ IoPocketenvFileDeleteFile: {
263263+ lexicon: 1,
264264+ id: "io.pocketenv.file.deleteFile",
265265+ defs: {
266266+ main: {
267267+ type: "procedure",
268268+ input: {
269269+ encoding: "application/json",
270270+ schema: {
271271+ type: "object",
272272+ required: ["file"],
273273+ properties: {
274274+ file: {
275275+ type: "ref",
276276+ ref: "lex:io.pocketenv.file.defs#file",
277277+ },
278278+ },
279279+ },
280280+ },
281281+ },
282282+ },
283283+ },
284284+ IoPocketenvFileGetFiles: {
285285+ lexicon: 1,
286286+ id: "io.pocketenv.file.getFiles",
287287+ defs: {
288288+ main: {
289289+ type: "query",
290290+ parameters: {
291291+ type: "params",
292292+ properties: {
293293+ limit: {
294294+ type: "integer",
295295+ description: "The maximum number of files to return.",
296296+ minimum: 1,
297297+ },
298298+ offset: {
299299+ type: "integer",
300300+ description:
301301+ "The number of files to skip before starting to collect the result set.",
302302+ minimum: 0,
303303+ },
304304+ },
305305+ },
306306+ output: {
307307+ encoding: "application/json",
308308+ schema: {
309309+ type: "object",
310310+ properties: {
311311+ files: {
312312+ type: "array",
313313+ items: {
314314+ type: "ref",
315315+ ref: "lex:io.pocketenv.file.defs#fileView",
316316+ },
317317+ },
318318+ total: {
319319+ type: "integer",
320320+ description: "The total number of files available.",
321321+ minimum: 0,
322322+ },
323323+ },
324324+ },
236325 },
237326 },
238327 },
···548637 },
549638 },
550639 },
640640+ sandboxDetailsPref: {
641641+ type: "object",
642642+ properties: {
643643+ name: {
644644+ type: "string",
645645+ description: "The name of the sandbox",
646646+ minLength: 1,
647647+ },
648648+ description: {
649649+ type: "string",
650650+ description: "A description for the sandbox",
651651+ },
652652+ topics: {
653653+ type: "array",
654654+ description: "A list of topics/tags to associate with the sandbox",
655655+ items: {
656656+ type: "string",
657657+ maxLength: 50,
658658+ },
659659+ },
660660+ repo: {
661661+ type: "string",
662662+ description:
663663+ "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.",
664664+ format: "uri",
665665+ },
666666+ vcpus: {
667667+ type: "integer",
668668+ description:
669669+ "The number of virtual CPUs to allocate for the sandbox",
670670+ minimum: 1,
671671+ },
672672+ memory: {
673673+ type: "integer",
674674+ description:
675675+ "The amount of memory (in GB) to allocate for the sandbox",
676676+ minimum: 1,
677677+ },
678678+ disk: {
679679+ type: "integer",
680680+ description:
681681+ "The amount of disk space (in GB) to allocate for the sandbox",
682682+ minimum: 3,
683683+ },
684684+ readme: {
685685+ type: "string",
686686+ description: "A URI to a README for the sandbox.",
687687+ format: "uri",
688688+ },
689689+ },
690690+ },
691691+ secretPref: {
692692+ type: "object",
693693+ properties: {
694694+ name: {
695695+ type: "string",
696696+ description: "The name of the secret",
697697+ minLength: 1,
698698+ },
699699+ value: {
700700+ type: "string",
701701+ description:
702702+ "The value of the secret. This will be encrypted at rest and redacted in any API responses.",
703703+ },
704704+ },
705705+ },
706706+ variablePref: {
707707+ type: "object",
708708+ description: "A variable to add to the sandbox",
709709+ properties: {
710710+ name: {
711711+ type: "string",
712712+ description: "The name of the variable",
713713+ minLength: 1,
714714+ },
715715+ value: {
716716+ type: "string",
717717+ description:
718718+ "The value of the variable. This will be visible in API responses and should not contain sensitive information.",
719719+ },
720720+ },
721721+ },
722722+ filePref: {
723723+ type: "object",
724724+ description: "A file to add to the sandbox",
725725+ properties: {
726726+ name: {
727727+ type: "string",
728728+ description: "The name of the file",
729729+ minLength: 1,
730730+ },
731731+ content: {
732732+ type: "string",
733733+ description: "The content of the file.",
734734+ },
735735+ encrypt: {
736736+ type: "boolean",
737737+ description:
738738+ "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information.",
739739+ },
740740+ path: {
741741+ type: "string",
742742+ description:
743743+ "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox.",
744744+ },
745745+ },
746746+ },
747747+ volumePref: {
748748+ type: "object",
749749+ description: "A volume to add to the sandbox",
750750+ properties: {
751751+ name: {
752752+ type: "string",
753753+ description: "The name of the volume",
754754+ minLength: 1,
755755+ },
756756+ path: {
757757+ type: "string",
758758+ description:
759759+ "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc.",
760760+ },
761761+ readOnly: {
762762+ type: "boolean",
763763+ description: "Whether the volume should be mounted as read-only",
764764+ },
765765+ },
766766+ },
767767+ preferences: {
768768+ type: "array",
769769+ items: {
770770+ type: "union",
771771+ refs: [
772772+ "lex:io.pocketenv.sandbox.defs#sandboxDetailsPref",
773773+ "lex:io.pocketenv.sandbox.defs#secretPref",
774774+ "lex:io.pocketenv.sandbox.defs#variablePref",
775775+ "lex:io.pocketenv.sandbox.defs#filePref",
776776+ "lex:io.pocketenv.sandbox.defs#volumePref",
777777+ ],
778778+ },
779779+ },
551780 },
552781 },
553782 IoPocketenvSandboxDeleteSandbox: {
···577806 },
578807 },
579808 },
809809+ IoPocketenvSandboxGetPreferences: {
810810+ lexicon: 1,
811811+ id: "io.pocketenv.sandbox.getPreferences",
812812+ defs: {
813813+ main: {
814814+ type: "query",
815815+ description: "Get sandbox preferences",
816816+ parameters: {
817817+ type: "params",
818818+ required: ["id"],
819819+ properties: {
820820+ id: {
821821+ type: "string",
822822+ description: "The sandbox ID or URI to retrieve",
823823+ },
824824+ },
825825+ },
826826+ output: {
827827+ encoding: "application/json",
828828+ schema: {
829829+ type: "ref",
830830+ ref: "lex:io.pocketenv.sandbox.defs#preferences",
831831+ },
832832+ },
833833+ },
834834+ },
835835+ },
580836 IoPocketenvSandboxGetSandbox: {
581837 lexicon: 1,
582838 id: "io.pocketenv.sandbox.getSandbox",
···643899 type: "integer",
644900 description: "The total number of sandboxes available.",
645901 minimum: 0,
902902+ },
903903+ },
904904+ },
905905+ },
906906+ },
907907+ },
908908+ },
909909+ IoPocketenvSandboxPutPreferences: {
910910+ lexicon: 1,
911911+ id: "io.pocketenv.sandbox.putPreferences",
912912+ defs: {
913913+ main: {
914914+ type: "procedure",
915915+ description: "Update sandbox preferences.",
916916+ input: {
917917+ encoding: "application/json",
918918+ schema: {
919919+ type: "object",
920920+ required: ["preferences"],
921921+ properties: {
922922+ preferences: {
923923+ type: "ref",
924924+ ref: "lex:io.pocketenv.sandbox.defs#preferences",
646925 },
647926 },
648927 },
···9141193 },
9151194 },
9161195 },
11961196+ IoPocketenvSecretAddSecret: {
11971197+ lexicon: 1,
11981198+ id: "io.pocketenv.secret.addSecret",
11991199+ defs: {
12001200+ main: {
12011201+ type: "procedure",
12021202+ input: {
12031203+ encoding: "application/json",
12041204+ schema: {
12051205+ type: "object",
12061206+ required: ["secret"],
12071207+ properties: {
12081208+ secret: {
12091209+ type: "ref",
12101210+ ref: "lex:io.pocketenv.secret.defs#secret",
12111211+ },
12121212+ },
12131213+ },
12141214+ },
12151215+ },
12161216+ },
12171217+ },
9171218 IoPocketenvSecretDefs: {
9181219 lexicon: 1,
9191220 id: "io.pocketenv.secret.defs",
9201221 defs: {
12221222+ secretView: {
12231223+ type: "object",
12241224+ properties: {
12251225+ id: {
12261226+ type: "string",
12271227+ description: "Unique identifier of the secret.",
12281228+ },
12291229+ name: {
12301230+ type: "string",
12311231+ description:
12321232+ "Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc.",
12331233+ },
12341234+ },
12351235+ },
9211236 secret: {
9221237 type: "object",
9231238 required: ["name", "value"],
···9441259 },
9451260 },
9461261 },
12621262+ IoPocketenvSecretDeleteSecret: {
12631263+ lexicon: 1,
12641264+ id: "io.pocketenv.secret.deleteSecret",
12651265+ defs: {
12661266+ main: {
12671267+ type: "procedure",
12681268+ parameters: {
12691269+ type: "params",
12701270+ required: ["id"],
12711271+ properties: {
12721272+ id: {
12731273+ type: "string",
12741274+ description: "The ID of the secret to delete",
12751275+ },
12761276+ },
12771277+ },
12781278+ },
12791279+ },
12801280+ },
12811281+ IoPocketenvSecretGetSecrets: {
12821282+ lexicon: 1,
12831283+ id: "io.pocketenv.secret.getSecrets",
12841284+ defs: {
12851285+ main: {
12861286+ type: "query",
12871287+ parameters: {
12881288+ type: "params",
12891289+ properties: {
12901290+ limit: {
12911291+ type: "integer",
12921292+ description: "The maximum number of secrets to return.",
12931293+ minimum: 1,
12941294+ },
12951295+ offset: {
12961296+ type: "integer",
12971297+ description:
12981298+ "The number of secrets to skip before starting to collect the result set.",
12991299+ minimum: 0,
13001300+ },
13011301+ },
13021302+ },
13031303+ output: {
13041304+ encoding: "application/json",
13051305+ schema: {
13061306+ type: "object",
13071307+ properties: {
13081308+ secrets: {
13091309+ type: "array",
13101310+ items: {
13111311+ type: "ref",
13121312+ ref: "lex:io.pocketenv.secret.defs#secretView",
13131313+ },
13141314+ },
13151315+ total: {
13161316+ type: "integer",
13171317+ description: "The total number of secrets available.",
13181318+ minimum: 0,
13191319+ },
13201320+ },
13211321+ },
13221322+ },
13231323+ },
13241324+ },
13251325+ },
13261326+ IoPocketenvVariableAddVariable: {
13271327+ lexicon: 1,
13281328+ id: "io.pocketenv.variable.addVariable",
13291329+ defs: {
13301330+ main: {
13311331+ type: "procedure",
13321332+ input: {
13331333+ encoding: "application/json",
13341334+ schema: {
13351335+ type: "object",
13361336+ required: ["variable"],
13371337+ properties: {
13381338+ variable: {
13391339+ type: "ref",
13401340+ ref: "lex:io.pocketenv.variable.defs#variable",
13411341+ },
13421342+ },
13431343+ },
13441344+ },
13451345+ },
13461346+ },
13471347+ },
9471348 IoPocketenvVariableDefs: {
9481349 lexicon: 1,
9491350 id: "io.pocketenv.variable.defs",
9501351 defs: {
13521352+ variableView: {
13531353+ type: "object",
13541354+ properties: {
13551355+ id: {
13561356+ type: "string",
13571357+ description: "Unique identifier of the environment variable.",
13581358+ },
13591359+ name: {
13601360+ type: "string",
13611361+ description:
13621362+ "Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc.",
13631363+ },
13641364+ value: {
13651365+ type: "string",
13661366+ description:
13671367+ "Value of the environment variable. This will be visible in API responses and should not contain sensitive information.",
13681368+ },
13691369+ },
13701370+ },
9511371 variable: {
9521372 type: "object",
9531373 required: ["name", "value"],
···9741394 },
9751395 },
9761396 },
13971397+ IoPocketenvVariableDeleteVariable: {
13981398+ lexicon: 1,
13991399+ id: "io.pocketenv.variable.deleteVariable",
14001400+ defs: {
14011401+ main: {
14021402+ type: "procedure",
14031403+ parameters: {
14041404+ type: "params",
14051405+ required: ["id"],
14061406+ properties: {
14071407+ id: {
14081408+ type: "string",
14091409+ description: "The ID of the environment variable to delete",
14101410+ },
14111411+ },
14121412+ },
14131413+ },
14141414+ },
14151415+ },
14161416+ IoPocketenvVariableGetVariables: {
14171417+ lexicon: 1,
14181418+ id: "io.pocketenv.variable.getVariables",
14191419+ defs: {
14201420+ main: {
14211421+ type: "query",
14221422+ parameters: {
14231423+ type: "params",
14241424+ properties: {
14251425+ limit: {
14261426+ type: "integer",
14271427+ description: "The maximum number of variables to return.",
14281428+ minimum: 1,
14291429+ },
14301430+ offset: {
14311431+ type: "integer",
14321432+ description:
14331433+ "The number of variables to skip before starting to collect the result set.",
14341434+ minimum: 0,
14351435+ },
14361436+ },
14371437+ },
14381438+ output: {
14391439+ encoding: "application/json",
14401440+ schema: {
14411441+ type: "object",
14421442+ properties: {
14431443+ variables: {
14441444+ type: "array",
14451445+ items: {
14461446+ type: "ref",
14471447+ ref: "lex:io.pocketenv.variable.defs#variableView",
14481448+ },
14491449+ },
14501450+ total: {
14511451+ type: "integer",
14521452+ description: "The total number of variables available.",
14531453+ minimum: 0,
14541454+ },
14551455+ },
14561456+ },
14571457+ },
14581458+ },
14591459+ },
14601460+ },
14611461+ IoPocketenvVolumeAddVolume: {
14621462+ lexicon: 1,
14631463+ id: "io.pocketenv.volume.addVolume",
14641464+ defs: {
14651465+ main: {
14661466+ type: "procedure",
14671467+ },
14681468+ },
14691469+ },
9771470 IoPocketenvVolumeDefs: {
9781471 lexicon: 1,
9791472 id: "io.pocketenv.volume.defs",
9801473 defs: {
14741474+ volumeView: {
14751475+ type: "object",
14761476+ properties: {
14771477+ id: {
14781478+ type: "string",
14791479+ description: "Unique identifier of the volume.",
14801480+ },
14811481+ name: {
14821482+ type: "string",
14831483+ description: "Name of the volume, e.g. 'data-volume', 'logs', etc.",
14841484+ },
14851485+ },
14861486+ },
9811487 volumes: {
9821488 type: "array",
9831489 items: {
···9941500 type: "string",
9951501 description: "Name of the volume, e.g. 'data-volume', 'logs', etc.",
9961502 },
997997- path: {
998998- type: "string",
999999- description:
10001000- "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc.",
15031503+ },
15041504+ },
15051505+ },
15061506+ },
15071507+ IoPocketenvVolumeDeleteVolume: {
15081508+ lexicon: 1,
15091509+ id: "io.pocketenv.volume.deleteVolume",
15101510+ defs: {
15111511+ main: {
15121512+ type: "procedure",
15131513+ parameters: {
15141514+ type: "params",
15151515+ required: ["id"],
15161516+ properties: {
15171517+ id: {
15181518+ type: "string",
15191519+ description: "The ID of the volume to delete.",
15201520+ },
15211521+ },
15221522+ },
15231523+ },
15241524+ },
15251525+ },
15261526+ IoPocketenvVolumeGetVolumes: {
15271527+ lexicon: 1,
15281528+ id: "io.pocketenv.volume.getVolumes",
15291529+ defs: {
15301530+ main: {
15311531+ type: "query",
15321532+ parameters: {
15331533+ type: "params",
15341534+ properties: {
15351535+ limit: {
15361536+ type: "integer",
15371537+ description: "The maximum number of volumes to return.",
15381538+ minimum: 1,
15391539+ },
15401540+ offset: {
15411541+ type: "integer",
15421542+ description:
15431543+ "The number of volumes to skip before starting to collect the result set.",
15441544+ minimum: 0,
15451545+ },
10011546 },
10021002- readOnly: {
10031003- type: "boolean",
10041004- description: "Whether the volume should be mounted as read-only",
15471547+ },
15481548+ output: {
15491549+ encoding: "application/json",
15501550+ schema: {
15511551+ type: "object",
15521552+ properties: {
15531553+ volumes: {
15541554+ type: "array",
15551555+ items: {
15561556+ type: "ref",
15571557+ ref: "lex:io.pocketenv.volume.defs#volumeView",
15581558+ },
15591559+ },
15601560+ total: {
15611561+ type: "integer",
15621562+ description: "The total number of volumes available.",
15631563+ minimum: 0,
15641564+ },
15651565+ },
10051566 },
10061567 },
10071568 },
···10681629 IoPocketenvActorGetProfile: "io.pocketenv.actor.getProfile",
10691630 IoPocketenvActorGetTerminalToken: "io.pocketenv.actor.getTerminalToken",
10701631 AppBskyActorProfile: "app.bsky.actor.profile",
16321632+ IoPocketenvFileAddFile: "io.pocketenv.file.addFile",
10711633 IoPocketenvFileDefs: "io.pocketenv.file.defs",
16341634+ IoPocketenvFileDeleteFile: "io.pocketenv.file.deleteFile",
16351635+ IoPocketenvFileGetFiles: "io.pocketenv.file.getFiles",
10721636 IoPocketenvSandboxClaimSandbox: "io.pocketenv.sandbox.claimSandbox",
10731637 IoPocketenvSandboxCreateSandbox: "io.pocketenv.sandbox.createSandbox",
10741638 IoPocketenvSandboxDefs: "io.pocketenv.sandbox.defs",
10751639 IoPocketenvSandboxDeleteSandbox: "io.pocketenv.sandbox.deleteSandbox",
16401640+ IoPocketenvSandboxGetPreferences: "io.pocketenv.sandbox.getPreferences",
10761641 IoPocketenvSandboxGetSandbox: "io.pocketenv.sandbox.getSandbox",
10771642 IoPocketenvSandboxGetSandboxes: "io.pocketenv.sandbox.getSandboxes",
16431643+ IoPocketenvSandboxPutPreferences: "io.pocketenv.sandbox.putPreferences",
10781644 IoPocketenvSandbox: "io.pocketenv.sandbox",
10791645 IoPocketenvSandboxStartSandbox: "io.pocketenv.sandbox.startSandbox",
10801646 IoPocketenvSandboxStopSandbox: "io.pocketenv.sandbox.stopSandbox",
10811647 IoPocketenvSandboxUpdateSandboxSettings:
10821648 "io.pocketenv.sandbox.updateSandboxSettings",
16491649+ IoPocketenvSecretAddSecret: "io.pocketenv.secret.addSecret",
10831650 IoPocketenvSecretDefs: "io.pocketenv.secret.defs",
16511651+ IoPocketenvSecretDeleteSecret: "io.pocketenv.secret.deleteSecret",
16521652+ IoPocketenvSecretGetSecrets: "io.pocketenv.secret.getSecrets",
16531653+ IoPocketenvVariableAddVariable: "io.pocketenv.variable.addVariable",
10841654 IoPocketenvVariableDefs: "io.pocketenv.variable.defs",
16551655+ IoPocketenvVariableDeleteVariable: "io.pocketenv.variable.deleteVariable",
16561656+ IoPocketenvVariableGetVariables: "io.pocketenv.variable.getVariables",
16571657+ IoPocketenvVolumeAddVolume: "io.pocketenv.volume.addVolume",
10851658 IoPocketenvVolumeDefs: "io.pocketenv.volume.defs",
16591659+ IoPocketenvVolumeDeleteVolume: "io.pocketenv.volume.deleteVolume",
16601660+ IoPocketenvVolumeGetVolumes: "io.pocketenv.volume.getVolumes",
10861661 IoPocketenvPublicKey: "io.pocketenv.publicKey",
10871662 ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef",
10881663};
···9494export function validateSandboxViewDetailed(v: unknown): ValidationResult {
9595 return lexicons.validate("io.pocketenv.sandbox.defs#sandboxViewDetailed", v);
9696}
9797+9898+export interface SandboxDetailsPref {
9999+ /** The name of the sandbox */
100100+ name?: string;
101101+ /** A description for the sandbox */
102102+ description?: string;
103103+ /** A list of topics/tags to associate with the sandbox */
104104+ topics?: string[];
105105+ /** A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo. */
106106+ repo?: string;
107107+ /** The number of virtual CPUs to allocate for the sandbox */
108108+ vcpus?: number;
109109+ /** The amount of memory (in GB) to allocate for the sandbox */
110110+ memory?: number;
111111+ /** The amount of disk space (in GB) to allocate for the sandbox */
112112+ disk?: number;
113113+ /** A URI to a README for the sandbox. */
114114+ readme?: string;
115115+ [k: string]: unknown;
116116+}
117117+118118+export function isSandboxDetailsPref(v: unknown): v is SandboxDetailsPref {
119119+ return (
120120+ isObj(v) &&
121121+ hasProp(v, "$type") &&
122122+ v.$type === "io.pocketenv.sandbox.defs#sandboxDetailsPref"
123123+ );
124124+}
125125+126126+export function validateSandboxDetailsPref(v: unknown): ValidationResult {
127127+ return lexicons.validate("io.pocketenv.sandbox.defs#sandboxDetailsPref", v);
128128+}
129129+130130+export interface SecretPref {
131131+ /** The name of the secret */
132132+ name?: string;
133133+ /** The value of the secret. This will be encrypted at rest and redacted in any API responses. */
134134+ value?: string;
135135+ [k: string]: unknown;
136136+}
137137+138138+export function isSecretPref(v: unknown): v is SecretPref {
139139+ return (
140140+ isObj(v) &&
141141+ hasProp(v, "$type") &&
142142+ v.$type === "io.pocketenv.sandbox.defs#secretPref"
143143+ );
144144+}
145145+146146+export function validateSecretPref(v: unknown): ValidationResult {
147147+ return lexicons.validate("io.pocketenv.sandbox.defs#secretPref", v);
148148+}
149149+150150+/** A variable to add to the sandbox */
151151+export interface VariablePref {
152152+ /** The name of the variable */
153153+ name?: string;
154154+ /** The value of the variable. This will be visible in API responses and should not contain sensitive information. */
155155+ value?: string;
156156+ [k: string]: unknown;
157157+}
158158+159159+export function isVariablePref(v: unknown): v is VariablePref {
160160+ return (
161161+ isObj(v) &&
162162+ hasProp(v, "$type") &&
163163+ v.$type === "io.pocketenv.sandbox.defs#variablePref"
164164+ );
165165+}
166166+167167+export function validateVariablePref(v: unknown): ValidationResult {
168168+ return lexicons.validate("io.pocketenv.sandbox.defs#variablePref", v);
169169+}
170170+171171+/** A file to add to the sandbox */
172172+export interface FilePref {
173173+ /** The name of the file */
174174+ name?: string;
175175+ /** The content of the file. */
176176+ content?: string;
177177+ /** Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information. */
178178+ encrypt?: boolean;
179179+ /** The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox. */
180180+ path?: string;
181181+ [k: string]: unknown;
182182+}
183183+184184+export function isFilePref(v: unknown): v is FilePref {
185185+ return (
186186+ isObj(v) &&
187187+ hasProp(v, "$type") &&
188188+ v.$type === "io.pocketenv.sandbox.defs#filePref"
189189+ );
190190+}
191191+192192+export function validateFilePref(v: unknown): ValidationResult {
193193+ return lexicons.validate("io.pocketenv.sandbox.defs#filePref", v);
194194+}
195195+196196+/** A volume to add to the sandbox */
197197+export interface VolumePref {
198198+ /** The name of the volume */
199199+ name?: string;
200200+ /** The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc. */
201201+ path?: string;
202202+ /** Whether the volume should be mounted as read-only */
203203+ readOnly?: boolean;
204204+ [k: string]: unknown;
205205+}
206206+207207+export function isVolumePref(v: unknown): v is VolumePref {
208208+ return (
209209+ isObj(v) &&
210210+ hasProp(v, "$type") &&
211211+ v.$type === "io.pocketenv.sandbox.defs#volumePref"
212212+ );
213213+}
214214+215215+export function validateVolumePref(v: unknown): ValidationResult {
216216+ return lexicons.validate("io.pocketenv.sandbox.defs#volumePref", v);
217217+}
218218+219219+export type Preferences = (
220220+ | SandboxDetailsPref
221221+ | SecretPref
222222+ | VariablePref
223223+ | FilePref
224224+ | VolumePref
225225+ | { $type: string; [k: string]: unknown }
226226+)[];
···66import { isObj, hasProp } from "../../../../util";
77import { CID } from "multiformats/cid";
8899+export interface VariableView {
1010+ /** Unique identifier of the environment variable. */
1111+ id?: string;
1212+ /** Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc. */
1313+ name?: string;
1414+ /** Value of the environment variable. This will be visible in API responses and should not contain sensitive information. */
1515+ value?: string;
1616+ [k: string]: unknown;
1717+}
1818+1919+export function isVariableView(v: unknown): v is VariableView {
2020+ return (
2121+ isObj(v) &&
2222+ hasProp(v, "$type") &&
2323+ v.$type === "io.pocketenv.variable.defs#variableView"
2424+ );
2525+}
2626+2727+export function validateVariableView(v: unknown): ValidationResult {
2828+ return lexicons.validate("io.pocketenv.variable.defs#variableView", v);
2929+}
3030+931export interface Variable {
1032 /** Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc. */
1133 name: string;
···66import { isObj, hasProp } from "../../../../util";
77import { CID } from "multiformats/cid";
8899+export interface VolumeView {
1010+ /** Unique identifier of the volume. */
1111+ id?: string;
1212+ /** Name of the volume, e.g. 'data-volume', 'logs', etc. */
1313+ name?: string;
1414+ [k: string]: unknown;
1515+}
1616+1717+export function isVolumeView(v: unknown): v is VolumeView {
1818+ return (
1919+ isObj(v) &&
2020+ hasProp(v, "$type") &&
2121+ v.$type === "io.pocketenv.volume.defs#volumeView"
2222+ );
2323+}
2424+2525+export function validateVolumeView(v: unknown): ValidationResult {
2626+ return lexicons.validate("io.pocketenv.volume.defs#volumeView", v);
2727+}
2828+929export type Volumes = Volume[];
10301131export interface Volume {
1232 /** Name of the volume, e.g. 'data-volume', 'logs', etc. */
1333 name: string;
1414- /** The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc. */
1515- path?: string;
1616- /** Whether the volume should be mounted as read-only */
1717- readOnly?: boolean;
1834 [k: string]: unknown;
1935}
2036