@zerwiz/ymir 0.1.5 → 0.1.7

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.
Files changed (118) hide show
  1. package/.agents/agents/huginn-researcher.md +1 -1
  2. package/.agents/agents/kvasir-scout.md +1 -1
  3. package/.agents/agents/sindri-developer.md +1 -1
  4. package/.agents/backend/README.md +74 -0
  5. package/.agents/backend/model-bridge.py +74 -4
  6. package/.agents/config/cron.yaml +2 -0
  7. package/.agents/config/eindri-dispatch.json +6 -6
  8. package/.agents/migrations/0003-private-data-separation.sh +11 -1
  9. package/.agents/migrations/0005-roots-out-of-tree.sh +158 -0
  10. package/.agents/skills/README.md +1 -1
  11. package/.agents/skills/galdr-ymirsystem/SKILL.md +2 -1
  12. package/.agents/skills/galdr-ymirsystem/assets/harness-integration/README.md +73 -10
  13. package/.agents/skills/galdr-ymirsystem/assets/hlidskjalf-ui.md +44 -1
  14. package/.agents/skills/galdr-ymirsystem/assets/installation.md +215 -23
  15. package/.agents/skills/galdr-ymirsystem/assets/memory-well.md +3 -1
  16. package/.agents/skills/galdr-ymirsystem/assets/nornir-jobs.md +39 -1
  17. package/.agents/skills/galdr-ymirsystem/assets/odrerir-hall.md +4 -0
  18. package/.agents/skills/galdr-ymirsystem/assets/pi-boot/pi-profile.yml +7 -2
  19. package/.agents/skills/galdr-ymirsystem/assets/registry.md +1 -1
  20. package/.agents/skills/galdr-ymirsystem/assets/runtime-compliance.md +2 -2
  21. package/.agents/skills/galdr-ymirsystem/assets/smidja.md +16 -11
  22. package/.agents/skills/galdr-ymirsystem/scripts/compliance-check.sh +147 -4
  23. package/.agents/skills/groa-update/SKILL.md +20 -0
  24. package/.agents/skills/hamr-adapters/SKILL.md +2 -2
  25. package/.agents/skills/lifecycle/smoke_test.sh +7 -2
  26. package/.agents/skills/ymir-host/SKILL.md +2 -1
  27. package/.agents/skills/ymir-host/assets/install.md +69 -0
  28. package/AGENTS.md +78 -34
  29. package/CHANGELOG.md +1033 -1
  30. package/README.md +1 -1
  31. package/RULES/02-agents.md +2 -2
  32. package/RULES/04-hoard.md +32 -0
  33. package/RULES/06-append-only.md +50 -0
  34. package/RULES/07-config.md +56 -0
  35. package/RULES/09-electron.md +58 -0
  36. package/RULES/README.md +2 -0
  37. package/bin/a2a-mcp.sh +42 -7
  38. package/bin/agents-config.sh +30 -7
  39. package/bin/apodex-smoke-test.sh +14 -1
  40. package/bin/bifrost-bridge.sh +25 -6
  41. package/bin/bootstrap-macos.sh +6 -1
  42. package/bin/brokk-send.sh +14 -1
  43. package/bin/changelog-assemble.sh +154 -0
  44. package/bin/changelog-guard.sh +39 -7
  45. package/bin/crash-sense.sh +14 -1
  46. package/bin/design-check.sh +80 -0
  47. package/bin/design-icon.sh +153 -0
  48. package/bin/docs-guard.sh +2 -2
  49. package/bin/editor-place.sh +33 -15
  50. package/bin/eindri-acclaim.sh +14 -1
  51. package/bin/eindri-seat.sh +83 -0
  52. package/bin/eindri-seen.sh +14 -1
  53. package/bin/eindri-start.sh +14 -1
  54. package/bin/eir-doctor.sh +47 -1
  55. package/bin/feature-inventory.sh +73 -0
  56. package/bin/fleet-apply.sh +15 -2
  57. package/bin/github-deploy.sh +14 -1
  58. package/bin/gjallarhorn-expose.sh +43 -9
  59. package/bin/gjallarhorn-notify.sh +14 -1
  60. package/bin/gjallarhorn-purge.sh +14 -1
  61. package/bin/gjallarhorn-tunnel.sh +16 -3
  62. package/bin/groa-update.sh +9 -1
  63. package/bin/hall-snapshot.sh +21 -2
  64. package/bin/herdr-run.sh +23 -2
  65. package/bin/hlidskjalf-agents.sh +172 -0
  66. package/bin/hlidskjalf-usage.sh +196 -0
  67. package/bin/hoard-guard.sh +135 -0
  68. package/bin/hoard-lib.sh +91 -11
  69. package/bin/hodd.sh +28 -4
  70. package/bin/huginn-research-worker.sh +14 -1
  71. package/bin/local-model-lock.sh +22 -3
  72. package/bin/mimir-bridge.py +33 -0
  73. package/bin/mimir-bridge.sh +14 -1
  74. package/bin/mimir-reflect.sh +27 -0
  75. package/bin/mjollnir-webhook.sh +14 -1
  76. package/bin/mjollnir.sh +22 -3
  77. package/bin/model-hardware.sh +17 -3
  78. package/bin/model-resolve.sh +14 -1
  79. package/bin/nornir-job-hall-snapshot.sh +28 -0
  80. package/bin/nornir-job-nsr-compliance.sh +54 -0
  81. package/bin/npm-publish.sh +136 -0
  82. package/bin/omarchy-install.sh +18 -5
  83. package/bin/omarchy-plugins.sh +15 -2
  84. package/bin/omarchy-sense.sh +14 -1
  85. package/bin/pi-model-agnostic.sh +71 -0
  86. package/bin/private-guard.sh +20 -0
  87. package/bin/project-git.sh +18 -4
  88. package/bin/public-guard.sh +3 -2
  89. package/bin/sessrumnir-ensure.sh +1 -1
  90. package/bin/sessrumnir.sh +16 -3
  91. package/bin/smidja-bootstrap.sh +5 -1
  92. package/bin/syn-asset-pretool-check.sh +14 -1
  93. package/bin/syn-spawn-pretool-check.sh +58 -0
  94. package/bin/tailscale-sync.sh +15 -2
  95. package/bin/telegram-bot.sh +14 -1
  96. package/bin/ui-truth-check.sh +75 -0
  97. package/bin/valknut-load.sh +42 -4
  98. package/bin/wedge-notify.sh +14 -1
  99. package/bin/workspace-rag.sh +14 -1
  100. package/bin/ymir-install.sh +219 -54
  101. package/bin/ymir-plan.sh +356 -0
  102. package/bin/ymir-say.sh +14 -1
  103. package/bin/ymir-setup-auth.sh +12 -1
  104. package/bin/ymir-validate.sh +28 -8
  105. package/docs/lore.md +5 -1
  106. package/docs/runbooks/agents.md +1 -1
  107. package/package.json +13 -3
  108. package/scripts/electron.sh +74 -15
  109. package/scripts/lower.sh +34 -0
  110. package/scripts/raise.sh +42 -0
  111. package/scripts/start.sh +52 -2
  112. package/.agents/config/agents.yaml +0 -50
  113. package/.agents/config/tailscale-sync.yaml +0 -27
  114. package/.agents/memory/kaia.engram +0 -0
  115. package/.agents/memory/kaia.engram-shm +0 -0
  116. package/.agents/memory/kaia.engram-wal +0 -0
  117. package/.agents/memory/well/episodes.jsonl +0 -367
  118. package/.agents/memory/well/workspace.jsonl +0 -27
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bash
2
+ # lower.sh — the whole house in one word: the windows first, then the web.
3
+ #
4
+ # The shells are lowered BEFORE the services, so no window is left watching a
5
+ # port that has just gone away. That order is the whole point of owning both
6
+ # lifecycles in one place.
7
+ #
8
+ # scripts/lower.sh # every shell + the services
9
+ # scripts/lower.sh --desktop # the shells only
10
+ # scripts/lower.sh --web # the services only
11
+ set -u
12
+
13
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
15
+
16
+ WHAT="all"
17
+ case "${1-}" in
18
+ --web) WHAT=web ;;
19
+ --desktop) WHAT=desktop ;;
20
+ -h|--help|"") sed -n '2,12p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
21
+ esac
22
+
23
+ if [ "$WHAT" != "web" ]; then
24
+ printf '\n— the windows —\n'
25
+ if [ -x "$ROOT/bin/sessrumnir.sh" ]; then
26
+ "$ROOT/bin/sessrumnir.sh" stop || printf 'lower: sessrumnir did not stop cleanly\n' >&2
27
+ fi
28
+ "$ROOT/scripts/electron.sh" stop || printf 'lower: electron.sh stop reported errors\n' >&2
29
+ fi
30
+
31
+ if [ "$WHAT" != "desktop" ]; then
32
+ printf '\n— the web —\n'
33
+ "$ROOT/scripts/stop.sh" || printf 'lower: stop.sh reported errors\n' >&2
34
+ fi
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env bash
2
+ # raise.sh — the whole house in one word: the web AND the windows.
3
+ #
4
+ # scripts/start.sh raises the services; scripts/electron.sh raises the desktop
5
+ # shells. Two lifecycles that never met — which is why "the electrons are not
6
+ # running" was true while 28 processes stood, and why a web restart left the
7
+ # shells pointing at a dead port. This is the pair of hands.
8
+ #
9
+ # scripts/raise.sh # services + every desktop shell
10
+ # scripts/raise.sh --web # the services only
11
+ # scripts/raise.sh --desktop # the shells only
12
+ set -u
13
+
14
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15
+ ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
16
+
17
+ WHAT="all"
18
+ case "${1-}" in
19
+ --web) WHAT=web ;;
20
+ --desktop) WHAT=desktop ;;
21
+ -h|--help|"") sed -n '2,12p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
22
+ esac
23
+
24
+ if [ "$WHAT" != "desktop" ]; then
25
+ printf '\n— the web —\n'
26
+ "$ROOT/scripts/start.sh" || printf 'raise: start.sh reported errors\n' >&2
27
+ fi
28
+
29
+ if [ "$WHAT" != "web" ]; then
30
+ printf '\n— the windows —\n'
31
+ # Every shell, by name: hlidskjalf is the default view; smidja and odrerir need
32
+ # their own start; sessrumnir is its own app.
33
+ "$ROOT/scripts/electron.sh" start || printf 'raise: hlidskjalf failed\n' >&2
34
+ for v in smidja odrerir; do
35
+ "$ROOT/scripts/electron.sh" start --view "$v" || printf 'raise: %s failed\n' "$v" >&2
36
+ done
37
+ if [ -x "$ROOT/bin/sessrumnir.sh" ]; then
38
+ "$ROOT/bin/sessrumnir.sh" start || printf 'raise: sessrumnir failed\n' >&2
39
+ fi
40
+ printf '\n'
41
+ "$ROOT/scripts/electron.sh" status
42
+ fi
package/scripts/start.sh CHANGED
@@ -17,10 +17,45 @@ if [ -z "${YMIR_PLATFORM_LOADED:-}" ]; then
17
17
  fi
