@adhdev/daemon-standalone 0.9.77-rc.40 → 0.9.77-rc.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-standalone",
3
- "version": "0.9.77-rc.40",
3
+ "version": "0.9.77-rc.41",
4
4
  "description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -36596,6 +36596,34 @@ function loadHermesCoordinatorBaseConfig(targetConfigPath) {
36596
36596
  const { mcp_servers: _mcpServers, ...baseConfig } = parsed;
36597
36597
  return { config: baseConfig, sourceHome, sourceConfigPath };
36598
36598
  }
36599
+ function stripHermesCoordinatorTempModelProviderOverrides(config2) {
36600
+ const {
36601
+ model: _model,
36602
+ provider: _provider,
36603
+ default_model: _defaultModel,
36604
+ defaultProvider: _defaultProvider,
36605
+ default_provider: _defaultProviderSnake,
36606
+ modelProvider: _modelProvider,
36607
+ model_provider: _modelProviderSnake,
36608
+ ...sanitized
36609
+ } = config2;
36610
+ const delegation = sanitized.delegation;
36611
+ if (delegation && typeof delegation === "object" && !Array.isArray(delegation)) {
36612
+ const {
36613
+ model: _delegationModel,
36614
+ provider: _delegationProvider,
36615
+ modelProvider: _delegationModelProvider,
36616
+ model_provider: _delegationModelProviderSnake,
36617
+ ...delegationRest
36618
+ } = delegation;
36619
+ if (Object.keys(delegationRest).length > 0) {
36620
+ sanitized.delegation = delegationRest;
36621
+ } else {
36622
+ delete sanitized.delegation;
36623
+ }
36624
+ }
36625
+ return sanitized;
36626
+ }
36599
36627
  function copyHermesCoordinatorCredentialFiles(sourceHome, targetHome) {
36600
36628
  if ((0, import_path7.resolve)(sourceHome) === (0, import_path7.resolve)(targetHome)) return;
36601
36629
  for (const fileName of [".env", "auth.json"]) {
@@ -42130,9 +42158,13 @@ ${lastSnapshot}`;
42130
42158
  this.lastScreenChangeAt = 0;
42131
42159
  this.lastScreenSnapshotReadAt = Number.NEGATIVE_INFINITY;
42132
42160
  }
42161
+ getAccumulatedRawBufferCacheKey() {
42162
+ return this.accumulatedRawBuffer.replace(/\x1B\][^\x07]*(?:\x07|\x1B\\)/g, "").replace(/\x1B[P^_X][\s\S]*?(?:\x07|\x1B\\)/g, "").replace(/\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g, "");
42163
+ }
42133
42164
  getFreshParsedStatusCache() {
42134
42165
  const cached2 = this.parsedStatusCache;
42135
- if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.accumulatedRawBuffer === this.accumulatedRawBuffer && cached2.screenText === this.lastScreenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
42166
+ const accumulatedRawBufferKey = this.getAccumulatedRawBufferCacheKey();
42167
+ if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.accumulatedRawBufferKey === accumulatedRawBufferKey && cached2.screenText === this.lastScreenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
42136
42168
  return cached2.result;
42137
42169
  }
42138
42170
  return null;
@@ -43224,7 +43256,8 @@ ${lastSnapshot}`;
43224
43256
  const screenText = this.readTerminalScreenText();
43225
43257
  const parseScreenText = this.getParseScreenText(screenText);
43226
43258
  const cached2 = this.parsedStatusCache;
43227
- if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.accumulatedRawBuffer === this.accumulatedRawBuffer && cached2.screenText === parseScreenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
43259
+ const accumulatedRawBufferKey = this.getAccumulatedRawBufferCacheKey();
43260
+ if (cached2 && cached2.responseBuffer === this.responseBuffer && cached2.currentTurnScope === this.currentTurnScope && cached2.recentOutputBuffer === this.recentOutputBuffer && cached2.accumulatedBuffer === this.accumulatedBuffer && cached2.accumulatedRawBufferKey === accumulatedRawBufferKey && cached2.screenText === parseScreenText && cached2.currentStatus === this.currentStatus && cached2.activeModal === this.activeModal && cached2.cliName === this.cliName) {
43228
43261
  return cached2.result;
43229
43262
  }
43230
43263
  const parsed = this.runParseSession();
@@ -43252,7 +43285,7 @@ ${lastSnapshot}`;
43252
43285
  currentTurnScope: this.currentTurnScope,
43253
43286
  recentOutputBuffer: this.recentOutputBuffer,
43254
43287
  accumulatedBuffer: this.accumulatedBuffer,
43255
- accumulatedRawBuffer: this.accumulatedRawBuffer,
43288
+ accumulatedRawBufferKey,
43256
43289
  screenText: parseScreenText,
43257
43290
  currentStatus: this.currentStatus,
43258
43291
  activeModal: this.activeModal,
@@ -53759,7 +53792,8 @@ ${block}`);
53759
53792
  if (hadExistingMcpConfig) {
53760
53793
  try {
53761
53794
  const parsedExistingMcpConfig = parseMeshCoordinatorMcpConfig(readFileSync17(mcpConfigPath, "utf-8"), configFormat);
53762
- existingMcpConfig = { ...existingMcpConfig, ...parsedExistingMcpConfig };
53795
+ const existingCoordinatorConfig = hermesManualFallback ? stripHermesCoordinatorTempModelProviderOverrides(parsedExistingMcpConfig) : parsedExistingMcpConfig;
53796
+ existingMcpConfig = { ...existingMcpConfig, ...existingCoordinatorConfig };
53763
53797
  copyFileSync4(mcpConfigPath, mcpConfigPath + ".backup");
53764
53798
  } catch (error48) {
53765
53799
  LOG.error("MeshCoordinator", `Failed to parse existing MCP config ${mcpConfigPath}: ${error48?.message || error48}`);