chore: move gateway default port from 4000 to 14242 (#375)
This commit was merged in pull request #375.
This commit is contained in:
12
.env.example
12
.env.example
@@ -23,8 +23,8 @@ VALKEY_URL=redis://localhost:6380
|
|||||||
|
|
||||||
|
|
||||||
# ─── Gateway ─────────────────────────────────────────────────────────────────
|
# ─── Gateway ─────────────────────────────────────────────────────────────────
|
||||||
# TCP port the NestJS/Fastify gateway listens on (default: 4000)
|
# TCP port the NestJS/Fastify gateway listens on (default: 14242)
|
||||||
GATEWAY_PORT=4000
|
GATEWAY_PORT=14242
|
||||||
|
|
||||||
# Comma-separated list of allowed CORS origins.
|
# Comma-separated list of allowed CORS origins.
|
||||||
# Must include the web app origin in production.
|
# Must include the web app origin in production.
|
||||||
@@ -37,12 +37,12 @@ GATEWAY_CORS_ORIGIN=http://localhost:3000
|
|||||||
BETTER_AUTH_SECRET=change-me-to-a-random-32-char-string
|
BETTER_AUTH_SECRET=change-me-to-a-random-32-char-string
|
||||||
|
|
||||||
# Public base URL of the gateway (used by BetterAuth for callback URLs)
|
# Public base URL of the gateway (used by BetterAuth for callback URLs)
|
||||||
BETTER_AUTH_URL=http://localhost:4000
|
BETTER_AUTH_URL=http://localhost:14242
|
||||||
|
|
||||||
|
|
||||||
# ─── Web App (Next.js) ───────────────────────────────────────────────────────
|
# ─── Web App (Next.js) ───────────────────────────────────────────────────────
|
||||||
# Public gateway URL — accessible from the browser, not just the server.
|
# Public gateway URL — accessible from the browser, not just the server.
|
||||||
NEXT_PUBLIC_GATEWAY_URL=http://localhost:4000
|
NEXT_PUBLIC_GATEWAY_URL=http://localhost:14242
|
||||||
|
|
||||||
|
|
||||||
# ─── OpenTelemetry ───────────────────────────────────────────────────────────
|
# ─── OpenTelemetry ───────────────────────────────────────────────────────────
|
||||||
@@ -121,12 +121,12 @@ OTEL_SERVICE_NAME=mosaic-gateway
|
|||||||
# ─── Discord Plugin (optional — set DISCORD_BOT_TOKEN to enable) ─────────────
|
# ─── Discord Plugin (optional — set DISCORD_BOT_TOKEN to enable) ─────────────
|
||||||
# DISCORD_BOT_TOKEN=
|
# DISCORD_BOT_TOKEN=
|
||||||
# DISCORD_GUILD_ID=
|
# DISCORD_GUILD_ID=
|
||||||
# DISCORD_GATEWAY_URL=http://localhost:4000
|
# DISCORD_GATEWAY_URL=http://localhost:14242
|
||||||
|
|
||||||
|
|
||||||
# ─── Telegram Plugin (optional — set TELEGRAM_BOT_TOKEN to enable) ───────────
|
# ─── Telegram Plugin (optional — set TELEGRAM_BOT_TOKEN to enable) ───────────
|
||||||
# TELEGRAM_BOT_TOKEN=
|
# TELEGRAM_BOT_TOKEN=
|
||||||
# TELEGRAM_GATEWAY_URL=http://localhost:4000
|
# TELEGRAM_GATEWAY_URL=http://localhost:14242
|
||||||
|
|
||||||
|
|
||||||
# ─── SSO Providers (add credentials to enable) ───────────────────────────────
|
# ─── SSO Providers (add credentials to enable) ───────────────────────────────
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { SsoController } from './sso.controller.js';
|
|||||||
useFactory: (db: Db): Auth =>
|
useFactory: (db: Db): Auth =>
|
||||||
createAuth({
|
createAuth({
|
||||||
db,
|
db,
|
||||||
baseURL: process.env['BETTER_AUTH_URL'] ?? 'http://localhost:4000',
|
baseURL: process.env['BETTER_AUTH_URL'] ?? 'http://localhost:14242',
|
||||||
secret: process.env['BETTER_AUTH_SECRET'],
|
secret: process.env['BETTER_AUTH_SECRET'],
|
||||||
}),
|
}),
|
||||||
inject: [DB],
|
inject: [DB],
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ async function bootstrap(): Promise<void> {
|
|||||||
mountAuthHandler(app);
|
mountAuthHandler(app);
|
||||||
mountMcpHandler(app, app.get(McpService));
|
mountMcpHandler(app, app.get(McpService));
|
||||||
|
|
||||||
const port = Number(process.env['GATEWAY_PORT'] ?? 4000);
|
const port = Number(process.env['GATEWAY_PORT'] ?? 14242);
|
||||||
await app.listen(port, '0.0.0.0');
|
await app.listen(port, '0.0.0.0');
|
||||||
logger.log(`Gateway listening on port ${port}`);
|
logger.log(`Gateway listening on port ${port}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class TelegramChannelPluginAdapter implements IChannelPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_GATEWAY_URL = 'http://localhost:4000';
|
const DEFAULT_GATEWAY_URL = 'http://localhost:14242';
|
||||||
|
|
||||||
function createPluginRegistry(): IChannelPlugin[] {
|
function createPluginRegistry(): IChannelPlugin[] {
|
||||||
const plugins: IChannelPlugin[] = [];
|
const plugins: IChannelPlugin[] = [];
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { defineConfig, devices } from '@playwright/test';
|
|||||||
*
|
*
|
||||||
* Assumes:
|
* Assumes:
|
||||||
* - Next.js web app running on http://localhost:3000
|
* - Next.js web app running on http://localhost:3000
|
||||||
* - NestJS gateway running on http://localhost:4000
|
* - NestJS gateway running on http://localhost:14242
|
||||||
*
|
*
|
||||||
* Run with: pnpm --filter @mosaic/web test:e2e
|
* Run with: pnpm --filter @mosaic/web test:e2e
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const GATEWAY_URL = process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:4000';
|
const GATEWAY_URL = process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:14242';
|
||||||
|
|
||||||
export interface ApiRequestInit extends Omit<RequestInit, 'body'> {
|
export interface ApiRequestInit extends Omit<RequestInit, 'body'> {
|
||||||
body?: unknown;
|
body?: unknown;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createAuthClient } from 'better-auth/react';
|
|||||||
import { adminClient, genericOAuthClient } from 'better-auth/client/plugins';
|
import { adminClient, genericOAuthClient } from 'better-auth/client/plugins';
|
||||||
|
|
||||||
export const authClient = createAuthClient({
|
export const authClient = createAuthClient({
|
||||||
baseURL: process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:4000',
|
baseURL: process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:14242',
|
||||||
plugins: [adminClient(), genericOAuthClient()],
|
plugins: [adminClient(), genericOAuthClient()],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { io, type Socket } from 'socket.io-client';
|
import { io, type Socket } from 'socket.io-client';
|
||||||
|
|
||||||
const GATEWAY_URL = process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:4000';
|
const GATEWAY_URL = process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:14242';
|
||||||
|
|
||||||
let socket: Socket | null = null;
|
let socket: Socket | null = null;
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ packages/cli/src/tui/
|
|||||||
cd /home/jwoltje/src/mosaic-mono-v1-worktrees/tui-improvements
|
cd /home/jwoltje/src/mosaic-mono-v1-worktrees/tui-improvements
|
||||||
pnpm --filter @mosaic/cli exec tsx src/cli.ts tui
|
pnpm --filter @mosaic/cli exec tsx src/cli.ts tui
|
||||||
# or after build:
|
# or after build:
|
||||||
node packages/cli/dist/cli.js tui --gateway http://localhost:4000
|
node packages/cli/dist/cli.js tui --gateway http://localhost:14242
|
||||||
```
|
```
|
||||||
|
|
||||||
### Quality Gates
|
### Quality Gates
|
||||||
|
|||||||
@@ -229,11 +229,11 @@ external clients. Authentication requires a valid BetterAuth session (cookie or
|
|||||||
|
|
||||||
### Gateway
|
### Gateway
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
| --------------------- | ----------------------- | ---------------------------------------------- |
|
| --------------------- | ------------------------ | ---------------------------------------------- |
|
||||||
| `GATEWAY_PORT` | `4000` | Port the gateway listens on |
|
| `GATEWAY_PORT` | `14242` | Port the gateway listens on |
|
||||||
| `GATEWAY_CORS_ORIGIN` | `http://localhost:3000` | Allowed CORS origin for browser clients |
|
| `GATEWAY_CORS_ORIGIN` | `http://localhost:3000` | Allowed CORS origin for browser clients |
|
||||||
| `BETTER_AUTH_URL` | `http://localhost:4000` | Public URL of the gateway (used by BetterAuth) |
|
| `BETTER_AUTH_URL` | `http://localhost:14242` | Public URL of the gateway (used by BetterAuth) |
|
||||||
|
|
||||||
### SSO (Optional)
|
### SSO (Optional)
|
||||||
|
|
||||||
@@ -292,13 +292,13 @@ Each OIDC provider requires its client ID, client secret, and issuer URL togethe
|
|||||||
|
|
||||||
### Plugins
|
### Plugins
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
| ---------------------- | ------------------------------------------------------------------------- |
|
| ---------------------- | -------------------------------------------------------------------------- |
|
||||||
| `DISCORD_BOT_TOKEN` | Discord bot token (enables Discord plugin) |
|
| `DISCORD_BOT_TOKEN` | Discord bot token (enables Discord plugin) |
|
||||||
| `DISCORD_GUILD_ID` | Discord guild/server ID |
|
| `DISCORD_GUILD_ID` | Discord guild/server ID |
|
||||||
| `DISCORD_GATEWAY_URL` | Gateway URL for Discord plugin to call (default: `http://localhost:4000`) |
|
| `DISCORD_GATEWAY_URL` | Gateway URL for Discord plugin to call (default: `http://localhost:14242`) |
|
||||||
| `TELEGRAM_BOT_TOKEN` | Telegram bot token (enables Telegram plugin) |
|
| `TELEGRAM_BOT_TOKEN` | Telegram bot token (enables Telegram plugin) |
|
||||||
| `TELEGRAM_GATEWAY_URL` | Gateway URL for Telegram plugin to call |
|
| `TELEGRAM_GATEWAY_URL` | Gateway URL for Telegram plugin to call |
|
||||||
|
|
||||||
### Observability
|
### Observability
|
||||||
|
|
||||||
@@ -309,9 +309,9 @@ Each OIDC provider requires its client ID, client secret, and issuer URL togethe
|
|||||||
|
|
||||||
### Web App
|
### Web App
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
| ------------------------- | ----------------------- | -------------------------------------- |
|
| ------------------------- | ------------------------ | -------------------------------------- |
|
||||||
| `NEXT_PUBLIC_GATEWAY_URL` | `http://localhost:4000` | Gateway URL used by the Next.js client |
|
| `NEXT_PUBLIC_GATEWAY_URL` | `http://localhost:14242` | Gateway URL used by the Next.js client |
|
||||||
|
|
||||||
### Coordination
|
### Coordination
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ server {
|
|||||||
|
|
||||||
# WebSocket support (for chat.gateway.ts / Socket.IO)
|
# WebSocket support (for chat.gateway.ts / Socket.IO)
|
||||||
location /socket.io/ {
|
location /socket.io/ {
|
||||||
proxy_pass http://127.0.0.1:4000;
|
proxy_pass http://127.0.0.1:14242;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
@@ -204,7 +204,7 @@ server {
|
|||||||
|
|
||||||
# REST + auth
|
# REST + auth
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:4000;
|
proxy_pass http://127.0.0.1:14242;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -234,11 +234,11 @@ server {
|
|||||||
# /etc/caddy/Caddyfile
|
# /etc/caddy/Caddyfile
|
||||||
|
|
||||||
your-domain.example.com {
|
your-domain.example.com {
|
||||||
reverse_proxy /socket.io/* localhost:4000 {
|
reverse_proxy /socket.io/* localhost:14242 {
|
||||||
header_up Upgrade {http.upgrade}
|
header_up Upgrade {http.upgrade}
|
||||||
header_up Connection {http.connection}
|
header_up Connection {http.connection}
|
||||||
}
|
}
|
||||||
reverse_proxy localhost:4000
|
reverse_proxy localhost:14242
|
||||||
}
|
}
|
||||||
|
|
||||||
app.your-domain.example.com {
|
app.your-domain.example.com {
|
||||||
@@ -328,7 +328,7 @@ MaxRetentionSec=30day
|
|||||||
- Set `BETTER_AUTH_SECRET` to a cryptographically random value (`openssl rand -base64 32`).
|
- Set `BETTER_AUTH_SECRET` to a cryptographically random value (`openssl rand -base64 32`).
|
||||||
- Restrict `GATEWAY_CORS_ORIGIN` to your exact frontend origin — do not use `*`.
|
- Restrict `GATEWAY_CORS_ORIGIN` to your exact frontend origin — do not use `*`.
|
||||||
- Run services as a dedicated non-root system user (e.g., `mosaic`).
|
- Run services as a dedicated non-root system user (e.g., `mosaic`).
|
||||||
- Firewall: only expose ports 80/443 externally; keep 4000 and 3000 bound to `127.0.0.1`.
|
- Firewall: only expose ports 80/443 externally; keep 14242 and 3000 bound to `127.0.0.1`.
|
||||||
- Set `AGENT_FILE_SANDBOX_DIR` to a directory outside the application root to prevent agent tools from accessing source code.
|
- Set `AGENT_FILE_SANDBOX_DIR` to a directory outside the application root to prevent agent tools from accessing source code.
|
||||||
- If using `AGENT_USER_TOOLS`, enumerate only the tools non-admin users need.
|
- If using `AGENT_USER_TOOLS`, enumerate only the tools non-admin users need.
|
||||||
|
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ DATABASE_URL=postgresql://mosaic:mosaic@localhost:5433/mosaic
|
|||||||
BETTER_AUTH_SECRET=change-me-to-a-random-secret
|
BETTER_AUTH_SECRET=change-me-to-a-random-secret
|
||||||
|
|
||||||
# Gateway
|
# Gateway
|
||||||
GATEWAY_PORT=4000
|
GATEWAY_PORT=14242
|
||||||
GATEWAY_CORS_ORIGIN=http://localhost:3000
|
GATEWAY_CORS_ORIGIN=http://localhost:3000
|
||||||
|
|
||||||
# Web
|
# Web
|
||||||
NEXT_PUBLIC_GATEWAY_URL=http://localhost:4000
|
NEXT_PUBLIC_GATEWAY_URL=http://localhost:14242
|
||||||
|
|
||||||
# Optional: Ollama
|
# Optional: Ollama
|
||||||
OLLAMA_BASE_URL=http://localhost:11434
|
OLLAMA_BASE_URL=http://localhost:11434
|
||||||
@@ -141,7 +141,7 @@ migrations in production).
|
|||||||
pnpm --filter @mosaic/gateway exec tsx src/main.ts
|
pnpm --filter @mosaic/gateway exec tsx src/main.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
The gateway starts on port `4000` by default.
|
The gateway starts on port `14242` by default.
|
||||||
|
|
||||||
### 6. Start the Web App
|
### 6. Start the Web App
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ directory are defined there.
|
|||||||
|
|
||||||
## API Endpoint Reference
|
## API Endpoint Reference
|
||||||
|
|
||||||
All endpoints are served by the gateway at `http://localhost:4000` by default.
|
All endpoints are served by the gateway at `http://localhost:14242` by default.
|
||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
Mosaic Stack requires a running gateway. Your administrator provides the URL
|
Mosaic Stack requires a running gateway. Your administrator provides the URL
|
||||||
(default: `http://localhost:4000`) and creates your account.
|
(default: `http://localhost:14242`) and creates your account.
|
||||||
|
|
||||||
### Logging In (Web)
|
### Logging In (Web)
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ mosaic --help
|
|||||||
### Signing In
|
### Signing In
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mosaic login --gateway http://localhost:4000 --email you@example.com
|
mosaic login --gateway http://localhost:14242 --email you@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
You are prompted for a password if `--password` is not supplied. The session
|
You are prompted for a password if `--password` is not supplied. The session
|
||||||
@@ -191,12 +191,12 @@ mosaic tui
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
| Flag | Default | Description |
|
| Flag | Default | Description |
|
||||||
| ----------------------- | ----------------------- | ---------------------------------- |
|
| ----------------------- | ------------------------ | ---------------------------------- |
|
||||||
| `--gateway <url>` | `http://localhost:4000` | Gateway URL |
|
| `--gateway <url>` | `http://localhost:14242` | Gateway URL |
|
||||||
| `--conversation <id>` | — | Resume a specific conversation |
|
| `--conversation <id>` | — | Resume a specific conversation |
|
||||||
| `--model <modelId>` | server default | Model to use (e.g. `llama3.2`) |
|
| `--model <modelId>` | server default | Model to use (e.g. `llama3.2`) |
|
||||||
| `--provider <provider>` | server default | Provider (e.g. `ollama`, `openai`) |
|
| `--provider <provider>` | server default | Provider (e.g. `ollama`, `openai`) |
|
||||||
|
|
||||||
If no valid session exists you are prompted to sign in before the TUI launches.
|
If no valid session exists you are prompted to sign in before the TUI launches.
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export function createAuth(config: AuthConfig) {
|
|||||||
provider: 'pg',
|
provider: 'pg',
|
||||||
usePlural: true,
|
usePlural: true,
|
||||||
}),
|
}),
|
||||||
baseURL: baseURL ?? process.env['BETTER_AUTH_URL'] ?? 'http://localhost:4000',
|
baseURL: baseURL ?? process.env['BETTER_AUTH_URL'] ?? 'http://localhost:14242',
|
||||||
secret: secret ?? process.env['BETTER_AUTH_SECRET'],
|
secret: secret ?? process.env['BETTER_AUTH_SECRET'],
|
||||||
basePath: '/api/auth',
|
basePath: '/api/auth',
|
||||||
trustedOrigins,
|
trustedOrigins,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mosaic/cli",
|
"name": "@mosaic/cli",
|
||||||
"version": "0.0.13",
|
"version": "0.0.14",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.mosaicstack.dev/mosaic/mosaic-stack.git",
|
"url": "https://git.mosaicstack.dev/mosaic/mosaic-stack.git",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ registerLaunchCommands(program);
|
|||||||
program
|
program
|
||||||
.command('login')
|
.command('login')
|
||||||
.description('Sign in to a Mosaic gateway')
|
.description('Sign in to a Mosaic gateway')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('-e, --email <email>', 'Email address')
|
.option('-e, --email <email>', 'Email address')
|
||||||
.option('-p, --password <password>', 'Password')
|
.option('-p, --password <password>', 'Password')
|
||||||
.action(async (opts: { gateway: string; email?: string; password?: string }) => {
|
.action(async (opts: { gateway: string; email?: string; password?: string }) => {
|
||||||
@@ -67,7 +67,7 @@ program
|
|||||||
program
|
program
|
||||||
.command('tui')
|
.command('tui')
|
||||||
.description('Launch interactive TUI connected to the gateway')
|
.description('Launch interactive TUI connected to the gateway')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('-c, --conversation <id>', 'Resume a conversation by ID')
|
.option('-c, --conversation <id>', 'Resume a conversation by ID')
|
||||||
.option('-m, --model <modelId>', 'Model ID to use (e.g. gpt-4o, llama3.2)')
|
.option('-m, --model <modelId>', 'Model ID to use (e.g. gpt-4o, llama3.2)')
|
||||||
.option('-p, --provider <provider>', 'Provider to use (e.g. openai, ollama)')
|
.option('-p, --provider <provider>', 'Provider to use (e.g. openai, ollama)')
|
||||||
@@ -208,7 +208,7 @@ const sessionsCmd = program.command('sessions').description('Manage active agent
|
|||||||
sessionsCmd
|
sessionsCmd
|
||||||
.command('list')
|
.command('list')
|
||||||
.description('List active agent sessions')
|
.description('List active agent sessions')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.action(async (opts: { gateway: string }) => {
|
.action(async (opts: { gateway: string }) => {
|
||||||
const { withAuth } = await import('./commands/with-auth.js');
|
const { withAuth } = await import('./commands/with-auth.js');
|
||||||
const auth = await withAuth(opts.gateway);
|
const auth = await withAuth(opts.gateway);
|
||||||
@@ -243,7 +243,7 @@ sessionsCmd
|
|||||||
sessionsCmd
|
sessionsCmd
|
||||||
.command('resume <id>')
|
.command('resume <id>')
|
||||||
.description('Resume an existing agent session in the TUI')
|
.description('Resume an existing agent session in the TUI')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.action(async (id: string, opts: { gateway: string }) => {
|
.action(async (id: string, opts: { gateway: string }) => {
|
||||||
const { loadSession, validateSession } = await import('./auth.js');
|
const { loadSession, validateSession } = await import('./auth.js');
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ sessionsCmd
|
|||||||
sessionsCmd
|
sessionsCmd
|
||||||
.command('destroy <id>')
|
.command('destroy <id>')
|
||||||
.description('Terminate an active agent session')
|
.description('Terminate an active agent session')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.action(async (id: string, opts: { gateway: string }) => {
|
.action(async (id: string, opts: { gateway: string }) => {
|
||||||
const { withAuth } = await import('./commands/with-auth.js');
|
const { withAuth } = await import('./commands/with-auth.js');
|
||||||
const auth = await withAuth(opts.gateway);
|
const auth = await withAuth(opts.gateway);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function registerAgentCommand(program: Command) {
|
|||||||
const cmd = program
|
const cmd = program
|
||||||
.command('agent')
|
.command('agent')
|
||||||
.description('Manage agent configurations')
|
.description('Manage agent configurations')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('--list', 'List all agents')
|
.option('--list', 'List all agents')
|
||||||
.option('--new', 'Create a new agent')
|
.option('--new', 'Create a new agent')
|
||||||
.option('--show <idOrName>', 'Show agent details')
|
.option('--show <idOrName>', 'Show agent details')
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function resolveOpts(raw: GatewayParentOpts): { host: string; port: number; toke
|
|||||||
const meta = readMeta();
|
const meta = readMeta();
|
||||||
return {
|
return {
|
||||||
host: raw.host ?? meta?.host ?? 'localhost',
|
host: raw.host ?? meta?.host ?? 'localhost',
|
||||||
port: parseInt(raw.port, 10) || meta?.port || 4000,
|
port: parseInt(raw.port, 10) || meta?.port || 14242,
|
||||||
token: raw.token ?? meta?.adminToken,
|
token: raw.token ?? meta?.adminToken,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ export function registerGatewayCommand(program: Command): void {
|
|||||||
.description('Manage the Mosaic gateway daemon')
|
.description('Manage the Mosaic gateway daemon')
|
||||||
.helpOption('--help', 'Display help')
|
.helpOption('--help', 'Display help')
|
||||||
.option('-h, --host <host>', 'Gateway host', 'localhost')
|
.option('-h, --host <host>', 'Gateway host', 'localhost')
|
||||||
.option('-p, --port <port>', 'Gateway port', '4000')
|
.option('-p, --port <port>', 'Gateway port', '14242')
|
||||||
.option('-t, --token <token>', 'Admin API token')
|
.option('-t, --token <token>', 'Admin API token')
|
||||||
.action(() => {
|
.action(() => {
|
||||||
gw.outputHelp();
|
gw.outputHelp();
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ async function doInstall(rl: ReturnType<typeof createInterface>, opts: InstallOp
|
|||||||
const tier = tierAnswer === '2' ? 'team' : 'local';
|
const tier = tierAnswer === '2' ? 'team' : 'local';
|
||||||
|
|
||||||
const port =
|
const port =
|
||||||
opts.port !== 4000
|
opts.port !== 14242
|
||||||
? opts.port
|
? opts.port
|
||||||
: parseInt(
|
: parseInt(
|
||||||
(await prompt(rl, `Gateway port [${opts.port.toString()}]: `)) || opts.port.toString(),
|
(await prompt(rl, `Gateway port [${opts.port.toString()}]: `)) || opts.port.toString(),
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function registerMissionCommand(program: Command) {
|
|||||||
const cmd = program
|
const cmd = program
|
||||||
.command('mission')
|
.command('mission')
|
||||||
.description('Manage missions')
|
.description('Manage missions')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('--list', 'List all missions')
|
.option('--list', 'List all missions')
|
||||||
.option('--init', 'Create a new mission')
|
.option('--init', 'Create a new mission')
|
||||||
.option('--plan <idOrName>', 'Run PRD wizard for a mission')
|
.option('--plan <idOrName>', 'Run PRD wizard for a mission')
|
||||||
@@ -86,7 +86,7 @@ export function registerMissionCommand(program: Command) {
|
|||||||
cmd
|
cmd
|
||||||
.command('task')
|
.command('task')
|
||||||
.description('Manage mission tasks')
|
.description('Manage mission tasks')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('--list', 'List tasks for a mission')
|
.option('--list', 'List tasks for a mission')
|
||||||
.option('--new', 'Create a task')
|
.option('--new', 'Create a task')
|
||||||
.option('--update <taskId>', 'Update a task')
|
.option('--update <taskId>', 'Update a task')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export function registerPrdyCommand(program: Command) {
|
|||||||
const cmd = program
|
const cmd = program
|
||||||
.command('prdy')
|
.command('prdy')
|
||||||
.description('PRD wizard — create and manage Product Requirement Documents')
|
.description('PRD wizard — create and manage Product Requirement Documents')
|
||||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
|
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||||
.option('--init [name]', 'Create a new PRD')
|
.option('--init [name]', 'Create a new PRD')
|
||||||
.option('--update [name]', 'Update an existing PRD')
|
.option('--update [name]', 'Update an existing PRD')
|
||||||
.option('--project <idOrName>', 'Scope to project')
|
.option('--project <idOrName>', 'Scope to project')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mosaic/mosaic",
|
"name": "@mosaic/mosaic",
|
||||||
"version": "0.0.13",
|
"version": "0.0.14",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.mosaicstack.dev/mosaic/mosaic-stack.git",
|
"url": "https://git.mosaicstack.dev/mosaic/mosaic-stack.git",
|
||||||
|
|||||||
Reference in New Issue
Block a user