18
18
 
19
19
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
20
+
21
+ # The operator's settings and secrets live in the home they chose, never in the
22
+ # code tree — a packaged install replaces its tree on upgrade, and a credential
23
+ # must never sit in a tree that ships (Rule 04).
24
+ if [ -z "${YMIR_HOARD_LIB_LOADED:-}" ]; then
25
+ _yr="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
26
+ for _yc in "$_yr/hoard-lib.sh" "$(dirname "$_yr")/bin/hoard-lib.sh"; do
27
+ [ -r "$_yc" ] && { . "$_yc"; YMIR_HOARD_LIB_LOADED=1; break; }
28
+ done
29
+ unset _yr _yc
30
+ fi
31
+ hoard_settings_dir YMIR_SETTINGS_DIR
32
+ hoard_local_env YMIR_ENV_FILE
33
+ hoard_state_dir YMIR_STATE_DIR
34
+ hoard_data_dir YMIR_DATA_DIR
35
+
36
+ # The roots that live OUTSIDE the code tree: this machine's records and the
37
+ # runtime state belong to the home the operator chose at installation, never in
38
+ # the tree — a packaged install replaces its tree on upgrade (Rule 04).
20
39
  APP="$ROOT/apps/hlidskjalf"
21
40
  RUN="$ROOT/.run"
