aicodeman 1.50.0 → 1.51.0
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/README.md +17 -10
- package/dist/config/attachment-guard.d.ts +5 -1
- package/dist/config/attachment-guard.d.ts.map +1 -1
- package/dist/config/attachment-guard.js +4 -2
- package/dist/config/attachment-guard.js.map +1 -1
- package/dist/config/cli-registry/schema.d.ts +2 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +11 -0
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +155 -4
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +33 -2
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/config/file-editing.d.ts +7 -3
- package/dist/config/file-editing.d.ts.map +1 -1
- package/dist/config/file-editing.js +12 -3
- package/dist/config/file-editing.js.map +1 -1
- package/dist/config/local-model-catalog.d.ts +95 -20
- package/dist/config/local-model-catalog.d.ts.map +1 -1
- package/dist/config/local-model-catalog.js +172 -37
- package/dist/config/local-model-catalog.js.map +1 -1
- package/dist/config-backup.js +1 -1
- package/dist/config-backup.js.map +1 -1
- package/dist/custom-model-injection.d.ts.map +1 -1
- package/dist/custom-model-injection.js +22 -14
- package/dist/custom-model-injection.js.map +1 -1
- package/dist/hooks-config.d.ts +62 -0
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +156 -0
- package/dist/hooks-config.js.map +1 -1
- package/dist/local-model/connect.d.ts +16 -2
- package/dist/local-model/connect.d.ts.map +1 -1
- package/dist/local-model/connect.js +17 -3
- package/dist/local-model/connect.js.map +1 -1
- package/dist/local-model/harness-facts.d.ts +8 -4
- package/dist/local-model/harness-facts.d.ts.map +1 -1
- package/dist/local-model/harness-facts.js +13 -5
- package/dist/local-model/harness-facts.js.map +1 -1
- package/dist/local-model/install-job.d.ts +208 -28
- package/dist/local-model/install-job.d.ts.map +1 -1
- package/dist/local-model/install-job.js +856 -94
- package/dist/local-model/install-job.js.map +1 -1
- package/dist/local-model/recommend.d.ts +11 -5
- package/dist/local-model/recommend.d.ts.map +1 -1
- package/dist/local-model/recommend.js +11 -5
- package/dist/local-model/recommend.js.map +1 -1
- package/dist/local-model/runtime.d.ts +12 -0
- package/dist/local-model/runtime.d.ts.map +1 -1
- package/dist/local-model/runtime.js +42 -0
- package/dist/local-model/runtime.js.map +1 -1
- package/dist/local-model/state-store.d.ts.map +1 -1
- package/dist/local-model/state-store.js +40 -0
- package/dist/local-model/state-store.js.map +1 -1
- package/dist/mux-interface.d.ts +3 -1
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/proc-tree.d.ts +23 -0
- package/dist/proc-tree.d.ts.map +1 -1
- package/dist/proc-tree.js +28 -0
- package/dist/proc-tree.js.map +1 -1
- package/dist/session-auto-ops.d.ts +95 -8
- package/dist/session-auto-ops.d.ts.map +1 -1
- package/dist/session-auto-ops.js +146 -32
- package/dist/session-auto-ops.js.map +1 -1
- package/dist/session-cli-registry-bridge.d.ts +2 -1
- package/dist/session-cli-registry-bridge.d.ts.map +1 -1
- package/dist/session-cli-registry-bridge.js.map +1 -1
- package/dist/session.d.ts +16 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +29 -5
- package/dist/session.js.map +1 -1
- package/dist/tmux-manager.d.ts +10 -1
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +45 -6
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tui/tui-app.d.ts.map +1 -1
- package/dist/tui/tui-app.js +1 -0
- package/dist/tui/tui-app.js.map +1 -1
- package/dist/tui/tui-client.d.ts +1 -1
- package/dist/tui/tui-client.d.ts.map +1 -1
- package/dist/types/common.d.ts +5 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/local-model-install.d.ts +202 -15
- package/dist/types/local-model-install.d.ts.map +1 -1
- package/dist/types/local-model-install.js +21 -4
- package/dist/types/local-model-install.js.map +1 -1
- package/dist/types/local-model.d.ts +32 -6
- package/dist/types/local-model.d.ts.map +1 -1
- package/dist/types/local-model.js.map +1 -1
- package/dist/types/session.d.ts +26 -4
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +2 -1
- package/dist/types/session.js.map +1 -1
- package/dist/usage-telemetry.d.ts +3 -0
- package/dist/usage-telemetry.d.ts.map +1 -1
- package/dist/usage-telemetry.js +4 -0
- package/dist/usage-telemetry.js.map +1 -1
- package/dist/utils/token-validation.d.ts +3 -3
- package/dist/utils/token-validation.d.ts.map +1 -1
- package/dist/utils/token-validation.js +3 -3
- package/dist/utils/token-validation.js.map +1 -1
- package/dist/web/case-state-sync.d.ts +28 -0
- package/dist/web/case-state-sync.d.ts.map +1 -0
- package/dist/web/case-state-sync.js +41 -0
- package/dist/web/case-state-sync.js.map +1 -0
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/{app.8719143d.js → app.bddc2382.js} +9 -7
- package/dist/web/public/app.bddc2382.js.br +0 -0
- package/dist/web/public/app.bddc2382.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/constants.782170e1.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/edit-history-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/foreign-sessions.js.gz +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/header-divider.eb2d2463.js.gz +0 -0
- package/dist/web/public/home-sessions.js +38 -18
- package/dist/web/public/home-sessions.js.br +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.2e0cdcee.js +2 -0
- package/dist/web/public/i18n.2e0cdcee.js.br +0 -0
- package/dist/web/public/i18n.2e0cdcee.js.gz +0 -0
- package/dist/web/public/{image-input.a5d0f8f3.js → image-input.b75c41ca.js} +17 -1
- package/dist/web/public/image-input.b75c41ca.js.br +0 -0
- package/dist/web/public/image-input.b75c41ca.js.gz +0 -0
- package/dist/web/public/index.html +39 -15
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/{keyboard-accessory.b941676c.js → keyboard-accessory.0800fc44.js} +160 -2
- package/dist/web/public/keyboard-accessory.0800fc44.js.br +0 -0
- package/dist/web/public/keyboard-accessory.0800fc44.js.gz +0 -0
- package/dist/web/public/local-model-ui.js +618 -32
- package/dist/web/public/local-model-ui.js.br +0 -0
- package/dist/web/public/local-model-ui.js.gz +0 -0
- package/dist/web/public/mobile-handlers.f7c3f692.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js +31 -14
- package/dist/web/public/mobile-overview.js.br +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.984e9058.css +1 -0
- package/dist/web/public/mobile.984e9058.css.br +0 -0
- package/dist/web/public/mobile.984e9058.css.gz +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.d3f4f1c4.js → panels-ui.ee2330a4.js} +99 -97
- package/dist/web/public/panels-ui.ee2330a4.js.br +0 -0
- package/dist/web/public/panels-ui.ee2330a4.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.gz +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.304ba0d4.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.4273cbc5.js +106 -0
- package/dist/web/public/session-ui.4273cbc5.js.br +0 -0
- package/dist/web/public/session-ui.4273cbc5.js.gz +0 -0
- package/dist/web/public/{settings-ui.11da6f15.js → settings-ui.8b37cf07.js} +14 -14
- package/dist/web/public/settings-ui.8b37cf07.js.br +0 -0
- package/dist/web/public/settings-ui.8b37cf07.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.81d95f50.css +1 -0
- package/dist/web/public/styles.81d95f50.css.br +0 -0
- package/dist/web/public/styles.81d95f50.css.gz +0 -0
- package/dist/web/public/subagent-windows.07277a58.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.2d6189f7.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.b5cdceaf.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.98843069.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +1 -1
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/{terminal-ui.f92eae28.js → terminal-ui.8e4c2017.js} +1 -1
- package/dist/web/public/terminal-ui.8e4c2017.js.br +0 -0
- package/dist/web/public/terminal-ui.8e4c2017.js.gz +0 -0
- package/dist/web/public/tile-grid.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-predictive-echo.276b11d9.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.1be42307.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/{voice-input.2342c37b.js → voice-input.d0580528.js} +232 -137
- package/dist/web/public/voice-input.d0580528.js.br +0 -0
- package/dist/web/public/voice-input.d0580528.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/public/whats-new.json +9 -9
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +31 -5
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/file-routes.d.ts +4 -2
- package/dist/web/routes/file-routes.d.ts.map +1 -1
- package/dist/web/routes/file-routes.js +112 -6
- package/dist/web/routes/file-routes.js.map +1 -1
- package/dist/web/routes/hook-event-routes.d.ts.map +1 -1
- package/dist/web/routes/hook-event-routes.js +45 -16
- package/dist/web/routes/hook-event-routes.js.map +1 -1
- package/dist/web/routes/local-model-routes.d.ts +18 -6
- package/dist/web/routes/local-model-routes.d.ts.map +1 -1
- package/dist/web/routes/local-model-routes.js +47 -10
- package/dist/web/routes/local-model-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +52 -4
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/status-telemetry-routes.d.ts.map +1 -1
- package/dist/web/routes/status-telemetry-routes.js +6 -0
- package/dist/web/routes/status-telemetry-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts +2 -2
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +35 -4
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +30 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +56 -4
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/sensitive-path.d.ts +8 -1
- package/dist/web/sensitive-path.d.ts.map +1 -1
- package/dist/web/sensitive-path.js +23 -4
- package/dist/web/sensitive-path.js.map +1 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +1 -0
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-wait-registry.d.ts +19 -4
- package/dist/web/session-wait-registry.d.ts.map +1 -1
- package/dist/web/session-wait-registry.js +26 -5
- package/dist/web/session-wait-registry.js.map +1 -1
- package/dist/web/voice-stream.d.ts +4 -3
- package/dist/web/voice-stream.d.ts.map +1 -1
- package/dist/web/voice-stream.js +5 -4
- package/dist/web/voice-stream.js.map +1 -1
- package/package.json +1 -1
- package/skills/codeman/SKILL.md +147 -42
- package/skills/codeman/preamble.sh +102 -26
- package/skills/codeman/reference/endpoints.md +13 -9
- package/skills/codeman/reference/messaging.md +2 -2
- package/skills/codeman/reference/recipes.md +2 -2
- package/skills/codeman/reference/verbs.md +46 -15
- package/dist/web/public/app.8719143d.js.br +0 -0
- package/dist/web/public/app.8719143d.js.gz +0 -0
- package/dist/web/public/i18n.1e96a258.js +0 -2
- package/dist/web/public/i18n.1e96a258.js.br +0 -0
- package/dist/web/public/i18n.1e96a258.js.gz +0 -0
- package/dist/web/public/image-input.a5d0f8f3.js.br +0 -0
- package/dist/web/public/image-input.a5d0f8f3.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.b941676c.js.br +0 -0
- package/dist/web/public/keyboard-accessory.b941676c.js.gz +0 -0
- package/dist/web/public/mobile.4dfd5c55.css +0 -1
- package/dist/web/public/mobile.4dfd5c55.css.br +0 -0
- package/dist/web/public/mobile.4dfd5c55.css.gz +0 -0
- package/dist/web/public/panels-ui.d3f4f1c4.js.br +0 -0
- package/dist/web/public/panels-ui.d3f4f1c4.js.gz +0 -0
- package/dist/web/public/session-ui.a7c8c095.js +0 -106
- package/dist/web/public/session-ui.a7c8c095.js.br +0 -0
- package/dist/web/public/session-ui.a7c8c095.js.gz +0 -0
- package/dist/web/public/settings-ui.11da6f15.js.br +0 -0
- package/dist/web/public/settings-ui.11da6f15.js.gz +0 -0
- package/dist/web/public/styles.63382d6e.css +0 -1
- package/dist/web/public/styles.63382d6e.css.br +0 -0
- package/dist/web/public/styles.63382d6e.css.gz +0 -0
- package/dist/web/public/terminal-ui.f92eae28.js.br +0 -0
- package/dist/web/public/terminal-ui.f92eae28.js.gz +0 -0
- package/dist/web/public/voice-input.2342c37b.js.br +0 -0
- package/dist/web/public/voice-input.2342c37b.js.gz +0 -0
package/dist/session.js
CHANGED
|
@@ -496,6 +496,7 @@ export class Session extends EventEmitter {
|
|
|
496
496
|
_watching = null;
|
|
497
497
|
/** Last `prompt_cache` report from the statusline exporter; null until Claude sends one. */
|
|
498
498
|
_promptCache = null;
|
|
499
|
+
_contextReport = null;
|
|
499
500
|
/** Prompt-cache keep-warm opt-in; undefined = follow the app-wide default. Persisted. */
|
|
500
501
|
_keepWarmEnabled;
|
|
501
502
|
/** Last status the keep-warm service published for this session; ephemeral. */
|
|
@@ -670,6 +671,8 @@ export class Session extends EventEmitter {
|
|
|
670
671
|
_grokConfig;
|
|
671
672
|
// GitHub Copilot configuration (only for mode === 'copilot')
|
|
672
673
|
_copilotConfig;
|
|
674
|
+
// jcode configuration (only for mode === 'jcode')
|
|
675
|
+
_jcodeConfig;
|
|
673
676
|
// DeepSeek Harness configuration (only for mode === 'deepseek')
|
|
674
677
|
_deepSeekConfig;
|
|
675
678
|
// OMP configuration (only for mode === 'omp')
|
|
@@ -869,6 +872,10 @@ export class Session extends EventEmitter {
|
|
|
869
872
|
if (config.copilotConfig) {
|
|
870
873
|
this._copilotConfig = config.copilotConfig;
|
|
871
874
|
}
|
|
875
|
+
// Apply jcode configuration
|
|
876
|
+
if (config.jcodeConfig) {
|
|
877
|
+
this._jcodeConfig = config.jcodeConfig;
|
|
878
|
+
}
|
|
872
879
|
// Apply env overrides (exported at spawn, not persisted to disk).
|
|
873
880
|
// Legacy migration: pre-0.7.2 carried effort as the CLAUDE_CODE_EFFORT_LEVEL env var,
|
|
874
881
|
// which hard-locks /effort switching. Extract it into _effort (--settings soft default)
|
|
@@ -958,6 +965,7 @@ export class Session extends EventEmitter {
|
|
|
958
965
|
isWorking: () => this._isWorking,
|
|
959
966
|
isStopped: () => this._isStopped,
|
|
960
967
|
getTotalTokens: () => this._totalInputTokens + this._totalOutputTokens,
|
|
968
|
+
getContextReport: () => this._contextReport,
|
|
961
969
|
getSessionId: () => this.id,
|
|
962
970
|
});
|
|
963
971
|
this._autoOps.on('autoCompact', (data) => this.emit('autoCompact', data));
|
|
@@ -1132,6 +1140,7 @@ export class Session extends EventEmitter {
|
|
|
1132
1140
|
// rather than show the previous conversation's "warm until" against the new one; the
|
|
1133
1141
|
// next statusline render repopulates. A same-id reattach returned above, untouched.
|
|
1134
1142
|
this._promptCache = null;
|
|
1143
|
+
this._contextReport = null;
|
|
1135
1144
|
}
|
|
1136
1145
|
/**
|
|
1137
1146
|
* Append to the conversation chain, oldest first. A repeat of the current tail
|
|
@@ -1467,6 +1476,16 @@ export class Session extends EventEmitter {
|
|
|
1467
1476
|
this._promptCache = next;
|
|
1468
1477
|
return changed;
|
|
1469
1478
|
}
|
|
1479
|
+
/**
|
|
1480
|
+
* Take the context size from a statusline report and run the threshold checks on it. The
|
|
1481
|
+
* token paths above cannot do this: they only run when the counter moves, and the counter
|
|
1482
|
+
* does not see the cached context.
|
|
1483
|
+
*/
|
|
1484
|
+
noteContextReport(report) {
|
|
1485
|
+
this._contextReport = report;
|
|
1486
|
+
this._autoOps.checkAutoCompact();
|
|
1487
|
+
this._autoOps.checkAutoClear();
|
|
1488
|
+
}
|
|
1470
1489
|
/** Prompt-cache keep-warm opt-in; undefined means the app-wide default applies. */
|
|
1471
1490
|
get keepWarmEnabled() {
|
|
1472
1491
|
return this._keepWarmEnabled;
|
|
@@ -2036,6 +2055,7 @@ export class Session extends EventEmitter {
|
|
|
2036
2055
|
autoResumeEnabled: this._autoOps.autoResumeEnabled,
|
|
2037
2056
|
autoResumeAt: this._autoOps.autoResumeAt ?? undefined,
|
|
2038
2057
|
promptCache: this._promptCache ?? undefined,
|
|
2058
|
+
contextWindowSize: this._contextReport?.windowSize,
|
|
2039
2059
|
statusLineExporter: this.statusLineExporter,
|
|
2040
2060
|
keepWarmEnabled: this._keepWarmEnabled,
|
|
2041
2061
|
keepWarm: this._keepWarm ?? undefined,
|
|
@@ -2069,6 +2089,7 @@ export class Session extends EventEmitter {
|
|
|
2069
2089
|
piConfig: this._piConfig,
|
|
2070
2090
|
grokConfig: this._grokConfig,
|
|
2071
2091
|
copilotConfig: this._copilotConfig,
|
|
2092
|
+
jcodeConfig: this._jcodeConfig,
|
|
2072
2093
|
deepSeekConfig: this._deepSeekConfig,
|
|
2073
2094
|
ompConfig: this._ompConfig,
|
|
2074
2095
|
resumeSessionId: this._resumeSessionId,
|
|
@@ -2429,6 +2450,7 @@ export class Session extends EventEmitter {
|
|
|
2429
2450
|
piConfig: this._piConfig,
|
|
2430
2451
|
grokConfig: this._grokConfig,
|
|
2431
2452
|
copilotConfig: this._copilotConfig,
|
|
2453
|
+
jcodeConfig: this._jcodeConfig,
|
|
2432
2454
|
deepSeekConfig: this._deepSeekConfig,
|
|
2433
2455
|
// OMP resolution/pinning does NOT happen here. This object is built
|
|
2434
2456
|
// EAGERLY — including on every boot-recovery reattach, before anyone
|
|
@@ -2936,6 +2958,7 @@ export class Session extends EventEmitter {
|
|
|
2936
2958
|
piConfig: this._piConfig,
|
|
2937
2959
|
grokConfig: this._grokConfig,
|
|
2938
2960
|
copilotConfig: this._copilotConfig,
|
|
2961
|
+
jcodeConfig: this._jcodeConfig,
|
|
2939
2962
|
deepSeekConfig: this._deepSeekConfig,
|
|
2940
2963
|
ompConfig: this._ompConfig,
|
|
2941
2964
|
resumeSessionId: this._resumeSessionId,
|
|
@@ -3496,6 +3519,7 @@ export class Session extends EventEmitter {
|
|
|
3496
3519
|
piConfig: this._piConfig,
|
|
3497
3520
|
grokConfig: this._grokConfig,
|
|
3498
3521
|
copilotConfig: this._copilotConfig,
|
|
3522
|
+
jcodeConfig: this._jcodeConfig,
|
|
3499
3523
|
deepSeekConfig: this._deepSeekConfig,
|
|
3500
3524
|
ompConfig: this._ompConfig,
|
|
3501
3525
|
};
|
|
@@ -4435,9 +4459,9 @@ export class Session extends EventEmitter {
|
|
|
4435
4459
|
// Matches patterns like "123.4k tokens", "5234 tokens", "1.2M tokens"
|
|
4436
4460
|
//
|
|
4437
4461
|
// SAFETY LIMITS:
|
|
4438
|
-
// - Max tokens per session:
|
|
4462
|
+
// - Max tokens per session: MAX_SESSION_TOKENS (the largest context Claude reports is 1M)
|
|
4439
4463
|
// - Max delta per update: 100k (prevents sudden jumps from parsing errors)
|
|
4440
|
-
// - Rejects "M" suffix values
|
|
4464
|
+
// - Rejects "M" suffix values above that maximum to prevent false matches
|
|
4441
4465
|
parseTokensFromStatusLine(cleanData) {
|
|
4442
4466
|
// Quick pre-check: skip expensive regex if "token" not present (performance optimization)
|
|
4443
4467
|
if (!cleanData.includes('token'))
|
|
@@ -4454,9 +4478,8 @@ export class Session extends EventEmitter {
|
|
|
4454
4478
|
tokenCount *= 1000;
|
|
4455
4479
|
}
|
|
4456
4480
|
else if (suffix === 'm') {
|
|
4457
|
-
// Safety:
|
|
4458
|
-
|
|
4459
|
-
if (tokenCount > 0.5) {
|
|
4481
|
+
// Safety: anything claiming more than the largest context is likely a false match
|
|
4482
|
+
if (tokenCount * 1000000 > MAX_SESSION_TOKENS) {
|
|
4460
4483
|
console.warn(`[Session ${this.id}] Rejected suspicious M token value: ${tokenMatch[0]} (would be ${tokenCount * 1000000} tokens)`);
|
|
4461
4484
|
return;
|
|
4462
4485
|
}
|
|
@@ -4483,6 +4506,7 @@ export class Session extends EventEmitter {
|
|
|
4483
4506
|
this._totalInputTokens += Math.round(delta * 0.6);
|
|
4484
4507
|
this._totalOutputTokens += Math.round(delta * 0.4);
|
|
4485
4508
|
// Check if we should auto-compact or auto-clear
|
|
4509
|
+
this._autoOps.noteAbsoluteCounter();
|
|
4486
4510
|
this._autoOps.checkAutoCompact();
|
|
4487
4511
|
this._autoOps.checkAutoClear();
|
|
4488
4512
|
}
|