@yeaft/webchat-agent 0.1.603 → 0.1.604

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/unify/engine.js +7 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.603",
3
+ "version": "0.1.604",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/unify/engine.js CHANGED
@@ -537,11 +537,13 @@ export class Engine {
537
537
  const budget = this.#config.messageTokenBudget || 8192;
538
538
  const compactCfg = (this.#config && this.#config.compact) || {};
539
539
 
540
- // Phase 8 PR-D: orchestrator opt-in. evaluateCompactTriggers (DESIGN
541
- // §4.1) and runCompact (DESIGN §4.2) are the new path. Existing
542
- // shouldConsolidate / consolidate stays as the default to preserve
543
- // production behaviour; flip via config.compact.useOrchestrator=true.
544
- if (compactCfg.useOrchestrator) {
540
+ // Phase 8 PR-H: orchestrator is now the default. The legacy
541
+ // shouldConsolidate / consolidate path remains reachable as an
542
+ // explicit fallback via `config.compact.useLegacy=true` for parity
543
+ // testing during migration. evaluateCompactTriggers (DESIGN §4.1)
544
+ // and runCompact (DESIGN §4.2) own the live path.
545
+ const useLegacy = compactCfg.useLegacy === true || compactCfg.useOrchestrator === false;
546
+ if (!useLegacy) {
545
547
  return this.#runOrchestratorCompact(budget, compactCfg);
546
548
  }
547
549