@giselles-ai/sandbox-agent 0.1.13 → 0.1.15

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/index.d.ts CHANGED
@@ -29,6 +29,7 @@ type BaseChatRequest = {
29
29
  message: string;
30
30
  session_id?: string;
31
31
  sandbox_id?: string;
32
+ snapshot_id?: string;
32
33
  };
33
34
  type ChatCommand = {
34
35
  cmd: string;
@@ -62,6 +63,7 @@ declare const codexRequestSchema: z.ZodObject<{
62
63
  message: z.ZodString;
63
64
  session_id: z.ZodOptional<z.ZodString>;
64
65
  sandbox_id: z.ZodOptional<z.ZodString>;
66
+ snapshot_id: z.ZodOptional<z.ZodString>;
65
67
  relay_session_id: z.ZodOptional<z.ZodString>;
66
68
  relay_token: z.ZodOptional<z.ZodString>;
67
69
  }, z.core.$strip>;
@@ -87,6 +89,7 @@ declare const geminiRequestSchema: z.ZodObject<{
87
89
  message: z.ZodString;
88
90
  session_id: z.ZodOptional<z.ZodString>;
89
91
  sandbox_id: z.ZodOptional<z.ZodString>;
92
+ snapshot_id: z.ZodOptional<z.ZodString>;
90
93
  relay_session_id: z.ZodOptional<z.ZodString>;
91
94
  relay_token: z.ZodOptional<z.ZodString>;
92
95
  }, z.core.$strip>;
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ var Agent = class _Agent {
38
38
  const buffer = typeof content === "string" ? Buffer.from(content) : content;
39
39
  console.log(`[agent] setAgentMd called, content length=${buffer.length}`);
40
40
  return this.addFiles([
41
- { path: "/home/vercel-sandbox/AGENTS.md", content: buffer }
41
+ { path: "/home/vercel-sandbox/.codex/AGENTS.md", content: buffer }
42
42
  ]);
43
43
  }
44
44
  runCommands(commands) {
@@ -191,6 +191,7 @@ var codexRequestSchema = z.object({
191
191
  message: z.string().min(1),
192
192
  session_id: z.string().min(1).optional(),
193
193
  sandbox_id: z.string().min(1).optional(),
194
+ snapshot_id: z.string().min(1).optional(),
194
195
  relay_session_id: z.string().min(1).optional(),
195
196
  relay_token: z.string().min(1).optional()
196
197
  });
@@ -303,6 +304,7 @@ var geminiRequestSchema = z2.object({
303
304
  message: z2.string().min(1),
304
305
  session_id: z2.string().min(1).optional(),
305
306
  sandbox_id: z2.string().min(1).optional(),
307
+ snapshot_id: z2.string().min(1).optional(),
306
308
  relay_session_id: z2.string().min(1).optional(),
307
309
  relay_token: z2.string().min(1).optional()
308
310
  });
@@ -473,7 +475,7 @@ function runChat(input) {
473
475
  void (async () => {
474
476
  try {
475
477
  const sandbox = parsed.sandbox_id ? await Sandbox2.get({ sandboxId: parsed.sandbox_id }) : await (async () => {
476
- const snapshotId = input.agent.snapshotId?.trim();
478
+ const snapshotId = parsed.snapshot_id?.trim() || input.agent.snapshotId?.trim();
477
479
  if (!snapshotId) {
478
480
  throw new Error(
479
481
  "Agent must provide snapshotId when sandbox_id is not provided."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giselles-ai/sandbox-agent",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "Apache-2.0",