22
41
  PID_FILE="$RUN/hlidskjalf.pid"
23
42
  LOG="$RUN/hlidskjalf.log"
43
+
44
+ # Load the platform env once (Rule 04): the gate, the Bifrost bridge and Mimir
45
+ # all read their credentials from .env.local — 0600, gitignored, never printed.
46
+ # The bun gate reads process.env, and nothing loaded the file for it, so a
47
+ # credential set by bin/ymir-setup-auth.sh never reached it — and the gate treats
48
+ # an empty GATE_AUTH as "open". Loaded before the ports below so those may be
49
+ # overridden from it too.
50
+ if [ -r "$YMIR_ENV_FILE" ]; then
51
+ set +eu
52
+ set -a
53
+ # shellcheck disable=SC1090,SC1091
54
+ . "$YMIR_ENV_FILE" || true
55
+ set +a
56
+ set -eu
57
+ fi
58
+
24
59
  PORT="${HLIDSKJALF_PORT:-3888}"
25
60
 
26
61
  mkdir -p "$RUN"
@@ -43,6 +78,11 @@ fi
43
78
  # Raise the gate API (real runtime data) when bun is available. Demo mode works
44
79
  # without it; live data needs it.
45
80
  API_PORT="${HLIDSKJALF_API_PORT:-3889}"
