plato-sandbox-sdk 1.1.7 → 1.1.8

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.
Files changed (2) hide show
  1. package/README.md +31 -31
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -37,7 +37,7 @@ const env = await client.makeEnvironment({
37
37
  console.log('Environment created:', env.job_group_id);
38
38
 
39
39
  // Get environment status
40
- const status = await client.env.getJobStatusApiEnvJobGroupIdStatusGet({
40
+ const status = await client.env.getJobStatus({
41
41
  jobGroupId: env.job_group_id
42
42
  });
43
43
 
@@ -73,7 +73,7 @@ try {
73
73
  }
74
74
 
75
75
  // Setup sandbox on the VM
76
- const setupResult = await client.publicBuild.setupSandboxApiPublicBuildVmPublicIdSetupSandboxPost({
76
+ const setupResult = await client.publicBuild.setupSandbox({
77
77
  publicId: vm.publicId,
78
78
  setupSandboxRequest: {
79
79
  // ... setup options
@@ -116,7 +116,7 @@ async function runEnvironmentLifecycle() {
116
116
  console.log('Environment ready!');
117
117
 
118
118
  // 3. Reset environment with a task
119
- await client.env.resetEnvApiEnvJobGroupIdResetPost({
119
+ await client.env.resetEnvironment({
120
120
  jobGroupId: env.jobId,
121
121
  resetEnvRequest: {
122
122
  taskId: '1a84e3d6-1900-40ba-bf00-beeca1748ad5',
@@ -124,30 +124,30 @@ async function runEnvironmentLifecycle() {
124
124
  });
125
125
 
126
126
  // 4. Get environment URLs
127
- const publicUrl = await client.env.getProxyUrlApiEnvJobGroupIdProxyUrlGet({
127
+ const publicUrl = await client.env.getProxyUrl({
128
128
  jobGroupId: env.jobId
129
129
  });
130
130
  console.log('Public URL:', publicUrl);
131
131
 
132
- const cdpUrl = await client.env.getCdpUrlApiEnvJobGroupIdCdpUrlGet({
132
+ const cdpUrl = await client.env.getCdpUrl({
133
133
  jobGroupId: env.jobId
134
134
  });
135
135
  console.log('CDP URL:', cdpUrl);
136
136
 
137
137
  // 5. Get environment state
138
- const state = await client.env.getEnvStateApiEnvJobGroupIdStateGet({
138
+ const state = await client.env.getEnvironmentState({
139
139
  jobGroupId: env.jobId
140
140
  });
141
141
  console.log('Environment state:', state);
142
142
 
143
143
  // 6. Get active session
144
- const session = await client.env.getActiveSessionApiEnvJobGroupIdActiveSessionGet({
144
+ const session = await client.env.getActiveSession({
145
145
  jobGroupId: env.jobId
146
146
  });
147
147
  const sessionId = (session as any).session_id;
148
148
 
149
149
  // 7. Evaluate the session
150
- const evaluation = await client.env.evaluateSessionApiEnvSessionSessionIdEvaluatePost({
150
+ const evaluation = await client.env.evaluateSession({
151
151
  sessionId,
152
152
  evaluateRequest: {
153
153
  // Custom evaluation data
@@ -157,7 +157,7 @@ async function runEnvironmentLifecycle() {
157
157
  console.log('Evaluation result:', evaluation);
158
158
 
159
159
  // 8. Score the session
160
- await client.env.scoreSessionApiEnvSessionSessionIdScorePost({
160
+ await client.env.scoreSession({
161
161
  sessionId,
162
162
  scoreRequest: {
163
163
  score: 0.95,
@@ -179,12 +179,12 @@ runEnvironmentLifecycle().catch(console.error);
179
179
 
180
180
  ```typescript
181
181
  // Get current state
182
- const state = await client.env.getEnvStateApiEnvJobGroupIdStateGet({
182
+ const state = await client.env.getEnvironmentState({
183
183
  jobGroupId: 'job-123'
184
184
  });
185
185
 
186
186
  // Reset to a specific task
187
- await client.env.resetEnvApiEnvJobGroupIdResetPost({
187
+ await client.env.resetEnvironment({
188
188
  jobGroupId: 'job-123',
189
189
  resetEnvRequest: {
190
190
  taskId: 'task-456',
@@ -194,7 +194,7 @@ await client.env.resetEnvApiEnvJobGroupIdResetPost({
194
194
  });
195
195
 
196
196
  // Backup current state
197
- await client.env.backupEnvApiEnvJobGroupIdBackupPost({
197
+ await client.env.backupEnvironment({
198
198
  jobGroupId: 'job-123'
199
199
  });
200
200
  ```
@@ -203,12 +203,12 @@ await client.env.backupEnvApiEnvJobGroupIdBackupPost({
203
203
 
204
204
  ```typescript
205
205
  // Get active session
206
- const session = await client.env.getActiveSessionApiEnvJobGroupIdActiveSessionGet({
206
+ const session = await client.env.getActiveSession({
207
207
  jobGroupId: 'job-123'
208
208
  });
209
209
 
210
210
  // Evaluate session
211
- const evaluation = await client.env.evaluateSessionApiEnvSessionSessionIdEvaluatePost({
211
+ const evaluation = await client.env.evaluateSession({
212
212
  sessionId: session.session_id,
213
213
  evaluateRequest: {
214
214
  customData: { /* your evaluation data */ }
@@ -216,7 +216,7 @@ const evaluation = await client.env.evaluateSessionApiEnvSessionSessionIdEvaluat
216
216
  });
217
217
 
218
218
  // Score session
219
- await client.env.scoreSessionApiEnvSessionSessionIdScorePost({
219
+ await client.env.scoreSession({
220
220
  sessionId: session.session_id,
221
221
  scoreRequest: {
222
222
  score: 0.85,
@@ -228,7 +228,7 @@ await client.env.scoreSessionApiEnvSessionSessionIdScorePost({
228
228
  });
229
229
 
230
230
  // Log session data
231
- await client.env.logApiEnvSessionIdLogPost({
231
+ await client.env.logToEnvironment({
232
232
  sessionId: session.session_id,
233
233
  log: {
234
234
  level: 'info',
@@ -242,22 +242,22 @@ await client.env.logApiEnvSessionIdLogPost({
242
242
 
243
243
  ```typescript
244
244
  // List available simulators
245
- const simulators = await client.env.listSimulatorsApiEnvSimulatorsGet({});
245
+ const simulators = await client.env.getSimulators({});
246
246
 
247
247
  // Get simulator versions
248
- const versions = await client.simulator.getSimulatorVersionsApiSimulatorSimulatorNameVersionsGet({
248
+ const versions = await client.simulator.getSimulatorVersions({
249
249
  simulatorName: 'espocrm'
250
250
  });
251
251
 
252
252
  console.log('Available versions:', versions.versions);
253
253
 
254
254
  // Get database configuration for a simulator
255
- const dbConfig = await client.simulator.getDbConfigApiSimulatorArtifactIdDbConfigGetRaw({
255
+ const dbConfig = await client.simulator.getSimulatorDbConfig({
256
256
  artifactId: '2ea954c0-7e5a-4a12-82fd-12cb46538827'
257
257
  });
258
258
 
259
259
  // Create a new simulator
260
- await client.env.createSimulatorApiEnvSimulatorsPost({
260
+ await client.env.createSimulator({
261
261
  createSimulatorRequest: {
262
262
  name: 'my-simulator',
263
263
  description: 'Custom simulator',
@@ -270,25 +270,25 @@ await client.env.createSimulatorApiEnvSimulatorsPost({
270
270
 
271
271
  ```typescript
272
272
  // Get your Gitea info
273
- const myInfo = await client.gitea.getMyInfoApiGiteaMyInfoGet({});
273
+ const myInfo = await client.gitea.getGiteaMyInfo({});
274
274
  console.log('Gitea user:', myInfo);
275
275
 
276
276
  // List simulator repositories
277
- const repos = await client.gitea.listSimulatorsApiGiteaSimulatorsGet({});
277
+ const repos = await client.gitea.getGiteaSimulators({});
278
278
 
279
279
  // Get repository info for a specific simulator
280
- const repoInfo = await client.gitea.getRepoInfoApiGiteaSimulatorsSimulatorIdRepoGet({
280
+ const repoInfo = await client.gitea.getGiteaSimulatorRepo({
281
281
  simulatorId: 'sim-123'
282
282
  });
283
283
 
284
284
  console.log('Repository:', repoInfo.url);
285
285
 
286
286
  // Get Gitea credentials (for cloning repos)
287
- const credentials = await client.gitea.getCredentialsApiGiteaCredentialsGet({});
287
+ const credentials = await client.gitea.getGiteaCredentials({});
288
288
  console.log('Git credentials:', credentials);
289
289
 
290
290
  // Create a repository for a simulator
291
- await client.gitea.createRepoApiGiteaSimulatorsSimulatorIdRepoPost({
291
+ await client.gitea.createGiteaSimulatorRepo({
292
292
  simulatorId: 'sim-123',
293
293
  body: {
294
294
  name: 'my-simulator-repo',
@@ -301,12 +301,12 @@ await client.gitea.createRepoApiGiteaSimulatorsSimulatorIdRepoPost({
301
301
 
302
302
  ```typescript
303
303
  // Get CDP (Chrome DevTools Protocol) URL for browser automation
304
- const cdpUrl = await client.env.getCdpUrlApiEnvJobGroupIdCdpUrlGet({
304
+ const cdpUrl = await client.env.getCdpUrl({
305
305
  jobGroupId: 'job-123'
306
306
  });
307
307
 
308
308
  // Get proxy URL for accessing the application
309
- const proxyUrl = await client.env.getProxyUrlApiEnvJobGroupIdProxyUrlGet({
309
+ const proxyUrl = await client.env.getProxyUrl({
310
310
  jobGroupId: 'job-123'
311
311
  });
312
312
 
@@ -356,13 +356,13 @@ const tasks = ['task-1', 'task-2', 'task-3'];
356
356
 
357
357
  for (const taskId of tasks) {
358
358
  // Reset to the task
359
- await client.env.resetEnvApiEnvJobGroupIdResetPost({
359
+ await client.env.resetEnvironment({
360
360
  jobGroupId: env.jobId,
361
361
  resetEnvRequest: { taskId },
362
362
  });
363
363
 
364
364
  // Get the session
365
- const session = await client.env.getActiveSessionApiEnvJobGroupIdActiveSessionGet({
365
+ const session = await client.env.getActiveSession({
366
366
  jobGroupId: env.jobId
367
367
  });
368
368
 
@@ -370,11 +370,11 @@ for (const taskId of tasks) {
370
370
  // await performTask(session);
371
371
 
372
372
  // Evaluate and score
373
- await client.env.evaluateSessionApiEnvSessionSessionIdEvaluatePost({
373
+ await client.env.evaluateSession({
374
374
  sessionId: (session as any).session_id,
375
375
  });
376
376
 
377
- await client.env.scoreSessionApiEnvSessionSessionIdScorePost({
377
+ await client.env.scoreSession({
378
378
  sessionId: (session as any).session_id,
379
379
  scoreRequest: { score: 1.0 },
380
380
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plato-sandbox-sdk",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "TypeScript SDK for interacting with the Plato platform - manage environments, VMs, simulators, and more",
5
5
  "author": "Plato AI",
6
6
  "repository": {