@pixelbyte-software/pixcode 1.49.10 → 1.49.11
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/assets/{index-BT6txdBK.css → index-DjKDBqln.css} +1 -1
- package/dist/assets/{index-DVpGrdpT.js → index-Q-GU9EZQ.js} +138 -138
- package/dist/index.html +2 -2
- package/dist-server/server/index.js +34 -1
- package/dist-server/server/index.js.map +1 -1
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js +11 -4
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js.map +1 -1
- package/dist-server/server/services/hermes-gateway.js +115 -1
- package/dist-server/server/services/hermes-gateway.js.map +1 -1
- package/dist-server/server/services/hermes-install-jobs.js +9 -1
- package/dist-server/server/services/hermes-install-jobs.js.map +1 -1
- package/package.json +1 -1
- package/scripts/hermes/configure-pixcode-mcp.mjs +36 -1
- package/scripts/hermes/pixcode-mcp-server.mjs +63 -5
- package/scripts/smoke/hermes-gateway-persistence.mjs +104 -0
- package/scripts/smoke/hermes-mcp-pixcode-roundtrip.mjs +27 -0
- package/scripts/smoke/hermes-rest-chat-live.mjs +4 -0
- package/scripts/smoke/hermes-rest-gateway.mjs +9 -1
- package/scripts/smoke/pixcode-workbench-1-48.mjs +13 -5
- package/server/index.js +40 -1
- package/server/modules/orchestration/hermes/hermes.routes.ts +12 -4
- package/server/services/hermes-gateway.js +128 -1
- package/server/services/hermes-install-jobs.js +11 -1
package/dist/index.html
CHANGED
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
|
|
36
36
|
<!-- Prevent zoom on iOS -->
|
|
37
37
|
<meta name="format-detection" content="telephone=no" />
|
|
38
|
-
<script type="module" crossorigin src="/assets/index-
|
|
38
|
+
<script type="module" crossorigin src="/assets/index-Q-GU9EZQ.js"></script>
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DB6V5Fl1.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-CIYNS698.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="/assets/vendor-xterm-C7tpxJl7.js">
|
|
42
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
42
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DjKDBqln.css">
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|
|
45
45
|
<div id="root"></div>
|
|
@@ -319,6 +319,28 @@ function resolvePublicBaseUrl(request) {
|
|
|
319
319
|
const host = headers['x-forwarded-host'] || headers.host || `127.0.0.1:${process.env.SERVER_PORT || process.env.PORT || '3001'}`;
|
|
320
320
|
return `${proto}://${String(host).split(',')[0].trim()}`;
|
|
321
321
|
}
|
|
322
|
+
function resolveHermesMcpBaseUrl() {
|
|
323
|
+
const configured = process.env.PIXCODE_INTERNAL_BASE_URL || process.env.PIXCODE_HERMES_BASE_URL;
|
|
324
|
+
if (configured)
|
|
325
|
+
return configured.replace(/\/$/, '');
|
|
326
|
+
return `http://127.0.0.1:${process.env.SERVER_PORT || process.env.PORT || '3001'}`;
|
|
327
|
+
}
|
|
328
|
+
function quoteBashArg(value) {
|
|
329
|
+
return `'${String(value).replace(/'/g, "'\\''")}'`;
|
|
330
|
+
}
|
|
331
|
+
function quotePowerShellArg(value) {
|
|
332
|
+
return `"${String(value).replace(/`/g, '``').replace(/\$/g, '`$').replace(/"/g, '`"')}"`;
|
|
333
|
+
}
|
|
334
|
+
function isHermesCliCommand(command) {
|
|
335
|
+
return typeof command === 'string' && command.trim() === 'hermes';
|
|
336
|
+
}
|
|
337
|
+
function buildHermesCliCommand(command) {
|
|
338
|
+
const configureScript = path.join(APP_ROOT, 'scripts', 'hermes', 'configure-pixcode-mcp.mjs');
|
|
339
|
+
if (os.platform() === 'win32') {
|
|
340
|
+
return `& ${quotePowerShellArg(process.execPath)} ${quotePowerShellArg(configureScript)} *> $null; ${command}`;
|
|
341
|
+
}
|
|
342
|
+
return `${quoteBashArg(process.execPath)} ${quoteBashArg(configureScript)} >/dev/null 2>&1; exec ${command}`;
|
|
343
|
+
}
|
|
322
344
|
function getOrCreateHermesApiKey(userId) {
|
|
323
345
|
if (!userId)
|
|
324
346
|
return null;
|
|
@@ -2012,10 +2034,14 @@ function handleShellConnection(ws, request) {
|
|
|
2012
2034
|
const provider = data.provider || 'claude';
|
|
2013
2035
|
const initialCommand = data.initialCommand;
|
|
2014
2036
|
const isPlainShell = data.isPlainShell || (!!initialCommand && !hasSession) || provider === 'plain-shell';
|
|
2037
|
+
const isHermesCliLaunch = isPlainShell && isHermesCliCommand(initialCommand);
|
|
2015
2038
|
const forceNewSession = Boolean(data.forceNewSession);
|
|
2016
2039
|
const shellPermissionMode = normalizeShellPermissionMode(data.permissionMode);
|
|
2017
2040
|
const shellSkipPermissions = Boolean(data.skipPermissions);
|
|
2018
2041
|
const shellPermissionFlags = buildProviderShellPermissionFlags(provider, shellPermissionMode, shellSkipPermissions);
|
|
2042
|
+
const hermesApiKey = isHermesCliLaunch
|
|
2043
|
+
? getOrCreateHermesApiKey(request.user?.id ?? request.user?.userId ?? null)
|
|
2044
|
+
: null;
|
|
2019
2045
|
urlDetectionBuffer = '';
|
|
2020
2046
|
announcedAuthUrls.clear();
|
|
2021
2047
|
// Login commands should never reuse cached sessions — each login
|
|
@@ -2131,7 +2157,9 @@ function handleShellConnection(ws, request) {
|
|
|
2131
2157
|
let shellCommand;
|
|
2132
2158
|
if (isPlainShell) {
|
|
2133
2159
|
// Plain shell mode without an initial command must stay interactive.
|
|
2134
|
-
shellCommand =
|
|
2160
|
+
shellCommand = isHermesCliLaunch
|
|
2161
|
+
? buildHermesCliCommand(initialCommand)
|
|
2162
|
+
: initialCommand || null;
|
|
2135
2163
|
}
|
|
2136
2164
|
else if (provider === 'cursor') {
|
|
2137
2165
|
const command = buildProviderShellCommand('cursor-agent', shellPermissionFlags);
|
|
@@ -2257,6 +2285,11 @@ function handleShellConnection(ws, request) {
|
|
|
2257
2285
|
TERM: 'xterm-256color',
|
|
2258
2286
|
COLORTERM: 'truecolor',
|
|
2259
2287
|
FORCE_COLOR: '3',
|
|
2288
|
+
...(isHermesCliLaunch ? {
|
|
2289
|
+
PIXCODE_BASE_URL: resolveHermesMcpBaseUrl(),
|
|
2290
|
+
PIXCODE_API_KEY: hermesApiKey || '',
|
|
2291
|
+
PIXCODE_APP_ROOT: APP_ROOT,
|
|
2292
|
+
} : {}),
|
|
2260
2293
|
});
|
|
2261
2294
|
shellProcess = pty.spawn(shell, shellArgs, {
|
|
2262
2295
|
name: 'xterm-256color',
|