@adhdev/daemon-core 0.8.78 → 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/index.d.ts CHANGED
@@ -91,7 +91,8 @@ export { NodePtyTransportFactory } from './cli-adapters/pty-transport.js';
91
91
  export type { PtyRuntimeTransport, PtyTransportFactory, PtySpawnOptions } from './cli-adapters/pty-transport.js';
92
92
  export { SessionHostPtyTransportFactory } from './cli-adapters/session-host-transport.js';
93
93
  export type { HostedCliRuntimeDescriptor, CliTransportFactoryParams } from './commands/cli-manager.js';
94
- export { DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, resolveSessionHostAppName, } from './session-host/app-name.js';
94
+ export { DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, resolveSessionHostAppName, resolveSessionHostAppNameResolution, } from './session-host/app-name.js';
95
+ export type { SessionHostAppNameResolution } from './session-host/app-name.js';
95
96
  export { ensureSessionHostReady, listHostedCliRuntimes } from './session-host/runtime-support.js';
96
97
  export { getSessionHostRecoveryLabel, getSessionHostSurfaceKind, isSessionHostLiveRuntime, isSessionHostRecoverySnapshot, partitionSessionHostDiagnosticsSessions, partitionSessionHostRecords, } from './session-host/runtime-surface.js';
97
98
  export type { SessionHostSurfaceKind, SessionHostSurfaceRecordLike } from './session-host/runtime-surface.js';
package/dist/index.js CHANGED
@@ -3667,6 +3667,7 @@ __export(index_exports, {
3667
3667
  resolveChatMessageKind: () => resolveChatMessageKind,
3668
3668
  resolveDebugRuntimeConfig: () => resolveDebugRuntimeConfig,
3669
3669
  resolveSessionHostAppName: () => resolveSessionHostAppName,
3670
+ resolveSessionHostAppNameResolution: () => resolveSessionHostAppNameResolution,
3670
3671
  runAsyncBatch: () => runAsyncBatch,
3671
3672
  saveConfig: () => saveConfig,
3672
3673
  saveState: () => saveState,
@@ -24967,20 +24968,32 @@ var SessionHostPtyTransportFactory = class {
24967
24968
  // src/session-host/app-name.ts
24968
24969
  var DEFAULT_SESSION_HOST_APP_NAME = "adhdev";
24969
24970
  var DEFAULT_STANDALONE_SESSION_HOST_APP_NAME = "adhdev-standalone";
24970
- function validateStandaloneSessionHostAppName(explicit) {
24971
- if (explicit !== DEFAULT_SESSION_HOST_APP_NAME) return;
24972
- throw new Error(
24973
- `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.`
24974
- );
24971
+ function getReservedStandaloneNamespaceWarning() {
24972
+ 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.`;
24975
24973
  }
24976
- function resolveSessionHostAppName(options = {}) {
24974
+ function resolveSessionHostAppNameResolution(options = {}) {
24977
24975
  const env = options.env || process.env;
24978
24976
  const explicit = typeof env.ADHDEV_SESSION_HOST_NAME === "string" ? env.ADHDEV_SESSION_HOST_NAME.trim() : "";
24979
24977
  if (explicit) {
24980
- if (options.standalone) validateStandaloneSessionHostAppName(explicit);
24981
- return explicit;
24978
+ if (options.standalone && explicit === DEFAULT_SESSION_HOST_APP_NAME) {
24979
+ return {
24980
+ appName: DEFAULT_STANDALONE_SESSION_HOST_APP_NAME,
24981
+ warning: getReservedStandaloneNamespaceWarning(),
24982
+ source: "reserved-standalone-fallback"
24983
+ };
24984
+ }
24985
+ return {
24986
+ appName: explicit,
24987
+ source: "explicit"
24988
+ };
24982
24989
  }
24983
- return options.standalone ? DEFAULT_STANDALONE_SESSION_HOST_APP_NAME : DEFAULT_SESSION_HOST_APP_NAME;
24990
+ return {
24991
+ appName: options.standalone ? DEFAULT_STANDALONE_SESSION_HOST_APP_NAME : DEFAULT_SESSION_HOST_APP_NAME,
24992
+ source: "default"
24993
+ };
24994
+ }
24995
+ function resolveSessionHostAppName(options = {}) {
24996
+ return resolveSessionHostAppNameResolution(options).appName;
24984
24997
  }
24985
24998
 
24986
24999
  // src/session-host/runtime-support.ts
@@ -25641,6 +25654,7 @@ async function shutdownDaemonComponents(components) {
25641
25654
  resolveChatMessageKind,
25642
25655
  resolveDebugRuntimeConfig,
25643
25656
  resolveSessionHostAppName,
25657
+ resolveSessionHostAppNameResolution,
25644
25658
  runAsyncBatch,
25645
25659
  saveConfig,
25646
25660
  saveState,