81
+ # The public hostnames the gate fronts (written by bin/gjallarhorn-expose.sh):
82
+ # without them the gate cannot route a host to its app, and the login page for
83
+ # that app would never be reached.
84
+ [ -r "$YMIR_STATE_DIR/gjallarhorn-hosts.env" ] && . "$YMIR_STATE_DIR/gjallarhorn-hosts.env" && \
85
+ export SMIDJA_HOST ODRERIR_HOST YMIR_PRIMARY_HOST
46
86
  API_PID_FILE="$RUN/hlidskjalf-api.pid"
47
87
  API_LOG="$RUN/hlidskjalf-api.log"
48
88
  if command -v bun >/dev/null 2>&1; then
@@ -66,7 +106,7 @@ if [ -x "$ROOT/bin/nornir-cron-start.sh" ]; then
66
106
  if "$ROOT/bin/nornir-cron-start.sh" >/dev/null 2>&1; then echo "Nornir cron: started"; else echo "Nornir cron: start failed" >&2; fi
67
107
  fi
68
108
  if [ -x "$ROOT/bin/bifrost-bridge.sh" ]; then
69
- if BROKK_ENV_FILE="$ROOT/.env.local" "$ROOT/bin/bifrost-bridge.sh" --start >/dev/null 2>&1; then echo "Bifrost bridge: up"; else echo "Bifrost bridge: not up (needs OPENCODE_GO_API_KEY)" >&2; fi
109
+ if BROKK_ENV_FILE="$YMIR_ENV_FILE" "$ROOT/bin/bifrost-bridge.sh" --start >/dev/null 2>&1; then echo "Bifrost bridge: up"; else echo "Bifrost bridge: not up (needs OPENCODE_GO_API_KEY)" >&2; fi
70
110
  fi
71
111
  # The well — Mimirsbrunn (engram) on :4602; the gate API and mimir.sh drink here.
72
112
  if [ -x "$ROOT/bin/mimir-bridge.sh" ]; then
@@ -81,7 +121,17 @@ VIZ_API_PORT="${SMIDJA_VIZ_API_PORT:-8437}"
81
121
  VIZ_UI_PORT="${SMIDJA_VIZ_UI_PORT:-8438}"
82
122
  VIZ_API_PID_FILE="$RUN/smidja-viz-api.pid"
83
123
  VIZ_UI_PID_FILE="$RUN/smidja-viz-ui.pid"
84
- SMIDJA_DB_PATH="${SMIDJA_DB:-$ROOT/apps/smidja/smidja_data/smidja.db}"
124
+ SMIDJA_DB_PATH="${SMIDJA_DB:-}"
125
+ # The smithy DB follows the HOME: 0003-private-data-separation moved it to
126
+ # $YMIR_HOME/smidja/smidja.db. Prefer an existing DB there, then an in-repo copy
127
+ # for a checkout that keeps its own; SMIDJA_DB overrides either.
128
+ if [ -z "$SMIDJA_DB_PATH" ]; then
129
+ for _db in "${YMIR_HOME:-$HOME/Documents/Ymir}/smidja/smidja.db" \
130
+ "$ROOT/apps/smidja/smidja_data/smidja.db"; do
131
+ [ -f "$_db" ] && { SMIDJA_DB_PATH="$_db"; break; }
132
+ done
133
+ SMIDJA_DB_PATH="${SMIDJA_DB_PATH:-${YMIR_HOME:-$HOME/Documents/Ymir}/smidja/smidja.db}"
134
+ fi
85
135
  if command -v bun >/dev/null 2>&1 && [ -d "$VIZ_DIR" ]; then
