Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/muse-proxy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { parseProxyPort } from './proxy-port.mjs';

// Default port 18747: 18746 is claimed by design-code-proxy
// (DESIGN_CODE_PROXY_PORT) in this repo's config, so muse-proxy takes the
// next port in the family range (cf. clef 18742, agy 18743, codex 18744,
// antigravity-ls 18745, design-code 18746).
const PORT = parseInt(process.env.MUSE_PROXY_PORT || '18747', 10);
const PORT = parseProxyPort('MUSE_PROXY_PORT', 18747);
const HOST = process.env.MUSE_PROXY_HOST || '127.0.0.1';

const EGRESS_PROXY = 'http://hatch-egress-proxy:3128';
Expand Down
7 changes: 4 additions & 3 deletions bin/proxy-port.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,14 @@ test('clef-proxy binds exactly the requested valid port', async (t) => {
assert.equal((await res.json()).port, port);
});

test('all seven parse sites in the five proxies use the shared helper', () => {
test('all eight parse sites in the six proxies use the shared helper', () => {
const files = [
'codex-proxy.mjs',
'clef-proxy.mjs',
'agy-proxy.mjs',
'antigravity-ls-proxy.mjs',
'design-code-proxy.mjs'
'design-code-proxy.mjs',
'muse-proxy.mjs'
];
let sites = 0;
for (const file of files) {
Expand All @@ -174,7 +175,7 @@ test('all seven parse sites in the five proxies use the shared helper', () => {
);
sites += source.match(/parseProxyPort\('[A-Z_]+_PROXY_PORT', \d+\)/g).length;
}
assert.equal(sites, 7);
assert.equal(sites, 8);
});

test('home-manager launches the proxies from the bin directory', () => {
Expand Down
Loading