loki-mode 7.69.0 → 7.71.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/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '7.69.0'
60
+ __version__ = '7.71.0'
@@ -156,7 +156,6 @@ class ProgressiveLoader:
156
156
  remaining_tokens -= layer2_tokens
157
157
 
158
158
  # Collect timeline context for each relevant topic
159
- topic_ids = {t.id for t in relevant_topics}
160
159
  timeline_context: Dict[str, List[Dict[str, Any]]] = {}
161
160
 
162
161
  for topic in relevant_topics:
@@ -177,12 +176,17 @@ class ProgressiveLoader:
177
176
  self._metrics.calculate_savings(index.get("total_tokens_available", 0))
178
177
  return memories, self._metrics
179
178
 
180
- # Layer 3: Load full memories for high-relevance topics
179
+ # Layer 3: Load full memories for high-relevance topics.
180
+ # Gate on effective_score (boosted match score when set, else stored
181
+ # relevance), not the stored relevance_score. The Layer-1 keyword
182
+ # boost lives on the transient match_score precisely so a strongly
183
+ # matching topic can clear this Layer-3 gate; reading the un-boosted
184
+ # relevance_score here would silently drop exactly those topics the
185
+ # boost was meant to surface.
181
186
  if remaining_tokens > 0:
182
- # Sort topics by relevance
183
187
  high_relevance = [
184
188
  t for t in relevant_topics
185
- if t.relevance_score >= self.HIGH_RELEVANCE_THRESHOLD
189
+ if t.effective_score >= self.HIGH_RELEVANCE_THRESHOLD
186
190
  ]
187
191
 
188
192
  storage = self._get_storage()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loki-mode",
3
3
  "mcpName": "io.github.asklokesh/loki-mode",
4
- "version": "7.69.0",
4
+ "version": "7.71.0",
5
5
  "description": "Loki Mode by Autonomi. Autonomous spec-to-product system: takes a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief to a deployed app via the RARV-C closure loop with 8 quality gates. Provider-agnostic (Claude Code, OpenAI Codex, Cline, Aider).",
6
6
  "keywords": [
7
7
  "agent",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "loki-mode",
4
4
  "displayName": "Loki Mode",
5
- "version": "7.69.0",
5
+ "version": "7.71.0",
6
6
  "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
7
7
  "author": {
8
8
  "name": "Autonomi",
@@ -89,7 +89,7 @@ PROVIDER_COST_OUTPUT_FAST=0.015
89
89
  PROVIDER_DEGRADED=true
90
90
  PROVIDER_DEGRADED_REASONS=(
91
91
  "No subagent support"
92
- "Sequential execution only"
92
+ "Sequential execution only - no parallel agents (PROVIDER_MAX_PARALLEL=1)"
93
93
  "No Task tool or MCP"
94
94
  )
95
95
 
@@ -377,7 +377,15 @@ loki_apply_max_tier_clamp() {
377
377
 
378
378
  # Dynamic model resolution (v6.0.0)
379
379
  # Resolves a capability tier to a concrete model name at runtime.
380
- # Respects LOKI_MAX_TIER to cap cost (e.g., maxTier=sonnet prevents opus usage).
380
+ # Respects LOKI_MAX_TIER to cap cost via loki_apply_max_tier_clamp. NOTE the
381
+ # ceiling clamps DOWN to the provider's configured tier model, not to the alias
382
+ # named by the cap: with the stock config (CLAUDE_DEFAULT_DEVELOPMENT=opus, see
383
+ # line 56), LOKI_MAX_TIER=sonnet resolves planning/fable DOWN to
384
+ # PROVIDER_MODEL_DEVELOPMENT, which is still opus. To actually pin sonnet as the
385
+ # ceiling, also set LOKI_ALLOW_HAIKU=true (which makes PROVIDER_MODEL_DEVELOPMENT
386
+ # sonnet) or override LOKI_CLAUDE_MODEL_DEVELOPMENT=sonnet. This is intentional
387
+ # and is mirrored byte-for-byte by the dashboard/estimator ports (parity-locked
388
+ # in tests/test-model-override.sh).
381
389
  # Capability aliases: "best" -> planning tier, "fast" -> fast tier, "balanced" -> development tier
382
390
  resolve_model_for_tier() {
383
391
  local tier="$1"
@@ -161,6 +161,13 @@ resolve_model_for_tier() {
161
161
  esac
162
162
 
163
163
  local max_tier="${LOKI_MAX_TIER:-}"
164
+ # Normalize EXACTLY like claude.sh:356 (loki_apply_max_tier_clamp): trim +
165
+ # lowercase BEFORE the case match. Without this, a user-typed cap like "Haiku"
166
+ # or " haiku " (settings.json maxTier exports verbatim) fell through to the
167
+ # default arm and the cost ceiling was silently bypassed for codex while
168
+ # claude honored it. Both routes (this + applyCodexMaxTier in providers.ts)
169
+ # normalize identically. Parity fix.
170
+ max_tier="$(printf '%s' "$max_tier" | tr '[:upper:]' '[:lower:]' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
164
171
  local effort=""
165
172
 
166
173
  case "$tier" in