86
136
  [ -d "$VIZ_DIR/node_modules" ] || (cd "$VIZ_DIR" && bun install >/dev/null 2>&1 || true)
87
137
  # The API serves the UI from ./dist. Without a build it answers the API but
@@ -1,50 +0,0 @@
1
- # config/agents.yaml — the Allfather's own combination of smiths and models.
2
- #
3
- # THIS IS YOUR FILE. Edit it, then run: bin/agents-config.sh apply
4
- # No other Ymir file hardcodes a model for you; this YAML is the one place.
5
- # Any agent without its own `model:` inherits `default_model`.
6
-
7
- version: 1
8
-
9
- # The harness is chosen by where the model lives — local through pi, online
10
- # through opencode. An agent may still name `harness:` to override the rule.
11
- harness:
12
- local: pi # a model on a local provider runs through pi
13
- online: opencode # a hosted model runs through opencode
14
- local_providers: [llama.cpp, llama-cpp, lmstudio]
15
- # The same local server is named differently per harness; translate on the way.
16
- providers:
17
- llama.cpp: { pi: llama-cpp }
18
-
19
- # The fallback smith for any agent that does not name a model.
20
- default_model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl
21
-
22
- # Local, keyless model servers. `apply` writes these into the project harness
23
- # config (opencode.json) so a model listed here is immediately usable. A bare
24
- # alias (no @quant) is auto-resolved against the server's /v1/models.
25
- providers:
26
- llama.cpp:
27
- npm: "@ai-sdk/openai-compatible"
28
- name: "llama-server (local)"
29
- base_url: "http://127.0.0.1:8080/v1"
30
- models:
31
- # A local llama.cpp router needs the EXACT served id (the @quant suffix);
32
- # `apply` resolves the bare alias below to the id the server reports.
33
- - frontend-design-expert-8b
34
-
35
- # agent name -> { model, harness?, primary? }. Omit model to inherit
36
- # default_model. Omit harness to follow the local/online rule above.
37
- # `primary: true` marks the agent runnable directly (mode: all), not only
38
- # dispatchable by another agent.
39
- agents:
40
- brokk: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
41
- # Hnoss the Shaper runs local (no cloud key) -> pi, and is directly runnable.
42
- hnoss: { model: "llama.cpp/qwen3.6-35b-a3b@q2_k_xl", primary: true }
43
- sindri: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
44
- bragi: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
45
- huginn: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
46
- kvasir: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
47
- mimir: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
48
- snotra: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
49
- forseti: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
50
- galdr: { model: llama.cpp/qwen3.6-35b-a3b@q2_k_xl }
@@ -1,27 +0,0 @@
1
- # config/tailscale-sync.example.yaml — TEMPLATE for the Allfather's machine mesh.
2
- #
3
- # Copies to the private, gitignored config/tailscale-sync.yaml on install, or
4
- # run: bin/tailscale-sync.sh init
5
- # Override the path with YMIR_TAILSCALE_SYNC.
6
- #
7
- # Sync is peer-to-peer over Tailscale (rsync over ssh, addressed by MagicDNS).
8
- # There is no central server and no relay unless the Allfather adds one.
9
-
10
- machine: zerwiz
11
-
12
- # The allowlist: only these tailnet hosts may be synced with. Use the MagicDNS
13
- # name (e.g. `ymir-desktop`) or the tailnet IP.
14
- peers:
15
- - host: omarchy-1
16
- - host: zerwizserver
17
-
18
- # What may move. Paths are on both ends; ~ expands on each machine.
19
- paths:
20
- - ~/.pi/agent/models.json
21
- - ~/.pi/agent/models-store.json
22
- - ~/.pi/agent/settings.json
23
- - ~/.pi/agent/trust.json
24
-
25
- # auth.json holds live credentials. Leave false unless the Allfather trusts
26
- # every listed peer to hold them; Tailscale encrypts the wire, not the trust.
27
- include_auth: false
Binary file
Binary file
Binary file