@gricha/perry 0.3.20 → 0.3.22
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/agent/router.js +7 -3
- package/dist/agent/web/assets/index-nqocJMjI.js +104 -0
- package/dist/agent/web/index.html +1 -1
- package/dist/index.js +16 -16
- package/dist/models/discovery.js +5 -3
- package/dist/perry-worker +0 -0
- package/dist/session-manager/adapters/claude.js +3 -0
- package/package.json +1 -1
- package/dist/agent/web/assets/index-mAcZDiNE.js +0 -104
package/dist/agent/router.js
CHANGED
|
@@ -17,10 +17,14 @@ import { deleteOpencodeSession } from '../sessions/agents/opencode-storage';
|
|
|
17
17
|
import { SessionIndex } from '../worker/session-index';
|
|
18
18
|
import { sessionManager } from '../session-manager';
|
|
19
19
|
const WorkspaceStatusSchema = z.enum(['running', 'stopped', 'creating', 'error']);
|
|
20
|
+
const PortMappingSchema = z.object({
|
|
21
|
+
host: z.number().int().min(1).max(65535),
|
|
22
|
+
container: z.number().int().min(1).max(65535),
|
|
23
|
+
});
|
|
20
24
|
const WorkspacePortsSchema = z.object({
|
|
21
25
|
ssh: z.number(),
|
|
22
26
|
http: z.number().optional(),
|
|
23
|
-
forwards: z.array(
|
|
27
|
+
forwards: z.array(PortMappingSchema).optional(),
|
|
24
28
|
});
|
|
25
29
|
const WorkspaceInfoSchema = z.object({
|
|
26
30
|
name: z.string(),
|
|
@@ -225,7 +229,7 @@ export function createRouter(ctx) {
|
|
|
225
229
|
});
|
|
226
230
|
const getPortForwards = os
|
|
227
231
|
.input(z.object({ name: z.string() }))
|
|
228
|
-
.output(z.object({ forwards: z.array(
|
|
232
|
+
.output(z.object({ forwards: z.array(PortMappingSchema) }))
|
|
229
233
|
.handler(async ({ input }) => {
|
|
230
234
|
try {
|
|
231
235
|
const forwards = await ctx.workspaces.getPortForwards(input.name);
|
|
@@ -236,7 +240,7 @@ export function createRouter(ctx) {
|
|
|
236
240
|
}
|
|
237
241
|
});
|
|
238
242
|
const setPortForwards = os
|
|
239
|
-
.input(z.object({ name: z.string(), forwards: z.array(
|
|
243
|
+
.input(z.object({ name: z.string(), forwards: z.array(PortMappingSchema) }))
|
|
240
244
|
.output(WorkspaceInfoSchema)
|
|
241
245
|
.handler(async ({ input }) => {
|
|
242
246
|
try {
|