@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Perry</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-nqocJMjI.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-DfAa5Wi1.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -370,14 +370,15 @@ program
|
|
|
370
370
|
console.log(`No ports configured for workspace '${name}'.`);
|
|
371
371
|
console.log('');
|
|
372
372
|
console.log('Configure ports with: perry ports <name> <port> [<port>...]');
|
|
373
|
-
console.log(' Example: perry ports ' + name + ' 3000 5173');
|
|
373
|
+
console.log(' Example: perry ports ' + name + ' 3000 8080:5173');
|
|
374
374
|
console.log('');
|
|
375
375
|
console.log('Or specify ports directly: perry proxy <name> <port> [<port>...]');
|
|
376
|
-
console.log(' Example: perry proxy ' + name + ' 3000 5173');
|
|
376
|
+
console.log(' Example: perry proxy ' + name + ' 3000 8080:5173');
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
|
-
effectivePorts = configuredForwards.map((p) => String(p));
|
|
380
|
-
|
|
379
|
+
effectivePorts = configuredForwards.map((p) => p.host === p.container ? String(p.container) : `${p.host}:${p.container}`);
|
|
380
|
+
const formatted = effectivePorts.join(', ');
|
|
381
|
+
console.log(`Using configured ports: ${formatted}`);
|
|
381
382
|
}
|
|
382
383
|
if (isLocalWorker(worker)) {
|
|
383
384
|
const containerName = getContainerName(name);
|
|
@@ -437,7 +438,7 @@ program
|
|
|
437
438
|
});
|
|
438
439
|
program
|
|
439
440
|
.command('ports <name> [ports...]')
|
|
440
|
-
.description('Configure
|
|
441
|
+
.description('Configure port mappings for a workspace (e.g. 3000, 8080:3000)')
|
|
441
442
|
.action(async (name, ports) => {
|
|
442
443
|
try {
|
|
443
444
|
const client = await getClient();
|
|
@@ -452,23 +453,22 @@ program
|
|
|
452
453
|
console.log(`No ports configured for workspace '${name}'.`);
|
|
453
454
|
console.log('');
|
|
454
455
|
console.log('Usage: perry ports <name> <port> [<port>...]');
|
|
455
|
-
console.log('
|
|
456
|
+
console.log(' Format: <port> or <host>:<container>');
|
|
457
|
+
console.log(' Example: perry ports ' + name + ' 3000 8080:5173');
|
|
456
458
|
}
|
|
457
459
|
else {
|
|
458
|
-
|
|
460
|
+
const formatted = currentPorts.map((p) => p.host === p.container ? String(p.container) : `${p.host}:${p.container}`);
|
|
461
|
+
console.log(`Ports configured for '${name}': ${formatted.join(', ')}`);
|
|
459
462
|
}
|
|
460
463
|
return;
|
|
461
464
|
}
|
|
462
|
-
const
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
console.error(`Invalid port number: ${p}`);
|
|
466
|
-
process.exit(1);
|
|
467
|
-
}
|
|
468
|
-
return num;
|
|
465
|
+
const portMappings = ports.map((spec) => {
|
|
466
|
+
const mapping = parsePortForward(spec);
|
|
467
|
+
return { host: mapping.localPort, container: mapping.remotePort };
|
|
469
468
|
});
|
|
470
|
-
await client.setPortForwards(name,
|
|
471
|
-
|
|
469
|
+
await client.setPortForwards(name, portMappings);
|
|
470
|
+
const formatted = portMappings.map((p) => p.host === p.container ? String(p.container) : `${p.host}:${p.container}`);
|
|
471
|
+
console.log(`Ports configured for '${name}': ${formatted.join(', ')}`);
|
|
472
472
|
console.log('');
|
|
473
473
|
console.log(`Run 'perry proxy ${name}' to start forwarding.`);
|
|
474
474
|
}
|
package/dist/models/discovery.js
CHANGED
|
@@ -72,11 +72,13 @@ function parseOpencodeModels(output) {
|
|
|
72
72
|
continue;
|
|
73
73
|
const parts = trimmed.split('/');
|
|
74
74
|
const id = trimmed;
|
|
75
|
-
const
|
|
76
|
-
const
|
|
75
|
+
const provider = parts.length > 1 ? parts[0] : '';
|
|
76
|
+
const modelName = parts.length > 1 ? parts[1] : parts[0];
|
|
77
|
+
const formattedModel = modelName
|
|
77
78
|
.split('-')
|
|
78
79
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
79
80
|
.join(' ');
|
|
81
|
+
const displayName = provider ? `${provider} / ${formattedModel}` : formattedModel;
|
|
80
82
|
models.push({
|
|
81
83
|
id,
|
|
82
84
|
name: displayName,
|
|
@@ -105,4 +107,4 @@ export async function discoverContainerOpencodeModels(containerName, execInConta
|
|
|
105
107
|
return [];
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
export { FALLBACK_CLAUDE_MODELS };
|
|
110
|
+
export { FALLBACK_CLAUDE_MODELS, parseOpencodeModels };
|
package/dist/perry-worker
CHANGED
|
Binary file
|