amalgm 0.1.44 → 0.1.46
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/README.md +0 -1
- package/lib/cli.js +0 -2
- package/lib/runtime-manifest.js +1 -129
- package/lib/service.js +0 -1
- package/lib/supervisor.js +0 -3
- package/lib/tunnel-chat.js +12 -12
- package/lib/tunnel-events.js +12 -12
- package/package.json +2 -2
- package/runtime/lib/runtime-manifest.js +159 -0
- package/runtime/scripts/amalgm-mcp/artifacts/supervisor.js +3 -2
- package/runtime/scripts/amalgm-mcp/config.js +3 -2
- package/runtime/scripts/amalgm-mcp/index.js +2 -2
- package/runtime/scripts/amalgm-mcp/lib/chat-runner.js +1 -1
- package/runtime/scripts/chat-core/contract.js +2 -1
- package/runtime/scripts/chat-core/tooling/mcp-bundle.js +3 -3
- package/runtime/scripts/chat-server/config.js +2 -1
- package/runtime/scripts/local-gateway.js +17 -17
- package/runtime/scripts/port-monitor.js +7 -8
- package/runtime/scripts/fs-watcher.js +0 -923
|
@@ -4,27 +4,26 @@
|
|
|
4
4
|
* Polls `ss -tlnp` every 2s and pushes
|
|
5
5
|
* port_opened / port_closed events over SSE.
|
|
6
6
|
*
|
|
7
|
-
* Runs alongside chat-server on
|
|
7
|
+
* Runs alongside chat-server on the port-monitor runtime port.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const http = require('http');
|
|
11
11
|
const fs = require('fs');
|
|
12
12
|
const { execSync } = require('child_process');
|
|
13
13
|
const { authorizeRuntimeHttp } = require('./runtime-auth');
|
|
14
|
+
const { runtimePort } = require('../lib/runtime-manifest');
|
|
14
15
|
|
|
15
|
-
const PORT =
|
|
16
|
+
const PORT = runtimePort('port-monitor');
|
|
16
17
|
const BIND_HOST = process.env.AMALGM_BIND_HOST || '0.0.0.0';
|
|
17
18
|
const AGENT_PORT = parseInt(process.env.PORT || '8080');
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const AMALGM_GATEWAY_PORT = parseInt(process.env.AMALGM_GATEWAY_PORT || '28781', 10);
|
|
19
|
+
const AMALGM_MCP_PORT = runtimePort('amalgm-mcp');
|
|
20
|
+
const CHAT_SERVER_PORT = runtimePort('chat-server');
|
|
21
|
+
const AMALGM_GATEWAY_PORT = runtimePort('local-gateway');
|
|
22
22
|
const LOCAL_AGENT_APP_PORT = parseInt(process.env.AMALGM_LOCAL_APP_PORT || '3456', 10);
|
|
23
23
|
const INTERNAL_SERVICE_PORTS = new Set([
|
|
24
24
|
AGENT_PORT,
|
|
25
25
|
LOCAL_AGENT_APP_PORT,
|
|
26
26
|
PORT,
|
|
27
|
-
FS_WATCHER_PORT,
|
|
28
27
|
AMALGM_MCP_PORT,
|
|
29
28
|
CHAT_SERVER_PORT,
|
|
30
29
|
AMALGM_GATEWAY_PORT,
|
|
@@ -33,7 +32,7 @@ const INTERNAL_SERVICE_PORTS = new Set([
|
|
|
33
32
|
const COMMON_DEV_PORTS = new Set([3000, 3001, 3002, 3003, 4000, 4200, 4321, 5000, 5001, 5173, 5174, 6006, 7000, 8000, 8001, 8888]);
|
|
34
33
|
const BLOCKED_PREVIEW_PROCESSES = new Set(['.opencode', 'controlce', 'figma_age', 'figma_agent', 'loom', 'opencode', 'rapportd']);
|
|
35
34
|
const DEV_PREVIEW_PROCESS_RE = /^(node|bun|deno|npm|pnpm|yarn|vite|next|astro|nuxt|svelte|remix|webpack|rspack|parcel|serve|http-server|tsx|python|python3|uvicorn|gunicorn|flask|django|ruby|rails|puma|php|java|go|air|cargo|trunk|dotnet|nginx)$/i;
|
|
36
|
-
const INTERNAL_COMMAND_RE = /(?:^|\s)(?:node(?:-[^\s]+)?\s+)?[^\s]*(?:\/|\\)runtime(?:\/|\\)scripts(?:\/|\\)(?:port-monitor|
|
|
35
|
+
const INTERNAL_COMMAND_RE = /(?:^|\s)(?:node(?:-[^\s]+)?\s+)?[^\s]*(?:\/|\\)runtime(?:\/|\\)scripts(?:\/|\\)(?:port-monitor|chat-server|local-gateway|amalgm-mcp(?:\/|\\)index)\.js(?:\s|$)/i;
|
|
37
36
|
const BLOCKED_COMMAND_RE = /(?:agent-browser|chromium|chrome)(?:\s|$)/i;
|
|
38
37
|
|
|
39
38
|
const knownPorts = new Map();
|