wogiflow 1.9.9 → 1.9.10
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
|
@@ -44,6 +44,32 @@ function getSmartCompactionConfig() {
|
|
|
44
44
|
let safeThreshold = smartConfig.safeThreshold || 0.95;
|
|
45
45
|
let emergencyThreshold = smartConfig.emergencyThreshold || 0.90;
|
|
46
46
|
|
|
47
|
+
// Claude Code 2.1.75+: Token estimation fix — thinking/tool_use blocks no longer
|
|
48
|
+
// over-counted. We can safely raise thresholds since compaction triggers are now
|
|
49
|
+
// more accurate, giving users ~5% more working context before compaction.
|
|
50
|
+
let ccVersion = null;
|
|
51
|
+
try {
|
|
52
|
+
const { meetsVersion } = require('./flow-utils');
|
|
53
|
+
const versionCheckPath = path.join(PATHS.state, '.version-check.json');
|
|
54
|
+
if (fs.existsSync(versionCheckPath)) {
|
|
55
|
+
const check = JSON.parse(fs.readFileSync(versionCheckPath, 'utf-8'));
|
|
56
|
+
if (check.version) {
|
|
57
|
+
const [major, minor, patch] = check.version.split('.').map(Number);
|
|
58
|
+
ccVersion = { major, minor, patch };
|
|
59
|
+
if (meetsVersion(major, minor, patch, 2, 1, 75)) {
|
|
60
|
+
// Relax thresholds — token counting is now accurate
|
|
61
|
+
if (!smartConfig.safeThreshold) safeThreshold = 0.80;
|
|
62
|
+
if (!smartConfig.emergencyThreshold) emergencyThreshold = 0.92;
|
|
63
|
+
if (process.env.DEBUG) {
|
|
64
|
+
console.log('[context-estimator] CC 2.1.75+ detected — relaxed thresholds (safe: 0.80, emergency: 0.92)');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} catch (err) {
|
|
70
|
+
// Non-blocking — fall back to default thresholds
|
|
71
|
+
}
|
|
72
|
+
|
|
47
73
|
// Claude Code 2.1.50+: CLAUDE_CODE_DISABLE_1M_CONTEXT reduces the context window.
|
|
48
74
|
// Lower thresholds to account for the smaller available context.
|
|
49
75
|
const disableExtendedContext = process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT;
|
package/scripts/flow-health.js
CHANGED
|
@@ -77,9 +77,13 @@ function checkClaudeCodeVersion() {
|
|
|
77
77
|
// 2.1.73+ fixes: SessionStart double-fire, hook context pollution, subagent model on Bedrock/Vertex
|
|
78
78
|
const meets2173 = meetsVersion(major, minor, patch, 2, 1, 73);
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
// 2.1.75+: 1M context default, accurate token estimation, async hook suppression,
|
|
81
|
+
// hook source display, memory file timestamps
|
|
82
|
+
const meets2175 = meetsVersion(major, minor, patch, 2, 1, 75);
|
|
83
|
+
|
|
84
|
+
return { version, meetsMinimum: meetsMin, meets2150, meets2172, meets2173, meets2175 };
|
|
81
85
|
} catch {
|
|
82
|
-
return { version: null, meetsMinimum: true, meets2150: false, meets2172: false, meets2173: false };
|
|
86
|
+
return { version: null, meetsMinimum: true, meets2150: false, meets2172: false, meets2173: false, meets2175: false };
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -225,6 +229,16 @@ function main() {
|
|
|
225
229
|
console.log(` ${color('dim', '→ Subagent model parameter works on Bedrock/Vertex/Foundry')}`);
|
|
226
230
|
console.log(` ${color('dim', '→ modelOverrides setting for custom provider model IDs')}`);
|
|
227
231
|
}
|
|
232
|
+
|
|
233
|
+
// Report 2.1.75+ features
|
|
234
|
+
if (versionCheck.meets2175) {
|
|
235
|
+
console.log(` ${color('green', '✓')} Claude Code 2.1.75+ features available:`);
|
|
236
|
+
console.log(` ${color('dim', '→ 1M context window default for Opus (Max/Team/Enterprise)')}`);
|
|
237
|
+
console.log(` ${color('dim', '→ Accurate token estimation (no thinking/tool_use over-counting)')}`);
|
|
238
|
+
console.log(` ${color('dim', '→ Relaxed compaction thresholds (safe: 80%, emergency: 92%)')}`);
|
|
239
|
+
console.log(` ${color('dim', '→ Hook source displayed in permission prompts')}`);
|
|
240
|
+
console.log(` ${color('dim', '→ Memory file last-modified timestamps for freshness')}`);
|
|
241
|
+
}
|
|
228
242
|
}
|
|
229
243
|
}
|
|
230
244
|
|
|
@@ -135,6 +135,9 @@ function checkClaudeCodeVersionOnce() {
|
|
|
135
135
|
// 2.1.50+: worktree hooks, agent isolation
|
|
136
136
|
// 2.1.72+: ExitWorktree, effort levels, model param on Agent
|
|
137
137
|
// 2.1.73+: SessionStart double-fire fix, hook context pollution fix, modelOverrides, subagent model fix
|
|
138
|
+
// 2.1.75+: 1M context default (Max/Team/Enterprise), accurate token estimation,
|
|
139
|
+
// async hook completion suppressed by default, hook source in permission prompts,
|
|
140
|
+
// memory file last-modified timestamps
|
|
138
141
|
|
|
139
142
|
return null;
|
|
140
143
|
}
|