loki-mode 9.34.1 → 9.36.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/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Autonomous spec-driven build system with a built-in trust layer. It does not call work done until it is verified (RARV-C closure loop, 8 quality gates, completion council, verified-completion evidence gate). Triggers on "Loki Mode". Takes a spec (PRD, GitHub issue, OpenAPI doc, etc.) to deployed product with minimal human intervention. Provider-agnostic. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v9.34.1
6
+ # Loki Mode v9.36.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -470,4 +470,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
470
470
 
471
471
  ---
472
472
 
473
- **v9.34.1 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
473
+ **v9.36.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~410 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 9.34.1
1
+ 9.36.0
package/autonomy/run.sh CHANGED
@@ -2484,6 +2484,39 @@ print(json.dumps(event))
2484
2484
  }
2485
2485
 
2486
2486
  # Emit structured event with key-value pairs
2487
+ # Record that the operator's explicitly-pinned model was NOT the model dispatched.
2488
+ #
2489
+ # WHY THIS EXISTS: a tier resolution that quietly returns something other than the
2490
+ # pin is indistinguishable, in the receipt, from a run that got what it asked for.
2491
+ # The substitution itself is often legitimate; the SILENCE is the defect. This
2492
+ # emits both an event (machine-readable) and an audit line (the tamper-evident
2493
+ # chain), so the swap and its stated reason can be audited and, if wrong,
2494
+ # refuted by whoever has the evidence to refute it.
2495
+ #
2496
+ # Never changes the dispatched model and never fails the caller: an observability
2497
+ # record that can break a run would be worse than the silence it replaces.
2498
+ emit_model_substituted() {
2499
+ local pinned="$1" dispatched="$2" reason="$3" site="$4"
2500
+
2501
+ # Nothing to report when the pin was honored.
2502
+ [ "$pinned" = "$dispatched" ] && return 0
2503
+
2504
+ emit_event_json "model_substituted" \
2505
+ "pinned=$pinned" \
2506
+ "dispatched=$dispatched" \
2507
+ "reason=$reason" \
2508
+ "site=$site" 2>/dev/null || true
2509
+
2510
+ if type audit_agent_action >/dev/null 2>&1; then
2511
+ audit_agent_action "model_substituted" \
2512
+ "Pinned model '$pinned' dispatched as '$dispatched' ($reason)" \
2513
+ "site=$site" 2>/dev/null || true
2514
+ fi
2515
+
2516
+ log_warn "Model pin '$pinned' dispatched as '$dispatched' ($reason)" 2>/dev/null || true
2517
+ return 0
2518
+ }
2519
+
2487
2520
  emit_event_json() {
2488
2521
  local event_type="$1"
2489
2522
  shift
@@ -22668,6 +22701,14 @@ except Exception as exc:
22668
22701
  # effort/model strings and have no fable equivalent (v7.39.1).
22669
22702
  if [ "${PROVIDER_NAME:-claude}" = "claude" ] && [ "$tier_param" = "fable" ]; then
22670
22703
  tier_param="opus"
22704
+ # The operator asked for one model and is getting another. A
22705
+ # substitution may well be CORRECT (a model genuinely unavailable on
22706
+ # this transport), but a SILENT one never is: without this record the
22707
+ # receipt shows an opus run and nothing says the pin was fable, so
22708
+ # nobody can audit the swap or refute the reason behind it.
22709
+ # Behaviour is unchanged -- this only makes the existing collapse
22710
+ # visible and attributable.
22711
+ emit_model_substituted "fable" "opus" "fable_unavailable_at_api" "run.sh:dispatch_backstop"
22671
22712
  fi
22672
22713
  echo "=== RARV Phase: $rarv_phase, Tier: $CURRENT_TIER ($tier_param) ===" | tee -a "$log_file" "$agent_log"
22673
22714
  log_info "RARV Phase: $rarv_phase -> Tier: $CURRENT_TIER ($tier_param)"
@@ -24473,12 +24514,31 @@ EOF
24473
24514
  _loki_check_claim_grounding || true
24474
24515
  fi
24475
24516
  local _loki_completion_ready=1
24517
+ # TIME THE COUNCIL. Measured on a one-function build: the agent did
24518
+ # the work in 71s and the council window was 142s -- the largest
24519
+ # single cost in the run -- yet it was the one major step with no
24520
+ # stage_complete record, so its cost could only be INFERRED from
24521
+ # artifact mtimes. Inferring duration from mtimes is invalid (an
24522
+ # mtime says when a file was written, not how long a step took), and
24523
+ # doing so produced a wrong attribution that had to be retracted.
24524
+ # Emitting the real number makes the profile measured rather than
24525
+ # guessed. Purely additive: emit_stage_complete never changes a
24526
+ # verdict, an exit code, or control flow.
24527
+ local _council_t0
24528
+ _council_t0=$(date +%s 2>/dev/null || echo "")
24476
24529
  if loki_is_supervised_simple_web; then
24477
24530
  _loki_supervised_completion_gates_pass "${gate_failures:-}" && _loki_completion_ready=0
24478
24531
  elif type council_should_stop &>/dev/null \
24479
24532
  && LOKI_COMPLETION_CLAIMED="$_loki_completion_claimed" council_should_stop; then
24480
24533
  _loki_completion_ready=0
24481
24534
  fi
24535
+ # Status reports what the council DECIDED, not whether it errored:
24536
+ # "pass" = it approved a stop, "not_run" = it ran and declined to
24537
+ # stop (the build continues). Both are normal outcomes; neither is a
24538
+ # failure, so neither is reported as one.
24539
+ emit_stage_complete "completion_council" \
24540
+ "$([ "$_loki_completion_ready" -eq 0 ] 2>/dev/null && echo pass || echo not_run)" \
24541
+ "$_council_t0" 2>/dev/null || true
24482
24542
  if [ "$_loki_completion_ready" -eq 0 ]; then
24483
24543
  # bash-F1: council_should_stop returns 0 from a genuine approval
24484
24544
  # AND from two force-stop safety valves (stagnation flood /
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "9.34.1"
10
+ __version__ = "9.36.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -2,7 +2,7 @@
2
2
 
3
3
  The flagship product of [Autonomi](https://www.autonomi.dev/). Loki Mode is a spec-driven autonomous builder with a built-in trust layer that takes any spec to a deployed product and verifies completion with evidence (quality gates plus a completion council), not just a "done" claim. Complete installation instructions for all platforms and use cases.
4
4
 
5
- **Version:** v9.34.1
5
+ **Version:** v9.36.0
6
6
 
7
7
  ---
8
8