adhdev 0.8.77 → 0.8.80
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/cli/index.js +38 -25
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -36341,8 +36341,11 @@ function checkSize() {
|
|
|
36341
36341
|
} catch {
|
|
36342
36342
|
}
|
|
36343
36343
|
}
|
|
36344
|
+
function shouldLogCommand(cmd) {
|
|
36345
|
+
return !SKIP_COMMANDS.has(cmd);
|
|
36346
|
+
}
|
|
36344
36347
|
function logCommand(entry) {
|
|
36345
|
-
if (
|
|
36348
|
+
if (!shouldLogCommand(entry.cmd)) return;
|
|
36346
36349
|
try {
|
|
36347
36350
|
if (++writeCount2 % 500 === 0) {
|
|
36348
36351
|
checkRotation();
|
|
@@ -36418,7 +36421,9 @@ var init_command_log = __esm({
|
|
|
36418
36421
|
writeCount2 = 0;
|
|
36419
36422
|
SKIP_COMMANDS = /* @__PURE__ */ new Set([
|
|
36420
36423
|
"heartbeat",
|
|
36421
|
-
"status_report"
|
|
36424
|
+
"status_report",
|
|
36425
|
+
"read_chat",
|
|
36426
|
+
"mark_session_seen"
|
|
36422
36427
|
]);
|
|
36423
36428
|
cleanOldFiles();
|
|
36424
36429
|
}
|
|
@@ -45007,20 +45012,32 @@ var init_session_host_transport = __esm({
|
|
|
45007
45012
|
});
|
|
45008
45013
|
|
|
45009
45014
|
// ../../oss/packages/daemon-core/src/session-host/app-name.ts
|
|
45010
|
-
function
|
|
45011
|
-
|
|
45012
|
-
throw new Error(
|
|
45013
|
-
`Standalone session-host namespace '${DEFAULT_SESSION_HOST_APP_NAME}' is reserved for the global daemon. Use '${DEFAULT_STANDALONE_SESSION_HOST_APP_NAME}' or another non-default namespace.`
|
|
45014
|
-
);
|
|
45015
|
+
function getReservedStandaloneNamespaceWarning() {
|
|
45016
|
+
return `Standalone session-host namespace '${DEFAULT_SESSION_HOST_APP_NAME}' is reserved for the global daemon. Falling back to '${DEFAULT_STANDALONE_SESSION_HOST_APP_NAME}' for this standalone run.`;
|
|
45015
45017
|
}
|
|
45016
|
-
function
|
|
45018
|
+
function resolveSessionHostAppNameResolution(options = {}) {
|
|
45017
45019
|
const env3 = options.env || process.env;
|
|
45018
45020
|
const explicit = typeof env3.ADHDEV_SESSION_HOST_NAME === "string" ? env3.ADHDEV_SESSION_HOST_NAME.trim() : "";
|
|
45019
45021
|
if (explicit) {
|
|
45020
|
-
if (options.standalone
|
|
45021
|
-
|
|
45022
|
+
if (options.standalone && explicit === DEFAULT_SESSION_HOST_APP_NAME) {
|
|
45023
|
+
return {
|
|
45024
|
+
appName: DEFAULT_STANDALONE_SESSION_HOST_APP_NAME,
|
|
45025
|
+
warning: getReservedStandaloneNamespaceWarning(),
|
|
45026
|
+
source: "reserved-standalone-fallback"
|
|
45027
|
+
};
|
|
45028
|
+
}
|
|
45029
|
+
return {
|
|
45030
|
+
appName: explicit,
|
|
45031
|
+
source: "explicit"
|
|
45032
|
+
};
|
|
45022
45033
|
}
|
|
45023
|
-
return
|
|
45034
|
+
return {
|
|
45035
|
+
appName: options.standalone ? DEFAULT_STANDALONE_SESSION_HOST_APP_NAME : DEFAULT_SESSION_HOST_APP_NAME,
|
|
45036
|
+
source: "default"
|
|
45037
|
+
};
|
|
45038
|
+
}
|
|
45039
|
+
function resolveSessionHostAppName(options = {}) {
|
|
45040
|
+
return resolveSessionHostAppNameResolution(options).appName;
|
|
45024
45041
|
}
|
|
45025
45042
|
var DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME;
|
|
45026
45043
|
var init_app_name = __esm({
|
|
@@ -45733,6 +45750,7 @@ __export(src_exports, {
|
|
|
45733
45750
|
resolveChatMessageKind: () => resolveChatMessageKind,
|
|
45734
45751
|
resolveDebugRuntimeConfig: () => resolveDebugRuntimeConfig,
|
|
45735
45752
|
resolveSessionHostAppName: () => resolveSessionHostAppName,
|
|
45753
|
+
resolveSessionHostAppNameResolution: () => resolveSessionHostAppNameResolution,
|
|
45736
45754
|
runAsyncBatch: () => runAsyncBatch,
|
|
45737
45755
|
saveConfig: () => saveConfig,
|
|
45738
45756
|
saveState: () => saveState,
|
|
@@ -85849,7 +85867,7 @@ var init_adhdev_daemon = __esm({
|
|
|
85849
85867
|
init_source();
|
|
85850
85868
|
init_version();
|
|
85851
85869
|
init_src();
|
|
85852
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.
|
|
85870
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.80" });
|
|
85853
85871
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
85854
85872
|
localHttpServer = null;
|
|
85855
85873
|
localWss = null;
|
|
@@ -89577,7 +89595,7 @@ function registerDaemonCommands(program2, pkgVersion3) {
|
|
|
89577
89595
|
});
|
|
89578
89596
|
program2.command("standalone").description("\u{1F5A5}\uFE0F Start ADHDev Standalone Server (Local Dashboard & Embedded Daemon)").option("-p, --port <port>", "Local HTTP/WS server port", "3847").option("--host <host>", "Bind to specific host (use 0.0.0.0 for LAN access)").option("--no-open", "Prevent opening browser automatically").option("--token <token>", "Require token authentication").option("--dev", "Enable Dev Mode").action(async (options) => {
|
|
89579
89597
|
const { spawn: spawn6, execSync: execSync8 } = await import("child_process");
|
|
89580
|
-
const { DEFAULT_STANDALONE_SESSION_HOST_APP_NAME: DEFAULT_STANDALONE_SESSION_HOST_APP_NAME2,
|
|
89598
|
+
const { DEFAULT_STANDALONE_SESSION_HOST_APP_NAME: DEFAULT_STANDALONE_SESSION_HOST_APP_NAME2, resolveSessionHostAppNameResolution: resolveSessionHostAppNameResolution2 } = await Promise.resolve().then(() => (init_src(), src_exports));
|
|
89581
89599
|
console.log(source_default.cyan("\n Starting ADHDev Standalone Server..."));
|
|
89582
89600
|
const args = [];
|
|
89583
89601
|
if (options.port) args.push("--port", options.port);
|
|
@@ -89585,19 +89603,11 @@ function registerDaemonCommands(program2, pkgVersion3) {
|
|
|
89585
89603
|
if (options.open === false) args.push("--no-open");
|
|
89586
89604
|
if (options.token) args.push("--token", options.token);
|
|
89587
89605
|
if (options.dev) args.push("--dev");
|
|
89588
|
-
|
|
89589
|
-
|
|
89590
|
-
sessionHostName = resolveSessionHostAppName2({ standalone: true, env: process.env });
|
|
89591
|
-
} catch (error48) {
|
|
89592
|
-
console.error(source_default.red(`
|
|
89593
|
-
\u2717 ${error48 instanceof Error ? error48.message : String(error48)}
|
|
89594
|
-
`));
|
|
89595
|
-
process.exitCode = 1;
|
|
89596
|
-
return;
|
|
89597
|
-
}
|
|
89606
|
+
const sessionHostResolution = resolveSessionHostAppNameResolution2({ standalone: true, env: process.env });
|
|
89607
|
+
const sessionHostName = sessionHostResolution.appName;
|
|
89598
89608
|
const standaloneEnv = {
|
|
89599
89609
|
...process.env,
|
|
89600
|
-
ADHDEV_SESSION_HOST_NAME:
|
|
89610
|
+
ADHDEV_SESSION_HOST_NAME: sessionHostName
|
|
89601
89611
|
};
|
|
89602
89612
|
let bin = "npx";
|
|
89603
89613
|
const npxArgs = ["-y", "@adhdev/daemon-standalone@latest", ...args];
|
|
@@ -89608,7 +89618,10 @@ function registerDaemonCommands(program2, pkgVersion3) {
|
|
|
89608
89618
|
console.log(source_default.gray(" Standalone server package not found locally."));
|
|
89609
89619
|
console.log(source_default.gray(" Downloading and running via npx (this may take a moment)..."));
|
|
89610
89620
|
}
|
|
89611
|
-
|
|
89621
|
+
if (sessionHostResolution.warning) {
|
|
89622
|
+
console.log(source_default.yellow(` \u26A0 ${sessionHostResolution.warning}`));
|
|
89623
|
+
}
|
|
89624
|
+
console.log(source_default.gray(` Session host namespace: ${sessionHostName}${sessionHostResolution.source === "default" ? " (default isolated standalone namespace)" : sessionHostResolution.source === "explicit" ? " (from ADHDEV_SESSION_HOST_NAME)" : " (auto-corrected for standalone isolation)"}`));
|
|
89612
89625
|
const spawnArgs = bin === "npx" ? npxArgs : args;
|
|
89613
89626
|
const child = spawn6(bin, spawnArgs, {
|
|
89614
89627
|
stdio: "inherit",
|