@amodalai/amodal 0.3.43 → 0.3.44
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": "@amodalai/amodal",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.44",
|
|
4
4
|
"description": "Amodal CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"react": "^19.2.4",
|
|
27
27
|
"yargs": "^17.7.2",
|
|
28
28
|
"zod": "^4.3.6",
|
|
29
|
-
"@amodalai/
|
|
30
|
-
"@amodalai/
|
|
31
|
-
"@amodalai/db": "0.3.
|
|
32
|
-
"@amodalai/
|
|
33
|
-
"@amodalai/
|
|
34
|
-
"@amodalai/runtime-app": "0.3.
|
|
29
|
+
"@amodalai/types": "0.3.44",
|
|
30
|
+
"@amodalai/core": "0.3.44",
|
|
31
|
+
"@amodalai/db": "0.3.44",
|
|
32
|
+
"@amodalai/runtime": "0.3.44",
|
|
33
|
+
"@amodalai/studio": "0.3.44",
|
|
34
|
+
"@amodalai/runtime-app": "0.3.44"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20.11.24",
|
package/src/commands/dev.ts
CHANGED
|
@@ -24,8 +24,6 @@ import {getDb, ensureSchema, closeDb} from '@amodalai/db';
|
|
|
24
24
|
// ---------------------------------------------------------------------------
|
|
25
25
|
|
|
26
26
|
const DEFAULT_RUNTIME_PORT = 3847;
|
|
27
|
-
const DEFAULT_STUDIO_PORT = 3848;
|
|
28
|
-
const DEFAULT_ADMIN_PORT = 3849;
|
|
29
27
|
|
|
30
28
|
// ---------------------------------------------------------------------------
|
|
31
29
|
// Port checking
|
|
@@ -81,6 +79,8 @@ function resolveStudioDir(): string | null {
|
|
|
81
79
|
export interface DevOptions {
|
|
82
80
|
cwd?: string;
|
|
83
81
|
port?: number;
|
|
82
|
+
studioPort?: number;
|
|
83
|
+
adminPort?: number;
|
|
84
84
|
host?: string;
|
|
85
85
|
resume?: string;
|
|
86
86
|
verbose?: number;
|
|
@@ -377,9 +377,20 @@ export async function runDev(options: DevOptions = {}): Promise<void> {
|
|
|
377
377
|
let repoPath: string;
|
|
378
378
|
try {
|
|
379
379
|
repoPath = findRepoRoot(options.cwd);
|
|
380
|
-
} catch
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
} catch {
|
|
381
|
+
process.stderr.write(`
|
|
382
|
+
No amodal.json found.
|
|
383
|
+
|
|
384
|
+
Create a new agent:
|
|
385
|
+
|
|
386
|
+
amodal init Initialize this directory
|
|
387
|
+
amodal dev Start the dev server
|
|
388
|
+
|
|
389
|
+
Or if your agent is in another directory:
|
|
390
|
+
|
|
391
|
+
cd /path/to/agent && amodal dev
|
|
392
|
+
|
|
393
|
+
`);
|
|
383
394
|
process.exit(1);
|
|
384
395
|
}
|
|
385
396
|
|
|
@@ -458,8 +469,8 @@ Or add it to your agent's .env file:
|
|
|
458
469
|
// -------------------------------------------------------------------------
|
|
459
470
|
|
|
460
471
|
const runtimePort = options.port ?? DEFAULT_RUNTIME_PORT;
|
|
461
|
-
const studioPort =
|
|
462
|
-
const adminPort =
|
|
472
|
+
const studioPort = options.studioPort ?? runtimePort + 1;
|
|
473
|
+
const adminPort = options.adminPort ?? runtimePort + 2;
|
|
463
474
|
|
|
464
475
|
await assertPortFree(runtimePort);
|
|
465
476
|
if (!options.noStudio) await assertPortFree(studioPort);
|
|
@@ -633,6 +644,14 @@ export const devCommand: CommandModule = {
|
|
|
633
644
|
describe: 'Only show errors',
|
|
634
645
|
default: false,
|
|
635
646
|
},
|
|
647
|
+
'studio-port': {
|
|
648
|
+
type: 'number',
|
|
649
|
+
describe: 'Port for Studio (defaults to port + 1)',
|
|
650
|
+
},
|
|
651
|
+
'admin-port': {
|
|
652
|
+
type: 'number',
|
|
653
|
+
describe: 'Port for admin agent (defaults to port + 2)',
|
|
654
|
+
},
|
|
636
655
|
'no-studio': {
|
|
637
656
|
type: 'boolean',
|
|
638
657
|
describe: 'Do not spawn Studio subprocess',
|
|
@@ -655,12 +674,17 @@ export const devCommand: CommandModule = {
|
|
|
655
674
|
const verbose = argv['verbose'] as number;
|
|
656
675
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
657
676
|
const quiet = argv['quiet'] as boolean;
|
|
677
|
+
|
|
678
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
679
|
+
const studioPort = argv['studio-port'] as number | undefined;
|
|
680
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
681
|
+
const adminPort = argv['admin-port'] as number | undefined;
|
|
658
682
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
659
683
|
const noStudio = (argv['no-studio'] as boolean) || process.env['AMODAL_NO_STUDIO'] === '1';
|
|
660
684
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
661
685
|
const noAdmin = (argv['no-admin'] as boolean) || process.env['AMODAL_NO_ADMIN'] === '1';
|
|
662
686
|
try {
|
|
663
|
-
await runDev({port, host, resume, verbose, quiet, noStudio, noAdmin});
|
|
687
|
+
await runDev({port, studioPort, adminPort, host, resume, verbose, quiet, noStudio, noAdmin});
|
|
664
688
|
} catch (err: unknown) {
|
|
665
689
|
const msg = err instanceof Error ? err.message : String(err);
|
|
666
690
|
process.stderr.write(`\n Error: ${msg}\n\n`);
|