loki-mode 8.5.1 → 8.6.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
@@ -75,4 +75,4 @@ try:
75
75
  except ImportError:
76
76
  __all__ = ['mcp']
77
77
 
78
- __version__ = '8.2.0'
78
+ __version__ = '8.6.0'
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": "8.5.1",
4
+ "version": "8.6.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": "8.5.1",
5
+ "version": "8.6.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",
@@ -342,9 +342,36 @@ provider_invoke_with_tier() {
342
342
  provider_invoke_argv() {
343
343
  local tier="${1:-development}"
344
344
  local prompt="${2:-}"
345
- local model
346
- model="$(provider_get_tier_param "$tier" 2>/dev/null || printf '%s' "${CODEX_DEFAULT_MODEL:-}")"
345
+
346
+ # DO NOT pass provider_get_tier_param to --model. For Codex that function
347
+ # returns an EFFORT LEVEL (xhigh/high/low), not a model name -- the note at
348
+ # BUG-PROV-012 above says so explicitly, and provider_invoke() already routes
349
+ # it correctly via CODEX_MODEL_REASONING_EFFORT.
350
+ #
351
+ # This path passed it to --model anyway, so every argv-based invocation sent
352
+ # `--model high` and the API rejected it outright:
353
+ # 400 invalid_request_error: The 'high' model is not supported when using
354
+ # Codex with a ChatGPT account.
355
+ # Measured 2026-07-30: five trials, elapsed 96s/6s/5s/4s/5s, artifact never
356
+ # created. The same task through provider_invoke() succeeded in 72s. The
357
+ # split meant the timeout-safe seam -- the one used precisely when a call
358
+ # must be bounded -- was the broken one, so a hung provider could not be
359
+ # cut off without also breaking the invocation.
360
+ #
361
+ # The model name comes from PROVIDER_MODEL_DEVELOPMENT / CODEX_DEFAULT_MODEL.
362
+ # Both are legitimately EMPTY by default so codex uses its own current
363
+ # default rather than a pinned name that rots; an empty value must therefore
364
+ # omit --model entirely, not send an empty string.
365
+ local model="${PROVIDER_MODEL_DEVELOPMENT:-${CODEX_DEFAULT_MODEL:-}}"
366
+ local effort
367
+ effort="$(provider_get_tier_param "$tier" 2>/dev/null || printf '%s' "")"
368
+
347
369
  _LOKI_INVOKE_ARGV=(codex exec --sandbox workspace-write)
348
370
  [ -n "$model" ] && _LOKI_INVOKE_ARGV+=(--model "$model")
349
371
  _LOKI_INVOKE_ARGV+=("$prompt")
372
+
373
+ # Effort travels as an env var, not an argv flag. Exported so it survives
374
+ # `timeout "${_LOKI_INVOKE_ARGV[@]}"`, which is the whole reason this seam
375
+ # exists: `timeout` cannot exec a shell function.
376
+ [ -n "$effort" ] && export CODEX_MODEL_REASONING_EFFORT="$effort"
350
377
  }