@agi-cli/server 0.1.162 → 0.1.164

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agi-cli/server",
3
- "version": "0.1.162",
3
+ "version": "0.1.164",
4
4
  "description": "HTTP API server for AGI CLI",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -29,8 +29,8 @@
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
31
  "dependencies": {
32
- "@agi-cli/sdk": "0.1.162",
33
- "@agi-cli/database": "0.1.162",
32
+ "@agi-cli/sdk": "0.1.164",
33
+ "@agi-cli/database": "0.1.164",
34
34
  "drizzle-orm": "^0.44.5",
35
35
  "hono": "^4.9.9",
36
36
  "zod": "^4.1.8"
@@ -200,4 +200,28 @@ export function registerTerminalsRoutes(
200
200
  return c.json({ error: message }, 500);
201
201
  }
202
202
  });
203
+
204
+ app.post('/v1/terminals/:id/resize', async (c) => {
205
+ const id = c.req.param('id');
206
+ const terminal = terminalManager.get(id);
207
+
208
+ if (!terminal) {
209
+ return c.json({ error: 'Terminal not found' }, 404);
210
+ }
211
+
212
+ try {
213
+ const body = await c.req.json();
214
+ const { cols, rows } = body;
215
+
216
+ if (!cols || !rows || cols < 1 || rows < 1) {
217
+ return c.json({ error: 'valid cols and rows are required' }, 400);
218
+ }
219
+
220
+ terminal.resize(cols, rows);
221
+ return c.json({ success: true });
222
+ } catch (error) {
223
+ const message = error instanceof Error ? error.message : String(error);
224
+ return c.json({ error: message }, 500);
225
+ }
226
+ });
203
227
  }