@pixelbyte-software/pixcode 1.49.11 → 1.50.1
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-Q-GU9EZQ.js → index-BPu5Zp17.js} +187 -186
- package/dist/assets/{index-DjKDBqln.css → index-DMz0zv6T.css} +1 -1
- package/dist/hermes-agent.png +0 -0
- package/dist/index.html +2 -2
- package/dist-server/server/index.js +46 -3
- package/dist-server/server/index.js.map +1 -1
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js +29 -3
- package/dist-server/server/modules/orchestration/hermes/hermes.routes.js.map +1 -1
- package/package.json +1 -1
- package/scripts/hermes/configure-pixcode-mcp.mjs +1 -0
- package/scripts/hermes/pixcode-mcp-server.mjs +103 -3
- package/scripts/smoke/hermes-api-install.mjs +4 -4
- package/scripts/smoke/hermes-rest-codex-launch.mjs +11 -4
- package/scripts/smoke/hermes-settings-commands.mjs +181 -0
- package/scripts/smoke/pixcode-workbench-1-48.mjs +2 -2
- package/scripts/smoke/vscode-workbench-polish.mjs +8 -2
- package/server/index.js +57 -3
- package/server/modules/orchestration/hermes/hermes.routes.ts +33 -3
|
@@ -29,6 +29,10 @@ type HermesTerminalLaunchEvent = {
|
|
|
29
29
|
provider: string;
|
|
30
30
|
projectPath: string | null;
|
|
31
31
|
prompt: string | null;
|
|
32
|
+
startupInput: string | null;
|
|
33
|
+
permissionMode: string | null;
|
|
34
|
+
skipPermissions: boolean;
|
|
35
|
+
bypassPermissions: boolean;
|
|
32
36
|
source: string;
|
|
33
37
|
createdAt: string;
|
|
34
38
|
};
|
|
@@ -80,6 +84,24 @@ function rememberHermesTerminalLaunch(event: HermesTerminalLaunchEvent) {
|
|
|
80
84
|
hermesTerminalLaunchEmitter.emit('terminal-launch', event);
|
|
81
85
|
}
|
|
82
86
|
|
|
87
|
+
function readTrimmedString(value: unknown) {
|
|
88
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function readBoolean(value: unknown) {
|
|
92
|
+
return value === true || value === 'true' || value === '1';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function isLegacyPromptLikelyStartupInput(prompt: string | null) {
|
|
96
|
+
if (!prompt || prompt.length > 160 || prompt.includes('\n')) return false;
|
|
97
|
+
if (/^[/:!@]/u.test(prompt)) return true;
|
|
98
|
+
if (prompt.includes(':')) return false;
|
|
99
|
+
if (/\b(user|request|reason|audit|task|kullanıcı|kullanicinin|istek|isteği|gorev|görev|terminal|codex|claude|qwen|gemini|cursor|opencode|open|aç|ac|başlat|baslat|send|gönder|gonder)\b/iu.test(prompt)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
return prompt.length <= 80;
|
|
103
|
+
}
|
|
104
|
+
|
|
83
105
|
export function createHermesRouter(options: HermesRouterOptions = {}): Router {
|
|
84
106
|
const router = express.Router();
|
|
85
107
|
|
|
@@ -448,15 +470,23 @@ export function createHermesRouter(options: HermesRouterOptions = {}): Router {
|
|
|
448
470
|
const projectPath = typeof body.projectPath === 'string' && body.projectPath.trim()
|
|
449
471
|
? body.projectPath.trim()
|
|
450
472
|
: null;
|
|
451
|
-
const prompt =
|
|
452
|
-
|
|
453
|
-
|
|
473
|
+
const prompt = readTrimmedString(body.prompt ?? body.reason);
|
|
474
|
+
const requestedStartupInput = readTrimmedString(body.startupInput ?? body.input);
|
|
475
|
+
const startupInput = requestedStartupInput ?? (isLegacyPromptLikelyStartupInput(prompt) ? prompt : null);
|
|
476
|
+
const bypassPermissions = readBoolean(body.bypassPermissions);
|
|
477
|
+
const skipPermissions = readBoolean(body.skipPermissions) || bypassPermissions;
|
|
478
|
+
const requestedPermissionMode = readTrimmedString(body.permissionMode);
|
|
479
|
+
const permissionMode = requestedPermissionMode ?? (skipPermissions ? 'bypassPermissions' : null);
|
|
454
480
|
|
|
455
481
|
const event: HermesTerminalLaunchEvent = {
|
|
456
482
|
id: nextHermesTerminalLaunchId,
|
|
457
483
|
provider,
|
|
458
484
|
projectPath,
|
|
459
485
|
prompt,
|
|
486
|
+
startupInput,
|
|
487
|
+
permissionMode,
|
|
488
|
+
skipPermissions,
|
|
489
|
+
bypassPermissions,
|
|
460
490
|
source: 'hermes-mcp',
|
|
461
491
|
createdAt: new Date().toISOString(),
|
|
462
492
|
};
|