loki-mode 7.71.0 → 7.73.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 CHANGED
@@ -444,7 +444,7 @@ See [benchmarks/](benchmarks/) for methodology.
444
444
  | Area | What Works | What Doesn't (Yet) |
445
445
  |------|-----------|---------------------|
446
446
  | **Code Gen** | Full-stack apps from PRDs | Complex domain logic may need human review |
447
- | **Deploy** | Generates configs, Dockerfiles, CI/CD | Does not deploy -- human runs deploy commands |
447
+ | **Deploy** | Generates configs, Dockerfiles, CI/CD; `loki deploy` prints the exact deploy command | Does not deploy -- human runs the printed deploy command (Loki never runs a cloud CLI or git push) |
448
448
  | **Testing** | 8 automated quality gates | Test quality depends on AI assertions |
449
449
  | **Providers** | 5 providers with auto-failover | Non-Claude providers lack parallel agents |
450
450
  | **Dashboard** | Real-time single-machine monitoring | No multi-node clustering |
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 v7.71.0
6
+ # Loki Mode v7.73.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -406,4 +406,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
406
406
 
407
407
  ---
408
408
 
409
- **v7.71.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
409
+ **v7.73.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 7.71.0
1
+ 7.73.0
@@ -0,0 +1,112 @@
1
+ #!/usr/bin/env bash
2
+ # git-pr-advisory.sh -- shared, PRINT-ONLY pull-request advisory helper.
3
+ #
4
+ # LOAD-BEARING INVARIANT: every function here is pure and print-only. It NEVER
5
+ # runs `git push`, NEVER runs `gh pr create`, NEVER mutates the repo. It only
6
+ # prints the commands a user would run, plus a best-effort clipboard copy of the
7
+ # push line. This is the single source of truth sourced by BOTH autonomy/run.sh
8
+ # (LOCK A3 create_session_pr) and autonomy/loki (cmd_deploy) so the two surfaces
9
+ # print byte-identical, correct commands and cannot drift.
10
+ #
11
+ # set -e SAFE: this lib may be sourced under `set -uo pipefail` (run.sh) AND
12
+ # `set -euo pipefail` (loki). Every fallible command ends with `|| true` or sits
13
+ # in a guarded `if`; no bare `((..))`; every var defaulted with `${VAR:-}`;
14
+ # every optional tool is `command -v`-guarded. All print paths `return 0` so a
15
+ # sourced call cannot abort the caller under set -e.
16
+
17
+ # Double-source guard.
18
+ [ -n "${_GIT_PR_ADVISORY_SH:-}" ] && return 0
19
+ _GIT_PR_ADVISORY_SH=1
20
+
21
+ # _git_pr_advisory_origin_url [dir]
22
+ # Echoes the origin remote URL, or empty string if none. Best-effort, never errors.
23
+ _git_pr_advisory_origin_url() {
24
+ local dir="${1:-.}"
25
+ local url=""
26
+ command -v git >/dev/null 2>&1 || { printf '%s' ""; return 0; }
27
+ url="$(git -C "$dir" remote get-url origin 2>/dev/null || true)"
28
+ if [ -z "$url" ]; then
29
+ url="$(git -C "$dir" config --get remote.origin.url 2>/dev/null || true)"
30
+ fi
31
+ printf '%s' "${url:-}"
32
+ return 0
33
+ }
34
+
35
+ # _git_pr_advisory_compare_url <origin_url> <base> <head>
36
+ # Echoes a GitHub compare URL, or empty if the origin URL is not a parseable
37
+ # github.com remote. Handles both ssh (git@github.com:owner/repo.git) and https
38
+ # (https://github.com/owner/repo[.git]) forms. Non-github hosts -> empty.
39
+ _git_pr_advisory_compare_url() {
40
+ local origin_url="${1:-}"
41
+ local base="${2:-}"
42
+ local head="${3:-}"
43
+ [ -n "$origin_url" ] || { printf '%s' ""; return 0; }
44
+ [ -n "$base" ] || { printf '%s' ""; return 0; }
45
+ [ -n "$head" ] || { printf '%s' ""; return 0; }
46
+
47
+ # Only github.com remotes yield a compare URL. Do not fabricate for other hosts.
48
+ case "$origin_url" in
49
+ *github.com[:/]*) : ;;
50
+ *) printf '%s' ""; return 0 ;;
51
+ esac
52
+
53
+ # Reuse the run.sh:2123-2133 idiom: extract owner/repo from ssh or https forms.
54
+ local repo=""
55
+ repo="$(printf '%s' "$origin_url" | sed -E 's/.*github\.com[:/]([^/]+\/[^/]+)(\.git)?$/\1/' 2>/dev/null || true)"
56
+ repo="${repo%.git}"
57
+
58
+ if [ -n "$repo" ] && [ "$repo" != "$origin_url" ] && [ "${repo#*/}" != "$repo" ]; then
59
+ printf '%s' "https://github.com/${repo}/compare/${base}...${head}?expand=1"
60
+ return 0
61
+ fi
62
+
63
+ printf '%s' ""
64
+ return 0
65
+ }
66
+
67
+ # print_pr_advice <base_branch> <head_branch> [dir]
68
+ # Prints PR advice. PRINT-ONLY: never pushes, never creates a PR. Always return 0.
69
+ print_pr_advice() {
70
+ local base="${1:-main}"
71
+ local head="${2:-HEAD}"
72
+ local dir="${3:-.}"
73
+
74
+ printf '%s\n' "To open a pull request:"
75
+ printf '%s\n' " git push -u origin ${head}"
76
+
77
+ if command -v gh >/dev/null 2>&1; then
78
+ printf '%s\n' " gh pr create --base ${base} --head ${head} --title \"Loki Mode session changes\" --fill"
79
+ else
80
+ local origin_url="" compare_url=""
81
+ origin_url="$(_git_pr_advisory_origin_url "$dir")"
82
+ compare_url="$(_git_pr_advisory_compare_url "$origin_url" "$base" "$head")"
83
+ if [ -n "$compare_url" ]; then
84
+ printf '%s\n' " Open: ${compare_url}"
85
+ else
86
+ printf '%s\n' " Open a pull request for branch ${head} on your git host."
87
+ fi
88
+ fi
89
+
90
+ # Best-effort clipboard copy of the push line. TTY-gated, command-v guarded,
91
+ # never fatal. Print a note only if a copy tool actually ran.
92
+ if [ -t 1 ]; then
93
+ local push_line="git push -u origin ${head}"
94
+ local copied=""
95
+ if command -v pbcopy >/dev/null 2>&1; then
96
+ printf '%s' "$push_line" | pbcopy >/dev/null 2>&1 && copied="1" || true
97
+ elif command -v wl-copy >/dev/null 2>&1; then
98
+ printf '%s' "$push_line" | wl-copy >/dev/null 2>&1 && copied="1" || true
99
+ elif command -v xclip >/dev/null 2>&1; then
100
+ printf '%s' "$push_line" | xclip -selection clipboard >/dev/null 2>&1 && copied="1" || true
101
+ elif command -v xsel >/dev/null 2>&1; then
102
+ printf '%s' "$push_line" | xsel --clipboard --input >/dev/null 2>&1 && copied="1" || true
103
+ elif command -v clip >/dev/null 2>&1; then
104
+ printf '%s' "$push_line" | clip >/dev/null 2>&1 && copied="1" || true
105
+ fi
106
+ if [ -n "$copied" ]; then
107
+ printf '%s\n' " (push command copied to clipboard)"
108
+ fi
109
+ fi
110
+
111
+ return 0
112
+ }